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:
@@ -2255,6 +2255,9 @@ public:
|
|||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const char * getMenuText(){
|
||||||
|
return "Exalted";
|
||||||
|
}
|
||||||
|
|
||||||
AExalted * clone() const{
|
AExalted * clone() const{
|
||||||
AExalted * a = NEW AExalted(*this);
|
AExalted * a = NEW AExalted(*this);
|
||||||
@@ -2935,11 +2938,11 @@ public:
|
|||||||
};
|
};
|
||||||
|
|
||||||
/* switch power and toughness of target */
|
/* switch power and toughness of target */
|
||||||
class ATwist:public InstantAbility{
|
class ASwapPT:public InstantAbility{
|
||||||
public:
|
public:
|
||||||
int oldpower;
|
int oldpower;
|
||||||
int oldtoughness;
|
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;
|
target = _target;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -2974,10 +2977,10 @@ public:
|
|||||||
}
|
}
|
||||||
|
|
||||||
const char * getMenuText(){
|
const char * getMenuText(){
|
||||||
return "Switch";
|
return "Swap power and toughness";
|
||||||
}
|
}
|
||||||
ATwist * clone() const{
|
ASwapPT * clone() const{
|
||||||
ATwist * a = NEW ATwist(*this);
|
ASwapPT * a = NEW ASwapPT(*this);
|
||||||
a->isClone = 1;
|
a->isClone = 1;
|
||||||
return a;
|
return a;
|
||||||
}
|
}
|
||||||
@@ -3299,6 +3302,11 @@ public:
|
|||||||
}
|
}
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const char * getMenuText(){
|
||||||
|
return "Transform";
|
||||||
|
}
|
||||||
|
|
||||||
ATransformer * clone() const{
|
ATransformer * clone() const{
|
||||||
ATransformer * a = NEW ATransformer(*this);
|
ATransformer * a = NEW ATransformer(*this);
|
||||||
a->isClone = 1;
|
a->isClone = 1;
|
||||||
@@ -3349,6 +3357,11 @@ public:
|
|||||||
}
|
}
|
||||||
return MTGAbility::addToGame();
|
return MTGAbility::addToGame();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const char * getMenuText(){
|
||||||
|
return "Transform";
|
||||||
|
}
|
||||||
|
|
||||||
AForeverTransformer * clone() const{
|
AForeverTransformer * clone() const{
|
||||||
AForeverTransformer * a = NEW AForeverTransformer(*this);
|
AForeverTransformer * a = NEW AForeverTransformer(*this);
|
||||||
a->isClone = 1;
|
a->isClone = 1;
|
||||||
@@ -3366,6 +3379,9 @@ public:
|
|||||||
GenericInstantAbility * wrapper = NEW GenericInstantAbility(1,source,(Damageable *)(this->target),a);
|
GenericInstantAbility * wrapper = NEW GenericInstantAbility(1,source,(Damageable *)(this->target),a);
|
||||||
wrapper->addToGame();
|
wrapper->addToGame();
|
||||||
return 1;}
|
return 1;}
|
||||||
|
const char * getMenuText(){
|
||||||
|
return "Transform";
|
||||||
|
}
|
||||||
ATransformerUEOT * clone() const{
|
ATransformerUEOT * clone() const{
|
||||||
ATransformerUEOT * a = NEW ATransformerUEOT(*this);
|
ATransformerUEOT * a = NEW ATransformerUEOT(*this);
|
||||||
a->ability = this->ability->clone();
|
a->ability = this->ability->clone();
|
||||||
@@ -3379,38 +3395,47 @@ public:
|
|||||||
public:
|
public:
|
||||||
AForeverTransformer * ability;
|
AForeverTransformer * ability;
|
||||||
ATransformerFOREVER(int id, MTGCardInstance * source, MTGCardInstance * target, string types, string abilities):InstantAbility(id,source,target){
|
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(){
|
int resolve(){
|
||||||
AForeverTransformer * a = ability->clone();
|
AForeverTransformer * a = ability->clone();
|
||||||
GenericInstantAbility * wrapper = NEW GenericInstantAbility(1,source,(Damageable *)(this->target),a);
|
GenericInstantAbility * wrapper = NEW GenericInstantAbility(1,source,(Damageable *)(this->target),a);
|
||||||
wrapper->addToGame();
|
wrapper->addToGame();
|
||||||
return 1;}
|
return 1;
|
||||||
|
}
|
||||||
|
const char * getMenuText(){
|
||||||
|
return "Transform";
|
||||||
|
}
|
||||||
ATransformerFOREVER * clone() const{
|
ATransformerFOREVER * clone() const{
|
||||||
ATransformerFOREVER * a = NEW ATransformerFOREVER(*this);
|
ATransformerFOREVER * a = NEW ATransformerFOREVER(*this);
|
||||||
a->ability = this->ability->clone();
|
a->ability = this->ability->clone();
|
||||||
a->isClone = 1;
|
a->isClone = 1;
|
||||||
return a;}
|
return a;
|
||||||
|
}
|
||||||
~ATransformerFOREVER(){delete ability;
|
~ATransformerFOREVER(){delete ability;
|
||||||
}};
|
}};
|
||||||
//switch p/t ueot
|
//switch p/t ueot
|
||||||
class ATwistUEOT: public InstantAbility{
|
class ASwapPTUEOT: public InstantAbility{
|
||||||
public:
|
public:
|
||||||
ATwist * ability;
|
ASwapPT * ability;
|
||||||
ATwistUEOT(int id, MTGCardInstance * source, MTGCardInstance * target):InstantAbility(id,source,target){
|
ASwapPTUEOT(int id, MTGCardInstance * source, MTGCardInstance * target):InstantAbility(id,source,target){
|
||||||
ability = NEW ATwist(id,source,target);}
|
ability = NEW ASwapPT(id,source,target);
|
||||||
|
}
|
||||||
int resolve(){
|
int resolve(){
|
||||||
ATwist * a = ability->clone();
|
ASwapPT * a = ability->clone();
|
||||||
GenericInstantAbility * wrapper = NEW GenericInstantAbility(1,source,(Damageable *)(this->target),a);
|
GenericInstantAbility * wrapper = NEW GenericInstantAbility(1,source,(Damageable *)(this->target),a);
|
||||||
wrapper->addToGame();
|
wrapper->addToGame();
|
||||||
return 1;}
|
return 1;
|
||||||
ATwistUEOT * clone() const{
|
}
|
||||||
ATwistUEOT * a = NEW ATwistUEOT(*this);
|
ASwapPTUEOT * clone() const{
|
||||||
|
ASwapPTUEOT * a = NEW ASwapPTUEOT(*this);
|
||||||
a->ability = this->ability->clone();
|
a->ability = this->ability->clone();
|
||||||
a->isClone = 1;
|
a->isClone = 1;
|
||||||
return a;}
|
return a;}
|
||||||
~ATwistUEOT(){
|
~ASwapPTUEOT(){
|
||||||
delete ability;
|
delete ability;
|
||||||
}};
|
}
|
||||||
|
};
|
||||||
|
|
||||||
//becomes ability
|
//becomes ability
|
||||||
//Adds types/abilities/P/T to a card (aura)
|
//Adds types/abilities/P/T to a card (aura)
|
||||||
|
|||||||
@@ -138,7 +138,7 @@ class Constants
|
|||||||
CONTROLLERSHROUD = 80,
|
CONTROLLERSHROUD = 80,
|
||||||
SUNBURST = 81,
|
SUNBURST = 81,
|
||||||
FLANKING = 82,
|
FLANKING = 82,
|
||||||
EXILEBURY = 83,
|
EXILEDEATH = 83,
|
||||||
|
|
||||||
NB_BASIC_ABILITIES = 84,
|
NB_BASIC_ABILITIES = 84,
|
||||||
|
|
||||||
|
|||||||
@@ -1336,15 +1336,8 @@ MTGAbility * AbilityFactory::parseMagicLine(string s, int id, Spell * spell, MTG
|
|||||||
}
|
}
|
||||||
return NULL;
|
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(");
|
found = s.find("bushido(");
|
||||||
if (found != string::npos){
|
if (found != string::npos){
|
||||||
int end = s.find(")", found);
|
int end = s.find(")", found);
|
||||||
@@ -1593,9 +1586,9 @@ MTGAbility * AbilityFactory::parseMagicLine(string s, int id, Spell * spell, MTG
|
|||||||
}
|
}
|
||||||
|
|
||||||
//switch targest power with toughness
|
//switch targest power with toughness
|
||||||
found = s.find("twist");
|
found = s.find("swap");
|
||||||
if (found != string::npos){
|
if (found != string::npos){
|
||||||
MTGAbility * a = NEW ATwistUEOT(id,card,target);
|
MTGAbility * a = NEW ASwapPTUEOT(id,card,target);
|
||||||
a->oneShot = 1;
|
a->oneShot = 1;
|
||||||
return a;
|
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<AAFizzler *>(a)) return BAKA_EFFECT_BAD;
|
||||||
if (dynamic_cast<AADamagePrevent *>(a)) return BAKA_EFFECT_GOOD;
|
if (dynamic_cast<AADamagePrevent *>(a)) return BAKA_EFFECT_GOOD;
|
||||||
if (dynamic_cast<AACloner *>(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<AAUntapper *>(a)) return BAKA_EFFECT_GOOD;
|
||||||
if (dynamic_cast<AATapper *>(a)) return BAKA_EFFECT_BAD;
|
if (dynamic_cast<AATapper *>(a)) return BAKA_EFFECT_BAD;
|
||||||
if (AACounter * ac = dynamic_cast<AACounter *>(a)) {
|
if (AACounter * ac = dynamic_cast<AACounter *>(a)) {
|
||||||
|
|||||||
@@ -191,7 +191,7 @@ int MTGCardInstance::afterDamage(){
|
|||||||
|
|
||||||
int MTGCardInstance::bury(){
|
int MTGCardInstance::bury(){
|
||||||
Player * p = controller();
|
Player * p = controller();
|
||||||
if (basicAbilities[Constants::EXILEBURY]){
|
if (basicAbilities[Constants::EXILEDEATH]){
|
||||||
p->game->putInZone(this,p->game->inPlay,owner->game->exile);
|
p->game->putInZone(this,p->game->inPlay,owner->game->exile);
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user