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 Scion of Darkness » 28 May 2013, 15:55
Just one last question i made some more ogres with this filter code here:
- Code: Select all
<TRIGGER value="BEGINNING_OF_STEP" simple_qualifier="controller">
return ( EffectDC():Get_PlayerPtr(0):MyTurn() ~= 0 ) and ( MTG():GetStep() == STEP_UPKEEP )
</TRIGGER>
<FILTER>
return (FilteredCard():GetSubType():Test(CREATURE_TYPE_OGRE) == 0 and
FilteredCard():GetZone() == ZONE_IN_PLAY and
FilteredCard():GetPlayer() == Object():GetPlayer())
</FILTER>
<RESOLUTION_TIME_ACTION>
if FilteredCard() == nil then
local player = EffectController()
local filter = Object():GetFilter()
filter:Clear()
filter:NotTargetted()
filter:SetController( player )
filter:SetZone( ZONE_IN_PLAY )
filter:AddCardType( CARD_TYPE_CREATURE )
filter:SetHint( HINT_ENEMY, player )
player:ChooseTarget( NO_VALIDATION, "CARD_QUERY_CHOOSE_CREATURE_TO_SACRIFICE", EffectDC():Make_Targets(0) )
</RESOLUTION_TIME_ACTION>
<RESOLUTION_TIME_ACTION>
local target = EffectDC():Get_Targets(0):Get_CardPtr(0)
if target ~= nil then
target:Sacrifice(EffectController())
end
</RESOLUTION_TIME_ACTION>
- Code: Select all
<TRIGGER value="BEGINNING_OF_STEP" simple_qualifier="controller">
return ( EffectDC():Get_PlayerPtr(0):MyTurn() ~= 0 ) and ( MTG():GetStep() == STEP_UPKEEP )
</TRIGGER>
<FILTER>
return (FilteredCard():GetSubType():Test(CREATURE_TYPE_OGRE) == 0 and
FilteredCard():GetZone() == ZONE_IN_PLAY and
FilteredCard():GetPlayer() == Object():GetPlayer())
</FILTER>
<RESOLUTION_TIME_ACTION>
if FilteredCard() == nil then
MillCards( EffectController, 1 )
end
</RESOLUTION_TIME_ACTION>
</TRIGGERED_ABILITY>
-
Scion of Darkness - Posts: 235
- Joined: 27 Aug 2012, 13:14
- Has thanked: 17 times
- Been thanked: 23 times
Re: Card Creation Request Thread
by thefiremind » 28 May 2013, 15:58
Because you didn't set that PlayerPtr(0) anywhere before using it.Scion of Darkness wrote:and this don't crash the game but returns the folowing error (TRIGGER) [2643]"]:2: attempt to index a nil value why?
You also forgot () after EffectController in the RESOLUTION_TIME_ACTION of the second trigger.
EDIT: now that I look at your code better, I think it doesn't have much sense... you are doing something if FilteredCard() == nil... to be honest I really don't know how many times that code will be executed. Which abilities are you trying to make?
---------------------------------
Here's Lim-Dûl's Vault for libertyfighter. It also includes a TEXT_PERMANENT XML because understanding the query is crucial in my implementation. The problem is, it seems that the AI doesn't understand the purpose of the card, so it never uses it. Here you can find sumomole's attempt, but it suffers the same problem. If someone finds a better implementation, please share it.
- Attachments
-
LIMDULS_VAULT_3223.zip
- (105.14 KiB) Downloaded 383 times
< 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 Scion of Darkness » 28 May 2013, 16:06
i'll upload the cards its better =S
- Attachments
-
CARDS.zip
- (6.89 KiB) Downloaded 366 times
-
Scion of Darkness - Posts: 235
- Joined: 27 Aug 2012, 13:14
- Has thanked: 17 times
- Been thanked: 23 times
Re: Card Creation Request Thread
by thefiremind » 28 May 2013, 16:11
The "At the beginning of your upkeep" trigger is always the same, you don't need to use any pointers... copy the trigger condition from Ajani's Mantra or from another similar card. Then if you need to check whether you control an Ogre or not, do this:
P.S.: I used filter:CountStopAt(1) because you don't need to know exactly how many Ogres you control, just one is enough to invalidate the condition. If you ever need to count them all, you'll have to use filter:Count() which won't stop until all of them have been counted.
- Code: Select all
<RESOLUTION_TIME_ACTION>
local filter = Object():GetFilter()
filter:Clear()
filter:SetZone( ZONE_IN_PLAY )
filter:SetController( EffectController() )
filter:AddSubType( CREATURE_TYPE_OGRE )
if filter:CountStopAt(1) == 0 then
-- You don't control an Ogre, do your thing here.
end
</RESOLUTION_TIME_ACTION>
P.S.: I used filter:CountStopAt(1) because you don't need to know exactly how many Ogres you control, just one is enough to invalidate the condition. If you ever need to count them all, you'll have to use filter:Count() which won't stop until all of them have been counted.
< 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 Master Necro » 28 May 2013, 16:26
I have made a working Cloistered Youth , now I only need Soul Seizer and Loyal Cathar.Master Necro wrote:Thanks!
And I still need Soul Seizer , Loyal Cathar and Cloistered Youth .

-
Master Necro - Posts: 259
- Joined: 24 Apr 2013, 18:25
- Has thanked: 83 times
- Been thanked: 21 times
Re: Card Creation Request Thread
by gorem2k » 29 May 2013, 00:28
I would like Stranglehold and Boldwyr Heavyweights, please! and I also need a decent artwork for Thundercloud Shaman; mine is crap 320 x 200 px or something... thanks a lot.
Re: Card Creation Request Thread
by sumomole » 29 May 2013, 01:10
Stranglehold is impossible.gorem2k wrote:I would like Stranglehold and Boldwyr Heavyweights, please! and I also need a decent artwork for Thundercloud Shaman; mine is crap 320 x 200 px or something... thanks a lot.
- Attachments
-
Boldwyr Heavyweights.zip
- (223.92 KiB) Downloaded 415 times
-
sumomole - Programmer
- Posts: 611
- Joined: 07 Jun 2011, 08:34
- Has thanked: 51 times
- Been thanked: 234 times
Re: Card Creation Request Thread
by gorem2k » 29 May 2013, 01:23
Stranglehold is impossible.

I was just looking the list of PLAYER_CHARACTERISTIC_CANT_ and you're right there are things for lifegain or abilities but no search library.
alright then, I'll try another way to make this 8/8 playable.
Re: Card Creation Request Thread
by AriesKiki » 29 May 2013, 02:54
May I request Kazuul, Tyrant of the Cliffs? Thanks!
Re: Card Creation Request Thread
by NEMESiS » 29 May 2013, 03:55
This is what I have:sumomole wrote:Transguild Promenade=Avatar of Discord(main), the format of conditional cost as same as ohter cost, e.g.Kicker.
- Code: Select all
<TRIGGER value="ZONECHANGE_END" simple_qualifier="self" to_zone="ZONE_IN_PLAY" />
<TARGET_DEFINITION id="6">
local filter = Object():GetFilter()
filter:Clear()
filter:SetPlayer( EffectController() )
filter:NotTargetted()
</TARGET_DEFINITION>
<RESOLUTION_TIME_ACTION>
local controller = EffectController()
if controller ~= nil and AtLeastNTargetsFromDefinition( 6 ) == 1 then
controller:BeginNewMultipleChoice()
controller:AddMultipleChoiceAnswer( "CARD_QUERY_OPTION_YES" )
controller:AddMultipleChoiceAnswer( "CARD_QUERY_OPTION_NO" )
controller:AskMultipleChoiceQuestion( "CONDITIONAL_QUESTION_BODY" )
end
</RESOLUTION_TIME_ACTION>
<RESOLUTION_TIME_ACTION>
local controller = EffectController()
if controller ~= nil then
if controller:CanAfford("{1}") == 1 and Object():GetMultipleChoiceResult() == 0 then
ObjectDC():Set_Int( 6 )
controller:TapLand("{1}")
elseif EffectSource() ~= nil then
EffectSource():Sacrifice(controller)
end
end
</RESOLUTION_TIME_ACTION>
</TRIGGERED_ABILITY>
-
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 Master Necro » 29 May 2013, 05:30
Believe it or not I have managed to make Soul Seizer all by my self and it works.Master Necro wrote:
I have made a working Cloistered Youth , now I only need Soul Seizer and Loyal Cathar.

But the Loyal Cathar is obviously beyond what I can do, I did try but I get crashes, could anyone take a look please:
- Attachments
-
Cathar.rar
- (760.24 KiB) Downloaded 388 times
-
Master Necro - Posts: 259
- Joined: 24 Apr 2013, 18:25
- Has thanked: 83 times
- Been thanked: 21 times
Re: Card Creation Request Thread
by sumomole » 29 May 2013, 05:51
AriesKiki wrote:May I request Kazuul, Tyrant of the Cliffs? Thanks!
Kazuul, Tyrant of the Cliffs.zip
- (193.6 KiB) Downloaded 444 times
I hope you look the code of Avatar of Discord, it has the answer you need, when you use conditional cost, if you pay, the action with conditional="if" will resolves, if not, the action with conditional="else" will resolves.NEMESiS wrote:Now it sacrifices itself if there are no lands but I don't get to answer anything when there is one. What am I doing wrong?
- condition cost | Open
- Code: Select all
<TRIGGERED_ABILITY>
<LOCALISED_TEXT LanguageCode="en-US"><![CDATA[When Transguild Promenade enters the battlefield, sacrifice it unless you pay {1}.]]></LOCALISED_TEXT>
<TRIGGER value="ZONECHANGE_END" simple_qualifier="self" to_zone="ZONE_IN_PLAY" />
<COST type="Mana" cost="{1}" qualifier="conditional" />
<RESOLUTION_TIME_ACTION conditional="else">
if EffectSource() ~= nil then
EffectSource():Sacrifice(EffectController())
end
</RESOLUTION_TIME_ACTION>
</TRIGGERED_ABILITY>
-
sumomole - Programmer
- Posts: 611
- Joined: 07 Jun 2011, 08:34
- Has thanked: 51 times
- Been thanked: 234 times
Re: Card Creation Request Thread
by BloodReyvyn » 29 May 2013, 06:11
https://www.dropbox.com/s/tceslyabsi5xe ... ip?v=0rc-sAriesKiki wrote:May I request Kazuul, Tyrant of the Cliffs? Thanks!
edit: damn you sumo

lol
Anyways, this card was really easy to do since thefiremind already made Slumbering Dragon, just use the same trigger (since there are no planeswalkers) and use the createtoken command.
"There's an experience worse than blindness - it's the certainty that your vision is perfect and the horror that there's no world around you to see."
-
BloodReyvyn - Posts: 421
- Joined: 19 May 2013, 13:29
- Has thanked: 53 times
- Been thanked: 40 times
Re: Card Creation Request Thread
by sumomole » 29 May 2013, 06:26
Firstly, you need a delayed trigger ability, because it has "at the beginning of the next end step".Master Necro wrote:Believe it or not I have managed to make Soul Seizer all by my self and it works.Master Necro wrote:
I have made a working Cloistered Youth , now I only need Soul Seizer and Loyal Cathar.![]()
But the Loyal Cathar is obviously beyond what I can do, I did try but I get crashes, could anyone take a look please:
Secondly, you need to transform it before it comes into play, I'm not sure whether firemind's transform function can do this.
Thirdly, the second ability of Loyal Cathar will affect other double-faced cards, if another double-faced card that becomes a copy of Loyal Cathar and then dies will return to the battlefield with its back face up.
Good luck!

-
sumomole - Programmer
- Posts: 611
- Joined: 07 Jun 2011, 08:34
- Has thanked: 51 times
- Been thanked: 234 times
Re: Card Creation Request Thread
by Master Necro » 29 May 2013, 07:14
Phew that's lot of stuff.sumomole wrote:Firstly, you need a delayed trigger ability, because it has "at the beginning of the next end step".Master Necro wrote:Believe it or not I have managed to make Soul Seizer all by my self and it works.Master Necro wrote:
I have made a working Cloistered Youth , now I only need Soul Seizer and Loyal Cathar.![]()
But the Loyal Cathar is obviously beyond what I can do, I did try but I get crashes, could anyone take a look please:
Secondly, you need to transform it before it comes into play, I'm not sure whether firemind's transform function can do this.
Thirdly, the second ability of Loyal Cathar will affect other double-faced cards, if another double-faced card that becomes a copy of Loyal Cathar and then dies will return to the battlefield with its back face up.
Good luck!


But to no surprise whatsoever, I have an issue with another card, the Deranged Assistant .
It produces mana as soon as it goes on the battlefield and doesn't let me pay the cost first, I have looked up cards such as Avacyn's Pilgrim , Llanowar Elves and Silver Myr and they all have the same code so why won't Deranged Assistant work properly?
Help would be greatly appreciated.
- Attachments
-
Deranged Assistant.rar
- (409.68 KiB) Downloaded 575 times
-
Master Necro - Posts: 259
- Joined: 24 Apr 2013, 18:25
- Has thanked: 83 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 2 guests