It is currently 15 Sep 2025, 21:30
   
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 Scion of Darkness » 17 May 2013, 10:06

Sumomole you are sugesting to change the first line of code with te second? i didn't get it =) hehehe
User avatar
Scion of Darkness
 
Posts: 235
Joined: 27 Aug 2012, 13:14
Has thanked: 17 times
Been thanked: 23 times

Re: Card Creation Request Thread

Postby sumomole » 17 May 2013, 10:19

Scion of Darkness wrote:Sumomole you are sugesting to change the first line of code with te second? i didn't get it =) hehehe
No, you have used both, but should only use one of them, I suggest you only use the first, because that's the official code, of course you also need to modify the associated code. :)
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 Scion of Darkness » 17 May 2013, 10:45

Can someone test this please i've rewriten the card but i can't test it right now i'm at work hehehe


Thanks
Attachments
IZZET_CHARM_141806.zip
(1.67 KiB) Downloaded 389 times
User avatar
Scion of Darkness
 
Posts: 235
Joined: 27 Aug 2012, 13:14
Has thanked: 17 times
Been thanked: 23 times

Re: Card Creation Request Thread

Postby sumomole » 17 May 2013, 11:02

Scion of Darkness wrote:Can someone test this please i've rewriten the card but i can't test it right now i'm at work hehehe
1. Use the following code instead of your code:
Code: Select all
    <PLAY_TIME_ACTION>
    if EffectDC():Get_Int(2) == 1 then
       EffectController():ChooseTarget( 1, "CARD_QUERY_CHOOSE_CREATURE_DEAL_2_DAMAGE", EffectDC():Make_Targets(0) )
    end
    </PLAY_TIME_ACTION>
2. DiscardNCards often has bug, you can use the following code:
Code: Select all
    <RESOLUTION_TIME_ACTION>
     local decision = EffectDC():Get_Int(2)
    if decision == 2 then
      local filter = Object():GetFilter()
       filter:Clear()
       filter:NotTargetted()
       filter:SetPlayer( EffectController() )
       filter:SetZone( ZONE_HAND )
       filter:SetHint( HINT_ENEMY, EffectController() )
       EffectController():SetTargetCount(2)
       for i=0,1 do
          EffectController():SetTargetPrompt( i, "CARD_QUERY_CHOOSE_CARD_TO_DISCARD" )
       end
       EffectController():ChooseTargets( NO_VALIDATION, EffectDC():Make_Targets(1) )
    end
    </RESOLUTION_TIME_ACTION>
    <RESOLUTION_TIME_ACTION>
    local decision = EffectDC():Get_Int(2)
    if decision == 2 then
       local targetDC = EffectDC():Get_Targets(1)             
       if targetDC ~= nil then
          for i=0,1 do
             local target_card = targetDC:Get_CardPtr(i)
             if target_card ~= nil then
                target_card:Discard()
             end
          end
       end   
    end   
    </RESOLUTION_TIME_ACTION>
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 Scion of Darkness » 17 May 2013, 12:53

Thanks just made the changes, now just need to go home and test it hehehe ;) you're a life saver, do somebody here have a giant token ;)
User avatar
Scion of Darkness
 
Posts: 235
Joined: 27 Aug 2012, 13:14
Has thanked: 17 times
Been thanked: 23 times

Re: Card Creation Request Thread

Postby Master Necro » 17 May 2013, 23:01

Could someone check this for me, it just doesn't seem to work right:

P.S. I do have the function LOL for it if anyone asks.
Attachments
Signet.rar
(900 Bytes) Downloaded 344 times
User avatar
Master Necro
 
Posts: 259
Joined: 24 Apr 2013, 18:25
Has thanked: 83 times
Been thanked: 21 times

Re: Card Creation Request Thread

Postby East Bay » 17 May 2013, 23:22

Does any one have (or know of) a list of all counters supported by the engine? Just finished Vampire Hexmage but the .xml is huge so I want to remove the ones that aren't used.

I used all these counters so far:
Code: Select all
Age, Quest, Fade, Arrow, Feather, Ki, Blood, Devotion, Death, Bounty, Omen, Shred, Luck, Polyp, Poison, Mire, Depletion, Verse, Intervention, Wish, Spore, Scream, Elixir, Wind, Mining, Bribery, Tower, Hoofprint, Ice, Trasure, Divinity, Fate, Plague, Fuse, Charge, Fate, Plague, Matrix, Petal, Magnet, Winch, Study, Flood, Shell, Corpse, Soot, Fungus, Hourglass, Tide, Currency, Hatchling, Sleep, Chip, Funk, Eon, Training, Blaze, Mannequin, and Sleight.
User avatar
East Bay
 
Posts: 85
Joined: 17 Mar 2013, 02:05
Has thanked: 33 times
Been thanked: 30 times

Re: Card Creation Request Thread

Postby East Bay » 17 May 2013, 23:46

Master Necro wrote:Could someone check this for me, it just doesn't seem to work right:

P.S. I do have the function LOL for it if anyone asks.
http://www.slightlymagic.net/forum/viewtopic.php?f=63&t=7655&p=94245&hilit=signet#p94245

Your Signet:
Code: Select all
    <COST type="Mana" cost="{1}" />
   <COST type="TapSelf" />
    <PRODUCES amount="{B}{G}" />
nabeshin's Signet:
Code: Select all
      <COST type="Mana" cost="{1}"/>
      <COST type="TapSelf" />
      <RESOLUTION_TIME_ACTION>
      ProduceMana("U",1)
      ProduceMana("R",1)
      </RESOLUTION_TIME_ACTION>
2 for 1 needs mana tokens just change the letters of the colors from U/R to G/B
User avatar
East Bay
 
Posts: 85
Joined: 17 Mar 2013, 02:05
Has thanked: 33 times
Been thanked: 30 times

Re: Card Creation Request Thread

Postby sumomole » 18 May 2013, 00:29

East Bay wrote:Just finished Vampire Hexmage but the .xml is huge so I want to remove the ones that aren't used.
If you want, you can find all counters type in my functions, but firemind has invented a better way to get the counter type, I highly recommend it. :wink:
Vampire Hexmage is easy to code, doesn't need to know any counter type. :lol:
Code: Select all
    <RESOLUTION_TIME_ACTION>
    local target = EffectDC():Get_Targets(0):Get_CardPtr(0)
    if target ~= nil then
      for i=0,1 do
        local counter_type = target:GetBestOrWorstCounterType(i)
        while counter_type ~= 0 do
           local amount = target:CountCounters( counter_type )
           target:RemoveCounters( counter_type, amount )
            counter_type = target:GetBestOrWorstCounterType(i)
          end
       end
    end
    </RESOLUTION_TIME_ACTION>
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 Scion of Darkness » 18 May 2013, 04:23

I guess i'll need some more help the izzet charm isn't working yet, but now instead of force closing the DOTP the game just freeze but not totally, i can still concede or restart without problem =( this card is beating the crap out of me hehehe


I need professional help here
Attachments
izzet.zip
(2.4 KiB) Downloaded 351 times
User avatar
Scion of Darkness
 
Posts: 235
Joined: 27 Aug 2012, 13:14
Has thanked: 17 times
Been thanked: 23 times

Re: Card Creation Request Thread

Postby sumomole » 18 May 2013, 05:33

Scion of Darkness wrote:I guess i'll need some more help the izzet charm isn't working yet, but now instead of force closing the DOTP the game just freeze but not totally, i can still concede or restart without problem
Your code is ok, but there are a lot of basic errors, you should carefully check the structure of the code. :)
Izzet Charm | Open
Code: Select all
  <SPELL_ABILITY dangerous="1" filter_zone="ZONE_IN_PLAY">
    <LOCALISED_TEXT LanguageCode="en-US"><![CDATA[Choose One - Counter target noncreature spell unless its controller pays {2}; or Izzet Charm deals 2 damage to target creature; or draw two cards, then discard two cards.]]></LOCALISED_TEXT>
    <PLAY_TIME_ACTION>
    local player = EffectController()
    if player ~= nil then
       local has_first = AtLeastOneTargetFromDefinition(0)
       local has_second = AtLeastOneTargetFromDefinition(1)
      player:BeginNewMultipleChoice() 
       if has_first == 1 then
          player:AddMultipleChoiceAnswer( "CARD_QUERY_CHOOSE_SPELL_TO_COUNTER" ) 
       else
          player:AddMultipleChoiceAnswer( "CARD_QUERY_CHOOSE_SPELL_TO_COUNTER", false )
       end
       if has_second == 1 then
          player:AddMultipleChoiceAnswer( "CARD_QUERY_CHOOSE_CREATURE_DEAL_2_DAMAGE" ) 
       else
          player:AddMultipleChoiceAnswer( "CARD_QUERY_CHOOSE_CREATURE_DEAL_2_DAMAGE", false )
       end
       player:AddMultipleChoiceAnswer( "CARD_QUERY_OPTION_DRAW_AND_DISCARD_TWO_CARDS" )
      player:AskMultipleChoiceQuestion( "CARD_QUERY_MC_CHOOSE_MODE" )
    end
    </PLAY_TIME_ACTION>
     <PLAY_TIME_ACTION>
    EffectDC():Set_Int( 2, Object():GetMultipleChoiceResult() )
    </PLAY_TIME_ACTION>
    <TARGET_DEFINITION id="0">
    local filter = Object():GetFilter()
    filter:Clear()
    filter:AddExtra( FILTER_EXTRA_FLIP_CARD_TYPES )
    filter:AddCardType( CARD_TYPE_CREATURE )
    filter:SetZone( ZONE_STACK )
    filter:SetStackObjectType( STACK_OBJECT_CARD )
    filter:SetHint( HINT_ENEMY_ONLY, EffectController() )
    </TARGET_DEFINITION>
    <TARGET_DEFINITION id="1">
    local filter = Object():GetFilter()
    filter:Clear()
    filter:AddCardType( CARD_TYPE_CREATURE )
    filter:SetZone( ZONE_IN_PLAY )
    filter:SetHint( HINT_ENEMY_ONLY, EffectController() )
    </TARGET_DEFINITION>
    <PLAY_TIME_ACTION target_choosing="1">
    if EffectDC():Get_Int(2) == 0 then
       EffectController():ChooseTarget( 0, "CARD_QUERY_CHOOSE_SPELL_TO_COUNTER", EffectDC():Make_Targets(0) )
    end
    </PLAY_TIME_ACTION>
    <PLAY_TIME_ACTION target_choosing="1">
    if EffectDC():Get_Int(2) == 1 then
       EffectController():ChooseTarget( 1, "CARD_QUERY_CHOOSE_CREATURE_DEAL_2_DAMAGE", EffectDC():Make_Targets(0) )
    end
    </PLAY_TIME_ACTION>
    <RESOLUTION_TIME_ACTION>
    local decision = EffectDC():Get_Int(2)
    if decision == 0 then
      local target_spell = EffectDC():Get_Targets(0):Get_CardPtr(0)
      local player = target_spell:GetPlayer()
      if player ~= nil then
         if player:CanAfford("{2}") == 1 then
            player:BeginNewMultipleChoice()   
            player:AddMultipleChoiceAnswer( "CARD_QUERY_OPTION_PAY_2_MANA" )   
            player:AddMultipleChoiceAnswer( "CARD_QUERY_OPTION_IS_COUNTERED" )   
            player:AskMultipleChoiceQuestion( "CARD_QUERY_MC_SPELL_PIERCE" )
        end
      end        
     end   
    </RESOLUTION_TIME_ACTION>
    <RESOLUTION_TIME_ACTION >
    local decision = EffectDC():Get_Int(2)
    if decision == 0 then
      local target_spell = EffectDC():Get_Targets(0):Get_CardPtr(0)
      local player = target_spell:GetPlayer()
      local chosen = Object():GetMultipleChoiceResult()
      if player ~= nil then
        if player:CanAfford("{2}") == 1 then
          if chosen ~= 1 then
            player:TapLand("{2}")
          else
             target_spell:CounterSpell()
          end
        else
          target_spell:CounterSpell()
        end
      end
    end 
    </RESOLUTION_TIME_ACTION>
     <RESOLUTION_TIME_ACTION >
    local decision = EffectDC():Get_Int(2)
    if decision == 1 then
      local target_creature = EffectDC():Get_Targets(0):Get_CardPtr(0)
      if target_creature ~= nil then   
         target_creature:DealDamage( 2, Object() )
        end
    end
    </RESOLUTION_TIME_ACTION>
     <RESOLUTION_TIME_ACTION >
    local decision = EffectDC():Get_Int(2)
    if decision == 2 then
      local NumCards = 2
      while (NumCards &gt; 0) do
        NumCards = NumCards - 1
        EffectController():DrawCard()
       end 
     end
    </RESOLUTION_TIME_ACTION>
     <RESOLUTION_TIME_ACTION>
    local decision = EffectDC():Get_Int(2)
    if decision == 2 then
      local filter = Object():GetFilter()
      filter:Clear()
      filter:NotTargetted()
      filter:SetPlayer( EffectController() )
      filter:SetZone( ZONE_HAND )
      filter:SetHint( HINT_ENEMY, EffectController() )
      EffectController():SetTargetCount(2)
      for i=0,1 do
        EffectController():SetTargetPrompt( i, "CARD_QUERY_CHOOSE_CARD_TO_DISCARD" )
      end
      EffectController():ChooseTargets( NO_VALIDATION, EffectDC():Make_Targets(1) )
    end
    </RESOLUTION_TIME_ACTION>
    <RESOLUTION_TIME_ACTION>
    local decision = EffectDC():Get_Int(2)
    if decision == 2 then
      local targetDC = EffectDC():Get_Targets(1)             
      if targetDC ~= nil then
        for i=0,1 do
          local target_card = targetDC:Get_CardPtr(i)
          if target_card ~= nil then
            target_card:Discard()
          end
        end
      end   
    end   
    </RESOLUTION_TIME_ACTION>      
    <SFX text="TARGET_LIGHTNING_PLAY" />
  </SPELL_ABILITY>
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 Scion of Darkness » 18 May 2013, 05:51

Somomole Thanks you have been a real help here just one problem missing =s still freeze the game

Code: Select all
[lua] [string "IZZET_CHARM_141806_TITLE (PLAY_TIME_ACTION) [1652]"]:10:
call parameter mismatch - too many or too few a parameter count declared, method AddMultipleChoiceAnswer in class __Player
sorry to bother this much

Edit:Just to future reference and maybe spare you some head aches can you teach me how to read the error string? Theme might be a reference to search in the card code where the error is
User avatar
Scion of Darkness
 
Posts: 235
Joined: 27 Aug 2012, 13:14
Has thanked: 17 times
Been thanked: 23 times

Re: Card Creation Request Thread

Postby sumomole » 18 May 2013, 06:16

Scion of Darkness wrote:Somomole Thanks you have been a real help here just one problem missing =s still freeze the game

Code: Select all
[lua] [string "IZZET_CHARM_141806_TITLE (PLAY_TIME_ACTION) [1652]"]:10:
call parameter mismatch - too many or too few a parameter count declared, method AddMultipleChoiceAnswer in class __Player
sorry to bother this much
You use the code from here?
I have tested it and work fine, haven't seen such problem.

EDIT: You'd better ask firemind or ohters for that how to read the error string, I know very little.
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 sumomole » 18 May 2013, 08:15

I would like to request these cards. :mrgreen: :mrgreen: :mrgreen:

ImageImage
ImageImage
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 thefiremind » 18 May 2013, 09:37

sumomole wrote:
Scion of Darkness wrote:Somomole Thanks you have been a real help here just one problem missing =s still freeze the game

Code: Select all
[lua] [string "IZZET_CHARM_141806_TITLE (PLAY_TIME_ACTION) [1652]"]:10:
call parameter mismatch - too many or too few a parameter count declared, method AddMultipleChoiceAnswer in class __Player
sorry to bother this much
You use the code from here?
I have tested it and work fine, haven't seen such problem.

EDIT: You'd better ask firemind or ohters for that how to read the error string, I know very little.
The error means that at line 10 of a PLAY_TIME_ACTION (with the <PLAY_TIME_ACTION> line being line #1), AddMultipleChoiceAnswer has the wrong number of parameters.
Maybe I'm totally drifting away from the solution, but I just thought of something... Scion of Darkness, are you able to use signets from other mods with no errors?

sumomole wrote:I would like to request these cards. :mrgreen: :mrgreen: :mrgreen:
Savage Summoning is good news: some time ago I tried to imagine how to code Scout's Warning (which is similar) but I got stuck on something, can't remember exactly what.
Molten Birth could mean that they implemented coin flipping... it's possible to emulate coin flipping through random numbers in DotP2013, but calling head or tail and seeing the coin would definitely be cool. :lol:
< 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: 722 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 14 guests

Main Menu

User Menu

Our Partners


Who is online

In total there are 14 users online :: 0 registered, 0 hidden and 14 guests (based on users active over the past 10 minutes)
Most users ever online was 7967 on 09 Sep 2025, 23:08

Users browsing this forum: No registered users and 14 guests

Login Form