bad-end-collector/Scripts/_.22.rb
2024-05-18 13:05:37 -05:00

35 lines
No EOL
1.5 KiB
Ruby
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

#★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★
#
#使用方法
#
#所持数を制限したいアイテムのメモ欄に
#<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