static public async Task ActAsync(TargetSpaceCtx ctx)
    {
        // 6 fear
        ctx.AddFear(6);

        // +1 fear for each town/city and for each of your presence in target land.
        int fearCount = ctx.Tokens.SumAny(Invader.City, Invader.Town)
                        + ctx.Self.Presence.Placed.Count(x => x == ctx.Space);

        ctx.AddFear(fearCount);

        // Remove 1 city, 1 town and 1 explorer.
        await ctx.RemoveInvader(Invader.City);

        await ctx.RemoveInvader(Invader.Town);

        await ctx.RemoveInvader(Invader.Explorer);

        // if you have 3 sun and 3 moon, invaders do -6 damage on their ravage.
        if (await ctx.YouHave("3 sun,3 moon"))
        {
            ctx.Defend(6);               // !! not exactly correct but close
        }
        // Then, Invaders in target land ravage.
        await new RavageAction(ctx.GameState, ctx.Invaders).Exec();
    }
Esempio n. 2
0
 static public async Task Act(TargetSpaceCtx ctx)
 {
     // if you have 2 moon, you may instead replace 1 town with 1 dahan
     if (ctx.Tokens.Has(Invader.Town) && await ctx.YouHave("2 moon"))
     {
         await ctx.RemoveInvader(Invader.Town);               // !!! ??? reports event?
     }
     else if (ctx.Tokens.Has(Invader.Explorer))
     {
         // replace 1 explorer with 1 dahan
         await ctx.RemoveInvader(Invader.Explorer);               // ??? reports event?
     }
     await ctx.Dahan.Add(1, AddReason.AsReplacement);
 }