diff --git a/INSTALL.md b/INSTALL.md
index cc6eba97ef..6349d24fbb 100644
--- a/INSTALL.md
+++ b/INSTALL.md
@@ -33,27 +33,23 @@ WSL1 is the preferred terminal to build **pokeemerald Expansion**. The following
- Otherwise, **open WSL** and go to [Choosing where to store pokeemerald Expansion (WSL1)](#Choosing-where-to-store-pokeemerald-expansion-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.
+3. Open Windows Powershell **as Administrator** again (after restarting), and run the following command to configure Ubuntu to use WSL1.
+
+ ```powershell
+ wsl --set-version Ubuntu 1
+ ```
- Note for advanced users...
+ Note...
- > You can pick a preferred Linux distribution, but setup instructions may differ. Debian should work with the given instructions, but has not been tested.
-
-
-4. Open the [Microsoft Store Linux Selection](https://aka.ms/wslstore), click Ubuntu, then click Get, which will install the Ubuntu distribution.
-
- Notes...
-
- > 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
diff --git a/asm/macros/battle_anim_script.inc b/asm/macros/battle_anim_script.inc
index ecfea5c197..1b35991809 100644
--- a/asm/macros/battle_anim_script.inc
+++ b/asm/macros/battle_anim_script.inc
@@ -315,8 +315,14 @@
.Lsprite_\@_2:
.endm
-.macro createdragondartsprite anim_battler:req, subpriority_offset:req, argv:vararg
+ .macro jumpifmovetypeequal type:req, jumpInstr:req
.byte 0x33
+ .byte \type
+ .4byte \jumpInstr
+ .endm
+
+ .macro createdragondartsprite anim_battler:req, subpriority_offset:req, argv:vararg
+ .byte 0x34
.if \anim_battler == ANIM_TARGET
.byte ANIMSPRITE_IS_TARGET | (\subpriority_offset & 0x7F)
.else
diff --git a/data/battle_anim_scripts.s b/data/battle_anim_scripts.s
index 259d18142c..9ebbdef182 100644
--- a/data/battle_anim_scripts.s
+++ b/data/battle_anim_scripts.s
@@ -16900,6 +16900,59 @@ 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_SPICY_EXTRACT::
loadspritegfx ANIM_TAG_SMALL_EMBER
loadspritegfx ANIM_TAG_POISON_BUBBLE
@@ -16975,7 +17028,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 0000000000..a43b450adc
Binary files /dev/null and b/graphics/battle_anims/sprites/cudgel.png differ
diff --git a/graphics/pokemon/ogerpon/back.png b/graphics/pokemon/ogerpon/back.png
index 29ad3c09b2..75f309fd67 100644
Binary files a/graphics/pokemon/ogerpon/back.png and b/graphics/pokemon/ogerpon/back.png differ
diff --git a/graphics/pokemon/ogerpon/cornerstone/back.png b/graphics/pokemon/ogerpon/cornerstone/back.png
index 39170fd757..7e40fee557 100644
Binary files a/graphics/pokemon/ogerpon/cornerstone/back.png and b/graphics/pokemon/ogerpon/cornerstone/back.png differ
diff --git a/graphics/pokemon/ogerpon/cornerstone/front.png b/graphics/pokemon/ogerpon/cornerstone/front.png
index 6bca5e915c..8e96be70e7 100644
Binary files a/graphics/pokemon/ogerpon/cornerstone/front.png and b/graphics/pokemon/ogerpon/cornerstone/front.png differ
diff --git a/graphics/pokemon/ogerpon/cornerstone/normal.pal b/graphics/pokemon/ogerpon/cornerstone/normal.pal
index 057bd48dcc..852898a6b7 100644
--- a/graphics/pokemon/ogerpon/cornerstone/normal.pal
+++ b/graphics/pokemon/ogerpon/cornerstone/normal.pal
@@ -2,12 +2,12 @@ JASC-PAL
0100
15
148 209 161
+0 0 0
42 44 41
21 158 7
-0 0 0
74 76 73
-25 27 24
61 113 53
+25 27 24
109 99 108
133 139 139
53 134 168
diff --git a/graphics/pokemon/ogerpon/cornerstone/shiny.pal b/graphics/pokemon/ogerpon/cornerstone/shiny.pal
index b4d7d15195..c4956ce774 100644
--- a/graphics/pokemon/ogerpon/cornerstone/shiny.pal
+++ b/graphics/pokemon/ogerpon/cornerstone/shiny.pal
@@ -2,12 +2,12 @@ JASC-PAL
0100
15
148 209 161
+0 0 0
42 44 41
21 158 7
-0 0 0
74 76 73
-25 27 24
61 113 53
+25 27 24
109 99 108
133 139 139
53 134 168
diff --git a/graphics/pokemon/ogerpon/front.png b/graphics/pokemon/ogerpon/front.png
index 5fa971f873..dec38ef0b8 100644
Binary files a/graphics/pokemon/ogerpon/front.png and b/graphics/pokemon/ogerpon/front.png differ
diff --git a/graphics/pokemon/ogerpon/hearthflame/back.png b/graphics/pokemon/ogerpon/hearthflame/back.png
index 19d6656870..d6d927f19d 100644
Binary files a/graphics/pokemon/ogerpon/hearthflame/back.png and b/graphics/pokemon/ogerpon/hearthflame/back.png differ
diff --git a/graphics/pokemon/ogerpon/hearthflame/front.png b/graphics/pokemon/ogerpon/hearthflame/front.png
index 036ea37f32..d8b9cb7b23 100644
Binary files a/graphics/pokemon/ogerpon/hearthflame/front.png and b/graphics/pokemon/ogerpon/hearthflame/front.png differ
diff --git a/graphics/pokemon/ogerpon/hearthflame/normal.pal b/graphics/pokemon/ogerpon/hearthflame/normal.pal
index 637556660a..3f478af8aa 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
-49 133 172
-213 230 246
+0 0 0
41 44 41
+16 157 0
+230 60 49
+57 113 49
+49 133 172
+131 28 24
+213 230 246
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 f874367b4b..fee0f8de7b 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
-49 133 172
-213 230 246
+0 0 0
41 44 41
+16 157 0
+230 60 49
+57 113 49
+49 133 172
+131 28 24
+213 230 246
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 8f715fd815..a1ac4baf96 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
-27 70 15
-0 164 153
-17 106 68
+42 44 41
21 158 7
+27 70 15
+61 113 53
+17 106 68
+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 a96c55d35d..08c751ebda 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
-27 70 15
-0 164 153
-17 106 68
+42 44 41
21 158 7
+27 70 15
+61 113 53
+17 106 68
+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 f1d5276baa..87d82032f4 100644
Binary files a/graphics/pokemon/ogerpon/wellspring/back.png and b/graphics/pokemon/ogerpon/wellspring/back.png differ
diff --git a/graphics/pokemon/ogerpon/wellspring/front.png b/graphics/pokemon/ogerpon/wellspring/front.png
index 5263ce2f1e..77ffb489a5 100644
Binary files a/graphics/pokemon/ogerpon/wellspring/front.png and b/graphics/pokemon/ogerpon/wellspring/front.png differ
diff --git a/graphics/pokemon/ogerpon/wellspring/normal.pal b/graphics/pokemon/ogerpon/wellspring/normal.pal
index 4b22619be4..db40508a52 100644
--- a/graphics/pokemon/ogerpon/wellspring/normal.pal
+++ b/graphics/pokemon/ogerpon/wellspring/normal.pal
@@ -2,12 +2,12 @@ JASC-PAL
0100
16
148 209 161
+0 0 0
42 44 41
21 158 7
-74 76 73
-0 0 0
-61 113 53
11 64 121
+61 113 53
+74 76 73
15 90 170
0 126 229
53 134 168
diff --git a/graphics/pokemon/ogerpon/wellspring/shiny.pal b/graphics/pokemon/ogerpon/wellspring/shiny.pal
index bca722c95d..7c44d3352d 100644
--- a/graphics/pokemon/ogerpon/wellspring/shiny.pal
+++ b/graphics/pokemon/ogerpon/wellspring/shiny.pal
@@ -2,12 +2,12 @@ JASC-PAL
0100
16
148 209 161
+0 0 0
42 44 41
21 158 7
-74 76 73
-0 0 0
-61 113 53
11 64 121
+61 113 53
+74 76 73
15 90 170
0 126 229
53 134 168
diff --git a/include/battle_util.h b/include/battle_util.h
index ed6a18fdbd..8eadf47c98 100644
--- a/include/battle_util.h
+++ b/include/battle_util.h
@@ -155,7 +155,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/include/constants/battle_anim.h b/include/constants/battle_anim.h
index 8d09521530..389cd7e127 100644
--- a/include/constants/battle_anim.h
+++ b/include/constants/battle_anim.h
@@ -405,9 +405,13 @@
#define ANIM_TAG_SYRUP_SHELL_YELLOW (ANIM_SPRITES_START + 391)
#define ANIM_TAG_SYRUP_SPLAT_RED (ANIM_SPRITES_START + 392)
#define ANIM_TAG_SYRUP_SPLAT_YELLOW (ANIM_SPRITES_START + 393)
-#define ANIM_TAG_TERA_CRYSTAL (ANIM_SPRITES_START + 394)
-#define ANIM_TAG_TERA_SHATTER (ANIM_SPRITES_START + 395)
-#define ANIM_TAG_DREEPY_SHINY (ANIM_SPRITES_START + 396)
+#define ANIM_TAG_IVY_CUDGEL_GRASS (ANIM_SPRITES_START + 394)
+#define ANIM_TAG_IVY_CUDGEL_FIRE (ANIM_SPRITES_START + 395)
+#define ANIM_TAG_IVY_CUDGEL_ROCK (ANIM_SPRITES_START + 396)
+#define ANIM_TAG_IVY_CUDGEL_WATER (ANIM_SPRITES_START + 397)
+#define ANIM_TAG_TERA_CRYSTAL (ANIM_SPRITES_START + 398)
+#define ANIM_TAG_TERA_SHATTER (ANIM_SPRITES_START + 399)
+#define ANIM_TAG_DREEPY_SHINY (ANIM_SPRITES_START + 400)
// battlers
#define ANIM_ATTACKER 0
diff --git a/include/constants/field_weather.h b/include/constants/field_weather.h
index e84dbc48c4..fe7eb6a1ae 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/include/graphics.h b/include/graphics.h
index fc60c29ebf..01de060b79 100644
--- a/include/graphics.h
+++ b/include/graphics.h
@@ -2873,6 +2873,11 @@ extern const u32 gBattleAnimSpriteGfx_SyrupShell[];
extern const u32 gBattleAnimSpriteGfx_SyrupSplat[];
extern const u32 gBattleAnimSpritePal_SyrupRed[];
extern const u32 gBattleAnimSpritePal_SyrupYellow[];
+extern const u32 gBattleAnimSpriteGfx_IvyCudgel[];
+extern const u32 gBattleAnimSpritePal_IvyCudgelGrass[];
+extern const u32 gBattleAnimSpritePal_IvyCudgelFire[];
+extern const u32 gBattleAnimSpritePal_IvyCudgelRock[];
+extern const u32 gBattleAnimSpritePal_IvyCudgelWater[];
extern const u32 gBattleAnimBgImage_Dark[];
extern const u32 gBattleAnimBgImage_Ghost[];
diff --git a/src/battle_ai_util.c b/src/battle_ai_util.c
index 5f29529d14..68bd61dabe 100644
--- a/src/battle_ai_util.c
+++ b/src/battle_ai_util.c
@@ -1353,7 +1353,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;
@@ -2947,7 +2947,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_IsSlower(battlerAtk, battlerDef, move))) // Opponent goes first
@@ -2990,7 +2990,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_anim.c b/src/battle_anim.c
index 77ee730c0c..71813ddf46 100644
--- a/src/battle_anim.c
+++ b/src/battle_anim.c
@@ -85,6 +85,7 @@ static void Cmd_stopsound(void);
static void Cmd_createvisualtaskontargets(void);
static void Cmd_createspriteontargets(void);
static void Cmd_createspriteontargets_onpos(void);
+static void Cmd_jumpifmovetypeequal(void);
static void Cmd_createdragondartsprite(void);
static void RunAnimScriptCommand(void);
static void Task_UpdateMonBg(u8 taskId);
@@ -177,7 +178,8 @@ static void (* const sScriptCmdTable[])(void) =
Cmd_createvisualtaskontargets, // 0x30
Cmd_createspriteontargets, // 0x31
Cmd_createspriteontargets_onpos, // 0x32
- Cmd_createdragondartsprite, // 0x33
+ Cmd_jumpifmovetypeequal, // 0x33
+ Cmd_createdragondartsprite, // 0x34
};
void ClearBattleAnimationVars(void)
@@ -2141,6 +2143,19 @@ static void Cmd_stopsound(void)
sBattleAnimScriptPtr++;
}
+static void Cmd_jumpifmovetypeequal(void)
+{
+ u8 moveType;
+ const u8 *type = sBattleAnimScriptPtr + 1;
+ sBattleAnimScriptPtr += 2;
+ GET_MOVE_TYPE(gCurrentMove, moveType);
+
+ if (*type != moveType)
+ sBattleAnimScriptPtr += 4;
+ else
+ sBattleAnimScriptPtr = T2_READ_PTR(sBattleAnimScriptPtr);
+}
+
static void Cmd_createdragondartsprite(void)
{
s32 i;
diff --git a/src/battle_anim_effects_1.c b/src/battle_anim_effects_1.c
index d47c8aeebb..b917cdc9a5 100644
--- a/src/battle_anim_effects_1.c
+++ b/src/battle_anim_effects_1.c
@@ -2958,6 +2958,50 @@ const struct SpriteTemplate gWoodHammerHammerSpriteTemplate =
.callback = AnimWoodHammerHammer,
};
+const struct SpriteTemplate gIvyCudgelSpriteTemplate =
+{
+ .tileTag = ANIM_TAG_IVY_CUDGEL_GRASS,
+ .paletteTag = ANIM_TAG_IVY_CUDGEL_GRASS,
+ .oam = &gOamData_AffineDouble_ObjNormal_64x64,
+ .anims = gDummySpriteAnimTable,
+ .images = NULL,
+ .affineAnims = gWoodHammerHammerAffineAnims,
+ .callback = AnimWoodHammerHammer,
+};
+
+const struct SpriteTemplate gIvyCudgelFireSpriteTemplate =
+{
+ .tileTag = ANIM_TAG_IVY_CUDGEL_GRASS,
+ .paletteTag = ANIM_TAG_IVY_CUDGEL_FIRE,
+ .oam = &gOamData_AffineDouble_ObjNormal_64x64,
+ .anims = gDummySpriteAnimTable,
+ .images = NULL,
+ .affineAnims = gWoodHammerHammerAffineAnims,
+ .callback = AnimWoodHammerHammer,
+};
+
+const struct SpriteTemplate gIvyCudgelRockSpriteTemplate =
+{
+ .tileTag = ANIM_TAG_IVY_CUDGEL_GRASS,
+ .paletteTag = ANIM_TAG_IVY_CUDGEL_ROCK,
+ .oam = &gOamData_AffineDouble_ObjNormal_64x64,
+ .anims = gDummySpriteAnimTable,
+ .images = NULL,
+ .affineAnims = gWoodHammerHammerAffineAnims,
+ .callback = AnimWoodHammerHammer,
+};
+
+const struct SpriteTemplate gIvyCudgelWaterSpriteTemplate =
+{
+ .tileTag = ANIM_TAG_IVY_CUDGEL_GRASS,
+ .paletteTag = ANIM_TAG_IVY_CUDGEL_WATER,
+ .oam = &gOamData_AffineDouble_ObjNormal_64x64,
+ .anims = gDummySpriteAnimTable,
+ .images = NULL,
+ .affineAnims = gWoodHammerHammerAffineAnims,
+ .callback = AnimWoodHammerHammer,
+};
+
const struct SpriteTemplate gJudgmentGrayOutwardSpikesTemplate =
{
.tileTag = ANIM_TAG_GREEN_SPIKE,
diff --git a/src/battle_util.c b/src/battle_util.c
index 8523471ee5..b175588eab 100644
--- a/src/battle_util.c
+++ b/src/battle_util.c
@@ -6358,23 +6358,41 @@ 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)));
}
+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
&& gStatuses3[battler] & STATUS3_GASTRO_ACID
&& gBattleMons[battler].ability == ABILITY_COMATOSE)
return ABILITY_NONE;
+
+ if (noAbilityShield && CanBreakThroughAbility(gBattlerAttacker, battler, gBattleMons[gBattlerAttacker].ability))
+ return ABILITY_NONE;
+
return gBattleMons[battler].ability;
}
@@ -6386,15 +6404,7 @@ 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 (noAbilityShield && CanBreakThroughAbility(gBattlerAttacker, battler, gBattleMons[gBattlerAttacker].ability))
return ABILITY_NONE;
return gBattleMons[battler].ability;
diff --git a/src/data/battle_anim.h b/src/data/battle_anim.h
index 485519cdc5..267e7d1629 100644
--- a/src/data/battle_anim.h
+++ b/src/data/battle_anim.h
@@ -1454,6 +1454,7 @@ const struct CompressedSpriteSheet gBattleAnimPicTable[] =
{gBattleAnimSpriteGfx_SyrupShell, 0x2000, ANIM_TAG_SYRUP_SHELL_YELLOW},
{gBattleAnimSpriteGfx_SyrupSplat, 0x400, ANIM_TAG_SYRUP_SPLAT_RED},
{gBattleAnimSpriteGfx_SyrupSplat, 0x400, ANIM_TAG_SYRUP_SPLAT_YELLOW},
+ {gBattleAnimSpriteGfx_IvyCudgel, 0x800, ANIM_TAG_IVY_CUDGEL_GRASS},
{gBattleAnimSpriteGfx_TeraCrystal, 0x800, ANIM_TAG_TERA_CRYSTAL},
{gBattleAnimSpriteGfx_TeraShatter, 0x0180, ANIM_TAG_TERA_SHATTER},
{gBattleAnimSpriteGfx_DreepyMissile, 0x200, ANIM_TAG_DREEPY_SHINY},
@@ -1912,6 +1913,10 @@ const struct CompressedSpritePalette gBattleAnimPaletteTable[] =
{gBattleAnimSpritePal_SyrupYellow, ANIM_TAG_SYRUP_SHELL_YELLOW},
{gBattleAnimSpritePal_SyrupRed, ANIM_TAG_SYRUP_SPLAT_RED},
{gBattleAnimSpritePal_SyrupYellow, ANIM_TAG_SYRUP_SPLAT_YELLOW},
+ {gBattleAnimSpritePal_IvyCudgelGrass, ANIM_TAG_IVY_CUDGEL_GRASS},
+ {gBattleAnimSpritePal_IvyCudgelFire, ANIM_TAG_IVY_CUDGEL_FIRE},
+ {gBattleAnimSpritePal_IvyCudgelRock, ANIM_TAG_IVY_CUDGEL_ROCK},
+ {gBattleAnimSpritePal_IvyCudgelWater, ANIM_TAG_IVY_CUDGEL_WATER},
{gBattleAnimSpritePal_TeraCrystal, ANIM_TAG_TERA_CRYSTAL},
{gBattleAnimSpritePal_TeraShatter, ANIM_TAG_TERA_SHATTER},
{gBattleAnimSpritePal_DreepyMissileShiny, ANIM_TAG_DREEPY_SHINY},
diff --git a/src/field_weather_effect.c b/src/field_weather_effect.c
index 3b9d8f9f9e..cf31e862c3 100644
--- a/src/field_weather_effect.c
+++ b/src/field_weather_effect.c
@@ -771,7 +771,7 @@ void Snow_InitVars(void)
gWeatherPtr->weatherGfxLoaded = FALSE;
gWeatherPtr->targetColorMapIndex = 0;
gWeatherPtr->colorMapStepDelay = 20;
- gWeatherPtr->targetSnowflakeSpriteCount = 16;
+ gWeatherPtr->targetSnowflakeSpriteCount = NUM_SNOWFLAKE_SPRITES;
gWeatherPtr->snowflakeVisibleCounter = 0;
}
diff --git a/src/graphics.c b/src/graphics.c
index 58c629fbc9..c35cec3467 100644
--- a/src/graphics.c
+++ b/src/graphics.c
@@ -465,6 +465,12 @@ const u32 gBattleAnimSpriteGfx_SyrupSplat[] = INCBIN_U32("graphics/battle_anims/
const u32 gBattleAnimSpritePal_SyrupRed[] = INCBIN_U32("graphics/battle_anims/sprites/syrup_red.gbapal.lz");
const u32 gBattleAnimSpritePal_SyrupYellow[] = INCBIN_U32("graphics/battle_anims/sprites/syrup_yellow.gbapal.lz");
+const u32 gBattleAnimSpriteGfx_IvyCudgel[] = INCBIN_U32("graphics/battle_anims/sprites/cudgel.4bpp.lz");
+const u32 gBattleAnimSpritePal_IvyCudgelGrass[] = INCBIN_U32("graphics/pokemon/ogerpon/normal.gbapal.lz");
+const u32 gBattleAnimSpritePal_IvyCudgelFire[] = INCBIN_U32("graphics/pokemon/ogerpon/hearthflame/normal.gbapal.lz");
+const u32 gBattleAnimSpritePal_IvyCudgelRock[] = INCBIN_U32("graphics/pokemon/ogerpon/cornerstone/normal.gbapal.lz");
+const u32 gBattleAnimSpritePal_IvyCudgelWater[] = INCBIN_U32("graphics/pokemon/ogerpon/wellspring/normal.gbapal.lz");
+
// old battle interface data, unused
const u32 gOldBattleInterfaceGfx[] = INCBIN_U32("graphics/unused/obi1.4bpp.lz");
diff --git a/test/battle/ability/disguise.c b/test/battle/ability/disguise.c
index 7d3e36bf78..c4f79d8fe3 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);
+ }
+}