本帖最后由 七重 于 2016-8-24 14:33 编辑
class Game_Actor < Game_Battler @@ero_1 = false @@ero_2 = false alias ero_2 change_equip def change_equip(slot_id, item) ero_2(slot_id, item) return if item.nil? @target_2 = {1=>0,2=>0} @target_2[item.is_a?(RPG::Weapon) ? 1 : 2] = item.id if @target_2[2] == 3 #特殊装备的编号 @@ero_1 = true end if @@ero_2 == true SceneManager.goto(Scene_Map) @@ero_2 = false @@ero_1 = false end end alias ero_equip_change_ok? equip_change_ok? def equip_change_ok?(slot_id) ero_equip_change_ok?(slot_id) if @@ero_1 == true @@ero_2 = true end return false if equip_type_fixed?(equip_slots[slot_id]) return false if equip_type_sealed?(equip_slots[slot_id]) return true end end
class Game_Actor < Game_Battler
@@ero_1 = false
@@ero_2 = false
alias ero_2 change_equip
def change_equip(slot_id, item)
ero_2(slot_id, item)
return if item.nil?
@target_2 = {1=>0,2=>0}
@target_2[item.is_a?(RPG::Weapon) ? 1 : 2] = item.id
if @target_2[2] == 3 #特殊装备的编号
@@ero_1 = true
end
if @@ero_2 == true
SceneManager.goto(Scene_Map)
@@ero_2 = false
@@ero_1 = false
end
end
alias ero_equip_change_ok? equip_change_ok?
def equip_change_ok?(slot_id)
ero_equip_change_ok?(slot_id)
if @@ero_1 == true
@@ero_2 = true
end
return false if equip_type_fixed?(equip_slots[slot_id])
return false if equip_type_sealed?(equip_slots[slot_id])
return true
end
end
特殊装备设置你需要的装备编号
没有写关于 最强装备 和 全部脱掉 的控制。
==
唔 不行,这个写得有问题。。
这样设置的话,只能在换掉的时候有效。。。
关于unselect我也还没弄明白。
|