-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fixes #221
- Loading branch information
Showing
3 changed files
with
37 additions
and
1 deletion.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
module Magic | ||
module Cards | ||
class TitanicGrowth < Instant | ||
card_name "Titanic Growth" | ||
cost generic: 1, green: 1 | ||
|
||
def target_choices | ||
creatures | ||
end | ||
|
||
def resolve!(target:) | ||
trigger_effect(:modify_power_toughness, power: 4, toughness: 4, target: target, until_eot: true) | ||
end | ||
end | ||
end | ||
end |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
require 'spec_helper' | ||
|
||
RSpec.describe Magic::Cards::TitanicGrowth do | ||
include_context "two player game" | ||
let!(:wood_elves) { ResolvePermanent("Wood Elves") } | ||
|
||
it "gets +4/+4 until end of turn" do | ||
p1.add_mana(green: 2) | ||
p1.cast(card: Card("Titanic Growth")) do | ||
_1.pay_mana(green: 1, generic: { green: 1 }) | ||
_1.targeting(wood_elves) | ||
end | ||
|
||
game.tick! | ||
|
||
expect(wood_elves.power).to eq(5) | ||
expect(wood_elves.toughness).to eq(5) | ||
end | ||
end |