Dekita

skill reqs 1.4

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