class Game_Actor def strength actor.note =~ /<strength\s*(\d+)>/ ? $1.to_i : 0 end end class Game_Enemy def strength enemy.note =~ /<strength\s*(\d+)>/ ? $1.to_i : 0 end end
class Game_Actor ACTOR_STRENGTH = Hash.new(0) ACTOR_STRENGTH[1] = 233 ACTOR_STRENGTH[3] = 455 def strength ACTOR_STRENGTH[@actor_id] end end class Game_Enemy ENEMY_STRENGTH = Hash.new(0) ENEMY_STRENGTH[10] = 233 ENEMY_STRENGTH[12] = 455 def strength ENEMY_STRENGTH[@enemy_id] end end
欢迎光临 Project1 (https://rpg.blue/) | Powered by Discuz! X3.1 |