It is currently 24 Apr 2024, 22:49
   
Text Size

Trying to sort out Sidisi

Moderator: CCGHQ Admins

Trying to sort out Sidisi

Postby volrathxp » 21 Sep 2014, 21:25

So I'm trying to sort out how Sidisi, Brood Tyrant and how her second trigger works. Right now I've got a trigger, but I'm not really sure how to make that trigger fire appropriately. Sidisi says that "whenever one or more creature cards are put into your graveyard from your library..." which means that no matter how many creatures go into your yard from a mill, you should always only get 1 trigger (and therefore only 1 zombie token).

This is what I have right now, so just need to sort it out from here.

Sidisi Trigger | Open
Code: Select all
  <TRIGGERED_ABILITY active_zone="ZONE_GRAVEYARD">
    <LOCALISED_TEXT LanguageCode="en-US"><![CDATA[Whenever one or more creature cards are put into your graveyard from your library, put a 2/2 black Zombie creature token onto the battlefield.]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="fr-FR"><![CDATA[À chaque fois qu’au moins une carte de créature est mise dans votre cimetière depuis votre bibliothèque, mettez sur le champ de bataille un jeton de créature 2/2 noire Zombie.]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="es-ES"><![CDATA[Siempre que una o más criaturas vayan de tu biblioteca a tu cementerio, pon en el campo de batalla una ficha de criatura Zombie negra 2/2.]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="de-DE"><![CDATA[Immer wenn eine oder mehr Kreaturenkarten von deiner Bibliothek auf deinen Friedhof gelegt werden, bringe einen 2/2 schwarzen Zombie-Kreaturenspielstein ins Spiel.]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="it-IT"><![CDATA[Ogniqualvolta una o più carte creatura vengono messe nel tuo cimitero dal tuo grimorio, metti sul campo di battaglia una pedina creatura Zombie 2/2 nera.]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="jp-JA"><![CDATA[クリーチャー・カードが1枚以上あなたのライブラリーからあなたの墓地に置かれるたび、黒の2/2のゾンビ・クリーチャー・トークンを1体戦場に出す。]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="ko-KR"><![CDATA[당신의 서고에서 한 개 이상의 생물이 당신의 무덤으로 갈 때마다, 2/2 흑색 좀비 생물 토큰 한 개를 전장에 놓는다.]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="ru-RU"><![CDATA[Каждый раз, когда одна или несколько карт существ попадают на ваше кладбище из вашей библиотеки, положите на поле битвы одну фишку существа 2/2 черный Зомби.]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="pt-BR"><![CDATA[Toda vez que um ou mais cards de criaturas forem colocados do seu grimório no seu cemitério, coloque no campo de batalha uma ficha de criatura preta 2/2 do tipo Zumbi.]]></LOCALISED_TEXT>
  <TRIGGER value="ZONECHANGE_END" to_zone="ZONE_GRAVEYARD" from_zone="ZONE_LIBRARY" />
</TRIGGERED_ABILITY>
volrathxp
User avatar
volrathxp
 
Posts: 362
Joined: 23 Jul 2014, 17:34
Has thanked: 9 times
Been thanked: 17 times

Re: Trying to sort out Sidisi

Postby thefiremind » 21 Sep 2014, 22:51

First, active_zone="ZONE_GRAVEYARD" is wrong: that means that the ability would trigger only when the card itself is in a graveyard, that's not what we want.

About how to code "one or more", it's the first time I have to deal with this kind of problem, so I would go by trial and error as much as you. Basically what should happen is that each effect should trigger this once, and then no more until another effect kicks in. I would suggest trying something along those lines:
Code: Select all
  <TRIGGERED_ABILITY linked_ability_group="1">
    <LOCALISED_TEXT LanguageCode="en-US"><![CDATA[Whenever one or more creature cards are put into your graveyard from your library, put a 2/2 black Zombie creature token onto the battlefield.]]></LOCALISED_TEXT>
    <TRIGGER value="ZONECHANGE_END" to_zone="ZONE_GRAVEYARD" from_zone="ZONE_LIBRARY">
    if LinkedDC():Get_Int(0) == 0 and TriggerObject():GetOwner() == EffectController() and TriggerObject():GetCardType():Test(CARD_TYPE_CREATURE) then
       LinkedDC():Set_Int(0, 1) -- disable this trigger
       return true
    end
    return false
    </TRIGGER>
    <RESOLUTION_TIME_ACTION>
    MTG():PutTokensOntoBattlefield( "TOKEN_ZOMBIE_2_2_B_...", 1, EffectController() )
    </RESOLUTION_TIME_ACTION>
  </TRIGGERED_ABILITY>
  <TRIGGERED_ABILITY replacement_effect="1" linked_ability_group="1">
    <TRIGGER value="STACK_PUSHED" />
    <RESOLUTION_TIME_ACTION>
    LinkedDC():Set_Int(0, 0) -- re-enable the other trigger
    </RESOLUTION_TIME_ACTION>
  </TRIGGERED_ABILITY>
Note: I have never used STACK_PUSHED before, so it's just an idea that probably won't work, and even if it worked as I imagine, it would probably fail when the milling effect is done through an internal (replacement_effect or replacement_query) trigger, such as dredge. I don't have any better ideas, though. At least it's a starting point.

EDIT: Another trigger that might be worth trying is STATE_BASED_EFFECTS... does anyone think that state-based are checked while multiple cards change zone at once?
Last edited by thefiremind on 21 Sep 2014, 23:00, edited 3 times in total.
< 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: 721 times

Re: Trying to sort out Sidisi

Postby volrathxp » 21 Sep 2014, 22:57

thefiremind wrote:First, active_zone="ZONE_GRAVEYARD" is wrong: that means that the ability would trigger only when the card itself is in a graveyard, that's not what we want.

About how to code "one or more", it's the first time I have to deal with this kind of problem, so I would go by trial and error as much as you. Basically what should happen is that each effect should trigger this once, and then no more until another effect kicks in. I would suggest trying something along those lines:
Code: Select all
  <TRIGGERED_ABILITY linked_ability_group="1">
    <LOCALISED_TEXT LanguageCode="en-US"><![CDATA[Whenever one or more creature cards are put into your graveyard from your library, put a 2/2 black Zombie creature token onto the battlefield.]]></LOCALISED_TEXT>
    <TRIGGER value="ZONECHANGE_END" to_zone="ZONE_GRAVEYARD" from_zone="ZONE_LIBRARY">
    if LinkedDC():Get_Int(0) == 0 and TriggerObject():GetOwner() == EffectController() and TriggerObject():GetCardType():Test(CARD_TYPE_CREATURE) then
       LinkedDC():Set_Int(0, 1) -- disable this trigger
       return true
    end
    return false
    </TRIGGER>
    <RESOLUTION_TIME_ACTION>
    MTG():PutTokensOntoBattlefield( "TOKEN_ZOMBIE_2_2_B_...", 1, EffectController() )
    </RESOLUTION_TIME_ACTION>
  </TRIGGERED_ABILITY>
  <TRIGGERED_ABILITY replacement_effect="1" linked_ability_group="1">
    <TRIGGER value="STACK_PUSHED" />
    <RESOLUTION_TIME_ACTION>
    LinkedDC():Set_Int(0, 0) -- re-enable the other trigger
    </RESOLUTION_TIME_ACTION>
  </TRIGGERED_ABILITY>
Note: I have never used STACK_PUSHED before, so it's just an idea that probably won't work, and even if it worked as I imagine, it would probably fail when the milling effect is done through an internal (replacement_effect or replacement_query) trigger, such as dredge. I don't have any better ideas, though. At least it's a starting point.
I will give this a shot. Thanks :)

I was sorting out looking at Narcomeba and that's where that came from.
volrathxp
User avatar
volrathxp
 
Posts: 362
Joined: 23 Jul 2014, 17:34
Has thanked: 9 times
Been thanked: 17 times

Re: Trying to sort out Sidisi

Postby Tejahn » 21 Sep 2014, 23:41

I just uploaded a deck using her. I'll use TFM's code instead of the one I posted since it's cleaner.
Tejahn
 
Posts: 430
Joined: 14 May 2013, 01:35
Has thanked: 25 times
Been thanked: 25 times

Re: Trying to sort out Sidisi

Postby thefiremind » 22 Sep 2014, 08:26

Tejahn wrote:I just uploaded a deck using her. I'll use TFM's code instead of the one I posted since it's cleaner.
Please test it before calling it right (I would suggest testing it at least against dredge and against milling while another mill effect is on the stack). Maybe your code won't be cleaner but it will work better, who knows?
< 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: 721 times

Re: Trying to sort out Sidisi

Postby NeoAnderson » 22 Sep 2014, 10:09

thefiremind wrote:
Tejahn wrote:I just uploaded a deck using her. I'll use TFM's code instead of the one I posted since it's cleaner.
Please test it before calling it right (I would suggest testing it at least against dredge and against milling while another mill effect is on the stack). Maybe your code won't be cleaner but it will work better, who knows?
I have tested your code Fire, it works with multiple instances of milling effect like Millstone, or Thought Scour..so i think it should work also with Dredge mechanic..
NeoAnderson
 
Posts: 914
Joined: 10 Sep 2013, 07:49
Has thanked: 18 times
Been thanked: 139 times

Re: Trying to sort out Sidisi

Postby Tejahn » 25 Sep 2014, 14:37

thefiremind wrote:
Tejahn wrote:I just uploaded a deck using her. I'll use TFM's code instead of the one I posted since it's cleaner.
Please test it before calling it right (I would suggest testing it at least against dredge and against milling while another mill effect is on the stack). Maybe your code won't be cleaner but it will work better, who knows?
I tested your code also and everything seems fine. And as you said, both codes are working properly.
Tejahn
 
Posts: 430
Joined: 14 May 2013, 01:35
Has thanked: 25 times
Been thanked: 25 times


Return to Programming Talk

Who is online

Users browsing this forum: No registered users and 22 guests


Who is online

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

Login Form