Merge pull request #960 from kevlahnota/master

Update Rules
This commit is contained in:
Anthony Calosa
2017-03-12 12:14:09 +08:00
committed by GitHub
13 changed files with 39 additions and 99 deletions
+6 -5
View File
@@ -32,6 +32,7 @@ auto=lifelinkrule
auto=deathtouchrule auto=deathtouchrule
auto=soulbondrule auto=soulbondrule
auto=dredgerule auto=dredgerule
auto=bestowrule
[PLAYERS] [PLAYERS]
life:20 life:20
@@ -48,11 +49,11 @@ auto=maxPlay(land)1000
#Lands Mana Rules #Lands Mana Rules
auto=lord(Plains|MyBattlefield) {T}:Add{W} auto=lord(Plains[-noactivatedability;-nomanaability;-notapability;land]|MyBattlefield) {T}:Add{W}
auto=lord(Island|MyBattlefield) {T}:Add{U} auto=lord(Island[-noactivatedability;-nomanaability;-notapability;land]|MyBattlefield) {T}:Add{U}
auto=lord(Swamp|MyBattlefield) {T}:Add{B} auto=lord(Swamp[-noactivatedability;-nomanaability;-notapability;land]|MyBattlefield) {T}:Add{B}
auto=lord(Mountain|MyBattlefield) {T}:Add{R} auto=lord(Mountain[-noactivatedability;-nomanaability;-notapability;land]|MyBattlefield) {T}:Add{R}
auto=lord(Forest|MyBattlefield) {T}:Add{G} auto=lord(Forest[-noactivatedability;-nomanaability;-notapability;land]|MyBattlefield) {T}:Add{G}
#Mana Empties from manapool at the end of each phase #Mana Empties from manapool at the end of each phase
+6 -5
View File
@@ -31,6 +31,7 @@ auto=lifelinkrule
auto=deathtouchrule auto=deathtouchrule
auto=soulbondrule auto=soulbondrule
auto=dredgerule auto=dredgerule
auto=bestowrule
[PLAYERS] [PLAYERS]
life:18 life:18
@@ -43,11 +44,11 @@ auto=maxPlay(land)1
#Lands Mana Rules #Lands Mana Rules
auto=lord(Plains[land]|MyBattlefield) {T}:Add{W} auto=lord(Plains[-noactivatedability;-nomanaability;-notapability;land]|MyBattlefield) {T}:Add{W}
auto=lord(Island[land]|MyBattlefield) {T}:Add{U} auto=lord(Island[-noactivatedability;-nomanaability;-notapability;land]|MyBattlefield) {T}:Add{U}
auto=lord(Swamp[land]|MyBattlefield) {T}:Add{B} auto=lord(Swamp[-noactivatedability;-nomanaability;-notapability;land]|MyBattlefield) {T}:Add{B}
auto=lord(Mountain[land]|MyBattlefield) {T}:Add{R} auto=lord(Mountain[-noactivatedability;-nomanaability;-notapability;land]|MyBattlefield) {T}:Add{R}
auto=lord(Forest[land]|MyBattlefield) {T}:Add{G} auto=lord(Forest[-noactivatedability;-nomanaability;-notapability;land]|MyBattlefield) {T}:Add{G}
#Mana Empties from manapool at the end of each phase #Mana Empties from manapool at the end of each phase
+11 -10
View File
@@ -30517,7 +30517,7 @@ toughness=4
name=Docent of Perfection name=Docent of Perfection
abilities=flying abilities=flying
auto=@movedto(instant,sorcery|mystack):token(Wizard,Creature Human Wizard,1/1,blue) auto=@movedto(instant,sorcery|mystack):token(Wizard,Creature Human Wizard,1/1,blue)
auto=while(restriction{type(wizard|myBattlefield)~morethan~3}) flip(Final Iteration) auto=aslongas(wizard|myBattlefield) flip(Final Iteration) while >2
text=Flying -- Whenever you cast an instant or sorcery spell, put a 1/1 blue Human Wizard creature token onto the battlefield. Then if you control three or more Wizards, transform Docent of Perfection. text=Flying -- Whenever you cast an instant or sorcery spell, put a 1/1 blue Human Wizard creature token onto the battlefield. Then if you control three or more Wizards, transform Docent of Perfection.
mana={3}{U}{U} mana={3}{U}{U}
type=Creature type=Creature
@@ -52420,8 +52420,8 @@ toughness=4
[card] [card]
name=Harbor Serpent name=Harbor Serpent
abilities=islandwalk abilities=islandwalk
auto=while(restriction{type(island|battlefield)~lessthan~5}) cantattack auto=aslongas(island|battlefield) cantattack <5
auto=while(restriction{type(island|battlefield)~lessthan~5}) cantpwattack auto=aslongas(island|battlefield) cantpwattack <5
text=Islandwalk -- Harbor Serpent can't attack unless there are five or more Islands on the battlefield. text=Islandwalk -- Harbor Serpent can't attack unless there are five or more Islands on the battlefield.
mana={4}{U}{U} mana={4}{U}{U}
type=Creature type=Creature
@@ -69163,7 +69163,8 @@ toughness=4
[/card] [/card]
[card] [card]
name=Lupine Prototype name=Lupine Prototype
auto=while(restriction{type(*|hand)~morethan~0}) transforms((,cantattack,cantpwattack,cantblock)) auto=this(variable{phandcount}>0) transforms((,cantattack,cantpwattack,cantblock))
auto=this(variable{ohandcount}>0) transforms((,cantattack,cantpwattack,cantblock))
text=Lupine Prototype can't attack or block unless a player has no cards in hand. text=Lupine Prototype can't attack or block unless a player has no cards in hand.
mana={2} mana={2}
type=Artifact Creature type=Artifact Creature
@@ -100390,7 +100391,7 @@ type=Instant
[/card] [/card]
[card] [card]
name=Scourge Devil name=Scourge Devil
auto=1/0 lord(creature|myBattlefield) auto=1/0 all(creature|myBattlefield)
autograveyard={2}{R}:moveto(mybattlefield) && transforms((,unearth,haste)) asSorcery forever autograveyard={2}{R}:moveto(mybattlefield) && transforms((,unearth,haste)) asSorcery forever
text=When Scourge Devil enters the battlefield, creatures you control get +1/+0 until end of turn. -- Unearth {2}{R} ({2}{R}: Return this card from your graveyard to the battlefield. It gains haste. Exile it at the beginning of the next end step or if it would leave the battlefield. Unearth only as a sorcery.) text=When Scourge Devil enters the battlefield, creatures you control get +1/+0 until end of turn. -- Unearth {2}{R} ({2}{R}: Return this card from your graveyard to the battlefield. It gains haste. Exile it at the beginning of the next end step or if it would leave the battlefield. Unearth only as a sorcery.)
mana={4}{R} mana={4}{R}
@@ -104852,7 +104853,7 @@ type=Instant
[/card] [/card]
[card] [card]
name=Shrivel name=Shrivel
auto=-1/-1 lord(creature) auto=-1/-1 all(creature)
text=All creatures get -1/-1 until end of turn. text=All creatures get -1/-1 until end of turn.
mana={1}{B} mana={1}{B}
type=Sorcery type=Sorcery
@@ -112741,7 +112742,7 @@ subtype=Aura
[/card] [/card]
[card] [card]
name=Stampede Driver name=Stampede Driver
auto={1}{G}{T}{D(*|myhand)}:all(creature|myBattlefield) 1/1 && lord(creature|mybattlefield) trample auto={1}{G}{T}{D(*|myhand)}:all(creature|myBattlefield) 1/1 && all(creature|mybattlefield) trample
text={1}{G}, {T}, Discard a card: Creatures you control get +1/+1 and gain trample until end of turn. text={1}{G}, {T}, Discard a card: Creatures you control get +1/+1 and gain trample until end of turn.
mana={G} mana={G}
type=Creature type=Creature
@@ -122831,7 +122832,7 @@ type=Sorcery
[/card] [/card]
[card] [card]
name=Torrent of Souls name=Torrent of Souls
auto=if spent({R}) then target(player) ability$!name(2/0 & haste) 2/0 lord(creature|mybattlefield) && haste lord(creature|mybattlefield)!$ targetedplayer auto=if spent({R}) then target(player) ability$!name(2/0 & haste) 2/0 all(creature|mybattlefield) && haste all(creature|mybattlefield)!$ targetedplayer
auto=if spent({B}) then ability$!name(reanimate) target(creature|mygraveyard) moveto(mybattlefield)!$ controller auto=if spent({B}) then ability$!name(reanimate) target(creature|mygraveyard) moveto(mybattlefield)!$ controller
text=Return up to one target creature card from your graveyard to the battlefield if {B} was spent to cast Torrent of Souls. Creatures target player controls get +2/+0 and gain haste until end of turn if {R} was spent to cast Torrent of Souls. (Do both if {B}{R} was spent.) text=Return up to one target creature card from your graveyard to the battlefield if {B} was spent to cast Torrent of Souls. Creatures target player controls get +2/+0 and gain haste until end of turn if {R} was spent to cast Torrent of Souls. (Do both if {B}{R} was spent.)
mana={4}{BR} mana={4}{BR}
@@ -126361,8 +126362,8 @@ type=Sorcery
[/card] [/card]
[card] [card]
name=Unnerving Assault name=Unnerving Assault
auto=if spent({U}) then -1/0 lord(creature|opponentbattlefield) auto=if spent({U}) then -1/0 all(creature|opponentbattlefield)
auto=if spent({R}) then 1/0 lord(creature|mybattlefield) auto=if spent({R}) then 1/0 all(creature|mybattlefield)
text=Creatures your opponents control get -1/-0 until end of turn if {U} was spent to cast Unnerving Assault, and creatures you control get +1/+0 until end of turn if {R} was spent to cast it. (Do both if {U}{R} was spent.) text=Creatures your opponents control get -1/-0 until end of turn if {U} was spent to cast Unnerving Assault, and creatures you control get +1/+0 until end of turn if {R} was spent to cast it. (Do both if {U}{R} was spent.)
mana={2}{UR} mana={2}{UR}
type=Instant type=Instant
-4
View File
@@ -273,10 +273,6 @@ public:
int copiedSetID; int copiedSetID;
bool canPlayFromLibrary(); bool canPlayFromLibrary();
bool StackIsEmptyandSorcerySpeed(); bool StackIsEmptyandSorcerySpeed();
bool isTargetted();
int cardistargetted;
bool isTargetter();
int cardistargetter;
int forcedBorderA; int forcedBorderA;
int forcedBorderB; int forcedBorderB;
int myconvertedcost; int myconvertedcost;
+1 -1
View File
@@ -1,5 +1,5 @@
#include "PrecompiledHeader.h" #include "PrecompiledHeader.h"
#include "AIHints.h" #include "AIHints.h"
#include "AIPlayerBaka.h" #include "AIPlayerBaka.h"
#include "utils.h" #include "utils.h"
+1
View File
@@ -1521,6 +1521,7 @@ void ActionStack::Render()
((Interruptible *) mObjects[i])->y = currenty + 40; ((Interruptible *) mObjects[i])->y = currenty + 40;
currenty += ((Interruptible *) mObjects[i])->mHeight + 40; currenty += ((Interruptible *) mObjects[i])->mHeight + 40;
} }
current->mHasFocus = false;//fix stack display
mObjects[i]->Render(); mObjects[i]->Render();
} }
} }
+2 -1
View File
@@ -8149,7 +8149,8 @@ MTGCardInstance * AACastCard::makeCard()
card = NEW MTGCardInstance(cardData, source->controller()->game); card = NEW MTGCardInstance(cardData, source->controller()->game);
card->owner = source->controller(); card->owner = source->controller();
card->lastController = source->controller(); card->lastController = source->controller();
source->controller()->game->temp->addCard(card); //source->controller()->game->temp->addCard(card);
source->controller()->game->sideboard->addCard(card);
return card; return card;
} }
+11 -1
View File
@@ -497,7 +497,17 @@ void CardGui::Render()
renderer->DrawRect(actX - 10 * actZ, actY - (1 * actZ), 6.f,6.f,ARGB(180,10,10,10)); renderer->DrawRect(actX - 10 * actZ, actY - (1 * actZ), 6.f,6.f,ARGB(180,10,10,10));
} }
} }
if(!alternate && buff != "" && game && game->gameType() == GAME_TYPE_CLASSIC)//it seems that other game modes makes cards as tokens!!! hmmm... if(card->chooseasubtype.size() && !alternate && game)
{
mFont->SetScale(DEFAULT_MAIN_FONT_SCALE);
char buffer[200];
sprintf(buffer, "%s", card->chooseasubtype.c_str());
mFont->SetColor(ARGB(static_cast<unsigned char>(actA),255,215,0));//Gold indicator
mFont->SetScale(0.8f);
mFont->DrawString(buffer, actX - 10 * actZ, actY - (25.3f * actZ));
mFont->SetScale(1);
}
if(!alternate && buff != "" && game)
{ {
mFont->SetScale(DEFAULT_MAIN_FONT_SCALE); mFont->SetScale(DEFAULT_MAIN_FONT_SCALE);
char buffer[200]; char buffer[200];
-2
View File
@@ -652,8 +652,6 @@ void GameObserver::gameStateBasedEffects()
{ {
for (int c = zone->nb_cards - 1; c >= 0; c--) for (int c = zone->nb_cards - 1; c >= 0; c--)
{ {
zone->cards[c]->cardistargetted = 0;
zone->cards[c]->cardistargetter = 0;
zone->cards[c]->forcedBorderA = 0; zone->cards[c]->forcedBorderA = 0;
zone->cards[c]->forcedBorderB = 0; zone->cards[c]->forcedBorderB = 0;
} }
-8
View File
@@ -551,14 +551,6 @@ int AbilityFactory::parseCastRestrictions(MTGCardInstance * card, Player * playe
if(!card->discarded) if(!card->discarded)
return 0; return 0;
} }
check = restriction[i].find("cardistargeted");
if(check != string::npos)
{
bool istarget = card->isTargetted();
if(!istarget)
return 0;
}
check = restriction[i].find("copiedacard"); check = restriction[i].find("copiedacard");
if(check != string::npos) if(check != string::npos)
-58
View File
@@ -69,8 +69,6 @@ MTGCardInstance::MTGCardInstance(MTGCard * card, MTGPlayerCards * arg_belongs_to
copiedSetID = 0; copiedSetID = 0;
LKIpower = power; LKIpower = power;
LKItoughness = toughness; LKItoughness = toughness;
cardistargetted = 0;
cardistargetter = 0;
forcedBorderA = 0; forcedBorderA = 0;
forcedBorderB = 0; forcedBorderB = 0;
myconvertedcost = getManaCost()->getConvertedCost(); myconvertedcost = getManaCost()->getConvertedCost();
@@ -951,62 +949,6 @@ bool MTGCardInstance::StackIsEmptyandSorcerySpeed()
return false; return false;
} }
//check targetted?
bool MTGCardInstance::isTargetted()
{
if(controller()->game->reveal->cards.size() || controller()->opponent()->game->reveal->cards.size())
return false;
if(getObserver()->mLayers->stackLayer()->count(0, NOT_RESOLVED) != 0)
{
ActionStack * stack = observer->mLayers->stackLayer();
for (int i = stack->mObjects.size() - 1; i >= 0; i--)
{
Interruptible * current = ((Interruptible *) stack->mObjects[i]);
if ((current->type == ACTION_SPELL || current->type == ACTION_ABILITY) && current->state == NOT_RESOLVED)
{
if(current->type == ACTION_SPELL)
{
Spell * spell = (Spell *) current;
if(spell->getNextTarget() && spell->getNextTarget() == (Targetable*)this)
return true;
}
}
}
}
if(cardistargetted)
return true;
return false;
}
//check targetter?
bool MTGCardInstance::isTargetter()
{
if(controller()->game->reveal->cards.size() || controller()->opponent()->game->reveal->cards.size())
return false;
if(getObserver()->mLayers->stackLayer()->count(0, NOT_RESOLVED) != 0)
{
ActionStack * stack = observer->mLayers->stackLayer();
for (int i = stack->mObjects.size() - 1; i >= 0; i--)
{
Interruptible * current = ((Interruptible *) stack->mObjects[i]);
if ((current->type == ACTION_SPELL || current->type == ACTION_ABILITY) && current->state == NOT_RESOLVED)
{
if(current->type == ACTION_SPELL)
{
Spell * spell = (Spell *) current;
if(spell && spell->source == this)
return true;
}
}
}
}
if(cardistargetter)
return true;
return false;
}
int MTGCardInstance::canBlock() int MTGCardInstance::canBlock()
{ {
if (tapped && !has(Constants::CANBLOCKTAPPED)) if (tapped && !has(Constants::CANBLOCKTAPPED))
+1 -1
View File
@@ -435,7 +435,7 @@ ManaCost::ManaCost(ManaCost * manaCost)
hybrids = manaCost->hybrids; hybrids = manaCost->hybrids;
kicker = NEW ManaCost(manaCost->kicker); kicker = NEW ManaCost(manaCost->kicker);
if (kicker) if (kicker)
kicker->isMulti = manaCost->isMulti; kicker->isMulti = manaCost->isMulti;
Retrace = NEW ManaCost( manaCost->Retrace ); Retrace = NEW ManaCost( manaCost->Retrace );
BuyBack = NEW ManaCost( manaCost->BuyBack ); BuyBack = NEW ManaCost( manaCost->BuyBack );
alternative = NEW ManaCost( manaCost->alternative ); alternative = NEW ManaCost( manaCost->alternative );
-3
View File
@@ -129,9 +129,6 @@ WEventVampire::WEventVampire(MTGCardInstance * card,MTGCardInstance * source,MTG
WEventTarget::WEventTarget(MTGCardInstance * card,MTGCardInstance * source) : WEventTarget::WEventTarget(MTGCardInstance * card,MTGCardInstance * source) :
WEventCardUpdate(card),card(card),source(source) WEventCardUpdate(card),card(card),source(source)
{ {
card->cardistargetted = 1;
if(source)
source->cardistargetter = 1;
} }
WEventCardChangeType::WEventCardChangeType(MTGCardInstance * card, int type, bool before, bool after) : WEventCardChangeType::WEventCardChangeType(MTGCardInstance * card, int type, bool before, bool after) :