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

Adds moves Matcha Gotcha, Syrup Bomb and Ivy Cudgel #3402

Merged
merged 4 commits into from
Oct 11, 2023

Conversation

AlexOn1ine
Copy link
Collaborator

Adds the Teal Mask moves.

@DizzyEggg DizzyEggg merged commit 0b9126f into rh-hideout:upcoming Oct 11, 2023
1 check passed
else
{
gStatuses4[gEffectBattler] |= STATUS4_SYRUP_BOMB;
gDisableStructs[gBattlerTarget].syrupBombTimer = 3;

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

gEffectBattler

@@ -3116,6 +3117,30 @@ u8 DoBattlerEndTurnEffects(void)
}
gBattleStruct->turnEffectsTracker++;
break;
case ENDTURN_SYRUP_BOMB:

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The way you have this set up now will lower speed twice and then kill the effect.

  • When move is used timer is 3
  • End of turn timer is reduced to 2 and speed is lowered
  • End of turn timer is reduced to 1 and speed is lowered
  • End of turn timer is reduced to 0 and effect is removed

I noticed the way you currently have it is how it's implemented on Showdown, but this goes against the move description and what Bulbapedia says is supposed to happen. This definitely warrants an in-game test. If Showdown is correct, then Bulbapedia should be updated to specify that it only lowers speed twice.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yep, you are correct. I followed showdown. I don't have SV so this was by best option but I see if I can get someone to test it in-game.

Copy link
Collaborator Author

@AlexOn1ine AlexOn1ine Oct 11, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It seems like Showdown is wrong. Speed drop goes on for three turns and there is no message at the end that mentions the effected target was freed from Syrup Bomb.

Recording: https://streamable.com/0eqvcz

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You should open a bug on Showdown then and update Bulbapedia to mention it just ends with no text.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Already at the PR stage smogon/pokemon-showdown#9836,
Submitted the bug yesterday when Alex let us know in our Discord server :P

call BattleScript_EffectHit_Ret
seteffectwithchance
tryfaintmon BS_TARGET
printstring STRINGID_TARGETCOVEREDINSTICKYCANDYSYRUP

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This isn't supposed to print each turn if the effect is already active. It would be better to create a new move effect and call a battle script to print this string when the effect is set itself.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Will fix in a follow up PR

waitmessage B_WAIT_TIME_LONG
goto BattleScript_MoveEnd

BattleScript_SyrupBombEndTurn::

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy how Octolock is done. That way you don't need to add duplicate code that checks for these Abilities again.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It might be better to do it the other way around because I think Octolock is currently not entirely accurate.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You can simplify it by doing something like this:

	playanimation BS_ATTACKER, B_ANIM_SYRUP_BOMB_STAT_DOWN
	setstatchanger STAT_SPEED, 1, TRUE
        statbuffchange STAT_CHANGE_ALLOW_PTR | STAT_CHANGE_NOT_PROTECT_AFFECTED, BattleScript_SyrupBombTurnDmgPrintMsg
BattleScript_SyrupBombTurnDmgPrintMsg:
	jumpifbyte CMP_EQUAL, cMULTISTRING_CHOOSER, 3, BattleScript_SyrupBombTurnDmgEnd
	jumpifbyte CMP_EQUAL, cMULTISTRING_CHOOSER, 4, BattleScript_SyrupBombTurnDmgEnd
	printfromtable gStatDownStringIds
	waitmessage B_WAIT_TIME_LONG
BattleScript_SyrupBombTurnDmgEnd:
	end2

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why would the fail instruction in statbuffchange be BattleScript_SyrupBombTurnDmgPrintMsg in this case?

Though this looks much cleaner and overall better to understand, thank you.

Copy link

@Skeli789 Skeli789 Oct 16, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In the CFRU I have setbyte MULTISTRING_CHOOSER 0x4 at the end of each of those "redirection" battle scripts. But you probably don't, so probably better BattleScript_SyrupBombTurnDmgEnd, yeah.

data/battle_scripts_1.s Show resolved Hide resolved
@Skeli789
Copy link

Skeli789 commented Jan 8, 2024

As reported on https://www.smogon.com/forums/threads/scarlet-violet-battle-mechanics-research.3709545/page-41#post-9857447, Syrup Bomb needs to be cleared when the original user leaves the field.

@AlexOn1ine
Copy link
Collaborator Author

As reported on https://www.smogon.com/forums/threads/scarlet-violet-battle-mechanics-research.3709545/page-41#post-9857447, Syrup Bomb needs to be cleared when the original user leaves the field.

Oh, thank you for the notification. I will take care of it.

@AlexOn1ine AlexOn1ine deleted the teal_mask_moves branch April 19, 2024 12:30
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.

None yet

4 participants