嘛,如果最早就这样问的话可以少绕很多圈圈的(才发现啊)。
class Game_BattlerBase alias mhp_without_note mhp def mhp note = actor? ? actor.note : enemy.note note =~ /<mhp\s*(\d+)>/i ? $1.to_i : mhp_without_note endend
class Game_BattlerBase alias mhp_without_note mhp def mhp note = actor? ? actor.note : enemy.note note =~ /<mhp\s*(\d+)>/i ? $1.to_i : mhp_without_note end end