예제 #1
0
 static public Task ActAsync(TargetSpaceCtx ctx)
 {
     return(ctx.SelectActionOption(
                new SpaceAction("remove 1 blight", ctx => ctx.RemoveBlight()),
                new SpaceAction("push up to 3 dahan", ctx => ctx.PushUpToNDahan(3))
                ));
 }
예제 #2
0
 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)
                ));
 }
예제 #3
0
    static async Task ActInnerAsync(TargetSpaceCtx ctx)
    {
        bool hasDahan    = ctx.Dahan.Any;
        bool hasInvaders = ctx.HasInvaders;

        // If no dahan / Invaders are present: Remove 1 blight.
        if (!hasDahan && !hasInvaders)
        {
            await ctx.RemoveBlight();
        }

        // If invaders are present: they Build, then Ravage
        if (hasInvaders)
        {
            await ctx.GameState.GetBuildEngine()
            .Exec(
                new BuildingEventArgs(ctx.GameState, new Dictionary <Space, BuildingEventArgs.BuildType>()),
                ctx.Tokens,
                ctx.GameState
                );

            await new RavageAction(ctx.GameState, ctx.Invaders).Exec();
        }

        // If dahan are present: Add 1 dahan. Push up to 2 dahan.
        if (hasDahan)
        {
            await ctx.Dahan.Add(1);

            await ctx.PushUpToNDahan(2);
        }
    }
예제 #4
0
    static public async Task Act(TargetSpaceCtx ctx)
    {
        // remove 1 blight
        await ctx.RemoveBlight();

        // defend 4
        ctx.Defend(4);
    }
예제 #5
0
 static public async Task ActAsync(TargetSpaceCtx ctx)
 {
     // if ther are 2 blight or fewer in target land, remove 1 blight
     if (ctx.Blight <= 2)
     {
         await ctx.RemoveBlight();
     }
 }
예제 #6
0
 static public async Task Option1(TargetSpaceCtx ctx)
 {
     // if target
     if (2 <= ctx.Tokens[TokenType.Blight])
     {
         await ctx.RemoveBlight();
     }
 }
예제 #7
0
 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"))
         );
 }
예제 #8
0
 static public async Task ActAsync(TargetSpaceCtx ctx)
 {
     if (ctx.Dahan.Any)
     {
         await ctx.Dahan.Add(1);
     }
     else
     {
         await ctx.RemoveBlight();
     }
 }
예제 #9
0
    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))
                   ));
    }
예제 #10
0
    static public async Task ActAsync(TargetSpaceCtx ctx)
    {
        if (ctx.HasInvaders)
        {
            ctx.AddFear(1);
        }

        if (ctx.HasBlight && ctx.IsOneOf(Terrain.Sand, Terrain.Wetland))
        {
            await ctx.RemoveBlight();
        }
    }
예제 #11
0
    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);
        }
    }
예제 #12
0
    static public async Task ActionAsync(TargetSpaceCtx ctx)
    {
        int explorerCount = ctx.Tokens.Sum(Invader.Explorer);

        if (0 < explorerCount)
        {
            await ctx.Push(explorerCount, Invader.Explorer);
        }
        else
        {
            await ctx.RemoveBlight();
        }
    }
예제 #13
0
    static public async Task ActAsync(TargetSpaceCtx ctx)
    {
        int blightCount = ctx.Blight;

        // if target land has no blight, add 1 beast
        if (blightCount == 0)
        {
            await ctx.Beasts.Add(1);
        }

        // if target land has exactly 1 blight, remove it
        if (blightCount == 1)
        {
            await ctx.RemoveBlight();
        }
    }
예제 #14
0
    static public async Task ActAsync(TargetSpaceCtx ctx)
    {
        // 2 fear, 4 damage
        int damageToInvaders = 4;

        ctx.AddFear(2);

        if (await ctx.YouHave("3 sun,2 water,3 plant"))
        {
            // +5 damage, remove 1 blight
            damageToInvaders += 5;
            await ctx.RemoveBlight();
        }

        await ctx.DamageInvaders(damageToInvaders);
    }
예제 #15
0
    static public async Task ActAsync(TargetSpaceCtx ctx)
    {
        // 4 damage
        int damage = 4;

        // remove 1 blight
        await ctx.RemoveBlight();

        // if you have 4 water, +10 damage
        if (await ctx.YouHave("4 water"))
        {
            damage += 10;
        }

        await ctx.DamageInvaders(damage);
    }
    public static async Task ActAsync(TargetSpaceCtx ctx)
    {
        // remove up to 3 blight
        await ctx.RemoveBlight(3);

        // and up to 3 health worth of invaders
        await Cmd.RemoveUpToNHealthOfInvaders(3).Execute(ctx);

        // if you have 3 moon, 2 water  3 earth 2 plant
        if (await ctx.YouHave("3 moon,2 water,3 earth,2 plant"))
        {
            // Not implemented!!!

            // Max. (1x/game) add a random new island board next to target board ignore its setup icons.
            // add 2 beast, 2 wilds, 2 badlands and up to 2 presence (from any Spirits) anywhere on it.
            // from now on Build Cards and Each board / Each land" Adversary Actions skip 1 board.
        }
    }
예제 #17
0
    static public async Task ActAsync(TargetSpiritCtx ctx)
    {
        TargetSpaceCtx toCtx = await AddPresenceAndWilds(ctx.OtherCtx);

        // if you have 3 sun, 3 plant
        if (await ctx.YouHave("3 sun,3 plant"))
        {
            // in that land add 1 additional wilds
            await toCtx.Wilds.Add(1);

            // and remove 1 blight.
            var blight = toCtx.Blight;
            if (blight.Any)
            {
                await toCtx.RemoveBlight();
            }

            // Target Spirit gains a power card.
            await ctx.Self.Draw(ctx.GameState);
        }
    }
예제 #18
0
 static public Task Option2(TargetSpaceCtx ctx)
 {
     return(ctx.RemoveBlight());
 }
예제 #19
0
 static public Task Option3Async(TargetSpaceCtx ctx)
 {
     Option2Async(ctx);
     // also remove 1 blight
     return(ctx.RemoveBlight());
 }
예제 #20
0
    static public async Task Option3(TargetSpaceCtx ctx)
    {
        await ctx.RemoveBlight();

        await ctx.RemoveBlight();
    }