################################################################################
##### Max Item
##########################################################
# Author : Biward
# Date : 27/04/2014
# Version : 1.0 Ace
#
# With this script, you can modify the maximum amount you can have of an object (items, weapons, armors)
#
# How it works :
# You just have to put <Max = N> in the object's note
# N = maximum amount
#
################################################################################
##### 物品破限
##########################################################
# 作者 : Biward
# 日期 : 27/04/2014
# 版本 : 1.0 Ace
#
# 有了这个脚本,你可以修改任何一个对象的最大数量(物品,武器,盔甲)
#
# 使用方法 :
# 你只需要在备注栏里填入<Max = N>即可
# N = 数量
##########################################################
##### Script
##################################
##################################
# ** RPG::BaseItem
##################
module RPG
class BaseItem
attr_reader :max
def init_max
note =~ /<Max = (.*)>/
@max = 99
@max = $1.to_i if $1
end
end
end
##################################
# ** DataManager
################
module DataManager
class << self
alias lndbimax load_normal_database
def load_normal_database
lndbimax
load_max
end
alias lbtdbimax load_battle_test_database
def load_battle_test_database
lbtdbimax
load_max
end
def load_max
$data_items.each { |obj| obj.init_max if obj }
$data_weapons.each { |obj| obj.init_max if obj }
$data_armors.each { |obj| obj.init_max if obj }
end
end
end
##################################
# ** GameParty
##############
class Game_Party
def max_item_number(item)
return item.max
end
end
##################################
##### Fin du Script
##########################################################