#--------------------------------------------------------------------------
# ● アイテムの引継ぎ
#--------------------------------------------------------------------------
def inherit_item(load_party)
if !InheritSet::InheritItem
return
end
# 引継ぎ
for item in load_party.items
number = load_party.item_number(item)
case item
when RPG::Item
@items[item.id] = [[number, 0].max, 99].min
end
end
# 引き継がない項目を削除
for i in 0...InheritSet::InheritNoItem.size
@items[InheritSet::InheritNoItem] = 0
end
end
#--------------------------------------------------------------------------
# ● 武器の引継ぎ
#--------------------------------------------------------------------------
def inherit_weapon(load_party, load_actors)
if !InheritSet::InheritWeapon
return
end
# アイテム引継ぎ
for item in load_party.items
number = load_party.item_number(item)
case item
when RPG::Weapon
@weapons[item.id] = [[number, 0].max, 99].min
end
end
# 装備品引継ぎ
for i in 1..load_actors.data.size
if load_actors.data != nil
if load_actors.data.weapon_id != 0
number = @weapons[load_actors.data.weapon_id]
number = 0 if number == nil
@weapons[load_actors.data.weapon_id] = [[number+1, 0].max, 99].min
end
end
end
# 引き継がない項目を削除
for i in 0...InheritSet::InheritNoWeapon.size
@weapons[InheritSet::InheritNoWeapon] = 0
end
end
#--------------------------------------------------------------------------
# ● 防具の引継ぎ
#--------------------------------------------------------------------------
def inherit_armor(load_party, load_actors)
if !InheritSet::InheritArmor
return
end
# アイテム引継ぎ
for item in load_party.items
number = load_party.item_number(item)
case item
when RPG::Armor
@armors[item.id] = [[number, 0].max, 99].min
end
end
# 装備品引継ぎ
for i in 1..load_actors.data.size
if load_actors.data != nil
if load_actors.data.armor1_id != 0
number = @armors[load_actors.data.armor1_id]
number = 0 if number == nil
@armors[load_actors.data.armor1_id] = [[number+1, 0].max, 99].min
end
if load_actors.data.armor2_id != 0
number = @armors[load_actors.data.armor2_id]
number = 0 if number == nil
@armors[load_actors.data.armor2_id] = [[number+1, 0].max, 99].min
end
if load_actors.data.armor3_id != 0
number = @armors[load_actors.data.armor3_id]
number = 0 if number == nil
@armors[load_actors.data.armor3_id] = [[number+1, 0].max, 99].min
end
if load_actors.data.armor4_id != 0
number = @armors[load_actors.data.armor4_id]
number = 0 if number == nil
@armors[load_actors.data.armor4_id] = [[number+1, 0].max, 99].min
end
end
end
# 引き継がない項目を削除
for i in 0...InheritSet::InheritNoArmor.size
@armors[InheritSet::InheritNoArmor] = 0
end
end
#--------------------------------------------------------------------------
# ● 所持金の引継ぎ
#--------------------------------------------------------------------------
def inherit_gold(load_party)
if !InheritSet::InheritGold
return
end
@gold = load_party.gold
end
#--------------------------------------------------------------------------
# ● 歩数の引継ぎ
#--------------------------------------------------------------------------
def inherit_steps(load_party)
if !InheritSet::InheritSteps
return
end
@steps = load_party.steps
end