Pawkkie
e4d9298200
Fix move comparison scoring ( #7301 )
2025-07-10 09:51:46 +02:00
AlexOn1ine
b90fdd1b3c
Master to upcoming merge
2025-05-26 10:41:11 +02:00
Alex
f9400332fc
Fixes AI repeated use of weather set up moves ( #6963 )
2025-05-22 16:50:13 -04:00
Alex
f1c1906324
Fix misleading name ( #6865 )
2025-05-17 16:23:30 +02:00
Eduardo Quezada
edf7c67775
Remove non-volatile status EFFECTs ( #6772 )
2025-05-16 22:52:51 +02:00
Alex
73e65b76c4
Consolidated HasMoveFlagX functions ( #6874 )
2025-05-16 20:50:45 +02:00
surskitty
e44d0326be
AI double battle friendly fire logic improvements ( #6766 )
2025-05-16 11:41:03 -04:00
Eduardo Quezada
3056909286
Added weather accuracy move flags ( #6857 )
2025-05-16 07:58:40 +02:00
AlexOn1ine
243c43e6a4
Add prediction function
2025-05-15 08:10:19 +02:00
Pawkkie
b48d0c387d
Throw out unnecessary functions
2025-05-08 14:49:49 -04:00
Pawkkie
1a2cd5645a
Fix roll handling in AI party damage calcs ( #6733 )
2025-05-01 10:15:19 +02:00
Alex
4ff2f3de42
Centralizes non volatile status effect checks ( #6533 )
...
Co-authored-by: PhallenTree <168426989+PhallenTree@users.noreply.github.com>
2025-04-30 11:34:19 -04:00
Bassoonian
cca969b04d
Adds move effect type checking ( #6618 )
2025-04-16 00:08:57 +02:00
Bassoonian
512368fd03
Add type checking for hold item effects ( #6619 )
2025-04-15 23:33:00 +02:00
Bassoonian
d62205f2fc
Converts some defines to enums ( #6592 )
2025-04-13 13:39:20 +02:00
Pawkkie
54928726cb
AI smarter status handling ( #6550 )
2025-04-08 17:47:45 +02:00
Pawkkie
9cb96235f9
Add basic Unaware check bad move scoring ( #6524 )
2025-04-02 18:18:33 -04:00
Alex
c707df358e
Clean up AI code duplication and unify checks ( #6348 )
2025-03-20 22:50:01 +01:00
Alex
98a5fab898
Optimization / Clean up of AI move usability ( #6332 )
2025-03-18 23:42:07 -04:00
Alex
6031bb2a78
Split ai function IsBattlerTrapped ( #6438 )
2025-03-18 12:00:11 -04:00
Pawkkie
b12f32667f
Fix roll handling in AI damage calcs ( #6396 )
...
Co-authored-by: Alex <93446519+AlexOn1ine@users.noreply.github.com>
2025-03-08 09:53:14 +01:00
Hedara
06d31bc8ea
Merge branch 'master' into final-1.10-master-upcoming-merge
2025-02-26 22:07:10 +01:00
Pawkkie
b109c4c36b
Fix Substitute / Shed Tail Switch AI ( #6334 )
2025-02-25 13:06:39 +01:00
Pawkkie
48fc44df31
Fix AI hold effect considerations ( #6310 )
2025-02-21 18:11:47 +01:00
Pawkkie
bf263efa4b
Fix AI hazard move handling, minor AI tweaks ( #6311 )
2025-02-21 09:58:14 +01:00
Alex
32eb5dfba5
Remove global sBattler_AI ( #6128 )
2025-01-29 19:58:16 +01:00
Eduardo Quezada
927bb8f833
Fixed AI not handling type effectiveness beyond x8 ( #6127 )
2025-01-28 19:16:10 +01:00
Pawkkie
ea4434db2a
Switch trapping AI will consider Trace ( #6059 )
2025-01-22 00:07:15 +01:00
Pawkkie
7d39dd4aae
Add AI_FLAG_PREDICT_INCOMING_MON: AI will score against predicted switchin if predicting switch ( #6037 )
2025-01-20 20:54:38 +01:00
Pawkkie
465d30fbd0
Add AI_FLAG_PREDICT_SWITCH ( #6028 )
2025-01-16 21:43:16 +01:00
Eduardo Quezada
0fefb444de
Multiple removals of hardcoded move IDs ( #5964 )
2025-01-10 17:07:32 -05:00
Alex
8edf14423a
Refactors argument into a union ( #5853 )
...
Co-authored-by: Eduardo Quezada <eduardo602002@gmail.com>
2024-12-23 15:51:35 -03:00
Alex
a2aba3f86a
Changes target TURN_DAMAGED and MAX_HP to inlines ( #5822 )
2024-12-17 17:21:12 -05: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
Alex
35a22d6e82
Follow up for #5570 ( #5625 )
2024-10-31 10:58:00 +01:00
Alex
d5f8e9cc0e
Combines CalculateMoveDamage arguments into a struct ( #5570 )
2024-10-31 07:59:28 +01:00
ghoulslash
9dbcd18251
Unify GetBattlerAbility/TerrainAffected to remove duplicate ai function ( #5497 )
2024-10-10 10:42:09 -04:00
Bassoonian
d0379b9b55
Turn item hold effects into an enum ( #5498 )
...
* Turn item hold effects into an enum
* Rename to ItemHoldEffect
2024-10-10 14:23:59 +02:00
Pawkkie
2afc7f6138
ShouldPivot type cleanup ( #5441 )
...
* Cleanup ShouldPivot type
* PIVOT to SHOULD_PIVOT
2024-10-10 12:54:35 +02:00
AlexOn1ine
d0a97970ba
Unify GetBattlerAbility/TerrainAffected to remove duplicate ai function
2024-10-10 09:55:25 +02: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
Pawkkie
047289a639
Improve AI's Skill Swap handling in double battles ( #5360 )
...
* Improve AI contrary
* Update src/battle_ai_util.c
Co-authored-by: Alex <93446519+AlexOn1ine@users.noreply.github.com>
* Fix additionalEffects loop
* moves[i] to aiMove
* Update src/battle_ai_util.c
Co-authored-by: Alex <93446519+AlexOn1ine@users.noreply.github.com>
---------
Co-authored-by: Alex <93446519+AlexOn1ine@users.noreply.github.com>
2024-09-11 00:00:29 +02:00
Alex
3cfc0004b6
Removes redundant moveTargetType ai function ( #5354 )
...
* Removes redundant moveTargetType ai function
* Beautify GetBattlerMoveTargetType for better readability
2024-09-09 11:30:39 -04:00
SarnPoke
622dead80c
Shed Tail Retarget ( #5275 )
...
Re-targets Shed Tail PR to upcoming
2024-08-28 13:40:35 +02:00
Alex
b21ffa1f9b
Changes score adjustments to tempScore increases ( #4987 )
2024-07-17 23:36:15 +02:00
Pawkkie
c721f1b04a
Smarter Focus Punch and Substitute ( #4952 )
...
* Smarter Focus Punch
* Smarter Substitute, review feedback
* Use HasAnyKnownMove instead of isFirstTurn
* When are we removing agbcc again
* Use HasMoveEffect
2024-07-14 08:29:27 +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
Alex
594633aa15
Remove Duplicate ai code from battle_ai_util.c ( #4883 )
...
* Remove Duplicate ai code from battle_ai_util.c
* Add GetBattlerAbility in toxic self check
2024-07-03 10:48:31 +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
Alex
4eda5f61af
Use 9th roll instead of average in AI calcs ( #4679 )
...
* Use 9th roll instead of average in AI calcs
* damage_roll
* duke suggestion
2024-06-02 15:36:12 +02:00