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."; } }
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); } } }
public override void Respond(Ability ability) { }
public abstract void Respond(Ability ability);