fixed edge case with nonmana equip costs

This commit is contained in:
billzorn 2015-06-30 23:09:05 -07:00
parent b63b950955
commit 77133cbed6
2 changed files with 18 additions and 4 deletions

View file

@ -515,6 +515,20 @@ def relocate_equip(s):
s = equip s = equip
else: else:
s = equip + '\n' + s s = equip + '\n' + s
nonmana = re.findall(ur'(equip\u2014.*(\n|$))', s)
if len(nonmana) == 1:
equip = nonmana[0][0]
s = s.replace('\n' + equip, '')
s = s.replace(equip, '')
if equip[-1:] == ' ':
equip = equip[0:-1]
if s == '':
s = equip
else:
s = equip + '\n' + s
return s return s

View file

@ -9353,7 +9353,7 @@
|akroan hoplite||creature||human soldier|&^/&^^|{RRWW}|whenever @ attacks, it gets +X/+& until end of turn, where X is the number of attacking creatures you control.| |akroan hoplite||creature||human soldier|&^/&^^|{RRWW}|whenever @ attacks, it gets +X/+& until end of turn, where X is the number of attacking creatures you control.|
|demonmail hauberk||artifact||equipment||{^^^^}|equipped creature gets +&^^^^/+&^^.\equip~sacrifice a creature.| |demonmail hauberk||artifact||equipment||{^^^^}|equip~sacrifice a creature.\equipped creature gets +&^^^^/+&^^.|
|rhox||creature||rhino beast|&^^^^^/&^^^^^|{^^^^GGGG}|you may have @ assign its combat damage as though it weren't blocked.\{^^GG}: regenerate @.| |rhox||creature||rhino beast|&^^^^^/&^^^^^|{^^^^GGGG}|you may have @ assign its combat damage as though it weren't blocked.\{^^GG}: regenerate @.|
@ -19297,7 +19297,7 @@
|mishra's toy workshop||land|||||T: add {^^^} to your mana pool. spend this mana only on spells and abilities that put tokens onto the battlefield. use toys to represent the tokens.| |mishra's toy workshop||land|||||T: add {^^^} to your mana pool. spend this mana only on spells and abilities that put tokens onto the battlefield. use toys to represent the tokens.|
|sigil of distinction||artifact||equipment||{XX}|countertype % charge\@ enters the battlefield with X % counters on it.\equipped creature gets +&^/+&^ for each % counter on @.\equip~remove a % counter from @.| |sigil of distinction||artifact||equipment||{XX}|equip~remove a % counter from @.\countertype % charge\@ enters the battlefield with X % counters on it.\equipped creature gets +&^/+&^ for each % counter on @.|
|coerced confession||sorcery||||{^^^^UB}|target player puts the top four cards of his or her library into his or her graveyard. you draw a card for each creature card put into that graveyard this way.| |coerced confession||sorcery||||{^^^^UB}|target player puts the top four cards of his or her library into his or her graveyard. you draw a card for each creature card put into that graveyard this way.|
@ -20259,7 +20259,7 @@
|fyndhorn elder||creature||elf druid|&^/&^|{^^GG}|T: add {GGGG} to your mana pool.| |fyndhorn elder||creature||elf druid|&^/&^|{^^GG}|T: add {GGGG} to your mana pool.|
|piston sledge||artifact||equipment||{^^^}|when @ enters the battlefield, attach it to target creature you control.\equipped creature gets +&^^^/+&^.\equip~sacrifice an artifact.| |piston sledge||artifact||equipment||{^^^}|equip~sacrifice an artifact.\when @ enters the battlefield, attach it to target creature you control.\equipped creature gets +&^^^/+&^.|
|marrow shards||instant||||{WP}|\@ deals &^ damage to each attacking creature.| |marrow shards||instant||||{WP}|\@ deals &^ damage to each attacking creature.|
@ -21476,7 +21476,7 @@
|ebon dragon||creature||dragon|&^^^^^/&^^^^|{^^^^^BBBB}|flying\when @ enters the battlefield, you may have target opponent discard a card.| |ebon dragon||creature||dragon|&^^^^^/&^^^^|{^^^^^BBBB}|flying\when @ enters the battlefield, you may have target opponent discard a card.|
|nightmare lash||artifact||equipment||{^^^^}|equipped creature gets +&^/+&^ for each swamp you control.\equip~pay &^^^ life.| |nightmare lash||artifact||equipment||{^^^^}|equip~pay &^^^ life.\equipped creature gets +&^/+&^ for each swamp you control.|
|erratic explosion||sorcery||||{^^RR}|choose target creature or player. reveal cards from the top of your library until you reveal a nonland card. @ deals damage equal to that card's converted mana cost to that creature or player. put the revealed cards on the bottom of your library in any order.| |erratic explosion||sorcery||||{^^RR}|choose target creature or player. reveal cards from the top of your library until you reveal a nonland card. @ deals damage equal to that card's converted mana cost to that creature or player. put the revealed cards on the bottom of your library in any order.|