lunariafantasia/Scripts/_HP.rb
2024-01-12 03:12:38 -06:00

33 lines
1.1 KiB
Ruby
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

#==============================================================================
# ■ Game_Enemy
#------------------------------------------------------------------------------
#  敵キャラを扱うクラスです。このクラスは Game_Troop クラス($game_troop
# 内部で使用されます。
#==============================================================================
class Game_Enemy < Game_Battler
#--------------------------------------------------------------------------
# ● 通常能力値の基本値取得
#--------------------------------------------------------------------------
alias param_plus_param_base param_base
def param_base(param_id)
param_plus_param_base(param_id) + enemy.param_plus[param_id]
end
end
class RPG::Enemy < RPG::BaseItem
def param_plus
@param_plus ||= param_plus_set
end
def param_plus_set
pp = Array.new(9, 0)
self.note.each_line do |line|
case line
when /\<能力値プラス:(\d+),(\d+)\>/
pp[$1.to_i] = $2.to_i
end
end
return pp
end
end