Skip to content

Commit b2dc42d

Browse files
committed
Add missing Cleric ability to Heliod, God of the Sun
1 parent 00b2d25 commit b2dc42d

File tree

3 files changed

+50
-0
lines changed

3 files changed

+50
-0
lines changed

lib/magic/cards/heliod_god_of_the_sun.rb

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,27 @@ module Cards
66
keywords :indestructible
77
power 5
88
toughness 6
9+
end
10+
11+
class HeliodGodOfTheSun < Creature
12+
ClericToken = Token.create "Cleric" do
13+
type T::Enchantment, T::Creature, T::Creatures["Cleric"]
14+
power 1
15+
toughness 1
16+
colors :white
17+
end
18+
19+
class ActivatedAbility < Magic::ActivatedAbility
20+
def costs = [Costs::Mana.new(generic: 2, white: 2)]
21+
22+
def resolve!
23+
source.create_token(token_class: ClericToken)
24+
end
25+
end
26+
27+
def activated_abilities
28+
[ActivatedAbility]
29+
end
930

1031
class TypeModification < Abilities::Static::TypeRemoval
1132
def initialize(source:)

lib/magic/token.rb

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,10 @@ def enters_tapped?
7474
false
7575
end
7676

77+
def cost
78+
Costs::Mana.new({})
79+
end
80+
7781
def receive_notification(...)
7882
end
7983

spec/cards/heliod_god_of_the_sun_spec.rb

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,4 +37,29 @@
3737
expect(heliod).not_to be_vigilant
3838
end
3939
end
40+
41+
context "create a 2/1 white cleric enchantment creature token" do
42+
let(:create_cleric) { heliod.activated_abilities.first }
43+
44+
it "can create a cleric token" do
45+
p1.add_mana(white: 4)
46+
p1.activate_ability(ability: create_cleric) do
47+
_1.pay_mana(white: 2, generic: { white: 2 })
48+
end
49+
50+
game.stack.resolve!
51+
52+
clerics = game.battlefield.creatures.by_name("Cleric")
53+
expect(clerics.count).to eq(1)
54+
cleric = clerics.first
55+
aggregate_failures do
56+
expect(cleric).to be_a_token
57+
expect(cleric).to be_an_enchantment
58+
expect(cleric.colors).to eq([:white])
59+
expect(cleric).to be_creature
60+
expect(cleric.power).to eq(1)
61+
expect(cleric.toughness).to eq(1)
62+
end
63+
end
64+
end
4065
end

0 commit comments

Comments
 (0)