Merge pull request #630 from kevlahnota/master

Added ORI cards, Removed Workarounds, Added support for Can't Gain life... spellmastery keyword is used for alternative cost so cards with spellmastery can be cast as though it had flash (substance)...
This commit is contained in:
Anthony Calosa
2015-09-22 07:55:13 +08:00
6 changed files with 1481 additions and 51 deletions

File diff suppressed because it is too large Load Diff

View File

@@ -715,7 +715,22 @@ private:
}
intValue = mountain + island + forest + swamp + plains;
}
else if (s == "myname")//Plague Rats and others
else if (s == "myname")//Name of the card you control
{
intValue = 0;
for (int i = 0; i < 2; i++)
{
Player * p = card->getObserver()->players[i];
for (int j = p->game->battlefield->nb_cards - 1; j >= 0; --j)
{
if (p->game->battlefield->cards[j]->name == card->name && p == card->controller())
{
intValue += 1;
}
}
}
}
else if (s == "allmyname")//Plague Rats and others
{
intValue = 0;
for (int i = 0; i < 2; i++)

View File

@@ -226,7 +226,10 @@ class Constants
SHUFFLELIBRARYDEATH = 108,
OFFERING = 109,
EVADEBIGGER = 110,
NB_BASIC_ABILITIES = 111,
SPELLMASTERY = 111,
NOLIFEGAIN = 112,
NOLIFEGAINOPPONENT = 113,
NB_BASIC_ABILITIES = 114,
RARITY_S = 'S', //Special Rarity

View File

@@ -139,7 +139,10 @@ const char* Constants::MTGBasicAbilities[] = {
"librarydeath",
"shufflelibrarydeath",
"offering",
"evadebigger"
"evadebigger",
"spellmastery",
"nolifegain",
"nolifegainopponent"
};
map<string,int> Constants::MTGBasicAbilitiesMap;

View File

@@ -651,7 +651,7 @@ int MTGAlternativeCostRule::isReactingToClick(MTGCardInstance * card, ManaCost *
)
return 1;
}
else if ((card->hasType(Subtypes::TYPE_INSTANT)) || card->has(Constants::FLASH) || card->has(Constants::OFFERING)
else if ((card->hasType(Subtypes::TYPE_INSTANT)) || card->has(Constants::FLASH) || card->has(Constants::SPELLMASTERY) || card->has(Constants::OFFERING)
|| (player == card->controller() && !game->isInterrupting
&& (game->getCurrentGamePhase() == MTG_PHASE_FIRSTMAIN
|| game->getCurrentGamePhase() == MTG_PHASE_SECONDMAIN))

View File

@@ -147,6 +147,8 @@ int Player::gainOrLoseLife(int value)
{
if (!value)
return 0; //Don't do anything if there's no actual life change
if (value>0 && (opponent()->game->battlefield->hasAbility(Constants::NOLIFEGAINOPPONENT)||game->battlefield->hasAbility(Constants::NOLIFEGAIN)))//nolifegain
return 0;
thatmuch = abs(value); //the value that much is a variable to be used with triggered abilities.
//ie:when ever you gain life, draw that many cards. when used in a trigger draw:thatmuch, will return the value