#==============================================================================
#Changer le MaxItem
# Par Mirano Hikari
https://rpg-maker-vx.bbactif.com #==============================================================================
#numero de l'interrupteur pour activer ce script
Switche_Active = 1
class Game_Party < Game_Unit
#--------------------------------------------------------------------------
# * Constants
#--------------------------------------------------------------------------
MAX_ITEMS = 99 # Maximum number of items
#--------------------------------------------------------------------------
# * Gain Items (or lose)
# item : Item
# n : Number
# include_equip : Include equipped items
#--------------------------------------------------------------------------
def gain_item(item, n, include_equip = false)
number = item_number(item)
case item
when RPG::Item
@items[item.id] = [[number + n, 0].max, MAX_ITEMS].min
when RPG::Weapon
@weapons[item.id] = [[number + n, 0].max, MAX_ITEMS].min
when RPG::Armor
@armors[item.id] = [[number + n, 0].max, MAX_ITEMS].min
end
n += number
if include_equip and n < 0
for actor in members
while n < 0 and actor.equips.include?(item)
actor.discard_equip(item)
n += 1
end
end
end
end
end