static public async Task Option1(TargetSpaceCtx ctx)
    {
        var spiritOptions = ctx.GameState.Spirits.Where(s => s.Presence.IsOn(ctx.Space)).ToArray();

        if (spiritOptions.Length > 0)
        {
            return;
        }
        var spirit = await ctx.Decision(new Select.Spirit("Select spirit to gain a power card", spiritOptions));

        await ctx.TargetSpirit(spirit).OtherCtx.Draw();
    }
Example #2
0
    static public async Task ActAsync(TargetSpaceCtx ctx)
    {
        // A Spirit with presence on target board may add 1 of their Destroyed presence.
        var spiritOptions = ctx.GameState.Spirits.Where(s => s.Presence.Spaces.Any(s => s.Board == ctx.Space.Board) && 0 < s.Presence.Destroyed).ToArray();

        var other = await ctx.Decision(new Select.Spirit(Name, spiritOptions, Present.AutoSelectSingle));

        if (other != null)
        {
            await ctx.TargetSpirit(other).OtherCtx.Target(ctx.Space).Presence.PlaceDestroyedHere();
        }

        // Gather up to 2 dahan.
        await ctx.GatherUpToNDahan(2);

        // Push 1 blight.
        await ctx.Push(1, TokenType.Blight);
    }