- Added remove/add counters as a cost, patch by Salmelo, thanks man!. See primitives/mtg.txt -> Thallid to see how it works
- added test for i286 by salmelo
- added basic display for counters (this needs improvement) by salmelo
This commit is contained in:
wagic.the.homebrew@gmail.com
2010-03-22 04:26:42 +00:00
parent 99db31fe9d
commit 22a35d2265
15 changed files with 334 additions and 20 deletions
+4 -3
View File
@@ -202,10 +202,11 @@ public:
//counters
class AACounter: public ActivatedAbility{
public:
string name;
int nb;
int power;
int toughness;
AACounter(int id, MTGCardInstance * source, MTGCardInstance * target, int power, int toughness, int nb, ManaCost * cost = NULL, int doTap = 0) : ActivatedAbility(id, source, cost, 0, doTap), nb(nb), power(power), toughness(toughness) {
AACounter(int id, MTGCardInstance * source, MTGCardInstance * target, const char * _name, int power, int toughness, int nb, ManaCost * cost = NULL, int doTap = 0) : ActivatedAbility(id, source, cost, 0, doTap), nb(nb), power(power), toughness(toughness), name(_name) {
this->target = target;
}
@@ -215,11 +216,11 @@ class AACounter: public ActivatedAbility{
MTGCardInstance * _target = (MTGCardInstance *)target;
if (nb>0){
for (int i=0; i < nb; i++){
_target->counters->addCounter(power, toughness);
_target->counters->addCounter(name.c_str(), power, toughness);
}
}else{
for (int i=0; i < -nb; i++){
_target->counters->removeCounter(power, toughness);
_target->counters->removeCounter(name.c_str(), power, toughness);
}
}
return nb;