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

Project1

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

[已经解决] [菜鸟伸手党]求升级时提示升级的数值的脚本

[复制链接]

Lv1.梦旅人

梦石
0
星屑
50
在线时间
20 小时
注册时间
2013-9-1
帖子
19
跳转到指定楼层
1
发表于 2013-10-5 03:33:46 | 只看该作者 回帖奖励 |倒序浏览 |阅读模式

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

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

x
rt。。。之前找了个得到物品和升级提示的脚本,放进去发现升级还是没提示,记得以前rmxp的时候有个升级时提示数值变化的脚本,求大神帮忙.

评分

参与人数 1星屑 +25 收起 理由
熊喵酱 + 25 主動認可獎勵

查看全部评分

Lv3.寻梦者

梦石
0
星屑
3846
在线时间
1966 小时
注册时间
2013-1-3
帖子
9536
2
发表于 2013-10-5 09:35:11 | 只看该作者
《宿愿·寻剑篇》正式版已经发布!快去看看!点击进入论坛发布贴
回复 支持 反对

使用道具 举报

Lv1.梦旅人

梦石
0
星屑
50
在线时间
113 小时
注册时间
2013-8-7
帖子
32
3
发表于 2013-10-5 11:41:52 | 只看该作者
  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.                    '"敌人在我面前,不是逃之夭夭;就是一败涂地!"',
  177.                    '"我还没用力,你就倒下了"',
  178.                    '"自从一股逆风袭来,我已能抵御八面来风,驾舟而行。"',
  179.                    '"没有闯过不过的关口,也没有打不倒的敌人。"',
  180.                  ],# Do not remove this.
  181.       #------------------------------------------------------------------------
  182.       :level  => [ # Occurs as initial victory quote.
  183.                    '"变强,是为了挑战更高的目标!"',
  184.                    '"为了更强,我才存在!"',
  185.                    '"强者,统治弱者!"',
  186.                    '"在强者的眼里,没有弱者的席位!"',
  187.                  ],# Do not remove this.
  188.       #------------------------------------------------------------------------
  189.       :drops  => [ # Occurs as initial victory quote.
  190.                    '"好多好多的钱啊~~~"',
  191.                    '"嘿嘿,怪物还算仗义啊!"',
  192.                    '"怪物掉了些东西!"',
  193.                    '"嘿, 这是什么?"',
  194.                  ],# Do not remove this.
  195.       #------------------------------------------------------------------------
  196.     } # Do not remove this.
  197.    
  198.   end # VICTORY_AFTERMATH
  199. end # YEA

  200. #==============================================================================
  201. # ▼ Editting anything past this point may potentially result in causing
  202. # computer damage, incontinence, explosion of user's head, coma, death, and/or
  203. # halitosis so edit at your own risk.
  204. #==============================================================================

  205. module YEA
  206.   module REGEXP
  207.   module BASEITEM
  208.    
  209.     NEW_QUOTE = /\[(?:NEW_QUOTE|new quote)\]/i
  210.    
  211.     WIN_QUOTE_ON    = /<(?:WIN_QUOTES|win quote|win quotes)>/i
  212.     WIN_QUOTE_OFF   = /<\/(?:WIN_QUOTES|win quote|win quotes)>/i
  213.     LEVEL_QUOTE_ON  = /<(?:LEVEL_QUOTES|level quote|level quotes)>/i
  214.     LEVEL_QUOTE_OFF = /<\/(?:LEVEL_QUOTES|level quote|level quotes)>/i
  215.     DROPS_QUOTE_ON  = /<(?:DROPS_QUOTES|drops quote|drops quotes)>/i
  216.     DROPS_QUOTE_OFF = /<\/(?:DROPS_QUOTES|drops quote|drops quotes)>/i
  217.    
  218.   end # BASEITEM
  219.   end # REGEXP
  220. end # YEA

  221. #==============================================================================
  222. # ■ Switch
  223. #==============================================================================

  224. module Switch
  225.   
  226.   #--------------------------------------------------------------------------
  227.   # self.skip_aftermath
  228.   #--------------------------------------------------------------------------
  229.   def self.skip_aftermath
  230.     return false if YEA::VICTORY_AFTERMATH::SKIP_AFTERMATH_SWITCH <= 0
  231.     return $game_switches[YEA::VICTORY_AFTERMATH::SKIP_AFTERMATH_SWITCH]
  232.   end
  233.    
  234. end # Switch

  235. #==============================================================================
  236. # ■ Numeric
  237. #==============================================================================

  238. class Numeric
  239.   
  240.   #--------------------------------------------------------------------------
  241.   # new method: group_digits
  242.   #--------------------------------------------------------------------------
  243.   unless $imported["YEA-CoreEngine"]
  244.   def group; return self.to_s; end
  245.   end # $imported["YEA-CoreEngine"]
  246.    
  247. end # Numeric

  248. #==============================================================================
  249. # ■ DataManager
  250. #==============================================================================

  251. module DataManager
  252.   
  253.   #--------------------------------------------------------------------------
  254.   # alias method: load_database
  255.   #--------------------------------------------------------------------------
  256.   class <<self; alias load_database_va load_database; end
  257.   def self.load_database
  258.     load_database_va
  259.     load_notetags_va
  260.   end
  261.   
  262.   #--------------------------------------------------------------------------
  263.   # new method: load_notetags_va
  264.   #--------------------------------------------------------------------------
  265.   def self.load_notetags_va
  266.     groups = [$data_actors, $data_classes]
  267.     for group in groups
  268.       for obj in group
  269.         next if obj.nil?
  270.         obj.load_notetags_va
  271.       end
  272.     end
  273.   end
  274.   
  275. end # DataManager

  276. #==============================================================================
  277. # ■ RPG::BaseItem
  278. #==============================================================================

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

  339. #==============================================================================
  340. # ■ BattleManager
  341. #==============================================================================

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

  471. #==============================================================================
  472. # ■ Game_Actor
  473. #==============================================================================

  474. class Game_Actor < Game_Battler
  475.   
  476.   #--------------------------------------------------------------------------
  477.   # overwrite method: gain_exp
  478.   #--------------------------------------------------------------------------
  479.   def gain_exp(exp)
  480.     enabled = !SceneManager.scene_is?(Scene_Battle)
  481.     change_exp(self.exp + (exp * final_exp_rate).to_i, enabled)
  482.   end
  483.   
  484.   #--------------------------------------------------------------------------
  485.   # new method: victory_quotes
  486.   #--------------------------------------------------------------------------
  487.   def victory_quotes(type)
  488.     case type
  489.     when :win
  490.       return self.actor.win_quotes if self.actor.win_quotes != [""]
  491.       return self.class.win_quotes
  492.     when :level
  493.       return self.actor.level_quotes if self.actor.level_quotes != [""]
  494.       return self.class.level_quotes
  495.     when :drops
  496.       return self.actor.drops_quotes if self.actor.drops_quotes != [""]
  497.       return self.class.drops_quotes
  498.     else
  499.       return ["NOTEXT"]
  500.     end
  501.   end
  502.   
  503. end # Game_Actor

  504. #==============================================================================
  505. # ■ Window_VictoryTitle
  506. #==============================================================================

  507. class Window_VictoryTitle < Window_Base
  508.   
  509.   #--------------------------------------------------------------------------
  510.   # initialize
  511.   #--------------------------------------------------------------------------
  512.   def initialize
  513.     super(0, 0, Graphics.width, fitting_height(1))
  514.     self.z = 200
  515.     self.openness = 0
  516.   end
  517.   
  518.   #--------------------------------------------------------------------------
  519.   # refresh
  520.   #--------------------------------------------------------------------------
  521.   def refresh(message = "")
  522.     contents.clear
  523.     draw_text(0, 0, contents.width, line_height, message, 1)
  524.   end
  525.   
  526. end # Window_VictoryTitle

  527. #==============================================================================
  528. # ■ Window_VictoryEXP_Back
  529. #==============================================================================

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

  665. #==============================================================================
  666. # ■ Window_VictoryEXP_Front
  667. #==============================================================================

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

  787. #==============================================================================
  788. # ■ Window_VictoryLevelUp
  789. #==============================================================================

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

  917. #==============================================================================
  918. # ■ Window_VictorySkills
  919. #==============================================================================

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

  975. #==============================================================================
  976. # ■ Window_VictorySpoils
  977. #==============================================================================

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

  1081. #==============================================================================
  1082. # ■ Scene_Battle
  1083. #==============================================================================

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

  1172. #==============================================================================
  1173. #
  1174. # ▼ End of File
  1175. #
  1176. #==============================================================================
复制代码
这个不错,不是我的,是谁的我也忘了,是在VA脚本整合里面的。

点评

下回注意  发表于 2013-10-5 11:54
这个脚本就是Yanfly的【脚本头部就有【其实我只是建议你把要说的话放在脚本之前,这样的话别人要先看完(?)脚本才能看到你想表达什么,很麻烦  发表于 2013-10-5 11:49
回复 支持 反对

使用道具 举报

Lv1.梦旅人

梦石
0
星屑
50
在线时间
20 小时
注册时间
2013-9-1
帖子
19
4
 楼主| 发表于 2013-10-5 17:58:10 | 只看该作者
紫英晓狼1130 发表于 2013-10-5 09:35
试一下这个脚本
http://rpg.blue/forum.php?mod=viewthread&tid=110935

谢谢帮助。
回复 支持 反对

使用道具 举报

Lv1.梦旅人

梦石
0
星屑
50
在线时间
20 小时
注册时间
2013-9-1
帖子
19
5
 楼主| 发表于 2013-10-5 18:01:10 | 只看该作者
1312017233 发表于 2013-10-5 11:41
这个不错,不是我的,是谁的我也忘了,是在VA脚本整合里面的。

谢谢帮助,同时感谢原作者。
代码里多了一段网址去了就可以用了。
现在还有两个问题,一个是胜利后说的话有的比较长不能完全显示,有办法让它自动换行吗?另一个是这个代码好像就是战斗胜利后有用,平时通过事件和物品升级没用,有办法在平时升级也显示吗?
回复 支持 反对

使用道具 举报

Lv1.梦旅人

梦石
0
星屑
50
在线时间
113 小时
注册时间
2013-8-7
帖子
32
6
发表于 2013-10-5 18:18:04 | 只看该作者
你用这个试试,是从整和里面得的
  1. #==============================================================================
  2. # 本腳本來自www.66RPG.com,使用和轉載請保留此信息
  3. #==============================================================================

  4. # 注意!!!在對話後得到物品,請在對話後先用事件等待3幀,否則對話框來不及消失。

  5. # 開關定義:

  6. $noshowgold = 994                       # 不显示金钱得失

  7. $noshowitem = 995                       # 不显示物品得失

  8. $noshowweapon = 996                     # 不显示武器得失

  9. $noshowarmor = 997                      # 不显示防具得失
  10. # 以上開關,當打開的時候,獲得物品將不會提示,比如默認打開41號開關,獲得金錢不再提示

  11. # 不想提示等级升降时,就在事件命令直接选择是否显示就行了。

  12. #——聲效,可以自己改
  13. folder = "Audio/SE/"
  14. $gain_gold_se   = folder +"Shop"      # 获得金钱声效
  15. $loss_gold_se   = folder +"Blow2"     # 失去金钱声效

  16. $gain_item_se   = folder +"Item1"     # 获得物品声效
  17. $loss_item_se   = folder +"Blow2"     # 失去物品声效

  18. $gain_weapon_se = folder +"Item1"     # 获得武器声效
  19. $loss_weapon_se = folder +"Blow2"     # 失去武器声效

  20. $gain_armor_se  = folder +"Item1"     # 获得防具声效
  21. $loss_armor_se  = folder +"Blow2"     # 失去防具声效

  22. $gain_lv_se     = folder +"Item1"     # 提升等级声效
  23. $loss_lv_se     = folder +"Blow2"     # 降低等级声效

  24. # ————————————————————————————————————

  25. class Game_Interpreter
  26.   #--------------------------------------------------------------------------
  27.   # ● 增減金錢
  28.   #--------------------------------------------------------------------------
  29.   def command_125
  30.     value = operate_value(@params[0], @params[1], @params[2])
  31.     $game_party.gain_gold(value)
  32.     if $game_switches[$noshowgold]==false
  33.       show_gain_window(0, value)
  34.     end
  35.     return true
  36.   end
  37.   #--------------------------------------------------------------------------
  38.   # ● 增減物品
  39.   #--------------------------------------------------------------------------
  40.   def command_126
  41.     value = operate_value(@params[1], @params[2], @params[3])
  42.     $game_party.gain_item($data_items[@params[0]], value)
  43.     if $game_switches[$noshowitem]==false
  44.       show_gain_window(1, value)
  45.     end
  46.     $game_map.need_refresh = true
  47.     return true
  48.   end
  49.   #--------------------------------------------------------------------------
  50.   # ● 增減武器
  51.   #--------------------------------------------------------------------------
  52.   def command_127
  53.     value = operate_value(@params[1], @params[2], @params[3])
  54.     $game_party.gain_item($data_weapons[@params[0]], value, @params[4])
  55.     if $game_switches[$noshowweapon]==false
  56.       show_gain_window(2, value)
  57.     end
  58.     return true
  59.   end
  60.   #--------------------------------------------------------------------------
  61.   # ● 增減防具
  62.   #--------------------------------------------------------------------------
  63.   def command_128
  64.     value = operate_value(@params[1], @params[2], @params[3])
  65.     $game_party.gain_item($data_armors[@params[0]], value, @params[4])
  66.     if $game_switches[$noshowarmor]==false
  67.       show_gain_window(3, value)
  68.     end
  69.     return true
  70.   end
  71.   #--------------------------------------------------------------------------
  72.   # ● 等级増減
  73.   #--------------------------------------------------------------------------
  74.   def command_316
  75.     value = operate_value(@params[2], @params[3], @params[4])
  76.     iterate_actor_var(@params[0], @params[1]) do |actor|
  77.       actor.change_level(actor.level + value, @params[5])
  78.       if @params[4]
  79.         show_gain_level_window(actor,value)
  80.       end
  81.     end
  82.     return true
  83.   end
  84.   
  85.   def show_gain_window(type, value)
  86.     snstar2006_66rpg_item = $data_armors[@params[0]]
  87.     snstar2006_66rpg = Window_Base.new((640-300)/2,128,200,100)
  88.     snstar2006_66rpg.contents = Bitmap.new(snstar2006_66rpg.width - 32, snstar2006_66rpg.height - 32)
  89.     if value >= 0
  90.       gain_text = "获得"   
  91.     else
  92.       gain_text = "失去"
  93.     end
  94.    
  95.     case type
  96.     when 0
  97.       gain_type = "金钱"
  98.       if value >=0
  99.         Audio.se_play($gain_gold_se,80,100)
  100.       else
  101.         Audio.se_play("Audio/SE/"+"Item1",80,100)
  102.       end
  103.     when 1
  104.       gain_type = "物品"
  105.       string = $data_items[@params[0]]
  106.       if value >=0
  107.         Audio.se_play($gain_item_se,80,100)
  108.       else
  109.         Audio.se_play($loss_item_se,80,100)
  110.       end
  111.     when 2
  112.       gain_type = "武器"
  113.       string = $data_weapons[@params[0]]
  114.       if value >=0
  115.         Audio.se_play($gain_weapon_se,80,100)
  116.       else
  117.         Audio.se_play($loss_weapon_se,80,100)
  118.       end
  119.     when 3
  120.       gain_type = "防具"
  121.       string = $data_armors[@params[0]]
  122.       if value >=0
  123.         Audio.se_play($gain_armor_se,80,100)
  124.       else
  125.         Audio.se_play($loss_armor_se,80,100)
  126.       end
  127.     end
  128.    
  129.     snstar2006_66rpg.contents.draw_text(0,0,160,30,gain_text+gain_type+":")
  130.    
  131.     unless type == 0
  132.       snstar2006_66rpg.draw_item_name(string, 0, 30, true)
  133.       snstar2006_66rpg.contents.draw_text(0, 30, 160, 30, "×"+value.abs.to_s, 2)
  134.     else
  135.       snstar2006_66rpg.contents.draw_text(0,30,165,30,value.abs.to_s + "  "+ Vocab.currency_unit, 2)
  136.     end
  137.    
  138.     snstar2006_66rpg.opacity = 160
  139.    
  140.     for i in 0..50
  141.       Graphics.update
  142.     end
  143.    
  144.     for i in 0..10
  145.       snstar2006_66rpg.opacity -= 10
  146.       snstar2006_66rpg.contents_opacity -= 10
  147.       Graphics.update
  148.     end
  149.    
  150.     snstar2006_66rpg.dispose
  151.    
  152.   end

  153.   def show_gain_level_window(actor,value)
  154.     lvstring = Vocab::level
  155.         
  156.     snstar2006_66rpg = Window_Base.new((640-300)/2,128,200,100)
  157.     snstar2006_66rpg.contents = Bitmap.new(snstar2006_66rpg.width - 30, snstar2006_66rpg.height - 30)
  158.    
  159.     if value >= 0
  160.       gain_text = "提升"
  161.       Audio.se_play($gain_lv_se,80,100)
  162.     else
  163.       gain_text = "降低"
  164.       Audio.se_play($loss_lv_se,80,100)
  165.     end
  166.    
  167.     snstar2006_66rpg.contents.draw_text(0, 0, 110, 30, actor.name)
  168.     string = lvstring+gain_text+value.abs.to_s+"级"
  169.     snstar2006_66rpg.contents.draw_text(0,30,160,30,string, 2)

  170.     snstar2006_66rpg.opacity = 160
  171.    
  172.     for i in 0..50
  173.       Graphics.update
  174.     end
  175.    
  176.     for i in 0..10
  177.       snstar2006_66rpg.opacity -= 10
  178.       snstar2006_66rpg.contents_opacity -= 10
  179.       Graphics.update
  180.     end
  181.    
  182.     snstar2006_66rpg.dispose

  183.   end
  184. end


  185. #==============================================================================
  186. # 本腳本來自www.66RPG.com,使用和轉載請保留此信息
  187. #==============================================================================
复制代码

评分

参与人数 1梦石 +1 收起 理由
熊喵酱 + 1 精品文章

查看全部评分

回复 支持 反对

使用道具 举报

Lv1.梦旅人

梦石
0
星屑
50
在线时间
20 小时
注册时间
2013-9-1
帖子
19
7
 楼主| 发表于 2013-10-5 18:45:23 | 只看该作者
1312017233 发表于 2013-10-5 18:18
你用这个试试,是从整和里面得的

谢谢,这个脚本之前试过,只对增加等级有效,对增加经验导致的升级无效,而且也不显示升级数值。有没有办法从前面那个脚本上改良?

点评

好的,谢谢。  发表于 2013-10-5 20:32
额.....我不会了,我也是新人,只会改脚本,不会写脚本....祝你早日找到答案  发表于 2013-10-5 18:53
回复 支持 反对

使用道具 举报

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

本版积分规则

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

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

GMT+8, 2024-11-17 10:38

Powered by Discuz! X3.1

© 2001-2013 Comsenz Inc.

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