It is currently 06 Aug 2020, 21:21
   
Text Size

Community Wad

Moderators: Xander9009, CCGHQ Admins

Re: Community Wad

Postby thanosyro » 23 Jun 2020, 13:37

Dusk // Dawn having in main deck, crashes the program to desktop. Can somebody confirm?
thanosyro
 
Posts: 40
Joined: 28 Apr 2015, 18:58
Has thanked: 2 times
Been thanked: 3 times

Re: Community Wad

Postby Mori » 04 Jul 2020, 19:12

Bug reports:

  • Activated ability of Birds of Paradise (BIRDS_OF_PARADISE_CW_221896) ignores the summoning sickness.

  • After using Veil of Summer in the match and exiting the game, I saw this error:
    Code: Select all
    [lua] [string "VEIL_OF_SUMMER_CW_TITLE (CONTINUOUS_ACTION)~0x00001b95"]:4: attempt to call method 'GrantAbility' (a nil value)
    The card worked correctly.

thanosyro wrote:Dusk // Dawn having in main deck, crashes the program to desktop. Can somebody confirm?
Yes. I created a deck with knights and this spell. After the start of the match, the game crashed.
Mori
 
Posts: 4
Joined: 29 Aug 2019, 14:16
Has thanked: 0 time
Been thanked: 0 time

Re: Community Wad

Postby newtomagic » 11 Jul 2020, 09:36

I just want to ask for anyone who can code this

"At the beginning of each end step, if a creature died this turn, you may put a loyalty counter on a Liliana planeswalker you control"

i have this but it doesnt work----

<COUNTER_REGISTRATION name="Loyalty" proliferate="11" />
<TRIGGER value="BEGINNING_OF_PLAYERS_STEP">
return MTG():GetStep() == STEP_END_OF_TURN
</TRIGGER>

<INTERVENING_IF ignore_resolution_check="1">
local interrogation = MTG():ClearInterrogationQuery()
interrogation:SetFromZone( ZONE_BATTLEFIELD )
interrogation:SetToZone( ZONE_GRAVEYARD )
interrogation:SetType( CARD_TYPE_CREATURE )
if interrogation:Test( INTERROGATE_CARDS_MOVED_ZONE, INTERROGATE_THIS_TURN ) then
return true
else
return false
end
</INTERVENING_IF>

<TARGET tag="SPL_CARD_QUERY_CHOOSE_PLANESWALKER_TO_ADD_A_LOYALTY_COUNTER_TO" definition="1" compartment="1" count="1" />

<TARGET_DEFINITION id="1">
local filter = ClearFilter()
filter:Add( FE_CONTROLLER, OP_IS, EffectController() )
CW_Filter_AddPlaneswalkers(filter)
CW_Filter_SubType(filter, PLANESWALKER_TYPE_LILIANA)
</TARGET_DEFINITION>

<RESOLUTION_TIME_ACTION>
local FilteredCard() = EffectDC():Get_Targets(1) and
EffectDC():Get_Targets(1):Get_CardPtr(0)
if FilteredCard() ~= nil then
FilteredCard():AddCounters( MTG():GetCountersType("Loyalty"), 1 )
end
</RESOLUTION_TIME_ACTION>

</TRIGGERED_ABILITY>
newtomagic
 
Posts: 26
Joined: 10 Jul 2020, 06:56
Has thanked: 8 times
Been thanked: 1 time

Re: Community Wad

Postby fallenangle » 11 Jul 2020, 16:55

I can see that you've almost got it, but you're doing a few things that should probably be changed. I would suggest this:

Code: Select all
<TRIGGERED_ABILITY>
<COUNTER_REGISTRATION name="Loyalty" proliferate="11" />
<TRIGGER value="BEGINNING_OF_PLAYERS_STEP">
return MTG():GetStep() == STEP_END_OF_TURN
</TRIGGER>

<INTERVENING_IF ignore_resolution_check="1">
local interrogation = MTG():ClearInterrogationQuery()
interrogation:SetFromZone( ZONE_BATTLEFIELD )
interrogation:SetToZone( ZONE_GRAVEYARD )
interrogation:SetType( CARD_TYPE_CREATURE )
if interrogation:Test( INTERROGATE_CARDS_MOVED_ZONE, INTERROGATE_THIS_TURN ) then
return true
else
return false
end
</INTERVENING_IF>
<RESOLUTION_TIME_ACTION>
            local oController = EffectController()
            if oController ~= nil then
               local filter = ClearFilter()
filter:Add( FE_CONTROLLER, OP_IS, EffectController() )
CW_Filter_AddPlaneswalkers(filter)
CW_Filter_SubType(filter, PLANESWALKER_TYPE_LILIANA)
               oController:ChooseItem("SPL_CARD_QUERY_CHOOSE_PLANESWALKER_TO_ADD_A_LOYALTY_COUNTER_TO", EffectDC():Make_Targets(1))
            end
         </RESOLUTION_TIME_ACTION>

<RESOLUTION_TIME_ACTION>
local target = EffectDC():Get_Targets(1) and
EffectDC():Get_Targets(1):Get_CardPtr(0)
if target ~= nil then
target:AddCounters( MTG():GetCountersType("Loyalty"), 1 )
end
</RESOLUTION_TIME_ACTION>
<MAY/>

</TRIGGERED_ABILITY>
If that doesn't work, let me know, and I'll see if I can't fix it.
fallenangle
 
Posts: 318
Joined: 20 Jul 2013, 02:31
Has thanked: 73 times
Been thanked: 38 times

Re: Community Wad

Postby newtomagic » 12 Jul 2020, 05:53

Thanks for the reply....but its still not working..I believe this

"oController:ChooseItem("SPL_CARD_QUERY_CHOOSE_PLANESWALKER_TO_ADD_A_LOYALTY_COUNTER_TO", EffectDC():Make_Targets(1))"

should be a prompt but it doesnt appear.. the special effects where the cards signals that its gonna activate something but after that nothing happens..
newtomagic
 
Posts: 26
Joined: 10 Jul 2020, 06:56
Has thanked: 8 times
Been thanked: 1 time

Re: Community Wad

Postby fallenangle » 12 Jul 2020, 12:54

I thought a bit more about this, and you're right. Try deleting the "MAY" tag I put at the bottom and replacing the prompt you quoted with this:

Code: Select all
oController:ChooseItem("SPL_CARD_QUERY_CHOOSE_PLANESWALKER_TO_ADD_A_LOYALTY_COUNTER_TO", EffectDC():Make_Targets(1), QUERY_FLAG_MAY)
That should be what you need. If it isn't, let me know, and I'll look again.
fallenangle
 
Posts: 318
Joined: 20 Jul 2013, 02:31
Has thanked: 73 times
Been thanked: 38 times

Re: Community Wad

Postby newtomagic » 12 Jul 2020, 15:10

Code: Select all
<RESOLUTION_TIME_ACTION>
            local oController = EffectController()
            if oController ~= nil then
               local filter = ClearFilter()
      filter:Add( FE_CONTROLLER, OP_IS, EffectController() )
      CW_Filter_AddPlaneswalkers(filter)
      CW_Filter_SubType(filter, PLANESWALKER_TYPE_LILIANA)
               oController:ChooseItem("SPL_CARD_QUERY_CHOOSE_PLANESWALKER_TO_ADD_A_LOYALTY_COUNTER_TO", EffectDC():Make_Targets(1), QUERY_FLAG_MAY)
            end
         </RESOLUTION_TIME_ACTION>

   <RESOLUTION_TIME_ACTION>
      local target = EffectDC():Get_Targets(1) and
      EffectDC():Get_Targets(1):Get_CardPtr(0)
      if target ~= nil then
      target:AddCounters( MTG():GetCountersType("Loyalty"), 1 )
         end
   </RESOLUTION_TIME_ACTION>
still doesnt materialize....the question to choose doesnt appear...
newtomagic
 
Posts: 26
Joined: 10 Jul 2020, 06:56
Has thanked: 8 times
Been thanked: 1 time

Re: Community Wad

Postby fallenangle » 12 Jul 2020, 19:54

All right, Newtomagic: here is your card, tested and working. The problem was that, even though it looks like it should work, you can't actually check planeswalker subtypes using the method you proposed. I didn't know this either until I checked other coded cards for a working method.

Code: Select all
<?xml version="1.0" encoding="UTF-8"?>
<CARD_V2 ExportVersion="2">
   <FILENAME text="LILIANAS_SCROUNGER_CW" />
   <CARDNAME text="LILIANAS_SCROUNGER" />
   <TITLE>
      <LOCALISED_TEXT LanguageCode="en-US"><![CDATA[Liliana's Scrounger]]></LOCALISED_TEXT>
      </TITLE>
   <MULTIVERSEID value="488636" />
   <ARTID value="LILIANAS_SCROUNGER" />
   <ARTIST name="Martina Fackowa" />
   <CASTING_COST cost="{2}{B}" />
   <FLAVOURTEXT>
      <LOCALISED_TEXT LanguageCode="en-US"><![CDATA["This arm's got plenty of use left in it. Who'd throw such a nice thing away?"]]></LOCALISED_TEXT>
      </FLAVOURTEXT>
   <TYPE metaname="Creature" />
   <SUB_TYPE metaname="Human" />
   <SUB_TYPE metaname="Wizard" />
   <EXPANSION value="M21" />
   <RARITY metaname="U" />
   <POWER value="3" />
   <TOUGHNESS value="2" />
   
   <TRIGGERED_ABILITY>
      <LOCALISED_TEXT LanguageCode="en-US"><![CDATA[At the beginning of each end step, if a creature died this turn, you may put a loyalty counter on a Liliana planeswalker you control.]]></LOCALISED_TEXT>
      <COUNTER_REGISTRATION name="Loyalty" proliferate="11" />
<TRIGGER value="BEGINNING_OF_STEP">
return MTG():GetStep() == STEP_END_OF_TURN
</TRIGGER>

<INTERVENING_IF ignore_resolution_check="1">
         local interrogation = MTG():ClearInterrogationQuery()
         interrogation:SetFromZone(ZONE_BATTLEFIELD)
         interrogation:SetToZone(ZONE_GRAVEYARD)
         interrogation:SetType(CARD_TYPE_CREATURE)
         return interrogation:Test(INTERROGATE_CARDS_MOVED_ZONE, INTERROGATE_THIS_TURN)
      </INTERVENING_IF>
<RESOLUTION_TIME_ACTION>
            local oFilter = ClearFilter()
               oFilter:SetZone(ZONE_BATTLEFIELD)
         oFilter:Add(FE_CONTROLLER, OP_IS, EffectController())
         oFilter:Add(FE_LUA_CONDITION, 1, EffectController(), EffectDC())
         if oFilter:CountStopAt(1) == 1 then
            EffectController():ChooseItem("SPL_CARD_QUERY_CHOOSE_PLANESWALKER_TO_ADD_A_LOYALTY_COUNTER_TO", EffectDC():Make_Targets(1), QUERY_FLAG_MAY)
            end
         </RESOLUTION_TIME_ACTION>
       <FILTER_CONDITION id="1">
         return FilteredCard() ~= nil and PLW_GetSubType(FilteredCard()) == PLANESWALKER_TYPE_LILIANA
      </FILTER_CONDITION>

<RESOLUTION_TIME_ACTION>
local target = EffectDC():Get_Targets(1) and EffectDC():Get_Targets(1):Get_CardPtr(0)
if target ~= nil then
target:AddCounters( MTG():GetCountersType("Loyalty"), 1 )
end
</RESOLUTION_TIME_ACTION>

</TRIGGERED_ABILITY>

<SFX text="COMBAT_BLUNT_LARGE_ATTACK" power_boundary_min="4" power_boundary_max="-1" />
   <SFX text="COMBAT_BLUNT_SMALL_ATTACK" power_boundary_min="1" power_boundary_max="3" />
   
   <AUTHOR><![CDATA[fallenangle]]></AUTHOR>
   <EDITORS><![CDATA[fallenangle]]></EDITORS>
   <DATE><![CDATA[12-07-20]]></DATE>
</CARD_V2>
Enjoy! Remember to remove any spaces before the "<?xmlversion"> (first line) when you copy it into a blank text document, or it won't work.
fallenangle
 
Posts: 318
Joined: 20 Jul 2013, 02:31
Has thanked: 73 times
Been thanked: 38 times

Re: Community Wad

Postby newtomagic » 13 Jul 2020, 03:50

fallenangle wrote:All right, Newtomagic: here is your card, tested and working. The problem was that, even though it looks like it should work, you can't actually check planeswalker subtypes using the method you proposed. I didn't know this either until I checked other coded cards for a working method.
Thank You Very Much...ones step closer to completing those 2021 black core set... Thanks a Lot

last question..do you know How do i call my custom Tokens???
this is my Token file name: TOKEN_BEAR_C_2_2_G_5510771
i think is what should i replace CW_Tokens in the code because my token are in inside DATA_DLC_DECK_BUILDER_CUSTOM and not CW..
Code: Select all
 CW_Tokens("ANGEL_C_4_4_W_F", 1, player)
newtomagic
 
Posts: 26
Joined: 10 Jul 2020, 06:56
Has thanked: 8 times
Been thanked: 1 time

Re: Community Wad

Postby fallenangle » 13 Jul 2020, 15:50

It depends on what you want to do with the tokens. The simplest thing is just to create them using MTG():PutTokensOntoBattlefield("tokenname", number, player, Makesomekindofchest). You can also put token copies onto the battlefield, or put tokens onto the battlefield tapped, or put tokens onto the battlefield tapped and attacking, depending on the function you need. You can see a list of Functions in the "Information" section of the DOTP 2014 Wiki page. You can also look at real examples of tokens being created if you have Riiak's Deckbuider, look for a card that does what you want (or something similar) and choose "View Card" by right-clicking to see the card's code. That's what most of us who code cards for this game usually do.

You probably can't use the CW's token creation functions to do what you want unless you update your copy of the CW in the appropriate places. I don't fully understand how the CW manages this, so every card I code uses just 1 token and the default game functions to accomplish its task.

Note that the game will crash after a match if you don't register any tokens you plan for a card to create in the appropriate place on your token-creating card. If you need more help with a specific card, let me know, and I'll see what I can do to help you.
fallenangle
 
Posts: 318
Joined: 20 Jul 2013, 02:31
Has thanked: 73 times
Been thanked: 38 times

Re: Community Wad

Postby newtomagic » 14 Jul 2020, 07:54

ah i see
Code: Select all
<LOCALISED_TEXT LanguageCode="en-US"><![CDATA[This spell costs {2} less to cast if it targets a blue spell.]]></LOCALISED_TEXT>

      <TRIGGER value="CARD_CONSIDERED_FOR_TARGETTING" simple_qualifier="self" pre_trigger="1">
         return SecondaryObject():GetController() == EffectController():GetTeam() and TriggerObject():GetColour():Test(COLOUR_BLUE) and EffectController():MyTurn()
      </TRIGGER>

      <RESOLUTION_TIME_ACTION>
         if SecondaryObject() ~= nil then
            SecondaryObject():DecreaseCost(2)
         end
      </RESOLUTION_TIME_ACTION>
whats wrong with this code? i double check and triple check..cant find the error..
newtomagic
 
Posts: 26
Joined: 10 Jul 2020, 06:56
Has thanked: 8 times
Been thanked: 1 time

Re: Community Wad

Postby fallenangle » 14 Jul 2020, 19:13

You're attempting to use a trigger in a way that it can't be used, for starters. "CARD_CONSIDERED_FOR..." triggers have very limited use, namely, to override potential targeting or casting from cards that shouldn't be able to target the card in question or be cast. Secondly, TriggerObject() is used for the thing that actually experiences the effect of the trigger, while SecondaryObject() is usually used for the cause. Thirdly, cost reduction of the sort you're looking to achieve is only possible in a TARGET block. Look at the code on "Price of Fame" as an example of the kind of code you need. The code you have now can't be rewritten in such a way that it will work.

I would propose working code, but I have no idea what your card is supposed to do when it targets spells, so I can't say what you need. Let me know, and I can look into it for you.
fallenangle
 
Posts: 318
Joined: 20 Jul 2013, 02:31
Has thanked: 73 times
Been thanked: 38 times

Re: Community Wad

Postby newtomagic » 15 Jul 2020, 02:56

Thanks for that card Price of Fame.. got it working...wordings in this new coresets are different its making it a little hard to search for similar cards...
can you check why is the flying part not working in this code? its from Reaper of Night card
Code: Select all
<TRIGGERED_ABILITY>
      <LOCALISED_TEXT LanguageCode="en-US"><![CDATA[Whenever Reaper of Night attacks, If defending player has two or fewer cards in hand, it gains flying until end of turn.]]></LOCALISED_TEXT>
      <TRIGGER value="ATTACKING" simple_qualifier="self"> </TRIGGER>
      
      <INTERVENING_IF>
         local number = GetPlayerAttacked():Hand_Count()
         if number &lt;= 2 then
            return true
         else
            return false
         end
      </INTERVENING_IF>

      <CONTINUOUS_ACTION layer="6">
         if EffectSource() ~= nil then
            local characteristics = EffectSource():GetCurrentCharacteristics()
            characteristics:Bool_Set( CHARACTERISTIC_FLYING, 1 )
         end
      </CONTINUOUS_ACTION>
      <DURATION simple_duration="UntilEOT" />
   </TRIGGERED_ABILITY>
newtomagic
 
Posts: 26
Joined: 10 Jul 2020, 06:56
Has thanked: 8 times
Been thanked: 1 time

Re: Community Wad

Postby fallenangle » 15 Jul 2020, 16:15

There are two things I can think of that you might try. The first is to delete the extraneous "</TRIGGER>" tag and put an / at the end of the "TRIGGER value" line to close it. You only need "</TRIGGER>" tags if there is a condition other than what is specified in the "TRIGGER value" line for it to work.

The second thing you could try would be to put everything in your "INTERVENING_IF" block in between the "TRIGGER value" and "</TRIGGER>" lines, then get rid of the "INTERVENING_IF" block.

These two things are more or less equivalent; the game shouldn't prefer one over the other, although it might.

Let me know if I can help with anything else.
fallenangle
 
Posts: 318
Joined: 20 Jul 2013, 02:31
Has thanked: 73 times
Been thanked: 38 times

Re: Community Wad

Postby newtomagic » 17 Jul 2020, 04:26

Thanks for all your help...i still need a lot of Help so i decided to collect those code i cant copy edit paste from other cards..
1.Banish into Fable card "[When you cast this spell from your hand, copy it if you control an
artifact, then copy it if you control an enchantment. You may choose new targets for the
copies."

2. Dance of the Mance card

3. Doom Foretold card
newtomagic
 
Posts: 26
Joined: 10 Jul 2020, 06:56
Has thanked: 8 times
Been thanked: 1 time

PreviousNext

Return to 2014

Who is online

Users browsing this forum: No registered users and 6 guests


Who is online

In total there are 6 users online :: 0 registered, 0 hidden and 6 guests (based on users active over the past 10 minutes)
Most users ever online was 1371 on 09 Feb 2020, 16:22

Users browsing this forum: No registered users and 6 guests

Login Form