Merge branch 'master' of https://github.com/kevlahnota/wagic
This commit is contained in:
@@ -54596,6 +54596,14 @@ power=4
|
||||
toughness=8
|
||||
[/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
|
||||
auto=aslongas(plains,swamp|myBattlefield) tap(noevent) <1 oneshot
|
||||
auto={T}:Add{W}
|
||||
@@ -102430,6 +102438,16 @@ power=2
|
||||
toughness=2
|
||||
[/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
|
||||
target=*[manacost=prex]|stack
|
||||
auto=fizzle
|
||||
|
||||
@@ -7189,6 +7189,13 @@ void AACastCard::Update(float dt)
|
||||
return;
|
||||
if(cardNamed.size() && !theNamedCard)
|
||||
{
|
||||
if (cardNamed.find("imprintedcard") != string::npos)
|
||||
{
|
||||
if (source && source->currentimprintName.size())
|
||||
{
|
||||
cardNamed = source->currentimprintName;
|
||||
}
|
||||
}
|
||||
theNamedCard = makeCard();
|
||||
}
|
||||
if(putinplay)
|
||||
|
||||
@@ -2503,9 +2503,12 @@ MTGAbility * AbilityFactory::parseMagicLine(string s, int id, Spell * spell, MTG
|
||||
found = s.find("imprint");
|
||||
if (found != string::npos)
|
||||
{
|
||||
MTGAbility * a = NEW AAImprint(observer, id, card, target);
|
||||
a->oneShot = 1;
|
||||
return a;
|
||||
if (s.find("imprintedcard") == string::npos)
|
||||
{
|
||||
MTGAbility * a = NEW AAImprint(observer, id, card, target);
|
||||
a->oneShot = 1;
|
||||
return a;
|
||||
}
|
||||
}
|
||||
|
||||
//phaseout
|
||||
|
||||
@@ -980,7 +980,11 @@ void MTGInPlay::untapAll()
|
||||
|
||||
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)
|
||||
{
|
||||
case MY_GRAVEYARD:
|
||||
|
||||
@@ -2774,9 +2774,12 @@ WEvent * MTGDredgeRule::replace(WEvent * event)
|
||||
Player * p = game->players[i];
|
||||
if (e->player == p)
|
||||
{
|
||||
int Dredgers = 0;
|
||||
vector<MTGAbility*>menusOfferedWithDredge;
|
||||
for(int draw = 0;draw < e->nb_cards;draw++)
|
||||
{
|
||||
tcb = tf.createTargetChooser("dredgeable", card);
|
||||
int toDredge = tcb->countValidTargets();
|
||||
SAFE_DELETE(tcb);
|
||||
vector<MTGAbility*>selection;
|
||||
//look for other draw replacement effects
|
||||
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.
|
||||
if (Dredgers < e->nb_cards)
|
||||
if (int(menusOfferedWithDredge.size()) < toDredge)
|
||||
{
|
||||
tcb = tf.createTargetChooser("dredgeable", card);
|
||||
tcb->targetter = NULL;
|
||||
|
||||
dredgeAbility = NEW dredgeCard(game, game->mLayers->actionLayer()->getMaxId(), card, NULL);
|
||||
dredgeAbility->oneShot = true;
|
||||
dredgeAbility->canBeInterrupted = false;
|
||||
targetAbility = NEW GenericTargetAbility(game, "Dredge A Card", "", game->mLayers->actionLayer()->getMaxId(), card, tcb->clone(), dredgeAbility->clone());
|
||||
SAFE_DELETE(tcb);
|
||||
targetAbility = NEW GenericTargetAbility(game, "Dredge A Card", "", game->mLayers->actionLayer()->getMaxId(), card, tcb, dredgeAbility->clone());
|
||||
SAFE_DELETE(dredgeAbility);
|
||||
targetAbility->oneShot = true;
|
||||
targetAbility->canBeInterrupted = false;
|
||||
@@ -2820,18 +2821,21 @@ WEvent * MTGDredgeRule::replace(WEvent * event)
|
||||
MTGAbility * setDredge = targetAbilityAdder->clone();
|
||||
SAFE_DELETE(targetAbilityAdder);
|
||||
setDredge->oneShot = true;
|
||||
|
||||
selection.push_back(setDredge);
|
||||
targetAbility1 = NEW AADrawer(game, this->GetId(), card, card, NULL, "1", TargetChooser::CONTROLLER, true);
|
||||
targetAbility1->canBeInterrupted = false;
|
||||
selection.push_back(targetAbility1);
|
||||
MTGAbility * menuChoice = NEW MenuAbility(game, this->GetId(), card, card, true, selection, card->controller(), "Dredge or Draw");
|
||||
|
||||
menuChoice->addToGame();
|
||||
|
||||
}
|
||||
targetAbility1 = NEW AADrawer(game, this->GetId(), card, card, NULL, "1", TargetChooser::CONTROLLER, true);
|
||||
targetAbility1->canBeInterrupted = false;
|
||||
selection.push_back(targetAbility1);
|
||||
MTGAbility * menuChoice = NEW MenuAbility(game, this->GetId(), card, card, true, selection, card->controller(), "Dredge or Draw");
|
||||
menusOfferedWithDredge.push_back(menuChoice);
|
||||
}
|
||||
|
||||
|
||||
while (menusOfferedWithDredge.size())
|
||||
{
|
||||
menusOfferedWithDredge[0]->addToGame();
|
||||
menusOfferedWithDredge.erase(menusOfferedWithDredge.begin());
|
||||
}
|
||||
|
||||
SAFE_DELETE(event);
|
||||
return event;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user