It is currently 25 Apr 2024, 00:40
   
Text Size

poison counters

Moderator: CCGHQ Admins

Re: poison counters

Postby nabeshin » 11 Oct 2012, 11:10

updated - passes any protection
Attachments
DECIMATOR_WEB_214055.rar
(1.26 KiB) Downloaded 194 times
User avatar
nabeshin
 
Posts: 207
Joined: 27 Jun 2011, 20:07
Has thanked: 5 times
Been thanked: 31 times

Re: poison counters

Postby BlindWillow » 11 Oct 2012, 16:56

RiiakShiNal wrote:if they check with Interrogate_DamageDealtToAnyPlayerThisTurn or something similar then it could be a fairly bad bug
Yeah, that seems fatal. :( I may play around a little more trying to see if I can fool the game engine with a combination of 2010 functions and 2013 functions, but I'm not sanguine about that. Oh well. It was worth a shot.

You have any ideas on how to get around the interrogate problem, nabeshin?
BlindWillow
 
Posts: 213
Joined: 19 Jul 2012, 00:26
Has thanked: 11 times
Been thanked: 46 times

Re: poison counters

Postby BlindWillow » 13 Oct 2012, 12:57

Well, there is PLAYER_UTILITY_COMPARTMENT_ID_PLAYER_DAMAGE_TAKEN_THIS_TURN. If that is what Interrogate_DamageDealtToAnyPlayerThisTurn is checking, then we should be able to use Int_Decrement to address that issue.
BlindWillow
 
Posts: 213
Joined: 19 Jul 2012, 00:26
Has thanked: 11 times
Been thanked: 46 times

Re: poison counters

Postby BlindWillow » 13 Oct 2012, 14:39

Well, apparently Interrogate_DamageDealtToAnyPlayerThisTurn just checks whether a source has dealt damage in a turn. However, the only card to currently use it (I think) is the plane Stensia. And that only checks creatures. Given that we can accomplish anything that Interrogate_DamageDealtToAnyPlayerThisTurn does by instead checking PLAYER_UTILITY_COMPARTMENT_ID_PLAYER_DAMAGE_TAKEN_THIS_TURN, and given that my testing shows adding the following to the damage dealing ability:

EffectController():PlayerDataChest():Int_Sub( PLAYER_UTILITY_COMPARTMENT_ID_PLAYER_DAMAGE_TAKEN_THIS_TURN, 1 )

will indeed work for that purpose, we can go this route as long as we know to avoid using Interrogate_DamageDealtToAnyPlayerThisTurn unless the source has a specified card type.
BlindWillow
 
Posts: 213
Joined: 19 Jul 2012, 00:26
Has thanked: 11 times
Been thanked: 46 times

Re: poison counters

Postby BlindWillow » 25 Oct 2012, 16:14

Should have posted this earlier, but I realized I needed to add TriggerObject():GetController() == EffectController() to my Parallel Lives "emergency shutdown" ability. That should look like this now:

Code: Select all
  <TRIGGERED_ABILITY internal="1">
    <TRIGGER value="ABILITY_RESOLVED">
    if ( TriggerObject():GetCardName() == Object():GetCardName() and TriggerObject():GetController() == EffectController() ) then
   ObjectDC():Set_Int(0, 1)
   return true
    end
    return false
    </TRIGGER>
  </TRIGGERED_ABILITY>
Edit: No reason not to just post the full up-to-date code for the poison token.

Code: Select all
<?xml version='1.0'?>
<CARD_V2>
  <FILENAME text="TOKEN_POISON_T_11381001" />
  <CARDNAME text="POISON_T" />
  <TITLE>
    <LOCALISED_TEXT LanguageCode="en-US"><![CDATA[ ]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="de-DE"><![CDATA[ ]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="es-ES"><![CDATA[ ]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="fr-FR"><![CDATA[ ]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="it-IT"><![CDATA[ ]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="jp-JA"><![CDATA[ ]]></LOCALISED_TEXT>
  </TITLE>
  <MULTIVERSEID value="11381001" />
  <ARTID value="88888888" />
  <ARTIST name="" />
  <CASTING_COST cost="" />
  <TYPE metaname="" />
  <EXPANSION value="DPG" />
  <RARITY metaname="L" />
  <STATIC_ABILITY filter_zone="ZONE_IN_PLAY">
    <CONTINUOUS_ACTION>
    local filter = Object():GetFilter()
    filter:Clear()
    filter:SetConvertedCostMax( 25 )
    Object():Protection()
    </CONTINUOUS_ACTION>
  </STATIC_ABILITY>
  <STATIC_ABILITY filter_zone="ZONE_IN_PLAY">
    <CONTINUOUS_ACTION>
    local characteristics = Object():GetCurrentCharacteristics()
    characteristics:Characteristic_Set( CHARACTERISTIC_SHROUD, 1 )
    characteristics:Characteristic_Set( CHARACTERISTIC_INDESTRUCTIBLE, 1 )
    characteristics:Characteristic_Set( CHARACTERISTIC_INFECT, 1 )
    </CONTINUOUS_ACTION>
  </STATIC_ABILITY>
  <STATIC_ABILITY filter_zone="ZONE_IN_PLAY">
    <FILTER>
    return (FilteredCard() ~= nil and
    FilteredCard():GetZone() == ZONE_IN_PLAY and
    (FilteredCard():GetCardName() == "FURNACE_OF_RATH" or
    FilteredCard():GetCardName() == "GISELA_BLADE_OF_GOLDNIGHT" or
    FilteredCard():GetCardName() == "CURSE_OF_BLOODLETTING" or
    FilteredCard():GetCardName() == "SUN_DROPLET" or
    FilteredCard():GetCardName() == "ANGELHEART_VIAL" or
    FilteredCard():GetCardName() == "ANTHEM_OF_RAKDOS" or
    FilteredCard():GetCardName() == "TAMANOA" or
    FilteredCard():GetCardName() == "AZORS_ELOCUTORS" or
    FilteredCard():GetCardName() == "BLOOD_HOUND" or
    FilteredCard():GetCardName() == "DARIEN_KING_OF_KJELDOR" or
    FilteredCard():GetCardName() == "LICH" or
    FilteredCard():GetCardName() == "LIVING_ARTIFACT" or
    FilteredCard():GetCardName() == "WAR_ELEMENTAL"))
    </FILTER>
    <CONTINUOUS_ACTION layer="6">
    if FilteredCard() ~= nil then
       local characteristics = FilteredCard():GetCurrentCharacteristics()
       if characteristics ~= nil then
      characteristics:LoseAllAbilities()
   end
    end
    </CONTINUOUS_ACTION>
  </STATIC_ABILITY>
  <TRIGGERED_ABILITY LKI_shield_effect_source="1" forced_skip="1" filter_zone="ZONE_IN_PLAY">
    <TRIGGER value="ZONECHANGE_END" simple_qualifier="self" to_zone="ZONE_IN_PLAY" />
    <RESOLUTION_TIME_ACTION>
    local source = EffectSource()
    if source == nil then
      source = Object()
    end
    local filter = Object():GetFilter()
    filter:Clear()
    filter:SetZone( ZONE_IN_PLAY )
    filter:AddCardName( "MELIRA_SYLVOK_OUTCAST" )
    filter:SetController( EffectController() )
    filter:NotTargetted()
    if (filter:CountStopAt(1) == 0 and EffectController() ~= nil and ObjectDC():Get_Int(0) ~= 1) then
       EffectController():DealDamageFullParams(1, source, 0, 1 )
   EffectController():PlayerDataChest():Int_Sub( PLAYER_UTILITY_COMPARTMENT_ID_PLAYER_DAMAGE_TAKEN_THIS_TURN, 1 )
    end
    </RESOLUTION_TIME_ACTION>
    <RESOLUTION_TIME_ACTION>
    if EffectSource() ~= nil then
   EffectSource():RemoveFromGame()
    end
    </RESOLUTION_TIME_ACTION>
  </TRIGGERED_ABILITY>
  <TRIGGERED_ABILITY internal="1">
    <TRIGGER value="ABILITY_RESOLVED">
    if ( TriggerObject():GetCardName() == Object():GetCardName() and TriggerObject():GetController() == EffectController() ) then
   ObjectDC():Set_Int(0, 1)
   return true
    end
    return false
    </TRIGGER>
  </TRIGGERED_ABILITY>
</CARD_V2>
BlindWillow
 
Posts: 213
Joined: 19 Jul 2012, 00:26
Has thanked: 11 times
Been thanked: 46 times

Previous

Return to Programming Talk

Who is online

Users browsing this forum: No registered users and 38 guests


Who is online

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

Login Form