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
#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]
name=Barbarian Outcast
auto=aslongas(swamp|myBattlefield) moveTo(mygraveyard) <1
auto=@movedTo(swamp|graveyard,exile,library,hand) from(myBattlefield):aslongas(swamp|myBattlefield) moveTo(mygraveyard) <1
auto=aslongas(swamp|myBattlefield) all(this) sacrifice while <1
text=When you control no Swamps, sacrifice Barbarian Outcast.
mana={1}{R}
type=Creature
@@ -22178,7 +22177,7 @@ toughness=2
[card]
name=Covetous Dragon
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.
mana={4}{R}
type=Creature
@@ -50629,8 +50628,9 @@ toughness=2
[/card]
[card]
name=Haunting Echoes
auto=all(*[-basic]|opponentgraveyard) transforms((,newability[moveTo(exile) all(*[share!name!]|mylibrary)])) ueot
auto=moveTo(exile) all(*[-basic]|opponentgraveyard)
target=player
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.
mana={3}{B}{B}
type=Sorcery
@@ -66368,7 +66368,7 @@ type=Instant
[/card]
[card]
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.
mana={3}
type=Artifact Creature
@@ -82327,7 +82327,8 @@ toughness=1
[/card]
[card]
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."
mana={1}{U}
type=Creature
@@ -98380,7 +98381,8 @@ type=Land
[card]
name=Serendib Djinn
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.
mana={2}{U}{U}
type=Creature
@@ -112387,7 +112389,7 @@ type=Instant
[card]
name=Sylvan Primordial
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.
mana={5}{G}{G}
type=Creature
@@ -125411,7 +125413,7 @@ toughness=2
[card]
name=Voodoo Doll
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}=) {2}{T}:damage:1 target(creature,player)
auto=this(counter{0/0.2.Pin}=) {4}{T}:damage:2 target(creature,player)
@@ -128009,7 +128011,7 @@ toughness=*
[/card]
[card]
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)
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

View File

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

View File

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

View File

@@ -7795,7 +7795,7 @@ const string AEquip::getMenuText()
int AEquip::testDestroy()
{
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 (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//
////////////////////////////////////////////////////
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++)
{
@@ -783,7 +783,14 @@ void GameObserver::gameStateBasedEffects()
AEquip * eq = dynamic_cast<AEquip*> (a);
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...
}
}
}