It is currently 19 Jul 2025, 21:15
   
Text Size

Community Wad

Moderator: CCGHQ Admins

Re: Community Wad

Postby Splinterverse » 01 Oct 2016, 13:18

Xander -- is there a trick to getting Debug text to show up on the card in game? I have the Debug("") and Debug("", k) patterns, but do they need to go inside a particular ability or a CDATA section to show up dynamically?

Also, when filtering, if hybrid or multicolor cards are in play, will a filter for white cards automatically include a card that is red-white?
---------------------------------------------
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: 76 times

Re: Community Wad

Postby Xander9009 » 01 Oct 2016, 14:01

They need to go in basically any tag that can contain functions. RTA, PTA, CA, Target/Cost, Target/Cost Definition, Duration, Cleanup. Basically anything that can run code.

Code: Select all
<RESOLUTION_TIME_ACTION>
    local k = 3
    Debug(k) -- Displays "[3]" in game. (Brackets are automatic and uncontrollable.)
   
    Debug("k", k) -- Displays "[k: 3]"
</RESOLUTION_TIME_ACTION>
That should show 3 in game. If it's not working like it's supposed to, then I'm not sure what's going on. I use it all the time. It's a function I wrote a long time ago, and I've never had a problem with it. But I did modify it recently.

For the filtering, that depends on the other color settings. If you're in the simple filter screen, then in order to also show red/white cards, you'd need the color drop down set to "Any matching item". This will show all cards that are white. If you set it to "Exact matches only", and then you check White, Red, and Multicolor, you'll get all red/white cards. If you set it to "Any combination" with those same ones checked, you get all white cards, all red cards, and all red/white cards.

If you're in the advanced filter screen, then adding white will show any card that is white. The card's other colors are ignored unless you specifically add them (either as "and" or "not").

If you wanted to, say, show all cards that are white or white/red, you'd add "and white" "not blue" "not black" "not green".
_______________________________
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 Splinterverse » 01 Oct 2016, 16:50

I almost have Yawgmoth's Agenda working. The cards in the graveyard have "Play this card" appearing in blue, but the ability is not clickable to activate.

http://pastebin.com/4r6cHqQ6

Everything else is working as intended.
---------------------------------------------
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: 76 times

Re: Community Wad

Postby fallenangle » 01 Oct 2016, 17:08

Splinterverse, try this:

Code: Select all
<STATIC_ABILITY>
        <LOCALISED_TEXT LanguageCode="en-US"><![CDATA[You can’t cast more than one spell each turn.]]></LOCALISED_TEXT>
        <LOCALISED_TEXT LanguageCode="fr-FR"><![CDATA[Vous ne pouvez pas jouer plus d’un sort par tour.]]></LOCALISED_TEXT>
        <LOCALISED_TEXT LanguageCode="es-ES"><![CDATA[You can’t cast more than one spell each turn.]]></LOCALISED_TEXT>
        <LOCALISED_TEXT LanguageCode="de-DE"><![CDATA[Du kannst nicht mehr als einen Zauberspruch pro Zug spielen.]]></LOCALISED_TEXT>
        <LOCALISED_TEXT LanguageCode="it-IT"><![CDATA[You can’t cast more than one spell each turn.]]></LOCALISED_TEXT>
        <LOCALISED_TEXT LanguageCode="jp-JA"><![CDATA[You can’t cast more than one spell each turn.]]></LOCALISED_TEXT>
        <LOCALISED_TEXT LanguageCode="ko-KR"><![CDATA[You can’t cast more than one spell each turn.]]></LOCALISED_TEXT>
        <LOCALISED_TEXT LanguageCode="ru-RU"><![CDATA[You can’t cast more than one spell each turn.]]></LOCALISED_TEXT>
        <LOCALISED_TEXT LanguageCode="pt-BR"><![CDATA[You can’t cast more than one spell each turn.]]></LOCALISED_TEXT>
        <LOCALISED_TEXT LanguageCode="zh-CN"><![CDATA[You can’t cast more than one spell each turn.]]></LOCALISED_TEXT>
        <LOCALISED_TEXT LanguageCode="zh-HK"><![CDATA[You can’t cast more than one spell each turn.]]></LOCALISED_TEXT>
      <CONTINUOUS_ACTION layer="8">
            local interrogation = MTG():ClearInterrogationQuery()
            interrogation:SetPlayer( EffectController() )
            if interrogation:Test( INTERROGATE_SPELLS_CAST, INTERROGATE_THIS_TURN ) then
               EffectController():GetCurrentCharacteristics():Bool_Set( PLAYER_CHARACTERISTIC_CANT_CAST_SPELLS , 1 )
            end
      </CONTINUOUS_ACTION>
      </STATIC_ABILITY>
      
      <STATIC_ABILITY>
      <CONTINUOUS_ACTION layer="8">
         local filter = ClearFilter()
         filter:SetZone( ZONE_GRAVEYARD, EffectController() )
         local numCards = filter:EvaluateObjects()
         for i=0,(numCards-1) do
            local card = filter:GetNthEvaluatedObject(i)
            if card ~= nil then
               local characteristics = card:GetCurrentCharacteristics()
               characteristics:GrantAbility(0)
            end
         end
      </CONTINUOUS_ACTION>
      </STATIC_ABILITY>
      
      <UTILITY_ABILITY resource_id="0" qualifier="Normal_Cast" active_zone="ZONE_GRAVEYARD">
      <LOCALISED_TEXT LanguageCode="en-US"><![CDATA[Play Card.]]></LOCALISED_TEXT>
      <LOCALISED_TEXT LanguageCode="fr-FR"><![CDATA[Jouer une carte.]]></LOCALISED_TEXT>
      <LOCALISED_TEXT LanguageCode="es-ES"><![CDATA[Jugar carta.]]></LOCALISED_TEXT>
      <LOCALISED_TEXT LanguageCode="de-DE"><![CDATA[Karte spielen.]]></LOCALISED_TEXT>
      <LOCALISED_TEXT LanguageCode="it-IT"><![CDATA[Gioca carta.]]></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[Jogar Card.]]></LOCALISED_TEXT>
      <LOCALISED_TEXT LanguageCode="zh-CN"><![CDATA[使用此牌。]]></LOCALISED_TEXT>
      <LOCALISED_TEXT LanguageCode="zh-HK"><![CDATA[使用此牌。]]></LOCALISED_TEXT>
   </UTILITY_ABILITY>
   <TRIGGERED_ABILITY resource_id="1" replacement_effect="1">
      <CLEANUP simple_cleanup="EndOfTurn" />
      <TRIGGER value="ZONECHANGE_CONSIDERED" to_zone="ZONE_GRAVEYARD" from_zone="ZONE_ANY" pre_trigger="1">
         if TriggerObject():GetOwner() == EffectController() then
            MTG():OverrideEvent()
            TriggerObject():Exile()
            return true
         end
         return false
      </TRIGGER>
   </TRIGGERED_ABILITY>
I'm not sure why you're using LinkedDC and linked_ability_group. I don't think you need them.
fallenangle
 
Posts: 319
Joined: 20 Jul 2013, 02:31
Has thanked: 73 times
Been thanked: 41 times

Re: Community Wad

Postby Splinterverse » 01 Oct 2016, 17:49

fallenangle wrote:Splinterverse, try this:

Code: Select all
<STATIC_ABILITY>
        <LOCALISED_TEXT LanguageCode="en-US"><![CDATA[You can’t cast more than one spell each turn.]]></LOCALISED_TEXT>
        <LOCALISED_TEXT LanguageCode="fr-FR"><![CDATA[Vous ne pouvez pas jouer plus d’un sort par tour.]]></LOCALISED_TEXT>
        <LOCALISED_TEXT LanguageCode="es-ES"><![CDATA[You can’t cast more than one spell each turn.]]></LOCALISED_TEXT>
        <LOCALISED_TEXT LanguageCode="de-DE"><![CDATA[Du kannst nicht mehr als einen Zauberspruch pro Zug spielen.]]></LOCALISED_TEXT>
        <LOCALISED_TEXT LanguageCode="it-IT"><![CDATA[You can’t cast more than one spell each turn.]]></LOCALISED_TEXT>
        <LOCALISED_TEXT LanguageCode="jp-JA"><![CDATA[You can’t cast more than one spell each turn.]]></LOCALISED_TEXT>
        <LOCALISED_TEXT LanguageCode="ko-KR"><![CDATA[You can’t cast more than one spell each turn.]]></LOCALISED_TEXT>
        <LOCALISED_TEXT LanguageCode="ru-RU"><![CDATA[You can’t cast more than one spell each turn.]]></LOCALISED_TEXT>
        <LOCALISED_TEXT LanguageCode="pt-BR"><![CDATA[You can’t cast more than one spell each turn.]]></LOCALISED_TEXT>
        <LOCALISED_TEXT LanguageCode="zh-CN"><![CDATA[You can’t cast more than one spell each turn.]]></LOCALISED_TEXT>
        <LOCALISED_TEXT LanguageCode="zh-HK"><![CDATA[You can’t cast more than one spell each turn.]]></LOCALISED_TEXT>
      <CONTINUOUS_ACTION layer="8">
            local interrogation = MTG():ClearInterrogationQuery()
            interrogation:SetPlayer( EffectController() )
            if interrogation:Test( INTERROGATE_SPELLS_CAST, INTERROGATE_THIS_TURN ) then
               EffectController():GetCurrentCharacteristics():Bool_Set( PLAYER_CHARACTERISTIC_CANT_CAST_SPELLS , 1 )
            end
      </CONTINUOUS_ACTION>
      </STATIC_ABILITY>
      
      <STATIC_ABILITY>
      <CONTINUOUS_ACTION layer="8">
         local filter = ClearFilter()
         filter:SetZone( ZONE_GRAVEYARD, EffectController() )
         local numCards = filter:EvaluateObjects()
         for i=0,(numCards-1) do
            local card = filter:GetNthEvaluatedObject(i)
            if card ~= nil then
               local characteristics = card:GetCurrentCharacteristics()
               characteristics:GrantAbility(0)
            end
         end
      </CONTINUOUS_ACTION>
      </STATIC_ABILITY>
      
      <UTILITY_ABILITY resource_id="0" qualifier="Normal_Cast" active_zone="ZONE_GRAVEYARD">
      <LOCALISED_TEXT LanguageCode="en-US"><![CDATA[Play Card.]]></LOCALISED_TEXT>
      <LOCALISED_TEXT LanguageCode="fr-FR"><![CDATA[Jouer une carte.]]></LOCALISED_TEXT>
      <LOCALISED_TEXT LanguageCode="es-ES"><![CDATA[Jugar carta.]]></LOCALISED_TEXT>
      <LOCALISED_TEXT LanguageCode="de-DE"><![CDATA[Karte spielen.]]></LOCALISED_TEXT>
      <LOCALISED_TEXT LanguageCode="it-IT"><![CDATA[Gioca carta.]]></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[Jogar Card.]]></LOCALISED_TEXT>
      <LOCALISED_TEXT LanguageCode="zh-CN"><![CDATA[使用此牌。]]></LOCALISED_TEXT>
      <LOCALISED_TEXT LanguageCode="zh-HK"><![CDATA[使用此牌。]]></LOCALISED_TEXT>
   </UTILITY_ABILITY>
   <TRIGGERED_ABILITY resource_id="1" replacement_effect="1">
      <CLEANUP simple_cleanup="EndOfTurn" />
      <TRIGGER value="ZONECHANGE_CONSIDERED" to_zone="ZONE_GRAVEYARD" from_zone="ZONE_ANY" pre_trigger="1">
         if TriggerObject():GetOwner() == EffectController() then
            MTG():OverrideEvent()
            TriggerObject():Exile()
            return true
         end
         return false
      </TRIGGER>
   </TRIGGERED_ABILITY>
I'm not sure why you're using LinkedDC and linked_ability_group. I don't think you need them.
I tried this but it didn't work. I appreciate the help though.
---------------------------------------------
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: 76 times

Re: Community Wad

Postby Xander9009 » 01 Oct 2016, 18:16

tmxk2012917 wrote:My planeswalker still could not enter the battlefield when white hulk was in my battlefield

Besides, Chandra, Torch of Defiance also has bugs. When the top card of my library was exiled, I could not cast it. When I chose not to cast it, the opponent did not get damages. Furthermore, I could not use added mana to cast kozilek the great distortion for some reason.
For Kozilek, the Great Distortion, did you have at least 2 colorless mana in your mana pool? It can't be paid for with all colored mana. At least 2 of your mana must be colorless.

fallenangle has updated Chandra, Torch of Defiance. I'll be testing it later today or tomorrow.

Not sure about the Cataclysmic Gearhulk. I'll look into it later if Splinterverse doesn't.
_______________________________
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 Splinterverse » 01 Oct 2016, 18:28

Xander9009 wrote:Not sure about the Cataclysmic Gearhulk. I'll look into it later if Splinterverse doesn't.
I've looked at the code and I don't see anything that would cause a planeswalker to not be able to enter after Cataclysmic Gearhulk has resolved. There was the bug with Energy where when Cataclysmic Gearhulk wiped the board, it wiped all traces of Energy. I'm wondering if, since Planeswalkers are really enchantments, some sort of register for them gets wiped as well?
---------------------------------------------
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: 76 times

Re: Community Wad

Postby Xander9009 » 01 Oct 2016, 18:54

I'll have to check the code in a few minutes, but it sounds to me like it's sacrificing the manager tokens we use.

EDIT: Yes, that's the issue. It's using FE_IS_PERMANENT on line 109. That should be CW_Filter_AddPermanents(filter).

The manager tokens, while not technically tokens (they lack the <TOKEN /> tag), are technically permanents. The game can't inherently distinguish between them and the permanents it should be targeting. For anything that targets (using an actual <TARGET...> tag), it's irrelevant because they have protection and shroud. For anything that destroys, it's irrelevant because they have indestructible. But a few effects can remove them. For instance, sacrificing, or forced zone changes (like returning all permanents to hand). For anything that "targets" using a ChooseItem or ChooseItems function, then you'll need to be careful as well, since neither protection nor shroud prevents them from being chosen.
_______________________________
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 Splinterverse » 01 Oct 2016, 19:19

Xander9009 wrote:I'll have to check the code in a few minutes, but it sounds to me like it's sacrificing the manager tokens we use.

EDIT: Yes, that's the issue. It's using FE_IS_PERMANENT on line 109. That should be CW_Filter_AddPermanents(filter).

The manager tokens, while not technically tokens (they lack the <TOKEN /> tag), are technically permanents. The game can't inherently distinguish between them and the permanents it should be targeting. For anything that targets (using an actual <TARGET...> tag), it's irrelevant because they have protection and shroud. For anything that destroys, it's irrelevant because they have indestructible. But a few effects can remove them. For instance, sacrificing, or forced zone changes (like returning all permanents to hand). For anything that "targets" using a ChooseItem or ChooseItems function, then you'll need to be careful as well, since neither protection nor shroud prevents them from being chosen.
Makes sense. I've added this to my notes. Did you fix it? If not, I can fix and upload with the rest of my work later today.
---------------------------------------------
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: 76 times

Re: Community Wad

Postby Xander9009 » 01 Oct 2016, 21:10

I only noted it. Didn't actually change anything.
_______________________________
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 Splinterverse » 01 Oct 2016, 22:34

I'm done for today. Will be back tomorrow.

Coded, tested, and uploaded (from Missing Cards list):
Goham Djinn
Halam Djinn
Power Surge
Ruham Djinn
Villainous Ogre
Viridian Joiner
Volcanic Wind
Voodoo Doll
Voyager Staff
Wail of the Nim
Walking Dream
Wall of Blood
Wall of Resistance
Wings of Velis Vel
Wishmonger
Worldly Counsel
Yoke of the Damned
Yore-Tiller Nephilim
Zanam Djinn
Zodiac Monkey

Bug Fixes:
Blight Sickle -- had an extra unused block that was throwing an error on exit
Cataclysmic Gearhulk -- not tested; fix for preventing things from entering battlefield after initial battlefield entry effect fires.
Machinate -- was omitting creatures from selection and revealing cards when reveal isn't on the card text

Art Uploaded (All HQ and all were missing):
Greener Pastures
Herald of Torment
Heroic Defiance
Yore-Tiller Nephilim
Zealots en-Dal
---------------------------------------------
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: 76 times

Re: Community Wad

Postby Splinterverse » 02 Oct 2016, 15:23

Can I use card:GetCardType():Test(CARD_TYPE_PLANESWALKER) or do I have to use a different way to test if a card is a planeswalker since behind-the-scenes they are really enchantments? I don't think I can use a filter in this instance.
---------------------------------------------
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: 76 times

Re: Community Wad

Postby Xander9009 » 02 Oct 2016, 15:51

This makes more sense here, so I'll delete my response on the other thread. For planeswalkers, enchantments, and permanents, you can use CW_General_IsPlaneswalker(oCard) (obviously change "Planeswalker" to whichever one you're testing).

As a note, all functions starting with "CW_" have the file they're found in as the start of the function name. CW_General_...() is found in CW_GENERAL.LOL. If you'd like, you can go look through the various function files. Not all of them are properly documented, but most of the CW_* ones are.

For future reference, swamp is another card type you should never check for normally. Urborg, Tomb of Yawgmoth needed a hefty workaround, so all swamp references need to be handled specially using CW_General_SwampFilter() and CW_General_IsSwamp() (although the former function may move to the new CW_FILTER.LOL function file; it didn't exist when that function was made).
_______________________________
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 Splinterverse » 02 Oct 2016, 16:05

Xander - thanks for the tip on Planeswalker checks.

Any idea on why this doesn't work . . .

Code: Select all
<TRIGGER value="CANT_BLOCK_TEST" simple_qualifier="self" pre_trigger="1">
         local total = 0
         local filter = ClearFilter()
         filter:Add( FE_TYPE, OP_IS, CARD_TYPE_LAND  )
         filter:Add( FE_IS_TAPPED, false )
         filter:Add( FE_CONTROLLER, OP_IS, EffectController())
         total = filter:Count()
         if total &gt; 0 then
            return true
         end
         return false
      </TRIGGER>
---------------------------------------------
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: 76 times

Re: Community Wad

Postby Xander9009 » 02 Oct 2016, 16:11

I don't see any inherent issues. It looks to me like it should prevent a creature from blocking if you control any tapped lands. Is that right?

Just for a bit of random OCD from me...
Code: Select all
if total &gt; 0 then
    return true
end
return false
and
Code: Select all
return total &gt; 0
are identical.
Also, since you're not doing anything special with total (just using it one time and no special actions being taken with it),
Code: Select all
total = filter:Count()
return total &gt; 0
and
Code: Select all
return filter:Count() &gt; 0
are identical.
_______________________________
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 2 guests

Main Menu

User Menu

Our Partners


Who is online

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

Login Form