Exemplo n.º 1
0
    public void UpdateNextRound()
    {
        RoundsAlive++;
        SkillsUsedThisTurn.Clear();
        CurrentInitiative = 0;

        BlockedMoveUnitIds.Clear();
        BlockedHealUnitIds.Clear();
        BlockedBuffUnitIds.Clear();
        BlockedItems.Clear();
    }
Exemplo n.º 2
0
    public void PrepareForBattle(int id, Monster monster, bool checkLoot)
    {
        RoundsAlive           = 0;
        LastCombatSkillTarget = -1;
        TotalInitiatives      = monster.Initiative.NumberOfTurns;
        CurrentInitiative     = 0;
        CombatId       = id;
        IsImmobilized  = false;
        IsDead         = false;
        MarkedForDeath = false;
        IsSurprised    = false;
        OneShotted     = false;
        CheckLoot      = checkLoot;

        SkillsUsedInBattle.Clear();
        SkillsUsedThisTurn.Clear();
        SkillCooldowns.Clear();

        BlockedMoveUnitIds.Clear();
        BlockedHealUnitIds.Clear();
        BlockedBuffUnitIds.Clear();
        BlockedItems.Clear();
    }
Exemplo n.º 3
0
    public void ReadCombatInfoData(BinaryReader br)
    {
        LastCombatSkillUsed   = br.ReadString();
        LastCombatSkillTarget = br.ReadInt32();

        RoundsAlive    = br.ReadInt32();
        MarkedForDeath = br.ReadBoolean();
        IsSurprised    = br.ReadBoolean();
        IsImmobilized  = br.ReadBoolean();
        IsDead         = br.ReadBoolean();
        CheckLoot      = br.ReadBoolean();

        TotalInitiatives  = br.ReadInt32();
        CurrentInitiative = br.ReadInt32();
        CombatId          = br.ReadInt32();

        int skillUsedInBattleCount = br.ReadInt32();

        SkillsUsedInBattle.Clear();
        for (int i = 0; i < skillUsedInBattleCount; i++)
        {
            SkillsUsedInBattle.Add(br.ReadString());
        }

        int skillUsedThisTurnCount = br.ReadInt32();

        SkillsUsedThisTurn.Clear();
        for (int i = 0; i < skillUsedThisTurnCount; i++)
        {
            SkillsUsedThisTurn.Add(br.ReadString());
        }

        int skillCooldownCount = br.ReadInt32();

        SkillCooldowns.Clear();
        for (int i = 0; i < skillCooldownCount; i++)
        {
            SkillCooldowns.Add(new SkillCooldown(br.ReadString(), br.ReadInt32()));
        }

        int blockedMoveUnitCount = br.ReadInt32();

        BlockedMoveUnitIds.Clear();
        for (int i = 0; i < blockedMoveUnitCount; i++)
        {
            BlockedMoveUnitIds.Add(br.ReadInt32());
        }

        int blockedHealUnitCount = br.ReadInt32();

        BlockedHealUnitIds.Clear();
        for (int i = 0; i < blockedHealUnitCount; i++)
        {
            BlockedHealUnitIds.Add(br.ReadInt32());
        }

        int blockedBuffUnitCount = br.ReadInt32();

        BlockedBuffUnitIds.Clear();
        for (int i = 0; i < blockedBuffUnitCount; i++)
        {
            BlockedBuffUnitIds.Add(br.ReadInt32());
        }

        int blockedItemCount = br.ReadInt32();

        BlockedItems.Clear();
        for (int i = 0; i < blockedItemCount; i++)
        {
            BlockedItems.Add(br.ReadString());
        }
    }