d5f3e4cfea
Also fixed the project includes so that we don't need to always use the indirect include path, ie: #include "../include/foo.h" -> #include "foo.h" I'm don't know much about make files - if I busted the linux build, mea culpa, but I think we're okay on that front too. For future reference, here's the most straightforward link on the topic of adding pch support to make files: http://www.mercs-eng.com/~hulud/index.php?2008/06/13/6-writing-a-good-makefile-for-a-c-project
29 lines
552 B
C++
29 lines
552 B
C++
#include "PrecompiledHeader.h"
|
|
|
|
#include "ManaCostHybrid.h"
|
|
|
|
ManaCostHybrid::ManaCostHybrid(){
|
|
init(0,0,0,0);
|
|
}
|
|
|
|
ManaCostHybrid::ManaCostHybrid(int c1,int v1,int c2,int v2){
|
|
init(c1,v1,c2,v2);
|
|
}
|
|
|
|
void ManaCostHybrid::init(int c1,int v1,int c2,int v2){
|
|
color1 = c1;
|
|
color2 = c2;
|
|
value1 = v1;
|
|
value2 = v2;
|
|
}
|
|
|
|
int ManaCostHybrid::getConvertedCost(){
|
|
if (value2 > value1) return value2;
|
|
return value1;
|
|
}
|
|
|
|
int ManaCostHybrid::hasColor(int color){
|
|
if (((color1 == color) && value1) || ((color2 == color) && value2)) return 1;
|
|
return 0;
|
|
}
|