本帖最后由 howhow1314 于 2015-6-22 14:22 编辑
class Game_Actor alias class_lgm class def class equips.compact.each {|equip| return $data_classes[equip.laoganma] if equip.laoganma} class_lgm end end class RPG::EquipItem def laoganma /<LGM\s*(\d+)>/ =~ note ? $1.to_i : nil end end
class Game_Actor
alias class_lgm class
def class
equips.compact.each {|equip| return $data_classes[equip.laoganma] if equip.laoganma}
class_lgm
end
end
class RPG::EquipItem
def laoganma
/<LGM\s*(\d+)>/ =~ note ? $1.to_i : nil
end
end
裝備的備註欄寫上<LGM 職業id>
class Game_Actor def class equips.compact.each {|equip| return $data_classes[equip.laoganma] if equip.laoganma} $data_classes[class_id_] end def class_id_ @class_id_ ||= @class_id end def change_class(class_id, keep_exp = false) @exp[class_id] = exp if keep_exp @class_id_ = class_id change_exp(@exp[@class_id] || 0, false) refresh end def exp @exp[@class_id] ||= 0 end alias refresh_lgm refresh def refresh @class_id = self.class.id level_up while !max_level? && self.exp >= next_level_exp level_down while self.exp < current_level_exp refresh_lgm end end class RPG::EquipItem def laoganma /<LGM\s*(\d+)>/ =~ note ? $1.to_i : nil end end
class Game_Actor
def class
equips.compact.each {|equip| return $data_classes[equip.laoganma] if equip.laoganma}
$data_classes[class_id_]
end
def class_id_
@class_id_ ||= @class_id
end
def change_class(class_id, keep_exp = false)
@exp[class_id] = exp if keep_exp
@class_id_ = class_id
change_exp(@exp[@class_id] || 0, false)
refresh
end
def exp
@exp[@class_id] ||= 0
end
alias refresh_lgm refresh
def refresh
@class_id = self.class.id
level_up while !max_level? && self.exp >= next_level_exp
level_down while self.exp < current_level_exp
refresh_lgm
end
end
class RPG::EquipItem
def laoganma
/<LGM\s*(\d+)>/ =~ note ? $1.to_i : nil
end
end
這樣的話經驗就會分開算了.. |