It is currently 16 Apr 2024, 06:41
   
Text Size

Talk about new cards here

Moderator: CCGHQ Admins

Talk about new cards here

Postby Huggybaby » 15 Jul 2010, 16:13

MTG has a lot of cards, and implementing them takes a lot of discussion, so I made this forum so you can talk about new cards without clogging up the main forum.
User avatar
Huggybaby
Administrator
 
Posts: 3205
Joined: 15 Jan 2006, 19:44
Location: Finally out of Atlanta
Has thanked: 696 times
Been thanked: 594 times

Hedron Crab

Postby whismer » 27 Jul 2010, 01:24

Here's the code for Hedron Crab... I don't know if they are other way to code Landfall...

<?xml version="1.0"?>
<MULTICARDS>

<CARD>
<TITLE text="HEDRON_CRAB_TITLE" />
<FILENAME text="Hedron_Crab" />
<COLLECTIONMAX value="388" />
<COLLECTORNUMBER value="68" />
<ARTID value="99910015" />
<FRAMECOLOUR name="U" />
<COLOR value="U" />
<ARTIST name="Jim Murray" />
<SUB_TYPE metaname="Crab" />
<CASTING_COST cost="{U}" />
<CARDNUMBER value="2" />
<POWER value="0" />
<TOUGHNESS value="2" />
<FLAVOURTEXT text="HEDRON_CRAB_FLAVOUR" />
<TYPE metaname="Creature" />
<EXPANSION metaname="W" />
<RARITY metaname="uncommon" />
<TRIGGERED_ABILITY tag="HEDRON_CRAB_RULE_1" auto_skip="1" layer="0">
<TRIGGER value="COMES_INTO_PLAY">
return LandsYouControl()
</TRIGGER>
<TARGET_DETERMINATION>
return TargetPlayerBad()
</TARGET_DETERMINATION>
<PLAYTIME>
ChooseTarget( "ChoosePlayerDiscardThreeLibrary" )
</PLAYTIME>
<EFFECT>
MillCards( Object():GetTargetPlayer(), 3 )
</EFFECT>
</TRIGGERED_ABILITY>
<SFX text="BLUESWARM1_attack" />
</CARD>
</MULTICARDS>
whismer
 
Posts: 64
Joined: 23 Jul 2010, 02:36
Has thanked: 0 time
Been thanked: 0 time

Re: Talk about new cards here

Postby Yanna » 27 Jul 2010, 02:23

Hehe, i coded one also but it's in the next release...

You can simply use this for landfall (yes it was inside the default functions ^^) :

<TRIGGER value="COMES_INTO_PLAY">
return LandFall()
</TRIGGER>
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 whismer » 28 Jul 2010, 01:04

I have a problem with Jester's Cap

Here's my code

<?xml version="1.0"?>
<MULTICARDS>
<CARD>
<COLLECTIONMAX value="381"/>
<COLLECTORNUMBER value="260"/>
<CARDNUMBER value="4"/>
<EXPANSION metaname="W"/>
<RARITY metaname="rare"/>
<FILENAME text='Jesters_Cap'/>
<TITLE text='JESTERS_CAP_TITLE'/>
<CASTING_COST cost='{4}'/>
<FRAMECOLOUR name='A'/>
<COLOR value='A'/>
<TYPE metaname='Artifact'/>
<ARTID value='99910018'/>
<ARTIST name='D. Alexander Gregory'/>

<!-- START OF CARD ABILITIES -->


<ACTIVATED_ABILITY tag="JESTERS_CAP_RULE_1">
<COST type="TapSelf" />
<COST type="SacrificeSelf" />
<PRE_EFFECT>
Object():GetFilter():Clear()
Object():GetFilter():SetPlayer( Object():GetPlayer() )
Object():GetFilter():SetZone( ZONE_LIBRARY )
Object():GetFilter():AddCardType( CARD_TYPE_ARTIFACT )
Object():GetFilter():AddCardType( CARD_TYPE_CREATURE )
Object():GetFilter():AddCardType( CARD_TYPE_ENCHANTMENT )
Object():GetFilter():AddCardType( CARD_TYPE_INSTANT )
Object():GetFilter():AddCardType( CARD_TYPE_PLANESWALKER )
Object():GetFilter():AddCardType( CARD_TYPE_SORCERY )
Object():GetFilter():AddCardType( CARD_TYPE_TRIBAL )
Object():GetFilter():AddCardType( CARD_TYPE_LAND )
Object():GetPlayer():SetTargetCount( 3 )

local index = 1
while index &lt; 4 do
Object():GetPlayer():SetTargetPrompt( index - 1, "ChooseTargetCard" )
index = index + 1
end
Object():GetPlayer():ChooseTargets()
</PRE_EFFECT>

<EFFECT>
if Object():GetNthTargetCard( 0 ) ~= nil then
Object():GetNthTargetCard( 0 ):RemoveTargetCardFromGame()
Object():GetNthTargetCard( 0 ):GuidedReveal( ZONE_LIBRARY )
end

if Object():GetNthTargetCard( 1 ) ~= nil then
Object():GetNthTargetCard( 1 ):RemoveTargetCardFromGame()
Object():GetNthTargetCard( 1 ):GuidedReveal( ZONE_LIBRARY )
end

if Object():GetNthTargetCard( 2 ) ~= nil then
Object():GetNthTargetCard( 2 ):RemoveTargetCardFromGame()
Object():GetNthTargetCard( 2 ):GuidedReveal( ZONE_LIBRARY )
end

Object():GetOwner():ShuffleLibrary()
</EFFECT>
</ACTIVATED_ABILITY>

<AI_SCORE_MULTIPLIER zone="hand" value="20" />

<!-- END OF CARD ABILITIES -->

</CARD>
</MULTICARDS>

I think the error it's from the bold part

When I start a game or edit the deck, DoTP crash
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 » 28 Jul 2010, 03:28

this is my Jester cap code is no polished.

<TARGET_DETERMINATION>
return TargetPlayerBad()
</TARGET_DETERMINATION>
<PLAYTIME>
ChooseTarget( "ChoosePlayerThreeDamageTwoCards" )
</PLAYTIME>
<PRE_EFFECT>
Object():Register_Player_Set( 0, Object():GetTargetPlayer() )
ChooseNFromLibrary( Object():GetTargetPlayer(), { "ChooseCard", "ChooseCard" })
</PRE_EFFECT>
<EFFECT>
if Object():GetNthTargetCard( 0 ) ~= nil then
Object():GetNthTargetCard( 0 ):RemoveFromGame()
Object():GetNthTargetCard( 0 ):GuidedReveal( ZONE_LIBRARY, ZONE_GRAVEYARD )
end
if Object():GetNthTargetCard( 1 ) ~= nil then
Object():GetNthTargetCard( 1 ):RemoveFromGame()
Object():GetNthTargetCard( 1 ):GuidedReveal( ZONE_LIBRARY, ZONE_GRAVEYARD )
end
</EFFECT>
</SPELL_ABILITY>

hope you get a better idea...and heres what i think is crashing:
Object():GetPlayer():SetTargetCount( 3 )

local index = 1
while index &lt; 4 do
Object():GetPlayer():SetTargetPrompt( index - 1, "ChooseTargetCard" )
index = index + 1
end
Object():GetPlayer():ChooseTargets()
its a good idea to select 3 targets at a time but is better in my humble opinion to noy use SetTarget its a little more complex.
Uresti
 
Posts: 151
Joined: 25 Jun 2010, 15:26
Has thanked: 0 time
Been thanked: 0 time

Re: Talk about new cards here

Postby Yanna » 28 Jul 2010, 09:07

whismer wrote:Object():GetPlayer():SetTargetCount( 3 )

local index = 1
while index &lt; 4 do
Object():GetPlayer():SetTargetPrompt( index - 1, "ChooseTargetCard" )
index = index + 1
end
Object():GetPlayer():ChooseTargets()
Weird thing is that it's exactly the same as the ChooseNFromLibrary() function...

I usually this sort of crash error whithout able to see the cards when the 'CARD_TEXT.Xml' file is messy (like empty cells in it)
Image
User avatar
Yanna
 
Posts: 137
Joined: 03 Mar 2009, 14:52
Has thanked: 0 time
Been thanked: 1 time

Grave Pact

Postby logoliv » 28 Jul 2010, 09:50

Hi all,

I'm trying to make Grave Pact, it triggers correctly but I can't figure out how to do the "each other player sacrifices a creature" part... Here's my code :

Code: Select all
<TRIGGERED_ABILITY tag="GRAVE_PACT_RULE_1" zone="IN_PLAY" layer="0">
   <TRIGGER value="HIT_GRAVEYARD">
      return ( (TriggerObject():GetCardType():Test( CARD_TYPE_CREATURE ) ~= 0) and YouControl() )
   </TRIGGER>
   <TARGET_DETERMINATION>
      return ( SubjectType() == SUBJECT_PLAYER and Player() ~= Object():GetPlayer() )
   </TARGET_DETERMINATION>
   <PRE_EFFECT>
      Object():GetFilter():SetPlayer( Object():GetTargetPlayer() )
      Object():GetFilter():SetController( Object():GetTargetPlayer() )
      Object():GetFilter():SetZone( ZONE_IN_PLAY )
      Object():GetFilter():AddCardType( CARD_TYPE_CREATURE )
      Object():GetTargetPlayer():ChooseTarget( "TargetCreatureNeutralBadF" )
   </PRE_EFFECT>
   <EFFECT>
      SacrificeTargetCard()
   </EFFECT>
</TRIGGERED_ABILITY>
I have this error message : "[lua] [string "GRAVE_PACT_TITLE (PRE_EFFECT)"]:7: attempt to index a nil value". Any help would be very appreciated :)
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 Uresti » 28 Jul 2010, 13:55

Object():GetTargetPlayer():ChooseTarget( "TargetCreatureNeutralBadF" )

thin this is the line that causes the message after you close the game.
Uresti
 
Posts: 151
Joined: 25 Jun 2010, 15:26
Has thanked: 0 time
Been thanked: 0 time

Re: Talk about new cards here

Postby whismer » 28 Jul 2010, 16:29

Everything is ok except the fact that only the first card is removed...

I test with PutInGraveyard effect (the major part of this card is copy of Buried Alive...)

Maybe Yanna can help me with why only the first are removed...

<?xml version="1.0"?>
<MULTICARDS>
<CARD>
<COLLECTIONMAX value="381"/>
<COLLECTORNUMBER value="260"/>
<CARDNUMBER value="4"/>
<EXPANSION metaname="W"/>
<RARITY metaname="rare"/>
<FILENAME text='Jesters_Cap'/>
<TITLE text='JESTERS_CAP_TITLE'/>
<CASTING_COST cost='{4}'/>
<FRAMECOLOUR name='A'/>
<COLOR value='A'/>
<TYPE metaname='Artifact'/>
<ARTID value='99910018'/>
<ARTIST name='D. Alexander Gregory'/>

<!-- START OF CARD ABILITIES -->


<ACTIVATED_ABILITY tag="JESTERS_CAP_RULE_1">
<COST type="Mana" cost="{2}" />
<COST type="TapSelf" />
<COST type="SacrificeSelf" />
<TARGET_DETERMINATION>
return TargetPlayerBad()
</TARGET_DETERMINATION>

<PLAYTIME>
ChooseTarget( "ChoosePlayer" )
</PLAYTIME>
<PRE_EFFECT>
Object():GetFilter():Clear()
Object():GetFilter():SetPlayer( Object():GetTargetPlayer() )
Object():GetFilter():SetZone( ZONE_LIBRARY )
Object():GetFilter():AddCardType( CARD_TYPE_ARTIFACT )
Object():GetFilter():AddCardType( CARD_TYPE_CREATURE )
Object():GetFilter():AddCardType( CARD_TYPE_ENCHANTMENT )
Object():GetFilter():AddCardType( CARD_TYPE_INSTANT )
Object():GetFilter():AddCardType( CARD_TYPE_PLANESWALKER )
Object():GetFilter():AddCardType( CARD_TYPE_SORCERY )
Object():GetFilter():AddCardType( CARD_TYPE_TRIBAL )
Object():GetFilter():AddCardType( CARD_TYPE_LAND )
Object():GetPlayer():SetTargetCount( 3 )

local index = 1
while index &lt; 4 do
Object():GetPlayer():SetTargetPrompt( index - 1, "ChooseTarget" )
index = index + 1
end
Object():GetPlayer():ChooseTargets()
</PRE_EFFECT>

<EFFECT>
if Object():GetNthTargetCard( 0 ) ~= nil then
Object():GetNthTargetCard( 0 ):RemoveFromGame()
Object():GetNthTargetCard( 0 ):GuidedReveal( ZONE_LIBRARY )
end

if Object():GetNthTargetCard( 1 ) ~= nil then
Object():GetNthTargetCard( 1 ):RemoveFromGame()
Object():GetNthTargetCard( 1 ):GuidedReveal( ZONE_LIBRARY )
end

if Object():GetNthTargetCard( 2 ) ~= nil then
Object():GetNthTargetCard( 2 ):RemoveFromGame()
Object():GetNthTargetCard( 2 ):GuidedReveal( ZONE_LIBRARY )
end

Object():GetTargetPlayer():ShuffleLibrary()
</EFFECT>
</ACTIVATED_ABILITY>

<AI_SCORE_MULTIPLIER zone="hand" value="20" />

<!-- END OF CARD ABILITIES -->

</CARD>
</MULTICARDS>


Thx Whismer
whismer
 
Posts: 64
Joined: 23 Jul 2010, 02:36
Has thanked: 0 time
Been thanked: 0 time

Re: Talk about new cards here

Postby Yanna » 28 Jul 2010, 16:52

whismer wrote: <EFFECT>
if Object():GetNthTargetCard( 0 ) ~= nil then
Object():GetNthTargetCard( 0 ):RemoveFromGame()
Object():GetNthTargetCard( 0 ):GuidedReveal( ZONE_LIBRARY )
end

if Object():GetNthTargetCard( 1 ) ~= nil then
Object():GetNthTargetCard( 1 ):RemoveFromGame()
Object():GetNthTargetCard( 1 ):GuidedReveal( ZONE_LIBRARY )
end

if Object():GetNthTargetCard( 2 ) ~= nil then
Object():GetNthTargetCard( 2 ):RemoveFromGame()
Object():GetNthTargetCard( 2 ):GuidedReveal( ZONE_LIBRARY )
end

Does it works when you remove the GuidedReveal parts ? I think you need to pass two parameters to it (where is it from and where does it go).

Otherwise the code seems allright to me (thought didn't test it in-game).
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 whismer » 28 Jul 2010, 17:14

I will try with the Zone_Graveyard for testing...

And what's the zone for EXILE?


EDIT : 3 cards in the graveyard... maybe with a Zone_EXILE
Last edited by whismer on 28 Jul 2010, 17:38, edited 1 time in total.
whismer
 
Posts: 64
Joined: 23 Jul 2010, 02:36
Has thanked: 0 time
Been thanked: 0 time

Re: Grave Pact

Postby logoliv » 28 Jul 2010, 17:22

thanks Uresti, I've seen that the error is in the 7th line, but I think it comes from bad code before that, and I don't know how to implement "each other player"... do I have to make a loop for each player to sacrifice a creature ?
has someone coded a card with "each other player" ?
please help :(
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 » 28 Jul 2010, 17:53

whismer wrote:I will try with the Zone_Graveyard for testing...

And what's the zone for EXILE?


EDIT : 3 cards in the graveyard... maybe with a Zone_EXILE
Here's the list of zones :

ZONE_NOWHERE_YET
ZONE_ANYWHERE
ZONE_IN_PLAY
ZONE_REMOVED_FROM_GAME
ZONE_PHASED_OUT
ZONE_LIBRARY
ZONE_GRAVEYARD
ZONE_HAND
ZONE_STACK
ZONE_CEASED_TO_EXIST

Not sure if the guidereveal works ok with those zones thought.
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 whismer » 28 Jul 2010, 18:03

Yep I fint it in the Functions folder...

With the graveyard zone, I had a bug with Hostility... when put in the grave, it crash the game ... it's a card from Chanda Naalar deck

Everything is NOW fine with my Jesters Cap

For the Hostility bug... if I remove the card ... no crash

I have a new difficulty with Steel Overseer

<?xml version="1.0"?>
<MULTICARDS>

<CARD>
<TITLE text="STEEL_OVERSEER_TITLE" />
<FILENAME text="Steel_Overseer" />
<COLLECTIONMAX value="301" />
<COLLECTORNUMBER value="219" />
<ARTID value="99910021" />
<FRAMECOLOUR name="A" />
<COLOR value="A" />
<ARTIST name="Chris Rahn" />
<SUB_TYPE metaname="Construct" />
<CASTING_COST cost="{2}" />
<CARDNUMBER value="8" />
<POWER value="1" />
<TOUGHNESS value="1" />
<FLAVOURTEXT text="STEEL_OVERSEER_FLAVOUR" />
<TYPE metaname="Creature" />
<TYPE metaname="Artifact" />
<EXPANSION metaname="W" />
<RARITY metaname="rare" />
<ACTIVATED_ABILITY tag="STEEL_OVERSEER_RULE_1" layer="0">
<COST type="TapSelf" />
<TARGET_DETERMINATION>
return Artifacts() and CreaturesYouControl()
</TARGET_DETERMINATION>
<EFFECT>
AddPlusOnePlusOneCounters()
</EFFECT>
<AI_AVAILABILITY behaviour="CardDraw"/>
</ACTIVATED_ABILITY>
<SFX text="CAXE1_attack" />
</CARD>
</MULTICARDS>

With this config(Immaculate Magistrate), it's doesn't activate an ability...

if I put

<FILTER>
return Artifacts() and CreaturesYouControl()
</FILTER>

From Master of Etherium... it activate but do nothing

Help again plz :)

Whismer
Last edited by whismer on 28 Jul 2010, 20:01, edited 1 time in total.
whismer
 
Posts: 64
Joined: 23 Jul 2010, 02:36
Has thanked: 0 time
Been thanked: 0 time

Re: Talk about new cards here

Postby kevlahnota » 28 Jul 2010, 18:06

i'm coding natural balance which triggers each players, i test by only searching for lands but after a while it does not work. anyone?

Code: Select all
    <SPELL_ABILITY tag="NATURAL_BALANCE_RULE_2" zone="InPlayAndPlayers" layer="0">
     <PRE_EFFECT>
        
      for i=0,MTG():GetNumberOfPlayers()-1 do
         if MTG():GetNthPlayer( i ) ~= nil then
               Object():GetFilter():Clear()
               Object():GetFilter():SetPlayer( MTG():GetNthPlayer( i ) )
               Object():GetFilter():SetController( MTG():GetNthPlayer( i ) )
                    Object():GetFilter():SetZone( ZONE_LIBRARY )
                    Object():GetFilter():NotTargetted()
                    Object():GetFilter():AddCardType( CARD_TYPE_LAND )
               Object():GetFilter():AddSupertype( SUPERTYPE_BASIC )
               MTG():GetNthPlayer( i ):ChooseTarget( "ChooseLand" )         
         end
      end         
      
     </PRE_EFFECT>
     <EFFECT>
      
     </EFFECT>
User avatar
kevlahnota
Programmer
 
Posts: 825
Joined: 19 Jul 2010, 17:45
Location: Philippines
Has thanked: 14 times
Been thanked: 264 times

Next

Return to Programming Talk

Who is online

Users browsing this forum: No registered users and 16 guests


Who is online

In total there are 16 users online :: 0 registered, 0 hidden and 16 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 16 guests

Login Form