Board index
Programs with AI or Rules Enforcement
Magic: The Gathering - Duels of the Planeswalkers
New MTG Cards and Decks (2010, 2012, 2013, 2014, 2015, Magic Duels)
2014




Help with Worldslayer
Moderator: CCGHQ Admins
14 posts
• Page 1 of 1
Help with Worldslayer
by otakusensei » 22 Dec 2013, 21:28
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
Thanks
- otakusensei
- Posts: 5
- Joined: 22 Dec 2012, 18:56
- Has thanked: 1 time
- Been thanked: 0 time
Re: Help with Worldslayer
by RiiakShiNal » 23 Dec 2013, 00:11
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>
Just getting started: Xander9009's DotP 2014 Community Wad
Need a deck builder: DotP 2014 Deck Builder
Problems Modding: DotP 2014 Frequent Modding Mistakes
Need a deck builder: DotP 2014 Deck Builder
Problems Modding: DotP 2014 Frequent Modding Mistakes
- RiiakShiNal
- Programmer
- Posts: 2188
- Joined: 16 May 2011, 21:37
- Has thanked: 75 times
- Been thanked: 497 times
Re: Help with Worldslayer
by otakusensei » 23 Dec 2013, 03:36
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.
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.
- otakusensei
- Posts: 5
- Joined: 22 Dec 2012, 18:56
- Has thanked: 1 time
- Been thanked: 0 time
Re: Help with Worldslayer
by NeoAnderson » 23 Dec 2013, 09:49
To filter permants you can set a filter as the follow :otakusensei wrote: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.
- Code: Select all
<FILTER filter_id="0">
local filter = ClearFilter()
local subfilter = filter:AddSubFilter_Or()
subfilter:Add( FE_TYPE, OP_IS, CARD_TYPE_ARTIFACT )
subfilter:Add( FE_TYPE, OP_IS, CARD_TYPE_CREATURE )
subfilter:Add( FE_TYPE, OP_IS, CARD_TYPE_ENCHANTMENT )
subfilter:Add( FE_TYPE, OP_IS, CARD_TYPE_LAND )
subfilter:Add( FE_TYPE, OP_IS, CARD_TYPE_PLANESWALKER )
</FILTER>
- Code: Select all
<FILTER filter_id="0">
local filter = ClearFilter()
filter:Add( FE_IS_PERMANENT, true )
</FILTER>
- Code: Select all
filter:Add( FE_CARD_INSTANCE, OP_NOT, EffectSource())
- Worldslayer untested | Open
- Code: Select all
<?xml version='1.0' encoding='UTF-8'?>
<CARD_V2 ExportVersion="1">
<FILENAME text="WORLDSLAYER_227302" />
<CARDNAME text="WORLDSLAYER" />
<TITLE>
<LOCALISED_TEXT LanguageCode="en-US"><![CDATA[Worldslayer]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="fr-FR"><![CDATA[Pourfendeur de monde]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="es-ES"><![CDATA[Destruyemundos]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="de-DE"><![CDATA[Weltenerschlager]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="it-IT"><![CDATA[Spaccamondo]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="jp-JA"><![CDATA[世界薙ぎの剣]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="ko-KR"><![CDATA[Worldslayer]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="ru-RU"><![CDATA[Мироубийца]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="pt-BR"><![CDATA[Finda-Mundo]]></LOCALISED_TEXT>
</TITLE>
<MULTIVERSEID value="227302" />
<ARTID value="227302" />
<ARTIST name="Greg Staples" />
<CASTING_COST cost="{5}" />
<FLAVOURTEXT>
<LOCALISED_TEXT LanguageCode="en-US"><![CDATA[“If that is what you seek, try looking in craters.”
—Fodrus, mastersmith]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="fr-FR"><![CDATA[« Si c’est ce que tu cherches, essaie les cratères. »
—Fodrus, maître-forgeron]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="es-ES"><![CDATA[“Si eso es lo que buscas, intenta en los cráteres.”
—Fodrus, maestro herrero]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="de-DE"><![CDATA[„Falls du danach suchst, musst du die Krater durchsuchen.”
—Fodrus, Meisterschmied]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="it-IT"><![CDATA[“Se è questo che cerchi, prova a guardare nei crateri.”
—Fodrus, mastro fabbro]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="jp-JA"><![CDATA[「お前の探してるのがこれだって言うなら、噴火口でも覗くんだな。」
――熟達の鍛冶屋、フォドラス]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="ko-KR"><![CDATA[“If that is what you seek, try looking in craters.”
—Fodrus, mastersmith]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="ru-RU"><![CDATA[«Если это то, что вы ищете, попробуйте заглянуть в жерла».
— Фодрус, искусный кузнец]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="pt-BR"><![CDATA[“Se é isso que você busca, experimente procurar nas crateras.”
— Fodrus, ferreiro mestre]]></LOCALISED_TEXT>
</FLAVOURTEXT>
<TYPE metaname="Artifact" />
<SUB_TYPE metaname="Equipment" />
<EXPANSION value="M12" />
<RARITY metaname="R" />
<TRIGGERED_ABILITY>
<LOCALISED_TEXT LanguageCode="en-US"><![CDATA[Whenever equipped creature deals combat damage to a player, destroy all permanents other than Worldslayer.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="fr-FR"><![CDATA[À chaque fois que la créature équipée inflige des blessures de combat à un joueur, détruisez tous les permanents autres que le Pourfendeur de monde.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="es-ES"><![CDATA[Siempre que la criatura equipada haga daño de combate a un jugador, destruye todos los permanentes que no sean el Destruyemundos.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="de-DE"><![CDATA[Immer wenn die ausgerüstete Kreatur einem Spieler Kampfschaden zufügt, zerstöre alle bleibenden Karten außer dem Weltenerschlager.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="it-IT"><![CDATA[Ogniqualvolta la creatura equipaggiata infligge danno da combattimento a un giocatore, distruggi tutti i permanenti diversi dallo Spaccamondo.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="jp-JA"><![CDATA[装備しているクリーチャーがいずれかのプレイヤーに戦闘ダメージを与えるたび、世界薙ぎの剣以外のすべてのパーマネントを破壊する。]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="ko-KR"><![CDATA[Whenever equipped creature deals combat damage to a player, destroy all permanents other than Worldslayer.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="ru-RU"><![CDATA[Каждый раз когда снаряженное существо наносит боевые повреждения игроку, уничтожьте все перманенты, кроме Мироубийцы.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="pt-BR"><![CDATA[Toda vez que a criatura equipada causar dano de combate a um jogador, destrua todas as permanentes que não forem Finda-Mundo.]]></LOCALISED_TEXT>
<TRIGGER value="SOURCE_DEALS_DAMAGE_TO_PLAYER" to_zone="ZONE_ANY" from_zone="ZONE_ANY" damage_type="combat">
if (EffectSource() ~= nil) and (EffectSource():GetParent() ~= nil) and (Damage() ~= nil) and (Damage():GetAmount() > 0) then
return TriggerObject() == EffectSource():GetParent()
end
</TRIGGER>
<FILTER filter_id="0">
local filter = ClearFilter()
filter:Add( FE_IS_PERMANENT, true )
filter:Add( FE_CARD_INSTANCE, OP_NOT, EffectSource())
</FILTER>
<RESOLUTION_TIME_ACTION filter_id="0">
if FilteredCard() ~= nil then
FilteredCard():Destroy()
end
</RESOLUTION_TIME_ACTION>
</TRIGGERED_ABILITY>
<STATIC_ABILITY>
<LOCALISED_TEXT LanguageCode="en-US"><![CDATA[Equip {5}]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="fr-FR"><![CDATA[Équipement {5}]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="es-ES"><![CDATA[Equipar {5}.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="de-DE"><![CDATA[Ausrüsten {5}]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="it-IT"><![CDATA[Equipaggiare {5}]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="jp-JA"><![CDATA[装備 {5}]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="ko-KR"><![CDATA[장착 {5}]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="ru-RU"><![CDATA[Снарядить {5}]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="pt-BR"><![CDATA[Equipar {5}]]></LOCALISED_TEXT>
<COST mana_cost="{5}" type="Mana" />
<AVAILABILITY sorcery_time="1" />
<AI_AVAILABILITY type="restriction" restriction_type="equip" />
<TARGET tag="CARD_QUERY_CHOOSE_CREATURE_TO_EQUIP" definition="0" compartment="0" count="1" />
<TARGET_DEFINITION id="0">
local filter = ClearFilter()
filter:Add( FE_TYPE, OP_IS, CARD_TYPE_CREATURE )
filter:Add( FE_CONTROLLER, OP_IS, EffectController() )
</TARGET_DEFINITION>
<RESOLUTION_TIME_ACTION>
local target_card = EffectDC():Get_Targets(0):Get_CardPtr(0)
if (target_card ~= nil and EffectSource() ~= nil) then
EffectSource():Attach( target_card )
end
</RESOLUTION_TIME_ACTION>
<AUTO_SKIP>
local target = EffectDC():Get_Targets(0):Get_CardPtr(0)
if target ~= nil then
return false
else
return true
end
</AUTO_SKIP>
</ACTIVATED_ABILITY>
<AI_BASE_SCORE score="900" zone="ZONE_BATTLEFIELD" />
<AI_BASE_SCORE score="1200" type="Parent" zone="ZONE_BATTLEFIELD" />
</CARD_V2>
- NeoAnderson
- Posts: 914
- Joined: 10 Sep 2013, 07:49
- Has thanked: 18 times
- Been thanked: 139 times
Re: Help with Worldslayer
by thefiremind » 23 Dec 2013, 10:16
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.NeoAnderson wrote:Another way is to use :
- Code: Select all
<FILTER filter_id="0">
local filter = ClearFilter()
filter:Add( FE_IS_PERMANENT, true )
</FILTER>
< Former DotP 2012/2013/2014 modder >
Currently busy with life...
Currently busy with life...
-
thefiremind - Programmer
- Posts: 3515
- Joined: 07 Nov 2011, 10:55
- Has thanked: 118 times
- Been thanked: 722 times
Re: Help with Worldslayer
by sumomole » 23 Dec 2013, 10:35
Permanent loses all types and colors, may be used to code Phasing?thefiremind wrote:This is due to the fact that, according to Magic rules, a permanent that loses all types still counts as a permanent.

-
sumomole - Programmer
- Posts: 611
- Joined: 07 Jun 2011, 08:34
- Has thanked: 51 times
- Been thanked: 234 times
Re: Help with Worldslayer
by NeoAnderson » 23 Dec 2013, 11:01
Noted and useful as always,thefiremind wrote: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.NeoAnderson wrote:Another way is to use :
- Code: Select all
<FILTER filter_id="0">
local filter = ClearFilter()
filter:Add( FE_IS_PERMANENT, true )
</FILTER>

I was wondering why there is a "CHARACTERISTIC_PHASING" if they haven't coded this ability.sumomole wrote:Permanent loses all types and colors, may be used to code Phasing?

- NeoAnderson
- Posts: 914
- Joined: 10 Sep 2013, 07:49
- Has thanked: 18 times
- Been thanked: 139 times
Re: Help with Worldslayer
by thefiremind » 23 Dec 2013, 11:20
What about devotion count?sumomole wrote:Permanent loses all types and colors, may be used to code Phasing?

It's a placeholder. The developers added all the characteristics they could think about, but not all of them work.NeoAnderson wrote:I was wondering why there is a "CHARACTERISTIC_PHASING" if they haven't coded this ability.
< Former DotP 2012/2013/2014 modder >
Currently busy with life...
Currently busy with life...
-
thefiremind - Programmer
- Posts: 3515
- Joined: 07 Nov 2011, 10:55
- Has thanked: 118 times
- Been thanked: 722 times
Re: Help with Worldslayer
by sumomole » 23 Dec 2013, 11:51
Does devotion count include permanent that has phased out? If not, we can use five permanent types instead of FE_IS_PERMANENT.thefiremind wrote:What about devotion count?sumomole wrote:Permanent loses all types and colors, may be used to code Phasing?

-
sumomole - Programmer
- Posts: 611
- Joined: 07 Jun 2011, 08:34
- Has thanked: 51 times
- Been thanked: 234 times
Re: Help with Worldslayer
by thefiremind » 23 Dec 2013, 12:10
OK and what about a Festering Newt giving -4/-4 because of a phased-out Bogbrew Witch?sumomole wrote:Does devotion count include permanent that has phased out? If not, we can use five permanent types instead of FE_IS_PERMANENT.thefiremind wrote:What about devotion count?sumomole wrote:Permanent loses all types and colors, may be used to code Phasing?
< Former DotP 2012/2013/2014 modder >
Currently busy with life...
Currently busy with life...
-
thefiremind - Programmer
- Posts: 3515
- Joined: 07 Nov 2011, 10:55
- Has thanked: 118 times
- Been thanked: 722 times
Re: Help with Worldslayer
by sumomole » 23 Dec 2013, 12:28
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.thefiremind wrote:OK and what about a Festering Newt giving -4/-4 because of a phased-out Bogbrew Witch?

-
sumomole - Programmer
- Posts: 611
- Joined: 07 Jun 2011, 08:34
- Has thanked: 51 times
- Been thanked: 234 times
Re: Help with Worldslayer
by thefiremind » 23 Dec 2013, 14:55
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.sumomole wrote:Seems more and more trouble.

< Former DotP 2012/2013/2014 modder >
Currently busy with life...
Currently busy with life...
-
thefiremind - Programmer
- Posts: 3515
- Joined: 07 Nov 2011, 10:55
- Has thanked: 118 times
- Been thanked: 722 times
Re: Help with Worldslayer
by GrovyleXShinyCelebi » 23 Dec 2013, 15:00
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?
(in Duels 2014)
Duels 2012: viewtopic.php?f=109&t=12152
Duels 2013: viewtopic.php?f=109&t=12481&p=137458#p137458
Duels 2012: viewtopic.php?f=109&t=12152
Duels 2013: viewtopic.php?f=109&t=12481&p=137458#p137458
-
GrovyleXShinyCelebi - Posts: 294
- Joined: 12 Jun 2013, 18:23
- Has thanked: 14 times
- Been thanked: 37 times
Re: Help with Worldslayer
by otakusensei » 24 Dec 2013, 00:25
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!
Edit - Works perfectly!
- otakusensei
- Posts: 5
- Joined: 22 Dec 2012, 18:56
- Has thanked: 1 time
- Been thanked: 0 time
14 posts
• Page 1 of 1
Who is online
Users browsing this forum: No registered users and 8 guests