Skip to content

Commit 5c5691e

Browse files
committed
Move cost checks to use cost_mod script
Fixes #177
1 parent 89a9ee5 commit 5c5691e

File tree

6 files changed

+11
-11
lines changed

6 files changed

+11
-11
lines changed

fireplace/cards/blackrock/brawl.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ class BRMC_92:
5757

5858
# Golemagg
5959
class BRMC_95:
60-
cost = lambda self, i: i - self.controller.hero.damage
60+
cost_mod = -Attr(FRIENDLY_HERO, GameTag.DAMAGE)
6161

6262

6363
# High Justice Grimstone

fireplace/cards/blackrock/collectible.py

+4-4
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ class BRM_008:
2626

2727
# Volcanic Lumberer
2828
class BRM_009:
29-
cost = lambda self, i: i - len(self.game.minions_killed_this_turn)
29+
cost_mod = -Attr(GAME, GameTag.NUM_MINIONS_KILLED_THIS_TURN)
3030

3131

3232
# Druid of the Flame (Firecat Form)
@@ -84,7 +84,7 @@ class BRM_024:
8484

8585
# Volcanic Drake
8686
class BRM_025:
87-
cost = lambda self, i: i - len(self.game.minions_killed_this_turn)
87+
cost_mod = -Attr(GAME, GameTag.NUM_MINIONS_KILLED_THIS_TURN)
8888

8989

9090
# Hungry Dragon
@@ -136,7 +136,7 @@ class BRM_034:
136136
# Solemn Vigil
137137
class BRM_001:
138138
play = Draw(CONTROLLER) * 2
139-
cost = lambda self, i: i - len(self.game.minions_killed_this_turn)
139+
cost_mod = -Attr(GAME, GameTag.NUM_MINIONS_KILLED_THIS_TURN)
140140

141141

142142
# Melt (Unused)
@@ -147,7 +147,7 @@ class BRM_001e:
147147
# Dragon's Breath
148148
class BRM_003:
149149
play = Hit(TARGET, 4)
150-
cost = lambda self, i: i - len(self.game.minions_killed_this_turn)
150+
cost_mod = -Attr(GAME, GameTag.NUM_MINIONS_KILLED_THIS_TURN)
151151

152152

153153
# Demonwrath

fireplace/cards/classic/neutral_epic.py

+3-3
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ class EX1_005:
88

99
# Mountain Giant
1010
class EX1_105:
11-
cost = lambda self, i: i - (len(self.controller.hand) - 1)
11+
cost_mod = -Count(CONTROLLER_HAND - SELF)
1212

1313

1414
# Murloc Warleader
@@ -23,7 +23,7 @@ class EX1_564:
2323

2424
# Sea Giant
2525
class EX1_586:
26-
cost = lambda self, i: i - len(self.game.board)
26+
cost_mod = -Count(ALL_MINIONS)
2727

2828

2929
# Blood Knight
@@ -36,7 +36,7 @@ class EX1_590:
3636

3737
# Molten Giant
3838
class EX1_620:
39-
cost = lambda self, i: i - self.controller.hero.damage
39+
cost_mod = -Attr(FRIENDLY_HERO, GameTag.DAMAGE)
4040

4141

4242
# Captain's Parrot

fireplace/cards/gvg/neutral_epic.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ class GVG_108:
3939

4040
# Clockwork Giant
4141
class GVG_121:
42-
cost = lambda self, i: i - len(self.controller.opponent.hand)
42+
cost_mod = -Count(OPPONENT_HAND)
4343

4444

4545
# Wee Spellstopper

fireplace/cards/tgt/neutral_epic.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ class AT_118:
3636

3737
# Frost Giant
3838
class AT_120:
39-
cost = lambda self, i: i - self.controller.times_hero_power_used_this_game
39+
cost_mod = -Attr(CONTROLLER, GameTag.NUM_TIMES_HERO_POWER_USED_THIS_GAME)
4040

4141

4242
# Crowd Favorite

fireplace/cards/tgt/neutral_legendary.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ class AT_018:
1111

1212
# Skycap'n Kragg
1313
class AT_070:
14-
cost = lambda self, i: i - len(self.controller.field.filter(race=Race.PIRATE))
14+
cost_mod = -Count(FRIENDLY_MINIONS + PIRATE)
1515

1616

1717
# Gormok the Impaler

0 commit comments

Comments
 (0)