changed twist to "swap" cause it made more sense, added a couple more menutext returns, change enumerator exilebury to match its const char, this was causing massive confusion amongst the crowd.

This commit is contained in:
omegablast2002@yahoo.com
2010-10-20 19:30:17 +00:00
parent e8a44cc375
commit 306fd5e4f7
4 changed files with 49 additions and 31 deletions

View File

@@ -2255,6 +2255,9 @@ public:
return 1;
}
const char * getMenuText(){
return "Exalted";
}
AExalted * clone() const{
AExalted * a = NEW AExalted(*this);
@@ -2935,11 +2938,11 @@ public:
};
/* switch power and toughness of target */
class ATwist:public InstantAbility{
class ASwapPT:public InstantAbility{
public:
int oldpower;
int oldtoughness;
ATwist(int _id, MTGCardInstance * _source, MTGCardInstance * _target): InstantAbility(_id, _source, _target){
ASwapPT(int _id, MTGCardInstance * _source, MTGCardInstance * _target): InstantAbility(_id, _source, _target){
target = _target;
}
@@ -2974,10 +2977,10 @@ public:
}
const char * getMenuText(){
return "Switch";
return "Swap power and toughness";
}
ATwist * clone() const{
ATwist * a = NEW ATwist(*this);
ASwapPT * clone() const{
ASwapPT * a = NEW ASwapPT(*this);
a->isClone = 1;
return a;
}
@@ -3299,6 +3302,11 @@ public:
}
return 1;
}
const char * getMenuText(){
return "Transform";
}
ATransformer * clone() const{
ATransformer * a = NEW ATransformer(*this);
a->isClone = 1;
@@ -3349,6 +3357,11 @@ public:
}
return MTGAbility::addToGame();
}
const char * getMenuText(){
return "Transform";
}
AForeverTransformer * clone() const{
AForeverTransformer * a = NEW AForeverTransformer(*this);
a->isClone = 1;
@@ -3366,6 +3379,9 @@ public:
GenericInstantAbility * wrapper = NEW GenericInstantAbility(1,source,(Damageable *)(this->target),a);
wrapper->addToGame();
return 1;}
const char * getMenuText(){
return "Transform";
}
ATransformerUEOT * clone() const{
ATransformerUEOT * a = NEW ATransformerUEOT(*this);
a->ability = this->ability->clone();
@@ -3379,38 +3395,47 @@ public:
public:
AForeverTransformer * ability;
ATransformerFOREVER(int id, MTGCardInstance * source, MTGCardInstance * target, string types, string abilities):InstantAbility(id,source,target){
ability = NEW AForeverTransformer(id,source,target,types,abilities);}
ability = NEW AForeverTransformer(id,source,target,types,abilities);
}
int resolve(){
AForeverTransformer * a = ability->clone();
GenericInstantAbility * wrapper = NEW GenericInstantAbility(1,source,(Damageable *)(this->target),a);
wrapper->addToGame();
return 1;}
return 1;
}
const char * getMenuText(){
return "Transform";
}
ATransformerFOREVER * clone() const{
ATransformerFOREVER * a = NEW ATransformerFOREVER(*this);
a->ability = this->ability->clone();
a->isClone = 1;
return a;}
return a;
}
~ATransformerFOREVER(){delete ability;
}};
//switch p/t ueot
class ATwistUEOT: public InstantAbility{
class ASwapPTUEOT: public InstantAbility{
public:
ATwist * ability;
ATwistUEOT(int id, MTGCardInstance * source, MTGCardInstance * target):InstantAbility(id,source,target){
ability = NEW ATwist(id,source,target);}
ASwapPT * ability;
ASwapPTUEOT(int id, MTGCardInstance * source, MTGCardInstance * target):InstantAbility(id,source,target){
ability = NEW ASwapPT(id,source,target);
}
int resolve(){
ATwist * a = ability->clone();
ASwapPT * a = ability->clone();
GenericInstantAbility * wrapper = NEW GenericInstantAbility(1,source,(Damageable *)(this->target),a);
wrapper->addToGame();
return 1;}
ATwistUEOT * clone() const{
ATwistUEOT * a = NEW ATwistUEOT(*this);
return 1;
}
ASwapPTUEOT * clone() const{
ASwapPTUEOT * a = NEW ASwapPTUEOT(*this);
a->ability = this->ability->clone();
a->isClone = 1;
return a;}
~ATwistUEOT(){
~ASwapPTUEOT(){
delete ability;
}};
}
};
//becomes ability
//Adds types/abilities/P/T to a card (aura)

View File

@@ -138,7 +138,7 @@ class Constants
CONTROLLERSHROUD = 80,
SUNBURST = 81,
FLANKING = 82,
EXILEBURY = 83,
EXILEDEATH = 83,
NB_BASIC_ABILITIES = 84,

View File

@@ -1336,15 +1336,8 @@ MTGAbility * AbilityFactory::parseMagicLine(string s, int id, Spell * spell, MTG
}
return NULL;
}
// the following is NOT dead code. this is for stacking flanking. except auras do not yet support
//giving creatures activated/MTGAbility keywords. soon as i add this support this will be uncommented for stacking flanking.
// //flanking
// found = s.find("flanking");
// if (found != string::npos){
// return NEW AFlankerAbility(id,card);
//}
//bushido
//bushido
found = s.find("bushido(");
if (found != string::npos){
int end = s.find(")", found);
@@ -1593,9 +1586,9 @@ MTGAbility * AbilityFactory::parseMagicLine(string s, int id, Spell * spell, MTG
}
//switch targest power with toughness
found = s.find("twist");
found = s.find("swap");
if (found != string::npos){
MTGAbility * a = NEW ATwistUEOT(id,card,target);
MTGAbility * a = NEW ASwapPTUEOT(id,card,target);
a->oneShot = 1;
return a;
}
@@ -1644,7 +1637,7 @@ int AbilityFactory::abilityEfficiency(MTGAbility * a, Player * p, int mode, Targ
if (dynamic_cast<AAFizzler *>(a)) return BAKA_EFFECT_BAD;
if (dynamic_cast<AADamagePrevent *>(a)) return BAKA_EFFECT_GOOD;
if (dynamic_cast<AACloner *>(a)) return BAKA_EFFECT_GOOD;
if (dynamic_cast<ATwistUEOT *>(a)) return BAKA_EFFECT_BAD;
if (dynamic_cast<ASwapPTUEOT *>(a)) return BAKA_EFFECT_BAD;
if (dynamic_cast<AAUntapper *>(a)) return BAKA_EFFECT_GOOD;
if (dynamic_cast<AATapper *>(a)) return BAKA_EFFECT_BAD;
if (AACounter * ac = dynamic_cast<AACounter *>(a)) {

View File

@@ -191,7 +191,7 @@ int MTGCardInstance::afterDamage(){
int MTGCardInstance::bury(){
Player * p = controller();
if (basicAbilities[Constants::EXILEBURY]){
if (basicAbilities[Constants::EXILEDEATH]){
p->game->putInZone(this,p->game->inPlay,owner->game->exile);
return 1;
}