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/9] Fix WSL1 install instructions --- INSTALL.md | 22 +++++++++------------- 1 file changed, 9 insertions(+), 13 deletions(-) diff --git a/INSTALL.md b/INSTALL.md index 30b5d0f25a..7ffcdee07b 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. +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 From a16448c081995257cd09a6a1193ef529a7d5f8cd Mon Sep 17 00:00:00 2001 From: kittenchilly Date: Thu, 25 Jul 2024 17:07:11 -0500 Subject: [PATCH 2/9] Update and clean up Battle Debug (#4643) * Update battle debug with new stuff * Fix status not showing up * Update hold effects as well * Update battle_debug.c * Update battle_debug.c --- src/battle_debug.c | 685 ++++++++++++++++++++++++++++++--------------- 1 file changed, 466 insertions(+), 219 deletions(-) diff --git a/src/battle_debug.c b/src/battle_debug.c index 4e9d5ecf29..671a9057ef 100644 --- a/src/battle_debug.c +++ b/src/battle_debug.c @@ -116,6 +116,136 @@ enum LIST_ITEM_COUNT }; +enum +{ + LIST_STAT_HP_CURRENT, + LIST_STAT_HP_MAX, + LIST_STAT_ATTACK, + LIST_STAT_DEFENSE, + LIST_STAT_SPEED, + LIST_STAT_SP_ATK, + LIST_STAT_SP_DEF, +}; + +enum +{ + LIST_STATUS1_SLEEP, + LIST_STATUS1_POISON, + LIST_STATUS1_BURN, + LIST_STATUS1_FREEZE, + LIST_STATUS1_PARALYSIS, + LIST_STATUS1_TOXIC_POISON, + LIST_STATUS1_TOXIC_COUNTER, + LIST_STATUS1_FROSTBITE, +}; + +enum +{ + LIST_STATUS2_CONFUSION, + LIST_STATUS2_FLINCHED, + LIST_STATUS2_TORMENT, + LIST_STATUS2_POWDER, + LIST_STATUS2_DEFENSE_CURL, + LIST_STATUS2_RECHARGE, + LIST_STATUS2_RAGE, + LIST_STATUS2_DESTINY_BOND, + LIST_STATUS2_ESCAPE_PREVENTION, + LIST_STATUS2_CURSED, + LIST_STATUS2_FORESIGHT, + LIST_STATUS2_DRAGON_CHEER, + LIST_STATUS2_FOCUS_ENERGY +}; + +enum +{ + LIST_STATUS3_LEECH_SEED_HEALER, + LIST_STATUS3_LEECH_SEEDED, + LIST_STATUS3_ALWAYS_HITS, + LIST_STATUS3_PERISH_SONG, + LIST_STATUS3_ON_AIR, + LIST_STATUS3_UNDERGROUND, + LIST_STATUS3_MINIMIZED, + LIST_STATUS3_CHARGED_UP, + LIST_STATUS3_ROOTED, + LIST_STATUS3_YAWN, + LIST_STATUS3_IMPRISONED_OTHERS, + LIST_STATUS3_GRUDGE, + LIST_STATUS3_GASTRO_ACID, + LIST_STATUS3_EMBARGO, + LIST_STATUS3_UNDERWATER, + LIST_STATUS3_SMACKED_DOWN, + LIST_STATUS3_TELEKINESIS, + LIST_STATUS3_MIRACLE_EYED, + LIST_STATUS3_MAGNET_RISE, + LIST_STATUS3_HEAL_BLOCK, + LIST_STATUS3_AQUA_RING, + LIST_STATUS3_LASER_FOCUS, + LIST_STATUS3_POWER_TRICK, +}; + +enum +{ + LIST_STATUS4_ELECTRIFIED, + LIST_STATUS4_MUD_SPORT, + LIST_STATUS4_WATER_SPORT, + LIST_STATUS4_SALT_CURE, + LIST_STATUS4_SYRUP_BOMB, + LIST_STATUS4_GLAIVE_RUSH, +}; + +enum +{ + LIST_SIDE_REFLECT, + LIST_SIDE_LIGHTSCREEN, + LIST_SIDE_STICKY_WEB, + LIST_SIDE_SPIKES, + LIST_SIDE_SAFEGUARD, + LIST_SIDE_MIST, + LIST_SIDE_TAILWIND, + LIST_SIDE_AURORA_VEIL, + LIST_SIDE_LUCKY_CHANT, + LIST_SIDE_TOXIC_SPIKES, + LIST_SIDE_STEALTH_ROCK, + LIST_SIDE_STEELSURGE, + LIST_SIDE_DAMAGE_NON_TYPES, + LIST_SIDE_RAINBOW, + LIST_SIDE_SEA_OF_FIRE, + LIST_SIDE_SWAMP, +}; + +enum +{ + LIST_AI_CHECK_BAD_MOVE, + LIST_AI_TRY_TO_FAINT, + LIST_AI_CHECK_VIABILITY, + LIST_AI_SETUP_FIRST_TURN, + LIST_AI_RISKY, + LIST_AI_PREFER_STRONGEST_MOVE, + LIST_AI_PREFER_BATON_PASS, + LIST_AI_DOUBLE_BATTLE, + LIST_AI_HP_AWARE, + LIST_AI_POWERFUL_STATUS, + LIST_AI_NEGATE_UNAWARE, + LIST_AI_WILL_SUICIDE, + LIST_AI_HELP_PARTNER, + LIST_AI_PREFER_STATUS_MOVES, + LIST_AI_STALL, + LIST_AI_SMART_SWITCHING, + LIST_AI_ACE_POKEMON, + LIST_AI_OMNISCIENT, + LIST_AI_SMART_MON_CHOICES, + LIST_AI_ROAMING, + LIST_AI_SAFARI, + LIST_AI_FIRST_BATTLE, +}; + +enum +{ + VARIOUS_SHOW_HP, + VARIOUS_SUBSTITUTE_HP, + VARIOUS_IN_LOVE, +}; + enum { ACTIVE_WIN_MAIN, @@ -140,114 +270,142 @@ enum VAL_ALL_STAT_STAGES, }; -enum -{ - LIST_SIDE_REFLECT, - LIST_SIDE_LIGHTSCREEN, - LIST_SIDE_SPIKES, - LIST_SIDE_SAFEGUARD, - LIST_SIDE_MIST, - LIST_SIDE_AURORA_VEIL, - LIST_SIDE_LUCKY_CHANT, - LIST_SIDE_TAILWIND, - LIST_SIDE_STEALTH_ROCK, - LIST_SIDE_TOXIC_SPIKES, - LIST_SIDE_STICKY_WEB, - LIST_SIDE_STEELSURGE, -}; - -enum -{ - VARIOUS_SHOW_HP, - VARIOUS_SUBSTITUTE_HP, - VARIOUS_IN_LOVE, -}; - // Static Declarations static const u8 *GetHoldEffectName(u16 holdEffect); // const rom data -static const u8 sText_HoldEffect[] = _("Hold Effect"); -static const u8 sText_Ability[] = _("Ability"); static const u8 sText_Moves[] = _("Moves"); +static const u8 sText_Ability[] = _("Ability"); +static const u8 sText_HeldItem[] = _("Held Item"); +static const u8 sText_HoldEffect[] = _("Hold Effect"); +static const u8 sText_PP[] = _("PP"); +static const u8 sText_Types[] = _("Types"); static const u8 sText_Stats[] = _("Stats"); static const u8 sText_StatStages[] = _("Stat Stages"); static const u8 sText_Status1[] = _("Status1"); static const u8 sText_Status2[] = _("Status2"); static const u8 sText_Status3[] = _("Status3"); static const u8 sText_Status4[] = _("Status4"); -static const u8 sText_HeldItem[] = _("Held Item"); static const u8 sText_SideStatus[] = _("Side Status"); -static const u8 sText_MaxHp[] = _("HP Max"); +static const u8 sText_AI[] = _("AI"); +static const u8 sText_AIMovePts[] = _("AI Pts/Dmg"); +static const u8 sText_AiKnowledge[] = _("AI Info"); +static const u8 sText_AiParty[] = _("AI Party"); +static const u8 sText_Various[] = _("Various"); static const u8 sText_CurrHp[] = _("HP Current"); +static const u8 sText_MaxHp[] = _("HP Max"); +static const u8 sText_Attack[] = _("Attack"); +static const u8 sText_Defense[] = _("Defense"); +static const u8 sText_Speed[] = _("Speed"); +static const u8 sText_SpAtk[] = _("Sp. Atk"); +static const u8 sText_SpDef[] = _("Sp. Def"); +static const u8 sText_Sleep[] = _("Sleep"); +static const u8 sText_Poison[] = _("Poison"); +static const u8 sText_Burn[] = _("Burn"); static const u8 sText_Freeze[] = _("Freeze"); -static const u8 sText_Frostbite[] = _("Frostbite"); +static const u8 sText_Paralysis[] = _("Paralysis"); static const u8 sText_ToxicPoison[] = _("Toxic Poison"); static const u8 sText_ToxicCounter[] = _("Toxic Counter"); -static const u8 sText_Flinch[] = _("Flinch"); +static const u8 sText_Frostbite[] = _("Frostbite"); +static const u8 sText_Confusion[] = _("Confusion"); +static const u8 sText_Flinched[] = _("Flinched"); static const u8 sText_Uproar[] = _("Uproar"); +static const u8 sText_Torment[] = _("Torment"); static const u8 sText_Bide[] = _("Bide"); static const u8 sText_LockConfuse[] = _("Lock Confuse"); -static const u8 sText_MultipleTurns[] = _("MultipleTurns"); -static const u8 sText_FocusEnergy[] = _("Focus Energy"); +static const u8 sText_MultipleTurns[] = _("Multiple Turns"); +static const u8 sText_Wrapped[] = _("Wrapped"); +static const u8 sText_Powder[] = _("Powder"); +static const u8 sText_Infatuation[] = _("Infatuation"); +static const u8 sText_DefenseCurl[] = _("Defense Curl"); static const u8 sText_Transformed[] = _("Transformed"); static const u8 sText_Recharge[] = _("Recharge"); static const u8 sText_Rage[] = _("Rage"); static const u8 sText_Substitute[] = _("Substitute"); -static const u8 sText_SubstituteHp[] = _("Substitute HP"); static const u8 sText_DestinyBond[] = _("Destiny Bond"); -static const u8 sText_CantEscape[] = _("Cant Escape"); +static const u8 sText_EscapePrevention[] = _("Escape Prevention"); static const u8 sText_Nightmare[] = _("Nightmare"); static const u8 sText_Cursed[] = _("Cursed"); -static const u8 sText_Foresight[] = _("Foresighted"); -static const u8 sText_DefenseCurl[] = _("Def Curled"); -static const u8 sText_Tormented[] = _("Tormented"); -static const u8 sText_AlwaysHits[] = _("Sure Hit"); +static const u8 sText_Foresight[] = _("Foresight"); +static const u8 sText_DragonCheer[] = _("Dragon Cheer"); +static const u8 sText_FocusEnergy[] = _("Focus Energy"); +static const u8 sText_LeechSeedHealer[] = _("Leech Seed Healer"); +static const u8 sText_LeechSeeded[] = _("Leech Seeded"); +static const u8 sText_AlwaysHits[] = _("Always Hits"); +static const u8 sText_PerishSong[] = _("Perish Song"); +static const u8 sText_OnAir[] = _("On Air"); +static const u8 sText_Underground[] = _("Underground"); +static const u8 sText_Minimized[] = _("Minimized"); static const u8 sText_ChargedUp[] = _("Charged Up"); static const u8 sText_Rooted[] = _("Rooted"); -static const u8 sText_Yawned[] = _("Yawned"); -static const u8 sText_Minimized[] = _("Minimized"); -static const u8 sText_NoCrit[] = _("No Crit"); -static const u8 sText_Imprisoned[] = _("Imprison"); +static const u8 sText_Yawn[] = _("Yawn"); +static const u8 sText_ImprisonedOthers[] = _("Imprisoned Others"); +static const u8 sText_Grudge[] = _("Grudge"); +static const u8 sText_GastroAcid[] = _("Gastro Acid"); +static const u8 sText_Embargo[] = _("Embargo"); +static const u8 sText_Underwater[] = _("Underwater"); +static const u8 sText_Trace[] = _("Trace"); +static const u8 sText_SmackedDown[] = _("Smacked Down"); +static const u8 sText_MeFirst[] = _("Me First"); +static const u8 sText_Telekinesis[] = _("Telekinesis"); +static const u8 sText_PhantomForce[] = _("Phantom Force"); +static const u8 sText_MiracleEyed[] = _("Miracle Eyed"); +static const u8 sText_MagnetRise[] = _("Magnet Rise"); +static const u8 sText_HealBlock[] = _("Heal Block"); +static const u8 sText_AquaRing[] = _("Aqua Ring"); +static const u8 sText_LaserFocus[] = _("Laser Focus"); +static const u8 sText_PowerTrick[] = _("Power Trick"); +static const u8 sText_SkyDropped[] = _("Sky Dropped"); +static const u8 sText_Electrified[] = _("Electrified"); +static const u8 sText_MudSport[] = _("Mud Sport"); +static const u8 sText_WaterSport[] = _("Water Sport"); +static const u8 sText_InfiniteConfusion[] = _("Infinite Confusion"); +static const u8 sText_SaltCure[] = _("Salt Cure"); +static const u8 sText_SyrupBomb[] = _("Syrup Bomb"); +static const u8 sText_GlaiveRush[] = _("Glaive Rush"); static const u8 sText_Reflect[] = _("Reflect"); static const u8 sText_LightScreen[] = _("Light Screen"); +static const u8 sText_StickyWeb[] = _("Sticky Web"); static const u8 sText_Spikes[] = _("Spikes"); static const u8 sText_Safeguard[] = _("Safeguard"); +static const u8 sText_FutureAttack[] = _("Future Attack"); static const u8 sText_Mist[] = _("Mist"); -static const u8 sText_ShowOpponentHP[] = _("Opponent Hp"); -static const u8 sText_Types[] = _("Types"); -static const u8 sText_GastroAcid[] = _("Gastro Acid"); -static const u8 sText_SmackDown[] = _("Smacked Down"); -static const u8 sText_MiracleEye[] = _("Miracle Eye"); -static const u8 sText_AquaRing[] = _("Aqua Ring"); -static const u8 sText_LaserFocus[] = _("Laser Focused"); -static const u8 sText_Electrified[] = _("Electrified"); +static const u8 sText_Tailwind[] = _("Tailwind"); static const u8 sText_AuroraVeil[] = _("Aurora Veil"); static const u8 sText_LuckyChant[] = _("Lucky Chant"); -static const u8 sText_Tailwind[] = _("Tailwind"); -static const u8 sText_PP[] = _("PP"); -static const u8 sText_StealthRock[] = _("Stealth Rock"); static const u8 sText_ToxicSpikes[] = _("Toxic Spikes"); -static const u8 sText_StickyWeb[] = _("Sticky Web"); +static const u8 sText_StealthRock[] = _("Stealth Rock"); static const u8 sText_Steelsurge[] = _("Steelsurge"); -static const u8 sText_AI[] = _("AI"); -static const u8 sText_NoBadMoves[] = _("No Bad Moves"); -static const u8 sText_Viability[] = _("Viability"); -static const u8 sText_TryFaint[] = _("Try Faint"); -static const u8 sText_SetUpFirstTurn[] = _("Setup 1 turn"); +static const u8 sText_DamageNonTypes[] = _("Damage Non-Types"); +static const u8 sText_Rainbow[] = _("Rainbow"); +static const u8 sText_SeaOfFire[] = _("Sea of Fire"); +static const u8 sText_Swamp[] = _("Swamp"); +static const u8 sText_CheckBadMove[] = _("Check Bad Move"); +static const u8 sText_TryToFaint[] = _("Try to Faint"); +static const u8 sText_CheckViability[] = _("Check Viability"); +static const u8 sText_SetUpFirstTurn[] = _("Setup First Turn"); static const u8 sText_Risky[] = _("Risky"); -static const u8 sText_StrongestMove[] = _("Most dmg move"); -static const u8 sText_Various[] = _("Various"); +static const u8 sText_PreferStrongestMove[] = _("Prefer Strongest Move"); +static const u8 sText_PreferBatonPass[] = _("Prefer Baton Pass"); +static const u8 sText_DoubleBattle[] = _("Double Battle"); +static const u8 sText_HpAware[] = _("HP Aware"); +static const u8 sText_PowerfulStatus[] = _("Powerful Status"); +static const u8 sText_NegateUnaware[] = _("Negate Unaware"); +static const u8 sText_WillSuicide[] = _("Will Suicide"); +static const u8 sText_HelpPartner[] = _("Help Partner"); +static const u8 sText_PreferStatusMoves[] = _("Prefer Status Moves"); +static const u8 sText_Stall[] = _("Stall"); +static const u8 sText_SmartSwitching[] = _("Smart Switching"); +static const u8 sText_AcePokemon[] = _("Ace Pokemon"); +static const u8 sText_Omniscient[] = _("Omniscient"); +static const u8 sText_SmartMonChoices[] = _("Smart Mon Choices"); +static const u8 sText_Roaming[] = _("Roaming"); +static const u8 sText_Safari[] = _("Safari"); +static const u8 sText_FirstBattle[] = _("First Battle"); static const u8 sText_ShowHP[] = _("Show HP"); -static const u8 sText_PreferBatonPass[] = _("Baton Pass"); -static const u8 sText_InDoubles[] = _("In Doubles"); -static const u8 sText_HpAware[] = _("HP aware"); -static const u8 sText_Unknown[] = _("Unknown"); +static const u8 sText_SubstituteHp[] = _("Substitute HP"); static const u8 sText_InLove[] = _("In Love"); -static const u8 sText_AIMovePts[] = _("AI Pts/Dmg"); -static const u8 sText_AiKnowledge[] = _("AI Info"); -static const u8 sText_AiParty[] = _("AI Party"); - +static const u8 sText_Unknown[] = _("Unknown"); static const u8 sText_EmptyString[] = _(""); static const struct BitfieldInfo sStatus1Bitfield[] = @@ -265,78 +423,86 @@ static const struct BitfieldInfo sStatus1Bitfield[] = static const struct BitfieldInfo sStatus2Bitfield[] = { {/*Confusion*/ 3, 0}, - {/*Flinch*/ 1, 3}, - {/*Uproar*/ 3, 4}, - // Bit 7 is unused. - {/*Bide*/ 2, 8}, - {/*Lock Confuse*/ 2, 10}, - {/*Multiple Turns*/ 1, 12}, - // Wrap bits are omitted. Done in various. - // In Love bits are omitted. Done in various. - {/*(Focus Energy*/ 1, 20}, - {/*Transformed*/ 1, 21}, + {/*Flinched*/ 1, 3}, + {/*Torment*/ 1, 7}, + {/*Powder*/ 1, 14}, + {/*Defense Curl*/ 1, 20}, {/*Recharge*/ 1, 22}, {/*Rage*/ 1, 23}, - {/*Substitute*/ 1, 24}, - {/*Destiny bond*/ 1, 25}, - {/*Can't escape*/ 1, 26}, - {/*Nightmares*/ 1, 27}, + {/*Destiny Bond*/ 1, 25}, + {/*Escape Prevention*/ 1, 26}, {/*Cursed*/ 1, 28}, - {/*Foresighted*/ 1, 29}, - {/*Defense Curled*/ 1, 30}, - {/*Tormented*/ 1, 31}, + {/*Foresight*/ 1, 29}, + {/*Dragon Cheer*/ 1, 30}, + {/*Focus Energy*/ 1, 31}, }; static const struct BitfieldInfo sStatus3Bitfield[] = { - {/*Always hits*/ 2, 4}, - //*Perish Song*/ 1, 5}, - // On Air 1, 6, - // Underground 1, 7, + {/*Leech Seed Battler*/ 2, 0}, + {/*Leech Seed*/ 1, 2}, + {/*Always Hits*/ 2, 3}, + {/*Perish Song*/ 1, 5}, + {/*On Air*/ 1, 6}, + {/*Underground*/ 1, 7}, {/*Minimized*/ 1, 8}, {/*Charged Up*/ 1, 9}, {/*Rooted*/ 1, 10}, {/*Yawn*/ 2, 11}, - {/*Imprison*/ 1, 13}, - // Grudge 1, 14, - {/*No Crit*/ 1, 15}, + {/*Imprisoned Others*/ 1, 13}, + {/*Grudge*/ 1, 14}, {/*Gastro Acid*/ 1, 16}, - // Embargo 1, 17, - // Underwater 1, 18, - // Intimidated Mons 1, 19, - // Traced 1, 20, + {/*Embargo*/ 1, 17}, + {/*Underwater*/ 1, 18}, {/*Smacked Down*/ 1, 21}, - // Me First 1, 22, - // Telekinesis 1, 23, - // Phantom Force 1, 24}, + {/*Telekinesis*/ 1, 23}, {/*Miracle Eyed*/ 1, 25}, - // Magnet Rise 1, 26, - // Heal Block 1, 27, + {/*Magnet Rise*/ 1, 26}, + {/*Heal Blocked*/ 1, 27}, {/*Aqua Ring*/ 1, 28}, {/*Laser Focus*/ 1, 29}, - // Power Trick 1, 30, + {/*Power Trick*/ 1, 30}, }; static const struct BitfieldInfo sStatus4Bitfield[] = { - {/*Electrified*/ 1, 0,} + {/*Electrified*/ 1, 0}, + {/*Mud Sport*/ 1, 1}, + {/*Water Sport*/ 1, 2}, + {/*Salt Cure*/ 1, 4}, + {/*Syrup Bomb*/ 1, 5}, + {/*Glaive Rush*/ 1, 6}, }; static const struct BitfieldInfo sAIBitfield[] = { - {/*Check bad move*/ 1, 0}, - {/*Try To Faint*/ 1, 1}, - {/*Viability*/ 1, 2}, - {/*Set up first turn*/ 1, 3}, + {/*Check Bad Move*/ 1, 0}, + {/*Try to Faint*/ 1, 1}, + {/*Check Viability*/ 1, 2}, + {/*Setup First Turn*/ 1, 3}, {/*Risky*/ 1, 4}, {/*Prefer Strongest Move*/ 1, 5}, {/*Prefer Baton Pass*/ 1, 6}, - {/*In Doubles*/ 1, 7}, - {/*Hp aware*/ 1, 8}, - {/*Unknown*/ 1, 9}, + {/*Double Battle*/ 1, 7}, + {/*HP Aware*/ 1, 8}, + {/*Powerful Status*/ 1, 9}, + {/*Negate Unaware*/ 1, 10}, + {/*Will Suicide*/ 1, 11}, + {/*Help Partner*/ 1, 12}, + {/*Prefer Status Moves*/ 1, 13}, + {/*Stall*/ 1, 14}, + {/*Smart Switching*/ 1, 15}, + {/*Ace Pokemon*/ 1, 16}, + {/*Omniscient*/ 1, 17}, + {/*Smart Mon Choices*/ 1, 18}, + {/*Ace Pokemon*/ 1, 16}, + {/*Omniscient*/ 1, 17}, + {/*Smart Mon Choices*/ 1, 18}, + {/*Roaming*/ 1, 29}, + {/*Safari*/ 1, 30}, + {/*First Battle*/ 1, 31}, }; - static const struct ListMenuItem sMainListItems[] = { {sText_Moves, LIST_ITEM_MOVES}, @@ -358,106 +524,134 @@ static const struct ListMenuItem sMainListItems[] = {sText_Various, LIST_ITEM_VARIOUS}, }; -static const struct ListMenuItem sVariousListItems[] = -{ - {sText_ShowHP, VARIOUS_SHOW_HP}, - {sText_SubstituteHp, VARIOUS_SUBSTITUTE_HP}, - {sText_InLove, VARIOUS_IN_LOVE}, -}; - -static const struct ListMenuItem sAIListItems[] = -{ - {sText_NoBadMoves, 0}, - {sText_TryFaint, 1}, - {sText_Viability, 2}, - {sText_SetUpFirstTurn, 3}, - {sText_Risky, 4}, - {sText_StrongestMove, 5}, - {sText_PreferBatonPass, 6}, - {sText_InDoubles, 7}, - {sText_HpAware, 8}, - // {sText_Unknown, 9}, -}; - static const struct ListMenuItem sStatsListItems[] = { - {sText_CurrHp, 0}, - {sText_MaxHp, 1}, - {gText_Attack, 2}, - {gText_Defense, 3}, - {gText_Speed, 4}, - {gText_SpAtk, 5}, - {gText_SpDef, 6}, + {sText_CurrHp, LIST_STAT_HP_CURRENT}, + {sText_MaxHp, LIST_STAT_HP_MAX}, + {sText_Attack, LIST_STAT_ATTACK}, + {sText_Defense, LIST_STAT_DEFENSE}, + {sText_Speed, LIST_STAT_SPEED}, + {sText_SpAtk, LIST_STAT_SP_ATK}, + {sText_SpDef, LIST_STAT_SP_DEF}, }; static const struct ListMenuItem sStatus1ListItems[] = { - {gText_Sleep, 0}, - {gText_Poison, 1}, - {gText_Burn, 2}, - {sText_Freeze, 3}, - {gText_Paralysis, 4}, - {sText_ToxicPoison, 5}, - {sText_ToxicCounter, 6}, - {sText_Frostbite, 7}, + {sText_Sleep, LIST_STATUS1_SLEEP}, + {sText_Poison, LIST_STATUS1_POISON}, + {sText_Burn, LIST_STATUS1_BURN}, + {sText_Freeze, LIST_STATUS1_FREEZE}, + {sText_Paralysis, LIST_STATUS1_PARALYSIS}, + {sText_ToxicPoison, LIST_STATUS1_TOXIC_POISON}, + {sText_ToxicCounter, LIST_STATUS1_TOXIC_COUNTER}, + {sText_Frostbite, LIST_STATUS1_FROSTBITE}, }; static const struct ListMenuItem sStatus2ListItems[] = { - {gText_Confusion, 0}, - {sText_Flinch, 1}, - {sText_Uproar, 2}, - {sText_Bide, 3}, - {sText_LockConfuse, 4}, - {sText_MultipleTurns, 5}, - {sText_FocusEnergy, 6}, - {sText_Recharge, 7}, - {sText_Rage, 8}, - {sText_Substitute, 9}, - {sText_DestinyBond, 10}, - {sText_CantEscape, 11}, - {sText_Nightmare, 12}, - {sText_Cursed, 13}, - {sText_Foresight, 14}, - {sText_DefenseCurl, 15}, - {sText_Tormented, 16}, + {sText_Confusion, LIST_STATUS2_CONFUSION}, + {sText_Flinched, LIST_STATUS2_FLINCHED}, + {sText_Torment, LIST_STATUS2_TORMENT}, + {sText_Powder, LIST_STATUS2_POWDER}, + {sText_DefenseCurl, LIST_STATUS2_DEFENSE_CURL}, + {sText_Recharge, LIST_STATUS2_RECHARGE}, + {sText_Rage, LIST_STATUS2_RAGE}, + {sText_DestinyBond, LIST_STATUS2_DESTINY_BOND}, + {sText_EscapePrevention, LIST_STATUS2_ESCAPE_PREVENTION}, + {sText_Cursed, LIST_STATUS2_CURSED}, + {sText_Foresight, LIST_STATUS2_FORESIGHT}, + {sText_DragonCheer, LIST_STATUS2_DRAGON_CHEER}, + {sText_FocusEnergy, LIST_STATUS2_FOCUS_ENERGY}, }; static const struct ListMenuItem sStatus3ListItems[] = { - {sText_AlwaysHits, 0}, - {sText_Minimized, 1}, - {sText_ChargedUp, 2}, - {sText_Rooted, 3}, - {sText_Yawned, 4}, - {sText_Imprisoned, 5}, - {sText_NoCrit, 6}, - {sText_GastroAcid, 7}, - {sText_SmackDown, 8}, - {sText_MiracleEye, 9}, - {sText_AquaRing, 10}, - {sText_LaserFocus, 11}, + {sText_LeechSeedHealer, LIST_STATUS3_LEECH_SEED_HEALER}, + {sText_LeechSeeded, LIST_STATUS3_LEECH_SEEDED}, + {sText_AlwaysHits, LIST_STATUS3_ALWAYS_HITS}, + {sText_PerishSong, LIST_STATUS3_PERISH_SONG}, + {sText_OnAir, LIST_STATUS3_ON_AIR}, + {sText_Underground, LIST_STATUS3_UNDERGROUND}, + {sText_Minimized, LIST_STATUS3_MINIMIZED}, + {sText_ChargedUp, LIST_STATUS3_CHARGED_UP}, + {sText_Rooted, LIST_STATUS3_ROOTED}, + {sText_Yawn, LIST_STATUS3_YAWN}, + {sText_ImprisonedOthers, LIST_STATUS3_IMPRISONED_OTHERS}, + {sText_Grudge, LIST_STATUS3_GRUDGE}, + {sText_GastroAcid, LIST_STATUS3_GASTRO_ACID}, + {sText_Embargo, LIST_STATUS3_EMBARGO}, + {sText_Underwater, LIST_STATUS3_UNDERWATER}, + {sText_SmackedDown, LIST_STATUS3_SMACKED_DOWN}, + {sText_Telekinesis, LIST_STATUS3_TELEKINESIS}, + {sText_MiracleEyed, LIST_STATUS3_MIRACLE_EYED}, + {sText_MagnetRise, LIST_STATUS3_MAGNET_RISE}, + {sText_HealBlock, LIST_STATUS3_HEAL_BLOCK}, + {sText_AquaRing, LIST_STATUS3_AQUA_RING}, + {sText_LaserFocus, LIST_STATUS3_LASER_FOCUS}, + {sText_PowerTrick, LIST_STATUS3_POWER_TRICK}, }; static const struct ListMenuItem sStatus4ListItems[] = { - {sText_Electrified, 0}, + {sText_Electrified, LIST_STATUS4_ELECTRIFIED}, + {sText_MudSport, LIST_STATUS4_MUD_SPORT}, + {sText_WaterSport, LIST_STATUS4_WATER_SPORT}, + {sText_SaltCure, LIST_STATUS4_SALT_CURE}, + {sText_SyrupBomb, LIST_STATUS4_SYRUP_BOMB}, + {sText_GlaiveRush, LIST_STATUS4_GLAIVE_RUSH}, }; static const struct ListMenuItem sSideStatusListItems[] = { {sText_Reflect, LIST_SIDE_REFLECT}, {sText_LightScreen, LIST_SIDE_LIGHTSCREEN}, + {sText_StickyWeb, LIST_SIDE_STICKY_WEB}, {sText_Spikes, LIST_SIDE_SPIKES}, {sText_Safeguard, LIST_SIDE_SAFEGUARD}, {sText_Mist, LIST_SIDE_MIST}, + {sText_Tailwind, LIST_SIDE_TAILWIND}, {sText_AuroraVeil, LIST_SIDE_AURORA_VEIL}, {sText_LuckyChant, LIST_SIDE_LUCKY_CHANT}, - {sText_Tailwind, LIST_SIDE_TAILWIND}, - {sText_StealthRock, LIST_SIDE_STEALTH_ROCK}, {sText_ToxicSpikes, LIST_SIDE_TOXIC_SPIKES}, - {sText_StickyWeb, LIST_SIDE_STICKY_WEB}, + {sText_StealthRock, LIST_SIDE_STEALTH_ROCK}, {sText_Steelsurge, LIST_SIDE_STEELSURGE}, + {sText_DamageNonTypes, LIST_SIDE_DAMAGE_NON_TYPES}, + {sText_Rainbow, LIST_SIDE_RAINBOW}, + {sText_SeaOfFire, LIST_SIDE_SEA_OF_FIRE}, + {sText_Swamp, LIST_SIDE_SWAMP}, +}; + +static const struct ListMenuItem sAIListItems[] = +{ + {sText_CheckBadMove, LIST_AI_CHECK_BAD_MOVE}, + {sText_TryToFaint, LIST_AI_TRY_TO_FAINT}, + {sText_CheckViability, LIST_AI_CHECK_VIABILITY}, + {sText_SetUpFirstTurn, LIST_AI_SETUP_FIRST_TURN}, + {sText_Risky, LIST_AI_RISKY}, + {sText_PreferStrongestMove, LIST_AI_PREFER_STRONGEST_MOVE}, + {sText_PreferBatonPass, LIST_AI_PREFER_BATON_PASS}, + {sText_DoubleBattle, LIST_AI_DOUBLE_BATTLE}, + {sText_HpAware, LIST_AI_HP_AWARE}, + {sText_PowerfulStatus, LIST_AI_POWERFUL_STATUS}, + {sText_NegateUnaware, LIST_AI_NEGATE_UNAWARE}, + {sText_WillSuicide, LIST_AI_WILL_SUICIDE}, + {sText_HelpPartner, LIST_AI_HELP_PARTNER}, + {sText_PreferStatusMoves, LIST_AI_PREFER_STATUS_MOVES}, + {sText_Stall, LIST_AI_STALL}, + {sText_SmartSwitching, LIST_AI_SMART_SWITCHING}, + {sText_AcePokemon, LIST_AI_ACE_POKEMON}, + {sText_Omniscient, LIST_AI_OMNISCIENT}, + {sText_SmartMonChoices, LIST_AI_SMART_MON_CHOICES}, + {sText_Roaming, LIST_AI_ROAMING}, + {sText_Safari, LIST_AI_SAFARI}, + {sText_FirstBattle, LIST_AI_FIRST_BATTLE}, +}; + +static const struct ListMenuItem sVariousListItems[] = +{ + {sText_ShowHP, VARIOUS_SHOW_HP}, + {sText_SubstituteHp, VARIOUS_SUBSTITUTE_HP}, + {sText_InLove, VARIOUS_IN_LOVE}, }; static const struct ListMenuItem sSecondaryListItems[] = @@ -527,7 +721,7 @@ static const struct WindowTemplate sMainListWindowTemplate = .width = 9, .height = 12, .paletteNum = 0xF, - .baseBlock = 0x2 + .baseBlock = 0x1 }; static const struct WindowTemplate sSecondaryListWindowTemplate = @@ -535,10 +729,10 @@ static const struct WindowTemplate sSecondaryListWindowTemplate = .bg = 0, .tilemapLeft = 12, .tilemapTop = 3, - .width = 10, - .height = 2, + .width = 20, + .height = 16, .paletteNum = 0xF, - .baseBlock = 0xA0 + .baseBlock = 0x6D }; static const struct WindowTemplate sModifyWindowTemplate = @@ -549,7 +743,7 @@ static const struct WindowTemplate sModifyWindowTemplate = .width = 4, .height = 2, .paletteNum = 0xF, - .baseBlock = 0x200 + .baseBlock = 0x1AD }; static const struct WindowTemplate sBattlerWindowTemplate = @@ -560,7 +754,7 @@ static const struct WindowTemplate sBattlerWindowTemplate = .width = 14, .height = 2, .paletteNum = 0xF, - .baseBlock = 0x300 + .baseBlock = 0x1B5 }; static const struct BgTemplate sBgTemplates[] = @@ -1363,7 +1557,6 @@ static void CreateSecondaryListMenu(struct BattleDebugMenu *data) listTemplate.items = sStatus2ListItems; itemsCount = ARRAY_COUNT(sStatus2ListItems); data->bitfield = sStatus2Bitfield; - winTemplate.height = 1; break; case LIST_ITEM_STATUS3: listTemplate.items = sStatus3ListItems; @@ -1394,7 +1587,6 @@ static void CreateSecondaryListMenu(struct BattleDebugMenu *data) } data->secondaryListItemCount = itemsCount; - winTemplate.height *= itemsCount; data->secondaryListWindowId = AddWindow(&winTemplate); listTemplate.totalItems = itemsCount; @@ -1411,10 +1603,10 @@ static void PadString(const u8 *src, u8 *dst) { u32 i; - for (i = 0; i < 17 && src[i] != EOS; i++) + for (i = 0; i < 19 && src[i] != EOS; i++) dst[i] = src[i]; - for (; i < 17; i++) + for (; i < 19; i++) dst[i] = CHAR_SPACE; dst[i] = EOS; @@ -1516,11 +1708,10 @@ static void PrintSecondaryEntries(struct BattleDebugMenu *data) static void DestroyModifyArrows(struct BattleDebugMenu *data) { - FreeSpritePaletteByTag(gSpritePalette_Arrow.tag); if (data->modifyArrows.arrowSpriteId[0] != 0xFF) - DestroySprite(&gSprites[data->modifyArrows.arrowSpriteId[0]]); + DestroySpriteAndFreeResources(&gSprites[data->modifyArrows.arrowSpriteId[0]]); if (data->modifyArrows.arrowSpriteId[1] != 0xFF) - DestroySprite(&gSprites[data->modifyArrows.arrowSpriteId[1]]); + DestroySpriteAndFreeResources(&gSprites[data->modifyArrows.arrowSpriteId[1]]); } static void PrintDigitChars(struct BattleDebugMenu *data) @@ -1533,6 +1724,7 @@ static void PrintDigitChars(struct BattleDebugMenu *data) text[i] = EOS; + FillWindowPixelBuffer(data->modifyWindowId, 0x11); AddTextPrinterParameterized(data->modifyWindowId, FONT_NORMAL, text, 3, 0, 0, NULL); } @@ -1686,6 +1878,17 @@ static u8 *GetSideStatusValue(struct BattleDebugMenu *data, bool32 changeStatus, sideTimer->lightscreenBattlerId = data->battlerId; } return &sideTimer->lightscreenTimer; + case LIST_SIDE_STICKY_WEB: + if (changeStatus) + { + if (statusTrue) + *(u32 *)(data->modifyArrows.modifiedValPtr) |= SIDE_STATUS_STICKY_WEB; + else + *(u32 *)(data->modifyArrows.modifiedValPtr) &= ~SIDE_STATUS_STICKY_WEB; + sideTimer->stickyWebBattlerId = data->battlerId; + sideTimer->stickyWebBattlerSide = GetBattlerSide(data->battlerId); + } + return &sideTimer->stickyWebAmount; case LIST_SIDE_SPIKES: if (changeStatus) { @@ -1715,6 +1918,16 @@ static u8 *GetSideStatusValue(struct BattleDebugMenu *data, bool32 changeStatus, sideTimer->mistBattlerId = data->battlerId; } return &sideTimer->mistTimer; + case LIST_SIDE_TAILWIND: + if (changeStatus) + { + if (statusTrue) + *(u32 *)(data->modifyArrows.modifiedValPtr) |= SIDE_STATUS_TAILWIND; + else + *(u32 *)(data->modifyArrows.modifiedValPtr) &= ~SIDE_STATUS_TAILWIND; + sideTimer->tailwindBattlerId = data->battlerId; + } + return &sideTimer->tailwindTimer; case LIST_SIDE_AURORA_VEIL: if (changeStatus) { @@ -1735,25 +1948,6 @@ static u8 *GetSideStatusValue(struct BattleDebugMenu *data, bool32 changeStatus, sideTimer->luckyChantBattlerId = data->battlerId; } return &sideTimer->luckyChantTimer; - case LIST_SIDE_TAILWIND: - if (changeStatus) - { - if (statusTrue) - *(u32 *)(data->modifyArrows.modifiedValPtr) |= SIDE_STATUS_TAILWIND; - else - *(u32 *)(data->modifyArrows.modifiedValPtr) &= ~SIDE_STATUS_TAILWIND; - sideTimer->tailwindBattlerId = data->battlerId; - } - return &sideTimer->tailwindTimer; - case LIST_SIDE_STEALTH_ROCK: - if (changeStatus) - { - if (statusTrue) - *(u32 *)(data->modifyArrows.modifiedValPtr) |= SIDE_STATUS_STEALTH_ROCK; - else - *(u32 *)(data->modifyArrows.modifiedValPtr) &= ~SIDE_STATUS_STEALTH_ROCK; - } - return &sideTimer->stealthRockAmount; case LIST_SIDE_TOXIC_SPIKES: if (changeStatus) { @@ -1763,15 +1957,15 @@ static u8 *GetSideStatusValue(struct BattleDebugMenu *data, bool32 changeStatus, *(u32 *)(data->modifyArrows.modifiedValPtr) &= ~SIDE_STATUS_TOXIC_SPIKES; } return &sideTimer->toxicSpikesAmount; - case LIST_SIDE_STICKY_WEB: + case LIST_SIDE_STEALTH_ROCK: if (changeStatus) { if (statusTrue) - *(u32 *)(data->modifyArrows.modifiedValPtr) |= SIDE_STATUS_STICKY_WEB; + *(u32 *)(data->modifyArrows.modifiedValPtr) |= SIDE_STATUS_STEALTH_ROCK; else - *(u32 *)(data->modifyArrows.modifiedValPtr) &= ~SIDE_STATUS_STICKY_WEB; + *(u32 *)(data->modifyArrows.modifiedValPtr) &= ~SIDE_STATUS_STEALTH_ROCK; } - return &sideTimer->stickyWebAmount; + return &sideTimer->stealthRockAmount; case LIST_SIDE_STEELSURGE: if (changeStatus) { @@ -1781,6 +1975,43 @@ static u8 *GetSideStatusValue(struct BattleDebugMenu *data, bool32 changeStatus, *(u32 *)(data->modifyArrows.modifiedValPtr) &= ~SIDE_STATUS_STEELSURGE; } return &sideTimer->steelsurgeAmount; + case LIST_SIDE_DAMAGE_NON_TYPES: + if (changeStatus) + { + if (statusTrue) + *(u32 *)(data->modifyArrows.modifiedValPtr) |= SIDE_STATUS_DAMAGE_NON_TYPES; + else + *(u32 *)(data->modifyArrows.modifiedValPtr) &= ~SIDE_STATUS_DAMAGE_NON_TYPES; + sideTimer->damageNonTypesType = gMovesInfo[gCurrentMove].type; + } + return &sideTimer->damageNonTypesTimer; + case LIST_SIDE_RAINBOW: + if (changeStatus) + { + if (statusTrue) + *(u32 *)(data->modifyArrows.modifiedValPtr) |= SIDE_STATUS_RAINBOW; + else + *(u32 *)(data->modifyArrows.modifiedValPtr) &= ~SIDE_STATUS_RAINBOW; + } + return &sideTimer->rainbowTimer; + case LIST_SIDE_SEA_OF_FIRE: + if (changeStatus) + { + if (statusTrue) + *(u32 *)(data->modifyArrows.modifiedValPtr) |= SIDE_STATUS_SEA_OF_FIRE; + else + *(u32 *)(data->modifyArrows.modifiedValPtr) &= ~SIDE_STATUS_SEA_OF_FIRE; + } + return &sideTimer->seaOfFireTimer; + case LIST_SIDE_SWAMP: + if (changeStatus) + { + if (statusTrue) + *(u32 *)(data->modifyArrows.modifiedValPtr) |= SIDE_STATUS_SWAMP; + else + *(u32 *)(data->modifyArrows.modifiedValPtr) &= ~SIDE_STATUS_SWAMP; + } + return &sideTimer->swampTimer; default: return NULL; } @@ -1847,14 +2078,15 @@ static void SetUpModifyArrows(struct BattleDebugMenu *data) data->modifyArrows.minValue = 0; data->modifyArrows.maxValue = 9999; data->modifyArrows.maxDigits = 4; - if (data->currentSecondaryListItemId == 0) + data->modifyArrows.typeOfVal = VAL_U16; + if (data->currentSecondaryListItemId == LIST_STAT_HP_CURRENT) { data->modifyArrows.modifiedValPtr = &gBattleMons[data->battlerId].hp; data->modifyArrows.currValue = gBattleMons[data->battlerId].hp; data->modifyArrows.minValue = 1; data->modifyArrows.maxValue = gBattleMons[data->battlerId].maxHP; } - else if (data->currentSecondaryListItemId == 1) + else if (data->currentSecondaryListItemId == LIST_STAT_HP_MAX) { data->modifyArrows.modifiedValPtr = &gBattleMons[data->battlerId].maxHP; data->modifyArrows.minValue = gBattleMons[data->battlerId].hp; @@ -1865,7 +2097,6 @@ static void SetUpModifyArrows(struct BattleDebugMenu *data) data->modifyArrows.modifiedValPtr = (u16 *)((&gBattleMons[data->battlerId].attack) + (data->currentSecondaryListItemId - 2)); data->modifyArrows.currValue = *(u16 *)((&gBattleMons[data->battlerId].attack) + (data->currentSecondaryListItemId - 2)); } - data->modifyArrows.typeOfVal = VAL_U16; break; case LIST_ITEM_STAT_STAGES: data->modifyArrows.minValue = 0; @@ -2196,6 +2427,14 @@ static const u8 sText_HoldEffectRoomService[] = _("Room Service"); static const u8 sText_HoldEffectBlunderPolicy[] = _("Blunder Policy"); static const u8 sText_HoldEffectHeavyDutyBoots[] = _("Heavy Duty Boots"); static const u8 sText_HoldEffectThroatSpray[] = _("Throat Spray"); +static const u8 sText_HoldEffectAbilityShield[] = _("Ability Shield"); +static const u8 sText_HoldEffectClearAmulet[] = _("Clear Amulet"); +static const u8 sText_HoldEffectMirrorHerb[] = _("Mirror Herb"); +static const u8 sText_HoldEffectPunchingGlove[] = _("Punching Glove"); +static const u8 sText_HoldEffectCovertCloak[] = _("Covert Cloak"); +static const u8 sText_HoldEffectLoadedDice[] = _("Loaded Dice"); +static const u8 sText_HoldEffectBoosterEnergy[] = _("Booster Energy"); +static const u8 sText_HoldEffectBerserkGene[] = _("Berserk Gene"); static const u8 *const sHoldEffectNames[] = { [HOLD_EFFECT_NONE] = sText_HoldEffectNone, @@ -2338,6 +2577,14 @@ static const u8 *const sHoldEffectNames[] = [HOLD_EFFECT_BLUNDER_POLICY] = sText_HoldEffectBlunderPolicy, [HOLD_EFFECT_HEAVY_DUTY_BOOTS] = sText_HoldEffectHeavyDutyBoots, [HOLD_EFFECT_THROAT_SPRAY] = sText_HoldEffectThroatSpray, + [HOLD_EFFECT_ABILITY_SHIELD] = sText_HoldEffectAbilityShield, + [HOLD_EFFECT_CLEAR_AMULET] = sText_HoldEffectClearAmulet, + [HOLD_EFFECT_MIRROR_HERB] = sText_HoldEffectMirrorHerb, + [HOLD_EFFECT_PUNCHING_GLOVE] = sText_HoldEffectPunchingGlove, + [HOLD_EFFECT_COVERT_CLOAK] = sText_HoldEffectCovertCloak, + [HOLD_EFFECT_LOADED_DICE] = sText_HoldEffectLoadedDice, + [HOLD_EFFECT_BOOSTER_ENERGY] = sText_HoldEffectBoosterEnergy, + [HOLD_EFFECT_BERSERK_GENE] = sText_HoldEffectBerserkGene, }; static const u8 *GetHoldEffectName(u16 holdEffect) { From 3d65141db892930a456168e043592248557774d1 Mon Sep 17 00:00:00 2001 From: hedara90 <90hedara@gmail.com> Date: Fri, 26 Jul 2024 00:07:43 +0200 Subject: [PATCH 3/9] Fixed Sandile sprite (#5038) Co-authored-by: Hedara --- graphics/pokemon/sandile/anim_front.png | Bin 694 -> 693 bytes graphics/pokemon/sandile/back.png | Bin 429 -> 371 bytes graphics/pokemon/sandile/normal.pal | 9 +++------ graphics/pokemon/sandile/shiny.pal | 9 +++------ 4 files changed, 6 insertions(+), 12 deletions(-) diff --git a/graphics/pokemon/sandile/anim_front.png b/graphics/pokemon/sandile/anim_front.png index 24d3545a42c07e309540a92ca8febb7058ab867e..ccf8146b3be070da16c44c72dcfe2b11f79e8886 100644 GIT binary patch delta 647 zcmV;20(kwl1+@i`7#auz0001tU!Pb20004VQb$4nuFf3k0000dktHR6&2xLHTw^Os z05|{u0z64XK~!jg?U-#>!ypWW8%RK_|Nr-z7ZAEl(oX%Nxt`gr>%Anv**QGh77B$z zp4<;!jcwp=tzF z@&aDc5Z6MS29=0pR`|VtAMiQ_a4iHyY&^0=ao9Qliu3^ddeNXFMXRr0*8wQa^GKZV zIs&Ey0C=#thXA&4(bPJCf<1vR$@5Es4#}NJ1jz)Te%2B=U|$8uYN=m`-`9M z2~Uk13WY+UP$(3C3jIa>AVUGf1AtID9OcMRz>cBwQG*-`a>G#cEZ+b`^REN$7|MhX zjDk26<({ET2?|jh2y)L*4gf-qo=XJrkfF=~!eJO+Fq8oxo@FQoAcSBn5yti#>$v#9PCCqjR6fM^x+Xt6%tQ3s%$ z!z1T6--Hky(AdCdZW65un90=JfCGH#01g>|ZVG_F0>Yes;6FI8^#OL~vH%ZwvEx4t zpaEtYm~R8Mf}Hbtc#q5XI$~>U#HQ4$&bfaKE3I%w^zjn#)>LEfT5h15p_|{A>#vu> z>!?;HoraWirV@T9^no@d5rb#udq@<27AoDa;1%XFULsl5_y>uaxP~*`@nE0+bG)?y^kBkN?=>DO09Qnerwa=1Lp| zqsL$#Fl_K57(M<#aX_4o_(K-^aWLi&8P?M=e?aef i#XOR9`e9FbHGcv9tGxgAuxRlB0000oq7#auz0001;w}I>c0004VQb$4nuFf3k0000dkwPVZ&2xLHTw|yP z3~~Sf0QyNpK~z|U?UmaO!ypVp8!1lz|BuIIA)%rj3~4Wmr9QNh4-OdhI6|RN=s(2F zTXqtW4FpRSYnVlp`U?S&{A2)#tP>i5$oU2HetO%x0P}+7)n4biyU)iYU>^ z5JP$={py#TrI V4ELeS_z3_2002ovPDHLkV1k7$j)njL delta 381 zcmey&w3c~-gcb`k0|P^Zd(K-R#aJBV?!>U}oXkrghb7(7*O7r?V?XzwL{=c*V4{&~ zJ&;BQ&)McB0{NT;9+AZi419+{nDKc2iWHz(Y@RNTAs)xyPCVFmSb@hSa%D|}>ZE^u z6FttY6?q}4`L$O6>G$l}TNd(q`mf%bvP7f3vf{&nvbVp&cV6C>UwB7_ufyU}eyN{7 z!@QD+xylD5KFx`8sy}^zH}#wrgJVN6?*>Gm;ZVgZvXmINq@oF^HRrzJ}l8>p4DjdXX(eKb1&)7*rOcrg2T+Cn19xr5TQ-) zYvS6ItAxJ2EMMw>elq7gz4pEO@5-M}eauqOR#~s6yEVPZXou$3?CbKLE7?y-=e7&< RtjPccoTsaw%Q~loCIFKBmrVcw diff --git a/graphics/pokemon/sandile/normal.pal b/graphics/pokemon/sandile/normal.pal index b079c8061a..f428787e3c 100644 --- a/graphics/pokemon/sandile/normal.pal +++ b/graphics/pokemon/sandile/normal.pal @@ -1,6 +1,6 @@ JASC-PAL 0100 -16 +13 152 208 160 139 115 49 32 32 32 @@ -12,8 +12,5 @@ JASC-PAL 180 180 189 82 82 98 205 115 123 -0 0 0 -0 0 0 -0 0 0 -0 0 0 -0 0 0 +205 115 123 +169 92 99 diff --git a/graphics/pokemon/sandile/shiny.pal b/graphics/pokemon/sandile/shiny.pal index f92d5f6bd0..b1a758254b 100644 --- a/graphics/pokemon/sandile/shiny.pal +++ b/graphics/pokemon/sandile/shiny.pal @@ -1,6 +1,6 @@ JASC-PAL 0100 -16 +13 152 208 160 120 136 56 32 32 32 @@ -12,8 +12,5 @@ JASC-PAL 176 168 168 80 80 96 64 144 160 -0 0 0 -0 0 0 -0 0 0 -0 0 0 -0 0 0 +205 115 123 +169 92 99 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 4/9] 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 | 16 +++--- .../pokemon/ogerpon/hearthflame/shiny.pal | 16 +++--- graphics/pokemon/ogerpon/normal.pal | 12 ++-- graphics/pokemon/ogerpon/shiny.pal | 12 ++-- 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, 175 insertions(+), 39 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 742cdb2f26..367428eb50 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 aa62732c7d..cd656c2be9 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};6mBG{1&t;ucLK6V+ Cz8Nm;rrm%)ISzR9e*GYrE~)TeGhOw0Fd7S z@M{MUeT)%P;IDdK^&25Hxy9!z0KND>fGLb7cl{Rt2+%7)2!wAaM%AeP+Q0@d3rzBn zB4G*1_1_GDAa7apub1nQf_O)703qa(CpP^=IyC>+0A>X+v*>fvvy4Pde-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+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 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 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+k%x3=pSn;!K2XPL_NsuhcE*$QF0eo5k2o->290A&am}xFqaB@fr-~d2q1_IGB zjaFMi5DUm*r(Xi>FXa#%S%-SlTUn_EIRUl+fO(PhFWni`X!2UyLMUn}AC+6Efx3Rr zf9UQ8d+q}FnoQgb5T`vM_IC?~?W@>(ZN(a!=mkJCr|q54hDZTW=aY*6Np^q?34u=K zgWfC|AUi&OmfuYRfF6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58 +0200 Subject: [PATCH 5/9] 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 9ea7a453cb..2cd38c5559 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 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); + } +} From 89563cb9b124e4b9a6329091e23ad4463b8690c3 Mon Sep 17 00:00:00 2001 From: AlexOn1ine Date: Fri, 26 Jul 2024 21:11:16 +0200 Subject: [PATCH 6/9] 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 644a112d7d..118ef8c6b3 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 b9770ba950..1498d8936c 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 2cd38c5559..d0ccf4859e 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 7/9] 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 d0ccf4859e..ea2da5709e 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 8/9] 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 ea2da5709e..e87fa9f368 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 9/9] 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 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/src/field_weather_effect.c b/src/field_weather_effect.c index de0b90c480..10ce1bc37a 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; }