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 » 07 May 2013, 23:25
When you get the hang of it, you can think about the card as separate compartments that you can copy from other cards. For example, I assembled Hatred by looking at Disaster Radius (additional cost), Phyrexian Processor (pay an amount of life), Giant Growth (+something/+something until end of turn). Then I made the necessary adjustments and Hatred was born.AriesKiki wrote:Wow, thank you thefiremind, I have problems specially with Hatred, I had really no idea how to code it

-------------------
I have something for Master Necro.

In case you are wondering, my transmute code is 100% reusable: you just need to adjust the COST block according to the transmute cost if your card has a different one.
- Attachments
-
Master Necro's transmutables.zip
- Brainspoil, Dimir Machinations, Netherborn Phalanx
- (333.84 KiB) Downloaded 297 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 Kieran » 08 May 2013, 01:41
Okay, I saw this deck on Tappedout.net and thought: Hey! I've never made a
and
deck before and this Extort mechanic looks interesting enough so I decided I'll use it as the initial base for the Orzhov deck I would like to build upon. However, I'm missing these three cards: Glaring Spotlight, Nevermore, and Sphere of Safety.
Ultimate Extortion
Creatures (23)
4x Basilica Screecher
4x High Priest of Penance
4x Thrull Parasite
4x Tithe Drinker
3x Treasury Thrull
4x Vampire Nighthawk
Artifact (3)
3x Ring of Xathrid
Enchantments (11)
3x Blind Obedience
4x Ethereal Armor
4x Oblivion Ring
Lands (23)
4x Isolated Chapel
9x Plains
10x Swamp
Sideboard (15)
4x Faith's Reward
2x Glaring Spotlight
2x Nevermore
4x Orzhov Charm
1x Pontiff of Blight
2x Sphere of Safety
I already made Kingpin's Pet for future variations but I want to request Vizkopa Confessor and Temporal Extortion as well in addition to the three mentioned above.
When I have the the top three cards I'll post the deck for DL in the New MTG Cards and Decks / 2013 forum and I'll also be trying to code the cards in the meantime but if they're already available just let me know. As always, thanks in advance!
All credit goes to the original creator of this deck list. I'm just importing it to digital format.


Ultimate Extortion
Creatures (23)
4x Basilica Screecher
4x High Priest of Penance
4x Thrull Parasite
4x Tithe Drinker
3x Treasury Thrull
4x Vampire Nighthawk
Artifact (3)
3x Ring of Xathrid
Enchantments (11)
3x Blind Obedience
4x Ethereal Armor
4x Oblivion Ring
Lands (23)
4x Isolated Chapel
9x Plains
10x Swamp
Sideboard (15)
4x Faith's Reward
2x Glaring Spotlight
2x Nevermore
4x Orzhov Charm
1x Pontiff of Blight
2x Sphere of Safety
I already made Kingpin's Pet for future variations but I want to request Vizkopa Confessor and Temporal Extortion as well in addition to the three mentioned above.
When I have the the top three cards I'll post the deck for DL in the New MTG Cards and Decks / 2013 forum and I'll also be trying to code the cards in the meantime but if they're already available just let me know. As always, thanks in advance!
All credit goes to the original creator of this deck list. I'm just importing it to digital format.
Re: Card Creation Request Thread
by sumomole » 08 May 2013, 01:55
Ink-Treader Nephilim is very similar with Precursor Golem, the code of Precursor Golem has any bug?thefiremind wrote:I'm afraid you have bad luck with your request... Phyrexian Unlife can't be coded because you can't distinguish between ways of losing the game: either you grant the Platinum Angel characteristic (you can't lose no matter how), or you don't. Ink-Treader Nephilim can't be coded either because you can't check whether a spell has only one target or more.

-
sumomole - Programmer
- Posts: 611
- Joined: 07 Jun 2011, 08:34
- Has thanked: 51 times
- Been thanked: 234 times
Re: Card Creation Request Thread
by RiiakShiNal » 08 May 2013, 04:29
Actually, there is this constant which could be used:thefiremind wrote:I'm afraid you have bad luck with your request... Phyrexian Unlife can't be coded because you can't distinguish between ways of losing the game: either you grant the Platinum Angel characteristic (you can't lose no matter how), or you don't.
PLAYER_CHARACTERISTIC_DOESNT_DIE_ON_ZERO_LIFE
This would allow for not dying on 0 life.
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 MalevolentZero » 08 May 2013, 05:27
Alright! I was afraid of that, but it was still worth a try! Thanks!thefiremind wrote:I'm afraid you have bad luck with your request... Phyrexian Unlife can't be coded because you can't distinguish between ways of losing the game: either you grant the Platinum Angel characteristic (you can't lose no matter how), or you don't. Ink-Treader Nephilim can't be coded either because you can't check whether a spell has only one target or more.
- MalevolentZero
- Posts: 15
- Joined: 06 May 2013, 09:40
- Has thanked: 4 times
- Been thanked: 0 time
Re: Card Creation Request Thread
by Necropotence » 08 May 2013, 06:16
Hello friends! I need your help. I want to build decks, and try it with the program DotP Editor.exe Deck. but I get an error when trying to load the decks I get the error that let in the picture! if anyone can help me? from now on, thanks!
- Necropotence
- Posts: 24
- Joined: 05 May 2013, 05:30
- Has thanked: 10 times
- Been thanked: 0 time
Re: Card Creation Request Thread
by MalevolentZero » 08 May 2013, 07:18
Oh? so is there hope for phyrexian unlife then? And what of precursor golem?
- MalevolentZero
- Posts: 15
- Joined: 06 May 2013, 09:40
- Has thanked: 4 times
- Been thanked: 0 time
Re: Card Creation Request Thread
by thefiremind » 08 May 2013, 08:53
OK, I didn't check all the available characteristics when I answered... if PLAYER_CHARACTERISTIC_DOESNT_DIE_ON_ZERO_LIFE really works (which isn't obvious until someone tests it, some characteristics are just placeholders), then there's hope for Phyrexian Unlife.MalevolentZero wrote:Oh? so is there hope for phyrexian unlife then? And what of precursor golem?
Precursor Golem in DotP2012 was a challenge card, so it was made "good enough" to work just on that challenge. It was checking target register #0 and see if there was a Golem there. But what if another card uses register #1 as "real" target and register #0 for some cost (i.e. a card to discard)? And what if there's another target in another register? There could potentially be another target in target register #9999 (nobody does that, but still...).
Of course, if someone has a clever idea, maybe there's a chance to overcome the problem... I just don't have any idea about that.
Where did you find this editor? The fact that there's no "2013" in the title makes me think that it could be for the first DotP game.Necropotence wrote:Hello friends! I need your help. I want to build decks, and try it with the program DotP Editor.exe Deck.
Kieran wrote:I'm missing these three cards: Glaring Spotlight, Nevermore, and Sphere of Safety.
[...]
I already made Kingpin's Pet for future variations but I want to request Vizkopa Confessor and Temporal Extortion as well in addition to the three mentioned above.
- I don't think Glaring Spotlight can be coded: you can't shut hexproof down while keeping it, let alone shut it down for just one player...
- Nevermore should be possible by using this.
- Sphere of Safety should be possible as well, by adapting Ghostly Prison as I made it here.
- I made Temporal Extortion. There are query strings to define, but the card itself should work as intended.
- Attachments
-
TEMPORAL_EXTORTION_126814.zip
- (104.08 KiB) Downloaded 295 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 sumomole » 08 May 2013, 11:49
So you don't know Precursor Golem is also a challenge card in D13?thefiremind wrote:MalevolentZero wrote:Precursor Golem in DotP2012 was a challenge card

It loosk perfect a lot than before, it will check all target, at least I didn't find any bug.

-
sumomole - Programmer
- Posts: 611
- Joined: 07 Jun 2011, 08:34
- Has thanked: 51 times
- Been thanked: 234 times
Re: Card Creation Request Thread
by thefiremind » 08 May 2013, 12:06
If you didn't tell me, I still wouldn't know: I forgot to copy the RTR DLC challenge cards to my official card pool folder!sumomole wrote:So you don't know Precursor Golem is also a challenge card in D13?

I'm posting it here for handy reference:
- Precursor Golem DotP2013 code | Open
- Code: Select all
<?xml version='1.0'?>
<CARD_V2>
<FILENAME text="PRECURSOR_GOLEM_277302" />
<CARDNAME text="PRECURSOR_GOLEM" />
<TITLE>
<LOCALISED_TEXT LanguageCode="en-US"><![CDATA[Precursor Golem]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="fr-FR"><![CDATA[Golem précurseur]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="es-ES"><![CDATA[Gólem precursor]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="de-DE"><![CDATA[Golem-Vorläufer]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="it-IT"><![CDATA[Predecessore Golem]]></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[Golem Precursor]]></LOCALISED_TEXT>
</TITLE>
<MULTIVERSEID value="277302" />
<ARTID value="131023" />
<ARTIST name="Chippy" />
<CASTING_COST cost="{5}" />
<TYPE metaname="Artifact" />
<TYPE metaname="Creature" />
<SUB_TYPE metaname="Golem" order_de-DE="0" order_es-ES="0" order_fr-FR="0" order_it-IT="0" order_jp-JA="0" order_ko-KR="0" order_pt-BR="0" order_ru-RU="0" />
<EXPANSION value="DPG" />
<RARITY metaname="R" />
<POWER value="3" />
<TOUGHNESS value="3" />
<TRIGGERED_ABILITY auto_skip="1">
<LOCALISED_TEXT LanguageCode="en-US"><![CDATA[When Precursor Golem enters the battlefield, put two 3/3 colorless Golem artifact creature tokens onto the battlefield.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="fr-FR"><![CDATA[Quand le Golem précurseur arrive sur le champ de bataille, mettez sur le champ de bataille deux jetons de créature-artefact 3/3 incolore Golem.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="es-ES"><![CDATA[Cuando el Gólem precursor entre al campo de batalla, pon en el campo de batalla dos fichas de criatura artefacto Gólem incoloras 3/3.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="de-DE"><![CDATA[Wenn der Golem-Vorläufer ins Spiel kommt, bringe zwei 3/3 farblose Golem-Artefaktkreaturenspielsteine ins Spiel.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="it-IT"><![CDATA[Quando il Predecessore Golem entra nel campo di battaglia, metti sul campo di battaglia due pedine creatura artefatto Golem 3/3 incolori.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="jp-JA"><![CDATA[先駆のゴーレムが戦場に出たとき、無色の3/3のゴーレム・アーティファクト・クリーチャー・トークンを2体戦場に出す。]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="ko-KR"><![CDATA[선구자 골렘이 전장에 들어올 때, 3/3 무색 골렘 마법물체 생물 토큰 두 개를 전장에 놓는다.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="ru-RU"><![CDATA[Когда Голем-Предтеча выходит на поле битвы, положите на поле битвы две фишки артефактного существа 3/3 бесцветный Голем.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="pt-BR"><![CDATA[Quando Golem Precursor entrar no campo de batalha, coloque no campo de batalha duas fichas de criatura artefato incolores 3/3 do tipo Golem.]]></LOCALISED_TEXT>
<TRIGGER value="ZONECHANGE_END" simple_qualifier="self" to_zone="ZONE_IN_PLAY" />
<RESOLUTION_TIME_ACTION>
local token_count = 2
if token_count > 0 then
MTG():PutTokensIntoPlay( "TOKEN_GOLEM_3_3_277455", token_count, EffectController() )
end
</RESOLUTION_TIME_ACTION>
</TRIGGERED_ABILITY>
<TRIGGERED_ABILITY active_zone="ZONE_IN_PLAY">
<LOCALISED_TEXT LanguageCode="en-US"><![CDATA[Whenever a player casts an instant or sorcery spell that targets only a single Golem, that player copies that spell for each other Golem that spell could target. Each copy targets a different one of those Golems.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="fr-FR"><![CDATA[À chaque fois qu’un joueur lance un sort d’éphémère ou de rituel qui ne cible qu’un seul golem, ce joueur copie ce sort pour chaque autre golem que ce sort pourrait cibler. Chaque copie cible un de ces golems différents.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="es-ES"><![CDATA[Siempre que un jugador lance un hechizo instantáneo o conjuro que haga objetivo a un único Gólem, ese jugador copia ese hechizo para cada otro Gólem que ese hechizo podría hacer objetivo. Cada copia hace objetivo a cada uno de esos otros Gólems.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="de-DE"><![CDATA[Immer wenn ein Spieler einen Spontanzauber oder eine Hexerei wirkt, der bzw. die nur einen einzelnen Golem als Ziel hat, kopiert dieser Spieler diesen Zauber für jeden anderen Golem, den der Zauber als Ziel haben könnte. Jede Kopie hat einen anderen dieser Golems als Ziel.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="it-IT"><![CDATA[Ogniqualvolta un giocatore lancia una magia istantaneo o stregoneria che bersaglia solo un Golem, quel giocatore copia quella magia per ogni altro Golem che quella magia potrebbe bersagliare. Ogni copia bersaglia uno diverso di quei Golem.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="jp-JA"><![CDATA[いずれかのプレイヤーが、ゴーレム1体のみを対象とする、インスタント呪文かソーサリー呪文を1つ唱えるたび、そのプレイヤーはその呪文を、その呪文が対象にできる他の各ゴーレム1体につき1回コピーする。 それぞれのコピーは、それらのゴーレムのうち別々のものを対象とする。]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="ko-KR"><![CDATA[어느 플레이어가 골렘 한 개만을 목표로 하는 순간마법이나 집중마법 주문을 발동할 때마다, 그 플레이어는 그 주문의 목표가 될 수 있는 골렘 한 개당 그 주문을 복사한다. 각 복사본은 각각 다른 골렘을 목표로 한다.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="ru-RU"><![CDATA[Каждый раз, когда игрок разыгрывает мгновенное заклинание или заклинание волшебства, целью которого является только один Голем, тот игрок копирует то заклинание за каждого другого Голема, на которого могло бы быть нацелено то заклинание. Целью каждой копии является один из тех разных Големов.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="pt-BR"><![CDATA[Toda vez que um jogador conjura uma mágica instantânea ou feitiço que tem um único Golem como alvo, aquele jogador copia aquela mágica para cada outro Golem que aquela mágica poderia ter como alvo. Cada cópia tem um Golem diferente como alvo.]]></LOCALISED_TEXT>
<TRIGGER value="TARGETS_CHOSEN">
local targeting_spell = TriggerObject()
-- cast spell?
if targeting_spell ~= nil and targeting_spell:WasCast() ~= 0 then
-- instant or sorcery?
if targeting_spell:GetCardType():Test(CARD_TYPE_INSTANT) ~= 0 or targeting_spell:GetCardType():Test(CARD_TYPE_SORCERY) ~= 0 then
-- targeting only a single golem?
local spellDC = targeting_spell:GetDataChest()
if spellDC ~= nil then
local target = nil
local main_index = 0
local targetDC = spellDC:Get_NthTargets(main_index)
while targetDC ~= nil do
if targetDC:Get_NthPlayerPtr(0) ~= nil then
-- if we're targeting a player, we're not targeting a single golem
return false
else
-- we only have card ptrs...are they all the same?
local ptr_index = 0
local target_iter = targetDC:Get_NthCardPtr(ptr_index)
while target_iter ~= nil do
if target_iter:GetSubType():Test(CREATURE_TYPE_GOLEM) == 0 then
-- target is not a golem
return false
else
if target ~= nil and target_iter ~= target then
-- while still a golem, this is a different golem
return false
else
-- this is the only golem targeted (so far)
target = target_iter
end
end
ptr_index = ptr_index + 1
target_iter = targetDC:Get_NthCardPtr(ptr_index)
end
-- we're done with this targetDC (either exactly one golem in there, or empty)
-- loop
main_index = main_index + 1
targetDC = spellDC:Get_NthTargets(main_index)
end
end
if target == nil then
-- no targets
return false
end
-- if we've made it this far we must have a single target that is a golem
EffectDC():Set_CardPtr(1, target)
return true
end
end
end
return false
</TRIGGER>
<PLAY_TIME_ACTION>
local targeting_spell = TriggerObject()
if targeting_spell == nil then
return
end
-- set up the datachest ready for resolution
EffectDC():LKIShield_CardPtr(COMPARTMENT_ID_PARAM_TRIGGER_OBJECT) -- LKI shield the trigger object so we can copy it later
EffectDC():Make_Chest(0):CopyFrom( targeting_spell:GetDataChest() )
-- target already stored in trigger (cpt 1)
-- This is a variable to say what the last target definition we've loaded is, for use in the filter block
EffectDC():Set_Int(2, -1)
</PLAY_TIME_ACTION>
<FILTER>
local spellDC = EffectDC():Get_Chest(0)
local filteredCard = FilteredCard()
local spell = TriggerObject()
local filter = Object():GetFilter()
local original_golem = EffectDC():Get_CardPtr(1)
if (spell == nil) or (spellDC == nil) or (filteredCard == original_golem) or (filteredCard:GetSubType():Test( CREATURE_TYPE_GOLEM ) == 0) then
-- not a different golem, so skip it (no need to check target definition)
return false
end
local main_index = 0
local targetDC = spellDC:Get_NthTargets(main_index)
while targetDC ~= nil do
if targetDC:Get_NthCardPtr(0) ~= nil then
-- this chest has a card target, so we know this condition must be checked
if EffectDC():Get_Int(2) ~= main_index then
-- mark that we've loaded this definition
EffectDC():Set_Int(2, main_index)
-- load the definition
filter = Object():LoadTargetDefinitionFromDC(targetDC)
-- remove simplified targeting, just in case
filter:SetHint(HINT_NEUTRAL, EffectController())
end
-- test filter
if (filteredCard:TestFilter(filter, spell) == 0) then
return false
end
end
main_index = main_index + 1
targetDC = spellDC:Get_NthTargets(main_index)
end
-- if we get this far, we know we're (another) valid golem. huzzah.
return true
</FILTER>
<RESOLUTION_TIME_ACTION>
local filteredCard = FilteredCard()
local spell = TriggerObject()
local spellDC = EffectDC():Get_Chest(0)
if spell == nil or filteredCard == nil then
return
end
local main_index = 0
local targetDC = spellDC:Get_NthTargets(main_index)
while targetDC ~= nil do
if targetDC:Get_NthCardPtr(0) ~= nil then
-- this chest has a card target, so we know it needs replacing.
-- we don't know where in this chest it lives, but all that really matters is the number of targets, as this is a target datachest
local num_targets = targetDC:Count()
targetDC:Clear()
for i=0,num_targets-1 do
targetDC:Set_CardPtr(i, filteredCard)
end
end
main_index = main_index + 1
targetDC = spellDC:Get_NthTargets(main_index)
end
local copied_spell = spell:GetPlayer():CopySpell( spell, spellDC )
</RESOLUTION_TIME_ACTION>
</TRIGGERED_ABILITY>
<TOKEN_REGISTRATION reservation="1" type="TOKEN_GOLEM_3_3_277455" />
<SFX text="COMBAT_BLUNT_LARGE_ATTACK" power_boundary_min="4" power_boundary_max="-1" />
<SFX text="COMBAT_BLUNT_SMALL_ATTACK" power_boundary_min="1" power_boundary_max="3" />
<AI_BASE_SCORE score="600" zone="ZONE_IN_PLAY" />
</CARD_V2>

EDIT: This code is based on a very strong hypothesis: the targets of a card are always in sequential registers and they always start from 0. For example Fling can't be copied by Precursor Golem because it uses register #0 for the sacrifice. So, I can answer now:
Yes.sumomole wrote:the code of Precursor Golem has any bug?

< 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 sumomole » 08 May 2013, 15:17
I try to code the last ability of Vizkopa Confessor learn from Mire's Toll, but seems to be a problem on Get_Targets(1), can anyone tell me why there is the problem

- code | Open
- Code: Select all
<TRIGGERED_ABILITY dangerous="1" filter_zone="ZONE_IN_PLAY">
<LOCALISED_TEXT LanguageCode="en-US"><![CDATA[When Vizkopa Confessor enters the battlefield, pay any amount of life. Target opponent reveals that many cards from his or her hand. You choose one of them and exile it.]]></LOCALISED_TEXT>
<TRIGGER value="ZONECHANGE_END" simple_qualifier="self" to_zone="ZONE_IN_PLAY" />
<TARGET_DEFINITION id="0">
local filter = Object():GetFilter()
filter:Clear()
filter:SetFilterType( FILTER_TYPE_PLAYERS + FILTER_TYPE_OPPONENTS)
filter:SetOwner( EffectController() )
filter:SetHint( HINT_ENEMY, EffectController() )
</TARGET_DEFINITION>
<TARGET_DETERMINATION>
return AtLeastOneTargetFromDefinition(0)
</TARGET_DETERMINATION>
<PLAY_TIME_ACTION target_choosing="1">
EffectController():ChooseTarget( 0, "CARD_QUERY_CHOOSE_OPPONENT", EffectDC():Make_Targets(0) )
</PLAY_TIME_ACTION>
<RESOLUTION_TIME_ACTION>
local player = EffectController()
local total_life = player:GetLifeTotal()
local target_player = EffectDC():Get_Targets(0):Get_PlayerPtr(0)
if target_player ~= nil and EffectController():IsAI() ~= 0 then
if total_life > CountCardsInHand(target_player) then
total_life = CountCardsInHand(target_player)
end
end
player:BeginNewNumericalChoice()
player:AddNumericalChoiceAnswer(total_life)
player:AskNumericalChoiceQuestion("CARD_QUERY_CHOOSE_AMOUNT_LIFE")
</RESOLUTION_TIME_ACTION>
<RESOLUTION_TIME_ACTION>
local filter = Object():GetFilter()
local total = Object():GetNumericalChoiceResult()
local target_player = EffectDC():Get_Targets(0):Get_PlayerPtr(0)
if target_player ~= nil then
EffectController():LoseLife( total )
filter:Clear()
filter:SetPlayer( target_player )
filter:SetZone( ZONE_HAND )
filter:NotTargetted()
filter:SetHint( HINT_ENEMY, target_player )
target_player:SetTargetCount( total )
for i=0,total-1 do
target_player:SetTargetPrompt( i, "CARD_QUERY_CHOOSE_CARD_TO_REVEAL" )
end
target_player:ChooseTargets( NO_VALIDATION, EffectDC():Make_Targets(1) )
end
</RESOLUTION_TIME_ACTION>
<RESOLUTION_TIME_ACTION>
local target_DC = EffectDC():Get_Targets(1)
local target_card = EffectDC():Get_Targets(1):Get_CardPtr(0)
local i = 1
if target_DC ~= nil then
while (target_card ~= nil) do
target_card:GuidedReveal( ZONE_HAND, ZONE_HAND )
target_card = EffectDC():Get_Targets(1):Get_CardPtr(i)
i=i+1
end
EffectController():ChooseTargetFromDC( NO_VALIDATION, "CARD_QUERY_CHOOSE_CARD_TO_DISCARD", target_DC, EffectDC():Make_Targets(2) )
end
</RESOLUTION_TIME_ACTION>
<RESOLUTION_TIME_ACTION>
local target_card = EffectDC():Get_Targets(2):Get_CardPtr(0)
if target_card ~= nil then
target_card:GuidedReveal( ZONE_HAND, ZONE_REMOVED_FROM_GAME )
target_card:RemoveFromGame()
end
</RESOLUTION_TIME_ACTION>
</TRIGGERED_ABILITY>
-
sumomole - Programmer
- Posts: 611
- Joined: 07 Jun 2011, 08:34
- Has thanked: 51 times
- Been thanked: 234 times
Re: Card Creation Request Thread
by thefiremind » 08 May 2013, 15:29
You made it identical to Mire's Toll, so if Mire's Toll works, I really can't understand what could be wrong here.
What exactly is the problem on Get_Targets(1)? Does it get cleared before using? Does it give an error on SCRIPT_LOG.TXT? If so, what error exactly?
What exactly is the problem on Get_Targets(1)? Does it get cleared before using? Does it give an error on SCRIPT_LOG.TXT? If so, what error exactly?
< 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 sumomole » 08 May 2013, 15:45
No, no matter how many life I choose, the amount of life lost is correct, but the amount of Get_Targets(1) is always equal to the number of hand size minus one, I think the reason is "local total = Object():GetNumericalChoiceResult()", I tried to set total to a constant, there is no bugs, but I don't know why.thefiremind wrote:You made it identical to Mire's Toll, so if Mire's Toll works, I really can't understand what could be wrong here.
What exactly is the problem on Get_Targets(1)? Does it get cleared before using? Does it give an error on SCRIPT_LOG.TXT? If so, what error exactly?

-
sumomole - Programmer
- Posts: 611
- Joined: 07 Jun 2011, 08:34
- Has thanked: 51 times
- Been thanked: 234 times
Re: Card Creation Request Thread
by gorem2k » 08 May 2013, 15:50
that Precursor Golem did something crazy when I've played against Talran yesterday !
I had 3 of them in play with 2 Phantasmal Image, so 5 in total and he cast Rites of replication for 5 on one of them, the board was filled on his side ;p gotta code Leonin Abunas to prevent this happening ;p
I had 3 of them in play with 2 Phantasmal Image, so 5 in total and he cast Rites of replication for 5 on one of them, the board was filled on his side ;p gotta code Leonin Abunas to prevent this happening ;p
Re: Card Creation Request Thread
by thefiremind » 08 May 2013, 16:04
Maybe it's a stupid advice, but I would try this:sumomole wrote:No, no matter how many life I choose, the amount of life lost is correct, but the amount of Get_Targets(1) is always equal to the number of hand size minus one, I think the reason is "local total = Object():GetNumericalChoiceResult()", I tried to set total to a constant, there is no bugs, but I don't know why.
- Code: Select all
...
player:AskNumericalChoiceQuestion("CARD_QUERY_CHOOSE_AMOUNT_LIFE")
</RESOLUTION_TIME_ACTION>
<RESOLUTION_TIME_ACTION>
EffectDC():Set_Int( 10, Object():GetNumericalChoiceResult() )
</RESOLUTION_TIME_ACTION>
<RESOLUTION_TIME_ACTION>
local filter = Object():GetFilter()
local total = EffectDC():Get_Int(10)
...
Try to target a Golem with Fling while you have Precursor Golem on the battlefield, and see what happens (spoiler: nothing will happen).gorem2k wrote:that Precursor Golem did something crazy when I've played against Talran yesterday !

< 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
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 3 guests