Page 1 of 1

Come into play tapped unless you pay 2 life

PostPosted: 05 Nov 2012, 01:48
by pcastellazzi
I was coding Blood Crypt while i found this little problem. I will start with the solution i am using to show what i want to achieve.

Code: Select all
<TRIGGERED_ABILITY active_zone="ZONE_TRANSITION" replacement_query="1">
  <TRIGGER value="ZONECHANGE_TRANSITION" simple_qualifier="self" to_zone="ZONE_IN_PLAY">
    EffectDC():Set_Int(0, EffectController():GetLifeTotal() > 2 and 1 or 0)
  ]]>
  </TRIGGER>

  <PLAY_TIME_ACTION target_choosing="1">
    if EffectDC():Get_Int(0) == 1 then
      YesNoPrompt("CARD_QUERY_OPTION_PAY_2_LIFE")
    end
  </PLAY_TIME_ACTION>

  <RESOLUTION_TIME_ACTION>
    if EffectDC():Get_Int(0) == 1 and Object():GetMultipleChoiceResult() == 0 then
      EffectController():LoseLife(2)
    else
      Object():ComesIntoPlayTapped()
    end
  </RESOLUTION_TIME_ACTION>
</TRIGGERED_ABILITY>
The code before this lines works ok, but i think the same effect can be achieved with a conditianl cost. Something like this:

Code: Select all
<TRIGGERED_ABILITY internal="1">
  <TRIGGER value="ZONECHANGE_END" simple_qualifier="self" to_zone="ZONE_IN_PLAY" />

  <COST type="Life" points="2" qualifier="conditional" />
 
  <RESOLUTION_TIME_ACTION conditional="else">
    Object():ComesIntoPlayTapped()
  </RESOLUTION_TIME_ACTION>
</TRIGGERED_ABILITY>
The prolem is while the dialog about paying the cost is presented, the resolution time action never run. What's wrong?

Re: Come into play tapped unless you pay 2 life

PostPosted: 05 Nov 2012, 09:36
by thefiremind
My guess is that the "internal" has something to do with it. Have you tried with a "hybrid" between the 2 solutions? Something like:
Code: Select all
<TRIGGERED_ABILITY active_zone="ZONE_TRANSITION" replacement_query="1">
  <TRIGGER value="ZONECHANGE_TRANSITION" simple_qualifier="self" to_zone="ZONE_IN_PLAY" />
  <COST type="Life" points="2" qualifier="conditional" />
  <RESOLUTION_TIME_ACTION conditional="else">
  Object():ComesIntoPlayTapped()
  </RESOLUTION_TIME_ACTION>
</TRIGGERED_ABILITY>

Re: Come into play tapped unless you pay 2 life

PostPosted: 11 Nov 2012, 15:03
by pcastellazzi
I was playing a little bit more with this today. You were right, internal="1" is the problem. After i removed it the conditional cost work as expected, same for the conditional action.