It is currently 15 Nov 2025, 00:30
   
Text Size

DOTP2013 Dual Lands and Mana Selection Problems.

Moderator: CCGHQ Admins

DOTP2013 Dual Lands and Mana Selection Problems.

Postby pcastellazzi » 17 Jul 2012, 02:56

Two problems i would like some help with:

First, the easy one, i implemented Blinkmoth Nexus and Kessig Wolf Run (actually ported them from my DOTP2012 mod), the problem i am having is when both are in play, i cant pay Blinkmoth Nexus metamorphosis cost with anything but Kessig Wolf Run. The manual land switcher does not allow me to use a mountain or a forest to pay {1} when there is a land in play that provide it. Is this a bug or i screwed up with the code some how?

Now the more interesting question, i was trying to implement Drowned Catacomb using the same idea behing Clodpost, with little modifications. At first it seems to work ok, but it slows the game to a crawl, even when the only permanent in play is the land. The code follows for you to review. Please take into account is a very early version, and some stuff is missing, and other duplicated here and there.

Code: Select all
<?xml version='1.0'?>

<CARD_V2>
  <FILENAME text="DROWNED_CATACOMB_999002" />
  <CARDNAME text="DROWNED_CATACOMB" />

  <ARTID value="BLOODSTAINED_MIRE_39505" />
  <ARTIST name="Rob Alexander" />

  <TYPE metaname="Land" />
  <CASTING_COST cost="" />

  <MULTIVERSEID value="999002" />
  <EXPANSION value="ON" />
  <RARITY metaname="R" />

  <TITLE>
    <LOCALISED_TEXT LanguageCode="en-US"><![CDATA[Drowned Catacomb]]></LOCALISED_TEXT>
  </TITLE>

  <TRIGGERED_ABILITY internal="1" filter_zone="ZONE_IN_PLAY">
    <TRIGGER value="ZONECHANGE_END" simple_qualifier="self" to_zone="ZONE_IN_PLAY" />

    <RESOLUTION_TIME_ACTION>
    <![CDATA[
      MANA_ABILITY_BLACK = 1
      MANA_ABILITY_BLUE  = 2
      MANA_ABILITY_GREEN = 3
      MANA_ABILITY_RED   = 4
      MANA_ABILITY_WHITE = 5

      local player    = Object():GetPlayer()
      local mountains = CountPermanents(player, LAND_TYPE_MOUNTAIN, ZONE_IN_PLAY)
      local swamps    = CountPermanents(player, LAND_TYPE_SWAMP   , ZONE_IN_PLAY)

      if (mountains + swamps) <= 0 then
        Object():ComesIntoPlayTapped()
      end

      MTG():ObjectDataChest():Set_Int(0, mountains < swamps and MANA_ABILITY_RED or MANA_ABILITY_BLACK)
    ]]>
    </RESOLUTION_TIME_ACTION>
  </TRIGGERED_ABILITY>

  <ACTIVATED_ABILITY auto_skip="1" filter_zone="ZONE_IN_PLAY">
    <LOCALISED_TEXT LanguageCode="en-US"><![CDATA[Switch land Mode]]></LOCALISED_TEXT>

    -- there is no "free" abilities, we gave the ability a noop cost to simulate it
    <COST type="generic" />

    <TARGET_DETERMINATION>
    <![CDATA[
      -- 1 = success, 0 failure (real booleans (true/false) do not work here.
      if Object():Tapped() == 0 then
        return 1
      else
        return 0
      end
    ]]>
    </TARGET_DETERMINATION>

    <RESOLUTION_TIME_ACTION>
    <![CDATA[
      MANA_ABILITY_BLACK = 1
      MANA_ABILITY_BLUE  = 2
      MANA_ABILITY_GREEN = 3
      MANA_ABILITY_RED   = 4
      MANA_ABILITY_WHITE = 5

      local current_type = MTG():ObjectDataChest():Get_Int(0) == MANA_ABILITY_BLACK and MANA_ABILITY_RED or MANA_ABILITY_BLACK

      MTG():ObjectDataChest():Set_Int(0, current_type)
    ]]>
    </RESOLUTION_TIME_ACTION>
  </ACTIVATED_ABILITY>

  <STATIC_ABILITY filter_zone="ZONE_IN_PLAY">
    <CONTINUOUS_ACTION layer="6">
    <![CDATA[
      local current_type    = MTG():ObjectDataChest():Get_Int(0)
      local characteristics = Object():GetCurrentCharacteristics()
      characteristics:GrantAbility(current_type)
    ]]>
    </CONTINUOUS_ACTION>
  </STATIC_ABILITY>

  <!-- MANA_ABILITY_BLACK -->
  <MANA_ABILITY resource_id="1" filter_zone="ZONE_IN_PLAY">
    <LOCALISED_TEXT LanguageCode="en-US"><![CDATA[{T}: Add {B} to your mana pool.]]></LOCALISED_TEXT>
    <COST type="TapSelf" />
    <PRODUCES amount="{B}" />
  </MANA_ABILITY>

  <!-- MANA_ABILITY_RED -->
  <MANA_ABILITY resource_id="4" filter_zone="ZONE_IN_PLAY">
    <LOCALISED_TEXT LanguageCode="en-US"><![CDATA[{T}: Add {R} to your mana pool.]]></LOCALISED_TEXT>
    <COST type="TapSelf" />
    <PRODUCES amount="{R}" />
  </MANA_ABILITY>
</CARD_V2>
The lights then came up and the crowd erupted in applause, because that's what the crowd does after it watches destruction on a large screen.
— Ben Kuchera, Mordern Warfare 3 review.
User avatar
pcastellazzi
 
Posts: 184
Joined: 25 Apr 2012, 00:40
Location: Montevideo, Uruguay
Has thanked: 11 times
Been thanked: 30 times

Re: DOTP2013 Dual Lands and Mana Selection Problems.

Postby RiiakShiNal » 17 Jul 2012, 03:38

pcastellazzi wrote:First, the easy one, i implemented Blinkmoth Nexus and Kessig Wolf Run (actually ported them from my DOTP2012 mod), the problem i am having is when both are in play, i cant pay Blinkmoth Nexus metamorphosis cost with anything but Kessig Wolf Run. The manual land switcher does not allow me to use a mountain or a forest to pay {1} when there is a land in play that provide it. Is this a bug or i screwed up with the code some how?
You didn't do anything wrong and it's not really a bug. The game prioritizes colourless mana sources for colourless costs over and above coloured mana sources. It's a characteristic of the engine and there is nothing we can do about it (unless someone is brave enough to try and patch the executable with a corrected mana selection system which would pose several issues in trying to do).

pcastellazzi wrote:Now the more interesting question, i was trying to implement Drowned Catacomb using the same idea behing Clodpost, with little modifications. At first it seems to work ok, but it slows the game to a crawl, even when the only permanent in play is the land. The code follows for you to review. Please take into account is a very early version, and some stuff is missing, and other duplicated here and there.
My guess on this one is that because there is a free ability the computer is considering this ability multiple times in rapid succession which would slow down the game. If the land is on the computer's side then the computer could even activate the ability several times in rapid succession instead of just considering it as well. With the way the AI plays cards and abilities that we add (properly at that) without necessarily being able to "read" the card like we can I can only assume that the computer has some way of being able to sandbox test an ability as its way of considering it. As such maybe you should try limiting how many times a turn that "free" ability can be activated or change when the ability can be activated.

Side-note: In your code it looks like you're switching between Black and Red mana, but Drowned Catacomb is Black and Blue mana and testing for Mountains instead of Islands.
RiiakShiNal
Programmer
 
Posts: 2189
Joined: 16 May 2011, 21:37
Has thanked: 75 times
Been thanked: 497 times

Re: DOTP2013 Dual Lands and Mana Selection Problems.

Postby thefiremind » 17 Jul 2012, 08:50

RiiakShiNal wrote:With the way the AI plays cards and abilities that we add (properly at that) without necessarily being able to "read" the card like we can I can only assume that the computer has some way of being able to sandbox test an ability as its way of considering it.
That's exactly how it works. Someone posted a very interesting article some days ago (can't remember who and where) that explained how the DotP2010 engine worked: it runs lots of possible scenarios in parallel, making different decisions in each of them, in order to see which scenario results in the best outcome. The following engines probably work the same way, and I can assume that the AI tries to activate the free ability a variable number of times in order to check if the outcome is different.

By the way, since we are talking about things that slow down the AI: when I coded Moldgraf Monstrosity, I tried to solve the problem of "two different random numbers" by repeating the assignment of the second number until it becomes different from the first one: this not only slowed the game when Moldgraf Monstrosity was in play, but made it crash at the exit. So, don't make iterations based on random number generation. :D

Returning to the dual land problem: let's consider the free ability option out of the way, since it screws up the AI. Another option would be to make the land capable of deciding the ability to turn on by itself... but which rule should it follow? I was thinking about involving a ChromaCount in the player's hand... but maybe you have only 1 spell of a different colour and you want to play just that one, that's a thing to keep in mind.
< 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: DOTP2013 Dual Lands / Mana Selection Problems (Fixed)

Postby pcastellazzi » 18 Jul 2012, 06:04

The first of the problems can be solved to some extend with <PRODUCE amount="{Z}" /> (or anything else that's not an actual color). I am not sure if this will have side effects, but at first seems to work ok and to allow to allow colorless abilities being payed with any lands besides the one producing {Z}.

The second one, was a little bit more complicated. It required a lot of trial an error to get a prototype working. Attached is a complete example. I also took the time to move to a module all the reusable code. With the same idea it will be easy to implement other dual lands, or cards like Birds of Paradise.

The example i made is for Dragonskull Summit, it contains all the working code (except the art). Any ideas about how to make it better would be much appreciated.
Attachments
dual-land.zip
Dragonskull Summit Code Sample
(4.13 KiB) Downloaded 499 times
The lights then came up and the crowd erupted in applause, because that's what the crowd does after it watches destruction on a large screen.
— Ben Kuchera, Mordern Warfare 3 review.
User avatar
pcastellazzi
 
Posts: 184
Joined: 25 Apr 2012, 00:40
Location: Montevideo, Uruguay
Has thanked: 11 times
Been thanked: 30 times

Re: DOTP2013 Dual Lands / Mana Selection Problems (Fixed)

Postby thefiremind » 18 Jul 2012, 08:31

pcastellazzi wrote:The first of the problems can be solved to some extend with <PRODUCE amount="{Z}" /> (or anything else that's not an actual color). I am not sure if this will have side effects, but at first seems to work ok and to allow to allow colorless abilities being payed with any lands besides the one producing {Z}.
This could be great and I'm going to test it on Plague Myr! Maybe it could allow me to reconsider my code for automatic Eldrazi Spawn tokens.

EDIT: The "Z" trick doesn't work on Plague Myr for me. I had 1 Forest, 1 Swamp, 1 Plague Myr in play, and the game allowed me to play Plague Stinger only with Swamp + Plague Myr. :(

pcastellazzi wrote:The second one, was a little bit more complicated. It required a lot of trial an error to get a prototype working. Attached is a complete example. I also took the time to move to a module all the reusable code. With the same idea it will be easy to implement other dual lands, or cards like Birds of Paradise.
When functions are separated, it takes more time for me to "digest" the code, but I'll see what I can understand. Just one thing for now: about the association between color variables and numbers, couldn't you use the original one?
Code: Select all
COLOUR_WHITE = 1
COLOUR_BLUE = 2
COLOUR_BLACK = 3
COLOUR_RED = 4
COLOUR_GREEN = 5
< 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: DOTP2013 Dual Lands / Mana Selection Problems (Fixed)

Postby pcastellazzi » 20 Jul 2012, 10:04

thefiremind wrote:The "Z" trick doesn't work on Plague Myr for me. I had 1 Forest, 1 Swamp, 1 Plague Myr in play, and the game allowed me to play Plague Stinger only with Swamp + Plague Myr. :(
You are right. My bad :oops:. I guess i should sleep at 5:00 am instead of trying weird ideas on DOTP2013 :P

thefiremind wrote:about the association between color variables and numbers, couldn't you use the original one?
Code: Select all
COLOUR_WHITE = 1
COLOUR_BLUE = 2
COLOUR_BLACK = 3
COLOUR_RED = 4
COLOUR_GREEN = 5
I did not remember those. I will work on it this weekend.
The lights then came up and the crowd erupted in applause, because that's what the crowd does after it watches destruction on a large screen.
— Ben Kuchera, Mordern Warfare 3 review.
User avatar
pcastellazzi
 
Posts: 184
Joined: 25 Apr 2012, 00:40
Location: Montevideo, Uruguay
Has thanked: 11 times
Been thanked: 30 times

DOTP2013 Dual Lands / Additional Functions

Postby pcastellazzi » 22 Jul 2012, 22:43

I been working on this a little more. I simplified the API a lot and added more examples. The new files/examples can be found here.

There is also a backport of the helper functions i used for DOTP 2012, mostly for handling common/repetitive stuff. The core dlc contains the new functions with a set of common used dual lands, the psychosis dlc is a port of my psychosis deck used to test the new functions. It's still a working in progress. Some docs are missing, and the example deck is missing some pictures.

Please take a look and let me know what you think.
The lights then came up and the crowd erupted in applause, because that's what the crowd does after it watches destruction on a large screen.
— Ben Kuchera, Mordern Warfare 3 review.
User avatar
pcastellazzi
 
Posts: 184
Joined: 25 Apr 2012, 00:40
Location: Montevideo, Uruguay
Has thanked: 11 times
Been thanked: 30 times

Re: DOTP2013 Dual Lands and Mana Selection Problems.

Postby --Dream-- » 10 Aug 2012, 17:57

Really nice work pcastellazzi!

I tried 2 different cards that I use in my "real" deck, Sunpetal Grove and Razorverge Thicket, and they work great with your functions!

I do have a few questions:
1 - have you coded Birds of Paradise successfully? :)
2 - any known bugs/limitations that you know of?
--Dream--
 
Posts: 65
Joined: 28 Jul 2012, 12:01
Has thanked: 4 times
Been thanked: 0 time

Re: DOTP2013 Dual Lands and Mana Selection Problems.

Postby pcastellazzi » 10 Aug 2012, 18:12

--Dream-- wrote:Really nice work pcastellazzi!
Thank you. I am glad you like it.

--Dream-- wrote:have you coded Birds of Paradise successfully? :)
I coded it as a way to test the code. I will clean it and post it with the rest of the code later. (update: already done.)

--Dream-- wrote:any known bugs/limitations that you know of?
There is no bugs i know of. If you find any let me know and i will do my best to fix them. About limitations, the only one i know is related to how the AI handle abilities with no cost and it is addressed in the code specifically.
Last edited by pcastellazzi on 10 Aug 2012, 20:20, edited 1 time in total.
The lights then came up and the crowd erupted in applause, because that's what the crowd does after it watches destruction on a large screen.
— Ben Kuchera, Mordern Warfare 3 review.
User avatar
pcastellazzi
 
Posts: 184
Joined: 25 Apr 2012, 00:40
Location: Montevideo, Uruguay
Has thanked: 11 times
Been thanked: 30 times

Re: DOTP2013 Dual Lands and Mana Selection Problems.

Postby RiiakShiNal » 10 Aug 2012, 19:32

There is an issue with Tropical Island, with a Life and Limb inplay that becomes enchanted with Ice Cage. You would no longer be able to use the mana rotation/selection ability. Similarly if there is a Life and Limb in play along with Linvala, Keeper of Silence then the mana rotation/selection ability of cards like Tropical Island can't be used (by an opponent anyway).

Every time someone activates the mana rotation/selection ability when a Burning-Tree Shaman is in play they will take damage.

So there are some limitations/issues with this code, but this is still good for what we can do in the DotP 2013 engine.
RiiakShiNal
Programmer
 
Posts: 2189
Joined: 16 May 2011, 21:37
Has thanked: 75 times
Been thanked: 497 times

Re: DOTP2013 Dual Lands and Mana Selection Problems.

Postby pcastellazzi » 10 Aug 2012, 20:33

RiiakShiNal wrote:There is an issue with Tropical Island, with a Life and Limb inplay that becomes enchanted with Ice Cage. You would no longer be able to use the mana rotation/selection ability. Similarly if there is a Life and Limb in play along with Linvala, Keeper of Silence then the mana rotation/selection ability of cards like Tropical Island can't be used (by an opponent anyway).

Every time someone activates the mana rotation/selection ability when a Burning-Tree Shaman is in play they will take damage.

So there are some limitations/issues with this code, but this is still good for what we can do in the DotP 2013 engine.
Did anyone code something like Ice Cage? Can you post an example? Can it be evaded with an utility ability or marking the ability internal?
The lights then came up and the crowd erupted in applause, because that's what the crowd does after it watches destruction on a large screen.
— Ben Kuchera, Mordern Warfare 3 review.
User avatar
pcastellazzi
 
Posts: 184
Joined: 25 Apr 2012, 00:40
Location: Montevideo, Uruguay
Has thanked: 11 times
Been thanked: 30 times

Re: DOTP2013 Dual Lands and Mana Selection Problems.

Postby RiiakShiNal » 10 Aug 2012, 20:50

I don't think Ice Cage or Linvala, Keeper of Silence have been coded for DotP 2013 yet, but they should both be possible to code (I coded Linvala, Keeper of Silence for DotP 2010 without major problems, though the computer still cheated).

I can probably code one or the other and post it in a while (right now my comp is busy doing some hash tests using a crazy idea I had ~34 million tests to run).

As for making it a utility ability, I don't think that would be possible (player can't manually activate a utility ability). If you make the ability internal it may not allow the player to use it.

Edit: Here is Ice Cage:
Code: Select all
<?xml version='1.0'?>
<CARD_V2>
   <FILENAME text="ICE_CAGE_245283" />
   <CARDNAME text="ICE_CAGE" />
   <TITLE>
      <LOCALISED_TEXT LanguageCode="en-US"><![CDATA[Ice Cage]]></LOCALISED_TEXT>
      <LOCALISED_TEXT LanguageCode="fr-FR"><![CDATA[Cage de glace]]></LOCALISED_TEXT>
      <LOCALISED_TEXT LanguageCode="es-ES"><![CDATA[Jaula de hielo]]></LOCALISED_TEXT>
      <LOCALISED_TEXT LanguageCode="de-DE"><![CDATA[Eiskäfig]]></LOCALISED_TEXT>
      <LOCALISED_TEXT LanguageCode="it-IT"><![CDATA[Gabbia di Ghiaccio]]></LOCALISED_TEXT>
      <LOCALISED_TEXT LanguageCode="jp-JA"><![CDATA[氷の牢獄]]></LOCALISED_TEXT>
      <LOCALISED_TEXT LanguageCode="ko-KR"><![CDATA[Ice Cage]]></LOCALISED_TEXT>
      <LOCALISED_TEXT LanguageCode="ru-RU"><![CDATA[Ледяная Клетка]]></LOCALISED_TEXT>
      <LOCALISED_TEXT LanguageCode="pt-BR"><![CDATA[Jaula Congelada]]></LOCALISED_TEXT>
   </TITLE>
   <MULTIVERSEID value="245283" />
   <ARTID value="RSN245283" />
   <ARTIST name="Mike Bierek" />
   <CASTING_COST cost="{1}{U}" />
   <TYPE metaname="Enchantment" />
   <SUB_TYPE metaname="Aura" />
   <EXPANSION value="M12" />
   <RARITY metaname="C" />
   <STATIC_ABILITY attach_filter="1" filter_zone="ZONE_IN_PLAY">
      <LOCALISED_TEXT LanguageCode="en-US"><![CDATA[Enchant creature]]></LOCALISED_TEXT>
      <LOCALISED_TEXT LanguageCode="fr-FR"><![CDATA[Enchanter: créature]]></LOCALISED_TEXT>
      <LOCALISED_TEXT LanguageCode="es-ES"><![CDATA[Encantar criatura.]]></LOCALISED_TEXT>
      <LOCALISED_TEXT LanguageCode="de-DE"><![CDATA[Kreaturenverzauberung]]></LOCALISED_TEXT>
      <LOCALISED_TEXT LanguageCode="it-IT"><![CDATA[Incanta creatura]]></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[Encantar criatura]]></LOCALISED_TEXT>
      <CONTINUOUS_ACTION>
         local attach_filter = Object():AttachmentFilter_Get()
         attach_filter:Clear()
         attach_filter:AddCardType( CARD_TYPE_CREATURE )
      </CONTINUOUS_ACTION>
   </STATIC_ABILITY>
   <STATIC_ABILITY simple_filter="Parent" filter_zone="ZONE_IN_PLAY">
      <LOCALISED_TEXT LanguageCode="en-US"><![CDATA[Enchanted creature can't attack or block, and its activated abilities can't be activated.]]></LOCALISED_TEXT>
      <LOCALISED_TEXT LanguageCode="fr-FR"><![CDATA[La créature enchantée ne peut ni attaquer ni bloquer et ses capacités activées ne peuvent pas être activées.]]></LOCALISED_TEXT>
      <LOCALISED_TEXT LanguageCode="es-ES"><![CDATA[La criatura encantada no puede atacar o bloquear, y no pueden activarse sus habilidades activadas.]]></LOCALISED_TEXT>
      <LOCALISED_TEXT LanguageCode="de-DE"><![CDATA[Die verzauberte Kreatur kann nicht angreifen oder blocken, und ihre aktivierten Fähigkeiten können nicht aktiviert werden.]]></LOCALISED_TEXT>
      <LOCALISED_TEXT LanguageCode="it-IT"><![CDATA[La creatura incantata non può attaccare o bloccare e le sue abilità attivate non possono essere attivate.]]></LOCALISED_TEXT>
      <LOCALISED_TEXT LanguageCode="jp-JA"><![CDATA[エンチャントされているクリーチャーは攻撃したりブロックしたりできず、それの起動型能力は起動できない。]]></LOCALISED_TEXT>
      <LOCALISED_TEXT LanguageCode="ko-KR"><![CDATA[Enchanted creature can't attack or block, and its activated abilities can't be activated.]]></LOCALISED_TEXT>
      <LOCALISED_TEXT LanguageCode="ru-RU"><![CDATA[Зачарованное существо не может атаковать или блокировать, и его активируемые способности нельзя активировать.]]></LOCALISED_TEXT>
      <LOCALISED_TEXT LanguageCode="pt-BR"><![CDATA[A criatura encantada não pode atacar nem bloquear e suas habilidades ativadas não podem ser ativadas.]]></LOCALISED_TEXT>
      <CONTINUOUS_ACTION layer="8">
         local parent = Object():GetParent()
         RSN_CantAttack( parent )
         RSN_CantBlock( parent )
         RSN_CantUseActivatedAbilities( parent )
      </CONTINUOUS_ACTION>
   </STATIC_ABILITY>
   <TRIGGERED_ABILITY auto_skip="1">
      <LOCALISED_TEXT LanguageCode="en-US"><![CDATA[When enchanted creature becomes the target of a spell or ability, destroy Ice Cage.]]></LOCALISED_TEXT>
      <LOCALISED_TEXT LanguageCode="fr-FR"><![CDATA[Quand la créature enchantée devient la cible d'un sort ou d'une capacité, détruisez la Cage de glace.]]></LOCALISED_TEXT>
      <LOCALISED_TEXT LanguageCode="es-ES"><![CDATA[Cuando la criatura encantada sea objetivo de un hechizo o habilidad, destruye la Jaula de hielo.]]></LOCALISED_TEXT>
      <LOCALISED_TEXT LanguageCode="de-DE"><![CDATA[Wenn die verzauberte Kreatur das Ziel eines Zauberspruchs oder einer Fähigkeit wird, zerstöre den Eiskäfig.]]></LOCALISED_TEXT>
      <LOCALISED_TEXT LanguageCode="it-IT"><![CDATA[Quando la creatura incantata diventa bersaglio di una magia o abilità, distruggi la Gabbia di Ghiaccio.]]></LOCALISED_TEXT>
      <LOCALISED_TEXT LanguageCode="jp-JA"><![CDATA[エンチャントされているクリーチャーが呪文や能力の対象になったとき、氷の牢獄を破壊する。]]></LOCALISED_TEXT>
      <LOCALISED_TEXT LanguageCode="ko-KR"><![CDATA[When enchanted creature becomes the target of a spell or ability, destroy Ice Cage.]]></LOCALISED_TEXT>
      <LOCALISED_TEXT LanguageCode="ru-RU"><![CDATA[Когда зачарованное существо становится целью заклинания или способности, уничтожьте Ледяную Клетку.]]></LOCALISED_TEXT>
      <LOCALISED_TEXT LanguageCode="pt-BR"><![CDATA[Quando a criatura encantada se tornar o alvo de uma mágica ou habilidade, destrua Jaula Congelada.]]></LOCALISED_TEXT>
      <TRIGGER value="BECAME_TARGET">
         return TriggerObject() == Object():GetParent()
      </TRIGGER>
      <RESOLUTION_TIME_ACTION>
         Object():Destroy()
      </RESOLUTION_TIME_ACTION>
   </TRIGGERED_ABILITY>
   <SPELL_ABILITY attach_filter="1" dangerous="1" filter_zone="ZONE_IN_PLAY">
      <TARGET_DEFINITION id="0">
         local filter = Object():GetFilter()
         filter:Clear()
         filter:AddCardType( CARD_TYPE_CREATURE )
         filter:SetZone( ZONE_IN_PLAY )
         filter:SetHint( HINT_ENEMY_ONLY, EffectController() )
      </TARGET_DEFINITION>
      <TARGET_DETERMINATION>
         return AtLeastOneTargetFromDefinition(0)
      </TARGET_DETERMINATION>
      <PLAY_TIME_ACTION target_choosing="1">
         EffectController():ChooseTarget( 0, "CARD_QUERY_CHOOSE_CREATURE_TO_ENCHANT", EffectDC():Make_Targets(0) )
      </PLAY_TIME_ACTION>
      <RESOLUTION_TIME_ACTION>
         local target_card = EffectDC():Get_Targets(0):Get_CardPtr(0)
         if target_card ~= nil then
            Object():Enchant( target_card )
         end
      </RESOLUTION_TIME_ACTION>
   </SPELL_ABILITY>
</CARD_V2>
It uses these functions of mine (if you have my mod then you already have these functions):
Code: Select all
RSN_AddCharacteristic = function( oSubject, nCharacteristic )
   if (oSubject ~= nil) then
      local oCharacteristics = oSubject:GetCurrentCharacteristics()
      if (oCharacteristics ~= nil) then
         oCharacteristics:Characteristic_Set( nCharacteristic, 1 )
      end
   end
end

RSN_CantAttack = function( oCreature )
   RSN_AddCharacteristic( oCreature, CHARACTERISTIC_CANT_ATTACK )
end

RSN_CantBlock = function( oCreature )
   RSN_AddCharacteristic( oCreature, CHARACTERISTIC_CANT_BLOCK )
end

RSN_CantUseActivatedAbilities = function( oCreature )
   RSN_AddCharacteristic( oCreature, CHARACTERISTIC_CANT_USE_ACTIVATED_ABILITIES )
end
Edit 2: And here is Linvala, Keeper of Silence:
Code: Select all
<?xml version='1.0'?>
<CARD_V2>
   <FILENAME text="LINVALA_KEEPER_OF_SILENCE_193660" />
   <CARDNAME text="LINVALA_KEEPER_OF_SILENCE" />
   <TITLE>
      <LOCALISED_TEXT LanguageCode="en-US"><![CDATA[Linvala, Keeper of Silence]]></LOCALISED_TEXT>
      <LOCALISED_TEXT LanguageCode="fr-FR"><![CDATA[Linvala, Gardienne du Silence]]></LOCALISED_TEXT>
      <LOCALISED_TEXT LanguageCode="es-ES"><![CDATA[Linvala, guardiana del silencio]]></LOCALISED_TEXT>
      <LOCALISED_TEXT LanguageCode="de-DE"><![CDATA[Linvala, Hüterin des Schweigens]]></LOCALISED_TEXT>
      <LOCALISED_TEXT LanguageCode="it-IT"><![CDATA[Linvala, Custode del Silenzio]]></LOCALISED_TEXT>
      <LOCALISED_TEXT LanguageCode="jp-JA"><![CDATA[静寂の守り手、リンヴァーラ]]></LOCALISED_TEXT>
      <LOCALISED_TEXT LanguageCode="ko-KR"><![CDATA[Linvala, Keeper of Silence]]></LOCALISED_TEXT>
      <LOCALISED_TEXT LanguageCode="ru-RU"><![CDATA[Линвала, Хранительница Тишины]]></LOCALISED_TEXT>
      <LOCALISED_TEXT LanguageCode="pt-BR"><![CDATA[Linvala, Guardiã do Silêncio]]></LOCALISED_TEXT>
   </TITLE>
   <MULTIVERSEID value="193660" />
   <ARTID value="RSN193660" />
   <ARTIST name="Igor Kieryluk" />
   <CASTING_COST cost="{2}{W}{W}" />
   <FLAVOURTEXT>
      <LOCALISED_TEXT LanguageCode="en-US"><![CDATA[Those who seek to disturb the harmony of life will see their instruments taken from them.]]></LOCALISED_TEXT>
      <LOCALISED_TEXT LanguageCode="fr-FR"><![CDATA[Quiconque cherche à troubler l'harmonie de la vie se verra dérobé de ses instruments.]]></LOCALISED_TEXT>
      <LOCALISED_TEXT LanguageCode="es-ES"><![CDATA[Aquellos que buscan perturbar la armonía de la vida perderán sus instrumentos.]]></LOCALISED_TEXT>
      <LOCALISED_TEXT LanguageCode="de-DE"><![CDATA[Jenen, die versuchen, die Harmonie des Lebens zu stören, werden die Instrumente weggenommen.]]></LOCALISED_TEXT>
      <LOCALISED_TEXT LanguageCode="it-IT"><![CDATA[Quanti tentano di turbare l'armonia della vita si vedranno sottrarre i loro strumenti.]]></LOCALISED_TEXT>
      <LOCALISED_TEXT LanguageCode="jp-JA"><![CDATA[生命の調和を乱そうとする者は、その曲が自らを離れることになるだろう。]]></LOCALISED_TEXT>
      <LOCALISED_TEXT LanguageCode="ko-KR"><![CDATA[Those who seek to disturb the harmony of life will see their instruments taken from them.]]></LOCALISED_TEXT>
      <LOCALISED_TEXT LanguageCode="ru-RU"><![CDATA[Те, кто хотят нарушить гармонию жизни, лишатся своих орудий.]]></LOCALISED_TEXT>
      <LOCALISED_TEXT LanguageCode="pt-BR"><![CDATA[Aqueles que ousarem disturbar a harmonia da vida terão seus instrumentos tomados.]]></LOCALISED_TEXT>
   </FLAVOURTEXT>
   <SUPERTYPE metaname="Legendary" />
   <TYPE metaname="Creature" />
   <SUB_TYPE metaname="Angel" />
   <EXPANSION value="ROE" />
   <RARITY metaname="M" />
   <POWER value="3" />
   <TOUGHNESS value="4" />
   <STATIC_ABILITY commaspace="0">
      <LOCALISED_TEXT LanguageCode="en-US"><![CDATA[Flying]]></LOCALISED_TEXT>
      <LOCALISED_TEXT LanguageCode="fr-FR"><![CDATA[Vol]]></LOCALISED_TEXT>
      <LOCALISED_TEXT LanguageCode="es-ES"><![CDATA[Vuela.]]></LOCALISED_TEXT>
      <LOCALISED_TEXT LanguageCode="de-DE"><![CDATA[Fliegend]]></LOCALISED_TEXT>
      <LOCALISED_TEXT LanguageCode="it-IT"><![CDATA[Volare]]></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[Voar]]></LOCALISED_TEXT>
      <CONTINUOUS_ACTION>
         RSN_Flying( Object() )
      </CONTINUOUS_ACTION>
   </STATIC_ABILITY>
   <STATIC_ABILITY filter_zone="ZONE_IN_PLAY">
      <LOCALISED_TEXT LanguageCode="en-US"><![CDATA[Activated abilities of creatures your opponents control can't be activated.]]></LOCALISED_TEXT>
      <LOCALISED_TEXT LanguageCode="fr-FR"><![CDATA[Les capacités activées des créatures que vos adversaires contrôlent ne peuvent pas être activées.]]></LOCALISED_TEXT>
      <LOCALISED_TEXT LanguageCode="es-ES"><![CDATA[Las habilidades activadas de las criaturas que controlan tus oponentes no pueden activarse.]]></LOCALISED_TEXT>
      <LOCALISED_TEXT LanguageCode="de-DE"><![CDATA[Aktivierte Fähigkeiten von Kreaturen, die deine Gegner kontrollieren, können nicht aktiviert werden.]]></LOCALISED_TEXT>
      <LOCALISED_TEXT LanguageCode="it-IT"><![CDATA[Le abilità attivate delle creature controllate dai tuoi avversari non possono essere attivate.]]></LOCALISED_TEXT>
      <LOCALISED_TEXT LanguageCode="jp-JA"><![CDATA[あなたの対戦相手がコントロールしているクリーチャーの起動型能力は起動できない。]]></LOCALISED_TEXT>
      <LOCALISED_TEXT LanguageCode="ko-KR"><![CDATA[Activated abilities of creatures your opponents control can't be activated.]]></LOCALISED_TEXT>
      <LOCALISED_TEXT LanguageCode="ru-RU"><![CDATA[Активируемые способности существ под контролем ваших оппонентов не могут быть активированы.]]></LOCALISED_TEXT>
      <LOCALISED_TEXT LanguageCode="pt-BR"><![CDATA[As habilidades ativadas das criaturas que seus oponentes controlam não podem ser ativadas.]]></LOCALISED_TEXT>
      <FILTER>
         return CreaturesInPlay() and FilteredCard():GetController():GetTeam() ~= Object():GetController():GetTeam()
      </FILTER>
      <CONTINUOUS_ACTION layer="8">
         RSN_CantUseActivatedAbilities( FilteredCard() )
      </CONTINUOUS_ACTION>
   </STATIC_ABILITY>
</CARD_V2>
It uses these functions (again if you have my mod then you already have them):
Code: Select all
RSN_AddCharacteristic = function( oSubject, nCharacteristic )
   if (oSubject ~= nil) then
      local oCharacteristics = oSubject:GetCurrentCharacteristics()
      if (oCharacteristics ~= nil) then
         oCharacteristics:Characteristic_Set( nCharacteristic, 1 )
      end
   end
end

RSN_CantUseActivatedAbilities = function( oCreature )
   RSN_AddCharacteristic( oCreature, CHARACTERISTIC_CANT_USE_ACTIVATED_ABILITIES )
end

RSN_Flying = function( oCreature )
   RSN_AddCharacteristic( oCreature, CHARACTERISTIC_FLYING )
end
RiiakShiNal
Programmer
 
Posts: 2189
Joined: 16 May 2011, 21:37
Has thanked: 75 times
Been thanked: 497 times

Re: DOTP2013 Dual Lands and Mana Selection Problems.

Postby pcastellazzi » 11 Aug 2012, 00:06

It needs some thinking, i will try some work arounds later. I think the worst case scenario should be the need to skip certain creatures (like Birds of Paradise) based on some criteria, may be a specific value in the object data chest.
The lights then came up and the crowd erupted in applause, because that's what the crowd does after it watches destruction on a large screen.
— Ben Kuchera, Mordern Warfare 3 review.
User avatar
pcastellazzi
 
Posts: 184
Joined: 25 Apr 2012, 00:40
Location: Montevideo, Uruguay
Has thanked: 11 times
Been thanked: 30 times

Re: DOTP2013 Dual Lands and Mana Selection Problems.

Postby RiiakShiNal » 11 Aug 2012, 00:42

And for the heck of it here is Burning-Tree Shaman:
Code: Select all
<?xml version='1.0'?>
<CARD_V2>
   <FILENAME text="BURNING-TREE_SHAMAN_97205" />
   <CARDNAME text="BURNING-TREE_SHAMAN" />
   <TITLE>
      <LOCALISED_TEXT LanguageCode="en-US"><![CDATA[Burning-Tree Shaman]]></LOCALISED_TEXT>
      <LOCALISED_TEXT LanguageCode="fr-FR"><![CDATA[Shamane de Brûlebranche]]></LOCALISED_TEXT>
      <LOCALISED_TEXT LanguageCode="es-ES"><![CDATA[Chamán Árbol Ardiente]]></LOCALISED_TEXT>
      <LOCALISED_TEXT LanguageCode="de-DE"><![CDATA[Brandbaum-Schamane]]></LOCALISED_TEXT>
      <LOCALISED_TEXT LanguageCode="it-IT"><![CDATA[Sciamano Brucia-Albero]]></LOCALISED_TEXT>
      <LOCALISED_TEXT LanguageCode="jp-JA"><![CDATA[炎樹族のシャーマン]]></LOCALISED_TEXT>
      <LOCALISED_TEXT LanguageCode="ko-KR"><![CDATA[Burning-Tree Shaman]]></LOCALISED_TEXT>
      <LOCALISED_TEXT LanguageCode="ru-RU"><![CDATA[Древожог-шаман]]></LOCALISED_TEXT>
      <LOCALISED_TEXT LanguageCode="pt-BR"><![CDATA[Xamã da Árvore Flamejante]]></LOCALISED_TEXT>
   </TITLE>
   <MULTIVERSEID value="97205" />
   <ARTID value="RSN97205" />
   <ARTIST name="Dan Scott" />
   <CASTING_COST cost="{1}{R}{G}" />
   <FLAVOURTEXT>
      <LOCALISED_TEXT LanguageCode="en-US"><![CDATA[Gruul shamans are bent on punishing the civilized. Any act more complex than rubbing sticks together or eating with utensils is met with the stinging burn of their magic.]]></LOCALISED_TEXT>
      <LOCALISED_TEXT LanguageCode="fr-FR"><![CDATA[Les shamanes des clans Gruul veillent à punir les êtres civilisés. Tout acte plus complexe que frotter deux branches ou manger avec des couverts est puni par l'infâme brûlure de leur magie.]]></LOCALISED_TEXT>
      <LOCALISED_TEXT LanguageCode="es-ES"><![CDATA[Los chamanes gruul se dedican a castigar a los civilizados. Cualquier acto más complejo que frotar dos palos o comer con utensilios recibe una dosis de su ardiente magia.]]></LOCALISED_TEXT>
      <LOCALISED_TEXT LanguageCode="de-DE"><![CDATA[Es gehört zu den Aufgaben der Gruul-Schamanen, die Zivilisierten zu bestrafen. Alles, was komplizierter als Essen mit Besteck oder das Aneinanderreiben von Stöcken ist, zieht ihren Zorn und ihre Magie auf sich.]]></LOCALISED_TEXT>
      <LOCALISED_TEXT LanguageCode="it-IT"><![CDATA[Gli sciamani Gruul sono risoluti a punire la civilizzazione. Qualsiasi atto che vada oltre lo sfregare due bastoncini o il mangiare con degli utensili deve fare i conti con le dolorose ustioni causate dalla loro magia.]]></LOCALISED_TEXT>
      <LOCALISED_TEXT LanguageCode="jp-JA"><![CDATA[グルールのシャーマンは文明化されたものを罰するのに熱心だ。 棒をこすり合わせたり道具を使って物を食うよりもややこしい行動は、彼らの魔法に手痛い目に遭わせられる。]]></LOCALISED_TEXT>
      <LOCALISED_TEXT LanguageCode="ko-KR"><![CDATA[Gruul shamans are bent on punishing the civilized. Any act more complex than rubbing sticks together or eating with utensils is met with the stinging burn of their magic.]]></LOCALISED_TEXT>
      <LOCALISED_TEXT LanguageCode="ru-RU"><![CDATA[Шаманы Груулов любят наказывать проявления культуры. Любая деятельность сложнее, чем трение палочек друг о друга или еда со столовыми приборами, карается страшными магическими ожогами.]]></LOCALISED_TEXT>
      <LOCALISED_TEXT LanguageCode="pt-BR"><![CDATA[Os xamãs Gruul estão empenhados em punir os civilizados. Qualquer ato mais complexo que esfregar pauzinhos ou comer com utensílios é castigado com o fogo pungente de sua mágica.]]></LOCALISED_TEXT>
   </FLAVOURTEXT>
   <TYPE metaname="Creature" />
   <SUB_TYPE metaname="Centaur" order_en-US="0" order_fr-FR="0" order_es-ES="1" order_de-DE="0" order_it-IT="1" order_jp-JA="0" order_ko-KR="0" order_ru-RU="0" order_pt-BR="0" />
   <SUB_TYPE metaname="Shaman" order_en-US="1" order_fr-FR="1" order_es-ES="0" order_de-DE="1" order_it-IT="0" order_jp-JA="1" order_ko-KR="1" order_ru-RU="1" order_pt-BR="1" />
   <EXPANSION value="GPT" />
   <RARITY metaname="R" />
   <POWER value="3" />
   <TOUGHNESS value="4" />
   <TRIGGERED_ABILITY filter_zone="ZONE_IN_PLAY">
      <LOCALISED_TEXT LanguageCode="en-US"><![CDATA[Whenever a player plays an activated ability that isn't a mana ability, Burning-Tree Shaman deals 1 damage to that player.]]></LOCALISED_TEXT>
      <LOCALISED_TEXT LanguageCode="fr-FR"><![CDATA[À chaque fois qu'un joueur joue une capacité activée qui n'est pas une capacité de mana, le Shamane de Brûlebranche inflige 1 blessure à ce joueur.]]></LOCALISED_TEXT>
      <LOCALISED_TEXT LanguageCode="es-ES"><![CDATA[Siempre que un jugador juegue una habilidad activada que no sea una habilidad de maná, el Chamán Árbol Ardiente hace 1 punto de daño a ese jugador.]]></LOCALISED_TEXT>
      <LOCALISED_TEXT LanguageCode="de-DE"><![CDATA[Immer wenn ein Spieler eine aktivierte Fähigkeit spielt, die keine Manafähigkeit ist, fügt der Brandbaum-Schamane diesem Spieler 1 Schadenspunkt zu.]]></LOCALISED_TEXT>
      <LOCALISED_TEXT LanguageCode="it-IT"><![CDATA[Ogniqualvolta un giocatore gioca un'abilità attivata che non sia un'abilità di mana, lo Sciamano Brucia-Albero infligge 1 danno a quel giocatore.]]></LOCALISED_TEXT>
      <LOCALISED_TEXT LanguageCode="jp-JA"><![CDATA[いずれかのプレイヤーがマナ能力でない起動型能力をプレイするたび、炎樹族のシャーマンはそのプレイヤーに1点のダメージを与える。]]></LOCALISED_TEXT>
      <LOCALISED_TEXT LanguageCode="ko-KR"><![CDATA[Whenever a player plays an activated ability that isn't a mana ability, Burning-Tree Shaman deals 1 damage to that player.]]></LOCALISED_TEXT>
      <LOCALISED_TEXT LanguageCode="ru-RU"><![CDATA[Каждый раз, когда игрок разыгрывает активируемую способность |(кроме способности создания маны)|, Древожог-шаман наносит этому игроку 1 повреждение.]]></LOCALISED_TEXT>
      <LOCALISED_TEXT LanguageCode="pt-BR"><![CDATA[Toda vez que um jogador joga uma habilidade ativada que não seja uma habilidade de mana, Xamã da Árvore Flamejante causa 1 ponto de dano àquele jogador.]]></LOCALISED_TEXT>
      <TRIGGER value="ACTIVATED_ABILITY_PLAYED">
         return (TriggerObject() ~= nil) and (TriggerObject():GetPlayer() ~= nil)
      </TRIGGER>
      <RESOLUTION_TIME_ACTION>
         if (TriggerObject() ~= nil) then
            if (TriggerObject():GetPlayer() ~= nil) then
               TriggerObject():GetPlayer():DealDamage( 1, Object() )
            end
         end
      </RESOLUTION_TIME_ACTION>
   </TRIGGERED_ABILITY>
</CARD_V2>
pcastellazzi wrote:It needs some thinking, i will try some work arounds later. I think the worst case scenario should be the need to skip certain creatures (like Birds of Paradise) based on some criteria, may be a specific value in the object data chest.
If you start adding work-arounds to cards that actually don't need them (like the above) then you may start having other problems. For example if you code the cards to ignore cards that are using your mana functions then someone codes Ceta Disciple, Coalition Relic, or Scuttlemutt using your code and someone uses Ice Cage or Linvala, Keeper of Silence, or Burning-Tree Shaman then they would allow use of both abilities, and the player would not take damage for using them.

Just imagine the problems that could be caused if that happened with Gemhide Sliver.

I think this is an issue that just isn't going to go away at least not until we get proper mana abilities that don't need a work-around like this.

Of course nabeshin's mana token code will have similar issues with regard to activated abilities though his also has issues with triggers for things that come into play.
RiiakShiNal
Programmer
 
Posts: 2189
Joined: 16 May 2011, 21:37
Has thanked: 75 times
Been thanked: 497 times

Re: DOTP2013 Dual Lands and Mana Selection Problems.

Postby Tyrany » 11 Aug 2012, 05:37

Hi, need some advice, i was trying to make a gemhide sliver based on your code and i'm facing some problems as the grant ability crap skips the activated ability and goes straight to the first mana ability, so maybe you can give me some advice on how to do this please

Code: Select all
<?xml version='1.0'?>
<CARD_V2>
  <FILENAME text="GEMHIDE_SLIVER_19851042" />
  <CARDNAME text="GEMHIDE_SLIVER" />
  <TITLE>
    <LOCALISED_TEXT LanguageCode="en-US"><![CDATA[Gemhide Sliver]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="fr-FR"><![CDATA[Gemhide Sliver]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="es-ES"><![CDATA[Gemhide Sliver]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="de-DE"><![CDATA[Gemhide Sliver]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="it-IT"><![CDATA[Gemhide Sliver]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="jp-JA"><![CDATA[Gemhide Sliver]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="ko-KR"><![CDATA[Gemhide Sliver]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="ru-RU"><![CDATA[Gemhide Sliver]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="pt-BR"><![CDATA[Gemhide Sliver]]></LOCALISED_TEXT>
  </TITLE>
  <MULTIVERSEID value="19851042" />
  <ARTID value="19851042" />
  <ARTIST name="John Matson" />
  <CASTING_COST cost="{1}{G}" />
  <FLAVOURTEXT>
    <LOCALISED_TEXT LanguageCode="en-US"><![CDATA[“The land is weary. Even Skyshroud is depleted. We must find another source of mana—one that is growing despite our withering world.”
—Freyalise]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="fr-FR"><![CDATA[“The land is weary. Even Skyshroud is depleted. We must find another source of mana—one that is growing despite our withering world.”
—Freyalise]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="es-ES"><![CDATA[“The land is weary. Even Skyshroud is depleted. We must find another source of mana—one that is growing despite our withering world.”
—Freyalise]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="de-DE"><![CDATA[“The land is weary. Even Skyshroud is depleted. We must find another source of mana—one that is growing despite our withering world.”
—Freyalise]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="it-IT"><![CDATA[“The land is weary. Even Skyshroud is depleted. We must find another source of mana—one that is growing despite our withering world.”
—Freyalise]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="jp-JA"><![CDATA[“The land is weary. Even Skyshroud is depleted. We must find another source of mana—one that is growing despite our withering world.”
—Freyalise]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="ko-KR"><![CDATA[“The land is weary. Even Skyshroud is depleted. We must find another source of mana—one that is growing despite our withering world.”
—Freyalise]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="ru-RU"><![CDATA[“The land is weary. Even Skyshroud is depleted. We must find another source of mana—one that is growing despite our withering world.”
—Freyalise]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="pt-BR"><![CDATA[“The land is weary. Even Skyshroud is depleted. We must find another source of mana—one that is growing despite our withering world.”
—Freyalise]]></LOCALISED_TEXT>
  </FLAVOURTEXT>
  <TYPE metaname="Creature" />
  <SUB_TYPE metaname="Sliver" />
  <EXPANSION value="TSP" />
  <RARITY metaname="C" />
  <POWER value="1" />
  <TOUGHNESS value="1" />
  <STATIC_ABILITY filter_zone="ZONE_IN_PLAY">
    <LOCALISED_TEXT LanguageCode="en-US"><![CDATA[All Slivers have “{T}: Add one mana of any color to your mana pool.”]]></LOCALISED_TEXT>
   <LOCALISED_TEXT LanguageCode="fr-FR"><![CDATA[All Slivers have “{T}: Add one mana of any color to your mana pool.”]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="es-ES"><![CDATA[All Slivers have “{T}: Add one mana of any color to your mana pool.”]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="de-DE"><![CDATA[All Slivers have “{T}: Add one mana of any color to your mana pool.”]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="it-IT"><![CDATA[All Slivers have “{T}: Add one mana of any color to your mana pool.”]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="jp-JA"><![CDATA[All Slivers have “{T}: Add one mana of any color to your mana pool.”]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="ko-KR"><![CDATA[All Slivers have “{T}: Add one mana of any color to your mana pool.”]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="ru-RU"><![CDATA[All Slivers have “{T}: Add one mana of any color to your mana pool.”]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="pt-BR"><![CDATA[All Slivers have “{T}: Add one mana of any color to your mana pool.”]]></LOCALISED_TEXT>
    <FILTER>
    return not InPlay() or FilteredCard():GetSubType():Test( CREATURE_TYPE_SLIVER ) ~= 0
    </FILTER>
    <CONTINUOUS_ACTION layer="6">
    if FilteredCard() ~= nil then
     FilteredCard():GetCurrentCharacteristics():GrantAbility(1)
    end
    </CONTINUOUS_ACTION>
  </STATIC_ABILITY>
 
 <ACTIVATED_ABILITY filter_zone="ZONE_IN_PLAY">
    <LOCALISED_TEXT LanguageCode="en-US"><![CDATA[{T}:Add one mana of any color to your mana pool.]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="de-DE"><![CDATA[{T}:Erhöhe deinen Manavorrat um ein Mana einer beliebigen Farbe.]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="es-ES"><![CDATA[{T}:Agrega un maná de cualquier color a tu reserva de maná.]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="fr-FR"><![CDATA[{T}:Ajoutez un mana de la couleur de votre choix à votre réserve.]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="it-IT"><![CDATA[{T}:Aggiungi un mana di un qualsiasi colore alla tua riserva di mana.]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="jp-JA"><![CDATA[{T}:??????·?????????1????1??????]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="ko-KR"><![CDATA[{T}:??? ???? ??? ?? ?? ? ?? ???.]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="ru-RU"><![CDATA[{T}:???????? ???? ???? ?????? ????? ? ???? ????????? ????.]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="pt-BR"><![CDATA[{T}:Adicione um mana de qualquer cor à sua reserva de mana.]]></LOCALISED_TEXT>
 
    <COST type="Generic">
      <TARGET_DETERMINATION>

        if MultiLand:AIWithinTurnLimit(3) and Object():Tapped() == 0 then
          return 1
        else
          return 0
        end
      </TARGET_DETERMINATION>
    </COST>
   
    <RESOLUTION_TIME_ACTION>
 
      MultiLand:SelectColour(MultiLand.MANA_COLOUR_ALL)

    </RESOLUTION_TIME_ACTION>
   
    <RESOLUTION_TIME_ACTION>
   
      MultiLand:SetColourFromUserChoice()
 
    </RESOLUTION_TIME_ACTION>
  </ACTIVATED_ABILITY>
 
  <STATIC_ABILITY internal="1" filter_zone="ZONE_IN_PLAY">
    <CONTINUOUS_ACTION layer="6">
 
      MultiLand:SetCurrentAbility()
   
    </CONTINUOUS_ACTION>
  </STATIC_ABILITY>

  <MANA_ABILITY resource_id="1" filter_zone="ZONE_IN_PLAY">
    LOCALISED_TEXT LanguageCode="en-US"><![CDATA[{T}:Add one mana of any color to your mana pool.]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="de-DE"><![CDATA[{T}:Erhöhe deinen Manavorrat um ein Mana einer beliebigen Farbe.]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="es-ES"><![CDATA[{T}:Agrega un maná de cualquier color a tu reserva de maná.]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="fr-FR"><![CDATA[{T}:Ajoutez un mana de la couleur de votre choix à votre réserve.]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="it-IT"><![CDATA[{T}:Aggiungi un mana di un qualsiasi colore alla tua riserva di mana.]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="jp-JA"><![CDATA[{T}:??????·?????????1????1??????]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="ko-KR"><![CDATA[{T}:??? ???? ??? ?? ?? ? ?? ???.]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="ru-RU"><![CDATA[{T}:???????? ???? ???? ?????? ????? ? ???? ????????? ????.]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="pt-BR"><![CDATA[{T}:Adicione um mana de qualquer cor à sua reserva de mana.]]></LOCALISED_TEXT>
    <COST type="TapSelf" />
    <PRODUCES amount="{W}" />
  </MANA_ABILITY>
 
  <MANA_ABILITY resource_id="2" filter_zone="ZONE_IN_PLAY">
    <LOCALISED_TEXT LanguageCode="en-US"><![CDATA[{T}:Add one mana of any color to your mana pool.]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="de-DE"><![CDATA[{T}:Erhöhe deinen Manavorrat um ein Mana einer beliebigen Farbe.]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="es-ES"><![CDATA[{T}:Agrega un maná de cualquier color a tu reserva de maná.]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="fr-FR"><![CDATA[{T}:Ajoutez un mana de la couleur de votre choix à votre réserve.]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="it-IT"><![CDATA[{T}:Aggiungi un mana di un qualsiasi colore alla tua riserva di mana.]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="jp-JA"><![CDATA[{T}:??????·?????????1????1??????]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="ko-KR"><![CDATA[{T}:??? ???? ??? ?? ?? ? ?? ???.]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="ru-RU"><![CDATA[{T}:???????? ???? ???? ?????? ????? ? ???? ????????? ????.]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="pt-BR"><![CDATA[{T}:Adicione um mana de qualquer cor à sua reserva de mana.]]></LOCALISED_TEXT>
    <COST type="TapSelf" />
    <PRODUCES amount="{U}" />
  </MANA_ABILITY>
 
  <MANA_ABILITY resource_id="3" filter_zone="ZONE_IN_PLAY">
    <OCALISED_TEXT LanguageCode="en-US"><![CDATA[{T}:Add one mana of any color to your mana pool.]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="de-DE"><![CDATA[{T}:Erhöhe deinen Manavorrat um ein Mana einer beliebigen Farbe.]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="es-ES"><![CDATA[{T}:Agrega un maná de cualquier color a tu reserva de maná.]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="fr-FR"><![CDATA[{T}:Ajoutez un mana de la couleur de votre choix à votre réserve.]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="it-IT"><![CDATA[{T}:Aggiungi un mana di un qualsiasi colore alla tua riserva di mana.]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="jp-JA"><![CDATA[{T}:??????·?????????1????1??????]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="ko-KR"><![CDATA[{T}:??? ???? ??? ?? ?? ? ?? ???.]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="ru-RU"><![CDATA[{T}:???????? ???? ???? ?????? ????? ? ???? ????????? ????.]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="pt-BR"><![CDATA[{T}:Adicione um mana de qualquer cor à sua reserva de mana.]]></LOCALISED_TEXT>
    <COST type="TapSelf" />
    <PRODUCES amount="{B}" />
  </MANA_ABILITY>   
 
  <MANA_ABILITY resource_id="4" filter_zone="ZONE_IN_PLAY">
   <LOCALISED_TEXT LanguageCode="en-US"><![CDATA[{T}:Add one mana of any color to your mana pool.]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="de-DE"><![CDATA[{T}:Erhöhe deinen Manavorrat um ein Mana einer beliebigen Farbe.]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="es-ES"><![CDATA[{T}:Agrega un maná de cualquier color a tu reserva de maná.]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="fr-FR"><![CDATA[{T}:Ajoutez un mana de la couleur de votre choix à votre réserve.]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="it-IT"><![CDATA[{T}:Aggiungi un mana di un qualsiasi colore alla tua riserva di mana.]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="jp-JA"><![CDATA[{T}:??????·?????????1????1??????]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="ko-KR"><![CDATA[{T}:??? ???? ??? ?? ?? ? ?? ???.]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="ru-RU"><![CDATA[{T}:???????? ???? ???? ?????? ????? ? ???? ????????? ????.]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="pt-BR"><![CDATA[{T}:Adicione um mana de qualquer cor à sua reserva de mana.]]></LOCALISED_TEXT>

    <COST type="TapSelf" />
    <PRODUCES amount="{R}" />
  </MANA_ABILITY>
 
  <MANA_ABILITY resource_id="5" filter_zone="ZONE_IN_PLAY">
    <LOCALISED_TEXT LanguageCode="en-US"><![CDATA[{T}:Add one mana of any color to your mana pool.]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="de-DE"><![CDATA[{T}:Erhöhe deinen Manavorrat um ein Mana einer beliebigen Farbe.]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="es-ES"><![CDATA[{T}:Agrega un maná de cualquier color a tu reserva de maná.]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="fr-FR"><![CDATA[{T}:Ajoutez un mana de la couleur de votre choix à votre réserve.]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="it-IT"><![CDATA[{T}:Aggiungi un mana di un qualsiasi colore alla tua riserva di mana.]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="jp-JA"><![CDATA[{T}:??????·?????????1????1??????]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="ko-KR"><![CDATA[{T}:??? ???? ??? ?? ?? ? ?? ???.]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="ru-RU"><![CDATA[{T}:???????? ???? ???? ?????? ????? ? ???? ????????? ????.]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="pt-BR"><![CDATA[{T}:Adicione um mana de qualquer cor à sua reserva de mana.]]></LOCALISED_TEXT>

    <COST type="TapSelf" />
    <PRODUCES amount="{G}" />
  </MANA_ABILITY>

  <TRIGGERED_ABILITY internal="1" filter_zone="ZONE_IN_PLAY">
    <TRIGGER value="BEGINNING_OF_STEP">
 
      return (MTG():GetStep() == STEP_END_OF_TURN)
   
    </TRIGGER>
   
    <RESOLUTION_TIME_ACTION>
 
      MultiLand:AIResetTurnLimit()
 
    </RESOLUTION_TIME_ACTION>
  </TRIGGERED_ABILITY>
   <AI_BASE_SCORE score="300" zone="ZONE_IN_PLAY" />
 

  <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="0" zone="ZONE_IN_PLAY" />
  </CARD_V2
Tyrany
 
Posts: 20
Joined: 07 Jul 2012, 01:34
Has thanked: 1 time
Been thanked: 2 times

Next

Return to Programming Talk

Who is online

Users browsing this forum: No registered users and 4 guests

Main Menu

User Menu

Our Partners


Who is online

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

Login Form