Board index Programs with AI or Rules Enforcement Magic: The Gathering - Duels of the Planeswalkers New MTG Cards and Decks (2010, 2012, 2013, 2014, 2015, Magic Duels)
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!
Get MTG cards here for your DotP that aren't available anywhere else!
Moderator: CCGHQ Admins
Re: Card Creation Request Thread
by thefiremind » 01 Nov 2014, 19:20
A possible way to do this is to loop through the top 3 cards and see how many instants or sorceries are there, then you use that number for SetPortion. I'm trying to write some code, but I can't guarantee its correctness since I'm not used to DotP2012 anymore, I hope you get the idea anyway:NEMESiS wrote:Thefiremind had the right idea of first creating a section where we just look at the top 3 cards, after that we make a distinction of just being able to get instants and sorceries from among then. I am having issues making that distinction.
- Code: Select all
local instants_or_sorceries = 0
for i=0,2 do
local card = Object():GetPlayer():Library_GetNth(i)
if card ~= nil and (card:GetCardType():Test( CARD_TYPE_SORCERY ) ~= 0 or card:GetCardType():Test( CARD_TYPE_INSTANT ) ~= 0) then
instants_or_sorceries = instants_or_sorceries + 1
end
end
if instants_or_sorceries > 0 then
local filter = Object():GetFilter()
filter:Clear()
filter:NotTargetted()
filter:SetPlayer( Object():GetPlayer() )
filter:SetZone( ZONE_LIBRARY )
filter:SetPortion( instants_or_sorceries )
filter:AddCardType( CARD_TYPE_SORCERY )
filter:AddCardType( CARD_TYPE_INSTANT )
ChooseTarget( "CARD_QUERY_CHOOSE_INSTANT_OR_SORCERY_TO_PUT_INTO_HAND" )
end
< Former DotP 2012/2013/2014 modder >
Currently busy with life...
Currently busy with life...
-
thefiremind - Programmer
- Posts: 3515
- Joined: 07 Nov 2011, 10:55
- Has thanked: 118 times
- Been thanked: 721 times
Re: Card Creation Request Thread
by nguyenxthinh » 02 Nov 2014, 10:37
Hello everyone, any chance I can get Ragged Veins (which seems not working in the early post )?
Also, I am looking for some curses for personal use:
Curse of the Forsaken
Curse of Inertia
Curse of Shallow Graves
Curse of Chaos
Curse of Stalked Prey
Curse of the Nightly Hunt
Curse of Predation
Also, I am looking for some curses for personal use:
Curse of the Forsaken
Curse of Inertia
Curse of Shallow Graves
Curse of Chaos
Curse of Stalked Prey
Curse of the Nightly Hunt
Curse of Predation
- nguyenxthinh
- Posts: 45
- Joined: 02 Nov 2014, 10:21
- Has thanked: 33 times
- Been thanked: 1 time
Re: Card Creation Request Thread
by migookman » 02 Nov 2014, 13:15
nguyenxthinh wrote:Hello everyone, any chance I can get Ragged Veins (which seems not working in the early post )?
Also, I am looking for some curses for personal use:
Curse of the Forsaken
Curse of Inertia
Curse of Shallow Graves
Curse of Chaos
Curse of Stalked Prey
Curse of the Nightly Hunt
Curse of Predation
- Code: Select all
<?xml version='1.0' encoding='UTF-8'?>
<CARD_V2 ExportVersion="1">
<FILENAME text="RAGGED_VEINS_79158" />
<CARDNAME text="RAGGED_VEINS" />
<TITLE>
<LOCALISED_TEXT LanguageCode="en-US"><![CDATA[Ragged Veins]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="fr-FR"><![CDATA[Veines en lambeaux]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="es-ES"><![CDATA[Venas rasgadas]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="de-DE"><![CDATA[Raue Adern]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="it-IT"><![CDATA[Vene Lacerate]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="jp-JA"><![CDATA[ほつれた血管]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="ko-KR"><![CDATA[Ragged Veins]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="ru-RU"><![CDATA[Ragged Veins]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="pt-BR"><![CDATA[Veias Rotas]]></LOCALISED_TEXT>
</TITLE>
<MULTIVERSEID value="79158" />
<ARTID value="79158" />
<ARTIST name="Chippy" />
<CASTING_COST cost="{1}{B}" />
<TYPE metaname="Enchantment" />
<SUB_TYPE metaname="Aura" />
<EXPANSION value="CHK" />
<RARITY metaname="C" />
<STATIC_ABILITY>
<LOCALISED_TEXT LanguageCode="en-US"><![CDATA[Flash]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="fr-FR"><![CDATA[Flash]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="es-ES"><![CDATA[Destello.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="de-DE"><![CDATA[Aufblitzen]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="it-IT"><![CDATA[Lampo]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="jp-JA"><![CDATA[瞬速]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="ko-KR"><![CDATA[섬광]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="ru-RU"><![CDATA[Миг]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="pt-BR"><![CDATA[Lampejo]]></LOCALISED_TEXT>
<INTRINSIC characteristic="CHARACTERISTIC_FLASH" />
</STATIC_ABILITY>
<SPELL_ABILITY attach_definition="0">
<LOCALISED_TEXT LanguageCode="en-US"><![CDATA[Enchant creature]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="fr-FR"><![CDATA[À chaque fois que la créature enchantée se voit infliger des blessures, son contrôleur perd autant de points de vie.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="es-ES"><![CDATA[Siempre que la criatura encantada reciba daño, su controlador pierde la misma cantidad de vida.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="de-DE"><![CDATA[Immer wenn der verzauberten Kreatur Schaden zugefügt wird, verliert ihr Beherrscher genau so viele Lebenspunkte.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="it-IT"><![CDATA[Incanta creatura]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="jp-JA"><![CDATA[エンチャントされているクリーチャーにダメージが与えられるたび、それのコントローラーはその点数に等しい点数のライフを失う。]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="ko-KR"><![CDATA[Enchant creature]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="ru-RU"><![CDATA[Enchant creature]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="pt-BR"><![CDATA[Toda vez que a criatura encantada sofrer dano, o seu controlador perde aquela quantidade de dano em pontos de vida.]]></LOCALISED_TEXT>
<TARGET tag="CARD_QUERY_CHOOSE_CREATURE_TO_ENCHANT" definition="0" compartment="0" count="1" />
<TARGET_DEFINITION id="0">
local filter = ClearFilter()
filter:Add( FE_TYPE, OP_IS, CARD_TYPE_CREATURE )
</TARGET_DEFINITION>
<RESOLUTION_TIME_ACTION>
local target = EffectDC():Get_Targets(0):Get_CardPtr(0)
if (target ~= nil and EffectSource() ~= nil) then
EffectSource():Attach( target )
end
</RESOLUTION_TIME_ACTION>
<AI_SIMPLIFIED_TARGETING compartment="0" hint="HINT_ENEMY_ONLY" />
</SPELL_ABILITY>
<TRIGGERED_ABILITY>
<LOCALISED_TEXT LanguageCode="en-US"><![CDATA[Whenever enchanted creature is dealt damage, its controller loses that much life.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="fr-FR"><![CDATA[Whenever enchanted creature is dealt damage, its controller loses that much life.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="es-ES"><![CDATA[Whenever enchanted creature is dealt damage, its controller loses that much life.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="de-DE"><![CDATA[Whenever enchanted creature is dealt damage, its controller loses that much life.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="it-IT"><![CDATA[Ogniqualvolta viene inflitto danno alla creatura incantata, il suo controllore perde altrettanti punti vita.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="jp-JA"><![CDATA[Whenever enchanted creature is dealt damage, its controller loses that much life.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="ko-KR"><![CDATA[Whenever enchanted creature is dealt damage, its controller loses that much life.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="ru-RU"><![CDATA[Whenever enchanted creature is dealt damage, its controller loses that much life.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="pt-BR"><![CDATA[Whenever enchanted creature is dealt damage, its controller loses that much life.]]></LOCALISED_TEXT>
<TRIGGER value="OBJECT_TAKES_DAMAGE" damage_type="all">
if EffectSource() ~= nil then
return TriggerObject() == EffectSource():GetParent()
end
</TRIGGER>
<RESOLUTION_TIME_ACTION>
local damage = Damage():GetAmount()
if damage ~= 0 then
local controller = TriggerObjectLKI():GetPlayer()
EffectSourceLKI():DealDamageTo( damage, controller )
end
</RESOLUTION_TIME_ACTION>
</TRIGGERED_ABILITY>
<HELP title="MORE_INFO_BADGE_TITLE_12" body="MORE_INFO_BADGE_BODY_12" zone="ZONE_ANY" />
</CARD_V2>
Re: Card Creation Request Thread
by NEMESiS » 04 Nov 2014, 02:29
Not sure what Xander wrote as he edited his post. Let me give this a run see what I can do. Thanks!thefiremind wrote:A possible way to do this is to loop through the top 3 cards and see how many instants or sorceries are there, then you use that number for SetPortion. I'm trying to write some code, but I can't guarantee its correctness since I'm not used to DotP2012 anymore, I hope you get the idea anyway:NEMESiS wrote:Thefiremind had the right idea of first creating a section where we just look at the top 3 cards, after that we make a distinction of just being able to get instants and sorceries from among then. I am having issues making that distinction.Of course, before this part you still need to make a "dummy query" that shows you all the 3 cards. I like Xander9009's idea, though: if you already selected an instant or sorcery from the "dummy query", you could skip the part I wrote here and use that as the "official" selection.
- Code: Select all
local instants_or_sorceries = 0
for i=0,2 do
local card = Object():GetPlayer():Library_GetNth(i)
if card ~= nil and (card:GetCardType():Test( CARD_TYPE_SORCERY ) ~= 0 or card:GetCardType():Test( CARD_TYPE_INSTANT ) ~= 0) then
instants_or_sorceries = instants_or_sorceries + 1
end
end
if instants_or_sorceries > 0 then
local filter = Object():GetFilter()
filter:Clear()
filter:NotTargetted()
filter:SetPlayer( Object():GetPlayer() )
filter:SetZone( ZONE_LIBRARY )
filter:SetPortion( instants_or_sorceries )
filter:AddCardType( CARD_TYPE_SORCERY )
filter:AddCardType( CARD_TYPE_INSTANT )
ChooseTarget( "CARD_QUERY_CHOOSE_INSTANT_OR_SORCERY_TO_PUT_INTO_HAND" )
end
-
NEMESiS - Posts: 460
- Joined: 03 Jan 2013, 04:02
- Location: Pools of Becoming
- Has thanked: 70 times
- Been thanked: 21 times
Re: Card Creation Request Thread
by Xander9009 » 04 Nov 2014, 05:35
I mainly said this:NEMESiS wrote:Not sure what Xander wrote as he edited his post. Let me give this a run see what I can do. Thanks!
Action 1: Show top three cards, let player choose a card.
Action 2: If chosen card is instant or sorcery, skip. Otherwise, show player top X instants and sorceries where X is the number of I&S among the top three cards, let the player choose a card.
Action 3: Put chosen card in hand and the rest under the library.
(You may notice the second action is exactly what you were saying you had issues with. I misunderstood (by reading very badly) and thought you had trouble with the overall setup. So, I'm pretty sure the part TFM pointed out was the only useful bit.)
_______________________________
Community Wad - Community Wad Website - How to Help and Report Bugs
Discord: discord.gg/4AXvHzW
Community Wad - Community Wad Website - How to Help and Report Bugs
Discord: discord.gg/4AXvHzW
-
Xander9009 - Programmer
- Posts: 2905
- Joined: 29 Jun 2013, 07:44
- Location: Indiana, United States
- Has thanked: 121 times
- Been thanked: 445 times
Re: Card Creation Request Thread
by Vader » 11 Nov 2014, 10:10
Hello, anyone can give me code of Everlasting Torment for dotp 2014 if it possible?
- Vader
- Posts: 2
- Joined: 30 Jun 2013, 19:48
- Has thanked: 0 time
- Been thanked: 0 time
Re: Card Creation Request Thread
by nguyenxthinh » 14 Nov 2014, 15:03
Could someone send me the xml and the tdx of Fate Transfer please?
- nguyenxthinh
- Posts: 45
- Joined: 02 Nov 2014, 10:21
- Has thanked: 33 times
- Been thanked: 1 time
Re: Card Creation Request Thread
by nguyenxthinh » 17 Nov 2014, 17:04
And anyway, I found it in MC Brodie's DLC.
- nguyenxthinh
- Posts: 45
- Joined: 02 Nov 2014, 10:21
- Has thanked: 33 times
- Been thanked: 1 time
Re: Card Creation Request Thread
by nguyenxthinh » 20 Nov 2014, 12:59
I need help with Lightmine Field posted in page 22 (viewtopic.php?f=64&t=4557&start=315). Even I tried the trigger code provided by thefiremind, I can't make it work, it doesn't trigger at all. Please take a look at this XML.
- Attachments
-
- LIGHTMINE_FIELD_216339.rar
- It doesn't trigger.
- (2.12 KiB) Downloaded 447 times
- nguyenxthinh
- Posts: 45
- Joined: 02 Nov 2014, 10:21
- Has thanked: 33 times
- Been thanked: 1 time
Re: Card Creation Request Thread
by Xander9009 » 20 Nov 2014, 14:42
Which game are you trying to make it work for? 'Cause that code was made for 2013, I think (it might be 2012, but either way, it's not 2014). dangerous="1", filter:AddCardType, filter:AddExtra, and filter:NotTargetted are in the trigger ability tag or the trigger itself, and they have no meaning in 2014; hence, no triggering if that's where you're trying to use it. If so, here.nguyenxthinh wrote:I need help with Lightmine Field posted in page 22 (viewtopic.php?f=64&t=4557&start=315). Even I tried the trigger code provided by thefiremind, I can't make it work, it doesn't trigger at all. Please take a look at this XML.
- Lightning Field - 2014 | Open
- Code: Select all
<?xml version='1.0'?>
<CARD_V2>
<FILENAME text="LIGHTMINE_FIELD_909216339" />
<CARDNAME text="LIGHTMINE_FIELD" />
<TITLE>
<LOCALISED_TEXT LanguageCode="en-US"><![CDATA[Lightmine Field]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="it-IT"><![CDATA[Campo Illu-Minato]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="de-DE"><![CDATA[Lichtminenfeld]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="fr-FR"><![CDATA[Champ de lumemines]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="es-ES"><![CDATA[Campo de minas luminosas]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="jp-JA"><![CDATA[光雷原]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="ko-KR"><![CDATA[Lightmine Field]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="ru-RU"><![CDATA[Поле Световых Мин]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="pt-BR"><![CDATA[Campo Luminominado]]></LOCALISED_TEXT>
</TITLE>
<MULTIVERSEID value="909216339" />
<ARTID value="909216339" />
<ARTIST name="Eric Deschamps" />
<CASTING_COST cost="{2}{W}{W}" />
<FLAVOURTEXT>
<LOCALISED_TEXT LanguageCode="en-US"><![CDATA[If you want to kill a lot of goblins, just make sure your defenses look like fun.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="it-IT"><![CDATA[Se vuoi uccidere parecchi goblin, basta che tu faccia sembrare divertenti le tue difese.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="de-DE"><![CDATA[Falls du viele Goblins töten willst, müssen nur deine Abwehranlagen genügend Spaß versprechen.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="fr-FR"><![CDATA[Si vous voulez tuer beaucoup de gobelins, faites leur croire qu’ils vont s’éclater.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="es-ES"><![CDATA[Si quieres matar muchos trasgos, asegúrate de que tus defensas parezcan divertidas.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="jp-JA"><![CDATA[ゴブリンをたくさん殺そうとするなら、防御を面白おかしいものに見せろ。]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="ko-KR"><![CDATA[If you want to kill a lot of goblins, just make sure your defenses look like fun.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="ru-RU"><![CDATA[Если хотите убить много гоблинов, сделайте так, чтобы ваша оборона казалась им забавой.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="pt-BR"><![CDATA[Se quiser matar muitos goblins, basta fazer com que suas defesas pareçam divertidas.]]></LOCALISED_TEXT>
</FLAVOURTEXT>
<TYPE metaname="Enchantment" />
<EXPANSION value="ROE" />
<RARITY metaname="R" />
<TRIGGERED_ABILITY>
<LOCALISED_TEXT LanguageCode="en-US"><![CDATA[Whenever one or more creatures attack, Lightmine Field deals damage to each of those creatures equal to the number of attacking creatures.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="it-IT"><![CDATA[Ogniqualvolta una o più creature attaccano, il Campo Illu-Minato infligge a ognuna di quelle creature danno pari al numero di creature attaccanti.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="de-DE"><![CDATA[Immer wenn eine oder mehrere Kreaturen angreifen, fügt das Lichtminenfeld jeder dieser Kreaturen so viele Schadenspunkte zu, wie Kreaturen angreifen.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="fr-FR"><![CDATA[À chaque fois qu’au moins une créature attaque, le Champ de lumemines inflige à chacune de ces créatures un nombre de blessures égal au nombre de créatures attaquantes.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="es-ES"><![CDATA[Siempre que una o más criaturas ataquen, el Campo de minas luminosas hace daño a cada una de esas criaturas igual a la cantidad de criaturas atacantes.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="jp-JA"><![CDATA[1体以上のクリーチャーが攻撃するたび、光雷原はそれらに、それぞれ攻撃しているクリーチャーの総数に等しい点数のダメージを与える。]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="ko-KR"><![CDATA[Whenever one or more creatures attack, Lightmine Field deals damage to each of those creatures equal to the number of attacking creatures.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="ru-RU"><![CDATA[Каждый раз когда одно или несколько существ атакуют, Поле Световых Мин наносит каждому из тех существ повреждения, равные количеству атакующих существ.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="pt-BR"><![CDATA[Toda vez que uma ou mais criaturas atacam, Campo Luminominado causa uma quantidade de dano igual ao número de criaturas atacantes a cada uma dessas criaturas.]]></LOCALISED_TEXT>
<TRIGGER value="ATTACKERS_DECLARED">
local filter = ClearFilter()
filter:Add( FE_TYPE, OP_IS, CARD_TYPE_CREATURE )
filter:Add( FE_IS_ATTACKING, true )
local filter_count = filter:EvaluateObjects()
if filter_count > 0 then
EffectDC():Set_Int(0, filter_count)
local attackersDC = EffectDC():Make_Chest(0)
for i=0,filter_count-1 do
attackersDC:Set_CardPtr( i, filter:GetNthEvaluatedObject(i) )
end
return true
end
return false
</TRIGGER>
<RESOLUTION_TIME_ACTION>
local filter = ClearFilter()
filter:Add( FE_TYPE, OP_IS, CARD_TYPE_CREATURE )
filter:Add( FE_IS_ATTACKING, true )
EffectDC():Set_Int( 1, filter:Count() )
</RESOLUTION_TIME_ACTION>
<RESOLUTION_TIME_ACTION>
local declared_attackers = EffectDC():Get_Int(0)
local damage = EffectDC():Get_Int(1)
if declared_attackers > 0 and damage > 0 then
local attackersDC = EffectDC():Get_Chest(0)
local source = EffectSource()
if source == nil then
source = Object()
end
for i=0,declared_attackers-1 do
local attacker = attackersDC:Get_CardPtr(i)
if attacker ~= nil then
EffectSourceLKI():DealDamageTo( damage, attacker )
end
end
end
</RESOLUTION_TIME_ACTION>
<SFX text="GLOBAL_SUNBLAST_PLAY" />
</TRIGGERED_ABILITY>
<AI_BASE_SCORE score="600" zone="ZONE_IN_PLAY" />
<AUTHOR><![CDATA[thefiremind]]></AUTHOR>
<EDITORS><![CDATA[thefiremind, Xander9009]]></EDITORS>
<DATE><![CDATA[16-02-13, 20-11-14]]></DATE>
</CARD_V2>
- | Open
- Code: Select all
simple_qualifier="controller"
_______________________________
Community Wad - Community Wad Website - How to Help and Report Bugs
Discord: discord.gg/4AXvHzW
Community Wad - Community Wad Website - How to Help and Report Bugs
Discord: discord.gg/4AXvHzW
-
Xander9009 - Programmer
- Posts: 2905
- Joined: 29 Jun 2013, 07:44
- Location: Indiana, United States
- Has thanked: 121 times
- Been thanked: 445 times
Re: Card Creation Request Thread
by NeoAnderson » 20 Nov 2014, 15:17
Xander i think it could be more shorter to be coded something like :
- Lightmine Field | Open
- Code: Select all
<?xml version="1.0"?>
<CARD_V2 ExportVersion="1">
<FILENAME text="LIGHTMINE_FIELD_193463" />
<CARDNAME text="LIGHTMINE_FIELD" />
<TITLE>
<LOCALISED_TEXT LanguageCode="en-US"><![CDATA[Lightmine Field]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="fr-FR"><![CDATA[Champ de lumemines]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="es-ES"><![CDATA[Campo de minas luminosas]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="de-DE"><![CDATA[Lichtminenfeld]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="it-IT"><![CDATA[Campo Illu-Minato]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="jp-JA"><![CDATA[光雷原]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="ko-KR"><![CDATA[Lightmine Field]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="ru-RU"><![CDATA[Поле Световых Мин]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="pt-BR"><![CDATA[Campo Luminominado]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="zh-CN"><![CDATA[光雷区]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="zh-HK"><![CDATA[Lightmine Field]]></LOCALISED_TEXT>
</TITLE>
<MULTIVERSEID value="193463" />
<ARTID value="193463" />
<ARTIST name="Eric Deschamps" />
<CASTING_COST cost="{2}{W}{W}" />
<FLAVOURTEXT>
<LOCALISED_TEXT LanguageCode="en-US"><![CDATA[If you want to kill a lot of goblins, just make sure your defenses look like fun.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="fr-FR"><![CDATA[Si vous voulez tuer beaucoup de gobelins, faites leur croire qu’ils vont s’éclater.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="es-ES"><![CDATA[Si quieres matar muchos trasgos, asegúrate de que tus defensas parezcan divertidas.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="de-DE"><![CDATA[Falls du viele Goblins töten willst, müssen nur deine Abwehranlagen genügend Spaß versprechen.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="it-IT"><![CDATA[Se vuoi uccidere parecchi goblin, basta che tu faccia sembrare divertenti le tue difese.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="jp-JA"><![CDATA[ゴブリンをたくさん殺そうとするなら、防御を面白おかしいものに見せろ。]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="ko-KR"><![CDATA[If you want to kill a lot of goblins, just make sure your defenses look like fun.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="ru-RU"><![CDATA[Если хотите убить много гоблинов, сделайте так, чтобы ваша оборона казалась им забавой.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="pt-BR"><![CDATA[Se quiser matar muitos goblins, basta fazer com que suas defesas pareçam divertidas.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="zh-CN"><![CDATA[如果你想杀很多鬼怪,只要让自己看来毫无防备就行。]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="zh-HK"><![CDATA[If you want to kill a lot of goblins, just make sure your defenses look like fun.]]></LOCALISED_TEXT>
</FLAVOURTEXT>
<TYPE metaname="Enchantment" />
<EXPANSION value="ROE" />
<RARITY metaname="R" />
<TRIGGERED_ABILITY>
<LOCALISED_TEXT LanguageCode="en-US"><![CDATA[Whenever one or more creatures attack, Lightmine Field deals damage to each of those creatures equal to the number of attacking creatures.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="fr-FR"><![CDATA[À chaque fois qu’au moins une créature attaque, le Champ de lumemines inflige à chacune de ces créatures un nombre de blessures égal au nombre de créatures attaquantes.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="es-ES"><![CDATA[Siempre que una o más criaturas ataquen, el Campo de minas luminosas hace daño a cada una de esas criaturas igual a la cantidad de criaturas atacantes.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="de-DE"><![CDATA[Immer wenn eine oder mehrere Kreaturen angreifen, fügt das Lichtminenfeld jeder dieser Kreaturen so viele Schadenspunkte zu, wie Kreaturen angreifen.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="it-IT"><![CDATA[Ogniqualvolta una o più creature attaccano, il Campo Illu-Minato infligge a ognuna di quelle creature danno pari al numero di creature attaccanti.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="jp-JA"><![CDATA[1体以上のクリーチャーが攻撃するたび、光雷原はそれらに、それぞれ攻撃しているクリーチャーの総数に等しい点数のダメージを与える。]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="ko-KR"><![CDATA[Whenever one or more creatures attack, Lightmine Field deals damage to each of those creatures equal to the number of attacking creatures.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="ru-RU"><![CDATA[Каждый раз когда одно или несколько существ атакуют, Поле Световых Мин наносит каждому из тех существ повреждения, равные количеству атакующих существ.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="pt-BR"><![CDATA[Toda vez que uma ou mais criaturas atacam, Campo Luminominado causa uma quantidade de dano igual ao número de criaturas atacantes a cada uma dessas criaturas.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="zh-CN"><![CDATA[每当一个或更多生物攻击时,光雷区对这些生物各造成伤害,其数量等同于进行攻击的生物数量。]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="zh-HK"><![CDATA[Whenever one or more creatures attack, Lightmine Field deals damage to each of those creatures equal to the number of attacking creatures.]]></LOCALISED_TEXT>
<TRIGGER value="ATTACKERS_DECLARED">
local filter = ClearFilter()
filter:Add( FE_IS_ATTACKING, true )
local numCreaturesAttacking = filter:Count()
if numCreaturesAttacking > 0 then
EffectDC():Set_Int(0, numCreaturesAttacking)
return true
end
return false
</TRIGGER>
<FILTER filter_id="0">
local filter = ClearFilter()
filter:Add( FE_IS_ATTACKING, true )
filter:Add( FE_TYPE, OP_IS, CARD_TYPE_CREATURE )
</FILTER>
<RESOLUTION_TIME_ACTION filter_id="0">
local numCreaturesAttacking = EffectDC():Get_Int(0)
local creature = FilteredCard()
if numCreaturesAttacking > 0 and creature ~= nil then
EffectSourceLKI():DealDamageTo( numCreaturesAttacking, creature )
end
</RESOLUTION_TIME_ACTION>
<SFX text="GLOBAL_SUNBLAST_PLAY" />
</TRIGGERED_ABILITY>
<AI_BASE_SCORE score="600" zone="ZONE_BATTLEFIELD" />
</CARD_V2>
- NeoAnderson
- Posts: 914
- Joined: 10 Sep 2013, 07:49
- Has thanked: 18 times
- Been thanked: 139 times
Re: Card Creation Request Thread
by Xander9009 » 20 Nov 2014, 15:29
Yeah. I didn't even bother trying to properly code it. I just converted everything so it would work with 2014. I barely even paid attention to what it was... hahaNeoAnderson wrote:Xander i think it could be more shorter to be coded something like :
- Lightmine Field | Open
- Code: Select all
<?xml version="1.0"?>
<CARD_V2 ExportVersion="1">
<FILENAME text="LIGHTMINE_FIELD_193463" />
<CARDNAME text="LIGHTMINE_FIELD" />
<TITLE>
<LOCALISED_TEXT LanguageCode="en-US"><![CDATA[Lightmine Field]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="fr-FR"><![CDATA[Champ de lumemines]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="es-ES"><![CDATA[Campo de minas luminosas]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="de-DE"><![CDATA[Lichtminenfeld]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="it-IT"><![CDATA[Campo Illu-Minato]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="jp-JA"><![CDATA[光雷原]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="ko-KR"><![CDATA[Lightmine Field]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="ru-RU"><![CDATA[Поле Световых Мин]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="pt-BR"><![CDATA[Campo Luminominado]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="zh-CN"><![CDATA[光雷区]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="zh-HK"><![CDATA[Lightmine Field]]></LOCALISED_TEXT>
</TITLE>
<MULTIVERSEID value="193463" />
<ARTID value="193463" />
<ARTIST name="Eric Deschamps" />
<CASTING_COST cost="{2}{W}{W}" />
<FLAVOURTEXT>
<LOCALISED_TEXT LanguageCode="en-US"><![CDATA[If you want to kill a lot of goblins, just make sure your defenses look like fun.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="fr-FR"><![CDATA[Si vous voulez tuer beaucoup de gobelins, faites leur croire qu’ils vont s’éclater.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="es-ES"><![CDATA[Si quieres matar muchos trasgos, asegúrate de que tus defensas parezcan divertidas.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="de-DE"><![CDATA[Falls du viele Goblins töten willst, müssen nur deine Abwehranlagen genügend Spaß versprechen.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="it-IT"><![CDATA[Se vuoi uccidere parecchi goblin, basta che tu faccia sembrare divertenti le tue difese.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="jp-JA"><![CDATA[ゴブリンをたくさん殺そうとするなら、防御を面白おかしいものに見せろ。]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="ko-KR"><![CDATA[If you want to kill a lot of goblins, just make sure your defenses look like fun.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="ru-RU"><![CDATA[Если хотите убить много гоблинов, сделайте так, чтобы ваша оборона казалась им забавой.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="pt-BR"><![CDATA[Se quiser matar muitos goblins, basta fazer com que suas defesas pareçam divertidas.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="zh-CN"><![CDATA[如果你想杀很多鬼怪,只要让自己看来毫无防备就行。]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="zh-HK"><![CDATA[If you want to kill a lot of goblins, just make sure your defenses look like fun.]]></LOCALISED_TEXT>
</FLAVOURTEXT>
<TYPE metaname="Enchantment" />
<EXPANSION value="ROE" />
<RARITY metaname="R" />
<TRIGGERED_ABILITY>
<LOCALISED_TEXT LanguageCode="en-US"><![CDATA[Whenever one or more creatures attack, Lightmine Field deals damage to each of those creatures equal to the number of attacking creatures.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="fr-FR"><![CDATA[À chaque fois qu’au moins une créature attaque, le Champ de lumemines inflige à chacune de ces créatures un nombre de blessures égal au nombre de créatures attaquantes.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="es-ES"><![CDATA[Siempre que una o más criaturas ataquen, el Campo de minas luminosas hace daño a cada una de esas criaturas igual a la cantidad de criaturas atacantes.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="de-DE"><![CDATA[Immer wenn eine oder mehrere Kreaturen angreifen, fügt das Lichtminenfeld jeder dieser Kreaturen so viele Schadenspunkte zu, wie Kreaturen angreifen.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="it-IT"><![CDATA[Ogniqualvolta una o più creature attaccano, il Campo Illu-Minato infligge a ognuna di quelle creature danno pari al numero di creature attaccanti.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="jp-JA"><![CDATA[1体以上のクリーチャーが攻撃するたび、光雷原はそれらに、それぞれ攻撃しているクリーチャーの総数に等しい点数のダメージを与える。]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="ko-KR"><![CDATA[Whenever one or more creatures attack, Lightmine Field deals damage to each of those creatures equal to the number of attacking creatures.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="ru-RU"><![CDATA[Каждый раз когда одно или несколько существ атакуют, Поле Световых Мин наносит каждому из тех существ повреждения, равные количеству атакующих существ.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="pt-BR"><![CDATA[Toda vez que uma ou mais criaturas atacam, Campo Luminominado causa uma quantidade de dano igual ao número de criaturas atacantes a cada uma dessas criaturas.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="zh-CN"><![CDATA[每当一个或更多生物攻击时,光雷区对这些生物各造成伤害,其数量等同于进行攻击的生物数量。]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="zh-HK"><![CDATA[Whenever one or more creatures attack, Lightmine Field deals damage to each of those creatures equal to the number of attacking creatures.]]></LOCALISED_TEXT>
<TRIGGER value="ATTACKERS_DECLARED">
local filter = ClearFilter()
filter:Add( FE_IS_ATTACKING, true )
local numCreaturesAttacking = filter:Count()
if numCreaturesAttacking > 0 then
EffectDC():Set_Int(0, numCreaturesAttacking)
return true
end
return false
</TRIGGER>
<FILTER filter_id="0">
local filter = ClearFilter()
filter:Add( FE_IS_ATTACKING, true )
filter:Add( FE_TYPE, OP_IS, CARD_TYPE_CREATURE )
</FILTER>
<RESOLUTION_TIME_ACTION filter_id="0">
local numCreaturesAttacking = EffectDC():Get_Int(0)
local creature = FilteredCard()
if numCreaturesAttacking > 0 and creature ~= nil then
EffectSourceLKI():DealDamageTo( numCreaturesAttacking, creature )
end
</RESOLUTION_TIME_ACTION>
<SFX text="GLOBAL_SUNBLAST_PLAY" />
</TRIGGERED_ABILITY>
<AI_BASE_SCORE score="600" zone="ZONE_BATTLEFIELD" />
</CARD_V2>
_______________________________
Community Wad - Community Wad Website - How to Help and Report Bugs
Discord: discord.gg/4AXvHzW
Community Wad - Community Wad Website - How to Help and Report Bugs
Discord: discord.gg/4AXvHzW
-
Xander9009 - Programmer
- Posts: 2905
- Joined: 29 Jun 2013, 07:44
- Location: Indiana, United States
- Has thanked: 121 times
- Been thanked: 445 times
Re: Card Creation Request Thread
by nguyenxthinh » 20 Nov 2014, 17:25
I am using mtg 2014.Xander9009 wrote:Which game are you trying to make it work for? 'Cause that code was made for 2013, I think (it might be 2012, but either way, it's not 2014). dangerous="1", filter:AddCardType, filter:AddExtra, and filter:NotTargetted are in the trigger ability tag or the trigger itself, and they have no meaning in 2014; hence, no triggering if that's where you're trying to use it. If so, here.If the above triggers strangely, it might still require that "effectcontroller" be set. Not sure. If so, put this back into the trigger.
- Lightning Field - 2014 | Open
- Code: Select all
<?xml version='1.0'?>
<CARD_V2>
<FILENAME text="LIGHTMINE_FIELD_909216339" />
<CARDNAME text="LIGHTMINE_FIELD" />
<TITLE>
<LOCALISED_TEXT LanguageCode="en-US"><![CDATA[Lightmine Field]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="it-IT"><![CDATA[Campo Illu-Minato]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="de-DE"><![CDATA[Lichtminenfeld]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="fr-FR"><![CDATA[Champ de lumemines]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="es-ES"><![CDATA[Campo de minas luminosas]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="jp-JA"><![CDATA[光雷原]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="ko-KR"><![CDATA[Lightmine Field]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="ru-RU"><![CDATA[Поле Световых Мин]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="pt-BR"><![CDATA[Campo Luminominado]]></LOCALISED_TEXT>
</TITLE>
<MULTIVERSEID value="909216339" />
<ARTID value="909216339" />
<ARTIST name="Eric Deschamps" />
<CASTING_COST cost="{2}{W}{W}" />
<FLAVOURTEXT>
<LOCALISED_TEXT LanguageCode="en-US"><![CDATA[If you want to kill a lot of goblins, just make sure your defenses look like fun.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="it-IT"><![CDATA[Se vuoi uccidere parecchi goblin, basta che tu faccia sembrare divertenti le tue difese.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="de-DE"><![CDATA[Falls du viele Goblins töten willst, müssen nur deine Abwehranlagen genügend Spaß versprechen.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="fr-FR"><![CDATA[Si vous voulez tuer beaucoup de gobelins, faites leur croire qu’ils vont s’éclater.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="es-ES"><![CDATA[Si quieres matar muchos trasgos, asegúrate de que tus defensas parezcan divertidas.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="jp-JA"><![CDATA[ゴブリンをたくさん殺そうとするなら、防御を面白おかしいものに見せろ。]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="ko-KR"><![CDATA[If you want to kill a lot of goblins, just make sure your defenses look like fun.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="ru-RU"><![CDATA[Если хотите убить много гоблинов, сделайте так, чтобы ваша оборона казалась им забавой.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="pt-BR"><![CDATA[Se quiser matar muitos goblins, basta fazer com que suas defesas pareçam divertidas.]]></LOCALISED_TEXT>
</FLAVOURTEXT>
<TYPE metaname="Enchantment" />
<EXPANSION value="ROE" />
<RARITY metaname="R" />
<TRIGGERED_ABILITY>
<LOCALISED_TEXT LanguageCode="en-US"><![CDATA[Whenever one or more creatures attack, Lightmine Field deals damage to each of those creatures equal to the number of attacking creatures.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="it-IT"><![CDATA[Ogniqualvolta una o più creature attaccano, il Campo Illu-Minato infligge a ognuna di quelle creature danno pari al numero di creature attaccanti.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="de-DE"><![CDATA[Immer wenn eine oder mehrere Kreaturen angreifen, fügt das Lichtminenfeld jeder dieser Kreaturen so viele Schadenspunkte zu, wie Kreaturen angreifen.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="fr-FR"><![CDATA[À chaque fois qu’au moins une créature attaque, le Champ de lumemines inflige à chacune de ces créatures un nombre de blessures égal au nombre de créatures attaquantes.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="es-ES"><![CDATA[Siempre que una o más criaturas ataquen, el Campo de minas luminosas hace daño a cada una de esas criaturas igual a la cantidad de criaturas atacantes.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="jp-JA"><![CDATA[1体以上のクリーチャーが攻撃するたび、光雷原はそれらに、それぞれ攻撃しているクリーチャーの総数に等しい点数のダメージを与える。]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="ko-KR"><![CDATA[Whenever one or more creatures attack, Lightmine Field deals damage to each of those creatures equal to the number of attacking creatures.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="ru-RU"><![CDATA[Каждый раз когда одно или несколько существ атакуют, Поле Световых Мин наносит каждому из тех существ повреждения, равные количеству атакующих существ.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="pt-BR"><![CDATA[Toda vez que uma ou mais criaturas atacam, Campo Luminominado causa uma quantidade de dano igual ao número de criaturas atacantes a cada uma dessas criaturas.]]></LOCALISED_TEXT>
<TRIGGER value="ATTACKERS_DECLARED">
local filter = ClearFilter()
filter:Add( FE_TYPE, OP_IS, CARD_TYPE_CREATURE )
filter:Add( FE_IS_ATTACKING, true )
local filter_count = filter:EvaluateObjects()
if filter_count > 0 then
EffectDC():Set_Int(0, filter_count)
local attackersDC = EffectDC():Make_Chest(0)
for i=0,filter_count-1 do
attackersDC:Set_CardPtr( i, filter:GetNthEvaluatedObject(i) )
end
return true
end
return false
</TRIGGER>
<RESOLUTION_TIME_ACTION>
local filter = ClearFilter()
filter:Add( FE_TYPE, OP_IS, CARD_TYPE_CREATURE )
filter:Add( FE_IS_ATTACKING, true )
EffectDC():Set_Int( 1, filter:Count() )
</RESOLUTION_TIME_ACTION>
<RESOLUTION_TIME_ACTION>
local declared_attackers = EffectDC():Get_Int(0)
local damage = EffectDC():Get_Int(1)
if declared_attackers > 0 and damage > 0 then
local attackersDC = EffectDC():Get_Chest(0)
local source = EffectSource()
if source == nil then
source = Object()
end
for i=0,declared_attackers-1 do
local attacker = attackersDC:Get_CardPtr(i)
if attacker ~= nil then
EffectSourceLKI():DealDamageTo( damage, attacker )
end
end
end
</RESOLUTION_TIME_ACTION>
<SFX text="GLOBAL_SUNBLAST_PLAY" />
</TRIGGERED_ABILITY>
<AI_BASE_SCORE score="600" zone="ZONE_IN_PLAY" />
<AUTHOR><![CDATA[thefiremind]]></AUTHOR>
<EDITORS><![CDATA[thefiremind, Xander9009]]></EDITORS>
<DATE><![CDATA[16-02-13, 20-11-14]]></DATE>
</CARD_V2>
- | Open
- Code: Select all
simple_qualifier="controller"
when I used your code, Lightmine Field triggered with a beautiful blast, but no damage was dealt.
Then I put simple_qualifier="controller" into the trigger, It did not trigger anymore.
- nguyenxthinh
- Posts: 45
- Joined: 02 Nov 2014, 10:21
- Has thanked: 33 times
- Been thanked: 1 time
Re: Card Creation Request Thread
by Xander9009 » 20 Nov 2014, 17:27
Try Neo's version.nguyenxthinh wrote:I am using mtg 2014.
when I used your code, Lightmine Field triggered with a beautiful blast, but no damage was dealt.
Then I put simple_qualifier="controller" into the trigger, It did not trigger anymore.
_______________________________
Community Wad - Community Wad Website - How to Help and Report Bugs
Discord: discord.gg/4AXvHzW
Community Wad - Community Wad Website - How to Help and Report Bugs
Discord: discord.gg/4AXvHzW
-
Xander9009 - Programmer
- Posts: 2905
- Joined: 29 Jun 2013, 07:44
- Location: Indiana, United States
- Has thanked: 121 times
- Been thanked: 445 times
Re: Card Creation Request Thread
by nguyenxthinh » 20 Nov 2014, 17:36
Lightmine Field seems working well now.NeoAnderson wrote:Xander i think it could be more shorter to be coded something like :
- Lightmine Field | Open
- Code: Select all
<?xml version="1.0"?>
<CARD_V2 ExportVersion="1">
<FILENAME text="LIGHTMINE_FIELD_193463" />
<CARDNAME text="LIGHTMINE_FIELD" />
<TITLE>
<LOCALISED_TEXT LanguageCode="en-US"><![CDATA[Lightmine Field]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="fr-FR"><![CDATA[Champ de lumemines]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="es-ES"><![CDATA[Campo de minas luminosas]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="de-DE"><![CDATA[Lichtminenfeld]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="it-IT"><![CDATA[Campo Illu-Minato]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="jp-JA"><![CDATA[光雷原]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="ko-KR"><![CDATA[Lightmine Field]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="ru-RU"><![CDATA[Поле Световых Мин]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="pt-BR"><![CDATA[Campo Luminominado]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="zh-CN"><![CDATA[光雷区]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="zh-HK"><![CDATA[Lightmine Field]]></LOCALISED_TEXT>
</TITLE>
<MULTIVERSEID value="193463" />
<ARTID value="193463" />
<ARTIST name="Eric Deschamps" />
<CASTING_COST cost="{2}{W}{W}" />
<FLAVOURTEXT>
<LOCALISED_TEXT LanguageCode="en-US"><![CDATA[If you want to kill a lot of goblins, just make sure your defenses look like fun.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="fr-FR"><![CDATA[Si vous voulez tuer beaucoup de gobelins, faites leur croire qu’ils vont s’éclater.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="es-ES"><![CDATA[Si quieres matar muchos trasgos, asegúrate de que tus defensas parezcan divertidas.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="de-DE"><![CDATA[Falls du viele Goblins töten willst, müssen nur deine Abwehranlagen genügend Spaß versprechen.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="it-IT"><![CDATA[Se vuoi uccidere parecchi goblin, basta che tu faccia sembrare divertenti le tue difese.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="jp-JA"><![CDATA[ゴブリンをたくさん殺そうとするなら、防御を面白おかしいものに見せろ。]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="ko-KR"><![CDATA[If you want to kill a lot of goblins, just make sure your defenses look like fun.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="ru-RU"><![CDATA[Если хотите убить много гоблинов, сделайте так, чтобы ваша оборона казалась им забавой.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="pt-BR"><![CDATA[Se quiser matar muitos goblins, basta fazer com que suas defesas pareçam divertidas.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="zh-CN"><![CDATA[如果你想杀很多鬼怪,只要让自己看来毫无防备就行。]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="zh-HK"><![CDATA[If you want to kill a lot of goblins, just make sure your defenses look like fun.]]></LOCALISED_TEXT>
</FLAVOURTEXT>
<TYPE metaname="Enchantment" />
<EXPANSION value="ROE" />
<RARITY metaname="R" />
<TRIGGERED_ABILITY>
<LOCALISED_TEXT LanguageCode="en-US"><![CDATA[Whenever one or more creatures attack, Lightmine Field deals damage to each of those creatures equal to the number of attacking creatures.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="fr-FR"><![CDATA[À chaque fois qu’au moins une créature attaque, le Champ de lumemines inflige à chacune de ces créatures un nombre de blessures égal au nombre de créatures attaquantes.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="es-ES"><![CDATA[Siempre que una o más criaturas ataquen, el Campo de minas luminosas hace daño a cada una de esas criaturas igual a la cantidad de criaturas atacantes.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="de-DE"><![CDATA[Immer wenn eine oder mehrere Kreaturen angreifen, fügt das Lichtminenfeld jeder dieser Kreaturen so viele Schadenspunkte zu, wie Kreaturen angreifen.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="it-IT"><![CDATA[Ogniqualvolta una o più creature attaccano, il Campo Illu-Minato infligge a ognuna di quelle creature danno pari al numero di creature attaccanti.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="jp-JA"><![CDATA[1体以上のクリーチャーが攻撃するたび、光雷原はそれらに、それぞれ攻撃しているクリーチャーの総数に等しい点数のダメージを与える。]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="ko-KR"><![CDATA[Whenever one or more creatures attack, Lightmine Field deals damage to each of those creatures equal to the number of attacking creatures.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="ru-RU"><![CDATA[Каждый раз когда одно или несколько существ атакуют, Поле Световых Мин наносит каждому из тех существ повреждения, равные количеству атакующих существ.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="pt-BR"><![CDATA[Toda vez que uma ou mais criaturas atacam, Campo Luminominado causa uma quantidade de dano igual ao número de criaturas atacantes a cada uma dessas criaturas.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="zh-CN"><![CDATA[每当一个或更多生物攻击时,光雷区对这些生物各造成伤害,其数量等同于进行攻击的生物数量。]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="zh-HK"><![CDATA[Whenever one or more creatures attack, Lightmine Field deals damage to each of those creatures equal to the number of attacking creatures.]]></LOCALISED_TEXT>
<TRIGGER value="ATTACKERS_DECLARED">
local filter = ClearFilter()
filter:Add( FE_IS_ATTACKING, true )
local numCreaturesAttacking = filter:Count()
if numCreaturesAttacking > 0 then
EffectDC():Set_Int(0, numCreaturesAttacking)
return true
end
return false
</TRIGGER>
<FILTER filter_id="0">
local filter = ClearFilter()
filter:Add( FE_IS_ATTACKING, true )
filter:Add( FE_TYPE, OP_IS, CARD_TYPE_CREATURE )
</FILTER>
<RESOLUTION_TIME_ACTION filter_id="0">
local numCreaturesAttacking = EffectDC():Get_Int(0)
local creature = FilteredCard()
if numCreaturesAttacking > 0 and creature ~= nil then
EffectSourceLKI():DealDamageTo( numCreaturesAttacking, creature )
end
</RESOLUTION_TIME_ACTION>
<SFX text="GLOBAL_SUNBLAST_PLAY" />
</TRIGGERED_ABILITY>
<AI_BASE_SCORE score="600" zone="ZONE_BATTLEFIELD" />
</CARD_V2>
@Xander9009&NeoAnderson: Thanks guys. Without this I can not complete my anti-token-creatures deck.
- nguyenxthinh
- Posts: 45
- Joined: 02 Nov 2014, 10:21
- Has thanked: 33 times
- Been thanked: 1 time
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 15 guests