pokerogue
pokerogue copied to clipboard
Implements Cotton Down
Adds an optional allOthers flag to PostDefendStatChangeAbAttr, which means that the stat change affects all other pokemon on the field, to accommodate Cotton Down. The showdown page specifies that it's "damaging moves" so I went with checking that it wasn't a status move.
Similar to the Cursed Body implementation, looks like this is also missing the trigger on KO. Tested in showdown, and it should trigger even if knocked out.
good call, uses the same bypassFaint tag and now it works
Looks good to me. Triggers on damage even if KO. Does not trigger on status. Triggers on spread. Triggers on all battle participants except the user. Triggers on multi-hit moves. When triggered by multiple defenders, stat drops combine.
https://github.com/pagefaultgames/pokerogue/assets/13838608/f4df8bd4-6662-4458-bd48-546219b51c88
https://github.com/pagefaultgames/pokerogue/assets/13838608/adf25326-3494-4462-9a0d-76f9a6434b5a