It is currently 25 Apr 2024, 12:59
   
Text Size

Produce two colored manas ?

Moderator: CCGHQ Admins

Produce two colored manas ?

Postby Persee » 17 Jul 2012, 19:06

Hello,

I try to code Remote Farm but I don't know how produce 2 colored mana in a single mana ability.

I tried 3 different codes :

<MANA_ABILITY resource_id="0" filter_zone="ZONE_IN_PLAY">
<COST type="TapSelf" />
<PRODUCES amount="{W}{W}" />
</MANA_ABILITY>

=> the land doesn't work at all.

<MANA_ABILITY resource_id="0" filter_zone="ZONE_IN_PLAY">
<COST type="TapSelf" />
<PRODUCES amount="{W}" />
<PRODUCES amount="{W}" />
</MANA_ABILITY>

=> the game crashes.

<MANA_ABILITY resource_id="0" filter_zone="ZONE_IN_PLAY">
<COST type="TapSelf" />
<PRODUCES amount="{WW}" />
</MANA_ABILITY>

=> when I play a land the Remote Farm get tapped #-o


If someone have a idea....if it's possible to do this

Thanks
Last edited by Persee on 18 Jul 2012, 08:12, edited 1 time in total.
User avatar
Persee
 
Posts: 168
Joined: 02 Jun 2011, 08:33
Has thanked: 42 times
Been thanked: 24 times

Re: Produce two colored manas ?

Postby RiiakShiNal » 17 Jul 2012, 20:15

Instead of granting the mana ability using a resource id, why don't you try removing the depletion counter as a result of using its mana ability like this:
Code: Select all
<MANA_ABILITY>
   <COST type="TapSelf" />
   <PRODUCES amount="{W}{W}" />
</MANA_ABILITY>
<TRIGGERED_ABILITY internal="1">
   <TRIGGER value="BECAME_TAPPED_FOR_MANA" simple_qualifier="self" />
   <RESOLUTION_TIME_ACTION>
      -- Remove the depletion counter and check to see if you need to sacrifice it.
   </RESOLUTION_TIME_ACTION>
</TRIGGERED_ABILITY>
The reason I say this is that I have noticed game crashes when you grant a mana ability without having it active at all times. So if nothing else this will allow you to try your three possibilities again with possibly different results due to not having to grant the mana ability.
RiiakShiNal
Programmer
 
Posts: 2185
Joined: 16 May 2011, 21:37
Has thanked: 75 times
Been thanked: 497 times

Re: Produce two colored manas ?

Postby pcastellazzi » 17 Jul 2012, 21:52

I did not thest this. But something like this should probably work.

Code: Select all
<TRIGGERED_ABILITY internal="1">
  <TRIGGER value="ZONECHANGE_END" simple_qualifier="self" to_zone="ZONE_IN_PLAY" />
  <RESOLUTION_TIME_ACTION>
  Object():AddCounters(MTG():GetCountersType("DEPLETION"), 2)
  </RESOLUTION_TIME_ACTION>
</TRIGGERED_ABILITY>

<MANA_ABILITY>
  <COST type="CountersSelf" name="DEPLETION" number="-1" />
  <COST type="TapSelf" />
  <PRODUCES amount="{W}{W}" />
</MANA_ABILITY>

<TRIGGERED_ABILITY internal="1">
  <TRIGGER value="BECAME_TAPPED_FOR_MANA" simple_qualifier="self" />
  <RESOLUTION_TIME_ACTION>
  if Object():CountCounters(MTG():GetCountersType("DEPLETION")) == 0 then
    Object():Sacrifice()
  end
  </RESOLUTION_TIME_ACTION>
</TRIGGERED_ABILITY>
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: Produce two colored manas ?

Postby thefiremind » 17 Jul 2012, 22:17

pcastellazzi wrote:I did not thest this. But something like this should probably work.
I didn't test it either, but I'm afraid that the additional cost on the mana ability will be simply ignored. Mana abilities are still very limited.
< 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


Return to Programming Talk

Who is online

Users browsing this forum: No registered users and 16 guests


Who is online

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

Login Form