- 32
- Posts
- 9
- Years
- Seen Jun 15, 2015
So, I'm creating a new move that needs to know the entire move pool of the opponent's Pokemon.
Since I couldn't think of anything more relevant, I started with this snippet from Beat Up's function code, removing the status requirement (it just needs living, non-Egg pokemon)
But this call is based on the attacker, not the opponent. I don't know where there's good documentation on this, and I doubt it would help anyway since the OnStart function only takes the attacker as the argument... any ideas?
Since I couldn't think of anything more relevant, I started with this snippet from Beat Up's function code, removing the status requirement (it just needs living, non-Egg pokemon)
Code:
def pbOnStartUse(attacker)
[email protected](attacker.index)
@participants=[]
for i in 0...party.length
@participants.push(i) if party[i] && !party[i].isEgg? &&
party[i].hp>0
end
if @participants.length==0
@battle.pbDisplay(_INTL("But it failed!"))
return false
end
return true
end
But this call is based on the attacker, not the opponent. I don't know where there's good documentation on this, and I doubt it would help anyway since the OnStart function only takes the attacker as the argument... any ideas?