Fryyyyy / Fryatog

GoLang based IRC bot for looking up MTG Rules/Oracle
4 stars 3 forks source link

Tune command regex to ignore & if it's not before a ! #117

Open Fryyyyy opened 5 years ago

Fryyyyy commented 5 years ago
11:19:28 < blah65> so rule 106b reads "Players can use the Magic Store & Event Locator at Wizards.com/Locator to find tournaments in their area" implying this is a possible legal action to take during a player's turn. i want to troll my friends by making them do that whn i control their                    turn via an effect like !mindslaver or similar. can i do that legally speaking ac
11:19:29 < blah65> cording to the rules? 
11:19:31 <+Fryatog> blah65: Even the Odds {2}{W} · Instant · Cast this spell only if you control fewer creatures than each opponent. \ Create three 1/1 white Soldier creature tokens. · FUT-U · Vin,Leg,Mod
11:19:32 <+Fryatog> blah65: Mindslaver {6} · Legendary Artifact · {4}, {T}, Sacrifice Mindslaver: You control target player during that player's next turn. (You see all cards that player could see and make all decisions for the player.) · MRD-R,SOM-M · Vin,Leg,Mod

t=2019-06-26T11:19:28+1000 lvl=dbug msg="In handleCommand" Message=" Event Locator at Wizards.com/Locator to "

Fryyyyy commented 5 years ago
01:25:48 < WarpRattler> https://scryfall.com/search?q=cmc%3D9+f%3Avintage&unique=cards&as=grid&order=name It can go grab any of this fun stuff!
01:25:49 < Fryatog> WarpRattler: Order {3}{W} · Instant · Exile target attacking creature. · HOP-U,APC-U,C16-U · Vin,Leg
01:25:49 < Fryatog> WarpRattler: Chaos {2}{R} · Instant · Creatures can't block this turn. · HOP-U,APC-U,C16-U · Vin,Leg
Villawhatever commented 4 years ago

Golang doesn't support lookbehinds at all, let alone variable-length ones, so I'm not sure if tackling this in regex is even remotely worth the headache.

Fryyyyy commented 4 years ago

Let's try it this dumb way: cceb1a0b63236a60f008bc191cf4a63e09a73cfa