Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refactor lastAttackedBy to hurtBy #4832

Closed
wants to merge 126 commits into from

Conversation

bgsamm
Copy link
Contributor

@bgsamm bgsamm commented Aug 28, 2018

Replaced the 'lastAttackedBy' attribute of a Pokemon with an array of attacks that the Pokemon has recently received. This corrects a bug in double battles arising from lastAttackedBy always getting replaced by the most recent attack, which caused Avalanche and Revenge to not double in power when they otherwise should have (e.g. see https://replay.pokemonshowdown.com/gen7doublescustomgame-796785834). This also addresses the corresponding task in #2444.

@bgsamm bgsamm closed this Aug 28, 2018
@bgsamm
Copy link
Contributor Author

bgsamm commented Aug 28, 2018

Closing to address typescript test

@bgsamm bgsamm reopened this Aug 28, 2018
Charlie Kobayashi and others added 22 commits September 19, 2018 22:39
Normally, Illusion copies everything except the level, so if Zoroark is
a different level from the pokemon it's copying, it's very obvious that
it's a copy. This isn't a problem normally (because everyone is 50 or
100), but in randbats, it's a big tell, and makes Zoroark weaker than
it's supposed to be.

And, unrelatedly, everyone thinks it's a bug even though it's not.
And change spacing of help command to match the rest
- Allow unlocking specific names with /unlockname
- Expand /unlockip to work for mods
- Clarify which names are locked on /ip
@bgsamm
Copy link
Contributor Author

bgsamm commented Sep 26, 2018

bump @Marty-D

@Marty-D
Copy link
Collaborator

Marty-D commented Oct 8, 2018

Hi, very sorry about the delay, I didn't get any of these alerts.

This looks pretty good! Would you mind creating a lastHurtBy() function as a shortcut for hurtBy[target.hurtBy.length - 1]? Makes uses of it much more readable. This is otherwise a great improvement, thanks!

@bgsamm
Copy link
Contributor Author

bgsamm commented Oct 8, 2018

Yep, can do. And no worries about the delay.

@bgsamm bgsamm closed this Oct 8, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.