-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* fix: card ids * feat: implement Demon Hunter cards * feat: implement Librams counter * chore: drop unnecessary known card ids * feat: implement Talgath * feat: implement some active effects * feat: add Askara active effect * feat: add Ingenious Artificer active effect * feat: add Draenei Warrior active effects * feat: add known card mark to Astral vigiant * refactor: related cards system to use entities * feat: add Archimonde related cards * feat: add Foreboding Flame active effect * feat: add Infernal Stratagem active effect * feat: add Space Pirate active effect * feat: implement asteroid damage counter (Bolide Behemoth) * fix: velen related cards showing itself * fix: leak showing moldara spores on opponent hands * feat: prevent created cards from demon portal deck to show * feat: add kiljaeden counter * feat: add static related cards for GDB * fix: wrong cardId --------- Co-authored-by: Benedict Etzel <benedict@hearthsim.net> Co-authored-by: mateuscechetto <mateuscechetto@gmail.com>
- Loading branch information
1 parent
d1419d7
commit a631a81
Showing
52 changed files
with
635 additions
and
82 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
44 changes: 44 additions & 0 deletions
44
Hearthstone Deck Tracker/Hearthstone/CounterSystem/Counters/AsteroidDamageCounter.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
using HearthDb.Enums; | ||
using Hearthstone_Deck_Tracker.LogReader.Interfaces; | ||
using Hearthstone_Deck_Tracker.Utility; | ||
using Entity = Hearthstone_Deck_Tracker.Hearthstone.Entities.Entity; | ||
|
||
namespace Hearthstone_Deck_Tracker.Hearthstone.CounterSystem.Counters; | ||
|
||
public class AsteroidExtraDamageCounter : NumericCounter | ||
{ | ||
public override string LocalizedName => LocUtil.Get("Counter_AsteroidDamage", useCardLanguage: true); | ||
protected override string? CardIdToShowInUI => HearthDb.CardIds.NonCollectible.Neutral.Asteroid; | ||
public override string[] RelatedCards => new string[] {}; | ||
|
||
public AsteroidExtraDamageCounter(bool controlledByPlayer, GameV2 game) : base(controlledByPlayer, game) | ||
{ | ||
} | ||
|
||
public override bool ShouldShow() => !Game.IsBattlegroundsMatch && Counter > 0; | ||
|
||
public override string[] GetCardsToDisplay() | ||
{ | ||
return new [] | ||
{ | ||
HearthDb.CardIds.NonCollectible.Neutral.Asteroid | ||
}; | ||
} | ||
|
||
public override bool IsDisplayValueLong => true; | ||
|
||
public override string ValueToShow() { | ||
return string.Format(LocUtil.Get("Counter_AsteroidDamage_Damage", useCardLanguage: true), 2 + Counter); | ||
} | ||
|
||
public override void HandleTagChange(GameTag tag, IHsGameState gameState, Entity entity, int value, int prevValue) | ||
{ | ||
if(entity.IsControlledBy(Game.Player.Id) == IsPlayerCounter) | ||
{ | ||
if((int)tag == 3559) | ||
{ | ||
Counter = value; | ||
} | ||
} | ||
} | ||
} |
42 changes: 42 additions & 0 deletions
42
Hearthstone Deck Tracker/Hearthstone/CounterSystem/Counters/KiljaedenCounter.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
using System; | ||
using HearthDb.Enums; | ||
using Hearthstone_Deck_Tracker.LogReader.Interfaces; | ||
using Entity = Hearthstone_Deck_Tracker.Hearthstone.Entities.Entity; | ||
|
||
namespace Hearthstone_Deck_Tracker.Hearthstone.CounterSystem.Counters; | ||
|
||
public class KiljaedenCounter : StatsCounter | ||
{ | ||
protected override string? CardIdToShowInUI => HearthDb.CardIds.Collectible.Neutral.Kiljaeden; | ||
public override string[] RelatedCards => new string[] {}; | ||
|
||
public KiljaedenCounter(bool controlledByPlayer, GameV2 game) : base(controlledByPlayer, game) | ||
{ | ||
} | ||
|
||
public override bool ShouldShow() => Game.IsTraditionalHearthstoneMatch && (AttackCounter > 0 || HealthCounter > 0); | ||
|
||
public override string[] GetCardsToDisplay() | ||
{ | ||
return new [] | ||
{ | ||
HearthDb.CardIds.Collectible.Neutral.Kiljaeden | ||
}; | ||
} | ||
|
||
public override string ValueToShow() => $"+{Math.Max(0, AttackCounter)} / +{Math.Max(0, HealthCounter)}"; | ||
public override void HandleTagChange(GameTag tag, IHsGameState gameState, Entity entity, int value, int prevValue) | ||
{ | ||
if(!Game.IsTraditionalHearthstoneMatch) | ||
return; | ||
|
||
if(entity.Card.Id != HearthDb.CardIds.NonCollectible.Neutral.Kiljaeden_KiljaedensPortalEnchantment) | ||
return; | ||
|
||
if(entity.IsControlledBy(Game.Player.Id) != IsPlayerCounter) | ||
return; | ||
|
||
AttackCounter = entity.GetTag(GameTag.TAG_SCRIPT_DATA_NUM_2); | ||
HealthCounter = entity.GetTag(GameTag.TAG_SCRIPT_DATA_NUM_2); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
16 changes: 16 additions & 0 deletions
16
...stone Deck Tracker/Hearthstone/EffectSystem/Effects/Mage/IngeniousArtificerEnchantment.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
using Hearthstone_Deck_Tracker.Hearthstone.EffectSystem.Enums; | ||
|
||
namespace Hearthstone_Deck_Tracker.Hearthstone.EffectSystem.Effects.Mage; | ||
|
||
public class IngeniousArtificerEnchantment : EntityBasedEffect | ||
{ | ||
public override string CardId => HearthDb.CardIds.NonCollectible.Mage.IngeniousArtificer_IngeniousArtficerFutureBuffEnchantment; | ||
protected override string CardIdToShowInUI => HearthDb.CardIds.Collectible.Mage.IngeniousArtificer; | ||
|
||
public IngeniousArtificerEnchantment(int entityId, bool isControlledByPlayer) : base(entityId, isControlledByPlayer) | ||
{ | ||
} | ||
|
||
public override EffectDuration EffectDuration => EffectDuration.Conditional; | ||
public override EffectTag EffectTag => EffectTag.ManaCrystalModification; | ||
} |
17 changes: 17 additions & 0 deletions
17
Hearthstone Deck Tracker/Hearthstone/EffectSystem/Effects/Neutral/AceWayfinderEnchantment.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
using Hearthstone_Deck_Tracker.Hearthstone.EffectSystem.Enums; | ||
|
||
namespace Hearthstone_Deck_Tracker.Hearthstone.EffectSystem.Effects.Neutral; | ||
|
||
public class AceWayfinderEnchantment: EntityBasedEffect | ||
{ | ||
public override string CardId => HearthDb.CardIds.NonCollectible.Neutral.AceWayfinder_AceWayfinderFutureBuffEnchantment; | ||
protected override string CardIdToShowInUI => HearthDb.CardIds.Collectible.Neutral.AceWayfinder; | ||
|
||
public AceWayfinderEnchantment(int entityId, bool isControlledByPlayer) : base(entityId, isControlledByPlayer) | ||
{ | ||
} | ||
|
||
public override EffectDuration EffectDuration => EffectDuration.Conditional; | ||
public override EffectTag EffectTag => EffectTag.MinionModification; | ||
|
||
} |
17 changes: 17 additions & 0 deletions
17
...hstone Deck Tracker/Hearthstone/EffectSystem/Effects/Neutral/AstrobiologistEnchantment.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
using Hearthstone_Deck_Tracker.Hearthstone.EffectSystem.Enums; | ||
|
||
namespace Hearthstone_Deck_Tracker.Hearthstone.EffectSystem.Effects.Neutral; | ||
|
||
public class AstrobiologistEnchantment: EntityBasedEffect | ||
{ | ||
public override string CardId => HearthDb.CardIds.NonCollectible.Neutral.Astrobiologist_AstrobiologistEnchantment; | ||
protected override string CardIdToShowInUI => HearthDb.CardIds.Collectible.Neutral.Astrobiologist; | ||
|
||
public AstrobiologistEnchantment(int entityId, bool isControlledByPlayer) : base(entityId, isControlledByPlayer) | ||
{ | ||
} | ||
|
||
public override EffectDuration EffectDuration => EffectDuration.Conditional; | ||
public override EffectTag EffectTag => EffectTag.MinionModification; | ||
|
||
} |
17 changes: 17 additions & 0 deletions
17
Hearthstone Deck Tracker/Hearthstone/EffectSystem/Effects/Neutral/SpacePirateEnchantment.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
using Hearthstone_Deck_Tracker.Hearthstone.EffectSystem.Enums; | ||
|
||
namespace Hearthstone_Deck_Tracker.Hearthstone.EffectSystem.Effects.Neutral; | ||
|
||
public class SpacePirateEnchantment : EntityBasedEffect | ||
{ | ||
public override string CardId => HearthDb.CardIds.NonCollectible.Neutral.SpacePirate_SpacePiracyEnchantment; | ||
protected override string CardIdToShowInUI => HearthDb.CardIds.Collectible.Neutral.SpacePirate; | ||
|
||
public SpacePirateEnchantment(int entityId, bool isControlledByPlayer) : base(entityId, isControlledByPlayer) | ||
{ | ||
} | ||
|
||
public override EffectTarget EffectTarget => EffectTarget.Self; | ||
public override EffectDuration EffectDuration => EffectDuration.Conditional; | ||
public override EffectTag EffectTag => EffectTag.CostModification; | ||
} |
17 changes: 17 additions & 0 deletions
17
...one Deck Tracker/Hearthstone/EffectSystem/Effects/Neutral/StarlightWandererEnchantment.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
using Hearthstone_Deck_Tracker.Hearthstone.EffectSystem.Enums; | ||
|
||
namespace Hearthstone_Deck_Tracker.Hearthstone.EffectSystem.Effects.Neutral; | ||
|
||
public class StarlightWandererEnchantment: EntityBasedEffect | ||
{ | ||
public override string CardId => HearthDb.CardIds.NonCollectible.Neutral.StarlightWanderer_StarlightWandererFutureBuffEnchantment; | ||
protected override string CardIdToShowInUI => HearthDb.CardIds.Collectible.Neutral.StarlightWanderer; | ||
|
||
public StarlightWandererEnchantment(int entityId, bool isControlledByPlayer) : base(entityId, isControlledByPlayer) | ||
{ | ||
} | ||
|
||
public override EffectDuration EffectDuration => EffectDuration.Conditional; | ||
public override EffectTag EffectTag => EffectTag.MinionModification; | ||
|
||
} |
17 changes: 17 additions & 0 deletions
17
...tone Deck Tracker/Hearthstone/EffectSystem/Effects/Neutral/StrandedSpacemanEnchantment.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
using Hearthstone_Deck_Tracker.Hearthstone.EffectSystem.Enums; | ||
|
||
namespace Hearthstone_Deck_Tracker.Hearthstone.EffectSystem.Effects.Neutral; | ||
|
||
public class StrandedSpacemanEnchantment: EntityBasedEffect | ||
{ | ||
public override string CardId => HearthDb.CardIds.NonCollectible.Neutral.StrandedSpaceman_StrandedSpacemanFutureBuffEnchantment; | ||
protected override string CardIdToShowInUI => HearthDb.CardIds.Collectible.Neutral.StrandedSpaceman; | ||
|
||
public StrandedSpacemanEnchantment(int entityId, bool isControlledByPlayer) : base(entityId, isControlledByPlayer) | ||
{ | ||
} | ||
|
||
public override EffectDuration EffectDuration => EffectDuration.Conditional; | ||
public override EffectTag EffectTag => EffectTag.MinionModification; | ||
|
||
} |
Oops, something went wrong.