Commission Request: "Wary" Skill

Hello! I’m looking to commission a talented ASM / code expert to create a patch that gives the Wary Fighter skill independent of SkillSys (so I can add it to an essentially “vanilla” FE GBA experience).

I would want this patch to be F2U, but I’m also interested in an exclusive version of that skill that would only work on enemy-initiated attacks for my project specifically!

Do you have any restrictions on this? Certain units it’s meant to apply to, or do you just want it to be a global thing?

I’m hoping to make it just a global skill shared by Knights & Generals, but not Great Knight, sort of like Luna/Pierce for Wyvern Knight!

follow my c insertion guide

s8 BattleGetFollowUpOrder(struct BattleUnit** outAttacker, struct BattleUnit** outDefender) {
int class = gBattleTarget.unit.pClassData.number; 
if ((class == CLASS_ARMOR_KNIGHT) || (class == CLASS_ARMOR_KNIGHT_F) || (class == CLASS_GENERAL) || (class == CLASS_GENERAL_F)) { return false; } 

    if (gBattleTarget.battleSpeed > 250)
        return FALSE;

    if (ABS(gBattleActor.battleSpeed - gBattleTarget.battleSpeed) < BATTLE_FOLLOWUP_SPEED_THRESHOLD)
        return FALSE;

    if (gBattleActor.battleSpeed > gBattleTarget.battleSpeed) {
        *outAttacker = &gBattleActor;
        *outDefender = &gBattleTarget;
    } else {
        *outAttacker = &gBattleTarget;
        *outDefender = &gBattleActor;
    }

    if (GetItemWeaponEffect((*outAttacker)->weaponBefore) == WPN_EFFECT_HPHALVE)
        return FALSE;

    if (GetItemIndex((*outAttacker)->weapon) == ITEM_MONSTER_STONE)
        return FALSE;

    return TRUE;
}

I added the first two lines. Done on mobile so format looks bad.

I forget if it’s
int class = gBattleTarget.unit.pClassData.number; or int class = gBattleTarget.unit.pClassData->number; , usually the compiler tells me when I mess it up.

Note that this only stops knights / generals under attack from being doubled, I think. They can still double when attacking, and maybe be doubled on counterattacks. You can finesse it how you like by learning a tiny bit of C code.

Equally here’s a version that lets you run both versions of wary fighter, and apply them to whatever units and classes you like without needing to edit the code.

okay yeah that looks a lot nicer than what I did in 2 mins on mobile lol

Oh wow, y’all are awesome! Thank you both so much for helping!