Dekita

$D13x Skill Scene v1.3

Mar 27th, 2013
218
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 29.04 KB | None | 0 0
  1. #===============================================================================
  2. #
  3. # ☆ $D13x - Skill Scene
  4. # -- Author : Dekita
  5. # -- Version : 1.3
  6. # -- Level : Easy / Normal
  7. # -- Requires : $D13x - Core v1.3+
  8. # -- Engine : RPG Maker VX Ace.
  9. #
  10. #===============================================================================
  11. # ☆ Import
  12. #-------------------------------------------------------------------------------
  13. $D13x={}if$D13x==nil
  14. $D13x[:Skill_Scene]=true
  15. #===============================================================================
  16. # ☆ Updates
  17. #-------------------------------------------------------------------------------
  18. # D /M /Y
  19. # 26/o3/2o13 - Compatibility, (Elements Control)
  20. # - Compatibility, ($D13x Core v1.2)
  21. # 21/o3/2o13 - Compatibility (Proficiency Skills)
  22. # - Bug Fix, (no longer requires Skill Levels)
  23. # - Mp gauge, (no longer overflows)
  24. # - Added "Scope" information,
  25. # 2o/o3/2o13 - Finished,
  26. # 1o/o3/2o13 - Started
  27. #
  28. #===============================================================================
  29. # ☆ Introduction
  30. #-------------------------------------------------------------------------------
  31. # This script overwrites the default skill screen for a more informative one.
  32. # Plug-N-Play.
  33. # Requires $D13x Core Script v 1.3+
  34. #
  35. #===============================================================================
  36. # ★☆★☆★☆★☆★☆★☆★☆★ TERMS AND CONDITIONS: ☆★☆★☆★☆★☆★☆★☆★☆★☆
  37. #===============================================================================
  38. # 1. You MUST give credit to "Dekita" !!
  39. # 2. You are NOT allowed to repost this script.(or modified versions)
  40. # 3. You are NOT allowed to convert this script.
  41. # 4. You are NOT allowed to use this script for Commercial games.
  42. # 5. ENJOY!
  43. #
  44. # "FINE PRINT"
  45. # By using this script you hereby agree to the above terms and conditions,
  46. # if any violation of the above terms occurs "legal action" may be taken.
  47. # Not understanding the above terms and conditions does NOT mean that
  48. # they do not apply to you.
  49. # If you wish to discuss the terms and conditions in further detail you can
  50. # contact me at http://dekitarpg.wordpress.com/
  51. #
  52. #===============================================================================
  53. # ☆ Instructions
  54. #-------------------------------------------------------------------------------
  55. # Place Below " ▼ Materials " and Above " ▼ Main " in your script editor.
  56. # Place Under My $D13x - Core Script.
  57. #
  58. #===============================================================================
  59. module Skill_Scene
  60.  
  61. # Turn this on to show the skill damage formula
  62. Show_Formula = false # true
  63.  
  64. end# << Keep
  65. module Vocab
  66.  
  67. def self.skill_dmg_type(id)
  68. case id
  69. when 0 then "Passive Skill" # "None"
  70. when 1 then "HP Damage Skill"
  71. when 2 then "MP Damage Skill"
  72. when 3 then "HP Recover Skill"
  73. when 4 then "MP Recover Skill"
  74. when 5 then "HP Drain Skill"
  75. when 6 then "MP Drain Skill"
  76. end
  77. end
  78.  
  79. def self.scope(id)
  80. case id
  81. when 0 then "N/A" # << If item is scope 0 it will not show.
  82. when 1 then "One Enemy"
  83. when 2 then "All Enemies"
  84. when 3 then "One Random Enemies"
  85. when 4 then "Two Random Enemies"
  86. when 5 then "Three Random Enemies"
  87. when 6 then "Four Random Enemies"
  88. when 7 then "One Ally"
  89. when 8 then "All Allies"
  90. when 9 then "One Ally (dead)"
  91. when 10 then "All allies (dead)"
  92. when 11 then "Self"
  93. else ; ""
  94. end
  95. end
  96.  
  97. end #####################
  98. # CUSTOMISATION END #
  99. #####################
  100. #☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★#
  101. # #
  102. # http://dekitarpg.wordpress.com/ #
  103. # #
  104. #★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆#
  105. #===============================================================================#
  106. # ARE YOU MODIFYING BEYOND THIS POINT? \.\. #
  107. # YES?\.\. #
  108. # OMG, REALLY? \| #
  109. # WELL SLAP MY FACE AND CALL ME A DRAGONITE.\..\.. #
  110. # I REALLY DIDN'T THINK YOU HAD IT IN YOU.\..\.. #
  111. #===============================================================================#
  112. class Window_SkillCommand < Window_Command
  113. #===============================================================================
  114. #--------------------------------------------------------------------------
  115. # Get Window Width
  116. #--------------------------------------------------------------------------
  117. def window_width
  118. return Graphics.width / 4
  119. end
  120. #--------------------------------------------------------------------------
  121. # Get Number of Lines to Show
  122. #--------------------------------------------------------------------------
  123. def visible_line_number
  124. return 2
  125. end
  126. #--------------------------------------------------------------------------
  127. # Set/Get Alignment
  128. #--------------------------------------------------------------------------
  129. def alignment
  130. return 1
  131. end
  132. #--------------------------------------------------------------------------
  133. # Draws Items
  134. #--------------------------------------------------------------------------
  135. def draw_item(index)
  136. self.contents.font.name = General::Fonts
  137. self.contents.font.size = General::Font_Size
  138. self.contents.font.bold = General::Font_Bold
  139. draw_text(item_rect_for_text(index), command_name(index), 1)
  140. end
  141.  
  142. end
  143.  
  144. #==============================================================================
  145. class Window_SkillStatus < Window_Base
  146. #==============================================================================
  147. #--------------------------------------------------------------------------
  148. # Set/Get Window Width
  149. #--------------------------------------------------------------------------
  150. def window_width
  151. Graphics.width / 2
  152. end
  153. #--------------------------------------------------------------------------
  154. # Do Refresh
  155. #--------------------------------------------------------------------------
  156. def refresh
  157. contents.clear
  158. return unless @actor
  159. if !General::Fonts.include?(self.contents.font.name)
  160. self.contents.font.name = General::Fonts
  161. end
  162. if self.contents.font.size != General::Font_Size
  163. self.contents.font.size = General::Font_Size
  164. end
  165. if self.contents.font.bold != General::Font_Bold
  166. self.contents.font.bold = General::Font_Bold
  167. end
  168. wid = self.width - (standard_padding*2)
  169. draw_actor_face(@actor,0,-2,enabled = true)
  170. draw_text(100, 0, self.width - (standard_padding*2), line_height, @actor.name.to_s)
  171. lvtxt = "Lv #{@actor.level} #{@actor.class.name}"
  172. draw_text(100, line_height, self.width - (standard_padding*2), line_height, lvtxt)
  173. draw_de_hp(100, line_height * 2, wid)
  174. draw_de_mp(100, line_height * 3, wid)
  175. end
  176. #--------------------------------------------------------------------------
  177. # Line Height
  178. #--------------------------------------------------------------------------
  179. def line_height
  180. return 22
  181. end
  182. #--------------------------------------------------------------------------
  183. # Window Padding
  184. #--------------------------------------------------------------------------
  185. def standard_padding
  186. return 8
  187. end
  188.  
  189. end
  190.  
  191. #==============================================================================
  192. class Deki_SkillList < Window_SkillList
  193. #==============================================================================
  194. #--------------------------------------------------------------------------
  195. # Initialize Window
  196. #--------------------------------------------------------------------------
  197. def initialize(x, y, width, height)
  198. @skill_info_wind = nil
  199. super(x, y, Graphics.width / 2, height)
  200. end
  201. #--------------------------------------------------------------------------
  202. # Get Digit Count
  203. #--------------------------------------------------------------------------
  204. def col_max
  205. return 1
  206. end
  207. #--------------------------------------------------------------------------
  208. # Update DeHalp
  209. #--------------------------------------------------------------------------
  210. def update_help
  211. @help_window.set_item(item)
  212. @skill_info_wind.item = item if @skill_info_wind != nil
  213. end
  214. #--------------------------------------------------------------------------
  215. # Set Skill Info window
  216. #--------------------------------------------------------------------------
  217. def skill_info_wind=(wind)
  218. @skill_info_wind = wind
  219. end
  220. #--------------------------------------------------------------------------
  221. # Draw Skill Use Cost
  222. #--------------------------------------------------------------------------
  223. def draw_skill_cost(rect, skill)
  224. end
  225. #--------------------------------------------------------------------------
  226. # Refresh Font
  227. #--------------------------------------------------------------------------
  228. def refresh_font
  229. if !General::Fonts.include?(self.contents.font.name)
  230. self.contents.font.name = General::Fonts
  231. end
  232. if self.contents.font.size != General::Font_Size
  233. self.contents.font.size = General::Font_Size
  234. end
  235. if self.contents.font.bold != General::Font_Bold
  236. self.contents.font.bold = General::Font_Bold
  237. end
  238. end
  239.  
  240. end
  241.  
  242. #==============================================================================
  243. class Window_DekiSkillStatus < Window_Selectable
  244. #==============================================================================
  245. #--------------------------------------------------------------------------
  246. # Initialization
  247. #--------------------------------------------------------------------------
  248. def initialize(actor, y, w, h)
  249. @wid = w - (standard_padding*2)
  250. super(0, y, w, h)
  251. @actor = actor
  252. @item = nil
  253. refresh
  254. end
  255. #--------------------------------------------------------------------------
  256. # Set Actor
  257. #--------------------------------------------------------------------------
  258. def actor=(actor)
  259. return if @actor == actor
  260. @actor = actor
  261. refresh
  262. end
  263. #--------------------------------------------------------------------------
  264. # Set Item
  265. #--------------------------------------------------------------------------
  266. def item=(item)
  267. return if @item == item
  268. @item = item
  269. refresh
  270. end
  271. #--------------------------------------------------------------------------
  272. # Get Item
  273. #--------------------------------------------------------------------------
  274. def item
  275. @item
  276. end
  277. #--------------------------------------------------------------------------
  278. # Refresh
  279. #--------------------------------------------------------------------------
  280. def refresh
  281. contents.clear
  282. freshen
  283. draw_block(0, line_height * 0)
  284. end
  285. #--------------------------------------------------------------------------
  286. # Refresh Fonts
  287. #--------------------------------------------------------------------------
  288. def freshen
  289. if !General::Fonts.include?(self.contents.font.name)
  290. self.contents.font.name = General::Fonts
  291. end
  292. if self.contents.font.size != General::Font_Size
  293. self.contents.font.size = General::Font_Size
  294. end
  295. if self.contents.font.bold != General::Font_Bold
  296. self.contents.font.bold = General::Font_Bold
  297. end
  298. end
  299. #--------------------------------------------------------------------------
  300. # Draw Block
  301. #--------------------------------------------------------------------------
  302. def draw_block(x,y)
  303. return unless @item
  304. draw_item_name(@item, x, y)
  305. y = draw_skill_exp(x, y) if $D13x[:Skill_Lv]
  306. y = draw_main_damage_info(x,y)
  307. y = draw_damage_info(x,y)
  308. y = draw_skill_costs(x,y)
  309. y = draw_req_pars(x, y)
  310. y = draw_effects(x, y)
  311. y = draw_profic(x, y)
  312. y = draw_pars(x, y)
  313. y = draw_max_pars(x, y)
  314. end
  315. #--------------------------------------------------------------------------
  316. # Draw Damage Info
  317. #--------------------------------------------------------------------------
  318. def draw_main_damage_info(x,y)
  319. id = @item.damage.type
  320. draw_text(x, y, @wid, line_height, "#{Vocab::skill_dmg_type(id)}")
  321. if @item.scope != 0
  322. y += line_height
  323. draw_text(x, y, @wid, line_height, "Scope : #{Vocab::scope(@item.scope)}")
  324. end
  325. return y
  326. end
  327. #--------------------------------------------------------------------------
  328. # Draw Skill Exp
  329. #--------------------------------------------------------------------------
  330. def draw_skill_exp(x,y)
  331. set = Skill_Levels::Exp_Set[@item.exp_set]
  332. lv_text = set[ @actor.skills_lv( @item.id ) ][1]
  333. draw_text(x, y, @wid, line_height, "#{lv_text}", 2)
  334. if @actor.skills_lv(item.id) < $data_skills[item.id].max_lv
  335. exp = @actor.skills_exp(item.id)
  336. exp_req = set[ @actor.skills_lv(@item.id)+1 ][0]
  337. y += line_height
  338. draw_text(x, y, @wid, line_height, "Exp: #{exp}/#{exp_req}", 2)
  339. else
  340. y += line_height
  341. draw_text(x, y, @wid, line_height, "Exp: MASTERED", 2)
  342. end
  343. return y
  344. end
  345. #--------------------------------------------------------------------------
  346. # Draw Skill Costs
  347. #--------------------------------------------------------------------------
  348. def draw_skill_costs(x,y)
  349. if Skill_Scene::Show_Formula
  350. y += line_height
  351. draw_text(x, y, @wid, line_height, "Formula: #{@item.damage.formula}")
  352. end
  353. if @actor.skill_mp_cost(@item) != 0 && @item.damage.type != 0
  354. y += line_height
  355. text = "MP Cost: #{@actor.skill_mp_cost(@item)}"
  356. draw_text(x, y, @wid, line_height, text)
  357. end
  358. if @actor.skill_tp_cost(@item) != 0 && @item.damage.type != 0
  359. y += line_height
  360. text = "TP Cost: #{@actor.skill_tp_cost(@item)}"
  361. draw_text(x, y, @wid, line_height, text)
  362. end
  363. return y
  364. end
  365. #--------------------------------------------------------------------------
  366. # Draw Element Info
  367. #--------------------------------------------------------------------------
  368. def draw_damage_info(x,y)
  369. if @item.damage.element_id != 0 && @item.damage.type != 0
  370. y += line_height
  371. text = "Element: #{$data_system.elements[@item.damage.element_id]}"
  372. draw_text(x, y, @wid, line_height, text)
  373. end
  374. if @item.damage.type != 0
  375. y += line_height
  376. text = "#{Vocab::x_param(2)}: #{@item.damage.critical ? "Yes" : "No" }"
  377. draw_text(x, y, @wid, line_height, text)
  378. end
  379. return y
  380. end
  381. #--------------------------------------------------------------------------
  382. # Draw Deki Statistics
  383. #--------------------------------------------------------------------------
  384. def draw_pars(x, y)
  385. mul = Skill_Levels::Exp_Set[@item.exp_set][@actor.skills_lv(item.id)][2]
  386. 8.times do |i|
  387. next unless @item.pars[i] != 0
  388. y += line_height
  389. text = "#{Vocab::param(i)}: +#{(@item.pars[i] * mul).to_i}"
  390. draw_text(x, y, @wid, line_height, text)
  391. end
  392. 10.times do |i|
  393. next unless @item.xpars[i] != 0
  394. y += line_height
  395. text = "#{Vocab::x_param(i)}: +#{(@item.xpars[i] * mul * 100).to_f}%"
  396. end
  397. 10.times do |i|
  398. next unless @item.spars[i] != 0
  399. y += line_height
  400. text = "#{Vocab::s_param(i)}: +#{(@item.spars[i] * mul * 100).to_f}%"
  401. draw_text(x, y, @wid, line_height, text)
  402. end
  403. $data_system.elements.size.times do |i|
  404. next unless @item.atk_ele[i] != 0.0
  405. y += line_height
  406. text = "#{$data_system.elements[i]} Attack: +#{(@item.atk_ele[i] * mul * 100).to_f}%"
  407. draw_text(x, y, @wid, line_height, text)
  408. end
  409. $data_system.elements.size.times do |i|
  410. next unless @item.def_ele[i] != 0.0
  411. y += line_height
  412. text = "#{$data_system.elements[i]} Defence: +#{(@item.def_ele[i] * mul * 100).to_f}%"
  413. draw_text(x, y, @wid, line_height, text)
  414. end
  415. return y
  416. end
  417. #--------------------------------------------------------------------------
  418. # Draw Max Deki Statistics
  419. #--------------------------------------------------------------------------
  420. def draw_max_pars(x, y)
  421. mul = Skill_Levels::Exp_Set[@item.exp_set][@actor.skills_lv(item.id)][2]
  422. 8.times do |i|
  423. next unless @item.max_pars[i] != 0
  424. y += line_height
  425. text = "Max #{Vocab::param(i)}: +#{@item.max_pars[i] * mul}"
  426. draw_text(x, y, @wid, line_height, text)
  427. end
  428. 10.times do |i|
  429. next unless @item.max_xpars[i] != 0
  430. y += line_height
  431. text = "Max #{Vocab::x_param(i)}: +#{@item.max_xpars[i] * mul * 100}%"
  432. draw_text(x, y, @wid, line_height, text)
  433. end
  434. 10.times do |i|
  435. next unless @item.max_spars[i] != 0
  436. y += line_height
  437. text = "Max #{Vocab::s_param(i)}: +#{@item.max_spars[i] * mul * 100}%"
  438. draw_text(x, y, @wid, line_height, text)
  439. end
  440. $data_system.elements.size.times do |i|
  441. next unless @item.max_atk_ele[i] != 0.0
  442. y += line_height
  443. text = "Max #{$data_system.elements[i]} Attack: +#{(@item.max_atk_ele[i] * mul * 100).to_f}%"
  444. draw_text(x, y, @wid, line_height, text)
  445. end
  446. $data_system.elements.size.times do |i|
  447. next unless @item.def_ele[i] != 0.0
  448. y += line_height
  449. text = "Max #{$data_system.elements[i]} Defence: +#{(@item.max_def_ele[i] * mul * 100).to_f}%"
  450. draw_text(x, y, @wid, line_height, text)
  451. end
  452. return y
  453. end
  454. #--------------------------------------------------------------------------
  455. # Draw Proficiency Statistics
  456. #--------------------------------------------------------------------------
  457. def draw_profic(x, y)
  458. y = draw_styp_profic(x, y)
  459. y = draw_elem_profic(x, y)
  460. y = draw_weap_profic(x, y)
  461. return y
  462. end
  463. #--------------------------------------------------------------------------
  464. # Draw Weapon Proficiency
  465. #--------------------------------------------------------------------------
  466. def draw_weap_profic(x, y)
  467. return y unless @item.weap_prof[0] != nil
  468. return y unless @item.weap_prof[0] != 0
  469. mul = Skill_Levels::Exp_Set[@item.exp_set][@actor.skills_lv(@item.id)][2]
  470. y += line_height
  471. _A = $data_system.weapon_types[@item.weap_prof[0]]
  472. _B = "#{sprintf("%1.2f%%", (@item.weap_prof[1] * mul)*100)}"
  473. text = "#{_A} Weapon Damage: +#{_B}"
  474. draw_text(x, y, @wid, line_height, text)
  475. return y
  476. end
  477. #--------------------------------------------------------------------------
  478. # Draw Element Proficiency
  479. #--------------------------------------------------------------------------
  480. def draw_elem_profic(x, y)
  481. return y unless @item.elem_prof[0] != nil
  482. return y unless @item.elem_prof[0] != 0
  483. mul = Skill_Levels::Exp_Set[@item.exp_set][@actor.skills_lv(@item.id)][2]
  484. y += line_height
  485. _A = $data_system.elements[@item.elem_prof[0]]
  486. _B = "#{sprintf("%1.2f%%", (@item.elem_prof[1] * mul)*100)}"
  487. text = "#{_A} Skill Damage: +#{_B}"
  488. draw_text(x, y, @wid, line_height, text)
  489. return y
  490. end
  491. #--------------------------------------------------------------------------
  492. # Draw Skill Type Proficiency
  493. #--------------------------------------------------------------------------
  494. def draw_styp_profic(x, y)
  495. return y unless @item.styp_prof[0] != nil
  496. return y unless @item.styp_prof[0] != 0
  497. mul = Skill_Levels::Exp_Set[@item.exp_set][@actor.skills_lv(@item.id)][2]
  498. y += line_height
  499. _A = $data_system.skill_types[@item.styp_prof[0]]
  500. _B = "#{sprintf("%1.2f%%", (@item.styp_prof[1] * mul)*100)}"
  501. text = "#{_A} Skill Damage: +#{_B}"
  502. draw_text(x, y, @wid, line_height, text)
  503. return y
  504. end
  505. #--------------------------------------------------------------------------
  506. # Draw Deki Requirements
  507. #--------------------------------------------------------------------------
  508. def draw_req_pars(x, y)
  509. @actor.class.learnings.each do |skil|
  510. next unless skil.skill_id == @item.id
  511. 8.times do |i|
  512. next unless skil.param_req[i] > 0
  513. y += line_height
  514. text = "Req #{Vocab::param(i)}: #{skil.param_req[i]}"
  515. draw_text(x, y, @wid, line_height, text)
  516. end
  517. 10.times do |i|
  518. next unless skil.xpars_req[i] > 0.0
  519. y += line_height
  520. text = "Req #{Vocab::x_param(i)}: #{skil.xpars_req[i] * 100}%"
  521. draw_text(x, y, @wid, line_height, text)
  522. end
  523. 10.times do |i|
  524. next unless skil.spars_req[i] > 0.0
  525. y += line_height
  526. text = "Req #{Vocab::s_param(i)}: #{skil.spars_req[i] * 100}%"
  527. draw_text(x, y, @wid, line_height, text)
  528. end
  529. $data_system.elements.size.times do |i|
  530. next unless skil.atk_ele_req[i] > 0.0
  531. y += line_height
  532. text = "Req #{$data_system.elements[i]} Attack: #{(skil.atk_ele_req[i]* 100).to_f}%"
  533. draw_text(x, y, @wid, line_height, text)
  534. end
  535. $data_system.elements.size.times do |i|
  536. next unless skil.def_ele_req[i] > 0.0
  537. y += line_height
  538. text = "Req #{$data_system.elements[i]} Defence: #{(skil.def_ele_req[i]* 100).to_f}%"
  539. draw_text(x, y, @wid, line_height, text)
  540. end
  541. end
  542. return y
  543. end
  544. #--------------------------------------------------------------------------
  545. # Draw Effects
  546. #--------------------------------------------------------------------------
  547. def draw_effects(x, y)
  548. y += line_height
  549. draw_text(x, y, @wid, line_height, "Added Effects :")
  550. @item.effects.each do |eff|
  551. next if eff == nil
  552. case eff.code
  553. when 11 then y = draw_hp_rec(x,y,eff.data_id,eff.value1,eff.value2)
  554. when 12 then y = draw_mp_rec(x,y,eff.data_id,eff.value1,eff.value2)
  555. when 13 then y = draw_tp_mod(x,y,eff.data_id,eff.value1)
  556. when 21 then y = draw_atk_statuss(x,y, eff.data_id, eff.value1)
  557. when 22 then y = draw_rem_statuss(x,y, eff.data_id, eff.value1)
  558. when 31 then y = draw_add_buff(x,y,eff.data_id,eff.value1)
  559. when 32 then y = draw_rem_buff(x,y,eff.data_id,eff.value1)
  560. when 33 then y = draw_rem_buff(x,y,eff.data_id)
  561. when 34 then y = draw_rem_debuff(x,y,eff.data_id)
  562. end
  563. end
  564. return y
  565. end
  566. #--------------------------------------------------------------------------
  567. # Draw HP Recovery
  568. #--------------------------------------------------------------------------
  569. def draw_hp_rec(x,y,val1,val2,val3)
  570. y += line_height
  571. text = "HP Recover: #{((@actor.mhp+val3)*val2).to_i}"
  572. draw_text(x, y, @wid, line_height, text)
  573. return y
  574. end
  575. #--------------------------------------------------------------------------
  576. # Draw MP Recovery
  577. #--------------------------------------------------------------------------
  578. def draw_mp_rec(x,y,val1,val2,val3)
  579. y += line_height
  580. text = "MP Recover: #{((@actor.mmp+val3)*val2).to_i}"
  581. draw_text(x, y, @wid, line_height, text)
  582. return y
  583. end
  584. #--------------------------------------------------------------------------
  585. # Draw TP Gain
  586. #--------------------------------------------------------------------------
  587. def draw_tp_mod(x,y,val1,val2)
  588. y += line_height
  589. text = "TP Gain: #{val2}%"
  590. draw_text(x, y, @wid, line_height, text)
  591. return y
  592. end
  593. #--------------------------------------------------------------------------
  594. # Draw Attack Status'
  595. #--------------------------------------------------------------------------
  596. def draw_atk_statuss(x,y,val1,val2)
  597. y += line_height
  598. text = "Inflicts #{$data_states[val1].name} #{sprintf("%1.0f%%", val2*100)}"
  599. draw_text(x, y, @wid, line_height, text)
  600. return y
  601. end
  602. #--------------------------------------------------------------------------
  603. # Draw Remove Status'
  604. #--------------------------------------------------------------------------
  605. def draw_rem_statuss(x,y,val1,val2)
  606. y += line_height
  607. text = "Removes #{$data_states[val1].name} #{sprintf("%1.0f%%", val2*100)}"
  608. draw_text(x, y, @wid, line_height, text)
  609. return y
  610. end
  611. #--------------------------------------------------------------------------
  612. # Draw Add Buff
  613. #--------------------------------------------------------------------------
  614. def draw_add_buff(x,y,val1,val2)
  615. y += line_height
  616. text = "Add #{Vocab::param(val1)} Buff for #{val2.to_i} Turns"
  617. draw_text(x, y, @wid, line_height, text)
  618. return y
  619. end
  620. #--------------------------------------------------------------------------
  621. # Draw Add Debuff
  622. #--------------------------------------------------------------------------
  623. def draw_add_debuff(x,y,val1,val2)
  624. y += line_height
  625. text = "Add #{Vocab::param(val1)} Debuff for #{val2.to_i} Turns"
  626. draw_text(x, y, @wid, line_height, text)
  627. return y
  628. end
  629. #--------------------------------------------------------------------------
  630. # Draw Remove Buff
  631. #--------------------------------------------------------------------------
  632. def draw_rem_buff(x,y,val1)
  633. y += line_height
  634. text = "Removes #{Vocab::param(val1)} Buff"
  635. draw_text(x, y, @wid, line_height, text)
  636. return y
  637. end
  638. #--------------------------------------------------------------------------
  639. # Draw Remove Debuff
  640. #--------------------------------------------------------------------------
  641. def draw_rem_debuff(x,y,val1)
  642. y += line_height
  643. text = "Removes #{Vocab::param(val1)} Debuff"
  644. draw_text(x, y, @wid, line_height, text)
  645. return y
  646. end
  647.  
  648. end
  649.  
  650. #==============================================================================
  651. class Scene_Skill < Scene_ItemBase
  652. #==============================================================================
  653. #--------------------------------------------------------------------------
  654. # Alias List
  655. #--------------------------------------------------------------------------
  656. alias :start_scene_skill :start
  657. alias :ccmwindskillwind :create_command_window
  658. alias :csw_scene_skill :create_status_window
  659. #--------------------------------------------------------------------------
  660. # Start Processing
  661. #--------------------------------------------------------------------------
  662. def start
  663. start_scene_skill
  664. create_item_status_window
  665. end
  666. #--------------------------------------------------------------------------
  667. # Create Halp Window (overwrite)
  668. #--------------------------------------------------------------------------
  669. def create_help_window
  670. @help_window = Deki_Help.new
  671. @help_window.viewport = @viewport
  672. @help_window.x = Graphics.width / 4
  673. end
  674. #--------------------------------------------------------------------------
  675. # Create Command Window
  676. #--------------------------------------------------------------------------
  677. def create_command_window
  678. ccmwindskillwind
  679. @command_window.y = 0
  680. end
  681. #--------------------------------------------------------------------------
  682. # Create Status Window
  683. #--------------------------------------------------------------------------
  684. def create_status_window
  685. csw_scene_skill
  686. @status_window.x = 0
  687. end
  688. #--------------------------------------------------------------------------
  689. # Create Item Window
  690. #--------------------------------------------------------------------------
  691. def create_item_window
  692. wx = @status_window.x + @status_window.width
  693. wy = @help_window.height
  694. ww = Graphics.width
  695. wh = Graphics.height - wy
  696. @item_window = Deki_SkillList.new(wx, wy, ww, wh)
  697. @item_window.actor = @actor
  698. @item_window.viewport = @viewport
  699. @item_window.help_window = @help_window
  700. @item_window.set_handler(:ok, method(:on_item_ok))
  701. @item_window.set_handler(:cancel, method(:on_item_cancel))
  702. @command_window.skill_window = @item_window
  703. end
  704. #--------------------------------------------------------------------------
  705. # Create Item Status Window
  706. #--------------------------------------------------------------------------
  707. def create_item_status_window
  708. y = @command_window.height + @status_window.height
  709. w = Graphics.width / 2
  710. h = Graphics.height - y
  711. @skinf_wind = Window_DekiSkillStatus.new(@actor, y, w, h)
  712. @item_window.skill_info_wind = @skinf_wind
  713. end
  714. #--------------------------------------------------------------------------
  715. # Update
  716. #--------------------------------------------------------------------------
  717. def update
  718. super
  719. @skinf_wind.item = nil if @command_window.active
  720. end
  721.  
  722. end
  723.  
  724. #==============================================================================#
  725. # http://dekitarpg.wordpress.com/ #
  726. #==============================================================================#
Add Comment
Please, Sign In to add comment