Board index
Programs with AI or Rules Enforcement
Magic: The Gathering - Duels of the Planeswalkers
Programming Talk



Talk about new cards here
Moderator: CCGHQ Admins
-
Huggybaby - Administrator
- Posts: 3228
- Joined: 15 Jan 2006, 19:44
- Location: Finally out of Atlanta
- Has thanked: 753 times
- Been thanked: 601 times
Re: Talk about new cards here
by kevlahnota » 23 Jun 2011, 14:53
Welcome Back Clark!!!
We need to start modding Dotp 2012, I hope Gibbed release a temporary memory patch to bypass Wad check or anything that can load our custom Wads.
I hope a custom DLL injection method will do good.

We need to start modding Dotp 2012, I hope Gibbed release a temporary memory patch to bypass Wad check or anything that can load our custom Wads.
I hope a custom DLL injection method will do good.

Clark wrote:Hi, thank you for your comment. A good news to you, in DOTP 2012 there is a new API to implement this function. You could get it from card Explore.![]()
To other guys, long time no see. These days i played DOTP 2012 from some times, being happy to see some new API like playForExtraTurn() & some new modes in games. But unfortunately, PlaneWalker & some powerful ability like 'infec' are still not implement. Hope it would be released later.
![]()
-
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
by Clark » 26 Jun 2011, 04:31
That sounds good. Shall we create another SVN branch for DOTP 2012 mod?kevlahnota wrote:Welcome Back Clark!!!![]()
We need to start modding Dotp 2012, I hope Gibbed release a temporary memory patch to bypass Wad check or anything that can load our custom Wads.
I hope a custom DLL injection method will do good.![]()

Waiting for Gibbed's release then.

- Clark
- Posts: 64
- Joined: 21 Aug 2010, 16:07
- Has thanked: 0 time
- Been thanked: 0 time
Re: Talk about new cards here
by kevlahnota » 26 Jun 2011, 04:36

Here's a preview:
viewtopic.php?f=62&t=4890
Clark wrote:That sounds good. Shall we create another SVN branch for DOTP 2012 mod?![]()
Waiting for Gibbed's release then.
-
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
by nabeshin » 30 Jul 2011, 00:46
About DOTP Custom DLC MODs...
Many cards have the negligent code, some even change registers of others cards. For comparison I will result my code for the "SCROLL RACK" :
(Doesn't change registers)
<ACTIVATED_ABILITY tag="SCROLL_RACK_RULE_1" layer="0">
<COST type="Mana" cost="{1}" />
<COST type="TapSelf" />
<PLAYTIME>
local controller = Object():GetController()
local prom = {}
while #prom < CountCardsInHand( controller ) do
prom[#prom + 1] = "SCROLL_RACK_CHOOSEASIDE"
end
MayChooseNFromHand( controller, controller, prom )
</PLAYTIME>
<PRE_EFFECT>
if Object():GetNumberOfTargets() > 0 then
local prom = {}
while Object():GetNthTargetCard( #prom ) ~= nil do
prom[#prom + 1] = "SCROLL_RACK_CHOOSECARDS"
if Object():GetController():Library_GetTop() ~= nil then
Object():GetController():Library_GetTop():PutInHand()
end
end
for i=0, #prom-1 do
Object():GetNthTargetCard( i ):PutInLibrary( 0 )
end
LookAtTopNCardsOfLibrary( Object():GetController(), prom )
end
</PRE_EFFECT>
<EFFECT>
for i=0, Object():GetNumberOfTargets() - 1 do
Object():GetNthTargetCard( i ):PutInLibrary( 0 )
end
</EFFECT>
<AI_AVAILABILITY behaviour="InResponseOrBeforeMyUntap" />
</ACTIVATED_ABILITY>
And here an original code, from DLC MODs:
<ACTIVATED_ABILITY tag="SCROLL_RACK_RULE_1" layer="0">
<COST type="Mana" cost="{1}" />
<COST type="TapSelf" />
<EFFECT>
Object():Register_Set( 1, 0 )
Object():Register_Set( 0, 1 )
</EFFECT>
<AI_AVAILABILITY behaviour="InResponseOrBeforeEitherUntap"/>
</ACTIVATED_ABILITY>
<TRIGGERED_ABILITY tag="_COMMON_BLANKLINE" forced_skip="1" layer="0" zone="any">
<TRIGGER value="ABILITY_RESOLVED">
return ( SelfTriggered() and Object():Register_Get(0) > 0 )
</TRIGGER>
<PRE_EFFECT>
Object():GetFilter():Clear()
Object():GetFilter():SetZone( ZONE_HAND )
Object():GetFilter():SetPlayer( Object():GetPlayer() )
Object():GetFilter():May()
ChooseTarget( "SCROLL_RACK_CHOOSEASIDE" )
</PRE_EFFECT>
<EFFECT>
if (Object():GetTargetCard() ~= nil) then
Object():GetTargetCard():Register_Object_Set( 5, Object() )
Object():GetTargetCard():RemoveFromGame()
Object():Register_Inc(1)
else
for i=0, Object():Register_Get(1)-1 do
if Object():GetPlayer():Library_GetTop() ~= nil then
Object():GetPlayer():Library_GetTop():PutInHand()
end
end
Object():Register_Set( 0, 0 )
Object():Register_Set( 4, 1 )
end
</EFFECT>
</TRIGGERED_ABILITY>
<TRIGGERED_ABILITY layer="0" zone="Any" internal="1">
<TRIGGER value="ABILITY_RESOLVED">
return ( SelfTriggered() and Object():Register_Get(4) == 1 )
</TRIGGER>
<FILTER>
return RemovedFromGame() and Subject():Register_Object_Get( 5 ) == Object()
</FILTER>
<EFFECT>
if Subject() ~= nil then
Subject():PutInLibrary( 0 )
Subject():Register_Object_Clear( 5 )
end
Object():Register_Set( 4, 2 )
</EFFECT>
</TRIGGERED_ABILITY>
<TRIGGERED_ABILITY tag="_COMMON_BLANKLINE" forced_skip="1" layer="0" >
<TRIGGER value="ABILITY_RESOLVED">
return ( SelfTriggered() and Object():Register_Get(4) == 2 )
</TRIGGER>
<PRE_EFFECT>
Object():GetFilter():Clear()
Object():GetFilter():SetZone( ZONE_LIBRARY )
Object():GetFilter():SetPlayer( Object():GetPlayer() )
if Object():Register_Get(1) > 0 then
Object():GetFilter():SetPortion( Object():Register_Get(1) )
ChooseTarget( "SCROLL_RACK_CHOOSECARDS" )
end
</PRE_EFFECT>
<EFFECT>
if (Object():GetTargetCard() ~= nil and Object():Register_Get(1) > 0) then
Object():GetTargetCard():PutInLibrary( Object():Register_Get(1)-1 )
Object():Register_Dec(1)
else
Object():Register_Set( 4, 0 )
end
</EFFECT>
</TRIGGERED_ABILITY>
The original code is quite efficient, but doesn't maintain attack to the registers from other cards and leads to errors.
Many cards have the negligent code, some even change registers of others cards. For comparison I will result my code for the "SCROLL RACK" :
(Doesn't change registers)
<ACTIVATED_ABILITY tag="SCROLL_RACK_RULE_1" layer="0">
<COST type="Mana" cost="{1}" />
<COST type="TapSelf" />
<PLAYTIME>
local controller = Object():GetController()
local prom = {}
while #prom < CountCardsInHand( controller ) do
prom[#prom + 1] = "SCROLL_RACK_CHOOSEASIDE"
end
MayChooseNFromHand( controller, controller, prom )
</PLAYTIME>
<PRE_EFFECT>
if Object():GetNumberOfTargets() > 0 then
local prom = {}
while Object():GetNthTargetCard( #prom ) ~= nil do
prom[#prom + 1] = "SCROLL_RACK_CHOOSECARDS"
if Object():GetController():Library_GetTop() ~= nil then
Object():GetController():Library_GetTop():PutInHand()
end
end
for i=0, #prom-1 do
Object():GetNthTargetCard( i ):PutInLibrary( 0 )
end
LookAtTopNCardsOfLibrary( Object():GetController(), prom )
end
</PRE_EFFECT>
<EFFECT>
for i=0, Object():GetNumberOfTargets() - 1 do
Object():GetNthTargetCard( i ):PutInLibrary( 0 )
end
</EFFECT>
<AI_AVAILABILITY behaviour="InResponseOrBeforeMyUntap" />
</ACTIVATED_ABILITY>
And here an original code, from DLC MODs:
<ACTIVATED_ABILITY tag="SCROLL_RACK_RULE_1" layer="0">
<COST type="Mana" cost="{1}" />
<COST type="TapSelf" />
<EFFECT>
Object():Register_Set( 1, 0 )
Object():Register_Set( 0, 1 )
</EFFECT>
<AI_AVAILABILITY behaviour="InResponseOrBeforeEitherUntap"/>
</ACTIVATED_ABILITY>
<TRIGGERED_ABILITY tag="_COMMON_BLANKLINE" forced_skip="1" layer="0" zone="any">
<TRIGGER value="ABILITY_RESOLVED">
return ( SelfTriggered() and Object():Register_Get(0) > 0 )
</TRIGGER>
<PRE_EFFECT>
Object():GetFilter():Clear()
Object():GetFilter():SetZone( ZONE_HAND )
Object():GetFilter():SetPlayer( Object():GetPlayer() )
Object():GetFilter():May()
ChooseTarget( "SCROLL_RACK_CHOOSEASIDE" )
</PRE_EFFECT>
<EFFECT>
if (Object():GetTargetCard() ~= nil) then
Object():GetTargetCard():Register_Object_Set( 5, Object() )
Object():GetTargetCard():RemoveFromGame()
Object():Register_Inc(1)
else
for i=0, Object():Register_Get(1)-1 do
if Object():GetPlayer():Library_GetTop() ~= nil then
Object():GetPlayer():Library_GetTop():PutInHand()
end
end
Object():Register_Set( 0, 0 )
Object():Register_Set( 4, 1 )
end
</EFFECT>
</TRIGGERED_ABILITY>
<TRIGGERED_ABILITY layer="0" zone="Any" internal="1">
<TRIGGER value="ABILITY_RESOLVED">
return ( SelfTriggered() and Object():Register_Get(4) == 1 )
</TRIGGER>
<FILTER>
return RemovedFromGame() and Subject():Register_Object_Get( 5 ) == Object()
</FILTER>
<EFFECT>
if Subject() ~= nil then
Subject():PutInLibrary( 0 )
Subject():Register_Object_Clear( 5 )
end
Object():Register_Set( 4, 2 )
</EFFECT>
</TRIGGERED_ABILITY>
<TRIGGERED_ABILITY tag="_COMMON_BLANKLINE" forced_skip="1" layer="0" >
<TRIGGER value="ABILITY_RESOLVED">
return ( SelfTriggered() and Object():Register_Get(4) == 2 )
</TRIGGER>
<PRE_EFFECT>
Object():GetFilter():Clear()
Object():GetFilter():SetZone( ZONE_LIBRARY )
Object():GetFilter():SetPlayer( Object():GetPlayer() )
if Object():Register_Get(1) > 0 then
Object():GetFilter():SetPortion( Object():Register_Get(1) )
ChooseTarget( "SCROLL_RACK_CHOOSECARDS" )
end
</PRE_EFFECT>
<EFFECT>
if (Object():GetTargetCard() ~= nil and Object():Register_Get(1) > 0) then
Object():GetTargetCard():PutInLibrary( Object():Register_Get(1)-1 )
Object():Register_Dec(1)
else
Object():Register_Set( 4, 0 )
end
</EFFECT>
</TRIGGERED_ABILITY>
The original code is quite efficient, but doesn't maintain attack to the registers from other cards and leads to errors.
-
Huggybaby - Administrator
- Posts: 3228
- Joined: 15 Jan 2006, 19:44
- Location: Finally out of Atlanta
- Has thanked: 753 times
- Been thanked: 601 times
Re: Talk about new cards here
by sansahansan » 14 Nov 2011, 03:12
I'm looking at card creation in 2012 - got a few customs done as testing blocks as I learn the xml format etc.
Many thanks to Kev (the 2012Editor) and the Gibbed tools, those are working fine.
I'm sticking on creating a 'Hermetic Study' - enchant creature, creature gains 'tap to deal 1 pt of damage to target player or creature'
I can figure out how to get the card to enchant a creature, but I can't figure out how to then add the 'cost=tap' and the ability to the creature.
I've tried playing with triggered ability, activate ability, and even static ability, but so far, the card is fine until it enchants a creature then it dies
as in, the game crashes. Any suggestions or leads on which way I should be delving in deeper on it? It was supposed to be a building block into predatory instinct, which is similar but stronger.
Also - where would I post a bug found in Kev's 2012 mod? (tried to artifact type to an existing enchantment so I could steal it and crashed the game - realized after that 'target permanent' doesn't mean enchantments lol)
Many thanks to Kev (the 2012Editor) and the Gibbed tools, those are working fine.
I'm sticking on creating a 'Hermetic Study' - enchant creature, creature gains 'tap to deal 1 pt of damage to target player or creature'
I can figure out how to get the card to enchant a creature, but I can't figure out how to then add the 'cost=tap' and the ability to the creature.
I've tried playing with triggered ability, activate ability, and even static ability, but so far, the card is fine until it enchants a creature then it dies

Also - where would I post a bug found in Kev's 2012 mod? (tried to artifact type to an existing enchantment so I could steal it and crashed the game - realized after that 'target permanent' doesn't mean enchantments lol)
- sansahansan
- Posts: 1
- Joined: 14 Nov 2011, 02:53
- Has thanked: 0 time
- Been thanked: 0 time
by Flash Magician » 03 Dec 2011, 23:30
-
Last edited by Flash Magician on 13 Jan 2017, 23:59, edited 1 time in total.
- Flash Magician
- Posts: 1
- Joined: 03 Dec 2011, 22:30
- Has thanked: 0 time
- Been thanked: 0 time
Re: Talk about new cards here
by nabeshin » 04 Dec 2011, 01:16
SUPERTYPE_BASIC
if Object():GetTargetCard() ~= nil then
local card = Object():GetTargetCard()
if card:GetSuperType():Test( SUPERTYPE_BASIC ) ~= 0 then
card:GetController():DealDamage(2, Object())
end
card:Destroy()
end
if Object():GetTargetCard() ~= nil then
local card = Object():GetTargetCard()
if card:GetSuperType():Test( SUPERTYPE_BASIC ) ~= 0 then
card:GetController():DealDamage(2, Object())
end
card:Destroy()
end
Re: Talk about new cards here
by nabeshin » 04 Dec 2011, 01:20
enchantment - aura?sansahansan wrote:I'm looking at card creation in 2012 - got a few customs done as testing blocks as I learn the xml format etc.
Many thanks to Kev (the 2012Editor) and the Gibbed tools, those are working fine.
I'm sticking on creating a 'Hermetic Study' - enchant creature, creature gains 'tap to deal 1 pt of damage to target player or creature'
I can figure out how to get the card to enchant a creature, but I can't figure out how to then add the 'cost=tap' and the ability to the creature.
I've tried playing with triggered ability, activate ability, and even static ability, but so far, the card is fine until it enchants a creature then it diesas in, the game crashes. Any suggestions or leads on which way I should be delving in deeper on it? It was supposed to be a building block into predatory instinct, which is similar but stronger.
Also - where would I post a bug found in Kev's 2012 mod? (tried to artifact type to an existing enchantment so I could steal it and crashed the game - realized after that 'target permanent' doesn't mean enchantments lol)
Re: Talk about new cards here
by drugskill » 29 Jan 2012, 06:58
Was the ability Cascade for DotP 2010 finally coded with success? I would love to create cards with this ability.
Would also love to have some code template for "If a spell or ability an opponent controls causes you to discard "X Card", put it onto the battlefield instead of putting it into your graveyard.". I would love to create Obstinate Baloth and Wilt-Leaf Liege. I just need that code to finish Wilt-Leaf Liege.
Would also love to have some code template for "If a spell or ability an opponent controls causes you to discard "X Card", put it onto the battlefield instead of putting it into your graveyard.". I would love to create Obstinate Baloth and Wilt-Leaf Liege. I just need that code to finish Wilt-Leaf Liege.
- Code: Select all
<?xml version="1.0"?>
<MULTICARDS>
<CARD>
<!--
///////////////////////////////////////////////////////////////////////////////////
CARD INFORMATIONS : IN PROGRESS
///////////////////////////////////////////////////////////////////////////////////
-->
<FILENAME text = "WILT_LEAF_LIEGE" />
<ARTID value = "22220006" />
<TITLE text = "WILT_LEAF_LIEGE_TITLE" />
<TYPE metaname = "Creature" />
<SUB_TYPE metaname = "Elf" />
<SUB_TYPE metaname = "Knight" />
<POWER value = "3" />
<TOUGHNESS value = "4" />
<CASTING_COST cost = "{1}{G/W}{G/W}{G/W}" />
<COLOR value = "Z" />
<FRAMECOLOUR name = "GW gold" />
<EXPANSION metaname = "7777" />
<RARITY metaname = "Rare" />
<COLLECTIONMAX value = "0" />
<COLLECTORNUMBER value = "0" />
<CARDNUMBER value = "0" />
<ARTIST name = "Jason Chan" />
<!--
///////////////////////////////////////////////////////////////////////////////////
START OF CARD ABILITIES
///////////////////////////////////////////////////////////////////////////////////
-->
<STATIC_ABILITY tag="WILT_LEAF_LIEGE_RULE_1" layer="6">
<FILTER>
return OtherCreaturesInPlayYouControl() and ColourTest( COLOUR_GREEN )
</FILTER>
<EFFECT>
PlusOnePlusOne()
</EFFECT>
</STATIC_ABILITY>
<STATIC_ABILITY tag="WILT_LEAF_LIEGE_RULE_2" layer="6">
<FILTER>
return OtherCreaturesInPlayYouControl() and ColourTest( COLOUR_WHITE )
</FILTER>
<EFFECT>
PlusOnePlusOne()
</EFFECT>
</STATIC_ABILITY>
<!--
///////////////////////////////////////////////////////////////////////////////////
END OF CARD ABILITIES
///////////////////////////////////////////////////////////////////////////////////
-->
<SFX text="WHITEBLADE2_attack" />
</CARD>
</MULTICARDS>
Re: Talk about new cards here
by remosewa » 16 Oct 2012, 10:17
I'm trying to make a 'grand architect' card, and of course, the difficult ability to implement is the: "Tap an untapped blue creature you control: Add {{2}} to your mana pool. Spend this mana only to cast artifact spells or activate abilities of artifacts."
The only way I can think of doing this is to first have an activated ability that will allow you to tap any blue untapped creatures that you control. Add two random counters to 'grand architect' for each one selected and tap selected creatures. Then add a triggered ability that the last ability will call and have you select any land cards and add a counter for each one selected. Finally select a card from your hand with converted mana cost <= number of counters and then clear the counters and play that card.
Problems I have with above method:
(1) It's a bit messy.
(2) If they tap all these creatures, and then realize they cant afford a card still, then there is no way to untap all the things they tapped.
(3) It will not behave correctly if there are other spells which affect the affects the manapool.
Anyone have a better idea?
The only way I can think of doing this is to first have an activated ability that will allow you to tap any blue untapped creatures that you control. Add two random counters to 'grand architect' for each one selected and tap selected creatures. Then add a triggered ability that the last ability will call and have you select any land cards and add a counter for each one selected. Finally select a card from your hand with converted mana cost <= number of counters and then clear the counters and play that card.
Problems I have with above method:
(1) It's a bit messy.
(2) If they tap all these creatures, and then realize they cant afford a card still, then there is no way to untap all the things they tapped.
(3) It will not behave correctly if there are other spells which affect the affects the manapool.
Anyone have a better idea?
- remosewa
- Posts: 5
- Joined: 14 Oct 2012, 05:56
- Has thanked: 0 time
- Been thanked: 0 time
Re: Talk about new cards here
by sadlyblue » 16 Oct 2012, 13:43
how about the activated abilities reduced the casting cost for artifacts by 2, each time it's activated. then, when the player casts an artifact increase it again.
either way, its not easy to code.
either way, its not easy to code.
Re: Talk about new cards here
by remosewa » 18 Oct 2012, 00:26
Good idea, I ended up having to do a mixture of the two ideas so that I could still check for when an artifact spell was played and then decrease the cost. I'm having some problems with the ability though. I'm throwing in wish counters and then trying to remove them when either an artifact spell is played or at the beginning of the next step, however neither seem to be triggering. I was wondering if anyone could tell me why.
- Code: Select all
<ACTIVATED_ABILITY filter_zone="ZONE_IN_PLAY" active_zone="ZONE_IN_PLAY">
<LOCALISED_TEXT LanguageCode="en-US"><![CDATA[Tap an untapped blue creature you control: Artificat spells or activated abilities cost {2} less until end of turn.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="fr-FR"><![CDATA[{T}: Le Pyromancien sybarite inflige 1 blessure à une cible, créature ou joueur.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="es-ES"><![CDATA[{T}: El Piromante pródigo hace 1 punto de daño a la criatura o jugador objetivo.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="de-DE"><![CDATA[{T}: Der Verschwenderische Feuerkundler fügt einer Kreatur oder einem Spieler deiner Wahl 1 Schadenspunkt zu.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="it-IT"><![CDATA[{T}: Il Piromante Errante infligge 1 danno a una creatura o a un giocatore bersaglio.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="jp-JA"><![CDATA[{T}:??????1???????1??????????????????1???????????]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="ko-KR"><![CDATA[{T}: ?? ? ?? ???? ? ?? ??? ???. ??? ????? ? ???? ?? 1?? ???.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="ru-RU"><![CDATA[{T}: ?????????? ?????????? ??????? 1 ??????????? ???????? ???????? ??? ??????.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="pt-BR"><![CDATA[{T}: Piromante Pródigo causa 1 ponto de dano à criatura ou jogador alvo.]]></LOCALISED_TEXT>
<COST type="Mana" cost="" />
<TARGET_DEFINITION id="0">
local filter = Object():GetFilter()
filter:Clear()
filter:SetZone( ZONE_IN_PLAY )
filter:AddCardType( CARD_TYPE_CREATURE )
filter:SetController( EffectController() )
filter:AddColour( COLOUR_BLUE )
filter:AddExtra( FILTER_EXTRA_CREATURE_UNTAPPED )
filter:AIMay()
filter:May()
filter:NotTargetted()
</TARGET_DEFINITION>
<FILTER>
local filteredCard = FilteredCard()
local objectPlayer = Object():GetPlayer()
return (FilteredCard():GetColour():Test( COLOUR_BLUE ) ~= 0) and (FilteredCard():GetPlayer() == Object():GetPlayer()) and (FilteredCard() ~= nil)
</FILTER>
<TARGET_DETERMINATION>
return AtLeastOneTargetFromDefinition(0)
</TARGET_DETERMINATION>
<PLAY_TIME_ACTION>
local filter = Object():LoadTargetDefinition(0)
local max_victims = filter:Count()
local player = EffectController()
if max_victims > 0 then
player:SetTargetCount(max_victims)
for i=0,max_victims-1 do
player:SetTargetPrompt( i, "CARD_QUERY_CHOOSE_PERMANENT_TO_TAP" )
end
player:ChooseTargets( 0, EffectDC():Make_Targets(0) )
end
</PLAY_TIME_ACTION>
<RESOLUTION_TIME_ACTION>
local filter = Object():LoadTargetDefinition(0)
local max_victims = filter:Count()
local player = EffectController()
local count = 0
for i=0,max_victims-1 do
local victim = EffectDC():Get_Targets(0):Get_CardPtr(i)
if victim ~= nil and victim:Tapped() == 0 then
victim:Tap()
count = count + 1
end
end
if EffectSource() ~= nil then
Object():AddCounters( MTG():GetCountersType("WISH"), count*2 )
end
</RESOLUTION_TIME_ACTION>
</ACTIVATED_ABILITY>
<STATIC_ABILITY filter_zone="ZONE_HAND">
<FILTER>
local filteredCard = FilteredCard()
local objectPlayer = Object():GetPlayer()
return (FilteredCard() ~= nil and FilteredCard():GetCardType():Test( CARD_TYPE_ARTIFACT) ~= 0 and FilteredCard():GetPlayer() == Object():GetPlayer())
</FILTER>
<CONTINUOUS_ACTION layer="8">
if FilteredCard() ~= nil then
local count = Object():CountCounters( MTG():GetCountersType("WISH"))
FilteredCard():DecreaseCost(count)
end
</CONTINUOUS_ACTION>
</STATIC_ABILITY>
<TRIGGERED_ABILITY auto_skip="1" filter_zone="ZONE_IN_PLAY">
<TRIGGER value="SPELL_PLAYED" simple_qualifier="objectyoucontrol" />
<RESOLUTION_TIME_ACTION>
local card = TriggerObject()
if card =~ nil and card:GetCardType():Test( CARD_TYPE_ARTIFACT ) ~= 0 then
local cost = card:GetConvertedManaCost()
local count = Object():CountCounters(MTG():GetCountersType("WISH"))
if (cost > count) then
Object():RemoveCounters( MTG():GetCountersType("WISH"),count)
else
Object():RemoveCounters( MTG():GetCountersType("WISH"),cost)
end
end
</RESOLUTION_TIME_ACTION>
</TRIGGERED_ABILITY>
<TRIGGERED_ABILITY resource_id="1" filter_zone="ZONE_IN_PLAY">
<TRIGGER value="BEGINNING_OF_STEP" simple_qualifier="controller"/>
<RESOLUTION_TIME_ACTION>
local count = Object():CountCounters(MTG():GetCountersType("WISH"))
Object():RemoveCounters( MTG():GetCountersType("WISH"),1)
</RESOLUTION_TIME_ACTION>
</TRIGGERED_ABILITY>
- remosewa
- Posts: 5
- Joined: 14 Oct 2012, 05:56
- Has thanked: 0 time
- Been thanked: 0 time
Re: Talk about new cards here
by remosewa » 18 Oct 2012, 10:13
nvm, I figured it out. I know I had at least one syntax error, and I messed around with some other things until I got it working. Card works perfectly now =).
- remosewa
- Posts: 5
- Joined: 14 Oct 2012, 05:56
- Has thanked: 0 time
- Been thanked: 0 time
Who is online
Users browsing this forum: No registered users and 17 guests