public static async Task AddStrifeThenStrifedInvadersDamageUnstrifed(TargetSpaceCtx ctx) { // add 1 strife await ctx.AddStrife(); await StrifedRavage.StrifedInvadersDamageUnstrifed(ctx); }
public async Task Level2(FearCtx ctx) { // Each player adds 1 strife to a town. foreach (var spiritCtx in ctx.Spirits) { await spiritCtx.AddStrifeToOne(ctx.GameState.Island.AllSpaces, Invader.Town); } // For the rest of this turn, invaders have -1 health per strife to a minimum of 1. await StrifedRavage.InvadersReduceHealthByStrifeCount(ctx.GameState); }
public async Task Level2(FearCtx ctx) { // Each player adds 1 strife in a land with beast/disease/dahan. foreach (SelfCtx spirit in ctx.Spirits) { await spirit.AddStrifeToOne(ctx.LandsWithBeastDiseaseDahan()); } // For the rest of this turn, invaders have -1 health per strife to a minimum of 1 await StrifedRavage.InvadersReduceHealthByStrifeCount(ctx.GameState); }
public async Task Level2(FearCtx ctx) { var options = LandsWith2Invaders(ctx); // each player adds 1 strife in a different land with at least 2 invaders foreach (SelfCtx spirit in ctx.Spirits) { options.Remove(await spirit.AddStrifeToOne(options)); } // Then each invader takes 1 damage per strife it has. await StrifedRavage.StrifedInvadersTakeDamagePerStrife(ctx); }
static public async Task ActAsymc(TargetSpaceCtx ctx) { int startingInvaderCount = ctx.Tokens.InvaderTotal(); // 1 invader with strife deals damage to other invaders (not to each) int damage = StrifedRavage.DamageFrom1StrifedInvaders(ctx.Tokens); await StrifedRavage.DamageUnStriffed(ctx, damage); // 1 fear per invader this power destroyed. // ??? What if Bringer uses this? Does nightmare death count as death int killed = startingInvaderCount - ctx.Tokens.InvaderTotal(); ctx.AddFear(killed); }
static Task DuringRavage_InvadersDamageInvadersInAdjacentLandsInsteadOfDahan(TargetSpaceCtx ctx) { // Note - this works regardless of them ravaging in target land or not. yay! int damageFromStrifedInvaders = ctx.Tokens.Invaders().OfType <HealthToken>().Where(x => x.StrifeCount > 0).Sum(si => si.FullHealth * ctx.Tokens[si]); async Task Sequence(RavageAction eng) { // they damage invaders in adjacent lands instead of dahan and the land. var invaderSpaceCtx = await ctx.SelectAdjacentLand($"Apply {damageFromStrifedInvaders} damage to", x => x.HasInvaders); if (invaderSpaceCtx != null) { await StrifedRavage.DamageUnStriffed(invaderSpaceCtx, damageFromStrifedInvaders); } // dahan in target land do not fight back. } ctx.ModifyRavage(cfg => cfg.RavageSequence = Sequence); return(Task.CompletedTask); }
public async Task Level3(FearCtx ctx) { var options = LandsWith2Invaders(ctx); // each player adds 1 strife in a different land with at least 2 invaders. foreach (SelfCtx spirit in ctx.Spirits) { var spaceCtx = await spirit.SelectSpace("Add strife", options); if (spaceCtx != null) { await spaceCtx.AddStrife(); options.Remove(spaceCtx.Space); // Then, each invader with strife deals damage to other invaders in that land. int damage = StrifedRavage.DamageFromStrifedInvaders(spaceCtx.Tokens); await StrifedRavage.DamageUnStriffed(spaceCtx, damage); } } }