Commit graph

361 commits

Author SHA1 Message Date
Eduardo Quezada
e1275594c5
Renamed OW type effectiveness function for clarity (#5917) 2024-12-31 22:55:42 +01:00
Alex
9d30299148
Fixes Stance Change, Sleep Talk interaction (#5909) 2024-12-31 00:38:01 +01:00
Alex
70224f0ea3
Fixes items preventing other switch in effects (#5732)
Co-authored-by: Pawkkie <61265402+Pawkkie@users.noreply.github.com>
2024-12-03 11:15:29 -05:00
Eduardo Quezada
7010080465 Merge branch '_RHH/upcoming' into _RHH/pr/master/1.10.0 2024-12-01 14:28:12 -03:00
Alex
0ca588943b
Fixes choiced moves not locked in after ability block (#5738) 2024-12-01 13:45:35 +01:00
Eduardo Quezada
b2ef363ac8 Merge branch '_RHH/master' into _RHH/upcoming 2024-11-19 14:19:53 -03:00
AERDU
5388ed0cad
Mimicry updates typing with RemoveAllTerrains() (#5666)
Co-authored-by: Alex <93446519+AlexOn1ine@users.noreply.github.com>
2024-11-17 10:21:01 +01:00
Alex
d5f8e9cc0e
Combines CalculateMoveDamage arguments into a struct (#5570) 2024-10-31 07:59:28 +01:00
Alex
1454644376
Removes duplicate code in AI functions (#5457)
* Make functions CanAbilityAbsorbMove and CanAbilityBlockMove

* clean up

* Replace ai code with CanAbilityBlockMove / CanAbilityAbsorbMove

* Adds CanPartnerAbilityBlockMove

* Use switches instead of if-blocks

* solve potential bug in singles with spread attacks

* fix test

* revert other fix

* flash fire does not increase a stat

* left a comment for a future test and addition

* remove more checks

* comment was incorrect. it only applies to storm drain and lightning rod

* revert ndebug

* revert minor change

* Update src/battle_util.c
2024-10-09 15:50:59 +02: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
Eduardo Quezada
aebbe448b8 Merge branch '_RHH/master' into _RHH/upcoming 2024-08-28 12:58:14 -04:00
hedara90
51a127fcb5
Better implementation of the obedience fix (#5245)
Co-authored-by: Hedara <hedara90@gmail.com>
2024-08-25 11:20:26 +02:00
Eduardo Quezada
6ac18a6fe5 Merge branch '_RHH/master' into _RHH/upcoming 2024-08-20 08:00:05 -04: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
Alex
dbb9ee874b
Change GET_MOVE_TYPE to a function (#5090)
* Change GET_MOVE_TYPE to a function

* add in battle check to GetMoveType function, move it to battle_util.c

* Update src/battle_util.c

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

* Update src/battle_util.c

---------

Co-authored-by: Eduardo Quezada <eduardo602002@gmail.com>
2024-08-05 22:02:31 -04: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
89563cb9b1 check for breakable ability 2024-07-26 21:11:16 +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
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
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
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
DizzyEggg
cd5a862b95
Fix Megas gaining abilities after fainting (#4873) 2024-06-26 23:44:01 +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
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
Alex
9c72392891
Fixes Shell Side Arm (#4753)
* Fixes Shell Side Arm

* Fixes to random call

* hardcoded the effect to the move

* minor change

* minor change 2

* applied reviews
2024-06-12 11:21:44 +02:00
Eduardo Quezada
64f82cdd5f Merge branch '_RHH/master' into _RHH/upcoming
# Conflicts:
#	src/battle_ai_util.c
#	src/battle_util.c
2024-06-11 08:12:03 -04:00
sneed
f1911dae59
Fix mycelium might and ability shield (#4740)
* Fix mycelium might and ability shield

* fix check
2024-06-08 07:27:44 +02:00
Eduardo Quezada
ee1d14755a Merge branch '_RHH/upcoming' into _RHH/pr/upcoming/merrpFollowers 2024-06-02 11:06:41 -04:00
sneed
e869aaf70b
Add global constants for damage roll related code and make AverageRollDmg faster (#4663)
* faster AverageRollDmg, global dmg roll constants

* restore MAX_ROLL_PERCENTAGE & MIN_ROLL_PERCENTAGE

* rename AverageRollDmg
2024-05-31 16:56:17 +02:00
Eduardo Quezada
021074cd2e Merge branch '_RHH/upcoming' into _RHH/pr/upcoming/merrpFollowers
# Conflicts:
#	src/data/graphics/pokemon.h
#	src/data/pokemon/species_info.h
#	src/data/pokemon/species_info/gen_1_families.h
#	src/data/pokemon/species_info/gen_2_families.h
#	src/data/pokemon/species_info/gen_4_families.h
#	src/data/pokemon/species_info/gen_5_families.h
#	src/data/pokemon/species_info/gen_8_families.h
2024-05-28 14:28:33 -04:00
Alex
7a393a974a
Adds Dragon Darts effect (CFRU port) (#4612)
* Adds Dragon Darts effect (CFRU port)

* fix test compile

* review
2024-05-28 11:34:56 +02:00
Eduardo Quezada
80b193280d Merge branch '_RHH/master' into _RHH/upcoming
# Conflicts:
#	src/battle_main.c
#	src/data/item_icon_table.h
#	src/data/pokemon/species_info/gen_9_families.h
2024-05-27 10:13:42 -04:00
Pawkkie
c279aa23c6
Belch AI Scoring Fix (#4616)
* 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
2024-05-26 22:23:04 +02:00
Eduardo Quezada
6eba5bcb80 Merge branch '_RHH/upcoming' into _RHH/pr/upcoming/merrpFollowers 2024-05-16 17:31:46 -04:00
Eduardo Quezada
3219a48adf Merge branch '_RHH/master' into _RHH/upcoming
# Conflicts:
#	src/battle_script_commands.c
2024-05-13 11:00:12 -04:00
Alex
56cee80fbf
Explosion and Mind Blown / Steel Beam refactor (CFRU port) (#4516)
* Explosion and Mind Blown / Steel Beam refactor (CFRU port)

* forgot ndebug

* Restored EFFECT_MIND_BLOWN

* requested changes

---------

Co-authored-by: Eduardo Quezada <eduardo602002@gmail.com>
2024-05-12 11:41:18 -04:00
Eduardo Quezada
35a76248d1 Merge branch '_RHH/upcoming' into _RHH/pr/upcoming/merrpFollowers
# Conflicts:
#	src/data/pokemon/species_info/gen_4_families.h
2024-05-06 16:03:29 -04: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
Eduardo Quezada
3d9c7732f6 Merge branch '_RHH/upcoming' into _RHH/pr/upcoming/merrpFollowers
# Conflicts:
#	include/event_object_movement.h
#	src/data.c
#	src/data/graphics/pokemon.h
#	src/data/pokemon/species_info/gen_4_families.h
2024-04-20 13:23:14 -04:00
Alex
952183889a
Fixes Ability Shield, Neutralizing Gas interaction (#4391)
* Fixes Ability Shield, Neutralizing Gas interaction

* test was wrong
2024-04-14 18:43:55 +02:00
DizzyEggg
46e6324fe2
Fix White Herb Known Failing tests (#4258)
* Fix White Herb Known Failing tests

* get out agbcc

* remove unneeded white herb test
2024-03-29 17:43:05 +01:00
Eduardo Quezada
39ed85635f Merge remote-tracking branch '_RHH_origin/upcoming' into _RHH/pr/upcoming/merrpFollowers
# Conflicts:
#	include/data.h
#	src/data/graphics/pokemon.h
#	src/data/pokemon/species_info.h
#	src/data/pokemon/species_info/gen_1_families.h
#	src/data/pokemon/species_info/gen_2_families.h
#	src/data/pokemon/species_info/gen_3_families.h
#	src/data/pokemon/species_info/gen_4_families.h
#	src/data/pokemon/species_info/gen_5_families.h
#	src/data/pokemon/species_info/gen_6_families.h
#	src/data/pokemon/species_info/gen_7_families.h
#	src/data/pokemon/species_info/gen_8_families.h
2024-03-17 23:41:23 -03:00
Alex
b5af343dc4
Reverts additional move effect macros (#4277) 2024-03-14 17:20:13 -03:00
Nephrite
0aac57bf60 Renamed TestSheerForceFlag 2024-02-26 15:11:21 +09:00
Nephrite
46b67355a5 Merge remote-tracking branch 'rhh/upcoming' into battlemove_refactored 2024-02-26 14:23:53 +09:00
Nephrite
174c6fc999 Renamed "MoveHasMoveEffect" functions 2024-02-26 14:21:38 +09:00
Eduardo Quezada
ead108d28e Merge branch '_RHH/upcoming' into _RHH/pr/upcoming/merrpFollowers
# Conflicts:
#	src/data/graphics/pokemon.h
2024-02-19 13:49:10 -03:00
ghoulslash
ce99db0086
Generic Starting Battle Status Variable (#4176)
* setup generic starting battle status variable, ABILITYEFFECT_SWITCH_IN_STATUSES

* fix B_ANIM_TAILWIND, assign to starting statuses, and change B_VAR_STARTING_STATUS check for only the variable and not trainers

* Update src/battle_main.c

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

* Update src/battle_util.c

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

* Update src/battle_util.c

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

* style fixes

* General_Room naims play SE

* fix sText_BizarreArenaCreated

---------

Co-authored-by: ghoulslash <pokevoyager0@gmail.com>
Co-authored-by: Bassoonian <iasperbassoonian@gmail.com>
2024-02-14 10:05:37 +01:00
Eduardo Quezada
502a56efd1 Merge branch '_RHH/upcoming' into _RHH/pr/upcoming/merrpFollowers
# Conflicts:
#	include/global.h
#	src/data.c
#	src/data/pokemon/species_info/gen_7.h
2024-02-13 20:35:05 -03:00