Commit graph

416 commits

Author SHA1 Message Date
Alex
612c8d3ff6
Fixes heal blocked leeach seed in tests (#5700) 2024-11-21 17:18:44 +00:00
Alex
67c7106fee
Refactors Absorb to use Moveend (#5670) 2024-11-17 09:59:04 +01:00
hedara90
1d7e4cf8fc
Cleans up Primal Reversion code (#5659) 2024-11-12 13:48:06 +01:00
AlexOn1ine
a3fe53dd28 Cleans up Primal Reversion code 2024-11-11 20:31:21 +01:00
Eduardo Quezada
b48e5770be Merge branch '_RHH/master' into _RHH/upcoming 2024-11-11 15:58:42 -03:00
Alex
a8351e305c
Fixes Red Card / Eject Pack interaction with Emergency Exit (#5657)
Co-authored-by: Pawkkie <61265402+Pawkkie@users.noreply.github.com>
2024-11-11 14:56:51 -05:00
Eduardo Quezada
e005ffb576 Merge branch '_RHH/master' into _RHH/upcoming 2024-11-06 10:01:48 -03:00
Alex
dc740b4e9a
Fixes Magic Coat message (#5645) 2024-11-06 10:09:00 +01:00
Alex
42c43a3f8f
Adds Commander and Order Up (#5246)
* Adds Commander

* review points

* new line

* correction

* regression / double targeting still broken

* fix wrong target order

* transform fixes

* haze test

* fixes, tests

* bring back wrongly removed else if case

* Eject Pack / Button test + fix

* red card fix

* test fixes

* Fixes Tatsu being hit by multi hit move

* change transform check

* fix test + revert change

* Fix Tatsugiri attacking after freed up from Dozo in the same turn

* Dragon Darts tests

* fix test

* review comments

* assumtion in wrong file

* Order Up test fixes

---------

Co-authored-by: hedara90 <90hedara@gmail.com>
2024-09-29 22:45:50 +02: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
Alex
6ef36837e9
Fixed corruption of the next turn used move caused by Scale Shot (#5397) 2024-09-18 16:58:49 +02:00
PhallenTree
100c7dd8ad
Fixes Powder (status) interactions + tests (#5370)
* Simplified fix from #4638

* Fixes interactions with Z-Moves, Magic Guard, Heavy Rain, Pledge

* Powder Tests

* Remove duplicate

* Assume Powder is a powder move

* Add config for Powder Rain interaction

* Only primal rain

* Z-Moves fix handled in Canceller_Z_Moves

* Fix BattleScript name

* Make sure Z-Move + Powder still damages user
2024-09-13 18:08:23 +02:00
PhallenTree
930cac6aca
Fix Instruct bypassing AtkCanceler, Entry Hazards targeting wrong side of the field if opponent fainted (#5262)
* 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
2024-08-27 14:46:56 +02:00
Salem
ceec17ec7b
remove unused bs signature (#5257) 2024-08-25 23:13:40 +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
Sadfish the Sad
fde85e9357
some gen 9 move anims + fickle beam rework (#5159)
* new move anims + fickle beam rework

* more fickle beam changes

* removed the true for consistency

* ficklebeamboosted gets cleared now

* mortal spin and thunderclap changes

* minor mortal spin pal change

* removed hex numbers and made hard press quicker
2024-08-14 17:20:18 +02:00
Alex
edc883d038
Refactors residual damage (#4945)
* 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>
2024-07-13 12:12:40 +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
dd7b735211
Fixes Grassy Terrain heal turn duration (#4903) 2024-07-03 22:53:15 +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
kittenchilly
7f8f480ecb
Add FORM_CHANGE_BATTLE_TERASTALLIZATION + allow species to force tera types (#4438)
* 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>
2024-06-04 13:38:49 +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
Eduardo Quezada
acd62b0065
Reverted bad implementation of Sparkling Aria+Covert Cloak/Shield Dust (#4634) 2024-05-27 06:38:05 +02:00
cawtds
b73e33618d
Fix status curing of full restore when used on party member (#4603)
* 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
2024-05-20 00:25:03 +02:00
Alex
faf61e62fb
Adds move Spicy Extract (#4211)
* Adds move Spicy Extract

* remove uneeded line

* anim, new tests, acc change

* Clear Amulet, Contrary interaction

* ai

* correction

* simplify script a bit

* clean up

* Spicy Extract script overhaul

* merge rhh/upcoming

* alignment

* AI changes/additions

* add Foul Play check

* Remove useless ai checks

* remove wrong test

* review issues
2024-05-16 11:03:50 +02: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
sneed
a8bb82778a
Remove and replace MOVE_EFFECT_SP_ATK_TWO_DOWN (#4557) 2024-05-12 15:07:43 +02:00
Eduardo Quezada
0c74fd31c3 Merge branch '_RHH/master' into _RHH/upcoming 2024-05-02 14:24:17 -04:00
PhallenTree
6ad443c9a8
Fixes Eject Items causing wrong pokemon to take damage from entry hazards (#4465)
* Fix hazards damaging the wrong pokemon using eject items

* Added Stealth Rock test as requested

* Added Stealth Rock double battle test
2024-04-29 23:16:58 +02:00
kittenchilly
d58e6517f8
Add abilities Tera Shift, Tera Shell, and Teraform Zero (#4418)
* Add abilities Tera Shift, Tera Shell, and Teraform Zero

* Address reviews

* Tests and misc cleanup

* Fix alignments

* Update battle_script_commands.c

* New tests and fix behavior

* Address more reviews

* Update battle_util.c
2024-04-27 19:52:31 +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
kittenchilly
e19b05a3a9
Add Fog weather (#4359)
* Add Fog weather

* Update battle_string_ids.h

* Update battle.h

* some tweaks

* Update battle_anim_scripts.s

* Address reviews

* Update battle_util.c

* Update battle_util.c

* Update include/config/battle.h

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

* Address reviews, changes, fix bugs

---------

Co-authored-by: Eduardo Quezada <eduardo602002@gmail.com>
2024-04-17 12:06:49 -04:00
Eduardo Quezada
5bf379720f Merge branch '_RHH/master' into _RHH/upcoming
# Conflicts:
#	src/data/moves_info.h
2024-04-12 21:30:52 -04:00
kittenchilly
3fb52b6b0e
Change Frostbite abbreviation from FSB to FRB (#4355)
* Change Frostbite abbreviation from FSB to FRB

* Melted the ice is actually the one used

* Update moves_info.h

* Update moves_info.h

* Update items.h
2024-04-10 09:16:32 +02:00
Alex
3c85089428
Fixes Gulp Missile Dive / Power Herb interaction (#4371)
* Fixed Cramorant Dive / Power Herb interaction

* remove file

* leftover
2024-04-09 10:32:11 +02:00
Alex
db42d2b5a4
Adds Booster Energy (#4337)
* Adds Booster Energy

* fix string

* fixes strings in tests

* Apply suggestions from code review

---------

Co-authored-by: Bassoonian <iasperbassoonian@gmail.com>
2024-04-05 19:38:50 +02:00
Eduardo Quezada
75ad61e5bf Merge branch '_RHH/master' into _RHH/upcoming
# Conflicts:
#	data/battle_scripts_1.s
#	include/constants/battle_move_effects.h
#	src/battle_ai_main.c
#	src/battle_ai_util.c
#	src/battle_tv.c
#	src/data/battle_moves.h
#	src/data/graphics/pokemon.h
2024-02-19 10:13:13 -03:00
Alex
cd596fdd80
Adds Tidy Up + minor Dragon Cheer follow up (#4136)
* Adds Tidy Up + minor Dragon Cheer follow up

* improve tidy up script

* Add IncreaseTidyUpScore function

* remove useless calls

* 2 small tests and a correction for IncreasyTidyUpScore
2024-02-18 20:00:36 +01: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
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
ghoulslash
83b9b95662
add supersweet syrup, unify single-use entry abilities to single field (#4115)
Co-authored-by: ghoulslash <pokevoyager0@gmail.com>
2024-02-02 15:44:14 +01:00
ZnogyroP
71b49a114f
Adds move Upper Hand (#4085)
* Remove non-existent tilesets from label comments and alphabetize

* Fixed braces style

* gbagfx bit depth upconversion fix

* jsonproc: filter out every non-alphanumeric character

* fix(linking): link gflib/malloc.c at top of EWRAM in ld_script_modern.ld

* Adds move Upper Hand

* Requested changes

- Tabs / spaces where proper
- HitFromAtkString -> HitFromAccCheck
- Actually compiles now lol
- Moved assumes into relevant tests
- Cleaned up the check for TryUpperHand

* Fixed || positioning

* Update upper_hand.c

* Revert "Merge remote-tracking branch 'upstream/master' into upper-hand"

This reverts commit b21275dfe9, reversing
changes made to 89b1ad1ea1.

* AI logic and conflicts solved

* Test fix

* Fix Sheer Force test

* Requested changes

* Requested changes

* Update battle_script_commands.c

---------

Co-authored-by: GriffinR <griffin.g.richards@gmail.com>
Co-authored-by: Eduardo Quezada <eduardo602002@gmail.com>
Co-authored-by: Sierraffinity <sierra@domoreaweso.me>
Co-authored-by: sbird <sbird@no.tld>
2024-02-01 12:23:58 +01:00
Alex
6d3fa525d5
Rename EFFECT_FAKE_OUT to EFFECT_FIRST_TURN_ONLY (#4081)
* Splits First Impression effect from Fake Out

* Fix test failing

* rename EFFECT_FAKE_OUT

* use moveeffect chance for fake out and priority field for first impression

* rename rest of fake out

* messed up merge

* remove useful comment

---------

Co-authored-by: Eduardo Quezada D'Ottone <eduardo602002@gmail.com>
2024-01-31 09:32:58 -03:00
Eduardo Quezada
00e2ca6030 Merge branch '_RHH/master' into _RHH/upcoming
# Conflicts:
#	data/battle_scripts_1.s
#	include/constants/battle_move_effects.h
#	src/battle_ai_util.c
#	src/battle_script_commands.c
#	src/battle_tv.c
#	src/data/battle_moves.h
#	src/data/pokemon/species_info/gen_9.h
2024-01-22 15:56:10 -03:00
Nephrite
89a632cfa4
Moved scripts array to src/data/battle_move_effects.h (#3994)
* Created gMoveBattleEffects array

* Renamed array to gBattleMoveEffects

Applied array in battle_util.c and battle_script_commands.c; doesn't build yet...

* Got it building...

* Added missing battle_tv effects

* Fixed and got it building

I'm an idiot sometimes

* Added battle_tv scores, encourage Encore flag

All works and builds just fine

* Merge fixes

* Reformatted battle_move_effects

Also tweaked struct, added macro

---------

Co-authored-by: Alex <93446519+AlexOn1ine@users.noreply.github.com>
2024-01-19 16:44:09 +01:00
Eduardo Quezada
71fe6b34dc Merge branch '_RHH/master' into _RHH/upcoming
# Conflicts:
#	include/battle_scripts.h
#	src/battle_script_commands.c
2024-01-17 12:29:33 -03:00
Alex
8f99ef16be
Adds Move Psychic Noise (#4005)
* Adds Move Psychic Noise

* changes psychic noise from effect to move_effect

* remove leftover

---------

Co-authored-by: Bassoonian <iasperbassoonian@gmail.com>
2024-01-16 22:52:56 +01:00