-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Implemented the majority of the Gen. 9 Abilities #2470
Implemented the majority of the Gen. 9 Abilities #2470
Conversation
And took the chance to tweak Mummy's.
-Added a modifybattlerstatstage macro to handle stat stages in battle. -Rewrote the checks inside the case ABILITYEFFECT_MOVES_BLOCK of AbilityBattleEffects.
…rActivatesMoveEnd
Also added a battle preproc config to check if the STATUS3_CHARGED_UP was already applied. Pokémon Scarlet and Violet don't check if this status flag was already applied on the target of abilities like Electromorphosis (and Wind Power until proven otherwise.) As a result, the game will trigger the ability multiple times if they're hit by a multihit move. This directive makes the code end the ability effect preemptively if the target does have the status flag applied.
Also turned GetHighestStatId into a global function since Protosynthesis' effect uses it.
Also tweaked STRINGID_SUNLIGHTACTIVATEDABILITY and STRINGID_STATWASHEIGHTENED.
Abilities such as Protosynthesis and Quark Drive demand it.
With #2452 merged, I can now implement Guard Dog too, so I'll do just that. |
…expansion into dev_gen9_abilities
dc93921
to
a3e58b0
Compare
Ready 👀 |
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.
Have any AI considerations been made?
Anger Shell: -Made it print a string from the gStatDownStringIds table while lowering Def and Sp. Def -Made it use the shiny new modifybattlerstatstage macro. -Made it activate multiple times per battle, as it should. Well-Baked Body: -Turned it into an absorbing ability. Wind Rider: -Turned it into an absorbing ability. -For its Tailwind interaction, I made it activate only when Tailwind kicks in successfully, instead of whenever it's active at the end of a turn. Guard Dog: -Updated its check inside BattleScript_EffectHitEscape. -Moved it from Cmd_forcerandomswitch to BattleScript_EffectRoar. Wind Power: -Split off its move end effect from Electromorphosis'. Electromorphosis: -Split off its move end effect from Wind Power's. Hadron Engine: -Merged its Switch In effect with Electric Surge's. Protosynthesis: -Fixed its stat boost. Quark Drive: -Fixed its stat boost. Cud Chew: -Updated its ENDTURN effect's berry check. Supreme Overlord: -Tweaked the looping i variable's data type, the order of the variables and the checks inside ApplySupremeOverlordModifier. Earth Eater: -Turned it into an absorbing ability. Misc changes: -Added a variable to set the amount of stat stages raised inside AbilityMoveEffects' case ABILITYEFFECT_ABSORBING. -Added a preproc config to update the text string that they print. -Limited the scope of atkHighestStat and defHighestStat in CalcMoveBasePowerAfterModifiers to Protosynthesis's and Quark Drive's effects.
Ah, I forgot to merge-in upstream (as in the expansion's upcoming branch). Will do. |
…expansion into dev_gen9_abilities
Alright, done. I'll wait for your responses to the unresolved reviews @ghoulslash before proceeding with the rest of the changes 👀 |
It's because I thought that it activated during each end of turn while Tailwind's timer was still running @ghoulslash, and I thought the exact same thing about Wind Rider. I don't intend to keep it like that since you told me that's not how it works, to clarify. The only reason I haven't moved it yet is because I was waiting for your response in relation to the new battle script that was called from insidee |
Ah gotcha, that makes sense. If the battle script question was about the |
-Renamed TryActivateWindRiderLoop to BattleScript_TryTailwindAbilitiesLoop -Modified how it handles the check for Wind Rider by using a various and incorporated Wind Power into the mix because that ability is affected by Tailwind as well.
d7b0d86
to
31cd076
Compare
Updated the PR as it was pointed out to me that Anger Shell is not affected by Sheer Force, just like Berserk. https://www.smogon.com/forums/threads/inaccurate-anger-shell-description.3713075/post-9441418 |
-Removed BattleScript_WindRiderActivatesEnd2 -Tweaked the condition of Wind Power in AbilityBattleEffects -Renamed ApplySupremeOverlordModifier to GetSupremeOverlordModifier
A new, probably better way to handle the announcement trigger that abilities such as Protosynthesis and Quark Drive have, when the battle weather or the field terrain change. Misc. changes: -EFFECT_DAMAGE_SET_TERRAIN -> EFFECT_HIT_SET_REMOVE_TERRAIN -It's more appropriate as the effect can be used to force set a terrain or simply to remove an active terrain, after all. -The main reason for the rename was the inconsistency with the battle script's label. -Reverted accidentally committed change to B_DOUBLE_WILD_CHANCE, performed back in c8abf00.
Following @ghoulslash's reply on Discord, I ended up adding new cases for I also took the chance to undo an accidental change made for testing purposes that I shouldn't have pushed, and since I had to modify its battle script, I also took the chance to rename So yeah, I think this is ready for another review 👀 |
Also renamed activateweatherabilities and activateterrainabilities.
…expansion into dev_gen9_abilities
Alright, I think that should be good. I'm not sure if you wanted me to rewrite As I said on Discord, I think it should be discussed whether it's a good idea to keep GF's hacky way of handling these form changes or just make them use a conventional species swap like any other and also incorporating them into the form change table, but that's separate from this PR. |
Description
I totally didn't implement most of these many weeks ago (wink, wink).
That means that I totally implemented them recently and well after the leaks and stuff.
So anyway, here's 27 out of 31 ability effects introduced in the Gen. 9 Games.
Notes:
-I skipped Commander and Opportunist because they both sound like a pita.
-Guard Dog needs #2452 to be merged.
-I'm not sure if it's a good idea to look into Zero to Hero now, or if I should wait for the battle form related form change table changes.
I tried to do Opportunist by expanding the code inside
PrepareStringBattle
, but I couldn't get anywhere.Commander is a meme double battle-exclusive ability where when you send out a Dondozo and a Tatsugiri, the latter enters the former's mouth providing them with some stat stage boosts, and in turn "disappearing" from the battle field.
It's not that it dies, it doesn't go away. It remains there, inside Dondozo's mouth, incapable of being targeted until Dondozo faints.
It sounds annoying to do, but earlier I had a potential idea on how to handle it. I may look into it, i don't know.
Things in need of research
-Does Wind Power activate multiple times for multihit moves like Electromorphosis, or not?
-Does Cud Chew activate multiple times in battle, or just once? For example, does it reset on Switch Out and Switch In or not?
Extras
Certain abilities such as Intrepid Sword and Battle Bond were modified in Gen. 9.
I had this in my notes. I'd be willing to look into it, either for this PR or a separate one.
-Add a config for Gen. 9 Intrepid Sword and Dauntless Shield maybe.
-Add a config for Gen. 9 Battle Bond maybe.
-Battle Bond no longer transforms Greninja, it doesn't boost Water Shuriken and it only activates once per battle.
-It also boosts the user's Attack, Sp. Attack and Speed by 1 stat stage.
Discord contact info
Lunos#4026