示例#1
0
    static public async Task ActAsync(TargetSpaceCtx ctx)
    {
        // For each adjacent land with your presence, 1 Damage to a different Invader.
        int count = ctx.Space.Adjacent.Count(s => ctx.Target(s).Presence.IsHere);
        await ctx.Apply1DamageToDifferentInvaders(count);

        // Push 2 dahan
        await ctx.PushDahan(2);
    }
    static public Task Option2(TargetSpaceCtx ctx)
    {
        int count = ctx.Space.Adjacent.Count(a => ctx.Target(a).Presence.IsHere);

        return(ctx.Apply1DamageToDifferentInvaders(count));
    }
 static public Task Act(TargetSpaceCtx ctx)
 {
     return(ctx.SelectActionOption(
                new SpaceAction($"Each dahan deals 1 damage to a different invader", ctx => ctx.Apply1DamageToDifferentInvaders(ctx.Dahan.Count)),
                new SpaceAction("push up to 3 dahan", ctx => ctx.PushUpToNDahan(3))
                ));
 }