@@ -78315,7 +78315,7 @@ type=Sorcery
|
|||||||
[card]
|
[card]
|
||||||
name=Path to Exile
|
name=Path to Exile
|
||||||
target=creature
|
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.
|
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}
|
mana={W}
|
||||||
type=Instant
|
type=Instant
|
||||||
@@ -104783,7 +104783,7 @@ type=Instant
|
|||||||
name=Startled Awake
|
name=Startled Awake
|
||||||
target=opponent
|
target=opponent
|
||||||
auto=deplete:13 targetedplayer
|
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.
|
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}
|
mana={2}{U}{U}
|
||||||
type=Sorcery
|
type=Sorcery
|
||||||
|
|||||||
@@ -2211,7 +2211,12 @@ public:
|
|||||||
|
|
||||||
assert(modifier < 2);
|
assert(modifier < 2);
|
||||||
((MTGCardInstance *) target)->basicAbilities.set(ability, modifier > 0);
|
((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();
|
return MTGAbility::addToGame();
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -2262,7 +2267,7 @@ public:
|
|||||||
|
|
||||||
assert(value < 2);
|
assert(value < 2);
|
||||||
_target->basicAbilities.set(ability, value > 0);
|
_target->basicAbilities.set(ability, value > 0);
|
||||||
_target->modifiedbAbi += 1;
|
|
||||||
return InstantAbility::addToGame();
|
return InstantAbility::addToGame();
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -2275,10 +2280,7 @@ public:
|
|||||||
{
|
{
|
||||||
MTGCardInstance * _target = (MTGCardInstance *) target;
|
MTGCardInstance * _target = (MTGCardInstance *) target;
|
||||||
if (_target)
|
if (_target)
|
||||||
{
|
|
||||||
_target->basicAbilities.set(ability, stateBeforeActivation);
|
_target->basicAbilities.set(ability, stateBeforeActivation);
|
||||||
_target->modifiedbAbi -= 1;
|
|
||||||
}
|
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -57,8 +57,8 @@ public:
|
|||||||
|
|
||||||
uint8_t colors;
|
uint8_t colors;
|
||||||
typedef std::bitset<Constants::NB_BASIC_ABILITIES> BasicAbilitiesSet;
|
typedef std::bitset<Constants::NB_BASIC_ABILITIES> BasicAbilitiesSet;
|
||||||
|
vector<int> modbasicAbilities;
|
||||||
BasicAbilitiesSet basicAbilities;
|
BasicAbilitiesSet basicAbilities;
|
||||||
BasicAbilitiesSet origbasicAbilities;
|
|
||||||
BasicAbilitiesSet LKIbasicAbilities;
|
BasicAbilitiesSet LKIbasicAbilities;
|
||||||
|
|
||||||
map<string,string> magicTexts;
|
map<string,string> magicTexts;
|
||||||
@@ -115,6 +115,8 @@ public:
|
|||||||
bool isCreature();
|
bool isCreature();
|
||||||
bool isLand();
|
bool isLand();
|
||||||
bool isSpell();
|
bool isSpell();
|
||||||
|
bool isPermanent();
|
||||||
|
bool isSorceryorInstant();
|
||||||
int dredge();
|
int dredge();
|
||||||
void setPower(int _power);
|
void setPower(int _power);
|
||||||
int getPower();
|
int getPower();
|
||||||
|
|||||||
@@ -256,7 +256,6 @@ public:
|
|||||||
bool bypassTC;
|
bool bypassTC;
|
||||||
bool discarded;
|
bool discarded;
|
||||||
int copiedID;
|
int copiedID;
|
||||||
int modifiedbAbi;
|
|
||||||
bool StackIsEmptyandSorcerySpeed();
|
bool StackIsEmptyandSorcerySpeed();
|
||||||
bool isTargetted();
|
bool isTargetted();
|
||||||
int cardistargetted;
|
int cardistargetted;
|
||||||
|
|||||||
@@ -3940,8 +3940,6 @@ int AACloner::resolve()
|
|||||||
{
|
{
|
||||||
spell->source->addType(*it);
|
spell->source->addType(*it);
|
||||||
}
|
}
|
||||||
spell->source->modifiedbAbi = _target->modifiedbAbi;
|
|
||||||
//spell->source->basicAbilities = _target->origbasicAbilities;
|
|
||||||
for(int k = 0; k < Constants::NB_BASIC_ABILITIES; k++)
|
for(int k = 0; k < Constants::NB_BASIC_ABILITIES; k++)
|
||||||
{
|
{
|
||||||
if(_target->model->data->basicAbilities[k])
|
if(_target->model->data->basicAbilities[k])
|
||||||
@@ -4117,8 +4115,11 @@ int AAMover::resolve()
|
|||||||
//inplay is a special zone !
|
//inplay is a special zone !
|
||||||
for (int i = 0; i < 2; i++)
|
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
|
if (!_target->isSorceryorInstant() &&
|
||||||
!= game->players[i]->opponent()->game->inPlay)
|
!_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);
|
MTGCardInstance * copy = game->players[i]->game->putInZone(_target, fromZone, game->players[i]->game->temp);
|
||||||
Spell * spell = NEW Spell(game, copy);
|
Spell * spell = NEW Spell(game, copy);
|
||||||
@@ -4177,8 +4178,7 @@ int AAMover::resolve()
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
if((_target->hasSubtype(Subtypes::TYPE_INSTANT) || _target->hasSubtype(Subtypes::TYPE_SORCERY)) &&
|
if(_target->isSorceryorInstant() && (destZone == game->players[0]->game->inPlay || destZone == game->players[1]->game->inPlay))
|
||||||
(destZone == game->players[0]->game->inPlay || destZone == game->players[1]->game->inPlay))
|
|
||||||
{
|
{
|
||||||
if(andAbility)
|
if(andAbility)
|
||||||
{
|
{
|
||||||
@@ -5650,7 +5650,6 @@ for (it = types.begin(); it != types.end(); it++)
|
|||||||
for (it = abilities.begin(); it != abilities.end(); it++)
|
for (it = abilities.begin(); it != abilities.end(); it++)
|
||||||
{
|
{
|
||||||
_target->basicAbilities.set(*it);
|
_target->basicAbilities.set(*it);
|
||||||
_target->modifiedbAbi += 1;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if(newAbilityFound)
|
if(newAbilityFound)
|
||||||
@@ -5799,7 +5798,6 @@ int ATransformer::destroy()
|
|||||||
for (it = abilities.begin(); it != abilities.end(); it++)
|
for (it = abilities.begin(); it != abilities.end(); it++)
|
||||||
{
|
{
|
||||||
_target->basicAbilities.reset(*it);
|
_target->basicAbilities.reset(*it);
|
||||||
_target->modifiedbAbi -= 1;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
for (it = oldcolors.begin(); it != oldcolors.end(); it++)
|
for (it = oldcolors.begin(); it != oldcolors.end(); it++)
|
||||||
|
|||||||
@@ -41,7 +41,10 @@ CardPrimitive::CardPrimitive(CardPrimitive * source)
|
|||||||
if(!source)
|
if(!source)
|
||||||
return;
|
return;
|
||||||
basicAbilities = source->basicAbilities;
|
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;
|
LKIbasicAbilities = source->basicAbilities;
|
||||||
|
|
||||||
for (size_t i = 0; i < source->types.size(); ++i)
|
for (size_t i = 0; i < source->types.size(); ++i)
|
||||||
@@ -79,7 +82,7 @@ CardPrimitive::~CardPrimitive()
|
|||||||
int CardPrimitive::init()
|
int CardPrimitive::init()
|
||||||
{
|
{
|
||||||
basicAbilities.reset();
|
basicAbilities.reset();
|
||||||
origbasicAbilities.reset();
|
modbasicAbilities.clear();
|
||||||
|
|
||||||
types.clear();
|
types.clear();
|
||||||
|
|
||||||
@@ -110,6 +113,18 @@ bool CardPrimitive::isSpell()
|
|||||||
return (!isCreature() && !isLand());
|
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()
|
int CardPrimitive::dredge()
|
||||||
{
|
{
|
||||||
return dredgeAmount;
|
return dredgeAmount;
|
||||||
|
|||||||
@@ -954,12 +954,8 @@ void GameObserver::gameStateBasedEffects()
|
|||||||
p->game->putInExile(c);
|
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)
|
if(nbcards > z->nb_cards)
|
||||||
{
|
{
|
||||||
t = 0;
|
t = 0;
|
||||||
|
|||||||
@@ -64,7 +64,6 @@ MTGCardInstance::MTGCardInstance(MTGCard * card, MTGPlayerCards * arg_belongs_to
|
|||||||
bypassTC = false;
|
bypassTC = false;
|
||||||
discarded = false;
|
discarded = false;
|
||||||
copiedID = getId();
|
copiedID = getId();
|
||||||
modifiedbAbi = 0;
|
|
||||||
LKIpower = power;
|
LKIpower = power;
|
||||||
LKItoughness = toughness;
|
LKItoughness = toughness;
|
||||||
cardistargetted = 0;
|
cardistargetted = 0;
|
||||||
@@ -100,15 +99,12 @@ void MTGCardInstance::copy(MTGCardInstance * card)
|
|||||||
MTGCard * source = card->model;
|
MTGCard * source = card->model;
|
||||||
CardPrimitive * data = source->data;
|
CardPrimitive * data = source->data;
|
||||||
|
|
||||||
//basicAbilities = card->origbasicAbilities;
|
|
||||||
for(int k = 0; k < Constants::NB_BASIC_ABILITIES; k++)
|
for(int k = 0; k < Constants::NB_BASIC_ABILITIES; k++)
|
||||||
{
|
{
|
||||||
if(card->model->data->basicAbilities[k])
|
if(card->model->data->basicAbilities[k])
|
||||||
basicAbilities[k] = 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++)
|
for (size_t i = 0; i < data->types.size(); i++)
|
||||||
{
|
{
|
||||||
types.push_back(data->types[i]);
|
types.push_back(data->types[i]);
|
||||||
|
|||||||
Reference in New Issue
Block a user