857 Commits

Author SHA1 Message Date
Alex
27c8ec07c2
Documentation for DisableStruct (#6066) 2025-01-20 16:41:42 -05:00
Pawkkie
465d30fbd0
Add AI_FLAG_PREDICT_SWITCH (#6028) 2025-01-16 21:43:16 +01:00
Alex
ddef67bbb1
Future Sight Innards Out follow up for upcoming (#5998) 2025-01-12 00:25:50 +01:00
Alex
8f34c76395
Removes Resource Flags and moves fields to DisableStruct (#5945) 2025-01-11 09:39:10 -03:00
Eduardo Quezada
8821779815 Merge branch '_RHH/master' into _RHH/upcoming 2025-01-11 08:07:15 -03:00
Alex
6e5f40d506
Introduces BattlerState struct for the Battle Engine (#5954) 2025-01-11 07:12:22 -03:00
Alex
75a2d419e1
Follo up for Innards Out / Future Sight interaction (#5967) 2025-01-10 16:59:37 +01:00
Alex
5391b451ae
Shell Bell Clean up / Simplification and Tests (#5924) 2025-01-07 21:50:23 +01:00
PhallenTree
c10287b4c1
Fixes various Dynamax HP conversions/calculations (#5933) 2025-01-07 20:08:31 +01:00
wiz1989
04da838d88 Innards Out and Future Sight interaction 2025-01-07 14:00:09 +01:00
ghoulslash
401df8da4d
move overwrittenAbilities field to DisableStruct (#5946)
Co-authored-by: ghoulslash <pokevoyager0@gmail.com>
2025-01-03 18:17:23 +01:00
Alex
ec1876b826
Remove EWRAM gHpDealt (not needed anymore) (#5925) 2025-01-02 23:37:58 +01:00
Eduardo Quezada
9669a0554d
Encapsulate move data (#5852) 2025-01-01 20:34:33 +01:00
Eduardo Quezada
53aebc34dd Merge branch '_RHH/master' into _RHH/upcoming 2024-12-20 20:48:13 -03:00
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
Alex
a2aba3f86a
Changes target TURN_DAMAGED and MAX_HP to inlines (#5822) 2024-12-17 17:21:12 -05:00
PhallenTree
775ea3b564
Pursuit refactor (#5707) 2024-12-06 19:14:46 +01:00
Eduardo Quezada
68b5b63ecb Merge branch '_RHH/upcoming' into _RHH/pr/upcoming/hp_reduction 2024-12-04 12:04:47 -03:00
Eduardo Quezada
e4f8b4ccf0 Addressed review changes (minus encapsulation) 2024-12-04 11:31:28 -03:00
Martin Griffin
993663d9b0
Variadic IS_BATTLER_OF_TYPE and GetBattlerTypes (#5708) 2024-12-03 13:12:54 +01:00
AlexOn1ine
8acb31339d rename critChance and moveDamage 2024-12-02 19:57:45 +01:00
AlexOn1ine
d95dbadccc merge rhh/upcoming 2024-12-02 19:00:55 +01:00
AlexOn1ine
aa61f24e81 clean up 2024-12-02 18:25:24 +01:00
Pawkkie
2b7905beb1
Add B_FLAG_SLEEP_CLAUSE (#5566)
Co-authored-by: Isaac Rivera <isaacrivera2020@u.northwestern.edu>
Co-authored-by: iriv24 <40581123+iriv24@users.noreply.github.com>
Co-authored-by: Hedara <hedara90@gmail.com>
2024-12-02 09:06:03 +01: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
AlexOn1ine
97b30cb712 simultaneous hp reduction 2024-11-23 08:35:01 +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 e0b9a3affcf3c465c8743741e5ca61bde6c8cb18.

* 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 446f73822651af55ee1a36aeb61f3f0c9317d244.

* 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