Commit graph

795 commits

Author SHA1 Message Date
Eduardo Quezada
831b394ca1 Merge branch '_pret/master' into _RHH/pr/master/pretSync20240909
# Conflicts:
#	Makefile
#	include/battle.h
#	include/battle_main.h
#	include/battle_util.h
#	include/data.h
#	make_tools.mk
#	map_data_rules.mk
#	src/battle_setup.c
#	src/fieldmap.c
2024-09-11 15:26:14 -03:00
Alex
98dbf3a575
Fixes Charged up status (#5274)
Charge changed to last until the damage boost is consumed instead of next turn, previous behavior accessible with `B_CHARGE`
2024-08-27 20:01:51 +02:00
hedara90
51a127fcb5
Better implementation of the obedience fix (#5245)
Co-authored-by: Hedara <hedara90@gmail.com>
2024-08-25 11:20:26 +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
Bassoonian
c1ee43254e Clean up defines lacking spaces 2024-08-15 19:34:56 +02:00
hedara90
45f10d734f
Fixed Ice Face, implemented tests (#5171)
* Fixed Ice Face, implemented tests

* Fixed agbcc and bad battle mon looping

* Fixed the ShouldChangeFormInWeather function again

* Cleaned up End of Turn weather form changes, simplified Ice Face

---------

Co-authored-by: Hedara <hedara90@gmail.com>
2024-08-15 13:51:39 +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
psf
b8dab587ab
Update include/battle.h
Co-authored-by: Bassoonian <iasperbassoonian@gmail.com>
2024-08-07 14:32:36 -07:00
pkmnsnfrn
5fbe5a331c Updated spacing per https://github.com/rh-hideout/pokeemerald-expansion/pull/5114\#discussion_r1707607637 2024-08-07 13:33:35 -07:00
pkmnsnfrn
5635f94036 More changes from typeX to types[X] 2024-08-07 11:35:45 -07:00
Bassoonian
cb4e687917 Merge branch 'master' of https://github.com/pret/pokeemerald into pretmergeforpsf 2024-08-07 19:05:46 +02:00
psf
312749dd31
Changed type1 and type2 to be consistent (#2021)
* Changed type1 and type2 in gBattleMons to match gSpeciesInfo
* Changed monType1 and monType2 to monTypes to match gSpeciesInfo
2024-08-07 06:44:03 +01:00
Martin Griffin
9d97537ee2
Fix speed ties (#4780)
* Fix speed ties

* fixup! Fix speed ties

* fixup! Fix speed ties

* fixup! fixup! Fix speed ties

* fixup! Fix speed ties

* Workaround for Comatose-Ditto interaction
2024-08-03 17:29:47 +02:00
Eduardo Quezada
b4eca0a6ec Merge branch '_RHH/master' into _RHH/upcoming
# Conflicts:
#	data/battle_anim_scripts.s
#	src/battle_util.c
2024-07-29 09:36:16 -04:00
hedara90
a89820fa96
Fixed Hidden Power damage category for PSS < GEN_4 (#5053)
* Fixed Hidden Power damage category for PSS < GEN_4

* Fixed category display regression

* Wrapped GET_MOVE_TYPE

---------

Co-authored-by: Hedara <hedara90@gmail.com>
2024-07-29 13:45:14 +02:00
Eduardo Quezada
98eb4e5027 Merge branch '_RHH/master' into _RHH/upcoming
# Conflicts:
#	asm/macros/battle_script.inc
#	include/constants/battle_string_ids.h
#	src/battle_ai_switch_items.c
#	src/battle_main.c
#	src/battle_script_commands.c
#	src/battle_util.c
#	src/frontier_util.c
#	test/battle/ai/ai.c
2024-07-19 09:20:05 -04:00
Alex
552e2768da
Fixes to Opportunist and Mirror Herb adjustments (#4928)
* Replace Opportunist todo tests with proper tests

* add failing test

* desc

* Fixes to Opportunist and Mirror Herb adjustments

* more tests

* some fixes

* first turn events switch

* simple enum + revert test desc
2024-07-19 11:01:46 +02:00
Eduardo Quezada
2b40e79ac3 Merge branch '_RHH/master' into _RHH/upcoming
# Conflicts:
#	include/battle_util.h
#	src/battle_ai_main.c
2024-07-14 22:44:00 -04:00
Alex
7b6ff1b560
Fixes Trace turn order (#4941)
* Fixes Trace turn order

* Update battle_script_commands.c

* Update test/battle/ability/trace.c

---------

Co-authored-by: Bassoonian <iasperbassoonian@gmail.com>
2024-07-10 22:29:26 +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
DizzyEggg
f2e8482488
Fix how switch-in effects are played out after multiple faints in the same turn (#4864)
* Multiple switch-ins after fainting

* empty new lines

* Fix failing tests
2024-06-24 20:37:47 +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
DizzyEggg
b9d1438162
move 3 btl ctrl player vars to gBattleStruct (#4840) 2024-06-20 17:42:52 +02:00
kittenchilly
74f53a7e18
Fix caught wild pokemon not restoring their used held item (#4803)
* Fix caught wild pokemon not restoring their used held item

* Actually we can use the same struct
2024-06-18 20:31:03 +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
sneed
821d5dccab
AI calculates/stores minimum possible move damage and uses it with AI_FLAG_TRY_TO_FAINT (#4760)
* AI uses safest option to faint foes

* dont calculate non crit dmg unless it's needed

* struct SimulatedDamage

* add GetDamageByRollType and name DamageRollType

* Parametrize test AI flags

* use simDamage member's instead of dmg & minDmg
2024-06-11 18:28:16 +02:00
Eduardo Quezada
64f82cdd5f Merge branch '_RHH/master' into _RHH/upcoming
# Conflicts:
#	src/battle_ai_util.c
#	src/battle_util.c
2024-06-11 08:12:03 -04:00
Alex
d83f90d51f
Tera Shell AI calcs (#4742)
* Tera Shell AI calcs

* agbcc
2024-06-08 20:56:20 +02:00
Bassoonian
d6422da284
Fix partner palette problem (#4736) 2024-06-07 21:05:16 +02:00
Bassoonian
52d45674f0
Move Descriptions in battle (#4152)
* Port xaman move desc to modern expansion

* Fix modern compiler error

* Fix compliling + EFFECT_PLACEHOLDER support

* Change to L-button to avoid conflict with Mega Evolution

* Reorder and change priority to category

* add sprite for move category icon, declare category icon sprite data extern

* remove static category icon sprite data from hgss dex for global data

* Change to else if

---------

Co-authored-by: Pawkkie <moog272@gmail.com>
Co-authored-by: RavePossum <ravepossum@proton.me>
2024-05-31 12:10:03 +02:00
ghoulslash
7b1248b167
add savedBattlerAttacker and stack for saved target/attacker (#4061)
* add saveattacker/savetarget stack

* add safety checks to savedAttackerCount/savedTargetCount

* add testing warnings for saveattacker/savetarget

* update frisk with saveattacker

* restoretarget at end of red card battle scripts, remove testing checks on SaveAttacker,SaveTarget

---------

Co-authored-by: ghoulslash <pokevoyager0@gmail.com>
2024-05-29 21:50:24 +02:00
ghoulslash
9c6dfb7c0c
Move RestoreBattlerData out of Ai_CalcDmg and add SaveBattlerData Protections (#4156)
* move restorebattlerdata out of Ai_CalcDmg

* fix SetBattlerdata calls

* add saved field to struct AI_SavedBattleMon to prevent overwriting saved mon info

* AI_CalcPartyMonDamage set opposing battler known data

---------

Co-authored-by: ghoulslash <pokevoyager0@gmail.com>
2024-05-15 20:39:03 +02:00
Eduardo Quezada
0c74fd31c3 Merge branch '_RHH/master' into _RHH/upcoming 2024-05-02 14:24:17 -04:00
Alex
6d397f9867
Fixes Magic Bounce in double battles (#4464)
* Fixes Magic Bounce in double battles

* Add Double Battle check
2024-05-02 14:23:46 +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
Alex
49c86f86c8
Adds Ability Poison Puppeteer (#4416)
* Adds Ability Poison Puppeteer

* nothing happened

* parametrize poison powder and toxic

* leftover
2024-04-20 22:23:20 +02: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
Alex
62d054e135
Future Sight fixes (#4350)
* Future Sight fixes

* handle life orb boost

* applied review

* Future Sight changes

* removed future sight no hit string

* agbcc

* Update battle_scripts.h
2024-04-11 10:23:16 +02:00
Nephrite
93af96c10c
Replaces VARARG_8 uses with recursive macros (#4232) 2024-04-05 18:42:11 +01: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
68e5c9f8cb Merge branch '_RHH/master' into _RHH/upcoming
# Conflicts:
#	include/battle.h
#	src/pokedex.c
2024-03-14 11:41:27 -03:00
ghoulslash
0dabcfc966
fix repeated quick claw/quick draw checks (#4266)
* fix repeated quick claw/quick draw checks

* fix field names

---------

Co-authored-by: ghoulslash <pokevoyager0@gmail.com>
2024-03-10 22:49:00 +01:00
DizzyEggg
a36cfb1093
unify monSpritesGfx sprites/ptr and fix various compiler errors on o3/os/og (#4252) 2024-03-06 22:26:33 +01:00
DizzyEggg
650f80d57e
remove some unused data (#4239) 2024-03-04 17:36:23 +01:00
Nephrite
46b67355a5 Merge remote-tracking branch 'rhh/upcoming' into battlemove_refactored 2024-02-26 14:23:53 +09:00
Nephrite
9db03fb263 Removed GET_MOVE_EFFECT 2024-02-25 18:22:21 +09: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
1ac9934742 Reverted forcePressure flag move 2024-02-13 12:19:27 +09:00