static public async Task ActAsync(TargetSpaceCtx ctx) { // replace 1 city with 2 exploreres. await ReplaceInvader.SingleInvaderWithExplorers(ctx.Self, ctx.Invaders, Invader.City, 2); // replace 1 town with 1 explorer await ReplaceInvader.SingleInvaderWithExplorers(ctx.Self, ctx.Invaders, Invader.Town, 1); // replace 1 dahan with 1 explorer. if (await ctx.Tokens.Dahan.Remove1(RemoveReason.Replaced) != null) { await ctx.Tokens.AddDefault(Invader.Explorer, 1, AddReason.AsReplacement); } // if you have 2 fire 2 water 3 animal if (await ctx.YouHave("2 fire,2 water,3 animal")) { // before pushing, explorers and city/town do damage to each other int damageFromExplorers = ctx.Tokens.Sum(Invader.Explorer); int damageToExplorers = ctx.Tokens.Sum(Invader.City) * 3 + ctx.Tokens.Sum(Invader.Town) * 2; await ctx.DamageInvaders(damageFromExplorers, Invader.City, Invader.Town); await ctx.DamageInvaders(damageToExplorers, Invader.Explorer); } // Push all explorers from target land to as many different lands as possible await ctx.Push(int.MaxValue, Invader.Explorer); }
public static async Task ActAsync(TargetSpaceCtx ctx) { // 1 fear. ctx.AddFear(1); // 2 damamge. await ctx.DamageInvaders(2); // Isolate target land. ctx.Isolate(); // After invaders / dahan are Moved into target land, Destroy them. ctx.GameState.Tokens.TokenAdded.ForRound.Add(async(args) => { if (args.Space == ctx.Space && args.Token.Class.IsOneOf(Invader.Explorer, Invader.Town, Invader.City, TokenType.Dahan) ) { await args.GameState.Tokens[args.Space].Destroy(args.Token, args.Count); } }); // if you have 2 moon, 4 water, 2 earth: if (await ctx.YouHave("2 moon,4 water,2 earth")) { // +4 damamge, await ctx.DamageInvaders(4); // Add 1 badland. await ctx.Badlands.Add(1); // Add 1 wilds await ctx.Wilds.Add(1); } }
static async Task ActAsync(TargetSpaceCtx ctx, int damage) { // Destroy 1 dahan await ctx.DestroyDahan(1); // 4 plant split this power's damage however desired between target land and another 1 of your lands int damageToTarget = ctx.Self.Elements[Element.Plant] < 4 && ctx.Self.Presence.Spaces.Count() > 1 ? damage : await ctx.Self.SelectNumber("Damage to apply to " + ctx.Space.Label, damage); await ctx.DamageInvaders(damage); int remainingDamage = damage - damageToTarget; if (remainingDamage > 0) { var secondaryTarget = await ctx.Decision(new Select.Space( $"Apply {remainingDamage} reamaining damage" , ctx.Self.Presence.Spaces , Present.Always )); await ctx.Target(secondaryTarget).DamageInvaders(remainingDamage); } }
static public Task ActAsync(TargetSpaceCtx ctx) { return(ctx.SelectActionOption( new SpaceAction("2 Damage", ctx => ctx.DamageInvaders(2)).Matches(x => x.HasInvaders), new SpaceAction("Remove 1 Blight", ctx => ctx.RemoveBlight()).Matches(x => x.HasBlight) )); }
public static async Task ActAsync(TargetSpaceCtx ctx) { // 6 damage. await ctx.DamageInvaders(6); // Add 2 badlands/strife var addBadlandsOrStrife = Cmd.Pick1("Add badlands/strife", Cmd.AddBadlands(1), Cmd.AddStrife(1)); await addBadlandsOrStrife.Repeat(2).Execute(ctx); // and 1 blight. await ctx.AddBlight(1); await TakeActionInUpToNLands(ctx // In up to 3 adjacent lands with blight , 3, ctx.Adjacent.Where(s => ctx.Target(s).HasBlight) // add 1 badland/strife. , addBadlandsOrStrife ); // if you have 3 fire 3 water: if (await ctx.YouHave("3 fire,3 water")) { await TakeActionInUpToNLands(ctx // in up to 3 adjacent lands, , 3, ctx.Adjacent // 1 damage to each invader. , new SpaceAction("1 damage to each invader", ctx => ctx.DamageEachInvader(1)) ); } }
static public async Task ActAsync(TargetSpaceCtx ctx) { // 4 fear ctx.AddFear(4); // add 1 strife await ctx.AddStrife(); // if you have 3moon, 2 air, 3 plant (before the terror level check) if (await ctx.YouHave("3 moon,2 air,3 plant")) { ctx.AddFear(3); await ctx.DamageInvaders(3); } // if terror level is 2 or higher, remove 2 invaders if (2 <= ctx.GameState.Fear.TerrorLevel) { for (int i = 0; i < 2; ++i) { var invader = await ctx.Decision(Select.Invader.ToRemove(ctx.Space, ctx.Tokens.Invaders())); if (invader == null) { break; } await ctx.Invaders.Remove(invader, 1); } } }
public static Task ActAsync(TargetSpaceCtx ctx) { return(ctx.SelectActionOption( new SpaceAction("+1 badland, +1 wilds", ctx => { ctx.Badlands.Add(1); ctx.Wilds.Add(1); }), new SpaceAction("1 damage", ctx => ctx.DamageInvaders(1)) )); }
static public Task ActAsync(TargetSpaceCtx ctx) { return(ctx.SelectActionOption( new SpaceAction("1 damage", ctx => ctx.DamageInvaders(1)), new SpaceAction("Defend 4", ctx => ctx.Defend(4)) )); }
static public async Task ActAsync(TargetSpiritCtx ctx) { if (ctx.Other.Presence.Destroyed == 0) { return; } // into a single land, up to range 2 from your presence. // Note - Jonah says it is the originators power and range and decision, not the targets var spaceOptions = ctx.Self.GetTargetOptions(TargettingFrom.None, ctx.GameState, new TargetSourceCriteria(From.Presence), new TargetCriteria(2, Target.Any)) .Where(ctx.Other.Presence.IsValid) .ToArray(); TargetSpaceCtx selfPickLandCtx = await ctx.SelectSpace("Select location for target spirit to add presence", spaceOptions); // target spirit adds 2 of their destroyed presence await ctx.OtherCtx .Target(selfPickLandCtx.Space) .Presence.PlaceDestroyedHere(2); // if any presene was added, 2 damage to each town/city in that land. await selfPickLandCtx.DamageEachInvader(2, Invader.Town, Invader.City); // if you have 3 fire, 3 earth , 2 plant, 4 damage in that land if (await ctx.YouHave("3 fire,3 earth,2 plant")) { await selfPickLandCtx.DamageInvaders(4); } }
static public Task Act(TargetSpaceCtx ctx) { return(ctx.SelectActionOption( new SpaceAction("1 damage per dahan", ctx => ctx.DamageInvaders(ctx.Dahan.Count)), new SpaceAction("gather up to 3 dahan", ctx => ctx.GatherUpToNDahan(3)) )); }
static public async Task ActAsync(TargetSpaceCtx ctx) { // 6 fear ctx.AddFear(6); // 20 damage. await ctx.DamageInvaders(20); // Destroy all dahan and beast. await DestroyDahanAndBeasts(ctx); // Add 1 blight await ctx.AddBlight(1); // if you have 4 fire, 3 earth: if (await ctx.YouHave("4 fire,3 earth")) { // Destroy all invaders. await ctx.Invaders.DestroyAny(int.MaxValue, Invader.City, Invader.Town, Invader.Explorer); // Add 1 wilds. await ctx.Wilds.Add(1); // In each adjacent land: foreach (var adj in ctx.Adjacent.Select(ctx.Target)) { await EffectAdjacentLand(adj); } } }
static public async Task ActAsync(TargetSpaceCtx ctx) { // 2 fear ctx.AddFear(2); // add 1 beast. var beasts = ctx.Beasts; await beasts.Add(1); // Gather up to 1 beast. await ctx.GatherUpTo(1, TokenType.Beast); // 1 damage per beast. await ctx.DamageInvaders(beasts.Count); // Push up to 2 beast await ctx.PushUpTo(2, TokenType.Beast); // if you have 2 sun 2 moon 3 animal if (await ctx.YouHave("2 sun,2 moon,3 animal")) { // 1 damage in adjacent land without blight, // and +1 damage per beast there var noBlight = await ctx.SelectAdjacentLand("1 Damage in land w/o blight", ctx => !ctx.HasBlight); if (noBlight != null) { await noBlight.DamageInvaders(1 + noBlight.Beasts.Count); } } }
static public async Task ActAsync(TargetSpaceCtx ctx) { // destroy all explorers. await ctx.Invaders.Destroy(int.MaxValue, Invader.Explorer); // Add 1 wilds. await ctx.Wilds.Add(1); // Add 1 wilds in the originating Sands. // !! won't find original if this was picked using a range-extender - would need to capture that info during the targetting process var originatingOptions = ctx.Range(1) .Where(a => ctx.Self.Presence.Spaces.Contains(a) && a.IsSand) .ToArray(); var originalCtx = await ctx.SelectSpace("Select origination space", originatingOptions, Present.AutoSelectSingle); if (originalCtx != null) { await originalCtx.Wilds.Add(1); } // 1 damage per wilds in / adjacent to target land. int wildsDamage = ctx.Space.Range(1).Sum(s => ctx.Target(s).Wilds.Count); // if you have 2 fire, 3 plant: // +1 damage per wilds in / adjacent to target land. if (await ctx.YouHave("2 fire,3 plant")) { wildsDamage += wildsDamage; } await ctx.DamageInvaders(wildsDamage); }
public static async Task ActAsync(TargetSpaceCtx ctx) { // 2 damage. int damage = 2; // defend 8. int defend = 8; bool hasBonus = await ctx.YouHave("2 earth,2 plant"); if (hasBonus) { // +2 damage. damage += 2; // +2 defend. defend += 2; } await ctx.DamageInvaders(damage); ctx.Defend(defend); // add 1 wilds. await ctx.Wilds.Add(1); // isolate target land ctx.Isolate(); // if you have 2 earth, 2 plant: if (hasBonus) { // Add 1 badland. await ctx.Badlands.Add(1); } }
static public async Task ActAsync(TargetSpaceCtx ctx) { // == Pick 2nd target - range 2 from same SS == var spiritSS = ctx.Self.Presence.SacredSites.ToArray(); var possibleSacredSiteSourcesForThisSpace = ctx.Space.Range(1).Where(s => spiritSS.Contains(s)).ToArray(); // IEnumerable<Space> secondTargetOptions = ctx.Presence.GetValidDestinationOptionsFromPresence( 2, Target.Any, possibleSacredSiteSourcesForThisSpace ); IEnumerable <Space> secondTargetOptions = ctx.Self.RangeCalc.GetTargetOptionsFromKnownSource(ctx.Self, ctx.GameState, TargettingFrom.PowerCard, possibleSacredSiteSourcesForThisSpace, new TargetCriteria(2)); var secondTarget = await ctx.Decision(new Select.Space("Select space to target.", secondTargetOptions, Present.Always)); // 4 damage in each target land (range must be measured from same SS) await ctx.DamageInvaders(4); await ctx.Target(secondTarget).DamageInvaders(4); // if 3 fire if (await ctx.YouHave("3 fire")) { await Apply3DamageInOneOfThese(ctx, secondTarget, "fire"); } // if 3 water if (await ctx.YouHave("3 water")) { await Apply3DamageInOneOfThese(ctx, secondTarget, "water"); } }
static public async Task ActAsync(TargetSpaceCtx ctx) { // 4 damage. await ctx.DamageInvaders(4); // If any invaders remain, add 1 disease if (ctx.Tokens.Invaders().Any()) { await ctx.Disease.Add(1); } // if 3 air and 3 plant: if (await ctx.YouHave("3 air,3 plant")) { // 3 fear. ctx.AddFear(3); // Add 1 disease to 2 adjacent lands with invaders. for (int i = 0; i < 2; ++i) { var adjCtx = await ctx.SelectAdjacentLand($"Add disease to ({i+1} of 2)", x => x.Tokens.HasInvaders()); await adjCtx.Disease.Add(1); } } }
public static async Task ActAsync(TargetSpaceCtx ctx) { // 2 damage. await ctx.DamageInvaders(2); // Then either: add 3 wilds OR Remove 1 blight await ctx.SelectActionOption(Cmd.AddWilds(3), Cmd.RemoveBlight); // if you have 3 plant, if (await ctx.YouHave("3 plant")) { // 1 fear ctx.AddFear(1); // +2 damage await ctx.DamageInvaders(2); } }
static async Task Execute(TargetSpaceCtx ctx, int fear, int damage) { ctx.AddFear(fear); await ctx.DamageInvaders(damage); // remove 1 beast await ctx.Beasts.Remove(1); }
static public Task Act(TargetSpaceCtx ctx) { // 1 fear ctx.AddFear(1); // each dahan deals damange equal to the number of your presense in the target land return(ctx.DamageInvaders(ctx.Dahan.Count * ctx.PresenceCount)); }
static public async Task ActAsync(TargetSpaceCtx ctx) { // 2 damage await ctx.DamageInvaders(2); // push 1 explorer await ctx.Push(1, Invader.Explorer); }
static async Task RemoveTokensForFearAndDamage(TargetSpaceCtx ctx) { var removed = new List <Token>(); Token[] options = GetRemovableTokens(ctx); // if you have 2 moon, 3 fire: if you have remvoed tokens, return up to 2 of them. Otherwise, add 2 strife // Instead of having Bonus return 2 tokens (like strife...), we will just not remove them bool hasBonus = await ctx.YouHave("2 moon,3 fire"); int returnCount = hasBonus ? System.Math.Min(2, options.Length) : 0; while (options.Length > 0) { // This is kind of special purpose var removeTokenDecision = new Select.TokenFrom1Space( $"Remove token for (1 fear,3 damage) total({removed.Count},{removed.Count * 3})" , ctx.Space, options, Present.Done ); var tokenToRemove = await ctx.Decision(removeTokenDecision); if (tokenToRemove == null) { break; } // If bonus allowed us to return some if (returnCount > 0) { returnCount--; } else { RemoveToken(ctx, tokenToRemove); } // Do fear now ctx.AddFear(1); // do damage later removed.Add(tokenToRemove); // Next options = GetRemovableTokens(ctx); } // now do damage all at once await ctx.DamageInvaders(removed.Count * 3); // if you have 2 moon, 3 fire but didn't remove any if (hasBonus && removed.Count == 0) { // add 2 strife for (int i = 0; i < 2; ++i) { await ctx.AddStrife(); } } }
static Task DamageLandFromBlight(TargetSpaceCtx ctx) { // 2 damage per blight in target land int damage = ctx.BlightOnSpace * 2 // +1 damage per blight in adjacent lands + ctx.Adjacent.Sum(x => ctx.Target(x).BlightOnSpace); return(ctx.DamageInvaders(damage)); }
static public async Task Option1(ErruptionCtx ctx) { if (2 <= ctx.DestroyedPresence) { TargetSpaceCtx spaceCtx = await ctx.SelectAdjacentLandOrSelf($"Apply {ctx.DestroyedPresence} damage to"); await spaceCtx.DamageInvaders(ctx.DestroyedPresence); } }
static public async Task ActAsync(TargetSpaceCtx ctx) { // push 2 dahan await ctx.PushDahan(2); await ctx.SelectActionOption( new SpaceAction("2 Damage per wilds", ctx => ctx.DamageInvaders(2 * ctx.Wilds)).Matches(x => ctx.Tokens.Wilds.Any), new SpaceAction("Add 1 wilds", ctx => ctx.Wilds.Add(1)) ); }
static public Task ActAsync(TargetSpaceCtx ctx) { // 2 fear ctx.AddFear(2); // 1 damage per beast/disease/wilds/badlands. (Count max. 5 tokens.) int damage = Math.Min(5, ctx.Beasts.Count + ctx.Disease.Count + ctx.Wilds.Count + ctx.Badlands.Count); return(ctx.DamageInvaders(damage)); }
static public async Task ActAsync(TargetSpaceCtx ctx) { // If target land has badlands, 1 Damage. if (ctx.Badlands.Any) { await ctx.DamageInvaders(1); } // Add 1 badlands. await ctx.Badlands.Add(1); }
static public async Task ActAsync(TargetSpaceCtx ctx) { // 1 fear ctx.AddFear(1); // 1 damage await ctx.DamageInvaders(1); // if you have 2 air, this power is fast }
static public async Task ActAsync(TargetSpaceCtx ctx) { // 2 damage await ctx.DamageInvaders(2); // Add 1 badlands await ctx.Badlands.Add(1); // Remove 1 blight in target land from the game. (It goes to the box, not the blight card) await ctx.Blight.Remove(1, RemoveReason.Removed); // it does not go back to card }
static public Task Act(TargetSpaceCtx ctx) { int blightCount = ctx.BlightOnSpace; return(ctx.SelectActionOption( new SpaceAction($"{blightCount} damage", ctx => ctx.DamageInvaders(blightCount)) .Matches(x => x.Blight.Any), new SpaceAction("Remove 1 blight", ctx => ctx.RemoveBlight()) .Matches(x => x.Blight.Any && x.IsOneOf(Terrain.Mountain, Terrain.Sand)) )); }
static public async Task ActAsync(TargetSpaceCtx ctx) { // 2 damange. await ctx.DamageInvaders(2); // Push up to 2 dahan. await ctx.PushUpToNDahan(2); // When your Powers would destroy invaders, instead they generate fear and/or push those invaders // NO! - Bringer gets this by default // If this card is traded to another spirit, it is too hard to swap out their InvaderGroup builder }