turned the "ai hint" for level up creatures into an MTGAbility.
this fixes a bug(?) that had high priority and maintains same effect as before. removed all traces of the "bugged(?) hint" from CardPrimitive. Issue: 498
This commit is contained in:
@@ -2915,6 +2915,26 @@ public:
|
||||
}
|
||||
};
|
||||
|
||||
/* set max level up on a levelup creature this is an Ai hint ability, no effect for players.*/
|
||||
class AAWhatsMax:public ActivatedAbility{
|
||||
public:
|
||||
int value;
|
||||
AAWhatsMax(int id, MTGCardInstance * card, MTGCardInstance * source,ManaCost * _cost = NULL, int doTap = 0,int value = 0):ActivatedAbility(id,card, _cost,0,doTap),value(value){
|
||||
}
|
||||
int resolve(){
|
||||
MTGCardInstance * _target = (MTGCardInstance *) target;
|
||||
if (source){
|
||||
source->MaxLevelUp = value;
|
||||
}
|
||||
return 1;
|
||||
}
|
||||
AAWhatsMax * clone() const{
|
||||
AAWhatsMax * a = NEW AAWhatsMax(*this);
|
||||
a->isClone = 1;
|
||||
return a;
|
||||
}
|
||||
};
|
||||
|
||||
/* Can prevent a card from untapping next untap */
|
||||
class AAFrozen:public ActivatedAbility{
|
||||
public:
|
||||
|
||||
@@ -29,7 +29,6 @@ class CardPrimitive {
|
||||
string spellTargetType;
|
||||
int power;
|
||||
int toughness;
|
||||
int level;
|
||||
vector<int>types;
|
||||
CardPrimitive();
|
||||
CardPrimitive(CardPrimitive * source);
|
||||
@@ -75,9 +74,6 @@ class CardPrimitive {
|
||||
int getPower();
|
||||
void setToughness(int _toughness);
|
||||
int getToughness();
|
||||
void setMaxLevel(int _level);
|
||||
int getMaxLevel();
|
||||
|
||||
const vector<string>& formattedText();
|
||||
};
|
||||
|
||||
|
||||
@@ -60,6 +60,7 @@ class MTGCardInstance: public CardPrimitive, public MTGCard, public Damageable {
|
||||
int didblocked;
|
||||
int notblocked;
|
||||
int fresh;
|
||||
int MaxLevelUp;
|
||||
Player * lastController;
|
||||
MTGGameZone * getCurrentZone();
|
||||
MTGGameZone * previousZone;
|
||||
|
||||
Reference in New Issue
Block a user