Commit graph

41 commits

Author SHA1 Message Date
Martin Griffin
f770cb1ea3
Check that PASSES_RANDOMLY affected a Random call (#5635) 2024-11-11 10:59:58 +01:00
Martin Griffin
39f5596d09 Improve unneeded SEND_OUT error 2024-11-01 17:06:22 +00:00
Bassoonian
601438e980
Centralise AI Tests trainer name (#5532) 2024-10-19 17:51:20 -03:00
ghoulslash
d487bd0548
Revival Blessing fixes + Using Lunar Blessing's animation (#5490)
* revival blessing fixes, add anim

* fix lunar blessing anim

* Added support for Revival Blessing in tests

* Added test to confirm absent flag fix

---------

Co-authored-by: ghoulslash <pokevoyager0@gmail.com>
Co-authored-by: Eduardo Quezada <eduardo602002@gmail.com>
2024-10-19 11:34:58 -03:00
Pawkkie
efad9a32a9
Fix AI tests using PASSES_RANDOMLY (#5486) 2024-10-08 13:04:35 -04:00
Eduardo Quezada
c075d8e6b1
Fixed test system documentation (#5266) 2024-08-26 21:59:01 +02:00
Eduardo Quezada
18980b20a3
Remove trailing whitespace (master) (#5174) 2024-08-14 19:48:20 -07:00
Eduardo Quezada
0b02527e5c Merge branch '_RHH/master' into _RHH/upcoming
# Conflicts:
#	test/test_runner.c
2024-07-21 13:36:07 -04:00
Eduardo Quezada
9d5e253867
Improved Test Runner Summary (#4641)
* 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
2024-07-20 18:22:40 +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
fakuzatsu
0625c90277
fix tests when B_USE_FROSTBITE is TRUE (#4986) 2024-07-17 23:23:52 +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
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
Bassoonian
a24b767276 Merge branch 'master' of https://github.com/rh-hideout/pokeemerald-expansion into masterintoupcoming18jun 2024-06-18 15:27:06 +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
sneed
87e2526665
Add switching message macros for tests (#4717)
* Add switching message macros

* Add test
2024-06-03 19:59:28 -04:00
Eduardo Quezada
0be643a517
Set TYPE_NONE as type 0 + other type data tweaks (#4462)
* 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
2024-06-01 07:38:22 +02:00
AgustinGDLV
84a9d4ffcf
Terastallization (#4110)
* 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
2024-04-24 11:17:46 +02:00
Nephrite
93af96c10c
Replaces VARARG_8 uses with recursive macros (#4232) 2024-04-05 18:42:11 +01:00
LOuroboros
a64e1c63c1
Move data unification (#3999)
* Made gBattleMoves handle the InGame name and description of battle moves
No more multiple arrays in separate, individual files.

Note:
-Keep an eye on Task_LearnedMove.

* Reintroduced move names

Misc:
-Fixed Trick-or-Treat and Light of Ruin's expanded names.
-Introduced a new field for Z-Move names, and a constant for their name length.
-Added a few TODOs to GetBattleMoveName.
-Updated GetMaxMoveName and GetZMoveName. There's no reason not to let GetBattleMoveName handle everything on its own.

* Updated GetBattleMoveName to handle Z-Move Names

Misc:
-Removed pointless TODO about MOVE_NAME_LENGTH.
 -The compiler doesn't allow to have a move name with a value higher than MOVE_NAME_LENGTH, therefore it's pointless to worry about it.

* Fixed a couple of expanded move names

* Removed zMoveName variable of struct BattleMove and extended the name variable's size

* Ditched no longer used MOVE_NAME_LENGTH constant

* Corrected the names of the max moves
I should have done this after updating the size of the name variable of the struct BattleMove, but I didn't think about it at all until Cancer Fairy indirectly gave me the idea.

* Fixed U-turn's name

* Brought back MOVE_NAME_LENGTH
I think it doesn't make sense to have a Z_MOVE_NAME_LENGTH because the length in question is used for all battle moves, not just the Z-Moves.

* Introduced a union for Move/Z-Move names in the struct BattleMove

* Fixed the union for gBattleMoves move names
Also updated GetBattleMoveName to properly handle Max Move names.
Also also renamed the "zMoveName" variable to "bigMoveName" which better reflects its purpose. Z-Move names weren't the only thing it covered, since it also handles Max Move names.

* Removed deprecated GetZMoveName and GetMaxMoveName

* Reintroduced mention to gMoveNames in sGFRomHeader

* Fixed move names and ported move descriptions

* Fused the struct ContestMove into the struct BattleMove

* Removed no longer used Z_MOVE_NAME_LENGTH constant

* Renamed the struct BattleMove's bigMoveName variable and introduced macros to prettify move names

* Reintroduced the contest parameters for Pokémon moves

* Renamed gBattleMoves to gMovesInfo
This is consistent with gSpeciesInfo, the array that contains most of the species data.

* Renamed the BattleMove struct to MovesInfo
This is consistent with the struct SpeciesInfo, which contains the variables used by the gSpeciesInfo array.

* Removed empty lines separating battle params from contest params in gMovesInfo

* Renamed MovesInfo to MoveInfo

* Added Cancer Fairy's HANDLE_EXPANDED_MOVE_NAME macro
Used to handle moves with expanded names in a more comfortable manner.
Also fixed Trick-or-Treat's expanded name.

* Renamed GetBattleMoveName to GetMoveName

* Added a comment pointing out that the shared move descriptions are shared move descriptions

* Re-aligned one of the escape characters of CHECK_MOVE_FLAG

* Renamed the battle_moves.h file to moves_info.h instead for consistency's sake

* Applied Eduardo's adjustments

* Using compound string for regular move names as well, saving 1180 bytes and making their use consistent
* Move description formatting

* Updated Pursuit test after merge

* Renamed the BATTLE_CATEGORY constants to DAMAGE_CATEGORY

---------

Co-authored-by: Nephrite <thechurchofcage@gmail.com>
Co-authored-by: Bassoonian <iasperbassoonian@gmail.com>
Co-authored-by: Eduardo Quezada D'Ottone <eduardo602002@gmail.com>
2024-01-29 08:51:32 -03:00
Martin Griffin
3ad66028e9
Backwards-compatible BoxPokémon Refactor (#3438)
* Check progress in non-battle PARAMETRIZEd tests

* Overworld Script Tests

* Backward-compatible BoxPokemon Refactor

Reuses space that contains zeros to provide space for:
- HP/status in the box
- 12-character nicknames
- Up to 63 PokéBalls
- Shininess separate from PID
- Hidden Nature
- Hyper Training
- Dynamax Level
- Gigantamax Factor
- Terastallization Types
- Shadow

Implements:
- OW_PC_HEAL to switch between Gen7- and Gen8+ behavior
- Nature Mints
- Dynamax Candy
- Hyper Training commands (canhypertrain/hypertrain)
- Gigantamax Factor commands (hasgigantamaxfactor/togglegigantamaxfactor)
- Terastallization Type on the summary screen
- Prevents Gigantamax Factor Pokémon from evolving into a species without a Gigantamax form

* fixup! Backward-compatible BoxPokemon Refactor

* displaydexinfo fix from Jasper
2023-12-27 17:48:17 +01:00
tertu
fb28ce50ae
Optional high-quality RNG (#3780)
High-quality RNG, behind the HQ_RANDOM flag, enabled by default

Makes the shuffle test error a bit more tolerant
2023-12-22 17:39:15 +00:00
fakuzatsu
2af6d65893
added ability to set flags in tests (#3786) 2023-12-21 13:01:13 +00:00
Eduardo Quezada D'Ottone
442620cf6b
Renamed Battle Move "Split" to the proper "Category" (#3774) 2023-12-20 10:08:26 +01:00
kittenchilly
c16d85e497 EXPECT_MUL_EQ thresholds are always ±1 2023-12-19 09:21:18 -06:00
Eduardo Quezada
c0540a3559 Merge branch 'RHH/upcoming' into RHH/pr/upcoming/dynamax
# Conflicts:
#	include/battle.h
#	include/constants/battle_move_effects.h
#	include/constants/battle_string_ids.h
#	src/battle_main.c
#	src/battle_message.c
#	src/battle_script_commands.c
#	src/battle_util.c
2023-10-15 00:30:00 -03:00
Eduardo Quezada
3409869f9c Merge branch 'RHH/master' into RHH/upcoming 2023-10-13 17:44:43 -03:00
Martin Griffin
45897cefbc
Move battle tests off the heap (#3414) 2023-10-13 16:31:10 -03:00
Martin Griffin
cbdba65218
Move battle tests off the heap (#3413)
* Catch OOM in tests

* Alias gBattleTestRunnerState with sBackupMapData

Reverts #3398 "Fix Broken Move Anims in Tests" which moved the AI logs
to statically-allocated EWRAM_DATA instead of being part of
gBattleTestRunnerState.
2023-10-13 20:29:30 +02:00
DizzyEggg
a7b9d139da
Fix Wall Werrors on modern (#3412)
* Fix Wall Werror errors

* fix hgss pokedex modern errors

* tests build on modern

* learnset change

* Update src/battle_ai_util.c

Co-authored-by: Philipp AUER <SBird1337@users.noreply.github.com>

* Update src/battle_anim_new.c

Co-authored-by: Philipp AUER <SBird1337@users.noreply.github.com>

* Update src/debug.c

Co-authored-by: Philipp AUER <SBird1337@users.noreply.github.com>

* Update src/debug.c

Co-authored-by: Philipp AUER <SBird1337@users.noreply.github.com>

* Update src/pokedex_plus_hgss.c

Co-authored-by: Philipp AUER <SBird1337@users.noreply.github.com>

* review changes

* unused cmd args

* various args back

---------

Co-authored-by: Philipp AUER <SBird1337@users.noreply.github.com>
2023-10-13 18:39:35 +02:00
Martin Griffin
f5b149b971
Test improvements (#3408)
* Run assumptions on all runners

* Make i const in battle tests

This avoids the pitfall of using i in a PARAMETRIZEd test and confusing
the runner.
2023-10-12 12:14:07 +02:00
DizzyEggg
403326035e
fix broken move anims in tests (#3398) 2023-10-10 22:41:34 -03:00
Eduardo Quezada
92301398bc Merge branch 'RHH/upcoming' into RHH/pr/upcoming/dynamax
# Conflicts:
#	asm/macros/battle_script.inc
#	data/battle_anim_scripts.s
#	data/battle_scripts_1.s
#	include/battle.h
#	include/battle_controllers.h
#	include/battle_interface.h
#	include/config/battle.h
#	include/constants/battle.h
#	include/constants/battle_anim.h
#	include/constants/battle_move_effects.h
#	include/constants/battle_string_ids.h
#	include/data.h
#	include/random.h
#	sound/cry_tables.inc
#	src/battle_anim_new.c
#	src/battle_controller_opponent.c
#	src/battle_controller_player.c
#	src/battle_controller_player_partner.c
#	src/battle_interface.c
#	src/battle_main.c
#	src/battle_message.c
#	src/battle_script_commands.c
#	src/battle_util.c
#	src/data/pokemon/form_change_table_pointers.h
#	src/data/pokemon/species_info.h
#	src/data/text/move_names.h
#	test/test_runner_battle.c
2023-10-09 16:51:41 -03:00
DizzyEggg
be5683e899
AI battle tests + AI logic fixes (#3361) 2023-10-04 18:53:29 +01:00
DizzyEggg
2fcb9bbc9b
Wild battle tests + tests for exp points (#3342)
* Add WIld Battles to test runner + exp tests
2023-09-27 08:35:05 +01:00
DizzyEggg
136ea395ac
Fix tests breaking on modern (#3319)
* Fix tests breaking on modern

* modern tests fix - macro and rodata changes

* ld script rodata modern
2023-09-19 12:15:03 +02:00
Eduardo Quezada
f3217c18dc Merge branch 'RHH/master' into RHH/upcoming
# Conflicts:
#	src/battle_util.c
2023-09-14 09:12:12 -03:00
DizzyEggg
7936910f90
Bug Bite - Tests and small fix (#3282)
Co-authored-by: Eduardo Quezada D'Ottone <eduardo602002@gmail.com>
2023-09-14 08:57:30 -03:00
kittenchilly
3435c590c9 Merge branch 'upcoming' into ultraburst 2023-08-12 18:58:38 -05:00
Eduardo Quezada
09fc48461f Merge branch 'RHH/master' into RHH/upcoming
# Conflicts:
#	test/battle/move_flags/three_strikes.c
#	test/move_flag_strike_count.c
#	test/move_flag_three_strikes.c
#	test/powder_moves.c
#	test/status1.c
2023-08-12 16:31:44 -04:00
Eduardo Quezada D'Ottone
d62c0d6d51
Organized tests into subfolders (#2822) 2023-08-12 20:00:15 +01:00
Renamed from test/test_battle.h (Browse further)