Card Coding Enhancement (Wagic 0.18.*)

For all your questions regarding Image Card Coding.
Please read the Image Posting Guideline & Index before posting in this forum.
Forum rules
DO NOT POST BUG REPORT IN THIS FORUM !!

Please read carefully the forum rules related to the card coding section : viewtopic.php?f=21&t=1545

All post will be edited to follow forum rules.
Locked
kevlahnota
Posts: 619
Joined: Tue Feb 08, 2011 3:00 pm
Location: Philippines
Contact:

Card Coding Enhancement (Wagic 0.18.*)

Post by kevlahnota »

Hi, I will post some card enhancement in this thread to make some cards works as it should(and a lot of cards in mtg.txt needs updating prior to the changes and added parser abilities)

I will try to make them work correctly with the best of my knowledge :lol:

anyway a good example is AEther Charge. it says whenever a beast enters the battlefield, you may have it deal 4 damage to target opponent. It means the damage comes from the beast not with AEther Charge because it says "it" (the beast). what if the beast has infect? the target opponent must be poisoned.

UPDATE 6: 4/27/2012 - GRAFT MECHANICS FIX - (11 cards + 3 other cards that needs optimization) :D :D :D :D :D :D

Code: Select all

[card]
name=Aphetto Grifter
#optimized the ability, much clear instruction.
auto={T(wizard|myBattlefield)}{T(wizard|myBattlefield)}:name(tap 2 untapped wizards) ability$!name(tap target permanent) target(*) tap!$ controller
text=Tap two untapped Wizards you control: Tap target permanent.
mana={2}{U}
type=Creature
subtype=Human Wizard
power=1
toughness=1
[/card]

[card]
name=Aphetto Vulture
#optimized trigger, ability put to stack then you may choose. we can now respond for an interrupt. this must be true for all other cards. 
abilities=flying
auto=@movedTo(graveyard) from(this|battlefield):name(reclaim) ability$!may name(reclaim a zombie) moveto(mylibrary) notatarget(zombie|mygraveyard)!$ controller
text=Flying -- When Aphetto Vulture dies, you may put target Zombie card from your graveyard on top of your library.
mana={4}{B}{B}
type=Creature
subtype=Zombie Bird
power=3
toughness=2
[/card]

[card]
name=Aphotic Wisps
#typo must be controller not comtroller
target=creature
auto=fear
auto=transforms((,black)) ueot
auto=draw:1 controller
text=Target creature becomes black and gains fear until end of turn. (It can't be blocked except by artifact creatures and/or black creatures.) -- Draw a card.
mana={B}
type=Instant
[/card]

####---optimized and fixed graft abilities and TESTED. the old code always trigger even with no 1/1 counters and has annoying pop up---####


[card]
name=Aquastrand Spider
auto=counter(1/1,2)
auto=this(counter{1/1.1}>0) transforms((,newability[@movedto(other creature|battlefield):may name(move 1/1 counter) all(trigger) counter(1/1.1) && counter(1/1.-1) all(this)]))
auto={G}:reach target(creature[counter{1/1.1}])
text=Graft 2 (This creature enters the battlefield with two +1/+1 counters on it. Whenever another creature enters the battlefield, you may move a +1/+1 counter from this creature onto it.) -- {G}: Target creature with a +1/+1 counter on it gains reach until end of turn. (It can block creatures with flying.)
mana={1}{G}
type=Creature
subtype=Spider Mutant
power=0
toughness=0
[/card]

[card]
name=Cytoplast Root-Kin
auto=counter(1/1,4)
auto=this(counter{1/1.1}>0) transforms((,newability[@movedto(other creature|battlefield):may name(move 1/1 counter) all(trigger) counter(1/1.1) && counter(1/1.-1) all(this)]))
auto=counter(1/1,1) all(other creature[counter{1/1.1}]|myBattlefield)
auto={2}:counter(1/1,-1) target(creature[counter{1/1.1}]|myBattlefield) && counter(1/1,1) all(this)
text=Graft 4 (This creature enters the battlefield with four +1/+1 counters on it. Whenever another creature enters the battlefield, you may move a +1/+1 counter from this creature onto it.) -- When Cytoplast Root-Kin enters the battlefield, put a +1/+1 counter on each other creature you control that has a +1/+1 counter on it. -- {2}: Move a +1/+1 counter from target creature you control onto Cytoplast Root-Kin.
mana={2}{G}{G}
type=Creature
subtype=Elemental Mutant
power=0
toughness=0
[/card]

[card]
name=Cytospawn Shambler
auto=counter(1/1,6)
auto=this(counter{1/1.1}>0) transforms((,newability[@movedto(other creature|battlefield):may name(move 1/1 counter) all(trigger) counter(1/1.1) && counter(1/1.-1) all(this)]))
auto={G}:trample target(creature[counter{1/1.1}])
text=Graft 6 (This creature enters the battlefield with six +1/+1 counters on it. Whenever another creature enters the battlefield, you may move a +1/+1 counter from this creature onto it.) -- {G}: Target creature with a +1/+1 counter on it gains trample until end of turn.
mana={6}{G}
type=Creature
subtype=Elemental Mutant
power=0
toughness=0
[/card]

[card]
name=Helium Squirter
auto=counter(1/1,3)
auto=this(counter{1/1.1}>0) transforms((,newability[@movedto(other creature|battlefield):may name(move 1/1 counter) all(trigger) counter(1/1.1) && counter(1/1.-1) all(this)]))
auto={1}:flying target(creature[counter{1/1.1}])
text=Graft 3 (This creature enters the battlefield with three +1/+1 counters on it. Whenever another creature enters the battlefield, you may move a +1/+1 counter from this creature onto it.) -- {1}: Target creature with a +1/+1 counter on it gains flying until end of turn.
mana={4}{U}
type=Creature
subtype=Beast Mutant
power=0
toughness=0
[/card]

[card]
name=Novijen Sages
auto=counter(1/1,4)
auto=this(counter{1/1.1}>0) transforms((,newability[@movedto(other creature|battlefield):may name(move 1/1 counter) all(trigger) counter(1/1.1) && counter(1/1.-1) all(this)]))
auto={1}{C(1/1,-1),creature|mybattlefield}{C(1/1,-1),creature|mybattlefield}:draw:1 controller
text=Graft 4 (This creature enters the battlefield with four +1/+1 counters on it. Whenever another creature enters the battlefield, you may move a +1/+1 counter from this creature onto it.) -- {1}, Remove two +1/+1 counters from among creatures you control: Draw a card.
mana={4}{U}{U}
type=Creature
subtype=Human Advisor Mutant
power=0
toughness=0
[/card]

[card]
name=Plaxcaster Frogling
auto=counter(1/1,3)
auto={2}:shroud target(creature[counter{1/1.1}])
auto=this(counter{1/1.1}>0) transforms((,newability[@movedto(other creature|battlefield):may name(move 1/1 counter) all(trigger) counter(1/1.1) && counter(1/1.-1) all(this)]))
text=Graft 3 (This creature enters the battlefield with three +1/+1 counters on it. Whenever another creature enters the battlefield, you may move a +1/+1 counter from this creature onto it.) -- {2}: Target creature with a +1/+1 counter on it gains shroud until end of turn. (It can't be the target of spells or abilities.)
mana={1}{G}{U}
type=Creature
subtype=Frog Mutant
power=0
toughness=0
[/card]

[card]
name=Simic Basilisk
auto=counter(1/1,3)
auto=this(counter{1/1.1}>0) transforms((,newability[@movedto(other creature|battlefield):may name(move 1/1 counter) all(trigger) counter(1/1.1) && counter(1/1.-1) all(this)]))
auto={1}{G}:target(creature[counter{1/1.1}]) transforms((,newability[auto=@combatdamaged(creature) from(this):all(trigger[to]) phaseaction[combatends once] destroy])) ueot
text=Graft 3 (This creature enters the battlefield with three +1/+1 counters on it. Whenever another creature enters the battlefield, you may move a +1/+1 counter from this creature onto it.) -- {1}{G}: Until end of turn, target creature with a +1/+1 counter on it gains "Whenever this creature deals combat damage to a creature, destroy that creature at end of combat."
mana={4}{G}{G}
type=Creature
subtype=Basilisk Mutant
power=0
toughness=0
[/card]

[card]
name=Simic Initiate
text=Graft 1 (This creature enters the battlefield with a +1/+1 counter on it. Whenever another creature enters the battlefield, you may move a +1/+1 counter from this creature onto it.)
auto=counter(1/1,1)
auto=this(counter{1/1.1}>0) transforms((,newability[@movedto(other creature|battlefield):may name(move 1/1 counter) all(trigger) counter(1/1.1) && counter(1/1.-1) all(this)]))
mana={G}
type=Creature
subtype=Human Mutant
power=0
toughness=0
[/card]

[card]
name=Sporeback Troll
auto=counter(1/1,2)
auto=this(counter{1/1.1}>0) transforms((,newability[@movedto(other creature|battlefield):may name(move 1/1 counter) all(trigger) counter(1/1.1) && counter(1/1.-1) all(this)]))
auto={1}{G}:regenerate target(creature[counter{1/1.1}])
text=Graft 2 (This creature enters the battlefield with two +1/+1 counters on it. Whenever another creature enters the battlefield, you may move a +1/+1 counter from this creature onto it.) -- {1}{G}: Regenerate target creature with a +1/+1 counter on it.
mana={3}{G}
type=Creature
subtype=Human Mutant
power=0
toughness=0
[/card]

[card]
name=Vigean Graftmage
auto=counter(1/1,2)
auto=this(counter{1/1.1}>0) transforms((,newability[@movedto(other creature|battlefield):may name(move 1/1 counter) all(trigger) counter(1/1.1) && counter(1/1.-1) all(this)]))
auto={1}{U}:untap target(creature[counter{1/1.1}])
text=Graft 2 (This creature enters the battlefield with two +1/+1 counters on it. Whenever another creature enters the battlefield, you may move a +1/+1 counter from this creature onto it.) -- {1}{U}: Untap target creature with a +1/+1 counter on it.
mana={2}{U}
type=Creature
subtype=Vedalken Wizard Mutant
power=0
toughness=0
[/card]

[card]
name=Vigean Hydropon
abilities=cantattack,cantblock
auto=counter(1/1,5)
auto=this(counter{1/1.1}>0) transforms((,newability[@movedto(other creature|battlefield):may name(move 1/1 counter) all(trigger) counter(1/1.1) && counter(1/1.-1) all(this)]))
text=Graft 5 (This creature enters the battlefield with five +1/+1 counters on it. Whenever another creature enters the battlefield, you may move a +1/+1 counter from this creature onto it.) -- Vigean Hydropon can't attack or block.
mana={1}{G}{U}
type=Creature
subtype=Plant Mutant
power=0
toughness=0
[/card]

UPDATE 5: Additional card fixes. 4/26/2012 :D :D :D :D :D

Code: Select all

[card]
name=Amnesia
#added the name so it will not display 0/0
target=player
auto=name(look) target(*|targetedpersonshand) 0/0
auto=reject all(*[-land]|targetedpersonshand)
text=Target player reveals his or her hand and discards all nonland cards.
mana={3}{U}{U}{U}
type=Sorcery
[/card]

[card]
name=Amrou Scout
#fix for free look when searching library
auto={4}{T}:name(search a rebel) ability$!moveTo(myBattlefield) target(rebel[manacost<=3]|mylibrary)!$ controller
text={4}, {T}: Search your library for a Rebel permanent card with converted mana cost 3 or less and put it onto the battlefield. Then shuffle your library.
mana={1}{W}
type=Creature
subtype=Kithkin Rebel Scout
power=2
toughness=1
[/card]

[card]
name=Amulet of Unmaking
auto={5}{T}{E}:name(exile) ability$!name(exile target) moveTo(exile) target(artifact,creature,land)!$ controller asSorcery
text={5}, {T}, Exile Amulet of Unmaking: Exile target artifact, creature, or land. Activate this ability only any time you could cast a sorcery.
mana={5}
type=Artifact
[/card]

[card]
name=Anathemancer
#the first ability is targeted, so you have no choice but to target yourself if the opponent has shroud
auto=name(choose target player) target(player) damage:type:land[-basic]:targetedpersonsbattlefield
autograveyard={5}{B}{R}:name(unearth) moveto(mybattlefield) && transforms((,unearth,haste)) asSorcery forever
text=When Anathemancer enters the battlefield, it deals damage to target player equal to the number of nonbasic lands that player controls. -- Unearth {5}{B}{R} ({5}{B}{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={1}{B}{R}
type=Creature
subtype=Zombie Wizard
power=2
toughness=2
[/card]

[card]
name=Anvil of Bogardan
#this is not yet optimized, but it works without the popup during opponents draw phase
abilities=nomaxhand
auto=lord(*|opponentlibrary,opponenthand) nomaxhand
auto=@each my draw: name(additional draw) draw:1 controller && transforms((,newability[ability$!name(discard a card) target(*|myhand) reject!$ controller])) ueot
auto=@each opponent draw: name(additional draw) draw:1 opponent && transforms((,newability[ability$!name(discard a card) target(*|myhand) reject!$ opponent])) ueot
text=Players have no maximum hand size. -- At the beginning of each player's draw step, that player draws an additional card, then discards a card.
mana={2}
type=Artifact
[/card]

UPDATE 4: card fixes. just read the comments # :D :D :D :D

Code: Select all

[card]
name=Afiya Grove
#Afiya Grove must be sacrificed in the event there are no counters on it, not only during upkeep.
auto=counter(1/1,3)
auto=@each my upkeep:choice counter(1/1,1) target(creature) && counter(1/1,-1) all(this)
auto=this(counter{1/1}<1)while sacrifice
text=Afiya Grove enters the battlefield with three +1/+1 counters on it. -- At the beginning of your upkeep, move a +1/+1 counter from Afiya Grove onto target creature. -- When Afiya Grove has no +1/+1 counters on it, sacrifice it.
mana={1}{G}
type=Enchantment
[/card]

[card]
name=Agonizing Memories
#must be targetedpersonslibrary not opponentlibrary
target=player
auto=target(<2>*|targetedpersonshand) moveTo(targetedpersonslibrary)
text=Look at target player's hand and choose two cards from it. Put them on top of that player's library in any order.
mana={2}{B}{B}
type=Sorcery
[/card]

[card]
name=Agrus Kos, Wojek Veteran
#same with battle cry, this gives correct bonuses if there are other creatures with battleready
auto=this(attacking) lord(creature[red;attacking]) 2/0 ueot
auto=this(attacking) lord(creature[white;attacking]) 0/2 ueot
text=Whenever Agrus Kos, Wojek Veteran attacks, attacking red creatures get +2/+0 and attacking white creatures get +0/+2 until end of turn.
mana={3}{R}{W}
type=Legendary Creature
subtype=Human Soldier
power=3
toughness=3
[/card]

[card]
name=Akoum Battlesinger
abilities=haste
auto=may all(ally|myBattlefield) 1/0 ueot
auto=@movedTo(other ally|myBattlefield):may all(ally|myBattlefield) 1/0 ueot
text=Haste -- Whenever Akoum Battlesinger or another Ally enters the battlefield under your control, you may have Ally creatures you control get +1/+0 until end of turn.
mana={1}{R}
type=Creature
subtype=Human Berserker Ally
power=1
toughness=1
[/card]

[card]
name=Akroma's Blessing
#optimized version
auto=chooseacolor all(creature|mybattlefield) protection from(*[chosencolor]) ueot chooseend
autohand=__CYCLING__({W})
text=Creatures you control gain protection from the color of your choice until end of turn. -- Cycling {W} ({W}, Discard this card: Draw a card.)
mana={2}{W}
type=Instant
[/card]

[card]
name=Aku Djinn
abilities=trample
auto=@each my upkeep restriction{type(creature|opponentbattlefield)~morethan~0}:all(creature|opponentBattlefield) counter(1/1,1)
text=Trample -- At the beginning of your upkeep, put a +1/+1 counter on each creature each opponent controls.
mana={3}{B}{B}
type=Creature
subtype=Djinn
power=5
toughness=6
[/card]

[card]
name=Akuta, Born of Ash
#sacrifice a swamp first before putting Akuta in play, the * in the sacrificed section is just to make sure
#that after sacrificing a swamp that is a transformed land(plains that becomes a swamp,etc) the ability will still push. 
abilities=haste
autograveyard=@each my upkeep restriction{type(*|myhand)~morethan~type(*|opponenthand),type(swamp|mybattlefield)~morethan~0}:may name(reanimate) transforms((,newability[@sacrificed(*) source(this):moveto(mybattlefield)],newability[sacrifice notatarget(swamp|mybattlefield)])) oneshot
text=Haste -- At the beginning of your upkeep, if you have more cards in hand than each opponent, you may sacrifice a Swamp. If you do, return Akuta, Born of Ash from your graveyard to the battlefield.
mana={2}{B}{B}
type=Legendary Creature
subtype=Spirit
power=3
toughness=2
[/card]

[card]
name=Allied Strategies
#targetedplayer correction, also it must be basic land.
target=player
auto=if type(plains[basic]|targetedpersonsbattlefield)~morethan~0 then draw:1 targetedplayer
auto=if type(island[basic]|targetedpersonsbattlefield)~morethan~0 then draw:1 targetedplayer
auto=if type(mountain[basic]|targetedpersonsbattlefield)~morethan~0 then draw:1 targetedplayer
auto=if type(swamp[basic]|targetedpersonsbattlefield)~morethan~0 then draw:1 targetedplayer
auto=if type(forest[basic]|targetedpersonsbattlefield)~morethan~0 then draw:1 targetedplayer
text=Domain - Target player draws a card for each basic land type among lands he or she controls.
mana={4}{U}
type=Sorcery
[/card]
UPDATE 3 ---- BATTLE CRY MECHANIC FIX(gives correct bonus to all other attacking creatures!): :D :D :D

Code: Select all

[card]
name=Accorder Paladin
auto=this(attacking) lord(other creature[attacking]) 1/0 ueot
text=Battle cry (Whenever this creature attacks, each other attacking creature gets +1/+0 until end of turn.)
mana={1}{W}
type=Creature
subtype=Human Knight
power=3
toughness=1
[/card]

[card]
name=Goblin Wardriver
auto=this(attacking) lord(other creature[attacking]) 1/0 ueot
text=Battle cry (Whenever this creature attacks, each other attacking creature gets +1/+0 until end of turn.)
mana={R}{R}
type=Creature
subtype=Goblin Warrior
power=2
toughness=2
[/card]

[card]
name=Hero of Bladehold
auto=this(attacking) lord(other creature[attacking]) 1/0 ueot
auto=@combat(attacking) source(this):token(Soldier,Creature Soldier,1/1,white,battleready)*2
text=Battle cry (Whenever this creature attacks, each other attacking creature gets +1/+0 until end of turn.) -- Whenever Hero of Bladehold attacks, put two 1/1 white soldier creature tokens onto the battlefield tapped and attacking.
mana={2}{W}{W}
type=Creature
subtype=Human Knight
power=3
toughness=4
[/card]

[card]
name=Hero of Oxid Ridge
abilities=haste
auto=this(attacking) lord(other creature[attacking]) 1/0 ueot
auto=this(attacking) lord(creature[power<=1]) cantblock ueot
text=Haste -- Battle cry (Whenever this creature attacks, each other attacking creature gets +1/+0 until end of turn.) -- Whenever Hero of Oxid Ridge attacks, creatures with power 1 or less can't block this turn.
mana={2}{R}{R}
type=Creature
subtype=Human Knight
power=4
toughness=2
[/card]

[card]
name=Kuldotha Ringleader
abilities=mustattack
auto=this(attacking) lord(other creature[attacking]) 1/0 ueot
text=Battle cry (Whenever this creature attacks, each other attacking creature gets +1/+0 until end of turn.) -- Kuldotha Ringleader attacks each turn if able.
mana={4}{R}
type=Creature
subtype=Ogre Warrior
power=4
toughness=4
[/card]

[card]
name=Loxodon Partisan
auto=this(attacking) lord(other creature[attacking]) 1/0 ueot
text=Battle cry (Whenever this creature attacks, each other attacking creature gets +1/+0 until end of turn.)
mana={4}{W}
type=Creature
subtype=Elephant Soldier
power=3
toughness=4
[/card]

[card]
name=Signal Pest
auto=this(attacking) lord(other creature[attacking]) 1/0 ueot
auto=cantbeblockedby(creature[-flying;-reach])
text=Battle cry (Whenever this creature attacks, each other attacking creature gets +1/+0 until end of turn.) -- Signal Pest can't be blocked except by creatures with flying or reach.
mana={1}
type=Artifact Creature
subtype=Pest
power=0
toughness=1
[/card]
UPDATE 2: :D :D

Code: Select all

[card]
name=AEther Spellbomb
auto={U}{S}:ability$!moveTo(ownerhand) target(creature)!$ controller
auto={1}{S}:draw:1
text={U}, Sacrifice AEther Spellbomb: Return target creature to its owner's hand. -- {1}, Sacrifice AEther Spellbomb: Draw a card.
mana={1}
type=Artifact
[/card]

[card]
name=AEther Sting
auto=@movedTo(creature|opponentstack):damage:1 opponent
text=Whenever an opponent casts a creature spell, AEther Sting deals 1 damage to that player.
mana={3}{R}
type=Enchantment
[/card]

[card]
name=AEthersnipe
other={1}{U}{U} name(Evoke)
auto=ability$!moveTo(ownerhand) target(*[-land])!$ controller
auto=alternative sacrifice
text=When AEthersnipe enters the battlefield, return target nonland permanent to its owner's hand. -- Evoke {1}{U}{U} (You may cast this spell for its evoke cost. If you do, it's sacrificed when it enters the battlefield.)
mana={5}{U}
type=Creature
subtype=Elemental
power=4
toughness=4
[/card]

[card]
name=Abduction
target=creature
alias=1194
auto=untap
auto=@movedTo(mytgt|graveyard) from(battlefield):all(trigger[to]) moveTo(ownerbattlefield)
text=Enchant creature -- When Abduction enters the battlefield, untap enchanted creature. -- You control enchanted creature. -- When enchanted creature is put into a graveyard, return that card to the battlefield under its owner's control.
mana={2}{U}{U}
type=Enchantment
subtype=Aura
[/card]

[card]
name=Aboshan, Cephalid Emperor
auto={T(cephalid|myBattlefield)}:name(tap an untapped Cephalid) ability$!name(tap target permanent) target(*) tap!$ controller
auto={U}{U}{U}:name(tap all creatures without flying) tap all(creature[-flying])
text=Tap an untapped Cephalid you control: Tap target permanent. -- {U}{U}{U}: Tap all creatures without flying.
mana={4}{U}{U}
type=Legendary Creature
subtype=Cephalid
power=3
toughness=3
[/card]

[card]
name=Abuna Acolyte
auto={T}:name(prevent the next 1 damage) prevent:1 target(creature,player)
auto={T}:name(prevent the next 2 damage) prevent:2 target(creature[artifact])
text={T}: Prevent the next 1 damage that would be dealt to target creature or player this turn. -- {T}: Prevent the next 2 damage that would be dealt to target artifact creature this turn.
mana={1}{W}
type=Creature
subtype=Cat Cleric
power=1
toughness=1
[/card]

[card]
name=Abyssal Hunter
auto={B}{T}:name(tap target creature) target(creature) tap && dynamicability<!powerstrike!>
text={B}, {T}: Tap target creature. Abyssal Hunter deals damage equal to Abyssal Hunter's power to that creature.
mana={3}{B}
type=Creature
subtype=Human Assassin
power=1
toughness=1
[/card]

[card]
name=Academy Researchers
auto=may name(attach an aura) target(aura|myhand) newtarget
text=When Academy Researchers enters the battlefield, you may put an Aura card from your hand onto the battlefield attached to Academy Researchers.
mana={1}{U}{U}
type=Creature
subtype=Human Wizard
power=2
toughness=2
[/card]

UPDATE 1: :D

Code: Select all

[card]
name=AEther Adept
auto=ability$!moveTo(ownerhand) target(creature)!$ controller
text=When AEther Adept enters the battlefield, return target creature to its owner's hand.
mana={1}{U}{U}
type=Creature
subtype=Human Wizard
power=2
toughness=2
[/card]

[card]
name=AEther Charge
#AEther charge is targeted and the damage comes from the beast, if the beast creature has infect, the opponent must be poisoned and this one works correctly.
auto=@movedTo(beast|myBattlefield):all(trigger[to]) transforms((,newability[may damage:4 target(opponent)]))
text=Whenever a Beast enters the battlefield under your control, you may have it deal 4 damage to target opponent.
mana={4}{R}
type=Enchantment
[/card]

[card]
name=AEther Vial
auto=@each my upkeep:may counter(0/0.1.Charge)
auto={T}:moveTo(myBattlefield) notatarget(creature[manacost=counter{0%0.1.Charge}]|myhand)
text=At the beginning of your upkeep, you may put a charge counter on AEther Vial. -- {T}: You may put a creature card with converted mana cost equal to the number of charge counters on AEther Vial from your hand onto the battlefield.
mana={1}
type=Artifact
[/card]

[card]
name=Armament Master
auto=thisforeach(gear) lord(other creature[kor]|myBattlefield) 2/2
text=Other Kor creatures you control get +2/+2 for each Equipment attached to Armament Master.
mana={W}{W}
type=Creature
subtype=Kor Soldier
power=2
toughness=2
[/card]

[card]
name=Abandoned Outpost
auto=tap
auto={T}:Add {W}
auto={T}{S}:name(add 1 mana of any color) activatechooseacolor add{chosencolor} activatechooseend
text=Abandoned Outpost enters the battlefield tapped. -- {T}: Add {W} to your mana pool. -- {T}, Sacrifice Abandoned Outpost: Add one mana of any color to your mana pool.
type=Land
[/card]
Last edited by kevlahnota on Fri Apr 27, 2012 4:47 am, edited 3 times in total.
kevlahnota
Posts: 619
Joined: Tue Feb 08, 2011 3:00 pm
Location: Philippines
Contact:

Re: Card Coding Enhancement (Wagic 0.18.*)

Post by kevlahnota »

update 3 fixes battle cry mechanics. Because the old code triggers once and affects all creatures that it see excluding other creatures that will be put in play. example 2 hero of bladehold and Geist of Saint Traft attacks, you will see the incorrect bonus of the old code.
kevlahnota
Posts: 619
Joined: Tue Feb 08, 2011 3:00 pm
Location: Philippines
Contact:

Re: Card Coding Enhancement (Wagic 0.18.*)

Post by kevlahnota »

UPDATE 6 includes graft mechanic fixes. :mrgreen:
Zethfox
Posts: 3029
Joined: Thu Jun 10, 2010 11:28 pm

Re: Card Coding Enhancement (Wagic 0.18.*)

Post by Zethfox »

kevla, please make sure that what you are adding isn't already in the game....
every card with aether infront you coded is already in a supported.
abduction is in and supported...and so on...
if there is a reason for a recode, then you need to have a good reason...don't just update code for the heck of updating...
in other words "if it aint broke, don't fix it"...
also
GRAFT MECHANICS FIX,
ok this one i will have to test out...i like this change.


Aphetto Grifter
we try to keep menutext limited to the actual ability produced, not the cost...
tapping the wizards is a cost and it will say it in the top half of the screen and with targetchooser shading....

this(attacking) lord(other creature[attacking])
this does not work the way you think it does.....
this() lord()
not a good combo back to back becuase the effect should end if suddenly whatever the "this" is is not valid....but it will not end until end of turn becuase the "lord" is treated as a oneshot ability by "this("

battlecry is correct in wagic, the bladeholder can be optimized to put token in play before battlecry trigger, unfortunately in wagic we do not support reordering triggers on the stack.
i don't like the battlecry fix, this will just produce unexpected bugs...when i added this descriptors for "attacking" and "blocking" it was originally for battlecry, and it was found to work incorrectly.

every card in UPDATE 2 is already in, unless you prvide a reason why the code needs to be changed this is un-needed.

@sacrificed(*)<---
"#sacrifice a swamp first before putting Akuta in play, the * in the sacrificed section is just to make sure
#that after sacrificing a swamp that is a transformed land(plains that becomes a swamp,etc) the ability will still push. "

..star means ANYCARD <--- as in a goblin token on the battlefield, a ability$! dummy on the stack, anything.....so this is an absolute no.
unless im totally off, what exactly was it doing wrong in current code?

Akoum Battlesinger, whats wrong with current version?

put target Zombie
do not use "notatarget(zombie)" this is a targeted effect and should use "target("

quick side note, if there is a "typo" fix for a card, don't put it in these sets, please report the typo in the bug section....
another note, we try to avoid empty triggered abilities as much as possible, but something you need to understand, in MTG triggers on phases are always supposed to hit the stack even if they have no valid targets...becuase of cards like flagbearers and redirects...just letting you know...we dont follow that 100% becuase we don't need to yet (flagbearer and redirect is not supported yet)
finally,
keep "name( short and sweet man...
name(prevent the next 1 damage) ===> name(prevent 1) if you are activating the ability of a card, you KNOW that the prevent 1 damage is normal...and name(prevent 2) would be for the artifacts....understand? short and sweet.
i actually get on doc over making abilitys like this

auto={t}:name(deal damage to the creature that has been in play for the start of this round with flying and firststrike and then tap the creature to make it go to the grave).......now my version====>name(Damage then tap and destroy)

i epic face palm everytime.

anyways i added some updates based on your card code versions, there are of course still a bunch more i have to go through, mostly the graft, i like that...
not sure i like battlecry change because i remember thats how we did it before and we ran into alot of bugs man....i *LOOKS* like it works...but trust me when i say it is not as it appears.
Toben
Posts: 50
Joined: Tue Oct 05, 2010 7:30 pm

Re: Card Coding Enhancement (Wagic 0.18.*)

Post by Toben »

Bumping this because those Graft improvements, which are great, neglected to include the card that needs the optimization the most. Here's the fix:

Code: Select all

[card]
name=Llanowar Reborn
auto=tap(noevent)
auto={T}:Add{G}
auto=counter(1/1,1)
auto=this(counter{1/1.1}>0) transforms((,newability[@movedto(creature|battlefield):may name(move 1/1 counter) all(trigger) counter(1/1.1) && counter(1/1.-1) all(this)]))
text=Llanowar Reborn enters the battlefield tapped. -- {T}: Add {G} to your mana pool. -- Graft 1 (This land enters the battlefield with a +1/+1 counter on it. Whenever a creature enters the battlefield, you may move a +1/+1 counter from this land onto it.)
type=Land
[/card]
Makes it 10,000% less annoying to play this card if it's not bugging you about moving counters when it doesn't have any counters on it.
Zethfox
Posts: 3029
Joined: Thu Jun 10, 2010 11:28 pm

Re: Card Coding Enhancement (Wagic 0.18.*)

Post by Zethfox »

really should move to 20.1
I added a million different abilities like reveal, scry, ect.
sandman423
Posts: 806
Joined: Thu Sep 10, 2009 8:59 pm

Re: Card Coding Enhancement (Wagic 0.18.*)

Post by sandman423 »

I would love to know where to get the latest Windows Wagic to test out latest cards and abilities if possible.
Locked