* 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
* Fixed test folders + Chud Chew test name fixes
* Adjusted file names + merged Burn Up and Double Shock files
* Added Spit Up/Swallow files that point to Stockpile's file
* Multiple changes (see description)
- Moved secondary effect files to their own folder.
- Split hit_set_entry_hazards.c to separate files for Spikes/Stealth Rock.
- Grouped Hex/Venoshock to the same file
* Split isLegendary into isRestrictedLegendary and isSubLegendary
* Address reviews and fix build
* Update frontier_util.c
* Remove gFrontierBannedSpecies , fast edition
* Sped up name generation
* More speed up
* Split Frontier restriction into its own flag
* Mythicals shouldn't be banned always anymore
* u32
---------
Co-authored-by: Eduardo Quezada <eduardo602002@gmail.com>
* Fixed forseen moves not triggering Color Change and added tests for Color Change
* Added issue number to Known Failing test
---------
Co-authored-by: Hedara <hedara90@gmail.com>
In the Pokémon Storage System, even FONT_SMALL_NARROWER isn't sufficient
to prevent clipping in all cases. e.g. Unremarkable Teacup clips. We
have decided to accept that cost to make the rest of the user experience
better, but downstream projects that don't like that trade-off can
either a) alter the Pokémon Storage System UI, or b) set
I_EXPANDED_ITEM_NAMES to FALSE.
In contests, even FONT_NARROWER isn't sufficient to prevent clipping in
all cases. e.g. Stomping Tantrum clips. We have decided to accept that
cost to make the rest of the user experience better, but downstream
projects that don't like that trade-off can either a) alter the contest
UI, or b) set B_EXPANDED_MOVE_NAMES to FALSE.
PARAMETRIZE_LABEL is like PARAMETRIZE, except that it allows the user to
provide a label which will be displayed in the test name line. This is
useful for tracking _which_ PARAMETRIZE case failed in the situation
where the numbers are unwieldy.
* wrote foundational terastal tests
* implemented baseline test-only Tera functionality; modified GetBattlerType + STAB calculations, misc. changes to some moves
* added tests and func. for Stellar type, more tests for Tera Blast
* more tests for Stellar type, Conversion fixes, Color Change + Conversion2 future proof
* implemented tera blast, expanded stellar type func., fixed tests
* last set of Tera/Tera Blast tests for checklist, protean fix
* implemented in-battle Terastallization, WIP stellar indicator and tera animation
* fixed bad merge
* expanded NUMBER_OF_MON_TYPES, cut down on TYPE_STELLAR hackiness, added Stellar type to summary
* fixed type indicators
* added tera logic to AI
* implemented code review changes, added B_TERA_ORB_NO_COST
* updated AI to calc damage with Tera when applicable; minor rework to AI gimmick handling
* fixed Tera Blast split choice occuring when not Terastallized
* fixed Tera Blast using Last Respects BP calcs
* added tera type to TrainerMon, code review tweaks
$ python3 migration_scripts/convert_parties.py src/data/trainers.h src/data/trainer_parties.h src/data/npc_trainers.party
Is available to convert Trainer Control-formatted trainers/parties into
Competitive-formatted ones.
Multiple '#include's can be placed in the trainer section of src/data.c
to support spreading the trainers across multiple .party files.
trainerproc does not interpret the values, leaving that job to the C
compiler, so we use '#line' to associate those errors with the lines in
the .party file(s). Because the columns don't make sense we use
-fno-show-column and -fno-diagostics-show-caret. We might want to move
gTrainers into its own file so that the rest of src/data.c isn't
affected by those flags.
Extensions (misfeatures, imo):
- .party files are passed through cpp, so '#define's are supported, and so
are '// ...' and '/* ... */' comments.
- .party files also support writing, e.g. 'SPECIES_PIKACHU' instead of
'Pikachu'. This allows people to write constants explicitly if they
like.
Pragmas:
- '#pragma trainerproc ivs explicit' requires an explicit 'IVs:' line
rather than defaulting to 31s.
- '#pragma trainerproc ivs <IVs>' changes the default IVs.
- '#pragma trainerproc level explicit' requires an explicit 'Level:'
line rather than defaulting to 100.
- '#pragma trainerproc level <level>' changes the default level.
Co-authored-by: Eduardo Quezada <eduardo602002@gmail.com>
Co-authored-by: Alex <93446519+AlexOn1ine@users.noreply.github.com>
* Absolute IDs
* Mothim internal forms
* Scatterbug/Spewpa internal forms
* Fixed Mothim not having form tables
* Totem Alolan Raticate
* Moved shared dex text to its own folder
* Totem Mimikyu
* Added missing empty third-ability fields
* Totem Gumshoos + missing totem flags
* Renamed files to better match their contents
* Fixed Disguise on Totem Mimikyu
* Totem Vikavolt/Alolan Marowak + missing Gumshoos form table
* Totem Ribombee/Araquanid/Lurantis/Salazzle
* Totem Togedemaru/Kommo-O
* Partner Pikachu/Eevee
* Reintroduced shinyLocked species flag for convenience
* Revert "Reintroduced shinyLocked species flag for convenience"
This reverts commit 3e07bd378b.
* Move a couple damage AI_BadMove checks to AI_CalcDamage
* re-add effectivness score decrease
* reduce score for bad move in ai_checkviability
* review changes