crash fix
transform getaicustomcode to lower
This commit is contained in:
@@ -56567,7 +56567,7 @@ type=Enchantment
|
|||||||
[/card]
|
[/card]
|
||||||
[card]
|
[card]
|
||||||
name=Idyllic Tutor
|
name=Idyllic Tutor
|
||||||
aicode=moveTo(myhand) notatarget(enchantment|myLibrary)
|
aicode=activate moveTo(myhand) notatarget(enchantment|myLibrary)
|
||||||
auto=Reveal:type:*:mylibrary revealzone(mylibrary) optionone name(choose card) target(<1>enchantment|reveal) transforms((,newability[all(other *|reveal) moveto(mylibrary) and!(shuffle)!],newability[moveto(myhand)])) optiononeend optiontwo name(shuffle) bottomoflibrary target(<1>*|reveal) and!( all(*|reveal) bottomoflibrary and!(shuffle)! )! optiontwoend revealend
|
auto=Reveal:type:*:mylibrary revealzone(mylibrary) optionone name(choose card) target(<1>enchantment|reveal) transforms((,newability[all(other *|reveal) moveto(mylibrary) and!(shuffle)!],newability[moveto(myhand)])) optiononeend optiontwo name(shuffle) bottomoflibrary target(<1>*|reveal) and!( all(*|reveal) bottomoflibrary and!(shuffle)! )! optiontwoend revealend
|
||||||
text=Search your library for an enchantment card, reveal it, and put it into your hand. Then shuffle your library.
|
text=Search your library for an enchantment card, reveal it, and put it into your hand. Then shuffle your library.
|
||||||
mana={2}{W}
|
mana={2}{W}
|
||||||
@@ -65477,7 +65477,7 @@ toughness=2
|
|||||||
[card]
|
[card]
|
||||||
name=Lavinia of the Tenth
|
name=Lavinia of the Tenth
|
||||||
abilities=protection from red
|
abilities=protection from red
|
||||||
auto=name(detain) transforms((,newability[lord(detained) cantattack],newability[lord(detained) cantblock],newability[lord(detained) noactivatedability],newability[lord(*[manacost<=4]|opponentBattlefield) becomes(detained)])) uynt
|
auto=name(detain) transforms((,newability[lord(detained) cantattack],newability[lord(detained) cantblock],newability[lord(detained) noactivatedability],newability[lord(*[-land;manacost<=4]|opponentBattlefield) becomes(detained)])) uynt
|
||||||
text=Protection from red. -- When Lavinia of the Tenth enters the battlefield, detain each nonland permanent your opponents control with converted mana cost 4 or less.
|
text=Protection from red. -- When Lavinia of the Tenth enters the battlefield, detain each nonland permanent your opponents control with converted mana cost 4 or less.
|
||||||
mana={3}{W}{U}
|
mana={3}{W}{U}
|
||||||
type=Legendary Creature
|
type=Legendary Creature
|
||||||
|
|||||||
@@ -3686,7 +3686,9 @@ MTGAbility * AbilityFactory::parseMagicLine(string s, int id, Spell * spell, MTG
|
|||||||
a->named = newName;
|
a->named = newName;
|
||||||
if(card->getAICustomCode().size() && card->controller()->isAI())
|
if(card->getAICustomCode().size() && card->controller()->isAI())
|
||||||
{
|
{
|
||||||
MTGAbility * a3 = parseMagicLine(card->getAICustomCode(), id, spell, card);
|
string abi = card->getAICustomCode();
|
||||||
|
std::transform(abi.begin(), abi.end(), abi.begin(), ::tolower);//fix crash
|
||||||
|
MTGAbility * a3 = parseMagicLine(abi, id, spell, card);
|
||||||
a3->oneShot = 1;
|
a3->oneShot = 1;
|
||||||
a3->canBeInterrupted = false;
|
a3->canBeInterrupted = false;
|
||||||
return a3;
|
return a3;
|
||||||
|
|||||||
Reference in New Issue
Block a user