Commit graph

349 commits

Author SHA1 Message Date
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
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
hedara90
51a127fcb5
Better implementation of the obedience fix (#5245)
Co-authored-by: Hedara <hedara90@gmail.com>
2024-08-25 11:20:26 +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
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
Nephrite
ce4dd729f4 Merged from upcoming 2024-02-09 23:00:36 +09:00
Nephrite
65c508d193
Secondary effects overhaul minor follow-up (#4062)
* settwoturnstring command

* Unified two-turn attacks and Meteor Beam

To do: Solar Beam

* Solar Beam

Also fixed various function, removed EFFECT_GUST (who knows why that exists?)

* Updated Solar Beam + tests

* Redid two turn move + animations logic

Removed pointless various function; to do: remove Skull Bash, fix AI test

* Removed now-pointless flag

* Removed Skull Bash

And temporarily commented out failing AI tests

* Removed Sky Uppercut effect

Not sure when or why this was ever necessary

* Removed BattleScript_EffectSemiInvulnerable

Now uses BattleScript_EffectTwoTurnsAttack. Kept the effect; used the argument field to determine which STATUS3 such moves should apply but added a function to jump over weather checks in BattleScript_EffectTwoTurnsAttack if the current move is semi-invulnerable (since the instant-fire weather check and STATUS3 use the same field)

* Applied review changes

* Replaced VARIOUS with callnative

Tried to fix test but couldn't :/ wtf is going on

* Fixed one AI test

Cant fix the other...

* Added KNOWN_FAILING to failing AI tests

Separated them out into their own test

* Optimised script, overhauled charge turn string setting

Condensed multiple confusing macros into one, jumpifweathercheckchargeeffects. Script now tweaked and trimmed, string ids for charge turns now added to argument along with status3 (thanks to compression macro) and instant-fire-weather for semi-invulnerable and two-turn moves respectively. Also introduced a savedStringId in gBattleScripting to make string selection work.

* Unified two turn move tests + minor corrections

* Added semi-invulnerable move tests

Set the Razor Wind test to known failing - something to do with its animation?

---------

Co-authored-by: Alex <93446519+AlexOn1ine@users.noreply.github.com>
2024-02-04 23:02:59 +01:00
Nephrite
02ffd05aea Removed Sheer Force flag 2024-01-30 13:37:38 +09:00
Eduardo Quezada
381a0bf8a1 Fixed compile issues 2024-01-18 09:10:20 -03:00
Eduardo Quezada
ddc752eb14 Merge branch '_RHH/upcoming' into _RHH/pr/upcoming/merrpFollowers
# Conflicts:
#	asm/macros/event.inc
#	data/field_effect_scripts.s
#	data/maps/BattleFrontier_BattleTowerLobby/scripts.inc
#	data/script_cmd_table.inc
#	graphics/pokemon/castform/sunny/anim_front.png
#	graphics/pokemon/castform/sunny/normal.pal
#	include/battle_util.h
#	include/constants/event_object_movement.h
#	include/constants/field_effects.h
#	src/battle_controller_player.c
#	src/battle_util.c
#	src/data/object_events/movement_action_func_tables.h
#	src/data/object_events/object_event_pic_tables.h
#	src/data/trainer_graphics/back_pic_anims.h
#	src/daycare.c
#	src/event_object_movement.c
#	src/field_effect_helpers.c
#	src/load_save.c
#	src/scrcmd.c
#	src/trainer_see.c
2024-01-17 18:11:35 -03:00
Nephrite
a76e3c70ba Applied more review fixes 2024-01-12 03:02:48 +09:00
Nephrite
c4616739d8 Merge remote-tracking branch 'rhh/upcoming' into secondary_effects_overhaul 2024-01-11 00:35:35 +09:00
Nephrite
ab75ad6d02
Ability flags update (#3886)
* Added five ability flags

Omitted duplicate flags that are basically "can't copy" (Role Play, Receiver, Entrainment, Skill Swap), didn't bother adding Neutralizing Gas flag,

* Mold Breaker and Trace

* Gastro Acid, Simple Beam, Worry Seed

Decided to keep the Simple Beam/Worry Seed functions

* Entrainment done

* Skill Swap

* Doodle/Role Play + flag descriptions

Also adjusted Doodle test

* Wandering Spirit, Mummy, Neutralizing Gas

Neutralizing Gas really only needs to check for other mons with Neutralizing Gas, otherwise unsuppressable abilities are handled separately.

* Renamed flags
2024-01-01 15:03:34 +01:00
Nephrite
b6da1a1e1d Tweaked helper functions 2023-12-30 17:42:53 +09:00
Nephrite
39773c0659 Burn Up and Double Shock
Both working by applying an additional effect; added a generic "jumpifnotcurrentmoveargtype" type command to make it possible, relpacing secret power's function
2023-12-29 12:44:38 +09:00
Nephrite
7c38056da7 Review fixes
Added more move effect considerations to AI; redid way it calculates secondaryEffectChance; misc fixes
2023-12-29 12:04:42 +09:00
Nephrite
76b4e08e5e Trapping moves, Secret Power, rampage moves
Also tidied up a lot of #ifs and commas in battle_moves.h
2023-12-26 10:46:11 +09:00