class Game_Party
# limit_type = { item_id => limit, ... }
Item_Limits = {}
Weapon_Limits = {}
Armor_Limits = {}
alias seph_itemlimits_gameprty_gainitem gain_item
alias seph_itemlimits_gameprty_gainweapon gain_weapon
alias seph_itemlimits_gameprty_gainarmor gain_armor
def gain_item(item_id, n)
seph_itemlimits_gameprty_gainitem(item_id, n)
if Item_Limits.has_key?(item_id)
@items[item_id] = [@items[item_id], 0].max, Item_Limits[item_id]].min
end
end
def gain_weapon(item_id, n)
seph_itemlimits_gameprty_gainweapon(item_id, n)
if Weapon_Limits.has_key?(item_id)
@weapons[item_id] = [@weapons[item_id], 0].max, Weapon_Limits[item_id]].min
end
end
def gain_armor(item_id, n)
seph_itemlimits_gameprty_gainarmor(item_id, n)
if Armor_Limits.has_key?(item_id)
@armors[item_id] = [@armors[item_id], 0].max, Armor_Limits[item_id]].min
end
end
end