It is currently 23 May 2024, 20:10
   
Text Size

General Help For Coding Cards thread

Moderator: CCGHQ Admins

General Help For Coding Cards thread

Postby Uresti » 15 Jul 2010, 01:20

Im trying to code AEther Vial almost all the code is there except for filtering the converted mana cost SetConvertedCostMin()

<TRIGGER value="BEGINNING_OF_STEP">
return MyUpkeep()
</TRIGGER>
<EFFECT>
AddChargeCounterToSelf()
</EFFECT>
</TRIGGERED_ABILITY>
<ACTIVATED_ABILITY tag="AETHER_VIAL_RULE_1" auto_skip="1" layer="0">
<COST type="TapSelf" />
<PRE_EFFECT>
ChooseNCreatureCardsFromHand( Object():GetPlayer(), Object():GetPlayer(), { "ChooseCreatureBringIntoPlay" })
</PRE_EFFECT>
<EFFECT>
PutTargetCardIntoPlay( Object():GetPlayer() )
YouGainLife(Object():CountCounters( MTG():ChargeCounters() ) )Added this line to track Number of counters
</EFFECT>

i already tried with Object():Getfilter():SetConvertedCostMin and max and Value.
Uresti
 
Posts: 151
Joined: 25 Jun 2010, 15:26
Has thanked: 0 time
Been thanked: 0 time

Re: General Help For Coding Cards thread

Postby Epiphany » 15 Jul 2010, 10:22

Hmm, I'm trying to get it to work but I can't find the right syntax so far.

It seems happy to use:

Code: Select all
<FILTER>
    return Creatures() and Subject():GetConvertedManaCost() &lt; 2
</FILTER>
but I don't know how to apply it as a target rather than a filter. :(
Epiphany
 
Posts: 95
Joined: 30 Jun 2010, 13:27
Has thanked: 0 time
Been thanked: 0 time

Re: General Help For Coding Cards thread

Postby Uresti » 15 Jul 2010, 14:13

well then we use a filter like this....

Object():GetFilter:NOTargetting()
Object():GetFilter:SetZone( ZONE_HAND )
Object():GetFilter:GetConvertedManaCost( 2 ) &lt; 2
Uresti
 
Posts: 151
Joined: 25 Jun 2010, 15:26
Has thanked: 0 time
Been thanked: 0 time

Re: General Help For Coding Cards thread

Postby Uresti » 16 Jul 2010, 02:34

I just Finished Aether Vial works perfect!
Uresti
 
Posts: 151
Joined: 25 Jun 2010, 15:26
Has thanked: 0 time
Been thanked: 0 time

Re: General Help For Coding Cards thread

Postby Epiphany » 16 Jul 2010, 08:20

Does anyone know if it's possible to get provoke to work?

Like on here Brontotherium.

Grats on the vial by the way, can't wait to see it! :)

Edit: I've found the word SetBlockVictim in the EXE and I've tried to apply it to a provoke style effect, but I can't find any combination of words to get it to work.
Epiphany
 
Posts: 95
Joined: 30 Jun 2010, 13:27
Has thanked: 0 time
Been thanked: 0 time

Re: General Help For Coding Cards thread

Postby Uresti » 16 Jul 2010, 14:54

i think yo are going for the wrong direction try somethin like
TRGGER value "ATTACKING">
TRIGGER SelfTriggered>
TARGET DETERMINATION>
return TArgetCreatureBad()
PLAYTIME>
ChooseTarget)
EFFECT>
Object():GetCurrentCaharcteristics():Bool_Set( CHARACTERISTIC_MUST_BLOCK )
Uresti
 
Posts: 151
Joined: 25 Jun 2010, 15:26
Has thanked: 0 time
Been thanked: 0 time

Re: General Help For Coding Cards thread

Postby Epiphany » 16 Jul 2010, 16:25

Uresti wrote:i think yo are going for the wrong direction try somethin like
TRGGER value "ATTACKING">
TRIGGER SelfTriggered>
TARGET DETERMINATION>
return TArgetCreatureBad()
PLAYTIME>
ChooseTarget)
EFFECT>
Object():GetCurrentCaharcteristics():Bool_Set( CHARACTERISTIC_MUST_BLOCK )
Not a bad idea, but presumably if you attack with more than one creature then that creature you choose is free to block whoever the opponent wants?
Epiphany
 
Posts: 95
Joined: 30 Jun 2010, 13:27
Has thanked: 0 time
Been thanked: 0 time

Re: General Help For Coding Cards thread

Postby Yanna » 16 Jul 2010, 17:42

It makes sense... I would have sayed like Uresti indeed, using the CHARACTERISTIC_MUST_BLOCK boolean...

I guess provoke will be hard to code #-o
Image
User avatar
Yanna
 
Posts: 137
Joined: 03 Mar 2009, 14:52
Has thanked: 0 time
Been thanked: 1 time

Aluren Resolved

Postby Uresti » 19 Jul 2010, 18:44

Aluren is workin now as giving flash and decreasing cost by 3 of all creatures wiyh converted mana cost 3 or less its not as aluren should work but is a good work around
Uresti
 
Posts: 151
Joined: 25 Jun 2010, 15:26
Has thanked: 0 time
Been thanked: 0 time

Re: General Help For Coding Cards thread

Postby pun1sher666 » 21 Jul 2010, 17:16

Hi guys,

I'm working on Animate Dead. I got to make it work but i have a very bad issue, when enchanted the creature cannot be destroyed or sacrified anymore :D I don't get to find why...

Here is my code :
Code: Select all
<?xml version="1.0"?>
<MULTICARDS>
  <CARD>
    <TITLE text="ANIMATE_DEAD_TITLE" />
    <FILENAME text="Animate_Dead" />
    <COLLECTIONMAX value="0" />
    <COLLECTORNUMBER value="171" />
    <ARTID value="666065" />
    <FRAMECOLOUR name="B" />
    <COLOR value="B" />
    <ARTIST name="Anson Maddock" />
    <CASTING_COST cost="{1}{B}" />
    <FLAVOURTEXT text="ANIMATE_DEAD_FLAVOUR" />
    <TYPE metaname="Enchantment" />
   <SUB_TYPE metaname="Aura" />
    <EXPANSION metaname="PUNXTD" />
    <RARITY metaname="uncommon" />
    <STATIC_ABILITY layer="0" tag="ANIMATE_DEAD_RULE_1">
      <TARGET_DETERMINATION>
        return TargetCreatureInAnyGraveyard()
      </TARGET_DETERMINATION>
      <PLAYTIME>
        ChooseTarget( "ChooseCreatureInGraveyardToPlay" )
      </PLAYTIME>
      <EFFECT>
      PutTargetCardIntoPlay( Object():GetPlayer() )
      EnchantCreature()
      </EFFECT>
    </STATIC_ABILITY>
    <STATIC_ABILITY layer="7c" simple_filter="Parent">
      <EFFECT>      
      AddPowerAndToughness( -1, 0 )       
      </EFFECT>
    </STATIC_ABILITY>
    <TRIGGERED_ABILITY auto_skip="1" layer="0">
      <TRIGGER value="DESTROYED">
        return SelfTriggered()
      </TRIGGER>
      <EFFECT>      
      Object():GetParent():Destroy()       
      </EFFECT>     
    </TRIGGERED_ABILITY>
  </CARD>
</MULTICARDS>
Any idea ?
pun1sher666
 
Posts: 37
Joined: 09 Jul 2010, 13:49
Has thanked: 0 time
Been thanked: 0 time

Re: General Help For Coding Cards thread

Postby Yanna » 21 Jul 2010, 20:25

Well your code seems good at first glance. some questions thought, does it takes any damage at all ? or none ?
Can you still destroy the creature again when you disenchant the animate dead ?
Image
User avatar
Yanna
 
Posts: 137
Joined: 03 Mar 2009, 14:52
Has thanked: 0 time
Been thanked: 1 time

Re: General Help For Coding Cards thread

Postby pun1sher666 » 21 Jul 2010, 22:14

I just tried with a Terror and using your Diamond Valley :)
I didn't try with Lightning Bolt or Incinerate, didn't try to disenchant Animate Dead too. I wanted to solve this problem before.
pun1sher666
 
Posts: 37
Joined: 09 Jul 2010, 13:49
Has thanked: 0 time
Been thanked: 0 time

Re: General Help For Coding Cards thread

Postby pun1sher666 » 21 Jul 2010, 22:28

I just tried with : combat damage, Lightning Bolt and Disenchant.
Nothing is working, the creature is indestructible :D
When i disenchant Animate Dead the creature stay in play and Animate Dead goes to graveyard. Don't know if it's because the trigger don't work or if the Destroy() function don't work coz the creature is indestructible... I will try more things...
pun1sher666
 
Posts: 37
Joined: 09 Jul 2010, 13:49
Has thanked: 0 time
Been thanked: 0 time

Re: General Help For Coding Cards thread

Postby kevlahnota » 23 Jul 2010, 01:38

hello there,

I'm trying to code braids, cabal minion, so far it works good but unfortunately I can't figure how to target the current player(his upkeep or my upkeep) every beginning of the upkeep without choosing players. here's the code:
Code: Select all
<TRIGGERED_ABILITY tag="BRAIDS_CABAL_MINION_RULE_1" auto_skip="1" layer="0">
      <TRIGGER value="BEGINNING_OF_STEP">
        return ( MTG():GetStep() == STEP_UPKEEP and TriggerPlayer():MyTurn() ~= 0 )
      </TRIGGER>
      <TARGET_DETERMINATION>
        return TargetPlayerBad()
      </TARGET_DETERMINATION>
     <PLAYTIME>
      ChooseTargetPlayer()
     </PLAYTIME>
     <PRE_EFFECT>
      local PSacrificeLCA = Object():GetTargetPlayer()
      Object():Register_Player_Set( 0, PSacrificeLCA )
      Object():GetFilter():Clear()
      Object():GetFilter():SetPlayer( PSacrificeLCA )
      Object():GetFilter():SetZone( ZONE_IN_PLAY )
      Object():GetFilter():SetController( PSacrificeLCA )
      Object():GetFilter():AddCardType( CARD_TYPE_LAND )
      Object():GetFilter():AddCardType( CARD_TYPE_CREATURE )
        Object():GetFilter():AddCardType( CARD_TYPE_ARTIFACT )
      PSacrificeLCA:ChooseTarget( "ChooseTarget" )
     </PRE_EFFECT>
      <EFFECT>
        SacrificeTargetCard()
      </EFFECT>
</TRIGGERED_ABILITY>
thanks in advance!
User avatar
kevlahnota
Programmer
 
Posts: 825
Joined: 19 Jul 2010, 17:45
Location: Philippines
Has thanked: 14 times
Been thanked: 264 times

Re: General Help For Coding Cards thread

Postby pun1sher666 » 23 Jul 2010, 07:42

Hi,

To get the current player upkeep turn in your code, you don't need to ask for a target.
You can use TriggerPlayer().

Here an example of what you could write.

Code: Select all
<TRIGGERED_ABILITY tag="BRAIDS_CABAL_MINION_RULE_1" auto_skip="1" layer="0">
      <TRIGGER value="BEGINNING_OF_STEP">
        return ( MTG():GetStep() == STEP_UPKEEP and TriggerPlayer():MyTurn() ~= 0 )
      </TRIGGER>
     <PRE_EFFECT>
      local PSacrificeLCA = TriggerPlayer()
      Object():Register_Player_Set( 0, PSacrificeLCA )
      Object():GetFilter():Clear()
      Object():GetFilter():SetPlayer( PSacrificeLCA )
      Object():GetFilter():SetZone( ZONE_IN_PLAY )
      Object():GetFilter():SetController( PSacrificeLCA )
      Object():GetFilter():AddCardType( CARD_TYPE_LAND )
      Object():GetFilter():AddCardType( CARD_TYPE_CREATURE )
      Object():GetFilter():AddCardType( CARD_TYPE_ARTIFACT )
      PSacrificeLCA:ChooseTarget( "ChooseTarget" )
     </PRE_EFFECT>
     <EFFECT>
        SacrificeTargetCard()
     </EFFECT>
</TRIGGERED_ABILITY>
Hope it will help :)
pun1sher666
 
Posts: 37
Joined: 09 Jul 2010, 13:49
Has thanked: 0 time
Been thanked: 0 time

Next

Return to Programming Talk

Who is online

Users browsing this forum: No registered users and 6 guests


Who is online

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

Login Form