test fix equipment

also added some primitive fixes, added macro for fabricate
This commit is contained in:
Anthony Calosa
2017-01-25 18:29:27 +08:00
parent 5c3a064746
commit 60f6c683a3
6 changed files with 34 additions and 20 deletions

View File

@@ -12,3 +12,6 @@
# Basic Landcycling # Basic Landcycling
#AUTO_DEFINE __BASIC_LANDCYCLING__($cost) $cost{cycle}:name(basic landcycling) moveTo(myhand) target(land[basic]|mylibrary) #AUTO_DEFINE __BASIC_LANDCYCLING__($cost) $cost{cycle}:name(basic landcycling) moveTo(myhand) target(land[basic]|mylibrary)
# Fabricate
#AUTO_DEFINE _FABRICATE_($c) transforms((,newability[choice counter(1/1.$c)],newability[choice makecardt(Servo:Artifact Creature Servo:1/1)*$c])) ueot

View File

@@ -8530,8 +8530,7 @@ toughness=1
[/card] [/card]
[card] [card]
name=Barbarian Outcast name=Barbarian Outcast
auto=aslongas(swamp|myBattlefield) moveTo(mygraveyard) <1 auto=aslongas(swamp|myBattlefield) all(this) sacrifice while <1
auto=@movedTo(swamp|graveyard,exile,library,hand) from(myBattlefield):aslongas(swamp|myBattlefield) moveTo(mygraveyard) <1
text=When you control no Swamps, sacrifice Barbarian Outcast. text=When you control no Swamps, sacrifice Barbarian Outcast.
mana={1}{R} mana={1}{R}
type=Creature type=Creature
@@ -22178,7 +22177,7 @@ toughness=2
[card] [card]
name=Covetous Dragon name=Covetous Dragon
abilities=flying abilities=flying
auto=aslongas(artifact|myBattlefield) sacrifice <1 auto=aslongas(artifact|myBattlefield) all(this) sacrifice while <1
text=Flying -- When you control no artifacts, sacrifice Covetous Dragon. text=Flying -- When you control no artifacts, sacrifice Covetous Dragon.
mana={4}{R} mana={4}{R}
type=Creature type=Creature
@@ -50629,8 +50628,9 @@ toughness=2
[/card] [/card]
[card] [card]
name=Haunting Echoes name=Haunting Echoes
auto=all(*[-basic]|opponentgraveyard) transforms((,newability[moveTo(exile) all(*[share!name!]|mylibrary)])) ueot target=player
auto=moveTo(exile) all(*[-basic]|opponentgraveyard) auto=all(*[-basic]|targetedpersonsgraveyard) transforms((,newability[moveTo(exile) all(*[share!name!]|mylibrary)])) ueot
auto=moveTo(exile) all(*[-basic]|targetedpersonsgraveyard)
text=Exile all cards from target player's graveyard other than basic land cards. For each card exiled this way, search that player's library for all cards with the same name as that card and exile them. Then that player shuffles his or her library. text=Exile all cards from target player's graveyard other than basic land cards. For each card exiled this way, search that player's library for all cards with the same name as that card and exile them. Then that player shuffles his or her library.
mana={3}{B}{B} mana={3}{B}{B}
type=Sorcery type=Sorcery
@@ -66368,7 +66368,7 @@ type=Instant
[/card] [/card]
[card] [card]
name=Lurebound Scarecrow name=Lurebound Scarecrow
auto=chooseacolor aslongas(*[chosencolor]|myBattlefield) sacrifice <1 chooseend auto=chooseacolor aslongas(*[chosencolor]|myBattlefield) all(this) sacrifice while <1 chooseend
text=As Lurebound Scarecrow enters the battlefield, choose a color. -- When you control no permanents of the chosen color, sacrifice Lurebound Scarecrow. text=As Lurebound Scarecrow enters the battlefield, choose a color. -- When you control no permanents of the chosen color, sacrifice Lurebound Scarecrow.
mana={3} mana={3}
type=Artifact Creature type=Artifact Creature
@@ -82327,7 +82327,8 @@ toughness=1
[/card] [/card]
[card] [card]
name=Phantasmal Image name=Phantasmal Image
auto=may copy NotATarget(creature) and!( transforms((Illusion,newability[@targeted(this):sacrifice])) forever )! auto=may copy NotATarget(creature) and!( transforms((Illusion)) forever )!
auto=@targeted(this):sacrifice
text=You may have Phantasmal Image enter the battlefield as a copy of any creature on the battlefield, except it's an Illusion in addition to its other types and it gains "When this creature becomes the target of a spell or ability, sacrifice it." text=You may have Phantasmal Image enter the battlefield as a copy of any creature on the battlefield, except it's an Illusion in addition to its other types and it gains "When this creature becomes the target of a spell or ability, sacrifice it."
mana={1}{U} mana={1}{U}
type=Creature type=Creature
@@ -98380,7 +98381,8 @@ type=Land
[card] [card]
name=Serendib Djinn name=Serendib Djinn
abilities=flying abilities=flying
auto=@each my upkeep:transforms((,newability[target(land|myBattlefield) sacrifice],newability[@sacrificed(island|mybattlefield) restriction{myUpkeepOnly}:damage:3 controller])) ueot auto=@each my upkeep:notatarget(land|mybattlefield) sacrifice and!(if cantargetcard(island|nonbattlezone) then damage:3 controller)!
auto=aslongas(land|myBattlefield) all(this) sacrifice while <1
text=Flying -- At the beginning of your upkeep, sacrifice a land. If you sacrifice an Island this way, Serendib Djinn deals 3 damage to you. -- When you control no lands, sacrifice Serendib Djinn. text=Flying -- At the beginning of your upkeep, sacrifice a land. If you sacrifice an Island this way, Serendib Djinn deals 3 damage to you. -- When you control no lands, sacrifice Serendib Djinn.
mana={2}{U}{U} mana={2}{U}{U}
type=Creature type=Creature
@@ -112387,7 +112389,7 @@ type=Instant
[card] [card]
name=Sylvan Primordial name=Sylvan Primordial
abilities=reach abilities=reach
auto=name(destroy) target(*[-creature]|opponentbattlefield) transforms((,newability[@movedTo(this|graveyard) from(battlefield):ability$!notatarget(forest|mylibrary) moveto(mybattlefield) and!(tap(noevent))!!$ opponent],newability[destroy])) auto=target(*[-creature]|opponentbattlefield) destroy and!(if cantargetcard(*[-creature]|nonbattlezone) then choice notatarget(forest|mylibrary) moveto(mybattlefield) and!(tap(noevent))! )!
text=Reach -- When Sylvan Primordial enters the battlefield, for each opponent, destroy target noncreature permanent that player controls. For each permanent destroyed this way, search your library for a Forest card and put that card onto the battlefield tapped. Then shuffle your library. text=Reach -- When Sylvan Primordial enters the battlefield, for each opponent, destroy target noncreature permanent that player controls. For each permanent destroyed this way, search your library for a Forest card and put that card onto the battlefield tapped. Then shuffle your library.
mana={5}{G}{G} mana={5}{G}{G}
type=Creature type=Creature
@@ -125411,7 +125413,7 @@ toughness=2
[card] [card]
name=Voodoo Doll name=Voodoo Doll
auto=@each my upkeep:counter(0/0,1,Pin) auto=@each my upkeep:counter(0/0,1,Pin)
auto=@each my endofturn sourcenottap:thisforeach(counter{0/0.1.Pin}) damage:1 controller auto=this(counter{0/0.1.Pin}>0) transforms((,newability[@each my endofturn sourcenottap:damage:counter{0%0.1.Pin} controller && destroy all(this)]))
auto=this(counter{0/0.1.Pin}<1) {0}{T}:damage:0 target(creature,player) auto=this(counter{0/0.1.Pin}<1) {0}{T}:damage:0 target(creature,player)
auto=this(counter{0/0.1.Pin}=) {2}{T}:damage:1 target(creature,player) auto=this(counter{0/0.1.Pin}=) {2}{T}:damage:1 target(creature,player)
auto=this(counter{0/0.2.Pin}=) {4}{T}:damage:2 target(creature,player) auto=this(counter{0/0.2.Pin}=) {4}{T}:damage:2 target(creature,player)
@@ -128009,7 +128011,7 @@ toughness=*
[/card] [/card]
[card] [card]
name=Werewolf Ransacker name=Werewolf Ransacker
auto=target(artifact) transforms((,newability[destroy],newability[damage:3 controller])) forever auto=may target(artifact) destroy and!(if cantargetcard(artifact|nonbattlezone) then damage:3 targetcontroller)!
auto=@each upkeep restriction{lastturn(*|stack)~morethan~1}:flip(Afflicted Deserter) auto=@each upkeep restriction{lastturn(*|stack)~morethan~1}:flip(Afflicted Deserter)
text=Whenever this creature transforms into Werewolf Ransacker, you may destroy target artifact. If that artifact is put into a graveyard this way, Werewolf Ransacker deals 3 damage to that artifact's controller. -- At the beginning of each upkeep, if a player cast two or more spells last turn, transform Werewolf Ransacker. text=Whenever this creature transforms into Werewolf Ransacker, you may destroy target artifact. If that artifact is put into a graveyard this way, Werewolf Ransacker deals 3 damage to that artifact's controller. -- At the beginning of each upkeep, if a player cast two or more spells last turn, transform Werewolf Ransacker.
type=Creature type=Creature

View File

@@ -2,7 +2,7 @@
[INIT] [INIT]
FIRSTMAIN FIRSTMAIN
[PLAYER1] [PLAYER1]
graveyard:Krosan Cloudscraper, Dragonlord Kolaghan, Clone graveyard:109684, Dragonlord Kolaghan, 370622
hand:Living Death hand:Living Death
manapool:{2}{B}{B}{B} manapool:{2}{B}{B}{B}
[PLAYER2] [PLAYER2]
@@ -15,8 +15,8 @@ choice 0
next next
#attack #attack
next next
Clone 370622
Krosan Cloudscraper 109684
#block #block
next next
#damage #damage
@@ -26,8 +26,8 @@ eot
[ASSERT] [ASSERT]
UNTAP UNTAP
[PLAYER1] [PLAYER1]
inplay:Krosan Cloudscraper, Clone inplay:109684, 370622
graveyard:Dragonlord Kolaghan, Living Death graveyard:Dragonlord Kolaghan, Living Death
[PLAYER2] [PLAYER2]
life:1 life:1
[END] [END]

View File

@@ -10,6 +10,8 @@ graveyard:White Knight,Glorious Anthem
library:White Knight,Glorious Anthem,Grizzly Bears library:White Knight,Glorious Anthem,Grizzly Bears
[DO] [DO]
Haunting Echoes Haunting Echoes
choice 0
p2
next next
goto firstmain goto firstmain
[ASSERT] [ASSERT]

View File

@@ -7795,7 +7795,7 @@ const string AEquip::getMenuText()
int AEquip::testDestroy() int AEquip::testDestroy()
{ {
if (source->target && !game->isInPlay(source->target)) if (source->target && !game->isInPlay(source->target))
unequip(); //unequip();//testfix for equipment when the card it equip moves to other battlefield
if (!game->connectRule) if (!game->connectRule)
{ {
if (source->target && TargetAbility::tc && !TargetAbility::tc->canTarget((Targetable *)source->target,true)) if (source->target && TargetAbility::tc && !TargetAbility::tc->canTarget((Targetable *)source->target,true))

View File

@@ -773,9 +773,9 @@ void GameObserver::gameStateBasedEffects()
//////////////////////////////////////////////////// ////////////////////////////////////////////////////
//Unattach Equipments that dont have valid targets// //Unattach Equipments that dont have valid targets//
//////////////////////////////////////////////////// ////////////////////////////////////////////////////
if ((card->target) && card->hasType(Subtypes::TYPE_EQUIPMENT)) if (!card->isCreature() && card->hasType(Subtypes::TYPE_EQUIPMENT))
{ {
if(card->target && isInPlay(card->target) && (card->target)->protectedAgainst(card))//protection from quality if(isInPlay(card))
{ {
for (size_t i = 1; i < mLayers->actionLayer()->mObjects.size(); i++) for (size_t i = 1; i < mLayers->actionLayer()->mObjects.size(); i++)
{ {
@@ -783,7 +783,14 @@ void GameObserver::gameStateBasedEffects()
AEquip * eq = dynamic_cast<AEquip*> (a); AEquip * eq = dynamic_cast<AEquip*> (a);
if (eq && eq->source == card) if (eq && eq->source == card)
{ {
((AEquip*)a)->unequip(); if(card->target)//unattach equipments from cards that has protection from quality ex. protection from artifacts
{
if((card->target)->protectedAgainst(card))
((AEquip*)a)->unequip();
}
if(card->controller())
((AEquip*)a)->getActionTc()->Owner = card->controller();
//fix for equip ability when the equipment changed controller...
} }
} }
} }