ghoulslash
8f320a8d33
some ai updates, recycle + ripen logic
2021-11-08 11:37:41 -05:00
BuffelSaft
03cab2058a
Fix goof, make AI check PP in move limitations
...
Was skipping valid moves instead of invalid ones in CanAIFaintTarget. Also, remove all instances of ~MOVE_LIMITATION_PP from the AI as it seemed detrimental.
2021-11-08 23:57:16 +13:00
BuffelSaft
d3a845d511
Fix CanAIFaintTarget
...
Rename CanAIFaintTarget to CanIndexMoveFaintTarget and create a new function, CanAIFaintTarget, that checks if any known move can KO the target.
2021-11-08 20:37:28 +13:00
BuffelSaft
3a113e33b2
Uncomment AI Full Metal Body checks
...
This ability is Clear Body with a different name, so it should be working and doesn't need to be commented out.
2021-11-08 19:28:09 +13:00
ghoulslash
41bf1dc2f4
merge w be
2021-11-06 10:40:57 -04:00
Eduardo Quezada D'Ottone
5eb8f1c158
Merge pull request #1855 from ghoulslash/be/abilityonside
...
AI versions of CanPoisonType, CanBePoisoned and IsAbilityOnSide
2021-11-04 21:49:31 -03:00
ghoulslash
6b10801ee8
convert AI_IsabilityOnSide to bool
2021-11-04 10:43:33 -04:00
BuffelSaft
7d10097684
Replace IsTwoStrikesMove with FLAG_TWO_STRIKES
...
Note that this flag does nothing until the Parental Bond PR is merged - it's just for the AI until then.
2021-11-04 17:11:56 +13:00
BuffelSaft
a2574b55cc
Fix dynamic move damage calculation
...
Can't check effectiveness here without breaking the AI. After testing, it also appears that it doesn't need to be checked here after all.
2021-11-04 16:09:28 +13:00
BuffelSaft
4a7ddb737b
Merge branch 'battle_engine' of https://github.com/rh-hideout/pokeemerald-expansion into ai_improvements
2021-11-04 15:51:11 +13:00
ghoulslash
4466fbd930
ai version of CanPoisonType, CanBePoisoned and IsAbilityOnSide
2021-11-03 21:36:33 -04:00
BuffelSaft
8af882348a
Fix Parental Bond Super Fang
...
Min damage should be 2
2021-11-02 16:56:12 +13:00
ghoulslash
a2b8f3f169
replace gBattleMons[x].ability w GetBattlerAbility
2021-10-31 17:19:30 -04:00
BuffelSaft
52054e4bfe
Fix Corrosion, Poison Touch
...
- CanBePoisoned now calls CanPoisonType instead of overriding it. Poison Touch now activates only if the attacker actually damaged the target. Partially implemented Pastel Veil.
2021-10-30 21:12:18 +13:00
BuffelSaft
4faa077641
Triple Kick, Super Fang tweaks
...
Ignore accuracy for Triple Kick and assume all hits will connect. Super Fang always does at least 1 damage, so this should be accounted for.
2021-10-26 13:41:08 +13:00
BuffelSaft
4310868bee
AI handles multi-strike and fixed dmg moves
...
Does not account for Parental Bond or Beat Up yet as those require some functions from #1676 .
2021-10-24 18:49:17 +13:00
BuffelSaft
bbe2eccf62
Fix typo
...
CanBeParayzed to CanBeParalyzed
2021-10-24 17:57:06 +13:00
BuffelSaft
d64dc2bbe8
Sleep moves don't check target's type
...
Dark types aren't immune to Hypnosis, Ghost types aren't immune to Yawn or Lovely Kiss, so this check isn't needed.
2021-10-24 17:55:37 +13:00
BuffelSaft
274e964d91
Fix Safety Googles
...
Fix typo and update gLastUsedItem before calling the safety goggles battle script.
2021-10-09 15:05:01 +13:00
ghoulslash
e75a8fb67c
merge ai move and item decisions. AI will prefer to defeat player over healing
2021-09-27 21:03:27 -04:00
sbird
303e31ae25
[ai] use expected value to simulate EFFECT_PSYWAVE
2021-09-22 18:05:58 +02:00
sbird
0ee13418dc
[ai] use expected value move dmg calculation
2021-09-22 13:15:43 +02:00
ghoulslash
aa475ab300
merge with be
2021-09-15 16:42:23 -04:00
ExpoSeed
0f99d9d4c6
Merge branch 'battle_engine' of https://github.com/rh-hideout/pokeemerald-expansion into BE/z-moves
2021-08-30 13:26:40 -05:00
ghoulslash
c7c0fbc296
merge with be, make AI CanBeStatused functions separate from general util ones
2021-08-12 13:37:53 -06:00
ultima-soul
02c9e040df
Merge branch 'master' of github.com:pret/pokeemerald into battle_engine_sync
2021-08-11 16:33:10 -07:00
ghoulslash
e6a2d2226f
Merge pull request #1540 from DizzyEggg/rage_powder
...
Rage powder updated to gen6
2021-07-24 07:15:58 -06:00
ghoulslash
59c16ff1cf
AI_IsTerrainAffected checks
2021-07-10 16:41:41 -06:00
ExpoSeed
c8fc141287
Merge branch 'battle_engine' of https://github.com/rh-hideout/pokeemerald-expansion into BE/z-moves
2021-06-10 11:54:20 -05:00
BuffelSaft
e6a8faec1e
Fix thawing moves
...
Replace IsThawingMove with a move flag and add a check for it to CANCELLER_FROZEN. This makes thawing moves actually thaw the user.
2021-06-10 23:48:18 +12:00
DizzyEggg
f27dcab784
Rage powder has powder moves qualities when forcing a target
2021-06-10 12:55:05 +02:00
ExpoSeed
8810809849
Missed one rename!
2021-06-04 19:39:03 -05:00
ghoulslash
c356ffaed4
merge with be. fix null ptr check in GetBattleMoveSplit
2021-05-24 10:46:53 -06:00
Evan
d65d5cb8fd
add AI_FLAG_SMART_SWITCHING, some burn checks
2021-02-14 09:37:04 -07:00
Evan
49e41a2d3b
fix ShouldSetScreen (thx Syreldar)
2021-02-14 09:11:29 -07:00
Evan
0664daf384
fix some post-merge errors
2021-02-12 11:02:10 -07:00
Evan
4782f713f2
update semi invulnerable state check
2021-02-12 08:57:57 -07:00
Evan
1405f04e1e
ai understands constant-damage effects
2021-02-07 12:39:23 -07:00
Evan
c003f1c023
check move effectiveness with status effects
2021-01-26 15:41:59 -07:00
Evan
6b59a9ac01
add ai info debug option
2021-01-19 12:58:58 -07:00
Evan
24b19eb9a4
fix AI_WeatherHasEffect
2021-01-15 21:29:39 -07:00
Evan
44a124acb7
fix CanBeParayzed
2021-01-15 09:23:23 -07:00
Evan
09dc1b7e89
fix double battle ai logic
2021-01-13 11:08:43 -07:00
Evan
47bf5b2840
a few tweaks
2021-01-12 22:45:02 -07:00
Evan
6a3266a265
fix syntax err
2021-01-10 09:02:06 -07:00
Evan
bb540b6236
fix AI_WeatherHasEffect to handle unknown abilities
2021-01-10 08:58:41 -07:00
Evan
81c56a224a
fix bad ai util func
2021-01-04 20:23:09 -07:00
Evan
f21b0140b9
revert to CheckViability and stat change effect viabilities
2021-01-04 19:39:59 -07:00
Evan
1ae57f26a3
fix up some negative checks, organize some effects in AI_CheckBadMove
2021-01-04 15:30:02 -07:00
Evan
19b1d4bfa2
speed stat increases based on current stat stage
2020-12-20 15:15:33 -07:00