-
Notifications
You must be signed in to change notification settings - Fork 2.8k
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
Implement fainted forme regression #10810
Open
andrebastosdias
wants to merge
17
commits into
smogon:master
Choose a base branch
from
andrebastosdias:revivalblessing-forms
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+213
−44
Open
Changes from 9 commits
Commits
Show all changes
17 commits
Select commit
Hold shift + click to select a range
c9ca46d
Refactor details code
andrebastosdias 375ecc0
Fainted forme regression
andrebastosdias 5bee8e7
More logical tests
andrebastosdias e3aa97b
Fix test name
andrebastosdias f4fbc24
Simplify details
andrebastosdias f4891c9
Revert Morpeko
andrebastosdias bd62d95
Add more species
andrebastosdias 72b7af0
Fixed with variable regressionForme
andrebastosdias f185f65
Add comment
andrebastosdias 3193f8c
Transformation should never allow regression
andrebastosdias 568761d
Actually use pokemon.details
andrebastosdias c09318b
Rename methods
andrebastosdias a59cb35
More refactor
andrebastosdias 4ef6789
No message to client
andrebastosdias 03f797a
Always regress to the set.species
andrebastosdias 27b3f22
Remove redundant code
andrebastosdias 8a62f2f
Fix function name in comment
andrebastosdias File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change | ||||
---|---|---|---|---|---|---|
|
@@ -1949,6 +1949,7 @@ export class BattleActions { | |||||
} | ||||||
if (pokemon.species.name === 'Terapagos-Terastal' && type === 'Stellar') { | ||||||
pokemon.formeChange('Terapagos-Stellar', null, true); | ||||||
pokemon.regressionForme = {species: this.dex.species.get('Terapagos'), ability: toID('Tera Shift')}; | ||||||
pokemon.baseMaxhp = Math.floor(Math.floor( | ||||||
2 * pokemon.species.baseStats['hp'] + pokemon.set.ivs['hp'] + Math.floor(pokemon.set.evs['hp'] / 4) + 100 | ||||||
) * pokemon.level / 100 + 10); | ||||||
|
@@ -1958,8 +1959,11 @@ export class BattleActions { | |||||
this.battle.add('-heal', pokemon, pokemon.getHealth, '[silent]'); | ||||||
} | ||||||
if (pokemon.species.baseSpecies === 'Morpeko') { | ||||||
if (pokemon.species.name !== 'Morpeko') { | ||||||
pokemon.regressionForme = {species: pokemon.baseSpecies, ability: pokemon.baseAbility}; | ||||||
} | ||||||
pokemon.baseSpecies = pokemon.species; | ||||||
pokemon.details = pokemon.details.replace('Morpeko', pokemon.species.name); | ||||||
pokemon.details = pokemon.getSimpleDetails(); | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. By default, |
||||||
} | ||||||
this.battle.runEvent('AfterTerastallization', pokemon); | ||||||
} | ||||||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm just wondering whether this can be
null
or failing that{species: pokemon.baseSpecies, ability: pokemon.baseAbility}
.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Because when Terapagos activates Tera Shift, it sets
baseSpecies
to Terapagos-Terastal andregressionForme = null
. Terapagos-Stellar is the only case where we need to revert to a form that was not the currentbaseSpecies
.For Morpeko, I just added a condition to avoid adding unnecessary logs if it was in its base form when it terastalized.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry, I got the Terapagos formes confused there.