Merge pull request #1 from WagicProject/master
trying to update fork to have changes from master
This commit is contained in:
@@ -2,6 +2,13 @@
|
|||||||
|
|
||||||
## [latest-master] (https://github.com/WagicProject/wagic/tree/latest-master)
|
## [latest-master] (https://github.com/WagicProject/wagic/tree/latest-master)
|
||||||
|
|
||||||
|
#### 6/30/16
|
||||||
|
- *Merged pull-request:* Sorted Primitives [#\711] (https://github.com/WagicProject/wagic/pull/711) ([kevlahnota](https://github.com/kevlahnota))
|
||||||
|
|
||||||
|
- *Merged pull-request:* Add Shackle Ability [#\710] (https://github.com/WagicProject/wagic/pull/710) ([kevlahnota](https://github.com/kevlahnota))
|
||||||
|
|
||||||
|
- *Merged pull-request:* Fix Cascade, Crash fix on lastController and some corrections [#\709] (https://github.com/WagicProject/wagic/pull/709) ([kevlahnota](https://github.com/kevlahnota))
|
||||||
|
|
||||||
#### 6/29/16
|
#### 6/29/16
|
||||||
- *Merged pull-request:* Updated Primitives and Hide Highlight Border [#\707] (https://github.com/WagicProject/wagic/pull/707) ([kevlahnota](https://github.com/kevlahnota))
|
- *Merged pull-request:* Updated Primitives and Hide Highlight Border [#\707] (https://github.com/WagicProject/wagic/pull/707) ([kevlahnota](https://github.com/kevlahnota))
|
||||||
|
|
||||||
|
|||||||
@@ -106,6 +106,17 @@ mana={5}{U}
|
|||||||
type=Sorcery
|
type=Sorcery
|
||||||
[/card]
|
[/card]
|
||||||
[card]
|
[card]
|
||||||
|
name=Hypergenesis
|
||||||
|
color=green
|
||||||
|
restriction=turn:200
|
||||||
|
mana={0}
|
||||||
|
suspend(3)={1}{g}{g}
|
||||||
|
auto=ability$! moveto(ownerbattlefield) notatarget(<anyamount>artifact,creature,enchantment,land|myhand) !$ controller
|
||||||
|
auto=ability$! moveto(ownerbattlefield) notatarget(<anyamount>artifact,creature,enchantment,land|myhand) !$ opponent
|
||||||
|
text=Suspend 3—{1}{G}{G} (Rather than cast this card from your hand, pay {1}{G}{G} and exile it with three time counters on it. At the beginning of your upkeep, remove a time counter. When the last is removed, cast it without paying its mana cost.) -- Starting with you, each player may put an artifact, creature, enchantment, or land card from his or her hand onto the battlefield. Repeat this process until no one puts a card onto the battlefield.
|
||||||
|
type=Sorcery
|
||||||
|
[/card]
|
||||||
|
[card]
|
||||||
name=Ivy Seer
|
name=Ivy Seer
|
||||||
auto={2}{G}{T}:foreach(*[green]|myhand) 1/1 target(creature)
|
auto={2}{G}{T}:foreach(*[green]|myhand) 1/1 target(creature)
|
||||||
text={2}{G}, {T}: Reveal any number of green cards in your hand. Target creature gets +X/+X until end of turn, where X is the number of cards revealed this way.
|
text={2}{G}, {T}: Reveal any number of green cards in your hand. Target creature gets +X/+X until end of turn, where X is the number of cards revealed this way.
|
||||||
|
|||||||
+15711
-15794
File diff suppressed because it is too large
Load Diff
@@ -7827,12 +7827,6 @@ mana={4}
|
|||||||
type=Artifact
|
type=Artifact
|
||||||
[/card]
|
[/card]
|
||||||
[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
|
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.
|
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}
|
mana={3}
|
||||||
@@ -7999,15 +7993,6 @@ mana={5}{U}
|
|||||||
type=Enchantment
|
type=Enchantment
|
||||||
[/card]
|
[/card]
|
||||||
[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
|
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.)
|
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}
|
mana={3}{W}{W}
|
||||||
@@ -12602,15 +12587,6 @@ power=4
|
|||||||
toughness=4
|
toughness=4
|
||||||
[/card]
|
[/card]
|
||||||
[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
|
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.
|
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}
|
mana={3}{W}{U}{B}
|
||||||
@@ -15312,15 +15288,6 @@ mana={2}{G}{G}
|
|||||||
type=Enchantment
|
type=Enchantment
|
||||||
[/card]
|
[/card]
|
||||||
[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
|
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.
|
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}
|
mana={7}
|
||||||
@@ -19793,12 +19760,6 @@ power=1
|
|||||||
toughness=1
|
toughness=1
|
||||||
[/card]
|
[/card]
|
||||||
[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
|
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.)
|
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}
|
mana={1}{U}
|
||||||
@@ -20770,15 +20731,6 @@ power=2
|
|||||||
toughness=3
|
toughness=3
|
||||||
[/card]
|
[/card]
|
||||||
[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
|
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.
|
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}
|
mana={1}{GW}{GW}{GW}
|
||||||
|
|||||||
@@ -5136,6 +5136,37 @@ public:
|
|||||||
ABlockSetCost * clone() const;
|
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
|
//ABlink
|
||||||
class ABlink: public MTGAbility
|
class ABlink: public MTGAbility
|
||||||
{
|
{
|
||||||
@@ -6099,12 +6130,14 @@ public:
|
|||||||
|
|
||||||
|
|
||||||
//AACascade
|
//AACascade
|
||||||
class AACascade: public ActivatedAbilityTP
|
class AACascade: public ActivatedAbility
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
string nbcardsStr;
|
string nbcardsStr;
|
||||||
AACascade(GameObserver* observer, int _id, MTGCardInstance * card, Targetable * _target,string nbcardsStr, ManaCost * _cost = NULL,
|
vector<MTGCardInstance*>selectedCards;
|
||||||
int who = TargetChooser::UNSET);
|
vector<MTGCardInstance *>oldOrder;
|
||||||
|
vector<MTGCardInstance *>newOrder;
|
||||||
|
AACascade(GameObserver* observer, int _id, MTGCardInstance * _source, MTGCardInstance * _target, string nbcardsStr, ManaCost * _cost = NULL);
|
||||||
int resolve();
|
int resolve();
|
||||||
void toCastCard(MTGCardInstance * card);
|
void toCastCard(MTGCardInstance * card);
|
||||||
const string getMenuText();
|
const string getMenuText();
|
||||||
|
|||||||
@@ -1137,13 +1137,16 @@ AADepleter * AADepleter::clone() const
|
|||||||
}
|
}
|
||||||
|
|
||||||
//AACascade
|
//AACascade
|
||||||
AACascade::AACascade(GameObserver* observer, int _id, MTGCardInstance * card, Targetable * _target,string nbcardsStr, ManaCost * _cost, int who) :
|
AACascade::AACascade(GameObserver* observer, int _id, MTGCardInstance * _source, MTGCardInstance * _target, string nbcardsStr, ManaCost * _cost) :
|
||||||
ActivatedAbilityTP(observer, _id, card, _target, _cost, who),nbcardsStr(nbcardsStr)
|
ActivatedAbility(observer, _id, _source, _cost, 0),nbcardsStr(nbcardsStr)
|
||||||
{
|
{
|
||||||
|
selectedCards.clear();
|
||||||
|
oldOrder.clear();
|
||||||
|
newOrder.clear();
|
||||||
}
|
}
|
||||||
int AACascade::resolve()
|
int AACascade::resolve()
|
||||||
{
|
{
|
||||||
Player * player = getPlayerFromTarget(getTarget());
|
Player * player = source->controller();
|
||||||
if (player)
|
if (player)
|
||||||
{
|
{
|
||||||
WParsedInt numCards(nbcardsStr, NULL, source);
|
WParsedInt numCards(nbcardsStr, NULL, source);
|
||||||
@@ -1155,14 +1158,13 @@ AACascade::AACascade(GameObserver* observer, int _id, MTGCardInstance * card, Ta
|
|||||||
{
|
{
|
||||||
if (library->nb_cards)
|
if (library->nb_cards)
|
||||||
{
|
{
|
||||||
for(int z = library->nb_cards; z >= 0; z--)
|
for(int z = library->nb_cards-1; z >= 0; z--)
|
||||||
{
|
{
|
||||||
if(!library->cards[z]->isLand() && (library->cards[z]->getManaCost()->getConvertedCost() < source->getManaCost()->getConvertedCost()))
|
if(!library->cards[z]->isLand() && (library->cards[z]->getManaCost()->getConvertedCost() < source->getManaCost()->getConvertedCost()))
|
||||||
{
|
{
|
||||||
viable = library->cards[z];
|
viable = library->cards[z];
|
||||||
player->game->putInZone(viable, library, exile);
|
player->game->putInZone(viable, library, exile);
|
||||||
{
|
{
|
||||||
vector<MTGCardInstance*>selectedCards;
|
|
||||||
for(int j=0; j < library->nb_cards; j++)
|
for(int j=0; j < library->nb_cards; j++)
|
||||||
{
|
{
|
||||||
if(library->cards[j]->isCascaded)
|
if(library->cards[j]->isCascaded)
|
||||||
@@ -1176,8 +1178,7 @@ AACascade::AACascade(GameObserver* observer, int _id, MTGCardInstance * card, Ta
|
|||||||
std::random_shuffle ( selectedCards.begin(), selectedCards.end() );
|
std::random_shuffle ( selectedCards.begin(), selectedCards.end() );
|
||||||
for(unsigned int i = 0; i < selectedCards.size();++i)
|
for(unsigned int i = 0; i < selectedCards.size();++i)
|
||||||
{
|
{
|
||||||
vector<MTGCardInstance *>oldOrder = library->cards;
|
oldOrder = library->cards;
|
||||||
vector<MTGCardInstance *>newOrder;
|
|
||||||
newOrder.push_back(selectedCards[i]);
|
newOrder.push_back(selectedCards[i]);
|
||||||
for(unsigned int k = 0;k < oldOrder.size();++k)
|
for(unsigned int k = 0;k < oldOrder.size();++k)
|
||||||
{
|
{
|
||||||
@@ -1207,8 +1208,10 @@ AACascade::AACascade(GameObserver* observer, int _id, MTGCardInstance * card, Ta
|
|||||||
void AACascade::toCastCard(MTGCardInstance * thisCard)
|
void AACascade::toCastCard(MTGCardInstance * thisCard)
|
||||||
{
|
{
|
||||||
MTGAbility *ac = NEW AACastCard(game, game->mLayers->actionLayer()->getMaxId(), thisCard, thisCard,false,false,true,"","",false,false);
|
MTGAbility *ac = NEW AACastCard(game, game->mLayers->actionLayer()->getMaxId(), thisCard, thisCard,false,false,true,"","",false,false);
|
||||||
MayAbility *ma1 = NEW MayAbility(game, game->mLayers->actionLayer()->getMaxId(), ac, thisCard->clone(),true);
|
MayAbility *ma1 = NEW MayAbility(game, game->mLayers->actionLayer()->getMaxId(), ac->clone(), thisCard,true);
|
||||||
MTGAbility *ga1 = NEW GenericAddToGame(game, game->mLayers->actionLayer()->getMaxId(), thisCard,NULL,ma1);
|
MTGAbility *ga1 = NEW GenericAddToGame(game, game->mLayers->actionLayer()->getMaxId(), thisCard,NULL,ma1->clone());
|
||||||
|
SAFE_DELETE(ac);
|
||||||
|
SAFE_DELETE(ma1);
|
||||||
ga1->resolve();
|
ga1->resolve();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@@ -6470,6 +6473,114 @@ ABlockSetCost * ABlockSetCost::clone() const
|
|||||||
return NEW ABlockSetCost(*this);
|
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
|
//a blink
|
||||||
ABlink::ABlink(GameObserver* observer, int _id, MTGCardInstance * card, MTGCardInstance * _target, bool blinkueot, bool blinkForSource, bool blinkhand, MTGAbility * stored) :
|
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)
|
MTGAbility(observer, _id, card),blinkueot(blinkueot),blinkForSource(blinkForSource),blinkhand(blinkhand),stored(stored)
|
||||||
|
|||||||
@@ -263,6 +263,22 @@ void CardGui::Render()
|
|||||||
highlightborder->SetColor(ARGB(95,0,245,0));
|
highlightborder->SetColor(ARGB(95,0,245,0));
|
||||||
renderer->RenderQuad(highlightborder.get(), actX, actY, actT, (30 * actZ + 1) / 16, 43 * actZ / 16);
|
renderer->RenderQuad(highlightborder.get(), actX, actY, actT, (30 * actZ + 1) / 16, 43 * actZ / 16);
|
||||||
}
|
}
|
||||||
|
if(card->myPair && card->myPair->isInPlay(game) && highlightborder)
|
||||||
|
{
|
||||||
|
if(mHasFocus)
|
||||||
|
{
|
||||||
|
highlightborder->SetColor(ARGB(200,7,98,248));
|
||||||
|
renderer->RenderQuad(highlightborder.get(), actX, actY, actT, (30 * actZ + 1) / 16, 43 * actZ / 16);
|
||||||
|
}
|
||||||
|
if(CardView* cv = dynamic_cast<CardView*>(card->myPair->view))
|
||||||
|
{
|
||||||
|
if(cv->mHasFocus)
|
||||||
|
{
|
||||||
|
highlightborder->SetColor(ARGB(200,57,28,248));
|
||||||
|
renderer->RenderQuad(highlightborder.get(), actX, actY, actT, (30 * actZ + 1) / 16, 43 * actZ / 16);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
//draw the card image
|
//draw the card image
|
||||||
renderer->RenderQuad(quad.get(), actX, actY, actT, scale, scale);
|
renderer->RenderQuad(quad.get(), actX, actY, actT, scale, scale);
|
||||||
|
|||||||
@@ -469,6 +469,13 @@ int AbilityFactory::parseCastRestrictions(MTGCardInstance * card, Player * playe
|
|||||||
return 0;
|
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");
|
check = restriction[i].find("raid");
|
||||||
if(check != string::npos)
|
if(check != string::npos)
|
||||||
{
|
{
|
||||||
@@ -2226,6 +2233,15 @@ MTGAbility * AbilityFactory::parseMagicLine(string s, int id, Spell * spell, MTG
|
|||||||
return a;
|
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
|
//momentary blink
|
||||||
found = s.find("(blink)");
|
found = s.find("(blink)");
|
||||||
if (found != string::npos)
|
if (found != string::npos)
|
||||||
@@ -2802,8 +2818,7 @@ MTGAbility * AbilityFactory::parseMagicLine(string s, int id, Spell * spell, MTG
|
|||||||
vector<string> splitCascade = parseBetween(s, "cascade:", " ", false);
|
vector<string> splitCascade = parseBetween(s, "cascade:", " ", false);
|
||||||
if (splitCascade.size())
|
if (splitCascade.size())
|
||||||
{
|
{
|
||||||
Targetable * t = spell ? spell->getNextTarget() : NULL;
|
MTGAbility * a = NEW AACascade(observer, id, card, target, splitCascade[1], NULL);
|
||||||
MTGAbility * a = NEW AACascade(observer, id, card, t , splitCascade[1], NULL, who);
|
|
||||||
a->oneShot = 1;
|
a->oneShot = 1;
|
||||||
return a;
|
return a;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -564,6 +564,7 @@ MTGCardInstance * MTGGameZone::removeCard(MTGCardInstance * card, int createCopy
|
|||||||
copy->kicked = card->kicked;
|
copy->kicked = card->kicked;
|
||||||
copy->storedCard = card->storedCard;
|
copy->storedCard = card->storedCard;
|
||||||
copy->storedSourceCard = card->storedSourceCard;
|
copy->storedSourceCard = card->storedSourceCard;
|
||||||
|
copy->lastController = card->controller();
|
||||||
for (int i = 0; i < ManaCost::MANA_PAID_WITH_OVERLOAD +1; i++)
|
for (int i = 0; i < ManaCost::MANA_PAID_WITH_OVERLOAD +1; i++)
|
||||||
copy->alternateCostPaid[i] = card->alternateCostPaid[i];
|
copy->alternateCostPaid[i] = card->alternateCostPaid[i];
|
||||||
|
|
||||||
@@ -950,7 +951,7 @@ void MTGInPlay::untapAll()
|
|||||||
{
|
{
|
||||||
MTGCardInstance * card = cards[i];
|
MTGCardInstance * card = cards[i];
|
||||||
card->setUntapping();
|
card->setUntapping();
|
||||||
if (!card->basicAbilities[(int)Constants::DOESNOTUNTAP])
|
if (!card->basicAbilities[(int)Constants::DOESNOTUNTAP] && card->alias != 50120)
|
||||||
{
|
{
|
||||||
if (card->frozen < 1)
|
if (card->frozen < 1)
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user