10.01.2021, 23:47
Это флаги переменной i^battle_type^. Но удобнее конкретные флаги тестировать, обращаясь к другим глобальным переменным:
Code:
[+] The following improvements were introduced in "Era Erm Framework" mod:
- "OnBeforeBattle" and "OnBeforeBattleUniversal" events were improved, storing most of prebattle parameters in global variables.
i^battle_isQuick^: (TRUE) if quick battle is enabled, (FALSE) otherwise
i^battle_x^: Battle x-coordinate
i^battle_y^: Battle y-coordinate
i^battle_z^: Battle z-coordinate
i^battle_owner_0^: Left side owner or (NO_OWNER)
i^battle_owner_1^: Right side owner or (NO_OWNER)
i^battle_hero_0^: Left side hero or (NO_HERO)
i^battle_hero_1^: Right side hero or (NO_HERO). Any negative value is normalized into (NO_HERO)
i^battle_ai_0^: (TRUE) if left side is controlled by AI, (FALSE) otherwise.
i^battle_ai_1^: (TRUE) if right side is controlled by AI, (FALSE) otherwise.
i^battle_human_0^: (TRUE) if left side is controlled by human, (FALSE) otherwise.
i^battle_human_1^: (TRUE) if right side is controlled by human, (FALSE) otherwise.
i^battle_remote_0^: (TRUE) if left side is controlled by remote human, (FALSE) otherwise.
i^battle_remote_1^: (TRUE) if right side is controlled by remote human, (FALSE) otherwise.
i^battle_local_0^: (TRUE) if left side is controlled by local human or AI, (FALSE) otherwise.
i^battle_local_1^: (TRUE) if right side is controlled by local human or AI, (FALSE) otherwise.
i^battle_localHuman_0^: (TRUE) if left side is controlled by local human, (FALSE) otherwise.
i^battle_localHuman_1^: (TRUE) if right side is controlled by local human, (FALSE) otherwise.
i^battle_hasHuman^: (TRUE) if least one side is controlled by human, (FALSE) otherwise.
i^battle_humanOnly^: (TRUE) if all sides are controlled by humans, (FALSE) otherwise.
i^battle_aiOnly^: (TRUE) if all sides are controlled by AI, (FALSE) otherwise.
i^battle_isVisible^: (TRUE) if at least one side is human and quick battle is off, (FALSE) otherwise.
i^battle_isNetwork^: (TRUE) if it's network human vs human battle, (FALSE) otherwise.
i^battle_type^: Battle type bit mask: a collection of BATTLE_TYPE_FLAG_XXX constants.
i^battle_current_side^: Current/active stack battle side (BATTLE_LEFT = 0 or BATTLE_RIGHT = 1). Changes in "OnBeforeBattleStackTurn" and "OnBattleStackObtainsTurn" events.
i^battle_current_stack^: Current/active stack ID. Changes in "OnBeforeBattleStackTurn" and "OnBattleStackObtainsTurn" events.
i^battle_acting_stack^: ID of stack, performing action. It's set in "OnBeforeBattleAction" only.
i^battle_acting_side^: Side (BATTLE_LEFT = 0 or BATTLE_RIGHT = 1) of stack, performing action. It's set in "OnBeforeBattleAction" only.
- i^battle_round^ keeps current valid round and can be used throughout battle triggers and in OnBattleRound condition
like !?FU(OnBattleRound)&i^battle_round^=0 instead of v997.