It is currently 18 Apr 2024, 20:25
   
Text Size

Community Wad

Moderator: CCGHQ Admins

Re: Community Wad

Postby nachonal986 » 05 Aug 2017, 05:43

Xander9009 wrote:A much better a way, and one which is ready to be imolemented once someone decides to undertake the tedium, is to register the cards with protection in a way that their protection filters can be called up by other cards. However, that's only ready to be done and has not yet actually been done.
Ok, how I can help?

With the all cards files in one folder, maybe is not too tedious open a group of them with notepad++ and use find and add after in whole the opened files checked.
User avatar
nachonal986
 
Posts: 83
Joined: 27 Jul 2015, 21:13
Has thanked: 17 times
Been thanked: 1 time

Re: Community Wad

Postby Xander9009 » 05 Aug 2017, 15:24

All of the required files have been added to the CW. The only two cards in the CW that use the functions are Mirrorwing Dragon and Black Ward. Mirrorwing Dragon doesn't have any code that needs to be distributed, but Black Ward does. It's got a function it calls in place of the normal protection function, and that will need to be distributed in addition to the triggered ability it has for the beginning of the game. There's also an ability that creates a manager token, and that ability will also need to be distributed. Note that they're kept separate intentionally. They cannot be in the same ability or the game will bug out and only run whichever one is in the first RTA.

Black Ward has this line: "CW_Protection(oParent, EffectSource())". Both parameters can be empty on any card that grants itself protection, though having both is, of course, easier to read. But "CW_Protection()" is perfectly valid for a card like Abbey Gargoyles.

There are lots of cards that have protection (283). For basically all of them, the same idea should work: Add in the two new abilities. Replace "MTG():Protection()" with "CW_Protection()". Translate its protection filter into a screen for the start-of-game triggered ability.

You'll also see that Black Ward doesn't add the line that excludes Black Ward from its own protection filter. That's because the way the screens work, you can't add pointers. That's because cards with the same name will access the same screen. So any card that has something in its protection filter that would differ from the protection filter of another card with the same name can't be handled properly. However, in the case of enchantments that simply don't remove themselves, like Black Ward, this won't affect other things trying to determine blocking/targeting restrictions, so it won't matter in the vast majority of all cases.

If you decide to give it a go, then take note of which cards you do, and I'll make a thread to track the progress.

Let me know if you need any help. If it's something minor, you can try the Discord.
_______________________________
Community Wad - Community Wad Website - How to Help and Report Bugs
Discord: discord.gg/4AXvHzW
User avatar
Xander9009
Programmer
 
Posts: 2905
Joined: 29 Jun 2013, 07:44
Location: Indiana, United States
Has thanked: 121 times
Been thanked: 445 times

Re: Community Wad

Postby erjerjerj » 05 Aug 2017, 19:23

Bug report:

Majestic Myriarch doesn't copy abilities.
(Tried it with Rhonas the Indomitable)
erjerjerj
 
Posts: 32
Joined: 23 Oct 2016, 11:58
Has thanked: 20 times
Been thanked: 3 times

Re: Community Wad

Postby nachonal986 » 05 Aug 2017, 20:56

Xander9009 wrote:There are lots of cards that have protection (283). For basically all of them, the same idea should work: Add in the two new abilities. Replace "MTG():Protection()" with "CW_Protection()". Translate its protection filter into a screen for the start-of-game triggered ability.
You can show a complete example step by step?

You mention about 283 cards detected, you have a zip of them?
User avatar
nachonal986
 
Posts: 83
Joined: 27 Jul 2015, 21:13
Has thanked: 17 times
Been thanked: 1 time

Re: Community Wad

Postby Xander9009 » 06 Aug 2017, 17:17

Sorry for the delay; I was rather busy yesterday. I can definitely do a few pictures to show the process step by step, but that'll have to wait until I'm off for the day. In the meantime, here's a text version.

Code: Select all
<?xml version='1.0' encoding='UTF-8'?>
<CARD_V2 ExportVersion="1">
   <FILENAME text="BLACK_WARD_CW_2323" />
   <CARDNAME text="BLACK_WARD" />
   <TITLE>
      <LOCALISED_TEXT LanguageCode="en-US"><![CDATA[Black Ward]]></LOCALISED_TEXT>
      <LOCALISED_TEXT LanguageCode="fr-FR"><![CDATA[Black Ward]]></LOCALISED_TEXT>
      <LOCALISED_TEXT LanguageCode="es-ES"><![CDATA[Black Ward]]></LOCALISED_TEXT>
      <LOCALISED_TEXT LanguageCode="de-DE"><![CDATA[Black Ward]]></LOCALISED_TEXT>
      <LOCALISED_TEXT LanguageCode="it-IT"><![CDATA[Black Ward]]></LOCALISED_TEXT>
      <LOCALISED_TEXT LanguageCode="jp-JA"><![CDATA[Black Ward]]></LOCALISED_TEXT>
      <LOCALISED_TEXT LanguageCode="ko-KR"><![CDATA[Black Ward]]></LOCALISED_TEXT>
      <LOCALISED_TEXT LanguageCode="ru-RU"><![CDATA[Black Ward]]></LOCALISED_TEXT>
      <LOCALISED_TEXT LanguageCode="pt-BR"><![CDATA[Black Ward]]></LOCALISED_TEXT>
   </TITLE>
   <MULTIVERSEID value="2323" />
   <ARTID value="BLACK_WARD" />
   <ARTIST name="Dan Frazier" />
   <CASTING_COST cost="{W}" />
   <TYPE metaname="Enchantment" />
   <SUB_TYPE metaname="Aura" />
   <EXPANSION value="4E" />
   <RARITY metaname="U" />
   <SPELL_ABILITY attach_definition="0">
      <LOCALISED_TEXT LanguageCode="en-US"><![CDATA[Enchant creature]]></LOCALISED_TEXT>
      <LOCALISED_TEXT LanguageCode="fr-FR"><![CDATA[Enchant creature]]></LOCALISED_TEXT>
      <LOCALISED_TEXT LanguageCode="es-ES"><![CDATA[Enchant creature]]></LOCALISED_TEXT>
      <LOCALISED_TEXT LanguageCode="de-DE"><![CDATA[Enchant creature]]></LOCALISED_TEXT>
      <LOCALISED_TEXT LanguageCode="it-IT"><![CDATA[Incanta creatura]]></LOCALISED_TEXT>
      <LOCALISED_TEXT LanguageCode="jp-JA"><![CDATA[Enchant creature]]></LOCALISED_TEXT>
      <LOCALISED_TEXT LanguageCode="ko-KR"><![CDATA[Enchant creature]]></LOCALISED_TEXT>
      <LOCALISED_TEXT LanguageCode="ru-RU"><![CDATA[Enchant creature]]></LOCALISED_TEXT>
      <LOCALISED_TEXT LanguageCode="pt-BR"><![CDATA[Enchant creature]]></LOCALISED_TEXT>
      <TARGET tag="CARD_QUERY_CHOOSE_CREATURE_TO_ENCHANT" definition="0" compartment="0" count="1" />
      <TARGET_DEFINITION id="0">
         local filter = ClearFilter()
         filter:Add( FE_TYPE, OP_IS, CARD_TYPE_CREATURE )
      </TARGET_DEFINITION>
      <RESOLUTION_TIME_ACTION>
         local target = EffectDC():Get_Targets(0):Get_CardPtr(0)
         if (target ~= nil and EffectSource() ~= nil) then
            EffectSource():Attach( target )
         end
      </RESOLUTION_TIME_ACTION>
      <AI_SIMPLIFIED_TARGETING compartment="0" hint="HINT_ALLIED_ONLY" />
   </SPELL_ABILITY>
   <STATIC_ABILITY>
      <LOCALISED_TEXT LanguageCode="en-US"><![CDATA[Enchanted creature has protection from black. This effect doesn’t remove Black Ward.]]></LOCALISED_TEXT>
      <LOCALISED_TEXT LanguageCode="fr-FR"><![CDATA[Enchanted creature has protection from black. This effect doesn’t remove Black Ward.]]></LOCALISED_TEXT>
      <LOCALISED_TEXT LanguageCode="es-ES"><![CDATA[Enchanted creature has protection from black. This effect doesn’t remove Black Ward.]]></LOCALISED_TEXT>
      <LOCALISED_TEXT LanguageCode="de-DE"><![CDATA[Enchanted creature has protection from black. This effect doesn’t remove Black Ward.]]></LOCALISED_TEXT>
      <LOCALISED_TEXT LanguageCode="it-IT"><![CDATA[La creatura incantata ha protezione dal nero. Questo effetto non rimuove il Sigillo Nero.]]></LOCALISED_TEXT>
      <LOCALISED_TEXT LanguageCode="jp-JA"><![CDATA[Enchanted creature has protection from black. This effect doesn’t remove Black Ward.]]></LOCALISED_TEXT>
      <LOCALISED_TEXT LanguageCode="ko-KR"><![CDATA[Enchanted creature has protection from black. This effect doesn’t remove Black Ward.]]></LOCALISED_TEXT>
      <LOCALISED_TEXT LanguageCode="ru-RU"><![CDATA[Enchanted creature has protection from black. This effect doesn’t remove Black Ward.]]></LOCALISED_TEXT>
      <LOCALISED_TEXT LanguageCode="pt-BR"><![CDATA[Enchanted creature has protection from black. This effect doesn’t remove Black Ward.]]></LOCALISED_TEXT>
      <CONTINUOUS_ACTION layer="6">
         local oParent = EffectSource() and EffectSource():GetParent()
         if oParent ~= nil then
            local oFilter = ClearFilter()
            oFilter:Add(FE_COLOUR, OP_IS, COLOUR_BLACK)
            oFilter:Add(FE_CARD_INSTANCE, OP_NOT, EffectSource())
            oParent:Protection()
         end
      </CONTINUOUS_ACTION>
   </STATIC_ABILITY>
</CARD_V2>
That right there is the original Black Ward. In order to update it, it needs these things done.

oParent:Protection() -> CW_Protection(oParent, EffectSource()) - If both parameters are EffectSource(), they can both be omitted. That's up to you. The first parameter, oParent in this case, needs to be the card that is given protection. It'll always be the card that Protection() is actually called on. So, "oTarget:Protection()" -> "CW_Protection(oTarget...)". The second parameter is always the source of the protection, which should always be EffectSource().
Code: Select all
      <CONTINUOUS_ACTION layer="6">
         local oParent = EffectSource() and EffectSource():GetParent()
         if oParent ~= nil then
            local oFilter = ClearFilter()
            oFilter:Add(FE_COLOUR, OP_IS, COLOUR_BLACK)
            oFilter:Add(FE_CARD_INSTANCE, OP_NOT, EffectSource())
            CW_Protection(oParent, EffectSource())
         end
      </CONTINUOUS_ACTION>
Now, we need to rewrite the filter in a beginning-of-game triggered ability that can be recalled later. I wrote the Screen functions exactly for this purpose. You'll need to copy the ability from Black Ward that has the CW_Screen_Add functions. Copy the current card's normal filter down into it, and then alter it as follows. "oFilter:Add(...)" and all other filter functions need to be replaced like this: the filter itself becomes the first parameter, the function ("Add" in this case) needs "CW_Screen_" added to its beginning, and its original parameters need to be put into an array as the second parameter. So:
  • Filter becomes first parameter: "oFilter:Add(...)" -> "Add(oFilter, ...)"
  • Add "CW_Screen_" to the function name: "Add(oFilter, ...)" -> "CW_Screen_Add(oFilter, ...)"
  • The original parameters are made into an array: "CW_Screen_Add(oFilter, ...)" -> "CW_Screen_Add(oFilter, {...})"

So, we go from having just the normal filter:
Code: Select all
   <STATIC_ABILITY>
      <LOCALISED_TEXT LanguageCode="en-US"><![CDATA[Enchanted creature has protection from black. This effect doesn’t remove Black Ward.]]></LOCALISED_TEXT>
      <LOCALISED_TEXT LanguageCode="fr-FR"><![CDATA[Enchanted creature has protection from black. This effect doesn’t remove Black Ward.]]></LOCALISED_TEXT>
      <LOCALISED_TEXT LanguageCode="es-ES"><![CDATA[Enchanted creature has protection from black. This effect doesn’t remove Black Ward.]]></LOCALISED_TEXT>
      <LOCALISED_TEXT LanguageCode="de-DE"><![CDATA[Enchanted creature has protection from black. This effect doesn’t remove Black Ward.]]></LOCALISED_TEXT>
      <LOCALISED_TEXT LanguageCode="it-IT"><![CDATA[La creatura incantata ha protezione dal nero. Questo effetto non rimuove il Sigillo Nero.]]></LOCALISED_TEXT>
      <LOCALISED_TEXT LanguageCode="jp-JA"><![CDATA[Enchanted creature has protection from black. This effect doesn’t remove Black Ward.]]></LOCALISED_TEXT>
      <LOCALISED_TEXT LanguageCode="ko-KR"><![CDATA[Enchanted creature has protection from black. This effect doesn’t remove Black Ward.]]></LOCALISED_TEXT>
      <LOCALISED_TEXT LanguageCode="ru-RU"><![CDATA[Enchanted creature has protection from black. This effect doesn’t remove Black Ward.]]></LOCALISED_TEXT>
      <LOCALISED_TEXT LanguageCode="pt-BR"><![CDATA[Enchanted creature has protection from black. This effect doesn’t remove Black Ward.]]></LOCALISED_TEXT>
      <CONTINUOUS_ACTION layer="6">
         local oParent = EffectSource() and EffectSource():GetParent()
         if oParent ~= nil then
            local oFilter = ClearFilter()
            oFilter:Add(FE_COLOUR, OP_IS, COLOUR_BLACK)
            oFilter:Add(FE_CARD_INSTANCE, OP_NOT, EffectSource())
            CW_Protection(oParent, EffectSource())
         end
      </CONTINUOUS_ACTION>
   </STATIC_ABILITY>
To having that plus another ability with the same filter.
Code: Select all
   <STATIC_ABILITY>
      <LOCALISED_TEXT LanguageCode="en-US"><![CDATA[Enchanted creature has protection from black. This effect doesn’t remove Black Ward.]]></LOCALISED_TEXT>
      <LOCALISED_TEXT LanguageCode="fr-FR"><![CDATA[Enchanted creature has protection from black. This effect doesn’t remove Black Ward.]]></LOCALISED_TEXT>
      <LOCALISED_TEXT LanguageCode="es-ES"><![CDATA[Enchanted creature has protection from black. This effect doesn’t remove Black Ward.]]></LOCALISED_TEXT>
      <LOCALISED_TEXT LanguageCode="de-DE"><![CDATA[Enchanted creature has protection from black. This effect doesn’t remove Black Ward.]]></LOCALISED_TEXT>
      <LOCALISED_TEXT LanguageCode="it-IT"><![CDATA[La creatura incantata ha protezione dal nero. Questo effetto non rimuove il Sigillo Nero.]]></LOCALISED_TEXT>
      <LOCALISED_TEXT LanguageCode="jp-JA"><![CDATA[Enchanted creature has protection from black. This effect doesn’t remove Black Ward.]]></LOCALISED_TEXT>
      <LOCALISED_TEXT LanguageCode="ko-KR"><![CDATA[Enchanted creature has protection from black. This effect doesn’t remove Black Ward.]]></LOCALISED_TEXT>
      <LOCALISED_TEXT LanguageCode="ru-RU"><![CDATA[Enchanted creature has protection from black. This effect doesn’t remove Black Ward.]]></LOCALISED_TEXT>
      <LOCALISED_TEXT LanguageCode="pt-BR"><![CDATA[Enchanted creature has protection from black. This effect doesn’t remove Black Ward.]]></LOCALISED_TEXT>
      <CONTINUOUS_ACTION layer="6">
         local oParent = EffectSource() and EffectSource():GetParent()
         if oParent ~= nil then
            local oFilter = ClearFilter()
            oFilter:Add(FE_COLOUR, OP_IS, COLOUR_BLACK)
            oFilter:Add(FE_CARD_INSTANCE, OP_NOT, EffectSource())
            CW_Protection(oParent, EffectSource())
         end
      </CONTINUOUS_ACTION>
   </STATIC_ABILITY>
   <TRIGGERED_ABILITY replacement_effect="1" active_zone="ZONE_ANY">
      <TRIGGER value="BEGINNING_OF_STEP">
         return MTG():GetStep() == STEP_UPKEEP and MTG():GetTurnNumber() == 0
      </TRIGGER>
      <RESOLUTION_TIME_ACTION>
         local oFilter = ClearFilter()
         oFilter:Add(FE_COLOUR, OP_IS, COLOUR_BLACK)
         oFilter:Add(FE_CARD_INSTANCE, OP_NOT, EffectSource())
      </RESOLUTION_TIME_ACTION>
   </TRIGGERED_ABILITY>
Before altering the function calls as mentioned above.
Code: Select all
   <STATIC_ABILITY>
      <LOCALISED_TEXT LanguageCode="en-US"><![CDATA[Enchanted creature has protection from black. This effect doesn’t remove Black Ward.]]></LOCALISED_TEXT>
      <LOCALISED_TEXT LanguageCode="fr-FR"><![CDATA[Enchanted creature has protection from black. This effect doesn’t remove Black Ward.]]></LOCALISED_TEXT>
      <LOCALISED_TEXT LanguageCode="es-ES"><![CDATA[Enchanted creature has protection from black. This effect doesn’t remove Black Ward.]]></LOCALISED_TEXT>
      <LOCALISED_TEXT LanguageCode="de-DE"><![CDATA[Enchanted creature has protection from black. This effect doesn’t remove Black Ward.]]></LOCALISED_TEXT>
      <LOCALISED_TEXT LanguageCode="it-IT"><![CDATA[La creatura incantata ha protezione dal nero. Questo effetto non rimuove il Sigillo Nero.]]></LOCALISED_TEXT>
      <LOCALISED_TEXT LanguageCode="jp-JA"><![CDATA[Enchanted creature has protection from black. This effect doesn’t remove Black Ward.]]></LOCALISED_TEXT>
      <LOCALISED_TEXT LanguageCode="ko-KR"><![CDATA[Enchanted creature has protection from black. This effect doesn’t remove Black Ward.]]></LOCALISED_TEXT>
      <LOCALISED_TEXT LanguageCode="ru-RU"><![CDATA[Enchanted creature has protection from black. This effect doesn’t remove Black Ward.]]></LOCALISED_TEXT>
      <LOCALISED_TEXT LanguageCode="pt-BR"><![CDATA[Enchanted creature has protection from black. This effect doesn’t remove Black Ward.]]></LOCALISED_TEXT>
      <CONTINUOUS_ACTION layer="6">
         local oParent = EffectSource() and EffectSource():GetParent()
         if oParent ~= nil then
            local oFilter = ClearFilter()
            oFilter:Add(FE_COLOUR, OP_IS, COLOUR_BLACK)
            oFilter:Add(FE_CARD_INSTANCE, OP_NOT, EffectSource())
            CW_Protection(oParent, EffectSource())
         end
      </CONTINUOUS_ACTION>
   </STATIC_ABILITY>
   <TRIGGERED_ABILITY replacement_effect="1" active_zone="ZONE_ANY">
      <TRIGGER value="BEGINNING_OF_STEP">
         return MTG():GetStep() == STEP_UPKEEP and MTG():GetTurnNumber() == 0
      </TRIGGER>
      <RESOLUTION_TIME_ACTION>
         local oFilter = ClearFilter()
         Add(oFilter, {FE_COLOUR, OP_IS, COLOUR_BLACK})
         Add(oFilter, {FE_CARD_INSTANCE, OP_NOT, EffectSource()})
      </RESOLUTION_TIME_ACTION>
   </TRIGGERED_ABILITY>
Now, there are only three things left to do. Replace Filter with Screen. ClearFilter() becomes CW_Screen_Clear(). References to Filter become Screen instead. At the same time, also add on the registration function: "CW_Protection_RegisterScreen(oScreen)".
Code: Select all
   <STATIC_ABILITY>
      <LOCALISED_TEXT LanguageCode="en-US"><![CDATA[Enchanted creature has protection from black. This effect doesn’t remove Black Ward.]]></LOCALISED_TEXT>
      <LOCALISED_TEXT LanguageCode="fr-FR"><![CDATA[Enchanted creature has protection from black. This effect doesn’t remove Black Ward.]]></LOCALISED_TEXT>
      <LOCALISED_TEXT LanguageCode="es-ES"><![CDATA[Enchanted creature has protection from black. This effect doesn’t remove Black Ward.]]></LOCALISED_TEXT>
      <LOCALISED_TEXT LanguageCode="de-DE"><![CDATA[Enchanted creature has protection from black. This effect doesn’t remove Black Ward.]]></LOCALISED_TEXT>
      <LOCALISED_TEXT LanguageCode="it-IT"><![CDATA[La creatura incantata ha protezione dal nero. Questo effetto non rimuove il Sigillo Nero.]]></LOCALISED_TEXT>
      <LOCALISED_TEXT LanguageCode="jp-JA"><![CDATA[Enchanted creature has protection from black. This effect doesn’t remove Black Ward.]]></LOCALISED_TEXT>
      <LOCALISED_TEXT LanguageCode="ko-KR"><![CDATA[Enchanted creature has protection from black. This effect doesn’t remove Black Ward.]]></LOCALISED_TEXT>
      <LOCALISED_TEXT LanguageCode="ru-RU"><![CDATA[Enchanted creature has protection from black. This effect doesn’t remove Black Ward.]]></LOCALISED_TEXT>
      <LOCALISED_TEXT LanguageCode="pt-BR"><![CDATA[Enchanted creature has protection from black. This effect doesn’t remove Black Ward.]]></LOCALISED_TEXT>
      <CONTINUOUS_ACTION layer="6">
         local oParent = EffectSource() and EffectSource():GetParent()
         if oParent ~= nil then
            local oFilter = ClearFilter()
            oFilter:Add(FE_COLOUR, OP_IS, COLOUR_BLACK)
            oFilter:Add(FE_CARD_INSTANCE, OP_NOT, EffectSource())
            CW_Protection(oParent, EffectSource())
         end
      </CONTINUOUS_ACTION>
   </STATIC_ABILITY>
   <TRIGGERED_ABILITY replacement_effect="1" active_zone="ZONE_ANY">
      <TRIGGER value="BEGINNING_OF_STEP">
         return MTG():GetStep() == STEP_UPKEEP and MTG():GetTurnNumber() == 0
      </TRIGGER>
      <RESOLUTION_TIME_ACTION>
         local oScreen = CW_Screen_Clear()
         CW_Screen_Add(oScreen, {FE_COLOUR, OP_IS, COLOUR_BLACK})
         CW_Protection_RegisterScreen(oScreen)
      </RESOLUTION_TIME_ACTION>
   </TRIGGERED_ABILITY>
Next, remove references to pointers. It does not properly handle pointers, and since nearly all pointers are to the card granting protection (like Black Ward does, it provides a pointer to itself and the protection ability ignores that particular card), you remove simply remove those lines.
Code: Select all
   <STATIC_ABILITY>
      <LOCALISED_TEXT LanguageCode="en-US"><![CDATA[Enchanted creature has protection from black. This effect doesn’t remove Black Ward.]]></LOCALISED_TEXT>
      <LOCALISED_TEXT LanguageCode="fr-FR"><![CDATA[Enchanted creature has protection from black. This effect doesn’t remove Black Ward.]]></LOCALISED_TEXT>
      <LOCALISED_TEXT LanguageCode="es-ES"><![CDATA[Enchanted creature has protection from black. This effect doesn’t remove Black Ward.]]></LOCALISED_TEXT>
      <LOCALISED_TEXT LanguageCode="de-DE"><![CDATA[Enchanted creature has protection from black. This effect doesn’t remove Black Ward.]]></LOCALISED_TEXT>
      <LOCALISED_TEXT LanguageCode="it-IT"><![CDATA[La creatura incantata ha protezione dal nero. Questo effetto non rimuove il Sigillo Nero.]]></LOCALISED_TEXT>
      <LOCALISED_TEXT LanguageCode="jp-JA"><![CDATA[Enchanted creature has protection from black. This effect doesn’t remove Black Ward.]]></LOCALISED_TEXT>
      <LOCALISED_TEXT LanguageCode="ko-KR"><![CDATA[Enchanted creature has protection from black. This effect doesn’t remove Black Ward.]]></LOCALISED_TEXT>
      <LOCALISED_TEXT LanguageCode="ru-RU"><![CDATA[Enchanted creature has protection from black. This effect doesn’t remove Black Ward.]]></LOCALISED_TEXT>
      <LOCALISED_TEXT LanguageCode="pt-BR"><![CDATA[Enchanted creature has protection from black. This effect doesn’t remove Black Ward.]]></LOCALISED_TEXT>
      <CONTINUOUS_ACTION layer="6">
         local oParent = EffectSource() and EffectSource():GetParent()
         if oParent ~= nil then
            local oFilter = ClearFilter()
            oFilter:Add(FE_COLOUR, OP_IS, COLOUR_BLACK)
            oFilter:Add(FE_CARD_INSTANCE, OP_NOT, EffectSource())
            CW_Protection(oParent, EffectSource())
         end
      </CONTINUOUS_ACTION>
   </STATIC_ABILITY>
   <TRIGGERED_ABILITY replacement_effect="1" active_zone="ZONE_ANY">
      <TRIGGER value="BEGINNING_OF_STEP">
         return MTG():GetStep() == STEP_UPKEEP and MTG():GetTurnNumber() == 0
      </TRIGGER>
      <RESOLUTION_TIME_ACTION>
         local oScreen = CW_Screen_Clear()
         CW_Screen_Add(oScreen, {FE_COLOUR, OP_IS, COLOUR_BLACK})
         CW_Protection_RegisterScreen(oScreen)
      </RESOLUTION_TIME_ACTION>
   </TRIGGERED_ABILITY>
Last on the list is to add in the manager creation ability. The screens require a manager token, and it's made by making sure the card has this ability and token registration tag.
Code: Select all
   <TRIGGERED_ABILITY replacement_effect="1" active_zone="ZONE_ANY">
      <TRIGGER value="BEGINNING_OF_STEP">
         return MTG():GetStep() == STEP_UPKEEP and MTG():GetTurnNumber() == 0
      </TRIGGER>
      <RESOLUTION_TIME_ACTION>
         CW_General_CreateManagers("_MANAGER_CHARACTERISTICS")
      </RESOLUTION_TIME_ACTION>
   </TRIGGERED_ABILITY>
   <TOKEN_REGISTRATION reservation="1" type="_MANAGER_CHARACTERISTICS" />
You can copy that from Black Ward at the same time you copy the beginning-of-game screen registration ability, sicne they're right next to each other on Black Ward.

The final result is that you go from
Code: Select all
   <STATIC_ABILITY>
      <LOCALISED_TEXT LanguageCode="en-US"><![CDATA[Enchanted creature has protection from black. This effect doesn’t remove Black Ward.]]></LOCALISED_TEXT>
      <LOCALISED_TEXT LanguageCode="fr-FR"><![CDATA[Enchanted creature has protection from black. This effect doesn’t remove Black Ward.]]></LOCALISED_TEXT>
      <LOCALISED_TEXT LanguageCode="es-ES"><![CDATA[Enchanted creature has protection from black. This effect doesn’t remove Black Ward.]]></LOCALISED_TEXT>
      <LOCALISED_TEXT LanguageCode="de-DE"><![CDATA[Enchanted creature has protection from black. This effect doesn’t remove Black Ward.]]></LOCALISED_TEXT>
      <LOCALISED_TEXT LanguageCode="it-IT"><![CDATA[La creatura incantata ha protezione dal nero. Questo effetto non rimuove il Sigillo Nero.]]></LOCALISED_TEXT>
      <LOCALISED_TEXT LanguageCode="jp-JA"><![CDATA[Enchanted creature has protection from black. This effect doesn’t remove Black Ward.]]></LOCALISED_TEXT>
      <LOCALISED_TEXT LanguageCode="ko-KR"><![CDATA[Enchanted creature has protection from black. This effect doesn’t remove Black Ward.]]></LOCALISED_TEXT>
      <LOCALISED_TEXT LanguageCode="ru-RU"><![CDATA[Enchanted creature has protection from black. This effect doesn’t remove Black Ward.]]></LOCALISED_TEXT>
      <LOCALISED_TEXT LanguageCode="pt-BR"><![CDATA[Enchanted creature has protection from black. This effect doesn’t remove Black Ward.]]></LOCALISED_TEXT>
      <CONTINUOUS_ACTION layer="6">
         local oParent = EffectSource() and EffectSource():GetParent()
         if oParent ~= nil then
            local oFilter = ClearFilter()
            oFilter:Add(FE_COLOUR, OP_IS, COLOUR_BLACK)
            oFilter:Add(FE_CARD_INSTANCE, OP_NOT, EffectSource())
            oParent:Protection()
         end
      </CONTINUOUS_ACTION>
   </STATIC_ABILITY>
to
Code: Select all
   <STATIC_ABILITY>
      <LOCALISED_TEXT LanguageCode="en-US"><![CDATA[Enchanted creature has protection from black. This effect doesn’t remove Black Ward.]]></LOCALISED_TEXT>
      <LOCALISED_TEXT LanguageCode="fr-FR"><![CDATA[Enchanted creature has protection from black. This effect doesn’t remove Black Ward.]]></LOCALISED_TEXT>
      <LOCALISED_TEXT LanguageCode="es-ES"><![CDATA[Enchanted creature has protection from black. This effect doesn’t remove Black Ward.]]></LOCALISED_TEXT>
      <LOCALISED_TEXT LanguageCode="de-DE"><![CDATA[Enchanted creature has protection from black. This effect doesn’t remove Black Ward.]]></LOCALISED_TEXT>
      <LOCALISED_TEXT LanguageCode="it-IT"><![CDATA[La creatura incantata ha protezione dal nero. Questo effetto non rimuove il Sigillo Nero.]]></LOCALISED_TEXT>
      <LOCALISED_TEXT LanguageCode="jp-JA"><![CDATA[Enchanted creature has protection from black. This effect doesn’t remove Black Ward.]]></LOCALISED_TEXT>
      <LOCALISED_TEXT LanguageCode="ko-KR"><![CDATA[Enchanted creature has protection from black. This effect doesn’t remove Black Ward.]]></LOCALISED_TEXT>
      <LOCALISED_TEXT LanguageCode="ru-RU"><![CDATA[Enchanted creature has protection from black. This effect doesn’t remove Black Ward.]]></LOCALISED_TEXT>
      <LOCALISED_TEXT LanguageCode="pt-BR"><![CDATA[Enchanted creature has protection from black. This effect doesn’t remove Black Ward.]]></LOCALISED_TEXT>
      <CONTINUOUS_ACTION layer="6">
         local oParent = EffectSource() and EffectSource():GetParent()
         if oParent ~= nil then
            local oFilter = ClearFilter()
            oFilter:Add(FE_COLOUR, OP_IS, COLOUR_BLACK)
            oFilter:Add(FE_CARD_INSTANCE, OP_NOT, EffectSource())
            CW_Protection(oParent, EffectSource())
         end
      </CONTINUOUS_ACTION>
   </STATIC_ABILITY>
   <TRIGGERED_ABILITY replacement_effect="1" active_zone="ZONE_ANY">
      <TRIGGER value="BEGINNING_OF_STEP">
         return MTG():GetStep() == STEP_UPKEEP and MTG():GetTurnNumber() == 0
      </TRIGGER>
      <RESOLUTION_TIME_ACTION>
         local oScreen = CW_Screen_Clear()
         CW_Screen_Add(oScreen, {FE_COLOUR, OP_IS, COLOUR_BLACK})
         CW_Protection_RegisterScreen(oScreen)
      </RESOLUTION_TIME_ACTION>
   </TRIGGERED_ABILITY>
   <TRIGGERED_ABILITY replacement_effect="1" active_zone="ZONE_ANY">
      <TRIGGER value="BEGINNING_OF_STEP">
         return MTG():GetStep() == STEP_UPKEEP and MTG():GetTurnNumber() == 0
      </TRIGGER>
      <RESOLUTION_TIME_ACTION>
         CW_General_CreateManagers("_MANAGER_CHARACTERISTICS")
      </RESOLUTION_TIME_ACTION>
   </TRIGGERED_ABILITY>
   <TOKEN_REGISTRATION reservation="1" type="_MANAGER_CHARACTERISTICS" />
----


I don't have a zip file containing the cards. I got the number from searching in RiiakShiNal's Deck Builder for "protection".
_______________________________
Community Wad - Community Wad Website - How to Help and Report Bugs
Discord: discord.gg/4AXvHzW
User avatar
Xander9009
Programmer
 
Posts: 2905
Joined: 29 Jun 2013, 07:44
Location: Indiana, United States
Has thanked: 121 times
Been thanked: 445 times

Re: Community Wad

Postby nachonal986 » 07 Aug 2017, 02:51

Ok, thanks for the explanation, I have a few question:

- What about cards with more than one protection?

- It's ok if I send you the codes in txt by pm?

-----------------------

It's ok this way?

Crimson Acolyte

original:
Code: Select all
<STATIC_ABILITY>
      <LOCALISED_TEXT LanguageCode="en-US"><![CDATA[Protection from red]]></LOCALISED_TEXT>
      <LOCALISED_TEXT LanguageCode="fr-FR"><![CDATA[Protection contre le rouge]]></LOCALISED_TEXT>
      <LOCALISED_TEXT LanguageCode="es-ES"><![CDATA[Protection from red]]></LOCALISED_TEXT>
      <LOCALISED_TEXT LanguageCode="de-DE"><![CDATA[Schutz vor Rot]]></LOCALISED_TEXT>
      <LOCALISED_TEXT LanguageCode="it-IT"><![CDATA[Protezione dal rosso]]></LOCALISED_TEXT>
      <LOCALISED_TEXT LanguageCode="jp-JA"><![CDATA[Protection from red]]></LOCALISED_TEXT>
      <LOCALISED_TEXT LanguageCode="ko-KR"><![CDATA[Protection from red]]></LOCALISED_TEXT>
      <LOCALISED_TEXT LanguageCode="ru-RU"><![CDATA[Protection from red]]></LOCALISED_TEXT>
      <LOCALISED_TEXT LanguageCode="pt-BR"><![CDATA[Protection from red]]></LOCALISED_TEXT>
      <CONTINUOUS_ACTION layer="0">
         if (EffectSource() ~= nil) then
            local oFilter = ClearFilter()
            oFilter:Add( FE_COLOUR, OP_IS, COLOUR_RED )
            EffectSource():Protection()
         end
      </CONTINUOUS_ACTION>
   </STATIC_ABILITY>
new code:

Code: Select all
<STATIC_ABILITY>
      <LOCALISED_TEXT LanguageCode="en-US"><![CDATA[Protection from red]]></LOCALISED_TEXT>
      <LOCALISED_TEXT LanguageCode="fr-FR"><![CDATA[Protection contre le rouge]]></LOCALISED_TEXT>
      <LOCALISED_TEXT LanguageCode="es-ES"><![CDATA[Protection from red]]></LOCALISED_TEXT>
      <LOCALISED_TEXT LanguageCode="de-DE"><![CDATA[Schutz vor Rot]]></LOCALISED_TEXT>
      <LOCALISED_TEXT LanguageCode="it-IT"><![CDATA[Protezione dal rosso]]></LOCALISED_TEXT>
      <LOCALISED_TEXT LanguageCode="jp-JA"><![CDATA[Protection from red]]></LOCALISED_TEXT>
      <LOCALISED_TEXT LanguageCode="ko-KR"><![CDATA[Protection from red]]></LOCALISED_TEXT>
      <LOCALISED_TEXT LanguageCode="ru-RU"><![CDATA[Protection from red]]></LOCALISED_TEXT>
      <LOCALISED_TEXT LanguageCode="pt-BR"><![CDATA[Protection from red]]></LOCALISED_TEXT>
      <CONTINUOUS_ACTION layer="0">
         if (EffectSource() ~= nil) then
            local oFilter = ClearFilter()
            oFilter:Add( FE_COLOUR, OP_IS, COLOUR_RED )
            CW_Protection(oParent, EffectSource())
         end
      </CONTINUOUS_ACTION>
   </STATIC_ABILITY>
   <TRIGGERED_ABILITY replacement_effect="1" active_zone="ZONE_ANY">
      <TRIGGER value="BEGINNING_OF_STEP">
         return MTG():GetStep() == STEP_UPKEEP and MTG():GetTurnNumber() == 0
      </TRIGGER>
      <RESOLUTION_TIME_ACTION>
         local oScreen = CW_Screen_Clear()
         CW_Screen_Add(oScreen, {FE_COLOUR, OP_IS, COLOUR_RED})
         CW_Protection_RegisterScreen(oScreen)
      </RESOLUTION_TIME_ACTION>
   </TRIGGERED_ABILITY>
   <TRIGGERED_ABILITY replacement_effect="1" active_zone="ZONE_ANY">
      <TRIGGER value="BEGINNING_OF_STEP">
         return MTG():GetStep() == STEP_UPKEEP and MTG():GetTurnNumber() == 0
      </TRIGGER>
      <RESOLUTION_TIME_ACTION>
         CW_General_CreateManagers("_MANAGER_CHARACTERISTICS")
      </RESOLUTION_TIME_ACTION>
   </TRIGGERED_ABILITY>
   <TOKEN_REGISTRATION reservation="1" type="_MANAGER_CHARACTERISTICS" />
User avatar
nachonal986
 
Posts: 83
Joined: 27 Jul 2015, 21:13
Has thanked: 17 times
Been thanked: 1 time

Re: Community Wad

Postby Xander9009 » 07 Aug 2017, 02:57

If they have multiple protections, then just tell me what they are. I'll need to look at them and figure out how to get them working properly.

I'd prefer not to have them PMed to me individually, but if you mean sending me all of the ones you end up doing all at once by PM, that's fine. If you mean one by one, I'd upload them here: https://drive.google.com/drive/u/0/fold ... DBHRlNnZEU

The above code looks good with one exception. "CW_Protection(oParent, EffectSource())" should be "CW_Protection(EffectSource(), EffectSource())". The card that is granted protection here is the Source card itself, not its parent. Parent is used for auras and equipment. This is just itself. And keep in mind that "CW_Protection()" is identical to "CW_Protection(EffectSource(), EffectSource())", so you could also just use that in this case.

Everything else looks right.
_______________________________
Community Wad - Community Wad Website - How to Help and Report Bugs
Discord: discord.gg/4AXvHzW
User avatar
Xander9009
Programmer
 
Posts: 2905
Joined: 29 Jun 2013, 07:44
Location: Indiana, United States
Has thanked: 121 times
Been thanked: 445 times

Re: Community Wad

Postby erjerjerj » 07 Aug 2017, 13:50

Bug report:

Hashep Oasis doen't work well with mana tapping, the PC always use it by default even when I have enough other lands which I would like to use.

Rishkar, Peema Renegade doen't work well with mana tapping, I had it with a counter and another creature with counter in play and the PC doesn't let me choose Rishkar, Peema Renegade as mana (It forced me to use the other creature)
erjerjerj
 
Posts: 32
Joined: 23 Oct 2016, 11:58
Has thanked: 20 times
Been thanked: 3 times

Re: Community Wad

Postby Xander9009 » 07 Aug 2017, 17:11

@Nachonal: I didn't notice your code was for Crimson Acolyte. That does grant protection to another card. I'll need to test what the line should be, but I think CW_Protection(EffectSource(), Object()) might work. The first one needs to be the card being protected, which would be the card this ability actually appears on in-game (the card that Crimson Acolyte adds "Protection from red" onto). The second should be the acolyte itself (I.e. the card doing the protecting), which will either need to be Object() or will need a LinkedDC pointer. I'll look into this and get back to you. My previous message would apply if the card was Abbey Gargoyles, something that grants itself protection. Sorry for the confusion.

@erjerjerj: I'll check into the bugs when I get the chance.
_______________________________
Community Wad - Community Wad Website - How to Help and Report Bugs
Discord: discord.gg/4AXvHzW
User avatar
Xander9009
Programmer
 
Posts: 2905
Joined: 29 Jun 2013, 07:44
Location: Indiana, United States
Has thanked: 121 times
Been thanked: 445 times

Re: Community Wad

Postby nachonal986 » 08 Aug 2017, 02:26

Xander9009 wrote:@Nachonal: I didn't notice your code was for Crimson Acolyte. That does grant protection to another card. I'll need to test what the line should be, but I think CW_Protection(EffectSource(), Object()) might work. The first one needs to be the card being protected, which would be the card this ability actually appears on in-game (the card that Crimson Acolyte adds "Protection from red" onto). The second should be the acolyte itself (I.e. the card doing the protecting), which will either need to be Object() or will need a LinkedDC pointer. I'll look into this and get back to you. My previous message would apply if the card was Abbey Gargoyles, something that grants itself protection. Sorry for the confusion.

@erjerjerj: I'll check into the bugs when I get the chance.
no problem dude, I'll focus on card only with protection for now. My only problem or doubt is how send you the codes, because if are separately into txt files, with all the card code is enough easy for you?
User avatar
nachonal986
 
Posts: 83
Joined: 27 Jul 2015, 21:13
Has thanked: 17 times
Been thanked: 1 time

Re: Community Wad

Postby erjerjerj » 09 Aug 2017, 09:12

Three more bugs:

1. I had 2 lands and Channeler Initiate (with -1/-1 counters on it) on the battlefield.
I wanted to cast a 3 mana spell, and the PC marked the Channeler Initiate as part of the mana cost. After casting the spell, the two lands became tapped, while Channeler Initiate remained untapped - this bug means that Channeler Initiate can be used as infinite sources for one mana cost spells.

2. I had Rhonas the Indomitable and a 3/3 on the battlefield.
I used Rhonas the Indomitable ability to make the other creature a 5/3, but Rhonas the Indomitable didn't become a creature.

3. Sandwurm Convergence triggers on both end steps.
Last edited by erjerjerj on 15 Aug 2017, 05:41, edited 1 time in total.
erjerjerj
 
Posts: 32
Joined: 23 Oct 2016, 11:58
Has thanked: 20 times
Been thanked: 3 times

Re: Community Wad

Postby Splinterverse » 12 Aug 2017, 09:58

Bug report: Autumn's Veil doesn't have any code in the file. Perhaps it did at one time and was deleted?
---------------------------------------------
The DOTP2014 CW is updated nightly between 11 PM and 12 AM EST.
Known Issues/Bugs |
Impossible Cards List | Update Your Land Pools
Splinterverse
 
Posts: 918
Joined: 04 Sep 2016, 13:32
Has thanked: 150 times
Been thanked: 75 times

Re: Community Wad

Postby nivmizzet1 » 13 Aug 2017, 07:39

Jace, Telepath Unbound second ability has an interaction problem with Archive Trap. I activated the ability choosing Archive Trap, then played path to exile (and the opponent chose to search for a land), but I couldn't play Archive Trap for 0 (although it had the text saying "play card"). I'm not sure if Jace's ability just doesn't work for any cards, or maybe it's an Archive Trap problem that will be the same with e.g. any cards that can give it flashback.

so disappointing because it was going to be such an wesome play for the win.
nivmizzet1
 
Posts: 613
Joined: 21 Mar 2013, 10:10
Has thanked: 100 times
Been thanked: 25 times

Re: Community Wad

Postby nivmizzet1 » 17 Aug 2017, 10:28

I noticed this card when I was snooping around in the loose files wad: UTOPIA_MYCON_CW_130616 (1).xml

I think there should just be this card: UTOPIA_MYCON_MM_CW_130616.xml


EDIT: also, I tried applying a manual autoskip function to this and some other fungus cards, in an attempt to skip the resolution time for the spore counter trigger if it's triggered for any creatures a total of 3 times that turn. Instead, I got something unexpected -- it autoskips the cards that resolve first and then the last three have resolution time; I assume the trigger activation goes one direction, then they resolve in the reverse direction, or something, I don't really know. However, sometimes some autoskip, and then many more than 3 (e.g. up to 10 or more) still do the resolution time. If anybody can have a look at it and try to fix it, that would be much appreciated.
nivmizzet1
 
Posts: 613
Joined: 21 Mar 2013, 10:10
Has thanked: 100 times
Been thanked: 25 times

Re: Community Wad

Postby Xander9009 » 17 Aug 2017, 18:50

Yes, it should be renamed, and I'll go ahead and do that now.

And yes, they're all added to the stack, then they resolve off of the stack in reverse order. I've got tomorrow off. I've got several things to do tomorrow, but I will definitely add it to my list.
_______________________________
Community Wad - Community Wad Website - How to Help and Report Bugs
Discord: discord.gg/4AXvHzW
User avatar
Xander9009
Programmer
 
Posts: 2905
Joined: 29 Jun 2013, 07:44
Location: Indiana, United States
Has thanked: 121 times
Been thanked: 445 times

PreviousNext

Return to 2014

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