Example #1
0
    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);
        }
    }
Example #2
0
 static public Task ActAsync(TargetSpaceCtx ctx)
 {
     return(ctx.SelectActionOption(
                new SpaceAction("1 damage to each town/city", ctx => ctx.DamageEachInvader(1, Invader.City, Invader.Town)),
                new SpaceAction("defend 10", ctx => ctx.Defend(10))
                ));
 }
Example #3
0
    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);
            }
        }
    }
 static public Task ActAsync(TargetSpaceCtx ctx)
 {
     return(ctx.SelectActionOption(
                new SpaceAction("1 damage to each invader"
                                , ctx => ctx.DamageEachInvader(1)
                                ).Matches(x => x.Disease.Any),
                new SpaceAction("1 fear and 1 disease", ctx => { ctx.AddFear(1); ctx.Disease.Add(1); return Task.CompletedTask; })
                .Matches(x => x.IsOneOf(Terrain.Mountain, Terrain.Wetland))
                ));
 }
    static public async Task ActAsync(TargetSpaceCtx ctx)
    {
        // 1 fear
        ctx.AddFear(1);

        // 1 damage to each invader.
        await ctx.DamageEachInvader(1);

        // 1 damage to each dahan.
        await ctx.Apply1DamageToEachDahan();
    }
 static public Task ActAsync(TargetSpaceCtx ctx)
 {
     return(ctx.SelectActionOption(
                new SpaceAction("1 damage to each town / city. Push 1 town.", async ctx => {
         // 1 damage to each town / city.
         await ctx.DamageEachInvader(1, Invader.Town, Invader.City);
         // push up to 1 town.
         await ctx.PushUpTo(1, Invader.Town);
     }),
                Cmd.DestroyTown(1)
                ));
 }
    public static async Task ActAsync(TargetSpaceCtx ctx)
    {
        // 1 Damage to each town / city / dahan.
        await ctx.DamageEachInvader(1, Invader.Town, Invader.City);

        await ctx.Apply1DamageToEachDahan();

        // 1 Damage
        await ctx.DamageInvaders(1);

        // 1 Damage to dahan.
        await ctx.DamageDahan(1);
    }
 static public async Task ActionAsync(TargetSpaceCtx ctx)
 {
     // If target land is mountain or sand,
     if (ctx.IsOneOf(Terrain.Mountain, Terrain.Sand))
     {
         // instead 1 damange to EACH town/city
         await ctx.DamageEachInvader(1, Invader.City, Invader.Town);
     }
     else
     {
         await ctx.DamageInvaders(1, Invader.Town, Invader.City);
     }
 }
    public static async Task ActAsync(TargetSpaceCtx ctx)
    {
        // add 1 badland.
        await ctx.Badlands.Add(1);

        // Push all dahan.
        await ctx.PushDahan(ctx.Dahan.Count);

        // 1 damage to each invader.
        // if the original land is your sacredsite, +1 Damage to each invader
        int damageToEach = ctx.Presence.IsSelfSacredSite ? 2: 1;         // !!! not correct if they use a range extender

        await ctx.DamageEachInvader(damageToEach);

        // if you have 2 sun 3 fire 3 earh: Repeat this power
    }
Example #10
0
    static public async Task Act(TargetSpaceCtx ctx)
    {
        // Destroy 3 towns.
        await ctx.Invaders.Destroy(3, Invader.Town);

        // 1 damage to each town/city
        await ctx.DamageEachInvader(1, Invader.Town, Invader.City);

        // add 1 blight
        await ctx.AddBlight(1);

        // if you have 3 sun, destroy 1 city
        if (await ctx.YouHave("3 sun"))
        {
            await ctx.Invaders.Destroy(1, Invader.City);
        }
    }
    static public async Task ActAsync(TargetSpaceCtx ctx)
    {
        // add 1 disease
        await ctx.Disease.Add(1);

        // if you have 2 water and 2 plant:  1 dmaage to each invader (doing this first because our smart-damage result will be better)
        if (await ctx.YouHave("2 water,2 plant"))
        {
            await ctx.DamageEachInvader(1);
        }

        // if target land is J/W, 2 fear and 3 damage
        if (ctx.IsOneOf(Terrain.Jungle, Terrain.Wetland))
        {
            ctx.AddFear(3);
            await ctx.DamageInvaders(3);
        }
    }
Example #12
0
    static public async Task ActAsync(TargetSpaceCtx ctx)
    {
        int startingTownsAndCities = ctx.Tokens.TownsAndCitiesCount();

        // 1 damage to each invader
        await ctx.DamageEachInvader(1);

        // if you have 2 moon 3 air 2 water
        if (await ctx.YouHave("2 moon,3 air,2 water"))
        {
            // 3 damage
            await ctx.DamageInvaders(3);
        }

        // 1 fear per town/city this power destroys (to a max of 4)
        int destroyedTownsAndCities = startingTownsAndCities - ctx.Tokens.TownsAndCitiesCount();

        ctx.AddFear(destroyedTownsAndCities);
    }
Example #13
0
 static public async Task ActAsync(TargetSpaceCtx ctx)
 {
     // 1 damange to each invader.
     await ctx.DamageEachInvader(1);
 }
 static public Task Option4(TargetSpaceCtx ctx)
 {
     return(ctx.DamageEachInvader(1));
 }
    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))
                                         );
        }
    }
Example #16
0
 static public async Task Option3Async(TargetSpaceCtx ctx)
 {
     await ctx.DamageEachInvader(2);
 }