-attempt at issue 81. It will do for now
This commit is contained in:
wagic.the.homebrew@gmail.com
2009-10-04 08:39:34 +00:00
parent 6a2f454e64
commit 61cb849d33
3 changed files with 20 additions and 5 deletions
+5 -1
View File
@@ -136,6 +136,10 @@ void ManaCost::x(){
cost[Constants::MTG_NB_COLORS] = 1;
}
int ManaCost::hasX(){
return cost[Constants::MTG_NB_COLORS];
}
void ManaCost::init(){
int i;
for (i=0; i<= Constants::MTG_NB_COLORS; i++){
@@ -379,7 +383,7 @@ ManaCost * ManaCost::Diff(ManaCost * _cost){
}
//Cost X
if (_cost->getCost(Constants::MTG_NB_COLORS)){
if (_cost->hasX()){
diff[Constants::MTG_NB_COLORS * 2 + 1] = 0;
for (int i=0; i < Constants::MTG_NB_COLORS; i++){
if (diff[i*2 + 1] > 0){