rh-hideout / pokeemerald-expansion

Feature branche for the pokeemerald decompilation. See the wiki for more info.
361 stars 1.09k forks source link

AI is pretty bad on Z Moves. #2673

Closed Jaizu closed 1 year ago

Jaizu commented 1 year ago

Somehow most of the time the AI will pref to use bite or smack down instead the z move vs a pikachu (that doesnt get one shot by smack down neither bite). Vs a starmie it also prefs to use bite over the z move. Bite is 120 damage vs psychic. Z move is 100 + 50 stab, so it should be go for that one.

    [TRAINER_LEADER_BROCK] = {
        .partyFlags = F_TRAINER_PARTY_CUSTOM_MOVESET | F_TRAINER_PARTY_HELD_ITEM,
        .trainerClass = TRAINER_CLASS_LEADER,
        .encounterMusic_gender = TRAINER_ENCOUNTER_MUSIC_MALE,
        .trainerPic = TRAINER_PIC_LEADER_BROCK,
        .trainerName = _("Brock"),
        .items = {ITEM_Z_POWER_RING},
        .doubleBattle = FALSE,
        .aiFlags = AI_FLAG_CHECK_BAD_MOVE | AI_FLAG_TRY_TO_FAINT | AI_FLAG_CHECK_VIABILITY | AI_FLAG_PREFER_STRONGEST_MOVE,
        .partySize = ARRAY_COUNT(sParty_LeaderBrock),
        .party = {.ItemCustomMoves = sParty_LeaderBrock}
    },
static const struct TrainerMonItemCustomMoves sParty_LeaderBrock[] = {
    {
        .iv = 50,
        .lvl = 12,
        .species = SPECIES_GEODUDE_ALOLAN,
        .heldItem = ITEM_NONE,
        .moves = {MOVE_SPARK, MOVE_SMACK_DOWN, MOVE_CHARGE, MOVE_DEFENSE_CURL},
    },
    {
        .iv = 50,
        .lvl = 14,
        .species = SPECIES_LARVITAR,
        .heldItem = ITEM_ROCKIUM_Z,
        .moves = {MOVE_BITE, MOVE_SMACK_DOWN, MOVE_SCREECH, MOVE_DOUBLE_TEAM},
    },
};
AsparagusEduardo commented 1 year ago

Likely fixed by #2983