It is currently 15 Jun 2025, 16:25
   
Text Size

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!

Moderator: CCGHQ Admins

Re: Card Creation Request Thread

Postby NEMESiS » 14 Feb 2013, 11:25

The land id seems to have been the culprit. Such a simple mistake....
User avatar
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

Postby SoulStorm » 15 Feb 2013, 09:30

I'm stepping away from my {G} {U} deck for a bit, but in the meantime I'm contemplating a {W} {R} deck and Lightmine Field would be nice to have.

Also, when I return to my {G} {U} deck, I'd like to see how Pulse of the Tangle interacts with it.

Thanks!
SoulStorm
 
Posts: 423
Joined: 24 Jun 2010, 22:48
Has thanked: 16 times
Been thanked: 11 times

Re: Card Creation Request Thread

Postby thefiremind » 15 Feb 2013, 10:17

SoulStorm wrote:I'm stepping away from my {G} {U} deck for a bit, but in the meantime I'm contemplating a {W} {R} deck and Lightmine Field would be nice to have.
Lightmine Field wasn't as easy as it seemed, because Gatherer says:
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.
So I had to:
  • 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).
I hope it works.

SoulStorm wrote:Also, when I return to my {G} {U} deck, I'd like to see how Pulse of the Tangle interacts with it.
Pulse of the Tangle was easy: the comparison code was already on Avatar of Might, there was just a "+3" to remove. :lol:
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...
User avatar
thefiremind
Programmer
 
Posts: 3515
Joined: 07 Nov 2011, 10:55
Has thanked: 118 times
Been thanked: 722 times

Re: Card Creation Request Thread

Postby SoulStorm » 15 Feb 2013, 11:04

thefiremind wrote:Lightmine Field wasn't as easy as it seemed.
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.

I swear you have a team of clones working for you! =D>

Thanks for continuing to feed my deck building habit! :mrgreen:
SoulStorm
 
Posts: 423
Joined: 24 Jun 2010, 22:48
Has thanked: 16 times
Been thanked: 11 times

Re: Card Creation Request Thread

Postby SoulStorm » 15 Feb 2013, 13:58

Each Lightmine Field is triggering twice.
SoulStorm
 
Posts: 423
Joined: 24 Jun 2010, 22:48
Has thanked: 16 times
Been thanked: 11 times

Re: Card Creation Request Thread

Postby thefiremind » 15 Feb 2013, 14:49

SoulStorm wrote:Each Lightmine Field is triggering twice.
I hope it's not the same as my attempt on Crucible of Worlds... try to change the trigger like this:
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 &gt; 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>
Let me know if it works.
< Former DotP 2012/2013/2014 modder >
Currently busy with life...
User avatar
thefiremind
Programmer
 
Posts: 3515
Joined: 07 Nov 2011, 10:55
Has thanked: 118 times
Been thanked: 722 times

Re: Card Creation Request Thread

Postby SoulStorm » 15 Feb 2013, 15:35

thefiremind wrote:Let me know if it works.
Now it doesn't trigger at all.

This is a tricky card.
SoulStorm
 
Posts: 423
Joined: 24 Jun 2010, 22:48
Has thanked: 16 times
Been thanked: 11 times

Re: Card Creation Request Thread

Postby thefiremind » 15 Feb 2013, 17:24

OK, I got the right trigger now:
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 &gt; 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>
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.
< Former DotP 2012/2013/2014 modder >
Currently busy with life...
User avatar
thefiremind
Programmer
 
Posts: 3515
Joined: 07 Nov 2011, 10:55
Has thanked: 118 times
Been thanked: 722 times

Re: Card Creation Request Thread

Postby RiiakShiNal » 15 Feb 2013, 21:55

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.
Or you could use the function TriggeredForMe() to make sure it only triggers for the controller. Either way works just differences in implementation.
RiiakShiNal
Programmer
 
Posts: 2188
Joined: 16 May 2011, 21:37
Has thanked: 75 times
Been thanked: 497 times

Re: Card Creation Request Thread

Postby SoulStorm » 16 Feb 2013, 10:53

thefiremind wrote:OK, I got the right trigger now.
Works perfectly, thanks Firemind.

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.
SoulStorm
 
Posts: 423
Joined: 24 Jun 2010, 22:48
Has thanked: 16 times
Been thanked: 11 times

Re: Card Creation Request Thread

Postby 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
User avatar
DAJAW
 
Posts: 3
Joined: 16 Feb 2013, 13:21
Has thanked: 1 time
Been thanked: 0 time

Re: Card Creation Request Thread

Postby thefiremind » 16 Feb 2013, 22:39

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
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).
< Former DotP 2012/2013/2014 modder >
Currently busy with life...
User avatar
thefiremind
Programmer
 
Posts: 3515
Joined: 07 Nov 2011, 10:55
Has thanked: 118 times
Been thanked: 722 times

Re: Card Creation Request Thread

Postby 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>
User avatar
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

Postby 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" :wink:).

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...
User avatar
thefiremind
Programmer
 
Posts: 3515
Joined: 07 Nov 2011, 10:55
Has thanked: 118 times
Been thanked: 722 times

Re: Card Creation Request Thread

Postby NEMESiS » 17 Feb 2013, 21:32

Ah yes, that would make too much sense.... I got it working now. lol
User avatar
NEMESiS
 
Posts: 460
Joined: 03 Jan 2013, 04:02
Location: Pools of Becoming
Has thanked: 70 times
Been thanked: 21 times

PreviousNext

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


Who is online

In total there are 0 users online :: 0 registered, 0 hidden and 0 guests (based on users active over the past 10 minutes)
Most users ever online was 4143 on 23 Jan 2024, 08:21

Users browsing this forum: No registered users and 0 guests

Login Form