• src/doors/clans-src/src/tests/test_empire.c test_fight.c test_items.c

    From Deuc¿@VERT to Git commit to main/sbbs/master on Sun Mar 15 01:06:05 2026
    https://gitlab.synchro.net/main/sbbs/-/commit/0789b4c20f98b25184ae6a26
    Modified Files:
    src/doors/clans-src/src/tests/test_empire.c test_fight.c test_items.c test_spells.c
    Log Message:
    Add unit tests for pure functions across items, fight, empire, spells

    items.c (8 new, 25 total): GetEquippableItem (type filtering, book/scroll exclusion, all-equipped sentinel), UnequipItemsFromPC (PClan global
    mutation, Available guard, no-match).

    fight.c (19 new, 41 total): FirstAvailable (empty, skip dead, last slot), CanRun (deterministic strong/weak, undead exclusion, empty clans),
    RemoveUndead (selective free+NULL), Fight_IsIncapacitated (spell flag
    check with SF_INCAPACITATE, combined flags), Fight_ManaRegenerate
    (already-max no-op, increases SP, caps at MaxSP, zero-wisdom minimum).

    empire.c (9 new, 32 total): Empire_Create (user/NPC/ClanEmpires-off), ArmyAttack (attacker wins, defender wins, empty attacker/defender,
    casualty tracking, equal forces).

    spells.c (8 new, 12 total): Spells_UpdatePCSpells (energy reduction, strength/wisdom stat reduction on hostile spells, friendly immunity,
    wearoff output + deactivation, inactive slot skip, multiple spells).

    Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

    ---
    þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.net