设为首页收藏本站|繁體中文

Project1

 找回密码
 注册会员
搜索
查看: 5287|回复: 12
打印 上一主题 下一主题

[已经解决] 战斗胜利画面中经验条的问题

[复制链接]

Lv1.梦旅人

梦石
0
星屑
143
在线时间
347 小时
注册时间
2010-7-7
帖子
128
跳转到指定楼层
1
发表于 2012-8-31 11:35:47 | 只看该作者 |只看大图 回帖奖励 |倒序浏览 |阅读模式

加入我们,或者,欢迎回来。

您需要 登录 才可以下载或查看,没有帐号?注册会员

x
本帖最后由 yjl494356020 于 2012-8-31 11:51 编辑

{:2_263:} 这两天遇到的问题太多了...我使用一个胜利画面的脚本,发现胜利画面显示的时候,经验条有些问题。
首先是显示的不准确,比如这场战斗实际获得经验应该是从0%升到44%,可是这里显示的是88%,如下图,

但是人物状态菜单显示经验条是准确的,如下图,

还有就是,比如一场战斗后角色升级了,胜利画面经验条是这么显示的,如下图,

实际上升级后,距下一级还有大概70%的经验,人物状态菜单经验条显示,如下图,

但是下一场新战斗结束后,胜利画面的经验条(就是蓝色短的那个)又从0%开始计算,因此导致此后的该经验条显示的都是不准确的。
再有一点就是有时候明明没有升级,大概还差10%经验才升级,可是胜利画面的经验条却显示的是升级了。
这几个问题要怎么解决呢?本人对脚本实在是不太了解,希望有高人加以指点...




这是我使用的胜利画面的脚本,
  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. $imported = {} if $imported.nil?
  10. $imported["YEA-VictoryAftermath"] = true

  11. #==============================================================================
  12. # ▼ Updates
  13. # =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
  14. # 2012.01.07 - Compatibility Update: JP Manager
  15. # 2012.01.01 - Bug Fixed: Quote tags were mislabeled.
  16. # 2011.12.26 - Compatibility Update: Command Autobattle
  17. # 2011.12.16 - Started Script and Finished.
  18. #
  19. #==============================================================================
  20. # ▼ Introduction
  21. # =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
  22. # At the end of each battle, RPG Maker VX Ace by default shows text saying that
  23. # the party has gained so-and-so EXP while this person leveled up and your
  24. # party happened to find these drops. This script changes that text into
  25. # something more visual for your players to see. Active battle members will be
  26. # seen gaining EXP, any kind of level up changes, and a list of the items
  27. # obtained through drops.
  28. #
  29. #==============================================================================
  30. # ▼ Instructions
  31. # =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
  32. # To install this script, open up your script editor and copy/paste this script
  33. # to an open slot below ▼ Materials/素材 but above ▼ Main. Remember to save.
  34. #
  35. # -----------------------------------------------------------------------------
  36. # Actor Notetags - These notetags go in the actors notebox in the database.
  37. # -----------------------------------------------------------------------------
  38. # <win quotes>
  39. #  string
  40. #  string
  41. # </win quotes>
  42. # Sets the win quote for the actor. The strings are continuous and can use
  43. # text codes. Use \n for a line break. Type in what you want the actor to say
  44. # for the particular win quote. Use [New Quote] in between the two tags to
  45. # start up a new quote.
  46. #
  47. # <level quotes>
  48. #  string
  49. #  string
  50. # </level quotes>
  51. # Sets the level up quote for the actor. The strings are continuous and can use
  52. # text codes. Use \n for a line break. Type in what you want the actor to say
  53. # for the particular win quote. Use [New Quote] in between the two tags to
  54. # start up a new quote.
  55. #
  56. # <drops quotes>
  57. #  string
  58. #  string
  59. # </drops quotes>
  60. # Sets the drops quote for the actor. The strings are continuous and can use
  61. # text codes. Use \n for a line break. Type in what you want the actor to say
  62. # for the particular win quote. Use [New Quote] in between the two tags to
  63. # start up a new quote.
  64. #
  65. # -----------------------------------------------------------------------------
  66. # Class Notetags - These notetags go in the class notebox in the database.
  67. # -----------------------------------------------------------------------------
  68. # <win quotes>
  69. #  string
  70. #  string
  71. # </win quotes>
  72. # Sets the win quote for the class. The strings are continuous and can use
  73. # text codes. Use \n for a line break. Type in what you want the actor to say
  74. # for the particular win quote. Use [New Quote] in between the two tags to
  75. # start up a new quote.
  76. #
  77. # <level quotes>
  78. #  string
  79. #  string
  80. # </level quotes>
  81. # Sets the level up quote for the class. The strings are continuous and can use
  82. # text codes. Use \n for a line break. Type in what you want the actor to say
  83. # for the particular win quote. Use [New Quote] in between the two tags to
  84. # start up a new quote.
  85. #
  86. # <drops quotes>
  87. #  string
  88. #  string
  89. # </drops quotes>
  90. # Sets the drops quote for the class. The strings are continuous and can use
  91. # text codes. Use \n for a line break. Type in what you want the actor to say
  92. # for the particular win quote. Use [New Quote] in between the two tags to
  93. # start up a new quote.
  94. #
  95. #==============================================================================
  96. # ▼ Compatibility
  97. # =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
  98. # This script is made strictly for RPG Maker VX Ace. It is highly unlikely that
  99. # it will run with RPG Maker VX without adjusting.
  100. #
  101. #==============================================================================

  102. module YEA
  103.   module VICTORY_AFTERMATH
  104.    
  105.     #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
  106.     # - General Settings -
  107.     #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
  108.     # These are various settings that are used throughout the Victory Aftermath
  109.     # portion of a battle. Adjust them as you see fit.
  110.     #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
  111.     VICTORY_BGM  = RPG::BGM.new("Field1", 100, 100)    # Victory BGM
  112.     VICTORY_TICK = RPG::SE.new("Decision1", 100, 150)  # EXP ticking SFX
  113.     LEVEL_SOUND  = RPG::SE.new("Up4", 80, 150)         # Level Up SFX
  114.     SKILLS_TEXT  = "新技能"                        # New skills text title.
  115.    
  116.     #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
  117.     # - Important Settings -
  118.     #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
  119.     # These are some important settings so please set them up properly. This
  120.     # section includes a switch that allows you to skip the victory aftermath
  121.     # phase (for those back to back battles and making them seamless) and it
  122.     # also allows you to declare a common event to run after each battle. If
  123.     # you do not wish to use either of these features, set them to 0. The
  124.     # common event will run regardless of win or escape.
  125.     #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
  126.     SKIP_AFTERMATH_SWITCH  = 0  # If switch on, skip aftermath. 0 to disable.
  127.     AFTERMATH_COMMON_EVENT = 0  # Runs common event after battle. 0 to disable.
  128.    
  129.     #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
  130.     # - Top Text Settings -
  131.     #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
  132.     # Here, you can adjust the various text that appears in the window that
  133.     # appears at the top of the screen.
  134.     #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
  135.     TOP_TEAM         = "%s的队伍"           # Team name used.
  136.     TOP_VICTORY_TEXT = "%s胜利了!"   # Text used to display victory.
  137.     TOP_LEVEL_UP     = "%s升级!"  # Text used to display level up.
  138.     TOP_SPOILS       = "胜利战利品!"     # Text used for spoils.
  139.    
  140.     #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
  141.     # - EXP Gauge Settings -
  142.     #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
  143.     # Adjust how the EXP Gauge appears for the Victory Aftermath here. This
  144.     # includes the text display, the font size, the colour of the gauges, and
  145.     # more. Adjust it all here.
  146.     #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
  147.     VICTORY_EXP  = "+%sEXP"      # Text used to display EXP.
  148.     EXP_PERCENT  = "%1.2f%%"     # The way EXP percentage will be displayed.
  149.     LEVELUP_TEXT = "LEVEL UP!"   # Text to replace percentage when leveled.
  150.     MAX_LVL_TEXT = "MAX LEVEL"   # Text to replace percentage when max level.
  151.     FONTSIZE_EXP = 20            # Font size used for EXP.
  152.     EXP_TICKS    = 15            # Ticks to full EXP
  153.     EXP_GAUGE1   = 12            # "Window" skin text colour for gauge.
  154.     EXP_GAUGE2   = 4             # "Window" skin text colour for gauge.
  155.     LEVEL_GAUGE1 = 13            # "Window" skin text colour for leveling.
  156.     LEVEL_GAUGE2 = 5             # "Window" skin text colour for leveling.
  157.    
  158.     #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
  159.     # - Victory Messages -
  160.     #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
  161.     # In the Victory Aftermath, actors can say unique things. This is the pool
  162.     # of quotes used for actors without any custom victory quotes. Note that
  163.     # actors with custom quotes will take priority over classes with custom
  164.     # quotes, which will take priority over these default quotes. Use \n for
  165.     # a line break in the quotes.
  166.     #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
  167.     HEADER_TEXT = "\e>\eC[6]%s\eC[0]\e<\n"  # Always at start of messages.
  168.     FOOTER_TEXT = ""                        # Always at end of messages.
  169.    
  170.     # Win Quotes are what the actors say when a battle is won.
  171.     VICTORY_QUOTES ={
  172.     # :type   => Quotes
  173.       #------------------------------------------------------------------------
  174.       :win    => [ # Occurs as initial victory quote.
  175.                    '"成功消灭敌人!"',
  176.                    ],# Do not remove this.
  177.       #------------------------------------------------------------------------
  178.       :level  => [ # Occurs as initial victory quote.
  179.                    '"实力又变强了!"',
  180.                    ],# Do not remove this.
  181.       #------------------------------------------------------------------------
  182.       :drops  => [ # Occurs as initial victory quote.
  183.                    '"怪物掉了些东西!"',
  184.                    ],# Do not remove this.
  185.       #------------------------------------------------------------------------
  186.     } # Do not remove this.
  187.    
  188.   end # VICTORY_AFTERMATH
  189. end # YEA

  190. #==============================================================================
  191. # ▼ Editting anything past this point may potentially result in causing
  192. # computer damage, incontinence, explosion of user's head, coma, death, and/or
  193. # halitosis so edit at your own risk.
  194. #==============================================================================

  195. module YEA
  196.   module REGEXP
  197.   module BASEITEM
  198.    
  199.     NEW_QUOTE = /\[(?:NEW_QUOTE|new quote)\]/i
  200.    
  201.     WIN_QUOTE_ON    = /<(?:WIN_QUOTES|win quote|win quotes)>/i
  202.     WIN_QUOTE_OFF   = /<\/(?:WIN_QUOTES|win quote|win quotes)>/i
  203.     LEVEL_QUOTE_ON  = /<(?:LEVEL_QUOTES|level quote|level quotes)>/i
  204.     LEVEL_QUOTE_OFF = /<\/(?:LEVEL_QUOTES|level quote|level quotes)>/i
  205.     DROPS_QUOTE_ON  = /<(?:DROPS_QUOTES|drops quote|drops quotes)>/i
  206.     DROPS_QUOTE_OFF = /<\/(?:DROPS_QUOTES|drops quote|drops quotes)>/i
  207.    
  208.   end # BASEITEM
  209.   end # REGEXP
  210. end # YEA

  211. #==============================================================================
  212. # ■ Switch
  213. #==============================================================================

  214. module Switch
  215.   
  216.   #--------------------------------------------------------------------------
  217.   # self.skip_aftermath
  218.   #--------------------------------------------------------------------------
  219.   def self.skip_aftermath
  220.     return false if YEA::VICTORY_AFTERMATH::SKIP_AFTERMATH_SWITCH <= 0
  221.     return $game_switches[YEA::VICTORY_AFTERMATH::SKIP_AFTERMATH_SWITCH]
  222.   end
  223.    
  224. end # Switch

  225. #==============================================================================
  226. # ■ Numeric
  227. #==============================================================================

  228. class Numeric
  229.   
  230.   #--------------------------------------------------------------------------
  231.   # new method: group_digits
  232.   #--------------------------------------------------------------------------
  233.   unless $imported["YEA-CoreEngine"]
  234.   def group; return self.to_s; end
  235.   end # $imported["YEA-CoreEngine"]
  236.    
  237. end # Numeric

  238. #==============================================================================
  239. # ■ DataManager
  240. #==============================================================================

  241. module DataManager
  242.   
  243.   #--------------------------------------------------------------------------
  244.   # alias method: load_database
  245.   #--------------------------------------------------------------------------
  246.   class <<self; alias load_database_va load_database; end
  247.   def self.load_database
  248.     load_database_va
  249.     load_notetags_va
  250.   end
  251.   
  252.   #--------------------------------------------------------------------------
  253.   # new method: load_notetags_va
  254.   #--------------------------------------------------------------------------
  255.   def self.load_notetags_va
  256.     groups = [$data_actors, $data_classes]
  257.     for group in groups
  258.       for obj in group
  259.         next if obj.nil?
  260.         obj.load_notetags_va
  261.       end
  262.     end
  263.   end
  264.   
  265. end # DataManager

  266. #==============================================================================
  267. # ■ RPG::BaseItem
  268. #==============================================================================

  269. class RPG::BaseItem
  270.   
  271.   #--------------------------------------------------------------------------
  272.   # public instance variables
  273.   #--------------------------------------------------------------------------
  274.   attr_accessor :win_quotes
  275.   attr_accessor :level_quotes
  276.   attr_accessor :drops_quotes
  277.   
  278.   #--------------------------------------------------------------------------
  279.   # common cache: load_notetags_va
  280.   #--------------------------------------------------------------------------
  281.   def load_notetags_va
  282.     @win_quotes = [""]
  283.     @level_quotes = [""]
  284.     @drops_quotes = [""]
  285.     @victory_quote_type = nil
  286.     #---
  287.     self.note.split(/[\r\n]+/).each { |line|
  288.       case line
  289.       #---
  290.       when YEA::REGEXP::BASEITEM::WIN_QUOTE_ON
  291.         @victory_quote_type = :win_quote
  292.       when YEA::REGEXP::BASEITEM::WIN_QUOTE_OFF
  293.         @victory_quote_type = nil
  294.       when YEA::REGEXP::BASEITEM::LEVEL_QUOTE_ON
  295.         @victory_quote_type = :level_quote
  296.       when YEA::REGEXP::BASEITEM::LEVEL_QUOTE_OFF
  297.         @victory_quote_type = nil
  298.       when YEA::REGEXP::BASEITEM::DROPS_QUOTE_ON
  299.         @victory_quote_type = :drops_quote
  300.       when YEA::REGEXP::BASEITEM::DROPS_QUOTE_OFF
  301.         @victory_quote_type = nil
  302.       #---
  303.       when YEA::REGEXP::BASEITEM::NEW_QUOTE
  304.         case @victory_quote_type
  305.         when nil; next
  306.         when :win_quote;   @win_quotes.push("")
  307.         when :level_quote; @level_quotes.push("")
  308.         when :drops_quote; @drops_quotes.push("")
  309.         end
  310.       #---
  311.       else
  312.         case @victory_quote_type
  313.         when nil; next
  314.         when :win_quote;   @win_quotes[@win_quotes.size-1] += line.to_s
  315.         when :level_quote; @level_quotes[@level_quotes.size-1] += line.to_s
  316.         when :drops_quote; @drops_quotes[@drops_quotes.size-1] += line.to_s
  317.         end
  318.       end
  319.     } # self.note.split
  320.     #---
  321.     return unless self.is_a?(RPG::Class)
  322.     quotes = YEA::VICTORY_AFTERMATH::VICTORY_QUOTES
  323.     @win_quotes = quotes[:win].clone if @win_quotes == [""]
  324.     @level_quotes = quotes[:level].clone if @level_quotes == [""]
  325.     @drops_quotes = quotes[:drops].clone if @drops_quotes == [""]
  326.   end
  327.   
  328. end # RPG::BaseItem

  329. #==============================================================================
  330. # ■ BattleManager
  331. #==============================================================================

  332. module BattleManager
  333.   
  334.   #--------------------------------------------------------------------------
  335.   # overwrite method: self.process_victory
  336.   #--------------------------------------------------------------------------
  337.   def self.process_victory
  338.     if $imported["YEA-CommandAutobattle"]
  339.       SceneManager.scene.close_disable_autobattle_window
  340.     end
  341.     if Switch.skip_aftermath
  342.       skip_aftermath
  343.       return
  344.     end
  345.     play_battle_end_me
  346.     gain_jp if $imported["YEA-JPManager"]
  347.     display_exp
  348.     gain_exp
  349.     gain_gold
  350.     gain_drop_items
  351.     close_windows
  352.     SceneManager.return
  353.     replay_bgm_and_bgs
  354.     battle_end(0)
  355.     return true
  356.   end
  357.   
  358.   #--------------------------------------------------------------------------
  359.   # new method: self.skip_aftermath
  360.   #--------------------------------------------------------------------------
  361.   def self.skip_aftermath
  362.     $game_party.all_members.each do |actor|
  363.       actor.gain_exp($game_troop.exp_total)
  364.     end
  365.     $game_party.gain_gold($game_troop.gold_total)
  366.     $game_troop.make_drop_items.each do |item|
  367.       $game_party.gain_item(item, 1)
  368.     end
  369.     close_windows
  370.     SceneManager.return
  371.     replay_bgm_and_bgs
  372.     battle_end(0)
  373.   end
  374.   
  375.   #--------------------------------------------------------------------------
  376.   # overwrite method: self.play_battle_end_me
  377.   #--------------------------------------------------------------------------
  378.   def self.play_battle_end_me
  379.     $game_system.battle_end_me.play
  380.     YEA::VICTORY_AFTERMATH::VICTORY_BGM.play
  381.   end
  382.   
  383.   #--------------------------------------------------------------------------
  384.   # new method: self.set_victory_text
  385.   #--------------------------------------------------------------------------
  386.   def self.set_victory_text(actor, type)
  387.     text = "" + sprintf(YEA::VICTORY_AFTERMATH::HEADER_TEXT, actor.name)
  388.     text += actor.victory_quotes(type)[rand(actor.victory_quotes(type).size)]
  389.     text += YEA::VICTORY_AFTERMATH::FOOTER_TEXT
  390.     $game_message.face_name = actor.face_name
  391.     $game_message.face_index = actor.face_index
  392.     $game_message.add(text)
  393.     wait_for_message
  394.   end
  395.   
  396.   #--------------------------------------------------------------------------
  397.   # overwrite method: self.display_exp
  398.   #--------------------------------------------------------------------------
  399.   def self.display_exp
  400.     SceneManager.scene.show_victory_display_exp
  401.     actor = $game_party.random_target
  402.     @victory_actor = actor
  403.     set_victory_text(@victory_actor, :win)
  404.   end
  405.   
  406.   #--------------------------------------------------------------------------
  407.   # overwrite method: self.gain_exp
  408.   #--------------------------------------------------------------------------
  409.   def self.gain_exp
  410.     $game_party.all_members.each do |actor|
  411.       temp_actor = Marshal.load(Marshal.dump(actor))
  412.       actor.gain_exp($game_troop.exp_total)
  413.       next if actor.level == temp_actor.level
  414.       SceneManager.scene.show_victory_level_up(actor, temp_actor)
  415.       set_victory_text(actor, :level)
  416.       wait_for_message
  417.     end
  418.   end
  419.   
  420.   #--------------------------------------------------------------------------
  421.   # overwrite method: self.gain_gold
  422.   #--------------------------------------------------------------------------
  423.   def self.gain_gold
  424.     $game_party.gain_gold($game_troop.gold_total)
  425.   end
  426.   
  427.   #--------------------------------------------------------------------------
  428.   # overwrite method: self.gain_drop_items
  429.   #--------------------------------------------------------------------------
  430.   def self.gain_drop_items
  431.     drops = []
  432.     $game_troop.make_drop_items.each do |item|
  433.       $game_party.gain_item(item, 1)
  434.       drops.push(item)
  435.     end
  436.     SceneManager.scene.show_victory_spoils($game_troop.gold_total, drops)
  437.     set_victory_text(@victory_actor, :drops)
  438.     wait_for_message
  439.   end
  440.   
  441.   #--------------------------------------------------------------------------
  442.   # new method: self.close_windows
  443.   #--------------------------------------------------------------------------
  444.   def self.close_windows
  445.     SceneManager.scene.close_victory_windows
  446.   end
  447.   
  448.   #--------------------------------------------------------------------------
  449.   # alias method: load_database
  450.   #--------------------------------------------------------------------------
  451.   class <<self; alias battle_end_va battle_end; end
  452.   def self.battle_end(result)
  453.     battle_end_va(result)
  454.     return if result == 2
  455.     return if YEA::VICTORY_AFTERMATH::AFTERMATH_COMMON_EVENT <= 0
  456.     event_id = YEA::VICTORY_AFTERMATH::AFTERMATH_COMMON_EVENT
  457.     $game_temp.reserve_common_event(event_id)
  458.   end
  459.   
  460. end # BattleManager

  461. #==============================================================================
  462. # ■ Game_Actor
  463. #==============================================================================

  464. class Game_Actor < Game_Battler
  465.   
  466.   #--------------------------------------------------------------------------
  467.   # overwrite method: gain_exp
  468.   #--------------------------------------------------------------------------
  469.   def gain_exp(exp)
  470.     enabled = !SceneManager.scene_is?(Scene_Battle)
  471.     change_exp(self.exp + (exp * final_exp_rate).to_i, enabled)
  472.   end
  473.   
  474.   #--------------------------------------------------------------------------
  475.   # new method: victory_quotes
  476.   #--------------------------------------------------------------------------
  477.   def victory_quotes(type)
  478.     case type
  479.     when :win
  480.       return self.actor.win_quotes if self.actor.win_quotes != [""]
  481.       return self.class.win_quotes
  482.     when :level
  483.       return self.actor.level_quotes if self.actor.level_quotes != [""]
  484.       return self.class.level_quotes
  485.     when :drops
  486.       return self.actor.drops_quotes if self.actor.drops_quotes != [""]
  487.       return self.class.drops_quotes
  488.     else
  489.       return ["NOTEXT"]
  490.     end
  491.   end
  492.   
  493. end # Game_Actor

  494. #==============================================================================
  495. # ■ Window_VictoryTitle
  496. #==============================================================================

  497. class Window_VictoryTitle < Window_Base
  498.   
  499.   #--------------------------------------------------------------------------
  500.   # initialize
  501.   #--------------------------------------------------------------------------
  502.   def initialize
  503.     super(0, 0, Graphics.width, fitting_height(1))
  504.     self.z = 200
  505.     self.openness = 0
  506.   end
  507.   
  508.   #--------------------------------------------------------------------------
  509.   # refresh
  510.   #--------------------------------------------------------------------------
  511.   def refresh(message = "")
  512.     contents.clear
  513.     draw_text(0, 0, contents.width, line_height, message, 1)
  514.   end
  515.   
  516. end # Window_VictoryTitle

  517. #==============================================================================
  518. # ■ Window_VictoryEXP_Back
  519. #==============================================================================

  520. class Window_VictoryEXP_Back < Window_Selectable
  521.   
  522.   #--------------------------------------------------------------------------
  523.   # initialize
  524.   #--------------------------------------------------------------------------
  525.   def initialize
  526.     super(0, fitting_height(1), Graphics.width, window_height)
  527.     self.z = 200
  528.     self.openness = 0
  529.   end
  530.   
  531.   #--------------------------------------------------------------------------
  532.   # window_height
  533.   #--------------------------------------------------------------------------
  534.   def window_height
  535.     return Graphics.height - fitting_height(4) - fitting_height(1)
  536.   end
  537.   
  538.   #--------------------------------------------------------------------------
  539.   # col_max
  540.   #--------------------------------------------------------------------------
  541.   def col_max; return item_max; end
  542.   
  543.   #--------------------------------------------------------------------------
  544.   # spacing
  545.   #--------------------------------------------------------------------------
  546.   def spacing; return 8; end
  547.   
  548.   #--------------------------------------------------------------------------
  549.   # item_max
  550.   #--------------------------------------------------------------------------
  551.   def item_max; return $game_party.battle_members.size; end
  552.   
  553.   #--------------------------------------------------------------------------
  554.   # open
  555.   #--------------------------------------------------------------------------
  556.   def open
  557.     @exp_total = $game_troop.exp_total
  558.     super
  559.   end
  560.   
  561.   #--------------------------------------------------------------------------
  562.   # item_rect
  563.   #--------------------------------------------------------------------------
  564.   def item_rect(index)
  565.     rect = Rect.new
  566.     rect.width = item_width
  567.     rect.height = contents.height
  568.     rect.x = index % col_max * (item_width + spacing)
  569.     rect.y = index / col_max * item_height
  570.     return rect
  571.   end
  572.   
  573.   #--------------------------------------------------------------------------
  574.   # draw_item
  575.   #--------------------------------------------------------------------------
  576.   def draw_item(index)
  577.     actor = $game_party.battle_members[index]
  578.     return if actor.nil?
  579.     rect = item_rect(index)
  580.     reset_font_settings
  581.     draw_actor_name(actor, rect)
  582.     draw_exp_gain(actor, rect)
  583.     draw_jp_gain(actor, rect)
  584.     draw_actor_face(actor, rect)
  585.   end
  586.   
  587.   #--------------------------------------------------------------------------
  588.   # draw_actor_name
  589.   #--------------------------------------------------------------------------
  590.   def draw_actor_name(actor, rect)
  591.     name = actor.name
  592.     draw_text(rect.x, rect.y+line_height, rect.width, line_height, name, 1)
  593.   end
  594.   
  595.   #--------------------------------------------------------------------------
  596.   # draw_actor_face
  597.   #--------------------------------------------------------------------------
  598.   def draw_actor_face(actor, rect)
  599.     face_name = actor.face_name
  600.     face_index = actor.face_index
  601.     bitmap = Cache.face(face_name)
  602.     rw = [rect.width, 96].min
  603.     face_rect = Rect.new(face_index % 4 * 96, face_index / 4 * 96, rw, 96)
  604.     rx = (rect.width - rw) / 2 + rect.x
  605.     contents.blt(rx, rect.y + line_height * 2, bitmap, face_rect, 255)
  606.   end
  607.   
  608.   #--------------------------------------------------------------------------
  609.   # draw_exp_gain
  610.   #--------------------------------------------------------------------------
  611.   def draw_exp_gain(actor, rect)
  612.     dw = rect.width - (rect.width - [rect.width, 96].min) / 2
  613.     dy = rect.y + line_height * 3 + 96
  614.     fmt = YEA::VICTORY_AFTERMATH::VICTORY_EXP
  615.     text = sprintf(fmt, actor_exp_gain(actor).group)
  616.     contents.font.size = YEA::VICTORY_AFTERMATH::FONTSIZE_EXP
  617.     change_color(power_up_color)
  618.     draw_text(rect.x, dy, dw, line_height, text, 2)
  619.   end
  620.   
  621.   #--------------------------------------------------------------------------
  622.   # actor_exp_gain
  623.   #--------------------------------------------------------------------------
  624.   def actor_exp_gain(actor)
  625.     n = @exp_total * actor.final_exp_rate
  626.     return n.to_i
  627.   end
  628.   
  629.   #--------------------------------------------------------------------------
  630.   # draw_jp_gain
  631.   #--------------------------------------------------------------------------
  632.   def draw_jp_gain(actor, rect)
  633.     return unless $imported["YEA-JPManager"]
  634.     dw = rect.width - (rect.width - [rect.width, 96].min) / 2
  635.     dy = rect.y + line_height * 4 + 96
  636.     fmt = YEA::JP::VICTORY_AFTERMATH
  637.     text = sprintf(fmt, actor_jp_gain(actor).group, Vocab::jp)
  638.     contents.font.size = YEA::VICTORY_AFTERMATH::FONTSIZE_EXP
  639.     change_color(power_up_color)
  640.     draw_text(rect.x, dy, dw, line_height, text, 2)
  641.   end
  642.   
  643.   #--------------------------------------------------------------------------
  644.   # actor_jp_gain
  645.   #--------------------------------------------------------------------------
  646.   def actor_jp_gain(actor)
  647.     n = actor.battle_jp_earned
  648.     if actor.exp + actor_exp_gain(actor) > actor.exp_for_level(actor.level + 1)
  649.       n += YEA::JP::LEVEL_UP unless actor.max_level?
  650.     end
  651.     return n
  652.   end
  653.   
  654. end # Window_VictoryEXP_Back

  655. #==============================================================================
  656. # ■ Window_VictoryEXP_Front
  657. #==============================================================================

  658. class Window_VictoryEXP_Front < Window_VictoryEXP_Back
  659.   
  660.   #--------------------------------------------------------------------------
  661.   # initialize
  662.   #--------------------------------------------------------------------------
  663.   def initialize
  664.     super
  665.     self.back_opacity = 0
  666.     @ticks = 0
  667.     @counter = 30
  668.     contents.font.size = YEA::VICTORY_AFTERMATH::FONTSIZE_EXP
  669.   end
  670.   
  671.   #--------------------------------------------------------------------------
  672.   # update
  673.   #--------------------------------------------------------------------------
  674.   def update
  675.     super
  676.     update_tick
  677.   end
  678.   
  679.   #--------------------------------------------------------------------------
  680.   # update_tick
  681.   #--------------------------------------------------------------------------
  682.   def update_tick
  683.     return unless self.openness >= 255
  684.     return unless self.visible
  685.     return if complete_ticks?
  686.     @counter -= 1
  687.     return unless @counter <= 0
  688.     return if @ticks >= YEA::VICTORY_AFTERMATH::EXP_TICKS
  689.     YEA::VICTORY_AFTERMATH::VICTORY_TICK.play
  690.     @counter = 4
  691.     @ticks += 1
  692.     refresh
  693.   end
  694.   
  695.   #--------------------------------------------------------------------------
  696.   # complete_ticks?
  697.   #--------------------------------------------------------------------------
  698.   def complete_ticks?
  699.     for actor in $game_party.battle_members
  700.       total_ticks = YEA::VICTORY_AFTERMATH::EXP_TICKS
  701.       bonus_exp = actor_exp_gain(actor) * @ticks / total_ticks
  702.       now_exp = actor.exp - actor.current_level_exp + bonus_exp
  703.       next_exp = actor.next_level_exp - actor.current_level_exp
  704.       rate = now_exp * 1.0 / next_exp
  705.       return false if rate < 1.0
  706.     end
  707.     return true
  708.   end
  709.   
  710.   #--------------------------------------------------------------------------
  711.   # draw_item
  712.   #--------------------------------------------------------------------------
  713.   def draw_item(index)
  714.     actor = $game_party.battle_members[index]
  715.     return if actor.nil?
  716.     rect = item_rect(index)
  717.     draw_actor_exp(actor, rect)
  718.   end
  719.   
  720.   #--------------------------------------------------------------------------
  721.   # exp_gauge1
  722.   #--------------------------------------------------------------------------
  723.   def exp_gauge1; return text_color(YEA::VICTORY_AFTERMATH::EXP_GAUGE1); end
  724.   
  725.   #--------------------------------------------------------------------------
  726.   # exp_gauge2
  727.   #--------------------------------------------------------------------------
  728.   def exp_gauge2; return text_color(YEA::VICTORY_AFTERMATH::EXP_GAUGE2); end
  729.   
  730.   #--------------------------------------------------------------------------
  731.   # lvl_gauge1
  732.   #--------------------------------------------------------------------------
  733.   def lvl_gauge1; return text_color(YEA::VICTORY_AFTERMATH::LEVEL_GAUGE1); end
  734.   
  735.   #--------------------------------------------------------------------------
  736.   # lvl_gauge2
  737.   #--------------------------------------------------------------------------
  738.   def lvl_gauge2; return text_color(YEA::VICTORY_AFTERMATH::LEVEL_GAUGE2); end
  739.   
  740.   #--------------------------------------------------------------------------
  741.   # draw_actor_exp
  742.   #--------------------------------------------------------------------------
  743.   def draw_actor_exp(actor, rect)
  744.     if actor.max_level?
  745.       draw_exp_gauge(actor, rect, 1.0)
  746.       return
  747.     end
  748.     total_ticks = YEA::VICTORY_AFTERMATH::EXP_TICKS
  749.     bonus_exp = actor_exp_gain(actor) * @ticks / total_ticks
  750.     now_exp = actor.exp - actor.current_level_exp + bonus_exp
  751.     next_exp = actor.next_level_exp - actor.current_level_exp
  752.     rate = now_exp * 1.0 / next_exp
  753.     draw_exp_gauge(actor, rect, rate)
  754.   end
  755.   
  756.   #--------------------------------------------------------------------------
  757.   # draw_exp_gauge
  758.   #--------------------------------------------------------------------------
  759.   def draw_exp_gauge(actor, rect, rate)
  760.     rate = [[rate, 1.0].min, 0.0].max
  761.     dx = (rect.width - [rect.width, 96].min) / 2 + rect.x
  762.     dy = rect.y + line_height * 2 + 96
  763.     dw = [rect.width, 96].min
  764.     colour1 = rate >= 1.0 ? lvl_gauge1 : exp_gauge1
  765.     colour2 = rate >= 1.0 ? lvl_gauge2 : exp_gauge2
  766.     draw_gauge(dx, dy, dw, rate, colour1, colour2)
  767.     fmt = YEA::VICTORY_AFTERMATH::EXP_PERCENT
  768.     text = sprintf(fmt, [rate * 100, 100.00].min)
  769.     if [rate * 100, 100.00].min == 100.00
  770.       text = YEA::VICTORY_AFTERMATH::LEVELUP_TEXT
  771.       text = YEA::VICTORY_AFTERMATH::MAX_LVL_TEXT if actor.max_level?
  772.     end
  773.     draw_text(dx, dy, dw, line_height, text, 1)
  774.   end
  775.   
  776. end # Window_VictoryEXP_Front

  777. #==============================================================================
  778. # ■ Window_VictoryLevelUp
  779. #==============================================================================

  780. class Window_VictoryLevelUp < Window_Base
  781.   
  782.   #--------------------------------------------------------------------------
  783.   # initialize
  784.   #--------------------------------------------------------------------------
  785.   def initialize
  786.     super(0, fitting_height(1), Graphics.width, window_height)
  787.     self.z = 200
  788.     hide
  789.   end
  790.   
  791.   #--------------------------------------------------------------------------
  792.   # window_height
  793.   #--------------------------------------------------------------------------
  794.   def window_height
  795.     return Graphics.height - fitting_height(4) - fitting_height(1)
  796.   end
  797.   
  798.   #--------------------------------------------------------------------------
  799.   # refresh
  800.   #--------------------------------------------------------------------------
  801.   def refresh(actor, temp_actor)
  802.     contents.clear
  803.     reset_font_settings
  804.     YEA::VICTORY_AFTERMATH::LEVEL_SOUND.play
  805.     draw_actor_changes(actor, temp_actor)
  806.   end
  807.   
  808.   #--------------------------------------------------------------------------
  809.   # draw_actor_changes
  810.   #--------------------------------------------------------------------------
  811.   def draw_actor_changes(actor, temp_actor)
  812.     dx = contents.width / 16
  813.     draw_actor_image(actor, temp_actor, dx)
  814.     draw_param_names(actor, dx)
  815.     draw_former_stats(temp_actor)
  816.     draw_arrows
  817.     draw_newer_stats(actor, temp_actor)
  818.     draw_new_skills(actor, temp_actor)
  819.   end
  820.   
  821.   #--------------------------------------------------------------------------
  822.   # draw_actor_image
  823.   #--------------------------------------------------------------------------
  824.   def draw_actor_image(actor, temp_actor, dx)
  825.     draw_text(dx, line_height, 96, line_height, actor.name, 1)
  826.     draw_actor_face(actor, dx, line_height * 2)
  827.     exp = actor.exp - temp_actor.exp
  828.     text = sprintf(YEA::VICTORY_AFTERMATH::VICTORY_EXP, exp.group)
  829.     change_color(power_up_color)
  830.     contents.font.size = YEA::VICTORY_AFTERMATH::FONTSIZE_EXP
  831.     draw_text(0, line_height * 2 + 96, dx + 96, line_height, text, 2)
  832.     reset_font_settings
  833.   end
  834.   
  835.   #--------------------------------------------------------------------------
  836.   # draw_param_names
  837.   #--------------------------------------------------------------------------
  838.   def draw_param_names(actor, dx)
  839.     dx += 108
  840.     change_color(system_color)
  841.     text = Vocab.level
  842.     draw_text(dx, 0, contents.width - dx, line_height, text)
  843.     dy = 0
  844.     for i in 0...8
  845.       dy += line_height
  846.       text = Vocab.param(i)
  847.       draw_text(dx, dy, contents.width - dx, line_height, text)
  848.     end
  849.   end
  850.   
  851.   #--------------------------------------------------------------------------
  852.   # draw_former_stats
  853.   #--------------------------------------------------------------------------
  854.   def draw_former_stats(actor)
  855.     dw = contents.width / 2 - 12
  856.     dy = 0
  857.     change_color(normal_color)
  858.     draw_text(0, dy, dw, line_height, actor.level.group, 2)
  859.     for i in 0...8
  860.       dy += line_height
  861.       draw_text(0, dy, dw, line_height, actor.param(i).group, 2)
  862.     end
  863.   end
  864.   
  865.   #--------------------------------------------------------------------------
  866.   # draw_arrows
  867.   #--------------------------------------------------------------------------
  868.   def draw_arrows
  869.     dx = contents.width / 2 - 12
  870.     dy = 0
  871.     change_color(system_color)
  872.     for i in 0..8
  873.       draw_text(dx, dy, 24, line_height, "→", 1)
  874.       dy += line_height
  875.     end
  876.   end
  877.   
  878.   #--------------------------------------------------------------------------
  879.   # draw_newer_stats
  880.   #--------------------------------------------------------------------------
  881.   def draw_newer_stats(actor, temp_actor)
  882.     dx = contents.width / 2 + 12
  883.     dw = contents.width - dx
  884.     dy = 0
  885.     change_color(param_change_color(actor.level - temp_actor.level))
  886.     draw_text(dx, dy, dw, line_height, actor.level.group, 0)
  887.     for i in 0...8
  888.       dy += line_height
  889.       change_color(param_change_color(actor.param(i) - temp_actor.param(i)))
  890.       draw_text(dx, dy, dw, line_height, actor.param(i).group, 0)
  891.     end
  892.   end
  893.   
  894.   #--------------------------------------------------------------------------
  895.   # draw_new_skills
  896.   #--------------------------------------------------------------------------
  897.   def draw_new_skills(actor, temp_actor)
  898.     return if temp_actor.skills.size == actor.skills.size
  899.     dw = 172 + 24
  900.     dx = contents.width - dw
  901.     change_color(system_color)
  902.     text = YEA::VICTORY_AFTERMATH::SKILLS_TEXT
  903.     draw_text(dx, 0, dw, line_height, text, 0)
  904.   end
  905.   
  906. end # Window_VictoryLevelUp

  907. #==============================================================================
  908. # ■ Window_VictorySkills
  909. #==============================================================================

  910. class Window_VictorySkills < Window_Selectable
  911.   
  912.   #--------------------------------------------------------------------------
  913.   # initialize
  914.   #--------------------------------------------------------------------------
  915.   def initialize
  916.     dy = fitting_height(1) + 24
  917.     dw = 172 + 24 + 24
  918.     dh = Graphics.height - fitting_height(4) - fitting_height(1) - 24
  919.     super(Graphics.width - dw, dy, dw, dh)
  920.     self.opacity = 0
  921.     self.z = 200
  922.     hide
  923.   end
  924.   
  925.   #--------------------------------------------------------------------------
  926.   # item_max
  927.   #--------------------------------------------------------------------------
  928.   def item_max; return @data.nil? ? 0 : @data.size; end
  929.   
  930.   #--------------------------------------------------------------------------
  931.   # refresh
  932.   #--------------------------------------------------------------------------
  933.   def refresh(actor, temp_actor)
  934.     contents.clear
  935.     if actor.skills.size == temp_actor.skills.size
  936.       unselect
  937.       @data = []
  938.       create_contents
  939.       return
  940.     end
  941.     @data = actor.skills - temp_actor.skills
  942.     if @data.size > 8
  943.       select(0)
  944.       activate
  945.     else
  946.       unselect
  947.       deactivate
  948.     end
  949.     create_contents
  950.     draw_all_items
  951.   end
  952.   
  953.   #--------------------------------------------------------------------------
  954.   # refresh
  955.   #--------------------------------------------------------------------------
  956.   def draw_item(index)
  957.     rect = item_rect(index)
  958.     skill = @data[index]
  959.     return if skill.nil?
  960.     rect.width -= 4
  961.     draw_item_name(skill, rect.x, rect.y, true)
  962.   end
  963.   
  964. end # Window_VictorySkills

  965. #==============================================================================
  966. # ■ Window_VictorySpoils
  967. #==============================================================================

  968. class Window_VictorySpoils < Window_ItemList
  969.   
  970.   #--------------------------------------------------------------------------
  971.   # initialize
  972.   #--------------------------------------------------------------------------
  973.   def initialize
  974.     super(0, fitting_height(1), Graphics.width, window_height)
  975.     self.z = 200
  976.     hide
  977.   end
  978.   
  979.   #--------------------------------------------------------------------------
  980.   # window_height
  981.   #--------------------------------------------------------------------------
  982.   def window_height
  983.     return Graphics.height - fitting_height(4) - fitting_height(1)
  984.   end
  985.   
  986.   #--------------------------------------------------------------------------
  987.   # spacing
  988.   #--------------------------------------------------------------------------
  989.   def spacing; return 32; end
  990.   
  991.   #--------------------------------------------------------------------------
  992.   # make
  993.   #--------------------------------------------------------------------------
  994.   def make(gold, drops)
  995.     @gold = gold
  996.     @drops = drops
  997.     refresh
  998.     select(0)
  999.     activate
  1000.   end
  1001.   
  1002.   #--------------------------------------------------------------------------
  1003.   # make_item_list
  1004.   #--------------------------------------------------------------------------
  1005.   def make_item_list
  1006.     @data = [nil]
  1007.     items = {}
  1008.     weapons = {}
  1009.     armours = {}
  1010.     @goods = {}
  1011.     for item in @drops
  1012.       case item
  1013.       when RPG::Item
  1014.         items[item] = 0 if items[item].nil?
  1015.         items[item] += 1
  1016.       when RPG::Weapon
  1017.         weapons[item] = 0 if weapons[item].nil?
  1018.         weapons[item] += 1
  1019.       when RPG::Armor
  1020.         armours[item] = 0 if armours[item].nil?
  1021.         armours[item] += 1
  1022.       end
  1023.     end
  1024.     items = items.sort { |a,b| a[0].id <=> b[0].id }
  1025.     weapons = weapons.sort { |a,b| a[0].id <=> b[0].id }
  1026.     armours = armours.sort { |a,b| a[0].id <=> b[0].id }
  1027.     for key in items; @goods[key[0]] = key[1]; @data.push(key[0]); end
  1028.     for key in weapons; @goods[key[0]] = key[1]; @data.push(key[0]); end
  1029.     for key in armours; @goods[key[0]] = key[1]; @data.push(key[0]); end
  1030.   end
  1031.   
  1032.   #--------------------------------------------------------------------------
  1033.   # draw_item
  1034.   #--------------------------------------------------------------------------
  1035.   def draw_item(index)
  1036.     item = @data[index]
  1037.     rect = item_rect(index)
  1038.     reset_font_settings
  1039.     if item.nil?
  1040.       draw_gold(rect)
  1041.       return
  1042.     end
  1043.     rect.width -= 4
  1044.     draw_item_name(item, rect.x, rect.y, true, rect.width - 24)
  1045.     draw_item_number(rect, item)
  1046.   end
  1047.   
  1048.   #--------------------------------------------------------------------------
  1049.   # draw_gold
  1050.   #--------------------------------------------------------------------------
  1051.   def draw_gold(rect)
  1052.     text = Vocab.currency_unit
  1053.     draw_currency_value(@gold, text, rect.x, rect.y, rect.width)
  1054.   end
  1055.   
  1056.   #--------------------------------------------------------------------------
  1057.   # draw_item_number
  1058.   #--------------------------------------------------------------------------
  1059.   def draw_item_number(rect, item)
  1060.     number = @goods[item].group
  1061.     if $imported["YEA-AdjustLimits"]
  1062.       contents.font.size = YEA::LIMIT::ITEM_FONT
  1063.       text = sprintf(YEA::LIMIT::ITEM_PREFIX, number)
  1064.       draw_text(rect, text, 2)
  1065.     else
  1066.       draw_text(rect, sprintf(":%s", number), 2)
  1067.     end
  1068.   end
  1069.   
  1070. end # Window_VictorySpoils

  1071. #==============================================================================
  1072. # ■ Scene_Battle
  1073. #==============================================================================

  1074. class Scene_Battle < Scene_Base
  1075.   
  1076.   #--------------------------------------------------------------------------
  1077.   # alias method: create_all_windows
  1078.   #--------------------------------------------------------------------------
  1079.   alias scene_battle_create_all_windows_va create_all_windows
  1080.   def create_all_windows
  1081.     scene_battle_create_all_windows_va
  1082.     create_victory_aftermath_windows
  1083.   end
  1084.   
  1085.   #--------------------------------------------------------------------------
  1086.   # new method: create_victory_aftermath_windows
  1087.   #--------------------------------------------------------------------------
  1088.   def create_victory_aftermath_windows
  1089.     @victory_title_window = Window_VictoryTitle.new
  1090.     @victory_exp_window_back = Window_VictoryEXP_Back.new
  1091.     @victory_exp_window_front = Window_VictoryEXP_Front.new
  1092.     @victory_level_window = Window_VictoryLevelUp.new
  1093.     @victory_level_skills = Window_VictorySkills.new
  1094.     @victory_spoils_window = Window_VictorySpoils.new
  1095.   end
  1096.   
  1097.   #--------------------------------------------------------------------------
  1098.   # new method: show_victory_display_exp
  1099.   #--------------------------------------------------------------------------
  1100.   def show_victory_display_exp
  1101.     @victory_title_window.open
  1102.     name = $game_party.battle_members[0].name
  1103.     fmt = YEA::VICTORY_AFTERMATH::TOP_TEAM
  1104.     name = sprintf(fmt, name) if $game_party.battle_members.size > 1
  1105.     fmt = YEA::VICTORY_AFTERMATH::TOP_VICTORY_TEXT
  1106.     text = sprintf(fmt, name)
  1107.     @victory_title_window.refresh(text)
  1108.     #---
  1109.     @victory_exp_window_back.open
  1110.     @victory_exp_window_back.refresh
  1111.     @victory_exp_window_front.open
  1112.     @victory_exp_window_front.refresh
  1113.   end
  1114.   
  1115.   #--------------------------------------------------------------------------
  1116.   # new method: show_victory_level_up
  1117.   #--------------------------------------------------------------------------
  1118.   def show_victory_level_up(actor, temp_actor)
  1119.     @victory_exp_window_back.hide
  1120.     @victory_exp_window_front.hide
  1121.     #---
  1122.     fmt = YEA::VICTORY_AFTERMATH::TOP_LEVEL_UP
  1123.     text = sprintf(fmt, actor.name)
  1124.     @victory_title_window.refresh(text)
  1125.     #---
  1126.     @victory_level_window.show
  1127.     @victory_level_window.refresh(actor, temp_actor)
  1128.     @victory_level_skills.show
  1129.     @victory_level_skills.refresh(actor, temp_actor)
  1130.   end
  1131.   
  1132.   #--------------------------------------------------------------------------
  1133.   # new method: show_victory_spoils
  1134.   #--------------------------------------------------------------------------
  1135.   def show_victory_spoils(gold, drops)
  1136.     @victory_exp_window_back.hide
  1137.     @victory_exp_window_front.hide
  1138.     @victory_level_window.hide
  1139.     @victory_level_skills.hide
  1140.     #---
  1141.     text = YEA::VICTORY_AFTERMATH::TOP_SPOILS
  1142.     @victory_title_window.refresh(text)
  1143.     #---
  1144.     @victory_spoils_window.show
  1145.     @victory_spoils_window.make(gold, drops)
  1146.   end
  1147.   
  1148.   #--------------------------------------------------------------------------
  1149.   # new method: close_victory_windows
  1150.   #--------------------------------------------------------------------------
  1151.   def close_victory_windows
  1152.     @victory_title_window.close
  1153.     @victory_exp_window_back.close
  1154.     @victory_exp_window_front.close
  1155.     @victory_level_window.close
  1156.     @victory_level_skills.close
  1157.     @victory_spoils_window.close
  1158.     wait(16)
  1159.   end
  1160.   
  1161. end # Scene_Battle

  1162. #==============================================================================
  1163. #
  1164. # ▼ End of File
  1165. #
  1166. #==============================================================================
复制代码

Lv1.梦旅人

梦石
0
星屑
143
在线时间
347 小时
注册时间
2010-7-7
帖子
128
2
 楼主| 发表于 2012-8-31 13:26:25 | 只看该作者
各位大侠帮帮忙吧........在线等哦~
回复 支持 反对

使用道具 举报

Lv1.梦旅人

哆啦菌

梦石
0
星屑
46
在线时间
795 小时
注册时间
2010-7-24
帖子
3800
3
发表于 2012-8-31 13:27:27 | 只看该作者
应该是脚本冲突,或者你改了脚本或者你用的不是原脚本
随便看看
回复 支持 反对

使用道具 举报

Lv1.梦旅人

梦石
0
星屑
55
在线时间
177 小时
注册时间
2011-6-7
帖子
88
4
发表于 2012-8-31 15:05:28 | 只看该作者
楼主应该是有其他经验获得脚本冲突了吧
回复 支持 反对

使用道具 举报

Lv1.梦旅人

梦石
0
星屑
143
在线时间
347 小时
注册时间
2010-7-7
帖子
128
5
 楼主| 发表于 2012-8-31 15:14:42 | 只看该作者
fxwd 发表于 2012-8-31 13:27
应该是脚本冲突,或者你改了脚本或者你用的不是原脚本

刚才试了一下,原范例中,也有同样的问题。


‘‘──yjl494356020于2012-8-31 15:15补充以下内容:

我只有这一个经验获得脚本哦,难道和系统自带的那个冲突了?
’’
回复 支持 反对

使用道具 举报

Lv2.观梦者

梦石
0
星屑
743
在线时间
2064 小时
注册时间
2011-10-3
帖子
1686
6
发表于 2012-8-31 15:25:19 | 只看该作者
是不是你在用这个脚本前获得过经验?最好重新开档,从0经验开始试
回复 支持 反对

使用道具 举报

Lv1.梦旅人

梦石
0
星屑
143
在线时间
347 小时
注册时间
2010-7-7
帖子
128
7
 楼主| 发表于 2012-8-31 15:40:00 | 只看该作者
布里蓝 发表于 2012-8-31 15:25
是不是你在用这个脚本前获得过经验?最好重新开档,从0经验开始试

没有的,之前一直是0经验的。
回复 支持 反对

使用道具 举报

Lv3.寻梦者

死亡颂唱者

梦石
0
星屑
1154
在线时间
1794 小时
注册时间
2011-10-21
帖子
2245

开拓者

8
发表于 2012-8-31 15:44:44 | 只看该作者
经验条显示的那个脚本有问题  获得经验基本上是从40%开始往后加的  和战斗胜利脚本没关系
这家伙很懒,什么也没有留下
回复 支持 反对

使用道具 举报

Lv1.梦旅人

梦石
0
星屑
143
在线时间
347 小时
注册时间
2010-7-7
帖子
128
9
 楼主| 发表于 2012-8-31 15:53:03 | 只看该作者
acn00269 发表于 2012-8-31 15:44
经验条显示的那个脚本有问题  获得经验基本上是从40%开始往后加的  和战斗胜利脚本没关系 ...

原来如此,我没注意...还有经验条的这个脚本...


‘‘──yjl494356020于2012-8-31 15:53补充以下内容:

这是经验条的脚本...大侠们帮看下哪里有问题...
  1. #===================================
  2. #  ●設定區域
  3. #===================================

  4. module WD
  5. module Exp_Gauge
  6.   #EXP條COLOR,請修改成TEXT文字
  7.   EXP_GAUGE_COLOR1 = 6
  8.   EXP_GAUGE_COLOR2 = 14

  9.   #EXP條文字顯示設定,true為打開,false為關閉
  10.   EXP_TEXT_DISPLAY = false
  11. end
  12. end

  13. #==============================================================================
  14. # ■ Window_Base
  15. #------------------------------------------------------------------------------
  16. #  ゲーム中の全てのウィンドウのスーパークラスです。
  17. #==============================================================================

  18. class Window_Base < Window
  19.   include WD::Exp_Gauge

  20.   def exp_gauge_color1;   text_color(EXP_GAUGE_COLOR1);  end;    # EXP ゲージ 1
  21.   def exp_gauge_color2;   text_color(EXP_GAUGE_COLOR2);  end;    # EXP ゲージ 2

  22.   #--------------------------------------------------------------------------
  23.   # ● シンプルなステータスの描画
  24.   #--------------------------------------------------------------------------
  25.   def draw_actor_simple_status(actor, x, y)
  26.     draw_actor_name(actor, x, y + line_height * 0.5)
  27.     draw_actor_level(actor, x, y - line_height * 0.5)
  28.     draw_actor_icons(actor, x, y + line_height * 1.5)
  29.     draw_actor_class(actor, x + 120, y - line_height * 0.5)
  30.     draw_actor_hp(actor, x + 120, y + line_height * 0.5)
  31.     draw_actor_mp(actor, x + 120, y + line_height * 1.5)
  32.     draw_actor_exp(actor, x, y + line_height * 2.5, EXP_TEXT_DISPLAY)
  33.   end
  34.   #--------------------------------------------------------------------------
  35.   # ● EXP の描画
  36.   #--------------------------------------------------------------------------
  37.   def draw_actor_exp(actor, x, y, display = true, width = 244)
  38.     this_level = actor.exp - actor.past_level_exp
  39.     next_level = actor.next_level_exp - actor.past_level_exp
  40.     draw_gauge(x, y, width, actor.exp_rate, exp_gauge_color1, exp_gauge_color2)
  41.     change_color(system_color)
  42.     if display
  43.       draw_text(x, y, 30, line_height, "EXP")
  44.       draw_current_and_max_values(x, y, width, this_level, next_level, mp_color(actor), normal_color)
  45.     end
  46.   end
  47. end

  48. class Game_Actor < Game_Battler
  49.   #--------------------------------------------------------------------------
  50.   # ● EXP の割合を取得
  51.   #--------------------------------------------------------------------------
  52.   def exp_rate
  53.     this_level = exp - past_level_exp
  54.     next_level = next_level_exp - past_level_exp
  55.     next_level > 0 ? this_level.to_f / next_level : 0
  56.   end
  57.   #--------------------------------------------------------------------------
  58.   # ● 前のレベルの経験値を取得
  59.   #--------------------------------------------------------------------------
  60.   def past_level_exp
  61.     @level > 1 ? exp_for_level(@level - 1) : 0
  62.   end
  63. end
复制代码

’’
回复 支持 反对

使用道具 举报

Lv1.梦旅人

梦石
0
星屑
143
在线时间
347 小时
注册时间
2010-7-7
帖子
128
10
 楼主| 发表于 2012-8-31 22:39:03 | 只看该作者
拜托高手们,帮帮忙我吧...
回复 支持 反对

使用道具 举报

您需要登录后才可以回帖 登录 | 注册会员

本版积分规则

拿上你的纸笔,建造一个属于你的梦想世界,加入吧。
 注册会员
找回密码

站长信箱:[email protected]|手机版|小黑屋|无图版|Project1游戏制作

GMT+8, 2024-5-8 07:45

Powered by Discuz! X3.1

© 2001-2013 Comsenz Inc.

快速回复 返回顶部 返回列表