Project1

标题: 胜利显示脚本问题。 [打印本页]

作者: 15968715431    时间: 2017-7-29 10:24
标题: 胜利显示脚本问题。
1073行 draw_item_name ,能不能换个其它的方式, 其它脚本有用到这个。经常冲突。


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.                  ],# Do not remove this.
  180.       #------------------------------------------------------------------------
  181.       :level  => [ # Occurs as initial victory quote.
  182.                    '"我还需要更加强大!"',
  183.                  ],# Do not remove this.
  184.       #------------------------------------------------------------------------
  185.       :drops  => [ # Occurs as initial victory quote.
  186.                    '"似乎获得了好东西。"',
  187.                  ],# Do not remove this.
  188.       #------------------------------------------------------------------------
  189.     } # Do not remove this.
  190.  
  191.   end # VICTORY_AFTERMATH
  192. end # YEA
  193.  
  194. #==============================================================================
  195. # ▼ Editting anything past this point may potentially result in causing
  196. # computer damage, incontinence, explosion of user's head, coma, death, and/or
  197. # halitosis so edit at your own risk.
  198. #==============================================================================
  199.  
  200. module YEA
  201.   module REGEXP
  202.   module BASEITEM
  203.  
  204.     NEW_QUOTE = /\[(?:NEW_QUOTE|new quote)\]/i
  205.  
  206.     WIN_QUOTE_ON    = /<(?:WIN_QUOTES|win quote|win quotes)>/i
  207.     WIN_QUOTE_OFF   = /<\/(?:WIN_QUOTES|win quote|win quotes)>/i
  208.     LEVEL_QUOTE_ON  = /<(?:LEVEL_QUOTES|level quote|level quotes)>/i
  209.     LEVEL_QUOTE_OFF = /<\/(?:LEVEL_QUOTES|level quote|level quotes)>/i
  210.     DROPS_QUOTE_ON  = /<(?:DROPS_QUOTES|drops quote|drops quotes)>/i
  211.     DROPS_QUOTE_OFF = /<\/(?:DROPS_QUOTES|drops quote|drops quotes)>/i
  212.  
  213.   end # BASEITEM
  214.   end # REGEXP
  215. end # YEA
  216.  
  217. #==============================================================================
  218. # ■ Switch
  219. #==============================================================================
  220.  
  221. module Switch
  222.  
  223.   #--------------------------------------------------------------------------
  224.   # self.skip_aftermath
  225.   #--------------------------------------------------------------------------
  226.   def self.skip_aftermath
  227.     return false if YEA::VICTORY_AFTERMATH::SKIP_AFTERMATH_SWITCH <= 0
  228.     return $game_switches[YEA::VICTORY_AFTERMATH::SKIP_AFTERMATH_SWITCH]
  229.   end
  230.  
  231. end # Switch
  232.  
  233. #==============================================================================
  234. # ■ Numeric
  235. #==============================================================================
  236.  
  237. class Numeric
  238.  
  239.   #--------------------------------------------------------------------------
  240.   # new method: group_digits
  241.   #--------------------------------------------------------------------------
  242.   unless $imported["YEA-CoreEngine"]
  243.   def group; return self.to_s; end
  244.   end # $imported["YEA-CoreEngine"]
  245.  
  246. end # Numeric
  247.  
  248. #==============================================================================
  249. # ■ DataManager
  250. #==============================================================================
  251.  
  252. module DataManager
  253.  
  254.   #--------------------------------------------------------------------------
  255.   # alias method: load_database
  256.   #--------------------------------------------------------------------------
  257.   class <<self; alias load_database_va load_database; end
  258.   def self.load_database
  259.     load_database_va
  260.     load_notetags_va
  261.   end
  262.  
  263.   #--------------------------------------------------------------------------
  264.   # new method: load_notetags_va
  265.   #--------------------------------------------------------------------------
  266.   def self.load_notetags_va
  267.     groups = [$data_actors, $data_classes]
  268.     for group in groups
  269.       for obj in group
  270.         next if obj.nil?
  271.         obj.load_notetags_va
  272.       end
  273.     end
  274.   end
  275.  
  276. end # DataManager
  277.  
  278. #==============================================================================
  279. # ■ RPG::BaseItem
  280. #==============================================================================
  281.  
  282. class RPG::BaseItem
  283.  
  284.   #--------------------------------------------------------------------------
  285.   # public instance variables
  286.   #--------------------------------------------------------------------------
  287.   attr_accessor :win_quotes
  288.   attr_accessor :level_quotes
  289.   attr_accessor :drops_quotes
  290.  
  291.   #--------------------------------------------------------------------------
  292.   # common cache: load_notetags_va
  293.   #--------------------------------------------------------------------------
  294.   def load_notetags_va
  295.     @win_quotes = [""]
  296.     @level_quotes = [""]
  297.     @drops_quotes = [""]
  298.     @victory_quote_type = nil
  299.     #---
  300.     self.note.split(/[\r\n]+/).each { |line|
  301.       case line
  302.       #---
  303.       when YEA::REGEXP::BASEITEM::WIN_QUOTE_ON
  304.         @victory_quote_type = :win_quote
  305.       when YEA::REGEXP::BASEITEM::WIN_QUOTE_OFF
  306.         @victory_quote_type = nil
  307.       when YEA::REGEXP::BASEITEM::LEVEL_QUOTE_ON
  308.         @victory_quote_type = :level_quote
  309.       when YEA::REGEXP::BASEITEM::LEVEL_QUOTE_OFF
  310.         @victory_quote_type = nil
  311.       when YEA::REGEXP::BASEITEM::DROPS_QUOTE_ON
  312.         @victory_quote_type = :drops_quote
  313.       when YEA::REGEXP::BASEITEM::DROPS_QUOTE_OFF
  314.         @victory_quote_type = nil
  315.       #---
  316.       when YEA::REGEXP::BASEITEM::NEW_QUOTE
  317.         case @victory_quote_type
  318.         when nil; next
  319.         when :win_quote;   @win_quotes.push("")
  320.         when :level_quote; @level_quotes.push("")
  321.         when :drops_quote; @drops_quotes.push("")
  322.         end
  323.       #---
  324.       else
  325.         case @victory_quote_type
  326.         when nil; next
  327.         when :win_quote;   @win_quotes[@win_quotes.size-1] += line.to_s
  328.         when :level_quote; @level_quotes[@level_quotes.size-1] += line.to_s
  329.         when :drops_quote; @drops_quotes[@drops_quotes.size-1] += line.to_s
  330.         end
  331.       end
  332.     } # self.note.split
  333.     #---
  334.     return unless self.is_a?(RPG::Class)
  335.     quotes = YEA::VICTORY_AFTERMATH::VICTORY_QUOTES
  336.     @win_quotes = quotes[:win].clone if @win_quotes == [""]
  337.     @level_quotes = quotes[:level].clone if @level_quotes == [""]
  338.     @drops_quotes = quotes[:drops].clone if @drops_quotes == [""]
  339.   end
  340.  
  341. end # RPG::BaseItem
  342.  
  343. #==============================================================================
  344. # ■ BattleManager
  345. #==============================================================================
  346.  
  347. module BattleManager
  348.  
  349.   #--------------------------------------------------------------------------
  350.   # overwrite method: self.process_victory
  351.   #--------------------------------------------------------------------------
  352.   def self.process_victory
  353.     if $imported["YEA-CommandAutobattle"]
  354.       SceneManager.scene.close_disable_autobattle_window
  355.     end
  356.     if Switch.skip_aftermath
  357.       skip_aftermath
  358.       return
  359.     end
  360.     play_battle_end_me
  361.     gain_jp if $imported["YEA-JPManager"]
  362.     display_exp
  363.     gain_exp
  364.     gain_gold
  365.     gain_drop_items
  366.     close_windows
  367.     SceneManager.return
  368.     replay_bgm_and_bgs
  369.     battle_end(0)
  370.     return true
  371.   end
  372.  
  373.   #--------------------------------------------------------------------------
  374.   # new method: self.skip_aftermath
  375.   #--------------------------------------------------------------------------
  376.   def self.skip_aftermath
  377.     $game_party.all_members.each do |actor|
  378.       actor.gain_exp($game_troop.exp_total)
  379.     end
  380.     $game_party.gain_gold($game_troop.gold_total)
  381.     $game_troop.make_drop_items.each do |item|
  382.       $game_party.gain_item(item, 1)
  383.     end
  384.     close_windows
  385.     SceneManager.return
  386.     replay_bgm_and_bgs
  387.     battle_end(0)
  388.   end
  389.  
  390.   #--------------------------------------------------------------------------
  391.   # overwrite method: self.play_battle_end_me
  392.   #--------------------------------------------------------------------------
  393.   def self.play_battle_end_me
  394.     $game_system.battle_end_me.play
  395.     YEA::VICTORY_AFTERMATH::VICTORY_BGM.play
  396.   end
  397.  
  398.   #--------------------------------------------------------------------------
  399.   # new method: self.set_victory_text
  400.   #--------------------------------------------------------------------------
  401.   def self.set_victory_text(actor, type)
  402.     text = "" + sprintf(YEA::VICTORY_AFTERMATH::HEADER_TEXT, actor.name)
  403.     text += actor.victory_quotes(type)[rand(actor.victory_quotes(type).size)]
  404.     text += YEA::VICTORY_AFTERMATH::FOOTER_TEXT
  405.     $game_message.face_name = actor.face_name
  406.     $game_message.face_index = actor.face_index
  407.     $game_message.add(text)
  408.     wait_for_message
  409.   end
  410.  
  411.   #--------------------------------------------------------------------------
  412.   # overwrite method: self.display_exp
  413.   #--------------------------------------------------------------------------
  414.   def self.display_exp
  415.     SceneManager.scene.show_victory_display_exp
  416.     actor = $game_party.random_target
  417.     @victory_actor = actor
  418.     set_victory_text(@victory_actor, :win)
  419.   end
  420.  
  421.   #--------------------------------------------------------------------------
  422.   # overwrite method: self.gain_exp
  423.   #--------------------------------------------------------------------------
  424.   def self.gain_exp
  425.     $game_party.all_members.each do |actor|
  426.       temp_actor = Marshal.load(Marshal.dump(actor))
  427.       actor.gain_exp($game_troop.exp_total)
  428.       next if actor.level == temp_actor.level
  429.       SceneManager.scene.show_victory_level_up(actor, temp_actor)
  430.       set_victory_text(actor, :level)
  431.       wait_for_message
  432.     end
  433.   end
  434.  
  435.   #--------------------------------------------------------------------------
  436.   # overwrite method: self.gain_gold
  437.   #--------------------------------------------------------------------------
  438.   def self.gain_gold
  439.     $game_party.gain_gold($game_troop.gold_total)
  440.   end
  441.  
  442.   #--------------------------------------------------------------------------
  443.   # overwrite method: self.gain_drop_items
  444.   #--------------------------------------------------------------------------
  445.   def self.gain_drop_items
  446.     drops = []
  447.     $game_troop.make_drop_items.each do |item|
  448.       $game_party.gain_item(item, 1)
  449.       drops.push(item)
  450.     end
  451.     SceneManager.scene.show_victory_spoils($game_troop.gold_total, drops)
  452.     set_victory_text(@victory_actor, :drops)
  453.     wait_for_message
  454.   end
  455.  
  456.   #--------------------------------------------------------------------------
  457.   # new method: self.close_windows
  458.   #--------------------------------------------------------------------------
  459.   def self.close_windows
  460.     SceneManager.scene.close_victory_windows
  461.   end
  462.  
  463.   #--------------------------------------------------------------------------
  464.   # alias method: load_database
  465.   #--------------------------------------------------------------------------
  466.   class <<self; alias battle_end_va battle_end; end
  467.   def self.battle_end(result)
  468.     battle_end_va(result)
  469.     return if result == 2
  470.     return if YEA::VICTORY_AFTERMATH::AFTERMATH_COMMON_EVENT <= 0
  471.     event_id = YEA::VICTORY_AFTERMATH::AFTERMATH_COMMON_EVENT
  472.     $game_temp.reserve_common_event(event_id)
  473.   end
  474.  
  475. end # BattleManager
  476.  
  477. #==============================================================================
  478. # ■ Game_Actor
  479. #==============================================================================
  480.  
  481. class Game_Actor < Game_Battler
  482.  
  483.   #--------------------------------------------------------------------------
  484.   # overwrite method: gain_exp
  485.   #--------------------------------------------------------------------------
  486.   def gain_exp(exp)
  487.     enabled = !SceneManager.scene_is?(Scene_Battle)
  488.     change_exp(self.exp + (exp * final_exp_rate).to_i, enabled)
  489.   end
  490.  
  491.   #--------------------------------------------------------------------------
  492.   # new method: victory_quotes
  493.   #--------------------------------------------------------------------------
  494.   def victory_quotes(type)
  495.     case type
  496.     when :win
  497.       return self.actor.win_quotes if self.actor.win_quotes != [""]
  498.       return self.class.win_quotes
  499.     when :level
  500.       return self.actor.level_quotes if self.actor.level_quotes != [""]
  501.       return self.class.level_quotes
  502.     when :drops
  503.       return self.actor.drops_quotes if self.actor.drops_quotes != [""]
  504.       return self.class.drops_quotes
  505.     else
  506.       return ["NOTEXT"]
  507.     end
  508.   end
  509.  
  510. end # Game_Actor
  511.  
  512. #==============================================================================
  513. # ■ Window_VictoryTitle
  514. #==============================================================================
  515.  
  516. class Window_VictoryTitle < Window_Base
  517.  
  518.   #--------------------------------------------------------------------------
  519.   # initialize
  520.   #--------------------------------------------------------------------------
  521.   def initialize
  522.     super(0, 0, Graphics.width, fitting_height(1))
  523.     self.z = 200
  524.     self.openness = 0
  525.   end
  526.  
  527.   #--------------------------------------------------------------------------
  528.   # refresh
  529.   #--------------------------------------------------------------------------
  530.   def refresh(message = "")
  531.     contents.clear
  532.     draw_text(0, 0, contents.width, line_height, message, 1)
  533.   end
  534.  
  535. end # Window_VictoryTitle
  536.  
  537. #==============================================================================
  538. # ■ Window_VictoryEXP_Back
  539. #==============================================================================
  540.  
  541. class Window_VictoryEXP_Back < Window_Selectable
  542.  
  543.   #--------------------------------------------------------------------------
  544.   # initialize
  545.   #--------------------------------------------------------------------------
  546.   def initialize
  547.     super(0, fitting_height(1), Graphics.width, window_height)
  548.     self.z = 200
  549.     self.openness = 0
  550.   end
  551.  
  552.   #--------------------------------------------------------------------------
  553.   # window_height
  554.   #--------------------------------------------------------------------------
  555.   def window_height
  556.     return Graphics.height - fitting_height(4) - fitting_height(1)
  557.   end
  558.  
  559.   #--------------------------------------------------------------------------
  560.   # col_max
  561.   #--------------------------------------------------------------------------
  562.   def col_max; return item_max; end
  563.  
  564.   #--------------------------------------------------------------------------
  565.   # spacing
  566.   #--------------------------------------------------------------------------
  567.   def spacing; return 8; end
  568.  
  569.   #--------------------------------------------------------------------------
  570.   # item_max
  571.   #--------------------------------------------------------------------------
  572.   def item_max; return $game_party.battle_members.size; end
  573.  
  574.   #--------------------------------------------------------------------------
  575.   # open
  576.   #--------------------------------------------------------------------------
  577.   def open
  578.     @exp_total = $game_troop.exp_total
  579.     super
  580.   end
  581.  
  582.   #--------------------------------------------------------------------------
  583.   # item_rect
  584.   #--------------------------------------------------------------------------
  585.   def item_rect(index)
  586.     rect = Rect.new
  587.     rect.width = item_width
  588.     rect.height = contents.height
  589.     rect.x = index % col_max * (item_width + spacing)
  590.     rect.y = index / col_max * item_height
  591.     return rect
  592.   end
  593.  
  594.   #--------------------------------------------------------------------------
  595.   # draw_item
  596.   #--------------------------------------------------------------------------
  597.   def draw_item(index)
  598.     actor = $game_party.battle_members[index]
  599.     return if actor.nil?
  600.     rect = item_rect(index)
  601.     reset_font_settings
  602.     draw_actor_name(actor, rect)
  603.     draw_exp_gain(actor, rect)
  604.     draw_jp_gain(actor, rect)
  605.     draw_actor_face(actor, rect)
  606.   end
  607.  
  608.   #--------------------------------------------------------------------------
  609.   # draw_actor_name
  610.   #--------------------------------------------------------------------------
  611.   def draw_actor_name(actor, rect)
  612.     name = actor.name
  613.     draw_text(rect.x, rect.y+line_height, rect.width, line_height, name, 1)
  614.   end
  615.  
  616.   #--------------------------------------------------------------------------
  617.   # draw_actor_face
  618.   #--------------------------------------------------------------------------
  619.   def draw_actor_face(actor, rect)
  620.     face_name = actor.face_name
  621.     face_index = actor.face_index
  622.     bitmap = Cache.face(face_name)
  623.     rw = [rect.width, 96].min
  624.     face_rect = Rect.new(face_index % 4 * 96, face_index / 4 * 96, rw, 96)
  625.     rx = (rect.width - rw) / 2 + rect.x
  626.     contents.blt(rx, rect.y + line_height * 2, bitmap, face_rect, 255)
  627.   end
  628.  
  629.   #--------------------------------------------------------------------------
  630.   # draw_exp_gain
  631.   #--------------------------------------------------------------------------
  632.   def draw_exp_gain(actor, rect)
  633.     dw = rect.width - (rect.width - [rect.width, 96].min) / 2
  634.     dy = rect.y + line_height * 3 + 96
  635.     fmt = YEA::VICTORY_AFTERMATH::VICTORY_EXP
  636.     text = sprintf(fmt, actor_exp_gain(actor).group)
  637.     contents.font.size = YEA::VICTORY_AFTERMATH::FONTSIZE_EXP
  638.     change_color(power_up_color)
  639.     draw_text(rect.x, dy, dw, line_height, text, 2)
  640.   end
  641.  
  642.   #--------------------------------------------------------------------------
  643.   # actor_exp_gain
  644.   #--------------------------------------------------------------------------
  645.   def actor_exp_gain(actor)
  646.     n = @exp_total * actor.final_exp_rate
  647.     return n.to_i
  648.   end
  649.  
  650.   #--------------------------------------------------------------------------
  651.   # draw_jp_gain
  652.   #--------------------------------------------------------------------------
  653.   def draw_jp_gain(actor, rect)
  654.     return unless $imported["YEA-JPManager"]
  655.     dw = rect.width - (rect.width - [rect.width, 96].min) / 2
  656.     dy = rect.y + line_height * 4 + 96
  657.     fmt = YEA::JP::VICTORY_AFTERMATH
  658.     text = sprintf(fmt, actor_jp_gain(actor).group, Vocab::jp)
  659.     contents.font.size = YEA::VICTORY_AFTERMATH::FONTSIZE_EXP
  660.     change_color(power_up_color)
  661.     draw_text(rect.x, dy, dw, line_height, text, 2)
  662.   end
  663.  
  664.   #--------------------------------------------------------------------------
  665.   # actor_jp_gain
  666.   #--------------------------------------------------------------------------
  667.   def actor_jp_gain(actor)
  668.     n = actor.battle_jp_earned
  669.     if actor.exp + actor_exp_gain(actor) > actor.exp_for_level(actor.level + 1)
  670.       n += YEA::JP::LEVEL_UP unless actor.max_level?
  671.     end
  672.     return n
  673.   end
  674.  
  675. end # Window_VictoryEXP_Back
  676.  
  677. #==============================================================================
  678. # ■ Window_VictoryEXP_Front
  679. #==============================================================================
  680.  
  681. class Window_VictoryEXP_Front < Window_VictoryEXP_Back
  682.  
  683.   #--------------------------------------------------------------------------
  684.   # initialize
  685.   #--------------------------------------------------------------------------
  686.   def initialize
  687.     super
  688.     self.back_opacity = 0
  689.     @ticks = 0
  690.     @counter = 30
  691.     contents.font.size = YEA::VICTORY_AFTERMATH::FONTSIZE_EXP
  692.   end
  693.  
  694.   #--------------------------------------------------------------------------
  695.   # update
  696.   #--------------------------------------------------------------------------
  697.   def update
  698.     super
  699.     update_tick
  700.   end
  701.  
  702.   #--------------------------------------------------------------------------
  703.   # update_tick
  704.   #--------------------------------------------------------------------------
  705.   def update_tick
  706.     return unless self.openness >= 255
  707.     return unless self.visible
  708.     return if complete_ticks?
  709.     @counter -= 1
  710.     return unless @counter <= 0
  711.     return if @ticks >= YEA::VICTORY_AFTERMATH::EXP_TICKS
  712.     YEA::VICTORY_AFTERMATH::VICTORY_TICK.play
  713.     @counter = 4
  714.     @ticks += 1
  715.     refresh
  716.   end
  717.  
  718.   #--------------------------------------------------------------------------
  719.   # complete_ticks?
  720.   #--------------------------------------------------------------------------
  721.   def complete_ticks?
  722.     for actor in $game_party.battle_members
  723.       total_ticks = YEA::VICTORY_AFTERMATH::EXP_TICKS
  724.       bonus_exp = actor_exp_gain(actor) * @ticks / total_ticks
  725.       now_exp = actor.exp - actor.current_level_exp + bonus_exp
  726.       next_exp = actor.next_level_exp - actor.current_level_exp
  727.       rate = now_exp * 1.0 / next_exp
  728.       return false if rate < 1.0
  729.     end
  730.     return true
  731.   end
  732.  
  733.   #--------------------------------------------------------------------------
  734.   # draw_item
  735.   #--------------------------------------------------------------------------
  736.   def draw_item(index)
  737.     actor = $game_party.battle_members[index]
  738.     return if actor.nil?
  739.     rect = item_rect(index)
  740.     draw_actor_exp(actor, rect)
  741.   end
  742.  
  743.   #--------------------------------------------------------------------------
  744.   # exp_gauge1
  745.   #--------------------------------------------------------------------------
  746.   def exp_gauge1; return text_color(YEA::VICTORY_AFTERMATH::EXP_GAUGE1); end
  747.  
  748.   #--------------------------------------------------------------------------
  749.   # exp_gauge2
  750.   #--------------------------------------------------------------------------
  751.   def exp_gauge2; return text_color(YEA::VICTORY_AFTERMATH::EXP_GAUGE2); end
  752.  
  753.   #--------------------------------------------------------------------------
  754.   # lvl_gauge1
  755.   #--------------------------------------------------------------------------
  756.   def lvl_gauge1; return text_color(YEA::VICTORY_AFTERMATH::LEVEL_GAUGE1); end
  757.  
  758.   #--------------------------------------------------------------------------
  759.   # lvl_gauge2
  760.   #--------------------------------------------------------------------------
  761.   def lvl_gauge2; return text_color(YEA::VICTORY_AFTERMATH::LEVEL_GAUGE2); end
  762.  
  763.   #--------------------------------------------------------------------------
  764.   # draw_actor_exp
  765.   #--------------------------------------------------------------------------
  766.   def draw_actor_exp(actor, rect)
  767.     if actor.max_level?
  768.       draw_exp_gauge(actor, rect, 1.0)
  769.       return
  770.     end
  771.     total_ticks = YEA::VICTORY_AFTERMATH::EXP_TICKS
  772.     bonus_exp = actor_exp_gain(actor) * @ticks / total_ticks
  773.     now_exp = actor.exp - actor.current_level_exp + bonus_exp
  774.     next_exp = actor.next_level_exp - actor.current_level_exp
  775.     rate = now_exp * 1.0 / next_exp
  776.     draw_exp_gauge(actor, rect, rate)
  777.   end
  778.  
  779.   #--------------------------------------------------------------------------
  780.   # draw_exp_gauge
  781.   #--------------------------------------------------------------------------
  782.   def draw_exp_gauge(actor, rect, rate)
  783.     rate = [[rate, 1.0].min, 0.0].max
  784.     dx = (rect.width - [rect.width, 96].min) / 2 + rect.x
  785.     dy = rect.y + line_height * 2 + 96
  786.     dw = [rect.width, 96].min
  787.     colour1 = rate >= 1.0 ? lvl_gauge1 : exp_gauge1
  788.     colour2 = rate >= 1.0 ? lvl_gauge2 : exp_gauge2
  789.     draw_gauge(dx, dy, dw, rate, colour1, colour2)
  790.     fmt = YEA::VICTORY_AFTERMATH::EXP_PERCENT
  791.     text = sprintf(fmt, [rate * 100, 100.00].min)
  792.     if [rate * 100, 100.00].min == 100.00
  793.       text = YEA::VICTORY_AFTERMATH::LEVELUP_TEXT
  794.       text = YEA::VICTORY_AFTERMATH::MAX_LVL_TEXT if actor.max_level?
  795.     end
  796.     draw_text(dx, dy, dw, line_height, text, 1)
  797.   end
  798.  
  799. end # Window_VictoryEXP_Front
  800.  
  801. #==============================================================================
  802. # ■ Window_VictoryLevelUp
  803. #==============================================================================
  804.  
  805. class Window_VictoryLevelUp < Window_Base
  806.  
  807.   #--------------------------------------------------------------------------
  808.   # initialize
  809.   #--------------------------------------------------------------------------
  810.   def initialize
  811.     super(0, fitting_height(1), Graphics.width, window_height)
  812.     self.z = 200
  813.     hide
  814.   end
  815.  
  816.   #--------------------------------------------------------------------------
  817.   # window_height
  818.   #--------------------------------------------------------------------------
  819.   def window_height
  820.     return Graphics.height - fitting_height(4) - fitting_height(1)
  821.   end
  822.  
  823.   #--------------------------------------------------------------------------
  824.   # refresh
  825.   #--------------------------------------------------------------------------
  826.   def refresh(actor, temp_actor)
  827.     contents.clear
  828.     reset_font_settings
  829.     YEA::VICTORY_AFTERMATH::LEVEL_SOUND.play
  830.     draw_actor_changes(actor, temp_actor)
  831.   end
  832.  
  833.   #--------------------------------------------------------------------------
  834.   # draw_actor_changes
  835.   #--------------------------------------------------------------------------
  836.   def draw_actor_changes(actor, temp_actor)
  837.     dx = contents.width / 16
  838.     draw_actor_image(actor, temp_actor, dx)
  839.     draw_param_names(actor, dx)
  840.     draw_former_stats(temp_actor)
  841.     draw_arrows
  842.     draw_newer_stats(actor, temp_actor)
  843.     draw_new_skills(actor, temp_actor)
  844.   end
  845.  
  846.   #--------------------------------------------------------------------------
  847.   # draw_actor_image
  848.   #--------------------------------------------------------------------------
  849.   def draw_actor_image(actor, temp_actor, dx)
  850.     draw_text(dx, line_height, 96, line_height, actor.name, 1)
  851.     draw_actor_face(actor, dx, line_height * 2)
  852.     exp = actor.exp - temp_actor.exp
  853.     text = sprintf(YEA::VICTORY_AFTERMATH::VICTORY_EXP, exp.group)
  854.     change_color(power_up_color)
  855.     contents.font.size = YEA::VICTORY_AFTERMATH::FONTSIZE_EXP
  856.     draw_text(0, line_height * 2 + 96, dx + 96, line_height, text, 2)
  857.     reset_font_settings
  858.   end
  859.  
  860.   #--------------------------------------------------------------------------
  861.   # draw_param_names
  862.   #--------------------------------------------------------------------------
  863.   def draw_param_names(actor, dx)
  864.     dx += 108
  865.     change_color(system_color)
  866.     text = Vocab.level
  867.     draw_text(dx, 0, contents.width - dx, line_height, text)
  868.     dy = 0
  869.     for i in 0...8
  870.       dy += line_height
  871.       text = Vocab.param(i)
  872.       draw_text(dx, dy, contents.width - dx, line_height, text)
  873.     end
  874.   end
  875.  
  876.   #--------------------------------------------------------------------------
  877.   # draw_former_stats
  878.   #--------------------------------------------------------------------------
  879.   def draw_former_stats(actor)
  880.     dw = contents.width / 2 - 12
  881.     dy = 0
  882.     change_color(normal_color)
  883.     draw_text(0, dy, dw, line_height, actor.level.group, 2)
  884.     for i in 0...8
  885.       dy += line_height
  886.       draw_text(0, dy, dw, line_height, actor.param(i).group, 2)
  887.     end
  888.   end
  889.  
  890.   #--------------------------------------------------------------------------
  891.   # draw_arrows
  892.   #--------------------------------------------------------------------------
  893.   def draw_arrows
  894.     dx = contents.width / 2 - 12
  895.     dy = 0
  896.     change_color(system_color)
  897.     for i in 0..8
  898.       draw_text(dx, dy, 24, line_height, "→", 1)
  899.       dy += line_height
  900.     end
  901.   end
  902.  
  903.   #--------------------------------------------------------------------------
  904.   # draw_newer_stats
  905.   #--------------------------------------------------------------------------
  906.   def draw_newer_stats(actor, temp_actor)
  907.     dx = contents.width / 2 + 12
  908.     dw = contents.width - dx
  909.     dy = 0
  910.     change_color(param_change_color(actor.level - temp_actor.level))
  911.     draw_text(dx, dy, dw, line_height, actor.level.group, 0)
  912.     for i in 0...8
  913.       dy += line_height
  914.       change_color(param_change_color(actor.param(i) - temp_actor.param(i)))
  915.       draw_text(dx, dy, dw, line_height, actor.param(i).group, 0)
  916.     end
  917.   end
  918.  
  919.   #--------------------------------------------------------------------------
  920.   # draw_new_skills
  921.   #--------------------------------------------------------------------------
  922.   def draw_new_skills(actor, temp_actor)
  923.     return if temp_actor.skills.size == actor.skills.size
  924.     dw = 172 + 24
  925.     dx = contents.width - dw
  926.     change_color(system_color)
  927.     text = YEA::VICTORY_AFTERMATH::SKILLS_TEXT
  928.     draw_text(dx, 0, dw, line_height, text, 0)
  929.   end
  930.  
  931. end # Window_VictoryLevelUp
  932.  
  933. #==============================================================================
  934. # ■ Window_VictorySkills
  935. #==============================================================================
  936.  
  937. class Window_VictorySkills < Window_Selectable
  938.  
  939.   #--------------------------------------------------------------------------
  940.   # initialize
  941.   #--------------------------------------------------------------------------
  942.   def initialize
  943.     dy = fitting_height(1) + 24
  944.     dw = 172 + 24 + 24
  945.     dh = Graphics.height - fitting_height(4) - fitting_height(1) - 24
  946.     super(Graphics.width - dw, dy, dw, dh)
  947.     self.opacity = 0
  948.     self.z = 200
  949.     hide
  950.   end
  951.  
  952.   #--------------------------------------------------------------------------
  953.   # item_max
  954.   #--------------------------------------------------------------------------
  955.   def item_max; return @data.nil? ? 0 : @data.size; end
  956.  
  957.   #--------------------------------------------------------------------------
  958.   # refresh
  959.   #--------------------------------------------------------------------------
  960.   def refresh(actor, temp_actor)
  961.     contents.clear
  962.     if actor.skills.size == temp_actor.skills.size
  963.       unselect
  964.       @data = []
  965.       create_contents
  966.       return
  967.     end
  968.     @data = actor.skills - temp_actor.skills
  969.     if @data.size > 8
  970.       select(0)
  971.       activate
  972.     else
  973.       unselect
  974.       deactivate
  975.     end
  976.     create_contents
  977.     draw_all_items
  978.   end
  979.  
  980.   #--------------------------------------------------------------------------
  981.   # refresh
  982.   #--------------------------------------------------------------------------
  983.   def draw_item(index)
  984.     rect = item_rect(index)
  985.     skill = @data[index]
  986.     return if skill.nil?
  987.     rect.width -= 4
  988.     draw_item_name(skill, rect.x, rect.y, true)
  989.   end
  990.  
  991. end # Window_VictorySkills
  992.  
  993. #==============================================================================
  994. # ■ Window_VictorySpoils
  995. #==============================================================================
  996.  
  997. class Window_VictorySpoils < Window_ItemList
  998.  
  999.   #--------------------------------------------------------------------------
  1000.   # initialize
  1001.   #--------------------------------------------------------------------------
  1002.   def initialize
  1003.     super(0, fitting_height(1), Graphics.width, window_height)
  1004.     self.z = 200
  1005.     hide
  1006.   end
  1007.  
  1008.   #--------------------------------------------------------------------------
  1009.   # window_height
  1010.   #--------------------------------------------------------------------------
  1011.   def window_height
  1012.     return Graphics.height - fitting_height(4) - fitting_height(1)
  1013.   end
  1014.  
  1015.   #--------------------------------------------------------------------------
  1016.   # spacing
  1017.   #--------------------------------------------------------------------------
  1018.   def spacing; return 32; end
  1019.  
  1020.   #--------------------------------------------------------------------------
  1021.   # make
  1022.   #--------------------------------------------------------------------------
  1023.   def make(gold, drops)
  1024.     @gold = gold
  1025.     [url=home.php?mod=space&uid=2637905]@Drops[/url] = drops
  1026.     refresh
  1027.     select(0)
  1028.     activate
  1029.   end
  1030.  
  1031.   #--------------------------------------------------------------------------
  1032.   # make_item_list
  1033.   #--------------------------------------------------------------------------
  1034.   def make_item_list
  1035.     @data = [nil]
  1036.     items = {}
  1037.     weapons = {}
  1038.     armours = {}
  1039.     @goods = {}
  1040.     for item in @drops
  1041.       case item
  1042.       when RPG::Item
  1043.         items[item] = 0 if items[item].nil?
  1044.         items[item] += 1
  1045.       when RPG::Weapon
  1046.         weapons[item] = 0 if weapons[item].nil?
  1047.         weapons[item] += 1
  1048.       when RPG::Armor
  1049.         armours[item] = 0 if armours[item].nil?
  1050.         armours[item] += 1
  1051.       end
  1052.     end
  1053.     items = items.sort { |a,b| a[0].id <=> b[0].id }
  1054.     weapons = weapons.sort { |a,b| a[0].id <=> b[0].id }
  1055.     armours = armours.sort { |a,b| a[0].id <=> b[0].id }
  1056.     for key in items; @goods[key[0]] = key[1]; @data.push(key[0]); end
  1057.     for key in weapons; @goods[key[0]] = key[1]; @data.push(key[0]); end
  1058.     for key in armours; @goods[key[0]] = key[1]; @data.push(key[0]); end
  1059.   end
  1060.  
  1061.   #--------------------------------------------------------------------------
  1062.   # draw_item
  1063.   #--------------------------------------------------------------------------
  1064.   def draw_item(index)
  1065.     item = @data[index]
  1066.     rect = item_rect(index)
  1067.     reset_font_settings
  1068.     if item.nil?
  1069.       draw_gold(rect)
  1070.       return
  1071.     end
  1072.     rect.width -= 4
  1073.     draw_item_name(item, rect.x, rect.y, true, rect.width - 24)
  1074.     draw_item_number(rect, item)
  1075.   end
  1076.  
  1077.   #--------------------------------------------------------------------------
  1078.   # draw_gold
  1079.   #--------------------------------------------------------------------------
  1080.   def draw_gold(rect)
  1081.     text = Vocab.currency_unit
  1082.     draw_currency_value(@gold, text, rect.x, rect.y, rect.width)
  1083.   end
  1084.  
  1085.   #--------------------------------------------------------------------------
  1086.   # draw_item_number
  1087.   #--------------------------------------------------------------------------
  1088.   def draw_item_number(rect, item)
  1089.     number = @goods[item].group
  1090.     if $imported["YEA-AdjustLimits"]
  1091.       contents.font.size = YEA::LIMIT::ITEM_FONT
  1092.       text = sprintf(YEA::LIMIT::ITEM_PREFIX, number)
  1093.       draw_text(rect, text, 2)
  1094.     else
  1095.       draw_text(rect, sprintf(":%s", number), 2)
  1096.     end
  1097.   end
  1098.  
  1099. end # Window_VictorySpoils
  1100.  
  1101. #==============================================================================
  1102. # ■ Scene_Battle
  1103. #==============================================================================
  1104.  
  1105. class Scene_Battle < Scene_Base
  1106.  
  1107.   #--------------------------------------------------------------------------
  1108.   # alias method: create_all_windows
  1109.   #--------------------------------------------------------------------------
  1110.   alias scene_battle_create_all_windows_va create_all_windows
  1111.   def create_all_windows
  1112.     scene_battle_create_all_windows_va
  1113.     create_victory_aftermath_windows
  1114.   end
  1115.  
  1116.   #--------------------------------------------------------------------------
  1117.   # new method: create_victory_aftermath_windows
  1118.   #--------------------------------------------------------------------------
  1119.   def create_victory_aftermath_windows
  1120.     @victory_title_window = Window_VictoryTitle.new
  1121.     @victory_exp_window_back = Window_VictoryEXP_Back.new
  1122.     @victory_exp_window_front = Window_VictoryEXP_Front.new
  1123.     @victory_level_window = Window_VictoryLevelUp.new
  1124.     @victory_level_skills = Window_VictorySkills.new
  1125.     @victory_spoils_window = Window_VictorySpoils.new
  1126.   end
  1127.  
  1128.   #--------------------------------------------------------------------------
  1129.   # new method: show_victory_display_exp
  1130.   #--------------------------------------------------------------------------
  1131.   def show_victory_display_exp
  1132.     @victory_title_window.open
  1133.     name = $game_party.battle_members[0].name
  1134.     fmt = YEA::VICTORY_AFTERMATH::TOP_TEAM
  1135.     name = sprintf(fmt, name) if $game_party.battle_members.size > 1
  1136.     fmt = YEA::VICTORY_AFTERMATH::TOP_VICTORY_TEXT
  1137.     text = sprintf(fmt, name)
  1138.     @victory_title_window.refresh(text)
  1139.     #---
  1140.     @victory_exp_window_back.open
  1141.     @victory_exp_window_back.refresh
  1142.     @victory_exp_window_front.open
  1143.     @victory_exp_window_front.refresh
  1144.   end
  1145.  
  1146.   #--------------------------------------------------------------------------
  1147.   # new method: show_victory_level_up
  1148.   #--------------------------------------------------------------------------
  1149.   def show_victory_level_up(actor, temp_actor)
  1150.     @victory_exp_window_back.hide
  1151.     @victory_exp_window_front.hide
  1152.     #---
  1153.     fmt = YEA::VICTORY_AFTERMATH::TOP_LEVEL_UP
  1154.     text = sprintf(fmt, actor.name)
  1155.     @victory_title_window.refresh(text)
  1156.     #---
  1157.     @victory_level_window.show
  1158.     @victory_level_window.refresh(actor, temp_actor)
  1159.     @victory_level_skills.show
  1160.     @victory_level_skills.refresh(actor, temp_actor)
  1161.   end
  1162.  
  1163.   #--------------------------------------------------------------------------
  1164.   # new method: show_victory_spoils
  1165.   #--------------------------------------------------------------------------
  1166.   def show_victory_spoils(gold, drops)
  1167.     @victory_exp_window_back.hide
  1168.     @victory_exp_window_front.hide
  1169.     @victory_level_window.hide
  1170.     @victory_level_skills.hide
  1171.     #---
  1172.     text = YEA::VICTORY_AFTERMATH::TOP_SPOILS
  1173.     @victory_title_window.refresh(text)
  1174.     #---
  1175.     @victory_spoils_window.show
  1176.     @victory_spoils_window.make(gold, drops)
  1177.   end
  1178.  
  1179.   #--------------------------------------------------------------------------
  1180.   # new method: close_victory_windows
  1181.   #--------------------------------------------------------------------------
  1182.   def close_victory_windows
  1183.     @victory_title_window.close
  1184.     @victory_exp_window_back.close
  1185.     @victory_exp_window_front.close
  1186.     @victory_level_window.close
  1187.     @victory_level_skills.close
  1188.     @victory_spoils_window.close
  1189.     wait(16)
  1190.   end
  1191.  
  1192. end # Scene_Battle
  1193.  
  1194. #==============================================================================
  1195. #
  1196. # ▼ End of File
  1197. #
  1198. #==============================================================================

作者: cinderelmini    时间: 2017-7-29 21:54
在默认工程里的Window_Base里找到def draw_item_name这个方法,
然后把这个方法复制到上面那坨脚本的1076行那里,应该可以排除错误?
或者1073行那个draw_item_name改个名字,
然后这段方法复制过来之后也改个一样的名字?




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