class Game_Actor < Game_Battler
def skill_wtype_ok?(skill)
wtype_id1 = skill.required_wtype_id1
wtype_id2 = skill.required_wtype_id2
if skill.note =~ /<限制类型3:\s*(\d+.*?)>/
$1.scan(/\d+/).each do |wtype_id3|
return true if wtype_equipped?(wtype_id3.to_i)
end
end
return true if wtype_id1 == 0 && wtype_id2 == 0
return true if wtype_id1 > 0 && wtype_equipped?(wtype_id1)
return true if wtype_id2 > 0 && wtype_equipped?(wtype_id2)
return false
end
end
class Game_Actor < Game_Battler
def skill_wtype_ok?(skill)
wtype_id1 = skill.required_wtype_id1
wtype_id2 = skill.required_wtype_id2
if skill.note =~ /<限制类型3:\s*(\d+.*?)>/
$1.scan(/\d+/).each do |wtype_id3|
return true if wtype_equipped?(wtype_id3.to_i)
end
end
return true if wtype_id1 == 0 && wtype_id2 == 0
return true if wtype_id1 > 0 && wtype_equipped?(wtype_id1)
return true if wtype_id2 > 0 && wtype_equipped?(wtype_id2)
return false
end
end