It is currently 07 Sep 2025, 11:38
   
Text Size

Formal Request Thread

Moderator: CCGHQ Admins

Re: Formal Request Thread

Postby sumomole » 31 Jul 2013, 00:12

RiiakShiNal wrote:Instead of GetTotalMana() wouldn't it be:
Code: Select all
EffectController():PayManaCost("{"..EffectController():GetNumericalChoiceResult().."}{R}{G}")
As I would imagine GetTotalMana() would either return all available mana or would return the total possible mana if it was all untapped. Even then I would likely save off the result from GetNumericalChoiceResult() in case it resets after access using something like:
Code: Select all
local nChosenX = EffectController():GetNumericalChoiceResult()
EffectDC():Int_Set( 1, nChosenX )
That way I can get the value later in the effect without having to worry if some other card started another numeric question or wondering if the result is still valid.
thefiremind wrote:What happens exactly when it doesn't work? I coded Crimson Hellkite with the same trick I used in DotP2013 and from a brief test it seemed to work fine... here it is, maybe it will help you (or maybe you'll discover that it has a problem :lol:): viewtopic.php?f=109&t=11010&p=127033#p127033
I tried your way, the problem is still not resolved.
| Open
Code: Select all
  <ACTIVATED_ABILITY>
    <LOCALISED_TEXT LanguageCode="en-US"><![CDATA[{X}{R}{G}, {T}: Target creature gets +X/+0 and gains trample until end of turn.]]></LOCALISED_TEXT>
    <AVAILABILITY>
    return EffectController():CanPayManaCost("{R}{G}")
    </AVAILABILITY>
    <COST type="TapSelf" />
    <TARGET tag="CARD_QUERY_CHOOSE_CREATURE_TO_GET_X_0" definition="0" compartment="0" count="1" />
    <TARGET_DEFINITION id="0">
    local filter = ClearFilter()
    filter:Add( FE_TYPE, OP_IS, CARD_TYPE_CREATURE )
    </TARGET_DEFINITION>
    <PLAY_TIME_ACTION>
    local player = EffectController()
    local max_mana = 0
    local max_mana_string = "{1}{R}{G}"
    while player:CanPayManaCost(max_mana_string) do
       max_mana = max_mana + 1
       max_mana_string = "{1}"..max_mana_string
    end
    player:BeginNewNumericalChoice()
    player:AddNumericalChoiceAnswer(max_mana)
    player:AskNumericalChoiceQuestion("NUM_LANDS")
    </PLAY_TIME_ACTION>
    <PLAY_TIME_ACTION>
    EffectDC():Set_Int( 1, EffectController():GetNumericalChoiceResult() )
    </PLAY_TIME_ACTION>
    <PLAY_TIME_ACTION>
    local player = EffectController()
    local damage = EffectDC():Get_Int(1)
    local mana_string = ""
    for i=1,damage do
       mana_string = "{1}"..mana_string
    end
    if player:CanPayManaCost(mana_string) then
       player:PayManaCost(mana_string)
    end
    </PLAY_TIME_ACTION>   
    <CONTINUOUS_ACTION layer="7C">
    local target = EffectDC():Get_Targets(0):Get_CardPtr(0)
    if target ~= nil then
       local characteristics = target:GetCurrentCharacteristics()
       characteristics:Power_Add( EffectDC():Get_Int(1) )
       characteristics:Toughness_Add( 0 )
    end
    </CONTINUOUS_ACTION>
    <CONTINUOUS_ACTION layer="6">
    local target = EffectDC():Get_Targets(0):Get_CardPtr(0)
    if target ~= nil then
       local characteristics = target:GetCurrentCharacteristics()
       characteristics:Bool_Set( CHARACTERISTIC_TRAMPLE, 1 )
    end
    </CONTINUOUS_ACTION>
    <DURATION simple_duration="UntilEOT" />
    <AI_AVAILABILITY window_step="declare_blockers" type="window" />
    <AI_SIMPLIFIED_TARGETING compartment="0" hint="HINT_ALLIED_ONLY" />
    <AUTO_SKIP always="1" />
  </ACTIVATED_ABILITY>
And, I know EffectDC():Int_Set( 1, result) and the buff effect is work fine, now, the problem is EffectController():PayManaCost("{"..EffectController():GetNumericalChoiceResult().."}{R}{G}") not always work fine, sometime it considered Kessig Wolf Run for a mana source even if Kessig Wolf Run has been tapped.
EDIT: When the tapped Kessig Wolf Run be considered a mana source(highlight), tap other lands will be wrong, sometime it didn't tap any other lands, sometime it less tapped a lands or more.
User avatar
sumomole
Programmer
 
Posts: 611
Joined: 07 Jun 2011, 08:34
Has thanked: 51 times
Been thanked: 234 times

Re: Formal Request Thread

Postby RiiakShiNal » 31 Jul 2013, 00:26

sumomole wrote:I tried your way, the problem is still not resolved.
| Open
Code: Select all
  <ACTIVATED_ABILITY>
    <LOCALISED_TEXT LanguageCode="en-US"><![CDATA[{X}{R}{G}, {T}: Target creature gets +X/+0 and gains trample until end of turn.]]></LOCALISED_TEXT>
    <AVAILABILITY>
    return EffectController():CanPayManaCost("{R}{G}")
    </AVAILABILITY>
    <COST type="TapSelf" />
    <TARGET tag="CARD_QUERY_CHOOSE_CREATURE_TO_GET_X_0" definition="0" compartment="0" count="1" />
    <TARGET_DEFINITION id="0">
    local filter = ClearFilter()
    filter:Add( FE_TYPE, OP_IS, CARD_TYPE_CREATURE )
    </TARGET_DEFINITION>
    <PLAY_TIME_ACTION>
    local player = EffectController()
    local max_mana = 0
    local max_mana_string = "{1}{R}{G}"
    while player:CanPayManaCost(max_mana_string) do
       max_mana = max_mana + 1
       max_mana_string = "{1}"..max_mana_string
    end
    player:BeginNewNumericalChoice()
    player:AddNumericalChoiceAnswer(max_mana)
    player:AskNumericalChoiceQuestion("NUM_LANDS")
    </PLAY_TIME_ACTION>
    <PLAY_TIME_ACTION>
    EffectDC():Set_Int( 1, EffectController():GetNumericalChoiceResult() )
    </PLAY_TIME_ACTION>
    <PLAY_TIME_ACTION>
    local player = EffectController()
    local damage = EffectDC():Get_Int(1)
    local mana_string = ""
    for i=1,damage do
       mana_string = "{1}"..mana_string
    end
    if player:CanPayManaCost(mana_string) then
       player:PayManaCost(mana_string)
    end
    </PLAY_TIME_ACTION>   
    <CONTINUOUS_ACTION layer="7C">
    local target = EffectDC():Get_Targets(0):Get_CardPtr(0)
    if target ~= nil then
       local characteristics = target:GetCurrentCharacteristics()
       characteristics:Power_Add( EffectDC():Get_Int(1) )
       characteristics:Toughness_Add( 0 )
    end
    </CONTINUOUS_ACTION>
    <CONTINUOUS_ACTION layer="6">
    local target = EffectDC():Get_Targets(0):Get_CardPtr(0)
    if target ~= nil then
       local characteristics = target:GetCurrentCharacteristics()
       characteristics:Bool_Set( CHARACTERISTIC_TRAMPLE, 1 )
    end
    </CONTINUOUS_ACTION>
    <DURATION simple_duration="UntilEOT" />
    <AI_AVAILABILITY window_step="declare_blockers" type="window" />
    <AI_SIMPLIFIED_TARGETING compartment="0" hint="HINT_ALLIED_ONLY" />
    <AUTO_SKIP always="1" />
  </ACTIVATED_ABILITY>
And, I know EffectDC():Int_Set( 1, result) and the buff effect is work fine, now, the problem is EffectController():PayManaCost("{"..EffectController():GetNumericalChoiceResult().."}{R}{G}") not always work fine, sometime it considered Kessig Wolf Run for a mana source even if Kessig Wolf Run has been tapped.
I see at least one problem here:
Code: Select all
    <PLAY_TIME_ACTION>
    local player = EffectController()
    local max_mana = 0
    local max_mana_string = "{1}{R}{G}"
    while player:CanPayManaCost(max_mana_string) do
       max_mana = max_mana + 1
       max_mana_string = "{1}"..max_mana_string
    end
    player:BeginNewNumericalChoice()
    player:AddNumericalChoiceAnswer(max_mana)
    player:AskNumericalChoiceQuestion("NUM_LANDS")
    </PLAY_TIME_ACTION>
You aren't considering that you went over the max amount they can pay by {1}. Say a player has Kessig Wolf Run, 2 Forest and 2 Mountain, your code will say that the max they can afford for {X} is 3 because the Kessig Wolf Run isn't tapped yet (which you have accounted for), but it will then go through the loop until max_mana = 3 and max_mana_string = "{1}{1}{1}{1}{R}{G}" which will be outside what can be paid (even counting the Kessig Wolf Run). After the loop, but before you setup the Numeric question you need to reduce max_mana by 1 (standard off-by-one error).

So it should be:
Code: Select all
    <PLAY_TIME_ACTION>
    local player = EffectController()
    local max_mana = 0
    local max_mana_string = "{1}{R}{G}"
    while player:CanPayManaCost(max_mana_string) do
       max_mana = max_mana + 1
       max_mana_string = "{1}"..max_mana_string
    end
    -- Adjust to true max
    max_mana = max_mana - 1
    player:BeginNewNumericalChoice()
    player:AddNumericalChoiceAnswer(max_mana)
    player:AskNumericalChoiceQuestion("NUM_LANDS")
    </PLAY_TIME_ACTION>
The highlight may still end up wrong, but it should still work.

Edit: Personally, I would code Kessig Wolf Run using my manual mana functions as then this wouldn't be an issue.
RiiakShiNal
Programmer
 
Posts: 2188
Joined: 16 May 2011, 21:37
Has thanked: 75 times
Been thanked: 497 times

Re: Formal Request Thread

Postby sumomole » 31 Jul 2013, 00:45

RiiakShiNal wrote:I see at least one problem here:
You aren't considering that you went over the max amount they can pay by {1}. Say a player has Kessig Wolf Run, 2 Forest and 2 Mountain, your code will say that the max they can afford for {X} is 3 because the Kessig Wolf Run isn't tapped yet (which you have accounted for), but it will then go through the loop until max_mana = 3 and max_mana_string = "{1}{1}{1}{1}{R}{G}" which will be outside what can be paid (even counting the Kessig Wolf Run). After the loop, but before you setup the Numeric question you need to reduce max_mana by 1 (standard off-by-one error).
The highlight may still end up wrong, but it should still work.
You are right, I miss something, now it seems work fine, thank you, thefiremind, and Xander9009. :D

EDIT:
RiiakShiNal wrote:Edit: Personally, I would code Kessig Wolf Run using my manual mana functions as then this wouldn't be an issue.
Yes, I use your manual mana functions in a lot of cards, but if I can I still want to avoid it, for the players click each time is too much trouble. :lol:

Some other interesting things, when I code Restore Balance, if I use
Code: Select all
  <TRIGGERED_ABILITY replacement_effect="1" active_zone="ZONE_ANY">
    <TRIGGER value="CONSIDERED_FOR_CAST" simple_qualifier="self" pre_trigger="1" />
    <RESOLUTION_TIME_ACTION>
    if TriggerObject() ~= nil then
       TriggerObject():IncreaseCost( 25 )
    end
    </RESOLUTION_TIME_ACTION>
  </TRIGGERED_ABILITY>
and
Code: Select all
    <AVAILABILITY>
    return (Object():GetCurrentCharacteristics():Bool_Get( CHARACTERISTIC_FLASH ) or EffectController():IsSorceryTime()) and Object():CanBePlayed( EffectController() )
    </AVAILABILITY>
, I can't play its suspend ability even if I can pay {W}, when I remove Object():CanBePlayed( EffectController() ), suspend ability can be paly, EffectController():CastSpellForFree(Object()) is the same, but when I change the considered for cast ability to this:
Code: Select all
  <TRIGGERED_ABILITY replacement_effect="1" active_zone="ZONE_ANY">
    <TRIGGER value="CONSIDERED_FOR_CAST" simple_qualifier="self" pre_trigger="1" />
  </TRIGGERED_ABILITY>
, the card still can't be paly ,but the suspend ability with Object():CanBePlayed( EffectController() ) can be play, I don't know why.

When I code Gilded Lotus, I use
Code: Select all
  <MANA_ABILITY resource_id="1">
    <PRODUCES amount="{W}{W}{W}" />
  </MANA_ABILITY>
, it is always preferred to be tapped no matter what color be chosen, even if I have other colors land, but when I use
Code: Select all
  <MANA_ABILITY resource_id="1">
    <PRODUCES amount="{W}" />
    <PRODUCES amount="{W}" />
    <PRODUCES amount="{W}" />
  </MANA_ABILITY>
I can keep it untapped and use other colors land. :lol:
Last edited by sumomole on 31 Jul 2013, 01:52, edited 1 time in total.
User avatar
sumomole
Programmer
 
Posts: 611
Joined: 07 Jun 2011, 08:34
Has thanked: 51 times
Been thanked: 234 times

Re: Formal Request Thread

Postby gorem2k » 31 Jul 2013, 01:48

About Kessig Wolf Run,

Would this work too?

code | Open
Code: Select all
  <ACTIVATED_ABILITY>
    <LOCALISED_TEXT LanguageCode="en-US"><![CDATA[{X}{R}{G}, {T}: Target creature gets +X/+0 and gains trample until end of turn.]]></LOCALISED_TEXT>
    <AVAILABILITY>
    return EffectController():CanPayManaCost("{1}{R}{G}")
    </AVAILABILITY>
    <COST mana_cost="{X}{1}{R}{G}" type="Mana" />
    <TARGET tag="CARD_QUERY_CHOOSE_CREATURE_TO_GET_X_0" 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 then
       EffectController():PayManaCost("{R}{G}")
    end
    </RESOLUTION_TIME_ACTION>
    <CONTINUOUS_ACTION layer="7C">
    local target = EffectDC():Get_Targets(0):Get_CardPtr(0)
    if target ~= nil then
       local characteristics = target:GetCurrentCharacteristics()
       characteristics:Power_Add( GetEffectX() )
    end
    </CONTINUOUS_ACTION>
    <CONTINUOUS_ACTION layer="6">
    local target = EffectDC():Get_Targets(0):Get_CardPtr(0)
    if target ~= nil then
       local characteristics = target:GetCurrentCharacteristics()
       characteristics:Bool_Set( CHARACTERISTIC_TRAMPLE, 1 )
    end
    </CONTINUOUS_ACTION>
    <DURATION simple_duration="UntilEOT" />
    <AI_AVAILABILITY window_step="declare_blockers" type="window" />
    <AI_SIMPLIFIED_TARGETING compartment="0" hint="HINT_ALLIED_ONLY" />
    <AUTO_SKIP always="1" />
  </ACTIVATED_ABILITY>
EDIT:oops, changed mana values!!
gorem2k
 
Posts: 464
Joined: 01 Apr 2013, 04:21
Has thanked: 48 times
Been thanked: 33 times

Re: Formal Request Thread

Postby Rari » 31 Jul 2013, 02:07

I know someone requested Spell Rupture earlier. Still can't get this to work right though, so help would be appreciated. Is using a variable for the cost, such as in PayResourceCost(amount) not allowed? I'm hoping its not that, and just some silly noob mistake on my part.
Spell Rupture | Open
<SPELL_ABILITY>
<LOCALISED_TEXT LanguageCode="en-US"><![CDATA[Counter target spell unless its controller pays {X}, where X is the greatest power among creatures you control.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="fr-FR"><![CDATA[Contrecarrez le sort ciblé à moins que son contrôleur ne paie {X}, X étant la force la plus élevée parmi les créatures que vous contrôlez.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="es-ES"><![CDATA[Contrarresta el hechizo objetivo a menos que su controlador pague {X}, donde X es igual a la mayor fuerza entre las criaturas que controlas.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="de-DE"><![CDATA[Neutralisiere einen Zauberspruch deiner Wahl, falls sein Beherrscher nicht {X} zahlt, wobei X die höchste Stärke unter den Kreaturen ist, die du kontrollierst.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="it-IT"><![CDATA[Neutralizza una magia bersaglio a meno che il suo controllore non paghi {X}, dove X è la forza maggiore tra le creature che controlli.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="jp-JA"><![CDATA[呪文1つを対象とする。それのコントローラーが{X}を支払わないかぎり、それを打ち消す。Xはあなたがコントロールするクリーチャーの中のパワーの最大値に等しい。]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="ko-KR"><![CDATA[주문 한 개를 목표로 정한다. 그 주문의 조종자가 {X}를 지불하지 않으면 그 주문을 무효화한다. X는 당신이 조종하는 생물 중 공격력이 가장 높은 생물의 공격력과 같다.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="ru-RU"><![CDATA[Отмените целевое заклинание, если только контролирующий его игрок не заплатит {X}, где X — наибольшее значение силы среди существ под вашим контролем.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="pt-BR"><![CDATA[Anule a mágica alvo a menos que seu controlador pague {X}, sendo X o maior poder entre as criaturas que você controla.]]></LOCALISED_TEXT>
<TARGET tag="CARD_QUERY_CHOOSE_SPELL_TO_COUNTER" definition="0" compartment="0" count="1" />
<TARGET_DEFINITION id="0">
local filter = ClearFilter()
filter:SetZone(ZONE_STACK)
</TARGET_DEFINITION>
<RESOLUTION_TIME_ACTION>
local filter = ClearFilter()
filter:Add( FE_TYPE, OP_IS, CARD_TYPE_CREATURE )
filter:Add( FE_CONTROLLER, OP_IS, EffectController() )
local number = filter:EvaluateObjects()
local power = 0
for i = 0, (number-1) do
local card = filter:GetNthEvaluatedObject(i)
if card ~= nil then
local temp = card:GetCurrentCharacteristics():Power_Get()
if temp &gt; power then
power = temp
EffectDC():Set_Int(0, power)
end
end
end
</RESOLUTION_TIME_ACTION>
<RESOLUTION_TIME_ACTION>
local target = EffectDC():Get_Targets(0):Get_CardPtr(0)
if FilteredCard() ~= nil and target ~= nil then
local amount = EffectDC():Get_Int(0)
local player = target:GetPlayer()
if player ~= nil and player:CanPayResourceCost(amount) then
player:BeginNewMultipleChoice()
player:AddMultipleChoiceAnswer( "CARD_QUERY_OPTION_PAY_1", player:CanPayResourceCost(amount) )
player:AddMultipleChoiceAnswer("CARD_QUERY_OPTION_IS_COUNTERED")
player:AskMultipleChoiceQuestion("CARD_QUERY_MC_MANA_TITHE", target)
end
end
</RESOLUTION_TIME_ACTION>
<RESOLUTION_TIME_ACTION>
local target = EffectDC():Get_Targets(0):Get_CardPtr(0)
if target ~= nil then
local player = target:GetPlayer()
if player ~= nil and player:CanPayResourceCost(1) and player:GetMultipleChoiceResult() == 0 then
player:PayResourceCost(amount)
else
target:CounterSpell()
end
end
</RESOLUTION_TIME_ACTION>
<AI_SIMPLIFIED_TARGETING compartment="0" hint="HINT_ENEMY_ONLY" />
</SPELL_ABILITY>
<AI_BASE_SCORE score="750" zone="ZONE_HAND" />
</CARD_V2>


Had to remove the top of the card to get past the new user spam bot. #-o
Please help yourself to my collection of DoTP artwork. Pretty cards for everyone!
User avatar
Rari
 
Posts: 47
Joined: 14 Jul 2013, 05:59
Has thanked: 16 times
Been thanked: 4 times

Re: Formal Request Thread

Postby RiiakShiNal » 31 Jul 2013, 02:11

gorem2k wrote:About Kessig Wolf Run,

Would this work too?

...

EDIT:oops, changed mana values!!
You are paying an extra {R} {G} at resolution time and an extra {1} in the cost which is wrong. According to sumomole that produces the wrong result because it would still count the Kessig Wolf Run when asking how much to tap for {X}. Though if you correct the cost and remove the extra pay at resolution it should work with manual mana tapping, but not auto-tapping mana.

Edit:
Rari wrote:I know someone requested Spell Rupture earlier. Still can't get this to work right though, so help would be appreciated. Is using a variable for the cost, such as in PayResourceCost(amount) not allowed? I'm hoping its not that, and just some silly noob mistake on my part.
Spell Rupture | Open
Code: Select all
<SPELL_ABILITY>
    <LOCALISED_TEXT LanguageCode="en-US"><![CDATA[Counter target spell unless its controller pays {X}, where X is the greatest power among creatures you control.]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="fr-FR"><![CDATA[Contrecarrez le sort ciblé à moins que son contrôleur ne paie {X}, X étant la force la plus élevée parmi les créatures que vous contrôlez.]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="es-ES"><![CDATA[Contrarresta el hechizo objetivo a menos que su controlador pague {X}, donde X es igual a la mayor fuerza entre las criaturas que controlas.]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="de-DE"><![CDATA[Neutralisiere einen Zauberspruch deiner Wahl, falls sein Beherrscher nicht {X} zahlt, wobei X die höchste Stärke unter den Kreaturen ist, die du kontrollierst.]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="it-IT"><![CDATA[Neutralizza una magia bersaglio a meno che il suo controllore non paghi {X}, dove X è la forza maggiore tra le creature che controlli.]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="jp-JA"><![CDATA[呪文1つを対象とする。それのコントローラーが{X}を支払わないかぎり、それを打ち消す。Xはあなたがコントロールするクリーチャーの中のパワーの最大値に等しい。]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="ko-KR"><![CDATA[주문 한 개를 목표로 정한다. 그 주문의 조종자가 {X}를 지불하지 않으면 그 주문을 무효화한다. X는 당신이 조종하는 생물 중 공격력이 가장 높은 생물의 공격력과 같다.]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="ru-RU"><![CDATA[Отмените целевое заклинание, если только контролирующий его игрок не заплатит {X}, где X — наибольшее значение силы среди существ под вашим контролем.]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="pt-BR"><![CDATA[Anule a mágica alvo a menos que seu controlador pague {X}, sendo X o maior poder entre as criaturas que você controla.]]></LOCALISED_TEXT>
    <TARGET tag="CARD_QUERY_CHOOSE_SPELL_TO_COUNTER" definition="0" compartment="0" count="1" />
    <TARGET_DEFINITION id="0">
    local filter = ClearFilter()
    filter:SetZone(ZONE_STACK)
    </TARGET_DEFINITION>
    <RESOLUTION_TIME_ACTION>
    local filter = ClearFilter()
    filter:Add( FE_TYPE, OP_IS, CARD_TYPE_CREATURE  )
    filter:Add( FE_CONTROLLER, OP_IS, EffectController() )
    local number = filter:EvaluateObjects()
    local power = 0
    for i = 0, (number-1) do
       local card = filter:GetNthEvaluatedObject(i)
       if card ~= nil then
          local temp = card:GetCurrentCharacteristics():Power_Get()
          if temp &gt; power then
             power = temp
             EffectDC():Set_Int(0, power)
          end
       end
    end
    </RESOLUTION_TIME_ACTION>
    <RESOLUTION_TIME_ACTION>
    local target = EffectDC():Get_Targets(0):Get_CardPtr(0)
    if FilteredCard() ~= nil and target ~= nil then
       local amount = EffectDC():Get_Int(0)
      local player = target:GetPlayer()
       if player ~= nil and player:CanPayResourceCost(amount) then
          player:BeginNewMultipleChoice()
          player:AddMultipleChoiceAnswer( "CARD_QUERY_OPTION_PAY_1", player:CanPayResourceCost(amount) )
          player:AddMultipleChoiceAnswer("CARD_QUERY_OPTION_IS_COUNTERED")
          player:AskMultipleChoiceQuestion("CARD_QUERY_MC_MANA_TITHE", target)
       end
    end
    </RESOLUTION_TIME_ACTION>
    <RESOLUTION_TIME_ACTION>
    local target = EffectDC():Get_Targets(0):Get_CardPtr(0)
    if target ~= nil then
       local player = target:GetPlayer()
       if player ~= nil and player:CanPayResourceCost(1) and player:GetMultipleChoiceResult() == 0 then
          player:PayResourceCost(amount)
       else
          target:CounterSpell()
       end
    end
    </RESOLUTION_TIME_ACTION>
    <AI_SIMPLIFIED_TARGETING compartment="0" hint="HINT_ENEMY_ONLY" />
  </SPELL_ABILITY>
  <AI_BASE_SCORE score="750" zone="ZONE_HAND" />
</CARD_V2>
Had to remove the top of the card to get past the new user spam bot. #-o
Several problems here:
  • For your target you are using compartment="0" then in RESOLUTION_TIME_ACTION #1 you reset compartment 0 to be the greatest creature power.
  • The line where you set the creature power to the EffectDC() should be after the loop so you only set it once rather than multiple times (though this really shouldn't matter).
  • You need to set the creature power to a different compartment other than 0 (1 would work).
  • In RESOLUTION_TIME_ACTION #2, what is FilteredCard() here, you aren't using a filter so it will always be nil.
  • amount needs to be retrieved from the new compartment you used for creature power (like 1 which I suggested).
  • In RESOLUTION_TIME_ACTION #3, you have player:CanPayResourceCost(1), but previously you were using amount.
  • you have player:PayResourceCost(amount), but you haven't defined amount in this action yet.

Also I'm not seeing any of the utility abilities for the resource costs, it would probably be easier to use CanPayManaCost and PayManaCost in this case so you don't have to write a huge number of utility abilities for the resource costs (I've seen creatures get up to 9,999 power, which would equivalate to 1000 utility abilities because your greatest power creature could end up being anywhere from 0 to 9999 power).
RiiakShiNal
Programmer
 
Posts: 2188
Joined: 16 May 2011, 21:37
Has thanked: 75 times
Been thanked: 497 times

Re: Formal Request Thread

Postby Rari » 31 Jul 2013, 11:18

Thank you, RiiakShiNal. Rupture tested and working! (warning for any other users wanting to snag this, i'm still getting new user restrictions, so the top half of the card isn't included.) I concatenated the "amount" variable inside of {} in (Can)PayManaCost - I'm not sure if there was a better way of handling that?

Code: Select all
<SPELL_ABILITY>
    <LOCALISED_TEXT LanguageCode="en-US"><![CDATA[Counter target spell unless its controller pays {X}, where X is the greatest power among creatures you control.]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="fr-FR"><![CDATA[Contrecarrez le sort ciblé à moins que son contrôleur ne paie {X}, X étant la force la plus élevée parmi les créatures que vous contrôlez.]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="es-ES"><![CDATA[Contrarresta el hechizo objetivo a menos que su controlador pague {X}, donde X es igual a la mayor fuerza entre las criaturas que controlas.]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="de-DE"><![CDATA[Neutralisiere einen Zauberspruch deiner Wahl, falls sein Beherrscher nicht {X} zahlt, wobei X die höchste Stärke unter den Kreaturen ist, die du kontrollierst.]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="it-IT"><![CDATA[Neutralizza una magia bersaglio a meno che il suo controllore non paghi {X}, dove X è la forza maggiore tra le creature che controlli.]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="jp-JA"><![CDATA[呪文1つを対象とする。それのコントローラーが{X}を支払わないかぎり、それを打ち消す。Xはあなたがコントロールするクリーチャーの中のパワーの最大値に等しい。]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="ko-KR"><![CDATA[주문 한 개를 목표로 정한다. 그 주문의 조종자가 {X}를 지불하지 않으면 그 주문을 무효화한다. X는 당신이 조종하는 생물 중 공격력이 가장 높은 생물의 공격력과 같다.]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="ru-RU"><![CDATA[Отмените целевое заклинание, если только контролирующий его игрок не заплатит {X}, где X — наибольшее значение силы среди существ под вашим контролем.]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="pt-BR"><![CDATA[Anule a mágica alvo a menos que seu controlador pague {X}, sendo X o maior poder entre as criaturas que você controla.]]></LOCALISED_TEXT>
    <TARGET tag="CARD_QUERY_CHOOSE_SPELL_TO_COUNTER" definition="0" compartment="0" count="1" />
    <TARGET_DEFINITION id="0">
    local filter = ClearFilter()
    filter:SetZone(ZONE_STACK)
    </TARGET_DEFINITION>
    <RESOLUTION_TIME_ACTION>
    local filter = ClearFilter()
    filter:Add( FE_TYPE, OP_IS, CARD_TYPE_CREATURE  )
    filter:Add( FE_CONTROLLER, OP_IS, EffectController() )
    local number = filter:EvaluateObjects()
    local power = 0
    for i = 0, (number-1) do
       local card = filter:GetNthEvaluatedObject(i)
       if card ~= nil then
          local temp = card:GetCurrentCharacteristics():Power_Get()
          if temp &gt; power then
             power = temp
            EffectDC():Set_Int(1, power)
          end
       end
    end
    </RESOLUTION_TIME_ACTION>
    <RESOLUTION_TIME_ACTION>
    local target = EffectDC():Get_Targets(0):Get_CardPtr(0)
   local amount = EffectDC():Get_Int(1)
    if target ~= nil then
      local player = target:GetPlayer()
       if player ~= nil and player:CanPayManaCost( "{"..amount.."}" ) then
          player:BeginNewMultipleChoice()
          player:AddMultipleChoiceAnswer( "CARD_QUERY_OPTION_PAY_1", player:CanPayManaCost( "{"..amount.."}" ) )
          player:AddMultipleChoiceAnswer("CARD_QUERY_OPTION_IS_COUNTERED")
          player:AskMultipleChoiceQuestion("CARD_QUERY_MC_MANA_TITHE", target)
       end
    end
    </RESOLUTION_TIME_ACTION>
    <RESOLUTION_TIME_ACTION>
    local target = EffectDC():Get_Targets(0):Get_CardPtr(0)
   local amount = EffectDC():Get_Int(1)
    if target ~= nil then
       local player = target:GetPlayer()
       if player ~= nil and player:CanPayManaCost( "{"..amount.."}" ) and player:GetMultipleChoiceResult() == 0 then
          player:PayManaCost( "{"..amount.."}" )
       else
          target:CounterSpell()
       end
    end
    </RESOLUTION_TIME_ACTION>
    <AI_SIMPLIFIED_TARGETING compartment="0" hint="HINT_ENEMY_ONLY" />
  </SPELL_ABILITY>
  <AI_BASE_SCORE score="750" zone="ZONE_HAND" />
</CARD_V2>
Please help yourself to my collection of DoTP artwork. Pretty cards for everyone!
User avatar
Rari
 
Posts: 47
Joined: 14 Jul 2013, 05:59
Has thanked: 16 times
Been thanked: 4 times

Re: Formal Request Thread

Postby RiiakShiNal » 31 Jul 2013, 12:41

You may want to test it with some high creature powers because I'm not sure how high the game will recognize a single colourless mana symbol (we know it will handle up to at least "{16}", but it may or may not properly handle any higher. I would probably run at least 3 tests with higher powers (one with power 17, one with 100, and one with 9999). If a test fails (though hopefully it won't) then you could always use a string of known working symbols (concatenated via loop).
RiiakShiNal
Programmer
 
Posts: 2188
Joined: 16 May 2011, 21:37
Has thanked: 75 times
Been thanked: 497 times

Re: Formal Request Thread

Postby MC Brodie » 31 Jul 2013, 12:42

Sorry to keep taking this thread off topic but what does definition, compartment and count do in the target tag? From what it looks like these parameters are optional depending on the complexity of the card. I'm guessing count defines how many targets need to be identified and definition refers to the id in the target definition tag?
-----------------------------------------------------------------------
Song of the Day: 46 and 2 (cover)
MC Brodie
 
Posts: 310
Joined: 01 Jun 2013, 00:10
Has thanked: 44 times
Been thanked: 34 times

Re: Formal Request Thread

Postby Master Necro » 31 Jul 2013, 12:50

I have a very strange problem... I have made Chromatic Sphere but it refuses to appear in my deck I have no idea why.

Here is the card:

Code: Select all
<?xml version='1.0'?>
<CARD_V2>
   <FILENAME text="CHROMATIC_SPHERE_1746046" />
   <CARDNAME text="CHROMATIC_SPHERE" />
   <TITLE>
      <LOCALISED_TEXT LanguageCode="en-US"><![CDATA[Chromatic Sphere]]></LOCALISED_TEXT>
      <LOCALISED_TEXT LanguageCode="fr-FR"><![CDATA[Chromatic Sphere]]></LOCALISED_TEXT>
      <LOCALISED_TEXT LanguageCode="es-ES"><![CDATA[Chromatic Sphere]]></LOCALISED_TEXT>
      <LOCALISED_TEXT LanguageCode="de-DE"><![CDATA[Chromatic Sphere]]></LOCALISED_TEXT>
      <LOCALISED_TEXT LanguageCode="it-IT"><![CDATA[Chromatic Sphere]]></LOCALISED_TEXT>
      <LOCALISED_TEXT LanguageCode="jp-JA"><![CDATA[Chromatic Sphere]]></LOCALISED_TEXT>
      <LOCALISED_TEXT LanguageCode="ko-KR"><![CDATA[Chromatic Sphere]]></LOCALISED_TEXT>
      <LOCALISED_TEXT LanguageCode="ru-RU"><![CDATA[Chromatic Sphere]]></LOCALISED_TEXT>
      <LOCALISED_TEXT LanguageCode="pt-BR"><![CDATA[Chromatic Sphere]]></LOCALISED_TEXT>
   </TITLE>
   <MULTIVERSEID value="1746046" />
   <ARTID value="A46046" />
   <ARTIST name="Brian Snoddy" />
   <CASTING_COST cost="{1}" />
   <FLAVOURTEXT>
    <LOCALISED_TEXT LanguageCode="en-US"><![CDATA[“As expected, this sphere's design reflects the colors of the four moons . . . plus another?”
   —Pontifex, elder researcher]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="fr-FR"><![CDATA[“As expected, this sphere's design reflects the colors of the four moons . . . plus another?”
   —Pontifex, elder researcher]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="es-ES"><![CDATA[“As expected, this sphere's design reflects the colors of the four moons . . . plus another?”
   —Pontifex, elder researcher]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="de-DE"><![CDATA[“As expected, this sphere's design reflects the colors of the four moons . . . plus another?”
   —Pontifex, elder researcher]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="it-IT"><![CDATA[“As expected, this sphere's design reflects the colors of the four moons . . . plus another?”
   —Pontifex, elder researcher]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="jp-JA"><![CDATA[“As expected, this sphere's design reflects the colors of the four moons . . . plus another?”
   —Pontifex, elder researcher]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="ko-KR"><![CDATA[“As expected, this sphere's design reflects the colors of the four moons . . . plus another?”
   —Pontifex, elder researcher]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="ru-RU"><![CDATA[“As expected, this sphere's design reflects the colors of the four moons . . . plus another?”
   —Pontifex, elder researcher]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="pt-BR"><![CDATA[“As expected, this sphere's design reflects the colors of the four moons . . . plus another?”
   —Pontifex, elder researcher]]></LOCALISED_TEXT>
  </FLAVOURTEXT>
   <TYPE metaname="Artifact" />
   <EXPANSION value="ODY" />
   <RARITY metaname="C" />
   <ACTIVATED_ABILITY forced_skip="1">
      <LOCALISED_TEXT LanguageCode="en-US"><![CDATA[{T}, Sacrifice Chromatic Sphere: Add one mana of any color to your mana pool.]]></LOCALISED_TEXT>
      <LOCALISED_TEXT LanguageCode="fr-FR"><![CDATA[{T}, Sacrifice Chromatic Sphere: Add one mana of any color to your mana pool.]]></LOCALISED_TEXT>
      <LOCALISED_TEXT LanguageCode="es-ES"><![CDATA[{T}, Sacrifice Chromatic Sphere: Add one mana of any color to your mana pool.]]></LOCALISED_TEXT>
      <LOCALISED_TEXT LanguageCode="de-DE"><![CDATA[{T}, Sacrifice Chromatic Sphere: Add one mana of any color to your mana pool.]]></LOCALISED_TEXT>
      <LOCALISED_TEXT LanguageCode="it-IT"><![CDATA[{T}, Sacrifice Chromatic Sphere: Add one mana of any color to your mana pool.]]></LOCALISED_TEXT>
      <LOCALISED_TEXT LanguageCode="jp-JA"><![CDATA[{T}, Sacrifice Chromatic Sphere: Add one mana of any color to your mana pool.]]></LOCALISED_TEXT>
      <LOCALISED_TEXT LanguageCode="ko-KR"><![CDATA[{T}, Sacrifice Chromatic Sphere: Add one mana of any color to your mana pool.]]></LOCALISED_TEXT>
      <LOCALISED_TEXT LanguageCode="ru-RU"><![CDATA[{T}, Sacrifice Chromatic Sphere: Add one mana of any color to your mana pool.]]></LOCALISED_TEXT>
      <LOCALISED_TEXT LanguageCode="pt-BR"><![CDATA[{T}, Sacrifice Chromatic Sphere: Add one mana of any color to your mana pool.]]></LOCALISED_TEXT>
      <COST type="TapSelf" />
      <COST type="SacrificeSelf" />
      <PLAY_TIME_ACTION>
         RSN_MarkManaAbilityStart()
         local oPlayer = EffectController()
         local oCard = EffectSourceLKI()
         if (oPlayer ~= nil) then
            oPlayer:BeginNewMultipleChoice()
            oPlayer:AddMultipleChoiceAnswer( "RSN_MODE_PRODUCE_W" )
            oPlayer:AddMultipleChoiceAnswer( "RSN_MODE_PRODUCE_U" )
            oPlayer:AddMultipleChoiceAnswer( "RSN_MODE_PRODUCE_B" )
            oPlayer:AddMultipleChoiceAnswer( "RSN_MODE_PRODUCE_R" )
            oPlayer:AddMultipleChoiceAnswer( "RSN_MODE_PRODUCE_G" )
            oPlayer:AskMultipleChoiceQuestion( "MODE_CHOOSE_ONE", oCard )
         end
      </PLAY_TIME_ACTION>
      <RESOLUTION_TIME_ACTION>
         local nColour = EffectController():GetMultipleChoiceResult() + 1
         if (nColour == COLOUR_BLACK) then
            RSN_Produce( "{B}", 1 )
         elseif (nColour == COLOUR_BLUE) then
            RSN_Produce( "{U}", 1 )
         elseif (nColour == COLOUR_GREEN) then
            RSN_Produce( "{G}", 1 )
         elseif (nColour == COLOUR_RED) then
            RSN_Produce( "{R}", 1 )
         elseif (nColour == COLOUR_WHITE) then
            RSN_Produce( "{W}", 1 )
         end
      </RESOLUTION_TIME_ACTION>
      <RESOLUTION_TIME_ACTION>
         RSN_EliminateExtraManaTokens()
         RSN_MarkManaAbilityEnd()
      </RESOLUTION_TIME_ACTION>
      <AI_AVAILABILITY window_step="upkeep" type="window" />
      <AI_AVAILABILITY window_step="main_1" window_turn="my_turn" type="window" />
      <AI_AVAILABILITY window_step="begin_combat" window_turn="their_turn" type="window" />
      <AI_AVAILABILITY window_step="declare_attackers" window_turn="their_turn" type="window" />
      <AI_AVAILABILITY window_step="declare_blockers" type="window" />
      <AI_AVAILABILITY window_step="main_2" window_turn="my_turn" type="window" />
      <AI_AVAILABILITY window_step="end_of_turn" type="window" />
      <AI_AVAILABILITY window_step="end_of_turn" window_turn="their_turn" type="window" />
      <AI_AVAILABILITY type="in_response" response_source="1" response_target="1" />
      <AI_AVAILABILITY type="in_response" response_source="1" />
      <AI_AVAILABILITY type="in_response" response_target="1" />
   </ACTIVATED_ABILITY>
   <STATIC_ABILITY>
      <CONTINUOUS_ACTION layer="0">
         RSN_ClearCanProduceMana()
         RSN_MarkCanProduceMana( "{B}{G}{R}{U}{W}" )
      </CONTINUOUS_ACTION>
      <CONTINUOUS_ACTION layer="8">
         local oCard = EffectSource()
         if (oCard ~= nil) then
            local oCharacteristics = oCard:GetCurrentCharacteristics()
            if (((oCharacteristics ~= nil) and (oCharacteristics:Bool_Get( CHARACTERISTIC_CANT_USE_ACTIVATED_ABILITIES ))) or
               (EffectController():GetCurrentCharacteristics():Bool_Get( PLAYER_CHARACTERISTIC_CANT_ACTIVATE_NONMANA_ABILITIES ))) then
               oCharacteristics:GrantAbility( 1 )
            end
         end
      </CONTINUOUS_ACTION>
   </STATIC_ABILITY>
   <TRIGGERED_ABILITY forced_skip="1" replacement_effect="1">
      <TRIGGER value="BEGINNING_OF_STEP" pre_trigger="1" />
      <RESOLUTION_TIME_ACTION>
         RSN_ClearProducedMana()
      </RESOLUTION_TIME_ACTION>
   </TRIGGERED_ABILITY>
   <MANA_ABILITY resource_id="1">
      <COST type="TapSelf" />
      <PRODUCES amount="{W}" />
   </MANA_ABILITY>
   <SPELL_ABILITY>
    <LOCALISED_TEXT LanguageCode="en-US"><![CDATA[Draw a card.]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="fr-FR"><![CDATA[Draw a card.]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="es-ES"><![CDATA[Draw a card.]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="de-DE"><![CDATA[Draw a card.]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="it-IT"><![CDATA[Draw a card.]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="jp-JA"><![CDATA[Draw a card.]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="ko-KR"><![CDATA[Draw a card.]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="ru-RU"><![CDATA[Draw a card.]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="pt-BR"><![CDATA[Draw a card.]]></LOCALISED_TEXT>
    <RESOLUTION_TIME_ACTION>
    EffectController():DrawCards(1)
    </RESOLUTION_TIME_ACTION>
  </SPELL_ABILITY>
  <TOKEN_REGISTRATION reservation="1" type="RSN_TOKEN_MANA_B" />
   <TOKEN_REGISTRATION reservation="1" type="RSN_TOKEN_MANA_G" />
   <TOKEN_REGISTRATION reservation="1" type="RSN_TOKEN_MANA_R" />
   <TOKEN_REGISTRATION reservation="1" type="RSN_TOKEN_MANA_U" />
   <TOKEN_REGISTRATION reservation="1" type="RSN_TOKEN_MANA_W" />
</CARD_V2>
And here is the Deck XML just in case, it is at the bottom:

Code: Select all
<DECK personality="D14_NECROALCHEMIST_TERROR.XML" deck_box_image="D14_NECROALCHEMIST_TERROR" deck_box_image_locked="D14_locked" cheat_menu_filter_deck_type="Standard" tus_save_data_id="17712" ios_id_1="D14_DECK_UNLOCK_89" ios_id_2="D14_DECK_FOIL_89" steam_id_1="213850" steam_id_2="213850" android_id_1="d14_deck_unlock_89" android_id_2="d14_deck_foil_89" cheat_menu_filter_datapool="D14" content_pack="0" always_available="true" uid="17712" is_blue="true" name_tag="D14_NECROALCHEMIST_TERROR" description_tag="D14_NECROALCHEMIST_TERROR">
  <DECKSTATISTICS Size="7" Speed="4" Flex="4" Syn="6" />
  <CARD name="DERANGED_ASSISTANT_17221171" deckOrderId="0" />
  <CARD name="DERANGED_ASSISTANT_17221171" deckOrderId="1" />
  <CARD name="DERANGED_ASSISTANT_17221171" deckOrderId="2" />
  <CARD name="DERANGED_ASSISTANT_17221171" deckOrderId="3" />
  <CARD name="ALCHEMISTS_APPRENTICE_17240031" deckOrderId="4" />
  <CARD name="AMASS_THE_COMPONENTS_17270988" deckOrderId="5" />
  <CARD name="ARMORED_SKAAB_17244685" deckOrderId="6" />
  <CARD name="CIVILIZED_SCHOLAR_17221209" deckOrderId="7" />
  <CARD name="COBBLED_WINGS_17220649" deckOrderId="8" />
  <CARD name="CURIOSITY_17230767" deckOrderId="9" />
  <CARD name="DELVER_OF_SECRETS_17226749" deckOrderId="10" />
  <CARD name="FRIGHTFUL_DELUSION_17220031" deckOrderId="11" />
  <CARD name="FORBIDDEN_ALCHEMY_17226758" deckOrderId="12" />
  <CARD name="GEISTCATCHERS_RIG_17234445" deckOrderId="13" />
  <CARD name="GERALFS_MINDCRUSHER_17262839" deckOrderId="14" />
  <CARD name="HAVENGUL_RUNEBINDER_17249878" deckOrderId="15" />
  <CARD name="HAVENGUL_SKAAB_17240094" deckOrderId="16" />
  <CARD name="HEADLESS_SKAAB_17244761" deckOrderId="17" />
  <CARD name="HYSTERICAL_BLINDNESS_17234433" deckOrderId="18" />
  <CARD name="INVISIBLE_STALKER_17220041" deckOrderId="19" />
  <CARD name="LUDEVICS_TEST_SUBJECT_17221179" deckOrderId="20" />
  <CARD name="MAKESHIFT_MAULER_17222916" deckOrderId="21" />
  <CARD name="NARSTAD_SCRAPPER_17279607" deckOrderId="22" />
  <CARD name="RELENTLESS_SKAABS_17262701" deckOrderId="23" />
  <CARD name="ROOFTOP_STORM_17227287" deckOrderId="24" />
  <CARD name="ROTCROWN_GHOUL_17240058" deckOrderId="25" />
  <CARD name="SCRAPSKIN_DRAKE_17240035" deckOrderId="26" />
  <CARD name="SCREECHING_SKAAB_17245207" deckOrderId="27" />
  <CARD name="SENSORY_DEPRIVATION_17370780" deckOrderId="28" />
  <CARD name="SKAAB_GOLIATH_17222913" deckOrderId="29" />
  <CARD name="SKAAB_RUINATOR_17230780" deckOrderId="30" />
  <CARD name="SNAPCASTER_MAGE_17227676" deckOrderId="31" />
  <CARD name="STITCHERS_APPRENTICE_17220631" deckOrderId="32" />
  <CARD name="THINK_TWICE_17230626" deckOrderId="33" />
  <CARD name="THOUGHT_SCOUR_17262838" deckOrderId="34" />
  <CARD name="BONE_TO_ASH_17262845" deckOrderId="35" />
  <CARD name="CHROMATIC_SPHERE_1746046" deckOrderId="36" />
  <CARD name="CHROMATIC_SPHERE_1746046" deckOrderId="37" />
</DECK>
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 » 31 Jul 2013, 12:53

MC Brodie wrote:Sorry to keep taking this thread off topic but what does definition, compartment and count do in the target tag? From what it looks like these parameters are optional depending on the complexity of the card.
They aren't optional: definition and compartment are always there, and when there's no count, there must be something else substituting it (for example a variable count as in Vastwood Hydra).
MC Brodie wrote:I'm guessing count defines how many targets need to be identified and definition refers to the id in the target definition tag?
That's right, and compartment defines the register number where the target chest is stored. Same goes for non-mana costs.

Master Necro wrote:I have a very strange problem... I have made Chromatic Sphere but it refuses to appear in my deck I have no idea why.
Have you already checked the points here?
< 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 » 31 Jul 2013, 13:00

thefiremind wrote:Have you already checked the points here?
Yes as you can see in the post above none of those examples are the case here.
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 RiiakShiNal » 31 Jul 2013, 13:10

MC Brodie wrote:Sorry to keep taking this thread off topic but what does definition, compartment and count do in the target tag? From what it looks like these parameters are optional depending on the complexity of the card. I'm guessing count defines how many targets need to be identified and definition refers to the id in the target definition tag?
  • compartment refers to the index in the EffectDC() to put the targets.
  • count is how many targets to select.
  • counter_assignment is like damage_assignment except used for assigning counters instead of damage and count is not used with this one (it automatically determines the max count from counters on the card).
  • damage_assignment is used to allow the player to divide damage "any way he/she chooses" among any number of targets (up to the maximum specified in count).
  • definition attribute refers to the TARGET_DEFINITION (with id equal to the number specified for definition) to use.
  • dependency is used for cards like Cone of Flame to make later TARGETs depend on this one.
  • mode is used in conjuntion with the MODE block for limiting where a TARGET block is used.
  • not_targeted is used to tell the engine that even though we are using a TARGET block this selection is not targeted.
  • up_to is used to indicate that the player can select targets up to the number specified by the count.

Edit:
Master Necro wrote:I have a very strange problem... I have made Chromatic Sphere but it refuses to appear in my deck I have no idea why.
I don't see anything wrong with the XML structure off hand, but I can see it isn't coded right, there should not be a fallback coded for Chromatic Sphere because the base MANA_ABILITY does not have support for costs other than TapSelf.

As for it not appearing in the deck, if you simply added it to the end of an existing deck then it won't appear until you delete your profile. This is because the game somehow remembers the max id used in the deck and will only read up to that id. Replacing cards will allow the card to show up without deleting the profile, but adding cards usually results in the new cards not showing up until the profile is deleted. Resetting the deck may allow it to appear, though I don't know if that will work, deleting the profile will allow it to show up.
RiiakShiNal
Programmer
 
Posts: 2188
Joined: 16 May 2011, 21:37
Has thanked: 75 times
Been thanked: 497 times

Re: Formal Request Thread

Postby Master Necro » 31 Jul 2013, 13:22

nwm got 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 Master Necro » 31 Jul 2013, 15:46

I have a requests for a code, could anyone help me with this one:

1. " {T} : Each player puts the top card of his or her library into his or her graveyard. "
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 10 guests

Main Menu

User Menu

Our Partners


Who is online

In total there are 10 users online :: 0 registered, 0 hidden and 10 guests (based on users active over the past 10 minutes)
Most users ever online was 7303 on 15 Jul 2025, 20:46

Users browsing this forum: No registered users and 10 guests

Login Form