added bloodthirst:number ability

This commit is contained in:
omegablast2002@yahoo.com
2010-08-26 16:05:48 +00:00
parent 3b9b79bb6e
commit aef30e6e0d
12 changed files with 63 additions and 7 deletions
+27 -5
View File
@@ -53,12 +53,14 @@ public:
intValue = target->getManaCost()->getConvertedCost();
}else if (s == "lifetotal"){
intValue = target->controller()->life;
}else if (s == "odcount"){
intValue = target->controller()->opponent()->damageCount;
}else if (s == "opponentlifetotal"){
intValue = target->controller()->opponent()->life;
}else if (s == "p"){
intValue = target->power;
}else if (s == "t"){
intValue = target->toughness;
}else if (s == "p" || s == "power"){
intValue = target->getPower();
}else if (s == "t" || s == "toughness"){
intValue = target->getToughness();
}else{
intValue = atoi(s.c_str());
}
@@ -2491,7 +2493,27 @@ public:
~AResetCost(){
}
};
//bloodthirst ability------------------------------------------
class ABloodThirst:public MTGAbility{
public:
int amount;
ABloodThirst(int id, MTGCardInstance * source, MTGCardInstance * target,int amount):MTGAbility(id,source,target),amount(amount){
MTGCardInstance * _target = (MTGCardInstance *)target;}
int addToGame(){
MTGCardInstance * _target = (MTGCardInstance *)target;
amount;
for(int i = 0;i < amount;i++){
if(_target->controller()->opponent()->damaged() > 0){
_target->counters->addCounter(1,1);}
}
return 1;}
ABloodThirst * clone() const{
ABloodThirst * a = NEW ABloodThirst(*this);
a->isClone = 1;
return a;
}
~ABloodThirst(){}
};
//reduce or increase manacost of target by color:amount------------------------------------------
class AManaRedux:public MTGAbility{
public:
+1
View File
@@ -22,6 +22,7 @@ class Damageable:public Targetable {
public:
int life;
int poisonCount;
int damageCount;
int type_as_damageable;
Damageable(int _life){life=_life;};
int getLife(){return life;};
+2 -1
View File
@@ -107,8 +107,9 @@ class Constants
POISONDAMAGE = 49,
POISONTWODAMAGE = 50,
POISONTHREEDAMAGE = 51,
POWERBLOCKER = 52,
NB_BASIC_ABILITIES = 52,
NB_BASIC_ABILITIES = 53,
RARITY_S = 'S', //Special Rarity
+1
View File
@@ -25,6 +25,7 @@ class Player: public Damageable{
MTGPlayerCards * game;
int afterDamage();
int poisoned();
int damaged();
Player(MTGPlayerCards * deck, string deckFile, string deckFileSmall);
virtual ~Player();
void unTapPhase();
+1
View File
@@ -26,6 +26,7 @@ class RulesPlayerData{
vector <string> extraRules;
int life;
int poisonCount;
int damageCount;
string avatar;
ManaCost * manapool;
RulesPlayerZone zones[5];