public async Task Strife_Stops_Ravage() { var gs = new GameState(new Thunderspeaker(), Board.BuildBoardC()); Space space = gs.Island.AllSpaces .First(s => !s.IsOcean && !gs.Tokens[s].HasInvaders() // 0 invaders ); // Given: 1 strifed city var counts = gs.Tokens[space]; counts.Init(Tokens.City.HavingStrife(1), 1); counts.InvaderSummary().ShouldBe("1C@3^", "strife should be used up"); // and: 1 dahan gs.DahanOn(space).Init(1); // When: we ravage there await InvaderEngine1.RavageCard(InvaderCardEx.For(space), gs); // Then: dahan survives gs.DahanOn(space).Count.ShouldBe(1, "dahan should survive due to strife on town"); // and so does city, but strife is gone counts.InvaderSummary().ShouldBe("1C@1", "strife should be used up"); }
public async Task DeadDahanDoDamage() { gs.Phase = Phase.Fast; // Disable destroying presence // gs.AddBlightSideEffect = (gs,space) => new AddBlightEffect { Cascade=false,DestroyPresence=false }; gs.ModifyBlightAddedEffect.ForGame.Add(x => { x.Cascade = false; x.DestroyPresence = false; }); // Given: 2 dahan on a2 gs.DahanOn(a[2]).Init(2); // and: dahan on a4 so it doesn't auto-select the only target available gs.DahanOn(a[4]).Init(1); // and: 4 explorers + 1 city var counts = gs.Tokens[a[2]]; counts.AdjustDefault(Invader.Explorer, 4); counts.AdjustDefault(Invader.City, 1); // and activate card When_ActivateCard(WordsOfWarning.Name); User.TargetsLand(WordsOfWarning.Name, "(A2),A4"); // When: ravaging on A2 // await gs.InvaderEngine.RavageCard(new InvaderCard(a[2])); await InvaderEngine1.RavageCard(InvaderCardEx.For(a[2]), gs); // Then: 1 explorer left // Words of Warning defend 3 cancelling out City attack leaving only 4 damage from explorers // 2 Dahan attack simultaneously doing 4 points of damage, killing City and 1 explorer leaving 3 explorers gs.Assert_Invaders(a[2], "3E@1"); }
public void Level1_DefendOnly1AndNotMorePerDahan() // not more th { Given_DahanAndTowns(4, 4); // 4 dahan should defend 4 // And: 4 fear / player gameState.Fear.AddDirect(new FearArgs { count = 4 }); // When: Doing Invader phase (fear+ragage) async Task DoIt() { await gameState.Fear.Apply(); // await gameState.InvaderEngine.RavageCard(invaderCard); await InvaderEngine1.RavageCard(invaderCard, gameState); } _ = DoIt(); User.AcknowledgesFearCard("Dahan on their Guard : 1 : In each land, Defend 1 per Dahan."); // Then: 0 dahan left gameState.DahanOn(ravageSpace).Count.ShouldBe(2); // And: 2 towns gameState.Assert_Invaders(ravageSpace, "2T@2"); gameState.Tokens[ravageSpace].Blight.Any.ShouldBe(true); }
async Task When_AddFearApplyFearAndRavage() { gameState.Fear.AddDirect(new FearArgs { count = 4 }); await gameState.Fear.Apply(); // await gameState.InvaderEngine.RavageCard( invaderCard ); await InvaderEngine1.RavageCard(invaderCard, gameState); }
public async Task NoFearCard_NormalRavage() { // Disable destroying presence // gameState.AddBlightSideEffect = (gs,space) => new AddBlightEffect { Cascade=false, DestroyPresence=false }; gameState.ModifyBlightAddedEffect.ForGame.Add(x => { x.Cascade = false; x.DestroyPresence = false; }); Given_DahanAndTowns(2, 2); // When: Doing Invader phase (fear+ragage) await gameState.Fear.Apply(); await InvaderEngine1.RavageCard(invaderCard, gameState); // Then: all dahan killed Assert.Equal(0, gameState.DahanOn(ravageSpace).Count); Assert.True(gameState.Tokens[ravageSpace].Blight.Any); }
public async Task DahanDamage_Generates0() { // Disable destroying presence // ctx.GameState.AddBlightSideEffect = (gs,space) => new AddBlightEffect { Cascade=false,DestroyPresence=false }; ctx.GameState.ModifyBlightAddedEffect.ForGame.Add(x => { x.Cascade = false; x.DestroyPresence = false; }); // has 1 city and lots of dahan ctx.Tokens.AdjustDefault(Invader.City, 1); // don't use ctx.Invaders because it has a fake/dream invader count ctx.Dahan.Init(10); // Given: using Dread Apparitions await DreadApparitions.ActAsync(ctx); // When: dahan destroy the city // await ctx.GameState.InvaderEngine.RavageCard( ); await InvaderEngine1.RavageCard(InvaderCardEx.For(ctx.Space), ctx.GameState); // Then: 2 fear from city Assert_GeneratedFear(2); // normal // but no defend bonus Assert_DefenceIs(0); }