Commit graph

675 commits

Author SHA1 Message Date
psf
2597d8a35a
Updated species defines (#5075)
* First version of new defines

* Fixed cloaks

* Fixed cloaks

* Fixed cloaks

* Fixed cloaks

* Fixed cloaks

* Removed old defines

* Removed old defines

* Removed old defines and cleaned up some macros

* Undid changes to documentation
Deleted unused defines
Updated defines
Fixed tests
fixed docs

* moved note to top per https://github.com/rh-hideout/pokeemerald-expansion/pull/5075\#discussion_r1783641599

* fixed alignment per https://github.com/rh-hideout/pokeemerald-expansion/pull/5075\#pullrequestreview-2341613591
2024-10-02 18:24:57 -03:00
Bassoonian
7852dc3e47
Update commander.c (#5458) 2024-10-02 22:36:20 +02:00
kittenchilly
a135876dc0
Remove trailing whitespace pass 10-2-2024 (Upcoming) (#5456) 2024-10-02 21:20:23 +02:00
kittenchilly
d5560bbc87
Remove trailing whitespace pass 10-2-2024 (Master) (#5455) 2024-10-02 21:20:02 +02:00
Pawkkie
ded97e5296
Switch AI refactor + considers free switches (#5379)
* Switch AI considers free switches from pivot move

* Fix Baton Pass refactor

* Some cleanup and comments

* Mon fainting to hazards is a 0HKO

* Revert "Mon fainting to hazards is a 0HKO"

This reverts commit 446f738226.

* Cleanup speed check / Eject Pack

* Move eject trackers to AiLogicData

* Review feedback and WhoStrikesFirst changes

* This linebreak will bug me lol

* Also this comment, heck

* Last bit of comment cleanup
2024-10-01 23:10:02 +02:00
Alex
b93e58266e
Fixes recoil moves not triggering berries if possible (#5449)
* Fixes recoil moves not triggering berries if possible

* Update battle_script_commands.h
2024-10-01 10:43:58 +02:00
kittenchilly
1c022f4d34
Fix Jubilife Muffin full heal effect + better full heal tests (#5444) 2024-09-29 17:05:54 -04:00
Alex
42c43a3f8f
Adds Commander and Order Up (#5246)
* Adds Commander

* review points

* new line

* correction

* regression / double targeting still broken

* fix wrong target order

* transform fixes

* haze test

* fixes, tests

* bring back wrongly removed else if case

* Eject Pack / Button test + fix

* red card fix

* test fixes

* Fixes Tatsu being hit by multi hit move

* change transform check

* fix test + revert change

* Fix Tatsugiri attacking after freed up from Dozo in the same turn

* Dragon Darts tests

* fix test

* review comments

* assumtion in wrong file

* Order Up test fixes

---------

Co-authored-by: hedara90 <90hedara@gmail.com>
2024-09-29 22:45:50 +02:00
Pawkkie
5908fbef9c
Wake-Up Slap test typo (#5442)
* Wake-Up Slap test typo

* Update test/battle/move_effect/wake_up_slap.c

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

---------

Co-authored-by: Eduardo Quezada <eduardo602002@gmail.com>
2024-09-29 12:34:34 -04:00
Eduardo Quezada
5130ea9da3 Merge branch '_RHH/master' into _RHH/upcoming 2024-09-28 11:45:49 -03:00
PhallenTree
e67d5a23ed
Adds some Snatch interactions, fixes for Dragon Darts, Trace, Primal Reversion, Protosynthesis/Quark Drive (#5430)
* Fixes Electrified Dragon Darts sometimes targeting battlers with absorbing abilities (Volt Absorb, Motor Drive)

* Add Snatch interactions with Dancer, Swallow

* Trace fix + cleanup

* Simplify Quash

* Fixes multiple mons with Primal Reversion causing only one Primal Reversion, add tests

* Fix Booster Energy Ability Popup

* Accidentally removed healing from Swallow

* More Trace cleanup
2024-09-24 18:40:44 +02:00
ghoulslash
acd07ccfc1
add rocky helmet dmg to tangling hair + defiant test to ensure original battler IDs from chaining effects (#5423)
Co-authored-by: ghoulslash <pokevoyager0@gmail.com>
2024-09-22 19:44:18 +02:00
Alex
68c51f8412
Fixes Spiky Shield Counter interaction (#5402)
* Fixes Spiky Shield Counter interaction

* Update test/battle/move_effect/protect.c

---------

Co-authored-by: Bassoonian <iasperbassoonian@gmail.com>
2024-09-19 12:00:32 +02:00
Alex
71dfd3e7c0
Ogerpon masks were missing their hold effects (#5391)
* Ogerpon masks were missing their hold effects

* fix wrong num

* test

* correct tests and additional fix

* added hold effect to battle debug
2024-09-19 00:25:53 +02:00
PhallenTree
76656e85c2
Fix Quash implementation, adds After You and Quash missing configs + tests (#5400)
* Fix Quash + After You and Quash configs

* Add tests
2024-09-19 00:10:29 +02:00
Alex
6ef36837e9
Fixed corruption of the next turn used move caused by Scale Shot (#5397) 2024-09-18 16:58:49 +02:00
Alex
0d7c193e4c
fixes Micle Berry not increasing accuracy on the next turn (#5358)
* fixes Micle Berry not increasing accuracy on the next turn

* adds bitfield instead of using protect struct

* test from pawkkie

* ndebug

* renaming

* delete redundant comment

* typo

* micle berry more detailed descriptions
2024-09-14 19:55:03 -04:00
Pawkkie
79776bf6bb
ShouldSwitchIfWonderGuard tests and cleanup (#5383) 2024-09-14 10:45:26 +02:00
Alex
fbea1e7e7e
Fixes Defog used by the wrong side when there is a Substitue and Screen (#5381) 2024-09-14 08:16:20 +02:00
PhallenTree
c7e1e857f3
Fix After You/Shell Trap not updating battlers' actions correctly (#5384) 2024-09-13 18:17:59 +02:00
PhallenTree
100c7dd8ad
Fixes Powder (status) interactions + tests (#5370)
* Simplified fix from #4638

* Fixes interactions with Z-Moves, Magic Guard, Heavy Rain, Pledge

* Powder Tests

* Remove duplicate

* Assume Powder is a powder move

* Add config for Powder Rain interaction

* Only primal rain

* Z-Moves fix handled in Canceller_Z_Moves

* Fix BattleScript name

* Make sure Z-Move + Powder still damages user
2024-09-13 18:08:23 +02:00
Alex
3d8b73300a
Fixes Multi Hit moves removing destiny bond flag in the middle of attack (#5377) 2024-09-12 17:46:59 -04:00
Eduardo Quezada
551c558186 Merge branch '_RHH/master' into _RHH/upcoming 2024-09-11 07:28:02 -03:00
Pawkkie
047289a639
Improve AI's Skill Swap handling in double battles (#5360)
* Improve AI contrary

* Update src/battle_ai_util.c

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

* Fix additionalEffects loop

* moves[i] to aiMove

* Update src/battle_ai_util.c

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

---------

Co-authored-by: Alex <93446519+AlexOn1ine@users.noreply.github.com>
2024-09-11 00:00:29 +02:00
hedara90
c57d149003
Fixes with Pledge combos and absorption abilities (#5364)
* Fixes with Pledge combos and absorption moves

* Fixed incorrect merge

* Removed superflous if statement

---------

Co-authored-by: Hedara <hedara90@gmail.com>
2024-09-10 23:53:55 +02:00
Alex
389e5c20dd
Fixes berries missing timing (#5300)
* Fixes berries missing timing

* salac berry test
2024-09-09 10:40:56 -03:00
Eduardo Quezada
2a27aad259 Merge branch '_RHH/master' into _RHH/upcoming 2024-09-08 14:50:39 -03:00
hedara90
b8251e3a75
Another Pledge fix, Powder this time (#5341)
Co-authored-by: Hedara <hedara90@gmail.com>
2024-09-08 16:17:18 +02:00
PhallenTree
d6d2f2033d
Fixes Pledge move combo timeout if frozen (#5340)
Missing `HITMARKER_UNABLE_TO_USE_MOVE` in the frozen canceller
2024-09-08 13:41:23 +02:00
hedara90
03e87a7d62
Pledge fail into opponent pledge loop fix (#5339)
* Pledge fail into opponent pledge loop fix

* Fixed excessively aggressive canceller

* Move the Pledge bit clear to its proper place

---------

Co-authored-by: Hedara <hedara90@gmail.com>
2024-09-08 10:38:52 +02:00
PhallenTree
68701a9e2d
Fix some Pledge move combo issues (#5330)
Fix Pledge moves looping, adds tests for pledge+incapacitation situations
2024-09-08 08:28:16 +02:00
Eduardo Quezada
8533b0c045 Merge branch '_RHH/master' into _RHH/upcoming 2024-09-03 14:39:50 -04:00
hedara90
fb1f12aa1b
Fixed Max Attacks into Max Guards message printing (#5312)
* Fixed Max Attacks into Max Guards message printing

* Updated the solution

---------

Co-authored-by: Hedara <hedara90@gmail.com>
2024-09-02 13:58:10 +02:00
Eduardo Quezada
33d5cbd7a2
Moved ASSUMEs to inside GIVEN blocks (#5308) 2024-09-01 23:13:58 +02:00
Eduardo Quezada
484acdc138
Convert 8 various to callnatives (#5172)
* Convert 8 various to callnatives

* Address review comments
2024-09-01 15:12:43 +02:00
Alex
e09a59a7e4
Fixes Tar Shot on Tera mons (#5302)
* Fixes Tar Shot on Tera mon

* new line
2024-08-31 12:24:28 -04:00
PhallenTree
ac9b40a423
Fixes Max Moves ignoring absorbing abilities, G-Max Corviknight and Centiskorch names (#5296)
* Fix Max and G-Max Moves bypassing absorbing abilities

* Fix G-Max Corviknight and Centiskorch speciesName

* Remove some outdated comments

* Missing Dynamax check

* Add Max Quake and Max Overgrowth to test
2024-08-31 12:39:37 +02:00
Alex
addaf40971
Fixes Scale Shot not activating + Known Failing Round test (#5292)
* Fixes Scale Shot not activating + Known Failing Round test

* Update test/battle/move_effect/multi_hit.c
2024-08-30 19:36:14 -04:00
Eduardo Quezada
aebbe448b8 Merge branch '_RHH/master' into _RHH/upcoming 2024-08-28 12:58:14 -04:00
SarnPoke
622dead80c
Shed Tail Retarget (#5275)
Re-targets Shed Tail PR to upcoming
2024-08-28 13:40:35 +02:00
Alex
98dbf3a575
Fixes Charged up status (#5274)
Charge changed to last until the damage boost is consumed instead of next turn, previous behavior accessible with `B_CHARGE`
2024-08-27 20:01:51 +02:00
PhallenTree
930cac6aca
Fix Instruct bypassing AtkCanceler, Entry Hazards targeting wrong side of the field if opponent fainted (#5262)
* Fix Instruct bypassing AtkCanceler + interaction with firstTurnOnly moves

* Fix Entry Hazards targeting the wrong side of the field if opponent fainted

* Remove unused BattleScript_AuroraVeilEnds and STRINGID_AURORAVEILENDS

* Alternative fix + Fix gBattlerTarget initially set to 2

* Fix Instruct animation

* Alternative anim fix
2024-08-27 14:46:56 +02:00
kittenchilly
74a790f09c Chilly Reception AI 2024-08-26 19:11:33 -05:00
Pawkkie
e9c8bd0548
Revert "Chilly Reception AI" (#5270) 2024-08-26 16:58:15 -07:00
Pawkkie
a9f31dcc4f
Chilly Reception AI (#5265) 2024-08-26 18:57:17 -04:00
hedara90
2e43ffd5f7
Fixed Snore not hitting twice with Parental Bond (#5264)
Co-authored-by: Hedara <hedara90@gmail.com>
2024-08-26 21:59:39 +02:00
kittenchilly
80ad7f15cc Chilly Reception AI 2024-08-26 13:09:50 -05:00
kittenchilly
afd18f06b4
Fix switch out move message (#5258) 2024-08-25 23:29:33 +02:00
Alex
92038129e2
Fixes Purifying Salt being poisoned by Toxic Spikes (#5252) 2024-08-25 09:06:03 -04:00
Eduardo Quezada
abf60e9c64 Merge branch '_RHH/master' into _RHH/upcoming 2024-08-24 19:44:35 -04:00
hedara90
572972235e
Disguise tests (#5249)
* Start new Disguise tests

* Finished disguise tests

---------

Co-authored-by: Hedara <hedara90@gmail.com>
2024-08-24 20:22:50 +02:00
kittenchilly
2fed75f7c5
Adaptability, Aerilate, Aftermath tests (#5242)
* Adaptability, Aerilate, Aftermath tests

* Update test/battle/ability/aerilate.c

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

---------

Co-authored-by: Eduardo Quezada <eduardo602002@gmail.com>
2024-08-24 10:53:19 -04:00
hedara90
d379ffef3e
Fixed Confide+Crafty Shield interaction (#5202)
Co-authored-by: Hedara <hedara90@gmail.com>
2024-08-20 08:24:42 -04:00
Eduardo Quezada
6ac18a6fe5 Merge branch '_RHH/master' into _RHH/upcoming 2024-08-20 08:00:05 -04:00
Alex
bde6982890
Fixes weather abilities not activating when Cloud Nine user leaves th… (#5209)
* Fixes weather abilities not activating when Cloud Nine user leaves the field

* parametrize
2024-08-20 07:24:48 -04:00
hedara90
3a6c3d580d
Round Tests (#5196)
* Round Tests

* Apply suggestions from code review

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

---------

Co-authored-by: Hedara <hedara90@gmail.com>
Co-authored-by: Eduardo Quezada <eduardo602002@gmail.com>
2024-08-19 13:03:47 -04:00
PhallenTree
bc5f40e518
Adds missing Wind Rider activation and tests (#5207)
* Adds missing Wind Rider activation + tests

* Adds test for opponent setting up Tailwind

* Update src/battle_util.c

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

---------

Co-authored-by: Alex <93446519+AlexOn1ine@users.noreply.github.com>
2024-08-19 15:25:44 +02:00
Alex
8607a7fb33
Fixes UB in Cmd_averagestats (#5191)
* Fixes UB in Cmd_averagestats

* fix test and align default case
2024-08-17 18:19:22 +02:00
hedara90
b641c6f4fa
Fixed incorrect weather damage rounding when maxHP <16 (#5183)
Co-authored-by: Hedara <hedara90@gmail.com>
2024-08-16 23:02:49 +02:00
hedara90
bd3d99d7d9
Fixed Retaliate not working correctly with passive damage (#5182)
* Fixed Retaliate not working correctly when allies fainted from passive end of turn damage

* Changed test parameters to use legal stats

---------

Co-authored-by: Hedara <hedara90@gmail.com>
2024-08-16 17:31:28 +02:00
PhallenTree
ec3a86dd9a
Adds in-battle effect of Pickup, adds Harvest and Pickup tests (#5170)
* Adds Harvest tests

* Adds Pickup in-battle effect + tests

* Fix G-Max Replenish test (Munchlax activates Pickup before G-Max Replenish)

* Change canPickupItem to bit field

* Make RandomUniformExcept inclusive (higher end) + convert bitfield

* Use CantPickupItem in PickupHasValidTargetc check

* Review
2024-08-16 15:37:23 +02:00
hedara90
45f10d734f
Fixed Ice Face, implemented tests (#5171)
* Fixed Ice Face, implemented tests

* Fixed agbcc and bad battle mon looping

* Fixed the ShouldChangeFormInWeather function again

* Cleaned up End of Turn weather form changes, simplified Ice Face

---------

Co-authored-by: Hedara <hedara90@gmail.com>
2024-08-15 13:51:39 +02:00
Eduardo Quezada
18980b20a3
Remove trailing whitespace (master) (#5174) 2024-08-14 19:48:20 -07:00
Eduardo Quezada
661ec0a9fd Merge branch '_RHH/master' into _RHH/upcoming 2024-08-14 17:10:20 -04:00
Eduardo Quezada
6f0004ec4e
Removed some hardcoding of move IDs + Gen4/5 Defog (#5156)
* Removed some hardcoding of move IDs

* Added Defog Gen6+ config (+ updated tests)
2024-08-14 15:51:34 +02:00
Eduardo Quezada
c625ac6d53
Added multiple missing ability TODO tests (#5163) 2024-08-14 15:43:18 +02:00
hedara90
cfa7316ea0
Made the speed tie test use PASSES_RANDOMLY (#5092)
* Made the speed tie test use PASSES_RANDOMLY
* Hack to allow results with PASSES_RANDOMLY

---------

Co-authored-by: Hedara <hedara90@gmail.com>
Co-authored-by: Martin Griffin <martinrgriffin@gmail.com>
2024-08-13 21:08:24 +01:00
Alex
a8cd459370
Fixes Purifying Salt not halving dmg for dynamic move types (#5145)
* Fixes Purifying Salt not halving dmg for dynamic move types

* forgot to add
2024-08-12 15:54:24 -04:00
Alex
863b96f759
Fixes Stomping Tantrum effect not doubling power in certain situations (#5140)
* Fixes Stomping Tantrum effect not doubling power in certain situations

* fix dancer test
2024-08-11 19:05:38 -04:00
PhallenTree
779cedd16f
Fixes Dancer, adds Revelation Dance interactions with Z-Move, Roost and typeless mons (#5133)
* Add Revelation Dance interactions with typeless mons, Roost and Z-Move

* Fixes Dancer-called moves not updating their type

* Adds Revelation Dance tests

* Make sure target isn't immune in Dancer test

* Missing ... in message

* Missing Assume

* CI ends Dancer test too early?

* Z-Revelation Dance is Breakneck Blitz (Test)

* Fix test (Zoroark too strong?)

* Replace H!Zoroark

* Remove Ability specification

* Remove HP_Bars

* Fix Dancer checking for battlers that don't exist in single battles
2024-08-11 12:13:46 -04:00
pkmnsnfrn
5635f94036 More changes from typeX to types[X] 2024-08-07 11:35:45 -07:00
Pawkkie
9f845a79e5
Fix Switch AI Bug: AI never switching out when it could be OHKO'd (#5089)
* Fix switch AI bug

* Forgot to save a file lol

* Fix infinite loop test compatibility
2024-08-07 15:58:39 +02:00
Eduardo Quezada
ce74c85e4f
Move effect TODO tests - Volume C (#5094) 2024-08-07 15:52:40 +02:00
PhallenTree
67f049fddb
Fixes Defiant interaction with Court Changed Sticky Web + Fickle Beam description (#5093)
* Fixes Court Changed Sticky Web deactivating Defiant/Competitive

* Fixes Fickle Beam's description

* Alternative fix

* Remove extra newLine
2024-08-06 10:45:30 +02:00
Martin Griffin
9d97537ee2
Fix speed ties (#4780)
* Fix speed ties

* fixup! Fix speed ties

* fixup! Fix speed ties

* fixup! fixup! Fix speed ties

* fixup! Fix speed ties

* Workaround for Comatose-Ditto interaction
2024-08-03 17:29:47 +02:00
Eduardo Quezada
57fc0fd3b9 Merge branch '_RHH/master' into _RHH/upcoming 2024-08-01 08:36:11 -04:00
Alex
de8002e9e0
Removes unnecessary checks for Shield Dust and Covert Cloak (#5073)
* Removes unnecessary checks for Shield Dust and Covert Cloak

* remove redundant include

* Update test/battle/ability/shield_dust.c

Co-authored-by: hedara90 <90hedara@gmail.com>

* Update test/battle/hold_effect/covert_cloak.c

Co-authored-by: hedara90 <90hedara@gmail.com>

---------

Co-authored-by: hedara90 <90hedara@gmail.com>
2024-08-01 09:58:14 +02:00
Eduardo Quezada
8450268b74 Merge branch '_RHH/master' into _RHH/upcoming
# Conflicts:
#	src/data/battle_anim.h
2024-07-31 18:13:19 -04:00
Alex
e6175b5b84
Fixes spread damage in double battles (#5064)
* Fixes spread move damage in doubles

* add DoubleBattle check

* add additional check to test

* restore trainer party
2024-07-31 12:20:57 +02:00
PhallenTree
ab9f8e69fb
Fixes Stalwart/Propeller Tail, Life Orb on confusion, Remove Status wrong battlescripts (#5061)
* Fix swapped BattleScripts in MoveEffectRemoveStatus for Freeze/Frostbite

* Fix Life Orb damaging the user if they hit themselves in confusion

* Fix Stalwart/Propeller Tail not ignoring redirection from Storm Drain/Lightning Rod

* Parametrize Species
2024-07-30 10:36:22 +02:00
Eduardo Quezada
54c19af037
Fixed B_HEAL_BELL_SOUNDPROOF checking for Gen9+ instead of Gen8+ (#5060) 2024-07-29 16:28:32 +02:00
Eduardo Quezada
18aff2db3b Merge branch '_RHH/master' into _RHH/upcoming
# Conflicts:
#	asm/macros/battle_anim_script.inc
#	data/battle_anim_scripts.s
#	include/constants/battle_anim.h
#	src/battle_anim.c
#	src/data/battle_anim.h
2024-07-27 16:26:37 -04:00
AlexOn1ine
8b2774e07d Fixes cantBeSurpressed ability check for breakable abilities 2024-07-26 20:19:58 +02:00
Eduardo Quezada
cc00446eb8 Merge branch '_RHH/master' into _RHH/upcoming
# Conflicts:
#	src/data/graphics/pokemon.h
#	src/data/pokemon/species_info/gen_9_families.h
2024-07-26 09:42:52 -04:00
PhallenTree
7b2914c046
Fix Mold Breaker-like abilities, AI Move Accuracy function, Fury Cutter with Parental Bond (#5030)
* Fix GetBattlerAbility not checking correct battler's action

* Fix Fury Cutter counter being incorrectly incremented on 2nd hit of Parental Bond + test

* Fix AI_SetMoveAccuracy only using attacker's ability

* Review
2024-07-24 19:36:55 +02:00
hedara90
3f4b4adae5
Updated reference to config location to new location (#5026)
Co-authored-by: Hedara <hedara90@gmail.com>
2024-07-23 14:09:32 -04:00
Eduardo Quezada
ae48293806 Merge branch '_RHH/master' into _RHH/upcoming
# Conflicts:
#	src/battle_ai_util.c
2024-07-22 23:06:44 -04:00
hedara90
84e249f98a
Some tera tests (#5020)
* Added tests for Terapagos/tera interactions

* Fixed missed things

* Fixed Terapagos Stellar boost (by Alex)

---------

Co-authored-by: Hedara <hedara90@gmail.com>
2024-07-22 20:43:17 +02:00
PhallenTree
aac6ebd3d7
Fixes Sleep Talk, Toxic Debris and Jaboca/Rowap Berry issues; Adds Sleep Talk tests (#5009)
* Fix Sleep Talk failing with choice item; Added some Sleep Talk tests

* Fix Jaboca, Rowap berries recording Rocky Helmet Effect; Fix Toxic Debris not checking side's toxic spikes count properly in Doubles
2024-07-21 21:24:05 +02:00
sneed
3fa6bf46db
Test battlers always have their forced abilities (#4707)
* Test battlers always have their forced abilities

* indentation
2024-07-21 21:20:39 +02:00
Eduardo Quezada
98eb4e5027 Merge branch '_RHH/master' into _RHH/upcoming
# Conflicts:
#	asm/macros/battle_script.inc
#	include/constants/battle_string_ids.h
#	src/battle_ai_switch_items.c
#	src/battle_main.c
#	src/battle_script_commands.c
#	src/battle_util.c
#	src/frontier_util.c
#	test/battle/ai/ai.c
2024-07-19 09:20:05 -04:00
Bassoonian
f2311b4c97
Add trainer class ball test (#4999) 2024-07-19 12:30:06 +02:00
Alex
552e2768da
Fixes to Opportunist and Mirror Herb adjustments (#4928)
* Replace Opportunist todo tests with proper tests

* add failing test

* desc

* Fixes to Opportunist and Mirror Herb adjustments

* more tests

* some fixes

* first turn events switch

* simple enum + revert test desc
2024-07-19 11:01:46 +02:00
fakuzatsu
0625c90277
fix tests when B_USE_FROSTBITE is TRUE (#4986) 2024-07-17 23:23:52 +02:00
Pawkkie
b5a7185841
Fix U-Turn With Ace Mon (#4748) (#4972)
* Fix U-Turn With Ace Mon

* ASSUME for test
2024-07-15 09:19:41 +02:00
Eduardo Quezada
2b40e79ac3 Merge branch '_RHH/master' into _RHH/upcoming
# Conflicts:
#	include/battle_util.h
#	src/battle_ai_main.c
2024-07-14 22:44:00 -04:00
Pawkkie
b084dcd8d3
Fix Upper Hand being used blindly (#4973) 2024-07-14 22:00:51 +02:00
sneed
6aa308e1d8
EFFECT_PHOTON_GEYSER and restored EFFECT_SHELL_SIDE_ARM work for physical moves (#4923) 2024-07-14 15:35:11 +02:00
Pawkkie
c721f1b04a
Smarter Focus Punch and Substitute (#4952)
* Smarter Focus Punch

* Smarter Substitute, review feedback

* Use HasAnyKnownMove instead of isFirstTurn

* When are we removing agbcc again

* Use HasMoveEffect
2024-07-14 08:29:27 +02:00
Bassoonian
f6d2b2861a
Fix Tera indicators (#4960)
* Fix Tera indicators

* Better fix
2024-07-13 23:08:43 +02:00
Alex
5e2e2e9fce
Minor shouldUseGimmick refactor (#4962) 2024-07-13 20:56:18 +02:00
Alex
edc883d038
Refactors residual damage (#4945)
* Refactors damage non types

* correction

* Refactor weather damage script

* new line

* correction

* there was a hail test already

* ndebug

* add sandstorm test

* Update src/battle_script_commands.c

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

---------

Co-authored-by: Bassoonian <iasperbassoonian@gmail.com>
2024-07-13 12:12:40 +02:00
Alex
7b6ff1b560
Fixes Trace turn order (#4941)
* Fixes Trace turn order

* Update battle_script_commands.c

* Update test/battle/ability/trace.c

---------

Co-authored-by: Bassoonian <iasperbassoonian@gmail.com>
2024-07-10 22:29:26 +02:00
Eduardo Quezada
fb708b7ed3 Merge branch '_RHH/master' into _RHH/upcoming 2024-07-10 10:05:10 -04:00
hedara90
76d760041c
Flame Burst + Substitute fix (#4939)
Co-authored-by: Hedara <hedara90@gmail.com>
2024-07-10 13:58:32 +02:00
Alex
637a7072f0
Add missing adjust scores (#4925)
* Add missing adjust scores

* ai log made the test fail
2024-07-08 12:05:32 +02:00
Eduardo Quezada
de609a2f5b
Added missing redirect abilities Gen 3-4 config (#4920)
* Added missing redirect abilities Gen 3-4 config

* Combined 3 Battle Script Natives into 1

* Cleaner FindMonThatAbsorbsOpponentsMove
2024-07-07 09:52:59 +02:00
sneed
60c7588532
IsFinalStrikeEffect uses effect instead of move (#4917)
* IsFinalStrikeEffect uses effect instead of move

* Update test/battle/ability/parental_bond.c

---------

Co-authored-by: Alex <93446519+AlexOn1ine@users.noreply.github.com>
2024-07-06 09:41:19 +02:00
Eduardo Quezada
fcdc9ed65a Merge branch '_RHH/master' into _RHH/upcoming
# Conflicts:
#	src/battle_util.c
#	src/data/pokemon/species_info/gen_7_families.h
#	test/battle/ability/download.c
#	test/battle/ability/intimidate.c
#	test/battle/ability/supreme_overlord.c
#	test/battle/ability/zero_to_hero.c
#	test/battle/ai/ai.c
#	test/battle/move_effect/plasma_fists.c
2024-07-05 14:25:25 -04:00
Alex
dd7b735211
Fixes Grassy Terrain heal turn duration (#4903) 2024-07-03 22:53:15 +02:00
Alex
594633aa15
Remove Duplicate ai code from battle_ai_util.c (#4883)
* Remove Duplicate ai code from battle_ai_util.c

* Add GetBattlerAbility in toxic self check
2024-07-03 10:48:31 +02:00
Pawkkie
47426406c3
Ai tests folder (#4898)
* AI folder for tests

* Move sequence switching tests
2024-07-02 17:49:04 +02:00
Pawkkie
7e167f0b3c
Add AI_FLAG_SEQUENCE_SWITCHING (#4878)
* AI_FLAG_BAD_SWITCHING

* Cleanup and tests, U-Turn / Baton Pass / Parting Shot aren't working properly

* Fix U-Turn etc. tests

* Test overhaul with Egg's suggestions

* Add EFFECT_HIT_SWITCH_TARGET to tests

* Review feedback

* Re-review feedback
2024-07-01 08:53:07 +02:00
sneed
75be596933
fix sticky hold softlock (#4885) 2024-06-29 18:54:58 +02:00
Pawkkie
d1ca1f667f
Smarter Choice AI for Status Moves (#4872)
* Smarter choice item usage

* Clarify test name / line ending

* Review feedback

* Review feedback pt. 2
2024-06-28 09:04:24 +02:00
DizzyEggg
cd5a862b95
Fix Megas gaining abilities after fainting (#4873) 2024-06-26 23:44:01 +02:00
DizzyEggg
f2e8482488
Fix how switch-in effects are played out after multiple faints in the same turn (#4864)
* Multiple switch-ins after fainting

* empty new lines

* Fix failing tests
2024-06-24 20:37:47 +02:00
sneed
ec75a75498
Update plasma_fists.c (#4865) 2024-06-23 21:17:58 +02:00
AgustinGDLV
9797640dff
Gimmick Refactor (#4449)
* consolidated gimmick checks, triggers, communication, and activation; updated test runner

* fixed improper use of .usableGimmick

* cleaning up battle_dynamax.c, changing function args to u32s

* fixed '#ifdef TESTING' causing errors

* updated z-moves to use gimmick interface, pared down redundancies; no AI/tests

* added support for z-moves in tests, consolidated gimmick fields

* removed ShouldUseMaxMove and .usingMaxMove

* renamed TryChangeZIndicator, updated z move display

* added several z-move tests and fixed various z-move interactions; fixed z-move category calc

* fixed useless battler arg in GetTypeBasedZMove

* added basic test check for bad Z-Move or Mega usage

* reworked test runner gimmick functionality; added support for Ultra Burst + Z-Move to test Light That Burns the Sky

* fixed gimmick test logic; fixed damage category override

* fixed mega rayquaza test fail

* consolidated gimmick indicator logic; added graphics to gGimmicksInfo

* removed TeraData struct

* reimplemented AI logic for Z-Moves; no changes

* updated Z-Move and Ultra Burst trigger gfx

* added testrunner check for multiple gimmick use

* fixed duplicate z-move call in test

* reorganized data/graphics/gimmicks.h

* added signature Z-Move ability tests; implemented Guardian of Alola

* fixed bad test update

* fixed Thousand Arrows not affecting Tera Flying; clean-up

* fixed -ate tests

* fixed tera tests

* fixed tera tests really

* fixed last batch of tests

* fixed -ate mega test again

* code review

* code review pt.2

* tweaked CanTera again

* dynamax flag only required for player
2024-06-22 22:25:40 +02:00
Alex
e74264f6de
Ported test changes from #4857 (#4859) 2024-06-22 19:39:01 +02:00
DizzyEggg
f73ad41fa1
Tests for post-ko switch scenarios (#4856) 2024-06-22 12:07:36 +02:00
sneed
6893d8dbef
ignoresTargetAbility doesnt ignore the attacker's ability (#4855) 2024-06-22 09:52:25 +02:00
DizzyEggg
438f478146
Fix comatose transform gastro acid interaction (#4852) 2024-06-21 12:19:43 +02:00
sneed
c31f982a7b
Fix fury cutter scaling up to 640 power (#4846)
* Fix fury cutter scaling up to 640 power

* Replace three instances of int i with one int turn

* dynamic test
2024-06-21 08:15:00 +02:00
Alex
b9138390af
Try fixing toxic_chain.c file (#4843)
Co-authored-by: AlexOn1ine <pkmnlucid@gmail.com>
2024-06-20 21:49:35 +02:00
Pawkkie
7ae88d8455
Tests for Corrosion, Acrobatics, Hone Claws, Hurricane (#4708)
* Tests for Corrosion, Acrobatics, Hone Claws, Hurricane

* First review feedback

* Re-review feedback

* Update acrobatics.c

* Review feedback, Sky Drop?

* Separate Sky Drop test
2024-06-20 13:46:01 +02:00
Pawkkie
3c3142172b
Tests point to clear_body.c (#4837) 2024-06-20 00:38:56 +02:00
sneed
609754f0f6
Add RandomChance macro and ability trigger chance config (#4829)
* RandomChance macro, contact ability chance config

* Unify config, add shed skin
2024-06-18 20:13:44 +02:00
sneed
b6d3bdf622
Confusion, cursed body and poison touch trigger chance fixes and tests (#4831)
* accurate confusion chance and a test

* Accurate Poison Touch chance and tests

* Accurate cursed body chance

* Create cursed_body.c
2024-06-18 20:07:40 +02:00
Alex
f106b21344
Adds Toxic Chain's effect (#4823) 2024-06-18 20:04:28 +02:00
Bassoonian
a24b767276 Merge branch 'master' of https://github.com/rh-hideout/pokeemerald-expansion into masterintoupcoming18jun 2024-06-18 15:27:06 +02:00
PhallenTree
a26050fbde
Adds Toxic Chain interaction with Knock Off 2024-06-18 11:46:23 +01:00
PhallenTree
161f61284a
Use RandomWeighted; fix Test 2024-06-17 17:48:05 +01:00
PhallenTree
9b8c47ac5c
Add some Toxic Chain tests 2024-06-17 16:51:08 +01:00
sneed
107cb96a98
Tests for Anger Point and Moxie (#4811)
* Create anger_point.c

* Create moxie.c

* Add extra test and animations

* add another test
2024-06-16 15:02:44 +02:00
DizzyEggg
de7a4e2328
Fix Encore turn amount bug (#4802)
* Encore 3 turns

* remove duplicate
2024-06-14 13:15:38 +02:00
DizzyEggg
2716ec5b03
Fix Pursuit not getting Choice-locked on switch-out (#4801)
* Fix Pursuit not getting Choice-locked on switch-out

* use label
2024-06-14 12:46:03 +02:00
DizzyEggg
c7224d9ca7
Fix Relic Song transforming species other than Meloetta (#4799) 2024-06-14 10:24:57 +02:00
Pawkkie
a7642da544
Revenge Killer switching factors in Trick Room (#4794)
* Revenge Killer switching factors in Trick Room

* Comments and float multiplication
2024-06-14 10:18:01 +02:00
DizzyEggg
1a4f277d6f
Tests for Body Press + body press interaction with Wonder room (#4792) 2024-06-14 09:43:10 +02:00
DizzyEggg
4b1ff3ad7f
fix starting terrain making all other terrains infinite (#4795) 2024-06-14 09:31:21 +02:00
Pawkkie
9ec16f4eb6
Clear Body tests include Full Metal Body and White Smoke (#4797) 2024-06-14 09:08:21 +02:00
DizzyEggg
84d13d0abf
Fix Smack Down anim + move anim tests (#4774)
* Fix Smack Down anim + move anim tests

* really agbcc

* fix undefined reference

* hopefully everything works
2024-06-13 15:30:28 -04:00
Eduardo Quezada
43310716af Fixes to master merge 2024-06-13 11:44:52 -04:00
Eduardo Quezada
06153e4280 Merge branch '_RHH/master' into _RHH/upcoming
# Conflicts:
#	include/battle.h
#	include/constants/battle_script_commands.h
#	include/constants/pokemon.h
#	src/battle_ai_util.c
#	src/battle_main.c
#	src/battle_util.c
#	test/battle/ai.c
2024-06-13 11:44:28 -04:00
DizzyEggg
349b402f1b
Fix Soul-Heart changing stats of wrong battler (#4785) 2024-06-13 10:57:20 +02:00
DizzyEggg
8e41b9857f
Fix Revive in double battles (#4784) 2024-06-13 10:41:17 +02:00
DizzyEggg
21339cf272
Fix AI not recognising Volt Absorb/FlashFire (#4781) 2024-06-12 23:02:45 +02:00
sneed
000f144465
AI actually avoids contact vs rocky helmet/rough skin (#4779) 2024-06-12 20:54:34 +02:00
DizzyEggg
a17259763c
Fix Baton Pass breaking on Memento (#4773)
* Fix Baton Pass breaking on Memento

* doubled headers
2024-06-12 13:17:18 +02:00