It is currently 27 Apr 2024, 21:49
   
Text Size

Talk about new cards here

Moderator: CCGHQ Admins

Re: Talk about new cards here

Postby whismer » 29 Jul 2010, 15:52

Come back with my Steel Overseer prob

<ACTIVATED_ABILITY tag="STEEL_OVERSEER_RULE_1" layer="0">
<COST type="TapSelf" />
<FILTER>
return CreaturesYouControl()
</FILTER>
<EFFECT>
AddPlusOnePlusOneCounters( Object(CARD_TYPE_CREATURE), 1)
</EFFECT>
<AI_AVAILABILITY behaviour="CardDraw"/>
</ACTIVATED_ABILITY>

This is my last try... it add 2 counter on the activated Steel if I have 2 creatures in play...

Can'T target every creature (I know it's Artifact creature but for now I try simplified things) and can'T add only one counter
whismer
 
Posts: 64
Joined: 23 Jul 2010, 02:36
Has thanked: 0 time
Been thanked: 0 time

Re: Talk about new cards here

Postby Uresti » 29 Jul 2010, 16:10

FILTER
return ArifactCreatures() and OwendByYou()
/FILTER
EFFECT
Subject():AddCounters( MTG():PlusOnePlusOneCounters(), 1 )
/EFFECT
Uresti
 
Posts: 151
Joined: 25 Jun 2010, 15:26
Has thanked: 0 time
Been thanked: 0 time

Re: Talk about new cards here

Postby Clark » 22 Aug 2010, 17:35

Hi all,
I'm Clark from China. Dotp is my first game about CCG and i like it very much. It's appreciated for all of your distribution to the new DLC, which made the game more attractively. Following by your experience, i got the key to add new cards & decks. What i could do now is trying to add new interesting cards. But you know, it's difficult for green hand like me to have a big picture of creating a completely deck :lol: . I cannot wait to commit my new cards for sharing while it seems only some developers of your team could do so :lol:. Hope I could be granted such privilege in future. 8)

Well say thanks again and i would be happy to do all i can to help you guys to make this game better.

Here is one example card just created for fun :D
Code: Select all
<?xml version="1.0"?>
<MULTICARDS>
    <CARD>
      <FILENAME             text = "NOVABLAST_WURM" />
      <ARTID                value = "63210002" />
      <TITLE                text = "NOVABLAST_WURM_TITLE" />
      <TYPE             metaname = "Creature" />      
      <SUB_TYPE          metaname = "Wurm" />
      <POWER                value = "7" />
      <TOUGHNESS             value = "7" />
      <CASTING_COST          cost = "{3}{G}{G}{W}{W}" />
      <COLOR                value = "Z" />
      <FRAMECOLOUR           name = "GW Gold" />
      <EXPANSION          metaname = "6321" />
      <RARITY          metaname = "Mythic" />      
      <COLLECTIONMAX          value = "0" />
      <COLLECTORNUMBER       value = "0" />
      <CARDNUMBER          value = "0" />      
      <ARTIST             name = "Michael Komarck" />
      <FLAVOURTEXT      text = "NOVABLAST_WURM_FLAVOUR" />

      <TRIGGERED_ABILITY tag="NOVABLAST_WURM_RULE_1" layer="0">
             <TRIGGER value="ATTACKING">
               return SelfTriggered()
             </TRIGGER>
             <FILTER>
               return InPlay() and OtherCreatures()
             </FILTER>
             <EFFECT>
               Subject():Destroy()
             </EFFECT>
      </TRIGGERED_ABILITY>
    </CARD>
</MULTICARDS>


Image

BTW: Could you please kindly share me some API to develop :P ?
Clark
 
Posts: 64
Joined: 21 Aug 2010, 16:07
Has thanked: 0 time
Been thanked: 0 time

Re: Talk about new cards here

Postby Yanna » 22 Aug 2010, 18:08

Welcome to the forums Clark !

Every Addition from eveyone is welcome, you need to set up tortoise and then you can start adding cards :)

There's unfortunately no tool to create new cards as of now, just yer old notepad ^^
Image
User avatar
Yanna
 
Posts: 137
Joined: 03 Mar 2009, 14:52
Has thanked: 0 time
Been thanked: 1 time

Re: Talk about new cards here

Postby logoliv » 22 Aug 2010, 19:48

I'm trying to do Grim Discovery, here's the code :

Code: Select all
 <SPELL_ABILITY tag="GRIM_DISCOVERY_RULE_1" layer="0">

   <TARGET_DETERMINATION>
      Object():GetFilter():Clear()
      Object():GetFilter():AddCardType( CARD_TYPE_LAND )
      Object():GetFilter():AddCardType( CARD_TYPE_CREATURE )
      Object():GetFilter():SetZone( ZONE_GRAVEYARD )
      Object():GetFilter():SetPlayer( Object():GetPlayer() )
      return TargetGoodF()
   </TARGET_DETERMINATION>

   <PRE_EFFECT>
      Object():GetFilter():SetPlayer( Object():GetPlayer() )
      Object():GetPlayer():BeginNewMultipleChoice( true )
      Object():GetPlayer():AddMultipleChoiceAnswer( "RETURN_CREATURE" )
      Object():GetPlayer():AddMultipleChoiceAnswer( "RETURN_LAND" )
      Object():GetPlayer():AddMultipleChoiceAnswer( "DO_BOTH" )
      Object():GetPlayer():AskMultipleChoiceQuestion( "CHOOSE_TITLE" )
   </PRE_EFFECT>

   </SPELL_ABILITY>

   <SPELL_ABILITY layer="0">

   <AVAILABILITY>
      if (Object():GetMultipleChoiceResult() == 1) then
         return false
      else
         return true
      end
   </AVAILABILITY>

   <TARGET_DETERMINATION>
      return TargetCreatureInYourGraveyard()
   </TARGET_DETERMINATION>

   <PLAYTIME>
      ChooseTarget( "ChooseCreatureInGraveyard" )
   </PLAYTIME>

   <EFFECT>
      PutTargetCardInHand()
   </EFFECT>

   </SPELL_ABILITY>

   <SPELL_ABILITY layer="0">

   <AVAILABILITY>
      if (Object():GetMultipleChoiceResult() == 0) then
         return false
      else
         return true
      end
   </AVAILABILITY>

   <TARGET_DETERMINATION>
      Object():GetFilter():Clear()
      Object():GetFilter():AddCardType( CARD_TYPE_LAND )
      Object():GetFilter():SetZone( ZONE_GRAVEYARD )
      Object():GetFilter():SetPlayer( Object():GetPlayer() )
      return TargetGoodF()
   </TARGET_DETERMINATION>

   <PLAYTIME>
      ChooseTarget( "ChooseLandInGraveyard" )
   </PLAYTIME>

   <EFFECT>
      PutTargetCardInHand()
   </EFFECT>

   </SPELL_ABILITY>
I can't play it, DotP says that there isn't a good target for the card (there's a land in my graveyard but no creature)... Any idea why ?
User avatar
logoliv
 
Posts: 130
Joined: 26 Jul 2010, 11:15
Has thanked: 4 times
Been thanked: 1 time

Re: Talk about new cards here

Postby Yanna » 22 Aug 2010, 20:14

Maybe it's because you have multiple <SPELL_ABILITY> that each contain a <TARGET_DETERMINATION>. If you need to fullfill all conditions then you would require both a land and a creature in graveyard to be able to cast it.

To get around this, you would need to add triggered effects instead of multiple SPELL_ABILITYs. For example :

SPELL_ABILITY => get the choice (store it as an integer, say 1 for land, 2 for creature and 3 for both)
one TRIGERRED_ABILTY, with an ABILITY_RESOLVED on Self + integer = 1
one TRIGERRED_ABILTY, with an ABILITY_RESOLVED on Self + integer = 2
one TRIGERRED_ABILTY, with an ABILITY_RESOLVED on Self + integer = 3

It may be something else but i hope this helps anyway :)
Image
User avatar
Yanna
 
Posts: 137
Joined: 03 Mar 2009, 14:52
Has thanked: 0 time
Been thanked: 1 time

Re: Talk about new cards here

Postby logoliv » 22 Aug 2010, 21:02

thanks for the idea :)

I've discovered while testing the card that BeginNewMultipleChoice can only have 2 answers :( That will complicate my task for this card and it also invalidate Savage Lands (in the beginning I had coded Savage Land with the ChooseColour dialog, but it was not good as we could choose any of the 5 colors...)

I now can play the card but the trigger doesn't work.
User avatar
logoliv
 
Posts: 130
Joined: 26 Jul 2010, 11:15
Has thanked: 4 times
Been thanked: 1 time

Impossible to code Savage Lands !

Postby logoliv » 23 Aug 2010, 17:19

I think I've tried everything possible :evil: here's the code I tested :
Code: Select all
<ACTIVATED_ABILITY tag="SAVAGE_LANDS_RULE_2" forced_skip="1" layer="0">
   <COST type="TapSelf" />
   <PLAYTIME>
      Object():GetFilter():SetPlayer( Object():GetPlayer() )
      Object():GetPlayer():BeginNewMultipleChoice( true )
      Object():GetPlayer():AddMultipleChoiceAnswer( "ADD_MANA_BLACK" )
      Object():GetPlayer():AddMultipleChoiceAnswer( "NEXT_CHOICE" )
      Object():GetPlayer():AskMultipleChoiceQuestion( "CHOOSE_TITLE" )

      if ( Object():GetMultipleChoiceResult() == 0 ) then
         Object():Register_Set( 0, 0 )
      else

         Object():GetFilter():Clear()
         Object():GetFilter():SetPlayer( Object():GetPlayer() )
         Object():GetPlayer():BeginNewMultipleChoice( true )
         Object():GetPlayer():AddMultipleChoiceAnswer( "ADD_MANA_RED" )
         Object():GetPlayer():AddMultipleChoiceAnswer( "ADD_MANA_GREEN" )
         Object():GetPlayer():AskMultipleChoiceQuestion( "CHOOSE_TITLE" )
            
         Object():Register_Set( 0, Object():GetMultipleChoiceResult() + 1 )
      end

   </PLAYTIME>
   <EFFECT>
      if (Object():Register_Get(0) == 0) then
         ProduceBlackMana( 1 )
      end
      if (Object():Register_Get(0) == 1) then
         ProduceRedMana( 1 )
      end
      if (Object():Register_Get(0) == 2) then
         ProduceGreenMana( 1 )
      end
   </EFFECT>
</ACTIVATED_ABILITY>
I've also tried with one multiple choice in <PRE_EFFECT> section and the other in the <PLAYTIME> section... It always give me a black mana ! I think I'll also give up with Grim Discovery so :(
User avatar
logoliv
 
Posts: 130
Joined: 26 Jul 2010, 11:15
Has thanked: 4 times
Been thanked: 1 time

Re: Talk about new cards here

Postby Yanna » 23 Aug 2010, 18:40

Don't despair !

You need to make those two choices in separate abilities (tried with a POST_PLAYTIME but it didn't work).
I've replaced the 'TapSelf' cost with a 0 mana cost because i find it more elegant that the lands taps when you chose your colour (otherwise it will tap then asks you questions. Both work anyway, choose your preference ^^).

Here's the result, tested it and it worked like a charm :)

Code: Select all
    <ACTIVATED_ABILITY tag="SAVAGE_LANDS_RULE_2" forced_skip="1" layer="0" per_turn_limit="1" >

      <COST type="Mana" cost="{0}" />

      <AVAILABILITY>
        return ( Object():Tapped() == 0 )
      </AVAILABILITY>

      <PRE_EFFECT>
        Object():GetFilter():SetPlayer( Object():GetPlayer() )
        Object():GetPlayer():BeginNewMultipleChoice( true )
        Object():GetPlayer():AddMultipleChoiceAnswer( "ADD_MANA_BLACK" )
        Object():GetPlayer():AddMultipleChoiceAnswer( "NEXT_CHOICE" )
        Object():GetPlayer():AskMultipleChoiceQuestion( "CHOOSE_TITLE" )
      </PRE_EFFECT>

      <EFFECT>
        if ( Object():GetMultipleChoiceResult() == 0 ) then
          Object():Tap()
          ProduceBlackMana( 1 )
        else
          Object():Register_Set(0, 1)
        end
      </EFFECT>

    </ACTIVATED_ABILITY>

    <!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->

    <TRIGGERED_ABILITY layer="0" forced_skip="1">

      <TRIGGER value="ABILITY_RESOLVED">
        return ( SelfTriggered() and Object():Register_Get( 0 ) &gt; 0 )
      </TRIGGER>

      <PRE_EFFECT>
        Object():GetFilter():SetPlayer( Object():GetPlayer() )
        Object():GetPlayer():BeginNewMultipleChoice( true )
        Object():GetPlayer():AddMultipleChoiceAnswer( "ADD_MANA_RED" )
        Object():GetPlayer():AddMultipleChoiceAnswer( "ADD_MANA_GREEN" )
        Object():GetPlayer():AskMultipleChoiceQuestion( "CHOOSE_TITLE" )
      </PRE_EFFECT>

      <EFFECT>
        if ( Object():GetMultipleChoiceResult() == 0 ) then
          Object():Register_Set(0, 0)
          Object():Tap()
          ProduceRedMana( 1 )
        else
          Object():Register_Set(0, 0)
          Object():Tap()
          ProduceGreenMana( 1 )
        end
      </EFFECT>

    </TRIGGERED_ABILITY>
Image
User avatar
Yanna
 
Posts: 137
Joined: 03 Mar 2009, 14:52
Has thanked: 0 time
Been thanked: 1 time

Re: Talk about new cards here

Postby logoliv » 23 Aug 2010, 18:50

Thanks Yanna, you're a master programmer lol :) the invalid pointer error is not that clean, but it works ;)
User avatar
logoliv
 
Posts: 130
Joined: 26 Jul 2010, 11:15
Has thanked: 4 times
Been thanked: 1 time

Re: Talk about new cards here

Postby Yanna » 23 Aug 2010, 20:19

No problem ^^
Ho Btw... what invalid pointer error ? :oops:

Btw, coding Orim's Chant and Stasis (which you can pay with generated mana as with tundra, and that is hard to code too) made me learn many things about abilities and 'chaining' those.

I hope you're going to give another try at Grim Discovery !
Image
User avatar
Yanna
 
Posts: 137
Joined: 03 Mar 2009, 14:52
Has thanked: 0 time
Been thanked: 1 time

Re: Talk about new cards here

Postby kevlahnota » 23 Aug 2010, 20:51

it's the missing tag... for the triggered ability
User avatar
kevlahnota
Programmer
 
Posts: 825
Joined: 19 Jul 2010, 17:45
Location: Philippines
Has thanked: 14 times
Been thanked: 264 times

Re: Talk about new cards here

Postby Yanna » 23 Aug 2010, 21:12

kevlahnota wrote:it's the missing tag... for the triggered ability
How yeah ^^ That's one easy to fix ain't it ? ;)
Image
User avatar
Yanna
 
Posts: 137
Joined: 03 Mar 2009, 14:52
Has thanked: 0 time
Been thanked: 1 time

Re: Talk about new cards here

Postby logoliv » 24 Aug 2010, 16:02

I give my soul to the One who manages to code Grim Discovery (without any error of course lol) ;)
By the way it's a shame that BeginNewMultipleChoice can't accept more than 2 choices... another limitation of the game engine :(
User avatar
logoliv
 
Posts: 130
Joined: 26 Jul 2010, 11:15
Has thanked: 4 times
Been thanked: 1 time

Re: Talk about new cards here

Postby whismer » 24 Aug 2010, 17:05

It's can work using a different method but...

By creating token-like card with 1 effect on each.

If the choice is one or both and you put the same choice that in the Jester Cap card... Maybe the caster will choose 2 land or 2 creature but I think it can work by this way
whismer
 
Posts: 64
Joined: 23 Jul 2010, 02:36
Has thanked: 0 time
Been thanked: 0 time

PreviousNext

Return to Programming Talk

Who is online

Users browsing this forum: No registered users and 22 guests


Who is online

In total there are 22 users online :: 0 registered, 0 hidden and 22 guests (based on users active over the past 10 minutes)
Most users ever online was 4143 on 23 Jan 2024, 08:21

Users browsing this forum: No registered users and 22 guests

Login Form