It is currently 24 Apr 2024, 02:08
   
Text Size

Help with "Contested War Zone"

Moderator: CCGHQ Admins

Help with "Contested War Zone"

Postby Emashzed » 22 Jul 2012, 00:49

I'm having some problem with the "beeing damaged makes Contested War Zone go to opponent control" ability.

I'm sure it's something silly, but for the life of me, I don't understand why control of the card doesn't change when a creature does damage (I can see the trigger triggering though...).

(also, the +1/+0 ability only works on creatures declared as attackers before the ability is triggered, rather than affecting any creature that would be declared as an attacker afterwards. Not sure if that's actually the correct behaviour, or if I did something wrong here...)

Code: Select all
<?xml version='1.0'?>
<CARD_V2>
  <FILENAME text="CONTESTED_WAR_ZONE_213775" />
  <CARDNAME text="CONTESTED_WAR_ZONE" />
  <TITLE>
    <LOCALISED_TEXT LanguageCode="en-US"><![CDATA[Contested War Zone]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="it-IT"><![CDATA[Zona di Guerra Contesa]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="de-DE"><![CDATA[Umkämpftes Kriegsgebiet]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="fr-FR"><![CDATA[Zone de guerre contestée]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="es-ES"><![CDATA[Zona de guerra en disputa]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="jp-JA"><![CDATA[激戦の戦域]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="ko-KR"><![CDATA[Contested War Zone]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="ru-RU"><![CDATA[Спорная Военная Зона]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="pt-BR"><![CDATA[Zona de Guerra Disputada]]></LOCALISED_TEXT>
  </TITLE>
  <MULTIVERSEID value="213775" />
  <ARTID value="A213775" />
  <ARTIST name="Scott Chou" />
  <CASTING_COST cost="" />
  <TYPE metaname="Land" />
  <EXPANSION value="DPG" />
  <RARITY metaname="R" />
  <TRIGGERED_ABILITY filter_zone="ZONE_IN_PLAY">
    <LOCALISED_TEXT LanguageCode="en-US"><![CDATA[Whenever a creature deals combat damage to you, that creature's controller gains control of Contested War Zone.]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="it-IT"><![CDATA[Ogniqualvolta una creatura ti infligge danno da combattimento, il controllore di quella creatura prende il controllo della Zona di Guerra Contesa.]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="de-DE"><![CDATA[Immer wenn eine Kreatur dir Kampfschaden zufügt, erhält der Beherrscher dieser Kreatur die Kontrolle über das Umkämpfte Kriegsgebiet.]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="fr-FR"><![CDATA[À chaque fois qu'une créature vous inflige des blessures de combat, le contrôleur de cette créature acquiert le contrôle de la Zone de guerre contestée.]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="es-ES"><![CDATA[Siempre que una criatura te haga daño de combate, el controlador de esa criatura gana el control de la Zona de guerra en disputa.]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="jp-JA"><![CDATA[いずれかのクリーチャーがあなたに戦闘ダメージを与えるたび、そのクリーチャーのコントローラーは激戦の戦域のコントロールを得る。]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="ko-KR"><![CDATA[Whenever a creature deals combat damage to you, that creature's controller gains control of Contested War Zone.]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="ru-RU"><![CDATA[Каждый раз когда существо наносит вам боевые повреждения, контролирующий его игрок получает контроль над Спорной Военной Зоной.]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="pt-BR"><![CDATA[Toda vez que uma criatura causa dano de combate a você, o controlador daquela criatura ganha o controle de Zona de Guerra Disputada.]]></LOCALISED_TEXT>
    <TRIGGER value="CREATURE_DEALS_COMBAT_DAMAGE_TO_PLAYER" >
      return TriggerPlayer() == EffectController()
    </TRIGGER>
    <RESOLUTION_TIME_ACTION>
      Object():SetController( TriggerObject():GetController() )
    </RESOLUTION_TIME_ACTION>
  </TRIGGERED_ABILITY>
  <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[{1}, {T}: Attacking creatures get +1/+0 until end of turn.]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="it-IT"><![CDATA[{1}, {T}: Le creature attaccanti prendono +1/+0 fino alla fine del turno.]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="de-DE"><![CDATA[{1}, {T}: Angreifende Kreaturen erhalten +1/+0 bis zum Ende des Zuges.]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="fr-FR"><![CDATA[{1}, {T} : Les créatures attaquantes gagnent +1/+0 jusqu'à la fin du tour.]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="es-ES"><![CDATA[{1}, {T}: Las criaturas atacantes obtienen +1/+0 hasta el final del turno.]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="jp-JA"><![CDATA[{1}, {T}:攻撃クリーチャーはターン終了時まで+1/+0の修整を受ける。]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="ko-KR"><![CDATA[{1}, {T}: Attacking creatures get +1/+0 until end of turn.]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="ru-RU"><![CDATA[{1}, {T}: атакующие существа получают +1/+0 до конца хода.]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="pt-BR"><![CDATA[{1}, {T}: As criaturas atacantes recebem +1/+0 até o final do turno.]]></LOCALISED_TEXT>
    <COST type="TapSelf" />
    <COST type="Mana" cost="{1}" />
    <FILTER>
    return FilteredCard() ~= nil and
      FilteredCard():GetZone() == ZONE_IN_PLAY and
      FilteredCard():GetCardType():Test( CARD_TYPE_CREATURE ) ~= 0 and
      FilteredCard():GetPlayer() == Object():GetPlayer() and
      FilteredCard():IsAttacking() ~= 0
    </FILTER>
    <CONTINUOUS_ACTION layer="7C">
    if FilteredCard() ~= nil then
       FilteredCard():GetCurrentCharacteristics():Power_Add( 1 )
    end
    </CONTINUOUS_ACTION>
    <DURATION simple_duration="UntilEOT" />
  </ACTIVATED_ABILITY>
</CARD_V2>
Any suggestions ?
Emashzed
 
Posts: 62
Joined: 02 Feb 2011, 15:19
Has thanked: 15 times
Been thanked: 30 times

Re: Help with "Contested War Zone"

Postby RiiakShiNal » 22 Jul 2012, 02:06

Emashzed wrote:I'm having some problem with the "beeing damaged makes Contested War Zone go to opponent control" ability.

I'm sure it's something silly, but for the life of me, I don't understand why control of the card doesn't change when a creature does damage (I can see the trigger triggering though...).
Try using SetPermanentController instead of SetController. SetController must be used in a CONTINUOUS_ACTION block to work where as SetPermanentController changes the controller until it is changed by some other call to SetPermanentcontroller or the card leaves play.

Emashzed wrote:(also, the +1/+0 ability only works on creatures declared as attackers before the ability is triggered, rather than affecting any creature that would be declared as an attacker afterwards. Not sure if that's actually the correct behaviour, or if I did something wrong here...)
I believe that is the correct behavior as the filter is set when the ability is activated and is not affected by changes in status afterwards. So the ability should have no affect if it is activated before attackers are declared.
RiiakShiNal
Programmer
 
Posts: 2185
Joined: 16 May 2011, 21:37
Has thanked: 75 times
Been thanked: 497 times

Re: Help with "Contested War Zone"

Postby thefiremind » 22 Jul 2012, 08:33

You'll also have another problem with this land: the game will wrongly believe that it can use the same land as a mana source for its pumping ability.

I suggest you the following changes to the activated ability:
Code: Select all
  <ACTIVATED_ABILITY filter_zone="ZONE_IN_PLAY">
    <LOCALISED_TEXT LanguageCode="en-US"><![CDATA[{1}, {T}: Attacking creatures get +1/+0 until end of turn.]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="it-IT"><![CDATA[{1}, {T}: Le creature attaccanti prendono +1/+0 fino alla fine del turno.]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="de-DE"><![CDATA[{1}, {T}: Angreifende Kreaturen erhalten +1/+0 bis zum Ende des Zuges.]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="fr-FR"><![CDATA[{1}, {T} : Les créatures attaquantes gagnent +1/+0 jusqu'à la fin du tour.]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="es-ES"><![CDATA[{1}, {T}: Las criaturas atacantes obtienen +1/+0 hasta el final del turno.]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="jp-JA"><![CDATA[{1}, {T}:攻撃クリーチャーはターン終了時まで+1/+0の修整を受ける。]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="ko-KR"><![CDATA[{1}, {T}: Attacking creatures get +1/+0 until end of turn.]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="ru-RU"><![CDATA[{1}, {T}: атакующие существа получают +1/+0 до конца хода.]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="pt-BR"><![CDATA[{1}, {T}: As criaturas atacantes recebem +1/+0 até o final do turno.]]></LOCALISED_TEXT>
    <COST type="TapSelf" />
    <COST type="Mana" cost="{1}" />
    <AVAILABILITY>
    return EffectController():CanAfford("{2}") == 1
    </AVAILABILITY>
    <FILTER>
    return FilteredCard() ~= nil and
      FilteredCard():GetZone() == ZONE_IN_PLAY and
      FilteredCard():GetCardType():Test( CARD_TYPE_CREATURE ) ~= 0 and
      FilteredCard():GetPlayer() == Object():GetPlayer() and
      FilteredCard():IsAttacking() ~= 0
    </FILTER>
    <CONTINUOUS_ACTION layer="7C">
    if FilteredCard() ~= nil then
       FilteredCard():GetCurrentCharacteristics():Power_Add( 1 )
    end
    </CONTINUOUS_ACTION>
    <DURATION simple_duration="UntilEOT" />
    <AI_AVAILABILITY step="declare_blockers" turn="my_turn" />
  </ACTIVATED_ABILITY>
The AVAILABILITY block checks if you have {2} available, this means that if Contested War Zone is untapped, it will require at least {1} more, that is the mana you'll have to get from something else.
I also added the AI_AVAILABILITY which will make the AI consider this ability only after blockers are declared in its own turns (the most appropriate time).

EDIT: I had forgot "== 1" in the AVAILABILITY block. It's possible that the card would have worked anyway, though.
Last edited by thefiremind on 22 Jul 2012, 15:45, edited 1 time 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: 721 times

Re: Help with "Contested War Zone"

Postby Emashzed » 22 Jul 2012, 11:07

Thanks a lot guys. The card works great now :)
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 9 guests


Who is online

In total there are 9 users online :: 0 registered, 0 hidden and 9 guests (based on users active over the past 10 minutes)
Most users ever online was 4143 on 23 Jan 2024, 08:21

Users browsing this forum: No registered users and 9 guests

Login Form