public override void Update(CardGameState GS) { foreach (CardZone rangeZone in GS.Players[Node.OwnerIndex].mBoard.RangeZones) { foreach (Entities.Entity E in rangeZone.List.Cards) { Entities.Unit U = ((Entities.Unit)E); if (U.IsClass(AffectedClass)) { U.AttackCostModifier += Amount; } } } }
public override void Execute(Entities.Entity Performer, List <Entities.Entity> Selection, CardGameState GS) { Entities.Effect_Entity performerEffectEntity = (Entities.Effect_Entity)Performer; performerEffectEntity.Owner.SpendCP(GetMinCost()); int numSalvos = 0; foreach (CardZone CZ in performerEffectEntity.Owner.mBoard.RangeZones) { foreach (Entities.Entity E in CZ.List.Cards) { Entities.Unit U = (Entities.Unit)E; if (U.IsClass("Bow") && U.IsClass("Infantry")) { numSalvos += 1; } } } Effects.Orders.OrderWithUses order = (Effects.Orders.OrderWithUses)(performerEffectEntity.GetEffect()); order.SetUses(mActionIndex, numSalvos); order.OrderUsed(); }
protected override bool CheckValidityInternal(Entities.Entity Performer, List <Entities.Entity> Selection, TurnInfo TI) { bool result = true; // Even in the case of mAddSelfToSelection // we do not check if self qualifies. if (mClassTags != null && mClassTags.Count > 0 && Selection != null) { for (int i = 0; i < Selection.Count && result; i++) { Entities.Unit unit = (Entities.Unit)Selection[i]; for (int k = 0; k < mClassTags.Count && result; k++) { result = result && unit.IsClass(mClassTags[k].mValue); } } } return(result); }