Skip to content

Commit

Permalink
Implement new secrets
Browse files Browse the repository at this point in the history
  • Loading branch information
azeier committed Aug 1, 2019
1 parent 3d90b88 commit 564b3c4
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 6 deletions.
8 changes: 4 additions & 4 deletions HDTTests/Hearthstone/Secrets/SecretEventHandlerTest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -175,15 +175,15 @@ public void SingleSecret_MinionToHero_PlayerAttackTest()
_game.SecretsManager.HandleAttack(_playerMinion1, _heroOpponent);
VerifySecrets(0, HunterSecrets.All, HunterSecrets.BearTrap, HunterSecrets.ExplosiveTrap,
HunterSecrets.FreezingTrap, HunterSecrets.Misdirection, HunterSecrets.WanderingMonster);
VerifySecrets(1, MageSecrets.All, MageSecrets.IceBarrier, MageSecrets.Vaporize);
VerifySecrets(1, MageSecrets.All, MageSecrets.IceBarrier, MageSecrets.Vaporize, MageSecrets.FlameWard);
VerifySecrets(2, PaladinSecrets.All, PaladinSecrets.NobleSacrifice);
VerifySecrets(3, RogueSecrets.All);

_playerMinion2.SetTag(GameTag.ZONE, (int)Zone.PLAY);
_game.SecretsManager.HandleAttack(_playerMinion1, _heroOpponent);
VerifySecrets(0, HunterSecrets.All, HunterSecrets.BearTrap, HunterSecrets.ExplosiveTrap,
HunterSecrets.FreezingTrap, HunterSecrets.Misdirection, HunterSecrets.WanderingMonster);
VerifySecrets(1, MageSecrets.All, MageSecrets.IceBarrier, MageSecrets.Vaporize);
VerifySecrets(1, MageSecrets.All, MageSecrets.IceBarrier, MageSecrets.Vaporize, MageSecrets.FlameWard);
VerifySecrets(2, PaladinSecrets.All, PaladinSecrets.NobleSacrifice);
VerifySecrets(3, RogueSecrets.All, RogueSecrets.SuddenBetrayal);
}
Expand Down Expand Up @@ -291,7 +291,7 @@ public void SingleSecret_MinionOnBoard_NoMinionTarget_SpellPlayed()
_opponentMinion1.SetTag(GameTag.ZONE, (int)Zone.PLAY);
_game.SecretsManager.HandleCardPlayed(_playerSpell2);
_game.GameTime.Time += TimeSpan.FromSeconds(1);
VerifySecrets(0, HunterSecrets.All, HunterSecrets.CatTrick);
VerifySecrets(0, HunterSecrets.All, HunterSecrets.CatTrick, HunterSecrets.PressurePlate);
VerifySecrets(1, MageSecrets.All, MageSecrets.Counterspell, MageSecrets.ManaBind);
VerifySecrets(2, PaladinSecrets.All, PaladinSecrets.NeverSurrender);
VerifySecrets(3, RogueSecrets.All);
Expand Down Expand Up @@ -370,7 +370,7 @@ public void MultipleSecrets_MinionToHero_ExplosiveTrapTriggered_MinionDied_Playe
_game.SecretsManager.HandleAttack(_playerMinion1, _heroOpponent);
VerifySecrets(0, HunterSecrets.All, HunterSecrets.ExplosiveTrap,
HunterSecrets.Misdirection, HunterSecrets.WanderingMonster);
VerifySecrets(1, MageSecrets.All, MageSecrets.IceBarrier, MageSecrets.Vaporize);
VerifySecrets(1, MageSecrets.All, MageSecrets.IceBarrier, MageSecrets.Vaporize, MageSecrets.FlameWard);
VerifySecrets(2, PaladinSecrets.All, PaladinSecrets.NobleSacrifice);
VerifySecrets(3, RogueSecrets.All);
}
Expand Down
6 changes: 4 additions & 2 deletions Hearthstone Deck Tracker/Hearthstone/CardIds.cs
Original file line number Diff line number Diff line change
Expand Up @@ -113,14 +113,15 @@ public static class Secrets

public static class Hunter
{
public static List<string> All => new List<string> {BearTrap, CatTrick, DartTrap, ExplosiveTrap, FreezingTrap, HiddenCache, Misdirection, RatTrap, Snipe, SnakeTrap, VenomstrikeTrap, WanderingMonster};
public static List<string> All => new List<string> {BearTrap, CatTrick, DartTrap, ExplosiveTrap, FreezingTrap, HiddenCache, Misdirection, PressurePlate, RatTrap, Snipe, SnakeTrap, VenomstrikeTrap, WanderingMonster};
public static string BearTrap => Collectible.Hunter.BearTrap;
public static string CatTrick => Collectible.Hunter.CatTrick;
public static string DartTrap => Collectible.Hunter.DartTrap;
public static string ExplosiveTrap => Collectible.Hunter.ExplosiveTrap;
public static string FreezingTrap => Collectible.Hunter.FreezingTrap;
public static string HiddenCache => Collectible.Hunter.HiddenCache;
public static string Misdirection => Collectible.Hunter.Misdirection;
public static string PressurePlate => Collectible.Hunter.PressurePlate;
public static string RatTrap => Collectible.Hunter.RatTrap;
public static string Snipe => Collectible.Hunter.Snipe;
public static string SnakeTrap => Collectible.Hunter.SnakeTrap;
Expand All @@ -130,11 +131,12 @@ public static class Hunter

public static class Mage
{
public static List<string> All => new List<string> {Counterspell, Duplicate, Effigy, ExplosiveRunes, FrozenClone, IceBarrier, IceBlock, ManaBind, MirrorEntity, PotionOfPolymorph, Spellbender, SplittingImage, Vaporize};
public static List<string> All => new List<string> {Counterspell, Duplicate, Effigy, ExplosiveRunes, FlameWard, FrozenClone, IceBarrier, IceBlock, ManaBind, MirrorEntity, PotionOfPolymorph, Spellbender, SplittingImage, Vaporize};
public static string Counterspell => Collectible.Mage.Counterspell;
public static string Duplicate => Collectible.Mage.Duplicate;
public static string Effigy => Collectible.Mage.Effigy;
public static string ExplosiveRunes => Collectible.Mage.ExplosiveRunes;
public static string FlameWard => Collectible.Mage.FlameWard;
public static string FrozenClone => Collectible.Mage.FrozenClone;
public static string IceBarrier => Collectible.Mage.IceBarrier;
public static string IceBlock => Collectible.Mage.IceBlock;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,7 @@ public void HandleAttack(Entity attacker, Entity defender, bool fastOnly = false
if(attacker.IsMinion)
{
exclude.Add(Mage.Vaporize);
exclude.Add(Mage.FlameWard);
if(attacker.Health >= 1)
exclude.Add(Hunter.FreezingTrap);
}
Expand Down Expand Up @@ -289,7 +290,10 @@ public async void HandleCardPlayed(Entity entity)
exclude.Add(Mage.Counterspell);

if(Game.OpponentMinionCount > 0)
{
exclude.Add(Paladin.NeverSurrender);
exclude.Add(Hunter.PressurePlate);
}

if(Game.OpponentHandCount < 10)
exclude.Add(Mage.ManaBind);
Expand Down

0 comments on commit 564b3c4

Please sign in to comment.