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 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.
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...
Currently busy with life...
-
thefiremind - Programmer
- Posts: 3515
- Joined: 07 Nov 2011, 10:55
- Has thanked: 118 times
- Been thanked: 721 times
Re: Card Creation Request Thread
by zerocube » 12 Nov 2012, 16:29
Thanks it works now. But my game still crashes if an untapped land without mana ability is in play. 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.
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.
- zerocube
- Posts: 10
- Joined: 12 Nov 2012, 07:55
- Has thanked: 0 time
- Been thanked: 0 time
Re: Card Creation Request Thread
by 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
Yawgmoth's Will.
Grapeshot. storm can be done?
thanks
Re: Card Creation Request Thread
by thefiremind » 13 Nov 2012, 22:46
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.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
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 > 0 then
for i=1,storm_count do
EffectController():CopySpellWithNewTargets( Object() )
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: 721 times
Re: Card Creation Request Thread
by pluks » 14 Nov 2012, 03:47
thanks thefiremind you are always so cool
Re: Card Creation Request Thread
by Lirave » 14 Nov 2012, 12:13
i think stifle can neutralize storm, but i am not sure
Re: Card Creation Request Thread
by thefiremind » 14 Nov 2012, 12:29
That's right, but abilities cannot be countered in DotP games, so it can never happen.Lirave wrote:i think stifle can neutralize storm, but i am not sure
< 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: 721 times
Re: Card Creation Request Thread
by 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 , but after I select them, they dont come into play. the code was modelled after harrow.
- 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>
- zerocube
- Posts: 10
- Joined: 12 Nov 2012, 07:55
- Has thanked: 0 time
- Been thanked: 0 time
Re: Card Creation Request Thread
by 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:
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.
- Code: Select all
<RESOLUTION_TIME_ACTION>
local count = ObjectDC():Get_Int(0)
if count > 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>
- Code: Select all
local count = ObjectDC():Get_Int(0)
if count > 0 then
...
end
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...
Currently busy with life...
-
thefiremind - Programmer
- Posts: 3515
- Joined: 07 Nov 2011, 10:55
- Has thanked: 118 times
- Been thanked: 721 times
Re: Card Creation Request Thread
by 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.
- zerocube
- Posts: 10
- Joined: 12 Nov 2012, 07:55
- Has thanked: 0 time
- Been thanked: 0 time
Re: Card Creation Request Thread
by Lirave » 16 Nov 2012, 14:55
hi did somebody already code a Planeswalker ?
edit: plainswalker to Planeswalker
edit: plainswalker to Planeswalker
Last edited by Lirave on 16 Nov 2012, 22:53, edited 1 time in total.
Re: Card Creation Request Thread
by thefiremind » 16 Nov 2012, 15:18
Impossible, they are not supported by any DotP game.Lirave wrote:hi did somebody already code a plainswalker ?
< 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: 721 times
Re: Card Creation Request Thread
by 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).
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: 2185
- Joined: 16 May 2011, 21:37
- Has thanked: 75 times
- Been thanked: 497 times
Re: Card Creation Request Thread
by 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 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
Thanks a lot!
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 > 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" />
- 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>
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
by thefiremind » 17 Nov 2012, 23:12
That's because you are creating one invisible token each time you use the ability, so their toughness modifiers are stacking.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.
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>
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>
Now, modify the FILTER of the last STATIC_ABILITY of your wall token as follows:
- Code: Select all
<FILTER>
return CreaturesYouControl()
</FILTER>
After this editing, everything should be OK.
< 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: 721 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 24 guests