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); }
public CreatureAddedNotification(Connection connection, ICreature creature, EffectT addEffect = EffectT.None) : base(connection) { if (creature == null) { throw new ArgumentNullException(nameof(creature)); } Creature = creature; AddedEffect = addEffect; }
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; }
protected abstract int InternalExecute(out EffectT resultingEffect, out bool shielded, out bool armored, out TextColor colorText);