Dekita

$D13x - Skill Scene v1.7

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