Commit graph

284 commits

Author SHA1 Message Date
Alex
f61a0f6a30
Sheer Force fix and move effect cleanup (#5812) 2024-12-21 19:45:50 +01:00
Eduardo Quezada
59e617b16d
Updated Wring Out effects to match Eruption effects (#5549) 2024-10-20 21:44:28 +02: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
sneed
6aa308e1d8
EFFECT_PHOTON_GEYSER and restored EFFECT_SHELL_SIDE_ARM work for physical moves (#4923) 2024-07-14 15:35:11 +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
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
Alex
635db6312c
AI respects partner when using spread moves in double battles (#4518)
* Fixes Earthquake AI in double battles

* earthquake_ai_fix

* Use CompareDamagingMoves to fix spread damage issue
2024-05-17 00:41:55 +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
kittenchilly
64b28124fb
Add Tera Starstorm move + make Tera Blast displayed type reflect current type due to tera state (#4447)
* Add Tera Starstorm move + make Tera Blast/Tera Starstorm displayed type reflect tera type

* Ooops

* Curse tests
2024-04-27 19:35:29 +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
Alex
92e23415ab
Change freeze dry to allow easier extendebility (#4312)
* Change freeze dry to allow easier extensibility

* give body press the foul play treatment

* Tests
2024-03-31 19:15:18 +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
57e0d7b20b
Partial fix for Teeter Dance and Ability Dancer interaction (#4129)
* Parial fix for Teeter Dance and Ability Dancer interaction

* Removes rest of teeter dance checks and make it work with effect_confuse

* Update test/battle/ability/dancer.c

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

* Update test/battle/ability/dancer.c

Co-authored-by: ultima-soul <33333039+ultima-soul@users.noreply.github.com>

---------

Co-authored-by: Bassoonian <iasperbassoonian@gmail.com>
Co-authored-by: ultima-soul <33333039+ultima-soul@users.noreply.github.com>
2024-02-19 13:36:21 +01: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
LOuroboros
e73c58ed2e
Made EFFECT_WRING_OUT read the max power from the move's argument field (#4180)
* Made EFFECT_WRING_OUT read the max power from the move's argument field

* Renamed EFFECT_WRING_OUT to EFFECT_VARY_POWER_BASED_ON_HP
2024-02-12 22:39:15 +01:00
Eduardo Quezada D'Ottone
af95a09961
Last Respects effect + Fixed Supreme Overlord (#4151)
* Last Respects effect + Fixed Supreme Overlord

* Fixed ability pop-up happening when there's no fainted party members

* Fixed Supreme Overlord counting faints during the battle instead of fainted party

* Removed invalid test.

* Converted GetSupremeOverlordModifier to an inline function

* Created inline functions to obtain faint counters

* Fixed erroneous implemenation and tests
2024-02-10 10:58:41 +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
Alex
ab2774f8c7
Adds Dragon Cheer (#4122)
* Adds Dragon Cheer

* fix assumptions

---------

Co-authored-by: ghoulslash <41651341+ghoulslash@users.noreply.github.com>
2024-02-03 08:00:41 -07: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 D'Ottone
308bf50dcc
Set EFFECT_PLACEHOLDER as the default move effect (#4079) 2024-01-27 15:33:29 -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
Alex
0ec777dd24
Fixes Mind Blown / Magic Guard interaction and renames Steel Beam effect (#4043)
* Fixes Mind Blown / Magic Guard interaction and renames Steel Beam effect

* review fixes

---------

Co-authored-by: Bassoonian <iasperbassoonian@gmail.com>
2024-01-21 23:42:01 +01: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
Alex
9efdd9e0cd
Adds Move Shed Tail (#4016)
Co-authored-by: Bassoonian <iasperbassoonian@gmail.com>
2024-01-18 00:14:18 +01:00
Eduardo Quezada D'Ottone
ff0aed31b3
Removed some hardcoded move IDs (#3982)
* Removed EFFECT_HURRICANE in favor of using EFFECT_THUNDER

* Added EFFECT_BLIZZARD

* Helping the IDE a little

* Added EFFECT_RAIN_ALWAYS_HIT for Forces of Nature moves

* Removed MOVE_SELF_DESTRUCT and MOVE_EXPLOSION hardcoding

* Removed EFFECT_FRUSTRATION hardcoding

MOVE_SELF_DESTRUCT

* Cleaned up sPoints_MoveEffect

* Removed MOVE_AURA_WHEEL and MOVE_PRESENT hardcoding

* Fixed compile
2024-01-12 22:41:46 +01:00
Nephrite
1ced2bf324
Converted EFFECT_x defines to enum (#3975)
follow up PR

Co-authored-by: Eduardo Quezada D'Ottone <eduardo602002@gmail.com>
2024-01-12 07:30:58 -03:00
Nephrite
a76e3c70ba Applied more review fixes 2024-01-12 03:02:48 +09:00
Nephrite
923d22b42b Merge branch 'upcoming' of https://github.com/rh-hideout/pokeemerald-expansion into secondary_effects_overhaul_merge 2024-01-01 03:50:36 +09:00
Alex
cc32e378d6
Adds some Indigo Disk moves (#3853)
* Burning Bulwark

* Fickle Beam

* Alluring Voice

* Electro Shot

* forgot sheer force flag for alluring voice

* review changes

* additional alluring voice test

* Simple Allruing Voice animation

* Update battle.h

---------

Co-authored-by: Bassoonian <iasperbassoonian@gmail.com>
2023-12-30 20:20:12 +01:00
Nephrite
9dfa0d264f Merge branch 'upcoming' into secondary_effects_overhaul 2023-12-30 23:54:01 +09:00
Nephrite
ff51eb2b6c Removed unused move effects, various ids, and one script command 2023-12-30 20:35:48 +09:00
Nephrite
e34373effc Renamed seteffectwithchance to setadditionaleffects
Function no longer has ability to apply effects from moveEffect - for that, seteffectprimary or secondary is now recommended. Removed EFFECT_RAMPAGE, updated a few tests
2023-12-30 20:29:09 +09:00
kittenchilly
66a638f7b4
Change Ivy Cudgel to be based on Ogerpon form rather than held item (#3865)
* Change Ivy Cudgel to be based on Ogerpon form rather than held item

* Update ivy_cudgel.c

* Address reviews

* Update test/battle/move_effect/ivy_cudgel.c

---------

Co-authored-by: Bassoonian <iasperbassoonian@gmail.com>
2023-12-30 11:40:58 +01:00
Nephrite
f5ae8e0686 Rapid Spin uses additional effects + test 2023-12-30 17:02:59 +09:00
Nephrite
e7de08eca2 Unified Sonic Boom & Dragon Rage
Not really in scope, but what the hell
2023-12-30 15:40:50 +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
kittenchilly
94a650a203
Add Fillet Away + Belly Drum tweaks (#3616)
* Add Fillet Away

* Fillet Away and Belly Drum tests

* More tests

* Update fillet_away.c

* Update fillet_away.c

* Newlines

* Update battle_scripts_1.s

* Update belly_drum.c

* Address reviews

* Fix order

* Swords Dance assume

* Update belly_drum.c

* Try some stuff

* Fix hp not being halved in certain cases

* Update battle_scripts_1.s

* AI stuff
2023-12-28 23:27:09 +01:00
Nephrite
417a02c95e Fixed Make it Rain
To do: misc fixes here and there, maybe do Burn Up/Double Shock, Dragon Rage/SonicBoom...
2023-12-29 01:40:43 +09:00
Nephrite
77c722ea09 Obsoleted 22 more effects
Also added a better way of calculating battle_tv score properly; to do: Make it Rain
2023-12-27 17:43:20 +09:00
Nephrite
c5061f0161 Updated remaining moves which use secondaryEffectChance
secondaryEffectChance is no longer considered anywhere in the code; tidied up scripts and more
2023-12-26 13:12:11 +09:00
Nephrite
b0b9883625 Removed unused effects + fixed tests + removed secondaryEffectChance
To do: remaining moves that make use of `secondaryEffectChance` field
2023-12-25 12:53:15 +09:00
Nephrite
f3e67cf543 Removed all unused effects
Some util updates
2023-12-25 12:32:13 +09:00
Nephrite
cda445c2f5 Merge remote-tracking branch 'rhh/upcoming' into secondary_effects_overhaul_rebase 2023-12-25 12:19:38 +09:00
Nephrite
e87fe533c3 Superpower, CC, Hammer Arm 2023-12-24 23:43:12 +09:00