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 Task ActAsync(TargetSpaceCtx ctx) { return(ctx.SelectActionOption( Cmd.AddBadlands(1), // If wilds and Invaders are present, 1 fear and 1 Damage. new SpaceAction("1 fear and 1 Damage", async ctx => { ctx.AddFear(1); await ctx.DamageInvaders(1); }) .Matches(x => x.Wilds.Any && x.HasInvaders) )); }