From 3d2b861436a522c83dce702961587dc5486d7fdc Mon Sep 17 00:00:00 2001
From: luckytyphlosion <10688458+luckytyphlosion@users.noreply.github.com>
Date: Tue, 23 Jul 2024 17:53:19 -0400
Subject: [PATCH 1/7] Fix WSL1 install instructions
---
INSTALL.md | 20 ++++++++------------
1 file changed, 8 insertions(+), 12 deletions(-)
diff --git a/INSTALL.md b/INSTALL.md
index 30b5d0f25a54..7ffcdee07b85 100644
--- a/INSTALL.md
+++ b/INSTALL.md
@@ -33,27 +33,23 @@ WSL1 is the preferred terminal to build **pokeemerald**. The following instructi
- Otherwise, **open WSL** and go to [Choosing where to store pokeemerald (WSL1)](#Choosing-where-to-store-pokeemerald-WSL1).
### Installing WSL1
-1. Open [Windows Powershell **as Administrator**](https://i.imgur.com/QKmVbP9.png), and run the following command (Right Click or Shift+Insert is paste in the Powershell).
+1. Open [Windows Powershell **as Administrator**](https://i.imgur.com/QKmVbP9.png), and run the following commands (Right Click or Shift+Insert is paste in the Powershell).
```powershell
- dism.exe /online /enable-feature /featurename:Microsoft-Windows-Subsystem-Linux /all /norestart
+ wsl --install -d Ubuntu --enable-wsl1
```
2. Once the process finishes, restart your machine.
-3. The next step is to choose and install a Linux distribution from the Microsoft Store. The following instructions will assume Ubuntu as the Linux distribution of choice.
-
- Note for advanced users...
-
- > You can pick a preferred Linux distribution, but setup instructions may differ. Debian should work with the given instructions, but has not been tested.
-
+3. Open Windows Powershell **as Administrator** again (after restarting), and run the following command to configure Ubuntu to use WSL1.
-4. Open the [Microsoft Store Linux Selection](https://aka.ms/wslstore), click Ubuntu, then click Get, which will install the Ubuntu distribution.
+ ```powershell
+ wsl --set-version Ubuntu 1
+ ```
- Notes...
+ Note...
- > Note 1: If a dialog pops up asking for you to sign into a Microsoft Account, then just close the dialog.
- > Note 2: If the link does not work, then open the Microsoft Store manually, and search for the Ubuntu app (choose the one with no version number).
+ > WSL may open automatically after restarting, but you can ignore it for now.
### Setting up WSL1
From b0b63f66b91afb4a03aa909dc23d2cd8df377599 Mon Sep 17 00:00:00 2001
From: hedara90 <90hedara@gmail.com>
Date: Fri, 26 Jul 2024 18:06:44 +0200
Subject: [PATCH 2/7] Added Ivy Cudgel Animation (#5034)
* Added Ivy Cudgel Anim, changed Ogerpon palettes, added jumpifmovetypeequals command
* Make the 20 year old compiler not complain
* Maybe better cudgel
* Moved animation
---------
Co-authored-by: Hedara
---
asm/macros/battle_anim_script.inc | 6 ++
data/battle_anim_scripts.s | 53 +++++++++++++++++-
graphics/battle_anims/sprites/cudgel.png | Bin 0 -> 319 bytes
graphics/pokemon/ogerpon/back.png | Bin 447 -> 447 bytes
graphics/pokemon/ogerpon/cornerstone/back.png | Bin 537 -> 537 bytes
.../pokemon/ogerpon/cornerstone/front.png | Bin 1002 -> 962 bytes
.../pokemon/ogerpon/cornerstone/normal.pal | 4 +-
.../pokemon/ogerpon/cornerstone/shiny.pal | 4 +-
graphics/pokemon/ogerpon/front.png | Bin 1083 -> 1043 bytes
graphics/pokemon/ogerpon/hearthflame/back.png | Bin 533 -> 533 bytes
.../pokemon/ogerpon/hearthflame/front.png | Bin 999 -> 958 bytes
.../pokemon/ogerpon/hearthflame/normal.pal | 14 ++---
.../pokemon/ogerpon/hearthflame/shiny.pal | 14 ++---
graphics/pokemon/ogerpon/normal.pal | 10 ++--
graphics/pokemon/ogerpon/shiny.pal | 10 ++--
graphics/pokemon/ogerpon/wellspring/back.png | Bin 472 -> 472 bytes
graphics/pokemon/ogerpon/wellspring/front.png | Bin 1001 -> 960 bytes
.../pokemon/ogerpon/wellspring/normal.pal | 6 +-
graphics/pokemon/ogerpon/wellspring/shiny.pal | 6 +-
include/constants/battle_anim.h | 4 ++
include/graphics.h | 5 ++
src/battle_anim.c | 15 +++++
src/battle_anim_effects_1.c | 44 +++++++++++++++
src/data/battle_anim.h | 5 ++
src/graphics.c | 6 ++
25 files changed, 171 insertions(+), 35 deletions(-)
create mode 100644 graphics/battle_anims/sprites/cudgel.png
diff --git a/asm/macros/battle_anim_script.inc b/asm/macros/battle_anim_script.inc
index 742cdb2f26d4..367428eb5039 100644
--- a/asm/macros/battle_anim_script.inc
+++ b/asm/macros/battle_anim_script.inc
@@ -315,6 +315,12 @@
.Lsprite_\@_2:
.endm
+ .macro jumpifmovetypeequal type:req, jumpInstr:req
+ .byte 0x33
+ .byte \type
+ .4byte \jumpInstr
+ .endm
+
@ useful macros
.macro jumpreteq value:req, ptr:req
jumpargeq ARG_RET_ID, \value, \ptr
diff --git a/data/battle_anim_scripts.s b/data/battle_anim_scripts.s
index aa62732c7d05..cd656c2be95e 100644
--- a/data/battle_anim_scripts.s
+++ b/data/battle_anim_scripts.s
@@ -17844,6 +17844,58 @@ ElectroShotUnleash:
blendoff
end
+Move_IVY_CUDGEL::
+ loadspritegfx ANIM_TAG_IVY_CUDGEL_GRASS
+ loadspritegfx ANIM_TAG_WOOD_HAMMER
+ loadspritegfx ANIM_TAG_WOOD_HAMMER_HAMMER
+ loadspritegfx ANIM_TAG_IMPACT
+ playsewithpan SE_M_SWAGGER, SOUND_PAN_ATTACKER
+ createvisualtask AnimTask_TranslateMonEllipticalRespectSide, 2, ANIM_ATTACKER, 12, 4, 2, 4
+ jumpifmovetypeequal TYPE_FIRE, IvyCudgelFire
+ jumpifmovetypeequal TYPE_ROCK, IvyCudgelRock
+ jumpifmovetypeequal TYPE_WATER, IvyCudgelWater
+ createsprite gIvyCudgelSpriteTemplate, ANIM_TARGET, 2
+ delay 60
+ createvisualtask AnimTask_ShakeMonInPlace, 2, ANIM_ATTACKER, 3, 0, 12, 4
+ delay 18
+ createvisualtask AnimTask_SquishTarget, 0x2
+ delay 6
+ call WoodHammerImpact
+ waitforvisualfinish
+ end
+IvyCudgelFire:
+ loadspritegfx ANIM_TAG_IVY_CUDGEL_FIRE
+ createsprite gIvyCudgelFireSpriteTemplate, ANIM_TARGET, 2
+ delay 60
+ createvisualtask AnimTask_ShakeMonInPlace, 2, ANIM_ATTACKER, 3, 0, 12, 4
+ delay 18
+ createvisualtask AnimTask_SquishTarget, 0x2
+ delay 6
+ call WoodHammerImpact
+ waitforvisualfinish
+ end
+IvyCudgelRock:
+ loadspritegfx ANIM_TAG_IVY_CUDGEL_ROCK
+ createsprite gIvyCudgelRockSpriteTemplate, ANIM_TARGET, 2
+ delay 60
+ createvisualtask AnimTask_ShakeMonInPlace, 2, ANIM_ATTACKER, 3, 0, 12, 4
+ delay 18
+ createvisualtask AnimTask_SquishTarget, 0x2
+ delay 6
+ call WoodHammerImpact
+ waitforvisualfinish
+ end
+IvyCudgelWater:
+ loadspritegfx ANIM_TAG_IVY_CUDGEL_WATER
+ createsprite gIvyCudgelWaterSpriteTemplate, ANIM_TARGET, 2
+ delay 60
+ createvisualtask AnimTask_ShakeMonInPlace, 2, ANIM_ATTACKER, 3, 0, 12, 4
+ delay 18
+ createvisualtask AnimTask_SquishTarget, 0x2
+ delay 6
+ call WoodHammerImpact
+ waitforvisualfinish
+ end
Move_TERA_BLAST::
Move_AXE_KICK::
Move_ORDER_UP::
@@ -17875,7 +17927,6 @@ Move_MAGICAL_TORQUE::
Move_PSYBLADE::
Move_BLOOD_MOON::
Move_MATCHA_GOTCHA::
-Move_IVY_CUDGEL::
Move_TERA_STARSTORM::
Move_FICKLE_BEAM::
Move_THUNDERCLAP::
diff --git a/graphics/battle_anims/sprites/cudgel.png b/graphics/battle_anims/sprites/cudgel.png
new file mode 100644
index 0000000000000000000000000000000000000000..a43b450adc550e083850f03d7f1cab8817e65288
GIT binary patch
literal 319
zcmeAS@N?(olHy`uVBq!ia0vp^4j|0I3?%1nZ+ru!7>k44ofy`glX(f`=mz+NxK6pa
zkb#jwOGi_59=o&~zipwZV3td8Ym}Fd=lUD-fB*f}oovalWM)O6`t7+f>AMS5fExKr
zg8YIR{-c1Wz4Mjsqr5*rspqH51(RlwB<%gvoY!I@60k*}-FVdQ&MBb@
E0IdIrO#lD@
literal 0
HcmV?d00001
diff --git a/graphics/pokemon/ogerpon/back.png b/graphics/pokemon/ogerpon/back.png
index 29ad3c09b2a71b8de6ead2d1704eb7070f7fd17c..75f309fd67ceb83f93715ade6626e01c990e6e15 100644
GIT binary patch
delta 400
zcmV;B0dM}l1HS{1Ie!2F04gjg6`lthMh`u4H4$n=Q-xYeOi8cUpZop#i(@$eq?ve8
zC)=G|XS;AD0003%Nkl>aBm>R~4!8@T*m)l(DgT-|Pag9(DM7|;5o??$M$OnP+zK0l25WN6P$pmIi-KOzd}vm$`!0FHVB
u3oNOvz=!lt-v$w6L&;;f1nGlN@B?kM8;LrQjFtcZ00{s|MNUMnLSTYyov#J}
delta 400
zcmV;B0dM}l1HS{1Ie#iFDF6Wg8%7TRq?r+FL=~O~N=!*TaW${lpZop#i(@%>Q77A-
zTvLTwLzEMs0003%NkllhT+aQ8$D0vE(Abk)DegGXy8#f2^;?4j700{s|MNUMnLSTZOfvg|^
diff --git a/graphics/pokemon/ogerpon/cornerstone/back.png b/graphics/pokemon/ogerpon/cornerstone/back.png
index 39170fd75708450553cd94e1283402a02bb6d3c7..7e40fee557b863fb1dbbd92985c2a6ce19a71a92 100644
GIT binary patch
delta 99
zcmV-p0G$7s1epYoIYR&d04gjg6`lu5Oi4X)H5nTiZDVYOi;Fdes5iai!izrt#Y)uX
z_mEsByCwFt0004+NklM0Ti!E8AQ)BO@#me002ovPDHLk
FV1gKWB?ABe
delta 99
zcmV-p0G$7s1epYoIYTNeDHWav0000=Oi39V7(H<{ZDVYOi;Fdes5iai!izrt#Y)uX
z_mEsB#}T*l0004+Nklb002ovPDHLk
FV1hI1CTsuz
diff --git a/graphics/pokemon/ogerpon/cornerstone/front.png b/graphics/pokemon/ogerpon/cornerstone/front.png
index 6bca5e915c01e01dba93112e2a3f0e261f71c9b1..8e96be70e7c8b2c23299a744da89feb1e71aaae0 100644
GIT binary patch
delta 99
zcmaFGeu#a7iaKL)kh>GZx^prw85kIJ1AIbUr(9eJWNPVXiq2#A^6|7SG?kQ=m}n;<
zv0L@q76t}pXHOT$kcif~(|ePe6?j^By*73lGmBhJH2B79bI};6m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54TzP`T-^49LJ`4xs^9Ke+zFfC6UL=LQIY
zD1>18>lq-z+5jO_DU@&N8Ia!qh{6EX-vNM-R|CwY*kZc=8n9;8|2e>t(SHDx!xdo7
ze}6roH~-=v}8%7ZixzD
z!YN=JU#}Mkst3Y0l>j0L23Y4p
zbw71-*DJxZ?~#(!Aop7-DxYQ8c7_V*5i=H#0V&!>vRR_r^^Ii%s0a+jgh+fqH-JrZ
z-_+(lJRdUwFioV*Bv$)UUjd+(w!;h04S|DFb_??n;C&M0z1ay#%P`k-`;1`vN|-PS
zBf!IlBQn-n;44Yk0`!*Ugp&g@f>Goq*aPAdcO~6z;q-tV>P51iPi#2iAMd4zlj#C4
z0iu%`12sU>EergW=Na{I)MkqIl45$M=e7s4@vlh&x*s|e4vN*1PG6-4oEij
z-BPeGdvQrth+;ti_ZowKTU~0CjsqMnFmqY6e|7
diff --git a/graphics/pokemon/ogerpon/hearthflame/normal.pal b/graphics/pokemon/ogerpon/hearthflame/normal.pal
index 637556660ada..3f478af8aae5 100644
--- a/graphics/pokemon/ogerpon/hearthflame/normal.pal
+++ b/graphics/pokemon/ogerpon/hearthflame/normal.pal
@@ -2,18 +2,18 @@ JASC-PAL
0100
16
148 210 164
-156 153 172
-131 28 24
+0 0 0
+41 44 41
+16 157 0
+230 60 49
+57 113 49
49 133 172
+131 28 24
213 230 246
-41 44 41
255 198 74
172 105 32
-16 157 0
-57 113 49
+156 153 172
49 190 230
-0 0 0
164 52 49
74 76 74
189 137 90
-230 60 49
diff --git a/graphics/pokemon/ogerpon/hearthflame/shiny.pal b/graphics/pokemon/ogerpon/hearthflame/shiny.pal
index f874367b4bc2..fee0f8de7b0f 100644
--- a/graphics/pokemon/ogerpon/hearthflame/shiny.pal
+++ b/graphics/pokemon/ogerpon/hearthflame/shiny.pal
@@ -2,18 +2,18 @@ JASC-PAL
0100
16
148 210 164
-156 153 172
-131 28 24
+0 0 0
+41 44 41
+16 157 0
+230 60 49
+57 113 49
49 133 172
+131 28 24
213 230 246
-41 44 41
255 198 74
124 162 56
-16 157 0
-57 113 49
+156 153 172
49 190 230
-0 0 0
164 52 49
74 76 74
189 137 90
-230 60 49
diff --git a/graphics/pokemon/ogerpon/normal.pal b/graphics/pokemon/ogerpon/normal.pal
index 8f715fd815b0..a1ac4baf96b9 100644
--- a/graphics/pokemon/ogerpon/normal.pal
+++ b/graphics/pokemon/ogerpon/normal.pal
@@ -2,17 +2,17 @@ JASC-PAL
0100
15
148 209 161
-42 44 41
0 1 0
+42 44 41
+21 158 7
27 70 15
-0 164 153
+61 113 53
17 106 68
-21 158 7
+83 133 90
74 76 73
-61 97 53
175 216 159
251 253 250
139 99 57
+0 164 153
120 81 39
219 157 92
-83 133 90
diff --git a/graphics/pokemon/ogerpon/shiny.pal b/graphics/pokemon/ogerpon/shiny.pal
index a96c55d35d88..08c751ebdad3 100644
--- a/graphics/pokemon/ogerpon/shiny.pal
+++ b/graphics/pokemon/ogerpon/shiny.pal
@@ -2,17 +2,17 @@ JASC-PAL
0100
15
148 209 161
-42 44 41
0 1 0
+42 44 41
+21 158 7
27 70 15
-0 164 153
+61 113 53
17 106 68
-21 158 7
+83 133 90
74 76 73
-61 97 53
175 216 159
251 253 250
139 99 57
+0 164 153
124 162 56
219 157 92
-83 133 90
diff --git a/graphics/pokemon/ogerpon/wellspring/back.png b/graphics/pokemon/ogerpon/wellspring/back.png
index f1d5276baa7e0d8c78f1b396206e7139cfc30828..87d82032f4755114d3ac4fe9ec0ca1fca6c73f70 100644
GIT binary patch
delta 130
zcmV-|0Db@11K0zQIT8Q>04gjg6`ltRKzTiJHA+lLkxLsH`=DGg00042Nkln{POSA;KKJVgz2wH33K*
z5U++Pe*n{80HVobN=867xF=-52Leaa!$(Td2yn#0Fo53Z&lcG9`2PgJD|=8xP9x;u
z%!1SlXMj%@2GC=PVge4zK^nn}B#ZUr7*!w!Tp{F5SR&Xjg!0Q+=E_TX_JvxjQ{r9vPoe}Jd}a?4@>5Ki=O00}1my@xY4uqIM~
zbX2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qHJP{>AWnNi?C%x|J5+H9+KM$c(F=fPPTM=7
z4Uqz%&L#LqZQQ0{ukD50s+On*4=OCUcS4Ut#wN
z^{v}&;dUOpulfu?j}|%p@wY6XC6D&V!YS%8N^fy~^y9sgAQA%fWl56NQm_KRm(PW$7RdV34ZQ+N6_h0@--tW<259<|oC6RpDv>`!T66>G0000E
lWmrjOO-%qQ00008000000002eQ
Date: Fri, 26 Jul 2024 20:19:58 +0200
Subject: [PATCH 3/7] Fixes cantBeSurpressed ability check for breakable
abilities
---
src/battle_util.c | 1 -
test/battle/ability/disguise.c | 13 +++++++++++++
2 files changed, 13 insertions(+), 1 deletion(-)
diff --git a/src/battle_util.c b/src/battle_util.c
index 9ea7a453cb3f..2cd38c55593b 100644
--- a/src/battle_util.c
+++ b/src/battle_util.c
@@ -6224,7 +6224,6 @@ u32 GetBattlerAbility(u32 battler)
&& gStatuses3[battler] & STATUS3_GASTRO_ACID
&& gBattleMons[battler].ability == ABILITY_COMATOSE)
return ABILITY_NONE;
- return gBattleMons[battler].ability;
}
if (gStatuses3[battler] & STATUS3_GASTRO_ACID)
diff --git a/test/battle/ability/disguise.c b/test/battle/ability/disguise.c
index 7d3e36bf7857..c4f79d8fe350 100644
--- a/test/battle/ability/disguise.c
+++ b/test/battle/ability/disguise.c
@@ -121,3 +121,16 @@ SINGLE_BATTLE_TEST("Disguised Mimikyu takes damage from Rough Skin without break
EXPECT_EQ(player->species, SPECIES_MIMIKYU_DISGUISED);
}
}
+
+SINGLE_BATTLE_TEST("Disguised Mimikyu is ignored by Mold Breaker")
+{
+ GIVEN {
+ PLAYER(SPECIES_MIMIKYU_DISGUISED) { Ability(ABILITY_DISGUISE); }
+ OPPONENT(SPECIES_PINSIR) { Ability(ABILITY_MOLD_BREAKER); }
+ } WHEN {
+ TURN { MOVE(opponent, MOVE_AERIAL_ACE); }
+ } SCENE {
+ ANIMATION(ANIM_TYPE_MOVE, MOVE_AERIAL_ACE, opponent);
+ NOT ABILITY_POPUP(player, ABILITY_DISGUISE);
+ }
+}
From 89563cb9b124e4b9a6329091e23ad4463b8690c3 Mon Sep 17 00:00:00 2001
From: AlexOn1ine
Date: Fri, 26 Jul 2024 21:11:16 +0200
Subject: [PATCH 4/7] check for breakable ability
---
include/battle_util.h | 2 +-
src/battle_ai_util.c | 6 +++---
src/battle_util.c | 24 ++++++++++++++----------
3 files changed, 18 insertions(+), 14 deletions(-)
diff --git a/include/battle_util.h b/include/battle_util.h
index 644a112d7dab..118ef8c6b3a9 100644
--- a/include/battle_util.h
+++ b/include/battle_util.h
@@ -146,7 +146,7 @@ bool32 TryChangeBattleWeather(u32 battler, u32 weatherEnumId, bool32 viaAbility)
u32 AbilityBattleEffects(u32 caseID, u32 battler, u32 ability, u32 special, u32 moveArg);
bool32 TryPrimalReversion(u32 battler);
bool32 IsNeutralizingGasOnField(void);
-bool32 IsMoldBreakerTypeAbility(u32 ability);
+bool32 IsMoldBreakerTypeAbility(u32 battler, u32 ability);
u32 GetBattlerAbility(u32 battler);
u32 IsAbilityOnSide(u32 battler, u32 ability);
u32 IsAbilityOnOpposingSide(u32 battler, u32 ability);
diff --git a/src/battle_ai_util.c b/src/battle_ai_util.c
index b9770ba95091..1498d8936ce4 100644
--- a/src/battle_ai_util.c
+++ b/src/battle_ai_util.c
@@ -1188,7 +1188,7 @@ bool32 DoesBattlerIgnoreAbilityChecks(u32 atkAbility, u32 move)
if (AI_THINKING_STRUCT->aiFlags[sBattler_AI] & AI_FLAG_NEGATE_UNAWARE)
return FALSE; // AI handicap flag: doesn't understand ability suppression concept
- if (IsMoldBreakerTypeAbility(atkAbility) || gMovesInfo[move].ignoresTargetAbility)
+ if (IsMoldBreakerTypeAbility(sBattler_AI, atkAbility) || gMovesInfo[move].ignoresTargetAbility)
return TRUE;
return FALSE;
@@ -2766,7 +2766,7 @@ bool32 AI_CanBeInfatuated(u32 battlerAtk, u32 battlerDef, u32 defAbility)
u32 ShouldTryToFlinch(u32 battlerAtk, u32 battlerDef, u32 atkAbility, u32 defAbility, u32 move)
{
- if (((!IsMoldBreakerTypeAbility(AI_DATA->abilities[battlerAtk]) && (defAbility == ABILITY_SHIELD_DUST || defAbility == ABILITY_INNER_FOCUS))
+ if (((!IsMoldBreakerTypeAbility(battlerAtk, AI_DATA->abilities[battlerAtk]) && (defAbility == ABILITY_SHIELD_DUST || defAbility == ABILITY_INNER_FOCUS))
|| AI_DATA->holdEffects[battlerDef] == HOLD_EFFECT_COVERT_CLOAK
|| DoesSubstituteBlockMove(battlerAtk, battlerDef, move)
|| AI_WhoStrikesFirst(battlerAtk, battlerDef, move) == AI_IS_SLOWER)) // Opponent goes first
@@ -2809,7 +2809,7 @@ bool32 ShouldFakeOut(u32 battlerAtk, u32 battlerDef, u32 move)
|| AI_DATA->holdEffects[battlerAtk] == HOLD_EFFECT_CHOICE_BAND
|| AI_DATA->holdEffects[battlerDef] == HOLD_EFFECT_COVERT_CLOAK
|| DoesSubstituteBlockMove(battlerAtk, battlerDef, move)
- || (!IsMoldBreakerTypeAbility(AI_DATA->abilities[battlerAtk])
+ || (!IsMoldBreakerTypeAbility(battlerAtk, AI_DATA->abilities[battlerAtk])
&& (AI_DATA->abilities[battlerDef] == ABILITY_SHIELD_DUST || AI_DATA->abilities[battlerDef] == ABILITY_INNER_FOCUS)))
return FALSE;
diff --git a/src/battle_util.c b/src/battle_util.c
index 2cd38c55593b..d0ccf4859e01 100644
--- a/src/battle_util.c
+++ b/src/battle_util.c
@@ -6207,8 +6207,11 @@ bool32 IsNeutralizingGasOnField(void)
return FALSE;
}
-bool32 IsMoldBreakerTypeAbility(u32 ability)
+bool32 IsMoldBreakerTypeAbility(u32 battler, u32 ability)
{
+ if (gStatuses3[battler] & STATUS3_GASTRO_ACID)
+ return FALSE;
+
return (ability == ABILITY_MOLD_BREAKER || ability == ABILITY_TERAVOLT || ability == ABILITY_TURBOBLAZE
|| (ability == ABILITY_MYCELIUM_MIGHT && IS_MOVE_STATUS(gCurrentMove)));
}
@@ -6224,6 +6227,9 @@ u32 GetBattlerAbility(u32 battler)
&& gStatuses3[battler] & STATUS3_GASTRO_ACID
&& gBattleMons[battler].ability == ABILITY_COMATOSE)
return ABILITY_NONE;
+
+ if (!gAbilitiesInfo[gBattleMons[battler].ability].breakable)
+ return gBattleMons[battler].ability;
}
if (gStatuses3[battler] & STATUS3_GASTRO_ACID)
@@ -6234,15 +6240,13 @@ u32 GetBattlerAbility(u32 battler)
&& noAbilityShield)
return ABILITY_NONE;
- if (((IsMoldBreakerTypeAbility(gBattleMons[gBattlerAttacker].ability)
- && !(gStatuses3[gBattlerAttacker] & STATUS3_GASTRO_ACID))
- || gMovesInfo[gCurrentMove].ignoresTargetAbility)
- && battler != gBattlerAttacker
- && gAbilitiesInfo[gBattleMons[battler].ability].breakable
- && noAbilityShield
- && gBattlerByTurnOrder[gCurrentTurnActionNumber] == gBattlerAttacker
- && gActionsByTurnOrder[gCurrentTurnActionNumber] == B_ACTION_USE_MOVE
- && gCurrentTurnActionNumber < gBattlersCount)
+ if ((IsMoldBreakerTypeAbility(gBattlerAttacker, gBattleMons[gBattlerAttacker].ability) || gMovesInfo[gCurrentMove].ignoresTargetAbility)
+ && battler != gBattlerAttacker
+ && gAbilitiesInfo[gBattleMons[battler].ability].breakable
+ && noAbilityShield
+ && gBattlerByTurnOrder[gCurrentTurnActionNumber] == gBattlerAttacker
+ && gActionsByTurnOrder[gCurrentTurnActionNumber] == B_ACTION_USE_MOVE
+ && gCurrentTurnActionNumber < gBattlersCount)
return ABILITY_NONE;
return gBattleMons[battler].ability;
From dfd63fd34f894c4ad46f9a93bb351e09ce70d3a5 Mon Sep 17 00:00:00 2001
From: AlexOn1ine
Date: Fri, 26 Jul 2024 21:30:41 +0200
Subject: [PATCH 5/7] func CanBreakThroughAbility
---
src/battle_util.c | 27 +++++++++++++++++----------
1 file changed, 17 insertions(+), 10 deletions(-)
diff --git a/src/battle_util.c b/src/battle_util.c
index d0ccf4859e01..ea2da5709eb8 100644
--- a/src/battle_util.c
+++ b/src/battle_util.c
@@ -6216,11 +6216,22 @@ bool32 IsMoldBreakerTypeAbility(u32 battler, u32 ability)
|| (ability == ABILITY_MYCELIUM_MIGHT && IS_MOVE_STATUS(gCurrentMove)));
}
+static inline bool32 CanBreakThroughAbility(u32 battlerAtk, u32 battlerDef, u32 ability)
+{
+ return ((IsMoldBreakerTypeAbility(battlerAtk, ability) || gMovesInfo[gCurrentMove].ignoresTargetAbility)
+ && battlerDef != battlerAtk
+ && gAbilitiesInfo[gBattleMons[battlerDef].ability].breakable
+ && gBattlerByTurnOrder[gCurrentTurnActionNumber] == battlerAtk
+ && gActionsByTurnOrder[gCurrentTurnActionNumber] == B_ACTION_USE_MOVE
+ && gCurrentTurnActionNumber < gBattlersCount);
+}
+
u32 GetBattlerAbility(u32 battler)
{
bool32 noAbilityShield = GetBattlerHoldEffectIgnoreAbility(battler, TRUE) != HOLD_EFFECT_ABILITY_SHIELD;
+ bool32 abilityCantBeSuppressed = gAbilitiesInfo[gBattleMons[battler].ability].cantBeSuppressed;
- if (gAbilitiesInfo[gBattleMons[battler].ability].cantBeSuppressed)
+ if (abilityCantBeSuppressed)
{
// Edge case: pokemon under the effect of gastro acid transforms into a pokemon with Comatose (Todo: verify how other unsuppressable abilities behave)
if (gBattleMons[battler].status2 & STATUS2_TRANSFORMED
@@ -6228,8 +6239,10 @@ u32 GetBattlerAbility(u32 battler)
&& gBattleMons[battler].ability == ABILITY_COMATOSE)
return ABILITY_NONE;
- if (!gAbilitiesInfo[gBattleMons[battler].ability].breakable)
- return gBattleMons[battler].ability;
+ if (CanBreakThroughAbility(gBattlerAttacker, battler, gBattleMons[gBattlerAttacker].ability))
+ return ABILITY_NONE;
+
+ return gBattleMons[battler].ability;
}
if (gStatuses3[battler] & STATUS3_GASTRO_ACID)
@@ -6240,13 +6253,7 @@ u32 GetBattlerAbility(u32 battler)
&& noAbilityShield)
return ABILITY_NONE;
- if ((IsMoldBreakerTypeAbility(gBattlerAttacker, gBattleMons[gBattlerAttacker].ability) || gMovesInfo[gCurrentMove].ignoresTargetAbility)
- && battler != gBattlerAttacker
- && gAbilitiesInfo[gBattleMons[battler].ability].breakable
- && noAbilityShield
- && gBattlerByTurnOrder[gCurrentTurnActionNumber] == gBattlerAttacker
- && gActionsByTurnOrder[gCurrentTurnActionNumber] == B_ACTION_USE_MOVE
- && gCurrentTurnActionNumber < gBattlersCount)
+ if (noAbilityShield && CanBreakThroughAbility(gBattlerAttacker, battler, gBattleMons[gBattlerAttacker].ability))
return ABILITY_NONE;
return gBattleMons[battler].ability;
From 5dd10a4af11685b9cba3cd0013fa66fe4fcbfc10 Mon Sep 17 00:00:00 2001
From: AlexOn1ine
Date: Fri, 26 Jul 2024 21:34:20 +0200
Subject: [PATCH 6/7] forgot abilityShield check
---
src/battle_util.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/battle_util.c b/src/battle_util.c
index ea2da5709eb8..e87fa9f368f4 100644
--- a/src/battle_util.c
+++ b/src/battle_util.c
@@ -6239,7 +6239,7 @@ u32 GetBattlerAbility(u32 battler)
&& gBattleMons[battler].ability == ABILITY_COMATOSE)
return ABILITY_NONE;
- if (CanBreakThroughAbility(gBattlerAttacker, battler, gBattleMons[gBattlerAttacker].ability))
+ if (noAbilityShield && CanBreakThroughAbility(gBattlerAttacker, battler, gBattleMons[gBattlerAttacker].ability))
return ABILITY_NONE;
return gBattleMons[battler].ability;
From 91b48a10d4f0b4c85ffa0363c19f6979b34889c9 Mon Sep 17 00:00:00 2001
From: pkmnsnfrn
Date: Fri, 26 Jul 2024 21:57:42 -0700
Subject: [PATCH 7/7] Added constant for NUM_SNOWFLAKE_SPRITES
---
include/constants/field_weather.h | 1 +
src/field_weather_effect.c | 2 +-
2 files changed, 2 insertions(+), 1 deletion(-)
diff --git a/include/constants/field_weather.h b/include/constants/field_weather.h
index e84dbc48c4dd..fe7eb6a1ae7c 100644
--- a/include/constants/field_weather.h
+++ b/include/constants/field_weather.h
@@ -8,6 +8,7 @@
#define NUM_FOG_DIAGONAL_SPRITES 20
#define NUM_SANDSTORM_SPRITES 20
#define NUM_SWIRL_SANDSTORM_SPRITES 5
+#define NUM_SNOWFLAKE_SPRITES 16
// Controls how the weather should be changing the screen palettes.
#define WEATHER_PAL_STATE_CHANGING_WEATHER 0
diff --git a/src/field_weather_effect.c b/src/field_weather_effect.c
index de0b90c48006..10ce1bc37a9b 100644
--- a/src/field_weather_effect.c
+++ b/src/field_weather_effect.c
@@ -770,7 +770,7 @@ void Snow_InitVars(void)
gWeatherPtr->weatherGfxLoaded = FALSE;
gWeatherPtr->targetColorMapIndex = 3;
gWeatherPtr->colorMapStepDelay = 20;
- gWeatherPtr->targetSnowflakeSpriteCount = 16;
+ gWeatherPtr->targetSnowflakeSpriteCount = NUM_SNOWFLAKE_SPRITES;
gWeatherPtr->snowflakeVisibleCounter = 0;
}