コード例 #1
0
    static public Task ActAsync(TargetSpaceCtx ctx)
    {
        // Gather 1 explorer, if target land is the ocean, you may gather another explorer
        int count = ctx.Space.IsOcean ? 2 : 1;

        return(ctx.GatherUpTo(count, Invader.Explorer));
    }
コード例 #2
0
 public static Task ActAsync(TargetSpaceCtx ctx)
 {
     return(ctx.SelectActionOption(
                new SpaceAction("Gather 1 explorer/town", ctx => ctx.GatherUpTo(1, Invader.Explorer, Invader.Town)),
                new SpaceAction("Gather up to 2 dahan", ctx => ctx.GatherUpToNDahan(2))
                ));
 }
コード例 #3
0
 static async Task GatherLike(TargetSpaceCtx ctx, TokenClass tokenTypeOfInterest)
 {
     if (ctx.Tokens.HasAny(tokenTypeOfInterest))
     {
         await ctx.GatherUpTo(1, tokenTypeOfInterest);
     }
 }
コード例 #4
0
    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);
            }
        }
    }
コード例 #5
0
    public static async Task ActAsync(TargetSpaceCtx ctx)
    {
        // you may gather 1 beast
        await ctx.GatherUpTo(1, TokenType.Beast);

        if (ctx.Beasts.Any)
        {
            ctx.Skip1Build();
        }
    }
コード例 #6
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);
        }
    }
コード例 #7
0
 static public async Task Option4(TargetSpaceCtx ctx)
 {
     // if target land has beasts
     if (ctx.Beasts.Any)
     {
         // 2 damage
         await ctx.DamageInvaders(2);
     }
     else         // otherwise, you may gather 1 beast
     {
         await ctx.GatherUpTo(1, TokenType.Beast);
     }
 }
コード例 #8
0
    static public async Task ActAsync(TargetSpaceCtx ctx)
    {
        // Gather up to 1 Blight
        await ctx.GatherUpTo(1, TokenType.Blight);

        // Isolate target land.
        ctx.Isolate();

        // When blight is added to target land, it doesn't cascade.
        ctx.GameState.ModifyBlightAddedEffect.ForRound.Add(x => {
            if (x.Space == ctx.Space)
            {
                x.Cascade = false;
            }
        });
    }
コード例 #9
0
    public static async Task ActAsync(TargetSpaceCtx ctx)
    {
        // add 1 beast
        await ctx.Beasts.Add(1);

        // Gather up to 1 beast.
        await ctx.GatherUpTo(1, TokenType.Beast);

        // if you have 2 air 2 earth 3 animal: after this power causes invaders to skip an action, 4 damage.
        Func <GameState, Space, Task> causeAdditionalDamage = await ctx.YouHave("2 air,3 animal")
                        ? (GameState gs, Space space) => ctx.Self.BindMyPower(gs).Target(space).DamageInvaders(4)
                        : null;

        // For each beast,
        int count = ctx.Beasts.Count;

        // 1 fear (max 4) and
        ctx.AddFear(System.Math.Min(4, count));
        for (int i = 0; i < count; ++i)
        {
            // Invaders skip one Action in target land.
            string skipPhase = await ctx.Self.SelectText($"Select Invader Phase to skip.({i+1} of {count})", new[] { "Ravage", "Build", "Explore" }, Present.Always);

            switch (skipPhase)
            {
            case "Ravage": ctx.SkipRavage(causeAdditionalDamage); break;

            case "Build": ctx.Skip1Build(causeAdditionalDamage); break;

            case "Explore": ctx.SkipExplore(causeAdditionalDamage); break;
            }
        }

        // !!! Issue 1 - Shouldn't be able to skip ravage twice if there is only 1 ravage occurring
        // !!! Issue 2 - Shouldn't be able to skip actions that don't happen
        // !!! Issue 3 - Shouldn't have to pick action until it happens.
        // This will help limit damage to 4 instead of 4 * # of beasts.
        // !!! If there are multiple 'skips' players should be able to decide which ones to take and in which order.
    }
コード例 #10
0
    public static async Task ActAsync(TargetSpaceCtx ctx)
    {
        // Add 2 badlands
        await ctx.Badlands.Add(2);

        // Gather up to 2 beast
        await ctx.GatherUpTo(2, TokenType.Beast);

        // (watch for invaders destroyed in this land)
        int destroyed = 0;

        // the only way a token will be removed, is if it is destroyed - !!! single player mode only
        ctx.GameState.Tokens.TokenRemoved.ForRound.Add((args) => destroyed++);

        // 1 damamge per blight/beast/wilds.
        await ctx.DamageInvaders(ctx.Blight.Count + ctx.Beasts.Count + ctx.Wilds.Count);

        // if you have 2 fire, 3 air, 2 animal
        if (await ctx.YouHave("2 fire,3 air,2 animal"))
        {
            // 2 fear per invader destroyed by this Power (max 8 fear)
            ctx.AddFear(System.Math.Min(8, destroyed * 2));
        }
    }
コード例 #11
0
        static async Task ApplyPowerOnTarget(TargetSpaceCtx ctx)
        {
            // add 1 blight.
            await ctx.AddBlight(1);

            // Add 2 beasts
            var beasts = ctx.Beasts;
            await beasts.Add(2);

            // Gather up to 2 beasts
            await ctx.GatherUpTo(2, TokenType.Beast);

            // each beast deals:
            // 1 fear
            ctx.AddFear(beasts.Count);
            // 2 damage to invaders
            await ctx.DamageInvaders(beasts.Count * 2);

            // and 2 damage to dahan.
            await ctx.DamageDahan(beasts.Count);

            // Destroy 1 beast.
            await beasts.Destroy(1);
        }
コード例 #12
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);
        });
    }
コード例 #13
0
 static public Task Option1(TargetSpaceCtx ctx)
 {
     return(ctx.GatherUpTo(1, TokenType.Beast));
 }
コード例 #14
0
ファイル: RagingHunt.cs プロジェクト: rettigcd/spiritisland
 static public Task Gather(TargetSpaceCtx ctx) => ctx.GatherUpTo(1, TokenType.Beast);
コード例 #15
0
 static public Task Option2(TargetSpaceCtx ctx)
 {
     return(ctx.GatherUpTo(ctx.Self.Elements[Element.Air], TokenType.Beast));
 }
コード例 #16
0
 static public Task Option2(TargetSpaceCtx ctx)
 {
     return(ctx.GatherUpTo(3, Invader.Explorer));
 }
コード例 #17
0
 public static async Task Gather1Explorer(TargetSpaceCtx ctx)
 {
     await ctx.GatherUpTo(1, Invader.Explorer);
 }
コード例 #18
0
 static public Task Option1(TargetSpaceCtx ctx)
 {
     return(ctx.GatherUpTo(1, TokenType.Dahan, Invader.Explorer));
 }
コード例 #19
0
    static public async Task Act(TargetSpaceCtx ctx)
    {
        await ctx.GatherUpTo(2, Invader.Explorer);

        await ctx.GatherUpToNDahan(2);
    }
コード例 #20
0
 public static Task ActAsync(TargetSpaceCtx ctx)
 {
     // Gather 1 explorer or town
     return(ctx.GatherUpTo(1, Invader.Explorer, Invader.Town));
 }