Skip to content

Commit

Permalink
Merge pull request #256 from BuffelSaft/1.8
Browse files Browse the repository at this point in the history
1.8 changes
  • Loading branch information
BuffelSaft authored Oct 10, 2021
2 parents fa304af + 1c5bcc0 commit b244b59
Show file tree
Hide file tree
Showing 54 changed files with 1,959 additions and 883 deletions.
4 changes: 4 additions & 0 deletions asm/macros/battle_script.inc
Original file line number Diff line number Diff line change
Expand Up @@ -1830,6 +1830,10 @@
.byte \restoreItem
.endm
.macro trytoclearprimalweather
various BS_ATTACKER, VARIOUS_TRY_TO_CLEAR_PRIMAL_WEATHER
.endm

@ helpful macros
.macro setstatchanger stat:req, stages:req, down:req
setbyte sSTATCHANGER \stat | \stages << 3 | \down << 7
Expand Down
12 changes: 12 additions & 0 deletions data/battle_anim_scripts.s
Original file line number Diff line number Diff line change
Expand Up @@ -823,6 +823,7 @@ gBattleAnims_General::
.4byte General_RestoreBg @ B_ANIM_RESTORE_BG
.4byte General_TotemFlare @ B_ANIM_TOTEM_FLARE
.4byte General_GulpMissile @ B_ANIM_GULP_MISSILE
.4byte General_StrongWinds @ B_ANIM_STRONG_WINDS
.4byte General_ItemHealsHP @ B_ANIM_ITEM_HEAL

.align 2
Expand Down Expand Up @@ -24427,6 +24428,17 @@ General_GulpMissile: @ Tackle anim (placeholder)
blendoff
end

General_StrongWinds::
loadspritegfx ANIM_TAG_FLYING_DIRT
playsewithpan SE_M_GUST, 0
createvisualtask AnimTask_BlendParticle, 5, ANIM_TAG_FLYING_DIRT, 0, 12, 12, RGB(20, 20, 20)
waitforvisualfinish
createvisualtask AnimTask_LoadWindstormBackground, 5, FALSE
delay 32
waitforvisualfinish
stopsound
end

RainbowEndureEffect:
launchtemplate gBlueEndureEnergySpriteTemplate 0x2 0x4 0x0 0xffe8 0x1a 0x2
delay 0x3
Expand Down
175 changes: 175 additions & 0 deletions data/battle_scripts_1.s
Original file line number Diff line number Diff line change
Expand Up @@ -656,6 +656,9 @@ BattleScript_MoveEffectCoreEnforcer::
setgastroacid BattleScript_CoreEnforcerRet
printstring STRINGID_PKMNSABILITYSUPPRESSED
waitmessage B_WAIT_TIME_LONG
trytoclearprimalweather
printstring STRINGID_EMPTYSTRING3
waitmessage 1
BattleScript_CoreEnforcerRet:
return

Expand Down Expand Up @@ -748,6 +751,9 @@ BattleScript_EffectPartingShotSwitch:
getswitchedmondata BS_ATTACKER
switchindataupdate BS_ATTACKER
hpthresholds BS_ATTACKER
trytoclearprimalweather
printstring STRINGID_EMPTYSTRING3
waitmessage 1
printstring STRINGID_SWITCHINMON
switchinanim BS_ATTACKER, TRUE
waitstate
Expand Down Expand Up @@ -1754,6 +1760,9 @@ BattleScript_EffectSimpleBeam:
waitanimation
printstring STRINGID_PKMNACQUIREDSIMPLE
waitmessage B_WAIT_TIME_LONG
trytoclearprimalweather
printstring STRINGID_EMPTYSTRING3
waitmessage 1
goto BattleScript_MoveEnd

BattleScript_EffectSuckerPunch:
Expand Down Expand Up @@ -1802,6 +1811,9 @@ BattleScript_EffectHealingWish:
getswitchedmondata BS_ATTACKER
switchindataupdate BS_ATTACKER
hpthresholds BS_ATTACKER
trytoclearprimalweather
printstring STRINGID_EMPTYSTRING3
waitmessage 1
printstring STRINGID_SWITCHINMON
switchinanim BS_ATTACKER, TRUE
waitstate
Expand Down Expand Up @@ -1839,6 +1851,9 @@ BattleScript_EffectWorrySeed:
waitanimation
printstring STRINGID_PKMNACQUIREDABILITY
waitmessage B_WAIT_TIME_LONG
trytoclearprimalweather
printstring STRINGID_EMPTYSTRING3
waitmessage 1
goto BattleScript_MoveEnd

BattleScript_EffectPowerSplit:
Expand Down Expand Up @@ -1967,6 +1982,9 @@ BattleScript_EffectGastroAcid:
waitanimation
printstring STRINGID_PKMNSABILITYSUPPRESSED
waitmessage B_WAIT_TIME_LONG
trytoclearprimalweather
printstring STRINGID_EMPTYSTRING3
waitmessage 1
goto BattleScript_MoveEnd

BattleScript_EffectToxicSpikes:
Expand Down Expand Up @@ -2161,6 +2179,9 @@ BattleScript_EffectHitEscape:
getswitchedmondata BS_ATTACKER
switchindataupdate BS_ATTACKER
hpthresholds BS_ATTACKER
trytoclearprimalweather
printstring STRINGID_EMPTYSTRING3
waitmessage 1
printstring STRINGID_SWITCHINMON
switchinanim BS_ATTACKER, TRUE
waitstate
Expand Down Expand Up @@ -3102,6 +3123,9 @@ BattleScript_EffectTransform::
attackcanceler
attackstring
ppreduce
trytoclearprimalweather
printstring STRINGID_EMPTYSTRING3
waitmessage 1
transformdataexecution
attackanimation
waitanimation
Expand Down Expand Up @@ -3859,6 +3883,9 @@ BattleScript_EffectSandstorm::
attackcanceler
attackstring
ppreduce
jumpifhalfword CMP_COMMON_BITS, gBattleWeather, WEATHER_SUN_PRIMAL, BattleScript_ExtremelyHarshSunlightWasNotLessened
jumpifhalfword CMP_COMMON_BITS, gBattleWeather, WEATHER_RAIN_PRIMAL, BattleScript_NoReliefFromHeavyRain
jumpifhalfword CMP_COMMON_BITS, gBattleWeather, WEATHER_STRONG_WINDS, BattleScript_MysteriousAirCurrentBlowsOn
setsandstorm
goto BattleScript_MoveWeatherChange

Expand Down Expand Up @@ -3992,6 +4019,9 @@ BattleScript_EffectBatonPass::
getswitchedmondata BS_ATTACKER
switchindataupdate BS_ATTACKER
hpthresholds BS_ATTACKER
trytoclearprimalweather
printstring STRINGID_EMPTYSTRING3
waitmessage 1
printstring STRINGID_SWITCHINMON
switchinanim BS_ATTACKER, TRUE
waitstate
Expand Down Expand Up @@ -4061,6 +4091,9 @@ BattleScript_EffectRainDance::
attackcanceler
attackstring
ppreduce
jumpifhalfword CMP_COMMON_BITS, gBattleWeather, WEATHER_SUN_PRIMAL, BattleScript_ExtremelyHarshSunlightWasNotLessened
jumpifhalfword CMP_COMMON_BITS, gBattleWeather, WEATHER_RAIN_PRIMAL, BattleScript_NoReliefFromHeavyRain
jumpifhalfword CMP_COMMON_BITS, gBattleWeather, WEATHER_STRONG_WINDS, BattleScript_MysteriousAirCurrentBlowsOn
setrain
BattleScript_MoveWeatherChange::
attackanimation
Expand All @@ -4074,9 +4107,80 @@ BattleScript_EffectSunnyDay::
attackcanceler
attackstring
ppreduce
jumpifhalfword CMP_COMMON_BITS, gBattleWeather, WEATHER_SUN_PRIMAL, BattleScript_ExtremelyHarshSunlightWasNotLessened
jumpifhalfword CMP_COMMON_BITS, gBattleWeather, WEATHER_RAIN_PRIMAL, BattleScript_NoReliefFromHeavyRain
jumpifhalfword CMP_COMMON_BITS, gBattleWeather, WEATHER_STRONG_WINDS, BattleScript_MysteriousAirCurrentBlowsOn
setsunny
goto BattleScript_MoveWeatherChange

BattleScript_ExtremelyHarshSunlightWasNotLessened:
pause B_WAIT_TIME_SHORT
printstring STRINGID_EXTREMELYHARSHSUNLIGHTWASNOTLESSENED
waitmessage B_WAIT_TIME_LONG
goto BattleScript_MoveEnd

BattleScript_ExtremelyHarshSunlightWasNotLessenedEnd3:
pause B_WAIT_TIME_SHORT
printstring STRINGID_EXTREMELYHARSHSUNLIGHTWASNOTLESSENED
waitmessage B_WAIT_TIME_LONG
end3

BattleScript_ExtremelyHarshSunlightWasNotLessenedRet:
pause B_WAIT_TIME_SHORT
printstring STRINGID_EXTREMELYHARSHSUNLIGHTWASNOTLESSENED
waitmessage B_WAIT_TIME_LONG
return

BattleScript_NoReliefFromHeavyRain:
pause B_WAIT_TIME_SHORT
printstring STRINGID_NORELIEFROMHEAVYRAIN
waitmessage B_WAIT_TIME_LONG
goto BattleScript_MoveEnd

BattleScript_NoReliefFromHeavyRainEnd3:
pause B_WAIT_TIME_SHORT
printstring STRINGID_NORELIEFROMHEAVYRAIN
waitmessage B_WAIT_TIME_LONG
end3

BattleScript_NoReliefFromHeavyRainRet:
pause B_WAIT_TIME_SHORT
printstring STRINGID_NORELIEFROMHEAVYRAIN
waitmessage B_WAIT_TIME_LONG
return

BattleScript_MysteriousAirCurrentBlowsOn:
pause B_WAIT_TIME_SHORT
printstring STRINGID_MYSTERIOUSAIRCURRENTBLOWSON
waitmessage B_WAIT_TIME_LONG
goto BattleScript_MoveEnd

BattleScript_MysteriousAirCurrentBlowsOnEnd3:
pause B_WAIT_TIME_SHORT
printstring STRINGID_MYSTERIOUSAIRCURRENTBLOWSON
waitmessage B_WAIT_TIME_LONG
end3

BattleScript_MysteriousAirCurrentBlowsOnRet:
pause B_WAIT_TIME_SHORT
printstring STRINGID_MYSTERIOUSAIRCURRENTBLOWSON
waitmessage B_WAIT_TIME_LONG
return

BattleScript_BlockedByPrimalWeatherEnd3::
call BattleScript_AbilityPopUp
jumpifhalfword CMP_COMMON_BITS, gBattleWeather, WEATHER_SUN_PRIMAL, BattleScript_ExtremelyHarshSunlightWasNotLessenedEnd3
jumpifhalfword CMP_COMMON_BITS, gBattleWeather, WEATHER_RAIN_PRIMAL, BattleScript_NoReliefFromHeavyRainEnd3
jumpifhalfword CMP_COMMON_BITS, gBattleWeather, WEATHER_STRONG_WINDS, BattleScript_MysteriousAirCurrentBlowsOnEnd3
end3

BattleScript_BlockedByPrimalWeatherRet::
call BattleScript_AbilityPopUp
jumpifhalfword CMP_COMMON_BITS, gBattleWeather, WEATHER_SUN_PRIMAL, BattleScript_ExtremelyHarshSunlightWasNotLessenedRet
jumpifhalfword CMP_COMMON_BITS, gBattleWeather, WEATHER_RAIN_PRIMAL, BattleScript_NoReliefFromHeavyRainRet
jumpifhalfword CMP_COMMON_BITS, gBattleWeather, WEATHER_STRONG_WINDS, BattleScript_MysteriousAirCurrentBlowsOnRet
return

BattleScript_EffectDefenseUpHit::
setmoveeffect MOVE_EFFECT_DEF_PLUS_1 | MOVE_EFFECT_AFFECTS_USER
goto BattleScript_EffectHit
Expand Down Expand Up @@ -4443,6 +4547,9 @@ BattleScript_EffectHail::
attackcanceler
attackstring
ppreduce
jumpifhalfword CMP_COMMON_BITS, gBattleWeather, WEATHER_SUN_PRIMAL, BattleScript_ExtremelyHarshSunlightWasNotLessened
jumpifhalfword CMP_COMMON_BITS, gBattleWeather, WEATHER_RAIN_PRIMAL, BattleScript_NoReliefFromHeavyRain
jumpifhalfword CMP_COMMON_BITS, gBattleWeather, WEATHER_STRONG_WINDS, BattleScript_MysteriousAirCurrentBlowsOn
sethail
goto BattleScript_MoveWeatherChange

Expand Down Expand Up @@ -5193,6 +5300,9 @@ BattleScript_FaintedMonTryChooseAnother:
getswitchedmondata BS_ATTACKER
switchindataupdate BS_ATTACKER
hpthresholds BS_ATTACKER
trytoclearprimalweather
printstring STRINGID_EMPTYSTRING3
waitmessage 1
printstring STRINGID_SWITCHINMON
hidepartystatussummary BS_ATTACKER
switchinanim BS_ATTACKER, 0
Expand All @@ -5203,6 +5313,9 @@ BattleScript_FaintedMonChooseAnother:
getswitchedmondata BS_FAINTED
switchindataupdate BS_FAINTED
hpthresholds BS_FAINTED
trytoclearprimalweather
printstring STRINGID_EMPTYSTRING3
waitmessage 1
printstring STRINGID_SWITCHINMON
hidepartystatussummary BS_FAINTED
switchinanim BS_FAINTED, FALSE
Expand Down Expand Up @@ -5235,6 +5348,9 @@ BattleScript_HandleFaintedMonLoop::
getswitchedmondata BS_FAINTED
switchindataupdate BS_FAINTED
hpthresholds BS_FAINTED
trytoclearprimalweather
printstring STRINGID_EMPTYSTRING3
waitmessage 1
printstring STRINGID_SWITCHINMON
hidepartystatussummary BS_FAINTED
switchinanim BS_FAINTED, FALSE
Expand Down Expand Up @@ -5445,6 +5561,9 @@ BattleScript_DoSwitchOut::
getswitchedmondata BS_ATTACKER
switchindataupdate BS_ATTACKER
hpthresholds BS_ATTACKER
trytoclearprimalweather
printstring STRINGID_EMPTYSTRING3
waitmessage 1
printstring STRINGID_SWITCHINMON
hidepartystatussummary BS_ATTACKER
switchinanim BS_ATTACKER, FALSE
Expand Down Expand Up @@ -5746,6 +5865,9 @@ BattleScript_RoarSuccessSwitch::
call BattleScript_RoarSuccessRet
getswitchedmondata BS_TARGET
switchindataupdate BS_TARGET
trytoclearprimalweather
printstring STRINGID_EMPTYSTRING3
waitmessage 1
switchinanim BS_TARGET, FALSE
waitstate
printstring STRINGID_PKMNWASDRAGGEDOUT
Expand Down Expand Up @@ -7186,6 +7308,56 @@ BattleScript_DroughtActivates::
call BattleScript_WeatherFormChanges
end3

BattleScript_DesolateLandActivates::
pause B_WAIT_TIME_SHORT
call BattleScript_AbilityPopUp
printstring STRINGID_EXTREMELYHARSHSUNLIGHT
waitstate
playanimation BS_BATTLER_0, B_ANIM_SUN_CONTINUES, NULL
call BattleScript_WeatherFormChanges
end3

BattleScript_DesolateLandEvaporatesWaterTypeMoves::
accuracycheck BattleScript_PrintMoveMissed, ACC_CURR_MOVE
attackstring
pause B_WAIT_TIME_SHORT
ppreduce
printstring STRINGID_MOVEEVAPORATEDINTHEHARSHSUNLIGHT
waitmessage B_WAIT_TIME_LONG
goto BattleScript_MoveEnd

BattleScript_PrimordialSeaActivates::
pause B_WAIT_TIME_SHORT
call BattleScript_AbilityPopUp
printstring STRINGID_HEAVYRAIN
waitstate
playanimation BS_BATTLER_0, B_ANIM_RAIN_CONTINUES, NULL
call BattleScript_WeatherFormChanges
end3

BattleScript_PrimordialSeaFizzlesOutFireTypeMoves::
accuracycheck BattleScript_PrintMoveMissed, ACC_CURR_MOVE
attackstring
pause B_WAIT_TIME_SHORT
ppreduce
printstring STRINGID_MOVEFIZZLEDOUTINTHEHEAVYRAIN
waitmessage B_WAIT_TIME_LONG
goto BattleScript_MoveEnd

BattleScript_DeltaStreamActivates::
pause B_WAIT_TIME_SHORT
call BattleScript_AbilityPopUp
printstring STRINGID_MYSTERIOUSAIRCURRENT
waitstate
playanimation BS_ATTACKER, B_ANIM_STRONG_WINDS, NULL
end3

BattleScript_AttackWeakenedByStrongWinds::
pause B_WAIT_TIME_SHORT
printstring STRINGID_ATTACKWEAKENEDBSTRONGWINDS
waitmessage B_WAIT_TIME_LONG
return

BattleScript_SnowWarningActivates::
pause B_WAIT_TIME_SHORT
call BattleScript_AbilityPopUp
Expand Down Expand Up @@ -8370,6 +8542,9 @@ BattleScript_EjectButtonActivates::
getswitchedmondata BS_SCRIPTING
switchindataupdate BS_SCRIPTING
hpthresholds BS_SCRIPTING
trytoclearprimalweather
printstring STRINGID_EMPTYSTRING3
waitmessage 1
printstring 0x3
switchinanim BS_SCRIPTING 0x1
waitstate
Expand Down
1 change: 1 addition & 0 deletions data/maps/AshenWoods/scripts.inc
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ AshenWoods_OnResume::
end

AshenWoods_OnTransition::
setflag FLAG_LANDMARK_ASHEN_WOODS
compare VAR_JAGGED_PASS_ASH_WEATHER, 1
call_if_eq AshenWoods_EventScript_SetWeatherAsh
switch VAR_CHANSEY_NURSE_STATE
Expand Down
5 changes: 5 additions & 0 deletions data/maps/DewfordManor_1F/scripts.inc
Original file line number Diff line number Diff line change
@@ -1,2 +1,7 @@
DewfordManor_1F_MapScripts::
map_script MAP_SCRIPT_ON_TRANSITION, DewfordManor_1F_OnTransition
.byte 0

DewfordManor_1F_OnTransition:
setflag FLAG_LANDMARK_DEWFORD_MANOR
end
5 changes: 5 additions & 0 deletions data/maps/DewfordMeadow/scripts.inc
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
DewfordMeadow_MapScripts::
map_script MAP_SCRIPT_ON_TRANSITION, DewfordMeadow_OnTransition
.byte 0

DewfordMeadow_OnTransition:
setflag FLAG_LANDMARK_DEWFORD_MEADOW
end

DewfordMeadow_EventScript_ManorSign::
msgbox DewfordMeadow_Text_ManorSign, MSGBOX_SIGN
end
Expand Down
5 changes: 5 additions & 0 deletions data/maps/EmberPath/scripts.inc
Original file line number Diff line number Diff line change
@@ -1,7 +1,12 @@
EmberPath_MapScripts::
map_script MAP_SCRIPT_ON_RESUME, Common_EventScript_RemoveOverworldAfterBattle
map_script MAP_SCRIPT_ON_TRANSITION, EmberPath_OnTransition
.byte 0

EmberPath_OnTransition:
setflag FLAG_LANDMARK_EMBER_PATH
end

EmberPath_EventScript_Moltres::
lock
faceplayer
Expand Down
Loading

0 comments on commit b244b59

Please sign in to comment.