Exemple #1
0
    static public Task ActAsync(TargetSpaceCtx ctx)
    {
        int countToDestroy = ctx.IsOneOf(Terrain.Jungle, Terrain.Wetland)
                        ? int.MaxValue
                        : 1;

        return(ctx.Invaders.Destroy(countToDestroy, Invader.Explorer));
    }
Exemple #2
0
    public static Task ActAsync(TargetSpaceCtx ctx)
    {
        // defend 1
        ctx.Defend(1);

        // if target land is J/S, instead defend 4
        if (ctx.IsOneOf(Terrain.Jungle, Terrain.Sand))
        {
            ctx.Defend(4 - 1);             // -1 is from defend already done above
        }
        return(Task.CompletedTask);
    }
Exemple #3
0
    static public async Task ActAsync(TargetSpaceCtx ctx)
    {
        if (ctx.HasInvaders)
        {
            ctx.AddFear(1);
        }

        if (ctx.HasBlight && ctx.IsOneOf(Terrain.Sand, Terrain.Wetland))
        {
            await ctx.RemoveBlight();
        }
    }
    static public async Task ActAsync(TargetSpaceCtx ctx)
    {
        if (ctx.IsOneOf(Terrain.Jungle, Terrain.Sand))       // ??? should we be using Power Filters here?
        {
            await ctx.RemoveBlight();
        }

        if (await ctx.YouHave("3 plant"))
        {
            await ctx.Wilds.Add(1);
        }
    }
 static public async Task ActionAsync(TargetSpaceCtx ctx)
 {
     // If target land is mountain or sand,
     if (ctx.IsOneOf(Terrain.Mountain, Terrain.Sand))
     {
         // instead 1 damange to EACH town/city
         await ctx.DamageEachInvader(1, Invader.City, Invader.Town);
     }
     else
     {
         await ctx.DamageInvaders(1, Invader.Town, Invader.City);
     }
 }
Exemple #6
0
    static public Task Act(TargetSpaceCtx ctx)
    {
        // 2 fear
        ctx.AddFear(2);

        // if target is M/J, Defend 3
        if (ctx.IsOneOf(Terrain.Jungle, Terrain.Mountain))
        {
            ctx.Defend(3);
        }

        return(Task.CompletedTask);
    }
    static public async Task Act(TargetSpaceCtx ctx)
    {
        // 2 fear
        ctx.AddFear(2);

        // if target is M/J, Push 1 explorer and 1 town
        if (ctx.IsOneOf(Terrain.Mountain, Terrain.Jungle))
        {
            await ctx.Pusher
            .AddGroup(1, Invader.Town)
            .AddGroup(1, Invader.Explorer)
            .MoveN();
        }
    }
    static public async Task ActAsync(TargetSpaceCtx ctx)
    {
        // add 1 disease
        await ctx.Disease.Add(1);

        // if you have 2 water and 2 plant:  1 dmaage to each invader (doing this first because our smart-damage result will be better)
        if (await ctx.YouHave("2 water,2 plant"))
        {
            await ctx.DamageEachInvader(1);
        }

        // if target land is J/W, 2 fear and 3 damage
        if (ctx.IsOneOf(Terrain.Jungle, Terrain.Wetland))
        {
            ctx.AddFear(3);
            await ctx.DamageInvaders(3);
        }
    }
    static public Task ActAsync(TargetSpaceCtx ctx)
    {
        int damage = 0;

        // If target land has your presence, 1 fear and 1 damage
        if (ctx.HasSelfPresence)
        {
            ++damage;
            ctx.AddFear(1);
        }

        // If target land is Sand or Water, 1 damage
        if (ctx.IsOneOf(Terrain.Sand, Terrain.Wetland))
        {
            ++damage;
        }

        return(ctx.DamageInvaders(damage));
    }
    static public async Task ActAsync(TargetSpaceCtx ctx)
    {
        int damage = 0;

        // if target is J/W, 1 fear & 1 damage
        if (ctx.IsOneOf(Terrain.Jungle, Terrain.Wetland))
        {
            ++damage;
            ctx.AddFear(1);
        }

        // If 3 animals +1 damage
        if (await ctx.YouHave("3 animal"))
        {
            ++damage;
        }

        await ctx.DamageInvaders(damage);
    }
    static public async Task ActionAsync(TargetSpaceCtx ctx)
    {
        int fear   = 3;
        int damage = 5;

        // if you have 4 fire
        if (await ctx.YouHave("4 fire"))
        {
            fear   += 2;
            damage += 5;
        }

        // if target is Jungle / Wetland, add 1 blight
        if (ctx.IsOneOf(Terrain.Jungle, Terrain.Wetland))
        {
            await ctx.AddBlight(1);
        }

        ctx.AddFear(fear);
        await ctx.DamageInvaders(damage);
    }
    static public async Task ActAsync(TargetSpaceCtx ctx)
    {
        // 1 fear
        ctx.AddFear(1);

        //  1 damage
        int damage = 1;

        // destroy 1 dahan
        if (ctx.Dahan.Any)
        {
            await ctx.DestroyDahan(1);
        }

        // if target is J / S, +1 damage
        if (ctx.IsOneOf(Terrain.Jungle, Terrain.Sand))
        {
            ++damage;
        }

        await ctx.DamageInvaders(damage);
    }
    static public async Task ActAsync(TargetSpaceCtx ctx)
    {
        // 2 damage. Destroy all explorers
        await ctx.Invaders.Destroy(int.MaxValue, Invader.Explorer);

        int damage = 2;

        // if target land is J/W, add 1 blight
        if (ctx.IsOneOf(Terrain.Jungle, Terrain.Wetland))
        {
            await ctx.AddBlight(1);
        }

        // if you have 2 fire, 3 air, 2 earth: +4 damage. Add 1 wilds
        if (await ctx.YouHave("2 fire,3 air, 2 earth"))
        {
            await ctx.Wilds.Add(1);

            damage += 4;
        }
        await ctx.DamageInvaders(damage);
    }