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

EFFECT_CHILLY_RECEPTION #3379

Merged
merged 22 commits into from
Dec 6, 2023
Merged
Show file tree
Hide file tree
Changes from 12 commits
Commits
Show all changes
22 commits
Select commit Hold shift + click to select a range
f7a5ee4
Merge branch 'master' of https://github.com/rh-hideout/pokeemerald-ex…
Oct 2, 2023
fcd4f13
Merge branch 'upcoming' of https://github.com/rh-hideout/pokeemerald-…
Oct 4, 2023
0cbd72e
Chilly Reception Effect
Oct 2, 2023
04a26ea
Wrap Chilling Reception Message Better
Oct 5, 2023
a91a661
Animation & Some Testing
Oct 8, 2023
4fa1a87
Merge branch 'upcoming' of https://github.com/rh-hideout/pokeemerald-…
Oct 8, 2023
4f830e5
Remove Wimp Out cases from Chilly Reception tests
Oct 8, 2023
2331f1e
Animation tweaks
Oct 8, 2023
7dd849a
Merge branch 'upcoming' of https://github.com/rh-hideout/pokeemerald-…
Oct 30, 2023
5ddd758
Battle Script Updates
Oct 30, 2023
d144c05
Fixed test: Move does not animate if weather fails to change
Oct 30, 2023
bc84fa3
Remove snow animation check during failure path test
Oct 31, 2023
4e73a90
Merge branch 'upcoming' of https://github.com/rh-hideout/pokeemerald-…
Nov 2, 2023
06b23a8
* Fix indentation
Nov 2, 2023
8fe6fa7
Updates to MoveSwitch and PartingShot to get closer to original logic
Nov 2, 2023
e6a316c
Merge branch 'upcoming' of https://github.com/rh-hideout/pokeemerald-…
Nov 14, 2023
51fb4e5
Update BattleScript_EffectChillyReception logic
Nov 15, 2023
7d912d7
Merge branch 'upcoming' of https://github.com/rh-hideout/pokeemerald-…
Nov 15, 2023
263de61
Merge branch 'upcoming' of https://github.com/rh-hideout/pokeemerald-…
Dec 3, 2023
b077bf8
* Move CHILLY_RECEPTION animation
Dec 3, 2023
ece4e3e
Fix Chilly Reception MESSAGE checks
Dec 6, 2023
9855868
Merge branch 'upcoming' into chilly-reception
AlexOn1ine Dec 6, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
71 changes: 71 additions & 0 deletions data/battle_anim_scripts.s
Original file line number Diff line number Diff line change
Expand Up @@ -16659,7 +16659,78 @@ Move_RUINATION::
Move_COLLISION_COURSE::
Move_ELECTRO_DRIFT::
Move_SHED_TAIL::

Move_CHILLY_RECEPTION::
loadspritegfx ANIM_TAG_CONFETTI
loadspritegfx ANIM_TAG_PINK_CLOUD
loadspritegfx ANIM_TAG_ICE_CRYSTALS
createvisualtask AnimTask_RotateMonSpriteToSide, 2, 16, 96, ANIM_ATTACKER, 1
createvisualtask AnimTask_BlendColorCycle, 2, F_PAL_ATTACKER, 0, 1, 0, 13, RGB_BLACK
delay 60
waitforvisualfinish
createvisualtask AnimTask_BlendColorCycle, 2, F_PAL_ATTACKER, 0, 1, 13, 0, RGB_BLACK
createsprite gSlideMonToOriginalPosSpriteTemplate, ANIM_ATTACKER, 2, 1, 0, 7
waitforvisualfinish
createvisualtask SoundTask_PlayDoubleCry, 2, ANIM_ATTACKER, DOUBLE_CRY_ROAR
setalpha 12, 4
monbg ANIM_ATTACKER
playsewithpan SE_BALL_OPEN, SOUND_PAN_TARGET
createsprite gSmokeBallEscapeCloudSpriteTemplate, ANIM_ATTACKER, 122, 3, -14, 18, 24
createsprite gSmokeBallEscapeCloudSpriteTemplate, ANIM_ATTACKER, 121, 3, 14, 6, 24
createsprite gSmokeBallEscapeCloudSpriteTemplate, ANIM_ATTACKER, 120, 3, -12, 12, 24
createsprite gSmokeBallEscapeCloudSpriteTemplate, ANIM_ATTACKER, 119, 3, 14, 18, 24
createsprite gSmokeBallEscapeCloudSpriteTemplate, ANIM_ATTACKER, 118, 3, 0, 0, 24
call CreateFlatterConfetti
call CreateFlatterConfetti
call CreateFlatterConfetti
call CreateFlatterConfetti
call CreateFlatterConfetti
call CreateFlatterConfetti
call CreateFlatterConfetti
call CreateFlatterConfetti
call CreateFlatterConfetti
call CreateFlatterConfetti
call CreateFlatterConfetti
call CreateFlatterConfetti
call CreateFlatterConfetti
call CreateFlatterConfetti
call CreateFlatterConfetti
call CreateFlatterConfetti
call CreateFlatterConfetti
call CreateFlatterConfetti
call CreateFlatterConfetti
call CreateFlatterConfetti
waitforvisualfinish
clearmonbg ANIM_ATTACKER
delay 10
createsprite gSimplePaletteBlendSpriteTemplate, ANIM_ATTACKER, 2, F_PAL_BG | F_PAL_BATTLERS, 1, 0, 3, RGB_WHITE
playsewithpan SE_M_GUST, SOUND_PAN_ATTACKER
call ChillyReceptionSnowballs
call ChillyReceptionSnowballs
call ChillyReceptionSnowballs
call ChillyReceptionSnowballs
playsewithpan SE_M_GUST2, SOUND_PAN_TARGET
waitforvisualfinish
waitsound
createsprite gSimplePaletteBlendSpriteTemplate, ANIM_ATTACKER, 2, F_PAL_BG | F_PAL_BATTLERS, 1, 3, 0, RGB_WHITE
end
ChillyReceptionSnowballs:
createsprite gPowderSnowSnowballSpriteTemplate, ANIM_ATTACKER, 40, 200, -150, 24, 0, 56, 4, 4, 0
delay 3
createsprite gPowderSnowSnowballSpriteTemplate, ANIM_ATTACKER, 40, 200, -100, 24, -10, 56, 4, 4, 0
delay 3
createsprite gPowderSnowSnowballSpriteTemplate, ANIM_ATTACKER, 40, 200, -100, 24, 10, 56, -4, 3, 0
delay 3
createsprite gPowderSnowSnowballSpriteTemplate, ANIM_ATTACKER, 40, 200, -200, 24, -20, 56, -4, 5, 0
delay 3
createsprite gPowderSnowSnowballSpriteTemplate, ANIM_ATTACKER, 40, 200, -150, 24, 15, 56, 4, 4, 0
delay 3
createsprite gPowderSnowSnowballSpriteTemplate, ANIM_ATTACKER, 40, 200, -200, 24, -20, 56, 4, 4, 0
delay 3
createsprite gPowderSnowSnowballSpriteTemplate, ANIM_ATTACKER, 40, 200, -200, 24, 20, 56, 4, 4, 0
delay 3
return

Move_TIDY_UP::
Move_POUNCE::
Move_TRAILBLAZE::
Expand Down
125 changes: 72 additions & 53 deletions data/battle_scripts_1.s
Original file line number Diff line number Diff line change
Expand Up @@ -436,7 +436,8 @@ gBattleScriptsForMoveEffects::
.4byte BattleScript_EffectHit @ EFFECT_POPULATION_BOMB
.4byte BattleScript_EffectMortalSpin @ EFFECT_MORTAL_SPIN
.4byte BattleScript_EffectSaltCure @ EFFECT_SALT_CURE
.4byte BattleScript_EffectMatchaGotcha @ EFFECT_MATCHA_GOTCHA
.4byte BattleScript_EffectChillyReception @ EFFECT_CHILLY_RECEPTION
.4byte BattleScript_EffectMatchaGotcha @ EFFECT_MATCHA_GOTCHA
.4byte BattleScript_EffectSyrupBomb @ EFFECT_SYRUP_BOMB
.4byte BattleScript_EffectHit @ EFFECT_IVY_CUDGEL
.4byte BattleScript_EffectMaxMove @ EFFECT_MAX_MOVE
Expand Down Expand Up @@ -466,6 +467,62 @@ BattleScript_SyrupBombTurnDmgEnd:
BattleScript_EffectMatchaGotcha::
setmoveeffect MOVE_EFFECT_BURN
goto BattleScript_EffectAbsorb
end

BattleScript_EffectChillyReception::
RapidNutcracker marked this conversation as resolved.
Show resolved Hide resolved
printstring STRINGID_PKMNTELLCHILLINGRECEPTIONJOKE
RapidNutcracker marked this conversation as resolved.
Show resolved Hide resolved
attackcanceler
waitmessage B_WAIT_TIME_LONG
RapidNutcracker marked this conversation as resolved.
Show resolved Hide resolved
attackstring
ppreduce
jumpifhalfword CMP_COMMON_BITS, gBattleWeather, B_WEATHER_SUN_PRIMAL, BattleScript_ExtremelyHarshSunlightWasNotLessenedRet
jumpifhalfword CMP_COMMON_BITS, gBattleWeather, B_WEATHER_RAIN_PRIMAL, BattleScript_EffectChillyReceptionBlockedByPrimalRain
jumpifhalfword CMP_COMMON_BITS, gBattleWeather, B_WEATHER_STRONG_WINDS, BattleScript_MysteriousAirCurrentBlowsOnRet
attackanimation
waitanimation
setsnow
call BattleScript_MoveWeatherChangeRet
goto BattleScript_MoveSwitch
BattleScript_EffectChillyReceptionBlockedByPrimalSun:
call BattleScript_ExtremelyHarshSunlightWasNotLessenedRet
goto BattleScript_MoveSwitch
RapidNutcracker marked this conversation as resolved.
Show resolved Hide resolved
BattleScript_EffectChillyReceptionBlockedByPrimalRain:
call BattleScript_NoReliefFromHeavyRainRet
goto BattleScript_MoveSwitch
BattleScript_EffectChillyReceptionBlockedByStrongWinds:
call BattleScript_MysteriousAirCurrentBlowsOnRet
goto BattleScript_MoveSwitch
BattleScript_EffectChillyReceptionEnd:
RapidNutcracker marked this conversation as resolved.
Show resolved Hide resolved
end

BattleScript_CheckPrimalWeather:
jumpifhalfword CMP_COMMON_BITS, gBattleWeather, B_WEATHER_SUN_PRIMAL, BattleScript_ExtremelyHarshSunlightWasNotLessened
jumpifhalfword CMP_COMMON_BITS, gBattleWeather, B_WEATHER_RAIN_PRIMAL, BattleScript_NoReliefFromHeavyRain
jumpifhalfword CMP_COMMON_BITS, gBattleWeather, B_WEATHER_STRONG_WINDS, BattleScript_MysteriousAirCurrentBlowsOn
return
RapidNutcracker marked this conversation as resolved.
Show resolved Hide resolved

BattleScript_MoveSwitch:
jumpifbattletype BATTLE_TYPE_ARENA, BattleScript_MoveEnd
jumpifcantswitch SWITCH_IGNORE_ESCAPE_PREVENTION | BS_ATTACKER, BattleScript_MoveEnd
printstring STRINGID_PKMNWENTBACK
waitmessage B_WAIT_TIME_SHORT
openpartyscreen BS_ATTACKER, BattleScript_MoveEnd
switchoutabilities BS_ATTACKER
waitstate
switchhandleorder BS_ATTACKER, 2
returntoball BS_ATTACKER
getswitchedmondata BS_ATTACKER
switchindataupdate BS_ATTACKER
hpthresholds BS_ATTACKER
trytoclearprimalweather
printstring STRINGID_EMPTYSTRING3
waitmessage 1
printstring STRINGID_SWITCHINMON
switchinanim BS_ATTACKER, TRUE
waitstate
switchineffects BS_ATTACKER
BattleScript_MoveSwitchEnd:
goto BattleScript_MoveEnd

BattleScript_EffectSaltCure:
call BattleScript_EffectHit_Ret
Expand Down Expand Up @@ -1596,27 +1653,10 @@ BattleScript_EffectPartingShotTryAtk:
BattleScript_EffectPartingShotTrySpAtk:
playstatchangeanimation BS_TARGET, BIT_SPATK, STAT_CHANGE_NEGATIVE
setstatchanger STAT_SPATK, 1, TRUE
statbuffchange STAT_CHANGE_ALLOW_PTR, BattleScript_EffectPartingShotSwitch
statbuffchange STAT_CHANGE_ALLOW_PTR, BattleScript_MoveSwitch
printfromtable gStatDownStringIds
waitmessage B_WAIT_TIME_LONG
BattleScript_EffectPartingShotSwitch:
moveendall
RapidNutcracker marked this conversation as resolved.
Show resolved Hide resolved
jumpifbattletype BATTLE_TYPE_ARENA, BattleScript_PartingShotEnd
jumpifcantswitch SWITCH_IGNORE_ESCAPE_PREVENTION | BS_ATTACKER, BattleScript_PartingShotEnd
openpartyscreen BS_ATTACKER, BattleScript_PartingShotEnd
switchoutabilities BS_ATTACKER
waitstate
switchhandleorder BS_ATTACKER, 2
returntoball BS_ATTACKER
getswitchedmondata BS_ATTACKER
switchindataupdate BS_ATTACKER
hpthresholds BS_ATTACKER
trytoclearprimalweather
flushtextbox
printstring STRINGID_SWITCHINMON
switchinanim BS_ATTACKER, TRUE
waitstate
switchineffects BS_ATTACKER
goto BattleScript_MoveSwitch
BattleScript_PartingShotEnd:
end

Expand Down Expand Up @@ -3078,23 +3118,8 @@ BattleScript_EffectHitEscape:
moveendfrom MOVEEND_TARGET_VISIBLE
jumpifbattleend BattleScript_HitEscapeEnd
jumpifbyte CMP_NOT_EQUAL gBattleOutcome 0, BattleScript_HitEscapeEnd
jumpifbattletype BATTLE_TYPE_ARENA, BattleScript_HitEscapeEnd
RapidNutcracker marked this conversation as resolved.
Show resolved Hide resolved
jumpifcantswitch SWITCH_IGNORE_ESCAPE_PREVENTION | BS_ATTACKER, BattleScript_HitEscapeEnd
jumpifemergencyexited BS_TARGET, BattleScript_HitEscapeEnd
openpartyscreen BS_ATTACKER, BattleScript_HitEscapeEnd
switchoutabilities BS_ATTACKER
waitstate
switchhandleorder BS_ATTACKER, 2
returntoball BS_ATTACKER
getswitchedmondata BS_ATTACKER
switchindataupdate BS_ATTACKER
hpthresholds BS_ATTACKER
trytoclearprimalweather
flushtextbox
printstring STRINGID_SWITCHINMON
switchinanim BS_ATTACKER, TRUE
waitstate
switchineffects BS_ATTACKER
goto BattleScript_MoveSwitch
BattleScript_HitEscapeEnd:
end

Expand Down Expand Up @@ -4876,9 +4901,7 @@ BattleScript_EffectSandstorm::
attackcanceler
attackstring
ppreduce
jumpifhalfword CMP_COMMON_BITS, gBattleWeather, B_WEATHER_SUN_PRIMAL, BattleScript_ExtremelyHarshSunlightWasNotLessened
jumpifhalfword CMP_COMMON_BITS, gBattleWeather, B_WEATHER_RAIN_PRIMAL, BattleScript_NoReliefFromHeavyRain
jumpifhalfword CMP_COMMON_BITS, gBattleWeather, B_WEATHER_STRONG_WINDS, BattleScript_MysteriousAirCurrentBlowsOn
call BattleScript_CheckPrimalWeather
setsandstorm
goto BattleScript_MoveWeatherChange

Expand Down Expand Up @@ -5067,25 +5090,25 @@ BattleScript_EffectRainDance::
attackcanceler
attackstring
ppreduce
jumpifhalfword CMP_COMMON_BITS, gBattleWeather, B_WEATHER_SUN_PRIMAL, BattleScript_ExtremelyHarshSunlightWasNotLessened
jumpifhalfword CMP_COMMON_BITS, gBattleWeather, B_WEATHER_RAIN_PRIMAL, BattleScript_NoReliefFromHeavyRain
jumpifhalfword CMP_COMMON_BITS, gBattleWeather, B_WEATHER_STRONG_WINDS, BattleScript_MysteriousAirCurrentBlowsOn
call BattleScript_CheckPrimalWeather
setrain
BattleScript_MoveWeatherChange::
attackanimation
waitanimation
call BattleScript_MoveWeatherChangeRet
goto BattleScript_MoveEnd

BattleScript_MoveWeatherChangeRet::
printfromtable gMoveWeatherChangeStringIds
waitmessage B_WAIT_TIME_LONG
call BattleScript_ActivateWeatherAbilities
goto BattleScript_MoveEnd
return

BattleScript_EffectSunnyDay::
attackcanceler
attackstring
ppreduce
jumpifhalfword CMP_COMMON_BITS, gBattleWeather, B_WEATHER_SUN_PRIMAL, BattleScript_ExtremelyHarshSunlightWasNotLessened
jumpifhalfword CMP_COMMON_BITS, gBattleWeather, B_WEATHER_RAIN_PRIMAL, BattleScript_NoReliefFromHeavyRain
jumpifhalfword CMP_COMMON_BITS, gBattleWeather, B_WEATHER_STRONG_WINDS, BattleScript_MysteriousAirCurrentBlowsOn
call BattleScript_CheckPrimalWeather
setsunny
goto BattleScript_MoveWeatherChange

Expand Down Expand Up @@ -5549,9 +5572,7 @@ BattleScript_EffectHail::
attackcanceler
attackstring
ppreduce
jumpifhalfword CMP_COMMON_BITS, gBattleWeather, B_WEATHER_SUN_PRIMAL, BattleScript_ExtremelyHarshSunlightWasNotLessened
jumpifhalfword CMP_COMMON_BITS, gBattleWeather, B_WEATHER_RAIN_PRIMAL, BattleScript_NoReliefFromHeavyRain
jumpifhalfword CMP_COMMON_BITS, gBattleWeather, B_WEATHER_STRONG_WINDS, BattleScript_MysteriousAirCurrentBlowsOn
call BattleScript_CheckPrimalWeather
sethail
goto BattleScript_MoveWeatherChange

Expand Down Expand Up @@ -10668,9 +10689,7 @@ BattleScript_BerserkGeneRet_End:
BattleScript_EffectSnow::
attackcanceler
attackstring
ppreduce
jumpifhalfword CMP_COMMON_BITS, gBattleWeather, B_WEATHER_SUN_PRIMAL, BattleScript_ExtremelyHarshSunlightWasNotLessened
jumpifhalfword CMP_COMMON_BITS, gBattleWeather, B_WEATHER_RAIN_PRIMAL, BattleScript_NoReliefFromHeavyRain
jumpifhalfword CMP_COMMON_BITS, gBattleWeather, B_WEATHER_STRONG_WINDS, BattleScript_MysteriousAirCurrentBlowsOn
ppreduce
call BattleScript_CheckPrimalWeather
RapidNutcracker marked this conversation as resolved.
Show resolved Hide resolved
setsnow
goto BattleScript_MoveWeatherChange
11 changes: 6 additions & 5 deletions include/constants/battle_move_effects.h
Original file line number Diff line number Diff line change
Expand Up @@ -413,11 +413,12 @@
#define EFFECT_POPULATION_BOMB 407
#define EFFECT_MORTAL_SPIN 408
#define EFFECT_SALT_CURE 409
#define EFFECT_MATCHA_GOTCHA 410
#define EFFECT_SYRUP_BOMB 411
#define EFFECT_IVY_CUDGEL 412
#define EFFECT_MAX_MOVE 413
#define EFFECT_CHILLY_RECEPTION 410
#define EFFECT_MATCHA_GOTCHA 411
#define EFFECT_SYRUP_BOMB 412
#define EFFECT_IVY_CUDGEL 413
#define EFFECT_MAX_MOVE 414

#define NUM_BATTLE_MOVE_EFFECTS 414
#define NUM_BATTLE_MOVE_EFFECTS 415

#endif // GUARD_CONSTANTS_BATTLE_MOVE_EFFECTS_H
3 changes: 2 additions & 1 deletion include/constants/battle_string_ids.h
Original file line number Diff line number Diff line change
Expand Up @@ -685,8 +685,9 @@
#define STRINGID_TEAMSURROUNDEDBYROCKS 683
#define STRINGID_PKMNHURTBYROCKSTHROWN 684
#define STRINGID_MOVEBLOCKEDBYDYNAMAX 685
#define STRINGID_PKMNTELLCHILLINGRECEPTIONJOKE 686

#define BATTLESTRINGS_COUNT 686
#define BATTLESTRINGS_COUNT 687

// This is the string id that gBattleStringsTable starts with.
// String ids before this (e.g. STRINGID_INTROMSG) are not in the table,
Expand Down
2 changes: 2 additions & 0 deletions src/battle_message.c
Original file line number Diff line number Diff line change
Expand Up @@ -822,9 +822,11 @@ static const u8 sText_TargetIsBeingSaltCured[] = _("{B_DEF_NAME_WITH_PREFIX} is
static const u8 sText_TargetIsHurtBySaltCure[] = _("{B_DEF_NAME_WITH_PREFIX} is hurt by {B_BUFF1}!");
static const u8 sText_OpportunistCopied[] = _("{B_SCR_ACTIVE_NAME_WITH_PREFIX} copied its\nopponent's stat changes!");
static const u8 sText_TargetCoveredInStickyCandySyrup[] = _("{B_DEF_NAME_WITH_PREFIX} got covered\nin sticky syrup!");
static const u8 sText_PkmnTellChillingReceptionJoke[] = _("{B_ATK_NAME_WITH_PREFIX} is preparing to tell a\nchillingly bad joke!");

const u8 *const gBattleStringsTable[BATTLESTRINGS_COUNT] =
{
[STRINGID_PKMNTELLCHILLINGRECEPTIONJOKE - BATTLESTRINGS_TABLE_START] = sText_PkmnTellChillingReceptionJoke,
[STRINGID_MOVEBLOCKEDBYDYNAMAX - BATTLESTRINGS_TABLE_START] = sText_MoveBlockedByDynamax,
[STRINGID_OPPORTUNISTCOPIED - BATTLESTRINGS_TABLE_START] = sText_OpportunistCopied,
[STRINGID_TARGETISHURTBYSALTCURE - BATTLESTRINGS_TABLE_START] = sText_TargetIsHurtBySaltCure,
Expand Down
2 changes: 1 addition & 1 deletion src/data/battle_moves.h
Original file line number Diff line number Diff line change
Expand Up @@ -13958,7 +13958,7 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_DYNAMAX] =

[MOVE_CHILLY_RECEPTION] =
{
.effect = EFFECT_PLACEHOLDER, // EFFECT_CHILLY_RECEPTION
.effect = EFFECT_CHILLY_RECEPTION,
.power = 0,
.type = TYPE_ICE,
.accuracy = 0,
Expand Down
Loading
Loading