35 lines
No EOL
1.5 KiB
Ruby
35 lines
No EOL
1.5 KiB
Ruby
#★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★
|
||
#
|
||
#使用方法
|
||
#
|
||
#所持数を制限したいアイテムのメモ欄に
|
||
#<ITEM_LIMIT_n> (nは最大所持数)
|
||
#
|
||
#と記入して下さい。
|
||
#
|
||
#★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★
|
||
|
||
#--------------------------------------------------------------------------
|
||
# ★ システムワードの登録:所持可能数
|
||
#--------------------------------------------------------------------------
|
||
class RPG::BaseItem
|
||
def item_limitation
|
||
/<ITEM_LIMIT_(\d+)>/ =~ note ? $1.to_i : 30
|
||
end
|
||
end
|
||
|
||
#==============================================================================
|
||
# ■ Game_Party
|
||
#------------------------------------------------------------------------------
|
||
# パーティを扱うクラスです。所持金やアイテムなどの情報が含まれます。このクラ
|
||
# スのインスタンスは $game_party で参照されます。
|
||
#==============================================================================
|
||
class Game_Party < Game_Unit
|
||
#--------------------------------------------------------------------------
|
||
# ● アイテムの最大所持数取得
|
||
#--------------------------------------------------------------------------
|
||
alias maru0075_max_item_number max_item_number
|
||
def max_item_number(item)
|
||
item.item_limitation
|
||
end
|
||
end |