Exemplo n.º 1
0
    static public async Task Act(TargetSpiritCtx ctx)
    {
        // If dahan are pushed to your ocean, you may move them to any costal land instead of drowning them.
        ctx.GameState.Tokens.TokenMoved.ForRound.Add(PushDahanOutOfOcean);
        async Task PushDahanOutOfOcean(TokenMovedArgs args)
        {
            if (args.Token.Class != TokenType.Dahan)
            {
                return;
            }
            if (!args.AddedTo.IsOcean)
            {
                return;
            }
            await ctx.Target(args.AddedTo).PushUpToNDahan(args.Count);
        }

        // target spirit gains 2 energy
        ctx.Other.Energy += 2;

        // and may push 1 town and up to 2 dahan from one of their lands.
        var pushLand = await ctx.OtherCtx.TargetLandWithPresence("Select land to push town and 2 dahan");

        await pushLand
        .Pusher
        .AddGroup(1, Invader.Town)
        .AddGroup(2, TokenType.Dahan)
        .MoveUpToN();
    }
    public static async Task ActAsync(TargetSpiritCtx ctx)
    {
        // Target Spirt may choose one of their Sacred Sites.
        var space = await ctx.OtherCtx.Presence.SelectSacredSite("Replace presence with badlands");

        await TargetSpiritActions(ctx.OtherCtx.Target(space));

        // if you have 3 moon,2 fire,2 air:
        if (await ctx.YouHave("3 moon,2 fire,2 air"))
        {
            var sCtx = ctx.Target(space);
            // 1 damage in an adjactnt land.
            await DamageInAdjacentLand(sCtx);

            // 1 damage in an adjactnt land.
            await DamageInAdjacentLand(sCtx);
        }
    }