偷懒没有把数据库里设定的初始装备考虑进去,但是这个你可以自己避免这种bug的发生
在武器的备注里写<双手>就是双手武器了
class Game_Actor alias mf240719equip_change_ok? equip_change_ok? def equip_change_ok?(slot_id) return false if dual_wield? && !double_change_ok?(slot_id) mf240719equip_change_ok?(slot_id) end def weapon_cheak_double a = 0 equips.each do |i| return a if i && i.note.include?("<双手>") a += 1 end return false end def double_change_ok?(slot_id) return true if [2,3,4].include?(slot_id) weapon_cheak_double ? slot_id == weapon_cheak_double : true end alias mf240719change_equip change_equip def change_equip(slot_id, item) return if item && item.note.include?("<双手>") && ((weapons.size == 1 && !equips[slot_id]) || weapons.size == 2) mf240719change_equip(slot_id, item) end end
class Game_Actor
alias mf240719equip_change_ok? equip_change_ok?
def equip_change_ok?(slot_id)
return false if dual_wield? && !double_change_ok?(slot_id)
mf240719equip_change_ok?(slot_id)
end
def weapon_cheak_double
a = 0
equips.each do |i|
return a if i && i.note.include?("<双手>")
a += 1
end
return false
end
def double_change_ok?(slot_id)
return true if [2,3,4].include?(slot_id)
weapon_cheak_double ? slot_id == weapon_cheak_double : true
end
alias mf240719change_equip change_equip
def change_equip(slot_id, item)
return if item && item.note.include?("<双手>") && ((weapons.size == 1 && !equips[slot_id]) || weapons.size == 2)
mf240719change_equip(slot_id, item)
end
end
|