public override void Run(ConvergeEffectContext context) { int amountValue = amount.GetValue(context); foreach (ConvergeObject patient in patients.GetList(context)) { patient.Heal(amountValue); } }
public override void Run(ConvergeEffectContext context) { int amountValue = amount.GetValue(context); foreach (ConvergeObject subject in subjects.GetList(context)) { subject.controller.GainLife(amountValue); } }
public override void Run(ConvergeEffectContext context) { int power = powerAmount.GetValue(context); int toughness = toughnessAmount.GetValue(context); foreach (ConvergeObject patient in patients.GetList(context)) { patient.AddEffect(new ConvergeEffect_Upgrade(power, toughness, keywords, context.source, new_art, duration)); } }
public override void Run(ConvergeEffectContext context) { List <ConvergeObject> sourcesList = sources.GetList(context); int amountValue = amount.GetValue(context); foreach (ConvergeObject victim in victims.GetList(context)) { foreach (ConvergeObject source in sourcesList) { source.DealDamage(victim, amountValue, false); } } }
public override bool Test(ConvergeObject subject, ConvergeEffectContext context) { context.subject = subject; int aValue = a.GetValue(context); int bValue = b.GetValue(context); switch (comparison) { case ConvergeComparison.equal: return(aValue == bValue); case ConvergeComparison.notEqual: return(aValue != bValue); case ConvergeComparison.greater: return(aValue > bValue); case ConvergeComparison.less: return(aValue < bValue); case ConvergeComparison.greaterOrEqual: return(aValue >= bValue); case ConvergeComparison.lessOrEqual: return(aValue <= bValue); default: throw new NotImplementedException(); } }