It is currently 12 Nov 2025, 00:32
   
Text Size

Inkmoth Nexus, Mutavault and the sorts

Moderator: CCGHQ Admins

Inkmoth Nexus, Mutavault and the sorts

Postby --Dream-- » 07 Sep 2012, 17:41

Is there any way of preventing these cards from using their own mana ability to transform into creatures?

Here's my Mutavault code:

Code: Select all
<?xml version='1.0'?>
<CARD_V2>
  <FILENAME text="MUTAVAULT_152724" />
  <CARDNAME text="MUTAVAULT" />
  <TITLE>
    <LOCALISED_TEXT LanguageCode="en-US"><![CDATA[Mutavault]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="de-DE"><![CDATA[Mutavault]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="es-ES"><![CDATA[Mutavault]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="fr-FR"><![CDATA[Mutavault]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="it-IT"><![CDATA[Mutavault]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="jp-JA"><![CDATA[Mutavault]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="ko-KR"><![CDATA[Mutavault]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="ru-RU"><![CDATA[Mutavault]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="pt-BR"><![CDATA[Mutavault]]></LOCALISED_TEXT>
  </TITLE>
  <MULTIVERSEID value="152724" />
  <ARTID value="152724" />
  <ARTIST name="Fred Fields" />
  <CASTING_COST cost="" />
  <FLAVOURTEXT>
    <LOCALISED_TEXT LanguageCode="en-US"><![CDATA[Some changelings born at Velis Vel never return, but their essence never leaves.]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="de-DE"><![CDATA[Some changelings born at Velis Vel never return, but their essence never leaves.]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="es-ES"><![CDATA[Some changelings born at Velis Vel never return, but their essence never leaves.]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="fr-FR"><![CDATA[Some changelings born at Velis Vel never return, but their essence never leaves.]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="it-IT"><![CDATA[Some changelings born at Velis Vel never return, but their essence never leaves.]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="jp-JA"><![CDATA[Some changelings born at Velis Vel never return, but their essence never leaves.]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="ko-KR"><![CDATA[Some changelings born at Velis Vel never return, but their essence never leaves.]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="ru-RU"><![CDATA[Some changelings born at Velis Vel never return, but their essence never leaves.]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="pt-BR"><![CDATA[Some changelings born at Velis Vel never return, but their essence never leaves.]]></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[{1}: Mutavault becomes a 2/2 creature with all creature types until end of turn. It's still a land.]]></LOCALISED_TEXT>
   <LOCALISED_TEXT LanguageCode="es-ES"><![CDATA[{1}: Mutavault becomes a 2/2 creature with all creature types until end of turn. It's still a land.]]></LOCALISED_TEXT>
   <LOCALISED_TEXT LanguageCode="de-DE"><![CDATA[{1}: Mutavault becomes a 2/2 creature with all creature types until end of turn. It's still a land.]]></LOCALISED_TEXT>
   <LOCALISED_TEXT LanguageCode="fr-FR"><![CDATA[{1}: Mutavault becomes a 2/2 creature with all creature types until end of turn. It's still a land.]]></LOCALISED_TEXT>
   <LOCALISED_TEXT LanguageCode="it-IT"><![CDATA[{1}: Mutavault becomes a 2/2 creature with all creature types until end of turn. It's still a land.]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="jp-JA"><![CDATA[{1}: Mutavault becomes a 2/2 creature with all creature types until end of turn. It's still a land.]]></LOCALISED_TEXT>
   <COST type="Mana" cost="{1}" />
    <CONTINUOUS_ACTION layer="3">
       
    -- Silly Mutavault uses its own colorless mana to transform itself.
    -- Makes the card mostly useless.
    -- Hope someone eventually finds a fix for that.
       
    local target = Object()
    if target ~= nil then
       local characteristics = target:GetCurrentCharacteristics()
       characteristics:CardType_GetWritable(target):Add( CARD_TYPE_CREATURE, target )
    end
    </CONTINUOUS_ACTION>
    <CONTINUOUS_ACTION layer="7B">
    local target = Object()
    if target ~= nil then
       local characteristics = target:GetCurrentCharacteristics()
       characteristics:Power_Set( 2 )
       characteristics:Toughness_Set( 2 )
    end
    </CONTINUOUS_ACTION>
    <CONTINUOUS_ACTION layer="6">
    local target = Object()
    if target ~= nil then 
       local characteristics = target:GetCurrentCharacteristics()
       characteristics:Characteristic_Set( CHARACTERISTIC_CHANGELING, 1 )
   end
    </CONTINUOUS_ACTION>
    <DURATION simple_duration="UntilEOT" />
    <AI_AVAILABILITY step="main_1" turn="my_turn" />
    <AI_AVAILABILITY step="declare_blockers" blocking_or_blocked="1" />
  </ACTIVATED_ABILITY>
</CARD_V2>
--Dream--
 
Posts: 65
Joined: 28 Jul 2012, 12:01
Has thanked: 4 times
Been thanked: 0 time

Re: Inkmoth Nexus, Mutavault and the sorts

Postby BlindWillow » 07 Sep 2012, 17:51

My half-assed solution has been simply to have lands such as Inkmoth Nexus add colors of mana that the decks they are in don't use. That way you can deselect them when choosing how to pay mana costs. I don't like it. I tried other solutions such as deactivating the mana ability when the land becomes a creature, but the big problem is that the game crashes whenever you have a mana ability (or group of mana abilities) that becomes unused.
BlindWillow
 
Posts: 213
Joined: 19 Jul 2012, 00:26
Has thanked: 11 times
Been thanked: 46 times

Re: Inkmoth Nexus, Mutavault and the sorts

Postby pcastellazzi » 07 Sep 2012, 18:22

Did you try to replace the mana ability with a secondary mana ability producing {0}?

Also adding a new ability to choose between the two may work, may be in combination with a produce {0} mana ability if you cant replace the mana ability for an activated abiltiy without the game crashing.
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: Inkmoth Nexus, Mutavault and the sorts

Postby --Dream-- » 07 Sep 2012, 18:25

BlindWillow wrote:My half-assed solution has been simply to have lands such as Inkmoth Nexus add colors of mana that the decks they are in don't use. That way you can deselect them when choosing how to pay mana costs. I don't like it.
The AI wouldnt know how to use that, right? But it's weird how it doesnt even let a human player do it. I mean, how come <COST type="Mana" cost="{1}" /> doesnt mean "can be payed with one mana of any colour" like it should be?
--Dream--
 
Posts: 65
Joined: 28 Jul 2012, 12:01
Has thanked: 4 times
Been thanked: 0 time

Re: Inkmoth Nexus, Mutavault and the sorts

Postby --Dream-- » 07 Sep 2012, 18:30

pcastellazzi wrote:Did you try to replace the mana ability with a secondary mana ability producing {0}?

Also adding a new ability to choose between the two may work, may be in combination with a produce {0} mana ability if you cant replace the mana ability for an activated abiltiy without the game crashing.
So you suggest having two mana abilities and switching to the one that produces 0 whenever we want to transform the land into a creature?
--Dream--
 
Posts: 65
Joined: 28 Jul 2012, 12:01
Has thanked: 4 times
Been thanked: 0 time

Re: Inkmoth Nexus, Mutavault and the sorts

Postby pcastellazzi » 07 Sep 2012, 18:36

--Dream-- wrote:So you suggest having two mana abilities and switching to the one that produces 0 whenever we want to transform the land into a creature?
Yes.
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: Inkmoth Nexus, Mutavault and the sorts

Postby pcastellazzi » 07 Sep 2012, 18:40

--Dream-- wrote:The AI wouldnt know how to use that, right? But it's weird how it doesnt even let a human player do it. I mean, how come <COST type="Mana" cost="{1}" /> doesnt mean "can be payed with one mana of any colour" like it should be?
For the mana selection algorithm used by the game {1} is treated like a colour, so everything producing {1} have priority over any other colour. Even is the source is the same object.
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: Inkmoth Nexus, Mutavault and the sorts

Postby --Dream-- » 07 Sep 2012, 20:20

pcastellazzi wrote:
--Dream-- wrote:So you suggest having two mana abilities and switching to the one that produces 0 whenever we want to transform the land into a creature?
Yes.
Would something like this work?

Code: Select all
<ACTIVATED_ABILITY filter_zone="ZONE_IN_PLAY">
   <LOCALISED_TEXT LanguageCode="en-US"><![CDATA[{1}: Mutavault becomes a 2/2 creature with all creature types until end of turn. It's still a land.]]></LOCALISED_TEXT>
   <LOCALISED_TEXT LanguageCode="es-ES"><![CDATA[{1}: Mutavault becomes a 2/2 creature with all creature types until end of turn. It's still a land.]]></LOCALISED_TEXT>
   <LOCALISED_TEXT LanguageCode="de-DE"><![CDATA[{1}: Mutavault becomes a 2/2 creature with all creature types until end of turn. It's still a land.]]></LOCALISED_TEXT>
   <LOCALISED_TEXT LanguageCode="fr-FR"><![CDATA[{1}: Mutavault becomes a 2/2 creature with all creature types until end of turn. It's still a land.]]></LOCALISED_TEXT>
   <LOCALISED_TEXT LanguageCode="it-IT"><![CDATA[{1}: Mutavault becomes a 2/2 creature with all creature types until end of turn. It's still a land.]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="jp-JA"><![CDATA[{1}: Mutavault becomes a 2/2 creature with all creature types until end of turn. It's still a land.]]></LOCALISED_TEXT>
    <COST type="Generic">
      <RESOLUTION_TIME_ACTION>
      local characteristics = Object():GetCurrentCharacteristics()
     characteristics:GrantAbility(2)
      </RESOLUTION_TIME_ACTION>
    </COST>
   <COST type="Mana" cost="{1}" />
--Dream--
 
Posts: 65
Joined: 28 Jul 2012, 12:01
Has thanked: 4 times
Been thanked: 0 time

Re: Inkmoth Nexus, Mutavault and the sorts

Postby RiiakShiNal » 07 Sep 2012, 20:42

pcastellazzi wrote:
--Dream-- wrote:So you suggest having two mana abilities and switching to the one that produces 0 whenever we want to transform the land into a creature?
Yes.
Having a mana ability that produces {0} is functionally the same as having no mana abilities on the card (unused mana abilities) and the game crashes (I tried that on Life and Limb with no success). For the game not to crash any card that has a mana ability (used or not) must be able to produce at least one mana (either colourless or of any color).
RiiakShiNal
Programmer
 
Posts: 2189
Joined: 16 May 2011, 21:37
Has thanked: 75 times
Been thanked: 497 times

Re: Inkmoth Nexus, Mutavault and the sorts

Postby BlindWillow » 07 Sep 2012, 21:49

I really don't think there is a good solution to this issue as of yet. I really hope the Stainless folks can be convinced to change the way colorless mana is handled. Maybe if a future DLC has more colorless mana sources, they will. Until then, here's how I coded Inkmoth Nexus to work in my B/G Infect deck:

Code: Select all
  <MANA_ABILITY filter_zone="ZONE_IN_PLAY">
    <PRODUCES amount="{W}" />
  </MANA_ABILITY>
  <ACTIVATED_ABILITY>
    <COST type="Mana" cost="{B/G}" />
    <CONTINUOUS_ACTION layer="3">
    local characteristics = Object():GetCurrentCharacteristics()
    characteristics:CardType_GetWritable(Object()):Add( CARD_TYPE_ARTIFACT, Object() )
    </CONTINUOUS_ACTION>
    <CONTINUOUS_ACTION layer="3">
    local characteristics = Object():GetCurrentCharacteristics()
    characteristics:CardType_GetWritable(Object()):Add( CARD_TYPE_CREATURE, Object() )
    </CONTINUOUS_ACTION>
    <CONTINUOUS_ACTION layer="4">
    local characteristics = Object():GetCurrentCharacteristics()
    characteristics:SubType_GetWritable(Object()):Add( CREATURE_TYPE_BLINKMOTH , Object() )
    </CONTINUOUS_ACTION>
    <CONTINUOUS_ACTION layer="7B">
    local characteristics = Object():GetCurrentCharacteristics()
    characteristics:Power_Set( 1 )
    characteristics:Toughness_Set( 1 )
    </CONTINUOUS_ACTION>
    <CONTINUOUS_ACTION layer="6">
    local characteristics = Object():GetCurrentCharacteristics()
    characteristics:Characteristic_Set(CHARACTERISTIC_FLYING, 1 )
    characteristics:Characteristic_Set(CHARACTERISTIC_INFECT, 1 )
    </CONTINUOUS_ACTION>
    <DURATION simple_duration="UntilEOT" />
    <AI_AVAILABILITY step="begin_combat" turn="their_turn" />
    <AI_AVAILABILITY step="main_1" turn="my_turn" />
    <AI_AVAILABILITY step="declare_attackers" turn="their_turn" />
    <AI_AVAILABILITY step="declare_blockers" />
  </ACTIVATED_ABILITY>
BlindWillow
 
Posts: 213
Joined: 19 Jul 2012, 00:26
Has thanked: 11 times
Been thanked: 46 times

Re: Inkmoth Nexus, Mutavault and the sorts

Postby pcastellazzi » 09 Sep 2012, 15:27

I am having a similar problem while trying to code Gavony Township. I found a partial solution to it. Instead of using a mana cost, i used a generic cost incremented by {1} and handled the mana tapping manually for the true cost. For this to work properly the tap self cost must be before this code.

Code: Select all
<COST type="Generic">
  <TARGET_DETERMINATION>
  <![CDATA[
    return EffectController():CanAfford("{3}{G}{W}")
  ]]>
  </TARGET_DETERMINATION>

  <RESOLUTION_TIME_ACTION>
  <![CDATA[
    EffectController():TapLand("{2}{G}{W}")
  ]]>
  </RESOLUTION_TIME_ACTION>
</COST>
A full solution can be achieved with mana tokens, but i am guessing you were asking for a solution without them.
Attachments
GAVONY_TOWNSHIP_233242.XML.TXT
Complete Gavony Township code.
(6.86 KiB) Downloaded 415 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


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