Commit graph

259 commits

Author SHA1 Message Date
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
Nephrite
a8967da1c5 Overheat (and clones)
Also, Syrup Bomb (really weird script)
2023-12-24 23:27:21 +09:00
Nephrite
a244d7b8b6 Updated moves that raise the target's own stats
To do: moves like CC, Overheat that LOWER stats; did NOT remove the effect for raising all stats due to an AI function
2023-12-24 22:55:53 +09:00
kittenchilly
505b8b63eb
Add Doodle + update ability banlists (#3609)
* Add Doodle

* Doodle test

* Oops

* Update battle_util.c

---------

Co-authored-by: Bassoonian <iasperbassoonian@gmail.com>
2023-12-22 16:45:55 +01:00
Nephrite
4a1a6c5625
Battlemove refactored (recoil, crit and Z moves) (#3575)
* Unified EFFECT_RECOIL

Combined EFFECT_RECOIL_25/33/50/33_STATUS into a single EFFECT; added an extra field to BattleMove 'secondaryData' that contains the franction of HP recoil; argument still holds status effect for Flare Blitz/Volt Tackle

* BattleMove struct change

Added critrate, recoil, multihit fields, made zMove into a union of effect/powerOverride for status/non-status moves respectively. Added new recoil field and zMove field to all moves. To-do: crit rate, multihit

* Critrate field added

Moves use a critRate field instead of a flag - obsoletes EFFECT_ALWAYS_CRIT

* Just a little define

Makes clear that critBoost = 3 means ALWAYS CRIT

* Added a proper recoil field

Just to make it unambiguous and flexible - can finally have a move with 69% recoil.

* Fixed AI damage calculation for multi-strike moves

* Fixes + removed unused effects

* Tests fixes

Two to fix: pass when run in isolation but not when the whole group is run, which is annoying...

* Minor fixes

* Minor tweaks

* Fixed move effects

* recoil tests

---------

Co-authored-by: Alex <alexthenotes@gmail.com>
2023-12-19 16:10:07 +01:00
Alex
38c61854e6
Changed Ivy Gudgel effect (#3721)
* Change Ivy Gudgel effect

* test assumptions

---------

Co-authored-by: Bassoonian <iasperbassoonian@gmail.com>
2023-12-14 18:09:06 +01:00
Alex
628eb95925
Adds Rage Fist (#3573)
* Adds Rage Fist

* Fix initial implementation

* fix merge

* review changes

* endure test

* add field enduredDamage

* rage fist: transform, disguise  and field change

* merge fix
2023-12-10 12:33:25 +01:00
Patrick Curran
f7ca839f23
EFFECT_CHILLY_RECEPTION (#3379)
* Chilly Reception Effect

* Wrap Chilling Reception Message Better

* Animation & Some Testing

* Remove Wimp Out cases from Chilly Reception tests

* Animation tweaks

* Battle Script Updates
* Created CheckPrimalWeather macro for Weather Effects
* Updated Chilly Reception logic to switch even if weather doesn't change

Testing Updates

* Fixed test: Move does not animate if weather fails to change

* Remove snow animation check during failure path test

* * Fix indentation
* Move Chilly Reception animation to always play (even when weather change fails)

* Updates to MoveSwitch and PartingShot to get closer to original logic

* Update BattleScript_EffectChillyReception logic

* * Move CHILLY_RECEPTION animation
* Test updates

* Fix Chilly Reception MESSAGE  checks

---------

Co-authored-by: Patrick Curran <rapidnutcracker@gmail.com>
Co-authored-by: Alex <93446519+AlexOn1ine@users.noreply.github.com>
2023-12-06 17:11:13 +01:00
Nephrite
460eeff3e5 All moves (I think) that hit and lower a stat
Includes Grav Apple - test that checks the AI can see its power bump needs fixing
2023-11-28 16:17:11 +09:00
Nephrite
a1a62f431d More moves
Poison Fang, Knock Off, Thunder, Hurricane, Snore; also Thief, hit_and_escape moves, recharge moves, (but didn't remove effect)
2023-11-28 00:03:42 +09:00
Nephrite
2d0ec53cb6 Misc moves + cmd_seteffectwithchance fix
Added check to prevent loops in cmd_seteffectwithchance. Updated Pay Day, Tri Attack, Spectral Thief, Clear Smog, V Create, Core Enforcer
2023-11-27 00:32:40 +09:00
Nephrite
4058d16f2f 2-Turn moves + unique moves with secondary effects
Two turn moves (Bounce, Freeze Shock, Sky Attack, Shadow/Phantom Force), Dire Claw, Stone Axe, Ceaseless Edge, Wicked Torque, Relic Song, Fake Out,
2023-11-25 23:56:17 +09:00
Nephrite
98b2c93b3f Freeze/frostbite causing moves
Added move effect FREEZE_OR_FROSTBITE macro so that we only need that if statement once...
2023-11-25 19:22:28 +09:00
Nephrite
5eae07e4b9 Jaw Lock, Axe Kick, Spin Out
Jaw Lock needs a test but I'm too lazy to write it
2023-11-23 23:43:11 +09:00
Nephrite
b7d77ad59e Confusion moves 2023-11-23 23:33:55 +09:00
Nephrite
d81bf6afde EFFECT_POISON_HIT
Also tidied up paralysis/burn scripts; updated Barb Barrage
2023-11-23 22:29:11 +09:00
Nephrite
ffe89c7248 Redid Fang Moves
Pass tests too
2023-11-23 00:21:57 +09:00
Alex
ba6d223f17 matcha gotcha 2023-11-22 19:20:30 +09:00
Nephrite
1dadc79b8b Triple Arrows redo
Sorry, Lunos
2023-11-20 19:39:13 +09:00
Alex
4cb03d4add
Adds Raging Bull and various fixes (#3552)
* Adds Raging Bull and various fixes

* fix compiling on abgcc

* syrup bomb anim fix

* sticky syrup anim in link battles

* fix sticky syrup in link battles

* fix battler index

---------

Co-authored-by: Bassoonian <iasperbassoonian@gmail.com>
2023-11-19 17:45:58 +01:00
Alex
5fa1bffa8d
Adds Glaive Rush, fixes for Plasma Fists and Relic Song (#3476)
* Adds Glaive Rush

* Fixes: Glaive Rush status is removed until users next turn

* Glaive Rush no affect

* simplify glaive rush script

* simlify script further

* leftover

* Fix Plasma Fists and Relic Song + tests

* Callnative for Plasma Fists

* Use Status Field Ion Deludge for Plasma Fists

* add assumes for flinch_status

---------

Co-authored-by: Bassoonian <iasperbassoonian@gmail.com>
2023-11-18 15:19:38 +01:00
Alex
64ba52d214
Remove redundant AI score increases (#3504)
* Remove redundant AI score increases

* review applied

* fix score
2023-10-31 13:41:22 +01:00
kittenchilly
33a0fdbbc6
Add new move flags and update all flags for every move (#3425)
Co-authored-by: Eduardo Quezada D'Ottone <eduardo602002@gmail.com>
2023-10-19 20:16:37 -03: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
Alex
0b9126ff53
Adds moves Matcha Gotcha, Syrup Bomb and Ivy Cudgel (#3402)
* initial commit

* done

* clean up
2023-10-11 11:09:50 +02: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