标题: 请教大家如何用一句话判断队里是否有人装备了第100号防具 [打印本页] 作者: taeckle 时间: 2019-12-2 02:34 标题: 请教大家如何用一句话判断队里是否有人装备了第100号防具 目前咱能用两句话判断这个条件,两句话判断这么写:
for i in 1..999 #反正最多就999个角色.. (这是第一句)
if $game_party.actors.include?($game_actors[i]) && $game_actors[i].armor1_id == 100 #(这是第二句)
return true
break
end
end
def Greetings_Ladies_And_Gentlemen_Would_You_Kindly_Tell_Me_If_Any_of_You_Equiped_An_Amrmor_Whose(id = 100);for actor in $game_party.actors;if actor.armor1_id == id or actor.armor2_id == id or actor.armor3_id == id or actor.armor4_id == id; return true;end;end;return false;end; Greetings_Ladies_And_Gentlemen_Would_You_Kindly_Tell_Me_If_Any_of_You_Equiped_An_Amrmor_Whose(100)