diff --git a/game/cards/dm02/spells.go b/game/cards/dm02/spells.go index 6cb3a74e..6761a880 100644 --- a/game/cards/dm02/spells.go +++ b/game/cards/dm02/spells.go @@ -2,8 +2,10 @@ package dm02 import ( "duel-masters/game/civ" + "duel-masters/game/cnd" "duel-masters/game/fx" "duel-masters/game/match" + "fmt" ) // BurstShot ... @@ -47,3 +49,32 @@ func BurstShot(c *match.Card) { }) } + +// LogicCube ... +func LogicCube(c *match.Card) { + + c.Name = "Logic Cube" + c.Civ = civ.Light + c.ManaCost = 3 + c.ManaRequirement = []string{civ.Light} + + c.Use(fx.Spell, fx.ShieldTrigger, func(card *match.Card, ctx *match.Context) { + + if match.AmICasted(card, ctx) { + + creatures := match.Filter(card.Player, ctx.Match, card.Player, match.DECK, "Select 1 spell from your deck that will be shown to your opponent and sent to your hand", 1, 1, false, func(x *match.Card) bool { return x.HasCondition(cnd.Spell) }) + + for _, creature := range creatures { + + card.Player.MoveCard(creature.ID, match.DECK, match.HAND) + ctx.Match.Chat("Server", fmt.Sprintf("%s retrieved %s from the deck to their hand", card.Player.Username(), creature.Name)) + + } + + card.Player.ShuffleDeck() + + } + + }) + +} diff --git a/game/cards/repository.go b/game/cards/repository.go index 024f3eb5..5afe98c8 100644 --- a/game/cards/repository.go +++ b/game/cards/repository.go @@ -150,4 +150,5 @@ var DM02 = map[string]match.CardConstructor{ "5d095b28-262e-454d-96c7-9174ed83e3f6": dm02.LadiaBaleTheInspirational, "6e381955-231b-4e4e-a14b-82509a5e193b": dm02.RumblingTerahorn, "9fed2257-362f-43c7-b50e-5526ccf799aa": dm02.MiniTitanGett, + "17ee5046-c3fd-4422-af14-c54a4be8d9a2": dm02.LogicCube, }