Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixes Emergency Exit when hp is restored over tag out range #4041

Merged
merged 3 commits into from
Jan 21, 2024

Conversation

AlexOn1ine
Copy link
Collaborator

Fixes #4029

Second part.

Co-authored-by: Bassoonian <iasperbassoonian@gmail.com>
@AlexOn1ine AlexOn1ine merged commit 04fa3aa into rh-hideout:master Jan 21, 2024
1 check passed
@@ -6793,6 +6793,10 @@ static u8 ItemHealHp(u32 battler, u32 itemId, bool32 end2, bool32 percentHeal)
BattleScriptPushCursor();
gBattlescriptCurrInstr = BattleScript_ItemHealHP_RemoveItemRet;
}
if (gBattleResources->flags->flags[battler] & RESOURCE_FLAG_EMERGENCY_EXIT
&& GetNonDynamaxMaxHP(battler) > gBattleMons[battler].maxHP / 2)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why are we comparing two maxHp values here? Shouldnt this be GetNonDynamaxHP(battler) > gBattleMons[battler].maxHP/2?

Copy link
Collaborator Author

@AlexOn1ine AlexOn1ine Feb 1, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i messed up. Fixed in #4100 follow up.

johannakullmann added a commit to johannakullmann/pokeemerald-expansion-base that referenced this pull request Mar 4, 2024
commit 35f7e16
Author: johannakullmann <151456919+johannakullmann@users.noreply.github.com>
Date:   Sat Mar 2 21:07:20 2024 +0100

    update gitignore to include poryscript folder

commit c8a7df0
Merge: 5a6bc81 bb01ab6
Author: Johanna K <kujojoo@gmail.com>
Date:   Sat Mar 2 20:59:03 2024 +0100

    Merge tag 'expansion/1.7.4' of https://github.com/rh-hideout/pokeemerald-expansion

commit bb01ab6
Author: Eduardo Quezada D'Ottone <eduardo602002@gmail.com>
Date:   Sun Feb 18 21:53:12 2024 -0300

    Version 1.7.4 (rh-hideout#4203)

    * Version 1.7.4

commit 585e06e
Author: kittenchilly <mario.pikmin.zelda@gmail.com>
Date:   Sun Feb 18 14:30:52 2024 -0600

    Move Tatsugiri and Squawkabilly base species icons to graphic root folders (rh-hideout#4212)

commit 3d2e0d2
Author: Eduardo Quezada D'Ottone <eduardo602002@gmail.com>
Date:   Sun Feb 18 06:21:56 2024 -0300

    Fixed Ursaluna's cry using P_GEN_9_CROSS_EVOS (rh-hideout#4210)

commit 45cee81
Author: Wesmaster <34153881+Wesmaster@users.noreply.github.com>
Date:   Sat Feb 17 20:26:45 2024 +0100

    Fixed LastUsedBall not being saved and DisplayBall not being shown (rh-hideout#4209)

    In rh-hideout#4168 b7d7709 a memset was added but this causes the issue rh-hideout#4200. The sizeof was done on the variable instead of the struct. This caused other variables in EWRAM to loose their value. I have no idea if this fix breaks what was intented to do in rh-hideout#4168.

    Also fixed the issue reported in my comment. When you run out of balls gLastThrownBall has a value, but you enter the if statement because you have no more balls. There the next in line ball is set to display but if there are non there is nothing to display. Afterwards when you get a new ball, you do not enter the if statement to update the gBallToDisplay because the ball is in the bag and gLastThrownBall is still set to not 0. Then it's checked if the bag has gBallToDisplay which does not point to a ball and therefor nothing is shown. Now we only update gBallToDisplay if there is actually a ball to display.

commit 20a3d91
Author: MelonSpeedruns <melonspeedruns@outlook.com>
Date:   Thu Feb 15 13:56:32 2024 -0500

    Fixed Basculegion Back Sprite Offset & Greninja forms animations (rh-hideout#4198)

commit 6a61e65
Author: Bassoonian <iasperbassoonian@gmail.com>
Date:   Thu Feb 15 13:07:31 2024 +0100

    Fix height call (rh-hideout#4195)

commit ab2260a
Author: cmy2008 <65344456+cmy2008@users.noreply.github.com>
Date:   Thu Feb 15 17:21:35 2024 +0800

    Deleted a space (rh-hideout#4194)

commit 3598a18
Author: Alex <93446519+AlexOn1ine@users.noreply.github.com>
Date:   Sun Feb 11 10:40:30 2024 +0100

    Adds config for Soundproof change during Uproar status (rh-hideout#4174)

commit b4fa0b1
Author: Bassoonian <iasperbassoonian@gmail.com>
Date:   Sat Feb 10 18:43:14 2024 +0100

    Clean up space/tabs difference (rh-hideout#4163)

commit b7d7709
Author: Alex <93446519+AlexOn1ine@users.noreply.github.com>
Date:   Sat Feb 10 18:18:29 2024 +0100

    Fixes Opportunist accumulating stat changes (rh-hideout#4168)

    * Fixes Opportunist accumulating stat changes

    * move memset to TurnValuesCleanUp

    * Update test/battle/ability/opportunist.c

    ---------

    Co-authored-by: Bassoonian <iasperbassoonian@gmail.com>

commit 8b871b7
Author: Eduardo Quezada D'Ottone <eduardo602002@gmail.com>
Date:   Sat Feb 10 13:13:46 2024 -0300

    Fixed Disguise not ending the battle in the correct form (rh-hideout#4167)

    * Fixed Disguise not ending the battle in the correct form

    * Added TODO comments

commit 5a6bc81
Merge: 7a37a99 2d24f96
Author: Johanna K <kujojoo@gmail.com>
Date:   Sat Feb 10 14:29:58 2024 +0100

    Merge tag 'expansion/1.7.3' of https://github.com/rh-hideout/pokeemerald-expansion

commit 0f312e3
Author: Eduardo Quezada D'Ottone <eduardo602002@gmail.com>
Date:   Fri Feb 9 18:51:36 2024 -0300

    Fixed Ogerpon shiny palettes (rh-hideout#4165)

commit 47abc33
Author: Hungry Pickle <81360291+HungryPickle@users.noreply.github.com>
Date:   Fri Feb 9 09:35:40 2024 -0500

    Fixes Stench ability triggering on non-damaging attacks (rh-hideout#4159)

    * Fixes Stench ability triggering on non-damaging attacks

    * adds stench ability test

    * added stench ability test for partner pokemon

    ---------

    Co-authored-by: HungryPickle <beardybirdy@gmail.com>

commit e89f8e0
Author: Alex <93446519+AlexOn1ine@users.noreply.github.com>
Date:   Fri Feb 9 14:00:42 2024 +0100

    Fixes Hit Escape moves interaction with hold effects and switch in ab… (rh-hideout#4091)

    * Fixes Hit Escape moves interaction with hold effects and switch in abilities

    * leftover

    * fix spelling

    * fix desc.

commit 31ac151
Author: DizzyEggg <jajkodizzy@wp.pl>
Date:   Fri Feb 9 13:58:16 2024 +0100

    Fix Full Restore / Antidote not reseting Toxic Counter (rh-hideout#4135)

    * Fix Full Restore / Antidote not reseting Toxic Counter

    * Update battle_scripts_2.s

    ---------

    Co-authored-by: Bassoonian <iasperbassoonian@gmail.com>

commit 4524325
Author: Alex <93446519+AlexOn1ine@users.noreply.github.com>
Date:   Wed Feb 7 15:42:22 2024 +0100

    Kee berry (rh-hideout#4149)

    * Fixes Kee Berry

    * new line

    * Fix fix

    ---------

    Co-authored-by: Bassoonian <iasperbassoonian@gmail.com>

commit fa5f507
Author: Alex <93446519+AlexOn1ine@users.noreply.github.com>
Date:   Tue Feb 6 23:30:57 2024 +0100

    Fixes Mycelium Might speed bracker (rh-hideout#4146)

    Co-authored-by: Bassoonian <iasperbassoonian@gmail.com>

commit 6a71e14
Author: Eduardo Quezada D'Ottone <eduardo602002@gmail.com>
Date:   Tue Feb 6 08:39:42 2024 -0300

    Added credits section to PR template (rh-hideout#4141)

commit 8b70cea
Author: ravepossum <145081120+ravepossum@users.noreply.github.com>
Date:   Mon Feb 5 09:40:25 2024 -0500

    Fix screen select bar popping in too early for area screen in HGSS dex (rh-hideout#4094)

    * fixing screen select bar popping in too early for area screen in HGSS pokedex

    * exit early from select bar load function if dex is disabled

    * remove unnecessary early exit

    ---------

    Co-authored-by: ravepossum <ravepossum@example.com>
    Co-authored-by: Bassoonian <iasperbassoonian@gmail.com>
    Co-authored-by: Alex <93446519+AlexOn1ine@users.noreply.github.com>

commit 065c0ec
Author: DizzyEggg <jajkodizzy@wp.pl>
Date:   Sun Feb 4 23:23:03 2024 +0100

    Fairy Lock animation fix (rh-hideout#4111)

    * Fairy Lock animation fix

    * remove comment

    * fairy lock anim hopefully works

    ---------

    Co-authored-by: Alex <93446519+AlexOn1ine@users.noreply.github.com>

commit 512ab98
Author: DizzyEggg <jajkodizzy@wp.pl>
Date:   Sun Feb 4 16:13:27 2024 +0100

    Fix disobedience not resetting multihit moves (rh-hideout#4133)

commit e75169f
Author: ravepossum <145081120+ravepossum@users.noreply.github.com>
Date:   Sat Feb 3 14:07:47 2024 -0500

    Fix HGSS Dex List Decapped Tileset (rh-hideout#4126)

    * fix decap HGSS dex tileset scroll bar

    * more tileset fixes

    ---------

    Co-authored-by: ravepossum <ravepossum@example.com>
    Co-authored-by: Bassoonian <iasperbassoonian@gmail.com>

commit 46d9adb
Author: Alex <93446519+AlexOn1ine@users.noreply.github.com>
Date:   Sat Feb 3 19:34:52 2024 +0100

    Fixes Eerie Spell double pp and message drop (rh-hideout#4127)

    Co-authored-by: Bassoonian <iasperbassoonian@gmail.com>

commit 85eea48
Author: DizzyEggg <jajkodizzy@wp.pl>
Date:   Sat Feb 3 16:56:50 2024 +0100

    Fix move animation crashing on some emulators because of division by zero (rh-hideout#4121)

    * fix flip turn div by zero

    * fix incinerate move anim div by zero

commit e828ae5
Author: kaicardenas2 <150625530+kaicardenas2@users.noreply.github.com>
Date:   Thu Feb 1 19:20:10 2024 -0500

    Non-Tagged Release (rh-hideout#4109)

commit 2d24f96
Author: Eduardo Quezada D'Ottone <eduardo602002@gmail.com>
Date:   Thu Feb 1 20:55:53 2024 -0300

    Version 1.7.3 (rh-hideout#4106)

    * Version 1.7.3

    * Latest changelog

commit 1d9e692
Merge: 1a65894 e8538ef
Author: DizzyEggg <jajkodizzy@wp.pl>
Date:   Thu Feb 1 20:19:14 2024 +0100

    Unused warnings are no longer treated as errrors by default (rh-hideout#4092)

commit e8538ef
Merge: 5af733a 1a65894
Author: Bassoonian <iasperbassoonian@gmail.com>
Date:   Thu Feb 1 13:48:44 2024 +0100

    Merge branch 'master' into _RHH/pr/master/unused

commit 1a65894
Author: Alex <93446519+AlexOn1ine@users.noreply.github.com>
Date:   Wed Jan 31 13:33:04 2024 +0100

    Fixes test description + small fix follow up (rh-hideout#4100)

    * Fixes test description + small fix follow up

    * fix fix

    * Apply suggestions from code review

    ---------

    Co-authored-by: Eduardo Quezada D'Ottone <eduardo602002@gmail.com>

commit 5af733a
Merge: f7e5709 f562359
Author: Eduardo Quezada D'Ottone <eduardo602002@gmail.com>
Date:   Wed Jan 31 08:18:55 2024 -0300

    Merge branch 'master' into _RHH/pr/master/unused

commit f7e5709
Author: Eduardo Quezada <eduardo602002@gmail.com>
Date:   Wed Jan 31 08:18:43 2024 -0300

    Review changes

commit f562359
Author: DizzyEggg <jajkodizzy@wp.pl>
Date:   Tue Jan 30 16:14:33 2024 +0100

    Fix AI trying to switch into the same mon 2 times (rh-hideout#4098)

commit 8b62828
Author: ravepossum <145081120+ravepossum@users.noreply.github.com>
Date:   Mon Jan 29 15:51:10 2024 -0500

    Fix HGSS Dex dark mode search palette (rh-hideout#4095)

    Co-authored-by: ravepossum <ravepossum@example.com>
    Co-authored-by: Eduardo Quezada D'Ottone <eduardo602002@gmail.com>

commit a2a38a5
Author: Eduardo Quezada D'Ottone <eduardo602002@gmail.com>
Date:   Mon Jan 29 17:01:50 2024 -0300

    Added passing "KNOWN_FAILING" to test summary (rh-hideout#4063)

    * Added passing "KNOWN_FAILING" to test summary

    * Added test names for passing KNOWN_FAILING to summary

    * Removed unused function

commit a0bcdbf
Author: Eduardo Quezada <eduardo602002@gmail.com>
Date:   Mon Jan 29 13:31:42 2024 -0300

    Workflow test worked, undoing changes

commit e8a6c46
Author: Eduardo Quezada <eduardo602002@gmail.com>
Date:   Mon Jan 29 13:19:01 2024 -0300

    Only do unused error under RHH's repo + workflow test

commit 2988883
Author: Eduardo Quezada <eduardo602002@gmail.com>
Date:   Mon Jan 29 12:52:03 2024 -0300

    Unused warnings are not treated as errrors by default

commit 127a7e9
Author: Eduardo Quezada <eduardo602002@gmail.com>
Date:   Sun Jan 28 20:43:14 2024 -0300

    Backported gHeap alignment fix from upstream pret

commit 9bcd46b
Author: Alex <93446519+AlexOn1ine@users.noreply.github.com>
Date:   Sun Jan 28 19:15:53 2024 +0100

    Fixes Pursuit, Tangling Hair interaction (rh-hideout#4086)

commit 3e50480
Author: johannakullmann <151456919+johannakullmann@users.noreply.github.com>
Date:   Sat Jan 27 15:59:39 2024 +0100

    Fixed graphics bug with Steven double battle (rh-hideout#4078)

    Caused the wrong palette to be used during Steven's ball throw animation in the Mossdeep Space Center fight.

commit e995927
Author: Bassoonian <iasperbassoonian@gmail.com>
Date:   Fri Jan 26 21:11:04 2024 +0100

    Add extra key item bag space checks (rh-hideout#4066)

    * Fix 4019

    * I am exceedingly brilliant in my failure to build before pushing

commit 91f429b
Author: Alex <93446519+AlexOn1ine@users.noreply.github.com>
Date:   Mon Jan 22 13:55:08 2024 +0100

    Fixes Glimmering Charm (rh-hideout#4047)

    Co-authored-by: Eduardo Quezada D'Ottone <eduardo602002@gmail.com>

commit b99ec5d
Author: Bassoonian <iasperbassoonian@gmail.com>
Date:   Mon Jan 22 00:07:19 2024 +0100

    Update level_up_learnsets.h (rh-hideout#4046)

commit 0ec777d
Author: Alex <93446519+AlexOn1ine@users.noreply.github.com>
Date:   Sun Jan 21 23:42:01 2024 +0100

    Fixes Mind Blown / Magic Guard interaction and renames Steel Beam effect (rh-hideout#4043)

    * Fixes Mind Blown / Magic Guard interaction and renames Steel Beam effect

    * review fixes

    ---------

    Co-authored-by: Bassoonian <iasperbassoonian@gmail.com>

commit a01d442
Author: Mathew Arnold <mattyarnold@hotmail.co.uk>
Date:   Sun Jan 21 17:23:55 2024 +0000

    Fixed Kingra's learnset gen (rh-hideout#4044)

    In level_up_learnsets.h, Kingdra's learnset was inside a check for P_GEN_4_CROSS_EVOS. As a Gen 2 Pokemon, this has been updated to check for P_GEN_2_CROSS_EVOS instead.

commit 9286b80
Author: Bassoonian <iasperbassoonian@gmail.com>
Date:   Sun Jan 21 13:02:45 2024 +0100

    Remove illegal moves from teachable learnsets (rh-hideout#4042)

    Co-authored-by: Alex <93446519+AlexOn1ine@users.noreply.github.com>

commit 35e2157
Author: Alex <93446519+AlexOn1ine@users.noreply.github.com>
Date:   Sun Jan 21 12:27:58 2024 +0100

    Fixes ability Corrosion (rh-hideout#4037)

    * Fixes ability Corrosion

    * forgot AI_CanPoisonType

    * More tests

    * review comments applied

    * more review changes

    * simplify CanPosionType (original state)

    * remove redundant function

    ---------

    Co-authored-by: Bassoonian <iasperbassoonian@gmail.com>

commit 04fa3aa
Author: Alex <93446519+AlexOn1ine@users.noreply.github.com>
Date:   Sun Jan 21 11:08:25 2024 +0100

    Fixes Emergency Exit when hp is restored over tag out range (rh-hideout#4041)

    * Fixes Emergency Exit when hp is restored over tag out range

    * Update test/battle/ability/emergency_exit.c

    Co-authored-by: Bassoonian <iasperbassoonian@gmail.com>

    ---------

    Co-authored-by: Bassoonian <iasperbassoonian@gmail.com>

commit 53a46b7
Author: Bassoonian <iasperbassoonian@gmail.com>
Date:   Sun Jan 21 10:25:37 2024 +0100

    Remove faulty teachable learnset moves (rh-hideout#4039)

commit 73a1fa3
Author: Philipp AUER <SBird1337@users.noreply.github.com>
Date:   Sun Jan 21 09:11:10 2024 +0100

    fix: emergency exit cutoff off by 1 on odd max hp (rh-hideout#4040)

    * fix: emergency exit cutoff off by 1 on odd max hp

    * squash!: newline at end of file

    ---------

    Co-authored-by: sbird <sbird@no.tld>

commit d125da7
Author: Alex <93446519+AlexOn1ine@users.noreply.github.com>
Date:   Sat Jan 20 22:48:34 2024 +0100

    Fixes Life Orb + Eject Pack / Red Card interaction (rh-hideout#4038)

    * Fixes Life Orb + Eject Pack / Red Card interaction

    * fix test
@AlexOn1ine AlexOn1ine deleted the emergency_exit branch April 19, 2024 12:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Emergency Exit Issues
3 participants