It is currently 04 Sep 2025, 16:23
   
Text Size

Help With Phyrexian Vault

Moderator: CCGHQ Admins

Help With Phyrexian Vault

Postby Xana » 08 Aug 2012, 16:49

Hi

Been trying to code this card, and it almost works, except that it doesn't ask for a creature to sacrifice and still draws a card.

This is the current code, and i can't really seem to see where the problem is.

Code: Select all
<ACTIVATED_ABILITY filter_zone="ZONE_IN_PLAY">
    <LOCALISED_TEXT LanguageCode="en-US"><![CDATA[{2}, {T}, Sacrifice a creature: Draw a card.]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="it-IT"><![CDATA[{2}, {T}, Sacrifica una creatura: Pesca una carta.]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="de-DE"><![CDATA[{2}, {T}, opfere eine Kreatur: Ziehe eine Karte.]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="fr-FR"><![CDATA[{2}, {T}, sacrifiez une créature : Piochez une carte.]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="es-ES"><![CDATA[{2}, {T}, sacrificar una criatura: Roba una carta.]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="jp-JA"><![CDATA[{2}, {T}, クリーチャーを1体生け贄に捧げる:カードを1枚引く。]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="ko-KR"><![CDATA[{2}, {T}, Sacrifice a creature: Draw a card.]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="ru-RU"><![CDATA[{2}, {T}, Пожертвуйте существо: Возьмите карту.]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="pt-BR"><![CDATA[{2}, {T}, Sacrifique uma criatura: Compre um card.]]></LOCALISED_TEXT>
    <COST type="Mana" cost="{2}" />
   <COST type="Sacrifice">
      <TARGET_DEFINITION id="6">
         local filter = Object():GetFilter()
         filter:Clear()
         filter:AddCardType( CARD_TYPE_CREATURE )
         filter:SetPlayer( EffectController() )
         filter:SetHint( HINT_ENEMY, EffectController() )
         filter:SetZone( ZONE_IN_PLAY )
         filter:NotTargetted()
      </TARGET_DEFINITION>
      <TARGET_DETERMINATION>
         return AtLeastOneTargetFromDefinition(6)
      </TARGET_DETERMINATION>
      <PLAY_TIME_ACTION>
         EffectController():ChooseTarget( 6, "CARD_QUERY_CHOOSE_CREATURE_TO_SACRIFICE", EffectDC():Make_Targets(0) )
      </PLAY_TIME_ACTION>
   </COST>
    <COST type="TapSelf" />
    <RESOLUTION_TIME_ACTION>
         EffectController():DrawCard()
    </RESOLUTION_TIME_ACTION>
  </ACTIVATED_ABILITY>
Xana
 
Posts: 13
Joined: 15 Jan 2010, 18:59
Has thanked: 2 times
Been thanked: 2 times

Re: Help With Phyrexian Vault

Postby RiiakShiNal » 08 Aug 2012, 18:17

In your cost try using <PLAYTIME></PLAYTIME> instead of <PLAY_TIME_ACTION></PLAY_TIME_ACTION>. I've noticed that some costs use PLAYTIME and maybe it is required to use it for those costs.
RiiakShiNal
Programmer
 
Posts: 2188
Joined: 16 May 2011, 21:37
Has thanked: 75 times
Been thanked: 497 times

Re: Help With Phyrexian Vault

Postby thefiremind » 08 Aug 2012, 18:41

RiiakShiNal wrote:In your cost try using <PLAYTIME></PLAYTIME> instead of <PLAY_TIME_ACTION></PLAY_TIME_ACTION>. I've noticed that some costs use PLAYTIME and maybe it is required to use it for those costs.
That's right, and to be more precise, <PLAYTIME> is needed for all the costs not marked as "generic", where the chosen target is handled automatically according to the cost type. The "generic" costs, on the contrary, allow you to do anything you want with the chosen target, so they are coded as a normal ability, with <PLAY_TIME_ACTION> and/or <RESOLUTION_TIME_ACTION>.
< 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: Help With Phyrexian Vault

Postby Xana » 08 Aug 2012, 18:46

Hey

Tried adding <PLAYTIME></PLAYTIME> instead, and now i can't activate the ability without having a creature to sacrifice, but i still don't get to choose a creature to sacrifice, and it is still cast without requiring a sacrifice.

EDIT: Nevermind, that was me being an idiot, forgot to update my main package, it now works correctly, thanks for the info :)
Xana
 
Posts: 13
Joined: 15 Jan 2010, 18:59
Has thanked: 2 times
Been thanked: 2 times


Return to Programming Talk

Who is online

Users browsing this forum: No registered users and 3 guests

Main Menu

User Menu

Our Partners


Who is online

In total there are 3 users online :: 0 registered, 0 hidden and 3 guests (based on users active over the past 10 minutes)
Most users ever online was 7303 on 15 Jul 2025, 20:46

Users browsing this forum: No registered users and 3 guests

Login Form