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 » 09 Apr 2013, 11:53
To be honest, I don't know. I'll try and let you know the results.Vasht wrote:is it possible to code Aurelia's Fury ?
EDIT: My hopes weren't very high, but from a brief test, it seems to work right. Luckily, GetObjectX() gets its value immediately after

I didn't pay much attention to the AI_AVAILABILITY (I copied them from Shock), but now that I think about it, the "side-effects" of the damage could make it good to play during any player's main phase, so if you want, you can change
- Code: Select all
<AI_AVAILABILITY step="main_1" turn="my_turn" />
- Code: Select all
<AI_AVAILABILITY step="main_1" />
- Attachments
-
AURELIAS_FURY_366384.zip
- (104.13 KiB) Downloaded 297 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 sumomole » 09 Apr 2013, 13:33
Perhaps we can make a choice at the STEP_BEGIN_COMBAT to choose attack alone or not, if we choose attack alone, all others creature can't attack this combat, otherwise Master of Cruelties can't attack.thefiremind wrote:I like Master of Cruelties even more, too bad we don't have a CHARACTERISTIC_MUST_ATTACK_ALONE so we can't code it.
I also try Vorel of the Hull Clade, but it seems no way unless list all type of counter.

-
sumomole - Programmer
- Posts: 611
- Joined: 07 Jun 2011, 08:34
- Has thanked: 51 times
- Been thanked: 234 times
Re: Card Creation Request Thread
by thefiremind » 10 Apr 2013, 08:56
I had an idea about it, but it would require a big programming effort, anyway if you want to try here it is: give Vorel a trigger that works in any zone and saves the CounterTypeIndex of the counters each permanent gets in a 2-dimensional array (you can use 2 ObjectDC chests, being careful that they don't get wiped on zonechange, or declare a suitable array in a LOL file), this way when you select a target for his ability, you already know which kinds of counters it has. A bit crazy, but it could work.sumomole wrote:I also try Vorel of the Hull Clade, but it seems no way unless list all type of counter.
< 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 sumomole » 10 Apr 2013, 16:45
I try to code Static Orb(It's much like Stoic Angel), I use three triggered ability, the first ability to prevent all permanents to untap at the untap step, then save the card in ObjectDC() which has been prevented, the second ability to make player choose two cards among ObjectDC() to untap, the third ability to clear ObjectDC(). It seems to work fine, but I don't know whether it's conflict with any rule.thefiremind wrote:That's how I would have made it first, but then I thought that this method isn't totally right: if a creature cannot untap by itself (for example Deep-Slumber Titan), you shouldn't be able to untap it with Stoic Angel as well... but if you give the same characteristic to all creatures, how can you figure out which creatures had it from before?AriesKiki wrote:Here it is.
I made a lot of tests but couldn't find a 100% rule-compliant way to code it.
- Code: Select all
<TRIGGERED_ABILITY resource_id="1" internal="1" pre_trigger="1" filter_zone="ZONE_IN_PLAY">
<TRIGGER value="BECAME_UNTAPPED">
if ( TriggerObject():GetController():MyTurn() ~= 0 ) and ( MTG():GetStep() == STEP_UNTAP ) then
local untap_count = ObjectDC():Get_Int(0)
if untap_count > 0 then
for i=0,untap_count-1 do
local card = ObjectDC():Get_CardPtr(i)
if card ~= nil and card == TriggerObject() then
return false
end
end
end
override = true
return true
end
return false
</TRIGGER>
<RESOLUTION_TIME_ACTION>
if TriggerObject() ~= nil then
local untap_count = ObjectDC():Get_Int(0)
ObjectDC():Set_CardPtr(1 + untap_count, TriggerObject())
ObjectDC():Set_Int(0, untap_count + 1)
end
</RESOLUTION_TIME_ACTION>
</TRIGGERED_ABILITY>
- Code: Select all
<TRIGGERED_ABILITY resource_id="2" replacement_query="1" filter_zone="ZONE_IN_PLAY">
<TRIGGER value="BEGINNING_OF_STEP">
return ( TriggerPlayer():MyTurn() ~= 0 ) and ( MTG():GetStep() == STEP_UNTAP )
</TRIGGER>
<RESOLUTION_TIME_ACTION>
local player = TriggerPlayer()
local untap_count = ObjectDC():Get_Int(0)
local filter = Object():GetFilter()
if player ~= nil and untap_count > 0 then
MTG():ClearFilterMarkedObjectsInZone(ZONE_IN_PLAY)
filter:Clear()
filter:NotTargetted()
filter:SetController( player )
filter:SetZone( ZONE_IN_PLAY )
filter:AddCardType( CARD_TYPE_ARTIFACT )
filter:AddCardType( CARD_TYPE_CREATURE )
filter:AddCardType( CARD_TYPE_ENCHANTMENT )
filter:AddCardType( CARD_TYPE_LAND )
filter:AddCardType( CARD_TYPE_PLANESWALKER )
local total = filter:EvaluateObjects()
if total > 0 then
for i=0,total-1 do
local permanent = filter:GetNthEvaluatedObject(i)
if permanent ~= nil then
for j=1,untap_count do
local card = ObjectDC():Get_CardPtr(j)
if card ~= nil and card == permanent then
permanent:MarkForFilter()
end
end
end
end
end
filter:SetMarkedObjectsOnly()
filter:SetHint( HINT_ALLIED, player )
player:SetTargetCount( 2 )
player:SetTargetPrompt( 0, "CARD_QUERY_CHOOSE_PERMANENT_TO_UNTAP" )
player:SetTargetPrompt( 1, "CARD_QUERY_CHOOSE_PERMANENT_TO_UNTAP" )
player:ChooseTargetsWithFlags( NO_VALIDATION, EffectDC():Make_Targets(0), QUERY_FLAG_CAN_BE_FINISHED_EARLY + QUERY_FLAG_CAN_BE_FINISHED_EARLY_FOR_AI_AS_WELL )
end
</RESOLUTION_TIME_ACTION>
<RESOLUTION_TIME_ACTION>
for i = 0,1 do
local target = EffectDC():Get_Targets(0) and EffectDC():Get_Targets(0):Get_CardPtr(i)
if target ~= nil then
target:Untap()
end
end
</RESOLUTION_TIME_ACTION>
</TRIGGERED_ABILITY>
- Code: Select all
<TRIGGERED_ABILITY resource_id="3" internal="1" pre_trigger="1" filter_zone="ZONE_IN_PLAY">
<TRIGGER value="BEGINNING_OF_STEP">
return ( TriggerPlayer():MyTurn() ~= 0 ) and ( MTG():GetStep() == STEP_UPKEEP )
</TRIGGER>
<RESOLUTION_TIME_ACTION>
ObjectDC():Clear()
</RESOLUTION_TIME_ACTION>
</TRIGGERED_ABILITY>
It's a good idea. I will start with the PlusOnePlusOneCounter and MinusOneMinusOneCounter, if there is no problem, maybe all can be successful.thefiremind wrote:I had an idea about it, but it would require a big programming effort, anyway if you want to try here it is: give Vorel a trigger that works in any zone and saves the CounterTypeIndex of the counters each permanent gets in a 2-dimensional array (you can use 2 ObjectDC chests, being careful that they don't get wiped on zonechange, or declare a suitable array in a LOL file), this way when you select a target for his ability, you already know which kinds of counters it has. A bit crazy, but it could work.sumomole wrote:I also try Vorel of the Hull Clade, but it seems no way unless list all type of counter.

-
sumomole - Programmer
- Posts: 611
- Joined: 07 Jun 2011, 08:34
- Has thanked: 51 times
- Been thanked: 234 times
Re: Card Creation Request Thread
by RiiakShiNal » 10 Apr 2013, 17:22
I see two problems with your code for Static Orb:
If you were to somehow use the Player's DC instead of the Object's DC then you might be able to find a way to resolve this, but it will get very complex when trying to factor in different card effects and how they mix. Stoic Angel, Static Orb, Winter Orb, etc...
- The code does not check to make sure that Static Orb is untapped (it could be tapped with an Icy Manipulator for example). This can be easily fixed.
- If there are multiple Static Orbs or a Stoic Angel and a Static Orb in play then untapping will not work correctly.
- For example if there are 2 Static Orbs in play each orb would ask the player to choose 2 permanents and unless they choose the same two permanents then nothing will untap because each orb will prevent the chosen permanents from the other orb from being untapped.
- With a Stoic Angel and a Static Orb in play (assuming they are both using similar code) the Static Orb will ask which two permanents the player wants to untap while the Stoic Angel will ask which creature to untap and unless there is overlap between the two then like the case above they will prevent the cards chosen by the other from untapping. An exception here would be if the player chose two untap two non-creatures Stoic Angel would not interfere, but the Static Orb would still prevent the creature chosen by Stoic Angel from untapping.
If you were to somehow use the Player's DC instead of the Object's DC then you might be able to find a way to resolve this, but it will get very complex when trying to factor in different card effects and how they mix. Stoic Angel, Static Orb, Winter Orb, etc...
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: 2188
- Joined: 16 May 2011, 21:37
- Has thanked: 75 times
- Been thanked: 497 times
Re: Card Creation Request Thread
by sumomole » 10 Apr 2013, 19:56
Yes, you can see resource_id, I code a static ability to solve tap/untap problem and multiple Static Orb problem, but I forgot to consider the different card effects, thank you for reminding.RiiakShiNal wrote:I see two problems with your code for Static Orb:

-
sumomole - Programmer
- Posts: 611
- Joined: 07 Jun 2011, 08:34
- Has thanked: 51 times
- Been thanked: 234 times
Re: Card Creation Request Thread
by thefiremind » 11 Apr 2013, 12:13
Here's Rubblebelt Raiders (I made it some time ago), I'll make the other one later.
- Attachments
-
RUBBLEBELT_RAIDERS_366462.zip
- (106.88 KiB) Downloaded 263 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 sulivandhi » 11 Apr 2013, 12:50

I'm a new user studying coding of cards. But seems it's not that easy for me.
I want to make a card that can give other cards in graveyard "Flashback" ability, such as "Snapcaster Mage" or "Past in Flames". But I don't know how to code the wanted ability: providing one or more cards with Flashback and setting the Flashback cost equal to the card's casting cost.
Please help!
- sulivandhi
- Posts: 6
- Joined: 11 Apr 2013, 12:45
- Has thanked: 1 time
- Been thanked: 0 time
Re: Card Creation Request Thread
by thefiremind » 11 Apr 2013, 13:20
Not everything can be coded in DotP games. So be aware that something could be not just hard, but impossible.sulivandhi wrote:Hi everyone!
I'm a new user studying coding of cards. But seems it's not that easy for me.
This is a good example of an impossible thing.sulivandhi wrote:I want to make a card that can give other cards in graveyard "Flashback" ability, such as "Snapcaster Mage" or "Past in Flames". But I don't know how to code the wanted ability: providing one or more cards with Flashback and setting the Flashback cost equal to the card's casting cost.
Please help!

---------------------
EDIT: I made Burn at the Stake and also tested it briefly because I had an idea that I wanted to try: when you set an animation for a spell/ability, the animation is usually directed towards all the targets, included those that you selected for the spell/ability cost. My idea was to free the register that contained the creatures selected as cost (once you tapped them you don't need to remember them, just how many they were) so that the "fake" targets get wiped, and the animation is directed only towards the "real" target. It works!

- Attachments
-
BURN_AT_THE_STAKE_271120.zip
- (111.1 KiB) Downloaded 228 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 Blue Ghost » 11 Apr 2013, 20:28
Does the BECAME_TAPPED_FOR_MANA trigger work? I tried it, and it doesn't seem to trigger. If not, is there a workaround for it?
(Card in question is Forbidden Orchard.)
(Card in question is Forbidden Orchard.)
- Blue Ghost
- Posts: 52
- Joined: 07 Apr 2013, 20:41
- Has thanked: 6 times
- Been thanked: 0 time
Re: Card Creation Request Thread
by thefiremind » 11 Apr 2013, 20:52
I remember it working for basic lands only, but someone reported that it doesn't work at all. In both cases, no luck for Forbidden Orchard.Blue Ghost wrote:Does the BECAME_TAPPED_FOR_MANA trigger work? I tried it, and it doesn't seem to trigger. If not, is there a workaround for it?
(Card in question is Forbidden Orchard.)
How are you planning to code the "Add one mana of any color"? If you use mana tokens + activated ability, you can add the 1/1 Spirit spawning to the activated ability itself.
< 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 Blue Ghost » 11 Apr 2013, 23:16
I'm not really clear on how to use mana tokens. I've looked at some of the codes for cards that use mana tokens, and they seem really complicated. How would one implement an ability like Forbidden Orchard's with mana tokens?
- Blue Ghost
- Posts: 52
- Joined: 07 Apr 2013, 20:41
- Has thanked: 6 times
- Been thanked: 0 time
Re: Card Creation Request Thread
by Atlas » 12 Apr 2013, 08:10
hi guys i would like to request a couple of cards
Reckless Waif
Gatstaf Shepherd
Moonmist
Immerwolf
Instigator Gang
Mondronen Shaman
Afflicted Deserter
please please help iv tried making a couple myself but they have failed horribly i just dont have enough experience at this:(
Reckless Waif
Gatstaf Shepherd
Moonmist
Immerwolf
Instigator Gang
Mondronen Shaman
Afflicted Deserter
please please help iv tried making a couple myself but they have failed horribly i just dont have enough experience at this:(
- Atlas
- Posts: 9
- Joined: 28 Mar 2013, 07:08
- Has thanked: 0 time
- Been thanked: 0 time
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 4 guests