File tree Expand file tree Collapse file tree 3 files changed +50
-0
lines changed
Expand file tree Collapse file tree 3 files changed +50
-0
lines changed Original file line number Diff line number Diff 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 :)
Original file line number Diff line number Diff 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
Original file line number Diff line number Diff line change 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
4065end
You can’t perform that action at this time.
0 commit comments