Merge pull request #648 from kevlahnota/master

protection from colored spells & forced menuicons for PSP
This commit is contained in:
Anthony Calosa
2015-10-19 00:11:59 +08:00
7 changed files with 27 additions and 12 deletions

View File

@@ -18524,7 +18524,7 @@ subtype=Aura
[card]
name=Conquering Manticore
abilities=flying
auto=target(creature|opponentbattlefield) transforms((,newability[moveTo(opponentbattlefield)],newability[phaseaction[endofturn sourceinplay] moveTo(ownerbattlefield)],newability[untap],haste)) ueot once
auto=name(gain control) target(creature|opponentbattlefield) transforms((,newability[moveTo(opponentbattlefield)],newability[phaseaction[endofturn sourceinplay] moveTo(ownerbattlefield)],newability[untap],haste)) ueot once
text=Flying -- When Conquering Manticore enters the battlefield, gain control of target creature an opponent controls until end of turn. Untap that creature. It gains haste until end of turn.
mana={4}{R}{R}
type=Creature
@@ -29970,15 +29970,10 @@ toughness=3
[/card]
[card]
name=Emrakul, the Aeons Torn
abilities=nofizzle,flying
abilities=nofizzle,flying,protectionfromcoloredspells
auto=if casted(this) then turns:+1 controller
autograveyard=moveTo(ownerlibrary) all(*|ownergraveyard) && shuffle
auto=@combat(attacking) source(this):name(Annihilate) ability$!name(sacrifice 6 permanents) notatarget(<6>*|mybattlefield) sacrifice!$ opponent
auto=protection from(*[white]|stack)
auto=protection from(*[blue]|stack)
auto=protection from(*[black]|stack)
auto=protection from(*[red]|stack)
auto=protection from(*[green]|stack)
text=Emrakul, the Aeons Torn can't be countered. -- When you cast Emrakul, take an extra turn after this one. -- Flying, protection from colored spells, annihilator 6 -- When Emrakul is put into a graveyard from anywhere, its owner shuffles his or her graveyard into his or her library.
mana={15}
type=Legendary Creature
@@ -50645,6 +50640,7 @@ toughness=3
[card]
name=Jokulmorder
abilities=trample,doesnotuntap
auto=tap
auto=aslongas(land|mybattlefield) choice target(<5>land|mybattlefield) sacrifice oneshot >4
auto=choice sacrifice all(this)
auto=@movedTo(island|mybattlefield):untap
@@ -74514,8 +74510,8 @@ type=Instant
[card]
name=Primal Clay
auto=choice name(enter as 3/3) transforms((,setpower=3,settoughness=3)) forever
auto=choice name(enter as 2/2 fly) transforms((,flying,setpower=2,settoughness=2)) forever
auto=choice name(enter as a wall) transforms((Wall,defender,setpower=1,settoughness=6)) forever
auto=choice name(enter as 2/2 fly) transforms((,newability[flying],setpower=2,settoughness=2)) forever
auto=choice name(enter as a wall) transforms((Wall,newability[defender],setpower=1,settoughness=6)) forever
text=As Primal Clay enters the battlefield, it becomes your choice of a 3/3 artifact creature, a 2/2 artifact creature with flying, or a 1/6 Shapeshifter Wall artifact creature with defender.
mana={4}
type=Artifact Creature
@@ -111749,7 +111745,7 @@ type=Instant
[card]
name=Warrior's Lesson
target=<upto:2>creature|mybattlefield
auto=transforms((,newability[@combatdamaged(opponent) from(this):draw:1 controller])) ueot
auto=transforms((,newability[@combatdamaged(player) from(this):draw:1 controller])) ueot
text=Until end of turn, up to two target creatures you control each gain "Whenever this creature deals combat damage to a player, draw a card."
mana={G}
type=Instant

View File

@@ -231,7 +231,8 @@ class Constants
NOLIFEGAINOPPONENT = 113,
AURAWARD = 114,
MADNESS = 115,
NB_BASIC_ABILITIES = 116,
PROTECTIONFROMCOLOREDSPELLS = 116,
NB_BASIC_ABILITIES = 117,
RARITY_S = 'S', //Special Rarity

View File

@@ -78,6 +78,11 @@ int Damage::resolve()
damage = 0;
//rulings = 10/4/2004 The damage prevention ability works even if it has no counters, as long as some effect keeps its toughness above zero.
//these creature are essentially immune to damage. however 0/-1 effects applied through lords or counters can kill them.
if ((_target)->has(Constants::PROTECTIONFROMCOLOREDSPELLS))
{//damage is prevented as long as the damage source is a spell on the stack...
if((source->currentZone == source->controller()->opponent()->game->stack||source->currentZone == source->controller()->game->stack) && (source->hasColor(1)||source->hasColor(2)||source->hasColor(3)||source->hasColor(4)||source->hasColor(5)))
damage = 0;
}
if ((_target)->has(Constants::PHANTOM))
{
damage = 0;

View File

@@ -174,7 +174,9 @@ void GameApp::Create()
LOG("Loading Textures");
LOG("--Loading menuicons.png");
WResourceManager::Instance()->RetrieveTexture("menuicons.png", RETRIEVE_MANAGE);
#if !defined (PSP)
WResourceManager::Instance()->RetrieveTexture("miconslarge.png", RETRIEVE_MANAGE);
#endif
LOG("---Gettings menuicons.png quads");
//Load all icons from gModRules and save in manaIcons -> todo. Change the icons positions on menuicons.png to avoid use item->mColorId

View File

@@ -85,8 +85,13 @@ void GameStateMenu::Create()
{
for (int j = 0; j < 2; j++)
{
#if defined (PSP)
sprintf(buf, "menuicons%d%d", i, j);
mIcons[n] = WResourceManager::Instance()->RetrieveQuad("menuicons.png", 2 + i * 36.0f, 2.0f + j * 36.0f, 32.0f, 32.0f, buf);
#else
sprintf(buf, "miconslarge%d%d", i, j);
mIcons[n] = WResourceManager::Instance()->RetrieveQuad("miconslarge.png", 4 + i * 72.0f, 4.0f + j * 72.0f, 72.0f, 72.0f, buf);
#endif
if (mIcons[n])
{
mIcons[n]->mHeight = 36.f;

View File

@@ -144,7 +144,8 @@ const char* Constants::MTGBasicAbilities[] = {
"nolifegain",
"nolifegainopponent",
"auraward",
"madness"
"madness",
"protectionfromcoloredspells"
};
map<string,int> Constants::MTGBasicAbilitiesMap;

View File

@@ -859,6 +859,11 @@ bool TargetChooser::canTarget(Targetable * target, bool withoutProtections)
if (card->protectedAgainst(targetter)) return targetter->bypassTC;
if (card->CantBeTargetby(targetter)) return targetter->bypassTC;
if ((targetter->controller() != card->controller()) && card->has(Constants::OPPONENTSHROUD)) return targetter->bypassTC;
if (card->has(Constants::PROTECTIONFROMCOLOREDSPELLS))
{//a spell that has no target=criteria means it's not targetted unless its a workaround card...
if((targetter->spellTargetType.size()) && (targetter->hasColor(1)||targetter->hasColor(2)||targetter->hasColor(3)||targetter->hasColor(4)||targetter->hasColor(5)))
return targetter->bypassTC;
}
}
return true;
}