Commit graph

101 commits

Author SHA1 Message Date
Ct11217
a4b53126f6 Added AI_FLAG_ACE_POKEMON
When this flag is set, the trainer will have an "Ace" pokemon that will
always be sent out last.
If this flag is set, the last Pokemon in the party will be considered the
"Ace" Pokemon.

This is similar to the gym leader functionality found in Sword & Shield.
2022-08-17 18:23:12 -06:00
Ct11217
bb978764f3 Fixed recommended changes
Added additional double battle logic for yawn
2022-08-13 00:39:44 -06:00
Ct11217
7378d1099b Removed AI_GetAbility
Misc cleanup
2022-08-12 15:21:25 -06:00
Ct11217
b95e450cb6 Added corner case logic for AI Switching.
1. Refactor Perish Song
2. Yawn
3. Secondary Damage (Leech Seed, Cursed etc).
4. Added Preliminary logic to help AI be smarter against semi-invulnerable

Added AI logic regarding abilities that benefit from switching
1. Natural Cure
2. Regenerator
2022-08-11 22:48:36 -06:00
Eduardo Quezada D'Ottone
e791cf90ad Merge tag 'pretmaster' into BE_pretmerge2
# Conflicts:
#	data/battle_anim_scripts.s
#	include/battle_anim.h
#	include/battle_controllers.h
#	include/battle_interface.h
#	include/battle_main.h
#	include/battle_setup.h
#	include/constants/battle_anim.h
#	include/constants/battle_string_ids.h
#	src/battle_ai_switch_items.c
#	src/battle_anim_fire.c
#	src/battle_anim_normal.c
#	src/battle_controllers.c
#	src/battle_dome.c
#	src/battle_gfx_sfx_util.c
#	src/battle_interface.c
#	src/battle_message.c
#	src/battle_script_commands.c
#	src/battle_util.c
#	src/pokemon.c
2022-07-15 12:58:46 -04:00
sphericalice
186f2c0232 Introduce a MOVE_UNAVAILABLE constant 2022-07-11 15:18:13 +01:00
ghoulslash
e4bf99d777 merge w be 2022-07-03 16:20:05 -04:00
sneed
5e7df653bd no gest 2022-06-18 19:18:01 +03:00
sneed
f43d54af89 AI chooses most resistant mon 2022-06-18 19:00:33 +03:00
Kurausukun
d3c8346a67 fix type, add bugfix 2022-06-17 21:58:56 -04:00
Kurausukun
23e9455e0a document design oddity, use constants, correct comment 2022-06-17 21:52:58 -04:00
ghoulslash
b33a8b0cb4 move ai score calc to STATE_TURN_START_RECORD so AI can consider move selection for item use 2022-06-05 11:09:04 -04:00
WiserVisor
8923ffb3af
Merge branch 'battle_engine' into battle_engine 2021-12-23 15:29:10 -08:00
ultima-soul
7369f60c06 Merge branch 'battle_engine' of github.com:rh-hideout/pokeemerald-expansion into battle_engine_sync 2021-12-03 17:30:45 -08:00
ghoulslash
d108f77aa4 revert ai item usage code 2021-11-28 13:12:56 -05:00
ultima-soul
3ed51d6d91 Merge branch 'master' of github.com:pret/pokeemerald into battle_engine_sync 2021-11-21 10:40:26 -08:00
Eduardo Quezada D'Ottone
dee7f97a8d
Merge branch 'battle_engine' into battle_ai 2021-11-21 14:46:09 -03:00
W1serV1ser
c2f81cd5f5 Added Sky Drop 2021-11-20 11:44:48 -08:00
ghoulslash
3976d982ff fix AI_ShouldHeal speed check 2021-11-11 16:35:10 -05:00
ghoulslash
2fac38cc83 merge w be 2021-11-11 16:16:26 -05:00
ghoulslash
a2b8f3f169 replace gBattleMons[x].ability w GetBattlerAbility 2021-10-31 17:19:30 -04:00
GriffinR
fc15b0d5f0 Add controller buffer constants, finish misc battle doc 2021-10-13 16:21:39 -04:00
GriffinR
739e7d3c31 Document summary screen sprite manager 2021-10-02 23:47:59 -04: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
LOuroboros
554210c5e3 Removed trailing spaces in the most relevant files
Command used for the job:
egrep -rl ' $' --include *.c --include *.h --include  *.s --include  *.inc --include  *.txt *  | xargs sed -i 's/\s\+$//g'

Credits to Grant Murphy from Stack Overflow.
2021-08-24 19:59:32 -03:00
ghoulslash
eadd09bebd block item use under embargo 2021-07-25 07:39:02 -06:00
ghoulslash
c3e28e9b1a merge with be 2021-05-23 12:22:52 -06:00
ultima-soul
14a0303e2f Merge branch 'master' of github.com:pret/pokeemerald into battle_engine_sync 2021-04-27 18:36:37 -07:00
GriffinR
b6711441f5 Fix AI Guard Spec use, and Specs->Spec 2021-04-03 15:18:17 -04:00
GriffinR
9ea9ffde09 Add remaining multistring chooser constants 2021-04-03 11:49:06 -04:00
Evan
f3d975e239 merge with be 2021-02-12 08:59:55 -07:00
ultima-soul
2a20d50904 Merge branch 'master' of github.com:pret/pokeemerald into battle_engine_sync 2021-02-01 15:54:08 -08:00
Evan
c003f1c023 check move effectiveness with status effects 2021-01-26 15:41:59 -07:00
GriffinR
b9e1b050e1 Label remaining battle types 2021-01-13 15:20:29 -05:00
LOuroboros
3ffa7f993a Renamed some X Defend labels to reflect its new name in the IE 2021-01-10 01:58:02 -03:00
LOuroboros
dbc3690282 Tweaked preprocessor directives
Changed #ifdef X_ITEMS_REWORK == FALSE to #ifndef ITEM_EXPANSION
Changed #ifdef X_ITEMS_REWORK == TRUE to #ifdef ITEM_EXPANSION
2021-01-04 03:58:31 -03:00
Evan
7988a1f41d Ai_TryOnAlly and reorganize files 2020-12-20 14:47:20 -07:00
Evan
31ec3e8479 non-partner good move checks 2020-12-19 21:58:23 -07:00
Evan
916d0416e3 outline AI_CheckGoodMove 2020-12-15 21:57:33 -07:00
LOuroboros
791d561f14 Reworked the effects of the X Items
Thanks to Karathan's indications.
2020-12-08 18:24:42 -03:00
ultima-soul
e32659d4bb Merge branch 'battle_engine' into ability_expansion and add Gen 8 DLC abilities. 2020-11-16 13:50:26 -08:00
ExpoSeed
9e2c8a95c1 Sync bev2 with pret 2020-10-11 01:01:47 -05:00
GriffinR
5259898325 Replace POKEMON_SLOTS_NUMBER 2020-10-01 17:07:12 -05:00
DizzyEggg
f70a9ce153 Merge with master 2020-08-27 12:01:28 +02:00
GriffinR
5e8ffff62f Add stat stage constants 2020-08-04 20:38:57 -04:00
ultima-soul
9ee5db6a96 Expand ability ids to u16. Thanks to ghoulslash for some assistance! 2020-05-18 14:54:12 -07:00
DizzyEggg
14bc2f65f3 Fix AI trying to switch when it can't, also ghosts can escape 2020-02-08 14:20:02 +01:00
DizzyEggg
4c9ea32d19 Merge with master 2019-12-30 18:52:23 +01:00
GriffinR
749965d56b Document item_use.c 2019-12-21 21:39:30 -05:00
DizzyEggg
bae5d2038f Update with master 2019-10-10 16:18:48 +02:00