It is currently 27 Jun 2025, 15:03
   
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 NEMESiS » 19 Jun 2013, 01:18

Very simple question, when I want to draw 2 cards when I kick a spell how does it have to be made?

Code: Select all
    <RESOLUTION_TIME_ACTION>
    local kicker = Object():Kicked()
    if kicker ~= 0 then
       EffectController():DrawCard()
    end
    </RESOLUTION_TIME_ACTION>
That is from into the roil but I have tried mixing it with Divination but I can't seem to get it right....
User avatar
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

Postby RiiakShiNal » 19 Jun 2013, 01:29

If you just want to draw 2 cards when kicked then just double the calls to DrawCard():
Code: Select all
    <RESOLUTION_TIME_ACTION>
    local kicker = Object():Kicked()
    if kicker ~= 0 then
       EffectController():DrawCard()
       EffectController():DrawCard()
    end
    </RESOLUTION_TIME_ACTION>
Or you could use the PlayerDrawCards() function:
Code: Select all
    <RESOLUTION_TIME_ACTION>
    local kicker = Object():Kicked()
    if kicker ~= 0 then
       PlayerDrawCards( EffectController(), 2 )
    end
    </RESOLUTION_TIME_ACTION>
RiiakShiNal
Programmer
 
Posts: 2188
Joined: 16 May 2011, 21:37
Has thanked: 75 times
Been thanked: 497 times

Re: Card Creation Request Thread

Postby gorem2k » 19 Jun 2013, 01:46

RiiakShiNal wrote:Try this:
Code: Select all
  <ACTIVATED_ABILITY auto_skip="1">
    <LOCALISED_TEXT LanguageCode="en-US"><![CDATA[{1}{R}: Put a +1/+1 counter on Ashling the Pilgrim. If this is the third time this ability has resolved this turn, remove all +1/+1 counters from Ashling the Pilgrim, and it deals that much damage to each creature and each player.]]></LOCALISED_TEXT>
    <COST type="Mana" cost="{1}{R}" />
    <RESOLUTION_TIME_ACTION>
    if EffectSource() ~= nil then
       EffectSource():AddCounters( MTG():PlusOnePlusOneCounters(), 1 )
    end
    ObjectDC():Int_Inc(0)
    </RESOLUTION_TIME_ACTION>
    <RESOLUTION_TIME_ACTION>
    if (ObjectDC():Int_Get(0) == 3) then
       local num_counters = EffectSource():CountCounters( MTG():PlusOnePlusOneCounters() )
       if (num_counters &gt; 0) then
          -- Deal damage to players
          for i=0,MTG():GetNumberOfPlayers()-1 do
             MTG():GetNthPlayer(i):DealDamage( num_counters, EffectSource() )
          end
          -- Deal damage to creatures
          local oFilter = Object():GetFilter()
          oFilter:Clear()
          oFilter:AddCardType( CARD_TYPE_CREATURE )
          oFilter:SetZone( ZONE_IN_PLAY )
          local nCount = oFilter:EvaluateObjects()
          if (nCount &gt; 0) then
             for i=0,nCount-1 do
                local oCard = oFilter:GetNthEvaluatedObject(i)
                if (oCard ~= nil) then
                   oCard:DealDamage( num_counters, EffectSource() )
                end
             end
          end
       end
    end
    </RESOLUTION_TIME_ACTION>
  </ACTIVATED_ABILITY>
  <TRIGGERED_ABILITY internal="1" active_zone="ZONE_ANY">
    <TRIGGER value="TRIGGER_END_OF_TURN" />
    <RESOLUTION_TIME_ACTION>
      ObjectDC():Int_Set( 0, 0 )
    </RESOLUTION_TIME_ACTION>
  </TRIGGERED_ABILITY>
Edit: Forgot to add the triggered ability to reset the count, now added.
Almost! it doesn't remove any counter after damage. and if I activate 3 more times after that, there's no damage.
gorem2k
 
Posts: 464
Joined: 01 Apr 2013, 04:21
Has thanked: 48 times
Been thanked: 33 times

Re: Card Creation Request Thread

Postby NEMESiS » 19 Jun 2013, 02:04

@Sumomole, for some reason Survival Cache does not rebound. I even copied and pasted it from Distortion Strike and no luck.
User avatar
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

Postby RiiakShiNal » 19 Jun 2013, 02:25

gorem2k wrote:Almost! it doesn't remove any counter after damage. and if I activate 3 more times after that, there's no damage.
Ahh, forgot about that, I really should stop coding when I'm tired.
Code: Select all
  <ACTIVATED_ABILITY auto_skip="1">
    <LOCALISED_TEXT LanguageCode="en-US"><![CDATA[{1}{R}: Put a +1/+1 counter on Ashling the Pilgrim. If this is the third time this ability has resolved this turn, remove all +1/+1 counters from Ashling the Pilgrim, and it deals that much damage to each creature and each player.]]></LOCALISED_TEXT>
    <COST type="Mana" cost="{1}{R}" />
    <RESOLUTION_TIME_ACTION>
    if EffectSource() ~= nil then
       EffectSource():AddCounters( MTG():PlusOnePlusOneCounters(), 1 )
    end
    ObjectDC():Int_Inc(0)
    </RESOLUTION_TIME_ACTION>
    <RESOLUTION_TIME_ACTION>
    if (ObjectDC():Int_Get(0) == 3) then
       local num_counters = EffectSource():CountCounters( MTG():PlusOnePlusOneCounters() )
       if (num_counters &gt; 0) then
          EffectSource():RemoveCounters( MTG():PlusOnePlusOneCounters(), num_counters )
          -- Deal damage to players
          for i=0,MTG():GetNumberOfPlayers()-1 do
             MTG():GetNthPlayer(i):DealDamage( num_counters, EffectSource() )
          end
          -- Deal damage to creatures
          local oFilter = Object():GetFilter()
          oFilter:Clear()
          oFilter:AddCardType( CARD_TYPE_CREATURE )
          oFilter:SetZone( ZONE_IN_PLAY )
          local nCount = oFilter:EvaluateObjects()
          if (nCount &gt; 0) then
             for i=0,nCount-1 do
                local oCard = oFilter:GetNthEvaluatedObject(i)
                if (oCard ~= nil) then
                   oCard:DealDamage( num_counters, EffectSource() )
                end
             end
          end
       end
    end
    </RESOLUTION_TIME_ACTION>
  </ACTIVATED_ABILITY>
  <TRIGGERED_ABILITY internal="1" active_zone="ZONE_ANY">
    <TRIGGER value="TRIGGER_END_OF_TURN" />
    <RESOLUTION_TIME_ACTION>
      ObjectDC():Int_Set( 0, 0 )
    </RESOLUTION_TIME_ACTION>
  </TRIGGERED_ABILITY>
Edit: As per the ruling: "You get the bonus only the third time the ability resolves. You won't get the bonus the fourth, fifth, sixth, or any subsequent times." it will only do the extra bit on the third activation in a turn, if you activate it 3 more times in the same turn it should not activate again.
RiiakShiNal
Programmer
 
Posts: 2188
Joined: 16 May 2011, 21:37
Has thanked: 75 times
Been thanked: 497 times

Re: Card Creation Request Thread

Postby gorem2k » 19 Jun 2013, 02:49

RiiakShiNal wrote:
gorem2k wrote:Almost! it doesn't remove any counter after damage. and if I activate 3 more times after that, there's no damage.
Ahh, forgot about that, I really should stop coding when I'm tired.
Code: Select all
  <ACTIVATED_ABILITY auto_skip="1">
    <LOCALISED_TEXT LanguageCode="en-US"><![CDATA[{1}{R}: Put a +1/+1 counter on Ashling the Pilgrim. If this is the third time this ability has resolved this turn, remove all +1/+1 counters from Ashling the Pilgrim, and it deals that much damage to each creature and each player.]]></LOCALISED_TEXT>
    <COST type="Mana" cost="{1}{R}" />
    <RESOLUTION_TIME_ACTION>
    if EffectSource() ~= nil then
       EffectSource():AddCounters( MTG():PlusOnePlusOneCounters(), 1 )
    end
    ObjectDC():Int_Inc(0)
    </RESOLUTION_TIME_ACTION>
    <RESOLUTION_TIME_ACTION>
    if (ObjectDC():Int_Get(0) == 3) then
       local num_counters = EffectSource():CountCounters( MTG():PlusOnePlusOneCounters() )
       if (num_counters &gt; 0) then
          EffectSource():RemoveCounters( MTG():PlusOnePlusOneCounters(), num_counters )
          -- Deal damage to players
          for i=0,MTG():GetNumberOfPlayers()-1 do
             MTG():GetNthPlayer(i):DealDamage( num_counters, EffectSource() )
          end
          -- Deal damage to creatures
          local oFilter = Object():GetFilter()
          oFilter:Clear()
          oFilter:AddCardType( CARD_TYPE_CREATURE )
          oFilter:SetZone( ZONE_IN_PLAY )
          local nCount = oFilter:EvaluateObjects()
          if (nCount &gt; 0) then
             for i=0,nCount-1 do
                local oCard = oFilter:GetNthEvaluatedObject(i)
                if (oCard ~= nil) then
                   oCard:DealDamage( num_counters, EffectSource() )
                end
             end
          end
       end
       ObjectDC():Int_Set( 0, 0 )
    end
    </RESOLUTION_TIME_ACTION>
  </ACTIVATED_ABILITY>
  <TRIGGERED_ABILITY internal="1" active_zone="ZONE_ANY">
    <TRIGGER value="TRIGGER_END_OF_TURN" />
    <RESOLUTION_TIME_ACTION>
      ObjectDC():Int_Set( 0, 0 )
    </RESOLUTION_TIME_ACTION>
  </TRIGGERED_ABILITY>
Better! but I suggest you take a good rest. before reading further :mrgreen:

it only triggers when there are 3 counters on it, so I can't put 2 counters then another 2 on next turn. it will reset at 3 everytime. sorry about that...
gorem2k
 
Posts: 464
Joined: 01 Apr 2013, 04:21
Has thanked: 48 times
Been thanked: 33 times

Re: Card Creation Request Thread

Postby RiiakShiNal » 19 Jun 2013, 02:52

gorem2k wrote:Better! but I suggest you take a good rest. before reading further :mrgreen:

it only triggers when there are 3 counters on it, so I can't put 2 counters then another 2 on next turn. sorry about that...
Actually, it does not trigger when there are 3 counters it triggers "If this is the third time this ability has resolved this turn", so yes you can add 2 counters one turn then 2 more the next turn, and so on.

Maybe we both need some rest.

Edit: Nevermind, I misread what you meant there. I have an error in my internal TRIGGERED_ABILITY:
The TRIGGER should be:
Code: Select all
    <TRIGGER value="END_OF_TURN" />
I really do need some rest. #-o
RiiakShiNal
Programmer
 
Posts: 2188
Joined: 16 May 2011, 21:37
Has thanked: 75 times
Been thanked: 497 times

Re: Card Creation Request Thread

Postby sumomole » 19 Jun 2013, 07:46

NEMESiS wrote:@Sumomole, for some reason Survival Cache does not rebound. I even copied and pasted it from Distortion Strike and no luck.
Rebound effect has two parts, the 1st part is in spell to exile itself, and the 2nd part is a trigger ability to play itself from exile. do you have copied and pasted both?
User avatar
sumomole
Programmer
 
Posts: 611
Joined: 07 Jun 2011, 08:34
Has thanked: 51 times
Been thanked: 234 times

Re: Card Creation Request Thread

Postby castled » 19 Jun 2013, 08:37

I wanna have some cards below :)
Image
Image special rule: If you have no card but the card you take from this effect, you can choose not to discard this one.
Image
Image
Image
castled
 
Posts: 84
Joined: 09 Oct 2010, 14:50
Location: Shenzhen,China
Has thanked: 16 times
Been thanked: 1 time

Re: Card Creation Request Thread

Postby NEMESiS » 19 Jun 2013, 10:49

sumomole wrote:
NEMESiS wrote:@Sumomole, for some reason Survival Cache does not rebound. I even copied and pasted it from Distortion Strike and no luck.
Rebound effect has two parts, the 1st part is in spell to exile itself, and the 2nd part is a trigger ability to play itself from exile. do you have copied and pasted both?
Apparently I had missed part of that. :oops:

Sorry to bother you.
User avatar
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

Postby sumomole » 19 Jun 2013, 12:36

castled wrote:I wanna have some cards below :)
You can find Doomsday & Gamble in my mod.
If you want to use Omnath, Locus of Mana, you need my mana token and mana fuction, since D13 is no mana pool, also, all mana source must can be manually tapped, for example, I have coded a FOREST_624993 that can be manually tapped, and more need to code your own. :)
Attachments
cards.zip
Windfall & Molten Psyche & Omnath, Locus of Mana
(555.9 KiB) Downloaded 334 times
User avatar
sumomole
Programmer
 
Posts: 611
Joined: 07 Jun 2011, 08:34
Has thanked: 51 times
Been thanked: 234 times

Re: Card Creation Request Thread

Postby gorem2k » 19 Jun 2013, 19:24

Thefiremind, I hate to be picky and annoying but could you please recheck Crackleburr because if I start activating one of his abilities and I cancel it before it resolves, I can't reactivate later during my turn.... I sometimes pick the wrong creature when choosing targets. thanks a zillion, I like this card a lot!

plays fine. disregard
Last edited by gorem2k on 20 Jun 2013, 19:45, edited 1 time in total.
gorem2k
 
Posts: 464
Joined: 01 Apr 2013, 04:21
Has thanked: 48 times
Been thanked: 33 times

Re: Card Creation Request Thread

Postby NEMESiS » 20 Jun 2013, 02:52

Does anyone have Skeletal Scrying? Also, if someone can give me the graveyard ability for Undead Gladiator would be greatly appreciated.
User avatar
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

Postby sumomole » 20 Jun 2013, 12:50

NEMESiS wrote:Does anyone have Skeletal Scrying? Also, if someone can give me the graveyard ability for Undead Gladiator would be greatly appreciated.
Here
User avatar
sumomole
Programmer
 
Posts: 611
Joined: 07 Jun 2011, 08:34
Has thanked: 51 times
Been thanked: 234 times

Re: Card Creation Request Thread

Postby castled » 21 Jun 2013, 13:33

thx you very very very much, code of 2013 is extremely different to 2012
I still want 2 cards...
ImageImage

and... how can you deal with some card like this
Image
rule http://www.mtgdeckbuilder.net/forums/messages.aspx?TopicID=3067
castled
 
Posts: 84
Joined: 09 Oct 2010, 14:50
Location: Shenzhen,China
Has thanked: 16 times
Been thanked: 1 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 3 guests

Main Menu

User Menu

Our Partners


Who is online

In total there are 3 users online :: 0 registered, 0 hidden and 3 guests (based on users active over the past 10 minutes)
Most users ever online was 5050 on 26 Jun 2025, 06:02

Users browsing this forum: No registered users and 3 guests

Login Form