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) { // destroys all explorers and towns await ctx.Invaders.Destroy(int.MaxValue, Invader.Explorer); await ctx.Invaders.Destroy(int.MaxValue, Invader.Town); // Destroy all dahan bool destroyAllDahan = true; // if you have 2 moon, 3 plant if (await ctx.YouHave("2 moon,3 plant")) { // Destroy 1 city await ctx.Invaders.Destroy(1, Invader.City); // do not destroy dahan destroyAllDahan = false; } if (destroyAllDahan) { await ctx.DestroyDahan(ctx.Dahan.Count); } }
public static async Task ActAsync(TargetSpaceCtx ctx) { // 2 fear. ctx.AddFear(2); // in both origin land and target land: 1 damage to each invader. var origin = await FindOriginLand_SS(ctx, 1); await ctx.DamageEachInvader(1); await ctx.Target(origin).DamageEachInvader(1); // if you have 2 fire 3 air 2 water: if (await ctx.YouHave("2 fire,3 air,2 water")) { // +1 fear. ctx.AddFear(1); // This Power has +1 range. (see attribute) // in a land adjacent to both origin and target Space thirdSpace = await SelectLandAdjacentToBoth(ctx, origin); // 1 damage to each invader. await ctx.Target(thirdSpace).DamageEachInvader(1); // in lands where you did Damage, Destroy 1 town foreach (var space in new[] { ctx.Space, origin, thirdSpace }.Distinct()) { await ctx.Target(space).Invaders.Destroy(1, Invader.Town); } } }
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); } }
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 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) { // target land and a land adjacent to it become a single land for this turn. var other = (await ctx.SelectAdjacentLand($"Join {ctx.Space.Label} to.")).Space; MultiSpace multi = JoinSpaces(ctx, ctx.Space, other); // if you have 4 air: if (await ctx.YouHave("4 air")) { // isolate the joined land. var joinedCtx = ctx.Target(multi); joinedCtx.Isolate(); // If it has invaders, if (joinedCtx.HasInvaders) { // 2 fear, joinedCtx.AddFear(2); // and Remove up to 2 invaders await joinedCtx.Invaders.Remove(); await joinedCtx.Invaders.Remove(); } } }
public static async Task ActAsync(TargetSpaceCtx ctx) { // Remove 1 of your presence on the island from the game, setting it on the Reminder Card. // if you have 3 sun 2 water 2 earth: the presence instead comes from your presence track. if (await ctx.YouHave("3 sun,2 water,2 earth")) { var presenceToRemove = await ctx.Presence.SelectSource("remove from game"); await ctx.Self.Presence.TakeFrom(presenceToRemove, ctx.GameState); // !!! trigger Win/Loss check??? } else { var presenceToRemove = await ctx.Decision(Select.DeployedPresence.All("Select presence to remove from game.", ctx.Self, Present.Always)); await ctx.Presence.RemoveFrom(presenceToRemove); } // From now on: Each dahan withing range of 1 of your presence provides // Defend 1 in its land, ctx.GameState.Tokens.RegisterDynamic(new Range1DahanDefend1(ctx.Self).DefendOn, TokenType.Defend, true); // and you gain 1 less Energy each turn. ctx.Self.EnergyCollected += spirit => -- spirit.Energy; // (this effect stacks if used multiple times.) }
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); }
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) { // 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) { // 3 fear ctx.AddFear(3); var landsWeCanApplyTheDamageTo = new List <Space> { ctx.Space }; // After each effect that destroys... async Task DealVengenceDamage(ITokenRemovedArgs args) { if (!args.Reason.IsDestroy()) { return; } // ...a town / city / dahan in target land if (args.Space == ctx.Space && args.Token.Class.IsOneOf(Invader.Town, Invader.City, TokenType.Dahan)) { // 1 damage per token destroyed await DistributeDamageToLands(ctx, landsWeCanApplyTheDamageTo, 1); } } ctx.GameState.Tokens.TokenRemoved.ForRound.Add(DealVengenceDamage); // if you have 3 animal if (await ctx.YouHave("3 animal")) { // damage may be dealt into adjacent lands landsWeCanApplyTheDamageTo.AddRange(ctx.Adjacent); } }
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); } } }
static public async Task ActAsync(TargetSpaceCtx ctx) { // add 2 disease var disease = ctx.Disease; await disease.Add(2); // for each disease in target land, defend 1 in target and all adjacent lands ctx.Defend(disease.Count); foreach (var adjacent in ctx.Adjacent) { ctx.Target(adjacent).Defend(disease.Count); } // if you have 2 earthn 4 animal: if (await ctx.YouHave("2 earth,4 animal")) { // 2 fear. ctx.AddFear(2); // For each disease in target land, do 1 damage in target or adjacent land int damage = disease.Count; var space = await ctx.Decision(new Select.Space($"Select space to apply {damage} damage", ctx.Range(1), Present.Always)); // can we wrap this and make it easier to call? await ctx.Target(space).DamageInvaders(damage); } }
static public async Task ActAsync(TargetSpaceCtx ctx) { // 6 fear ctx.AddFear(6); // +1 fear for each town/city and for each of your presence in target land. int fearCount = ctx.Tokens.SumAny(Invader.City, Invader.Town) + ctx.Self.Presence.Placed.Count(x => x == ctx.Space); ctx.AddFear(fearCount); // Remove 1 city, 1 town and 1 explorer. await ctx.RemoveInvader(Invader.City); await ctx.RemoveInvader(Invader.Town); await ctx.RemoveInvader(Invader.Explorer); // if you have 3 sun and 3 moon, invaders do -6 damage on their ravage. if (await ctx.YouHave("3 sun,3 moon")) { ctx.Defend(6); // !! not exactly correct but close } // Then, Invaders in target land ravage. await new RavageAction(ctx.GameState, ctx.Invaders).Exec(); }
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 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 public async Task ActAsync(TargetSpaceCtx ctx) { await DoPower(ctx); if (await ctx.YouHave("3 sun,2 water")) { await DoPower(await ctx.SelectAdjacentLand("Repeat power")); } }
static public async Task ActAsync(TargetSpaceCtx ctx) { await DoPowerAction(ctx); // if you have 3 water and 3 animal: repeat this power if (await ctx.YouHave("3 water,3 animal")) { await DoPowerAction(ctx); } }
static public async Task ActAsync(TargetSpaceCtx ctx) { // Defend 3 ctx.Defend(3); // if you have 2 earth: Defend +3 if (await ctx.YouHave("2 earth")) { ctx.Defend(3); } }
static public async Task Act(TargetSpaceCtx ctx) { await ctx.SelectActionOption( new SpaceAction("Defend 6", ctx => ctx.Defend(6)), new SpaceAction("Remove 1 blight", ctx => ctx.RemoveBlight()) // !! This condition changes state for Shifting Memories, only use inside SelectActionOption // Also, make sure there is actually blight there before asking spirit (Shifting Memory) if they want to commit 2 water .FilterOption(ctx.HasBlight && await ctx.YouHave("2 water")) ); }
static public async Task ActAsync(TargetSpaceCtx ctx) { if (ctx.IsOneOf(Terrain.Jungle, Terrain.Sand)) // ??? should we be using Power Filters here? { await ctx.RemoveBlight(); } if (await ctx.YouHave("3 plant")) { await ctx.Wilds.Add(1); } }
static async Task AddDiseaseAndStrife(TargetSpaceCtx ctx) { await ctx.Disease.Add(1); await ctx.AddStrife(); if (await ctx.YouHave("2 moon,3 fire")) { await ctx.AddStrife(); await ctx.AddStrife(); } }
static public async Task Act(TargetSpaceCtx ctx) { // 1 fear ctx.AddFear(1); // Push 1 explorer/town await ctx.Push(1, Invader.Explorer, Invader.Town); if (await ctx.YouHave("2 fire")) { ctx.AddFear(1); } }
static public async Task ActAsync(TargetSpaceCtx ctx) { // 6 fear ctx.AddFear(6); // destroy all invaders await ctx.Invaders.DestroyAny(int.MaxValue, Invader.City, Invader.Town, Invader.Explorer); // if you have (2 sun, 2 moon, 4 water, 4 earth): if (await ctx.YouHave("2 sun,2 moon,4 water,4 earth")) { await DestroyBoard(ctx, ctx.Space.Board); } }
static public async Task ActAsync(TargetSpaceCtx ctx) { await ctx.SelectActionOption( new SpaceAction( "Add strife. Invaders with strife deal Damage to other Invaders in target land.", AddStrifeThenStrifedInvadersDamageUnstrifed ) , new SpaceAction( "Instead, if Invaders Ravage in target land, damage invaders in adjacent lands instead of dahan" , DuringRavage_InvadersDamageInvadersInAdjacentLandsInsteadOfDahan ).FilterOption(await ctx.YouHave("4 sun,2 fire,2 animal")) ); }
static public async Task ActAsync(TargetSpaceCtx ctx) { await ctx.SelectActionOption( new SpaceAction( "Destroy 1 explorer", ctx => ctx.Invaders.Destroy(1, Invader.Explorer) ), new SpaceAction( "Destroy 1 town", ctx => ctx.Invaders.Destroy(1, Invader.Town) ).FilterOption(ctx.Tokens.Has(Invader.Town) && await ctx.YouHave("3 earth")) ); }
static public async Task Act(TargetSpaceCtx ctx) { // if you have 2 moon, you may instead replace 1 town with 1 dahan if (ctx.Tokens.Has(Invader.Town) && await ctx.YouHave("2 moon")) { await ctx.RemoveInvader(Invader.Town); // !!! ??? reports event? } else if (ctx.Tokens.Has(Invader.Explorer)) { // replace 1 explorer with 1 dahan await ctx.RemoveInvader(Invader.Explorer); // ??? reports event? } await ctx.Dahan.Add(1, AddReason.AsReplacement); }
static public async Task ActAsync(TargetSpaceCtx ctx) { // Defend 4 ctx.Defend(4); // Push up to 1 blight. await ctx.PushUpTo(4, TokenType.Blight); // If you have 2 sun: 1 fear if (await ctx.YouHave("2 sun")) { ctx.AddFear(1); } }