It is currently 11 May 2025, 10:07
   
Text Size

Ideas for "Convoke" ability?

Moderator: CCGHQ Admins

Ideas for "Convoke" ability?

Postby Zambooo » 12 Jul 2012, 20:02

I have no idea of where to start... Is there someone who got any ideas??
User avatar
Zambooo
 
Posts: 242
Joined: 01 Jul 2012, 21:33
Has thanked: 19 times
Been thanked: 17 times

Re: Ideas for "Convoke" ability?

Postby RiiakShiNal » 12 Jul 2012, 21:14

It's not a very clean idea, but you could make Convoke by using an in hand activated ability which allows you to tap creatures up to the casting cost (though you would have to detect creature color and adjust accordingly) to reduce the casting cost until say end of phase so that the card with convoke could be cast at the lower cost. Though this method has multiple drawbacks:
- The player could tap their own creatures without casting the card with convoke.
- If the player doesn't cast the card in the phase in which they tapped the creatures, the cost would go back up.
- The AI may not be able to understand how to use the ability.
RiiakShiNal
Programmer
 
Posts: 2188
Joined: 16 May 2011, 21:37
Has thanked: 75 times
Been thanked: 497 times

Re: Ideas for "Convoke" ability?

Postby thefiremind » 12 Jul 2012, 21:14

Convoke is more complicated than it could appear to a new modder. It's not a fixed alternative cost because you can decide how much you want to pay with creatures and how much with mana. And we don't have access to the real mana cost of the card, that's a problem if we want to know how much coloured mana we can decrease from the cost. That said, the fact that I don't have any good ideas about it doesn't mean that it's impossible... I still hope that someone finds a brilliant idea for provoke (not the card but the keyword) and similar abilities, for example. :wink:
< 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: Ideas for "Convoke" ability?

Postby RiiakShiNal » 12 Jul 2012, 21:36

Hey it's pretty funny that we both posted two completely different responses in the same minute.
RiiakShiNal
Programmer
 
Posts: 2188
Joined: 16 May 2011, 21:37
Has thanked: 75 times
Been thanked: 497 times

Re: Ideas for "Convoke" ability?

Postby thefiremind » 12 Jul 2012, 21:38

Well, apparently different, but I actually had the same idea as you, I just explained the problems that prevent it from being coded properly rather than explaining how it works. :D
< 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: Ideas for "Convoke" ability?

Postby RiiakShiNal » 12 Jul 2012, 21:48

True, though since the ability would need to be coded on the card simply hard-coding in the casting cost would overcome that problem. For example with Conclave Equenaut you could code in that it has 2 white mana that could be reduced out along with 4 colourless mana, but cards like Chord of Calling could still be an issue due to a variable colourless mana cost.

As for Provoke (ability, not card) there is a problematic solution to that in that you untap a target creature, set the must block if able characteristic and temporarily grant it a triggered ability for the can't block test and say it can't block any creature but the one with that provoked it. The problem with that solution would be if it can't block that creature then it also would not be allowed to block any others unless we could somehow do a test to see if it would be possible for the creature to block the provoking creature inside the can't block test.
RiiakShiNal
Programmer
 
Posts: 2188
Joined: 16 May 2011, 21:37
Has thanked: 75 times
Been thanked: 497 times

Re: Ideas for "Convoke" ability?

Postby thefiremind » 12 Jul 2012, 22:20

RiiakShiNal wrote:True, though since the ability would need to be coded on the card simply hard-coding in the casting cost would overcome that problem.
We still have the problems you talked about in your previous post, unless we make as many alternative costs as the possible combinations of spent mana and tapped creatures... which would be probably impossible as well because I don't think that the game supports arbitrary amounts of alternative costs.

RiiakShiNal wrote:The problem with that solution would be if it can't block that creature then it also would not be allowed to block any others unless we could somehow do a test to see if it would be possible for the creature to block the provoking creature inside the can't block test.
It's always the point in which I get stuck when I try to invent a solution.
< 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: Ideas for "Convoke" ability?

Postby RiiakShiNal » 13 Jul 2012, 01:30

thefiremind wrote:We still have the problems you talked about in your previous post, unless we make as many alternative costs as the possible combinations of spent mana and tapped creatures... which would be probably impossible as well because I don't think that the game supports arbitrary amounts of alternative costs.
Yes, there are still the problems I mentioned before, but I don't see what you mean by making "as many alternative costs as the possible combinations of spent mana and tapped creatures" as my idea does work and to prove it here is a working Conclave Equenaut (using my method which does have the drawbacks listed above).
Code: Select all
<?xml version='1.0'?>
<CARD_V2>
   <FILENAME text="CONCLAVE_EQUENAUT_87915" />
   <CARDNAME text="CONCLAVE_EQUENAUT" />
   <TITLE>
      <LOCALISED_TEXT LanguageCode="en-US"><![CDATA[Conclave Equenaut]]></LOCALISED_TEXT>
      <LOCALISED_TEXT LanguageCode="fr-FR"><![CDATA[Équénaute du Conclave]]></LOCALISED_TEXT>
      <LOCALISED_TEXT LanguageCode="es-ES"><![CDATA[Equinautas del Cónclave]]></LOCALISED_TEXT>
      <LOCALISED_TEXT LanguageCode="de-DE"><![CDATA[Konklavenequidonaut]]></LOCALISED_TEXT>
      <LOCALISED_TEXT LanguageCode="it-IT"><![CDATA[Equinauta del Conclave]]></LOCALISED_TEXT>
      <LOCALISED_TEXT LanguageCode="jp-JA"><![CDATA[議事会の乗馬兵]]></LOCALISED_TEXT>
      <LOCALISED_TEXT LanguageCode="ko-KR"><![CDATA[Conclave Equenaut]]></LOCALISED_TEXT>
      <LOCALISED_TEXT LanguageCode="ru-RU"><![CDATA[Эквенавт Конклава]]></LOCALISED_TEXT>
      <LOCALISED_TEXT LanguageCode="pt-BR"><![CDATA[Viajante Eqüestre do Conclave]]></LOCALISED_TEXT>
   </TITLE>
   <MULTIVERSEID value="87915" />
   <ARTID value="RSN87915" />
   <ARTIST name="Terese Nielsen" />
   <CASTING_COST cost="{4}{W}{W}" />
   <FLAVOURTEXT>
      <LOCALISED_TEXT LanguageCode="en-US"><![CDATA[Equenauts are the seeds of the Conclave, scattered on the four winds, searching for new places to take root.]]></LOCALISED_TEXT>
      <LOCALISED_TEXT LanguageCode="fr-FR"><![CDATA[Les équénautes sont les semences du Conclave. Éparpillés aux quatre vents, ils cherchent de nouveaux lieux où prendre racine.]]></LOCALISED_TEXT>
      <LOCALISED_TEXT LanguageCode="es-ES"><![CDATA[Los equinautas son las semillas del Cónclave, desperdigadas a los cuatro vientos, buscando nuevos lugares para echar raíces.]]></LOCALISED_TEXT>
      <LOCALISED_TEXT LanguageCode="de-DE"><![CDATA[Equidonauten sind die in alle vier Himmelsrichtungen verstreuten Samen des Konklave, die neue Plätze suchen, an denen sie Wurzeln schlagen können.]]></LOCALISED_TEXT>
      <LOCALISED_TEXT LanguageCode="it-IT"><![CDATA[Gli equinauti sono i semi del Conclave, dispersi ai quattro venti, alla ricerca di nuovi luoghi in cui attecchire.]]></LOCALISED_TEXT>
      <LOCALISED_TEXT LanguageCode="jp-JA"><![CDATA[乗馬兵は議事会の種だ。四つの風に乗って散らばり、根を下ろす新たな場所を探している。]]></LOCALISED_TEXT>
      <LOCALISED_TEXT LanguageCode="ko-KR"><![CDATA[Equenauts are the seeds of the Conclave, scattered on the four winds, searching for new places to take root.]]></LOCALISED_TEXT>
      <LOCALISED_TEXT LanguageCode="ru-RU"><![CDATA[Эквенавты — это семена Конклава, рассеянные по всему миру и ищущие, где бы пустить корни.]]></LOCALISED_TEXT>
      <LOCALISED_TEXT LanguageCode="pt-BR"><![CDATA[Os Viajantes Eqüestres são as sementes do Conclave, disseminados aos quatro ventos, procurando novos lugares para germinar.]]></LOCALISED_TEXT>
   </FLAVOURTEXT>
   <TYPE metaname="Creature" />
   <SUB_TYPE metaname="Human" />
   <SUB_TYPE metaname="Soldier" />
   <EXPANSION value="RAV" />
   <RARITY metaname="C" />
   <POWER value="3" />
   <TOUGHNESS value="3" />
   <ACTIVATED_ABILITY sorcery_time="1" auto_skip="1" active_zone="ZONE_HAND">
      <LOCALISED_TEXT LanguageCode="en-US"><![CDATA[Convoke (Each creature you tap while playing this spell reduces its cost by {1} or by one mana of that creature's color.)]]></LOCALISED_TEXT>
      <LOCALISED_TEXT LanguageCode="fr-FR"><![CDATA[Convocation (Chaque créature que vous engagez en jouant ce sort réduit son coût de {1} ou d'un mana de la couleur de cette créature.)]]></LOCALISED_TEXT>
      <LOCALISED_TEXT LanguageCode="es-ES"><![CDATA[Convocar (Cada criatura que gires al jugar este hechizo reduce su coste en {1} o en un maná del color de esa criatura.)Vuela.]]></LOCALISED_TEXT>
      <LOCALISED_TEXT LanguageCode="de-DE"><![CDATA[Einberufen (Jede Kreatur, die du tappst, während du diesen Zauberspruch spielst, reduziert dessen Kosten um {1} oder um ein Mana der Farbe jener Kreatur.)]]></LOCALISED_TEXT>
      <LOCALISED_TEXT LanguageCode="it-IT"><![CDATA[Convocazione (Ciascuna creatura che TAPpi mentre giochi questa magia riduce il suo costo di {1} o di un mana del colore di quella creatura.)]]></LOCALISED_TEXT>
      <LOCALISED_TEXT LanguageCode="jp-JA"><![CDATA[召集 (あなたがこの呪文をプレイする段階であなたがタップした各クリーチャーにつき、この呪文のコストはそのクリーチャーの色のマナ1点か{1}少なくなる。)]]></LOCALISED_TEXT>
      <LOCALISED_TEXT LanguageCode="ko-KR"><![CDATA[Convoke (Each creature you tap while playing this spell reduces its cost by {1} or by one mana of that creature's color.)]]></LOCALISED_TEXT>
      <LOCALISED_TEXT LanguageCode="ru-RU"><![CDATA[Созыв (Когда вы разыгрываете это заклинание, каждое повернутое существо уменьшает стоимость заклинания на {1} или на один пункт маны цвета этого существа).]]></LOCALISED_TEXT>
      <LOCALISED_TEXT LanguageCode="pt-BR"><![CDATA[Convocar (Cada criatura que você vira ao jogar esta mágica reduz seu custo em {1} ou em um mana da cor daquela criatura.)]]></LOCALISED_TEXT>
      <COST type="Mana" cost="{0}" />
      <RESOLUTION_TIME_ACTION>
         -- Set up our information so we can track when to end the effect.
         EffectDC():Int_Set( 1, MTG():GetStep() )
         -- Code in our normal casting cost.
         --  2-White
         EffectDC():Int_Set( 2, 2 )
         --  4-Colourless
         EffectDC():Int_Set( 3, 4 )
         -- Code in our current reduction which will always be 0 at this point.
         --  Coloured reduction
         EffectDC():Int_Set( 4, 0 )
         --  Colourless reduction
         EffectDC():Int_Set( 5, 0 )
      </RESOLUTION_TIME_ACTION>
      <RESOLUTION_TIME_ACTION repeating="1">
         local n = MTG():GetActionRepCount()
         local nParity = n % 2

         if (nParity == 0) then
            -- Choose a creature to tap.
            local oFilter = Object():GetFilter()
            oFilter:Clear()
            oFilter:SetZone( ZONE_IN_PLAY )
            oFilter:SetController( EffectController() )
            oFilter:AddCardType( CARD_TYPE_CREATURE )
            if (EffectDC():Int_Get( 5 ) == EffectDC():Int_Get( 3 )) then
               -- Max Colourless reached so restrict to white.
               oFilter:AddColour( COLOUR_WHITE )
            end
            oFilter:AddExtra( FILTER_EXTRA_CREATURE_UNTAPPED )
            oFilter:NotTargetted()
            oFilter:SetHint( HINT_ENEMY, EffectController() )
            oFilter:May()
            EffectController():ChooseTarget( 0, "CARD_QUERY_CHOOSE_CREATURE_TAP", EffectDC():Make_Targets( 6 ) )
            return true
         else
            local oTarget = EffectDC():Get_Targets( 6 ):Get_CardPtr( 0 )
            if (oTarget ~= nil) then
               -- Player chose a creature to tap to reduce cost.
               if (oTarget:GetColour():Test( COLOUR_WHITE ) ~= 0) then
                  -- Target is white so we may be able to reduce coloured cost.
                  if (EffectDC():Int_Get( 4 ) &lt; EffectDC():Int_Get( 2 )) then
                     -- Yay! We reduce coloured cost.
                     EffectDC():Int_Inc( 4 )
                  else
                     -- We need to reduce colourless cost instead.
                     EffectDC():Int_Inc( 5 )
                  end
               else
                  -- Target not white we can only reduce colourless cost.
                  EffectDC():Int_Inc( 5 )
               end
               -- Make sure we tap the creature so it can't be selected again.
               oTarget:Tap()
               -- Check to see if we maxed cost reduction or we can continue.
               if (EffectDC():Int_Get( 4 ) &lt; EffectDC():Int_Get( 2 )) or
                  (EffectDC():Int_Get( 5 ) &lt; EffectDC():Int_Get( 3 )) then
                  -- We can continue.
                  return true
               else
                  -- Maxed stop now.
                  return false
               end
            else
               -- No target chosen or could be chosen end this cycle.
               return false
            end
         end
      </RESOLUTION_TIME_ACTION>
      <CONTINUOUS_ACTION>
         if (EffectDC():Int_Get( 4 ) &gt; 0) then
            Object():DecreaseColouredCost( COLOUR_WHITE, EffectDC():Int_Get( 4 ) )
         end
         if (EffectDC():Int_Get( 5 ) &gt; 0) then
            Object():DecreaseCost( EffectDC():Int_Get( 5 ) )
         end
      </CONTINUOUS_ACTION>
      <DURATION>
         if (EffectDC():Int_Get( 1 ) ~= MTG():GetStep()) then
            -- Step is over so we reset and end this effect.
            for i=1,5 do
               EffectDC():Int_Clear( i )
            end
            return true
         else
            return false
         end
      </DURATION>
   </ACTIVATED_ABILITY>
   <STATIC_ABILITY>
      <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>
</CARD_V2>
Though this should only be taken as a proof of concept as the code could most definitely be cleaned up and made a bit more generic so it could be re-used more easily.
RiiakShiNal
Programmer
 
Posts: 2188
Joined: 16 May 2011, 21:37
Has thanked: 75 times
Been thanked: 497 times

Re: Ideas for "Convoke" ability?

Postby thefiremind » 13 Jul 2012, 08:39

Some of the drawbacks could be eliminated if we could find a time window in which the convoke could be made as triggered: while it's in hand, we reduce the cost as much as possible by looking at the available creatures, then when we are about to cast it (and that's the time window we have to find), we are asked to tap as many creatures as we wish.
I'm afraid there's no time in which the card has been chosen for casting but the cost hasn't been paid, but in that case we could let the caster tap the creatures, and then tap the remaining lands with TapLand.
Of course this is just a concept in my mind... problems could arise while trying to make it in practice.
< 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: Ideas for "Convoke" ability?

Postby Pesi » 14 Jul 2012, 22:49

How about something that behaves like "as an additional cost, tap any number of untapped creatures you control..."? Code could be borrowed from the Scry-part of Quicksilver Sea to make a dialog box where you can keep clicking creatures and press "finish" at any time.
Pesi
 
Posts: 21
Joined: 03 May 2012, 15:19
Has thanked: 0 time
Been thanked: 0 time

Re: Ideas for "Convoke" ability?

Postby RiiakShiNal » 14 Jul 2012, 23:33

Pesi wrote:How about something that behaves like "as an additional cost, tap any number of untapped creatures you control..."? Code could be borrowed from the Scry-part of Quicksilver Sea to make a dialog box where you can keep clicking creatures and press "finish" at any time.
Additional costs can only fire if you have enough mana to cast the card and start casting it and happen as part of the cost ("In addition to"), Convoke is "In lieu of" and hence would require either:
A. engine support for the ability (preferred, but not available in DotP 2013)
-or-
B. something to happen before it is cast to reduce the cost (for example my proof of concept idea)

If there is a better solution (option C, which we don't know of) several people here would love to see it (myself included).

As for the keep clicking creatures and press finish at any time my proof of concept already does that.
RiiakShiNal
Programmer
 
Posts: 2188
Joined: 16 May 2011, 21:37
Has thanked: 75 times
Been thanked: 497 times

Re: Ideas for "Convoke" ability?

Postby thefiremind » 19 Jul 2012, 18:42

Pesi's suggestion actually isn't bad at all... we could try something like this:
  • A static ability that evaluates the creatures you control and decreases the card's cost as much as possible, so it can be cast no matter what you decide to tap.
  • A "generic" additional cost that doesn't require anything (target determination just returns true) but when fired, it asks for creatures to tap pretty much like devour. There should be a check that doesn't allow you to stop tapping creatures until you have enough mana to pay the remaining cost (this would probably need to have separate target choices, unlike devour).
  • When the creatures have been tapped, either the cost grows up again to cover the remaining cost (I think it's not possible because the cost is already "locked", it's a real Magic rule) or we tap the remaining cost with TapLand.
Well, this is just theory... I have to test.
< 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


Return to Programming Talk

Who is online

Users browsing this forum: No registered users and 1 guest


Who is online

In total there is 1 user online :: 0 registered, 0 hidden and 1 guest (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 1 guest

Login Form