Added/fixed primitives, updated the "missing_cards_by_sets" folder, renamed several decks for AI, added "noentertrg" and "nodietrg" keywords to allow creatures enter the battlefield or die without causing abilities to trigger (e.g. "Hushbringer").

This commit is contained in:
Vittorio Alfieri
2021-10-21 09:53:39 +02:00
parent 41a89c7324
commit 78658a6a9e
42 changed files with 116 additions and 140 deletions
+15 -2
View File
@@ -190,8 +190,21 @@ public:
//Battlefield is a special case. We usually don't want to trigger when a card comes from battlefield to battlefield
// http://code.google.com/p/wagic/issues/detail?id=179
if ((e->from == game->players[0]->game->battlefield || e->from == game->players[1]->game->battlefield) && (e->to
== game->players[0]->game->battlefield || e->to == game->players[1]->game->battlefield))
if ((e->from == game->players[0]->game->battlefield || e->from == game->players[1]->game->battlefield)
&& (e->to == game->players[0]->game->battlefield || e->to == game->players[1]->game->battlefield))
{
return 0;
}
//Creatures entering the battlefield don't cause abilities to trigger (e.g. "Hushbringer").
if (e->card->isCreature() && (game->players[0]->game->battlefield->hasAbility(Constants::NOENTERTRG) || game->players[1]->game->battlefield->hasAbility(Constants::NOENTERTRG))
&& (e->to == game->players[0]->game->battlefield || e->to == game->players[1]->game->battlefield))
{
return 0;
}
//Creatures dying don't cause abilities to trigger (e.g. "Hushbringer").
if (e->card->isCreature() && (game->players[0]->game->battlefield->hasAbility(Constants::NODIETRG) || game->players[1]->game->battlefield->hasAbility(Constants::NODIETRG))
&& (e->from == game->players[0]->game->battlefield || e->from == game->players[1]->game->battlefield)
&& (e->to == game->players[0]->game->graveyard || e->to == game->players[1]->game->graveyard))
{
return 0;
}
+3 -1
View File
@@ -330,7 +330,9 @@ class Constants
HASSTRIVE = 203,
ISCONSPIRACY = 204,
HASAFTERMATH = 205,
NB_BASIC_ABILITIES = 206,
NOENTERTRG = 206,
NODIETRG = 207,
NB_BASIC_ABILITIES = 208,
RARITY_S = 'S', //Special Rarity
RARITY_M = 'M', //Mythics