Exemplo n.º 1
0
        protected override int InternalExecute(out EffectT resultingEffect, out bool shielded, out bool armored, out TextColor colorText)
        {
            resultingEffect = EffectT.XBlood;
            colorText       = TextColor.Red;
            shielded        = false;
            armored         = false;

            var rng = new Random((int)Attacker.ActorId);

            var val = rng.Next(4);

            switch (val)
            {
            default:
                return(0);

            case 1:
                break;

            case 2:
                shielded = true;
                break;

            case 3:
                armored = true;
                break;
            }

            return(rng.Next(10) + 1);
        }
Exemplo n.º 2
0
        public CreatureAddedNotification(Connection connection, ICreature creature, EffectT addEffect = EffectT.None)
            : base(connection)
        {
            if (creature == null)
            {
                throw new ArgumentNullException(nameof(creature));
            }

            Creature    = creature;
            AddedEffect = addEffect;
        }
Exemplo n.º 3
0
        public CreatureRemovedNotification(Connection connection, ICreature creature, byte oldStackPos, EffectT removeEffect = EffectT.None)
            : base(connection)
        {
            if (creature == null)
            {
                throw new ArgumentNullException(nameof(creature));
            }

            Creature         = creature;
            OldStackPosition = oldStackPos;
            RemoveEffect     = removeEffect;
        }
Exemplo n.º 4
0
 protected abstract int InternalExecute(out EffectT resultingEffect, out bool shielded, out bool armored, out TextColor colorText);