Merge branch 'master' of https://github.com/kevlahnota/wagic
This commit is contained in:
@@ -54596,6 +54596,14 @@ power=4
|
|||||||
toughness=8
|
toughness=8
|
||||||
[/card]
|
[/card]
|
||||||
[card]
|
[card]
|
||||||
|
name=Isochron Scepter
|
||||||
|
auto=may imprint notatarget(instant[manacost<=2]|myhand)
|
||||||
|
auto={2}{t}:activate castcard(copied noevent named!:imprintedcard:!)
|
||||||
|
text=Imprint — When Isochron Scepter enters the battlefield, you may exile an instant card with converted mana cost 2 or less from your hand. -- {2}, {T}: You may copy the exiled card. If you do, you may cast the copy without paying its mana cost.
|
||||||
|
mana={2}
|
||||||
|
type=Artifact
|
||||||
|
[/card]
|
||||||
|
[card]
|
||||||
name=Isolated Chapel
|
name=Isolated Chapel
|
||||||
auto=aslongas(plains,swamp|myBattlefield) tap(noevent) <1 oneshot
|
auto=aslongas(plains,swamp|myBattlefield) tap(noevent) <1 oneshot
|
||||||
auto={T}:Add{W}
|
auto={T}:Add{W}
|
||||||
@@ -102430,6 +102438,16 @@ power=2
|
|||||||
toughness=2
|
toughness=2
|
||||||
[/card]
|
[/card]
|
||||||
[card]
|
[card]
|
||||||
|
name=Spellbinder
|
||||||
|
auto={4}:equip
|
||||||
|
auto=may imprint notatarget(instant|myhand)
|
||||||
|
auto=@combatdamaged(player) from(mytgt):activate castcard(copied noevent named!:imprintedcard:!)
|
||||||
|
text=Imprint — When Spellbinder enters the battlefield, you may exile an instant card from your hand. -- Whenever equipped creature deals combat damage to a player, you may copy the exiled card. If you do, you may cast the copy without paying its mana cost. -- Equip {4}
|
||||||
|
mana={3}
|
||||||
|
type=Artifact
|
||||||
|
subtype=Equipment
|
||||||
|
[/card]
|
||||||
|
[card]
|
||||||
name=Spell Blast
|
name=Spell Blast
|
||||||
target=*[manacost=prex]|stack
|
target=*[manacost=prex]|stack
|
||||||
auto=fizzle
|
auto=fizzle
|
||||||
|
|||||||
@@ -7189,6 +7189,13 @@ void AACastCard::Update(float dt)
|
|||||||
return;
|
return;
|
||||||
if(cardNamed.size() && !theNamedCard)
|
if(cardNamed.size() && !theNamedCard)
|
||||||
{
|
{
|
||||||
|
if (cardNamed.find("imprintedcard") != string::npos)
|
||||||
|
{
|
||||||
|
if (source && source->currentimprintName.size())
|
||||||
|
{
|
||||||
|
cardNamed = source->currentimprintName;
|
||||||
|
}
|
||||||
|
}
|
||||||
theNamedCard = makeCard();
|
theNamedCard = makeCard();
|
||||||
}
|
}
|
||||||
if(putinplay)
|
if(putinplay)
|
||||||
|
|||||||
@@ -2502,11 +2502,14 @@ MTGAbility * AbilityFactory::parseMagicLine(string s, int id, Spell * spell, MTG
|
|||||||
//imprint
|
//imprint
|
||||||
found = s.find("imprint");
|
found = s.find("imprint");
|
||||||
if (found != string::npos)
|
if (found != string::npos)
|
||||||
|
{
|
||||||
|
if (s.find("imprintedcard") == string::npos)
|
||||||
{
|
{
|
||||||
MTGAbility * a = NEW AAImprint(observer, id, card, target);
|
MTGAbility * a = NEW AAImprint(observer, id, card, target);
|
||||||
a->oneShot = 1;
|
a->oneShot = 1;
|
||||||
return a;
|
return a;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
//phaseout
|
//phaseout
|
||||||
found = s.find("phaseout");
|
found = s.find("phaseout");
|
||||||
|
|||||||
@@ -980,7 +980,11 @@ void MTGInPlay::untapAll()
|
|||||||
|
|
||||||
MTGGameZone * MTGGameZone::intToZone(int zoneId, Player * p, Player * p2)
|
MTGGameZone * MTGGameZone::intToZone(int zoneId, Player * p, Player * p2)
|
||||||
{
|
{
|
||||||
|
if (p2 != p && p2 && (p != p2->opponent()))
|
||||||
|
{
|
||||||
|
p = p2->opponent();
|
||||||
|
//these cases are generally handled this is a edge case fix.
|
||||||
|
}
|
||||||
switch (zoneId)
|
switch (zoneId)
|
||||||
{
|
{
|
||||||
case MY_GRAVEYARD:
|
case MY_GRAVEYARD:
|
||||||
|
|||||||
@@ -2774,9 +2774,12 @@ WEvent * MTGDredgeRule::replace(WEvent * event)
|
|||||||
Player * p = game->players[i];
|
Player * p = game->players[i];
|
||||||
if (e->player == p)
|
if (e->player == p)
|
||||||
{
|
{
|
||||||
int Dredgers = 0;
|
vector<MTGAbility*>menusOfferedWithDredge;
|
||||||
for(int draw = 0;draw < e->nb_cards;draw++)
|
for(int draw = 0;draw < e->nb_cards;draw++)
|
||||||
{
|
{
|
||||||
|
tcb = tf.createTargetChooser("dredgeable", card);
|
||||||
|
int toDredge = tcb->countValidTargets();
|
||||||
|
SAFE_DELETE(tcb);
|
||||||
vector<MTGAbility*>selection;
|
vector<MTGAbility*>selection;
|
||||||
//look for other draw replacement effects
|
//look for other draw replacement effects
|
||||||
list<ReplacementEffect *>::iterator it;
|
list<ReplacementEffect *>::iterator it;
|
||||||
@@ -2801,16 +2804,14 @@ WEvent * MTGDredgeRule::replace(WEvent * event)
|
|||||||
}
|
}
|
||||||
|
|
||||||
//there is a memleak here that i have no idea what causes it. got it reduced to just 4 bytes but its still bothering me.
|
//there is a memleak here that i have no idea what causes it. got it reduced to just 4 bytes but its still bothering me.
|
||||||
if (Dredgers < e->nb_cards)
|
if (int(menusOfferedWithDredge.size()) < toDredge)
|
||||||
{
|
{
|
||||||
tcb = tf.createTargetChooser("dredgeable", card);
|
tcb = tf.createTargetChooser("dredgeable", card);
|
||||||
tcb->targetter = NULL;
|
tcb->targetter = NULL;
|
||||||
|
|
||||||
dredgeAbility = NEW dredgeCard(game, game->mLayers->actionLayer()->getMaxId(), card, NULL);
|
dredgeAbility = NEW dredgeCard(game, game->mLayers->actionLayer()->getMaxId(), card, NULL);
|
||||||
dredgeAbility->oneShot = true;
|
dredgeAbility->oneShot = true;
|
||||||
dredgeAbility->canBeInterrupted = false;
|
dredgeAbility->canBeInterrupted = false;
|
||||||
targetAbility = NEW GenericTargetAbility(game, "Dredge A Card", "", game->mLayers->actionLayer()->getMaxId(), card, tcb->clone(), dredgeAbility->clone());
|
targetAbility = NEW GenericTargetAbility(game, "Dredge A Card", "", game->mLayers->actionLayer()->getMaxId(), card, tcb, dredgeAbility->clone());
|
||||||
SAFE_DELETE(tcb);
|
|
||||||
SAFE_DELETE(dredgeAbility);
|
SAFE_DELETE(dredgeAbility);
|
||||||
targetAbility->oneShot = true;
|
targetAbility->oneShot = true;
|
||||||
targetAbility->canBeInterrupted = false;
|
targetAbility->canBeInterrupted = false;
|
||||||
@@ -2820,16 +2821,19 @@ WEvent * MTGDredgeRule::replace(WEvent * event)
|
|||||||
MTGAbility * setDredge = targetAbilityAdder->clone();
|
MTGAbility * setDredge = targetAbilityAdder->clone();
|
||||||
SAFE_DELETE(targetAbilityAdder);
|
SAFE_DELETE(targetAbilityAdder);
|
||||||
setDredge->oneShot = true;
|
setDredge->oneShot = true;
|
||||||
|
|
||||||
selection.push_back(setDredge);
|
selection.push_back(setDredge);
|
||||||
|
}
|
||||||
targetAbility1 = NEW AADrawer(game, this->GetId(), card, card, NULL, "1", TargetChooser::CONTROLLER, true);
|
targetAbility1 = NEW AADrawer(game, this->GetId(), card, card, NULL, "1", TargetChooser::CONTROLLER, true);
|
||||||
targetAbility1->canBeInterrupted = false;
|
targetAbility1->canBeInterrupted = false;
|
||||||
selection.push_back(targetAbility1);
|
selection.push_back(targetAbility1);
|
||||||
MTGAbility * menuChoice = NEW MenuAbility(game, this->GetId(), card, card, true, selection, card->controller(), "Dredge or Draw");
|
MTGAbility * menuChoice = NEW MenuAbility(game, this->GetId(), card, card, true, selection, card->controller(), "Dredge or Draw");
|
||||||
|
menusOfferedWithDredge.push_back(menuChoice);
|
||||||
menuChoice->addToGame();
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
while (menusOfferedWithDredge.size())
|
||||||
|
{
|
||||||
|
menusOfferedWithDredge[0]->addToGame();
|
||||||
|
menusOfferedWithDredge.erase(menusOfferedWithDredge.begin());
|
||||||
}
|
}
|
||||||
|
|
||||||
SAFE_DELETE(event);
|
SAFE_DELETE(event);
|
||||||
|
|||||||
Reference in New Issue
Block a user