It is currently 11 Nov 2025, 08:38
   
Text Size

Formal Request Thread

Moderator: CCGHQ Admins

Re: Formal Request Thread

Postby thefiremind » 13 Jul 2013, 13:46

BloodReyvyn wrote:Question: Has anyone else been having the game wipe out their saved deck settings every time they start the game? It's been happening to me today. Only a minor annoyance as I usually main-deck everything I need to test, but still I thought there was a variable that helped each deck save its own setup.
Oh, it seems you reached the maximum number of saved decks... how many decks were you be able save before that started to happen (more or less)?
< Former DotP 2012/2013/2014 modder >
Currently busy with life...
User avatar
thefiremind
Programmer
 
Posts: 3515
Joined: 07 Nov 2011, 10:55
Has thanked: 118 times
Been thanked: 722 times

Re: Formal Request Thread

Postby Master Necro » 13 Jul 2013, 18:35

@ thefiremind:

Aureila works now! :)

For everyone else I have just came back from a construction site and I am knackered, so I will update everything tomorrow.
User avatar
Master Necro
 
Posts: 259
Joined: 24 Apr 2013, 18:25
Has thanked: 83 times
Been thanked: 21 times

Re: Formal Request Thread

Postby thefiremind » 13 Jul 2013, 18:39

Master Necro wrote:@ thefiremind:

Aureila works now! :)
Yeah but I just saw that there's a function called NumAttacksThisTurn that would have probably made the code easier. Anyway I'm on another problem right now so I have no time to tweak Aurelia. :wink:
< Former DotP 2012/2013/2014 modder >
Currently busy with life...
User avatar
thefiremind
Programmer
 
Posts: 3515
Joined: 07 Nov 2011, 10:55
Has thanked: 118 times
Been thanked: 722 times

Re: Formal Request Thread

Postby Master Necro » 13 Jul 2013, 18:42

thefiremind wrote:
Master Necro wrote:@ thefiremind:

Aureila works now! :)
Yeah but I just saw that there's a function called NumAttacksThisTurn that would have probably made the code easier. Anyway I'm on another problem right now so I have no time to tweak Aurelia. :wink:
She works so I'm happy see no problem there. :)
User avatar
Master Necro
 
Posts: 259
Joined: 24 Apr 2013, 18:25
Has thanked: 83 times
Been thanked: 21 times

Re: Formal Request Thread

Postby Xander9009 » 13 Jul 2013, 22:04

This code wasn't made by me (I tried and failed to make it once I realized I needed it and I didn't have any cards with it; eventually got a mod with it). I'm pretty sure it was made by kev. But it might be useful for someone else like it was for me.

Scry (This is Scry 2, but it's easily modified for others, like the Scry 4 I had to make.) Note that there are three numbers to change (all near the top) and the prompts must be made to match.
Code: Select all
<RESOLUTION_TIME_ACTION>
    local filter = ClearFilter()
    local effectController = EffectController()
    filter:SetZone( ZONE_LIBRARY, effectController )
    filter:SetPortion( 2 ) --Change this
    effectController:SetItemCount( 2 ) --Change this
    effectController:SetItemPrompt(0, "CARD_QUERY_CHOOSE_CARD_TO_PUT_ON_BOTTOM_LIBRARY" )
    effectController:SetItemPrompt(1, "CARD_QUERY_CHOOSE_CARD_TO_PUT_ON_BOTTOM_LIBRARY" ) --Add or remove lines so there are as many lines as the scry number.
    effectController:ChooseItems( EffectDC():Make_Targets(0), QUERY_FLAG_UP_TO )
    </RESOLUTION_TIME_ACTION>
      <RESOLUTION_TIME_ACTION>
    local rem_count = 2 --Change this
    local cardsInLibrary = EffectController():Library_Count()
    if rem_count &gt; cardsInLibrary then
      rem_count = cardsInLibrary
    end
    local target_array = {}
    for i=0,1 do
      target_array[i] = EffectDC():Get_Targets(0):Get_CardPtr(i)
    end
    for i = 0,1 do
      if target_array[i] ~= nil then
         target_array[i]:PutOnBottomOfLibrary()
         rem_count = rem_count-1
       end
    end
    EffectDC():Set_Int(2, rem_count)
    </RESOLUTION_TIME_ACTION>
      <RESOLUTION_TIME_ACTION>
    local filter = ClearFilter()
    local effectController = EffectController()
    local remainingCount = EffectDC():Get_Int(2)
    if remainingCount &gt; 0 then
      filter:SetZone( ZONE_LIBRARY, effectController )
      filter:SetPortion( remainingCount )
      effectController:SetItemCount( remainingCount )
       for i = 0, (remainingCount-1) do
          effectController:SetItemPrompt( i, "CARD_QUERY_CHOOSE_CARD_TO_PUT_ONTO_LIBRARY" )
       end
       effectController:ChooseItems( EffectDC():Make_Targets(1) )
    end
    </RESOLUTION_TIME_ACTION>
      <RESOLUTION_TIME_ACTION>
    local remainingCount = EffectDC():Get_Int(2)
    if remainingCount &gt; 0 then
      local target_array = {}
       for i = 0, (remainingCount-1) do
        target_array[i] = EffectDC():Get_Targets(1):Get_CardPtr(i)
      end
       for i = 0, (remainingCount-1) do
        if target_array[i] ~= nil then
           target_array[i]:PutOnTopOfLibrary()
         end
       end
    end
    </RESOLUTION_TIME_ACTION>
_______________________________
Community Wad - Community Wad Website - How to Help and Report Bugs
Discord: discord.gg/4AXvHzW
User avatar
Xander9009
Programmer
 
Posts: 2905
Joined: 29 Jun 2013, 07:44
Location: Indiana, United States
Has thanked: 121 times
Been thanked: 445 times

Re: Formal Request Thread

Postby Fero » 14 Jul 2013, 03:27

Fero wrote:This code seems totally taken from DotP2013 without a single update. Of course it doesn't work.
EDIT: Try this:
PHYREXIAN_OBLITERATOR_277185.zip
No prefix on the Multiverse ID, add the one you intend to use.
I use the card, but when launching the effect does nothing. The opponent should sacrifice the permanents by damage, but it doesn't.

| Open
<?xml version='1.0'?>
<CARD_V2>
<FILENAME text="PHYREXIAN_OBLITERATOR_277185" />
<CARDNAME text="PHYREXIAN_OBLITERATOR" />
<TITLE>
<LOCALISED_TEXT LanguageCode="en-US"><![CDATA[Phyrexian Obliterator]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="fr-FR"><![CDATA[Oblitérateur phyrexian]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="es-ES"><![CDATA[Arrasador pirexiano]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="de-DE"><![CDATA[Phyrexianischer Auslöscher]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="it-IT"><![CDATA[Annientatore di Phyrexia]]></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[Obliterador Phyrexiano]]></LOCALISED_TEXT>
</TITLE>
<MULTIVERSEID value="277185" />
<ARTID value="134235" />
<ARTIST name="Todd Lockwood" />
<CASTING_COST cost="{B}{B}{B}{B}" />
<FLAVOURTEXT>
<LOCALISED_TEXT LanguageCode="en-US"><![CDATA[“Behold blessed perfection.”
—Sheoldred, Whispering One]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="fr-FR"><![CDATA[« Contemplez la perfection sanctifiée. »
—Sheoldred la Susurrante]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="es-ES"><![CDATA[“Admiren la perfección bendita.”
—Sheoldred, la Susurradora]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="de-DE"><![CDATA[„Erblicket die gesegnete Perfektion!“
—Sheoldred die Flüsternde]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="it-IT"><![CDATA[“Ammirate la perfezione benedetta.”
—Sheoldred, La Bisbigliante]]></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[“Contemplem a perfeição abençoada.”
— Sheoldred, O Sussurrador]]></LOCALISED_TEXT>
</FLAVOURTEXT>
<TYPE metaname="Creature" />
<SUB_TYPE metaname="Horror" />
<EXPANSION value="DPG" />
<RARITY metaname="M" />
<POWER value="5" />
<TOUGHNESS value="5" />
<STATIC_ABILITY>
<LOCALISED_TEXT LanguageCode="en-US"><![CDATA[Trample]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="fr-FR"><![CDATA[Piétinement]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="es-ES"><![CDATA[Arrolla.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="de-DE"><![CDATA[Verursacht Trampelschaden]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="it-IT"><![CDATA[Travolgere]]></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[Atropelar]]></LOCALISED_TEXT>
<INTRINSIC characteristic="CHARACTERISTIC_TRAMPLE" />
</STATIC_ABILITY>
<TRIGGERED_ABILITY>
<LOCALISED_TEXT LanguageCode="en-US"><![CDATA[Whenever a source deals damage to Phyrexian Obliterator, that source’s controller sacrifices that many permanents.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="fr-FR"><![CDATA[À chaque fois qu’une source inflige des blessures à l’Oblitérateur phyrexian, le contrôleur de cette source sacrifie autant de permanents.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="es-ES"><![CDATA[Siempre que una fuente haga daño al Arrasador pirexiano, el controlador de esa fuente sacrifica esa misma cantidad de permanentes.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="de-DE"><![CDATA[Immer wenn eine Quelle dem Phyrexianischen Auslöscher Schaden zufügt, opfert der Beherrscher dieser Quelle entsprechend viele bleibende Karten.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="it-IT"><![CDATA[Ogniqualvolta una fonte infligge danno all’Annientatore di Phyrexia, il controllore della fonte sacrifica altrettanti permanenti.]]></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[Toda vez que uma fonte causa dano a Obliterador Phyrexiano, o controlador daquela fonte sacrifica uma quantidade equivalente de permanentes.]]></LOCALISED_TEXT>
<TRIGGER value="SOURCE_DEALS_DAMAGE_TO_OBJECT" damage_type="all">
return SecondaryObject() == EffectSource()
</TRIGGER>
<RESOLUTION_TIME_ACTION>
local player = TriggerObjectLKI():GetPlayer()
local amount = Damage():GetAmount()
local count = 0
if player ~= nil then
local filter = ClearFilter()
filter:Add(FE_CONTROLLER, OP_IS, player)
filter:Add(FE_IS_PERMANENT, true)
count = filter:CountStopAt(amount)
if count &gt; 0 then
for i=0,count-1 do
player:SetTargetPrompt(i, "CARD_QUERY_CHOOSE_PERMANENT_TO_SACRIFICE")
end
player:ChooseItems( EffectDC():Make_Targets(0) )
end
end
EffectDC():Set_Int(1, count)
</RESOLUTION_TIME_ACTION>
<RESOLUTION_TIME_ACTION>
local player = TriggerObjectLKI():GetPlayer()
local count = EffectDC():Get_Int(1)
if player ~= nil and count &gt; 0 then
for i=0,count-1 do
local target = EffectDC():Get_Targets(0):Get_CardPtr(i)
if target ~= nil then
player:Sacrifice(target)
end
end
end
</RESOLUTION_TIME_ACTION>
</TRIGGERED_ABILITY>
<HELP title="MORE_INFO_BADGE_TITLE_1" body="MORE_INFO_BADGE_BODY_1" zone="ZONE_ANY" />
<SFX text="COMBAT_CLAW_LARGE_ATTACK" power_boundary_min="4" power_boundary_max="-1" />
<SFX text="COMBAT_CLAW_SMALL_ATTACK" power_boundary_min="1" power_boundary_max="3" />
<AI_BASE_SCORE score="600" zone="ZONE_BATTLEFIELD" />
</CARD_V2>


And another requests please.

Phyrexian Obliterator
Phylactery Lich
Darksteel Axe
Darksteel Relic
Darksteel Plate
Fero
 
Posts: 15
Joined: 13 Jul 2013, 06:07
Has thanked: 0 time
Been thanked: 0 time

Re: Formal Request Thread

Postby BloodReyvyn » 14 Jul 2013, 05:25

Xander9009 wrote:
BloodReyvyn wrote:This is the largest image I could find. It's a pic of the whole card and since I haven't yet made a token I didn't want to crop it. Link > https://www.dropbox.com/s/4bvooc80t10ic ... 0Image.png
loookaz wrote:thank you once again:)

i am having problems to find the image of the worm token.
can anybody help?
I've never properly made a token image before, so this was a first for me. I used the copy of the Wurm Token I had (which came from the HQ pics thread. It's a large download, but you can choose which sets to get. Anyway, here's the result. Just drop the image in the illustrations folder and change the <ARTID value="131617" /> in the token xml to <ARTID value="909005" />. It should turn out pretty well.

Apparently, tokens use the picture of the whole card. And ones with abilities are made slightly differently than ones without. You have to match up the image with the frame that it will be in so it shows properly. I didn't know that until I tried cropping the image like I'd done for other cards and token and I saw that it was stretched (or, more accurately, squished) strangely. Took some tinkering and searching, but let's see if it works.
I ended up just finding the art for a stock game token (the Angel Token) and sized my pic to fit. Seems to work fairly well. I made myself a template, so in case anyone else needs it just as a reference it is here: https://www.dropbox.com/s/rfktbm3gg1pti ... mplate.png
"There's an experience worse than blindness - it's the certainty that your vision is perfect and the horror that there's no world around you to see."
User avatar
BloodReyvyn
 
Posts: 421
Joined: 19 May 2013, 13:29
Has thanked: 53 times
Been thanked: 40 times

Re: Formal Request Thread

Postby Master Necro » 14 Jul 2013, 06:13

Updated all the new cards and codes.

Just have a question how do I code the target definition: "Target creature with a +1/+1 counter on it "?
User avatar
Master Necro
 
Posts: 259
Joined: 24 Apr 2013, 18:25
Has thanked: 83 times
Been thanked: 21 times

Re: Formal Request Thread

Postby Xander9009 » 14 Jul 2013, 06:21

Master Necro wrote:Updated all the new cards and codes.

Just have a question how do I code the target definition: "Target creature with a +1/+1 counter on it "?
EDIT: Try this one. It's modified from what thefiremind gave me to remove a +1/+1 counter from a creature that I control. Just removed the "remove counter" bit and the "that I control" bit. That should just leave the targeting of a creature with a counter on it. The target won't be chosen until resolution, though. For it to be the target before resolution, it would have to be modified. What card is it for?
Code: Select all
<RESOLUTION_TIME_ACTION>
      MTG():ClearFilterMark()
      local filter = ClearFilter()
      filter:Add(FE_TYPE, OP_IS, CARD_TYPE_CREATURE)
      local filter_count = filter:EvaluateObjects()
      if filter_count &gt; 0 then
         for i=0,filter_count-1 do
            local candidate = filter:GetNthEvaluatedObject(i)
            if candidate ~= nil and candidate:CountCounters( MTG():PlusOnePlusOneCounters() ) &gt; 0 then
               candidate:MarkForFilter()
            end
         end
         filter:SetMarkedObjectsOnly()
         EffectController():ChooseItem( "CARD_QUERY_CHOOSE_CREATURE", EffectDC():Make_Targets(0) )
      end
      </RESOLUTION_TIME_ACTION>
EDIT 2: If you need a spell to target only creatures with 1/1 counters at the time it's played rather than when it resolves (which you probably do), then this should work, but I can't guarantee it.
Code: Select all
[code]
<TARGET tag="CARD_QUERY_CHOOSE_CREATURE" definition="0" compartment="0" count="1" />
<TARGET_DEFINITION id="0">
      local filter = ClearFilter()
      filter:Add(FE_TYPE, OP_IS, CARD_TYPE_CREATURE)
      local filter_count = filter:EvaluateObjects()
      if filter_count &gt; 0 then
         for i=0,filter_count-1 do
            local candidate = filter:GetNthEvaluatedObject(i)
            if candidate ~= nil and candidate:CountCounters( MTG():PlusOnePlusOneCounters() ) &gt; 0 then
               candidate:MarkForFilter()
            end
         end
         filter:SetMarkedObjectsOnly()
      end
      </TARGET_DEFINITION>[/code]
Last edited by Xander9009 on 14 Jul 2013, 06:34, edited 1 time in total.
_______________________________
Community Wad - Community Wad Website - How to Help and Report Bugs
Discord: discord.gg/4AXvHzW
User avatar
Xander9009
Programmer
 
Posts: 2905
Joined: 29 Jun 2013, 07:44
Location: Indiana, United States
Has thanked: 121 times
Been thanked: 445 times

Re: Formal Request Thread

Postby BloodReyvyn » 14 Jul 2013, 06:30

thefiremind wrote:
BloodReyvyn wrote:Question: Has anyone else been having the game wipe out their saved deck settings every time they start the game? It's been happening to me today. Only a minor annoyance as I usually main-deck everything I need to test, but still I thought there was a variable that helped each deck save its own setup.
Oh, it seems you reached the maximum number of saved decks... how many decks were you be able save before that started to happen (more or less)?
Like maybe 5 total that I have played. I only played 2 of the stock decks...
"There's an experience worse than blindness - it's the certainty that your vision is perfect and the horror that there's no world around you to see."
User avatar
BloodReyvyn
 
Posts: 421
Joined: 19 May 2013, 13:29
Has thanked: 53 times
Been thanked: 40 times

Re: Formal Request Thread

Postby Master Necro » 14 Jul 2013, 06:51

Xander9009 wrote:
EDIT: Try this one. It's modified from what thefiremind gave me to remove a +1/+1 counter from a creature that I control. Just removed the "remove counter" bit and the "that I control" bit. That should just leave the targeting of a creature with a counter on it. The target won't be chosen until resolution, though. For it to be the target before resolution, it would have to be modified. What card is it for?
Code: Select all
<RESOLUTION_TIME_ACTION>
      MTG():ClearFilterMark()
      local filter = ClearFilter()
      filter:Add(FE_TYPE, OP_IS, CARD_TYPE_CREATURE)
      local filter_count = filter:EvaluateObjects()
      if filter_count &gt; 0 then
         for i=0,filter_count-1 do
            local candidate = filter:GetNthEvaluatedObject(i)
            if candidate ~= nil and candidate:CountCounters( MTG():PlusOnePlusOneCounters() ) &gt; 0 then
               candidate:MarkForFilter()
            end
         end
         filter:SetMarkedObjectsOnly()
         EffectController():ChooseItem( "CARD_QUERY_CHOOSE_CREATURE", EffectDC():Make_Targets(0) )
      end
      </RESOLUTION_TIME_ACTION>
EDIT 2: If you need a spell to target only creatures with 1/1 counters at the time it's played rather than when it resolves (which you probably do), then this should work, but I can't guarantee it.
Code: Select all
[code]
<TARGET tag="CARD_QUERY_CHOOSE_CREATURE" definition="0" compartment="0" count="1" />
<TARGET_DEFINITION id="0">
      local filter = ClearFilter()
      filter:Add(FE_TYPE, OP_IS, CARD_TYPE_CREATURE)
      local filter_count = filter:EvaluateObjects()
      if filter_count &gt; 0 then
         for i=0,filter_count-1 do
            local candidate = filter:GetNthEvaluatedObject(i)
            if candidate ~= nil and candidate:CountCounters( MTG():PlusOnePlusOneCounters() ) &gt; 0 then
               candidate:MarkForFilter()
            end
         end
         filter:SetMarkedObjectsOnly()
      end
      </TARGET_DEFINITION>[/code]
Thanks dude but shouldn't the first code look more like this than:

Code: Select all
<TARGET tag="CARD_QUERY_CHOOSE_CREATURE" definition="0" compartment="0" count="1" />
<TARGET_DEFINITION id="0">
MTG():ClearFilterMark()
      local filter = ClearFilter()
      filter:Add(FE_TYPE, OP_IS, CARD_TYPE_CREATURE)
      local filter_count = filter:EvaluateObjects()
      if filter_count &gt; 0 then
         for i=0,filter_count-1 do
            local candidate = filter:GetNthEvaluatedObject(i)
            if candidate ~= nil and candidate:CountCounters( MTG():PlusOnePlusOneCounters() ) &gt; 0 then
               candidate:MarkForFilter()
            end
         end
</TARGET_DEFINITION>
Or something similar?

I need it for my new deck for Graft cards they all have the second ability "Target creature with a +1/+1 counter on it..."
User avatar
Master Necro
 
Posts: 259
Joined: 24 Apr 2013, 18:25
Has thanked: 83 times
Been thanked: 21 times

Re: Formal Request Thread

Postby Xander9009 » 14 Jul 2013, 07:00

Master Necro wrote:Or something similar?

I need it for my new deck for Graft cards they all have the second ability "Target creature with a +1/+1 counter on it..."
Yep, use the second one and it should work fine. Hopefully. I haven't used markforfilter() and setmarkedobjectsonly() myself. I've only copied them from others' cards. So, I can't be 100% sure. Let me know how it goes.
_______________________________
Community Wad - Community Wad Website - How to Help and Report Bugs
Discord: discord.gg/4AXvHzW
User avatar
Xander9009
Programmer
 
Posts: 2905
Joined: 29 Jun 2013, 07:44
Location: Indiana, United States
Has thanked: 121 times
Been thanked: 445 times

Re: Formal Request Thread

Postby Master Necro » 14 Jul 2013, 07:03

Xander9009 wrote:
Master Necro wrote:Or something similar?

I need it for my new deck for Graft cards they all have the second ability "Target creature with a +1/+1 counter on it..."
Yep, use the second one and it should work fine. Hopefully. I haven't used markforfilter() and setmarkedobjectsonly() myself. I've only copied them from others' cards. So, I can't be 100% sure. Let me know how it goes.
I will but I'm slow in card building so it will take some time. ;)
User avatar
Master Necro
 
Posts: 259
Joined: 24 Apr 2013, 18:25
Has thanked: 83 times
Been thanked: 21 times

Re: Formal Request Thread

Postby thefiremind » 14 Jul 2013, 08:15

Fero wrote:I use the card, but when launching the effect does nothing. The opponent should sacrifice the permanents by damage, but it doesn't.
Redownload it, I fixed the problem before your post.

Master Necro wrote:Just have a question how do I code the target definition: "Target creature with a +1/+1 counter on it "?
I think that TARGET_DEFINITION and FILTER blocks in DotP2014 can only contain calls to filter (EDIT: at least for defining the filter itself: you can still retrieve other information i.e. other pointers to cards that you want to include/exclude), anything else should be moved to a FILTER_CONDITION block and called through a FE_LUA_CONDITION. This actually makes the code even easier.
Code: Select all
    <TARGET_DEFINITION id="0">
    local filter = ClearFilter()
    filter:Add( FE_TYPE, OP_IS, CARD_TYPE_CREATURE )
    filter:Add( FE_LUA_CONDITION, 1, EffectController(), EffectDC() )
    </TARGET_DEFINITION>
    <FILTER_CONDITION id="1">
    return FilteredCard():CountCounters( MTG():PlusOnePlusOneCounters() ) &gt; 0
    </FILTER_CONDITION>
Last edited by thefiremind on 14 Jul 2013, 09:10, edited 2 times in total.
< Former DotP 2012/2013/2014 modder >
Currently busy with life...
User avatar
thefiremind
Programmer
 
Posts: 3515
Joined: 07 Nov 2011, 10:55
Has thanked: 118 times
Been thanked: 722 times

Re: Formal Request Thread

Postby Master Necro » 14 Jul 2013, 08:32

thefiremind wrote:
Fero wrote:I use the card, but when launching the effect does nothing. The opponent should sacrifice the permanents by damage, but it doesn't.
Redownload it, I fixed the problem before your post.

Master Necro wrote:Just have a question how do I code the target definition: "Target creature with a +1/+1 counter on it "?
I think that TARGET_DEFINITION and FILTER blocks in DotP2014 can only contain calls to filter, anything else should be moved to a FILTER_CONDITION block and called through a FE_LUA_CONDITION. This actually makes the code even easier.
Code: Select all
    <TARGET_DEFINITION id="0">
    local filter = ClearFilter()
    filter:Add( FE_TYPE, OP_IS, CARD_TYPE_CREATURE )
    filter:Add( FE_LUA_CONDITION, 1, EffectController(), EffectDC() )
    </TARGET_DEFINITION>
    <FILTER_CONDITION id="1">
    return FilteredCard():CountCounters( MTG():PlusOnePlusOneCounters() ) &gt; 0
    </FILTER_CONDITION>
Thanks! :)
User avatar
Master Necro
 
Posts: 259
Joined: 24 Apr 2013, 18:25
Has thanked: 83 times
Been thanked: 21 times

PreviousNext

Return to 2014

Who is online

Users browsing this forum: No registered users and 5 guests

Main Menu

User Menu

Our Partners


Who is online

In total there are 5 users online :: 0 registered, 0 hidden and 5 guests (based on users active over the past 10 minutes)
Most users ever online was 9824 on 10 Nov 2025, 04:33

Users browsing this forum: No registered users and 5 guests

Login Form