Jeck - Applied booster rarity sorting patch (issue 133), added horsemanship ability.
* The horsemanship ability literally required only one line of code, and could add an additional ~36 cards to Dr. Solomat's PT3 set. It seems functional, but someone please double check it anyways, as I've not worked with much of the actual game code yet.
This commit is contained in:
@@ -100,8 +100,9 @@ class Constants
|
||||
INDESTRUCTIBLE = 42,
|
||||
INTIMIDATE = 43,
|
||||
DEATHTOUCH = 44,
|
||||
HORSEMANSHIP = 45,
|
||||
|
||||
NB_BASIC_ABILITIES = 45,
|
||||
NB_BASIC_ABILITIES = 46,
|
||||
|
||||
|
||||
RARITY_M = 'M',
|
||||
|
||||
@@ -374,6 +374,7 @@ int MTGCardInstance::canBlock(MTGCardInstance * opponent){
|
||||
if (opponent->basicAbilities[Constants::SHADOW] && !( basicAbilities[Constants::SHADOW] || basicAbilities[Constants::REACHSHADOW])) return 0;
|
||||
// If opponent does not have shadow and a creature has shadow it cannot be blocked
|
||||
if (!opponent->basicAbilities[Constants::SHADOW] && basicAbilities[Constants::SHADOW]) return 0;
|
||||
if (opponent->basicAbilities[Constants::HORSEMANSHIP] && !basicAbilities[Constants::HORSEMANSHIP]) return 0;
|
||||
if (opponent->basicAbilities[Constants::SWAMPWALK] && controller()->game->inPlay->hasType("swamp")) return 0;
|
||||
if (opponent->basicAbilities[Constants::FORESTWALK] && controller()->game->inPlay->hasType("forest")) return 0;
|
||||
if (opponent->basicAbilities[Constants::ISLANDWALK] && controller()->game->inPlay->hasType("island")) return 0;
|
||||
|
||||
@@ -52,7 +52,8 @@ const char* Constants::MTGBasicAbilities[] = {
|
||||
"opponentshroud",
|
||||
"indestructible",
|
||||
"intimidate",
|
||||
"deathtouch"
|
||||
"deathtouch",
|
||||
"horsemanship"
|
||||
};
|
||||
|
||||
|
||||
|
||||
@@ -404,14 +404,19 @@ void ShopItems::ButtonPressed(int controllerId, int controlId){
|
||||
}
|
||||
|
||||
int i = 0;
|
||||
for(int cycle=0;cycle<3;cycle++)
|
||||
for (map<int,int>::iterator it = tempDeck->cards.begin(); it!=tempDeck->cards.end(); it++){
|
||||
MTGCard * c = tempDeck->getCardById(it->first);
|
||||
for (int j = 0; j < it->second; j++){
|
||||
MTGCardInstance * card = NEW MTGCardInstance(c, NULL);
|
||||
displayCards[i] = card;
|
||||
display->AddCard(card);
|
||||
i++;
|
||||
}
|
||||
char rarity = c->getRarity();
|
||||
if((cycle == 0 && (rarity == Constants::RARITY_C || rarity == Constants::RARITY_L))
|
||||
|| (cycle == 1 && rarity == Constants::RARITY_U)
|
||||
|| (cycle == 2 && (rarity == Constants::RARITY_R || rarity == Constants::RARITY_M)))
|
||||
for (int j = 0; j < it->second; j++){
|
||||
MTGCardInstance * card = NEW MTGCardInstance(c, NULL);
|
||||
displayCards[i] = card;
|
||||
display->AddCard(card);
|
||||
i++;
|
||||
}
|
||||
}
|
||||
delete tempDeck;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user