Dekita

$D13x Skill Scene v1.2

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