Commit graph

605 commits

Author SHA1 Message Date
Nephrite
095decbd27 FINAL review changes 2024-01-12 07:25:51 +09:00
Nephrite
a76e3c70ba Applied more review fixes 2024-01-12 03:02:48 +09:00
Nephrite
3c93f97166 Apply suggestions from code review
Thanks, Edu

Co-authored-by: Eduardo Quezada D'Ottone <eduardo602002@gmail.com>
2024-01-12 02:13:55 +09:00
Nephrite
c4616739d8 Merge remote-tracking branch 'rhh/upcoming' into secondary_effects_overhaul 2024-01-11 00:35:35 +09:00
Nephrite
67e76f2b59 Some more review fixes + Fling fix
Not the ideal solution but Fling now has a hardcoded check for Shield Dust and acts accordingly - a better long term solution inolves making a bunch of reusable MOVE_EFFECTS and rejigging attackcanceler but I didn't feel like doing that today...
2024-01-11 00:27:06 +09:00
Ariel A
499b4a6d42 Replaced if directives with conditions, where possible. 2024-01-09 19:34:29 -05:00
Nephrite
25f0179628 Review changes
Numerous AI updates and test fixes; added a test for Aura Wheel
2024-01-10 00:55:43 +09:00
Alex
5498098438
Syrup Bomb / Sticky Syrup addition (#3948)
* Syrup Bomb / Sticky Syrup addition

* Update test/battle/move_effect/syrup_bomb.c

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

* Update src/battle_script_commands.c

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

---------

Co-authored-by: Eduardo Quezada D'Ottone <eduardo602002@gmail.com>
Co-authored-by: Bassoonian <iasperbassoonian@gmail.com>
2024-01-09 13:37:07 +01:00
Biffalo XIII
4a3954ff34 Merge branch '_RHH/master' into _RHH/upcoming
# Conflicts:
#	src/birch_pc.c
#	src/main.c
2024-01-09 09:19:12 -03:00
Eduardo Quezada D'Ottone
0d75ccd2d2
Stuff Cheeks cleanup (#3950)
Co-authored-by: Biffalo XIII <--global>
2024-01-09 09:15:23 +01:00
Ariel A
90be465a9a Ignored case-fixing characters in tests' TryMessage 2024-01-08 21:04:25 -05:00
Nephrite
4556ecc71e Removed PRIMARY/SECONDARY macros; added flags
Just a couple for now; cleaned up parts of setadditionaleffects
2024-01-02 20:06:49 +09:00
Nephrite
daeba066e0 Fixed SetMoveEffect + Sheer Force 2024-01-02 05:51:40 +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
0980253cce Merge branch 'upcoming' into secondary_effects_overhaul 2024-01-01 20:40:11 +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
a3c25114b7
Fixes small ai bulldoze effect bug (#3872)
Co-authored-by: DizzyEggg <jajkodizzy@wp.pl>
Co-authored-by: Bassoonian <iasperbassoonian@gmail.com>
2023-12-30 23:08:17 +01: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
e132f26bea Merge corrections and fixes 2023-12-31 00:05:58 +09:00
Nephrite
9dfa0d264f Merge branch 'upcoming' into secondary_effects_overhaul 2023-12-30 23:54:01 +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
b6da1a1e1d Tweaked helper functions 2023-12-30 17:42:53 +09: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
Martin Griffin
ab900e38df Merge remote-tracking branch 'rhh/master' into upcoming 2023-12-29 19:48:21 +00:00
DizzyEggg
604b823ffd
Missing Strength sap tests (#3860)
* add missing strength sap tests

* a

---------

Co-authored-by: Bassoonian <iasperbassoonian@gmail.com>
2023-12-29 13:39:54 +01:00
Nephrite
9d68f4ab6f Added Throat Chop test
I don't know why it used to work through subs but now it won't
2023-12-29 20:17:57 +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
Bassoonian
fde3fc0a52
Metronome move fix (#3852)
* Draft Indigo Disk move data

* Add basic defines (flags, targets and priority missing)

* Update move flags

* Temper Flare is Stomping Tantrum

* Fix failing tests

* Disable Burning Bulwark for now
2023-12-28 16:57:29 +01:00
Bassoonian
872ddf32c6
The Indigo Disk Moves (#3704)
* Draft Indigo Disk move data

* Add basic defines (flags, targets and priority missing)

* Update move flags

* Temper Flare is Stomping Tantrum

* Forgot to push, please squash :D

* Fix failing tests
2023-12-28 12:21:52 +01:00
DizzyEggg
3e321d1172
fix ally switch dig issue (#3835) 2023-12-27 15:35:42 -05:00
Martin Griffin
3ad66028e9
Backwards-compatible BoxPokémon Refactor (#3438)
* Check progress in non-battle PARAMETRIZEd tests

* Overworld Script Tests

* Backward-compatible BoxPokemon Refactor

Reuses space that contains zeros to provide space for:
- HP/status in the box
- 12-character nicknames
- Up to 63 PokéBalls
- Shininess separate from PID
- Hidden Nature
- Hyper Training
- Dynamax Level
- Gigantamax Factor
- Terastallization Types
- Shadow

Implements:
- OW_PC_HEAL to switch between Gen7- and Gen8+ behavior
- Nature Mints
- Dynamax Candy
- Hyper Training commands (canhypertrain/hypertrain)
- Gigantamax Factor commands (hasgigantamaxfactor/togglegigantamaxfactor)
- Terastallization Type on the summary screen
- Prevents Gigantamax Factor Pokémon from evolving into a species without a Gigantamax form

* fixup! Backward-compatible BoxPokemon Refactor

* displaydexinfo fix from Jasper
2023-12-27 17:48:17 +01: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
cd5c59ae5a Merge remote-tracking branch 'rhh/upcoming' into secondary_effects_overhaul 2023-12-26 13:19:10 +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
Alex
45da55eb14
Fixes Minior form change and likely other forms (#3822)
* Fixes Minior form change and likely other forms

* new fix

---------

Co-authored-by: Bassoonian <iasperbassoonian@gmail.com>
2023-12-25 20:18:52 +01:00
Alex
166a1a4e63
Adds ability Embody Aspect + minor fix to Hospitality (#3821)
* Adds ability Embody Aspect + minor fix to Hospitality

* comment out failing tests related to neutralizing gas

* fixes neutralizing gas bug

* leftover
2023-12-25 18:28:16 +01: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
cda445c2f5 Merge remote-tracking branch 'rhh/upcoming' into secondary_effects_overhaul_rebase 2023-12-25 12:19:38 +09:00
Alex
1339256d5d
Adds Ability Hospitality (#3818)
* Adds Ability Hospitality

* fix agbcc
2023-12-25 01:43:57 +01:00
Bassoonian
c47a20a446
Fix gem boost description + test (#3817) 2023-12-25 01:14:01 +01:00
Nephrite
31b3337cda Updated moves that raise the target's own stats
Modified tests to use MoveHasMoveEffect
2023-12-24 23:52:08 +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
Zimmermann Gyula
f700466e8d
Implement optional Gen1 type immunity logic. (#3627)
* Implement optional Gen1 type immunity logic.

* Add tests against Gen1 burn, freeze and paralysis.

* !fixup Expand tests with Gen1 paths.

* Fixup tests.

Remove superflous defines.
Explicitly ASSUME used move type and effect.

* Fix flipped definitions on Freezing Glare test.

---------

Co-authored-by: Bassoonian <iasperbassoonian@gmail.com>
2023-12-23 16:34:24 +01:00
Alex
61e6365470
Fixes Photon Geyeser category + minor AI calc fixes (#3807) 2023-12-23 12:31:40 +01:00
DizzyEggg
1a7166c2bb
Tests do not allow to use SEND_OUT if the chosen mon is fainted (#3752)
* Tests dont allow to send out pokemon with 0 hp

* remove test test

* handle in-game 0 hp sent out

---------

Co-authored-by: Bassoonian <iasperbassoonian@gmail.com>
2023-12-23 00:27:40 +01:00
tertu
fb28ce50ae
Optional high-quality RNG (#3780)
High-quality RNG, behind the HQ_RANDOM flag, enabled by default

Makes the shuffle test error a bit more tolerant
2023-12-22 17:39:15 +00:00
Alex
63316daf30
Adds missing Doodle tests and fix (#3800) 2023-12-22 18:25:23 +01: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
Alex
83e2f4bdf8
Adds ability Minds Eye + Tests (#3782)
* Implemented Mind's Eye with tests + Keen Eye tests

* AI test

* fix AI minds eye test

* Adds ability Minds Eye + Tests

* fix tests

---------

Co-authored-by: Eduardo Quezada <eduardo602002@gmail.com>
Co-authored-by: Bassoonian <iasperbassoonian@gmail.com>
2023-12-22 16:22:53 +01:00
Alex
566653aa63
Replace mons for gen9 abilities (#3740) 2023-12-22 15:05:35 +01:00
LOuroboros
96cb4d3823
Added last CannotUseItemsInBattle tests (#3789)
* Added missing CannotUseItemsInBattle tests

* Removed individual assumptions for the EFFECT_ITEM_ESCAPE tests and added a single global one

* Added assumption for the move-related EFFECT_ITEM_ESCAPE test

* Moved the Mean Look assumption for consistency with other tests and to be extra safe
2023-12-21 20:06:12 +01:00
fakuzatsu
2af6d65893
added ability to set flags in tests (#3786) 2023-12-21 13:01:13 +00:00
Martin Griffin
3a5ca6f8f0
Small test runner improvements (#3761)
* u16 for FunctionTest PARAMETRIZE

* Speed up CB2_TestRunner

* Use DACS to handle illegal instructions

DACS is available in mgba from 44e074a15e
This is not 0.10.2, but will presumably be available in the next
release. Alternatively, a GBA BIOS could be used.

---------

Co-authored-by: DizzyEggg <jajkodizzy@wp.pl>
Co-authored-by: Bassoonian <iasperbassoonian@gmail.com>
2023-12-20 17:33:45 +01:00
Nephrite
1708c80200
Removed ALWAYS_CRIT, renamed critBoost (#3779)
Replaced ALWAYS_CRIT with an alwaysCriticalHit flag to account for the fact that in earlier generations, there is no crit stage at which crits are guaranteed. Renamed critBoost to criticalHitStage (at Edu's prompting). Reorder .criticalHitStage defines in battle_moves.h to be aligned with struct order.
2023-12-20 16:16:02 +01:00
DizzyEggg
6137db102e
Ally Switch (#3533)
* ally switch move animation

* Ally Switch anim done

* ally switch test and improve animation

* derp

* add ally switch known failing test for ally targeting moves

* moves which targetted ally fail after ally switch

* ally switch works like protect

---------

Co-authored-by: root <root@LAPTOP-3SNV7DEQ>
Co-authored-by: Alex <93446519+AlexOn1ine@users.noreply.github.com>
2023-12-20 15:26:28 +01:00
Martin Griffin
50cbcebc81 Merge remote-tracking branch 'rhh/master' into upcoming 2023-12-20 12:56:35 +00:00
Alex
069769710b
Fixes Item Metronome damage (#3767)
Co-authored-by: Bassoonian <iasperbassoonian@gmail.com>
2023-12-20 11:24:12 +01:00
Eduardo Quezada D'Ottone
442620cf6b
Renamed Battle Move "Split" to the proper "Category" (#3774) 2023-12-20 10:08:26 +01:00
Martin Griffin
13a4bf5838 Merge remote-tracking branch 'rhh/master' into upcoming 2023-12-19 18:08:13 +00: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
DizzyEggg
e8e9d37640
Prankster tests + fixes (#3766)
* Prankster tests + partial fix

* Fix Prankster tests and some edge cases

---------

Co-authored-by: Alex <alexthenotes@gmail.com>
2023-12-19 11:17:31 +01:00
DizzyEggg
1ec0333432
Fix Ion Deluge interaction with VoltAbsorb/LightRod (#3764)
* Fix Ion Deluge interaction with VoltAbsorb/LightRod

* Use move target all battlers for ion deluge fix

* fix teatime failing

---------

Co-authored-by: Alex <93446519+AlexOn1ine@users.noreply.github.com>
2023-12-18 16:57:56 +01:00
DizzyEggg
59a159c338
Fix Ice Face ignoring move effects (#3755)
Co-authored-by: Alex <93446519+AlexOn1ine@users.noreply.github.com>
2023-12-18 16:02:07 +01:00
DizzyEggg
64f8635496
fix telekinesis not working (#3763)
* fix telekinesis not working

* typo

* remove one roost known failing

---------

Co-authored-by: Alex <93446519+AlexOn1ine@users.noreply.github.com>
2023-12-18 15:50:03 +01:00
DizzyEggg
e1d4bcc04e
fix frisk msg + tests (#3762) 2023-12-18 15:13:14 +01:00
Eduardo Quezada
c505abd53d Merge branch 'RHH/master' into RHH/upcoming 2023-12-17 18:13:26 -03:00
DizzyEggg
e22ac51617
Fix Innards Out doing dmg after Gastro Acid / vs Magic Guard (#3758)
* gastro acid stays for fainted mons

* Innards Out does not damage Magic Guard Pokemon
2023-12-17 21:47:12 +01:00
Eduardo Quezada
d92c046a80 Merge branch 'RHH/master' into RHH/upcoming 2023-12-17 17:31:10 -03:00
DizzyEggg
76a7513dcd
Fix Magician Life orb recoil when stealing (#3753)
* Fix Magician Life orb recoil

* get rid of unneeded assume
2023-12-17 19:50:43 +01:00
DizzyEggg
d79fe11bb1
get rid of known failing in ai test (#3748)
Co-authored-by: Eduardo Quezada D'Ottone <eduardo602002@gmail.com>
2023-12-17 15:11:02 +01:00
DizzyEggg
3df101a6a0
fix baton pass not passing embargo (#3745)
Co-authored-by: Alex <93446519+AlexOn1ine@users.noreply.github.com>
2023-12-17 00:25:16 +01:00
Eduardo Quezada D'Ottone
ef6edcf098
Fixed Ivy Cudgel test name (#3742) 2023-12-16 09:22:36 +01:00
Eduardo Quezada
fbbee39886 Merge branch 'RHH/master' into RHH/upcoming
# Conflicts:
#	src/battle_main.c
2023-12-15 18:50:20 -03:00
Alex
94ffeb2cf8
Fix Quick Claw chance (#3737) 2023-12-15 17:05:11 +01:00
Bassoonian
0fd08a32ac Add status form change 2023-12-15 11:17:35 +01:00
Eduardo Quezada D'Ottone
c44e133d8c
Updated Gen 9-mon-exclusive ability tests to use Gen 9 mon (#3733)
* Updated Gen 9-mon-exclusive ability tests to use Gen 9 mon

* Fixed message

---------

Co-authored-by: Bassoonian <iasperbassoonian@gmail.com>
2023-12-15 00:19:28 +01:00
Alex
be045fdc0c
Fixes Quick Draw (#3724)
* Fixes Quick Draw

* Fixes Custap and rest of Quick Draw

* review applied
2023-12-15 00:03:59 +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
44e81d4f4c
Gen 9 configs for Protean/Libero, Intrepid Sword and Dauntless Sword (#3614)
* Gen 9 configs for Protean/Libero, Intrepid Sword and Dauntless Sword

* use bitfield

* battler fix

* fields
2023-12-12 00:08:44 +01:00
Martin Griffin
ee1fb1d454
SpeciesInfo tests (#3688)
* Remove unnecessary const

* Test that species ID tables are shared between all forms

* Use P_FAMILY_MELTAN

* Test that form change tables contain only IDs in form species tables

* Fix isPrimalReversion typo

* Test form change targets have appropriate species flags

* Fix #3689
2023-12-11 13:54:20 +01:00
Eduardo Quezada
b2917fac5d Merge remote-tracking branch '_RHH_origin/master' into RHH/upcoming
# Conflicts:
#	include/constants/battle_script_commands.h
#	src/battle_script_commands.c
2023-12-10 14:29:42 -03:00
Rose
8dbce50783 Fix Ice Heal typo in test
Ice heal heals being frozen, not paralyzed
2023-12-10 17:07:28 +00: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
Alex
403843cecf
Fixes Fling damage calcs (#3670) 2023-12-10 00:27:05 +01:00
Alex
57ce85207e
Fixes Substitute triggering Stamina and Eject Button on crash damage (#3669)
* Fixes Substitute triggering Stamina

* Fix Eject Button triggering on crash damage
2023-12-09 17:40:04 +01:00
Alex
d86a2136a7
Fixes Cutton Down / Defiant interaction (#3657) 2023-12-08 17:29:29 +01:00
Eduardo Quezada D'Ottone
4adc2dcb16
Species Simplifier™ - Part 3 (#3562)
* Added SpeciesInfo fields

# Conflicts:
#	include/pokemon.h

* Added missing comments

* Renamed gigantamax to isGigantamax

* Converted species flags to agbcc bit flags

* Added padding after flags

* Pikachu form config

* Dex text

* Reordered Paradox flag

* Missing Pikachu ifdef comments

* Moved P_GEN_x_POKEMON settings to the species_families file

* Gen 1 Dex entries

* Renamed file to species_enabled.h

* Prevent Pokémon from evolving if their evolution is disabled

* Prevent Pokémon from being affected by Eviolite if their evolution is disabled

* Prevent Pokémon offspring if they're disabled

* Corrected imprementation of evolution prevention

It could potentially overwrite items by accident

* Cross-evo configs

* Gen 2 dex entries

* Changed cry table to use assignable IDs

# Conflicts:
#	include/pokemon.h

* Form table pointers

* Beginning support for moving data to gSpeciesInfo

* Pokédexes reads text from gSpeciesInfo

* Reading species names from gSpeciesInfo

* Fixed erroneous copy-paste

* Moved Bulbasaur to Raichu Family data do gSpeciesinfo

* Added female pic sizes

* Macros for Front, Back, Palette and Learnsets

* Sandshrew to Dugtrio Families

* Obtains Height/Weight from gSpeciesInfo

* Read category from gSpeciesInfo

* Removed unused data from pokedex_entries.h

* Moved Gen 1 data to gSpeciesInfo

* Moved Gen 2 data to gSpeciesInfo + fixed Ursaluna Bloodmoon not producing Teddiursa eggs

* Moved Gen 3 data to gSpeciesInfo

* Moved Gen 4 data to gSpeciesInfo

* HGSS dex properly shows form sprites

* Fixed data type for GetSpeciesHeight/Weight

* Reading Pokédex Size data from gSpeciesInfo

* Cleaned up mon graphic decompression function

* Reading Front Pics gSpeciesInfo

* Reading Back Pics gSpeciesInfo

* Updated uses of GetMonSpritePalStruct to allow loading the data directly instead of reading the struct

* Reading palettes from gSpeciesInfo

* Reading animation delay from gSpeciesInfo

* Fixed Pokémon Debug Menu not reading animation delay

* Reading front anim Id from gSpeciesInfo

* Reading back anim Id from gSpeciesInfo

* Reading Animation Frames from gSpeciesInfo

* Reading Icon Sprites from gSpeciesInfo

* Reading Icon Palette IDs from gSpeciesInfo

* Reading Footprints from gSpeciesInfo

* Reading Mon Pic sizes from gSpeciesInfo

* Separate mon pic sizes for female mon

* Reading Level Up Learnsets from gSpeciesInfo

* Reading Teachable Learnsets from gSpeciesInfo

* Reading National Dex Number from gSpeciesInfo

* Reading Enemy Mon Elevation from gSpeciesInfo

* Reading Evolutions from gSpeciesInfo

* Reading form table from gSpeciesInfo

* Fixed button label inconsistency in pokémon debug menu

* Reading form change table from gSpeciesInfo

* Removed need to define mon graphics in include/graphics.h

* Reordered mon graphics by family

* Fixed National dex number offset

* gFrontierBannedSpecies now checks IsSpeciesEnabled

* Added 3 more toggles for Fusions, Primal Reversions and Ultra Burst

* Gen 3 & 4 family toggles for dex entries

* Fixed missing Mr. Rime data

* Gen 1 dex descriptions as compound strings

* Gen 2 dex descriptions as compound strings

* Gen 3 dex descriptions as compound strings

* Gen 4 dex descriptions as compound strings

* Fixed compile in agbcc

* Moved Gen 5 data to gSpeciesInfo

* Using PLACEHOLDER_ANIM_SINGLE_FRAME when needed (same hash)

* Renamed PLACEHOLDER_TWO_FRAME_ANIMATION to PLACEHOLDER_ANIM_TWO_FRAMES

* Fixed capitalization for front pic anims

* Fixed `CanEvolve`

* Moved Gen 6 data to gSpeciesInfo

* Gen 7 without macros

* Gen 8 without macros

* Gen 9 without macros

* Fixed Gen 9 sound data

* Finished moving Gen 7 data in macros (by Alex)

Co-authored-by: Alex <93446519+AlexOn1ine@users.noreply.github.com>

* Ultra Necrozma is now included in the fusion forms define

* Cries are now properly excluded from the rom when disabling species

* Removed P_GEN_x_POKEMON from form_change_tables.h

* Fixed Yanmega's cry ignoring the P_GEN_4_CROSS_EVOS setting

* Added P_NEW_EVOS_IN_REGIONAL_DEX setting

* Automatic ASSUMPTION_FAIL when used species are disabled

* Finished moving Gen 8 data in macros (by Alex)

Co-authored-by: Alex <93446519+AlexOn1ine@users.noreply.github.com>

* Expanded Alcremie macro

* Finished moving Gen 9 data in macros (by Alex)

* Fixed missing data for Komala and Marshadow

* Form species id tables use family toggles + added missing Ursaluna form species id table

* Fixed Genesect palettes

* Fixed Flabébé family graphics

* Fixed Minior Graphics

* Fixed missing Calyrex data

* Family toggles in mon graphcis (By Jasper/Bassoonian)

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

* Fixed missing Ogerpon data

* Ordered Level Up Learnsets (missing toggles)

Also added White Basculin learnset

* Added more Minior synonyms

* Fixed enamorus order

* Reordered teachable learnsets

* Removed sSpeciesXXX level up learnsets + reordered

* Removed unneeded assumes

* Removed unused extra animations

* Family toggles in mon level up learnsets (By Jasper/Bassoonian)

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

* Fixed Phione graphics inclusion

* Family toggles for Teachable Learnsets

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

* Ordered Front Pic Anims

* Family toggles for front pic animations

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

* Fixed HGSS dex incorrectly showing the wrong mon when catching it

* Family toggles for Egg Moves + reodered

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

* Fixed HGSS not checking for null footprints

* Review changes

* Fixed Female difference mon not using their macros

* Fixed Alcremie Macro

* Fixed compile error when disabling the Bulbasaur family

* Fixed Turtwig and Chimchar family + Houndour and Mareep cries not being excluded properly

* Re-added missing Egg graphical data

* Fixed crash during the Birch Intro when Lotad is disabled

* Renamed PALLETE to PALETTES

* Removed extra spacing for YOffsets

* Fixed compile when only disabling cross-gen evolutions

* Added Tera Forms define (Ogerpon and Terapagos)

* Fixed Necrozma macro

* Removed .noFlip = FALSE

* Fixed dex number in summary screen for forms when nat dex is disabled

* Fixed Paldean form paths

---------

Co-authored-by: Alex <93446519+AlexOn1ine@users.noreply.github.com>
Co-authored-by: Bassoonian <iasperbassoonian@gmail.com>
2023-12-08 15:05:10 +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
Eduardo Quezada
d076193b9f Merge branch 'RHH/master' into RHH/upcoming
# Conflicts:
#	asm/macros/battle_script.inc
#	include/constants/battle.h
#	include/constants/battle_script_commands.h
#	src/battle_script_commands.c
#	src/data/battle_moves.h
2023-12-03 16:39:32 -03:00
LOuroboros
6b1ea33be8
Fixed Trace (#3623)
* Applied Alex's fix for ABILITYEFFECT_TRACE

* Added Trace tests written by Alex/Rainonline

* Updated Trace's target-choosing capabilities and added a double battle test for it
Credits to Alex/Rainonline.

* Removed 2 of the 3 'Trace on opponent's switch-in' tests

* Added another Trace test
2023-12-02 23:09:09 +01:00
Pawkkie
131bb94d73
Extend AI_FLAG_SMART_SWITCHING for Encore / hazards / lowered attacking stats (#3557)
* Consider Encore / lowered stats / hazards

* Fix poorly thought out Return FALSE

* Incorporate Egg's feedback

* Tests for hazards and stats, and some fixes

---------

Co-authored-by: Bassoonian <iasperbassoonian@gmail.com>
2023-11-30 12:37:19 +01:00
Alex
4bde378c0d
Fixes Floral Healing + Tests (#3604) 2023-11-29 13:57:29 +01:00
Alex
913bc6c9d0
Adds White Herb tests (#3611) 2023-11-29 11:05:06 +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
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
0e23160f2e Fixed macro + Jaw Lock test 2023-11-25 23:06:51 +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
Eduardo Quezada
c8b0545d20 Merge branch 'RHH/master' into RHH/upcoming
# Conflicts:
#	include/battle.h
2023-11-25 00:51:33 -03:00
Alex
71fd95e6d4
Fixes Protosynthesis and Quark Drive ability pop up (#3595) 2023-11-23 19:49:21 +01: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
d81bf6afde EFFECT_POISON_HIT
Also tidied up paralysis/burn scripts; updated Barb Barrage
2023-11-23 22:29:11 +09:00
Nephrite
bec0fea7f6 Flinching moves
All work fine - all tests pass
2023-11-23 17:14:50 +09:00
Alex
ca39889587 Fixes Howl 2023-11-22 21:55:08 +01:00
Nephrite
ffe89c7248 Redid Fang Moves
Pass tests too
2023-11-23 00:21:57 +09:00
Alex
7fb811d33d burn_hit -> move_effect_burn 2023-11-22 19:24:32 +09:00
Alex
ba6d223f17 matcha gotcha 2023-11-22 19:20:30 +09:00
Alex
b9edbb429b
Adds combined pledge move effects (#3336)
* Adds combined pledge move effects

* added pledge status and various other fixes

* leftover

* fix triple arrow test tag

* pledge moves can not be redirected by absorbing abilities

* more pledge changes

* remove duplicate test

* Stab boost, Rainbow anim and new SeaOfFire anim

* leftover

---------

Co-authored-by: Bassoonian <iasperbassoonian@gmail.com>
2023-11-21 16:23:22 +01:00
Alex
be42d4eafb
Increase score of secondary effects only at 100% chance (#3583)
Co-authored-by: Bassoonian <iasperbassoonian@gmail.com>
2023-11-21 11:30:20 +01: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
Nephrite
45d8491148 Fixed macro + implemented working Mortal Spin
It's that easy
2023-11-19 05:05:19 +09:00
Nephrite
41202a964a Initial struct change + paralysis test
Works great
2023-11-19 03:20:33 +09: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
LOuroboros
efe9f6d8ab
Added battle tests for Embargo (#3555)
* Added Embargo battle tests

* Expanded Embargo doesn't prevent Primal Reversion to avoid CI failure

* Applied corrections to some of the Embargo tests
2023-11-17 13:14:37 +01:00
Eduardo Quezada
a8564cf8a9 Merge branch 'RHH/master' into RHH/upcoming 2023-11-14 12:54:16 -03:00
Zhengwen Jiang
74de34c8b8 improve the performance for specific tests
Co-authored-by: Martin Griffin <martin.griffin@algosport.co.uk>
2023-11-13 01:53:39 -06:00
Pawkkie
b93dfb9d59
Smarter SwitchAI Mon Choices | HasBadOdds Switch Check (#3253)
* SwitchAI makes much smarter mon choices

* Add HasHadOdds check to ShouldSwitch decision

* Remove early return

* Rework Baton Pass check as per discussion with Alex

* Forgot to adjust a comment

* Don't program before breakfast lol (if / else if fix)

* Switch AI_CalcDamage for AI_DATA->simulatedDmg in HasBadOdds

Thanks Alex! :D

* Typo in a hitToKO comparison

* Remove and replace AI_CalcPartyMonBestMoveDamage and IsAiPartyMonOHKOBy from https://github.com/rh-hideout/pokeemerald-expansion/pull/3146

See https://discord.com/channels/419213663107416084/1144447521960251472 for details

* Major refactor, new struct, switchin considers damage / healing from hazards / status / held item / weather

* Forgot Snow exists and heals Ice Body, haven't played Switch games lol

* (766a1a27a7) Compatibility, use new struct field instead of function call

* Fixing oversight from previous upstream merge

* Improve TSpikes handling to make GetSwitchinHazardDamage more applicable

Small fixes:
- EFFECT_EXPLOSION typo (!= to ==)
- Order of if statements near bestResistEffective
- Spacing of terms in big HasBadOdds if statements

* Forgot to uncomment blocks disabled for debugging what turned out to be vanilla behaviour lol

* Remove another holdover from debugging, sorry :/

* Lastly, undoing my debug trainer

* Type matchup based on species type rather than current type

Suggested by BLourenco on Discord, the idea is that a mon that's had its type affected by a move like Soak will still have moves as though it was its regular typing, and so prioritizing the temporary typing wouldn't be ideal.
https://discord.com/channels/419213663107416084/1144447521960251472/1146644578141736970

* gActiveBattler upcoming merge fixes

* Egg changes part 1

* Egg changes part 2, just need to address EWRAM still

* Move SwitchinCandidate struct to AiLogicData

* Consider Steel type when checking TSpikes

* Comment about CanBePoisoned compatibility

* Changes for Egg's 2nd review

* Put period back in comment, whoops lol

* Latest upcoming merge fixes

* Missed a few u32 updates

* Combine GetBestMonIntegrate functions / flags, some modularization

* Fix merge error

* Make modern fixes

* Two tests done, two to go

* Accidentally pushed reference test, removing it

* Type matchup switching tests

* Tests for defensive vs offense switches

---------

Co-authored-by: DizzyEggg <jajkodizzy@wp.pl>
2023-11-11 14:37:35 +01:00
Alex
e79583be63
Remove function GetMoveDamageResult (#3536)
* Remove function GetMoveDamageResult

* fix test

* test clean up

---------

Co-authored-by: DizzyEggg <jajkodizzy@wp.pl>
2023-11-09 20:53:14 +01:00
Alex
4b3c96a89b
Adds ability Zero to Hero (#3542) 2023-11-09 08:25:46 -03:00
Alex
954f67a29f
Fixes Dragon Tail and Pumpkaboo spelling (#3541) 2023-11-07 18:19:46 +01:00
Eduardo Quezada
57c1dd97bb Merge branch 'RHH/master' into RHH/upcoming 2023-11-03 21:59:08 -03:00
DizzyEggg
8b359c2ca4
fix psychic terrain blocking moves it shouldnt block (#3521) 2023-11-03 21:01:02 +01:00
DizzyEggg
90d9334f0b
Fix Sap Sipper not blocking Bullet Seed (#3516)
* Fix Sap Sipper not blocking bullet seed

* add defiant sticky web test
2023-11-02 11:43:06 +01:00
Alex
53b7e4bf66
Remove powerfulMoveEffects array (#3515)
* Remove powerfulMoveEffects array

* Solar Beam test
2023-11-02 08:44:23 +01:00
DizzyEggg
47341f3f30
Fix Anger Shell activation (#3508) 2023-11-01 14:55:50 +01:00
DizzyEggg
7eb1b12224
Fix Knock Off healing berries (#3509) 2023-11-01 14:47:31 +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
Eduardo Quezada D'Ottone
2dfae911aa
Added config for Weak Armor's Gen 5-6 effect (#3498) 2023-10-30 17:18:00 -03:00
Eduardo Quezada
e28d0c627a Merge branch 'RHH/master' into RHH/upcoming 2023-10-30 16:51:04 -03:00
DizzyEggg
72dad4d7c6
Fix Weak Armor interrupting multi hit moves (#3497) 2023-10-30 16:44:42 -03:00
Eduardo Quezada
242d68487a Weak Armor tests 2023-10-30 14:31:28 -03:00
Eduardo Quezada
908af87846 Merge branch 'RHH/master' into RHH/upcoming 2023-10-30 11:00:24 -03:00
Eduardo Quezada
71ba501b94 Fixed tests on modern 2023-10-30 10:58:30 -03:00
Eduardo Quezada
661becc3b6 Merge branch 'RHH/upcoming' into RHH/pr/upcoming/debugCleanup2
# Conflicts:
#	src/debug.c
2023-10-30 08:05:14 -03:00
DizzyEggg
f4be01f0ac
Fix strength sap on substitute (#3486)
* tests for strenth sap

* fix strength sap on substitute

---------

Co-authored-by: ghoulslash <pokevoyager0@gmail.com>
2023-10-30 11:58:15 +01:00
DizzyEggg
0c8fdce1a4
New tests + Sheer Force / Last Resort minor bug fixes (#3378)
* tests for intimidate defiant

* sheer force fix + tests

* white herb tests

* tests for stealth rock, weak armor and last resort fix

* style changes to weak armor test
2023-10-30 11:39:41 +01:00
Alex
f461bc3256
AI_CompareDamagingMoves changes to increase the score by 1 for best moves (#3382)
* Further optimizes AI_CompareDamagingMoves

* viableMove name change + 2 tests

* some issues

---------

Co-authored-by: DizzyEggg <jajkodizzy@wp.pl>
2023-10-30 10:04:59 +01:00
Alex
f2fddf4ee1
Syrup Bomb move and special speed drop anim, Credits to Dat.H A (#3474) 2023-10-27 19:14:45 -03:00
kittenchilly
9d2be9f3a6
Remove all trailing whitespace (upcoming) (#3473) 2023-10-27 13:54:55 -03:00
kittenchilly
bd71946372
Remove all trailing whitespace (master) (#3472) 2023-10-27 13:52:44 -03:00
Eduardo Quezada D'Ottone
db00839d64
Fixes Syrup bomb, new Octolock script, some Intim changes + Tests (#3437) 2023-10-27 12:25:55 -03:00
Eduardo Quezada
b5607209f3 Fixed G-Max Finale test 2023-10-27 09:16:39 -03:00
Eduardo Quezada
59c0de0967 Merge branch 'RHH/master' into RHH/upcoming 2023-10-27 09:16:21 -03:00
Alex
25a57d48d9 fixes tests 2023-10-25 10:18:59 +02:00