I'm asking because I'm using a custom enemy AI script.
Let's say I wanted to find find out how many members in the game party have DEF above a certain amount, to judge whether the enemy will use Armor Curse or not.
Kind of like $game_party.movable_members.size >= 2 but I guess in the form of criteria,
like $game_party.alive_members.inject {|mem| mem.def >= 50}.size. That way I wouldn't have to go
if member 0 is not nil then if alive and active then if def is greater than 50 then amount += 1 end end end...
and soforth.
How could I achieve this?
Let's say I wanted to find find out how many members in the game party have DEF above a certain amount, to judge whether the enemy will use Armor Curse or not.
Kind of like $game_party.movable_members.size >= 2 but I guess in the form of criteria,
like $game_party.alive_members.inject {|mem| mem.def >= 50}.size. That way I wouldn't have to go
if member 0 is not nil then if alive and active then if def is greater than 50 then amount += 1 end end end...
and soforth.
How could I achieve this?