added poison support, guicounter, "infect" ability, poisonous ability.

This commit is contained in:
omegablast2002@yahoo.com
2010-08-25 18:56:34 +00:00
parent a9850317ff
commit e644aaae3a
14 changed files with 137 additions and 11 deletions
+29
View File
@@ -2196,7 +2196,36 @@ AADamager(int _id, MTGCardInstance * _source, Targetable * _target, WParsedInt *
};
//poison removel
class AARemovePoison:public ActivatedAbilityTP{
public:
int poison;
AARemovePoison(int _id, MTGCardInstance * _source, Targetable * _target,int poison, ManaCost * _cost=NULL, int doTap = 0, int who = TargetChooser::UNSET):ActivatedAbilityTP(_id,_source,_target,_cost,doTap,who),poison(poison){
}
int resolve(){
Damageable * _target = (Damageable *) getTarget();
if(_target){
_target->poisonCount -= poison;
}
return 0;
}
const char * getMenuText(){
return "Remove Poison";
}
AARemovePoison * clone() const{
AARemovePoison * a = NEW AARemovePoison(*this);
a->isClone = 1;
return a;
}
~AARemovePoison(){
}
};
/* Standard Damager, can choose a NEW target each time the price is paid */
class TADamager:public TargetAbility{
public:
+2 -1
View File
@@ -19,14 +19,15 @@ class GameObserver;
class Damageable:public Targetable {
protected:
public:
int life;
int poisonCount;
int type_as_damageable;
Damageable(int _life){life=_life;};
int getLife(){return life;};
virtual int dealDamage(int damage){life-=damage;return life;};
virtual int afterDamage(){return 0;}
virtual int poisoned(){return 0;}
virtual JQuad * getIcon(){return NULL;};
};
+1
View File
@@ -24,6 +24,7 @@ struct GuiAvatar : public GuiStatic{
protected:
int avatarRed;
int currentLife;
int currentpoisonCount;
Corner corner;
public:
Player * player;
-1
View File
@@ -93,7 +93,6 @@ class MTGCardInstance: public CardPrimitive, public MTGCard, public Damageable {
MTGCardInstance * getNextOpponent(MTGCardInstance * previous=NULL);
int nbOpponents();
int stepPower(CombatStep step);
int afterDamage();
int has(int ability);
+5 -1
View File
@@ -103,8 +103,12 @@ class Constants
HORSEMANSHIP = 45,
CANTREGEN = 46,
ONEBLOCKER = 47,
INFECT = 48,
POISONDAMAGE = 49,
POISONTWODAMAGE = 50,
POISONTHREEDAMAGE = 51,
NB_BASIC_ABILITIES = 48,
NB_BASIC_ABILITIES = 52,
RARITY_S = 'S', //Special Rarity
+1
View File
@@ -24,6 +24,7 @@ class Player: public Damageable{
int canPutLandsIntoPlay;
MTGPlayerCards * game;
int afterDamage();
int poisoned();
Player(MTGPlayerCards * deck, string deckFile, string deckFileSmall);
virtual ~Player();
void unTapPhase();
+1
View File
@@ -25,6 +25,7 @@ class RulesPlayerData{
public:
vector <string> extraRules;
int life;
int poisonCount;
string avatar;
ManaCost * manapool;
RulesPlayerZone zones[5];