added poison support, guicounter, "infect" ability, poisonous ability.
This commit is contained in:
@@ -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:
|
||||
|
||||
@@ -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;};
|
||||
};
|
||||
|
||||
|
||||
@@ -24,6 +24,7 @@ struct GuiAvatar : public GuiStatic{
|
||||
protected:
|
||||
int avatarRed;
|
||||
int currentLife;
|
||||
int currentpoisonCount;
|
||||
Corner corner;
|
||||
public:
|
||||
Player * player;
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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();
|
||||
|
||||
@@ -25,6 +25,7 @@ class RulesPlayerData{
|
||||
public:
|
||||
vector <string> extraRules;
|
||||
int life;
|
||||
int poisonCount;
|
||||
string avatar;
|
||||
ManaCost * manapool;
|
||||
RulesPlayerZone zones[5];
|
||||
|
||||
Reference in New Issue
Block a user