oyachai / HearthSim

Generic Hearthstone game simulator
MIT License
314 stars 59 forks source link

Track Minions died this turn (5 cards) #102

Closed MrHen closed 5 years ago

MrHen commented 9 years ago

BRM added mechanics around the number of minions that died this turn but Kel'Thuzad also needs this info.

Dealing with Resurrect will probably be more complicated, though, so that is excluded from this issue.

ReferenceCard(FP1_013, Kel'Thuzad, Minion, Curse of Naxxramas, Legendary, 8, Neutral, At the end of each turn, summon all friendly minions that died this turn., null, 6, 8, null, true, null)
ReferenceCard(BRM_025, Volcanic Drake, Minion, Blackrock Mountain, Common, 6, Neutral, Costs (1) less for each minion that died this turn., null, 6, 4, null, true, Dragon)
ReferenceCard(BRM_009, Volcanic Lumberer, Minion, Blackrock Mountain, Rare, 9, Druid, <b>Taunt</b> Costs (1) less for each minion that died this turn., [Taunt], 7, 8, null, true, null)
ReferenceCard(BRM_003, Dragon's Breath, Spell, Blackrock Mountain, Common, 5, Mage, Deal $4 damage. Costs (1) less for each minion that died this turn., null, null, null, null, true, null)
ReferenceCard(BRM_001, Solemn Vigil, Spell, Blackrock Mountain, Common, 5, Paladin, Draw 2 cards. Costs (1) less for each minion that died this turn., null, null, null, null, true, null)
slaymaker1907 commented 9 years ago

A way that this could potentially be tracked would be to use the ImplementedCardList to generate cards cheaply. What you would do is get the array list from this class and use that as a common look-up table for cards so that instead of having to store an entire Card, all you have to store is an int to get a generic reference to that card (you could even use a short since there are far less than 32k cards in Hearthstone and will be for the foreseeable future). Once you have that, you could then efficiently implement a graveyard as a list of an object with a short for the card and a byte for the turn killed on. If that was implemented, an additional optimization for memory could be done by instead of storing cards in the Deck just storing shorts for the ImplementedCard index.