Example #1
0
    // Extension to SpiritGameStateCtx
    public static async Task <Space> AddStrifeToOne(this SelfCtx spirit, IEnumerable <Space> options, params TokenClass[] groups)
    {
        bool HasInvaders(Space s) => spirit.Target(s).HasInvaders;

        TargetSpaceCtx spaceCtx = await spirit.SelectSpace("Add strife", options.Where(HasInvaders));

        if (spaceCtx != null)
        {
            await spaceCtx.AddStrife(groups);
        }
        return(spaceCtx?.Space);
    }
Example #2
0
    static async Task <Space> DamagePerDahanOnOne(List <Space> options, SelfCtx spirit)
    {
        var spaceCtx = await spirit.SelectSpace("1 damage per dahan", options);

        if (spaceCtx != null)
        {
            await spaceCtx.DamageInvaders(spaceCtx.Dahan.Count);

            return(spaceCtx.Space);
        }
        return(null);
    }
Example #3
0
    static async Task Add1WildsToOneOfYourLands(SelfCtx ctx)
    {
        var spaceCtx = await ctx.SelectSpace("Add 1 Wilds", ctx.Self.Presence.Spaces);

        await spaceCtx.Wilds.Add(1);
    }