Пример #1
0
    public static async Task ActAsync(SelfCtx ctx)
    {
        // Your presence may count as badlands and beast.
        int PresenceAsToken(GameState _, Space space) => ctx.Self.Presence.CountOn(space);

        ctx.GameState.Tokens.RegisterDynamic(PresenceAsToken, TokenType.Badlands, false);
        ctx.GameState.Tokens.RegisterDynamic(PresenceAsToken, TokenType.Beast, false);
        // (Decide per presence, per action) ... Not doing this bit exactly, both are always present, but can't be destroyed.

        // your presence cannot move.
        // !!! not implemented

        // if you have 2 plant 3 animal:
        if (await ctx.YouHave("2 plant,3 animal"))
        {
            // 2 fear and
            ctx.AddFear(2);
            // 2 damamge in one of your lands.
            var space = await ctx.Decision(new Select.Space("2 damage", ctx.Self.Presence.Spaces, Present.Always));

            if (space != null)
            {
                await ctx.Target(space).DamageInvaders(2);
            }
        }
    }
Пример #2
0
    public static async Task ActAsync(SelfCtx ctx)
    {
        // Gain a Minor Power.
        // If you have 4 moon, You may gain a Major Power instead of a Minor Power.
        if (await ctx.YouHave("4 moon"))
        {
            await ctx.Draw();
        }
        else
        {
            await ctx.DrawMinor();
        }

        // You may Forget this Power Card to gain 3 Energy.
        var thisCard = ctx.Self.InPlay.SingleOrDefault(x => x.Name == ShapeTheSelfAnew.Name);

        if (thisCard != null &&      // might have already been forgotten when picking a major card.
            await ctx.Self.UserSelectsFirstText("Forget this card for +3 energy.", "Yes, forget it.", "no thanks.")
            )
        {
            // Forget this Power Card
            ctx.Self.Forget(thisCard);

            // gain 3 energy
            ctx.Self.Energy += 3;
        }
    }
Пример #3
0
 public static async Task ActAsync(SelfCtx ctx)
 {
     await ctx.SelectActionOption(
         GainEnergy,
         ConvertEnergyToDamage,
         // if you have 2 sun,3 fire: You may do both.
         Cmd.Multiple( "Do Both", GainEnergy, ConvertEnergyToDamage )
         .FilterOption(await ctx.YouHave("2 sun,3 fire"))
         );
 }
 protected override async Task <int> CalcRange(SelfCtx ctx) => range
 + (await ctx.YouHave(triggeringElements) ? extension : 0);
Пример #5
0
 protected override async Task <int> CalcRange(SelfCtx ctx) => range
 // 3 plant    this power has +1 range
 + (await ctx.YouHave("3 plant") ? 1 : 0)
 // 1 air      this power has +1 range
 + (await ctx.YouHave("1 air") ? 1 : 0);