Project1

标题: 小白求助……如何让判定角色是否升级 [打印本页]

作者: tearhgo    时间: 2015-9-25 22:35
标题: 小白求助……如何让判定角色是否升级
就比如说,战斗角色后如果角色1升级的话就让开关1打开之类的……
作者: taroxd    时间: 2015-9-26 07:44
用一个变量保存等级。如果战斗结束后发现这个变量的值增加了,说明升级了,此时更新这个变量的值
作者: tearhgo    时间: 2015-9-26 09:58
taroxd 发表于 2015-9-26 07:44
用一个变量保存等级。如果战斗结束后发现这个变量的值增加了,说明升级了,此时更新这个变量的值 ...

嗯,没错,但问题在于,“战斗结束”这个条件应该如何设置?我是想就是战斗结束之后让升级的角色出来说句话什么的,所以也不能是在地图上执行
作者: 游戏我的爱    时间: 2015-9-26 11:22
如果只是让角色升级说什么的话 就可以用这个脚本,找不到链接直接发脚本了0.0
RUBY 代码复制
  1. #==============================================================================
  2. #
  3. # ▼ Yanfly Engine Ace - Victory Aftermath v1.03
  4. # -- Last Updated: 2012.01.07
  5. # -- Level: Easy, Normal, Hard
  6. # -- Requires: n/a
  7. #
  8. #==============================================================================
  9.  
  10. $imported = {} if $imported.nil?
  11. $imported["YEA-VictoryAftermath"] = true
  12.  
  13. #==============================================================================
  14. # ▼ Updates
  15. # =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
  16. # 2012.01.07 - Compatibility Update: JP Manager
  17. # 2012.01.01 - Bug Fixed: Quote tags were mislabeled.
  18. # 2011.12.26 - Compatibility Update: Command Autobattle
  19. # 2011.12.16 - Started Script and Finished.
  20. #
  21. #==============================================================================
  22. # ▼ Introduction
  23. # =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
  24. # At the end of each battle, RPG Maker VX Ace by default shows text saying that
  25. # the party has gained so-and-so EXP while this person leveled up and your
  26. # party happened to find these drops. This script changes that text into
  27. # something more visual for your players to see. Active battle members will be
  28. # seen gaining EXP, any kind of level up changes, and a list of the items
  29. # obtained through drops.
  30. #
  31. #==============================================================================
  32. # ▼ Instructions
  33. # =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
  34. # To install this script, open up your script editor and copy/paste this script
  35. # to an open slot below ▼ Materials/素材 but above ▼ Main. Remember to save.
  36. #
  37. # -----------------------------------------------------------------------------
  38. # Actor Notetags - These notetags go in the actors notebox in the database.
  39. # -----------------------------------------------------------------------------
  40. # <win quotes>
  41. #  string
  42. #  string
  43. # </win quotes>
  44. # Sets the win quote for the actor. The strings are continuous and can use
  45. # text codes. Use \n for a line break. Type in what you want the actor to say
  46. # for the particular win quote. Use [New Quote] in between the two tags to
  47. # start up a new quote.
  48. #
  49. # <level quotes>
  50. #  string
  51. #  string
  52. # </level quotes>
  53. # Sets the level up quote for the actor. The strings are continuous and can use
  54. # text codes. Use \n for a line break. Type in what you want the actor to say
  55. # for the particular win quote. Use [New Quote] in between the two tags to
  56. # start up a new quote.
  57. #
  58. # <drops quotes>
  59. #  string
  60. #  string
  61. # </drops quotes>
  62. # Sets the drops quote for the actor. The strings are continuous and can use
  63. # text codes. Use \n for a line break. Type in what you want the actor to say
  64. # for the particular win quote. Use [New Quote] in between the two tags to
  65. # start up a new quote.
  66. #
  67. # -----------------------------------------------------------------------------
  68. # Class Notetags - These notetags go in the class notebox in the database.
  69. # -----------------------------------------------------------------------------
  70. # <win quotes>
  71. #  string
  72. #  string
  73. # </win quotes>
  74. # Sets the win quote for the class. The strings are continuous and can use
  75. # text codes. Use \n for a line break. Type in what you want the actor to say
  76. # for the particular win quote. Use [New Quote] in between the two tags to
  77. # start up a new quote.
  78. #
  79. # <level quotes>
  80. #  string
  81. #  string
  82. # </level quotes>
  83. # Sets the level up quote for the class. The strings are continuous and can use
  84. # text codes. Use \n for a line break. Type in what you want the actor to say
  85. # for the particular win quote. Use [New Quote] in between the two tags to
  86. # start up a new quote.
  87. #
  88. # <drops quotes>
  89. #  string
  90. #  string
  91. # </drops quotes>
  92. # Sets the drops quote for the class. The strings are continuous and can use
  93. # text codes. Use \n for a line break. Type in what you want the actor to say
  94. # for the particular win quote. Use [New Quote] in between the two tags to
  95. # start up a new quote.
  96. #
  97. #==============================================================================
  98. # ▼ Compatibility
  99. # =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
  100. # This script is made strictly for RPG Maker VX Ace. It is highly unlikely that
  101. # it will run with RPG Maker VX without adjusting.
  102. #
  103. #==============================================================================
  104.  
  105. module YEA
  106.   module VICTORY_AFTERMATH
  107.  
  108.     #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
  109.     # - General Settings -
  110.     #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
  111.     # These are various settings that are used throughout the Victory Aftermath
  112.     # portion of a battle. Adjust them as you see fit.
  113.     #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
  114.     VICTORY_BGM  = RPG::BGM.new("Field1", 100, 100)    # Victory BGM
  115.     VICTORY_TICK = RPG::SE.new("Decision1", 100, 150)  # EXP ticking SFX
  116.     LEVEL_SOUND  = RPG::SE.new("Up4", 80, 150)         # Level Up SFX
  117.     SKILLS_TEXT  = "新技能"                        # New skills text title.
  118.  
  119.     #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
  120.     # - Important Settings -
  121.     #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
  122.     # These are some important settings so please set them up properly. This
  123.     # section includes a switch that allows you to skip the victory aftermath
  124.     # phase (for those back to back battles and making them seamless) and it
  125.     # also allows you to declare a common event to run after each battle. If
  126.     # you do not wish to use either of these features, set them to 0. The
  127.     # common event will run regardless of win or escape.
  128.     #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
  129.     SKIP_AFTERMATH_SWITCH  = 0  # If switch on, skip aftermath. 0 to disable.
  130.     AFTERMATH_COMMON_EVENT = 0  # Runs common event after battle. 0 to disable.
  131.  
  132.     #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
  133.     # - Top Text Settings -
  134.     #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
  135.     # Here, you can adjust the various text that appears in the window that
  136.     # appears at the top of the screen.
  137.     #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
  138.     TOP_TEAM         = "%s的队伍"           # Team name used.
  139.     TOP_VICTORY_TEXT = "%s胜利了!"   # Text used to display victory.
  140.     TOP_LEVEL_UP     = "%s升级!"  # Text used to display level up.
  141.     TOP_SPOILS       = "胜利战利品!"     # Text used for spoils.
  142.  
  143.     #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
  144.     # - EXP Gauge Settings -
  145.     #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
  146.     # Adjust how the EXP Gauge appears for the Victory Aftermath here. This
  147.     # includes the text display, the font size, the colour of the gauges, and
  148.     # more. Adjust it all here.
  149.     #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
  150.     VICTORY_EXP  = "+%sEXP"      # Text used to display EXP.
  151.     EXP_PERCENT  = "%1.2f%%"     # The way EXP percentage will be displayed.
  152.     LEVELUP_TEXT = "LEVEL UP!"   # Text to replace percentage when leveled.
  153.     MAX_LVL_TEXT = "MAX LEVEL"   # Text to replace percentage when max level.
  154.     FONTSIZE_EXP = 20            # Font size used for EXP.
  155.     EXP_TICKS    = 15            # Ticks to full EXP
  156.     EXP_GAUGE1   = 12            # "Window" skin text colour for gauge.
  157.     EXP_GAUGE2   = 4             # "Window" skin text colour for gauge.
  158.     LEVEL_GAUGE1 = 13            # "Window" skin text colour for leveling.
  159.     LEVEL_GAUGE2 = 5             # "Window" skin text colour for leveling.
  160.  
  161.     #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
  162.     # - Victory Messages -
  163.     #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
  164.     # In the Victory Aftermath, actors can say unique things. This is the pool
  165.     # of quotes used for actors without any custom victory quotes. Note that
  166.     # actors with custom quotes will take priority over classes with custom
  167.     # quotes, which will take priority over these default quotes. Use \n for
  168.     # a line break in the quotes.
  169.     #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
  170.     HEADER_TEXT = "\e>\eC[6]%s\eC[0]\e<\n"  # Always at start of messages.
  171.     FOOTER_TEXT = ""                        # Always at end of messages.
  172.  
  173.     # Win Quotes are what the actors say when a battle is won.
  174.     VICTORY_QUOTES ={
  175.     # :type   => Quotes
  176.       #------------------------------------------------------------------------
  177.       :win    => [ # Occurs as initial victory quote.
  178.                    '"不胜利,毋宁死!"',
  179.                    '"接受正义的制裁吧!"',
  180.                    '"你无法抵挡大自然的力量!"',
  181.                    '"过来好好打一架,胆小鬼。"',
  182.                  ],# Do not remove this.
  183.       #------------------------------------------------------------------------
  184.       :level  => [ # Occurs as initial victory quote.
  185.                    '"精彩的比赛。"',
  186.                    '"圣光将赐予我胜利!"',
  187.                    '"狩猎开始了!"',
  188.                    '"荣耀赐予我力量!"',
  189.                  ],# Do not remove this.
  190.       #------------------------------------------------------------------------
  191.       :drops  => [ # Occurs as initial victory quote.
  192.                    '"这不是我想要的结果。"',
  193.                    '"很荣幸见到你。"',
  194.                    '"我需要一把武器。"',
  195.                    '"我会夺取你的灵魂!"',
  196.                  ],# Do not remove this.
  197.       #------------------------------------------------------------------------
  198.     } # Do not remove this.
  199.  
  200.   end # VICTORY_AFTERMATH
  201. end # YEA
  202.  
  203. #==============================================================================
  204. # ▼ Editting anything past this point may potentially result in causing
  205. # computer damage, incontinence, explosion of user's head, coma, death, and/or
  206. # halitosis so edit at your own risk.
  207. #==============================================================================
  208.  
  209. module YEA
  210.   module REGEXP
  211.   module BASEITEM
  212.  
  213.     NEW_QUOTE = /\[(?:NEW_QUOTE|new quote)\]/i
  214.  
  215.     WIN_QUOTE_ON    = /<(?:WIN_QUOTES|win quote|win quotes)>/i
  216.     WIN_QUOTE_OFF   = /<\/(?:WIN_QUOTES|win quote|win quotes)>/i
  217.     LEVEL_QUOTE_ON  = /<(?:LEVEL_QUOTES|level quote|level quotes)>/i
  218.     LEVEL_QUOTE_OFF = /<\/(?:LEVEL_QUOTES|level quote|level quotes)>/i
  219.     DROPS_QUOTE_ON  = /<(?:DROPS_QUOTES|drops quote|drops quotes)>/i
  220.     DROPS_QUOTE_OFF = /<\/(?:DROPS_QUOTES|drops quote|drops quotes)>/i
  221.  
  222.   end # BASEITEM
  223.   end # REGEXP
  224. end # YEA
  225.  
  226. #==============================================================================
  227. # ■ Switch
  228. #==============================================================================
  229.  
  230. module Switch
  231.  
  232.   #--------------------------------------------------------------------------
  233.   # self.skip_aftermath
  234.   #--------------------------------------------------------------------------
  235.   def self.skip_aftermath
  236.     return false if YEA::VICTORY_AFTERMATH::SKIP_AFTERMATH_SWITCH <= 0
  237.     return $game_switches[YEA::VICTORY_AFTERMATH::SKIP_AFTERMATH_SWITCH]
  238.   end
  239.  
  240. end # Switch
  241.  
  242. #==============================================================================
  243. # ■ Numeric
  244. #==============================================================================
  245.  
  246. class Numeric
  247.  
  248.   #--------------------------------------------------------------------------
  249.   # new method: group_digits
  250.   #--------------------------------------------------------------------------
  251.   unless $imported["YEA-CoreEngine"]
  252.   def group; return self.to_s; end
  253.   end # $imported["YEA-CoreEngine"]
  254.  
  255. end # Numeric
  256.  
  257. #==============================================================================
  258. # ■ DataManager
  259. #==============================================================================
  260.  
  261. module DataManager
  262.  
  263.   #--------------------------------------------------------------------------
  264.   # alias method: load_database
  265.   #--------------------------------------------------------------------------
  266.   class <<self; alias load_database_va load_database; end
  267.   def self.load_database
  268.     load_database_va
  269.     load_notetags_va
  270.   end
  271.  
  272.   #--------------------------------------------------------------------------
  273.   # new method: load_notetags_va
  274.   #--------------------------------------------------------------------------
  275.   def self.load_notetags_va
  276.     groups = [$data_actors, $data_classes]
  277.     for group in groups
  278.       for obj in group
  279.         next if obj.nil?
  280.         obj.load_notetags_va
  281.       end
  282.     end
  283.   end
  284.  
  285. end # DataManager
  286.  
  287. #==============================================================================
  288. # ■ RPG::BaseItem
  289. #==============================================================================
  290.  
  291. class RPG::BaseItem
  292.  
  293.   #--------------------------------------------------------------------------
  294.   # public instance variables
  295.   #--------------------------------------------------------------------------
  296.   attr_accessor :win_quotes
  297.   attr_accessor :level_quotes
  298.   attr_accessor :drops_quotes
  299.  
  300.   #--------------------------------------------------------------------------
  301.   # common cache: load_notetags_va
  302.   #--------------------------------------------------------------------------
  303.   def load_notetags_va
  304.     @win_quotes = [""]
  305.     @level_quotes = [""]
  306.     @drops_quotes = [""]
  307.     @victory_quote_type = nil
  308.     #---
  309.     self.note.split(/[\r\n]+/).each { |line|
  310.       case line
  311.       #---
  312.       when YEA::REGEXP::BASEITEM::WIN_QUOTE_ON
  313.         @victory_quote_type = :win_quote
  314.       when YEA::REGEXP::BASEITEM::WIN_QUOTE_OFF
  315.         @victory_quote_type = nil
  316.       when YEA::REGEXP::BASEITEM::LEVEL_QUOTE_ON
  317.         @victory_quote_type = :level_quote
  318.       when YEA::REGEXP::BASEITEM::LEVEL_QUOTE_OFF
  319.         @victory_quote_type = nil
  320.       when YEA::REGEXP::BASEITEM::DROPS_QUOTE_ON
  321.         @victory_quote_type = :drops_quote
  322.       when YEA::REGEXP::BASEITEM::DROPS_QUOTE_OFF
  323.         @victory_quote_type = nil
  324.       #---
  325.       when YEA::REGEXP::BASEITEM::NEW_QUOTE
  326.         case @victory_quote_type
  327.         when nil; next
  328.         when :win_quote;   @win_quotes.push("")
  329.         when :level_quote; @level_quotes.push("")
  330.         when :drops_quote; @drops_quotes.push("")
  331.         end
  332.       #---
  333.       else
  334.         case @victory_quote_type
  335.         when nil; next
  336.         when :win_quote;   @win_quotes[@win_quotes.size-1] += line.to_s
  337.         when :level_quote; @level_quotes[@level_quotes.size-1] += line.to_s
  338.         when :drops_quote; @drops_quotes[@drops_quotes.size-1] += line.to_s
  339.         end
  340.       end
  341.     } # self.note.split
  342.     #---
  343.     return unless self.is_a?(RPG::Class)
  344.     quotes = YEA::VICTORY_AFTERMATH::VICTORY_QUOTES
  345.     @win_quotes = quotes[:win].clone if @win_quotes == [""]
  346.     @level_quotes = quotes[:level].clone if @level_quotes == [""]
  347.     @drops_quotes = quotes[:drops].clone if @drops_quotes == [""]
  348.   end
  349.  
  350. end # RPG::BaseItem
  351.  
  352. #==============================================================================
  353. # ■ BattleManager
  354. #==============================================================================
  355.  
  356. module BattleManager
  357.  
  358.   #--------------------------------------------------------------------------
  359.   # overwrite method: self.process_victory
  360.   #--------------------------------------------------------------------------
  361.   def self.process_victory
  362.     if $imported["YEA-CommandAutobattle"]
  363.       SceneManager.scene.close_disable_autobattle_window
  364.     end
  365.     if Switch.skip_aftermath
  366.       skip_aftermath
  367.       return
  368.     end
  369.     play_battle_end_me
  370.     gain_jp if $imported["YEA-JPManager"]
  371.     display_exp
  372.     gain_exp
  373.     gain_gold
  374.     gain_drop_items
  375.     close_windows
  376.     SceneManager.return
  377.     replay_bgm_and_bgs
  378.     battle_end(0)
  379.     return true
  380.   end
  381.  
  382.   #--------------------------------------------------------------------------
  383.   # new method: self.skip_aftermath
  384.   #--------------------------------------------------------------------------
  385.   def self.skip_aftermath
  386.     $game_party.all_members.each do |actor|
  387.       actor.gain_exp($game_troop.exp_total)
  388.     end
  389.     $game_party.gain_gold($game_troop.gold_total)
  390.     $game_troop.make_drop_items.each do |item|
  391.       $game_party.gain_item(item, 1)
  392.     end
  393.     close_windows
  394.     SceneManager.return
  395.     replay_bgm_and_bgs
  396.     battle_end(0)
  397.   end
  398.  
  399.   #--------------------------------------------------------------------------
  400.   # overwrite method: self.play_battle_end_me
  401.   #--------------------------------------------------------------------------
  402.   def self.play_battle_end_me
  403.     $game_system.battle_end_me.play
  404.     YEA::VICTORY_AFTERMATH::VICTORY_BGM.play
  405.   end
  406.  
  407.   #--------------------------------------------------------------------------
  408.   # new method: self.set_victory_text
  409.   #--------------------------------------------------------------------------
  410.   def self.set_victory_text(actor, type)
  411.     text = "" + sprintf(YEA::VICTORY_AFTERMATH::HEADER_TEXT, actor.name)
  412.     text += actor.victory_quotes(type)[rand(actor.victory_quotes(type).size)]
  413.     text += YEA::VICTORY_AFTERMATH::FOOTER_TEXT
  414.     $game_message.face_name = actor.face_name
  415.     $game_message.face_index = actor.face_index
  416.     $game_message.add(text)
  417.     wait_for_message
  418.   end
  419.  
  420.   #--------------------------------------------------------------------------
  421.   # overwrite method: self.display_exp
  422.   #--------------------------------------------------------------------------
  423.   def self.display_exp
  424.     SceneManager.scene.show_victory_display_exp
  425.     actor = $game_party.random_target
  426.     @victory_actor = actor
  427.     set_victory_text(@victory_actor, :win)
  428.   end
  429.  
  430.   #--------------------------------------------------------------------------
  431.   # overwrite method: self.gain_exp
  432.   #--------------------------------------------------------------------------
  433.   def self.gain_exp
  434.     $game_party.all_members.each do |actor|
  435.       temp_actor = Marshal.load(Marshal.dump(actor))
  436.       actor.gain_exp($game_troop.exp_total)
  437.       next if actor.level == temp_actor.level
  438.       SceneManager.scene.show_victory_level_up(actor, temp_actor)
  439.       set_victory_text(actor, :level)
  440.       wait_for_message
  441.     end
  442.   end
  443.  
  444.   #--------------------------------------------------------------------------
  445.   # overwrite method: self.gain_gold
  446.   #--------------------------------------------------------------------------
  447.   def self.gain_gold
  448.     $game_party.gain_gold($game_troop.gold_total)
  449.   end
  450.  
  451.   #--------------------------------------------------------------------------
  452.   # overwrite method: self.gain_drop_items
  453.   #--------------------------------------------------------------------------
  454.   def self.gain_drop_items
  455.     drops = []
  456.     $game_troop.make_drop_items.each do |item|
  457.       $game_party.gain_item(item, 1)
  458.       drops.push(item)
  459.     end
  460.     SceneManager.scene.show_victory_spoils($game_troop.gold_total, drops)
  461.     set_victory_text(@victory_actor, :drops)
  462.     wait_for_message
  463.   end
  464.  
  465.   #--------------------------------------------------------------------------
  466.   # new method: self.close_windows
  467.   #--------------------------------------------------------------------------
  468.   def self.close_windows
  469.     SceneManager.scene.close_victory_windows
  470.   end
  471.  
  472.   #--------------------------------------------------------------------------
  473.   # alias method: load_database
  474.   #--------------------------------------------------------------------------
  475.   class <<self; alias battle_end_va battle_end; end
  476.   def self.battle_end(result)
  477.     battle_end_va(result)
  478.     return if result == 2
  479.     return if YEA::VICTORY_AFTERMATH::AFTERMATH_COMMON_EVENT <= 0
  480.     event_id = YEA::VICTORY_AFTERMATH::AFTERMATH_COMMON_EVENT
  481.     $game_temp.reserve_common_event(event_id)
  482.   end
  483.  
  484. end # BattleManager
  485.  
  486. #==============================================================================
  487. # ■ Game_Actor
  488. #==============================================================================
  489.  
  490. class Game_Actor < Game_Battler
  491.  
  492.   #--------------------------------------------------------------------------
  493.   # overwrite method: gain_exp
  494.   #--------------------------------------------------------------------------
  495.   def gain_exp(exp)
  496.     enabled = !SceneManager.scene_is?(Scene_Battle)
  497.     change_exp(self.exp + (exp * final_exp_rate).to_i, enabled)
  498.   end
  499.  
  500.   #--------------------------------------------------------------------------
  501.   # new method: victory_quotes
  502.   #--------------------------------------------------------------------------
  503.   def victory_quotes(type)
  504.     case type
  505.     when :win
  506.       return self.actor.win_quotes if self.actor.win_quotes != [""]
  507.       return self.class.win_quotes
  508.     when :level
  509.       return self.actor.level_quotes if self.actor.level_quotes != [""]
  510.       return self.class.level_quotes
  511.     when :drops
  512.       return self.actor.drops_quotes if self.actor.drops_quotes != [""]
  513.       return self.class.drops_quotes
  514.     else
  515.       return ["NOTEXT"]
  516.     end
  517.   end
  518.  
  519. end # Game_Actor
  520.  
  521. #==============================================================================
  522. # ■ Window_VictoryTitle
  523. #==============================================================================
  524.  
  525. class Window_VictoryTitle < Window_Base
  526.  
  527.   #--------------------------------------------------------------------------
  528.   # initialize
  529.   #--------------------------------------------------------------------------
  530.   def initialize
  531.     super(0, 365, Graphics.width, fitting_height(1))
  532.     self.z = 225
  533.     self.openness = 0
  534.   end
  535.  
  536.   #--------------------------------------------------------------------------
  537.   # refresh
  538.   #--------------------------------------------------------------------------
  539.   def refresh(message = "")
  540.     contents.clear
  541.     draw_text(0, 0, contents.width, line_height, message, 1)
  542.   end
  543.  
  544. end # Window_VictoryTitle
  545.  
  546. #==============================================================================
  547. # ■ Window_VictoryEXP_Back
  548. #==============================================================================
  549.  
  550. class Window_VictoryEXP_Back < Window_Selectable
  551.  
  552.   #--------------------------------------------------------------------------
  553.   # initialize
  554.   #--------------------------------------------------------------------------
  555.   def initialize
  556.     super(0, 120, Graphics.width, window_height)
  557.     self.z = 200
  558.     self.openness = 0
  559.   end
  560.  
  561.   #--------------------------------------------------------------------------
  562.   # window_height
  563.   #--------------------------------------------------------------------------
  564.   def window_height
  565.     return Graphics.height - fitting_height(4) - fitting_height(1)
  566.   end
  567.  
  568.   #--------------------------------------------------------------------------
  569.   # col_max
  570.   #--------------------------------------------------------------------------
  571.   def col_max; return item_max; end
  572.  
  573.   #--------------------------------------------------------------------------
  574.   # spacing
  575.   #--------------------------------------------------------------------------
  576.   def spacing; return 8; end
  577.  
  578.   #--------------------------------------------------------------------------
  579.   # item_max
  580.   #--------------------------------------------------------------------------
  581.   def item_max; return $game_party.battle_members.size; end
  582.  
  583.   #--------------------------------------------------------------------------
  584.   # open
  585.   #--------------------------------------------------------------------------
  586.   def open
  587.     @exp_total = $game_troop.exp_total
  588.     super
  589.   end
  590.  
  591.   #--------------------------------------------------------------------------
  592.   # item_rect
  593.   #--------------------------------------------------------------------------
  594.   def item_rect(index)
  595.     rect = Rect.new
  596.     rect.width = item_width
  597.     rect.height = contents.height
  598.     rect.x = index % col_max * (item_width + spacing)
  599.     rect.y = index / col_max * item_height
  600.     return rect
  601.   end
  602.  
  603.   #--------------------------------------------------------------------------
  604.   # draw_item
  605.   #--------------------------------------------------------------------------
  606.   def draw_item(index)
  607.     actor = $game_party.battle_members[index]
  608.     return if actor.nil?
  609.     rect = item_rect(index)
  610.     reset_font_settings
  611.     draw_actor_name(actor, rect)
  612.     draw_exp_gain(actor, rect)
  613.     draw_jp_gain(actor, rect)
  614.     draw_actor_face(actor, rect)
  615.   end
  616.  
  617.   #--------------------------------------------------------------------------
  618.   # draw_actor_name
  619.   #--------------------------------------------------------------------------
  620.   def draw_actor_name(actor, rect)
  621.     name = actor.name
  622.     draw_text(rect.x, rect.y+line_height, rect.width, line_height, name, 1)
  623.   end
  624.  
  625.   #--------------------------------------------------------------------------
  626.   # draw_actor_face
  627.   #--------------------------------------------------------------------------
  628.   def draw_actor_face(actor, rect)
  629.     face_name = actor.face_name
  630.     face_index = actor.face_index
  631.     bitmap = Cache.face(face_name)
  632.     rw = [rect.width, 96].min
  633.     face_rect = Rect.new(face_index % 4 * 96, face_index / 4 * 96, rw, 96)
  634.     rx = (rect.width - rw) / 2 + rect.x
  635.     contents.blt(rx, rect.y + line_height * 2, bitmap, face_rect, 255)
  636.   end
  637.  
  638.   #--------------------------------------------------------------------------
  639.   # draw_exp_gain
  640.   #--------------------------------------------------------------------------
  641.   def draw_exp_gain(actor, rect)
  642.     dw = rect.width - (rect.width - [rect.width, 96].min) / 2
  643.     dy = rect.y + line_height * 3 + 96
  644.     fmt = YEA::VICTORY_AFTERMATH::VICTORY_EXP
  645.     text = sprintf(fmt, actor_exp_gain(actor).group)
  646.     contents.font.size = YEA::VICTORY_AFTERMATH::FONTSIZE_EXP
  647.     change_color(power_up_color)
  648.     draw_text(rect.x, dy, dw, line_height, text, 2)
  649.   end
  650.  
  651.   #--------------------------------------------------------------------------
  652.   # actor_exp_gain
  653.   #--------------------------------------------------------------------------
  654.   def actor_exp_gain(actor)
  655.     n = @exp_total * actor.final_exp_rate
  656.     return n.to_i
  657.   end
  658.  
  659.   #--------------------------------------------------------------------------
  660.   # draw_jp_gain
  661.   #--------------------------------------------------------------------------
  662.   def draw_jp_gain(actor, rect)
  663.     return unless $imported["YEA-JPManager"]
  664.     dw = rect.width - (rect.width - [rect.width, 96].min) / 2
  665.     dy = rect.y + line_height * 4 + 96
  666.     fmt = YEA::JP::VICTORY_AFTERMATH
  667.     text = sprintf(fmt, actor_jp_gain(actor).group, Vocab::jp)
  668.     contents.font.size = YEA::VICTORY_AFTERMATH::FONTSIZE_EXP
  669.     change_color(power_up_color)
  670.     draw_text(rect.x, dy, dw, line_height, text, 2)
  671.   end
  672.  
  673.   #--------------------------------------------------------------------------
  674.   # actor_jp_gain
  675.   #--------------------------------------------------------------------------
  676.   def actor_jp_gain(actor)
  677.     n = actor.battle_jp_earned
  678.     if actor.exp + actor_exp_gain(actor) > actor.exp_for_level(actor.level + 1)
  679.       n += YEA::JP::LEVEL_UP unless actor.max_level?
  680.     end
  681.     return n
  682.   end
  683.  
  684. end # Window_VictoryEXP_Back
  685.  
  686. #==============================================================================
  687. # ■ Window_VictoryEXP_Front
  688. #==============================================================================
  689.  
  690. class Window_VictoryEXP_Front < Window_VictoryEXP_Back
  691.  
  692.   #--------------------------------------------------------------------------
  693.   # initialize
  694.   #--------------------------------------------------------------------------
  695.   def initialize
  696.     super
  697.     self.back_opacity = 0
  698.     @ticks = 0
  699.     @counter = 30
  700.     contents.font.size = YEA::VICTORY_AFTERMATH::FONTSIZE_EXP
  701.   end
  702.  
  703.   #--------------------------------------------------------------------------
  704.   # update
  705.   #--------------------------------------------------------------------------
  706.   def update
  707.     super
  708.     update_tick
  709.   end
  710.  
  711.   #--------------------------------------------------------------------------
  712.   # update_tick
  713.   #--------------------------------------------------------------------------
  714.   def update_tick
  715.     return unless self.openness >= 255
  716.     return unless self.visible
  717.     return if complete_ticks?
  718.     @counter -= 1
  719.     return unless @counter <= 0
  720.     return if @ticks >= YEA::VICTORY_AFTERMATH::EXP_TICKS
  721.     YEA::VICTORY_AFTERMATH::VICTORY_TICK.play
  722.     @counter = 4
  723.     @ticks += 1
  724.     refresh
  725.   end
  726.  
  727.   #--------------------------------------------------------------------------
  728.   # complete_ticks?
  729.   #--------------------------------------------------------------------------
  730.   def complete_ticks?
  731.     for actor in $game_party.battle_members
  732.       total_ticks = YEA::VICTORY_AFTERMATH::EXP_TICKS
  733.       bonus_exp = actor_exp_gain(actor) * @ticks / total_ticks
  734.       now_exp = actor.exp - actor.current_level_exp + bonus_exp
  735.       next_exp = actor.next_level_exp - actor.current_level_exp
  736.       rate = now_exp * 1.0 / next_exp
  737.       return false if rate < 1.0
  738.     end
  739.     return true
  740.   end
  741.  
  742.   #--------------------------------------------------------------------------
  743.   # draw_item
  744.   #--------------------------------------------------------------------------
  745.   def draw_item(index)
  746.     actor = $game_party.battle_members[index]
  747.     return if actor.nil?
  748.     rect = item_rect(index)
  749.     draw_actor_exp(actor, rect)
  750.   end
  751.  
  752.   #--------------------------------------------------------------------------
  753.   # exp_gauge1
  754.   #--------------------------------------------------------------------------
  755.   def exp_gauge1; return text_color(YEA::VICTORY_AFTERMATH::EXP_GAUGE1); end
  756.  
  757.   #--------------------------------------------------------------------------
  758.   # exp_gauge2
  759.   #--------------------------------------------------------------------------
  760.   def exp_gauge2; return text_color(YEA::VICTORY_AFTERMATH::EXP_GAUGE2); end
  761.  
  762.   #--------------------------------------------------------------------------
  763.   # lvl_gauge1
  764.   #--------------------------------------------------------------------------
  765.   def lvl_gauge1; return text_color(YEA::VICTORY_AFTERMATH::LEVEL_GAUGE1); end
  766.  
  767.   #--------------------------------------------------------------------------
  768.   # lvl_gauge2
  769.   #--------------------------------------------------------------------------
  770.   def lvl_gauge2; return text_color(YEA::VICTORY_AFTERMATH::LEVEL_GAUGE2); end
  771.  
  772.   #--------------------------------------------------------------------------
  773.   # draw_actor_exp
  774.   #--------------------------------------------------------------------------
  775.   def draw_actor_exp(actor, rect)
  776.     if actor.max_level?
  777.       draw_exp_gauge(actor, rect, 1.0)
  778.       return
  779.     end
  780.     total_ticks = YEA::VICTORY_AFTERMATH::EXP_TICKS
  781.     bonus_exp = actor_exp_gain(actor) * @ticks / total_ticks
  782.     now_exp = actor.exp - actor.current_level_exp + bonus_exp
  783.     next_exp = actor.next_level_exp - actor.current_level_exp
  784.     rate = now_exp * 1.0 / next_exp
  785.     draw_exp_gauge(actor, rect, rate)
  786.   end
  787.  
  788.   #--------------------------------------------------------------------------
  789.   # draw_exp_gauge
  790.   #--------------------------------------------------------------------------
  791.   def draw_exp_gauge(actor, rect, rate)
  792.     rate = [[rate, 1.0].min, 0.0].max
  793.     dx = (rect.width - [rect.width, 96].min) / 2 + rect.x
  794.     dy = rect.y + line_height * 2 + 96
  795.     dw = [rect.width, 96].min
  796.     colour1 = rate >= 1.0 ? lvl_gauge1 : exp_gauge1
  797.     colour2 = rate >= 1.0 ? lvl_gauge2 : exp_gauge2
  798.     draw_gauge(dx, dy, dw, rate, colour1, colour2)
  799.     fmt = YEA::VICTORY_AFTERMATH::EXP_PERCENT
  800.     text = sprintf(fmt, [rate * 100, 100.00].min)
  801.     if [rate * 100, 100.00].min == 100.00
  802.       text = YEA::VICTORY_AFTERMATH::LEVELUP_TEXT
  803.       text = YEA::VICTORY_AFTERMATH::MAX_LVL_TEXT if actor.max_level?
  804.     end
  805.     draw_text(dx, dy, dw, line_height, text, 1)
  806.   end
  807.  
  808. end # Window_VictoryEXP_Front
  809.  
  810. #==============================================================================
  811. # ■ Window_VictoryLevelUp
  812. #==============================================================================
  813.  
  814. class Window_VictoryLevelUp < Window_Base
  815.  
  816.   #--------------------------------------------------------------------------
  817.   # initialize
  818.   #--------------------------------------------------------------------------
  819.   def initialize
  820.     super(0, 365, Graphics.width, window_height)
  821.     self.z = 200
  822.     hide
  823.   end
  824.  
  825.   #--------------------------------------------------------------------------
  826.   # window_height
  827.   #--------------------------------------------------------------------------
  828.   def window_height
  829.     return Graphics.height - fitting_height(4) - fitting_height(1)
  830.   end
  831.  
  832.   #--------------------------------------------------------------------------
  833.   # refresh
  834.   #--------------------------------------------------------------------------
  835.   def refresh(actor, temp_actor)
  836.     contents.clear
  837.     reset_font_settings
  838.     YEA::VICTORY_AFTERMATH::LEVEL_SOUND.play
  839.     draw_actor_changes(actor, temp_actor)
  840.   end
  841.  
  842.   #--------------------------------------------------------------------------
  843.   # draw_actor_changes
  844.   #--------------------------------------------------------------------------
  845.   def draw_actor_changes(actor, temp_actor)
  846.     dx = contents.width / 16
  847.     draw_actor_image(actor, temp_actor, dx)
  848.     draw_param_names(actor, dx)
  849.     draw_former_stats(temp_actor)
  850.     draw_arrows
  851.     draw_newer_stats(actor, temp_actor)
  852.     draw_new_skills(actor, temp_actor)
  853.   end
  854.  
  855.   #--------------------------------------------------------------------------
  856.   # draw_actor_image
  857.   #--------------------------------------------------------------------------
  858.   def draw_actor_image(actor, temp_actor, dx)
  859.     draw_text(dx, line_height, 96, line_height, actor.name, 1)
  860.     draw_actor_face(actor, dx, line_height * 2)
  861.     exp = actor.exp - temp_actor.exp
  862.     text = sprintf(YEA::VICTORY_AFTERMATH::VICTORY_EXP, exp.group)
  863.     change_color(power_up_color)
  864.     contents.font.size = YEA::VICTORY_AFTERMATH::FONTSIZE_EXP
  865.     draw_text(0, line_height * 2 + 96, dx + 96, line_height, text, 2)
  866.     reset_font_settings
  867.   end
  868.  
  869.   #--------------------------------------------------------------------------
  870.   # draw_param_names
  871.   #--------------------------------------------------------------------------
  872.   def draw_param_names(actor, dx)
  873.     dx += 108
  874.     change_color(system_color)
  875.     text = Vocab.level
  876.     draw_text(dx, 0, contents.width - dx, line_height, text)
  877.     dy = 0
  878.     for i in 0...8
  879.       dy += line_height
  880.       text = Vocab.param(i)
  881.       draw_text(dx, dy, contents.width - dx, line_height, text)
  882.     end
  883.   end
  884.  
  885.   #--------------------------------------------------------------------------
  886.   # draw_former_stats
  887.   #--------------------------------------------------------------------------
  888.   def draw_former_stats(actor)
  889.     dw = contents.width / 2 - 12
  890.     dy = 0
  891.     change_color(normal_color)
  892.     draw_text(0, dy, dw, line_height, actor.level.group, 2)
  893.     for i in 0...8
  894.       dy += line_height
  895.       draw_text(0, dy, dw, line_height, actor.param(i).group, 2)
  896.     end
  897.   end
  898.  
  899.   #--------------------------------------------------------------------------
  900.   # draw_arrows
  901.   #--------------------------------------------------------------------------
  902.   def draw_arrows
  903.     dx = contents.width / 2 - 12
  904.     dy = 0
  905.     change_color(system_color)
  906.     for i in 0..8
  907.       draw_text(dx, dy, 24, line_height, "→", 1)
  908.       dy += line_height
  909.     end
  910.   end
  911.  
  912.   #--------------------------------------------------------------------------
  913.   # draw_newer_stats
  914.   #--------------------------------------------------------------------------
  915.   def draw_newer_stats(actor, temp_actor)
  916.     dx = contents.width / 2 + 12
  917.     dw = contents.width - dx
  918.     dy = 0
  919.     change_color(param_change_color(actor.level - temp_actor.level))
  920.     draw_text(dx, dy, dw, line_height, actor.level.group, 0)
  921.     for i in 0...8
  922.       dy += line_height
  923.       change_color(param_change_color(actor.param(i) - temp_actor.param(i)))
  924.       draw_text(dx, dy, dw, line_height, actor.param(i).group, 0)
  925.     end
  926.   end
  927.  
  928.   #--------------------------------------------------------------------------
  929.   # draw_new_skills
  930.   #--------------------------------------------------------------------------
  931.   def draw_new_skills(actor, temp_actor)
  932.     return if temp_actor.skills.size == actor.skills.size
  933.     dw = 172 + 24
  934.     dx = contents.width - dw
  935.     change_color(system_color)
  936.     text = YEA::VICTORY_AFTERMATH::SKILLS_TEXT
  937.     draw_text(dx, 0, dw, line_height, text, 0)
  938.   end
  939.  
  940. end # Window_VictoryLevelUp
  941.  
  942. #==============================================================================
  943. # ■ Window_VictorySkills
  944. #==============================================================================
  945.  
  946. class Window_VictorySkills < Window_Selectable
  947.  
  948.   #--------------------------------------------------------------------------
  949.   # initialize
  950.   #--------------------------------------------------------------------------
  951.   def initialize
  952.     dy = fitting_height(1) + 24
  953.     dw = 172 + 24 + 24
  954.     dh = Graphics.height - fitting_height(4) - fitting_height(1) - 24
  955.     super(Graphics.width - dw, dy, dw, dh)
  956.     self.opacity = 0
  957.     self.z = 200
  958.     hide
  959.   end
  960.  
  961.   #--------------------------------------------------------------------------
  962.   # item_max
  963.   #--------------------------------------------------------------------------
  964.   def item_max; return @data.nil? ? 0 : @data.size; end
  965.  
  966.   #--------------------------------------------------------------------------
  967.   # refresh
  968.   #--------------------------------------------------------------------------
  969.   def refresh(actor, temp_actor)
  970.     contents.clear
  971.     if actor.skills.size == temp_actor.skills.size
  972.       unselect
  973.       @data = []
  974.       create_contents
  975.       return
  976.     end
  977.     @data = actor.skills - temp_actor.skills
  978.     if @data.size > 8
  979.       select(0)
  980.       activate
  981.     else
  982.       unselect
  983.       deactivate
  984.     end
  985.     create_contents
  986.     draw_all_items
  987.   end
  988.  
  989.   #--------------------------------------------------------------------------
  990.   # refresh
  991.   #--------------------------------------------------------------------------
  992.   def draw_item(index)
  993.     rect = item_rect(index)
  994.     skill = @data[index]
  995.     return if skill.nil?
  996.     rect.width -= 4
  997.     draw_item_name(skill, rect.x, rect.y, true)
  998.   end
  999.  
  1000. end # Window_VictorySkills
  1001.  
  1002. #==============================================================================
  1003. # ■ Window_VictorySpoils
  1004. #==============================================================================
  1005.  
  1006. class Window_VictorySpoils < Window_ItemList
  1007.  
  1008.   #--------------------------------------------------------------------------
  1009.   # initialize
  1010.   #--------------------------------------------------------------------------
  1011.   def initialize
  1012.     super(0, 120, Graphics.width, window_height)
  1013.     self.z = 200
  1014.     hide
  1015.   end
  1016.  
  1017.   #--------------------------------------------------------------------------
  1018.   # window_height
  1019.   #--------------------------------------------------------------------------
  1020.   def window_height
  1021.     return Graphics.height - fitting_height(4) - fitting_height(1)
  1022.   end
  1023.  
  1024.   #--------------------------------------------------------------------------
  1025.   # spacing
  1026.   #--------------------------------------------------------------------------
  1027.   def spacing; return 32; end
  1028.  
  1029.   #--------------------------------------------------------------------------
  1030.   # make
  1031.   #--------------------------------------------------------------------------
  1032.   def make(gold, drops)
  1033.     @gold = gold
  1034.     @drops = drops
  1035.     refresh
  1036.     select(0)
  1037.     activate
  1038.   end
  1039.  
  1040.   #--------------------------------------------------------------------------
  1041.   # make_item_list
  1042.   #--------------------------------------------------------------------------
  1043.   def make_item_list
  1044.     @data = [nil]
  1045.     items = {}
  1046.     weapons = {}
  1047.     armours = {}
  1048.     @goods = {}
  1049.     for item in @drops
  1050.       case item
  1051.       when RPG::Item
  1052.         items[item] = 0 if items[item].nil?
  1053.         items[item] += 1
  1054.       when RPG::Weapon
  1055.         weapons[item] = 0 if weapons[item].nil?
  1056.         weapons[item] += 1
  1057.       when RPG::Armor
  1058.         armours[item] = 0 if armours[item].nil?
  1059.         armours[item] += 1
  1060.       end
  1061.     end
  1062.     items = items.sort { |a,b| a[0].id <=> b[0].id }
  1063.     weapons = weapons.sort { |a,b| a[0].id <=> b[0].id }
  1064.     armours = armours.sort { |a,b| a[0].id <=> b[0].id }
  1065.     for key in items; @goods[key[0]] = key[1]; @data.push(key[0]); end
  1066.     for key in weapons; @goods[key[0]] = key[1]; @data.push(key[0]); end
  1067.     for key in armours; @goods[key[0]] = key[1]; @data.push(key[0]); end
  1068.   end
  1069.  
  1070.   #--------------------------------------------------------------------------
  1071.   # draw_item
  1072.   #--------------------------------------------------------------------------
  1073.   def draw_item(index)
  1074.     item = @data[index]
  1075.     rect = item_rect(index)
  1076.     reset_font_settings
  1077.     if item.nil?
  1078.       draw_gold(rect)
  1079.       return
  1080.     end
  1081.     rect.width -= 4
  1082.     draw_item_name(item, rect.x, rect.y, true, rect.width - 24)
  1083.     draw_item_number(rect, item)
  1084.   end
  1085.  
  1086.   #--------------------------------------------------------------------------
  1087.   # draw_gold
  1088.   #--------------------------------------------------------------------------
  1089.   def draw_gold(rect)
  1090.     text = Vocab.currency_unit
  1091.     draw_currency_value(@gold, text, rect.x, rect.y, rect.width)
  1092.   end
  1093.  
  1094.   #--------------------------------------------------------------------------
  1095.   # draw_item_number
  1096.   #--------------------------------------------------------------------------
  1097.   def draw_item_number(rect, item)
  1098.     number = @goods[item].group
  1099.     if $imported["YEA-AdjustLimits"]
  1100.       contents.font.size = YEA::LIMIT::ITEM_FONT
  1101.       text = sprintf(YEA::LIMIT::ITEM_PREFIX, number)
  1102.       draw_text(rect, text, 2)
  1103.     else
  1104.       draw_text(rect, sprintf(":%s", number), 2)
  1105.     end
  1106.   end
  1107.  
  1108. end # Window_VictorySpoils
  1109.  
  1110. #==============================================================================
  1111. # ■ Scene_Battle
  1112. #==============================================================================
  1113.  
  1114. class Scene_Battle < Scene_Base
  1115.  
  1116.   #--------------------------------------------------------------------------
  1117.   # alias method: create_all_windows
  1118.   #--------------------------------------------------------------------------
  1119.   alias scene_battle_create_all_windows_va create_all_windows
  1120.   def create_all_windows
  1121.     scene_battle_create_all_windows_va
  1122.     create_victory_aftermath_windows
  1123.   end
  1124.  
  1125.   #--------------------------------------------------------------------------
  1126.   # new method: create_victory_aftermath_windows
  1127.   #--------------------------------------------------------------------------
  1128.   def create_victory_aftermath_windows
  1129.     @victory_title_window = Window_VictoryTitle.new
  1130.     @victory_exp_window_back = Window_VictoryEXP_Back.new
  1131.     @victory_exp_window_front = Window_VictoryEXP_Front.new
  1132.     @victory_level_window = Window_VictoryLevelUp.new
  1133.     @victory_level_skills = Window_VictorySkills.new
  1134.     @victory_spoils_window = Window_VictorySpoils.new
  1135.   end
  1136.  
  1137.   #--------------------------------------------------------------------------
  1138.   # new method: show_victory_display_exp
  1139.   #--------------------------------------------------------------------------
  1140.   def show_victory_display_exp
  1141.     @victory_title_window.open
  1142.     name = $game_party.battle_members[0].name
  1143.     fmt = YEA::VICTORY_AFTERMATH::TOP_TEAM
  1144.     name = sprintf(fmt, name) if $game_party.battle_members.size > 1
  1145.     fmt = YEA::VICTORY_AFTERMATH::TOP_VICTORY_TEXT
  1146.     text = sprintf(fmt, name)
  1147.     @victory_title_window.refresh(text)
  1148.     #---
  1149.     @victory_exp_window_back.open
  1150.     @victory_exp_window_back.refresh
  1151.     @victory_exp_window_front.open
  1152.     @victory_exp_window_front.refresh
  1153.   end
  1154.  
  1155.   #--------------------------------------------------------------------------
  1156.   # new method: show_victory_level_up
  1157.   #--------------------------------------------------------------------------
  1158.   def show_victory_level_up(actor, temp_actor)
  1159.     @victory_exp_window_back.hide
  1160.     @victory_exp_window_front.hide
  1161.     #---
  1162.     fmt = YEA::VICTORY_AFTERMATH::TOP_LEVEL_UP
  1163.     text = sprintf(fmt, actor.name)
  1164.     @victory_title_window.refresh(text)
  1165.     #---
  1166.     @victory_level_window.show
  1167.     @victory_level_window.refresh(actor, temp_actor)
  1168.     @victory_level_skills.show
  1169.     @victory_level_skills.refresh(actor, temp_actor)
  1170.   end
  1171.  
  1172.   #--------------------------------------------------------------------------
  1173.   # new method: show_victory_spoils
  1174.   #--------------------------------------------------------------------------
  1175.   def show_victory_spoils(gold, drops)
  1176.     @victory_exp_window_back.hide
  1177.     @victory_exp_window_front.hide
  1178.     @victory_level_window.hide
  1179.     @victory_level_skills.hide
  1180.     #---
  1181.     text = YEA::VICTORY_AFTERMATH::TOP_SPOILS
  1182.     @victory_title_window.refresh(text)
  1183.     #---
  1184.     @victory_spoils_window.show
  1185.     @victory_spoils_window.make(gold, drops)
  1186.   end
  1187.  
  1188.   #--------------------------------------------------------------------------
  1189.   # new method: close_victory_windows
  1190.   #--------------------------------------------------------------------------
  1191.   def close_victory_windows
  1192.     @victory_title_window.close
  1193.     @victory_exp_window_back.close
  1194.     @victory_exp_window_front.close
  1195.     @victory_level_window.close
  1196.     @victory_level_skills.close
  1197.     @victory_spoils_window.close
  1198.     wait(16)
  1199.   end
  1200.  
  1201. end # Scene_Battle
  1202.  
  1203. #==============================================================================
  1204. #
  1205. # ▼ End of File
  1206. #
  1207. #==============================================================================





欢迎光临 Project1 (https://rpg.blue/) Powered by Discuz! X3.1