It is currently 07 Sep 2025, 23:46
   
Text Size

Planeswalker's Complementary Set [MOD]

Moderator: CCGHQ Admins

Re: gorem2k mod

Postby gorem2k » 05 Jul 2013, 01:44

trying to code Guardian of the Gateless.

not promising so far.
I can't get CHARACTERISTIC_CAN_BLOCK_ANY_NUMBER_OF_CREATURES right.

Code: Select all
    <CONTINUOUS_ACTION layer="8">
    local characteristics = EffectSource():GetCurrentCharacteristics()
    characteristics:Bool_Set( CHARACTERISTIC_CAN_BLOCK_ANY_NUMBER_OF_CREATURES, 1 )
    </CONTINUOUS_ACTION>
and I'm not sure how to count creatures whose get blocked by him. I will put this on standby.

got it!

Guardian of the Gateless | Open
Code: Select all
<?xml version='1.0'?>
<CARD_V2 ExportVersion="1">
  <FILENAME text="GUARDIAN_OF_THE_GATELESS_444366260" />
  <CARDNAME text="GUARDIAN_OF_THE_GATELESS" />
  <TITLE>
    <LOCALISED_TEXT LanguageCode="en-US"><![CDATA[Guardian of the Gateless]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="fr-FR"><![CDATA[Vigile des Sans porte]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="es-ES"><![CDATA[Guardiana de los sinportal]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="de-DE"><![CDATA[Wächterin der Gildenfreien]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="it-IT"><![CDATA[Guardiana dei Senza Cancello]]></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[Guardião dos Sem-portão]]></LOCALISED_TEXT>
  </TITLE>
  <MULTIVERSEID value="444366260" />
  <ARTID value="444366260" />
  <ARTIST name="Wesley Burt" />
  <CASTING_COST cost="{4}{W}" />
  <TYPE metaname="Creature" />
  <SUB_TYPE metaname="Angel" />
  <EXPANSION value="GTC" />
  <RARITY metaname="U" />
  <POWER value="3" />
  <TOUGHNESS value="3" />
  <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>
  <STATIC_ABILITY>
    <LOCALISED_TEXT LanguageCode="en-US"><![CDATA[Guardian of the Gateless can block any number of creatures.]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="fr-FR"><![CDATA[La Vigile des Sans porte peut bloquer n’importe quel nombre de créatures.]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="es-ES"><![CDATA[La Guardiana de los sinportal puede bloquear a cualquier cantidad de criaturas.]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="de-DE"><![CDATA[Die Wächterin der Gildenfreien kann eine beliebige Anzahl an Kreaturen blocken.]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="it-IT"><![CDATA[La Guardiana dei Senza Cancello può bloccare un qualsiasi numero di creature.]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="jp-JA"><![CDATA[Guardian of the Gateless can block any number of creatures.]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="ko-KR"><![CDATA[관문 없는 자의 수호자는 원하는 만큼의 생물을 방어할 수 있다.]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="ru-RU"><![CDATA[Хранительница Безвратных может блокировать любое количество существ.]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="pt-BR"><![CDATA[Toda vez que Guardião dos Sem-portão bloqueia, ele recebe +1/+1 até o final do turno para cada criatura que ele estiver bloqueando.]]></LOCALISED_TEXT>
    <CONTINUOUS_ACTION layer="8">
    if EffectSource() ~= nil then
    local characteristics = EffectSource():GetCurrentCharacteristics()
       characteristics:Bool_Set( CHARACTERISTIC_CAN_BLOCK_ANY_NUMBER_OF_CREATURES, 1 )
    end
    </CONTINUOUS_ACTION>
  </STATIC_ABILITY>
  <TRIGGERED_ABILITY>
    <LOCALISED_TEXT LanguageCode="en-US"><![CDATA[Whenever Guardian of the Gateless blocks, it gets +1/+1 until end of turn for each creature it’s blocking.]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="fr-FR"><![CDATA[À chaque fois que la Vigile des Sans porte bloque, elle gagne +1/+1 jusqu’à la fin du tour pour chaque créature qu’elle bloque.]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="es-ES"><![CDATA[Siempre que la Guardiana de los sinportal bloquee, obtiene +1/+1 hasta el final del turno por cada criatura a la cual está bloqueando.]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="de-DE"><![CDATA[Immer wenn die Wächterin der Gildenfreien blockt, erhält sie +1/+1 bis zum Ende des Zuges für jede Kreatur, die sie blockt.]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="it-IT"><![CDATA[Ogniqualvolta la Guardiana dei Senza Cancello blocca, prende +1/+1 fino alla fine del turno per ogni creatura che blocca.]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="jp-JA"><![CDATA[Whenever Guardian of the Gateless blocks, it gets +1/+1 until end of turn for each creature it’s blocking.]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="ko-KR"><![CDATA[관문 없는 자의 수호자가 방어할 때마다, 관문 없는 자의 수호자는 턴종료까지 자신이 방어하는 각 생물마다 +1/+1을 받는다.]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="ru-RU"><![CDATA[Каждый раз, когда Хранительница Безвратных блокирует, она получает +1/+1 до конца хода за каждое существо, которое она блокирует.]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="pt-BR"><![CDATA[Whenever Guardian of the Gateless blocks, it gets +1/+1 until end of turn for each creature it’s blocking.]]></LOCALISED_TEXT>
    <TRIGGER value="BLOCKS_A_CREATURE" simple_qualifier="self" to_zone="ZONE_ANY" from_zone="ZONE_ANY" />
    <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" />
    <AI_MODIFIERS combat_immunity="1" />
  </TRIGGERED_ABILITY>
  <HELP title="MORE_INFO_BADGE_TITLE_10" body="MORE_INFO_BADGE_BODY_10" 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>
Selecting is a bit awkward and damage resolution too but it works... blocked 3 creatures and Guardian got 6/6. at last! :D
gorem2k
 
Posts: 464
Joined: 01 Apr 2013, 04:21
Has thanked: 48 times
Been thanked: 33 times

Re: gorem2k mod

Postby thefiremind » 05 Jul 2013, 08:14

It's not 100% rule-compliant because you are basically triggering once for each creature, while the text seems to suggest that the trigger should be just one that counts all the creatures... but I don't know if there's a way to count the blocked creatures. If I find a way I'll let you know.

EDIT: I tried to count the blocked creatures through BLOCKS_A_CREATURE triggers and then pass the value to a BLOCKING trigger with the real ability, but no matter how I did that, it didn't work. I think that BLOCKING triggers are always issued before BLOCKS_A_CREATURE triggers, so we can't get some information from the second and pass it to the first.
< 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: gorem2k mod

Postby gorem2k » 05 Jul 2013, 21:07

thefiremind wrote:It's not 100% rule-compliant because you are basically triggering once for each creature, while the text seems to suggest that the trigger should be just one that counts all the creatures... but I don't know if there's a way to count the blocked creatures. If I find a way I'll let you know.

EDIT: I tried to count the blocked creatures through BLOCKS_A_CREATURE triggers and then pass the value to a BLOCKING trigger with the real ability, but no matter how I did that, it didn't work. I think that BLOCKING triggers are always issued before BLOCKS_A_CREATURE triggers, so we can't get some information from the second and pass it to the first.
it's a shame... at least Avatar of Hope, Palace Guard, etc, are easier to do.
gorem2k
 
Posts: 464
Joined: 01 Apr 2013, 04:21
Has thanked: 48 times
Been thanked: 33 times

Re: gorem2k mod

Postby sumomole » 05 Jul 2013, 23:50

thefiremind wrote:I tried to count the blocked creatures through BLOCKS_A_CREATURE triggers and then pass the value to a BLOCKING trigger with the real ability, but no matter how I did that, it didn't work. I think that BLOCKING triggers are always issued before BLOCKS_A_CREATURE triggers, so we can't get some information from the second and pass it to the first.
I think your way is feasible, because I seem to succeed, I guess you just forgot priority or linked_ability_group.
Guardian of the Gateless | Open
Code: Select all
  <TRIGGERED_ABILITY linked_ability_group="1" replacement_effect="1" priority="20">
    <TRIGGER value="BLOCKS_A_CREATURE" simple_qualifier="self" />
    <RESOLUTION_TIME_ACTION>
    LinkedDC():Int_Inc(2)
    </RESOLUTION_TIME_ACTION>
  </TRIGGERED_ABILITY>
  <TRIGGERED_ABILITY linked_ability_group="1">
    <LOCALISED_TEXT LanguageCode="en-US"><![CDATA[Whenever Guardian of the Gateless blocks, it gets +1/+1 until end of turn for each creature it’s blocking.]]></LOCALISED_TEXT>
    <TRIGGER value="BLOCKING" simple_qualifier="self" />
    <RESOLUTION_TIME_ACTION>
    EffectDC():Set_Int(2, LinkedDC():Get_Int(2))
    LinkedDC():Set_Int(2, 0)
    </RESOLUTION_TIME_ACTION>
    <CONTINUOUS_ACTION layer="7C">
    local PT_value = EffectDC():Get_Int(2)
    if EffectSource() ~= nil then
       local characteristics = EffectSource():GetCurrentCharacteristics()
       characteristics:Power_Add( PT_value )
       characteristics:Toughness_Add( PT_value )
    end
    </CONTINUOUS_ACTION>
    <DURATION simple_duration="UntilEOT" />
    <AI_MODIFIERS combat_immunity="1" />
  </TRIGGERED_ABILITY>
I'm not sure this code is consistent with the way you said.
User avatar
sumomole
Programmer
 
Posts: 611
Joined: 07 Jun 2011, 08:34
Has thanked: 51 times
Been thanked: 234 times

Re: gorem2k mod

Postby thefiremind » 06 Jul 2013, 00:00

I think I made a lot of tries both with and without priority, but without getting it right, it seems. :lol: Now, the last improvement would be to save each blocked creature in the LinkedDC so that I can check how many of those creatures are still alive and blocked during resolution. But I'll work on it tomorrow, it's late here now. :)
< 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: gorem2k mod

Postby gorem2k » 08 Jul 2013, 06:39

I know this has been tried by many moders before, BUT
I was kinda bored today so I tried anyway.

here's my rough incomplete attempt at creating a Planeswalker.

Garruk Wildspeaker | Open
Code: Select all
<?xml version='1.0'?>
<CARD_V2 ExportVersion="1">
  <FILENAME text="GARRUK_WILDSPEAKER_444247323" />
  <CARDNAME text="GARRUK_WILDSPEAKER" />
  <TITLE>
    <LOCALISED_TEXT LanguageCode="en-US"><![CDATA[Garruk Wildspeaker]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="fr-FR"><![CDATA[Garruk Languebestion]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="es-ES"><![CDATA[Garruk Portavoz Salvaje]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="de-DE"><![CDATA[Garruk Wildsprecher]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="it-IT"><![CDATA[Garruk Lingua Selvaggia]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="jp-JA"><![CDATA[野生語りのガラク]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="ko-KR"><![CDATA[Garruk Wildspeaker]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="ru-RU"><![CDATA[Garruk Wildspeaker]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="pt-BR"><![CDATA[Garruk Wildspeaker]]></LOCALISED_TEXT>
  </TITLE>
  <MULTIVERSEID value="444247323" />
  <ARTID value="444247323" />
  <ARTIST name="Aleksi Briclot" />
  <CASTING_COST cost="{2}{G}{G}" />
  <TYPE metaname="Enchantment" />
  <TYPE metaname="Hybrid" />
  <SUPERTYPE metaname="Planeswalker" />
  <SUPERTYPE metaname="Legendary" />
  <SUB_TYPE metaname="Garruk" />
  <EXPANSION value="CMD" />
  <RARITY metaname="M" />
  <TRIGGERED_ABILITY replacement_effect="1" active_zone="ZONE_TRANSITION" commaspace="1">
    <COUNTER_REGISTRATION name="Loyalty" proliferate="0" />
    <TRIGGER value="ZONECHANGE_TRANSITION" simple_qualifier="self" to_zone="ZONE_BATTLEFIELD" from_zone="ZONE_ANY" />
    <RESOLUTION_TIME_ACTION>
    if EffectSource() ~= nil then
       EffectSource():AddCounters( MTG():GetCountersType("Loyalty"), 3)
    end
    </RESOLUTION_TIME_ACTION>
  </TRIGGERED_ABILITY>

  <ACTIVATED_ABILITY>
    <LOCALISED_TEXT LanguageCode="en-US"><![CDATA[+1: Untap two target lands.]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="fr-FR"><![CDATA[+1 : Dégagez deux terrains ciblés.]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="es-ES"><![CDATA[+1: Endereza dos tierras objetivo.]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="de-DE"><![CDATA[+1: Enttappe zwei Länder deiner Wahl.]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="it-IT"><![CDATA[+1: Untap two target lands.]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="jp-JA"><![CDATA[+1:土地2つを対象とし、それらをアンタップする。]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="ko-KR"><![CDATA[+1: Untap two target lands.]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="ru-RU"><![CDATA[+1: Untap two target lands.]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="pt-BR"><![CDATA[+1: Untap two target lands.]]></LOCALISED_TEXT>
    <COUNTER_REGISTRATION name="Loyalty" />
    <COST mana_cost="" type="Mana" />
    <AVAILABILITY per_turn_limit="1" sorcery_time="1" />
    <TARGET tag="CARD_QUERY_CHOOSE_LAND_UNTAP" definition="0" compartment="0" count="2" />
    <TARGET_DEFINITION id="0">
    local filter = ClearFilter()
    filter:Add( FE_TYPE, OP_IS, CARD_TYPE_LAND )
    </TARGET_DEFINITION>
    <RESOLUTION_TIME_ACTION>
    for i = 0,(2-1) do
       local target_card = EffectDC():Get_Targets(0):Get_CardPtr(i)
       if target_card ~= nil then
          target_card:Untap()
       end
    end
    if EffectSource() ~= nil then
      EffectSource():AddCounters( MTG():GetCountersType("Loyalty"), 1)
    end
    </RESOLUTION_TIME_ACTION>
    <CONTINUOUS_ACTION layer="8">
    if EffectSource() ~= nil then
       EffectSource():GetCurrentCharacteristics():Bool_Set( CHARACTERISTIC_CANT_USE_ACTIVATED_ABILITIES, 1 )
    end
    </CONTINUOUS_ACTION>
    <DURATION simple_duration="UntilEOT" />
  </ACTIVATED_ABILITY>

  <ACTIVATED_ABILITY>
    <LOCALISED_TEXT LanguageCode="en-US"><![CDATA[-1: Put a 3/3 green Beast creature token onto the battlefield.]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="fr-FR"><![CDATA[-1 : Mettez sur le champ de bataille un jeton de créature 3/3 verte Bête.]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="es-ES"><![CDATA[-1: Pon en el campo de batalla una ficha de criatura Bestia verde 3/3.]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="de-DE"><![CDATA[-1: Bringe einen 3/3 grünen Bestien-Kreaturenspielstein ins Spiel.]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="it-IT"><![CDATA[-1: Put a 3/3 green Beast creature token onto the battlefield.]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="jp-JA"><![CDATA[-1:緑の3/3のビースト・クリーチャー・トークンを1体戦場に出す。]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="ko-KR"><![CDATA[-1: Put a 3/3 green Beast creature token onto the battlefield.]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="ru-RU"><![CDATA[-1: Put a 3/3 green Beast creature token onto the battlefield.]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="pt-BR"><![CDATA[-1: Put a 3/3 green Beast creature token onto the battlefield.]]></LOCALISED_TEXT>
    <COUNTER_REGISTRATION name="Loyalty" />
    <COST type="RemoveCountersSelf" amount="1" counter_type="Loyalty" />
    <AVAILABILITY per_turn_limit="1" sorcery_time="1" />
    <RESOLUTION_TIME_ACTION>
    MTG():PutTokensOntoBattlefield( "TOKEN_BEAST_3_3_G_350750", 1, EffectController() )
    </RESOLUTION_TIME_ACTION>
    <CONTINUOUS_ACTION layer="8">
    if EffectSource() ~= nil then
       EffectSource():GetCurrentCharacteristics():Bool_Set( CHARACTERISTIC_CANT_USE_ACTIVATED_ABILITIES, 1 )
    end
    </CONTINUOUS_ACTION>
    <DURATION simple_duration="UntilEOT" />
  </ACTIVATED_ABILITY>

  <ACTIVATED_ABILITY>
    <LOCALISED_TEXT LanguageCode="en-US"><![CDATA[-4: Creatures you control get +3/+3 and gain trample until end of turn.]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="fr-FR"><![CDATA[-4 : Les créatures que vous contrôlez gagnent +3/+3 et acquièrent le piétinement jusqu’à la fin du tour.]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="es-ES"><![CDATA[-4: Las criaturas que controlas obtienen +3/+3 y ganan la habilidad de arrollar hasta el final del turno.]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="de-DE"><![CDATA[-4: Kreaturen, die du kontrollierst, erhalten +3/+3 und verursachen bis zum Ende des Zuges Trampelschaden.]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="it-IT"><![CDATA[-4: Creatures you control get +3/+3 and gain trample until end of turn.]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="jp-JA"><![CDATA[-4:あなたがコントロールするクリーチャーは、ターン終了時まで+3/+3の修整を受けるとともにトランプルを得る。]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="ko-KR"><![CDATA[-4: Creatures you control get +3/+3 and gain trample until end of turn.]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="ru-RU"><![CDATA[-4: Creatures you control get +3/+3 and gain trample until end of turn.]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="pt-BR"><![CDATA[-4: Creatures you control get +3/+3 and gain trample until end of turn.]]></LOCALISED_TEXT>
    <COUNTER_REGISTRATION name="Loyalty" />
    <AVAILABILITY per_turn_limit="1" sorcery_time="1" />
    <COST type="RemoveCountersSelf" amount="4" counter_type="Loyalty" />
    <SFX text="GLOBAL_BIORHYTHM_PLAY" />
    <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="7C" filter_id="0">
    if FilteredCard() ~= nil then
       local characteristics = FilteredCard():GetCurrentCharacteristics()
       characteristics:Power_Add( 3 )
       characteristics:Toughness_Add( 3 )
    end
    </CONTINUOUS_ACTION>
    <CONTINUOUS_ACTION layer="6" filter_id="0">
    if FilteredCard() ~= nil then
       local characteristics = FilteredCard():GetCurrentCharacteristics()
       characteristics:Bool_Set( CHARACTERISTIC_TRAMPLE, 1 )
    end
    </CONTINUOUS_ACTION>
    <CONTINUOUS_ACTION layer="8">
    if EffectSource() ~= nil then
       EffectSource():GetCurrentCharacteristics():Bool_Set( CHARACTERISTIC_CANT_USE_ACTIVATED_ABILITIES, 1 )
    end
    </CONTINUOUS_ACTION>
    <DURATION simple_duration="UntilEOT" />
  </ACTIVATED_ABILITY>



  --destroy planeswalker if 0 loyalty.

  <TRIGGERED_ABILITY replacement_effect="1">
    <TRIGGER value="STATE_BASED_EFFECTS">
      return EffectSource():CountCounters( MTG():GetCountersType("Loyalty") ) &lt; 1
    </TRIGGER>
    <RESOLUTION_TIME_ACTION>
      EffectSource():PutInGraveyard()
    </RESOLUTION_TIME_ACTION>
  </TRIGGERED_ABILITY>



  -- redirection damage (wrong)

  <TRIGGERED_ABILITY replacement_effect="1">
    <TRIGGER value="PLAYER_TAKES_DAMAGE" pre_trigger="1">
    return TriggerPlayer() == EffectController()
    </TRIGGER>
    <RESOLUTION_TIME_ACTION>
    local damage = Damage():GetAmount()
    EffectDC():Int_Set(0, damage)
    local effectController = EffectController()
      if effectController ~= nil then
       effectController:BeginNewMultipleChoice()   
       effectController:AddMultipleChoiceAnswer( "CARD_QUERY_PLANESWALKER_TAKES_DAMAGE" ) 
       effectController:AddMultipleChoiceAnswer( "CARD_QUERY_PLAYER_TAKES_DAMAGE" )   
       effectController:AskMultipleChoiceQuestion( "CARD_QUERY_MC_DAMAGE", EffectSource() )
      end
    </RESOLUTION_TIME_ACTION>
    <RESOLUTION_TIME_ACTION>
    local result = EffectController():GetMultipleChoiceResult()
    local damage = EffectDC():Int_Get(0)
    if result == 0 then
             EffectSource():RemoveCounters( MTG():GetCountersType("Loyalty"), damage)
             Damage():RedirectAllTo( EffectSource() )
    end
    </RESOLUTION_TIME_ACTION>
    <CLEANUP fire_once="1" />
  </TRIGGERED_ABILITY>

  <STATIC_ABILITY>
    <CONTINUOUS_ACTION layer="8">
    EffectController():GetCurrentCharacteristics():Bool_Set( PLAYER_CHARACTERISTIC_AI_PARIAH_HACK, 1 )
    </CONTINUOUS_ACTION>
  </STATIC_ABILITY>

  <TOKEN_REGISTRATION reservation="1" type="TOKEN_BEAST_3_3_G_350750" />
</CARD_V2>
the redirection damage doesn't work at all and should consider damage individually instead of a group damage. also the question should be asked by attacker. it's one of most difficult part. the rest seems fine. has same drawbacks as before (ie enchantment)
gorem2k
 
Posts: 464
Joined: 01 Apr 2013, 04:21
Has thanked: 48 times
Been thanked: 33 times

Re: gorem2k mod

Postby sumomole » 08 Jul 2013, 07:01

gorem2k wrote:I know this has been tried by many moders before, BUT
I was kinda bored today so I tried anyway.

here's my rough incomplete attempt at creating a Planeswalker.

the redirection damage doesn't work at all and should consider damage individually instead of a group damage. also the question should be asked by attacker. it's one of most difficult part. the rest seems fine. has same drawbacks as before (ie enchantment)
If you need some action, you should use replacement_query, rather than replacement_effect.
There's a problem, your Planeswalker is super type, I made Magmaquake, but it uses card type, in this case we need to recode all cards relate to Planeswalker, and we also need to solve, Magmaquake how to deals damage to Planeswalker.
User avatar
sumomole
Programmer
 
Posts: 611
Joined: 07 Jun 2011, 08:34
Has thanked: 51 times
Been thanked: 234 times

Re: gorem2k mod

Postby gorem2k » 08 Jul 2013, 07:08

sumomole wrote:If you need some action, you should use replacement_query, rather than replacement_effect.
I won't be able to finish this before 2015 or 2016. by that time, maybe we will have genuine Planeswalkers!

sumomole wrote:Also a problem, your Planeswalker is super type, I made Magmaquake, but it uses card type, in this case we need to recode all cards relate to Planeswalker.
if I use sub type Planeswalker it goes to graveyard when I cast it.. didn't find a workaround yet. I tried other things but card was invisible when starting a duel. only visible in Deck Manager

and yes, when I saw your Magmaquake, I wanted to code a Planeswalker! :D
gorem2k
 
Posts: 464
Joined: 01 Apr 2013, 04:21
Has thanked: 48 times
Been thanked: 33 times

Re: gorem2k mod

Postby gorem2k » 09 Jul 2013, 06:48

first post updated with a planeswalker experimental deck. say whatever you want !!
gorem2k
 
Posts: 464
Joined: 01 Apr 2013, 04:21
Has thanked: 48 times
Been thanked: 33 times

Re: gorem2k mod

Postby gorem2k » 27 Jul 2013, 03:03

made a few cards today,
would really apreciate if someone could check & fix them if necessary.

Darien, King of Kjeldor and Murder Investigation are wrong. the rest *seems* fine.

test deck | Open
<DECK uid="4402" personality="D14_PERSONALITY_44_NEW_PERSONALITY.XML" deck_box_image="D14_4402_NEW_DECK_DECK_IMAGE" deck_box_image_locked="locked" content_pack="44" is_green="true" is_white="true" cheat_menu_filter_deck_type="Standard" tus_save_data_id="4402" ios_id_1="D14_DECK_UNLOCK_1" ios_id_2="D14_DECK_FOIL_1" steam_id_1="213850" steam_id_2="213850" android_id_1="d14_deck_unlock_01" android_id_2="d14_deck_foil_01" cheat_menu_filter_datapool="D14" name_tag="D14_4402_NEW_DECK" description_tag="D14_4402_NEW_DECK_DESCRIPTION">
<DECKSTATISTICS Size="5" Speed="5" Flex="5" Syn="5" />
<CARD name="STEWARD_OF_VALERON_444243428" deckOrderId="0" />
<CARD name="STEWARD_OF_VALERON_444243428" deckOrderId="1" />
<CARD name="STEWARD_OF_VALERON_444243428" deckOrderId="2" />
<CARD name="STEWARD_OF_VALERON_444243428" deckOrderId="3" />
<CARD name="WILTLEAF_CAVALIERS_444243432" deckOrderId="4" />
<CARD name="DARIEN_KING_OF_KJELDOR_444122049" deckOrderId="5" />
<CARD name="ANGELIC_PAGE_444197009" deckOrderId="6" />
<CARD name="ANGELIC_PAGE_444197009" deckOrderId="7" />
<CARD name="NEW_BENALIA_444270837" deckOrderId="8" />
<CARD name="NEW_BENALIA_444270837" deckOrderId="9" />
<CARD name="NEW_BENALIA_444270837" deckOrderId="10" />
<CARD name="NEW_BENALIA_444270837" deckOrderId="11" />
<CARD name="CHARGING_TROLL_444210556" deckOrderId="12" />
<CARD name="WALL_OF_GLARE_444015120" deckOrderId="13" />
<CARD name="WALL_OF_GLARE_444015120" deckOrderId="14" />
<CARD name="WALL_OF_GLARE_444015120" deckOrderId="15" />
<CARD name="FLASH_FOLIAGE_444107264" deckOrderId="16" />
<CARD name="FLASH_FOLIAGE_444107264" deckOrderId="17" />
<CARD name="MURDER_INVESTIGATION_444366327" deckOrderId="18" />
<CARD name="MURDER_INVESTIGATION_444366327" deckOrderId="19" />
<CARD name="FREEWIND_EQUENAUT_444107253" deckOrderId="20" />
<CARD name="FREEWIND_EQUENAUT_444107253" deckOrderId="21" />
<CARD name="VOICE_OF_RESURGENCE_444368951" deckOrderId="22" />
<CARD name="VOICE_OF_RESURGENCE_444368951" deckOrderId="23" />
<CARD name="BONDS_OF_FAITH_349042" deckOrderId="24" />
<CARD name="BONDS_OF_FAITH_349042" deckOrderId="25" />
<CARD name="PARALLEL_LIVES_444249662" deckOrderId="26" />
<CARD name="PARALLEL_LIVES_444249662" deckOrderId="27" />
<CARD name="CRESCENDO_OF_WAR_444228253" deckOrderId="28" />
<CARD name="CRESCENDO_OF_WAR_444228253" deckOrderId="29" />
<CARD name="RAMPANT_GROWTH_348501" deckOrderId="30" />
<CARD name="RAMPANT_GROWTH_348501" deckOrderId="31" />
<CARD name="RAMPANT_GROWTH_348501" deckOrderId="32" />
<CARD name="RAMPANT_GROWTH_348501" deckOrderId="33" />
</DECK>
Attachments
CARDS.zip
(23.39 KiB) Downloaded 283 times
gorem2k
 
Posts: 464
Joined: 01 Apr 2013, 04:21
Has thanked: 48 times
Been thanked: 33 times

Re: gorem2k mod

Postby thefiremind » 27 Jul 2013, 10:11

Darien's ability should be
Code: Select all
    <TRIGGER value="SOURCE_DEALS_DAMAGE_TO_PLAYER" damage_type="all">
    return SecondaryPlayer() == EffectController()
    </TRIGGER>
    <MAY />
    <RESOLUTION_TIME_ACTION>
    local numtokens = Damage():GetAmount()
    MTG():PutTokensOntoBattlefield( "TOKEN_SOLDIER_1_1_300248", numtokens, EffectController() )
    </RESOLUTION_TIME_ACTION>
The triggers for damage aren't that many, if you need to be the one who takes the damage then you must still use the same trigger as the cards that need to deal damage to another player, with the difference that you'll need to be the SecondaryPlayer. And Damage():PreventAll() should be used only when the damage needs to be prevented (as the name suggests), otherwise you should use Damage():GetAmount(). The fact that Damage():PreventAll() also returns the damage amount is just an additional facility for when you need to prevent the damage and do something based on the amount.

On Murder Investigation you need to get the power from TriggerObject's Last Known Information, since TriggerObject already changed zone:
Code: Select all
local power = TriggerObjectLKI():GetCurrentCharacteristics():Power_Get()
Last thing, you are missing the AI_SIMPLIFIED_TARGETING on all activated abilities. This will probably make the AI play very slow when one of those cards is on the battlefield because every possible moment to activate the ability will be evaluated. I know that selecting the best AI_SIMPLIFIED_TARGETING blocks from other cards is not easy (I still don't know the exact difference between response_source="1" and response_target="1" for example), but you should try to find a similar ability on already existing cards and copy the AI_SIMPLIFIED_TARGETING blocks from there.
< 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: gorem2k mod

Postby gorem2k » 28 Jul 2013, 07:47

Some cards I made today.

Beast Within
Elder of Laurels
Slate of Ancestry
Search for Tomorrow (thanks to sumomole for Suspend)
Trepanation Blade

and of course TFM for Transform cards which I also use in my personal deck. :D
Attachments
CARDS.zip
(11.03 KiB) Downloaded 283 times
gorem2k
 
Posts: 464
Joined: 01 Apr 2013, 04:21
Has thanked: 48 times
Been thanked: 33 times

Re: gorem2k mod

Postby thefiremind » 28 Jul 2013, 08:32

Slate of Ancestry asks you to discard your hand as a cost so it shouldn't happen at resolution. Since it's a cost that has no requirements whatsoever (it doesn't require to have at least a card to discard... or at least I think so :P), a PLAY_TIME_ACTION is enough: just change the first RESOLUTION_TIME_ACTION (the one with DiscardHand) into a PLAY_TIME_ACTION.

Elder of Laurels is also wrong: the number of creatures you control should be checked only once, while your code continuously updates the bonus if that number changes. Make the count in a RESOLUTION_TIME_ACTION, then save it in an EffectDC register, and read it from there in the CONTINUOUS_ACTION. Take Craterhoof Behemoth as example.
< 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: gorem2k mod

Postby gorem2k » 28 Jul 2013, 19:22

Thanks! I knew that 'discard' was part of Slate cost but I didn't know how to.
I also noticed that my Trepanation Blade doesn't discard the revealed land.

So here's the 3 fixed card.
Attachments
CARDS.zip
(6.97 KiB) Downloaded 273 times
gorem2k
 
Posts: 464
Joined: 01 Apr 2013, 04:21
Has thanked: 48 times
Been thanked: 33 times

Re: gorem2k mod

Postby gorem2k » 29 Jul 2013, 09:41

*bump'n'jump* update on first post
gorem2k
 
Posts: 464
Joined: 01 Apr 2013, 04:21
Has thanked: 48 times
Been thanked: 33 times

PreviousNext

Return to 2014

Who is online

Users browsing this forum: No registered users and 5 guests

Main Menu

User Menu

Our Partners


Who is online

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

Login Form