It is currently 29 Apr 2024, 06:32
   
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 thefiremind » 12 Nov 2012, 15:56

About Hallowed Fountain, look at the code I wrote here:
viewtopic.php?f=63&t=8497#p102041
it should be OK for the choice of paying 2 life.
< 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: 721 times

Re: Card Creation Request Thread

Postby zerocube » 12 Nov 2012, 16:29

Thanks =D> =D> it works now. But my game still crashes if an untapped land without mana ability is in play. #-o So i still have to force a mana ability on it while coming into play.

That's sad because it seems I cannot get Bazaar of Bagdad or the tebernacle working. The tebernacle of pendrell vale i could make it ugly and comesintoplaytapped and dpesnt untap. But the bazaar is still no-no. :cry: :cry:
zerocube
 
Posts: 10
Joined: 12 Nov 2012, 07:55
Has thanked: 0 time
Been thanked: 0 time

Re: Card Creation Request Thread

Postby pluks » 13 Nov 2012, 21:51

Hello again folks, writing to you because i can't do scry 2 of the crystal ball, don't know how to order the cards from the top if i don't put cards en the bottom and also to request some cards that i have no idea:
Yawgmoth's Will.
Grapeshot. storm can be done?
thanks
pluks
 
Posts: 14
Joined: 10 Oct 2012, 03:35
Has thanked: 6 times
Been thanked: 5 times

Re: Card Creation Request Thread

Postby thefiremind » 13 Nov 2012, 22:46

pluks wrote:Hello again folks, writing to you because i can't do scry 2 of the crystal ball, don't know how to order the cards from the top if i don't put cards en the bottom and also to request some cards that i have no idea:
Yawgmoth's Will.
Grapeshot. storm can be done?
thanks
You have an example of the scry mechanic on Quicksilver Sea (a plane card). If I'm not missing anything, the code can be adapted for any scry number by changing all the 4's in the first RESOLUTION_TIME_ACTION with the proper number (2, in your case). You can just "finish" the first query without choosing any card for the bottom of the library, if you want all of them to stay on top.

Yawgmoth's Will cannot be made: you can't play cards from the graveyard with the only exception of flashback cards, but the flashback must be hard-coded on the cards so you can't code Snapcaster Mage either. (Maybe there's some very complicated solution that is far from the real deal, but I think that for Yawgmoth's Will there's no way at all because granting activated abilities to cards in graveyards doesn't work.)

Storm can be done easily: it was present in DotP2012 and I can update the code for you in little time. I'll post it when it's ready.
EDIT: Here it is. Just paste it in any card you need, it's totally independent.
Code: Select all
  <TRIGGERED_ABILITY active_zone="ZONE_STACK">
    <LOCALISED_TEXT LanguageCode="en-US"><![CDATA[Storm]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="fr-FR"><![CDATA[Déluge]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="de-DE"><![CDATA[Sturm]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="es-ES"><![CDATA[Tormenta]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="it-IT"><![CDATA[Tempesta]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="jp-JA"><![CDATA[ストーム]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="ko-KR"><![CDATA[Storm]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="ru-RU"><![CDATA[Шторм]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="pt-BR"><![CDATA[Rajada]]></LOCALISED_TEXT>
    <TRIGGER value="SPELL_PLAYED" simple_qualifier="self" />
    <RESOLUTION_TIME_ACTION>
    local storm_count = MTG():DuelDataChest():Get_Int( DUEL_UTILITY_COMPARTMENT_ID_SPELLS_PLAYED_THIS_TURN ) - 1
    if storm_count &gt; 0 then
       for i=1,storm_count do
          EffectController():CopySpellWithNewTargets( Object() )
       end
    end
    </RESOLUTION_TIME_ACTION>
  </TRIGGERED_ABILITY>
I'm not sure if it's safe to add auto_skip to storm... I can't think of something that must be definitely played in response to storm activation (countering the original spell would still let the storm resolve, those are real Magic rules), but maybe I'm forgetting something. In DotP2012 storm didn't have auto_skip so I didn't add it.
< 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: 721 times

Re: Card Creation Request Thread

Postby pluks » 14 Nov 2012, 03:47

thanks thefiremind you are always so cool
pluks
 
Posts: 14
Joined: 10 Oct 2012, 03:35
Has thanked: 6 times
Been thanked: 5 times

Re: Card Creation Request Thread

Postby Lirave » 14 Nov 2012, 12:13

i think stifle can neutralize storm, but i am not sure
Lirave
 
Posts: 14
Joined: 13 Nov 2012, 18:17
Has thanked: 0 time
Been thanked: 2 times

Re: Card Creation Request Thread

Postby thefiremind » 14 Nov 2012, 12:29

Lirave wrote:i think stifle can neutralize storm, but i am not sure
That's right, but abilities cannot be countered in DotP games, so it can never happen.
< 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: 721 times

Re: Card Creation Request Thread

Postby zerocube » 14 Nov 2012, 14:20

OK I am doing this card called scapeshift. First part is working fine. Something wrong with my following second part. It got the correct number of targets from library from the first part :idea: , but after I select them, they dont come into play. the code was modelled after harrow. [-o< [-o<

Code: Select all
    <RESOLUTION_TIME_ACTION>
     local filter = Object():GetFilter()
    local player = EffectController()
    player:MarkSearchedLibrary()
    filter:Clear()
    filter:NotTargetted()
    filter:AddCardType( CARD_TYPE_LAND )
    filter:May()
    filter:SetZone( ZONE_LIBRARY )
    filter:SetPlayer( player )
    player:SetTargetCount( ObjectDC():Get_Int(0) )
    for i=0,ObjectDC():Get_Int(0)-1 do
       player:SetTargetPrompt( i, "CARD_QUERY_CHOOSE_LAND_TO_PUT_ONTO_BATTLEFIELD" )
    end
    player:ChooseTargetsWithFlags( NO_VALIDATION, EffectDC():Make_Targets(0), QUERY_FLAG_CAN_BE_FINISHED_EARLY + QUERY_FLAG_CAN_BE_FINISHED_EARLY_FOR_AI_AS_WELL )
  </RESOLUTION_TIME_ACTION>
    <RESOLUTION_TIME_ACTION>
      for i=0,ObjectDC():Get_Int(0)-1 do
    local target = EffectDC():Get_Targets(0):Get_CardPtr(i)
    if target ~= nil then
       target:PutIntoPlayTapped( EffectController() )
    end
    end
  </RESOLUTION_TIME_ACTION>
After fixing this I will go bang mt head on precursor Golem X_X :lol:
zerocube
 
Posts: 10
Joined: 12 Nov 2012, 07:55
Has thanked: 0 time
Been thanked: 0 time

Re: Card Creation Request Thread

Postby thefiremind » 14 Nov 2012, 14:54

You encountered a problem that I never totally understood, but I know that it exists and code accordingly. When you have more than one target in a target chest, if you change the zone of one target, somehow the following targets get screwed up. So the usual solution is to save all the targets in a separate array and point them from the array. Your code should become:
Code: Select all
    <RESOLUTION_TIME_ACTION>
    local count = ObjectDC():Get_Int(0)
    if count &gt; 0 then
       local target_array = {}
       for i=0,count-1 do
          target_array[i] = EffectDC():Get_Targets(0):Get_CardPtr(i)
       end
       for i=0,count-1 do
          local target = target_array[i]
          if target ~= nil then
             target:PutIntoPlayTapped( EffectController() )
          end
       end
    end
    </RESOLUTION_TIME_ACTION>
And even if it would be stupid, you have to consider the case of sacrificing zero lands: enclose also the other RESOLUTION_TIME_ACTION in
Code: Select all
local count = ObjectDC():Get_Int(0)
if count &gt; 0 then
...
end
By the way, if you want to use EffectDC() also for saving the number of lands, you can do it, just don't use register #0 because you are already using it for the chest target.

Precursor Golem existed in DotP2012 as a challenge card, but it was coded in a way that couldn't work for all possible cards. It basically looked into target chest #0 in order to see if that card was targetting a Golem. But a card could use target chest #1 because maybe chest #0 is already in use for something else. I don't know if it's possible to make a fully functional Precursor Golem, never thought about it.
< 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: 721 times

Re: Card Creation Request Thread

Postby zerocube » 15 Nov 2012, 00:27

Thanks Firemind. I finally pulled a panoptic mirror + army of the damned combo successfully. now i'm a happy Timmy. =D> :mrgreen: :mrgreen:
zerocube
 
Posts: 10
Joined: 12 Nov 2012, 07:55
Has thanked: 0 time
Been thanked: 0 time

Re: Card Creation Request Thread

Postby Lirave » 16 Nov 2012, 14:55

hi did somebody already code a Planeswalker ?

edit: plainswalker to Planeswalker
Last edited by Lirave on 16 Nov 2012, 22:53, edited 1 time in total.
Lirave
 
Posts: 14
Joined: 13 Nov 2012, 18:17
Has thanked: 0 time
Been thanked: 2 times

Re: Card Creation Request Thread

Postby thefiremind » 16 Nov 2012, 15:18

Lirave wrote:hi did somebody already code a plainswalker ?
Impossible, they are not supported by any DotP game.
< 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: 721 times

Re: Card Creation Request Thread

Postby RiiakShiNal » 16 Nov 2012, 21:05

Well, "Plainswalk" is supported (as is Forestwalk, Islandwalk, Mountainwalk, and Swampwalk) so a "Plainswalker" can be done fairly easily as it is a creature with "Plainswalk", but "Planeswalkers" are not supported at all and cannot be properly made (it might be possible to make an elaborate fake, but many parts would not work properly).
RiiakShiNal
Programmer
 
Posts: 2185
Joined: 16 May 2011, 21:37
Has thanked: 75 times
Been thanked: 497 times

Re: Card Creation Request Thread

Postby alejandrohiraldo » 17 Nov 2012, 22:50

Hey Thefiremind, sorry to bother again with this card ( Wall of Roots ) but I followed your advice and I got it half working with an invicible token just as you told me. On activating the ability the card correctly recieves a -0/-1 counter and gives a {G} mana. The only problem is the following:

When I cast it for the first time and use the ability everything is correct. But when I use the ability again it applies 2 counters (-0/-2). Also, if after that I cast another Wall Of Roots and use the ability it gets 3 counters (-0/-3) and so forth. It seems to be stacking up. Heres the code I am using:

Wall of Roots code
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>
<COST type="countersself" name="-0/-1" number="1" />
      <RESOLUTION_TIME_ACTION>
      ProduceMana("G",1)
      </RESOLUTION_TIME_ACTION>
         <RESOLUTION_TIME_ACTION>
    local token_count = 1
    if token_count &gt; 0 then
       MTG():PutTokensIntoPlay( "WALL_TOKEN", token_count, EffectController() )
    end
   </RESOLUTION_TIME_ACTION>
 </ACTIVATED_ABILITY>
  <TOKEN_REGISTRATION reservation="1" type="MANATOKEN_G" />
    <TOKEN_REGISTRATION reservation="2" type="WALL_TOKEN" />
Wall Token code
Code: Select all
    <STATIC_ABILITY filter_zone="ZONE_IN_PLAY" >
    <CONTINUOUS_ACTION>
    local filter = Object():GetFilter()
    filter:Clear()
    filter:SetConvertedCostMax( 25 )
    Object():Protection()
    </CONTINUOUS_ACTION>
  </STATIC_ABILITY>
  <STATIC_ABILITY filter_zone="ZONE_IN_PLAY">
    <CONTINUOUS_ACTION>
      Object():GetCurrentCharacteristics():Characteristic_Set( CHARACTERISTIC_SHROUD, 1 )
      Object():GetCurrentCharacteristics():Characteristic_Set( CHARACTERISTIC_INDESTRUCTIBLE, 1 )
    </CONTINUOUS_ACTION>
  </STATIC_ABILITY>
  <TRIGGERED_ABILITY internal="1">
    <TRIGGER value="END_OF_STEP">
    return Object():Tapped() == 0
    </TRIGGER>
    <RESOLUTION_TIME_ACTION>
       Object():Tap()
    </RESOLUTION_TIME_ACTION>
  </TRIGGERED_ABILITY>
 <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>
Any ideas why this is happening?

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

Re: Card Creation Request Thread

Postby thefiremind » 17 Nov 2012, 23:12

alejandrohiraldo wrote:When I cast it for the first time and use the ability everything is correct. But when I use the ability again it applies 2 counters (-0/-2). Also, if after that I cast another Wall Of Roots and use the ability it gets 3 counters (-0/-3) and so forth. It seems to be stacking up.
That's because you are creating one invisible token each time you use the ability, so their toughness modifiers are stacking.

First of all, remove the following block from the wall token:
Code: Select all
  <TRIGGERED_ABILITY internal="1">
    <TRIGGER value="END_OF_STEP">
    return Object():Tapped() == 0
    </TRIGGER>
    <RESOLUTION_TIME_ACTION>
       Object():Tap()
    </RESOLUTION_TIME_ACTION>
  </TRIGGERED_ABILITY>
this is needed for the mana tokens, but not for your wall token.

Then, since we are editing, I would suggest to apply the fix suggested by RiiakShiNal: one invisible token for each player. Modify the last RESOLUTION_TIME_ACTION (the one that creates the token) of your Wall of Roots as follows:
Code: Select all
    <RESOLUTION_TIME_ACTION>
    local filter = Object():GetFilter()
    filter:Clear()
    filter:NotTargetted()
    filter:AddCardName( "WALL_TOKEN" )
    filter:SetZone( ZONE_IN_PLAY )
    local num_players = MTG():GetNumberOfPlayers()
    for i=0,num_players-1 do
       local player = MTG():GetNthPlayer(i)
       if player ~= nil then
          filter:SetController( player )
          if filter:CountStopAt(1) == 0 then
             MTG():PutTokensIntoPlay( "WALL_TOKEN", 1, player )
          end
       end
    end
    </RESOLUTION_TIME_ACTION>
This will create a token for each player, only if there's no one yet. Note that you have to give your wall token a CARDNAME, if you didn't give it yet. The code I wrote assumes that the CARDNAME is "WALL_TOKEN" (if it's not, change the argument of filter:AddCardName accordingly). Don't make confusion with the FILENAME: the token has a FILENAME for sure, but maybe you left the CARDNAME empty because you didn't need it before.

Now, modify the FILTER of the last STATIC_ABILITY of your wall token as follows:
Code: Select all
    <FILTER>
    return CreaturesYouControl()
    </FILTER>
This will make each token influence only the player who controls it.

After this editing, everything should be OK.
< 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: 721 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 24 guests


Who is online

In total there are 24 users online :: 0 registered, 0 hidden and 24 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 24 guests

Login Form