rh-hideout / pokeemerald-expansion

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

U-Turn With Ace Mon #4748

Closed ShadowzLmao2 closed 3 months ago

ShadowzLmao2 commented 4 months ago

Description

The Ai used U-Turn on Farigiraf and with only that Farigiraf and the ace mon, it went back into Farigiraf which should have been illegal. You can't U-Turn into whoever is already out. The Ace Pokemon Flag was messing with the U-Turn

Version

master (default, unreleased bugfixes)

Upcoming/master Version

not 100% sure. updated it like 3 days ago

Discord contact info

SShadowzLmao#3643

Pawkkie commented 4 months ago

I'm struggling to reproduce this.

Could you share:

ShadowzLmao2 commented 4 months ago

I'm struggling to reproduce this.

Could you share:

  • The exact team the player is using (for a custom givemon)
  • The exact team the AI is using (so I can copy-paste ideally)
  • The exact scenario that triggered the behaviour (which mon the player had out, which mons if any the player had remaining in their party that the AI had seen, rough HP percentages if you remember, etc.)
  • The list of AI flags the AI is using

I don't remember the exact team i was using and i didnt save it, but ill post the ai team below. note only farigiraf and lopunny were alive. the scenario was that it was farigi and lopunny in the back (who hadnt come out yet) and still had the ace trainer flag intact. I assume my mon was not suitable for it to go into lopunny and it stayed in on farigi. i also think it was trick room at the time. my mons hp im pretty sure was at almost max. flags alsp posted below static const struct TrainerMon sParty_Norman1[] = { { .ev = TRAINER_PARTY_EVS(248,40,0,0,0,0), .lvl = 43, .species = SPECIES_SLAKING, .heldItem = ITEM_LEFTOVERS, .nature = NATURE_JOLLY, .isShiny = TRUE, .moves = {MOVE_DOUBLE_EDGE, MOVE_SHADOW_BALL, MOVE_IRON_HEAD, MOVE_HAZE} }, { .lvl = 43, .ev = TRAINER_PARTY_EVS(248,0,0,252,0,0), .species = SPECIES_PORYGON_Z, .heldItem = ITEM_EXPERT_BELT, .nature = NATURE_MODEST, .isShiny = TRUE, .moves = {MOVE_THUNDERBOLT, MOVE_GRASS_KNOT, MOVE_ICE_BEAM, MOVE_PROTECT} }, { .lvl = 43, .species = SPECIES_SNORLAX, .isShiny = TRUE, .nature = NATURE_BRAVE, .ability = ABILITY_IMMUNITY, .heldItem = ITEM_METRONOME, .trickRoomMon = TRUE, .moves = {MOVE_FAKE_OUT, MOVE_LAST_RESORT} }, { .lvl = 43, .ev = TRAINER_PARTY_EVS(248,0,0,0,0,0), .species = SPECIES_FARIGIRAF, .heldItem = ITEM_FOCUS_SASH, .ability = ABILITY_ARMOR_TAIL, .nature = NATURE_MODEST, .isShiny = TRUE, .moves = {MOVE_U_TURN, MOVE_NASTY_PLOT, MOVE_HYPER_VOICE, MOVE_TRICK_ROOM} }, { .lvl = 43, .ev = TRAINER_PARTY_EVS(0,252,0,0,0,0), .species = SPECIES_URSALUNA, .heldItem = ITEM_FLAME_ORB, .ability = ABILITY_GUTS, .nature = NATURE_ADAMANT, .isShiny = TRUE, .trickRoomMon = TRUE, .moves = {MOVE_EARTHQUAKE, MOVE_THUNDER_PUNCH, MOVE_FACADE, MOVE_CLOSE_COMBAT} }, { .lvl = 43, .ev = TRAINER_PARTY_EVS(0,252,0,252,0,0), .species = SPECIES_LOPUNNY, .heldItem = ITEM_LOPUNNITE, .nature = NATURE_JOLLY, .isShiny = TRUE, .moves = {MOVE_FAKE_OUT, MOVE_FACADE, MOVE_UPPER_HAND, MOVE_DRAIN_PUNCH} } }; .aiFlags = AI_FLAG_OMNISCIENT | AI_FLAG_TRY_TO_FAINT | AI_FLAG_SMART_MON_CHOICES | AI_FLAG_CHECK_BAD_MOVE | AI_FLAG_ACE_POKEMON | AI_FLAG_CHECK_VIABILITY | AI_FLAG_HP_AWARE | AI_FLAG_PREFER_BATON_PASS | AI_FLAG_SMART_SWITCHING,

ShadowzLmao2 commented 4 months ago

i dont remember the team i was using. I assume i had a breloom out with +6 Def/Atk and mach punch/another fighting move. it had technician

[SPECIES_BRELOOM] =
{
    .baseHP        = 70,
    .baseAttack    = 110,
    .baseDefense   = 75,
    .baseSpeed     = 75,
    .baseSpAttack  = 90,
    .baseSpDefense = 65,
    .types = MON_TYPES(TYPE_GRASS, TYPE_FIGHTING),
Pawkkie commented 4 months ago

Awesome, this is plenty to go off of for now, thank you! Will see if I can reproduce once I can use upcoming again lol