Improved Die Roll event and trigger, added Flip Coin trigger management, added/fixed almost all primitives with "roll a die ability", fixed some tab chars in source files.

This commit is contained in:
valfieri
2020-12-15 19:49:06 +01:00
parent bf3d35463f
commit b09763d89e
12 changed files with 666 additions and 297 deletions

View File

@@ -3311,6 +3311,10 @@ int MTGUnearthRule::receiveEvent(WEvent * event)
{
e->card->fresh = 1;
}
if (e->from == e->card->controller()->game->stack && e->to == e->card->controller()->game->graveyard) // Apply fresh attribute for new casted spells
{
e->card->fresh = 1;
}
if (e->to == e->card->controller()->game->battlefield)
{
e->card->fresh = 1;
@@ -3320,6 +3324,18 @@ int MTGUnearthRule::receiveEvent(WEvent * event)
{
e->card->fresh = 1;
}
if (e->to == e->card->controller()->game->hand) // Apply fresh attribute for cards just put in hand
{
e->card->fresh = 1;
}
if (e->to == e->card->controller()->game->commandzone) // Apply fresh attribute for cards just put in commandzone
{
e->card->fresh = 1;
}
if (e->to == e->card->controller()->game->library) // Apply fresh attribute for cards just put in library
{
e->card->fresh = 1;
}
if (card && card->basicAbilities[(int)Constants::UNEARTH])
{