Skip to content

Commit

Permalink
New card: Stained Glass
Browse files Browse the repository at this point in the history
  • Loading branch information
sindreslungaard committed Jun 9, 2020
1 parent b183120 commit d1659b7
Show file tree
Hide file tree
Showing 2 changed files with 45 additions and 0 deletions.
44 changes: 44 additions & 0 deletions game/cards/dm02/cyber_virus.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
package dm02

import (
"duel-masters/game/civ"
"duel-masters/game/family"
"duel-masters/game/fx"
"duel-masters/game/match"
"fmt"
)

// StainedGlass ...
func StainedGlass(c *match.Card) {

c.Name = "Stained Glass"
c.Power = 1000
c.Civ = civ.Water
c.Family = family.CyberVirus
c.ManaCost = 3
c.ManaRequirement = []string{civ.Water}

c.Use(fx.Creature, fx.When(fx.Attacking, func(card *match.Card, ctx *match.Context) {

ctx.ScheduleAfter(func() {

fx.SelectFilter(
card.Player,
ctx.Match,
ctx.Match.Opponent(card.Player),
match.BATTLEZONE,
"Stained Glass: Select 1 of your opponent's fire or nature creatures that will be returned to their hand",
1,
1,
true,
func(x *match.Card) bool { return x.Civ == civ.Fire || x.Civ == civ.Nature },
).Map(func(x *match.Card) {
x.Player.MoveCard(x.ID, match.BATTLEZONE, match.HAND)
ctx.Match.Chat("Server", fmt.Sprintf("%s was sent to %s's hand from the battle zone by Stained Glass", x.Name, x.Player.Username()))
})

})

}))

}
1 change: 1 addition & 0 deletions game/cards/repository.go
Original file line number Diff line number Diff line change
Expand Up @@ -172,4 +172,5 @@ var DM02 = map[string]match.CardConstructor{
"24353d06-89ef-4867-9513-485750d01e10": dm02.ArmoredCannonBalbaro,
"99791f19-21ee-4ee3-a6b0-e26702c2a380": dm02.CriticalBlade,
"5781986a-4ca8-48e1-a5a1-95e820455bce": dm02.HypersquidWalter,
"6406411f-e9ae-4b55-8213-7e18c4cd9aee": dm02.StainedGlass,
}

0 comments on commit d1659b7

Please sign in to comment.