Exemplo n.º 1
0
        public bool HasNonPhBlock(LezBotsGroup foeGroup)
        {
            if (BlockOp > 0)
            {
                if (
                    LezSpell.IsMagBlock(BlockCode) ||
                    Array.IndexOf(foeGroup.SpellsBlocks, BlockCode) >= 0
                    )
                {
                    return(true);
                }
            }

            for (var i = 0; i < MagicFlags.Length; i++)
            {
                if (MagicFlags[i])
                {
                    if (Array.IndexOf(foeGroup.SpellsBlocks, MagicCodes[i]) >= 0)
                    {
                        return(true);
                    }
                }
            }

            return(false);
        }
Exemplo n.º 2
0
        public void AddHit(int combo, int op, int code)
        {
            HitOps[combo]   = op;
            HitCodes[combo] = code;

            if (LezSpell.IsPhHit(code))
            {
                _zHit += code == 0 ? 3 : 4;
            }
            else
            {
                if (LezSpell.IsMagHit(code))
                {
                    _zHit += code == 2 ? 10 : 12;
                }
                else
                {
                    _zHit += 25;
                }
            }
        }
Exemplo n.º 3
0
        public void AddBlock(int combo, int op, int code)
        {
            BlockCombo = combo;
            BlockOp    = op;
            BlockCode  = code;

            if (LezSpell.IsPhBlock(code))
            {
                _zBlock = LezSpellCollection.Spells[code].Name.Split('+').Length;
            }
            else
            {
                if (LezSpell.IsMagBlock(code))
                {
                    if (code == 29)
                    {
                        _zBlock = 1;
                    }
                    else
                    {
                        if (code == 30)
                        {
                            _zBlock = 2;
                        }
                        else
                        {
                            if (code == 31)
                            {
                                _zBlock = 3;
                            }
                        }
                    }
                }
                else
                {
                    _zMag += 4;
                }
            }
        }