* 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
* 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
* Replaced all the gBitTable[X] usages with 1 << X, and cleaned up script output
* Fixed failed merge in online viewer
---------
Co-authored-by: Hedara <hedara90@gmail.com>
* 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>
* 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>
* 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>
* 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
* 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
* 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
* 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
* Filename in list (no proper sorting yet)
* Line number and message in error list + removed sorting
* Style adjustment
* Added missing file/line number to "expected N passes/successes"
* Fixed Known Failing Passing test list
* Separated test list from totals
* Assumption fails list
* Better names
* Filename for KNOWN_FAILINGs passing
* Moved total back to the bottom
* Spaces correction
* Fixed test list count
* Source file for Alloc fails on tests
* Moved sourceLine from BattleTest to Test struct
* Fixed assumptions failed "and more" counter
* Fixed ASSUMPTION block not printing their line numbers
* Fixed when stopLine is printed
* Renamed stopLine to failedAssumptionsBlockLine
* 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
* Smarter Focus Punch
* Smarter Substitute, review feedback
* Use HasAnyKnownMove instead of isFirstTurn
* When are we removing agbcc again
* Use HasMoveEffect
* 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>
* 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
* add createmon and setwilddoubleflag script cmds to support createing mons at given player or enemy slots and setting up 2v1 battles
* give givemon macro PARTY_SIZE for tests
* style fixes
* add createmon test
---------
Co-authored-by: ghoulslash <pokevoyager0@gmail.com>
* improved Surf/Thunderbolt test that previously relied on correct AI guess
* remove unnecessary mod
* fixed infinite rng loop
* wrong ability num and readability
* Update src/battle_ai_util.c
---------
Co-authored-by: Alex <93446519+AlexOn1ine@users.noreply.github.com>
* AI uses safest option to faint foes
* dont calculate non crit dmg unless it's needed
* struct SimulatedDamage
* add GetDamageByRollType and name DamageRollType
* Parametrize test AI flags
* use simDamage member's instead of dmg & minDmg
* newer generation soundproof heal bell interactions
* Fix bugs and rewrite AnyPartyMemberStatused
* add missing check, tests, clean up
* fix ai code and rename battler for clarity
* FIx mummy ability
..and lingering aroma.
Adds tests for both.
* merge the tests
* new line
* add 2 more tests
Mummy and Lingering Aroma don't replace each other
Mummy doesn't replace abilities that can't be suppressed
* Add FORM_CHANGE_BATTLE_TERASTALLIZATION and allow species to force tera types
* Fix form change not changing tera type
* Update form_species_tables.h
* Address reviews
* Can't change the forced Tera Type anymore
* Revert "Can't change the forced Tera Type anymore"
This reverts commit 67157250ef.
* Fix a lot of things
* Oops
* Update pokemon.h
* Update pokemon.h
* Address reviews
* Update tera_starstorm.c
* Update test/battle/gimmick/terastal.c
---------
Co-authored-by: Eduardo Quezada <eduardo602002@gmail.com>
* Added missing Move Effect TODO tests - Volume B
* Apply suggestions from code review
Co-authored-by: Alex <93446519+AlexOn1ine@users.noreply.github.com>
* Removed unused bulldoze effect file
* Removed individual tests for Baton Pass + Status1 in favor of the existing single test
---------
Co-authored-by: Alex <93446519+AlexOn1ine@users.noreply.github.com>
* Set TYPE_MYSTERY as type 0
* Remove redundant TYPE_NONE
* Moved Gen 1-3 type damage categories to gTypesInfo
* Set TYPE_NONE as 0 instead
* Grouped type info to a single file
* Fixed sTypeEffectivenessTable static name
* Adjusted MON_DATA_TERA_TYPE to account for shift in type IDs
* oops, missed the extern
* Moved Tera Type RGB values to gTypesInfo
* Fixed Tera Type test
* Added option test feature to set IVs
* Hidden Power type test
* Tera Type safeguard in givemon
* Removed isHiddenPowerType for a future PR that refactors Hidden Power
* Review changes
* Adjust Ate-Ability code a bit to make it more readable
* stupid oversight
* fixed
* pull normal type move check out of function
* unused var
* switch and tests
* oversight
* Apply suggestions from code review
---------
Co-authored-by: Bassoonian <iasperbassoonian@gmail.com>
* #defines for damage roll bounds
* Risky AI behavior implemented
* Ignore score penalty to EFFECT_RECOIL_IF_MISS moves if accuracy has been lowered
* Adjust score defines
* EFFECT_MIND_BLOWN
* Use GetBestDmgMoveFromBattler instead of AI_CompareDamagingMoves
* Damage roll selection and AI_FLAG_CONSERVATIVE
* Clarify enum names
* Simplify AverageRollDmg line
* Change u8s to u32s
* Turns out Boomburst does a lot of damage lol
* Spacing
* Fixes Dancer triggering if the user flinched
* Add check to make sure "Pokemon used move" message is kept
* Address review
---------
Co-authored-by: Fltp <fltpessoa2@gmail.com>
* Belch scoring fix and test
* Add assumptions for pocket
* Update test to AI_SINGLE_BATTLE_TEST
* Alex's fixes
* Missed reverting a line
* Mucked up spacing mb
* Mucked up the spacing fix mb MB
* Fixed Elixirs not being able to be used unless the first move was missing PP
* Revert "Pokedex Plus fixes (#4514)"
This reverts commit 982934c4aa.
* Pokedex Plus fixes (#4514)
* Pokedex plus no longer allows browsing unseen evos
* Restore "has no evolutions" printing
* only print "has no evolution" text at 0 depth
* Revert config changes
* fix duplicate icons and removed eevee hardcodes
* add new scope and indentation fixes
* actually introduce new scope
* Revert "Fixed Elixirs not being able to be used unless the first move was missing PP"
This reverts commit 313f2e5526.
* Initial Testing of Focus Sash+Future Sight
* Fixed infinite loop when flinging Razor Fang on a mon that's already moved
* Fixed Moxie clones not triggering on pokemon fainted by Max Moves
* Fixed Focus Sash enduring another time if broken by foreseen moves
* Update src/battle_script_commands.c
Co-authored-by: Alex <93446519+AlexOn1ine@users.noreply.github.com>
* Update src/battle_script_commands.c
Co-authored-by: Alex <93446519+AlexOn1ine@users.noreply.github.com>
* Added assumptions to tests
---------
Co-authored-by: Hedara <hedara90@gmail.com>
Co-authored-by: sneed <56992013+Sneed69@users.noreply.github.com>
Co-authored-by: Alex <93446519+AlexOn1ine@users.noreply.github.com>
* fix getboxmondata for evolutiontracker if compiled with agbcc
* fixed full restore curing status condition when used in battle on party member with missing hp
added more full restore tests
* formatting, removed unused
* Fixed Elixir only being useable is the first move was missing PP
* Update restore_pp.c
Commented out the test that doesn't actually test what it's supposed to due to current test system.
---------
Co-authored-by: Hedara <hedara90@gmail.com>
* Add check for Magic Guard to avoid taking recoil damage
* add test to verify a mon with magic guard does not take recoil damage
followed format from "Steel Beam hp loss is prevented by Magic Guard" test
* update format of tests with magic guard and some form of recoil damage
* Adds tests to verify that Parental Bond does not affect moves with EFFECT_MULTI_HIT
* actually make kanga mega evolve in tests
* add celebrate for opponent and "not animation" on 5th hit
* update test strings
* Fixed Shaymin form change with incorrect status condition
* Fixed Shaymin receiving damage again after changing form
* PR feedback updates - fixed missing commas in battle script
* Added Shaymin form change test by @AlexOn1ine
* Fixed some moves' on-hit effects bypassing Substitutes where they shouldn't.
Fixed Sparkling Aria interaction with Shield Dust in Singles vs Doubles.
Fixed Wake-Up Slap and Smelling Salts getting boosted damage where they shouldn't vs Substitutes.
* Cleaned up check for Sparkling Aria+Shield Dust interaction and fixed for agbcc.
Fixed logic for checking if moves should do extra damage on statused targets.
Wrote tests for Wake-Up Slap and Smelling Salts receicing extra damage on statused targets.
Wrote tests to check Thousand Arrows type effectiveness vs ungrounded Flying types.
* Update src/battle_util.c
Co-authored-by: Alex <93446519+AlexOn1ine@users.noreply.github.com>
* Update src/battle_script_commands.c
Co-authored-by: Alex <93446519+AlexOn1ine@users.noreply.github.com>
* Update src/battle_script_commands.c
Co-authored-by: Alex <93446519+AlexOn1ine@users.noreply.github.com>
* Update test/battle/ability/shield_dust.c
Co-authored-by: Alex <93446519+AlexOn1ine@users.noreply.github.com>
* Update test/battle/item_effect/covert_cloak.c
Co-authored-by: Alex <93446519+AlexOn1ine@users.noreply.github.com>
* Update test/battle/item_effect/covert_cloak.c
Co-authored-by: Alex <93446519+AlexOn1ine@users.noreply.github.com>
* Update test/battle/item_effect/covert_cloak.c
Co-authored-by: Alex <93446519+AlexOn1ine@users.noreply.github.com>
* Update test/battle/move_effect/smelling_salts.c
Co-authored-by: Alex <93446519+AlexOn1ine@users.noreply.github.com>
* Update test/battle/move_effect/thousand_arrows.c
Co-authored-by: Alex <93446519+AlexOn1ine@users.noreply.github.com>
* Update test/battle/move_effect/wake_up_slap.c
Co-authored-by: Alex <93446519+AlexOn1ine@users.noreply.github.com>
* Update test/battle/move_effect/wake_up_slap.c
Co-authored-by: Alex <93446519+AlexOn1ine@users.noreply.github.com>
* Update test/battle/move_effect/wake_up_slap.c
Co-authored-by: Alex <93446519+AlexOn1ine@users.noreply.github.com>
---------
Co-authored-by: Hedara <hedara90@gmail.com>
Co-authored-by: Alex <93446519+AlexOn1ine@users.noreply.github.com>
* stat stage related AI fixes
* add more ai fixes and 2 tests
* use legal ability in tests
* Fix test and remove mold breaker check
* Use DoesBattlerIgnoreAbilityChecks