コード例 #1
0
 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);
     }
 }
コード例 #2
0
    public static Task ActAsync(TargetSpaceCtx ctx)
    {
        // defend 1
        ctx.Defend(1);

        // if target land is J/S, instead defend 4
        if (ctx.IsOneOf(Terrain.Jungle, Terrain.Sand))
        {
            ctx.Defend(4 - 1);             // -1 is from defend already done above
        }
        return(Task.CompletedTask);
    }
コード例 #3
0
    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();
    }
コード例 #4
0
    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);
        }
    }
コード例 #5
0
 static public Task ActAsync(TargetSpaceCtx ctx)
 {
     return(ctx.SelectActionOption(
                new SpaceAction("Defend 4", ctx => ctx.Defend(4)),
                new SpaceAction("Invaders added to target are immediately pushed", PushFutureInvadersFromLands)
                ));
 }
コード例 #6
0
    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);
        }
    }
コード例 #7
0
 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))
                ));
 }
コード例 #8
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))
                ));
 }
コード例 #9
0
    static public async Task Act(TargetSpaceCtx ctx)
    {
        // remove 1 blight
        await ctx.RemoveBlight();

        // defend 4
        ctx.Defend(4);
    }
コード例 #10
0
 static public Task Option1(TargetSpaceCtx ctx)
 {
     if (2 <= ctx.Beasts.Count)
     {
         ctx.AddFear(2);
         ctx.Defend(2);
     }
     return(Task.CompletedTask);
 }
コード例 #11
0
    static public async Task ActAsync(TargetSpaceCtx ctx)
    {
        // 1 fear and defend 6
        ctx.AddFear(1);
        ctx.Defend(6);

        // replace 1 city with 1 town OR 1 town with 1 explorer
        await ReplaceInvader.Downgrade(ctx, Invader.City, Invader.Town);
    }
コード例 #12
0
    static public Task Act(TargetSpaceCtx ctx)
    {
        // defend 3
        ctx.Defend(3);

        // During Ravage, dahan in target land deal damage simultaneiously with invaders
        ctx.GameState.ModifyRavage(ctx.Space, cfg => cfg.RavageSequence = SimultaneousDamage);

        return(Task.CompletedTask);
    }
コード例 #13
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"))
         );
 }
コード例 #14
0
    static public async Task Act(TargetSpaceCtx ctx)
    {
        // defend 2
        ctx.Defend(2);

        // if no invaders are present, gather 2 explorers
        if (!ctx.HasInvaders)
        {
            await ctx.GatherUpTo(2, Invader.Explorer);
        }
    }
コード例 #15
0
    static public Task Act(TargetSpaceCtx ctx)
    {
        // 2 fear
        ctx.AddFear(2);

        // if target is M/J, Defend 3
        if (ctx.IsOneOf(Terrain.Jungle, Terrain.Mountain))
        {
            ctx.Defend(3);
        }

        return(Task.CompletedTask);
    }
コード例 #16
0
 static public Task Option4(TargetSpaceCtx ctx)
 {
     if (5 <= ctx.Beasts.Count)
     {
         ctx.AddFear(6);
         ctx.Defend(10);
         return(Task.CompletedTask);
     }
     else
     {
         return(Option3(ctx));
     }
 }
コード例 #17
0
 static public Task Option2(TargetSpaceCtx ctx)
 {
     if (3 <= ctx.Beasts.Count)
     {
         ctx.AddFear(3);
         ctx.Defend(4);
         return(Task.CompletedTask);
     }
     else
     {
         return(Option1(ctx));
     }
 }
コード例 #18
0
    static public Task ActAsync(TargetSpaceCtx ctx)
    {
        // 1 fear
        ctx.AddFear(1);
        // Defend 3
        ctx.Defend(3);
        // If beast are present, +2 fear.
        if (ctx.Beasts.Any)
        {
            ctx.AddFear(2);
        }

        return(Task.CompletedTask);
    }
コード例 #19
0
    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);
        }
    }
コード例 #20
0
    static public async Task ActAsync(TargetSpaceCtx ctx)
    {
        // 1 fear.
        ctx.AddFear(1);

        // Defend 5.
        ctx.Defend(5);

        // If you have 3 moon:  Add 1 Beast
        if (await ctx.YouHave("3 moon"))
        {
            await ctx.Beasts.Add(1);
        }
    }
コード例 #21
0
    static public async Task ActAsync(TargetSpaceCtx ctx)
    {
        // destroy 1 explorer
        await ctx.Invaders.Destroy(1, Invader.Explorer);

        // and 1 dahan
        await ctx.DestroyDahan(1);

        // add 1 wilds
        await ctx.Wilds.Add(1);

        // defend 2
        ctx.Defend(2);
    }
コード例 #22
0
    static public Task ActAsync(TargetSpaceCtx ctx)
    {
        // Defend 1 per dahan  (protects the land)
        ctx.Defend(ctx.Dahan.Count);

        // dahan in target land cannot be changed. (when they would be damaged, destroyed, removed, replaced, or moved, instead don't)
        ctx.Tokens.Dahan.Frozen = true;

        ctx.GameState.TimePasses_ThisRound.Push((gs) => {
            gs.Tokens[ctx.Space].Dahan.Frozen = false;
            return(Task.CompletedTask);
        });

        return(Task.CompletedTask);
    }
コード例 #23
0
    public static async Task ActAsync(TargetSpaceCtx ctx)
    {
        // 3 fear.
        ctx.AddFear(3);
        // Defend 6
        ctx.Defend(6);

        // this turn, Invdaders in target land skip the next Build Action.
        ctx.Skip1Build();

        // if you have 3 sun 2 moon 2 plant
        if (await ctx.YouHave("3 sun,2 moon,2 plant"))
        {
            // 1 damage per sun you have.
            await ctx.DamageInvaders(ctx.Self.Elements[Element.Sun]);
        }
    }
コード例 #24
0
    static public async Task ActAsync(TargetSpaceCtx ctx)
    {
        // 1 fear.
        ctx.AddFear(1);

        // up to 3 Damaged Invaders do not participate in Ravage.
        var doNotParticipate = new SpaceAction(
            "up to 3 damaged Invaders do not participate in Ravage",
            SelectUpTo3DamagedInvadersToNotParticipate
            );
        // Defend 1 per presence you have in target land (when this Power is used).
        var defend = new SpaceAction(
            "Defend 1 per presence you have in target land",             // (when power is used)
            ctx => ctx.Defend(ctx.Presence.Count)
            );

        await ctx.SelectActionOption(doNotParticipate, defend);
    }
コード例 #25
0
    public static Task ActAsync(TargetSpaceCtx ctx)
    {
        // defend 2 in target land and all adjacent lands.
        int defense = 2;         // Defense 2

        // For every presence on your Deep Slumber track, Defend 1 in target land and all adjacent lands.
        if (ctx.Self.Presence is SerpentPresence sp)              // don't crash if card was gifted to someone else
        {
            defense += sp.AbsorbedPresences.Count;
        }

        ctx.Defend(defense);
        foreach (var adj in ctx.Adjacent)
        {
            ctx.Target(adj).Defend(defense);
        }

        return(Task.CompletedTask);
    }
コード例 #26
0
    static public async Task ActAsync(TargetSpaceCtx ctx)
    {
        // add 1 presence in target land even if you normally could not due to land type.
        await ctx.PlacePresenceHere();

        // Defend 20
        ctx.Defend(20);

        // if you have 2 sun, 3 earth,
        if (await ctx.YouHave("2 sun,3 earth"))
        {
            // 3 fear if invaders are present,
            if (ctx.HasInvaders)
            {
                ctx.AddFear(3);
            }

            // Invaders skip all actions in target land this turn.
            ctx.SkipAllInvaderActions();
        }
    }
コード例 #27
0
    static public async Task ActionAsync(TargetSpaceCtx ctx)
    {
        // for each dahan in target land, 1 damage and defend 2

        // -- damage --
        await ctx.DamageInvaders(ctx.Dahan.Count);

        // if you have 2 sun, 2 earth, 2 plant
        if (await ctx.YouHave("2 sun, 2 earth, 2 plant"))
        {
            // you may push up to 2 dahan
            Space[] dest = await ctx.PushUpToNDahan(2);

            // defend pushed
            foreach (var d in dest)
            {
                ctx.Target(d).Defend(2);
            }
        }

        // -- defend remaining --
        ctx.Defend(ctx.Dahan.Count * 2);
    }
コード例 #28
0
    public static async Task ActAsync(TargetSpaceCtx ctx)
    {
        // if you have 3 sun 2 air:
        if (await ctx.YouHave("3 sun,2 air"))
        {
            // first gather up to 2 explorer/town/dahan
            await ctx.GatherUpTo(2, Invader.Explorer, Invader.Town, TokenType.Dahan);
        }

        // 1 damage per dahan/explorer, to towns/cities only
        await ctx.DamageInvaders(
            ctx.Dahan.Count + ctx.Tokens.Sum(Invader.Explorer),
            Invader.Town, Invader.City
            );

        // Defend 2.
        ctx.Defend(2);

        // During Ravage Actions, explorer fight alongside dahan. (Deal/take Damage at the same time, and to/from the same source.)
        ctx.GameState.ModifyRavage(ctx.Space, cfg => {
            cfg.IsAttacker = (token) => token.Class.IsOneOf(Invader.Town, Invader.City);
            cfg.IsDefender = (token) => token.Class.IsOneOf(Invader.Explorer, TokenType.Dahan);
        });
    }
コード例 #29
0
 static public Task Option1(TargetSpaceCtx ctx)
 {
     ctx.Defend(2);
     return(Task.CompletedTask);
 }
コード例 #30
0
 static public Task Option3(TargetSpaceCtx ctx)
 {
     ctx.Defend(ctx.GameState.InvaderDeck.CountInDiscard * 2);
     return(Task.CompletedTask);
 }