Commit graph

583 commits

Author SHA1 Message Date
Alex
c740c4ba19
Disguise fixes + gen8 hp loss config (#4360)
* Disguise fixes + gen8 hp loss config

* fix battler arg

* Update test/battle/ability/disguise.c

---------

Co-authored-by: Bassoonian <iasperbassoonian@gmail.com>
2024-04-07 00:07:55 +02:00
Alex
d1c2a10af6
Fixes switch in AI bug (#4338)
* Fixes switch in AI bug

* fixes fix

* test
2024-04-04 19:52:45 +02:00
Alex
c52ae074ab
Fixes Protective Pads Fluffy interaction (#4340)
* Fixes Protective Pads Fluffy interaction

* couple more tests
2024-04-04 14:48:57 +02:00
Alex
7c1a0bb685
defiant_tests (#4331) 2024-04-02 21:32:19 +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
7c25db5200
Fill data for placeholder species (#4281)
* Absolute IDs

* Mothim internal forms

* Scatterbug/Spewpa internal forms

* Fixed Mothim not having form tables

* Totem Alolan Raticate

* Moved shared dex text to its own folder

* Totem Mimikyu

* Added missing empty third-ability fields

* Totem Gumshoos + missing totem flags

* Renamed files to better match their contents

* Fixed Disguise on Totem Mimikyu

* Totem Vikavolt/Alolan Marowak + missing Gumshoos form table

* Totem Ribombee/Araquanid/Lurantis/Salazzle

* Totem Togedemaru/Kommo-O

* Partner Pikachu/Eevee

* Reintroduced shinyLocked species flag for convenience

* Revert "Reintroduced shinyLocked species flag for convenience"

This reverts commit 3e07bd378b.
2024-03-16 18:38:43 +01:00
Alex
a741e2e396
Couple things for 1.8 release (#4274)
* Couple things for 1.8 release

* revert EFFECT_VARY_POWER_BASED_ON_HP change

* Fix comment

---------

Co-authored-by: Eduardo Quezada <eduardo602002@gmail.com>
2024-03-12 07:51:37 -03:00
Alex
8d58af4d33
Move most damage AI_BadMove checks to AI_CalcDamage (#4238)
* Move a couple damage AI_BadMove checks to AI_CalcDamage

* re-add effectivness score decrease

* reduce score for bad move in ai_checkviability

* review changes
2024-03-04 09:54:04 +01:00
Eduardo Quezada
d811614f60 Merge branch '_RHH/master' into _RHH/upcoming 2024-03-02 11:04:48 -03:00
Nephrite
e9b2f33084 Fixed Tangling Hair + Mirror Armor interaction 2024-02-27 13:38:38 +09:00
Nephrite
b1f0fbdf89 Merge remote-tracking branch 'rhh/upcoming' into battlemove_refactored 2024-02-27 13:03:26 +09:00
Eduardo Quezada D'Ottone
9e0ae222c3
Fixed Tri Attack status ability immunity test (#4229)
* Fixed Tri Attack test incorrectly having abilities that don't prevent Paralysis

* Fixed Dauntless Shield test names
2024-02-26 18:33:06 +01:00
Nephrite
170070baef
Apply suggestions from code review
Co-authored-by: Eduardo Quezada D'Ottone <eduardo602002@gmail.com>
2024-02-26 23:59:15 +09:00
Eduardo Quezada
38e7de211f Merge branch '_RHH/master' into _RHH/upcoming 2024-02-26 11:52:55 -03:00
Nephrite
b0d36b22ba Fixed test 2024-02-26 15:12:34 +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
Alex
750eb40a75
Fixes Tangling Hair, Rocky Helmet interaction (#4219) 2024-02-21 23:55:38 +01: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
Alex
7694628296
Adds Powerful status move flag (#4125)
* Adds Powerful status move flag

* fix flag

* fixed final issues

* review changes
2024-02-18 15:05:08 +01:00
Alex
7ab23cf426
Sets neutral nature and ability 0 as default in trainer control (#4172)
* Sets neutral nature and ability 0 as default in trainer control

* add config to generate a random ability

* minor correction

* move config to battle.h

* fixed compiling
2024-02-18 15:02:58 +01:00
Eduardo Quezada
ebe13ffc3c Merge branch '_RHH/master' into _RHH/upcoming 2024-02-16 11:30:01 -03:00
Nephrite
b665e7245b Merge remote-tracking branch 'rhh/upcoming' into battlemove_refactored 2024-02-12 16:15:53 +09:00
Nephrite
3695f0317b Reordered everything in moves_info.h to be in struct order 2024-02-12 16:13:15 +09:00
Alex
3598a18703
Adds config for Soundproof change during Uproar status (#4174) 2024-02-11 10:40:30 +01:00
Eduardo Quezada
1720e1b129 Merge branch '_RHH/master' into _RHH/upcoming
# Conflicts:
#	data/battle_scripts_2.s
#	src/data/pokemon/species_info/gen_9.h
2024-02-10 17:53:32 -03:00
Alex
97e4aa514a
Reverted Intrepid Sword and Dauntless Shield field unification (#4171)
* Reverts back Intrepid Sword and Dauntless Shield field unification

* fixes
2024-02-10 16:15:21 -03:00
Alex
b7d77099b5
Fixes Opportunist accumulating stat changes (#4168)
* Fixes Opportunist accumulating stat changes

* move memset to TurnValuesCleanUp

* Update test/battle/ability/opportunist.c

---------

Co-authored-by: Bassoonian <iasperbassoonian@gmail.com>
2024-02-10 18:18:29 +01:00
Martin Griffin
311d732359
Save-compatible SaveBlock3 (#4112)
* SaveBlock3 in sector footers

* Update load_save.c

Since mgriffin is currently not available I took the liberty to edit the file. Hope it's fine.

* SaveBlock3 in debug menu (#3)

---------

Co-authored-by: DizzyEggg <jajkodizzy@wp.pl>
Co-authored-by: Alex <93446519+AlexOn1ine@users.noreply.github.com>
Co-authored-by: psf <77138753+pkmnsnfrn@users.noreply.github.com>
2024-02-10 18:14:36 +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
Eduardo Quezada
67f1772f1e Merge branch '_RHH/master' into _RHH/upcoming
# Conflicts:
#	src/battle_util.c
#	test/battle/item_effect/heal_and_cure_status.c
2024-02-09 17:02:56 -03:00
Hungry Pickle
47abc33c84
Fixes Stench ability triggering on non-damaging attacks (#4159)
* Fixes Stench ability triggering on non-damaging attacks

* adds stench ability test

* added stench ability test for partner pokemon

---------

Co-authored-by: HungryPickle <beardybirdy@gmail.com>
2024-02-09 15:35:40 +01:00
Nephrite
436ef7e59a Tweaks + RETURN_MOVE_HAS_MOVE_EFFECT_WITH macro
Macro makes it easier to build functions that check a move's move effects
2024-02-09 23:01:27 +09:00
Nephrite
ce4dd729f4 Merged from upcoming 2024-02-09 23:00:36 +09:00
Alex
e89f8e00ed
Fixes Hit Escape moves interaction with hold effects and switch in ab… (#4091)
* Fixes Hit Escape moves interaction with hold effects and switch in abilities

* leftover

* fix spelling

* fix desc.
2024-02-09 14:00:42 +01:00
DizzyEggg
31ac151e29
Fix Full Restore / Antidote not reseting Toxic Counter (#4135)
* Fix Full Restore / Antidote not reseting Toxic Counter

* Update battle_scripts_2.s

---------

Co-authored-by: Bassoonian <iasperbassoonian@gmail.com>
2024-02-09 13:58:16 +01:00
Eduardo Quezada
ec803054e6 Merge branch '_RHH/master' into _RHH/upcoming
# Conflicts:
#	src/battle_main.c
#	src/battle_util.c
#	test/battle/hold_effect/kee_berry.c
2024-02-08 12:19:51 -03:00
LOuroboros
916e4814bd
Implemented Custom/Complex/Expanded GiveMon scripting command (#3924)
* Introducing an expanded givemon

* Added debug features to check a Pokémon's EV and IV

* Added a parameter to set a custom mon's gender

* Added a debug feature to clear the party

* Defined the EV/IV getters in gSpecials

* Added Gigantamax Factor toggle to givecustommon

* Updated Gigantamax Factor label in givecustommon macro

* Added tera type parameter to givecustommon

Misc. changes:
-Added a few harmless comments to CreateCustomMon for consistency reasons.

* Cleaned up the code inside CreateCustomMon a bit

Also updated the values assigned to the parameters of ScriptGiveCustomMon
This is temporary though. I'll probably end up turning them into 2byte parameters so they can be filled when the scripting command is called by using variables once I solve the bigger problem that the scripting command is currently facing.

* Foolproofed the Poké Ball check in CreateCustomMon

* Assigned a default gender to givecustommon
This solved the nasty issue by which the command wasn't working properly if you didn't fill in each parameter when calling givecustommon in a script.

* Reinforced the gender checks at CreateCustomMon

* Re-reinforced the gender checks at CreateCustomMon

* Compressed givecustommon and added tests

-Made givecustommon skip unspecified parameters.
-Added scripting variables support for every parameter.
-Added tests.

* Updated the default values of some ScriptGiveCustomMon parameters

* Replaced vanilla's givemon with givecustommon

Misc. Changes:
-Renamed CreateCustomMon to ScriptGiveMonParameterized.
 -The truth is that the function was never limited to creating the skeleton of a Pokémon like the actual CreateMon functions do, so that label was never correct. The function was always an expanded ScriptGiveMon.
-Moved the core functions to src/script_pokemon_util.c which is where they actually belong.
-Updated ScriptGiveMonParameterized a little to incorporateb changes that were applied to the original ScriptGiveMon, namely, Synchronize ability and form change handling.
-Introduced a new ScriptGiveMon to replace the original one.

* Corrected givecustommon tests

* Fixed the default IV values for the new givemon

* Updated DebugAction_Party_ClearParty for consistency with the other debug functions

* Updated the text strings used by the Check EV/IV debug features

---------

Co-authored-by: Martin Griffin <martinrgriffin@gmail.com>
Co-authored-by: Alex <93446519+AlexOn1ine@users.noreply.github.com>
2024-02-08 09:11:13 +01:00
Alex
452432533a
Kee berry (#4149)
* Fixes Kee Berry

* new line

* Fix fix

---------

Co-authored-by: Bassoonian <iasperbassoonian@gmail.com>
2024-02-07 15:42:22 +01:00
ZnogyroP
5d2dfe218e
Fixes to strings + Hospitality (#4147)
* Fixes to strings + Hospitality

* Requested changes

---------

Co-authored-by: Alex <93446519+AlexOn1ine@users.noreply.github.com>
2024-02-07 01:18:35 +01:00
Alex
fa5f507b1e
Fixes Mycelium Might speed bracker (#4146)
Co-authored-by: Bassoonian <iasperbassoonian@gmail.com>
2024-02-06 23:30:57 +01:00
Nephrite
f7ec44c2ea
Fixed Shield Dust, added tests (#4137)
* Fixed Shield Dust, added tests

Also fixed a duplicate macro caused by near-simultaneous PR merges (oops)

* Added KNOWN_FAILING Sparkling Aria test

---------

Co-authored-by: Alex <93446519+AlexOn1ine@users.noreply.github.com>
2024-02-06 09:19: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
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
Alex
a193b795c7
fix omniscient flag (#4114)
* rebase to upcoming

* merge rhh/upcoming and remove known failing

* remove known failing

---------

Co-authored-by: ghoulslash <41651341+ghoulslash@users.noreply.github.com>
2024-02-02 08:49:36 -07:00
Eduardo Quezada
09d12fb154 Merge branch '_RHH/master' into _RHH/upcoming
# Conflicts:
#	ld_script_modern.ld
#	src/battle_ai_switch_items.c
2024-02-01 12:52:31 -03: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
Nephrite
8a8d181654 AdditionalEffects storage tweak
Uses some macro and bitwise trickery to store additional effects and the count thereof in a single word
2024-02-01 15:19:10 +09:00