It is currently 16 May 2024, 01:20
   
Text Size

Trying to code "Archetype of Endurance" (also any Archetype)

Moderator: CCGHQ Admins

Trying to code "Archetype of Endurance" (also any Archetype)

Postby Zambooo » 23 Feb 2015, 23:54

All 'Archetype's abilities are all the same, so once one is done, so are all the others

this is where I am right now
Archetype of Endurance | Open
Code: Select all
<?xml version='1.0' encoding='UTF-8'?>
<CARD_V2 ExportVersion="1">
  <FILENAME text="ARCHETYPE_OF_ENDURANCE_283378488" />
  <CARDNAME text="ARCHETYPE_OF_ENDURANCE" />
  <TITLE>
    <LOCALISED_TEXT LanguageCode="en-US"><![CDATA[Archetype of Endurance]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="fr-FR"><![CDATA[Archétype de l’endurance]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="es-ES"><![CDATA[Prototipo de resistencia]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="de-DE"><![CDATA[Sinnbild der Zähigkeit]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="it-IT"><![CDATA[Archetipo della Resistenza]]></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[Arquétipo da Resistência]]></LOCALISED_TEXT>
  </TITLE>
  <MULTIVERSEID value="283378488" />
  <ARTID value="A283378488" />
  <ARTIST name="Slawomir Maniak" />
  <CASTING_COST cost="{G}" />
  --   {6}{G}{G}
  <FLAVOURTEXT>
    <LOCALISED_TEXT LanguageCode="en-US"><![CDATA[Despite its fearsome stature, it is as elusive as a shadow, circling round to stalk those who presume to hunt it.]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="fr-FR"><![CDATA[Malgré sa taille redoutable, il est aussi insaisissable qu’une ombre, traquant ceux qui pensent le chasser.]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="es-ES"><![CDATA[A pesar de su impresionante estatura, es tan elusivo como una sombra. Suele moverse en círculos para acechar a aquellos que pretenden cazarlo.]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="de-DE"><![CDATA[Trotz seines furchteinflößenden Körperbaus ist es so schwer zu fassen wie ein Schatten, und pirscht sich an jene heran, die meinen, es zu jagen.]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="it-IT"><![CDATA[Nonostante la sua stazza temibile, è sfuggente come un’ombra e bracca coloro che osano cacciarlo aggirandoli di continuo.]]></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[Apesar de sua estatura temível, ele é esquivo como uma sombra, circundando aqueles que pretendem caçá-lo.]]></LOCALISED_TEXT>
  </FLAVOURTEXT>
  <TYPE metaname="Enchantment" />
  <TYPE metaname="Creature" />
  <SUB_TYPE metaname="Boar" />
  <EXPANSION value="BNG" />
  <RARITY metaname="U" />
  <POWER value="6" />
  <TOUGHNESS value="5" />
  <STATIC_ABILITY>
    <LOCALISED_TEXT LanguageCode="en-US"><![CDATA[Creatures you control have hexproof.]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="fr-FR"><![CDATA[Les créatures que vous contrôlez ont la défense talismanique.]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="es-ES"><![CDATA[Las criaturas que controlas tienen la habilidad de antimaleficio.]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="de-DE"><![CDATA[Kreaturen, die du kontrollierst, haben Fluchsicherheit.]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="it-IT"><![CDATA[Le creature che controlli hanno anti-malocchio.]]></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[As criaturas que você controla têm resistência a magia.]]></LOCALISED_TEXT>
   <FILTER filter_id="0">
    local filter = ClearFilter()
    filter:Add( FE_TYPE, OP_IS, CARD_TYPE_CREATURE  )
    filter:Add( FE_CONTROLLER, OP_IS, EffectController())
    </FILTER>
    <CONTINUOUS_ACTION layer="6" filter_id="0">
    if FilteredCard() ~= nil then
       local characteristics = FilteredCard():GetCurrentCharacteristics()
       characteristics:Bool_Set( CHARACTERISTIC_HEXPROOF, 1 )
    end
    </CONTINUOUS_ACTION>
  </STATIC_ABILITY>
 
  <STATIC_ABILITY>
    <LOCALISED_TEXT LanguageCode="en-US"><![CDATA[Creatures your opponents control lose hexproof and can’t have or gain hexproof.]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="fr-FR"><![CDATA[Les créatures que vos adversaires contrôlent perdent la défense talismanique et ne peuvent pas avoir ou acquérir la défense talismanique.]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="es-ES"><![CDATA[Las criaturas que controlan tus oponentes pierden la habilidad de antimaleficio y no pueden tener ni ganar esa habilidad.]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="de-DE"><![CDATA[Kreaturen, die deine Gegner kontrollieren, verlieren Fluchsicherheit und können Fluchsicherheit weder haben noch erhalten.]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="it-IT"><![CDATA[Le creature controllate dai tuoi avversari perdono anti-malocchio e non possono avere anti-malocchio.]]></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[As criaturas que seus oponentes controlam perdem resistência a magia e não podem ter nem ganhar resistência a magia.]]></LOCALISED_TEXT>
   <FILTER filter_id="0">
    local filter = ClearFilter()
    filter:Add( FE_TYPE, OP_IS, CARD_TYPE_CREATURE  )
    filter:Add( FE_TEAM, OP_NOT, EffectController():GetTeam() )
    </FILTER>
    <CONTINUOUS_ACTION layer="6" filter_id="0">
    if FilteredCard() ~= nil then
       local characteristics = FilteredCard():GetCurrentCharacteristics()
      if (characteristics:Bool_Get( CHARACTERISTIC_HEXPROOF ) == true) then
         characteristics:Bool_Set( CHARACTERISTIC_HEXPROOF, 0 )
      end
    end
    </CONTINUOUS_ACTION>
   <DURATION>
      return false
    </DURATION>
  </STATIC_ABILITY>
  <TRIGGERED_ABILITY replacement_effect="1" >
    <TRIGGER value="ZONECHANGE_END" simple_qualifier="self" to_zone="ZONE_BATTLEFIELD" from_zone="ZONE_ANY" />
    <FILTER filter_id="0">
    local filter = ClearFilter()
    filter:Add( FE_TYPE, OP_IS, CARD_TYPE_CREATURE  )
    filter:Add( FE_TEAM, OP_NOT, EffectController():GetTeam() )
    </FILTER>
    <CONTINUOUS_ACTION layer="6" filter_id="0">
    if FilteredCard() ~= nil then
       local characteristics = FilteredCard():GetCurrentCharacteristics()
      if (characteristics:Bool_Get( CHARACTERISTIC_HEXPROOF ) == true) then
         characteristics:Bool_Set( CHARACTERISTIC_HEXPROOF, 0 )
      end
    end
    </CONTINUOUS_ACTION>
   <DURATION>
      return false
    </DURATION>
  </TRIGGERED_ABILITY>
 
  <TRIGGERED_ABILITY forced_skip="1" >
    <TRIGGER value="SPELL_RESOLVED" pre_trigger="1" />
   <CLEANUP fire_once="1" />
   <TRIGGER value="ABILITY_RESOLVED" pre_trigger="1" />
    <FILTER filter_id="0">
    local filter = ClearFilter()
    filter:Add( FE_TYPE, OP_IS, CARD_TYPE_CREATURE  )
    filter:Add( FE_TEAM, OP_NOT, EffectController():GetTeam() )
    </FILTER>
    <CONTINUOUS_ACTION layer="6" filter_id="0">
    if FilteredCard() ~= nil then
       local characteristics = FilteredCard():GetCurrentCharacteristics()
      if (characteristics:Bool_Get( CHARACTERISTIC_HEXPROOF ) == true) then
         characteristics:Bool_Set( CHARACTERISTIC_HEXPROOF, 0 )
      end
    end
    </CONTINUOUS_ACTION>
   <DURATION>
      return false
    </DURATION>
   
  </TRIGGERED_ABILITY>
 
  <ACTIVATED_ABILITY active_zone="ZONE_BATTLEFIELD" >
    <LOCALISED_TEXT LanguageCode="en-US"><![CDATA[{1}: Return Arcanis the Omnipotent to its owner’s hand.]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="fr-FR"><![CDATA[{1} : Renvoyez Arcanis l’omnipotent dans la main de son propriétaire.]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="es-ES"><![CDATA[{1}: Regresa a Arcanis el omnipotente a la mano de su propietario.]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="de-DE"><![CDATA[{1}: Bringe Arcanis den Allgewaltigen auf die Hand seines Besitzers zurück.]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="it-IT"><![CDATA[{1}: Il proprietario riprende in mano Archetipo della Resistenza.]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="jp-JA"><![CDATA[{1}:全能なる者アルカニスをオーナーの手札に戻す。]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="ko-KR"><![CDATA[{1}: Return Arcanis the Omnipotent to its owner’s hand.]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="ru-RU"><![CDATA[{1}: Верните Арканиса Всемогущего в руку его владельца.]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="pt-BR"><![CDATA[{1}: Devolva Arcanis, o Onipotente, para a mão de seu dono.]]></LOCALISED_TEXT>
   <COST mana_cost="{1}" type="Mana" />
    <RESOLUTION_TIME_ACTION>
    if EffectSource() ~= nil then
       EffectSource():PutInHand()
    end
    </RESOLUTION_TIME_ACTION>
    <AI_AVAILABILITY window_step="main_2" window_turn="my_turn" type="window" />
    <AI_AVAILABILITY window_step="end_of_turn" window_turn="their_turn" type="window" />
    <AI_AVAILABILITY type="in_response" response_source="1" />
  </ACTIVATED_ABILITY>
 
  <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>
besides "Creatures you control have hexproof." (aka the easy part)
the first STATIC_ABILITY is intended for the part Creatures your opponents control lose hexproof and can't have [but still can gain] hexproof" [as Archetype of Endurance remains on the battlefield]:
-creatures your opponents control with Hexproof will loose it as long as Archetype of Endurance remains on the battlefield;
-creatures with Hexproof entering your opponents' battlefield will have no Hexproof as Archetype of Endurance remains on the battlefield;
--once Archetype of Endurance leaves the battlefield, those creatures will re-gain Hexproof

the first <TRIGGERED_ABILITY replacement_effect="1" > is intended to "patch" the "as Archetype of Endurance remains on the battlefield" bug:
-creatures your opponents control with Hexproof (at the time you cast Archetype of Endurance) will loose it and not re-gain it even Archetype of Endurance leaves the battlefield;
--those creatures can still gain Hexproof

the <TRIGGERED_ABILITY forced_skip="1" > is intended to patch the "gain" part and also to affect those permanently those creatures that still weren't on the battlefield while you were casting Archetype of Endurance:
-any time a spell or ability resolved (anything that could make creatures gain Hexproof) it reiterates the previous TRIGGERED_ABILITY, this way creatures you opponents control casted after Archetype of Endurance will not re-gain Hexproof once it leaves the battlefield and they can't actually gain Hexproof (at this moment they will gain it for a very short amount of time), but this part still as long as Archetype of Endurance remains on the battlefield;
--this ability should not have a reaction time, but making it replacement_effect="1" will make the
Code: Select all
<TRIGGER value="ABILITY_RESOLVED" pre_trigger="1" />
loops with itself (and even with the reaction time, it could loop with the ability of another Archetype of Endurance)

To make creatures unable to gain Hexproof once Archetype of Endurance leaves the field, I was thinking to grant those creature a triggered_ability similar to the last one, but I would have to deal with a serious loop problem LOL.
Or maybe leaves on the battlefield some kind of invisible token linked to all creatures that were on the battlefield at the time Archetype of Endurance left it, with a similar TriggeredAbility as before
Thinkings? Any help would be appreciated :D
User avatar
Zambooo
 
Posts: 242
Joined: 01 Jul 2012, 21:33
Has thanked: 19 times
Been thanked: 17 times

Re: Trying to code "Archetype of Endurance" (also any Archet

Postby Kithkin » 24 Feb 2015, 00:55

All 5 archetype cards are included in the CW. There is even a deck called Archetype of Victory.
User avatar
Kithkin
 
Posts: 456
Joined: 21 Feb 2014, 07:12
Location: Cologne, GERMANY
Has thanked: 11 times
Been thanked: 56 times

Re: Trying to code "Archetype of Endurance" (also any Archet

Postby Zambooo » 24 Feb 2015, 00:56

I'm gonna cry now (for the embarassment)
Plot Twist: I have every MOD but the CW
User avatar
Zambooo
 
Posts: 242
Joined: 01 Jul 2012, 21:33
Has thanked: 19 times
Been thanked: 17 times

Re: Trying to code "Archetype of Endurance" (also any Archet

Postby Kithkin » 24 Feb 2015, 01:28

Zambooo wrote:I'm gonna cry now (for the embarassment)
Plot Twist: I have every MOD but the CW
CW is the only one you will ever need :D
User avatar
Kithkin
 
Posts: 456
Joined: 21 Feb 2014, 07:12
Location: Cologne, GERMANY
Has thanked: 11 times
Been thanked: 56 times

Re: Trying to code "Archetype of Endurance" (also any Archet

Postby Zambooo » 24 Feb 2015, 01:42

I am glad to tell you that Archetypes do not work as intended, so this post is still not garbage :D
As soon as I return Archetype of Endurance to my hand creatures my opponent controlled re-gained Hexproof, this is like the only thing my code does correctly instead LOL
User avatar
Zambooo
 
Posts: 242
Joined: 01 Jul 2012, 21:33
Has thanked: 19 times
Been thanked: 17 times

Re: Trying to code "Archetype of Endurance" (also any Archet

Postby sweetLu » 24 Feb 2015, 04:41

Well that would depend on how the creature got hexproof in the first place. In some cases the creatures should regain hexproof and in some cases they should not regain hexproof. See this note from the gatherer (sorry for the formatting I'm on my phone):

2/1/2014 While you control an Archetype, continuous effects generated by the resolution of spells and abilities that would give the specified ability to creatures your opponents control aren’t created. For example, if you control Archetype of Courage, a spell cast by an opponent that gives creatures he or she controls first strike wouldn’t cause the creatures to have first strike, even if later in the turn Archetype of Courage left the battlefield. (If the spell has additional effects, such as raising the power of the creatures, those effects will apply as normal.)
2/1/2014 Conversely, continuous effects generated by static abilities (such as an Aura that granted the appropriate ability) would resume applying if the Archetype left the battlefield.

All I can say is when an archetype approximation was discussed there was much talk about the best way to go about it. I do not think it is possible to accomplish both within DotP. This was the chosen decision I'd assume since it is more common for creatures to have these base abilities than for spells or abilities to grant them.


Edit - I believe this post is the start of most of the archetype discussion (and I thought I grabbed Archetype of Endurance but I grabbed Archetype of Courage, my bad):

viewtopic.php?f=109&t=13312&p=143411&hilit=archetype#p143365
sweetLu
 
Posts: 181
Joined: 16 Jul 2014, 01:24
Has thanked: 21 times
Been thanked: 22 times

Re: Trying to code "Archetype of Endurance" (also any Archet

Postby Zambooo » 24 Feb 2015, 10:57

I admit I misread this part of the rules
Code: Select all
Conversely, continuous effects generated by static abilities (such as an Aura that granted the appropriate ability) would resume applying if the Archetype left the battlefield.
anyhow, the creature had the Hexproof intrinsic ability and regain it as soon as Archetype of Endurance leaves the field, this one is still not ok according to the rules. I'm working on that and I will post here
note: I made a version that will never ever made those creatures gain hexproof (even with auras) (and even if the Archetype leaves the battlefield), but now I see I made a mistake in the first place ehehe
User avatar
Zambooo
 
Posts: 242
Joined: 01 Jul 2012, 21:33
Has thanked: 19 times
Been thanked: 17 times

Re: Trying to code "Archetype of Endurance" (also any Archet

Postby RiiakShiNal » 24 Feb 2015, 11:28

Zambooo wrote:I admit I misread this part of the rules
Code: Select all
Conversely, continuous effects generated by static abilities (such as an Aura that granted the appropriate ability) would resume applying if the Archetype left the battlefield.
anyhow, the creature had the Hexproof intrinsic ability and regain it as soon as Archetype of Endurance leaves the field, this one is still not ok according to the rules. I'm working on that and I will post here
note: I made a version that will never ever made those creatures gain hexproof (even with auras) (and even if the Archetype leaves the battlefield), but now I see I made a mistake in the first place ehehe
An intrinsic ability is a continuous effect from a static ability so it should regain Hexproof as soon as the Archetype of Endurance leaves the battlefield (according to the rules).
RiiakShiNal
Programmer
 
Posts: 2185
Joined: 16 May 2011, 21:37
Has thanked: 75 times
Been thanked: 497 times

Re: Trying to code "Archetype of Endurance" (also any Archet

Postby Zambooo » 24 Feb 2015, 13:40

Well this sucks. I can't read. Damn it
User avatar
Zambooo
 
Posts: 242
Joined: 01 Jul 2012, 21:33
Has thanked: 19 times
Been thanked: 17 times


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 4143 on 23 Jan 2024, 08:21

Users browsing this forum: No registered users and 4 guests

Login Form