Merge pull request #710 from kevlahnota/master
Add Vedalken Shackles Ability
This commit is contained in:
@@ -45725,6 +45725,15 @@ type=Legendary Artifact
|
||||
subtype=Equipment
|
||||
[/card]
|
||||
[card]
|
||||
name=Helm of Possession
|
||||
alias=50120
|
||||
auto={2}{T}{S(creature|mybattlefield)}:shackle target(creature)
|
||||
auto=@each my untap restriction{canuntap}:may untap
|
||||
text=You may choose not to untap Helm of Possession during your untap step. -- {2}, {T}, Sacrifice a creature: Gain control of target creature for as long as you control Helm of Possession and Helm of Possession remains tapped.
|
||||
mana={4}
|
||||
type=Artifact
|
||||
[/card]
|
||||
[card]
|
||||
name=Helm of the Ghastlord
|
||||
target=creature
|
||||
auto=teach(creature[blue]) 1/1
|
||||
@@ -46428,6 +46437,18 @@ mana={2}
|
||||
type=Artifact
|
||||
[/card]
|
||||
[card]
|
||||
name=Hivis of the Scale
|
||||
alias=50120
|
||||
auto={T}:shackle target(dragon)
|
||||
auto=@each my untap restriction{canuntap}:may untap
|
||||
text=You may choose not to untap Hivis of the Scale during your untap step. -- {T}: Gain control of target Dragon for as long as you control Hivis and Hivis remains tapped.
|
||||
mana={3}{R}{R}
|
||||
type=Legendary Creature
|
||||
subtype=Viashino Shaman
|
||||
power=3
|
||||
toughness=4
|
||||
[/card]
|
||||
[card]
|
||||
name=Hoar Shade
|
||||
auto={B}:1/1
|
||||
text={B}: Hoar Shade gets +1/+1 until end of turn.
|
||||
@@ -69577,6 +69598,18 @@ power=3
|
||||
toughness=6
|
||||
[/card]
|
||||
[card]
|
||||
name=Old Man of the Sea
|
||||
alias=50120
|
||||
auto={T}:shackle target(creature[power<=storedpower])
|
||||
auto=@each my untap restriction{canuntap}:may untap
|
||||
text=You may choose not to untap Old Man of the Sea during your untap step. -- {T}: Gain control of target creature with power less than or equal to Old Man of the Sea's power for as long as Old Man of the Sea remains tapped and that creature's power remains less than or equal to Old Man of the Sea's power.
|
||||
mana={1}{U}{U}
|
||||
type=Creature
|
||||
subtype=Djinn
|
||||
power=2
|
||||
toughness=3
|
||||
[/card]
|
||||
[card]
|
||||
name=Olivia Voldaren
|
||||
abilities=flying
|
||||
auto={1}{R}:all(this) counter(1/1,1) && target(other creature) damage:1 && transforms((vampire)) forever
|
||||
@@ -82544,6 +82577,18 @@ power=*
|
||||
toughness=*
|
||||
[/card]
|
||||
[card]
|
||||
name=Rubinia Soulsinger
|
||||
alias=50120
|
||||
auto={T}:shackle target(creature)
|
||||
auto=@each my untap restriction{canuntap}:may untap
|
||||
text=You may choose not to untap Rubinia Soulsinger during your untap step. -- {T}: Gain control of target creature for as long as you control Rubinia and Rubinia remains tapped.
|
||||
mana={2}{G}{W}{U}
|
||||
type=Legendary Creature
|
||||
subtype=Faerie
|
||||
power=2
|
||||
toughness=3
|
||||
[/card]
|
||||
[card]
|
||||
name=Ruby Leech
|
||||
abilities=first strike
|
||||
auto=lord(*[red]|myhand,mylibrary,mygraveyard,myexile) altercost(red,+1)
|
||||
@@ -108764,6 +108809,15 @@ power=2
|
||||
toughness=2
|
||||
[/card]
|
||||
[card]
|
||||
name=Vedalken Shackles
|
||||
alias=50120
|
||||
auto={2}{T}:shackle target(creature[power<=type:island:mybattlefield])
|
||||
auto=@each my untap restriction{canuntap}:may untap
|
||||
text=You may choose not to untap Vedalken Shackles during your untap step. -- {2}, {T}: Gain control of target creature with power less than or equal to the number of Islands you control for as long as Vedalken Shackles remains tapped.
|
||||
mana={3}
|
||||
type=Artifact
|
||||
[/card]
|
||||
[card]
|
||||
name=Veil of Birds
|
||||
auto=@movedto(*|opponentstack) once:transforms((removetypes)) forever && transforms((Bird Creature,setpower=1,settoughness=1,flying)) forever
|
||||
text=When an opponent casts a spell, if Veil of Birds is an enchantment, Veil of Birds becomes a 1/1 Bird creature with flying.
|
||||
@@ -114269,6 +114323,18 @@ power=2
|
||||
toughness=2
|
||||
[/card]
|
||||
[card]
|
||||
name=Willow Satyr
|
||||
alias=50120
|
||||
auto={T}:shackle target(creature[legendary])
|
||||
auto=@each my untap restriction{canuntap}:may untap
|
||||
text=You may choose not to untap Willow Satyr during your untap step. -- {T}: Gain control of target legendary creature for as long as you control Willow Satyr and Willow Satyr remains tapped.
|
||||
mana={2}{G}{G}
|
||||
type=Creature
|
||||
subtype=Satyr
|
||||
power=1
|
||||
toughness=1
|
||||
[/card]
|
||||
[card]
|
||||
name=Wilt-Leaf Cavaliers
|
||||
abilities=vigilance
|
||||
text=Vigilance
|
||||
|
||||
@@ -7827,12 +7827,6 @@ mana={4}
|
||||
type=Artifact
|
||||
[/card]
|
||||
[card]
|
||||
name=Helm of Possession
|
||||
text=You may choose not to untap Helm of Possession during your untap step. -- {2}, {T}, Sacrifice a creature: Gain control of target creature for as long as you control Helm of Possession and Helm of Possession remains tapped.
|
||||
mana={4}
|
||||
type=Artifact
|
||||
[/card]
|
||||
[card]
|
||||
name=Helvault
|
||||
text={1}, {T}: Exile target creature you control. -- {7}, {T}: Exile target creature you don't control. -- When Helvault is put into a graveyard from the battlefield, return all cards exiled with it to the battlefield under their owners' control.
|
||||
mana={3}
|
||||
@@ -7999,15 +7993,6 @@ mana={5}{U}
|
||||
type=Enchantment
|
||||
[/card]
|
||||
[card]
|
||||
name=Hivis of the Scale
|
||||
text=You may choose not to untap Hivis of the Scale during your untap step. -- {T}: Gain control of target Dragon for as long as you control Hivis and Hivis remains tapped.
|
||||
mana={3}{R}{R}
|
||||
type=Legendary Creature
|
||||
subtype=Viashino Shaman
|
||||
power=3
|
||||
toughness=4
|
||||
[/card]
|
||||
[card]
|
||||
name=Hixus, Prison Warden
|
||||
text=Flash (You may cast this spell any time you could cast an instant.) -- Whenever a creature deals combat damage to you, if Hixus, Prison Warden entered the battlefield this turn, exile that creature until Hixus leaves the battlefield. (That creature returns under its owner's control.)
|
||||
mana={3}{W}{W}
|
||||
@@ -12602,15 +12587,6 @@ power=4
|
||||
toughness=4
|
||||
[/card]
|
||||
[card]
|
||||
name=Old Man of the Sea
|
||||
text=You may choose not to untap Old Man of the Sea during your untap step. -- {T}: Gain control of target creature with power less than or equal to Old Man of the Sea's power for as long as Old Man of the Sea remains tapped and that creature's power remains less than or equal to Old Man of the Sea's power.
|
||||
mana={1}{U}{U}
|
||||
type=Creature
|
||||
subtype=Djinn
|
||||
power=2
|
||||
toughness=3
|
||||
[/card]
|
||||
[card]
|
||||
name=Oloro, Ageless Ascetic
|
||||
text=At the beginning of your upkeep, you gain 2 life. -- Whenever you gain life, you may pay {1}. If you do, draw a card and each opponent loses 1 life. -- At the beginning of your upkeep, if Oloro, Ageless Ascetic is in the command zone, you gain 2 life.
|
||||
mana={3}{W}{U}{B}
|
||||
@@ -15312,15 +15288,6 @@ mana={2}{G}{G}
|
||||
type=Enchantment
|
||||
[/card]
|
||||
[card]
|
||||
name=Rubinia Soulsinger
|
||||
text=You may choose not to untap Rubinia Soulsinger during your untap step. -- {T}: Gain control of target creature for as long as you control Rubinia and Rubinia remains tapped.
|
||||
mana={2}{G}{W}{U}
|
||||
type=Legendary Creature
|
||||
subtype=Faerie
|
||||
power=2
|
||||
toughness=3
|
||||
[/card]
|
||||
[card]
|
||||
name=Ruin Processor
|
||||
text=When you cast Ruin Processor, you may put a card an opponent owns from exile into that player's graveyard. If you do, you gain 5 life.
|
||||
mana={7}
|
||||
@@ -19793,12 +19760,6 @@ power=1
|
||||
toughness=1
|
||||
[/card]
|
||||
[card]
|
||||
name=Vedalken Shackles
|
||||
text=You may choose not to untap Vedalken Shackles during your untap step. -- {2}, {T}: Gain control of target creature with power less than or equal to the number of Islands you control for as long as Vedalken Shackles remains tapped.
|
||||
mana={3}
|
||||
type=Artifact
|
||||
[/card]
|
||||
[card]
|
||||
name=Veil of Secrecy
|
||||
text=Target creature gains shroud until end of turn and is unblockable this turn. -- Splice onto Arcane—Return a blue creature you control to its owner's hand. (As you cast an Arcane spell, you may reveal this card from your hand and pay its splice cost. If you do, add this card's effects to that spell.)
|
||||
mana={1}{U}
|
||||
@@ -20770,15 +20731,6 @@ power=2
|
||||
toughness=3
|
||||
[/card]
|
||||
[card]
|
||||
name=Willow Satyr
|
||||
text=You may choose not to untap Willow Satyr during your untap step. -- {T}: Gain control of target legendary creature for as long as you control Willow Satyr and Willow Satyr remains tapped.
|
||||
mana={2}{G}{G}
|
||||
type=Creature
|
||||
subtype=Satyr
|
||||
power=1
|
||||
toughness=1
|
||||
[/card]
|
||||
[card]
|
||||
name=Wilt-Leaf Liege
|
||||
text=Other green creatures you control get +1/+1. -- Other white creatures you control get +1/+1. -- If a spell or ability an opponent controls causes you to discard Wilt-Leaf Liege, put it onto the battlefield instead of putting it into your graveyard.
|
||||
mana={1}{GW}{GW}{GW}
|
||||
|
||||
@@ -5136,6 +5136,37 @@ public:
|
||||
ABlockSetCost * clone() const;
|
||||
};
|
||||
|
||||
//AShackle
|
||||
class AShackle: public MTGAbility
|
||||
{
|
||||
public:
|
||||
MTGCardInstance * Shackled;
|
||||
Player * previousController;
|
||||
bool resolved;
|
||||
AShackle(GameObserver* observer, int _id, MTGCardInstance * card, MTGCardInstance * _target);
|
||||
void Update(float dt);
|
||||
void resolveShackle();
|
||||
int resolve();
|
||||
const string getMenuText();
|
||||
AShackle * clone() const;
|
||||
~AShackle();
|
||||
private:
|
||||
void returntoOwner(MTGCardInstance *_target);
|
||||
};
|
||||
|
||||
//ShackleWrapper
|
||||
class AShackleWrapper: public InstantAbility
|
||||
{
|
||||
public:
|
||||
AShackle * ability;
|
||||
AShackleWrapper(GameObserver* observer, int _id, MTGCardInstance * card, MTGCardInstance * _target);
|
||||
int resolve();
|
||||
const string getMenuText();
|
||||
AShackleWrapper * clone() const;
|
||||
~AShackleWrapper();
|
||||
|
||||
};
|
||||
|
||||
//ABlink
|
||||
class ABlink: public MTGAbility
|
||||
{
|
||||
|
||||
@@ -6473,6 +6473,114 @@ ABlockSetCost * ABlockSetCost::clone() const
|
||||
return NEW ABlockSetCost(*this);
|
||||
}
|
||||
|
||||
//AShackle
|
||||
AShackle::AShackle(GameObserver* observer, int _id, MTGCardInstance * card, MTGCardInstance * _target) :
|
||||
MTGAbility(observer, _id, card)
|
||||
{
|
||||
target = _target;
|
||||
Shackled = NULL;
|
||||
previousController = NULL;
|
||||
resolved = false;
|
||||
}
|
||||
|
||||
void AShackle::Update(float dt)
|
||||
{
|
||||
if (resolved == false)
|
||||
{
|
||||
resolved = true;
|
||||
resolveShackle();
|
||||
}
|
||||
|
||||
if (!source->isTapped() || !source->isInPlay(game))
|
||||
{
|
||||
if (Shackled == NULL || !Shackled->isInPlay(game))
|
||||
MTGAbility::Update(dt);
|
||||
MTGCardInstance * _target = Shackled;
|
||||
returntoOwner(_target);
|
||||
}
|
||||
MTGAbility::Update(dt);
|
||||
}
|
||||
|
||||
void AShackle::resolveShackle()
|
||||
{
|
||||
MTGCardInstance * _target = (MTGCardInstance *) target;
|
||||
if (_target)
|
||||
{
|
||||
previousController = _target->controller();
|
||||
previousController->game->putInZone(_target, _target->currentZone,
|
||||
source->controller()->game->inPlay);
|
||||
Shackled = _target;
|
||||
}
|
||||
}
|
||||
|
||||
void AShackle::returntoOwner(MTGCardInstance* _target) {
|
||||
MTGCardInstance * cardToReturn = _target;
|
||||
if(!cardToReturn)
|
||||
{
|
||||
this->forceDestroy = 1;
|
||||
return;
|
||||
}
|
||||
if(previousController && cardToReturn->isInPlay(game))
|
||||
{
|
||||
cardToReturn->controller()->game->putInZone(_target, _target->currentZone,
|
||||
previousController->game->inPlay);
|
||||
}
|
||||
this->forceDestroy = 1;
|
||||
Shackled = NULL;
|
||||
return;
|
||||
}
|
||||
|
||||
int AShackle::resolve()
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
const string AShackle::getMenuText()
|
||||
{
|
||||
return "Gain Control";
|
||||
}
|
||||
|
||||
AShackle * AShackle::clone() const
|
||||
{
|
||||
AShackle * a = NEW AShackle(*this);
|
||||
a->forceDestroy = -1;
|
||||
return a;
|
||||
};
|
||||
AShackle::~AShackle()
|
||||
{
|
||||
}
|
||||
|
||||
AShackleWrapper::AShackleWrapper(GameObserver* observer, int _id, MTGCardInstance * card, MTGCardInstance * _target) :
|
||||
InstantAbility(observer, _id, source, _target)
|
||||
{
|
||||
ability = NEW AShackle(observer, _id,card,_target);
|
||||
}
|
||||
|
||||
int AShackleWrapper::resolve()
|
||||
{
|
||||
AShackle * a = ability->clone();
|
||||
a->target = target;
|
||||
a->addToGame();
|
||||
return 1;
|
||||
}
|
||||
|
||||
const string AShackleWrapper::getMenuText()
|
||||
{
|
||||
return "Gain Control";
|
||||
}
|
||||
|
||||
AShackleWrapper * AShackleWrapper::clone() const
|
||||
{
|
||||
AShackleWrapper * a = NEW AShackleWrapper(*this);
|
||||
a->ability = this->ability->clone();
|
||||
a->oneShot = 1;
|
||||
return a;
|
||||
}
|
||||
|
||||
AShackleWrapper::~AShackleWrapper()
|
||||
{
|
||||
SAFE_DELETE(ability);
|
||||
}
|
||||
|
||||
//a blink
|
||||
ABlink::ABlink(GameObserver* observer, int _id, MTGCardInstance * card, MTGCardInstance * _target, bool blinkueot, bool blinkForSource, bool blinkhand, MTGAbility * stored) :
|
||||
MTGAbility(observer, _id, card),blinkueot(blinkueot),blinkForSource(blinkForSource),blinkhand(blinkhand),stored(stored)
|
||||
|
||||
@@ -469,6 +469,13 @@ int AbilityFactory::parseCastRestrictions(MTGCardInstance * card, Player * playe
|
||||
return 0;
|
||||
}
|
||||
|
||||
check = restriction[i].find("canuntap");
|
||||
if(check != string::npos)
|
||||
{
|
||||
if(card->frozen >= 1 || card->basicAbilities[(int)Constants::DOESNOTUNTAP] || !card->isTapped())
|
||||
return 0;
|
||||
}
|
||||
|
||||
check = restriction[i].find("raid");
|
||||
if(check != string::npos)
|
||||
{
|
||||
@@ -2226,6 +2233,15 @@ MTGAbility * AbilityFactory::parseMagicLine(string s, int id, Spell * spell, MTG
|
||||
return a;
|
||||
}
|
||||
|
||||
//gain control until source is untapped or leaves battlefield
|
||||
found = s.find("shackle");
|
||||
if (found != string::npos)
|
||||
{
|
||||
MTGAbility * a = NEW AShackleWrapper(observer, id, card, target);
|
||||
a->oneShot = 1;
|
||||
return a;
|
||||
}
|
||||
|
||||
//momentary blink
|
||||
found = s.find("(blink)");
|
||||
if (found != string::npos)
|
||||
|
||||
@@ -951,7 +951,7 @@ void MTGInPlay::untapAll()
|
||||
{
|
||||
MTGCardInstance * card = cards[i];
|
||||
card->setUntapping();
|
||||
if (!card->basicAbilities[(int)Constants::DOESNOTUNTAP])
|
||||
if (!card->basicAbilities[(int)Constants::DOESNOTUNTAP] && card->alias != 50120)
|
||||
{
|
||||
if (card->frozen < 1)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user