QQ截图20150228103813.png (38.05 KB, 下载次数: 10)
module RPG class Armor Regex_Hp = /%hp\[(\d+)\]/ unless method_defined? :rb_description_20150228 alias rb_description_20150228 description def description return rb_description_20150228.gsub(Regex_Hp, "") end end def hp_plus Regex_Hp =~ @description return $1.to_i end end end class Game_Actor def base_maxhp n = $data_actors[@actor_id].parameters[0, @level] armor1 = $data_armors[@armor1_id] armor2 = $data_armors[@armor2_id] armor3 = $data_armors[@armor3_id] armor4 = $data_armors[@armor4_id] n += armor1 != nil ? armor1.hp_plus : 0 n += armor2 != nil ? armor2.hp_plus : 0 n += armor3 != nil ? armor3.hp_plus : 0 n += armor4 != nil ? armor4.hp_plus : 0 return [[n, 1].max, 999999].min end def hp @hp = [@hp, maxhp].min @hp end end
欢迎光临 Project1 (https://rpg.blue/) | Powered by Discuz! X3.1 |