查看: 2734|回复: 6

[已经过期] YEA的敵人等級和敵人資訊腳本報錯

[复制链接]
梦石
0
星屑
354
在线时间
127 小时
注册时间
2016-10-8
回帖
54
发表于 2018-5-4 16:41:05 | 显示全部楼层 |阅读模式

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

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

×
本帖最后由 elemmy72 于 2018-5-4 16:39 编辑

Enemy Levels v1.02
  1. #==============================================================================
  2. #
  3. # ▼ Yanfly Engine Ace - Enemy Levels v1.02
  4. # -- Last Updated: 2012.01.26
  5. # -- Level: Normal, Hard
  6. # -- Requires: n/a
  7. #
  8. #==============================================================================

  9. $imported = {} if $imported.nil?
  10. $imported["YEA-EnemyLevels"] = true

  11. #==============================================================================
  12. # ▼ Updates
  13. # =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
  14. # 2012.01.26 - Bug Fixed: Duplication of stat growth rates per enemy.
  15. # 2012.01.24 - Added <hide level> notetag for enemies.
  16. #            - Option to change Party Level function in Action Conditions to
  17. #              enemy level requirements.
  18. # 2011.12.30 - Started Script and Finished.
  19. #
  20. #==============================================================================
  21. # ▼ Introduction
  22. # =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
  23. # RPG's with enemies that level up with the party enforces the player to stay
  24. # on their toes the whole time. This is both a good and bad thing as it can
  25. # cause the player to stay alert, but can also cause the player to meet some
  26. # roadblocks. This script will not only provide enemies the ability to level up
  27. # but also allow the script's user to go around these roadblocks using various
  28. # tags to limit or slow down the rate of growth across all enemies.
  29. #
  30. #==============================================================================
  31. # ▼ Instructions
  32. # =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
  33. # To install this script, open up your script editor and copy/paste this script
  34. # to an open slot below ▼ Materials/素材 but above ▼ Main. Remember to save.
  35. #
  36. # -----------------------------------------------------------------------------
  37. # Skill Notetags - These notetags go in the skill notebox in the database.
  38. # -----------------------------------------------------------------------------
  39. # <enemy level: +x>
  40. # <enemy level: -x>
  41. # This causes the enemy to raise or drop x levels depending on the tag used.
  42. # The new level will readjust the enemy's stats (including HP and MP).
  43. # 根據提升和降低等級而增減所有能力值。
  44. #
  45. # <enemy level reset>
  46. # This resets the enemy's level back to the typical range it should be plus or
  47. # minus any level fluctuations it was given. This occurs before enemy level +
  48. # and enemy level - tags.
  49. # 重置敵人等級。
  50. #
  51. # -----------------------------------------------------------------------------
  52. # Enemy Notetags - These notetags go in the enemies notebox in the database.
  53. # -----------------------------------------------------------------------------
  54. # <hide level>
  55. # This notetag will hide the level of the enemy. If YEA - Enemy Target Info is
  56. # installed, the level will be revealed upon a parameter scan.
  57. # 隱藏敵人的等級,如果安裝了YEA - Enemy Target Info,則會顯示等級。
  58. #
  59. # <min level: x>
  60. # <max level: x>
  61. # This will adjust the minimum and maximum levels for the enemy. By default,
  62. # the minimum level is 1 and the maximum level is whatever is set in the module
  63. # as MAX_LEVEL.
  64. # 設置敵人的最低與最高等級。默認情況下最低等級為1,最高等級則需設置。
  65. #
  66. # <set level: x>
  67. # This will set the enemy's level to exactly x. It a sense, this is just the
  68. # usage of both the min and max level tags together as the same value.
  69. # 設置敵人的固定等級。並不會像上列那樣有最低最高的浮動等級,這個是固定的。
  70. #
  71. # <level type: x>
  72. # Choosing a value from 0 to 4, you can adjust the different leveling rulesets
  73. # for the enemy. See the list below.
  74. # Type 0 - Lowest level of all actors that have joined.
  75. # Type 1 - Lowest level in the battle party.
  76. # Type 2 - Average level of the battle party.
  77. # Type 3 - Highest level of the battle party.
  78. # Type 4 - Highest level of all actors that have joined.
  79. # 可依照設置的等級類型來自動判斷敵人等級。
  80. # Type 0 - 取我方隊伍中的最低等級為敵人等級。
  81. # Type 1 - 取戰鬥中的敵我方的最低等級為敵人等級。
  82. # Type 2 - 取戰鬥中的敵我方的平均等級為敵人等級。
  83. # Type 3 - 取戰鬥中的敵我方的最高等級為敵人等級。
  84. # Type 4 - 取我方隊伍中的最高等級為敵人等級。
  85. #
  86. # <level random: x>
  87. # This will give the level a random flunctuation in either direction. Set this
  88. # value to 0 if you don't wish to use it. Adjust RANDOM_FLUCTUATION inside the
  89. # module to change the default fluctuation value.
  90. # 這將使該等級在任一方向都出現隨機波動。
  91. # 不想使用就設置為0,調整模塊內部的RANDOM_FLUCTUATION以更改默認波動值。
  92. #
  93. # <stat: +x per level>
  94. # <stat: -x per level>
  95. # <stat: +x% per level>
  96. # <stat: -x% per level>
  97. # This will raise or lower the stat by x or x% per level (depending on the tag
  98. # used). This will override the default growth settings found inside the module
  99. # hash called DEFAULT_GROWTH. You may replace stat with:
  100. # MAXHP, MAXMP, ATK, DEF, MAT, MDF, AGI, LUK, GOLD, EXP
  101. # 用於提高或降低每個等級x或x%的能力數值。(會覆蓋數據庫裡的敵人能力值設置)
  102. # stat修改為:MAXHP,MAXMP,ATK,DEF,MAT,MDF,AGI,LUK,GOLD,EXP
  103. #
  104. #==============================================================================
  105. # ▼ Compatibility
  106. # =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
  107. # This script is made strictly for RPG Maker VX Ace. It is highly unlikely that
  108. # it will run with RPG Maker VX without adjusting.
  109. #
  110. #==============================================================================

  111. module YEA
  112.   module ENEMY_LEVEL
  113.    
  114.     #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
  115.     # - General Level Settings -
  116.     #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
  117.     # These settings adjust the general level setup for your enemies from the
  118.     # way levels appear in the game to the default maximum level for enemies,
  119.     # to the way their levels are calculated by default, and the random level
  120.     # fluctuation they have. If you want enemies to have different settings,
  121.     # use notetags to change the respective setting.
  122.     #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
  123.     # This is how the level text will appear whenever enemy levels are shown.
  124.     # 設置在遊戲內戰鬥中會顯示的字樣。
  125.     LEVEL_TEXT = "Lv.%s %s"
  126.    
  127.     # This is the maximum level your enemies can achieve. They cannot go higher
  128.     # no exceptions. Adjust this accordingly to fit your game.
  129.     # 設置所有敵人的最高等級。
  130.     MAX_LEVEL = 99
  131.    
  132.     # Default level calculations for your enemies will be adjusted as such.
  133.     # Type 0 - Lowest level of all actors that have joined.
  134.     # Type 1 - Lowest level in the battle party.
  135.     # Type 2 - Average level of the battle party.
  136.     # Type 3 - Highest level of the battle party.
  137.     # Type 4 - Highest level of all actors that have joined.
  138.     # 判定敵人的默認等級。
  139.     # Type 0 - 取我方隊伍中的最低等級為敵人等級。
  140.     # Type 1 - 取戰鬥中的敵我方的最低等級為敵人等級。
  141.     # Type 2 - 取戰鬥中的敵我方的平均等級為敵人等級。
  142.     # Type 3 - 取戰鬥中的敵我方的最高等級為敵人等級。
  143.     # Type 4 - 取我方隊伍中的最高等級為敵人等級。
  144.     DEFAULT_LEVEL_TYPE = 4
  145.    
  146.     # If you want your enemies to have random +/- levels of some degree, change
  147.     # this number to something other than 0. This is the default value.
  148.     # 依照設置的數值隨機增減敵人能力值,若不需要則設為0。
  149.     RANDOM_FLUCTUATION = 10
  150.    
  151.     #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
  152.     # - Parameter Growth Settings -
  153.     #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
  154.     # Here, you adjust how much stats grow for enemies by default, including
  155.     # the formula used to calculate those stats. If you wish for enemies to
  156.     # have different growth settings, use notetags to change them.
  157.     #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
  158.     # These settings adjust the default growth rates (not the base stat formula)
  159.     # for each stat. These are the values that will exist for each enemy unless
  160.     # defined otherwise by the tags inside their noteboxes.
  161.     # 設定敵人的能力值增加量。(若在數據庫裡有設定敵人能力值則無視這裡的設定)
  162.     DEFAULT_GROWTH ={
  163.     # ParamID => [:類型, 每級增加值, 最大增加值],
  164.             0 => [:maxhp, 0.15,   50],
  165.             1 => [:maxmp, 0.10,   10],
  166.             2 => [  :atk, 0.05,    5],
  167.             3 => [  :def, 0.05,    5],
  168.             4 => [  :mat, 0.05,    5],
  169.             5 => [  :mdf, 0.05,    5],
  170.             6 => [  :agi, 0.05,    5],
  171.             7 => [  :luk, 0.05,    5],
  172.             8 => [ :gold, 0.15,   10],
  173.             9 => [  :exp, 0.05,   10],
  174.     } # Do not remove this.
  175.    
  176.     # The following hash will adjust each of the formulas for each base stat.
  177.     # Adjust them as you see fit but only if you know what you're doing.
  178.     #   base  - The base stat from the enemy database.
  179.     #   per   - Growth rate which has not been yet converted to a percent.
  180.     #   set   - Set growth rate. Modified
  181.     # Default:   "base * (1.00 + (level-1) * per) + (set * (level-1))"
  182.     STAT_FORMULA = "base * (1.00 + (level-1) * per) + (set * (level-1))"
  183.    
  184.     #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
  185.     # - Party Level to Enemy Level Action Conditions -
  186.     #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
  187.     # Setting the below to true will cause the Party Level requirement under
  188.     # Action Conditions in the Action Patterns list to become an Enemy Level
  189.     # requirement. The enemy must be at least the level or else it cannot use
  190.     # the listed action.
  191.     #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
  192.     PARTY_LEVEL_TO_ENEMY_LEVEL = false
  193.    
  194.   end # ENEMY_LEVEL
  195. end # YEA

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

  201. module YEA
  202.   module REGEXP
  203.   module USABLEITEM
  204.    
  205.     LEVEL_CHANGE = /<(?:ENEMY LEVEL|enemy level):[ ]([\+\-]\d+)>/i
  206.     LEVEL_RESET  = /<(?:ENEMY LEVEL RESET|enemy level reset)>/i
  207.    
  208.   end # USABLEITEM
  209.   module ENEMY
  210.    
  211.     LEVEL_TYPE = /<(?:LEVEL_TYPE|level type):[ ](\d+)>/i
  212.     LEVEL_MIN = /<(?:MIN_LEVEL|min level|minimum level):[ ](\d+)>/i
  213.     LEVEL_MAX = /<(?:MAX_LEVEL|max level|maximum level):[ ](\d+)>/i
  214.     LEVEL_SET = /<(?:SET_LEVEL|set level|permanent level):[ ](\d+)>/i
  215.    
  216.     LEVEL_RAND = /<(?:LEVEL_RANDOM|level random):[ ](\d+)>/i
  217.     GROWTH_PER = /<(.*):[ ]([\+\-]\d+)([%%])[ ](?:PER_LEVEL|per level)>/i
  218.     GROWTH_SET = /<(.*):[ ]([\+\-]\d+)[ ](?:PER_LEVEL|per level)>/i
  219.    
  220.     HIDE_LEVEL = /<(?:HIDE_LEVEL|hide level)>/i
  221.       
  222.   end # ENEMY
  223.   end # REGEXP
  224. end # YEA

  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_elv load_database; end
  247.   def self.load_database
  248.     load_database_elv
  249.     load_notetags_elv
  250.   end
  251.   
  252.   #--------------------------------------------------------------------------
  253.   # new method: load_notetags_elv
  254.   #--------------------------------------------------------------------------
  255.   def self.load_notetags_elv
  256.     groups = [$data_enemies, $data_skills, $data_items]
  257.     for group in groups
  258.       for obj in group
  259.         next if obj.nil?
  260.         obj.load_notetags_elv
  261.       end
  262.     end
  263.   end
  264.   
  265. end # DataManager

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

  269. class RPG::UsableItem < RPG::BaseItem
  270.   
  271.   #--------------------------------------------------------------------------
  272.   # public instance variables
  273.   #--------------------------------------------------------------------------
  274.   attr_accessor :level_change
  275.   attr_accessor :level_reset
  276.   
  277.   #--------------------------------------------------------------------------
  278.   # common cache: load_notetags_elv
  279.   #--------------------------------------------------------------------------
  280.   def load_notetags_elv
  281.     @level_change = 0
  282.     @level_reset = false
  283.     #---
  284.     self.note.split(/[\r\n]+/).each { |line|
  285.       case line
  286.       #---
  287.       when YEA::REGEXP::USABLEITEM::LEVEL_CHANGE
  288.         @level_change = $1.to_i
  289.       when YEA::REGEXP::USABLEITEM::LEVEL_RESET
  290.         @level_reset = true
  291.       end
  292.     } # self.note.split
  293.     #---
  294.   end
  295.   
  296. end # RPG::UsableItem

  297. #==============================================================================
  298. # ■ RPG::Enemy
  299. #==============================================================================

  300. class RPG::Enemy < RPG::BaseItem
  301.   
  302.   #--------------------------------------------------------------------------
  303.   # public instance variables
  304.   #--------------------------------------------------------------------------
  305.   attr_accessor :hide_level
  306.   attr_accessor :level_type
  307.   attr_accessor :level_min
  308.   attr_accessor :level_max
  309.   attr_accessor :level_rand
  310.   attr_accessor :level_growth
  311.   
  312.   #--------------------------------------------------------------------------
  313.   # common cache: load_notetags_elv
  314.   #--------------------------------------------------------------------------
  315.   def load_notetags_elv
  316.     @hide_level = false
  317.     @level_type = YEA::ENEMY_LEVEL::DEFAULT_LEVEL_TYPE
  318.     @level_min = 1
  319.     @level_max = YEA::ENEMY_LEVEL::MAX_LEVEL
  320.     @level_rand = YEA::ENEMY_LEVEL::RANDOM_FLUCTUATION
  321.     @level_growth = Marshal.load(Marshal.dump(YEA::ENEMY_LEVEL::DEFAULT_GROWTH))
  322.     #---
  323.     self.note.split(/[\r\n]+/).each { |line|
  324.       case line
  325.       #---
  326.       when YEA::REGEXP::ENEMY::HIDE_LEVEL
  327.         @hide_level = true
  328.       when YEA::REGEXP::ENEMY::LEVEL_TYPE
  329.         @level_type = $1.to_i
  330.       when YEA::REGEXP::ENEMY::LEVEL_MIN
  331.         @level_min = [$1.to_i, 1].max
  332.       when YEA::REGEXP::ENEMY::LEVEL_MAX
  333.         @level_max = [$1.to_i, YEA::ENEMY_LEVEL::MAX_LEVEL].min
  334.       when YEA::REGEXP::ENEMY::LEVEL_SET
  335.         @level_min = [[$1.to_i, 1].max, YEA::ENEMY_LEVEL::MAX_LEVEL].min
  336.         @level_max = [[$1.to_i, 1].max, YEA::ENEMY_LEVEL::MAX_LEVEL].min
  337.       when YEA::REGEXP::ENEMY::LEVEL_RAND
  338.         @level_rand = $1.to_i
  339.       #---
  340.       when YEA::REGEXP::ENEMY::GROWTH_PER
  341.         case $1.upcase
  342.         when "MAXHP", "MHP", "HP"
  343.           type = 0
  344.         when "MAXMP", "MMP", "MP", "MAXSP", "MSP", "SP"
  345.           type = 1
  346.         when "ATK", "ATTACK"
  347.           type = 2
  348.         when "DEF", "DEFENSE"
  349.           type = 3
  350.         when "MAT", "MAGIC ATTACK", "INT", "INTELLIGENCE", "SPI", "SPIRIT"
  351.           type = 4
  352.         when "MDF", "MAGIC DEFENSE", "RES", "RESISTANCE"
  353.           type = 5
  354.         when "AGI", "AGILITY"
  355.           type = 6
  356.         when "LUK", "LUCK"
  357.           type = 7
  358.         when "GOLD", "MONEY"
  359.           type = 8
  360.         when "EXP", "EXPERIENCE", "XP"
  361.           type = 9
  362.         else; next
  363.         end
  364.         @level_growth[type][1] = $2.to_i * 0.01
  365.       when YEA::REGEXP::ENEMY::GROWTH_SET
  366.         case $1.upcase
  367.         when "MAXHP", "MHP", "HP"
  368.           type = 0
  369.         when "MAXMP", "MMP", "MP", "MAXSP", "MSP", "SP"
  370.           type = 1
  371.         when "ATK", "ATTACK"
  372.           type = 2
  373.         when "DEF", "DEFENSE"
  374.           type = 3
  375.         when "MAT", "MAGIC ATTACK", "INT", "INTELLIGENCE", "SPI", "SPIRIT"
  376.           type = 4
  377.         when "MDF", "MAGIC DEFENSE", "RES", "RESISTANCE"
  378.           type = 5
  379.         when "AGI", "AGILITY"
  380.           type = 6
  381.         when "LUK", "LUCK"
  382.           type = 7
  383.         when "GOLD", "MONEY"
  384.           type = 8
  385.         when "EXP", "EXPERIENCE", "XP"
  386.           type = 9
  387.         else; next
  388.         end
  389.         @level_growth[type][2] = $2.to_i
  390.       end
  391.     } # self.note.split
  392.     #---
  393.   end
  394.   
  395. end # RPG::Enemy

  396. #==============================================================================
  397. # ■ Game_Battler
  398. #==============================================================================

  399. class Game_Battler < Game_BattlerBase
  400.   
  401.   #--------------------------------------------------------------------------
  402.   # alias method: item_user_effect
  403.   #--------------------------------------------------------------------------
  404.   alias game_battler_item_user_effect_elv item_user_effect
  405.   def item_user_effect(user, item)
  406.     game_battler_item_user_effect_elv(user, item)
  407.     apply_level_changes(item) if self.is_a?(Game_Enemy)
  408.   end
  409.   
  410. end # Game_Battler

  411. #==============================================================================
  412. # ■ Game_Enemy
  413. #==============================================================================

  414. class Game_Enemy < Game_Battler
  415.   
  416.   #--------------------------------------------------------------------------
  417.   # alias method: initialize
  418.   #--------------------------------------------------------------------------
  419.   alias game_enemy_initialize_elv initialize
  420.   def initialize(index, enemy_id)
  421.     game_enemy_initialize_elv(index, enemy_id)
  422.     create_init_level
  423.   end
  424.   
  425.   #--------------------------------------------------------------------------
  426.   # new method: level
  427.   #--------------------------------------------------------------------------
  428.   def level
  429.     create_init_level if @level.nil?
  430.     return @level
  431.   end
  432.   
  433.   #--------------------------------------------------------------------------
  434.   # new method: level=
  435.   #--------------------------------------------------------------------------
  436.   def level=(value)
  437.     create_init_level if @level.nil?
  438.     return if @level == value
  439.     hp_rate = self.hp.to_f / self.mhp.to_f
  440.     mp_rate = self.mp.to_f / [self.mmp, 1].max.to_f
  441.     #@level = [[value, 1].max, YEA::ENEMY_LEVEL::MAX_LEVEL].min
  442.     @level = [[value, @level].max, YEA::ENEMY_LEVEL::MAX_LEVEL].min
  443.     self.hp = (self.mhp * hp_rate).to_i
  444.     self.mp = (self.mmp * mp_rate).to_i
  445.   end
  446.   
  447.   #--------------------------------------------------------------------------
  448.   # new method: create_init_level
  449.   #--------------------------------------------------------------------------
  450.   def create_init_level
  451.     set_level_type
  452.     @hp = mhp
  453.     @mp = mmp
  454.   end
  455.   
  456.   #--------------------------------------------------------------------------
  457.   # new method: set_level_type
  458.   #--------------------------------------------------------------------------
  459.   def set_level_type
  460.     @level = $game_party.match_party_level(enemy.level_type)
  461.     @level += rand(enemy.level_rand+1)
  462.     @level -= rand(enemy.level_rand+1)
  463.     @level = [[@level, enemy.level_max].min, enemy.level_min].max
  464.   end
  465.   
  466.   #--------------------------------------------------------------------------
  467.   # alias method: transform
  468.   #--------------------------------------------------------------------------
  469.   alias game_enemy_transform_elv transform
  470.   def transform(enemy_id)
  471.     game_enemy_transform_elv(enemy_id)
  472.     create_init_level
  473.   end
  474.   
  475.   #--------------------------------------------------------------------------
  476.   # new method: apply_level_changes
  477.   #--------------------------------------------------------------------------
  478.   def apply_level_changes(item)
  479.     create_init_level if item.level_reset
  480.     self.level += item.level_change
  481.   end
  482.   
  483.   #--------------------------------------------------------------------------
  484.   # alias method: param_base
  485.   #--------------------------------------------------------------------------
  486.   alias game_enemy_param_base_elv param_base
  487.   def param_base(param_id)
  488.     base = game_enemy_param_base_elv(param_id)
  489.     per = enemy.level_growth[param_id][1]
  490.     set = enemy.level_growth[param_id][2]
  491.     total = eval(YEA::ENEMY_LEVEL::STAT_FORMULA)
  492.     return total.to_i
  493.   end
  494.   
  495.   #--------------------------------------------------------------------------
  496.   # alias method: exp
  497.   #--------------------------------------------------------------------------
  498.   alias game_enemy_exp_elv exp
  499.   def exp
  500.     base = game_enemy_exp_elv
  501.     per = enemy.level_growth[8][1]
  502.     set = enemy.level_growth[8][2]
  503.     total = eval(YEA::ENEMY_LEVEL::STAT_FORMULA)
  504.     return total.to_i
  505.   end
  506.   
  507.   #--------------------------------------------------------------------------
  508.   # alias method: gold
  509.   #--------------------------------------------------------------------------
  510.   alias game_enemy_gold_elv gold
  511.   def gold
  512.     base = game_enemy_gold_elv
  513.     per = enemy.level_growth[9][1]
  514.     set = enemy.level_growth[9][2]
  515.     total = eval(YEA::ENEMY_LEVEL::STAT_FORMULA)
  516.     return total.to_i
  517.   end
  518.   
  519.   #--------------------------------------------------------------------------
  520.   # alias method: name
  521.   #--------------------------------------------------------------------------
  522.   alias game_enemy_name_elv name
  523.   def name
  524.     text = game_enemy_name_elv
  525.     if add_level_name?
  526.       fmt = YEA::ENEMY_LEVEL::LEVEL_TEXT
  527.       text = sprintf(fmt, @level.group, text)
  528.     end
  529.     return text
  530.   end
  531.   
  532.   #--------------------------------------------------------------------------
  533.   # new method: add_level_name?
  534.   #--------------------------------------------------------------------------
  535.   def add_level_name?
  536.     if $imported["YEA-EnemyTargetInfo"] && show_info_param?
  537.       return true
  538.     end
  539.     return false if enemy.hide_level
  540.     return true
  541.   end
  542.   
  543.   #--------------------------------------------------------------------------
  544.   # overwrite method: conditions_met_party_level?
  545.   #--------------------------------------------------------------------------
  546.   if YEA::ENEMY_LEVEL::PARTY_LEVEL_TO_ENEMY_LEVEL
  547.   def conditions_met_party_level?(param1, param2)
  548.     return @level >= param1
  549.   end
  550.   end
  551.   
  552. end # Game_Enemy

  553. #==============================================================================
  554. # ■ Game_Party
  555. #==============================================================================

  556. class Game_Party < Game_Unit
  557.   
  558.   #--------------------------------------------------------------------------
  559.   # new method: match_party_level
  560.   #--------------------------------------------------------------------------
  561.   def match_party_level(level_type)
  562.     case level_type
  563.     when 0; return all_lowest_level
  564.     when 1; return lowest_level
  565.     when 2; return average_level
  566.     when 3; return highest_level
  567.     else;   return all_highest_level
  568.     end
  569.   end
  570.   
  571.   #--------------------------------------------------------------------------
  572.   # new method: all_lowest_level
  573.   #--------------------------------------------------------------------------
  574.   def all_lowest_level
  575.     lv = all_members.collect {|actor| actor.level }.min
  576.     return lv
  577.   end
  578.   
  579.   #--------------------------------------------------------------------------
  580.   # new method: lowest_level
  581.   #--------------------------------------------------------------------------
  582.   def lowest_level
  583.     lv = members.collect {|actor| actor.level }.min
  584.     return lv
  585.   end
  586.   
  587.   #--------------------------------------------------------------------------
  588.   # new method: average_level
  589.   #--------------------------------------------------------------------------
  590.   def average_level
  591.     lv = 0
  592.     for member in all_members; lv += member.level; end
  593.     lv /= all_members.size
  594.     return lv
  595.   end
  596.   
  597.   #--------------------------------------------------------------------------
  598.   # overwrite method: highest_level
  599.   #--------------------------------------------------------------------------
  600.   def highest_level
  601.     lv = members.collect {|actor| actor.level }.max
  602.     return lv
  603.   end
  604.   
  605.   #--------------------------------------------------------------------------
  606.   # all method: all_highest_level
  607.   #--------------------------------------------------------------------------
  608.   def all_highest_level
  609.     lv = all_members.collect {|actor| actor.level }.max
  610.     return lv
  611.   end
  612.   
  613. end # Game_Party

  614. #==============================================================================
  615. #
  616. # ▼ End of File
  617. #
  618. #==============================================================================
复制代码


Enemy Target Info v1.02
  1. #==============================================================================
  2. #
  3. # ▼ Yanfly Engine Ace - Enemy Target Info v1.02
  4. # -- Last Updated: 2012.01.01
  5. # -- Level: Normal
  6. # -- Requires: YEA - Ace Battle Engine v1.10+.
  7. #
  8. #==============================================================================

  9. $imported = {} if $imported.nil?
  10. $imported["YEA-EnemyTargetInfo"] = true

  11. #==============================================================================
  12. # ▼ Updates
  13. # =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
  14. # 2012.01.01 - Bug Fixed: <scan info: all> didn't work properly.
  15. # 2011.12.30 - Bug Fixed: Crash when using Ace Battle Engine's F8 debug.
  16. # 2011.12.29 - Started Script and Finished.
  17. #
  18. #==============================================================================
  19. # ▼ Introduction
  20. # =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
  21. # The enemy target info window can be activated in battle to show enemy data
  22. # at the bottom of the screen. Information can be revealed straight from the
  23. # start or requires the player to actively reveal the information on their own
  24. # through either defeating the enemies, using skills on them, or scanning them
  25. # in various ways produced by the script.
  26. #
  27. #==============================================================================
  28. # ▼ Instructions
  29. # =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
  30. # To install this script, open up your script editor and copy/paste this script
  31. # to an open slot below ▼ Materials/素材 but above ▼ Main. Remember to save.
  32. #
  33. # -----------------------------------------------------------------------------
  34. # Skill Notetags - These notetags go in the skill notebox in the database.
  35. # 使用技能來顯示敵人資訊(技能備註欄)
  36. # -----------------------------------------------------------------------------
  37. # <scan info: all>
  38. # This will scan the target enemy of all properties that are shown in the
  39. # comparison windows. Unless the enemy has a permanent hide tag, all of the
  40. # data becomes available.
  41. # 顯示敵人所有資訊,設置隱藏的能力除外。
  42. #
  43. # <scan info: parameters>
  44. # This will scan the target enemy's parameters and reveal them to the player
  45. # unless the enemy has a permanent hide tag.
  46. # 顯示基本能力值。
  47. #
  48. # <scan info: elements>
  49. # This will scan the target enemy's elemental resistances and reveal them to
  50. # the player unless the enemy has a permanent hide tag.
  51. # 顯示特徵。
  52. #
  53. # <scan info: states>
  54. # This will scan the target enemy's state resistances and reveal them to the
  55. # player unless the enemy has a permanent hide tag.
  56. # 顯示獲得的異常、強弱化狀態。
  57. #
  58. # <scan element: x>
  59. # <scan element: x, x>
  60. # This will scan the target enemy's elemental resistance for element x. Insert
  61. # multiple of these tags to scan more elements. If you have the automatic scan
  62. # element setting on in the module, all skills and items will automatically
  63. # scan whatever element the skill or item deals damage with innately.
  64. #
  65. # <scan state: x>
  66. # <scan state: x, x>
  67. # This will scan the target enemy's state resistance for element x. Insert
  68. # multiple of these tags to scan more states. If you have the automatic scan
  69. # state setting on in the module, all skills and items will automatically
  70. # scan whatever state the skill or item inflicts innately.
  71. #
  72. # -----------------------------------------------------------------------------
  73. # Item Notetags - These notetags go in the item notebox in the database.
  74. # 使用道具來顯示敵人資訊(道具備註欄)
  75. # -----------------------------------------------------------------------------
  76. # <scan info: all>
  77. # This will scan the target enemy of all properties that are shown in the
  78. # comparison windows. Unless the enemy has a permanent hide tag, all of the
  79. # data becomes available.
  80. #
  81. # <scan info: parameters>
  82. # This will scan the target enemy's parameters and reveal them to the player
  83. # unless the enemy has a permanent hide tag.
  84. #
  85. # <scan info: elements>
  86. # This will scan the target enemy's elemental resistances and reveal them to
  87. # the player unless the enemy has a permanent hide tag.
  88. #
  89. # <scan info: states>
  90. # This will scan the target enemy's state resistances and reveal them to the
  91. # player unless the enemy has a permanent hide tag.
  92. #
  93. # <scan element: x>
  94. # <scan element: x, x>
  95. # This will scan the target enemy's elemental resistance for element x. Insert
  96. # multiple of these tags to scan more elements. If you have the automatic scan
  97. # element setting on in the module, all skills and items will automatically
  98. # scan whatever element the skill or item deals damage with innately.
  99. #
  100. # <scan state: x>
  101. # <scan state: x, x>
  102. # This will scan the target enemy's state resistance for element x. Insert
  103. # multiple of these tags to scan more states. If you have the automatic scan
  104. # state setting on in the module, all skills and items will automatically
  105. # scan whatever state the skill or item inflicts innately.
  106. #
  107. # -----------------------------------------------------------------------------
  108. # Enemy Notetags - These notetags go in the enemies notebox in the database.
  109. # 設置敵人的顯示資訊方式(敵人備註欄)
  110. # -----------------------------------------------------------------------------
  111. # <hide info: all>
  112. # <show info: all>
  113. # These notetags will set the enemy to either always hide all of their battle
  114. # information or to always show all of their info. The tags will override
  115. # each other if both are used simultaneously.
  116. # <hide info: all> 隱藏所有資訊
  117. # <show info: all> 顯示所有資訊
  118. #
  119. # <hide info: parameters>
  120. # <show info: parameters>
  121. # These notetags will set the enemy to either always hide their parameter
  122. # information or to always show their parameter info. The tags will override
  123. # each other if both are used simultaneously.
  124. #
  125. # <hide info: elements>
  126. # <show info: elements>
  127. # These notetags will set the enemy to either always hide their element
  128. # information or to always show their element info. The tags will override
  129. # each other if both are used simultaneously.
  130. #
  131. # <hide info: states>
  132. # <show info: states>
  133. # These notetags will set the enemy to either always hide their state
  134. # information or to always show their state info. The tags will override
  135. # each other if both are used simultaneously.
  136. #
  137. #==============================================================================
  138. # ▼ Compatibility
  139. # =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
  140. # This script is made strictly for RPG Maker VX Ace. It is highly unlikely that
  141. # it will run with RPG Maker VX without adjusting.
  142. #
  143. # This script requires Yanfly Engine Ace - Ace Battle Engine v1.10+ and the
  144. # script must be placed under Ace Battle Engine in the script listing.
  145. #
  146. #==============================================================================

  147. module YEA
  148.   module ENEMY_INFO
  149.    
  150.     #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
  151.     # - Info Window Settings -
  152.     #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
  153.     # These are the general settings revolving around the info windows shown in
  154.     # battle such as the sound effect played, the button used to open up the
  155.     # menus, the page orders, and the info text.
  156.     #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
  157.     INFO_SFX = RPG::SE.new("Book2", 80, 150) # SFX played for Info Window.
  158.    
  159.     # Button used to toggle the Info Window. Keep in mind that L and R are
  160.     # used for moving between pages so it's best to not use those.
  161.     # 切換敵人資訊顯示頁面的按鈕。
  162.     # (L和R用於切換種類頁面,因此最好不要使用它們。)
  163.     INFO_BUTTON = :SHIFT
  164.    
  165.     # This sets the page order in which data is displayed for the player. The
  166.     # player can switch pages by pressing L or R.
  167.     # 設置敵人資訊顯示頁面的種類顯示順序,用L和R來切換。
  168.     PAGE_ORDER =[
  169.       :parameters,
  170.       :elements,
  171.       :states,
  172.     ] # Do not remove this.
  173.    
  174.     # If testplay is being used, reveal all battle information for non-hidden
  175.     # enemy information?
  176.     SHOW_DEBUG_ALL = true
  177.    
  178.     # The follow adjusts the settings regarding the help window. If this
  179.     # setting is on, the the help info will be displayed.
  180.     SHOW_HELP_INFO = true
  181.     HELP_WINDOW_Y  = 72    # Y location of the help window.
  182.    
  183.     # This is the text displayed to let the player know how to activate and
  184.     # show the info windows.
  185.     HELP_INFO_SHOW = "\e}Press \eC[4]SHIFT\eC[0] to show target info."
  186.    
  187.     # This is the text displayed to let the player know how to switch between
  188.     # pages for the info windows.
  189.     HELP_INFO_SWITCH = "\e}Press \eC[4]L\eC[0] or \eC[4]R\eC[0] to switch info."
  190.    
  191.     #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
  192.     # - General Page Settings -
  193.     #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
  194.     # The general page shows the stats of the battlers. The player can compare
  195.     # and contrast the stats of both battlers relative to each other. The
  196.     # settings here adjust the font size, the text displayed if parameters are
  197.     # hidden, and whether or not to show parameters by default?
  198.     #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
  199.     PARAM_FONT_SIZE     = 20       # Font size used for parameters.
  200.     HIDDEN_PARAM_TEXT   = "???"    # Text used if parameters are hidden.
  201.    
  202.     # Show the parameters by default? If false, the enemy must be defeated once
  203.     # or scanned to show the those parameters.
  204.     # 設置為 false 時則需要擊破敵人一次才會顯示敵人資訊。
  205.     DEFAULT_SHOW_PARAMS = true
  206.    
  207.     #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
  208.     # - Element Page Settings -
  209.     #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
  210.     # The elements page shows the elemental resistances of the battlers. The
  211.     # player can compare and contrast the resistances relative to each other.
  212.     #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
  213.     ELE_FONT_SIZE   = 20       # Font size used for element resistances.
  214.     HIDDEN_ELE_TEXT = "???"    # Text used if element resistances are hidden.
  215.     SHOWN_ELEMENTS  = [3..14]  # 會顯示出來的屬性ID。
  216.     ELEMENT_ICONS   ={         # Contains element icon information.
  217.     # Element ID => 圖標ID,
  218.                3 =>  7563, # 火
  219.                4 =>  7566, # 水
  220.                5 =>  7568, # 風
  221.                6 =>  7567, # 地
  222.                7 =>  7569, # 光
  223.                8 =>  7570, # 闇
  224.                9 =>     2, # 斬
  225.               10 =>    20, # 打
  226.               11 =>     4, # 突
  227.               12 =>    11, # 爪
  228.               13 =>    16, # 射
  229.               14 =>    88, # 幻
  230.     } # Do not remove this.
  231.    
  232.     # Show the elemental resistances by default? If false, a skill with the
  233.     # specific element must be used on the enemy to reveal the element data if
  234.     # the AUTO_SCAN_ELEMENT setting is set to true.
  235.     # 設置為 true 時,則需要使用該屬性技能才會顯示敵人該屬性的抗性數值。
  236.     # 例如:使用 火屬性 技能時敵人才會顯示 火屬性 的抗性數值。
  237.     DEFAULT_SHOW_ELEMENTS = false
  238.    
  239.     # If this is set to true, then skills with elemental properties will
  240.     # automatically scan the specific elemental resistance of that enemy type
  241.     # when used against that enemy.
  242.     # 設置為 true 時,擁有該屬性技能時會自動顯示出敵人該屬性的抗性數值。
  243.     AUTO_SCAN_ELEMENT = true
  244.    
  245.     #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
  246.     # - States Page Settings -
  247.     #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
  248.     # The states page shows the state resistances of the battlers. The player
  249.     # can compare and contrast the resistances relative to each other.
  250.     #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
  251.     STATE_FONT_SIZE   = 20     # Font size used for state resistances.
  252.     HIDDEN_STATE_TEXT = "???"  # Text used if state resistances are hidden.
  253.     SHOWN_STATES = [2..29]     # 會顯示出來的狀態ID,最多可以顯示8個。
  254.    
  255.     # Show the state resistances by default? If false, a skill with the
  256.     # specific state must be used on the enemy to reveal the element data if
  257.     # the AUTO_SCAN_STATES setting is set to true.
  258.     # 設置為 true 時,則需要使用擁有附加該狀態的技能時敵人才會顯示該狀態的抗性數值。
  259.     # 例如:使用有附加狀態 睡眠 技能時,敵人才會顯示 睡眠 狀態的抗性數值。
  260.     DEFAULT_SHOW_STATES = false
  261.    
  262.     # If this is set to true, then skills with state applying properties will
  263.     # automatically scan the specific state resistance of that enemy type
  264.     # when used against that enemy.
  265.     # 設置為 true 時,擁有附加該狀態的技能時會自動顯示出敵人該狀態的抗性數值。
  266.     AUTO_SCAN_STATES = true
  267.    
  268.   end # ENEMY_INFO
  269. end # YEA

  270. #==============================================================================
  271. # ▼ Editting anything past this point may potentially result in causing
  272. # computer damage, incontinence, explosion of user's head, coma, death, and/or
  273. # halitosis so edit at your own risk.
  274. #==============================================================================

  275. if $imported["YEA-BattleEngine"]

  276. module YEA
  277.   module ENEMY_INFO
  278.     module_function
  279.     #--------------------------------------------------------------------------
  280.     # convert_integer_array
  281.     #--------------------------------------------------------------------------
  282.     def convert_integer_array(array)
  283.       result = []
  284.       array.each { |i|
  285.         case i
  286.         when Range; result |= i.to_a
  287.         when Integer; result |= [i]
  288.         end }
  289.       return result
  290.     end
  291.     #--------------------------------------------------------------------------
  292.     # converted_contants
  293.     #--------------------------------------------------------------------------
  294.     SHOWN_ELEMENTS = convert_integer_array(SHOWN_ELEMENTS)
  295.     SHOWN_STATES = convert_integer_array(SHOWN_STATES)
  296.   end # ENEMY_INFO
  297.   module REGEXP
  298.   module ENEMY
  299.    
  300.     HIDE_INFO = /<(?:HIDE_INFO|hide info):[ ](.*)>/i
  301.     SHOW_INFO = /<(?:SHOW_INFO|show info):[ ](.*)>/i
  302.    
  303.   end # ENEMY
  304.   module USABLEITEM
  305.    
  306.     SCAN_INFO = /<(?:SCAN_INFO|scan info):[ ](.*)>/i
  307.     SCAN_ELE = /<(?:SCAN_ELE|scan ele|scan element):[ ]*(\d+(?:\s*,\s*\d+)*)>/i
  308.     SCAN_STATE = /<(?:SCAN_STATE|scan state):[ ]*(\d+(?:\s*,\s*\d+)*)>/i
  309.    
  310.   end # USABLEITEM
  311.   end # REGEXP
  312. end # YEA

  313. #==============================================================================
  314. # ■ Icon
  315. #==============================================================================

  316. module Icon
  317.   
  318.   #--------------------------------------------------------------------------
  319.   # self.element
  320.   #--------------------------------------------------------------------------
  321.   def self.element(id)
  322.     return 0 unless YEA::ENEMY_INFO::ELEMENT_ICONS.include?(id)
  323.     return YEA::ENEMY_INFO::ELEMENT_ICONS[id]
  324.   end
  325.    
  326. end # Icon

  327. #==============================================================================
  328. # ■ Numeric
  329. #==============================================================================

  330. class Numeric
  331.   
  332.   #--------------------------------------------------------------------------
  333.   # new method: group_digits
  334.   #--------------------------------------------------------------------------
  335.   unless $imported["YEA-CoreEngine"]
  336.   def group; return self.to_s; end
  337.   end # $imported["YEA-CoreEngine"]
  338.    
  339. end # Numeric

  340. #==============================================================================
  341. # ■ DataManager
  342. #==============================================================================

  343. module DataManager
  344.   
  345.   #--------------------------------------------------------------------------
  346.   # alias method: load_database
  347.   #--------------------------------------------------------------------------
  348.   class <<self; alias load_database_etin load_database; end
  349.   def self.load_database
  350.     load_database_etin
  351.     load_notetags_etin
  352.   end
  353.   
  354.   #--------------------------------------------------------------------------
  355.   # new method: load_notetags_etin
  356.   #--------------------------------------------------------------------------
  357.   def self.load_notetags_etin
  358.     groups = [$data_enemies, $data_skills, $data_items]
  359.     for group in groups
  360.       for obj in group
  361.         next if obj.nil?
  362.         obj.load_notetags_etin
  363.       end
  364.     end
  365.   end
  366.   
  367. end # DataManager

  368. #==============================================================================
  369. # ■ RPG::Enemy
  370. #==============================================================================

  371. class RPG::Enemy < RPG::BaseItem
  372.   
  373.   #--------------------------------------------------------------------------
  374.   # public instance variables
  375.   #--------------------------------------------------------------------------
  376.   attr_accessor :hide_info
  377.   attr_accessor :show_info
  378.   
  379.   #--------------------------------------------------------------------------
  380.   # common cache: load_notetags_etin
  381.   #--------------------------------------------------------------------------
  382.   def load_notetags_etin
  383.     @hide_info = []
  384.     @show_info = []
  385.     #---
  386.     self.note.split(/[\r\n]+/).each { |line|
  387.       case line
  388.       #---
  389.       when YEA::REGEXP::ENEMY::HIDE_INFO
  390.         case $1.upcase
  391.         when "PARAM", "PARAMETER", "PARAMETERS"
  392.           @hide_info.push(:param)
  393.           @show_info.delete(:param)
  394.         when "ELE", "ELEMENT", "ELEMENTS"
  395.           @hide_info.push(:ele)
  396.           @show_info.delete(:ele)
  397.         when "STATE", "STATES"
  398.           @hide_info.push(:state)
  399.           @show_info.delete(:state)
  400.         when "ALL"
  401.           @hide_info.push(:all)
  402.           @show_info.delete(:all)
  403.         end
  404.       #---
  405.       when YEA::REGEXP::ENEMY::SHOW_INFO
  406.         case $1.upcase
  407.         when "PARAM", "PARAMETER", "PARAMETERS"
  408.           @show_info.push(:param)
  409.           @hide_info.delete(:param)
  410.         when "ELE", "ELEMENT", "ELEMENTS"
  411.           @show_info.push(:ele)
  412.           @hide_info.delete(:ele)
  413.         when "STATE", "STATES"
  414.           @show_info.push(:state)
  415.           @hide_info.delete(:state)
  416.         when "ALL"
  417.           @show_info.push(:all)
  418.           @hide_info.delete(:all)
  419.         end
  420.       #---
  421.       end
  422.     } # self.note.split
  423.     #---
  424.   end
  425.   
  426. end # RPG::Enemy

  427. #==============================================================================
  428. # ■ RPG::UsableItem
  429. #==============================================================================

  430. class RPG::UsableItem < RPG::BaseItem
  431.   
  432.   #--------------------------------------------------------------------------
  433.   # public instance variables
  434.   #--------------------------------------------------------------------------
  435.   attr_accessor :scan_info
  436.   attr_accessor :scan_ele
  437.   attr_accessor :scan_state
  438.   
  439.   #--------------------------------------------------------------------------
  440.   # common cache: load_notetags_etin
  441.   #--------------------------------------------------------------------------
  442.   def load_notetags_etin
  443.     @scan_info = []
  444.     @scan_ele = []
  445.     @scan_state = []
  446.     #---
  447.     self.note.split(/[\r\n]+/).each { |line|
  448.       case line
  449.       #---
  450.       when YEA::REGEXP::USABLEITEM::SCAN_INFO
  451.         case $1.upcase
  452.         when "PARAM", "PARAMETER", "PARAMETERS"
  453.           @scan_info.push(:param)
  454.         when "ELE", "ELEMENT", "ELEMENTS"
  455.           @scan_info.push(:ele)
  456.         when "STATE", "STATES"
  457.           @scan_info.push(:state)
  458.         when "ALL"
  459.           @scan_info.push(:all)
  460.         end
  461.       #---
  462.       when YEA::REGEXP::USABLEITEM::SCAN_ELE
  463.         $1.scan(/\d+/).each { |num|
  464.         @scan_ele.push(num.to_i) if num.to_i > 0 }
  465.       when YEA::REGEXP::USABLEITEM::SCAN_STATE
  466.         $1.scan(/\d+/).each { |num|
  467.         @scan_state.push(num.to_i) if num.to_i > 0 }
  468.       #---
  469.       end
  470.     } # self.note.split
  471.     #---
  472.     @scan_ele.push(self.damage.element_id) if YEA::ENEMY_INFO::AUTO_SCAN_ELEMENT
  473.     if YEA::ENEMY_INFO::AUTO_SCAN_STATES
  474.       for effect in @effects
  475.         next unless effect.code == 21
  476.         next unless effect.data_id > 0
  477.         @scan_state.push(effect.data_id)
  478.       end
  479.     end
  480.   end
  481.   
  482. end # RPG::UsableItem

  483. #==============================================================================
  484. # ■ Game_System
  485. #==============================================================================

  486. class Game_System
  487.   
  488.   #--------------------------------------------------------------------------
  489.   # alias method: initialize
  490.   #--------------------------------------------------------------------------
  491.   alias game_system_initialize_eti initialize
  492.   def initialize
  493.     game_system_initialize_eti
  494.     initialize_enemy_info_data
  495.   end
  496.   
  497.   #--------------------------------------------------------------------------
  498.   # new method: initialize_enemy_info_data
  499.   #--------------------------------------------------------------------------
  500.   def initialize_enemy_info_data
  501.     @param_enemies = [] if @param_enemies.nil?
  502.     @ele_enemies = {} if @ele_enemies.nil?
  503.     @state_enemies = {} if @state_enemies.nil?
  504.   end
  505.   
  506.   #--------------------------------------------------------------------------
  507.   # new method: info_param_enemies
  508.   #--------------------------------------------------------------------------
  509.   def info_param_enemies
  510.     initialize_enemy_info_data if @param_enemies.nil?
  511.     return @param_enemies
  512.   end
  513.   
  514.   #--------------------------------------------------------------------------
  515.   # new method: add_info_param_enemies
  516.   #--------------------------------------------------------------------------
  517.   def add_info_param_enemies(id)
  518.     initialize_enemy_info_data if @param_enemies.nil?
  519.     @param_enemies.push(id) unless @param_enemies.include?(id)
  520.   end
  521.   
  522.   #--------------------------------------------------------------------------
  523.   # new method: info_ele_enemies
  524.   #--------------------------------------------------------------------------
  525.   def info_ele_enemies(ele_id)
  526.     initialize_enemy_info_data if @ele_enemies.nil?
  527.     @ele_enemies[ele_id] = [] if @ele_enemies[ele_id].nil?
  528.     return @ele_enemies[ele_id]
  529.   end
  530.   
  531.   #--------------------------------------------------------------------------
  532.   # new method: add_info_ele_enemies
  533.   #--------------------------------------------------------------------------
  534.   def add_info_ele_enemies(ele_id, id)
  535.     initialize_enemy_info_data if @ele_enemies.nil?
  536.     @ele_enemies[ele_id] = [] if @ele_enemies[ele_id].nil?
  537.     @ele_enemies[ele_id].push(id) unless @ele_enemies[ele_id].include?(id)
  538.   end
  539.   
  540.   #--------------------------------------------------------------------------
  541.   # new method: info_state_enemies
  542.   #--------------------------------------------------------------------------
  543.   def info_state_enemies(state_id)
  544.     initialize_enemy_info_data if @state_enemies.nil?
  545.     @state_enemies[state_id] = [] if @state_enemies[state_id].nil?
  546.     return @state_enemies[state_id]
  547.   end
  548.   
  549.   #--------------------------------------------------------------------------
  550.   # new method: add_info_state_enemies
  551.   #--------------------------------------------------------------------------
  552.   def add_info_state_enemies(state_id, id)
  553.     initialize_enemy_info_data if @state_enemies.nil?
  554.     @state_enemies[state_id] = [] if @state_enemies[state_id].nil?
  555.     @state_enemies[state_id].push(id) if !@state_enemies[state_id].include?(id)
  556.   end
  557.   
  558. end # Game_System

  559. #==============================================================================
  560. # ■ Game_BattlerBase
  561. #==============================================================================

  562. class Game_BattlerBase
  563.   
  564.   #--------------------------------------------------------------------------
  565.   # new method: show_info_param?
  566.   #--------------------------------------------------------------------------
  567.   def show_info_param?
  568.     return true if YEA::ENEMY_INFO::SHOW_DEBUG_ALL && ($TEST || $BTEST)
  569.     return YEA::ENEMY_INFO::DEFAULT_SHOW_PARAMS
  570.   end
  571.   
  572.   #--------------------------------------------------------------------------
  573.   # new method: show_info_element?
  574.   #--------------------------------------------------------------------------
  575.   def show_info_element?(ele_id)
  576.     return true if YEA::ENEMY_INFO::SHOW_DEBUG_ALL && ($TEST || $BTEST)
  577.     return YEA::ENEMY_INFO::DEFAULT_SHOW_ELEMENTS
  578.   end
  579.   
  580.   #--------------------------------------------------------------------------
  581.   # new method: show_info_state?
  582.   #--------------------------------------------------------------------------
  583.   def show_info_state?(state_id)
  584.     return true if YEA::ENEMY_INFO::SHOW_DEBUG_ALL && ($TEST || $BTEST)
  585.     return YEA::ENEMY_INFO::DEFAULT_SHOW_STATES
  586.   end
  587.   
  588. end # Game_BattlerBase

  589. #==============================================================================
  590. # ■ Game_Battler
  591. #==============================================================================

  592. class Game_Battler < Game_BattlerBase
  593.   
  594.   #--------------------------------------------------------------------------
  595.   # alias method: die
  596.   #--------------------------------------------------------------------------
  597.   alias game_battler_die_eti die
  598.   def die
  599.     game_battler_die_eti
  600.     return if actor?
  601.     $game_system.add_info_param_enemies(@enemy_id)
  602.   end
  603.   
  604.   #--------------------------------------------------------------------------
  605.   # alias method: item_user_effect
  606.   #--------------------------------------------------------------------------
  607.   alias game_battler_item_user_effect_eti item_user_effect
  608.   def item_user_effect(user, item)
  609.     game_battler_item_user_effect_eti(user, item)
  610.     scan_enemy_info_effect(user, item)
  611.   end
  612.   
  613.   #--------------------------------------------------------------------------
  614.   # new method: scan_enemy_info_effect
  615.   #--------------------------------------------------------------------------
  616.   def scan_enemy_info_effect(user, item)
  617.     return if self.actor?
  618.     return unless user.actor?
  619.     #---
  620.     for info in item.scan_info
  621.       case info
  622.       when :all
  623.         $game_system.add_info_param_enemies(@enemy_id)
  624.         for i in 0...$data_system.elements.size
  625.           $game_system.add_info_ele_enemies(i, @enemy_id)
  626.         end
  627.         for i in 0...$data_states.size
  628.           $game_system.add_info_state_enemies(i, @enemy_id)
  629.         end
  630.       when :param
  631.         $game_system.add_info_param_enemies(@enemy_id)
  632.       when :ele
  633.         for i in 0...$data_system.elements.size
  634.           $game_system.add_info_ele_enemies(i, @enemy_id)
  635.         end
  636.       when :state
  637.         for i in 0...$data_states.size
  638.           $game_system.add_info_state_enemies(i, @enemy_id)
  639.         end
  640.       end
  641.     end
  642.     #---
  643.     for ele_id in item.scan_ele
  644.       $game_system.add_info_ele_enemies(ele_id, @enemy_id)
  645.     end
  646.     for state_id in item.scan_state
  647.       $game_system.add_info_state_enemies(state_id, @enemy_id)
  648.     end
  649.   end
  650.   
  651. end # Game_Battler

  652. #==============================================================================
  653. # ■ Game_Actor
  654. #==============================================================================

  655. class Game_Actor < Game_Battler
  656.   
  657.   #--------------------------------------------------------------------------
  658.   # new method: show_info_param?
  659.   #--------------------------------------------------------------------------
  660.   def show_info_param?
  661.     return true
  662.   end
  663.   
  664.   #--------------------------------------------------------------------------
  665.   # new method: show_info_element?
  666.   #--------------------------------------------------------------------------
  667.   def show_info_element?(ele_id)
  668.     return true
  669.   end
  670.   
  671.   #--------------------------------------------------------------------------
  672.   # new method: show_info_state?
  673.   #--------------------------------------------------------------------------
  674.   def show_info_state?(state_id)
  675.     return true
  676.   end
  677.   
  678. end # Game_Actor

  679. #==============================================================================
  680. # ■ Game_Enemy
  681. #==============================================================================

  682. class Game_Enemy < Game_Battler
  683.   
  684.   #--------------------------------------------------------------------------
  685.   # new method: show_info_param?
  686.   #--------------------------------------------------------------------------
  687.   def show_info_param?
  688.     return false if enemy.hide_info.include?(:param)
  689.     return false if enemy.hide_info.include?(:all)
  690.     return true if enemy.show_info.include?(:param)
  691.     return true if enemy.show_info.include?(:all)
  692.     return true if $game_system.info_param_enemies.include?(@enemy_id)
  693.     return super
  694.   end
  695.   
  696.   #--------------------------------------------------------------------------
  697.   # new method: show_info_element?
  698.   #--------------------------------------------------------------------------
  699.   def show_info_element?(ele_id)
  700.     return false if enemy.hide_info.include?(:ele)
  701.     return false if enemy.hide_info.include?(:all)
  702.     return true if enemy.show_info.include?(:ele)
  703.     return true if enemy.show_info.include?(:all)
  704.     return true if $game_system.info_ele_enemies(ele_id).include?(@enemy_id)
  705.     return super(ele_id)
  706.   end
  707.   
  708.   #--------------------------------------------------------------------------
  709.   # new method: show_info_state?
  710.   #--------------------------------------------------------------------------
  711.   def show_info_state?(state_id)
  712.     return false if enemy.hide_info.include?(:state)
  713.     return false if enemy.hide_info.include?(:all)
  714.     return true if enemy.show_info.include?(:state)
  715.     return true if enemy.show_info.include?(:all)
  716.     return true if $game_system.info_state_enemies(state_id).include?(@enemy_id)
  717.     return super(state_id)
  718.   end
  719.   
  720. end # Game_Enemy

  721. #==============================================================================
  722. # ■ Window_Comparison
  723. #==============================================================================

  724. class Window_Comparison < Window_Base
  725.   
  726.   #--------------------------------------------------------------------------
  727.   # initialize
  728.   #--------------------------------------------------------------------------
  729.   def initialize(type)
  730.     dx = type == :actor ? 0 : Graphics.width / 2
  731.     dh = fitting_height(4)
  732.     super(dx, Graphics.height - dh, Graphics.width / 2, dh)
  733.     @button = YEA::ENEMY_INFO::INFO_BUTTON
  734.     @battler = nil
  735.     @type = type
  736.     @page = 0
  737.     hide
  738.   end
  739.   
  740.   #--------------------------------------------------------------------------
  741.   # update
  742.   #--------------------------------------------------------------------------
  743.   def update
  744.     super
  745.     return unless @type == :enemy
  746.     process_enemy_window_input
  747.     return unless self.visible
  748.     reveal(SceneManager.scene.enemy_window.enemy)
  749.   end
  750.   
  751.   #--------------------------------------------------------------------------
  752.   # process_enemy_window_input
  753.   #--------------------------------------------------------------------------
  754.   def process_enemy_window_input
  755.     return unless SceneManager.scene_is?(Scene_Battle)
  756.     return unless SceneManager.scene.enemy_window.active
  757.     return if SceneManager.scene.enemy_window.select_all?
  758.     SceneManager.scene.toggle_enemy_info if Input.trigger?(@button)
  759.     return unless self.visible
  760.     SceneManager.scene.enemy_info_page_up if Input.trigger?(:L)
  761.     SceneManager.scene.enemy_info_page_down if Input.trigger?(:R)
  762.   end
  763.   
  764.   #--------------------------------------------------------------------------
  765.   # reveal
  766.   #--------------------------------------------------------------------------
  767.   def reveal(battler)
  768.     return if @battler == battler
  769.     @battler = battler
  770.     refresh
  771.     show
  772.   end
  773.   
  774.   #--------------------------------------------------------------------------
  775.   # clear
  776.   #--------------------------------------------------------------------------
  777.   def clear
  778.     @battler = nil
  779.     @page = 0
  780.     hide
  781.   end
  782.   
  783.   #--------------------------------------------------------------------------
  784.   # actor
  785.   #--------------------------------------------------------------------------
  786.   def actor; return BattleManager.actor; end
  787.   
  788.   #--------------------------------------------------------------------------
  789.   # enemy
  790.   #--------------------------------------------------------------------------
  791.   def enemy; return SceneManager.scene.enemy_window.enemy; end
  792.   
  793.   #--------------------------------------------------------------------------
  794.   # page_up
  795.   #--------------------------------------------------------------------------
  796.   def page_up
  797.     @page = @page == 0 ? YEA::ENEMY_INFO::PAGE_ORDER.size - 1 : @page - 1
  798.     refresh
  799.   end
  800.   
  801.   #--------------------------------------------------------------------------
  802.   # page_down
  803.   #--------------------------------------------------------------------------
  804.   def page_down
  805.     @page = @page == YEA::ENEMY_INFO::PAGE_ORDER.size - 1 ? 0 : @page + 1
  806.     refresh
  807.   end
  808.   
  809.   #--------------------------------------------------------------------------
  810.   # refresh
  811.   #--------------------------------------------------------------------------
  812.   def refresh
  813.     contents.clear
  814.     reset_font_settings
  815.     draw_page(@page)
  816.   end
  817.   
  818.   #--------------------------------------------------------------------------
  819.   # draw_page
  820.   #--------------------------------------------------------------------------
  821.   def draw_page(page_id)
  822.     return if @battler.nil?
  823.     case YEA::ENEMY_INFO::PAGE_ORDER[page_id]
  824.     when :parameters
  825.       @battler = actor if @type == :actor
  826.       draw_parameters
  827.     when :elements
  828.       @battler = enemy if @type == :actor
  829.       draw_parameters if @type == :actor
  830.       draw_elements if @type == :enemy
  831.     when :states
  832.       @battler = enemy if @type == :actor
  833.       draw_parameters if @type == :actor
  834.       draw_states if @type == :enemy
  835.     end
  836.   end
  837.   
  838.   #--------------------------------------------------------------------------
  839.   # draw_parameters
  840.   #--------------------------------------------------------------------------
  841.   def draw_parameters
  842.     draw_text(4, 0, contents.width, line_height, @battler.name)
  843.     dx = contents.width / 2
  844.     contents.font.size = YEA::ENEMY_INFO::PARAM_FONT_SIZE
  845.     draw_param(2, 0, line_height*1); draw_param(3, dx, line_height*1)
  846.     draw_param(4, 0, line_height*2); draw_param(5, dx, line_height*2)
  847.     draw_param(6, 0, line_height*3); draw_param(7, dx, line_height*3)
  848.   end
  849.   
  850.   #--------------------------------------------------------------------------
  851.   # draw_param
  852.   #--------------------------------------------------------------------------
  853.   def draw_param(param_id, dx, dy)
  854.     dw = contents.width / 2
  855.     colour = Color.new(0, 0, 0, translucent_alpha/2)
  856.     rect = Rect.new(dx+1, dy+1, dw - 2, line_height - 2)
  857.     contents.fill_rect(rect, colour)
  858.     #---
  859.     change_color(system_color)
  860.     draw_text(dx+4, dy, dw-8, line_height, Vocab::param(param_id))
  861.     change_color(normal_color)
  862.     if @battler.show_info_param?
  863.       text = @battler.param(param_id).group
  864.     else
  865.       text = YEA::ENEMY_INFO::HIDDEN_PARAM_TEXT
  866.     end
  867.     draw_text(dx+4, dy, dw-8, line_height, text, 2)
  868.   end
  869.   
  870.   #--------------------------------------------------------------------------
  871.   # draw_elements
  872.   #--------------------------------------------------------------------------
  873.   def draw_elements
  874.     dx = 0; dy = 0
  875.     contents.font.size = YEA::ENEMY_INFO::ELE_FONT_SIZE
  876.     for ele_id in YEA::ENEMY_INFO::SHOWN_ELEMENTS
  877.       draw_element_info(ele_id, dx, dy)
  878.       dx = dx == 0 ? contents.width / 2 : 0
  879.       dy += dx == 0 ? line_height : 0
  880.     end
  881.   end
  882.   
  883.   #--------------------------------------------------------------------------
  884.   # draw_element_info
  885.   #--------------------------------------------------------------------------
  886.   def draw_element_info(ele_id, dx, dy)
  887.     dw = contents.width / 2
  888.     colour = Color.new(0, 0, 0, translucent_alpha/2)
  889.     rect = Rect.new(dx+1, dy+1, dw - 2, line_height - 2)
  890.     contents.fill_rect(rect, colour)
  891.     #---
  892.     draw_icon(Icon.element(ele_id), dx, dy)
  893.     change_color(system_color)
  894.     draw_text(dx+24, dy, dw-24, line_height, $data_system.elements[ele_id])
  895.     change_color(normal_color)
  896.     if @battler.show_info_element?(ele_id)
  897.       text = sprintf("%d%%", (@battler.element_rate(ele_id) * 100).to_i)
  898.     else
  899.       text = YEA::ENEMY_INFO::HIDDEN_ELE_TEXT
  900.     end
  901.     draw_text(dx+4, dy, dw-8, line_height, text, 2)
  902.   end
  903.   
  904.   #--------------------------------------------------------------------------
  905.   # draw_states
  906.   #--------------------------------------------------------------------------
  907.   def draw_states
  908.     dx = 0; dy = 0
  909.     contents.font.size = YEA::ENEMY_INFO::ELE_FONT_SIZE
  910.     for state_id in YEA::ENEMY_INFO::SHOWN_STATES
  911.       draw_state_info(state_id, dx, dy)
  912.       dx = dx == 0 ? contents.width / 2 : 0
  913.       dy += dx == 0 ? line_height : 0
  914.     end
  915.   end
  916.   
  917.   #--------------------------------------------------------------------------
  918.   # draw_state_info
  919.   #--------------------------------------------------------------------------
  920.   def draw_state_info(state_id, dx, dy)
  921.     dw = contents.width / 2
  922.     colour = Color.new(0, 0, 0, translucent_alpha/2)
  923.     rect = Rect.new(dx+1, dy+1, dw - 2, line_height - 2)
  924.     contents.fill_rect(rect, colour)
  925.     #---
  926.     draw_icon($data_states[state_id].icon_index, dx, dy)
  927.     change_color(system_color)
  928.     draw_text(dx+24, dy, dw-24, line_height, $data_states[state_id].name)
  929.     change_color(normal_color)
  930.     if @battler.show_info_state?(state_id)
  931.       text = sprintf("%d%%", (@battler.state_rate(state_id) * 100).to_i)
  932.     else
  933.       text = YEA::ENEMY_INFO::HIDDEN_STATE_TEXT
  934.     end
  935.     draw_text(dx+4, dy, dw-8, line_height, text, 2)
  936.   end
  937.   
  938. end # Window_Comparison

  939. #==============================================================================
  940. # ■ Window_ComparisonHelp
  941. #==============================================================================

  942. class Window_ComparisonHelp < Window_Base
  943.   
  944.   #--------------------------------------------------------------------------
  945.   # initialize
  946.   #--------------------------------------------------------------------------
  947.   def initialize(info_window)
  948.     dy = YEA::ENEMY_INFO::HELP_WINDOW_Y
  949.     super(-12, dy, Graphics.width + 24, fitting_height(1))
  950.     @info_window = info_window
  951.     self.opacity = 0
  952.     self.z = 300
  953.     @text = ""
  954.     hide
  955.   end
  956.   
  957.   #--------------------------------------------------------------------------
  958.   # update
  959.   #--------------------------------------------------------------------------
  960.   def update
  961.     super
  962.     return unless YEA::ENEMY_INFO::SHOW_HELP_INFO
  963.     update_visibility
  964.     update_text
  965.   end
  966.   
  967.   #--------------------------------------------------------------------------
  968.   # update_visibility
  969.   #--------------------------------------------------------------------------
  970.   def update_visibility
  971.     return unless SceneManager.scene_is?(Scene_Battle)
  972.     return if SceneManager.scene.enemy_window.select_all?
  973.     self.visible = SceneManager.scene.enemy_window.active
  974.   end
  975.   
  976.   #--------------------------------------------------------------------------
  977.   # update_text
  978.   #--------------------------------------------------------------------------
  979.   def update_text
  980.     return unless self.visible
  981.     if @info_window.visible
  982.       text = YEA::ENEMY_INFO::HELP_INFO_SWITCH
  983.     else
  984.       text = YEA::ENEMY_INFO::HELP_INFO_SHOW
  985.     end
  986.     return if @text == text
  987.     @text = text
  988.     refresh
  989.   end
  990.   
  991.   #--------------------------------------------------------------------------
  992.   # refresh
  993.   #--------------------------------------------------------------------------
  994.   def refresh
  995.     contents.clear
  996.     reset_font_settings
  997.     draw_background
  998.     draw_text_ex(4, 0, @text)
  999.   end
  1000.   
  1001.   #--------------------------------------------------------------------------
  1002.   # draw_background
  1003.   #--------------------------------------------------------------------------
  1004.   def draw_background
  1005.     temp_rect = Rect.new(0, 0, contents.width / 2, contents.height)
  1006.     colour1 = Color.new(0, 0, 0, 192)
  1007.     colour2 = Color.new(0, 0, 0, 0)
  1008.     contents.gradient_fill_rect(temp_rect, colour1, colour2)
  1009.   end
  1010.   
  1011. end # Window_ComparisonHelp

  1012. #==============================================================================
  1013. # ■ Scene_Battle
  1014. #==============================================================================

  1015. class Scene_Battle < Scene_Base
  1016.   
  1017.   #--------------------------------------------------------------------------
  1018.   # alias method: create_all_windows
  1019.   #--------------------------------------------------------------------------
  1020.   alias scene_battle_create_all_windows_eti create_all_windows
  1021.   def create_all_windows
  1022.     scene_battle_create_all_windows_eti
  1023.     create_comparison_windows
  1024.   end
  1025.   
  1026.   #--------------------------------------------------------------------------
  1027.   # alias method: create_comparison_windows
  1028.   #--------------------------------------------------------------------------
  1029.   def create_comparison_windows
  1030.     @actor_info_window = Window_Comparison.new(:actor)
  1031.     @enemy_info_window = Window_Comparison.new(:enemy)
  1032.     @info_help_window = Window_ComparisonHelp.new(@enemy_info_window)
  1033.   end
  1034.   
  1035.   #--------------------------------------------------------------------------
  1036.   # new method: toggle_enemy_info
  1037.   #--------------------------------------------------------------------------
  1038.   def toggle_enemy_info
  1039.     YEA::ENEMY_INFO::INFO_SFX.play
  1040.     if @enemy_info_window.visible
  1041.       hide_comparison_windows
  1042.     else
  1043.       show_comparison_windows
  1044.     end
  1045.   end
  1046.   
  1047.   #--------------------------------------------------------------------------
  1048.   # new method: enemy_info_page_up
  1049.   #--------------------------------------------------------------------------
  1050.   def enemy_info_page_up
  1051.     YEA::ENEMY_INFO::INFO_SFX.play
  1052.     @actor_info_window.page_up
  1053.     @enemy_info_window.page_up
  1054.   end
  1055.   
  1056.   #--------------------------------------------------------------------------
  1057.   # new method: enemy_info_page_down
  1058.   #--------------------------------------------------------------------------
  1059.   def enemy_info_page_down
  1060.     YEA::ENEMY_INFO::INFO_SFX.play
  1061.     @actor_info_window.page_down
  1062.     @enemy_info_window.page_down
  1063.   end
  1064.   
  1065.   #--------------------------------------------------------------------------
  1066.   # alias method: on_enemy_ok
  1067.   #--------------------------------------------------------------------------
  1068.   alias scene_battle_on_enemy_ok_eti on_enemy_ok
  1069.   def on_enemy_ok
  1070.     hide_comparison_windows
  1071.     scene_battle_on_enemy_ok_eti
  1072.   end
  1073.   
  1074.   #--------------------------------------------------------------------------
  1075.   # alias method: on_enemy_cancel
  1076.   #--------------------------------------------------------------------------
  1077.   alias scene_battle_on_enemy_cancel_eti on_enemy_cancel
  1078.   def on_enemy_cancel
  1079.     hide_comparison_windows
  1080.     scene_battle_on_enemy_cancel_eti
  1081.   end
  1082.   
  1083.   #--------------------------------------------------------------------------
  1084.   # new method: show_comparison_windows
  1085.   #--------------------------------------------------------------------------
  1086.   def show_comparison_windows
  1087.     @actor_info_window.reveal(BattleManager.actor)
  1088.     @enemy_info_window.reveal(@enemy_window.enemy)
  1089.     @info_viewport.visible = false
  1090.     @skill_window.y = Graphics.height * 2
  1091.     @item_window.y = Graphics.height * 2
  1092.     @status_aid_window.y = Graphics.height * 2
  1093.   end
  1094.   
  1095.   #--------------------------------------------------------------------------
  1096.   # new method: hide_comparison_windows
  1097.   #--------------------------------------------------------------------------
  1098.   def hide_comparison_windows
  1099.     @actor_info_window.clear
  1100.     @enemy_info_window.clear
  1101.     @info_viewport.visible = true
  1102.     @skill_window.y = Graphics.height - @skill_window.height
  1103.     @item_window.y = Graphics.height - @item_window.height
  1104.     @status_aid_window.y = Graphics.height - @status_aid_window.height
  1105.   end
  1106.   
  1107. end # Scene_Battle

  1108. end # $imported["YEA-BattleEngine"]

  1109. #==============================================================================
  1110. #
  1111. # ▼ End of File
  1112. #
  1113. #==============================================================================
复制代码


雖然自己簡單翻譯了一下,但大致還是搞不太懂該寫入多少備註才會顯示?

所以敵人備註欄我只寫入:
<set level: 1>
<level random: 0>
<show info: all>

而探查的技能備註欄只寫入:
<scan info: all>

然而我一開始敵人等級是找到v1.01版本的,

這樣子設置會顯示等級,但探查敵人的資訊會顯示無作用...

於是我去Yanfly的網站找到v1.02版本的敵人等級,

但是覆蓋上去竟然報錯了

我實在是找不到原因...

也想詢問一下為何無法探查敵人資訊?

難道我備註欄輸入錯誤嗎?

報錯內容

報錯內容
(´_ゝ`)...仍未命名的遊戲製作進度:0%

老鹰

梦石
40
星屑
38044
在线时间
7127 小时
注册时间
2012-5-26
回帖
3306

极短24评委极短23参与极短22参与极短21评委老司机慢点开短篇十吟唱者组别冠军开拓者剧作品鉴家

发表于 2018-5-4 17:05:01 | 显示全部楼层
本帖最后由 百里_飞柳 于 2018-5-4 17:35 编辑

Enemy Target Info v1.02 放到 enemy level 的上面
不好意思看错了,我再看看

-----------
不会是因为读取了旧档吧
新档有问题么?
回复

使用道具 举报

梦石
0
星屑
1261
在线时间
423 小时
注册时间
2011-6-30
回帖
470
发表于 2018-5-4 17:29:40 | 显示全部楼层
错误原因是因为你的这个敌人找不到这个show………的方法
点这里给我发邮件
有事欢迎给我发邮件哟~~
不出意外的话都会回复的哟~~~
邮箱:disciple_sneaker@163.com
个人主页:curatorjin.github.io
回复

使用道具 举报

梦石
0
星屑
354
在线时间
127 小时
注册时间
2016-10-8
回帖
54
 楼主| 发表于 2018-5-4 18:04:02 | 显示全部楼层
百里_飞柳 发表于 2018-5-4 17:05
Enemy Target Info v1.02 放到 enemy level 的上面
不好意思看错了,我再看看

我還沒有存檔過呢,都是直接F12作測試的!
(´_ゝ`)...仍未命名的遊戲製作進度:0%
回复

使用道具 举报

梦石
0
星屑
354
在线时间
127 小时
注册时间
2016-10-8
回帖
54
 楼主| 发表于 2018-5-4 18:07:45 | 显示全部楼层
0newing 发表于 2018-5-4 17:29
错误原因是因为你的这个敌人找不到这个show………的方法

咦?腳本沒有設定自動判定嗎?那請問我該怎麼做?

話說為何不能點評回復了好奇怪
(´_ゝ`)...仍未命名的遊戲製作進度:0%
回复

使用道具 举报

梦石
0
星屑
1261
在线时间
423 小时
注册时间
2011-6-30
回帖
470
发表于 2018-5-4 18:36:37 | 显示全部楼层
elemmy72 发表于 2018-5-4 18:04
我還沒有存檔過呢,都是直接F12作測試的!

据说是为了防止广告机,现在只有Lv2才能点评了……所以我也不能……
话说你这个脚本系统有对应的范例嘛?看他的代码总感觉好像缺少了一些东西
我也去找了一下你的这个网址,Enemy Target Info应该是Ace Battle Engine的一个插件,
应该需要Ace Battle Engine才能正常运行吧……
(网络原因下不了他的文件我就只能走到这了)
点这里给我发邮件
有事欢迎给我发邮件哟~~
不出意外的话都会回复的哟~~~
邮箱:disciple_sneaker@163.com
个人主页:curatorjin.github.io
回复 1 0

使用道具 举报

梦石
0
星屑
354
在线时间
127 小时
注册时间
2016-10-8
回帖
54
 楼主| 发表于 2018-5-9 20:18:12 | 显示全部楼层
0newing 发表于 2018-5-4 18:36
据说是为了防止广告机,现在只有Lv2才能点评了……所以我也不能……
话说你这个脚本系统有对应的范例嘛? ...

謝謝...好多天了還是找不到原因,
網站的連結也壞了,看來只能放棄了
(´_ゝ`)...仍未命名的遊戲製作進度:0%
回复

使用道具 举报

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

本版积分规则

Powered by Discuz! X5.0 © 2001-2026 Discuz! Team.

在本版发帖返回顶部