Commit graph

833 commits

Author SHA1 Message Date
Bassoonian
5cc0b35d81
Replace power checks with IS_MOVE_STATUS (#5820)
Co-authored-by: Eduardo Quezada <eduardo602002@gmail.com>
2024-12-20 08:20:46 -03:00
Eduardo Quezada
720938f040 Fix conflicts 2024-12-01 14:28:26 -03:00
Eduardo Quezada
7010080465 Merge branch '_RHH/upcoming' into _RHH/pr/master/1.10.0 2024-12-01 14:28:12 -03:00
Alex
0ca588943b
Fixes choiced moves not locked in after ability block (#5738) 2024-12-01 13:45:35 +01:00
Alex
88cdd8bdfb
Fixes Kee Maranga and Enigma Berry (#5727) 2024-11-28 11:22:32 +01:00
hedara90
3481340da8
Critical Hit documentation and distorted match up struct switch (#5665) 2024-11-13 22:30:27 +01:00
PhallenTree
0919fbdc2d
Fix Order Up + Tera Stellar breaking each other with Commander (#5667) 2024-11-13 11:45:08 +01:00
AlexOn1ine
4dc784bd2d fix conflict 2024-11-12 23:30:49 +01:00
AlexOn1ine
3204454853 Critical Hit documentation and distorted match up struct switch 2024-11-12 23:27:53 +01:00
Alex
a8351e305c
Fixes Red Card / Eject Pack interaction with Emergency Exit (#5657)
Co-authored-by: Pawkkie <61265402+Pawkkie@users.noreply.github.com>
2024-11-11 14:56:51 -05:00
Eduardo Quezada
b48e5770be Merge branch '_RHH/master' into _RHH/upcoming 2024-11-11 15:58:42 -03:00
Alex
0b66f52ead
Minor BattleStruct clean up (#5585) 2024-10-28 16:35:31 +01:00
Pawkkie
7413d107ae
Should switch refactor to facilitate switch prediction (#5466)
Co-authored-by: Martin Griffin <martinrgriffin@gmail.com>
2024-10-25 13:04:42 +02:00
Eduardo Quezada
ee9c6d4912 Merge branch '_RHH/master' into _RHH/upcoming 2024-10-17 00:16:01 -03:00
Pawkkie
9882e0aea6
Refactor ShouldSwitchIfAllBadMoves (#5452)
* Refactor ShouldSwitchIfAllBadMoves

* Rest of bugfix

* Enable Shed Tail test

* Revert "Enable Shed Tail test"

This reverts commit e0b9a3affc.

* Better names for i, j

* Fix MAX_MON_MOVES that should be MAX_BATTLERS_COUNT

* battlerIndex  / moveIndex  fix

* Update src/battle_controller_player_partner.c

---------

Co-authored-by: Alex <93446519+AlexOn1ine@users.noreply.github.com>
2024-10-16 11:22:48 -04:00
Eduardo Quezada
9ed153ff93 Merge branch '_RHH/master' into _RHH/pr/master/pretSync20241015 2024-10-15 22:22:52 -03:00
Alex
1454644376
Removes duplicate code in AI functions (#5457)
* Make functions CanAbilityAbsorbMove and CanAbilityBlockMove

* clean up

* Replace ai code with CanAbilityBlockMove / CanAbilityAbsorbMove

* Adds CanPartnerAbilityBlockMove

* Use switches instead of if-blocks

* solve potential bug in singles with spread attacks

* fix test

* revert other fix

* flash fire does not increase a stat

* left a comment for a future test and addition

* remove more checks

* comment was incorrect. it only applies to storm drain and lightning rod

* revert ndebug

* revert minor change

* Update src/battle_util.c
2024-10-09 15:50:59 +02:00
Eduardo Quezada
a7fca616b0 Merge branch '_RHH/master' into _RHH/upcoming 2024-10-04 14:28:13 -03:00
wiz1989
6f59d26753
updated Conversion 2 mechanics to 5+ (#5453)
* updated Conversion 2 mechanics and added the toggle B_UPDATED_CONVERSION_2

* fixes and added new test cases

* bugfixing and added EWRAM u16 gLastUsedMoveType

* update after Pawkkie review

---------

Co-authored-by: wiz1989 <wiz1989@LAPTOP-8Q3TPMGC.localdomain>
2024-10-04 12:42:15 -04:00
Eduardo Quezada
0f8b2a1ba8 Merge branch '_RHH/master' into _RHH/pr/master/pretSync20240909 2024-10-04 10:23:58 -03:00
Alex
077bbd3442
Adds padding in AiLogicData (#5468)
* Adds padding in AiLogicData

* Update battle.h

* Update battle.h

* Update battle.h
2024-10-03 22:11:54 -04:00
Pawkkie
ded97e5296
Switch AI refactor + considers free switches (#5379)
* Switch AI considers free switches from pivot move

* Fix Baton Pass refactor

* Some cleanup and comments

* Mon fainting to hazards is a 0HKO

* Revert "Mon fainting to hazards is a 0HKO"

This reverts commit 446f738226.

* Cleanup speed check / Eject Pack

* Move eject trackers to AiLogicData

* Review feedback and WhoStrikesFirst changes

* This linebreak will bug me lol

* Also this comment, heck

* Last bit of comment cleanup
2024-10-01 23:10:02 +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
Pawkkie
5e027754c7
Add ShouldSwitch result to AiLogicData (#5440)
* Add ShouldSwitch to AiLogicData

* Convert shouldSwitch to bitfield

* Update include/battle.h

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

* Update include/battle.h

---------

Co-authored-by: Alex <93446519+AlexOn1ine@users.noreply.github.com>
2024-09-29 12:16:33 -04:00
Eduardo Quezada
5130ea9da3 Merge branch '_RHH/master' into _RHH/upcoming 2024-09-28 11:45:49 -03:00
PhallenTree
e67d5a23ed
Adds some Snatch interactions, fixes for Dragon Darts, Trace, Primal Reversion, Protosynthesis/Quark Drive (#5430)
* Fixes Electrified Dragon Darts sometimes targeting battlers with absorbing abilities (Volt Absorb, Motor Drive)

* Add Snatch interactions with Dancer, Swallow

* Trace fix + cleanup

* Simplify Quash

* Fixes multiple mons with Primal Reversion causing only one Primal Reversion, add tests

* Fix Booster Energy Ability Popup

* Accidentally removed healing from Swallow

* More Trace cleanup
2024-09-24 18:40:44 +02:00
Alex
25e9ca2ac6
Cleaned up a bit of code with GetBattlerPartyData (#5378)
* rename GetBattlerPartyData
2024-09-15 08:24:26 +02:00
Alex
0d7c193e4c
fixes Micle Berry not increasing accuracy on the next turn (#5358)
* fixes Micle Berry not increasing accuracy on the next turn

* adds bitfield instead of using protect struct

* test from pawkkie

* ndebug

* renaming

* delete redundant comment

* typo

* micle berry more detailed descriptions
2024-09-14 19:55:03 -04:00
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
Rachel
b478881fc6
Add in-battle shadows underneath all enemy battlers (#5178)
* Add data to SpeciesInfo entries for in-battle shadows

* Implement sized shadows in the sprite visualizer

* Implement sized shadows in game code

* Show shadows for the lead battler for opponents during their battle anim

* Feedback on shadows, round 1

* Revert removal of Goomy and Sliggoo shadows

* Fixed GEN_3 setting

* Code cleanup + remove pre-processor branches

* Fix bugs with gen-3 configuration branch

* Style corrections, final shadow coordinate adjustments

* Adjustments to Garbodor and Araquanid
2024-09-10 21:27:49 +02:00
Eduardo Quezada
aebbe448b8 Merge branch '_RHH/master' into _RHH/upcoming 2024-08-28 12:58:14 -04: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
tertu
17f68563eb
Remove support for the original LCG random number generator (#5078) 2024-08-24 10:07:00 -07:00
Eduardo Quezada
77148f83a6
DoBattleIntro state documentation (#5231)
* DoBattleIntro state documentation

* Removed unused state

* Update src/battle_main.c

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

* Fixed state jumps

* BattleStruct state uses enum

* Renamed state enums

---------

Co-authored-by: Alex <93446519+AlexOn1ine@users.noreply.github.com>
2024-08-21 15:57:28 +02:00
Eduardo Quezada
6ac18a6fe5 Merge branch '_RHH/master' into _RHH/upcoming 2024-08-20 08:00:05 -04:00
hedara90
e4c81ba6e0
Removed all instances of gBitTable[x] (#5123)
* Replaced all the gBitTable[X] usages with 1 << X, and cleaned up script output

* Fixed failed merge in online viewer

---------

Co-authored-by: Hedara <hedara90@gmail.com>
2024-08-17 10:28:09 -05: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
Eduardo Quezada
661ec0a9fd Merge branch '_RHH/master' into _RHH/upcoming 2024-08-14 17:10:20 -04: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
d1183f4b8a
Add B_SHOW_TYPES and cleaned up IsDoubleBattle (#5131)
* First attempt at a port

* Slightly broken but working

* Got images working and opponent palettes

* half finished compressed spritesheet approach instead

* fix the palettes (smh)

* fix hflip, and a lot of clean-up

* Add B_SHOW_TYPES

* Got Illusion working

* Add num type enum

* Updated function to get type

* Fixed type icon position and cleaned up functions

* Updated illusions and Tera handling

* Added BATTLE_TYPE_IS_SINGLE and DOUBLE

* Removed IS_BATTLE_TYPE_SINGLE

* Implemented BATTLE_TYPE_IS_DOUBLE across repo

* Removed SIDE macro

* Updated config

* Deprecated battler alive macro

* Reindented file

* Added exceptions for 2v1

* Replaced Fainted check with Null check

* Added functionality for only types of caught mons

* UseDoubleBattleCoords updated

* Added ShouldFlipTypeIcon

* Renamed TryLoadTypeIcon

* Refactored functions

* Refactored functions

* Refactored functions

* Refactored functions

* Renamed SEEN to CAUGHT

* Reset config

* Added useSecondPalette and isOrdinary to gTypesInfo

* Further simplified secondPalette and isOrdinary

* Changed isordinary to isSpecialCase

* Renamed to useSecondTypeIconPalette

* Fixed Stellar type interactions

* fixed spacing

* fixed include/config/battle.h

* fixed

* fixed include/config/general.h

* changed type1 and type2

* Moved IsDoubleBattle to include.battle.h
Removed BATTLE_TYPE_IS_DOUBLE
Removed IS_DOUBLE_BATTLE

* Changed IsBattlerFainted to IsBattlerAlive

* Removed IsBattlerNull

* Moved GetBattlerData to be inline

* Renamed GetMonDefensiveTeraType

* Removed IsIllusionActive

* Fixed identation

* found one last isDoubleBattle hold out

* fixed redundant brackets

* Fixed spacing for B_SHOW_TYPES

* Update src/battle_script_commands.c

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

* Fixed padding

* Reindent file and refactored GetTypeIconHideMovement

* Update include/data.h

---------

Co-authored-by: RavePossum <ravepossum@proton.me>
Co-authored-by: Frank <fdeblasio1004@gmail.com>
Co-authored-by: Alex <93446519+AlexOn1ine@users.noreply.github.com>
2024-08-11 17:55:51 +02:00
Eduardo Quezada
113f8de9b1 Merge branch '_RHH/master' into _RHH/upcoming
# Conflicts:
#	src/battle_controller_player.c
2024-08-08 13:22:49 -04: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
Alex
dbb9ee874b
Change GET_MOVE_TYPE to a function (#5090)
* Change GET_MOVE_TYPE to a function

* add in battle check to GetMoveType function, move it to battle_util.c

* Update src/battle_util.c

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

* Update src/battle_util.c

---------

Co-authored-by: Eduardo Quezada <eduardo602002@gmail.com>
2024-08-05 22:02:31 -04:00