It is currently 10 Dec 2019, 13:26
   
Text Size

Report cards error here

Moderators: Xander9009, CCGHQ Admins

Re: Report cards error here

Postby GrovyleXShinyCelebi » 27 Sep 2013, 01:35

Oh. and a quick question,

I'm going to make Orim's Prayer, and I'm wondering if filter:Add( FE_PLAYER_ATTACKED, OP_IS, EffectController() ) will get me just the creatures that attacked the controller of the card.

Thanks!
User avatar
GrovyleXShinyCelebi
 
Posts: 294
Joined: 12 Jun 2013, 18:23
Has thanked: 14 times
Been thanked: 35 times

Re: Report cards error here

Postby thefiremind » 27 Sep 2013, 08:30

GrovyleXShinyCelebi wrote:Oh. and a quick question,

I'm going to make Orim's Prayer, and I'm wondering if filter:Add( FE_PLAYER_ATTACKED, OP_IS, EffectController() ) will get me just the creatures that attacked the controller of the card.

Thanks!
I have never noticed that FE constant, but I guess it makes sense...
Orim's Prayer ability (untested) | Open
Code: Select all
    <TRIGGER value="ATTACKERS_DECLARED">
    local filter = ClearFilter()
    filter:Add( FE_TYPE, OP_IS, CARD_TYPE_CREATURE )
    filter:Add( FE_IS_ATTACKING, true )
    filter:Add( FE_PLAYER_ATTACKED, OP_IS, EffectController() )
    return filter:CountStopAt(1) == 1
    </TRIGGER>
    <RESOLUTION_TIME_ACTION>
    local filter = ClearFilter()
    filter:Add( FE_TYPE, OP_IS, CARD_TYPE_CREATURE )
    filter:Add( FE_IS_ATTACKING, true )
    EffectController():GainLife( filter:Count() )
    </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: 717 times

Re: Report cards error here

Postby GrovyleXShinyCelebi » 28 Sep 2013, 14:52

Hey, does anyone know how to make the effect "Whenever you cast a multicolored spell", a la Lobber Crew?

I searched for Gloryscale Viashino (which was in 2013) and I read it used the ColourCount() function, which isn't present in Duels 2014. I wonder, would the following code work?

Code: Select all
  <TRIGGER value="SPELL_PLAYED" simple_qualifier="objectyoucontrol">
    return TriggerObject():GetColour():Count() &gt; 1
  </TRIGGER>
If not that, then this?

Code: Select all
  <TRIGGER value="SPELL_PLAYED" simple_qualifier="objectyoucontrol">
    return TriggerObject():GetCurrentCharacteristics():Colour_Get():Count() &gt; 1
  </TRIGGER>
User avatar
GrovyleXShinyCelebi
 
Posts: 294
Joined: 12 Jun 2013, 18:23
Has thanked: 14 times
Been thanked: 35 times

Re: Report cards error here

Postby thefiremind » 28 Sep 2013, 15:31

GrovyleXShinyCelebi wrote:Hey, does anyone know how to make the effect "Whenever you cast a multicolored spell", a la Lobber Crew?
There's an official example of that: Eye of Ugin checks for
Code: Select all
TriggerObject():GetColour():GetNumColours() == 0
so the check for multicolored will be
Code: Select all
TriggerObject():GetColour():GetNumColours() &gt; 1
< 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: 717 times

Re: Report cards error here

Postby GrovyleXShinyCelebi » 28 Sep 2013, 16:04

thefiremind wrote:
GrovyleXShinyCelebi wrote:Hey, does anyone know how to make the effect "Whenever you cast a multicolored spell", a la Lobber Crew?
There's an official example of that: Eye of Ugin checks for
Code: Select all
TriggerObject():GetColour():GetNumColours() == 0
so the check for multicolored will be
Code: Select all
TriggerObject():GetColour():GetNumColours() &gt; 1
Oh, thanks!

Also, I'm working on Crown of Empires, and it's been difficult trying to change the target's controller because SetController() doesn't seem to function in an ACTIVATED_ABILITY block. I'm thinking of maybe making a delayed trigger but I don't know how to make the trigger fire - does TRIGGER_ACTIVATED_ABILITY_PLAYED work? A STATIC_ABILITY or SPELL_ABILITY where I'm sure that function does work is out of the question. Got any pointers?
User avatar
GrovyleXShinyCelebi
 
Posts: 294
Joined: 12 Jun 2013, 18:23
Has thanked: 14 times
Been thanked: 35 times

Re: Report cards error here

Postby RiiakShiNal » 28 Sep 2013, 16:25

SetController() will work in an ACTIVATED_ABILITY block, but it needs to be in a CONTINUOUS_ACTION block with a DURATION. To set a controller permanently like for Crown of Empires you might want to try SetBaseController().
Problems with base game cards: DotP 2014 Core Fixes
Need a deck builder: DotP 2014 Deck Builder
Problems Modding: DotP 2014 Frequent Modding Mistakes
RiiakShiNal
Programmer
 
Posts: 2130
Joined: 16 May 2011, 21:37
Has thanked: 73 times
Been thanked: 473 times

Re: Report cards error here

Postby GrovyleXShinyCelebi » 29 Sep 2013, 18:51

OK, I need some SERIOUS help.

I've been trying to make Mindbender Spore for an hour, and here it is:

Code: Select all
 <TITLE>
    <LOCALISED_TEXT LanguageCode="en-US"><![CDATA[Mindbender Spores]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="fr-FR"><![CDATA[Mindbender Spores]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="es-ES"><![CDATA[Mindbender Spores]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="de-DE"><![CDATA[Mindbender Spores]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="it-IT"><![CDATA[Mindbender Spores]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="jp-JA"><![CDATA[Mindbender Spores]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="ko-KR"><![CDATA[Mindbender Spores]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="ru-RU"><![CDATA[Mindbender Spores]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="pt-BR"><![CDATA[Mindbender Spores]]></LOCALISED_TEXT>
  </TITLE>
  <MULTIVERSEID value="3398" />
  <ARTID value="3398" />
  <ARTIST name="Ian Miller" />
  <CASTING_COST cost="" />
  <TYPE metaname="Creature" />
  <SUB_TYPE metaname="Fungus" />
  <SUB_TYPE metaname="Wall" />
  <EXPANSION value="MI" />
  <RARITY metaname="R" />
  <POWER value="0" />
  <TOUGHNESS value="1" />
  <STATIC_ABILITY>
    <LOCALISED_TEXT LanguageCode="en-US"><![CDATA[Defender]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="fr-FR"><![CDATA[Défenseur]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="es-ES"><![CDATA[Defensor.]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="de-DE"><![CDATA[Verteidiger]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="it-IT"><![CDATA[Difensore]]></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[Defensor]]></LOCALISED_TEXT>
    <INTRINSIC characteristic="CHARACTERISTIC_DEFENDER" />
  </STATIC_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>
    <INTRINSIC characteristic="CHARACTERISTIC_FLYING" />
  </STATIC_ABILITY>
  <TRIGGERED_ABILITY>
    <LOCALISED_TEXT LanguageCode="en-US"><![CDATA[Whenever Mindbender Spores blocks a creature, put four fungus counters on that creature. The creature gains “This creature doesn’t untap during your untap step if it has a fungus counter on it” and “At the beginning of your upkeep, remove a fungus counter from this creature.”]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="fr-FR"><![CDATA[Whenever Mindbender Spores blocks a creature, put four fungus counters on that creature. The creature gains “This creature doesn’t untap during your untap step if it has a fungus counter on it” and “At the beginning of your upkeep, remove a fungus counter from this creature.”]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="es-ES"><![CDATA[Whenever Mindbender Spores blocks a creature, put four fungus counters on that creature. The creature gains “This creature doesn’t untap during your untap step if it has a fungus counter on it” and “At the beginning of your upkeep, remove a fungus counter from this creature.”]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="de-DE"><![CDATA[Whenever Mindbender Spores blocks a creature, put four fungus counters on that creature. The creature gains “This creature doesn’t untap during your untap step if it has a fungus counter on it” and “At the beginning of your upkeep, remove a fungus counter from this creature.”]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="it-IT"><![CDATA[Whenever Mindbender Spores blocks a creature, put four fungus counters on that creature. The creature gains “This creature doesn’t untap during your untap step if it has a fungus counter on it” and “At the beginning of your upkeep, remove a fungus counter from this creature.”]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="jp-JA"><![CDATA[Whenever Mindbender Spores blocks a creature, put four fungus counters on that creature. The creature gains “This creature doesn’t untap during your untap step if it has a fungus counter on it” and “At the beginning of your upkeep, remove a fungus counter from this creature.”]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="ko-KR"><![CDATA[Whenever Mindbender Spores blocks a creature, put four fungus counters on that creature. The creature gains “This creature doesn’t untap during your untap step if it has a fungus counter on it” and “At the beginning of your upkeep, remove a fungus counter from this creature.”]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="ru-RU"><![CDATA[Whenever Mindbender Spores blocks a creature, put four fungus counters on that creature. The creature gains “This creature doesn’t untap during your untap step if it has a fungus counter on it” and “At the beginning of your upkeep, remove a fungus counter from this creature.”]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="pt-BR"><![CDATA[Whenever Mindbender Spores blocks a creature, put four fungus counters on that creature. The creature gains “This creature doesn’t untap during your untap step if it has a fungus counter on it” and “At the beginning of your upkeep, remove a fungus counter from this creature.”]]></LOCALISED_TEXT>
    <TRIGGER value="BLOCKS_A_CREATURE" simple_qualifier="self" to_zone="ZONE_ANY" from_zone="ZONE_ANY" />
  <COUNTER_REGISTRATION name="Fungus" proliferate="11" />
  <RESOLUTION_TIME_ACTION>
   local creature = SecondaryObject()
   if creature ~= nil then
      creature:AddCounters( MTG():GetCountersType("Fungus"), 4)
   end
  </RESOLUTION_TIME_ACTION>
   <CONTINUOUS_ACTION layer="8">
    local creature = SecondaryObject()
    if creature ~= nil then
      creature:GetCurrentCharacteristics():GrantAbility(1)
      creature:GetCurrentCharacteristics():GrantAbility(2)
    end
    </CONTINUOUS_ACTION>
   <DURATION>
   return EffectSource():GetPlayer() == nil
   </DURATION>
  </TRIGGERED_ABILITY>
  <STATIC_ABILITY resource_id="1" active_zone="ZONE_ANYWHERE">
    <LOCALISED_TEXT LanguageCode="en-US"><![CDATA[This creature doesn’t untap during your untap step if it has a fungus counter on it]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="fr-FR"><![CDATA[This creature doesn’t untap during your untap step if it has a fungus counter on it]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="es-ES"><![CDATA[This creature doesn’t untap during your untap step if it has a fungus counter on it]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="de-DE"><![CDATA[This creature doesn’t untap during your untap step if it has a fungus counter on it]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="it-IT"><![CDATA[This creature doesn’t untap during your untap step if it has a fungus counter on it]]></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[This creature doesn’t untap during your untap step if it has a fungus counter on it]]></LOCALISED_TEXT>
  <COUNTER_REGISTRATION name="Fungus" proliferate="11" /> 
  <CONTINUOUS_ACTION layer="8">
    local parent = EffectSource()
    if parent ~= nil then
   local number = parent:CountCounters( MTG():GetCountersType("Fungus") )
        if number &gt;= 0 then
          parent:GetCurrentCharacteristics():Bool_Set( CHARACTERISTIC_DOESNT_UNTAP, 1 )
   end   
   end
    </CONTINUOUS_ACTION>
  </STATIC_ABILITY>
  <TRIGGERED_ABILITY resource_id="2">
    <LOCALISED_TEXT LanguageCode="en-US"><![CDATA[At the beginning of your upkeep, remove a fungus counter from this creature.]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="fr-FR"><![CDATA[At the beginning of your upkeep, remove a fungus counter from this creature.]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="es-ES"><![CDATA[At the beginning of your upkeep, remove a fungus counter from this creature.]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="de-DE"><![CDATA[At the beginning of your upkeep, remove a fungus counter from this creature.]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="it-IT"><![CDATA[At the beginning of your upkeep, remove a fungus counter from this creature.]]></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[At the beginning of your upkeep, remove a fungus counter from this creature.]]></LOCALISED_TEXT>
<COUNTER_REGISTRATION name="Fungus" proliferate="11" />     
    <TRIGGER value="BEGINNING_OF_PLAYERS_STEP" simple_qualifier="controller">
    return (MTG():GetStep() == STEP_UPKEEP) and (EffectSource():CountCounters( MTG():GetCountersType("Fungus") ) &gt; 0)
    </TRIGGER>
    <RESOLUTION_TIME_ACTION>
       EffectSource():RemoveCounters( MTG():GetCountersType("Fungus"), 1)
    </RESOLUTION_TIME_ACTION>
  </TRIGGERED_ABILITY>
  <HELP title="MORE_INFO_BADGE_TITLE_10" body="MORE_INFO_BADGE_BODY_10" zone="ZONE_ANY" />
  <HELP title="MORE_INFO_BADGE_TITLE_6" body="MORE_INFO_BADGE_BODY_6" zone="ZONE_ANY" />
  <SFX text="COMBAT_BLUNT_LARGE_ATTACK" power_boundary_min="4" power_boundary_max="-1" />
  <SFX text="COMBAT_BLUNT_SMALL_ATTACK" power_boundary_min="1" power_boundary_max="3" />
Almost everything works, but for some odd reason the "CHARACTERISTIC_DOESNT_UNTAP" doesn't work, even though I borrowed that part code from Claustrophobia. I've tried everything from adding the "ZONE_ANYWHERE" tag to declaring a variable as EffectSource() to altogether taking out the counter check and just straight up copying the code from Claustrophobia, but NOTHING is working!!!

Sorry if I sound angry, I'm just extremely frustrated and I need this to work for someone else's deck. Can someone please help me with this?
User avatar
GrovyleXShinyCelebi
 
Posts: 294
Joined: 12 Jun 2013, 18:23
Has thanked: 14 times
Been thanked: 35 times

Re: Report cards error here

Postby thefiremind » 29 Sep 2013, 19:00

I see 2 things (maybe 3) that I'd change:
  1. The duration should be "return SecondaryObject() == nil": since the effect has no explicit duration, you want it to last until the affected creature leaves the battlefield. Your duration stops when the Mindbender Spores die because then EffectSource becomes nil (and GetPlayer probably gives an error on SCRIPT_LOG.TXT).
  2. GrantAbility should be called on layer 6. (CHARACTERISTIC_DOESNT_UNTAP is OK on layer 8.)
  3. Your check for Fungus counters says "&gt;= 0" but it should be "&gt; 0". I guess you left it for testing, though, so maybe you are aware of that.
< 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: 717 times

Re: Report cards error here

Postby GrovyleXShinyCelebi » 30 Sep 2013, 22:57

Hey mate, sorry for yesterday, I was just facing other issues and I was in a really bad mood that day, is all. :)

Anyways, I have a question, I'm trying to fix my Order of the Stars, because someone told me that the protection from colors is sporadic (as in, sometimes it works, sometimes it gives protection to a completely wrong color, like choosing white and getting protection from red).

Here's what I got so far for that ability:

Code: Select all
 <TRIGGERED_ABILITY replacement_query="1">
    <LOCALISED_TEXT LanguageCode="en-US"><![CDATA[As Order of the Stars enters the battlefield, choose a color.]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="fr-FR"><![CDATA[Au moment où l’Ordre des Étoiles arrive en jeu, choisissez une couleur.]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="es-ES"><![CDATA[En cuanto la Orden de las estrellas entre en juego, elige un color.]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="de-DE"><![CDATA[Sowie der Orden der Sterne ins Spiel kommt, bestimme eine Farbe.]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="it-IT"><![CDATA[Mentre l’Ordine delle Stelle entra nel campo di battaglia, scegli un colore.]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="jp-JA"><![CDATA[星の兵団が場に出るに際し、色を1色選ぶ。]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="ko-KR"><![CDATA[As Order of the Stars enters the battlefield, choose a color.]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="ru-RU"><![CDATA[Когда Орден звезд вступает в игру, выберите цвет.]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="pt-BR"><![CDATA[Conforme Ordem das Estrelas entra em jogo, escolha uma cor.]]></LOCALISED_TEXT>
<TRIGGER value="ZONECHANGE_END" simple_qualifier="self" to_zone="ZONE_BATTLEFIELD" from_zone="ZONE_ANY" />
  <RESOLUTION_TIME_ACTION>
   if EffectController() ~= nil then
       EffectController():ChooseColour( "CARD_QUERY_CHOOSE_COLOUR", true )
   end
  </RESOLUTION_TIME_ACTION>
  <CONTINUOUS_ACTION layer="6">
     local target = EffectSource()
     if target ~= nil then
        local color = GetChosenColour()
   if color ~= nil then
          local filter = ClearFilter()
          filter:Add( FE_COLOUR, OP_IS, color)
          target:Protection()
   end
    end
  </CONTINUOUS_ACTION>
   <DURATION>
   return EffectSource() == nil
   </DURATION>
  </TRIGGERED_ABILITY>
  <STATIC_ABILITY>
    <LOCALISED_TEXT LanguageCode="en-US"><![CDATA[Order of the Stars has protection from the chosen color.]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="fr-FR"><![CDATA[L’Ordre des Étoiles a la protection contre la couleur choisie.]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="es-ES"><![CDATA[La Orden de las estrellas tiene protección contra el color elegido.]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="de-DE"><![CDATA[Der Orden der Sterne hat Schutz vor der bestimmten Farbe.]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="it-IT"><![CDATA[L’Ordine delle Stelle ha protezione dal colore scelto.]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="jp-JA"><![CDATA[星の兵団は選ばれた色に対するプロテクションを持つ。]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="ko-KR"><![CDATA[Order of the Stars has protection from the chosen color.]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="ru-RU"><![CDATA[Орден звезд получает защиту от выбранного цвета.]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="pt-BR"><![CDATA[Ordem das Estrelas tem proteção contra a cor escolhida.]]></LOCALISED_TEXT>
  </STATIC_ABILITY>
I tried a different approach, having the card trigger in ZONE_TRANSITION:

Code: Select all
<TRIGGERED_ABILITY replacement_query="1" active_zone="ZONE_ANY">
    <LOCALISED_TEXT LanguageCode="en-US"><![CDATA[As Order of the Stars enters the battlefield, choose a color.]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="fr-FR"><![CDATA[Au moment où l’Ordre des Étoiles arrive en jeu, choisissez une couleur.]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="es-ES"><![CDATA[En cuanto la Orden de las estrellas entre en juego, elige un color.]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="de-DE"><![CDATA[Sowie der Orden der Sterne ins Spiel kommt, bestimme eine Farbe.]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="it-IT"><![CDATA[Mentre l’Ordine delle Stelle entra nel campo di battaglia, scegli un colore.]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="jp-JA"><![CDATA[星の兵団が場に出るに際し、色を1色選ぶ。]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="ko-KR"><![CDATA[As Order of the Stars enters the battlefield, choose a color.]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="ru-RU"><![CDATA[Когда Орден звезд вступает в игру, выберите цвет.]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="pt-BR"><![CDATA[Conforme Ordem das Estrelas entra em jogo, escolha uma cor.]]></LOCALISED_TEXT>
<TRIGGER value="ZONECHANGE_TRANSITION" simple_qualifier="self" to_zone="ZONE_BATTLEFIELD" from_zone="ZONE_ANY" />
  <RESOLUTION_TIME_ACTION>
   if EffectController() ~= nil then
       EffectController():ChooseColour( "CARD_QUERY_CHOOSE_COLOUR", true )
   end
  </RESOLUTION_TIME_ACTION>
   <CONTINUOUS_ACTION layer="6">
    local target = EffectSource()
    if target ~= nil then
       local filter = ClearFilter()
       filter:Add( FE_COLOUR, OP_IS, GetChosenColour() )
       target:Protection()
    end
    </CONTINUOUS_ACTION>
   <DURATION>
   return EffectSource() == nil
   </DURATION>
  </TRIGGERED_ABILITY>
  <STATIC_ABILITY>
    <LOCALISED_TEXT LanguageCode="en-US"><![CDATA[Order of the Stars has protection from the chosen color.]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="fr-FR"><![CDATA[L’Ordre des Étoiles a la protection contre la couleur choisie.]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="es-ES"><![CDATA[La Orden de las estrellas tiene protección contra el color elegido.]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="de-DE"><![CDATA[Der Orden der Sterne hat Schutz vor der bestimmten Farbe.]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="it-IT"><![CDATA[L’Ordine delle Stelle ha protezione dal colore scelto.]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="jp-JA"><![CDATA[星の兵団は選ばれた色に対するプロテクションを持つ。]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="ko-KR"><![CDATA[Order of the Stars has protection from the chosen color.]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="ru-RU"><![CDATA[Орден звезд получает защиту от выбранного цвета.]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="pt-BR"><![CDATA[Ordem das Estrelas tem proteção contra a cor escolhida.]]></LOCALISED_TEXT>   
  </STATIC_ABILITY>
This one allows you to choose the color, but completely forgets to give your creatures protection!

Can you help me with this? I'll need to code Voice of All as it's in the Dark Heavens deck in Duels 2012, and I really want this to work as it's supposed to.
User avatar
GrovyleXShinyCelebi
 
Posts: 294
Joined: 12 Jun 2013, 18:23
Has thanked: 14 times
Been thanked: 35 times

Re: Report cards error here

Postby thefiremind » 01 Oct 2013, 00:22

GrovyleXShinyCelebi wrote:Hey mate, sorry for yesterday, I was just facing other issues and I was in a really bad mood that day, is all. :)
No need to apologize with me, you did no harm. :wink: What I'd like to hear is if your Mindbender Spores work now.

GrovyleXShinyCelebi wrote:Can you help me with this? I'll need to code Voice of All as it's in the Dark Heavens deck in Duels 2012, and I really want this to work as it's supposed to.
I recently coded Voice of All for a deck I'm planning to make, and Order of the Stars is identical, so... suit yourself. :D
Code: Select all
  <TRIGGERED_ABILITY linked_ability_group="1" replacement_query="1" active_zone="ZONE_TRANSITION">
    <LOCALISED_TEXT LanguageCode="en-US"><![CDATA[As Voice of All enters the battlefield, choose a color.]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="fr-FR"><![CDATA[Au moment où la Voix du Grand Tout arrive sur le champ de bataille, choisissez une couleur.]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="es-ES"><![CDATA[En cuanto la Voz de todos entre al campo de batalla, elige un color.]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="de-DE"><![CDATA[Sowie die Stimme von Allem ins Spiel kommt, bestimme eine Farbe.]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="it-IT"><![CDATA[Mentre la Voce Omnia entra nel campo di battaglia, scegli un colore.]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="jp-JA"><![CDATA[万物の声が場に出るに際し、色を1色選ぶ。]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="ko-KR"><![CDATA[As Voice of All enters the battlefield, choose a color.]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="ru-RU"><![CDATA[При входе Всеобщего Гласа в игру выберите цвет.]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="pt-BR"><![CDATA[Conforme Porta-voz entra em jogo, escolha uma cor.]]></LOCALISED_TEXT>
    <TRIGGER value="ZONECHANGE_TRANSITION" simple_qualifier="self" to_zone="ZONE_BATTLEFIELD" />
    <RESOLUTION_TIME_ACTION>
    EffectController():ChooseColour("CARD_QUERY_CHOOSE_COLOUR", true)
    </RESOLUTION_TIME_ACTION>
    <RESOLUTION_TIME_ACTION>
    LinkedDC():Set_Int( 0, GetChosenColour() )
    </RESOLUTION_TIME_ACTION>
  </TRIGGERED_ABILITY>
  <STATIC_ABILITY linked_ability_group="1">
    <LOCALISED_TEXT LanguageCode="en-US"><![CDATA[Voice of All has protection from the chosen color.]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="fr-FR"><![CDATA[La Voix du Grand Tout a la protection contre la couleur choisie.]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="es-ES"><![CDATA[La Voz de todos tiene protección contra el color elegido.]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="de-DE"><![CDATA[Die Stimme von Allem hat Schutz vor dieser Farbe.]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="it-IT"><![CDATA[La Voce Omnia ha protezione dal colore scelto.]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="jp-JA"><![CDATA[万物の声は選ばれた色に対するプロテクションを持つ。]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="ko-KR"><![CDATA[Voice of All has protection from the chosen color.]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="ru-RU"><![CDATA[Всеобщий Глас имеет Защиту от выбранного цвета.]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="pt-BR"><![CDATA[Porta-voz tem proteção contra a cor escolhida.]]></LOCALISED_TEXT>
    <CONTINUOUS_ACTION layer="0">
    if EffectSource() ~= nil then
       local filter = ClearFilter()
       filter:Add( FE_COLOUR, OP_IS, LinkedDC():Get_Int(0) )
       EffectSource():Protection()
    end
    </CONTINUOUS_ACTION>
  </STATIC_ABILITY>
< 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: 717 times

Re: Report cards error here

Postby GrovyleXShinyCelebi » 01 Oct 2013, 01:49

Mindbender Spores work perfectly... at least for me. My buddy said it didn't work for him (the two grant-abilities) , so I recopied the code from there, retested it, and again found no problems. He might have been using an older copy.. anyways I sent him it again and hopefully it works for him.

Interestingly, I did the exact same thing as you did for Voice of All except I set the first trigger to set at ZONECHANGE_END, because apparently ZONECHANGE_TRANSITION was bugging out for me, and seeing as the color wasn't changing I thought the integer in the LinkedDC wasn't changing and scrapped the whole idea of putting the second ability in the second ability block,

One more thing, is it possible to put multiple filters in the same RESOLUTION_TIME_ACTION? I was making the Empires artifact cycle and when I tried local filter == ClearFilter() and local filter2 == ClearFilter() the card only checked for the second filter, so I had to put the two in two separate RESOLUTION_TIME_ACTIONs and save the count for the first filter in a data chest...
User avatar
GrovyleXShinyCelebi
 
Posts: 294
Joined: 12 Jun 2013, 18:23
Has thanked: 14 times
Been thanked: 35 times

Re: Report cards error here

Postby thefiremind » 01 Oct 2013, 08:45

GrovyleXShinyCelebi wrote:One more thing, is it possible to put multiple filters in the same RESOLUTION_TIME_ACTION? I was making the Empires artifact cycle and when I tried local filter == ClearFilter() and local filter2 == ClearFilter() the card only checked for the second filter, so I had to put the two in two separate RESOLUTION_TIME_ACTIONs and save the count for the first filter in a data chest...
ClearFilter() is a function defined in one of the official LOL files, and what it actually does is
Code: Select all
MTG():GetCurrentObject():ClearFilter()
This means there's only 1 filter per object, you can't declare other ones. You can use differently set filters in the same action, though: just use the first, save the result you need, then use the second.
< 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: 717 times

Re: Report cards error here

Postby MC Brodie » 02 Oct 2013, 00:45

Okay TFM, I have a few questions on what you've commented on for Opal-Eye, Konda's Yojimbo in another thread. Instead of cluttering up Kieran's thread or the Formal Request thread, I've decided to post it here. Is this where these kind of questions are supposed to go anyway? Well on to the actual questions...

Here is your quote from here:
thefiremind wrote:
MC Brodie wrote:I guess you are supposed to target the permanent that activated/triggered the ability.
A source could potentially be in any zone, so you need to let the player choose the zone. Luckily it isn't targetted, so a query will suffice (without the need to use modes).
I knew it wasn't technically targeting but I was confused in thinking you needed to select say the triggered ability from a dying Goblin Arsonist while it's on the stack instead of the Goblin Arsonist itself. I realized this was wrong as I was posting the cards I made. Now, you said the source could potentially be in any zone but the only applicable zones I could think of is the stack and battlefield. Could something damage you from the graveyard or in exile?

Also, I still couldn't figure out how to let someone choose a card from multiple zones in the same query. I resorted to using first a multiple choice to choose the zone, then a query for choosing the source in that zone. I also learned a lesson in saying things arent' possible :D . I'm assuming this is what you meant but I wanted to check if I was off base. I know gorem was working on a card that would let you make a selection from multiple zones in the same query but I don't know if he ever got it working.

Lastly, sorry to bother you with such beginner questions. You were just the sorry modder that commented on my issues :D.

Opal-Eye, Konda's Yojimbo | Open
Code: Select all
<?xml version='1.0' encoding='UTF-8'?>
<CARD_V2 ExportVersion="1">
  <FILENAME text="OPALEYE_KONDAS_YOJIMBO_867074655" />
  <CARDNAME text="OPALEYE_KONDAS_YOJIMBO" />
  <TITLE>
    <LOCALISED_TEXT LanguageCode="en-US"><![CDATA[Opal-Eye, Konda’s Yojimbo]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="fr-FR"><![CDATA[Œil d’opale, yojimbo de Konda]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="es-ES"><![CDATA[Ojo de ópalo, yojimbo de Konda]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="de-DE"><![CDATA[Opalauge, Kondas Yojimbo]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="it-IT"><![CDATA[Occhiopale, Yojimbo di Konda]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="jp-JA"><![CDATA[今田の用心棒、乳眼]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="ko-KR"><![CDATA[Opal-Eye, Konda’s Yojimbo]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="ru-RU"><![CDATA[Opal-Eye, Konda’s Yojimbo]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="pt-BR"><![CDATA[Olho-Opalino, Yojimbo de Konda]]></LOCALISED_TEXT>
  </TITLE>
  <MULTIVERSEID value="867074655" />
  <ARTID value="867074655" />
  <ARTIST name="Greg Staples" />
  <CASTING_COST cost="{1}{W}{W}" />
  <SUPERTYPE metaname="Legendary" />
  <TYPE metaname="Creature" />
  <SUB_TYPE metaname="Fox" />
  <SUB_TYPE metaname="Samurai" />
  <EXPANSION value="BOK" />
  <RARITY metaname="R" />
  <POWER value="1" />
  <TOUGHNESS value="4" />
  <TRIGGERED_ABILITY badge="BADGE_BUSHIDO">
   <LOCALISED_TEXT LanguageCode="en-US"><![CDATA[Bushido 1]]></LOCALISED_TEXT>
   <LOCALISED_TEXT LanguageCode="fr-FR"><![CDATA[Bushido 1]]></LOCALISED_TEXT>
   <LOCALISED_TEXT LanguageCode="es-ES"><![CDATA[Bushido 1.]]></LOCALISED_TEXT>
   <LOCALISED_TEXT LanguageCode="de-DE"><![CDATA[Bushido 1]]></LOCALISED_TEXT>
   <LOCALISED_TEXT LanguageCode="it-IT"><![CDATA[Bushido 1]]></LOCALISED_TEXT>
   <LOCALISED_TEXT LanguageCode="jp-JA"><![CDATA[武士道 1]]></LOCALISED_TEXT>
   <LOCALISED_TEXT LanguageCode="ko-KR"><![CDATA[무사도 1]]></LOCALISED_TEXT>
   <LOCALISED_TEXT LanguageCode="ru-RU"><![CDATA[Бусидо 1]]></LOCALISED_TEXT>
   <LOCALISED_TEXT LanguageCode="pt-BR"><![CDATA[Bushido 1]]></LOCALISED_TEXT>
   <TRIGGER value="BLOCKS_A_CREATURE" simple_qualifier="self" to_zone="ZONE_ANY" from_zone="ZONE_ANY" />
   <TRIGGER value="WAS_BLOCKED" simple_qualifier="self" />
   <CONTINUOUS_ACTION layer="7C">
      if TriggerObject() ~= nil then
         local characteristics = TriggerObject():GetCurrentCharacteristics()
         characteristics:Power_Add( 1 )
         characteristics:Toughness_Add( 1 )
      end
    </CONTINUOUS_ACTION>
   <DURATION simple_duration="UntilEOT" />
  </TRIGGERED_ABILITY>
  <STATIC_ABILITY>
   <CONTINUOUS_ACTION layer="6">
      if EffectSource() ~= nil then
      local characteristics = EffectSource():GetCurrentCharacteristics()
         characteristics:Int_Add( INT_CHARACTERISTIC_BUSHIDO, 1 )
      end
    </CONTINUOUS_ACTION>
  </STATIC_ABILITY>
  <STATIC_ABILITY commaspace="1">
   <LOCALISED_TEXT LanguageCode="en-US"><![CDATA[defender]]></LOCALISED_TEXT>
   <LOCALISED_TEXT LanguageCode="fr-FR"><![CDATA[défenseur]]></LOCALISED_TEXT>
   <LOCALISED_TEXT LanguageCode="es-ES"><![CDATA[defensor]]></LOCALISED_TEXT>
   <LOCALISED_TEXT LanguageCode="de-DE"><![CDATA[verteidiger]]></LOCALISED_TEXT>
   <LOCALISED_TEXT LanguageCode="it-IT"><![CDATA[difensore]]></LOCALISED_TEXT>
   <LOCALISED_TEXT LanguageCode="jp-JA"><![CDATA[防衛]]></LOCALISED_TEXT>
   <LOCALISED_TEXT LanguageCode="ko-KR"><![CDATA[수비태세]]></LOCALISED_TEXT>
   <LOCALISED_TEXT LanguageCode="ru-RU"><![CDATA[sащитник]]></LOCALISED_TEXT>
   <LOCALISED_TEXT LanguageCode="pt-BR"><![CDATA[defensor]]></LOCALISED_TEXT>
   <INTRINSIC characteristic="CHARACTERISTIC_DEFENDER" />
  </STATIC_ABILITY>
  <ACTIVATED_ABILITY>
    <LOCALISED_TEXT LanguageCode="en-US"><![CDATA[{T}: The next time a source of your choice would deal damage this turn, that damage is dealt to Opal-Eye, Konda’s Yojimbo instead.]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="fr-FR"><![CDATA[{T}: The next time a source of your choice would deal damage this turn, that damage is dealt to Opal-Eye, Konda’s Yojimbo instead.]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="es-ES"><![CDATA[{T}: The next time a source of your choice would deal damage this turn, that damage is dealt to Opal-Eye, Konda’s Yojimbo instead.]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="de-DE"><![CDATA[{T}: The next time a source of your choice would deal damage this turn, that damage is dealt to Opal-Eye, Konda’s Yojimbo instead.]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="it-IT"><![CDATA[{T}: The next time a source of your choice would deal damage this turn, that damage is dealt to Opal-Eye, Konda’s Yojimbo instead.]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="jp-JA"><![CDATA[{T}: The next time a source of your choice would deal damage this turn, that damage is dealt to Opal-Eye, Konda’s Yojimbo instead.]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="ko-KR"><![CDATA[{T}: The next time a source of your choice would deal damage this turn, that damage is dealt to Opal-Eye, Konda’s Yojimbo instead.]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="ru-RU"><![CDATA[{T}: The next time a source of your choice would deal damage this turn, that damage is dealt to Opal-Eye, Konda’s Yojimbo instead.]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="pt-BR"><![CDATA[{T}: The next time a source of your choice would deal damage this turn, that damage is dealt to Opal-Eye, Konda’s Yojimbo instead.]]></LOCALISED_TEXT>
   <COST type="TapSelf" />
   <RESOLUTION_TIME_ACTION>
      local player = EffectController()
      local source = EffectSource()
      local filter = ClearFilter()
      filter:SetZone(ZONE_STACK)
      local CheckStack = filter:CountStopAt(1)
      filter = ClearFilter()
      filter:SetZone(ZONE_GRAVEYARD)
      local CheckGraveyard = filter:CountStopAt(1)
      if (source ~= nil and player ~= nil) then
         player:BeginNewMultipleChoice()
         player:AddMultipleChoiceAnswer( "OPAL_EYE_CHOOSE_BATTLEFIELD" )
         player:AddMultipleChoiceAnswer( "OPAL_EYE_CHOOSE_GRAVEYARD", CheckGraveyard == 1 )
         player:AddMultipleChoiceAnswer( "OPAL_EYE_CHOOSE_STACK", CheckStack == 1 )
         player:AskMultipleChoiceQuestion( "OPAL_EYE_MC_CHOOSE_ZONE", source )
      end
   </RESOLUTION_TIME_ACTION>
   <RESOLUTION_TIME_ACTION>
      local filter = ClearFilter()
      local decision = EffectController():GetMultipleChoiceResult()
      if decision ~= nil and decision == 2 then
         filter:SetZone(ZONE_STACK)
      elseif decision ~= nil and decision == 1 then
         filter:SetZone(ZONE_GRAVEYARD)
      else
         filter:SetZone(ZONE_BATTLEFIELD)
      end
      EffectController():ChooseItem( "CARD_QUERY_CHOOSE_SOURCE_TO_REDIRECT", EffectDC():Make_Targets(6) )
    </RESOLUTION_TIME_ACTION>
   <RESOLUTION_TIME_ACTION>
      local source = EffectDC():Get_Targets(6):Get_CardPtr(0)
      if source ~= nil and EffectSource() ~= nil then
         local delayDC = EffectDC():Make_Chest(2)
         delayDC:Set_CardPtr(0, source)
         delayDC:Protect_CardPtr(0)
         MTG():CreateDelayedTrigger(1, delayDC)
      end
    </RESOLUTION_TIME_ACTION>
   <AI_AVAILABILITY type="in_response" response_source="1" />
   <AI_AVAILABILITY window_step="declare_blockers" type="window" />
  </ACTIVATED_ABILITY>
  <ACTIVATED_ABILITY>
    <LOCALISED_TEXT LanguageCode="en-US"><![CDATA[{1}{W}: Prevent the next 1 damage that would be dealt to Opal-Eye this turn.]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="fr-FR"><![CDATA[{1}{W}: Prevent the next 1 damage that would be dealt to Opal-Eye this turn.]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="es-ES"><![CDATA[{1}{W}: Prevent the next 1 damage that would be dealt to Opal-Eye this turn.]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="de-DE"><![CDATA[{1}{W}: Prevent the next 1 damage that would be dealt to Opal-Eye this turn.]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="it-IT"><![CDATA[{1}{W}: Prevent the next 1 damage that would be dealt to Opal-Eye this turn.]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="jp-JA"><![CDATA[{1}{W}: Prevent the next 1 damage that would be dealt to Opal-Eye this turn.]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="ko-KR"><![CDATA[{1}{W}: Prevent the next 1 damage that would be dealt to Opal-Eye this turn.]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="ru-RU"><![CDATA[{1}{W}: Prevent the next 1 damage that would be dealt to Opal-Eye this turn.]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="pt-BR"><![CDATA[{1}{W}: Prevent the next 1 damage that would be dealt to Opal-Eye this turn.]]></LOCALISED_TEXT>
   <COST mana_cost="{1}{W}" type="Mana" />
   <RESOLUTION_TIME_ACTION>
      if EffectSource() ~= nil then
         local delayDC = EffectDC():Make_Chest(1)
         MTG():CreateDelayedTrigger(0, delayDC)
      end
    </RESOLUTION_TIME_ACTION>
   <AI_AVAILABILITY type="in_response" response_source="1" />
   <AI_AVAILABILITY window_step="declare_attackers" window_turn="their_turn" type="window" />
   <AI_AVAILABILITY window_step="declare_blockers" type="window" />
  </ACTIVATED_ABILITY>
  <TRIGGERED_ABILITY replacement_effect="1" resource_id="0">
    <CLEANUP fire_once="1" simple_cleanup="EndOfTurn" />
    <TRIGGER value="OBJECT_TAKES_DAMAGE" pre_trigger="1" damage_type="all">
      return TriggerObject() == EffectSource()
    </TRIGGER>
    <RESOLUTION_TIME_ACTION>
      local damage = Damage()
      if  damage ~= nil then
         damage:PreventAmount( 1 )
      end
    </RESOLUTION_TIME_ACTION>
  </TRIGGERED_ABILITY>
  <TRIGGERED_ABILITY replacement_effect="1" resource_id="1">
    <CLEANUP fire_once="1" simple_cleanup="EndOfTurn" />
    <TRIGGER value="SOURCE_DEALS_DAMAGE" pre_trigger="1" damage_type="all">
      return TriggerObject() == EffectDC():Get_CardPtr(0)
    </TRIGGER>
    <RESOLUTION_TIME_ACTION>
      local damage = Damage()
      if damage ~= nil and EffectSource() ~= nil then
         damage:RedirectAllTo( EffectSource() )
      end
    </RESOLUTION_TIME_ACTION>
  </TRIGGERED_ABILITY>
  <HELP title="MORE_INFO_BADGE_TITLE_6" body="MORE_INFO_BADGE_BODY_6" zone="ZONE_ANY" />
  <HELP title="MORE_INFO_TITLE_BUSHIDO" body="MORE_INFO_BODY_BUSHIDO" zone="ZONE_ANY" />
  <SFX text="COMBAT_BLUNT_LARGE_ATTACK" power_boundary_min="4" power_boundary_max="-1" />
  <SFX text="COMBAT_BLUNT_SMALL_ATTACK" power_boundary_min="1" power_boundary_max="3" />
</CARD_V2>
Edit - Hmmm I guess the Goblin Arsonist example I gave could also be an example of a card that does damage to you from a graveyard... I'm still guessing that the exile zone isn't applicable.

Edit 2 - Well I fixed the code so you could select cards in your graveyard, however, my code doesn't seem to redirect damage from a cards in the graveyard. I've tried both selecting the Goblin Arsonist while it was on the battlefield and selecting it while it was in the graveyard. Both times the arsonist damaged those resilient Doomed Travelers Sigismund played. I even remembered to protect the selected card so the data chest would work between zones (tested on selecting a haste creature on the stack). Any ideas?
-----------------------------------------------------------------------
Song of the Day: 46 and 2 (cover)
MC Brodie
 
Posts: 310
Joined: 01 Jun 2013, 00:10
Has thanked: 44 times
Been thanked: 34 times

Re: Report cards error here

Postby RiiakShiNal » 02 Oct 2013, 01:30

Well, there could be a source in Exile that could do damage to you when it enters the battlefield, for example an opponent has an exiled Anathemancer that will return due to some other effect (maybe it was flickered) and while exiled they cast Abeyance. To prevent the damage from Anathemancer you would have to use Opal-Eye, Konda's Yojimbo to prevent the damage from Anathemancer while it is in Exile as a response to the casting of Abeyance. So technically you should be able to select a source from anywhere that is not a private zone. As for being able to select a card from multiple zones you could do it if you put the cards into a data chest and had the user select the card from the data chest, but then there is the problem about which card is in which zone. As for needing to be able to select something in the Graveyard, well if they cast Abeyance then decided to Unearth Anathemancer then you have the same problem.
Problems with base game cards: DotP 2014 Core Fixes
Need a deck builder: DotP 2014 Deck Builder
Problems Modding: DotP 2014 Frequent Modding Mistakes
RiiakShiNal
Programmer
 
Posts: 2130
Joined: 16 May 2011, 21:37
Has thanked: 73 times
Been thanked: 473 times

Re: Report cards error here

Postby GrovyleXShinyCelebi » 02 Oct 2013, 02:37

What about a target definition like this?

Code: Select all
<TARGET_DEFINITION id=0>
local filter = ClearFilter()
filter:SetZone( ZONE_ANYWHERE)
</TARGET_DEFINITION>
and if not that:
Code: Select all
<TARGET_DEFINITION id=0 >
local filter = ClearFilter()
filter:Add( FE_ZONE, OP_IS, ZONE_BATTLEFIELD )
filter:Add( FE_ZONE, OP_IS, ZONE_HAND )
filter:Add( FE_ZONE, OP_IS, ZONE_GRAVEYARD )
filter:Add( FE_ZONE, OP_IS, ZONE_STACK )
filter:Add( FE_ZONE, OP_IS, ZONE_TRANSITION )
filter:Add( FE_ZONE, OP_IS, ZONE_EXILE )
filter:Add( FE_ZONE, OP_IS, ZONE_LIBRARY )
</TARGET_DEFINITION>
This might backfire badly as I know there are issues with cards in ZONE_EXILE being targeted, but it's worth a shot. :mrgreen:

Otherwise, you could just approximate the card with the second code and only adding zones where cards are known that they can be targetted ( ZONE_BATTLEFIELD, ZONE_STACK, ZONE_GRAVEYARD )
User avatar
GrovyleXShinyCelebi
 
Posts: 294
Joined: 12 Jun 2013, 18:23
Has thanked: 14 times
Been thanked: 35 times

PreviousNext

Return to Programming Talk

Who is online

Users browsing this forum: No registered users and 4 guests


Who is online

In total there are 4 users online :: 0 registered, 0 hidden and 4 guests (based on users active over the past 10 minutes)
Most users ever online was 564 on 05 Dec 2019, 12:05

Users browsing this forum: No registered users and 4 guests

Login Form