[Move] Rototiller implementation (#1885)

* rototiller implementation

* attack now fails if no eligible grass type pokémon is fielded
This commit is contained in:
Raidette 2024-06-06 23:22:04 +02:00 committed by GitHub
parent 9c1a13eb54
commit 209a69d098
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -6683,7 +6683,11 @@ export function initMoves() {
.condition((user, target, move) => user.battleData.berriesEaten.length > 0),
new StatusMove(Moves.ROTOTILLER, Type.GROUND, -1, 10, 100, 0, 6)
.target(MoveTarget.ALL)
.unimplemented(),
.condition((user,target,move) => {
// If any fielded pokémon is grass-type and grounded.
return [...user.scene.getEnemyParty(),...user.scene.getParty()].some((poke) => poke.isOfType(Type.GRASS) && poke.isGrounded());
})
.attr(StatChangeAttr, [BattleStat.ATK, BattleStat.SPATK], 1, false, (user, target, move) => target.isOfType(Type.GRASS) && target.isGrounded()),
new StatusMove(Moves.STICKY_WEB, Type.BUG, -1, 20, -1, 0, 6)
.attr(AddArenaTrapTagAttr, ArenaTagType.STICKY_WEB)
.target(MoveTarget.ENEMY_SIDE),