Pretty huge patch here(sorry old habits never die :( )
lots of changes, many bug fixes,
first
added auto=count(targetchooser)
and countedamount wparsed int
they work together for cards where it is difficult to get working without knowing in advance how many we had ie: exile blah creatures, for each creature you exiled do effect.
auto=count(creature|mybattlefield)
auto=moveto(exile)
auto=draw:countedamount
it takes into account token creatures, which our old methods did not.
second, added "freeze" which is a "frozen" that automatically taps your target for you, for use when nesting or whenever needed where it was difficult to nest the ability with tap included.
added devotion for "iroas"
added reveal:x and scry x
reveal contains optionone/optiononeend ; optiontwo/optiontwoend ; repeat; afterrevealed/afterrevealed end.
this ability has heavy use of targetListIsSet(<amount>) and upto:amount, you MUST be certain that all cards being revealed have an action that removes them from reveal either in the first, second, or 3rd ability.
there are over 300 examples in the new card code, the ability is VERY easy to understand.
scry contains automatic put on top, put on bottom, then scrycore/scrycoreend which is an ability to fire.
it also contains keywords, dontshow which is nested in scrycore, scry reveals, puts on top or bottom, then reveal AGAIN, and does an effect, dontshow eliminates the 2nd revealing.
is also contains "delayed" keyword, which delays the ability until AFTER the core fires.
added bestow. update rules mtg.txt!!!!
examples are in primitives, every bestow card was supported.
added a new lord based on varibles and restrictions
while(restriction{morbid})
while(varible:blah)
this simplifies and expands on this(, allowing you to even use while(cantarget together and check if a card is targetable by the variable. examples are in primitives
added token(by card name)
auto=token(Eldrazi Scion)
will search primitives and card dats for this card and give it to you as a token.
valid card dat info is still required.
added variable delirium
added restriction madnessplayed to allow checking if the card was played with madness.
added restriction "geared" for checking if a card has equipment on it.
added abilities words
skulk
menace <--cant be blocked except by 2 or more, if you dont block it with 2 or more we automatically unassign the single blocker and the creature is considered not blocked.
nosolo <--cant attack alone
mustblock <---if you dont assign as a blocker, we assign automatically the first thing it can block legally.
changed iscolorless back to "colorless"
enjoy, cards coming soon, theyre coded but im debating on not alpha sorting, cards being added this patch 965 uniques.
there is a section of the commit which was just VS2016 normalizing line ends, sorry if it makes it a cluster mess.
This commit is contained in:
@@ -74,6 +74,7 @@ MTGPlayerCards::~MTGPlayerCards()
|
||||
SAFE_DELETE(stack);
|
||||
SAFE_DELETE(removedFromGame);
|
||||
SAFE_DELETE(garbage);
|
||||
SAFE_DELETE(reveal);
|
||||
SAFE_DELETE(temp);
|
||||
SAFE_DELETE(playRestrictions);
|
||||
}
|
||||
@@ -91,6 +92,7 @@ void MTGPlayerCards::beforeBeginPhase()
|
||||
stack->beforeBeginPhase();
|
||||
removedFromGame->beforeBeginPhase();
|
||||
garbage->beforeBeginPhase();
|
||||
reveal->beforeBeginPhase();
|
||||
temp->beforeBeginPhase();
|
||||
}
|
||||
|
||||
@@ -105,6 +107,7 @@ void MTGPlayerCards::setOwner(Player * player)
|
||||
stack->setOwner(player);
|
||||
garbage->setOwner(player);
|
||||
garbageLastTurn->setOwner(player);
|
||||
reveal->setOwner(player);
|
||||
temp->setOwner(player);
|
||||
}
|
||||
|
||||
@@ -272,6 +275,7 @@ void MTGPlayerCards::init()
|
||||
exile = removedFromGame;
|
||||
garbage = NEW MTGGameZone();
|
||||
garbageLastTurn = garbage;
|
||||
reveal = NEW MTGGameZone();
|
||||
temp = NEW MTGGameZone();
|
||||
|
||||
playRestrictions = NEW PlayRestrictions();
|
||||
@@ -360,6 +364,12 @@ MTGCardInstance * MTGPlayerCards::putInZone(MTGCardInstance * card, MTGGameZone
|
||||
to = g->players[i]->game->exile;
|
||||
}
|
||||
}
|
||||
//all cards that go from the hand to the graveyard is ALWAYS a discard.
|
||||
if ((to == g->players[0]->game->graveyard || to == g->players[1]->game->graveyard) && (from == g->players[0]->game->hand || from
|
||||
== g->players[1]->game->hand))
|
||||
{
|
||||
card->discarded = true;
|
||||
}
|
||||
//When a card is moved from inPlay to inPlay (controller change, for example), it is still the same object
|
||||
if ((to == g->players[0]->game->inPlay || to == g->players[1]->game->inPlay) && (from == g->players[0]->game->inPlay || from
|
||||
== g->players[1]->game->inPlay))
|
||||
@@ -371,6 +381,7 @@ MTGCardInstance * MTGPlayerCards::putInZone(MTGCardInstance * card, MTGGameZone
|
||||
|
||||
if (!(copy = from->removeCard(card, doCopy)))
|
||||
return NULL; //ERROR
|
||||
|
||||
if (card->miracle)
|
||||
{
|
||||
copy->miracle = true;
|
||||
@@ -435,11 +446,12 @@ MTGCardInstance * MTGPlayerCards::putInZone(MTGCardInstance * card, MTGGameZone
|
||||
previous->next = NULL;
|
||||
SAFE_DELETE(previous);
|
||||
}
|
||||
|
||||
}
|
||||
if(!asCopy)
|
||||
{
|
||||
if(shufflelibrary)
|
||||
copy->owner->game->library->shuffle();
|
||||
copy->owner->game->library->shuffle();//shouldnt we only ever do this if you clicked close on your library gui??????
|
||||
|
||||
WEvent * e = NEW WEventZoneChange(copy, from, to);
|
||||
g->receiveEvent(e);
|
||||
@@ -995,6 +1007,14 @@ MTGGameZone * MTGGameZone::intToZone(int zoneId, Player * p, Player * p2)
|
||||
return p->opponent()->game->stack;
|
||||
case STACK:
|
||||
return p->game->stack;
|
||||
|
||||
case MY_REVEAL:
|
||||
return p->game->reveal;
|
||||
case OPPONENT_REVEAL:
|
||||
return p->opponent()->game->reveal;
|
||||
case REVEAL:
|
||||
return p->game->reveal;
|
||||
|
||||
}
|
||||
if (!p2) return NULL;
|
||||
switch (zoneId)
|
||||
@@ -1017,6 +1037,9 @@ MTGGameZone * MTGGameZone::intToZone(int zoneId, Player * p, Player * p2)
|
||||
case TARGET_CONTROLLER_STACK:
|
||||
return p2->game->stack;
|
||||
|
||||
case TARGET_CONTROLLER_REVEAL:
|
||||
return p2->game->reveal;
|
||||
|
||||
default:
|
||||
return NULL;
|
||||
}
|
||||
@@ -1114,6 +1137,18 @@ MTGGameZone * MTGGameZone::intToZone(GameObserver *g, int zoneId, MTGCardInstanc
|
||||
if(source->playerTarget)
|
||||
return source->playerTarget->game->stack;
|
||||
else return source->controller()->game->stack;
|
||||
|
||||
case TARGET_OWNER_REVEAL:
|
||||
return target->owner->game->reveal;
|
||||
case REVEAL:
|
||||
return target->owner->game->reveal;
|
||||
case OWNER_REVEAL:
|
||||
return target->owner->game->reveal;
|
||||
case TARGETED_PLAYER_REVEAL:
|
||||
if (source->playerTarget)
|
||||
return source->playerTarget->game->reveal;
|
||||
else return source->controller()->game->reveal;
|
||||
|
||||
default:
|
||||
return NULL;
|
||||
}
|
||||
@@ -1141,6 +1176,8 @@ int MTGGameZone::zoneStringToId(string zoneName)
|
||||
|
||||
"mystack", "opponentstack", "targetownerstack", "targetcontrollerstack", "ownerstack", "stack","targetedpersonsstack",
|
||||
|
||||
"myreveal", "opponentreveal", "targetownerreveal", "targetcontrollerreveal", "ownerreveal", "reveal","targetedpersonsreveal",
|
||||
|
||||
};
|
||||
|
||||
int values[] = { MY_GRAVEYARD, OPPONENT_GRAVEYARD, TARGET_OWNER_GRAVEYARD, TARGET_CONTROLLER_GRAVEYARD, OWNER_GRAVEYARD,
|
||||
@@ -1160,7 +1197,9 @@ int MTGGameZone::zoneStringToId(string zoneName)
|
||||
|
||||
MY_EXILE, OPPONENT_EXILE, TARGET_OWNER_EXILE, TARGET_CONTROLLER_EXILE, OWNER_EXILE, EXILE,TARGETED_PLAYER_EXILE,
|
||||
|
||||
MY_STACK, OPPONENT_STACK, TARGET_OWNER_STACK, TARGET_CONTROLLER_STACK, OWNER_STACK, STACK,TARGETED_PLAYER_STACK };
|
||||
MY_STACK, OPPONENT_STACK, TARGET_OWNER_STACK, TARGET_CONTROLLER_STACK, OWNER_STACK, STACK,TARGETED_PLAYER_STACK,
|
||||
|
||||
MY_REVEAL, OPPONENT_REVEAL, TARGET_OWNER_REVEAL, TARGET_CONTROLLER_REVEAL, OWNER_REVEAL, REVEAL,TARGETED_PLAYER_REVEAL };
|
||||
|
||||
int max = sizeof(values) / sizeof *(values);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user