Dekita

Skill Scene 1.1

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