It is currently 05 Aug 2025, 06:20
   
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 pluks » 10 Nov 2012, 06:29

Hi all, I'm trying to do on my own mystical tutor, but nothing happens when I cast it. COULD SOMEONE TELL WHAT IS WRONG? thanks

Code: Select all
<SPELL_ABILITY>
<LOCALISED_TEXT LanguageCode="en-US"><![CDATA[Search your library for an instant or sorcery card and reveal that card. Shuffle your library, then put the card on top of it.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="de-DE"><![CDATA[Search your library for an instant or sorcery card and reveal that card. Shuffle your library, then put the card on top of it.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="es-ES"><![CDATA[Search your library for an instant or sorcery card and reveal that card. Shuffle your library, then put the card on top of it.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="fr-FR"><![CDATA[Search your library for an instant or sorcery card and reveal that card. Shuffle your library, then put the card on top of it.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="it-IT"><![CDATA[Search your library for an instant or sorcery card and reveal that card. Shuffle your library, then put the card on top of it.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="jp-JA"><![CDATA[Search your library for an instant or sorcery card and reveal that card. Shuffle your library, then put the card on top of it.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="ko-KR"><![CDATA[Search your library for an instant or sorcery card and reveal that card. Shuffle your library, then put the card on top of it.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="ru-RU"><![CDATA[Search your library for an instant or sorcery card and reveal that card. Shuffle your library, then put the card on top of it.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="pt-BR"><![CDATA[Search your library for an instant or sorcery card and reveal that card. Shuffle your library, then put the card on top of it.]]></LOCALISED_TEXT>
    <RESOLUTION_TIME_ACTION>
    local filter = Object():GetFilter()
    local effectController = EffectController()
    effectController:MarkSearchedLibrary()
    filter:Clear()
    filter:NotTargetted()
    filter:AddSubType( CARD_TYPE_SORCERY )
    filter:AddSubType( CARD_TYPE_INSTANT )
    filter:AddExtra( FILTER_EXTRA_ANY_SUB_TYPE )
    filter:May()
    filter:SetZone( ZONE_LIBRARY )
    filter:SetPlayer( effectController )
    effectController:ChooseTarget( NO_VALIDATION, "CARD_QUERY_CHOOSE_INSTANT_OR_SORCERY_TO_PUT_ON_LIBRARY", EffectDC():Make_Targets(0) )
    </RESOLUTION_TIME_ACTION>

    <RESOLUTION_TIME_ACTION>
    EffectController():ShuffleLibrary()
    </RESOLUTION_TIME_ACTION>

    <RESOLUTION_TIME_ACTION>
    if Object():GetTargetCard() ~= nil then
       Object():GetTargetCard():GuidedReveal( ZONE_LIBRARY, ZONE_LIBRARY )
       Object():GetTargetCard():PutInLibrary(0)
    end
    </RESOLUTION_TIME_ACTION>

  </SPELL_ABILITY>
</CARD_V2>
pluks
 
Posts: 14
Joined: 10 Oct 2012, 03:35
Has thanked: 6 times
Been thanked: 5 times

Re: Card Creation Request Thread

Postby alejandrohiraldo » 10 Nov 2012, 10:23

Hello! Does anyone here has Wall of Roots coded? I'm far from being a programer, but I have created a couple cards analysing the "codes" from others. But this one, I've been trying all day and nothing seems to work. Any help will be appreciated.

Thanks!
alejandrohiraldo
 
Posts: 7
Joined: 04 Nov 2012, 16:33
Has thanked: 2 times
Been thanked: 0 time

Re: Card Creation Request Thread

Postby thefiremind » 10 Nov 2012, 10:54

pluks wrote:Hi all, I'm trying to do on my own mystical tutor, but nothing happens when I cast it. COULD SOMEONE TELL WHAT IS WRONG? thanks
CARD_TYPE_SORCERY and CARD_TYPE_INSTANT, as the constant name suggests, aren't sub-types, but card types. So the right function calls are:
Code: Select all
    filter:AddCardType( CARD_TYPE_SORCERY )
    filter:AddCardType( CARD_TYPE_INSTANT )
No need to add an AddExtra.

alejandrohiraldo wrote:Hello! Does anyone here has Wall of Roots coded? I'm far from being a programer, but I have created a couple cards analysing the "codes" from others. But this one, I've been trying all day and nothing seems to work. Any help will be appreciated.

Thanks!
This is another example of card that is impossible to make without mana tokens, because the only cost that is recognized by a MANA_ABILITY is TapSelf.
This topic includes nabeshin's implementation of mana tokens:
viewtopic.php?f=63&t=7655
I can't give additional help because I don't use them.
< 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 alejandrohiraldo » 10 Nov 2012, 16:59

This is another example of card that is impossible to make without mana tokens, because the only cost that is recognized by a MANA_ABILITY is TapSelf.
This topic includes nabeshin's implementation of mana tokens: viewtopic.php?f=63&t=7655
I can't give additional help because I don't use them.
Thanks for your reply. I checked the post you sent me and I have tried a few things out. But for starters, I just want to be able to have the ability to put a -0/-1 counter on it self. This s the code I am using now that doesn't work:

Code: Select all
  <ACTIVATED_ABILITY per_turn_limit="1" filter_zone="ZONE_IN_PLAY">
     <LOCALISED_TEXT LanguageCode="en-US"><![CDATA[Put a -0/-1 counter on Wall of Roots: Add {G} to your mana pool. Activate this ability only once each turn.]]></LOCALISED_TEXT>
     <LOCALISED_TEXT LanguageCode="de-DE"><![CDATA[Put a -0/-1 counter on Wall of Roots: Add {G} to your mana pool. Activate this ability only once each turn.]]></LOCALISED_TEXT>
     <LOCALISED_TEXT LanguageCode="es-ES"><![CDATA[Put a -0/-1 counter on Wall of Roots: Add {G} to your mana pool. Activate this ability only once each turn.]]></LOCALISED_TEXT>
     <LOCALISED_TEXT LanguageCode="fr-FR"><![CDATA[Put a -0/-1 counter on Wall of Roots: Add {G} to your mana pool. Activate this ability only once each turn.]]></LOCALISED_TEXT>
     <LOCALISED_TEXT LanguageCode="it-IT"><![CDATA[Put a -0/-1 counter on Wall of Roots: Add {G} to your mana pool. Activate this ability only once each turn.]]></LOCALISED_TEXT>
     <LOCALISED_TEXT LanguageCode="jp-JA"><![CDATA[Put a -0/-1 counter on Wall of Roots: Add {G} to your mana pool. Activate this ability only once each turn.]]></LOCALISED_TEXT>
     <LOCALISED_TEXT LanguageCode="ko-KR"><![CDATA[Put a -0/-1 counter on Wall of Roots: Add {G} to your mana pool. Activate this ability only once each turn.]]></LOCALISED_TEXT>
     <LOCALISED_TEXT LanguageCode="ru-RU"><![CDATA[Put a -0/-1 counter on Wall of Roots: Add {G} to your mana pool. Activate this ability only once each turn.]]></LOCALISED_TEXT>
     <LOCALISED_TEXT LanguageCode="pt-BR"><![CDATA[Put a -0/-1 counter on Wall of Roots: Add {G} to your mana pool. Activate this ability only once each turn.]]></LOCALISED_TEXT>
        
    <RESOLUTION_TIME_ACTION>
    if EffectSource() ~= nil then
       EffectSource():AddCounters( MTG():PlusOnePlusOneCounters(), -1 )
    end
    </RESOLUTION_TIME_ACTION>
      
         <RESOLUTION_TIME_ACTION>
      ProduceMana("G",1)
      </RESOLUTION_TIME_ACTION>
   
   </ACTIVATED_ABILITY>
  <TOKEN_REGISTRATION reservation="1" type="MANATOKEN_G" />
  <HELP title="MORE_INFO_BADGE_TITLE_6" body="MORE_INFO_BADGE_BODY_6" zone="ZONE_ANY" />
  <SFX text="COMBAT_BLUNT_LARGE_ATTACK" power_boundary_min="4" power_boundary_max="-1" />
  <SFX text="COMBAT_BLUNT_SMALL_ATTACK" power_boundary_min="1" power_boundary_max="3" />
  <AI_BASE_SCORE score="600" zone="ZONE_IN_PLAY" />
I copied the code from another card (I can't remember the name) that puts a -1/-1 counter on self, but it doesnt work here. Maybe you can check it out and tell me if there is something that I am doing wrong. Anyway, thanks a lot!!

P.D. Searching in the forum I found this post from RiiakShiNal:
viewtopic.php?f=63&t=8026
But because of my short knowledge in this matter I can't understand this part:
An easier way (though less correct) would be to code Wall of Roots such that it manages the -0/-1 internally using the ObjectDC() for itself
alejandrohiraldo
 
Posts: 7
Joined: 04 Nov 2012, 16:33
Has thanked: 2 times
Been thanked: 0 time

Re: Card Creation Request Thread

Postby RiiakShiNal » 10 Nov 2012, 19:17

The problem with your code is that you are trying to remove +1/+1 counters instead of adding -1/-1 counters (they are different counters and need to be treated as such).
Code: Select all
EffectSource():AddCounters( MTG():MinusOneMinusOneCounters(), 1 )
alejandrohiraldo wrote:P.D. Searching in the forum I found this post from RiiakShiNal:
viewtopic.php?f=63&t=8026
But because of my short knowledge in this matter I can't understand this part:
An easier way (though less correct) would be to code Wall of Roots such that it manages the -0/-1 internally using the ObjectDC() for itself
That post was related to how -0/-1 counters are not implemented in the engine and that the card would have to somehow either create and manage -0/-1 counters manually (which can be very difficult) or "fake" having real -0/-1 counters only for itself which is considerably less correct and could suffer from playability issues with other card abilities.

Basically, there is a "correct" method which could be very difficult to properly manage and there is a way to fake it which could cause problems with cards that allow counters to be moved/removed (though I never got into implementation details due to the difficulty).
RiiakShiNal
Programmer
 
Posts: 2188
Joined: 16 May 2011, 21:37
Has thanked: 75 times
Been thanked: 497 times

Re: Card Creation Request Thread

Postby thefiremind » 10 Nov 2012, 19:33

I didn't remember that topic, so I was optimistic and thought that -0/-1 counters were automatically managed by the game. If that was true, you could substitute the first RESOLUTION_TIME_ACTION block with just:
Code: Select all
<COST type="countersself" name="-0/-1" number="1" />
...and be OK with just that. But unfortunately, it's not true, as RiiakShiNal explained.

The best solution would be to make an invisible card with the following ability:
Code: Select all
  <STATIC_ABILITY filter_zone="ZONE_IN_PLAY">
    <FILTER>
    return CreaturesInPlay()
    </FILTER>
    <CONTINUOUS_ACTION layer="7D">
    if FilteredCard() ~= nil then
       local counters = FilteredCard():CountCounters( MTG():GetCountersType("-0/-1") )
       FilteredCard():GetCurrentCharacteristics():Toughness_Add( -counters )
    end
    </CONTINUOUS_ACTION>
  </STATIC_ABILITY>
and then make sure that each Wall of Roots (or any other card that uses -0/-1 counters) creates a token of that invisible card only if there are no copies in play yet.

EDIT: Forgot to add the right layer to the CONTINUOUS_ACTION (7D has been almost never used because counters automatically reserve that layer for their changes, but this time nothing is automatic...).
Last edited by thefiremind on 10 Nov 2012, 22:42, 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 alejandrohiraldo » 10 Nov 2012, 21:41

Thanks a lot for the help RiiakShiNal & Thefiremind!

Thefiremind, I will try what you sugested. I'll post my results.

Thanks again!
alejandrohiraldo
 
Posts: 7
Joined: 04 Nov 2012, 16:33
Has thanked: 2 times
Been thanked: 0 time

Re: Card Creation Request Thread

Postby RiiakShiNal » 10 Nov 2012, 23:53

I hate to be a killjoy, but allow me to play devil's advocate for a moment.

Using the token method also has drawbacks in this situation as you need to consider which side of the board the token will be on and in the case of 3 or 4 player games (FFA or Planechase) if the player who has the token is eliminated, but there are -0/-1 counters on cards that are still in play the token goes away, but the counters are still present though no longer "working". So any card that has the potential to create a -0/-1 counter would need to work from all zones to create a token if it does not already exist to handle the appropriate interactions on a player who is still in the game AND periodically check to make sure that if no token exists (board wipe, player with token lost, etc...) that a new one is created so that the effects will persist properly for any -0/-1 counters still in play.

One option might be to create a token for each player that manages the -0/-1 counters for just that player (would solve issues with a player losing in 3 or 4 player games). Though would still need to make sure that the computer would not be able to sacrifice/target or otherwise try to make use of the invisible token for effects like sacrificing permanents for Annihilator abilities or for activated abilities that require a sacrifice. You may still have to periodically check that each player still has the invisible token (even if the card that initially created them is gone from the game because the counters may still be around).

So there is still a lot to consider and test and it may not be as simple as just putting out a single token to manage everything.
RiiakShiNal
Programmer
 
Posts: 2188
Joined: 16 May 2011, 21:37
Has thanked: 75 times
Been thanked: 497 times

Re: Card Creation Request Thread

Postby thefiremind » 11 Nov 2012, 00:31

RiiakShiNal wrote:One option might be to create a token for each player that manages the -0/-1 counters for just that player (would solve issues with a player losing in 3 or 4 player games). Though would still need to make sure that the computer would not be able to sacrifice/target or otherwise try to make use of the invisible token for effects like sacrificing permanents for Annihilator abilities or for activated abilities that require a sacrifice.
A token for each player that acts only on creatures controlled by that player seems a good solution to me. As long as the token has no types and we give it the usual shroud, indestructibility and protection from cmc under 25, it should be safe enough.
< 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 pluks » 11 Nov 2012, 08:47

thefiremind wrote:CARD_TYPE_SORCERY and CARD_TYPE_INSTANT, as the constant name suggests, aren't sub-types, but card types. So the right function calls are:
Code: Select all
    filter:AddCardType( CARD_TYPE_SORCERY )
    filter:AddCardType( CARD_TYPE_INSTANT )
No need to add an AddExtra.
Thank you thefiremind, such as you say. :lol:
pluks
 
Posts: 14
Joined: 10 Oct 2012, 03:35
Has thanked: 6 times
Been thanked: 5 times

Re: Card Creation Request Thread

Postby zerocube » 12 Nov 2012, 11:57

I am trying to code GHOSTWAY and FLICKERFORM but I am unable to get the DelayDC working properly. They activated for the correct number of times but nothing comes back. Any help is much appreciated :D
zerocube
 
Posts: 10
Joined: 12 Nov 2012, 07:55
Has thanked: 0 time
Been thanked: 0 time

Re: Card Creation Request Thread

Postby thefiremind » 12 Nov 2012, 12:34

I'll try to guess what's wrong: if you create the delayDC before exiling the cards, you need to protect the pointers, otherwise you'll lose them when the zone change happens.
Code: Select all
delayDC:Set_CardPtr(0, whatever)
delayDC:Protect_CardPtr(0) -- this is important
Each call to Protect_CardPtr saves the pointer for 1 zone change.

In case I didn't guess right, post your code so I can find the errors. :wink:
< 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 zerocube » 12 Nov 2012, 14:00

OK Here's the code. I model it after Day of the Dragons (what else? :lol: ) . I had the ProtectPtr up, please help pointing out my errors. Thank you very much. [-o<

Code: Select all
<?xml version='1.0'?>
<CARD_V2>
  <FILENAME text="GHOSTWAY_999842" />
  <CARDNAME text="GHOSTWAY" />
  <TITLE>
    <LOCALISED_TEXT LanguageCode="en-US"><![CDATA[Ghostway]]></LOCALISED_TEXT>
  </TITLE>
  <MULTIVERSEID value="999842" />
  <ARTID value="999842" />
  <ARTIST name="Jim Murray" />
  <CASTING_COST cost="{2}{W}" />
  <TYPE metaname="Instant" />
  <EXPANSION value="DPG" />
  <RARITY metaname="R" />
  <SPELL_ABILITY>
    <LOCALISED_TEXT LanguageCode="en-US"><![CDATA[Exile each creature you control. Return those cards to the battlefield under their owner's control at the beginning of the next end step.]]></LOCALISED_TEXT>
    <RESOLUTION_TIME_ACTION>
    local filter = Object():GetFilter()
    filter:Clear()
    filter:SetPlayer( EffectController() )
    filter:SetZone( ZONE_IN_PLAY )
    filter:AddCardType( CARD_TYPE_CREATURE )
    filter:NotTargetted()
    local total = filter:Count()
   
    EffectDC():Set_Int(0, 0)
    local source = EffectSource() 
    if FilteredCard() ~= nil then
         
    local count_so_far = EffectDC():Get_Int(0)
       EffectDC():Set_CardPtr(1 + count_so_far, FilteredCard())
       EffectDC():Protect_CardPtr(1 + count_so_far)
            EffectDC():Set_Int(0, count_so_far + 1)
       FilteredCard():RemoveFromGame()
    end
    </RESOLUTION_TIME_ACTION>
    <RESOLUTION_TIME_ACTION>
    local delayDC = EffectDC():Make_Chest(3)
    local target_count = EffectDC():Get_Int(0)
    delayDC:Set_Int(0,target_count)
    for i=1,target_count do   
       delayDC:Set_CardPtr(i, EffectDC():Get_CardPtr(i))
    end
    MTG():CreateDelayedTrigger(2, delayDC)
    </RESOLUTION_TIME_ACTION>
  </SPELL_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_count = EffectDC():Get_Int(0)
    for i=1,target_count do   
       local card = EffectDC():Get_CardPtr(i)
       if card ~= nil then
          card:PutIntoPlay( card:GetOwner() )
       end
    end
    </RESOLUTION_TIME_ACTION>
  </TRIGGERED_ABILITY>
   <AI_BASE_SCORE score="500" zone="ZONE_HAND" />
</CARD_V2>
zerocube
 
Posts: 10
Joined: 12 Nov 2012, 07:55
Has thanked: 0 time
Been thanked: 0 time

Re: Card Creation Request Thread

Postby thefiremind » 12 Nov 2012, 15:23

You are mixing 2 different kinds of filters. Object():GetFilter() should be used (most of the times) when you need to define a set of cards/players and then choose a limited number of them. The <FILTER> block, together with FilteredCard()/FilteredPlayer(), should be used when you need to define a set of cards/players and do something on all of them. FilteredCard()/FilteredPlayer() aren't influenced by Object():GetFilter() and are always equal to nil without a <FILTER> block.

This is a particular case, though, because you need to count your creatures if you want to put each one in a different pointer, so I think it's better to use Object():GetFilter() and filter evaluation. I'd change the code this way:
Code: Select all
    <RESOLUTION_TIME_ACTION>
    local filter = Object():GetFilter()
    filter:Clear()
    filter:SetPlayer( EffectController() )
    filter:SetZone( ZONE_IN_PLAY )
    filter:AddCardType( CARD_TYPE_CREATURE )
    filter:NotTargetted()
    local filter_count = filter:EvaluateObjects()

    if filter_count &gt; 0 then
       local delayDC = EffectDC():Make_Chest(1)
       delayDC:Set_Int(0, filter_count)
       for i=1,filter_count do
          local card = filter:GetNthEvaluatedObject(i-1)
          delayDC:Set_CardPtr(i, card)
          delayDC:Protect_CardPtr(i)
          card:RemoveFromGame()
       end
       MTG():CreateDelayedTrigger(2, delayDC)
    end
    </RESOLUTION_TIME_ACTION>
The code is shorter and cleaner (with only one RESOLUTION_TIME_ACTION). The delayed trigger should be OK just like you wrote it.


EDIT: You can make Flickerform in a similar way, you just have to be careful with the order in which the cards come back (creature first, auras later only if the creature came back successfully). I'd code the activated ability this way:
Code: Select all
    <RESOLUTION_TIME_ACTION>
    local parent = Object():GetParent()
    if parent ~= nil then
       local filter = Object():GetFilter()
       filter:Clear()
       filter:SetZone( ZONE_IN_PLAY )
       filter:AddSubType( ENCHANTMENT_TYPE_AURA )
       filter:SetParent( parent )
       filter:NotTargetted()
       local filter_count = filter:EvaluateObjects()

       local delayDC = EffectDC():Make_Chest(1)
       delayDC:Set_Int(0, filter_count)
       delayDC:Set_CardPtr(filter_count+1, parent)
       delayDC:Protect_CardPtr(filter_count+1)

       if filter_count &gt; 0 then
          for i=1,filter_count do
             local card = filter:GetNthEvaluatedObject(i-1)
             delayDC:Set_CardPtr(i, card)
             delayDC:Protect_CardPtr(i)
             card:RemoveFromGame()
          end
       end

       parent:RemoveFromGame()
       MTG():CreateDelayedTrigger(2, delayDC)
    end
    </RESOLUTION_TIME_ACTION>
and the delayed trigger this way:
Code: Select all
  <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 aura_count = EffectDC():Get_Int(0)
    local parent = EffectDC():Get_CardPtr(aura_count+1)
    if parent ~= nil then
       EffectDC():Protect_CardPtr(aura_count+1)
       parent:PutIntoPlay( parent:GetOwner() )
    end
    </RESOLUTION_TIME_ACTION>
    <RESOLUTION_TIME_ACTION>
    local aura_count = EffectDC():Get_Int(0)
    if aura_count &gt; 0 then
       local parent = EffectDC():Get_CardPtr(aura_count+1)
       if parent ~= nil and parent:GetZone() == ZONE_IN_PLAY then
          for i=1,aura_count do
             local card = EffectDC():Get_CardPtr(i)
             if card ~= nil then
                card:PutIntoPlayAttachedTo( card:GetOwner(), parent )
             end
          end
       end
    end
    </RESOLUTION_TIME_ACTION>
  </TRIGGERED_ABILITY>
Two separate RESOLUTION_TIME_ACTIONs allow state-based effects to be checked between them, so you can let the creature enter the battlefield and then check if it really did.
I hope I didn't make any mistake, it's not the easiest code to write.
< 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 zerocube » 12 Nov 2012, 15:52

YEAH it works. Thank you very much Firemind. =D> =D> =D>

Now it comes to Flickerform which is a total ugly beast. Anyway I think I'll try it myself again first based on the Ghostform code.

While I'm at it here's a version of Hallowed Fountain I made

Code: Select all
<?xml version='1.0'?>
<CARD_V2>
  <FILENAME text="HALLOWED_FOUNTAIN_100684" />
  <CARDNAME text="HALLOWED_FOUNTAIN" />
  <TITLE>
    <LOCALISED_TEXT LanguageCode="en-US"><![CDATA[Hallowed Fountain]]></LOCALISED_TEXT>
    </TITLE>
  <MULTIVERSEID value="100684" />
  <ARTID value="100684" />
  <ARTIST name="Jung Park" />
  <CASTING_COST cost="" />
  <TYPE metaname="Land" />
  <SUB_TYPE metaname="Plains" />
  <SUB_TYPE metaname="Island" />
  <EXPANSION value="DPG" />
  <RARITY metaname="R" />



    <TRIGGERED_ABILITY replacement_query="1" filter_zone="ZONE_IN_PLAY" active_zone="ZONE_TRANSITION">
     <LOCALISED_TEXT LanguageCode="en-US"><![CDATA[As Hallowed Fountain enters the battlefield, you may pay 2 life. If you don't, Hallowed Fountain enters the battlefield tapped.]]></LOCALISED_TEXT>
        <TRIGGER value="ZONECHANGE_TRANSITION" simple_qualifier="self" to_zone="ZONE_IN_PLAY" />
    <TARGET_DEFINITION id="0">
    local filter = Object():GetFilter()
    filter:Clear()
    filter:AddCardType( CARD_TYPE_LAND )
    filter:SetZone( ZONE_TRANSITION )
    filter:SetHint( HINT_NEUTRAL, EffectController() )
    filter:May()
    filter:NotTargetted()
    </TARGET_DEFINITION>
    <TARGET_DETERMINATION>
    return AtLeastOneTargetFromDefinition(0)
    </TARGET_DETERMINATION>
    <PLAY_TIME_ACTION target_choosing="1">
    EffectController():ChooseTarget( 0, "Pay 2 life to untap Breeding Pool", EffectDC():Make_Targets(0) )
    </PLAY_TIME_ACTION>
    <RESOLUTION_TIME_ACTION>
    local target_land = EffectDC():Get_Targets(0):Get_CardPtr(0)
            EffectController():BeginNewMultipleChoice()   
       EffectController():AddMultipleChoiceAnswer( "Pay 2 Life" )   
       EffectController():AddMultipleChoiceAnswer( "Do Nothing" )   
       EffectController():AskMultipleChoiceQuestion( "Pay 2 life to untap Watery Grave?")   
    </RESOLUTION_TIME_ACTION>
    <RESOLUTION_TIME_ACTION>
            local decision = Object():GetMultipleChoiceResult()
       if decision == 0 then
            EffectController():LoseLife(2)
            Object():Untap()         
            else
            Object():ComesIntoPlayTapped()
           end
            ObjectDC():Set_Int( 0, 1 )
    </RESOLUTION_TIME_ACTION>
 </TRIGGERED_ABILITY>

  <ACTIVATED_ABILITY auto_skip="1"  forced_skip="1"  filter_zone="ZONE_IN_PLAY">
    <LOCALISED_TEXT LanguageCode="en-US"><![CDATA[{0}:Set to produce {U} to your mana pool.]]></LOCALISED_TEXT>
  <COST type="Mana" cost="{0}" />
 <RESOLUTION_TIME_ACTION>
          ObjectDC():Set_Int( 0, 2 )
 </RESOLUTION_TIME_ACTION>   
   </ACTIVATED_ABILITY>

  <ACTIVATED_ABILITY auto_skip="1"  forced_skip="1"  filter_zone="ZONE_IN_PLAY">
    <LOCALISED_TEXT LanguageCode="en-US"><![CDATA[{0}:Set to produce {W} to your mana pool.]]></LOCALISED_TEXT>
  <COST type="Mana" cost="{0}" />
 <RESOLUTION_TIME_ACTION>
          ObjectDC():Set_Int( 0, 1 )
 </RESOLUTION_TIME_ACTION>   
   </ACTIVATED_ABILITY>


  <TRIGGERED_ABILITY internal="1" filter_zone="ZONE_IN_PLAY">
    <TRIGGER value="STATE_BASED_EFFECTS">
    local characteristics = Object():GetCurrentCharacteristics()
    local ability_check = characteristics:Characteristic_Get( CHARACTERISTIC_CANT_USE_ACTIVATED_ABILITIES )
    if ability_check ~= 0 then
   characteristics:Characteristic_Set( CHARACTERISTIC_CANT_USE_ACTIVATED_ABILITIES, 0 )
   return true
    end
    return false
    </TRIGGER>
  </TRIGGERED_ABILITY>

  <STATIC_ABILITY filter_zone="ZONE_IN_PLAY">
    <CONTINUOUS_ACTION layer="6">
    local characteristics = Object():GetCurrentCharacteristics()
    local mana_color = ObjectDC():Get_Int(0)
    characteristics:GrantAbility(mana_color)
    </CONTINUOUS_ACTION>
   </STATIC_ABILITY>


 
  <MANA_ABILITY resource_id="1"   filter_zone="ZONE_IN_PLAY">
  <LOCALISED_TEXT LanguageCode="en-US"><![CDATA[{T}: Add {W} to your mana pool.]]></LOCALISED_TEXT>
        <COST type="TapSelf" />
        <PRODUCES amount="{W}" />
   </MANA_ABILITY>   
   <MANA_ABILITY resource_id="2"   filter_zone="ZONE_IN_PLAY">
   <LOCALISED_TEXT LanguageCode="en-US"><![CDATA[{T}: Add {U} to your mana pool.]]></LOCALISED_TEXT>
       <COST type="TapSelf" />
        <PRODUCES amount="{U}" />
   </MANA_ABILITY>

</CARD_V2>
OK it is not very elegant (OK! it's ugly! :cry: ). It works but I believe it require some serious cosmetic changes to make it look good. Cheers.

EDIT: now I see your flickerform code. I will try and see if it works. It's kind of tricky the way these aura are put into play.
zerocube
 
Posts: 10
Joined: 12 Nov 2012, 07:55
Has thanked: 0 time
Been thanked: 0 time

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 1 guest

Main Menu

User Menu

Our Partners


Who is online

In total there is 1 user online :: 0 registered, 0 hidden and 1 guest (based on users active over the past 10 minutes)
Most users ever online was 7303 on 15 Jul 2025, 20:46

Users browsing this forum: No registered users and 1 guest

Login Form