Skip to content

Commit

Permalink
Merge pull request #975 from kevlahnota/master
Browse files Browse the repository at this point in the history
Some fixes
  • Loading branch information
kevlahnota authored Aug 6, 2017
2 parents 521b505 + 85231cd commit 07e6d90
Show file tree
Hide file tree
Showing 5 changed files with 37 additions and 15 deletions.
26 changes: 13 additions & 13 deletions projects/mtg/bin/Res/sets/primitives/mtg.txt
Original file line number Diff line number Diff line change
Expand Up @@ -10233,7 +10233,7 @@ type=Instant
[/card]
[card]
name=Bedlam Reveler
autohand=affinity(instant,sorcery|mygraveyard) reduce({1})
anyzone=foreach(instant,sorcery|mygraveyard) changecost(colorless:-1) forcedalive
auto=@movedTo(*[-creature]|mystack):1/1 ueot
auto=reject all(*|myhand) && draw:3
text=Bedlam Reveler costs {1} less to cast for each instant and sorcery card in your graveyard. -- Prowess (Whenever you cast a noncreature spell, this creature gets +1/+1 until end of turn.) -- When Bedlam Reveler enters the battlefield, discard your hand, then draw three cards.
Expand Down Expand Up @@ -11325,7 +11325,7 @@ type=Enchantment
[card]
name=Blasphemous Act
auto=damage:13 all(creature)
autohand=affinity(creature|battlefield) reduce({1})
anyzone=foreach(creature|battlefield) changecost(colorless:-1) forcedalive
text=Blasphemous Act costs 1 less to cast for each creature on the battlefield. -- Blasphemous Act deals 13 damage to each creature.
mana={8}{R}
type=Sorcery
Expand Down Expand Up @@ -35600,7 +35600,7 @@ type=Instant
[card]
name=Emeria Angel
abilities=flying
auto=@movedTo(land|myBattlefield):may token(Bird,creature bird, 1/1,flying white)
auto=@movedTo(land|myBattlefield):may token(Bird,creature bird, 1/1,flying,white)
text=Flying -- Landfall - Whenever a land enters the battlefield under your control, you may put a 1/1 white Bird creature token with flying onto the battlefield.
mana={2}{W}{W}
type=Creature
Expand Down Expand Up @@ -42425,7 +42425,7 @@ type=Sorcery
[/card]
[card]
name=Flurry of Wings
auto=foreach(creature[attacking]) token(Bird Soldier,Creature Bird Soldier,1/1,white flying)
auto=foreach(creature[attacking]) token(Bird Soldier,Creature Bird Soldier,1/1,white,flying)
text=Put X 1/1 white Bird Soldier creature tokens with flying onto the battlefield, where X is the number of attacking creatures.
mana={G}{W}{U}
type=Instant
Expand Down Expand Up @@ -46208,7 +46208,7 @@ toughness=4
[/card]
[card]
name=Ghoultree
autohand=affinity(creature|mygraveyard) reduce({1})
anyzone=foreach(creature|mygraveyard) changecost(colorless:-1) forcedalive
text=Ghoultree cost {1} less to cast for each creature card in your graveyard.
mana={7}{G}
type=Creature
Expand Down Expand Up @@ -60796,7 +60796,7 @@ toughness=3
[card]
name=Jotun Owl Keeper
auto=cumulativeupcost[{WU}] sacrifice
auto=@movedTo(this|graveyard) from(battlefield):thisforeach(counter{0/0.1.Age}) token(Bird,Creature Bird,1/1,white flying)
auto=@movedTo(this|graveyard) from(battlefield):thisforeach(counter{0/0.1.Age}) token(Bird,Creature Bird,1/1,white,flying)
text=Cumulative upkeep {W} or {U} (At the beginning of your upkeep, put an age counter on this permanent, then sacrifice it unless you pay its upkeep cost for each age counter on it.) -- When Jotun Owl Keeper dies, put a 1/1 white Bird creature token with flying onto the battlefield for each age counter on it.
mana={2}{W}
type=Creature
Expand Down Expand Up @@ -80576,7 +80576,7 @@ subtype=Nissa
[/card]
[card]
name=Nissa's Chosen
auto=@movedTo(graveyard) from(this|battlefield):all(this) bottomoflibrary
auto=@movedTo(graveyard) from(this|battlefield):all(trigger[from]) bottomoflibrary
text=If Nissa's Chosen would die, put it on the bottom of its owner's library instead.
mana={G}{G}
type=Creature
Expand Down Expand Up @@ -83412,11 +83412,11 @@ toughness=2
[/card]
[card]
name=Ordered Migration
auto=aslongas(forest|myBattlefield) token(Bird,Creature Bird,1/1,blue flying)
auto=aslongas(mountain|myBattlefield) token(Bird,Creature Bird,1/1,blue flying)
auto=aslongas(island|myBattlefield) token(Bird,Creature Bird,1/1,blue flying)
auto=aslongas(swamp|myBattlefield) token(Bird,Creature Bird,1/1,blue flying)
auto=aslongas(plains|myBattlefield) token(Bird,Creature Bird,1/1,blue flying)
auto=aslongas(forest|myBattlefield) token(Bird,Creature Bird,1/1,blue,flying)
auto=aslongas(mountain|myBattlefield) token(Bird,Creature Bird,1/1,blue,flying)
auto=aslongas(island|myBattlefield) token(Bird,Creature Bird,1/1,blue,flying)
auto=aslongas(swamp|myBattlefield) token(Bird,Creature Bird,1/1,blue,flying)
auto=aslongas(plains|myBattlefield) token(Bird,Creature Bird,1/1,blue,flying)
text=Domain - Put a 1/1 blue Bird creature token with flying onto the battlefield for each basic land type among lands you control.
mana={3}{W}{U}
type=Sorcery
Expand Down Expand Up @@ -114073,7 +114073,7 @@ toughness=2
[/card]
[card]
name=Stone Idol Trap
autohand=affinity(creature[attacking]|battlefield) reduce({1})
anyzone=foreach(creature[attacking]|battlefield) changecost(colorless:-1) forcedalive
auto=token(Construct,Artifact Creature Construct,6/12,trample) and!( transforms((,newability[@next endofturn:moveTo(exile)])) forever )!
text=Stone Idol Trap costs {1} less to cast for each attacking creature. -- Put a 6/12 colorless Construct artifact creature token with trample onto the battlefield. Exile it at the beginning of your next end step.
mana={5}{R}
Expand Down
3 changes: 2 additions & 1 deletion projects/mtg/src/ActionStack.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -711,7 +711,8 @@ int ActionStack::addAbility(MTGAbility * ability)
if (!observer->players[0]->isAI() && ability->source->controller() == observer->players[0] && 0
== options[Options::INTERRUPTMYABILITIES].number)
{
if(observer->gameType() == GAME_TYPE_MOMIR && ability->aType == MTGAbility::FORCED_TOKEN_CREATOR)
if((observer->gameType() == GAME_TYPE_MOMIR && ability->aType == MTGAbility::FORCED_TOKEN_CREATOR)||
(dynamic_cast<GenericTargetAbility *>(ability) && ability->canBeInterrupted && !observer->OpenedDisplay && !observer->players[0]->game->reveal->cards.size()))//test interrupt...
interruptDecision[0] = NOT_DECIDED;
else
interruptDecision[0] = DONT_INTERRUPT;
Expand Down
5 changes: 4 additions & 1 deletion projects/mtg/src/AllAbilities.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -7733,11 +7733,14 @@ void ABlink::resolveBlink()
this->forceDestroy = 1;
return;
}

if (_target && _target->next)
_target = _target->next;
_target->blinked = true;
Blinked = _target;
if(source->isPermanent()&&!source->isInPlay(game))
{
Blinked->blinked = false;
}
if (!blinkueot && !blinkForSource)
{
returnCardIntoPlay(_target);
Expand Down
4 changes: 4 additions & 0 deletions projects/mtg/src/CardGui.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -461,12 +461,16 @@ void CardGui::Render()
}

string buff = "";
string starMark = "";
if(card->exerted)
starMark += "*";
if(card->isToken && !card->isACopier)
buff = "T";
if(card->isToken && card->isACopier)
buff = "CT";
if(!card->isToken && card->isACopier)
buff = "C";
buff = starMark + buff;
//if(card->has(Constants::PAYZERO))
//buff += "Z";
if(card->chooseacolor >= 1)
Expand Down
14 changes: 14 additions & 0 deletions projects/mtg/src/MTGAbility.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -576,6 +576,20 @@ int AbilityFactory::parseCastRestrictions(MTGCardInstance * card, Player * playe
return 0;
}

check = restriction[i].find("hasexerted");
if(check != string::npos)
{
if(!card->exerted)
return 0;
}

check = restriction[i].find("notexerted");
if(check != string::npos)
{
if(card->exerted)
return 0;
}

check = restriction[i].find("discardbyopponent");
if(check != string::npos)
{
Expand Down

0 comments on commit 07e6d90

Please sign in to comment.