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)



Card Creation Request Thread
User-made mods in DLC (Downloadable Content) form.
Get MTG cards here for your DotP that aren't available anywhere else!
Get MTG cards here for your DotP that aren't available anywhere else!
Moderator: CCGHQ Admins
Re: Card Creation Request Thread
by NEMESiS » 14 Feb 2013, 11:25
The land id seems to have been the culprit. Such a simple mistake....
-
NEMESiS - Posts: 460
- Joined: 03 Jan 2013, 04:02
- Location: Pools of Becoming
- Has thanked: 70 times
- Been thanked: 21 times
Re: Card Creation Request Thread
by SoulStorm » 15 Feb 2013, 09:30
I'm stepping away from my
deck for a bit, but in the meantime I'm contemplating a
deck and Lightmine Field would be nice to have.
Also, when I return to my
deck, I'd like to see how Pulse of the Tangle interacts with it.
Thanks!




Also, when I return to my


Thanks!
Re: Card Creation Request Thread
by thefiremind » 15 Feb 2013, 10:17
Lightmine Field wasn't as easy as it seemed, because Gatherer says:SoulStorm wrote:I'm stepping away from my![]()
deck for a bit, but in the meantime I'm contemplating a
![]()
deck and Lightmine Field would be nice to have.
So I had to:Gatherer rulings wrote:Which creatures are dealt damage is based on which creatures were declared as attackers during the declare attackers step.
How much damage each of those creatures is dealt is based how many creatures are attacking at the time the ability resolves.
- Count the attackers during the ATTACKERS_DECLARED trigger check: if they are more than 0, save the attackers in a chest and start the trigger.
- Count the attackers again during the resolution and save the result to be used as damage amount.
- Iterate over the previously filled chest to deal the damage to the declared attackers (whether they are still attacking or not).
Pulse of the Tangle was easy: the comparison code was already on Avatar of Might, there was just a "+3" to remove.SoulStorm wrote:Also, when I return to my![]()
deck, I'd like to see how Pulse of the Tangle interacts with it.

- Attachments
-
LIGHTMINE_FIELD_216339_v2.zip
- (109.53 KiB) Downloaded 373 times
-
PULSE_OF_THE_TANGLE_75745.zip
- (116.36 KiB) Downloaded 349 times
Last edited by thefiremind on 15 Feb 2013, 17:26, edited 1 time in total.
< 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: Card Creation Request Thread
by SoulStorm » 15 Feb 2013, 11:04
It didn't seem easy to me at all. I looked at a bunch of different cards trying to cobble it together, but the card was just beyond my scripting ability.thefiremind wrote:Lightmine Field wasn't as easy as it seemed.
I swear you have a team of clones working for you!

Thanks for continuing to feed my deck building habit!

Re: Card Creation Request Thread
by SoulStorm » 15 Feb 2013, 13:58
Each Lightmine Field is triggering twice.
Re: Card Creation Request Thread
by thefiremind » 15 Feb 2013, 14:49
I hope it's not the same as my attempt on Crucible of Worlds... try to change the trigger like this:SoulStorm wrote:Each Lightmine Field is triggering twice.
- Code: Select all
<TRIGGER value="BEGINNING_OF_STEP" simple_qualifier="controller">
if MTG():GetStep() == STEP_DECLARE_ATTACKERS then
local filter = Object():GetFilter()
filter:SetZone( ZONE_IN_PLAY )
filter:AddCardType( CARD_TYPE_CREATURE )
filter:AddExtra( FILTER_EXTRA_CREATURE_ATTACKING )
filter:NotTargetted()
local filter_count = filter:EvaluateObjects()
if filter_count > 0 then
EffectDC():Set_Int(0, filter_count)
local attackersDC = EffectDC():Make_Chest(1)
for i=0,filter_count-1 do
attackersDC:Set_CardPtr( i, filter:GetNthEvaluatedObject(i) )
end
return true
end
end
return false
</TRIGGER>
< 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: Card Creation Request Thread
by SoulStorm » 15 Feb 2013, 15:35
Now it doesn't trigger at all.thefiremind wrote:Let me know if it works.
This is a tricky card.
Re: Card Creation Request Thread
by thefiremind » 15 Feb 2013, 17:24
OK, I got the right trigger now:
I also updated the attachment in the previous post.
- Code: Select all
<TRIGGER value="ATTACKERS_DECLARED" simple_qualifier="controller">
local filter = Object():GetFilter()
filter:SetZone( ZONE_IN_PLAY )
filter:AddCardType( CARD_TYPE_CREATURE )
filter:AddExtra( FILTER_EXTRA_CREATURE_ATTACKING )
filter:NotTargetted()
local filter_count = filter:EvaluateObjects()
if filter_count > 0 then
EffectDC():Set_Int(0, filter_count)
local attackersDC = EffectDC():Make_Chest(1)
for i=0,filter_count-1 do
attackersDC:Set_CardPtr( i, filter:GetNthEvaluatedObject(i) )
end
return true
end
return false
</TRIGGER>
I also updated the attachment in the previous post.
< 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: Card Creation Request Thread
by RiiakShiNal » 15 Feb 2013, 21:55
Or you could use the function TriggeredForMe() to make sure it only triggers for the controller. Either way works just differences in implementation.thefiremind wrote:The ATTACKERS_DECLARED trigger works like the step triggers: it is checked once for each player, so even if we want to make Lightmine Field trigger for any player, the simple_qualifier="controller" is needed, otherwise it will trigger once for each player in each combat.
I also updated the attachment in the previous post.
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: Card Creation Request Thread
by SoulStorm » 16 Feb 2013, 10:53
Works perfectly, thanks Firemind.thefiremind wrote:OK, I got the right trigger now.
I'm not sure what the AI is doing though, sometimes it seems like it knows that attacking en masse is a bad idea, and other times it's bye bye AI creatures.
I believe the AI doesn't predict well when it has enough damage on the board to score a kill.
Re: Card Creation Request Thread
by DAJAW » 16 Feb 2013, 20:19
I would like to request Cabal Coffers. I will try to make one using Cloudpost but if anyone has this card it would save work :p
Re: Card Creation Request Thread
by thefiremind » 16 Feb 2013, 22:39
Paying mana to get mana... it's impossible with the usual mana abilities, could be done only with mana tokens (which I don't use).DAJAW wrote:I would like to request Cabal Coffers. I will try to make one using Cloudpost but if anyone has this card it would save work :p
< 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: Card Creation Request Thread
by NEMESiS » 17 Feb 2013, 20:38
I am trying to make Mistmedow Witch. I can get the ability to target and exile a creature but not to return it. I've tried several thing but no luck. Any assistance?
- Code: Select all
<ACTIVATED_ABILITY auto_skip="1" filter_zone="ZONE_IN_PLAY">
<LOCALISED_TEXT LanguageCode="en-US"><![CDATA[{2}{W}{U}: Exile target creature. Return that card to the battlefield under its owner’s control at the beginning of the next end step.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="it-IT"><![CDATA[{2}{W}{U}: Rimuovi dal gioco una creatura bersaglio. Rimetti in gioco quella carta sotto il controllo del suo proprietario alla fine del turno.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="de-DE"><![CDATA[{2}{W}{U}: Entferne eine Kreatur deiner Wahl ganz aus dem Spiel. Bringe diese Karte am Ende des Zuges unter der Kontrolle ihres Besitzers ins Spiel zurück.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="fr-FR"><![CDATA[{2}{W}{U} : Retirez la créature ciblée de la partie. Renvoyez cette carte en jeu sous le contrôle de son propriétaire à la fin du tour.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="es-ES"><![CDATA[{2}{W}{U}: Remueve del juego la criatura objetivo. Regresa esa carta al juego bajo el control de su propietario al final del turno.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="jp-JA"><![CDATA[{2}{W}{U}:クリーチャー1体を対象とし、それを追放する。 次の終了ステップの開始時に、そのカードをオーナーのコントロール下で戦場に戻す。]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="ko-KR"><![CDATA[{2}{W}{U}: Exile target creature. Return that card to the battlefield under its owner’s control at the beginning of the next end step.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="ru-RU"><![CDATA[{2}{W}{U}: удалите целевое существо из игры. В конце хода верните ту карту в игру под контролем ее владельца.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="pt-BR"><![CDATA[{2}{W}{U}: Remova a criatura alvo do jogo. Devolva aquele card ao jogo sob o controle de seu dono no final do turno.]]></LOCALISED_TEXT>
<COST type="Mana" cost="{2}{W}{U}" />
<TARGET_DEFINITION id="0">
local filter = Object():GetFilter()
filter:Clear()
filter:AddCardType( CARD_TYPE_CREATURE )
filter:SetPlayer( EffectController() )
filter:SetZone( ZONE_IN_PLAY )
filter:SetHint( HINT_ENEMY, EffectController() )
</TARGET_DEFINITION>
<TARGET_DETERMINATION>
return AtLeastOneTargetFromDefinition(0)
</TARGET_DETERMINATION>
<PLAY_TIME_ACTION target_choosing="1">
EffectController():ChooseTarget( 0, "CARD_QUERY_CHOOSE_CREATURE_TO_EXILE", EffectDC():Make_Targets(0) )
</PLAY_TIME_ACTION>
<RESOLUTION_TIME_ACTION>
local target = EffectDC():Get_Targets(0):Get_NthCardPtr(0)
if target ~= nil then
if target:IsToken() == 0 then
EffectDC():Get_Targets(0)
end
target:RemoveFromGame()
end
</RESOLUTION_TIME_ACTION>
<RESOLUTION_TIME_ACTION>
local delayDC = EffectDC():Make_Chest(1)
delayDC:Set_CardPtr(0, EffectDC():Get_Targets(0)
MTG():CreateDelayedTrigger(2, delayDC)
</RESOLUTION_TIME_ACTION>
</ACTIVATED_ABILITY>
<TRIGGERED_ABILITY resource_id="2">
<TRIGGER value="BEGINNING_OF_STEP" simple_qualifier="controller">
return ( MTG():GetStep() == STEP_END_OF_TURN )
</TRIGGER>
</TRIGGERED_ABILITY>
<HELP title="MORE_INFO_BADGE_TITLE_10" body="MORE_INFO_BADGE_BODY_10" zone="ZONE_ANY" />
<SFX text="COMBAT_PLASMA_LARGE_ATTACK" power_boundary_min="4" power_boundary_max="-1" />
<SFX text="COMBAT_PLASMA_SMALL_ATTACK" power_boundary_min="1" power_boundary_max="3" />
<AI_BASE_SCORE score="300" zone="ZONE_IN_PLAY" />
</CARD_V2>
-
NEMESiS - Posts: 460
- Joined: 03 Jan 2013, 04:02
- Location: Pools of Becoming
- Has thanked: 70 times
- Been thanked: 21 times
Re: Card Creation Request Thread
by thefiremind » 17 Feb 2013, 20:48
Why don't you start from Flickerwisp code? It does the same thing, except it says "target creature" instead of "another target permanent". Just change the target definition accordingly and then add the token check that I included in the fixes (it makes the card "crash-proof"
).
The important part should become like this:

The important part should become like this:
- Code: Select all
<TARGET_DEFINITION id="0">
local filter = Object():GetFilter()
filter:Clear()
filter:AddCardType( CARD_TYPE_CREATURE )
filter:SetZone( ZONE_IN_PLAY )
filter:SetHint( HINT_ENEMY, EffectController() )
</TARGET_DEFINITION>
<TARGET_DETERMINATION>
return AtLeastOneTargetFromDefinition(0)
</TARGET_DETERMINATION>
<PLAY_TIME_ACTION target_choosing="1">
EffectController():ChooseTarget( 0, "CARD_QUERY_CHOOSE_PERMANENT_TO_EXILE", EffectDC():Make_Targets(0) )
</PLAY_TIME_ACTION>
<RESOLUTION_TIME_ACTION>
local target = EffectDC():Get_Targets(0):Get_NthCardPtr(0)
if target ~= nil then
if target:IsToken() == 0 then
EffectDC():Get_Targets(0):Protect_CardPtr(0)
end
target:RemoveFromGame()
end
</RESOLUTION_TIME_ACTION>
<RESOLUTION_TIME_ACTION>
local target = EffectDC():Get_Targets(0):Get_NthCardPtr(0)
if target ~= nil then
local delayDC = EffectDC():Make_Chest(1)
delayDC:Set_CardPtr(0, target)
MTG():CreateDelayedTrigger(2, delayDC)
end
</RESOLUTION_TIME_ACTION>
</TRIGGERED_ABILITY>
<TRIGGERED_ABILITY resource_id="2">
<TRIGGER value="BEGINNING_OF_STEP" simple_qualifier="controller">
return ( MTG():GetStep() == STEP_END_OF_TURN )
</TRIGGER>
<CLEANUP fire_once="1" />
<RESOLUTION_TIME_ACTION>
local target = EffectDC():Get_CardPtr(0)
if target ~= nil then
if target:GetCardType():Test( CARD_TYPE_ENCHANTMENT ) ~= 0 and target:GetSubType():Test( ENCHANTMENT_TYPE_AURA ) ~= 0 then
target:GetOwner():PseudoPlaySpell(target)
else
target:PutIntoPlay( target:GetOwner() )
end
end
</RESOLUTION_TIME_ACTION>
</TRIGGERED_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: Card Creation Request Thread
by NEMESiS » 17 Feb 2013, 21:32
Ah yes, that would make too much sense.... I got it working now. lol
-
NEMESiS - Posts: 460
- Joined: 03 Jan 2013, 04:02
- Location: Pools of Becoming
- Has thanked: 70 times
- Been thanked: 21 times
Return to New MTG Cards and Decks (2010, 2012, 2013, 2014, 2015, Magic Duels)
Who is online
Users browsing this forum: No registered users and 0 guests