Ejemplo n.º 1
0
        public AbilityFailEvent(Combatant source, Ability ability, bool resetSourceTurnTimer)
            : base(source, resetSourceTurnTimer)
        {
            Ability = ability.Name;

            if (source is Ally)
            {
                Status = "Not enough MP for " + Ability + "!";
            }
            else // is Enemy
            {
                Status = source.Name + "'s skill power is used up.";
            }
        }
Ejemplo n.º 2
0
        public AbilityEvent(Ability ability, AbilityModifiers modifiers, Combatant source, Combatant[] targets)
            : base(source, modifiers.ResetTurnTimer)
        {
            Hits = new bool[ability.Hits];
            Steals = new string[modifiers.StealAsWell ? targets.Count() : 0];
            TargetHitFlags = new bool[targets.Count()];
            Targets = targets;
            Ability = ability;
            Modifiers = modifiers;

            if (modifiers.StealAsWell)
            {
                if (!(source is Ally))
                {
                    throw new GameDataException("Non-Ally source '{0}' attempted to steal.", source.Name);
                }
                else if (targets.Any(x => !(x is Enemy)))
                {
                    throw new GameDataException("Source '{0}' attempted to steal from a non-Enemy target using ability '{1}'.", source.Name, ability.Name);
                }
            }
        }
Ejemplo n.º 3
0
 public override void Respond(Ability ability)
 {
 }
Ejemplo n.º 4
0
 public abstract void Respond(Ability ability);