@@ -78315,7 +78315,7 @@ type=Sorcery
|
||||
[card]
|
||||
name=Path to Exile
|
||||
target=creature
|
||||
auto=transforms((,newability[moveto(exile)],newability[may name(fetch basic land) notatarget(land[basic]|mylibrary) moveTo(mybattlefield) and!(tap(noevent))!])) oneshot
|
||||
auto=transforms((,newability[moveto(exile)],newability[name(fetch basic land) notatarget(land[basic]|mylibrary) moveTo(mybattlefield) and!( tap(noevent) )! ])) oneshot
|
||||
text=Exile target creature. Its controller may search his or her library for a basic land card, put that card onto the battlefield tapped, then shuffle his or her library.
|
||||
mana={W}
|
||||
type=Instant
|
||||
@@ -104783,7 +104783,7 @@ type=Instant
|
||||
name=Startled Awake
|
||||
target=opponent
|
||||
auto=deplete:13 targetedplayer
|
||||
autograveyard={{3}{U}{U}}:moveto(mybattlefield) and!(flip(Persistent Nightmare))! assorcery
|
||||
autograveyard={3}{U}{U}:moveto(mybattlefield) and!(flip(Persistent Nightmare))! assorcery
|
||||
text=Target opponent puts the top thirteen cards of his or her library into his or her graveyard. -- {3}{U}{U}: Put Startled Awake from your graveyard onto the battlefield transformed. Activate this ability only any time you could cast a sorcery.
|
||||
mana={2}{U}{U}
|
||||
type=Sorcery
|
||||
|
||||
@@ -2211,7 +2211,12 @@ public:
|
||||
|
||||
assert(modifier < 2);
|
||||
((MTGCardInstance *) target)->basicAbilities.set(ability, modifier > 0);
|
||||
|
||||
//---add or subtract so we can keep track - for future use
|
||||
((MTGCardInstance *) target)->modbasicAbilities[ability] += modifier;
|
||||
//---make sure no negative values
|
||||
if(((MTGCardInstance *) target)->modbasicAbilities[ability] < 0)
|
||||
((MTGCardInstance *) target)->modbasicAbilities[ability] = 0;
|
||||
//---end add or subtract abilities
|
||||
return MTGAbility::addToGame();
|
||||
}
|
||||
|
||||
@@ -2262,7 +2267,7 @@ public:
|
||||
|
||||
assert(value < 2);
|
||||
_target->basicAbilities.set(ability, value > 0);
|
||||
_target->modifiedbAbi += 1;
|
||||
|
||||
return InstantAbility::addToGame();
|
||||
}
|
||||
|
||||
@@ -2275,10 +2280,7 @@ public:
|
||||
{
|
||||
MTGCardInstance * _target = (MTGCardInstance *) target;
|
||||
if (_target)
|
||||
{
|
||||
_target->basicAbilities.set(ability, stateBeforeActivation);
|
||||
_target->modifiedbAbi -= 1;
|
||||
}
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
||||
@@ -57,8 +57,8 @@ public:
|
||||
|
||||
uint8_t colors;
|
||||
typedef std::bitset<Constants::NB_BASIC_ABILITIES> BasicAbilitiesSet;
|
||||
vector<int> modbasicAbilities;
|
||||
BasicAbilitiesSet basicAbilities;
|
||||
BasicAbilitiesSet origbasicAbilities;
|
||||
BasicAbilitiesSet LKIbasicAbilities;
|
||||
|
||||
map<string,string> magicTexts;
|
||||
@@ -115,6 +115,8 @@ public:
|
||||
bool isCreature();
|
||||
bool isLand();
|
||||
bool isSpell();
|
||||
bool isPermanent();
|
||||
bool isSorceryorInstant();
|
||||
int dredge();
|
||||
void setPower(int _power);
|
||||
int getPower();
|
||||
|
||||
@@ -256,7 +256,6 @@ public:
|
||||
bool bypassTC;
|
||||
bool discarded;
|
||||
int copiedID;
|
||||
int modifiedbAbi;
|
||||
bool StackIsEmptyandSorcerySpeed();
|
||||
bool isTargetted();
|
||||
int cardistargetted;
|
||||
|
||||
@@ -3940,8 +3940,6 @@ int AACloner::resolve()
|
||||
{
|
||||
spell->source->addType(*it);
|
||||
}
|
||||
spell->source->modifiedbAbi = _target->modifiedbAbi;
|
||||
//spell->source->basicAbilities = _target->origbasicAbilities;
|
||||
for(int k = 0; k < Constants::NB_BASIC_ABILITIES; k++)
|
||||
{
|
||||
if(_target->model->data->basicAbilities[k])
|
||||
@@ -4117,8 +4115,11 @@ int AAMover::resolve()
|
||||
//inplay is a special zone !
|
||||
for (int i = 0; i < 2; i++)
|
||||
{
|
||||
if (!_target->hasSubtype(Subtypes::TYPE_INSTANT) && !_target->hasSubtype(Subtypes::TYPE_SORCERY) && !_target->hasSubtype(Subtypes::TYPE_AURA) && destZone == game->players[i]->game->inPlay && fromZone != game->players[i]->game->inPlay && fromZone
|
||||
!= game->players[i]->opponent()->game->inPlay)
|
||||
if (!_target->isSorceryorInstant() &&
|
||||
!_target->hasSubtype(Subtypes::TYPE_AURA) &&
|
||||
destZone == game->players[i]->game->inPlay &&
|
||||
fromZone != game->players[i]->game->inPlay &&
|
||||
fromZone != game->players[i]->opponent()->game->inPlay)
|
||||
{
|
||||
MTGCardInstance * copy = game->players[i]->game->putInZone(_target, fromZone, game->players[i]->game->temp);
|
||||
Spell * spell = NEW Spell(game, copy);
|
||||
@@ -4177,8 +4178,7 @@ int AAMover::resolve()
|
||||
}
|
||||
else
|
||||
{
|
||||
if((_target->hasSubtype(Subtypes::TYPE_INSTANT) || _target->hasSubtype(Subtypes::TYPE_SORCERY)) &&
|
||||
(destZone == game->players[0]->game->inPlay || destZone == game->players[1]->game->inPlay))
|
||||
if(_target->isSorceryorInstant() && (destZone == game->players[0]->game->inPlay || destZone == game->players[1]->game->inPlay))
|
||||
{
|
||||
if(andAbility)
|
||||
{
|
||||
@@ -5650,7 +5650,6 @@ for (it = types.begin(); it != types.end(); it++)
|
||||
for (it = abilities.begin(); it != abilities.end(); it++)
|
||||
{
|
||||
_target->basicAbilities.set(*it);
|
||||
_target->modifiedbAbi += 1;
|
||||
}
|
||||
|
||||
if(newAbilityFound)
|
||||
@@ -5799,7 +5798,6 @@ int ATransformer::destroy()
|
||||
for (it = abilities.begin(); it != abilities.end(); it++)
|
||||
{
|
||||
_target->basicAbilities.reset(*it);
|
||||
_target->modifiedbAbi -= 1;
|
||||
}
|
||||
|
||||
for (it = oldcolors.begin(); it != oldcolors.end(); it++)
|
||||
|
||||
@@ -41,7 +41,10 @@ CardPrimitive::CardPrimitive(CardPrimitive * source)
|
||||
if(!source)
|
||||
return;
|
||||
basicAbilities = source->basicAbilities;
|
||||
origbasicAbilities = source->basicAbilities;
|
||||
for(int k=0; k < Constants::NB_BASIC_ABILITIES; k++)
|
||||
{
|
||||
modbasicAbilities.push_back(source->basicAbilities[k]);
|
||||
}
|
||||
LKIbasicAbilities = source->basicAbilities;
|
||||
|
||||
for (size_t i = 0; i < source->types.size(); ++i)
|
||||
@@ -79,7 +82,7 @@ CardPrimitive::~CardPrimitive()
|
||||
int CardPrimitive::init()
|
||||
{
|
||||
basicAbilities.reset();
|
||||
origbasicAbilities.reset();
|
||||
modbasicAbilities.clear();
|
||||
|
||||
types.clear();
|
||||
|
||||
@@ -110,6 +113,18 @@ bool CardPrimitive::isSpell()
|
||||
return (!isCreature() && !isLand());
|
||||
}
|
||||
|
||||
bool CardPrimitive::isPermanent()
|
||||
{
|
||||
return (!isSorceryorInstant());
|
||||
}
|
||||
|
||||
bool CardPrimitive::isSorceryorInstant()
|
||||
{
|
||||
if(hasSubtype(Subtypes::TYPE_SORCERY)||hasSubtype(Subtypes::TYPE_INSTANT))
|
||||
return true;
|
||||
return false;
|
||||
}
|
||||
|
||||
int CardPrimitive::dredge()
|
||||
{
|
||||
return dredgeAmount;
|
||||
|
||||
@@ -954,12 +954,8 @@ void GameObserver::gameStateBasedEffects()
|
||||
p->game->putInExile(c);
|
||||
|
||||
}
|
||||
}/*
|
||||
if(c->modifiedbAbi > 0)
|
||||
{
|
||||
c->modifiedbAbi = 0;
|
||||
c->basicAbilities = c->origbasicAbilities;
|
||||
}*///disabled this failed logic I introduce... when copying/cloning a card copy orig basic abilities...
|
||||
}
|
||||
|
||||
if(nbcards > z->nb_cards)
|
||||
{
|
||||
t = 0;
|
||||
|
||||
@@ -64,7 +64,6 @@ MTGCardInstance::MTGCardInstance(MTGCard * card, MTGPlayerCards * arg_belongs_to
|
||||
bypassTC = false;
|
||||
discarded = false;
|
||||
copiedID = getId();
|
||||
modifiedbAbi = 0;
|
||||
LKIpower = power;
|
||||
LKItoughness = toughness;
|
||||
cardistargetted = 0;
|
||||
@@ -100,15 +99,12 @@ void MTGCardInstance::copy(MTGCardInstance * card)
|
||||
MTGCard * source = card->model;
|
||||
CardPrimitive * data = source->data;
|
||||
|
||||
//basicAbilities = card->origbasicAbilities;
|
||||
for(int k = 0; k < Constants::NB_BASIC_ABILITIES; k++)
|
||||
{
|
||||
if(card->model->data->basicAbilities[k])
|
||||
basicAbilities[k] = card->model->data->basicAbilities[k];
|
||||
}
|
||||
|
||||
origbasicAbilities = card->origbasicAbilities;
|
||||
modifiedbAbi = card->modifiedbAbi;
|
||||
for (size_t i = 0; i < data->types.size(); i++)
|
||||
{
|
||||
types.push_back(data->types[i]);
|
||||
|
||||
Reference in New Issue
Block a user