Dekita

skkill scene 1.8

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