Help with Worldslayer

Posted:
22 Dec 2013, 21:28
by otakusensei
I haven't found
Worldslayer in any of the card packs this time around, so I'm trying to add it. I'm pretty green on making cards, but I was able to take a world slayer from 2013, update the image, update the equip function but got totally lost on the trigger. I tried to include what I have already, but the forum won't let me upload the code because it says I'm too new and it apparently makes my post look spammy. Lovely.
Thanks
Re: Help with Worldslayer

Posted:
23 Dec 2013, 00:11
by RiiakShiNal
The trigger would essentially trigger off of SOURCE_DEALS_DAMAGE_TO_PLAYER then check that the source is the parent creature (and not nil) and that the damage is combat damage with Damage():IsCombat() so it would look something like this:
- Code: Select all
<TRIGGER value="SOURCE_DEALS_DAMAGE_TO_PLAYER">
return (EffectSource() ~= nil) and (EffectSource():GetParent() ~= nil) and (Damage() ~= nil) and
(Damage():GetSource() == EffectSource():GetParent()) and (Damage():GetAmount() > 0) and
(Damage():IsCombat())
</TRIGGER>
As for not being able to post code, you should be able to once you reach 5 posts. It is a precaution to try and stop spam bots though it can prove frustrating for new users until they reach the required number of posts.
Re: Help with Worldslayer

Posted:
23 Dec 2013, 03:36
by otakusensei
Ok, I think I follow the trigger. Thank you!
I then have it building a filter for all Artifact, Creature, Enchantment and Land cards. I'm building it type by type, if there a way to just have it filter permanents?
For the RESOLUTION_TIME_ACTION I have it FilteredCard():Destroy(), if that looks right.
I wish I could just post it, I understand the reasoning and I'll just keep talking about it till I can post it.
Re: Help with Worldslayer

Posted:
23 Dec 2013, 10:16
by thefiremind
NeoAnderson wrote:Another way is to use :
- Code: Select all
<FILTER filter_id="0">
local filter = ClearFilter()
filter:Add( FE_IS_PERMANENT, true )
</FILTER>
Note that this also includes cards with no types. This is due to the fact that, according to Magic rules, a permanent that loses all types still counts as a permanent. Modders sometimes need to implement rules through invisible tokens, which are made invisible by giving them no types, and should never leave the battlefield during the duel. They usually have indestructible, so as long as you destroy this isn't a problem, but keep it in mind in case you need to exile or return to hand all permanents.
Re: Help with Worldslayer

Posted:
23 Dec 2013, 10:35
by sumomole
thefiremind wrote:This is due to the fact that, according to Magic rules, a permanent that loses all types still counts as a permanent.
Permanent loses all types and colors, may be used to code Phasing?

Re: Help with Worldslayer

Posted:
23 Dec 2013, 11:01
by NeoAnderson
thefiremind wrote:NeoAnderson wrote:Another way is to use :
- Code: Select all
<FILTER filter_id="0">
local filter = ClearFilter()
filter:Add( FE_IS_PERMANENT, true )
</FILTER>
Note that this also includes cards with no types. This is due to the fact that, according to Magic rules, a permanent that loses all types still counts as a permanent. Modders sometimes need to implement rules through invisible tokens, which are made invisible by giving them no types, and should never leave the battlefield during the duel. They usually have indestructible, so as long as you destroy this isn't a problem, but keep it in mind in case you need to exile or return to hand all permanents.
Noted and useful as always,
sumomole wrote:Permanent loses all types and colors, may be used to code Phasing?

I was wondering why there is a "CHARACTERISTIC_PHASING" if they haven't coded this ability.

Re: Help with Worldslayer

Posted:
23 Dec 2013, 11:20
by thefiremind
sumomole wrote:Permanent loses all types and colors, may be used to code Phasing?

What about devotion count?

NeoAnderson wrote:I was wondering why there is a "CHARACTERISTIC_PHASING" if they haven't coded this ability.

It's a placeholder. The developers added all the characteristics they could think about, but not all of them work.
Re: Help with Worldslayer

Posted:
23 Dec 2013, 11:51
by sumomole
thefiremind wrote:sumomole wrote:Permanent loses all types and colors, may be used to code Phasing?

What about devotion count?

Does devotion count include permanent that has phased out? If not, we can use five permanent types instead of FE_IS_PERMANENT.

Re: Help with Worldslayer

Posted:
23 Dec 2013, 12:10
by thefiremind
sumomole wrote:thefiremind wrote:sumomole wrote:Permanent loses all types and colors, may be used to code Phasing?

What about devotion count?

Does devotion count include permanent that has phased out? If not, we can use five permanent types instead of FE_IS_PERMANENT.

OK and what about a
Festering Newt giving -4/-4 because of a phased-out
Bogbrew Witch?
Re: Help with Worldslayer

Posted:
23 Dec 2013, 12:28
by sumomole
Can make
Bogbrew Witch becomes a copy of a card without types, colors, and name until it phased in, like your transform cards? Seems more and more trouble.

Re: Help with Worldslayer

Posted:
23 Dec 2013, 14:55
by thefiremind
sumomole wrote:Seems more and more trouble.

I agree, in fact I wouldn't even start troubling myself for an old complicated mechanic like phasing. If you want to try, then go ahead.

Re: Help with Worldslayer

Posted:
23 Dec 2013, 15:00
by GrovyleXShinyCelebi
I would try to make phasing if I know EXACTLY what does "treated as though it doesn't exist" mean in Magic terms, as in card interactions and stuff. Does that mean that it's made invisible with no attributes whatsoever, or is there anything else that needs to be done with it?
Re: Help with Worldslayer

Posted:
24 Dec 2013, 00:25
by otakusensei
Thanks for the example card. I did have a problem testing it first though because the equip action was being called as a static action and closed as an activated one. Fixed that and I'm testing now. Could be a bit.
Edit - Works perfectly!