Revised code for Atalya, Samite Master, Crimson Hellkite and Crypt Rats to use {X:color}
Cleaned Manacost.cpp My observation so far when paying X in activated abilities, when X doesn't work, I press escape to get in the main menu and play another game(test again), then X activated ability will work. I really don't know where to start/look for the cause of it.
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
#include "PrecompiledHeader.h"
|
||||
|
||||
#include <boost/algorithm/string.hpp>
|
||||
#include "ManaCost.h"
|
||||
#include "ManaCostHybrid.h"
|
||||
#include "ExtraCost.h"
|
||||
@@ -89,12 +89,14 @@ ManaCost * ManaCost::parseManaCost(string s, ManaCost * _manaCost, MTGCardInstan
|
||||
}
|
||||
|
||||
//switch on the first letter. If two costs share their first letter, add an "if" within the switch
|
||||
boost::algorithm::to_lower(value);
|
||||
switch (value[0])
|
||||
{
|
||||
case 'X':
|
||||
case 'x':
|
||||
if(value == "x" || value == "X")
|
||||
if(value == "x")
|
||||
{
|
||||
manaCost->x();
|
||||
}
|
||||
else
|
||||
{
|
||||
vector<string>colorSplit = parseBetween(value,"x:"," ",false);
|
||||
@@ -113,7 +115,6 @@ ManaCost * ManaCost::parseManaCost(string s, ManaCost * _manaCost, MTGCardInstan
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
||||
case 't': //Tap
|
||||
if (value == "t")
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user