Comes into play effects on creatures

If you have a question about the git repository and the code, or if you have code to propose then please post in this forum.
Do not post request here.
Dr.Solomat
Posts: 975
Joined: Mon Dec 15, 2008 5:12 pm
Location: Germany

Comes into play effects on creatures

Post by Dr.Solomat »

Hi everybody,


i have finished the work on the VISIONS set (35 cards completely working in wagic), but i have a problem with
Nekrataal and Uktabi Orang-Utan. They don't work correctly an some do really weird things!


Nekrataal: It does not kill a creature when it comes into play! But i can tap it after it lost its summoning sickness to destroy a creature!


Uktabi Orang-Utan: It comes into play, but immediately kills itself rather than destroying an artifact! ....Manic depressions?? ^^


Who can halp me!? How should the "auto"-line be written??

Thanks
Sets Coded/Released: Legends, Visions, Weatherlight, Tempest, Stronghold, Portal I & III, Urza's Saga BLOCK, Mercadian Masques, Invasion BLOCK, Mirrodin, Ravnica, Guildpact, Conflux, Alara Reborn
Shishio
Posts: 64
Joined: Fri Dec 12, 2008 6:28 pm
Location: Zanesville, Oh

Re: Comes into play effects on creatures

Post by Shishio »

Show us your lines of code you use for the card bro
Dr.Solomat
Posts: 975
Joined: Mon Dec 15, 2008 5:12 pm
Location: Germany

Re: Comes into play effects on creatures

Post by Dr.Solomat »

[card]
text=First strike When Nekrataal comes into play, destroy target nonblack, nonartifact creature.
auto=destroy (creature[-black;-artifact])
id=...
name=Nekrataal
rarity=U
color=Black
type=Creature
mana={2}{B}{B}
power=2
subtype=Human Assassin
toughness=1
abilities=first strike
[/card]

whats the problem with the auto line? :?:
Sets Coded/Released: Legends, Visions, Weatherlight, Tempest, Stronghold, Portal I & III, Urza's Saga BLOCK, Mercadian Masques, Invasion BLOCK, Mirrodin, Ravnica, Guildpact, Conflux, Alara Reborn
Dr.Solomat
Posts: 975
Joined: Mon Dec 15, 2008 5:12 pm
Location: Germany

Re: Comes into play effects on creatures

Post by Dr.Solomat »

the auto line for Orang-Utanis


auto=destroy target (arifact)
Sets Coded/Released: Legends, Visions, Weatherlight, Tempest, Stronghold, Portal I & III, Urza's Saga BLOCK, Mercadian Masques, Invasion BLOCK, Mirrodin, Ravnica, Guildpact, Conflux, Alara Reborn
Shishio
Posts: 64
Joined: Fri Dec 12, 2008 6:28 pm
Location: Zanesville, Oh

Re: Comes into play effects on creatures

Post by Shishio »

The auto line is specifying that there is no cost for it's ability, making it sort of like a Royal Assassin.
Try putting a target= in there before the auto. I cannot guarentee this will work, but try Like this:
[card]
text=First strike When Nekrataal comes into play, destroy target nonblack, nonartifact creature.
target=creature[-black;-artifact]
auto=destroy
id=...
name=Nekrataal
rarity=U
color=Black
type=Creature
mana={2}{B}{B}
power=2
subtype=Human Assassin
toughness=1
abilities=first strike
[/card]
wololo
Site Admin
Posts: 3727
Joined: Wed Oct 15, 2008 12:42 am
Location: Japan

Re: Comes into play effects on creatures

Post by wololo »

most "when comes into play" actions don't work currently.
Your code looks correct, it's just that currently, the code doesn't make any difference between:

auto={0},{T}: do stuff
and
auto={0}: do stuff
and
auto={T}: do stuff
and
auto=do stuff

In other words, the code doesn't do any difference between a "come into play" ability and an activated ability with a cost of {0}
This will be improved eventually
Dr.Solomat
Posts: 975
Joined: Mon Dec 15, 2008 5:12 pm
Location: Germany

Re: Comes into play effects on creatures

Post by Dr.Solomat »

Hmmm,


maybe this could help!

the target=creature [-black;-atrifact] line could lead to a "one-time destroy effect" like in instants or sorceries..... :ugeek:
I will test it later!


Same thing for Uktabi??
Sets Coded/Released: Legends, Visions, Weatherlight, Tempest, Stronghold, Portal I & III, Urza's Saga BLOCK, Mercadian Masques, Invasion BLOCK, Mirrodin, Ravnica, Guildpact, Conflux, Alara Reborn
wololo
Site Admin
Posts: 3727
Joined: Wed Oct 15, 2008 12:42 am
Location: Japan

Re: Comes into play effects on creatures

Post by wololo »

Dr.Solomat wrote:Hmmm,


maybe this could help!

the target=creature [-black;-atrifact] line could lead to a "one-time destroy effect" like in instants or sorceries..... :ugeek:
I will test it later!
That would be incorrect. The "target=" line asks you to choose a target when you cast the spell.
Most effects that trigger "when comes into play" ask you to choose the target at that moment (just after the spell resolved, basically).
So this is slightly different
Dr.Solomat
Posts: 975
Joined: Mon Dec 15, 2008 5:12 pm
Location: Germany

Re: Comes into play effects on creatures

Post by Dr.Solomat »

Hi wololo,


well, I told you about Nekrataal and about Uktabi Orang-Utan!


But i didn't tell you about Man-o-War! :lol: A card with a comes-into-play-effect and a bounce-effect!
...and...i created it...by aliasing it with unsummon from the REVISED card.dat! It works!!!! But it is displayed totally crazy!

Step 1: I play Man-O-War, it then wants me to target a creature!
Step 2: Man-O-war comes in to play, the targeted creature goes to the hand,but it does not dissappear visually. That means: the targeted creature stays in play but cannot be used anymore (attcking, blocking,activating,lording).
Step 3: I end my turn! At the beginning of the next players turn, the "bounced" card now disappears visually, too!

If the formerly bounced creature is played again and comes into play, my Man-O-War changes position on the field: It gets positioned like an Aura to the creature it bounced before! :o BUT i still control Man-O-War (i can attack and block with it!) :shock:


:arrow: weird
Sets Coded/Released: Legends, Visions, Weatherlight, Tempest, Stronghold, Portal I & III, Urza's Saga BLOCK, Mercadian Masques, Invasion BLOCK, Mirrodin, Ravnica, Guildpact, Conflux, Alara Reborn
Dr.Solomat
Posts: 975
Joined: Mon Dec 15, 2008 5:12 pm
Location: Germany

Re: Comes into play effects on creatures

Post by Dr.Solomat »

wololo wrote:most "when comes into play" actions don't work currently.
Your code looks correct, it's just that currently, the code doesn't make any difference between:

auto={0},{T}: do stuff
and
auto={0}: do stuff
and
auto={T}: do stuff
and
auto=do stuff

In other words, the code doesn't do any difference between a "come into play" ability and an activated ability with a cost of {0}
This will be improved eventually

Okay, but why does VENERABLE MONK from Tenth edition work?? it gives the controller 2 life if it comes into play! And this card works correctly, i played it a lot before to test the effect!
Sets Coded/Released: Legends, Visions, Weatherlight, Tempest, Stronghold, Portal I & III, Urza's Saga BLOCK, Mercadian Masques, Invasion BLOCK, Mirrodin, Ravnica, Guildpact, Conflux, Alara Reborn
Post Reply