Skip to content

Commit

Permalink
Simplify a few classes that I want to use as an example
Browse files Browse the repository at this point in the history
  • Loading branch information
radar committed Feb 5, 2024
1 parent 1e32b34 commit bf609f1
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 8 deletions.
6 changes: 2 additions & 4 deletions lib/magic/cards/aron_benalias_ruin.rb
Original file line number Diff line number Diff line change
@@ -1,14 +1,12 @@
module Magic
module Cards
AronBenaliasRuin = Creature("Aron, Benalia's Ruin") do
class AronBenaliasRuin < Creature
card_name "Aron, Benalia's Ruin"
type "Legendary Creature -- Phyrexian Human"
cost white: 2, black: 1
keywords :menace
power 3
toughness 3
end

class AronBenaliasRuin < Creature

class ActivatedAbility < Magic::ActivatedAbility
costs "{W}{B}, {T}, Sacrifice a creature"
Expand Down
7 changes: 4 additions & 3 deletions lib/magic/cards/staunch_shieldmate.rb
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
module Magic
module Cards
StaunchShieldmate = Creature("Staunch Shieldmate") do
creature_type("Dwarf Soldier")
cost white: 1
class StaunchShieldmate < Creature
card_name "Staunch Shieldmate"
creature_type "Dwarf Soldier"
cost "{W}"
power 1
toughness 3
end
Expand Down
1 change: 0 additions & 1 deletion lib/magic/costs/discard.rb
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ def can_pay?
end

def pay(player:, payment:)

raise "Invalid target chosen for discard" unless valid_targets.include?(payment)
player.hand.discard(payment)
end
Expand Down

0 comments on commit bf609f1

Please sign in to comment.