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 RiiakShiNal » 23 Mar 2013, 14:46
In "Post a reply" (or when editing a post) below the "Save draft", "Preview", and "Submit" buttons you will see an "Options" tab and right next to it is "Upload attachment". Once you click the "Upload attachment" tab you will be able to specify which file to upload (up to a maximum of about 2 MB) and a comment for the file. If you need to upload a large file (or group of files) it is generally recommended that you upload them elsewhere and just include a link to them.nivmizzet1 wrote:PS how do you add an attachment?
After a certain number of posts you will be able to post links directly without having the system flag them as "too spammy".
Just getting started: Xander9009's DotP 2014 Community Wad
Need a deck builder: DotP 2014 Deck Builder
Problems Modding: DotP 2014 Frequent Modding Mistakes
Need a deck builder: DotP 2014 Deck Builder
Problems Modding: DotP 2014 Frequent Modding Mistakes
- RiiakShiNal
- Programmer
- Posts: 2188
- Joined: 16 May 2011, 21:37
- Has thanked: 75 times
- Been thanked: 497 times
Re: Card Creation Request Thread
by nivmizzet1 » 23 Mar 2013, 14:54
One card that I have tried and definitely can't get to work is Pristine Angel. I would love it if someone could create this card.
______________________________________
my DOTP 2014 Main mod page - my DOTP 2014 OP Decks mod page - Community WAD
my DOTP 2014 Main mod page - my DOTP 2014 OP Decks mod page - Community WAD
- nivmizzet1
- Posts: 617
- Joined: 21 Mar 2013, 10:10
- Has thanked: 100 times
- Been thanked: 25 times
Re: Card Creation Request Thread
by thefiremind » 23 Mar 2013, 15:38
I made it for DotP2012 so it didn't take me long to convert it.nivmizzet1 wrote:One card that I have tried and definitely can't get to work is Pristine Angel. I would love it if someone could create this card.
- Attachments
-
PRISTINE_ANGEL_47587.zip
- (112.41 KiB) Downloaded 300 times
< 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: 722 times
Need help with Kaalia of the Vast
by Honeybear » 23 Mar 2013, 15:52
I tried my best, but the triggered ability won´t work. Anything else should be fine.
Here is the text for the ability:

Here is the text for the ability:
I´d really appreciate any help on this.<TRIGGERED_ABILITY auto_skip="1" filter_zone="ZONE_IN_PLAY">
<LOCALISED_TEXT LanguageCode="en-US"><![CDATA[Whenever Kaalia of the Vast attacks an opponent, you may put an Angel, Demon, or Dragon creature card from your hand onto the battlefield tapped and attacking that opponent.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="fr-FR"><![CDATA[Whenever Kaalia of the Vast attacks an opponent, you may put an Angel, Demon, or Dragon creature card from your hand onto the battlefield tapped and attacking that opponent.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="es-ES"><![CDATA[Whenever Kaalia of the Vast attacks an opponent, you may put an Angel, Demon, or Dragon creature card from your hand onto the battlefield tapped and attacking that opponent.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="de-DE"><![CDATA[Whenever Kaalia of the Vast attacks an opponent, you may put an Angel, Demon, or Dragon creature card from your hand onto the battlefield tapped and attacking that opponent.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="it-IT"><![CDATA[Ogniqualvolta Kaalia della Vastità attacca un avversario, puoi mettere sul campo di battaglia una carta creatura Angelo, Demone o Drago dalla tua mano TAPpata e che attacca quell’avversario.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="jp-JA"><![CDATA[Whenever Kaalia of the Vast attacks an opponent, you may put an Angel, Demon, or Dragon creature card from your hand onto the battlefield tapped and attacking that opponent.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="ko-KR"><![CDATA[Whenever Kaalia of the Vast attacks an opponent, you may put an Angel, Demon, or Dragon creature card from your hand onto the battlefield tapped and attacking that opponent.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="ru-RU"><![CDATA[Whenever Kaalia of the Vast attacks an opponent, you may put an Angel, Demon, or Dragon creature card from your hand onto the battlefield tapped and attacking that opponent.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="pt-BR"><![CDATA[Whenever Kaalia of the Vast attacks an opponent, you may put an Angel, Demon, or Dragon creature card from your hand onto the battlefield tapped and attacking that opponent.]]></LOCALISED_TEXT>
<TRIGGER value="ATTACKING" simple_qualifier="self" />
<TARGET_DEFINITION id="0">
local player = EffectController()
local filter = Object():GetFilter()
filter:Clear()
filter:NotTargetted()
filter:May()
filter:SetPlayer( player )
filter:SetZone( ZONE_HAND )
filter:AddCardType( CARD_TYPE_CREATURE )
filter:AddSubType( CREATURE_TYPE_ANGEL )
filter:AddSubType( CREATURE_TYPE_DEMON )
filter:AddSubType( CREATURE_TYPE_DRAGON )
player:ChooseTarget(NO_VALIDATION, "CARD_QUERY_CHOOSE_CREATURE_TO_PUT_ONTO_BATTLEFIELD", EffectDC():Make_Targets(0))
</RESOLUTION_TIME_ACTION>
<RESOLUTION_TIME_ACTION>
local player = EffectController()
local target = EffectDC():Get_Targets(0)
if player ~= nil then
if target ~= nil then
local card = target:Get_CardPtr(0)
if (card ~= nil and card:GetZone() == ZONE_HAND) then
card:PutIntoPlay( player )
end
end
end
</RESOLUTION_TIME_ACTION>
</TRIGGERED_ABILITY>

- Attachments
-
KAALIA_OF_THE_VAST_338444.zip
- (1.74 KiB) Downloaded 356 times
All fixed set patterns are incapable of adaptability or pliability. The truth is outside of all fixed patterns.
- Bruce Lee -
- Bruce Lee -
- Honeybear
- Posts: 20
- Joined: 02 Mar 2013, 15:25
- Location: Outside the bubble
- Has thanked: 5 times
- Been thanked: 2 times
Re: Card Creation Request Thread
by Honeybear » 23 Mar 2013, 16:01
I also need help with the tap ability for Tree of Redemption. I searched all cards in the Editor, but I did not found anything that could be of help. Here is the ability:
Tap: Exchange your life total with Tree of Redemption's toughness.
All fixed set patterns are incapable of adaptability or pliability. The truth is outside of all fixed patterns.
- Bruce Lee -
- Bruce Lee -
- Honeybear
- Posts: 20
- Joined: 02 Mar 2013, 15:25
- Location: Outside the bubble
- Has thanked: 5 times
- Been thanked: 2 times
Re: Card Creation Request Thread
by thefiremind » 23 Mar 2013, 16:23
Kaalia of the Vast can't work that way: you need to use PutIntoPlayTappedAndAttacking (see the cards with ninjutsu in my mod for reference) and since that function needs the player to attack, you also need to store the attacked player in a register (better if inside the trigger condition, so even if Kaalia leaves the battlefield before resolution, your reference will still be there).
But the most important thing is that you can't do this:
Here's how I would code Kaalia:
). Here is how:
But the most important thing is that you can't do this:
- Code: Select all
<TARGET_DEFINITION id="0">
...
</RESOLUTION_TIME_ACTION>

Here's how I would code Kaalia:
- Code: Select all
<TRIGGER value="ATTACKING" simple_qualifier="self">
local defending = Object():GetPlayerAttacked()
-- the following check shouldn't be needed (how can I attack an ally?) but let's follow the text...
if defending ~= nil and defending:GetTeam() ~= EffectController():GetTeam() then
EffectDC():Set_PlayerPtr(1, defending)
return true
end
return false
</TRIGGER>
<RESOLUTION_TIME_ACTION>
local player = EffectController()
local filter = Object():GetFilter()
filter:Clear()
filter:NotTargetted()
filter:May()
filter:SetPlayer( player )
filter:SetZone( ZONE_HAND )
filter:AddCardType( CARD_TYPE_CREATURE )
filter:AddSubType( CREATURE_TYPE_ANGEL )
filter:AddSubType( CREATURE_TYPE_DEMON )
filter:AddSubType( CREATURE_TYPE_DRAGON )
filter:AddExtra( FILTER_EXTRA_ANY_SUB_TYPE )
if filter:CountStopAt(1) == 1 then
player:ChooseTarget( NO_VALIDATION, "CARD_QUERY_CHOOSE_CREATURE_TO_PUT_ONTO_BATTLEFIELD", EffectDC():Make_Targets(0) )
end
</RESOLUTION_TIME_ACTION>
<RESOLUTION_TIME_ACTION>
local target = EffectDC():Get_Targets(0) and EffectDC():Get_Targets(0):Get_CardPtr(0)
local defending = EffectDC():Get_PlayerPtr(1)
if target ~= nil and defending ~= nil then
target:PutIntoPlayTappedAndAttacking( EffectController(), defending )
end
</RESOLUTION_TIME_ACTION>
I coded Tree of Redemption recently, it will be in the next release of my mod (release date not availableHoneybear wrote:I also need help with the tap ability for Tree of Redemption. I searched all cards in the Editor, but I did not found anything that could be of help.

- Code: Select all
<ACTIVATED_ABILITY>
<LOCALISED_TEXT LanguageCode="en-US"><![CDATA[{T}: Exchange your life total with Tree of Redemption’s toughness.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="it-IT"><![CDATA[{T}: Scambia i tuoi punti vita con la costituzione dell’Albero della Redenzione.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="de-DE"><![CDATA[{T}: Tausche deine Lebenspunktezahl mit der Widerstandskraft des Baums der Erlösung.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="fr-FR"><![CDATA[{T} : Échangez votre total de points de vie contre l’endurance de l’Arbre de la rédemption.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="es-ES"><![CDATA[{T}: Intercambia tu total de vidas con la resistencia del Árbol de la redención.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="jp-JA"><![CDATA[{T}:あなたのライフの総量と解放の樹のタフネスを交換する。]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="ko-KR"><![CDATA[{T}: Exchange your life total with Tree of Redemption’s toughness.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="ru-RU"><![CDATA[{T}: обменяйте количество ваших жизней на выносливость Древа Искупления.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="pt-BR"><![CDATA[{T}: Permute seu total de pontos de vida com a resistência de Árvore da Redenção.]]></LOCALISED_TEXT>
<COST type="TapSelf" />
<RESOLUTION_TIME_ACTION>
if EffectSource() ~= nil then
local player = EffectController()
local toughness = EffectSource():GetCurrentCharacteristics():Toughness_Get()
EffectDC():Set_Int( 0, player:GetLifeTotal() )
player:SetLifeTotal( toughness )
end
</RESOLUTION_TIME_ACTION>
<CONTINUOUS_ACTION layer="7B">
if EffectSource() ~= nil then
EffectSource():GetCurrentCharacteristics():Toughness_Set( EffectDC():Get_Int(0) )
end
</CONTINUOUS_ACTION>
<DURATION>
return EffectSource() == nil
</DURATION>
<AI_AVAILABILITY step="end_of_turn" turn="their_turn" />
<AI_AVAILABILITY step="declare_blockers" blocking_or_blocked="1" />
<AI_AVAILABILITY type="in_response_dangerous" />
</ACTIVATED_ABILITY>
< 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: 722 times
Re: Card Creation Request Thread
by Honeybear » 23 Mar 2013, 16:34
Thanks a lot for your help and your card creator, which is quite useful
So, Dotp 2014 has been finally announced and it makes we wounder, how much work will be required in order to convert our cards all over again. How difficult is it to convert cards from dotp 2012 to 2013 anyway, Firemind?

So, Dotp 2014 has been finally announced and it makes we wounder, how much work will be required in order to convert our cards all over again. How difficult is it to convert cards from dotp 2012 to 2013 anyway, Firemind?
All fixed set patterns are incapable of adaptability or pliability. The truth is outside of all fixed patterns.
- Bruce Lee -
- Bruce Lee -
- Honeybear
- Posts: 20
- Joined: 02 Mar 2013, 15:25
- Location: Outside the bubble
- Has thanked: 5 times
- Been thanked: 2 times
Re: Card Creation Request Thread
by thefiremind » 23 Mar 2013, 17:13
Well, it depends... if you are familiar with both DotP2012 and DotP2013 coding, really easy. If you are familiar with DotP2013 coding only, a bit less easy, but you don't need much to make the leap and understand the differences. If you aren't familiar with any of them... well look at AriesKiki's posts starting from this one and you'll have a fitting example.Honeybear wrote:How difficult is it to convert cards from dotp 2012 to 2013 anyway, Firemind?

< 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: 722 times
Re: Card Creation Request Thread
by nivmizzet1 » 24 Mar 2013, 13:32
I would really love if someone could code Kalastria Highborn -- she's doing my head in.
I thought she wouldn't be too hard -- just a mix of a modified mentor of the meek and blood artist or something (those are the two main cards I used to pilfer code from).
Boy was I wrong. I realised she has so many more conditions and ifs, thens, etc. and I just can't get my head around it all.
At the moment, her trigger is wrong -- she triggers whenever a creature dies, but she should only trigger when a "vampire you control dies". When she triggers she gives the choice to pay
to gain 2 life and have target player lose 2 life, but when you make your choice nothing happens (actually, a resolution event happens, but nothing is actually resolving). Anyway, I've made a complete mess of it. I'll post what I have so far, but basically just so the localised text and art don't need to be redone.
I thought she wouldn't be too hard -- just a mix of a modified mentor of the meek and blood artist or something (those are the two main cards I used to pilfer code from).
Boy was I wrong. I realised she has so many more conditions and ifs, thens, etc. and I just can't get my head around it all.
At the moment, her trigger is wrong -- she triggers whenever a creature dies, but she should only trigger when a "vampire you control dies". When she triggers she gives the choice to pay

- Attachments
-
Kalastria Highborn.zip
- (114.4 KiB) Downloaded 292 times
______________________________________
my DOTP 2014 Main mod page - my DOTP 2014 OP Decks mod page - Community WAD
my DOTP 2014 Main mod page - my DOTP 2014 OP Decks mod page - Community WAD
- nivmizzet1
- Posts: 617
- Joined: 21 Mar 2013, 10:10
- Has thanked: 100 times
- Been thanked: 25 times
Re: Card Creation Request Thread
by thefiremind » 24 Mar 2013, 13:56
In this case, you are strongly encouraged to use the automatic conditional cost because you must choose a target, so the earlier you get to be asked if you want to pay, the better.
Here's my code:
Some errors in your code that you may want to know about:
Here's my code:
- Code: Select all
<TRIGGER value="ZONECHANGE_BEGIN" simple_qualifier="objectyoucontrol" to_zone="ZONE_GRAVEYARD" from_zone="ZONE_IN_PLAY">
return TriggerObject() == Object() or TriggerObject():GetSubType():Test( CARD_TYPE_VAMPIRE ) ~= 0
</TRIGGER>
<COST type="Mana" cost="{B}" qualifier="conditional" />
<TARGET_DEFINITION id="0">
local filter = Object():GetFilter()
filter:Clear()
filter:SetFilterType( FILTER_TYPE_PLAYERS )
filter:SetHint( HINT_ENEMY_ONLY, EffectController() )
</TARGET_DEFINITION>
<TARGET_DETERMINATION>
return AtLeastOneTargetFromDefinition(0)
</TARGET_DETERMINATION>
<PLAY_TIME_ACTION target_choosing="1">
EffectController():ChooseTarget( 0, "CARD_QUERY_CHOOSE_PLAYER_LOSE_2", EffectDC():Make_Targets(0) )
</PLAY_TIME_ACTION>
<RESOLUTION_TIME_ACTION conditional="if">
local target = EffectDC():Get_Targets(0):Get_PlayerPtr(0)
if target ~= nil then
target:LoseLife( 2 )
EffectController():GainLife( 2 )
end
</RESOLUTION_TIME_ACTION>
Some errors in your code that you may want to know about:
- Those are probably distractions, anyway you used "{1}" in the first CanAfford instead of "{B}", and the "if" in the last PLAY_TIME_ACTION doesn't have its "end".
- You have set the trigger condition for any creature, but the text says "Kalastria Highborn or another Vampire you control"... so let's split this into pieces and code them one by one:
- Kalastria Highborn: the creature itself. When this condition is alone, you can use simple_qualifier="self" but this is not the case, so the first condition is TriggerObject() == Object().
- or another Vampire: note that it doesn't say "creature"... if there was a Tribal Enchantment - Vampire, it would count. The second condition is TriggerObject():GetSubType():Test( CARD_TYPE_VAMPIRE ) ~= 0.
- you control: we didn't use a simple_qualifier yet, so we can use simple_qualifier="objectyoucontrol".
- You chose not to ask the AI about paying or not, but then you aren't setting a specific case for the AI in the next actions... anyway choices about paying mana to get a benefit should be left for the AI to decide because they are too situational to be able to decide for it all the times.
< 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: 722 times
Re: Card Creation Request Thread
by nivmizzet1 » 24 Mar 2013, 14:08
Thanks again! I definitely learnt some things from your tips, hopefully some of it will stick and allow me to make more complex cards in future. Cheers!thefiremind wrote:...snip...
______________________________________
my DOTP 2014 Main mod page - my DOTP 2014 OP Decks mod page - Community WAD
my DOTP 2014 Main mod page - my DOTP 2014 OP Decks mod page - Community WAD
- nivmizzet1
- Posts: 617
- Joined: 21 Mar 2013, 10:10
- Has thanked: 100 times
- Been thanked: 25 times
Re: Card Creation Request Thread
by RiiakShiNal » 24 Mar 2013, 14:09
For Kalastria Highborn probably something along these lines for the Triggered Ability (took your code and cleaned it up and fixed it):
In your first PLAY_TIME_ACTION you were checking to see if the player could afford
instead of
.
In the second PLAY_TIME_ACTION you did not set anything in the EffectDC() to indicate if the player answered yes or no. Object():GetMultipleChoiceResult() can only be called once per multiple choice question asked as it will clear the result afterward leading to unknown results. You also did not terminate your if blocks with end statements (required). The check in this block to see if there is AtLeastOneTargetFromDefinition(0) and checking for available mana is not necessary (mainly because it needs to be checked before this point).
In the RESOLUTION_TIME_ACTION when you are trying to get the target, if the user selected "No" in the first question then this line will throw an error because EffectDC():Get_Targets(0) will be nil and can't be referenced to try and Get_PlayerPtr(0). So to prevent errors in the SCRIPT_LOG you need to add either a check to make sure Get_Targets(0) is not nil or check to make sure the user answered "Yes" to the first question. I prefer the latter because then I am checking what the user wanted instead of whether I created targets or not, though the result essentially is the same.
Edit: I was already writing this before thefiremind posted his answer, but since my answer is different I will leave it for reference purposes.
- Code: Select all
<TRIGGERED_ABILITY dangerous="1" filter_zone="ZONE_IN_PLAY">
<LOCALISED_TEXT LanguageCode="en-US"><![CDATA[Whenever Kalastria Highborn or another Vampire you control dies, you may pay {B}. If you do, target player loses 2 life and you gain 2 life.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="it-IT"><![CDATA[Ogniqualvolta la Nobile Kalastria o un altro Vampiro che controlli viene messa in un cimitero dal campo di battaglia, puoi pagare {B}. Se lo fai, un giocatore bersaglio perde 2 punti vita e tu guadagni 2 punti vita.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="de-DE"><![CDATA[Immer wenn die Hochgeborene Kalastria oder ein anderer Vampir, den du kontrollierst, aus dem Spiel auf einen Friedhof gelegt wird, kannst du {B} bezahlen. Falls du dies tust, verliert ein Spieler deiner Wahl 2 Lebenspunkte, und du erhältst 2 Lebenspunkte dazu.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="fr-FR"><![CDATA[À chaque fois que la Patricienne des Kalastria ou qu’un autre vampire que vous contrôlez est mis dans un cimetière depuis le champ de bataille, vous pouvez payer {B}. Si vous faites ainsi, le joueur ciblé perd 2 points de vie et vous gagnez 2 points de vie.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="es-ES"><![CDATA[Siempre que la Aristócrata Kalastria u otro Vampiro que controles vaya a un cementerio desde el campo de batalla, puedes pagar {B}. Si lo haces, el jugador objetivo pierde 2 vidas y tú ganas 2 vidas.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="jp-JA"><![CDATA[カラストリアの貴人かあなたがコントロールする他の吸血鬼が1体戦場からいずれかの墓地に置かれるたび、プレイヤー1人を対象とする。あなたは{B}を支払ってもよい。 そうした場合、そのプレイヤーは2点のライフを失い、あなたは2点のライフを得る。]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="ko-KR"><![CDATA[Whenever Kalastria Highborn or another Vampire you control is put into a graveyard from the battlefield, you may pay {B}. If you do, target player loses 2 life and you gain 2 life.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="ru-RU"><![CDATA[Каждый раз когда Аристократка из Рода Каластрия или другой Вампир под вашим контролем попадает с поля битвы на кладбище, вы можете заплатить {B}. Если вы это делаете, целевой игрок теряет 2 жизни, а вы получаете 2 жизни.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="pt-BR"><![CDATA[Toda vez que Fidalga Kalastria ou outro Vampiro que você controla é colocado num cemitério vindo do campo de batalha, você pode pagar {B}. Se fizer isso, o jogador alvo perderá 2 pontos de vida e você ganhará 2 pontos de vida.]]></LOCALISED_TEXT>
<TRIGGER value="ZONECHANGE_BEGIN" to_zone="ZONE_GRAVEYARD" from_zone="ZONE_IN_PLAY">
return (TriggerObject():GetSubType():Test( CREATURE_TYPE_VAMPIRE ) ~= 0) and
(TriggerObject():GetController() == EffectController()) and
(EffectController():CanAfford("{B}") ~= 0)
</TRIGGER>
<TARGET_DEFINITION id="0">
local filter = Object():GetFilter()
filter:Clear()
filter:SetFilterType( FILTER_TYPE_PLAYERS )
filter:SetHint( HINT_ENEMY_ONLY, EffectController() )
</TARGET_DEFINITION>
<TARGET_DETERMINATION>
return AtLeastOneTargetFromDefinition(0)
</TARGET_DETERMINATION>
<PLAY_TIME_ACTION>
local player = EffectController()
if player ~= nil then
if player:CanAfford("{B}") ~= 0 then
if player:IsAI() == 0 then
player:BeginNewMultipleChoice()
player:AddMultipleChoiceAnswer( "CARD_QUERY_OPTION_YES" )
player:AddMultipleChoiceAnswer( "CARD_QUERY_OPTION_NO" )
player:AskMultipleChoiceQuestion( "CARD_QUERY_PAY_FOR_TARGET_PLAYER_LOSE_2" )
end
end
end
</PLAY_TIME_ACTION>
<PLAY_TIME_ACTION target_choosing="1">
if Object():GetMultipleChoiceResult() == 0 then
EffectDC():Int_Set( 1, 1 )
local player = EffectController()
player:TapLand("{B}")
player:ChooseTarget( 0, "CARD_QUERY_CHOOSE_PLAYER_LOSE_2", EffectDC():Make_Targets(0) )
end
</PLAY_TIME_ACTION>
<RESOLUTION_TIME_ACTION>
if EffectDC():Int_Get( 1 ) == 1 then
local target = EffectDC():Get_Targets(0):Get_PlayerPtr(0)
if target ~= nil then
target:LoseLife( 2 )
EffectController():GainLife( 2 )
end
end
</RESOLUTION_TIME_ACTION>
</TRIGGERED_ABILITY>
In your first PLAY_TIME_ACTION you were checking to see if the player could afford


In the second PLAY_TIME_ACTION you did not set anything in the EffectDC() to indicate if the player answered yes or no. Object():GetMultipleChoiceResult() can only be called once per multiple choice question asked as it will clear the result afterward leading to unknown results. You also did not terminate your if blocks with end statements (required). The check in this block to see if there is AtLeastOneTargetFromDefinition(0) and checking for available mana is not necessary (mainly because it needs to be checked before this point).
In the RESOLUTION_TIME_ACTION when you are trying to get the target, if the user selected "No" in the first question then this line will throw an error because EffectDC():Get_Targets(0) will be nil and can't be referenced to try and Get_PlayerPtr(0). So to prevent errors in the SCRIPT_LOG you need to add either a check to make sure Get_Targets(0) is not nil or check to make sure the user answered "Yes" to the first question. I prefer the latter because then I am checking what the user wanted instead of whether I created targets or not, though the result essentially is the same.
Edit: I was already writing this before thefiremind posted his answer, but since my answer is different I will leave it for reference purposes.
Just getting started: Xander9009's DotP 2014 Community Wad
Need a deck builder: DotP 2014 Deck Builder
Problems Modding: DotP 2014 Frequent Modding Mistakes
Need a deck builder: DotP 2014 Deck Builder
Problems Modding: DotP 2014 Frequent Modding Mistakes
- RiiakShiNal
- Programmer
- Posts: 2188
- Joined: 16 May 2011, 21:37
- Has thanked: 75 times
- Been thanked: 497 times
Re: Card Creation Request Thread
by RiiakShiNal » 25 Mar 2013, 13:16
It is possible, but only with mana tokens and it will suffer from triggering abilities that trigger on a player activating an activated ability (like Burning-Tree Shaman).Vasht wrote:is it possible to create Sphere of the Suns ?
Just getting started: Xander9009's DotP 2014 Community Wad
Need a deck builder: DotP 2014 Deck Builder
Problems Modding: DotP 2014 Frequent Modding Mistakes
Need a deck builder: DotP 2014 Deck Builder
Problems Modding: DotP 2014 Frequent Modding Mistakes
- RiiakShiNal
- Programmer
- Posts: 2188
- Joined: 16 May 2011, 21:37
- Has thanked: 75 times
- Been thanked: 497 times
Re: Card Creation Request Thread
by nivmizzet1 » 26 Mar 2013, 15:14
can someone get fastbond working? I have everything working except the damage effect that should trigger for each land you play after the first in a single turn.
In my current version I have a trigger activating whenever a land enters the battlefield, but it should only trigger whenever a land after the first enters the battlefield. Also, the damage effect that should be triggered isn't happening.
I tried using code from groundswell as part of the trigger condition (to only activate after a land has already been played), but I don't know enough about coding to get it right. I'm certain it's possible though.
In my current version I have a trigger activating whenever a land enters the battlefield, but it should only trigger whenever a land after the first enters the battlefield. Also, the damage effect that should be triggered isn't happening.
I tried using code from groundswell as part of the trigger condition (to only activate after a land has already been played), but I don't know enough about coding to get it right. I'm certain it's possible though.
- Attachments
-
Fastbond.zip
- (101.02 KiB) Downloaded 303 times
______________________________________
my DOTP 2014 Main mod page - my DOTP 2014 OP Decks mod page - Community WAD
my DOTP 2014 Main mod page - my DOTP 2014 OP Decks mod page - Community WAD
- nivmizzet1
- Posts: 617
- Joined: 21 Mar 2013, 10:10
- Has thanked: 100 times
- Been thanked: 25 times
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 0 guests