It is currently 06 Sep 2025, 16:12
   
Text Size

A way to limit {X} ? Problem with Kessig Wolf Run

Moderator: CCGHQ Admins

A way to limit {X} ? Problem with Kessig Wolf Run

Postby Emashzed » 03 Sep 2012, 08:54

I have a funny problem with Kessig Wolf Run

The card in itself works ratherwell, as far as I know, the problem lies with the way the engine detects the maximum amount of mana I can spend on the X.
The game counts Kessig Wolf Run 's mana ability in the potential X cost, which is therefore one to many.
If I do select the maximum value for X, no mana at all is tapped, and the effect still triggers (makes the card mighty powerful, but that's not the point :p)
Is there a way for "X" to exclude Kessig Wolf Run, or limit it to "maximum value - 1" ?

Code: Select all
<?xml version='1.0'?>
<CARD_V2>
  <FILENAME text="KESSIG_WOLF_RUN_233256" />
  <CARDNAME text="KESSIG_WOLF_RUN" />
  <TITLE>
    <LOCALISED_TEXT LanguageCode="en-US"><![CDATA[Kessig Wolf Run]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="it-IT"><![CDATA[Riserva dei Lupi di Kessig]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="de-DE"><![CDATA[Wolfspfad in Kessig]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="fr-FR"><![CDATA[Garenne au Loup de Kessig]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="es-ES"><![CDATA[Coto de lobos de Kessig]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="jp-JA"><![CDATA[ケッシグの狼の地]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="ko-KR"><![CDATA[Kessig Wolf Run]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="ru-RU"><![CDATA[Кессигские Волчьи Угодья]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="pt-BR"><![CDATA[Toca do Lobo de Kessig]]></LOCALISED_TEXT>
  </TITLE>
  <MULTIVERSEID value="233256" />
  <ARTID value="888233256" />
  <ARTIST name="Eytan Zana" />
  <CASTING_COST cost="" />
  <FLAVOURTEXT>
    <LOCALISED_TEXT LanguageCode="en-US"><![CDATA[When a werewolf changes for the first time, that first howl is said to echo through the wilds till moonset.]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="it-IT"><![CDATA[Si narra che quando un lupo mannaro si trasforma per la prima volta, il suo primo ululato riecheggi nei territori selvaggi fino al tramonto della luna.]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="de-DE"><![CDATA[Wenn ein Werwolf sich zum ersten Mal verwandelt, kann man sein erstes Heulen bis zum Monduntergang durch die Wildnis hören.]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="fr-FR"><![CDATA[Quand un loup-garou se transforme pour la première fois, on dit que son premier hurlement résonne dans la nature jusqu'au coucher de la lune.]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="es-ES"><![CDATA[Cuando un licántropo cambia por primera vez, se dice que el primer aullido se repite por el bosque hasta que cae la luna.]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="jp-JA"><![CDATA[狼男が初めて変身した時、最初の遠吠えは月が沈むまで荒野に響き続ける。]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="ko-KR"><![CDATA[When a werewolf changes for the first time, that first howl is said to echo through the wilds till moonset.]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="ru-RU"><![CDATA[Говорят, что при первом преображении вервольфа эхо его завывания разносится по пустошам до самого захода луны.]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="pt-BR"><![CDATA[Quando um lobisomem se transforma pela primeira vez, diz-se que seu primeiro uivo ecoa no ar até o amanhecer.]]></LOCALISED_TEXT>
  </FLAVOURTEXT>
  <TYPE metaname="Land" />
  <EXPANSION value="DPG" />
  <RARITY metaname="R" />
  <MANA_ABILITY>
    <LOCALISED_TEXT LanguageCode="en-US"><![CDATA[{T}: Add {1} to your mana pool.]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="it-IT"><![CDATA[{T}: Aggiungi {1} alla tua riserva di mana.]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="de-DE"><![CDATA[{T}: Erhöhe deinen Manavorrat um {1}.]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="fr-FR"><![CDATA[{T} : Ajoutez {1} à votre réserve.]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="es-ES"><![CDATA[{T}: Agrega {1} a tu reserva de maná.]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="jp-JA"><![CDATA[{T}:あなたのマナ・プールに{1}を加える。]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="ko-KR"><![CDATA[{T}: Add {1} to your mana pool.]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="ru-RU"><![CDATA[{T}: добавьте {1} в ваше хранилище маны.]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="pt-BR"><![CDATA[{T}: Adicione {1} à sua reserva de mana.]]></LOCALISED_TEXT>
    <COST type="TapSelf" />
    <PRODUCES amount="{1}" />
  </MANA_ABILITY>
  <ACTIVATED_ABILITY filter_zone="ZONE_IN_PLAY">
    <LOCALISED_TEXT LanguageCode="en-US"><![CDATA[{X}{R}{G}, {T}: Target creature gets +X/+0 and gains trample until end of turn.]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="it-IT"><![CDATA[{X}{R}{G}, {T}: Una creatura bersaglio prende +X/+0 e ha travolgere fino alla fine del turno.]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="de-DE"><![CDATA[{X}{R}{G}, {T}: Bis zum Ende des Zuges erhält eine Kreatur deiner Wahl +X/+0 und verursacht Trampelschaden.]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="fr-FR"><![CDATA[{X}{R}{G}, {T} : La créature ciblée gagne +X/+0 et acquiert le piétinement jusqu'à la fin du tour.]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="es-ES"><![CDATA[{X}{R}{G}, {T}: La criatura objetivo obtiene +X/+0 y gana la habilidad de arrollar hasta el final del turno.]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="jp-JA"><![CDATA[{X}{R}{G}, {T}:クリーチャー1体を対象とする。それはターン終了時まで+X/+0の修整を受けるとともにトランプルを得る。]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="ko-KR"><![CDATA[{X}{R}{G}, {T}: Target creature gets +X/+0 and gains trample until end of turn.]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="ru-RU"><![CDATA[{X}{R}{G}, {T}: целевое существо получает +X/+0 и Пробивной удар до конца хода.]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="pt-BR"><![CDATA[{X}{R}{G}, {T}: A criatura alvo recebe +X/+0 e ganha atropelar até o final do turno.]]></LOCALISED_TEXT>
    <COST type="Mana" cost="{X}{R}{G}" />
    <COST type="TapSelf" />
    <TARGET_DEFINITION id="0">
    local filter = Object():GetFilter()
    filter:Clear()
    filter:AddCardType( CARD_TYPE_CREATURE )
    filter:SetZone( ZONE_IN_PLAY )
    filter:SetHint( HINT_ALLIED_ONLY, EffectController() )
    </TARGET_DEFINITION>
    <TARGET_DETERMINATION>
    return AtLeastOneTargetFromDefinition(0)
    </TARGET_DETERMINATION>
    <PLAY_TIME_ACTION target_choosing="1">
    EffectController():ChooseTarget( 0, "CARD_QUERY_CHOOSE_CREATURE", EffectDC():Make_Targets(0) )
    </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( GetEffectX() )
    end
    </CONTINUOUS_ACTION>
    <CONTINUOUS_ACTION layer="6">
    local target = EffectDC():Get_Targets(0):Get_CardPtr(0)
    if(target ~= nil) then
       target:GetCurrentCharacteristics():Characteristic_Set( CHARACTERISTIC_TRAMPLE, 1 )
    end
    </CONTINUOUS_ACTION>
    <DURATION simple_duration="UntilEOT" />
  </ACTIVATED_ABILITY>
</CARD_V2>
Emashzed
 
Posts: 62
Joined: 02 Feb 2011, 15:19
Has thanked: 15 times
Been thanked: 30 times

Re: A way to limit {X} ? Problem with Kessig Wolf Run

Postby thefiremind » 03 Sep 2012, 13:13

There's actually a way, it's just a pity that you have to complicate things so much to get it done:
viewtopic.php?f=63&t=7575#p94701
I'm suggesting to make up something like my Crimson Hellkite, where the maximum value for {X} will be GetTotalMana()-1 (you shouldn't even need my functions for that).
< 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: A way to limit {X} ? Problem with Kessig Wolf Run

Postby Emashzed » 03 Sep 2012, 13:28

Ah, I see
I should be able to use something like

Code: Select all
<PLAY_TIME_ACTION>
    local player = EffectController()
    player:BeginNewNumericalChoice()
    player:AddNumericalChoiceAnswer(player:GetTotalMana() - 1)
    player:AskNumericalChoiceQuestion("NUM_LANDS")
    </PLAY_TIME_ACTION>
etc...

A bit more convoluted than I'd like it, but I can live with that !

Thanks a lot thefiremind. Always helpful !
Emashzed
 
Posts: 62
Joined: 02 Feb 2011, 15:19
Has thanked: 15 times
Been thanked: 30 times

Re: A way to limit {X} ? Problem with Kessig Wolf Run

Postby Emashzed » 03 Sep 2012, 19:01

Silly game engine...
{X} amount limitation is now ok; but the game still wants to use Kessig for colorless mana, and leaves an untapped basic land instead !
Even tried to "preTap" Kessig before the actual mana tap. No help...
Not sure there is an actual solution now...

Code: Select all
<?xml version='1.0'?>
<CARD_V2>
  <FILENAME text="KESSIG_WOLF_RUN_233256" />
  <CARDNAME text="KESSIG_WOLF_RUN" />
  <TITLE>
    <LOCALISED_TEXT LanguageCode="en-US"><![CDATA[Kessig Wolf Run]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="it-IT"><![CDATA[Riserva dei Lupi di Kessig]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="de-DE"><![CDATA[Wolfspfad in Kessig]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="fr-FR"><![CDATA[Garenne au Loup de Kessig]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="es-ES"><![CDATA[Coto de lobos de Kessig]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="jp-JA"><![CDATA[ケッシグの狼の地]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="ko-KR"><![CDATA[Kessig Wolf Run]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="ru-RU"><![CDATA[Кессигские Волчьи Угодья]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="pt-BR"><![CDATA[Toca do Lobo de Kessig]]></LOCALISED_TEXT>
  </TITLE>
  <MULTIVERSEID value="233256" />
  <ARTID value="888233256" />
  <ARTIST name="Eytan Zana" />
  <CASTING_COST cost="" />
  <FLAVOURTEXT>
    <LOCALISED_TEXT LanguageCode="en-US"><![CDATA[When a werewolf changes for the first time, that first howl is said to echo through the wilds till moonset.]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="it-IT"><![CDATA[Si narra che quando un lupo mannaro si trasforma per la prima volta, il suo primo ululato riecheggi nei territori selvaggi fino al tramonto della luna.]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="de-DE"><![CDATA[Wenn ein Werwolf sich zum ersten Mal verwandelt, kann man sein erstes Heulen bis zum Monduntergang durch die Wildnis hören.]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="fr-FR"><![CDATA[Quand un loup-garou se transforme pour la première fois, on dit que son premier hurlement résonne dans la nature jusqu'au coucher de la lune.]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="es-ES"><![CDATA[Cuando un licántropo cambia por primera vez, se dice que el primer aullido se repite por el bosque hasta que cae la luna.]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="jp-JA"><![CDATA[狼男が初めて変身した時、最初の遠吠えは月が沈むまで荒野に響き続ける。]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="ko-KR"><![CDATA[When a werewolf changes for the first time, that first howl is said to echo through the wilds till moonset.]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="ru-RU"><![CDATA[Говорят, что при первом преображении вервольфа эхо его завывания разносится по пустошам до самого захода луны.]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="pt-BR"><![CDATA[Quando um lobisomem se transforma pela primeira vez, diz-se que seu primeiro uivo ecoa no ar até o amanhecer.]]></LOCALISED_TEXT>
  </FLAVOURTEXT>
  <TYPE metaname="Land" />
  <EXPANSION value="DPG" />
  <RARITY metaname="R" />
  <MANA_ABILITY>
    <LOCALISED_TEXT LanguageCode="en-US"><![CDATA[{T}: Add {1} to your mana pool.]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="it-IT"><![CDATA[{T}: Aggiungi {1} alla tua riserva di mana.]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="de-DE"><![CDATA[{T}: Erhöhe deinen Manavorrat um {1}.]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="fr-FR"><![CDATA[{T} : Ajoutez {1} à votre réserve.]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="es-ES"><![CDATA[{T}: Agrega {1} a tu reserva de maná.]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="jp-JA"><![CDATA[{T}:あなたのマナ・プールに{1}を加える。]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="ko-KR"><![CDATA[{T}: Add {1} to your mana pool.]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="ru-RU"><![CDATA[{T}: добавьте {1} в ваше хранилище маны.]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="pt-BR"><![CDATA[{T}: Adicione {1} à sua reserva de mana.]]></LOCALISED_TEXT>
    <COST type="TapSelf" />
    <PRODUCES amount="{1}" />
  </MANA_ABILITY>
  <ACTIVATED_ABILITY filter_zone="ZONE_IN_PLAY">
    <LOCALISED_TEXT LanguageCode="en-US"><![CDATA[{X}{R}{G}, {T}: Target creature gets +X/+0 and gains trample until end of turn.]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="it-IT"><![CDATA[{X}{R}{G}, {T}: Una creatura bersaglio prende +X/+0 e ha travolgere fino alla fine del turno.]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="de-DE"><![CDATA[{X}{R}{G}, {T}: Bis zum Ende des Zuges erhält eine Kreatur deiner Wahl +X/+0 und verursacht Trampelschaden.]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="fr-FR"><![CDATA[{X}{R}{G}, {T} : La créature ciblée gagne +X/+0 et acquiert le piétinement jusqu'à la fin du tour.]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="es-ES"><![CDATA[{X}{R}{G}, {T}: La criatura objetivo obtiene +X/+0 y gana la habilidad de arrollar hasta el final del turno.]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="jp-JA"><![CDATA[{X}{R}{G}, {T}:クリーチャー1体を対象とする。それはターン終了時まで+X/+0の修整を受けるとともにトランプルを得る。]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="ko-KR"><![CDATA[{X}{R}{G}, {T}: Target creature gets +X/+0 and gains trample until end of turn.]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="ru-RU"><![CDATA[{X}{R}{G}, {T}: целевое существо получает +X/+0 и Пробивной удар до конца хода.]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="pt-BR"><![CDATA[{X}{R}{G}, {T}: A criatura alvo recebe +X/+0 e ganha atropelar até o final do turno.]]></LOCALISED_TEXT>
    <COST type="TapSelf" />
    <COST type="Mana" cost="{R}{G}" />
    <TARGET_DEFINITION id="0">
    local filter = Object():GetFilter()
    filter:Clear()
    filter:AddCardType( CARD_TYPE_CREATURE )
    filter:SetZone( ZONE_IN_PLAY )
    filter:SetHint( HINT_ALLIED_ONLY, EffectController() )
    </TARGET_DEFINITION>
    <TARGET_DETERMINATION>
    return AtLeastOneTargetFromDefinition(0)
    </TARGET_DETERMINATION>
   <PLAY_TIME_ACTION>
    local player = EffectController()
    player:BeginNewNumericalChoice()
    player:AddNumericalChoiceAnswer(player:GetTotalMana() - 3)
    player:AskNumericalChoiceQuestion("NUM_LANDS")
    </PLAY_TIME_ACTION>
    <PLAY_TIME_ACTION>
    EffectDC():Set_Int( 1, Object():GetNumericalChoiceResult() )
    </PLAY_TIME_ACTION>
    <PLAY_TIME_ACTION target_choosing="1">
    EffectController():ChooseTarget( 0, "CARD_QUERY_CHOOSE_CREATURE", EffectDC():Make_Targets(0) )
    </PLAY_TIME_ACTION>
    <PLAY_TIME_ACTION>
    local amount = EffectDC():Get_Int(1)
    local mana_string = "{"..(amount).."}"
    local player = EffectController()
    if player:CanAfford(mana_string) then
       Object():Tap()
       player:TapLand(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) )
    end
    </CONTINUOUS_ACTION>
    <CONTINUOUS_ACTION layer="6">
    local target = EffectDC():Get_Targets(0):Get_CardPtr(0)
    if(target ~= nil) then
       target:GetCurrentCharacteristics():Characteristic_Set( CHARACTERISTIC_TRAMPLE, 1 )
    end
    </CONTINUOUS_ACTION>
    <DURATION simple_duration="UntilEOT" />
  </ACTIVATED_ABILITY>
</CARD_V2>
Emashzed
 
Posts: 62
Joined: 02 Feb 2011, 15:19
Has thanked: 15 times
Been thanked: 30 times

Re: A way to limit {X} ? Problem with Kessig Wolf Run

Postby thefiremind » 03 Sep 2012, 23:20

Try moving Object():Tap() to a separate PLAY_TIME_ACTION before the one where it is now. This should let the game check state-based effects and maybe it will understand that it cannot tap the land twice.
< 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: A way to limit {X} ? Problem with Kessig Wolf Run

Postby BlindWillow » 04 Sep 2012, 02:52

If you set amount to EffectDC():Get_Int(1) + 1, the right number of mana sources will be tapped. You don't even need to include Object():Tap(). Of course, the game will not necessarily tap the mana sources getting highlighted while you make the numerical choice, depending on what sources it ends up thinking you need to keep open for cards you have in your hand. For instance, I tested it with an Overgrown Battlement in play. While I left the Overgrown Battlement unhighlighted during the numerical selection process, the game engine ended up tapping it instead of a Mountain, as I had a Lightning Bolt in hand. The right number of mana sources, including the Overgrown Battlement, were still tapped, though.
BlindWillow
 
Posts: 213
Joined: 19 Jul 2012, 00:26
Has thanked: 11 times
Been thanked: 46 times

Re: A way to limit {X} ? Problem with Kessig Wolf Run

Postby BlindWillow » 04 Sep 2012, 04:19

Further testing suggests it would be best to remove the {R} {G} from the cost for the ability and add an availability condition, as in:
Code: Select all
<AVAILABILITY>
return EffectController():CanAfford("{R}{G}") == 1
</AVAILABILITY>
Then change the play time ability for tapping to:
Code: Select all
<PLAY_TIME_ACTION>
local amount = EffectDC():Get_Int(1) + 1
local mana_string = "{"..(amount).."}{R}{G}"
local player = EffectController()
if player:CanAfford(mana_string) then
     player:TapLand(mana_string)
end
</PLAY_TIME_ACTION>
Here's the entire code so you can see where I've made the changes:
Code: Select all
  <ACTIVATED_ABILITY filter_zone="ZONE_IN_PLAY">
    <AVAILABILITY>
    return EffectController():CanAfford("{R}{G}") == 1
    </AVAILABILITY>
    <COST type="TapSelf" />
    <TARGET_DEFINITION id="0">
    local filter = Object():GetFilter()
    filter:Clear()
    filter:AddCardType( CARD_TYPE_CREATURE )
    filter:SetZone( ZONE_IN_PLAY )
    filter:SetHint( HINT_ALLIED_ONLY, EffectController() )
    </TARGET_DEFINITION>
    <TARGET_DETERMINATION>
    return AtLeastOneTargetFromDefinition(0)
    </TARGET_DETERMINATION>
   <PLAY_TIME_ACTION>
    local player = EffectController()
    player:BeginNewNumericalChoice()
    player:AddNumericalChoiceAnswer(player:GetTotalMana() - 3)
    player:AskNumericalChoiceQuestion("NUM_LANDS")
    </PLAY_TIME_ACTION>
    <PLAY_TIME_ACTION>
    EffectDC():Set_Int( 1, Object():GetNumericalChoiceResult() )
    </PLAY_TIME_ACTION>
    <PLAY_TIME_ACTION target_choosing="1">
    EffectController():ChooseTarget( 0, "CARD_QUERY_CHOOSE_CREATURE", EffectDC():Make_Targets(0) )
    </PLAY_TIME_ACTION>
    <PLAY_TIME_ACTION>
    local amount = EffectDC():Get_Int(1) + 1
    local mana_string = "{"..(amount).."}{R}{G}"
    local player = EffectController()
    if player:CanAfford(mana_string) then
   player:TapLand(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) )
    end
    </CONTINUOUS_ACTION>
    <CONTINUOUS_ACTION layer="6">
    local target = EffectDC():Get_Targets(0):Get_CardPtr(0)
    if(target ~= nil) then
       target:GetCurrentCharacteristics():Characteristic_Set( CHARACTERISTIC_TRAMPLE, 1 )
    end
    </CONTINUOUS_ACTION>
    <DURATION simple_duration="UntilEOT" />
  </ACTIVATED_ABILITY>
BlindWillow
 
Posts: 213
Joined: 19 Jul 2012, 00:26
Has thanked: 11 times
Been thanked: 46 times

Re: A way to limit {X} ? Problem with Kessig Wolf Run

Postby Emashzed » 04 Sep 2012, 17:44

Thanks blindwillow !
Your implemention works quite nicely.
As you said the engine won't always "obey" the mana sources selected but that's good enough I guess :)
Emashzed
 
Posts: 62
Joined: 02 Feb 2011, 15:19
Has thanked: 15 times
Been thanked: 30 times


Return to Programming Talk

Who is online

Users browsing this forum: No registered users and 8 guests

Main Menu

User Menu

Our Partners


Who is online

In total there are 8 users online :: 0 registered, 0 hidden and 8 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 8 guests

Login Form