Aluren & Omniscience

MayAbility + resolve instead of
MenuAbility + addtogame for dredge???
This commit is contained in:
Anthony Calosa
2015-11-07 19:16:31 +08:00
parent c99216c053
commit 6f4cf9e941
4 changed files with 50 additions and 33 deletions

View File

@@ -2405,6 +2405,14 @@ mana={1}{B}{S(creature|mybattlefield)}
type=Instant
[/card]
[card]
name=Aluren
auto=lord(creature[manacost<=3]|hand,exile,graveyard) zerocast forcedalive
auto=lord(creature[manacost<=3]|hand,exile,graveyard) spellmastery forcedalive
text=Any player may play creature cards with converted mana cost 3 or less without paying their mana cost and as though they had flash.
mana={2}{G}{G}
type=Enchantment
[/card]
[card]
name=Amass the Components
auto=draw:3 controller
auto=bottomoflibrary notatarget(*|myhand)
@@ -69047,6 +69055,13 @@ power=3
toughness=3
[/card]
[card]
name=Omniscience
auto=lord(*[-land]|myhand) zerocast forcedalive
text=You may cast nonland cards from your hand without paying their mana costs.
mana={7}{U}{U}{U}
type=Enchantment
[/card]
[card]
name=Ondu Cleric
auto=may life:type:ally:mybattlefield controller
auto=@movedTo(other ally|myBattlefield):may life:type:ally:mybattlefield controller

View File

@@ -224,12 +224,6 @@ mana={1}{U}
type=Instant
[/card]
[card]
name=Aluren
text=Any player may play creature cards with converted mana cost 3 or less without paying their mana cost and as though they had flash.
mana={2}{G}{G}
type=Enchantment
[/card]
[card]
name=Amber Prison
text=You may choose not to untap Amber Prison during your untap step. -- {4}, {T}: Tap target artifact, creature, or land. That permanent doesn't untap during its controller's untap step for as long as Amber Prison remains tapped.
mana={4}
@@ -3954,6 +3948,7 @@ subtype=Djinn
power=3
toughness=5
[/card]
#needs alias borderline
[card]
name=Djinn of Wishes
text=Flying -- Djinn of Wishes enters the battlefield with three wish counters on it. -- {2}{U}{U}, Remove a wish counter from Djinn of Wishes: Reveal the top card of your library. You may play that card without paying its mana cost. If you don't, exile it.
@@ -8742,6 +8737,7 @@ text=Look at the top five cards of your library. You may reveal any number of cr
mana={2}{G}
type=Sorcery
[/card]
#needs alias borderline
[card]
name=Leaf-Crowned Elder
text=Kinship - At the beginning of your upkeep, you may look at the top card of your library. If it shares a creature type with Leaf-Crowned Elder, you may reveal it. If you do, you may play that card without paying its mana cost.
@@ -9863,6 +9859,7 @@ text=Each opponent reveals cards from the top of his or her library until he or
mana={X}{U}{B}
type=Sorcery
[/card]
#needs alias
[card]
name=Mind's Desire
text=Shuffle your library. Then exile the top card of your library. Until end of turn, you may play that card without paying its mana cost. (If it has X in its mana cost, X is 0.) -- Storm (When you cast this spell, copy it for each spell cast before it this turn.)
@@ -11075,6 +11072,7 @@ text=Look at the top three cards of your library, then put them back in any orde
mana={1}{U}
type=Sorcery
[/card]
#needs alias
[card]
name=Omen Machine
mana={6}

View File

@@ -298,15 +298,15 @@ public:
class MTGDredgeRule: public PermanentAbility, public ReplacementEffect
{
public:
vector<MTGCardInstance*>soulbonders;
//vector<MTGCardInstance*>soulbonders;
TargetChooser * tcb;
MTGAbility * dredgeAbility;
MTGAbility * targetAbility;
MTGAbility * targetAbilityAdder;
MTGAbility * targetAbility1;
MTGAbility * mod;
MTGAbility * activateDredge;
vector<MTGAbility*>pairing;
//MTGAbility * dredgeAbility;
//MTGAbility * targetAbility;
//MTGAbility * targetAbilityAdder;
//MTGAbility * targetAbility1;
//MTGAbility * mod;
//MTGAbility * activateDredge;
//vector<MTGAbility*>pairing;
MTGDredgeRule(GameObserver* observer, int _id);
WEvent * replace(WEvent *e);
virtual ostream& toString(ostream& out) const;

View File

@@ -1189,6 +1189,10 @@ int MTGPayZeroRule::reactToClick(MTGCardInstance * card)
return 0;
ManaCost * cost = NEW ManaCost(ManaCost::parseManaCost("{0}",NULL,NULL));
if(card->getIncreasedManaCost()->getConvertedCost())
cost->add(card->getIncreasedManaCost());
if(card->getReducedManaCost()->getConvertedCost())
cost->remove(card->getReducedManaCost());
card->paymenttype = MTGAbility::PAYZERO_COST;
@@ -2190,9 +2194,9 @@ MTGDredgeRule::MTGDredgeRule(GameObserver* observer, int _id) :
PermanentAbility(observer, _id)
{
tcb = NULL;
dredgeAbility = NULL;
targetAbility = NULL;
mod = NULL;
//dredgeAbility = NULL;
//targetAbility = NULL;
//mod = NULL;
}
;
@@ -2249,26 +2253,26 @@ WEvent * MTGDredgeRule::replace(WEvent * event)
}
//there is a memleak here that i have no idea what causes it.
dredgeAbility = NEW dredgeCard(game, game->mLayers->actionLayer()->getMaxId(), card,NULL);
dredgeAbility->oneShot = true;
targetAbility = NEW GenericTargetAbility(game, "Dredge A Card","",game->mLayers->actionLayer()->getMaxId(), card,tcb->clone(),dredgeAbility->clone());
targetAbility->oneShot = true;
SAFE_DELETE(dredgeAbility);
dredgeCard *dc = NEW dredgeCard(game, game->mLayers->actionLayer()->getMaxId(), card,NULL);
dc->oneShot = true;
GenericTargetAbility *gta = NEW GenericTargetAbility(game, "Dredge A Card","",game->mLayers->actionLayer()->getMaxId(), card,tcb->clone(),dc->clone());
gta->oneShot = true;
//SAFE_DELETE(dredgeAbility);
targetAbilityAdder = NEW GenericAddToGame(game, game->mLayers->actionLayer()->getMaxId(), card,NULL,targetAbility->clone());
targetAbilityAdder->oneShot = true;
SAFE_DELETE(targetAbility);
MTGAbility * setDredge = targetAbilityAdder->clone();
SAFE_DELETE(targetAbilityAdder);
setDredge->oneShot = true;
GenericAddToGame *gatg = NEW GenericAddToGame(game, game->mLayers->actionLayer()->getMaxId(), card,NULL,gta->clone());
gatg->oneShot = true;
//SAFE_DELETE(targetAbility);
//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);
selection.push_back(targetAbility1);
MTGAbility * menuChoice = NEW MenuAbility(game, this->GetId(), card, card,true,selection,card->controller(),"Dredge or Draw");
selection.push_back(gatg);
AADrawer *ad = NEW AADrawer(game, game->mLayers->actionLayer()->getMaxId(), card,card,NULL, "1",TargetChooser::CONTROLLER,true);
selection.push_back(ad);
MenuAbility * menuChoice = NEW MenuAbility(game, game->mLayers->actionLayer()->getMaxId(), card, card,true,selection,card->controller(),"Dredge or Draw");
menuChoice->addToGame();
SAFE_DELETE(tcb);
//SAFE_DELETE(tcb);
}
SAFE_DELETE(event);