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

Community Wad

Moderator: CCGHQ Admins

Re: Community Wad

Postby Splinterverse » 05 Nov 2016, 14:28

thefiremind wrote:You can use FE_ZONE.
This is perfect. That's what I'll try.

thefiremind wrote:While I was looking for my functions in the Programming Talk section, I found a topic about Meandering Towershell:
viewtopic.php?f=63&t=15629
The problem described here is that if you put Meandering Towershell onto the battlefield attacking during the declare attackers step, it will fire the ATTACKING trigger, while it shouldn't.
Yeah. I think this guy needs to be in the impossible list. I will add him next time I update.

Thanks again for the support! :D
---------------------------------------------
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 » 05 Nov 2016, 14:44

Is there a way to officially target a creature or creatures without a target block?

I ask because I am loathe to ask the player to pick a target if the target isn't going to be used. For example, with a card like Kuldotha Flamefiend, the target is only needed if the artifact sacrifice is made. If we have to use target blocks every time we target something, how do we avoid it prompting if the artifact sacrifice isn't made?
---------------------------------------------
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 thefiremind » 05 Nov 2016, 15:18

Splinterverse wrote:For example, with a card like Kuldotha Flamefiend, the target is only needed if the artifact sacrifice is made.
I know that the wording is confusing and I would have come to the same conclusion before I started modding (it really helped me a lot getting an insight on how Magic works, both by looking at how official cards are coded and by reading Gatherer rulings for cards I wanted to code)... but what you're saying is actually wrong. Any ability with the word "target" requires you to choose your target(s) before anything else, and what happens to those targets when the ability resolves doesn't matter. Kuldotha Flamefiend can "kill" a Phantasmal Bear (actually, it can kill up to 4 :D) without the need to sacrifice any artifact.

I know what you mean: I hate to use Serene Steward in Magic Duels because I need to target even when I don't plan to pay. I bear it for the sake of Magic Rules. :mrgreen:

EDIT: Back to Meandering Towershell, I tried to code it in Magic Duels and saw what happened to you with my eyes. It seems that the game doesn't care if there's a turtle that came out of nowhere attacking: if nobody else attacks, the rest of the combat phase is skipped and the poor turtle remains "suspended" in its attack. The fact that it exiles again on the opponent's turn means that NeoAnderson was also correct in his topic and the ATTACKING trigger is fired for any creature found attacking at the end of the declaring attackers step. In short, yes, this card is a mess and I'd call it impossible too.
Last edited by thefiremind on 05 Nov 2016, 15:29, edited 1 time 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: 722 times

Re: Community Wad

Postby Splinterverse » 05 Nov 2016, 15:26

thefiremind wrote:
Splinterverse wrote:For example, with a card like Kuldotha Flamefiend, the target is only needed if the artifact sacrifice is made.
I know that the wording is confusing and I would have come to the same conclusion before I started modding (it really helped me a lot getting an insight on how Magic works, both by looking at how official cards are coded and by reading Gatherer rulings for cards I wanted to code)... but what you're saying is actually wrong. Any ability with the word "target" requires you to choose your target(s) before anything else, and what happens to those targets when the ability resolves doesn't matter. Kuldotha Flamefiend can "kill" a Phantasmal Bear (actually, it can kill up to 4 :D) without the need to sacrifice any artifact.

I know what you mean: I hate to use Serene Steward in Magic Duels because I need to target even when I don't plan to pay. I bear it for the sake of Magic Rules. :mrgreen:
Good to know. I will code that way moving forward.
---------------------------------------------
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 » 05 Nov 2016, 16:42

Splinterverse wrote:I want to include only cards in the battlefield, graveyard, and exile. I know this wouldn't account for cards that had previously been put back in the library or revealed from the hand, but I'd rather have the list be smaller than give the player an unfair advantage of knowing every card inside the opponent's library.
You could track cards as they hit public zones. As soon as any card hits a public zone, add it to a chest for tracking. When you call the function, include any card you've already seen. This wouldn't catch revealed cards, or times the player looked at the hand, but it would include any bounced cards or Exilir of Immortality effects.

Also, there shouldn't be too many cards that let you search your opponent's library. Modifying just those ones to also register each found card shouldn't be too difficult. It would never be quite perfect, but you could get it pretty close with these, without giving the player access to cards they haven't seen yet.
_______________________________
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 » 05 Nov 2016, 19:03

Xander9009 wrote:
Splinterverse wrote:I want to include only cards in the battlefield, graveyard, and exile. I know this wouldn't account for cards that had previously been put back in the library or revealed from the hand, but I'd rather have the list be smaller than give the player an unfair advantage of knowing every card inside the opponent's library.
You could track cards as they hit public zones. As soon as any card hits a public zone, add it to a chest for tracking. When you call the function, include any card you've already seen. This wouldn't catch revealed cards, or times the player looked at the hand, but it would include any bounced cards or Exilir of Immortality effects.

Also, there shouldn't be too many cards that let you search your opponent's library. Modifying just those ones to also register each found card shouldn't be too difficult. It would never be quite perfect, but you could get it pretty close with these, without giving the player access to cards they haven't seen yet.
This may be the only option. Everything I've tried (two calls, setting zone via filters, etc.) only ever makes the items in the opponent's battlefield available for selection.

Is there an example of how this would be done? Keep in mind, Lammastide Weave is an Instant, so the DC storage would have to happen in the library and/or hand.
---------------------------------------------
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 » 05 Nov 2016, 19:24

Coded, tested, and uploaded:
Fatal Lore -- coded by TheFireMind, tested by me
Krovikan Plague
Kry Shield
Kuldotha Flamefiend
Kumano's Blessing
Kumano's Pupils
Land Equilibrium
Laquatus's Creativity
Lashknife Barrier
Last Stand
Leshrac's Sigil
Life Matrix
Life's Finale
Lightning Dart
Lightning Surge
Lim-Dûl the Necromancer
Lurking Evil
Magebane Armor
Maralen of the Mornsong
Omen Machine

Bugs fixed:
Daunting Defender -- was not checking for controller's creatures

HQ art uploaded (all were missing):
Lim-Dûl the Necromancer

Open Items:

-- CW_CARD_QUERY_SPLINTERVERSE has been updated and uploaded.

-- Krovikan Elementalist http://pastebin.com/j3bZX2qF Everything works except granting flying. I've tried both single and multiple line characteristics application. It keeps spitting out the following error, but as you will see in the code, the target call is the same for multiple CA blocks and the others are working just fine:
Code: Select all
(CONTINUOUS_ACTION)~0x00000661"]:2: attempt to index a nil value
[lua] [string "KROVIKAN_ELEMENTALIST_CW_2463_TITLE
-- Krovikan Vampire http://pastebin.com/04F06sa6 Everything works except sacrifice of the stolen creatures when Krovikan Vampire dies.

-- Leeches http://pastebin.com/NLazt7ev The damage occurs, but the poison counters are not removed as far as I can tell. In the tests, I had given the opponent 3 poison counters and the card did 3 points of damage, but the icon still showed 3 poison counters on the player. Maybe they were gone and the icon didn't update. My guess is they counters didn't get removed at all.

-- Mammoth Harness http://pastebin.com/QgACjhk7 I've tried with/without pre_trigger/replacement_effect and the blocking or blocked creature never gains First Strike.

-- Well of Knowledge http://pastebin.com/V3nXAXuh Finally got this one working with a loop to keep the draw phase open long enough to take action. The problem is that it is supposed to be available to any player but ONLY during his/her turn. The current version has it available to all players on every draw step. How can I restrict it to the player whose turn it is?

-- EDIT TO ADD: Has anyone been able to make XML for Kongming, "Sleeping Dragon"? I can't seem to get it to work in the "A Card Generator" with/without quotation marks.

Next:

Continuing to code today. May have more uploads later. If not, will be back tomorrow, continuing to code.
---------------------------------------------
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 thefiremind » 05 Nov 2016, 21:40

Splinterverse wrote:Fatal Lore -- coded by TheFireMind, tested by me
I'm glad it worked! :)

Splinterverse wrote:-- Krovikan Elementalist http://pastebin.com/j3bZX2qF Everything works except granting flying.
Line 2 refers to the first line of code (line 1 is probably added internally when the script is run), so the problem would appear to be in
Code: Select all
local target = EffectDC():Get_Targets(1):Get_CardPtr(0)
but I can't see any problem in it. I have no smart suggestions, so I'll go with a dumb one: try to delete the continuous action that grants flying, and write it again starting from a copy of one that worked (such as the AI_SetWorthless one). It will probably achieve nothing, but I can't think of anything else to try.

This is not correlated to your problem, but the card should be coded in a slightly different way. The trigger for each creature dying shouldn't use the stack (it's a coding commodity for you, the card doesn't mention it). I won't delve deeper into it because I think it's possible to avoid using such trigger and I'd like to try. I'll let you know the results.
EDIT: Now that I think about it more, my idea isn't feasible because we need to check for the damage before the creature dies, otherwise the information gets lost. But at least I can store the creatures into a LinkedDC register and make things cleaner. I'll report back once I'm done.

Splinterverse wrote:-- Leeches http://pastebin.com/NLazt7ev
Leeches is an impossible card because we have a function to add poison counters, but not a function to remove them. My TFM_WritePoisonCount function simply writes the current poison count to a PlayerDataChest register so that it's readable when it's needed.
(In order to code Leeches we would have to code our own poison counters, but that would also mean writing our own infect characteristic, I don't think it's worth it.)

Your triggers have simple_qualifier="self" which would mean TriggerObject() == EffectSource(). They'll never trigger because they would expect the Aura to block or be blocked.

Just do this:
Code: Select all
<AVAILABILITY any_player="1">
return MTG():GetStep() == STEP_DRAW and EffectController():MyTurn()
</AVAILABILITY>
Splinterverse wrote:Has anyone been able to make XML for Kongming, "Sleeping Dragon"? I can't seem to get it to work in the "A Card Generator" with/without quotation marks.
I used the Multiverse ID as input in my generator and it worked. It added an extra underscore at the end of the name, but I removed it manually. I copied the ability from Angel of Invention, so that's taken care of. You just have to change the IDs as you prefer.
Attachments
KONGMING_SLEEPING_DRAGON_382991.zip
(1.92 KiB) Downloaded 210 times
< 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: Community Wad

Postby Splinterverse » 05 Nov 2016, 22:48

Finished coding for today; all cards referenced are from the missing cards list.

Coded, tested, and uploaded:
Kalemne's Captain
Kaseto, Orochi Archmage
Keeper of the Flame
Keeper of the Light
Keeper of the Mind
Keldon Firebombers
Kjeldoran War Cry
Kodama of the Center Tree
Kongming, Sleeping Dragon -- coded by thefiremind; tested by me
Kookus
Mammoth Harness
Well of Knowledge

HQ art uploaded (all were missing):
Copper-Leaf Angel
Kalemne's Captain
Karlov of the Ghost Council
Kaseto, Orochi Archmage

Open Items:

-- Is there a trick to making reveal actually happen? Is it that we can't do reveals in a loop? I just can't be cavalier about it and ignore it not happening, especially when it is a cost. The reason it is a cost is that the opponent gets something out of it -- awareness of what's in your hand. Without it, the player is getting the reward without paying the full cost. I know there are cases where I've gotten GuidedReveal to work, but thinking back, I think it is only when the cards are revealed one at a time. Any ideas or tricks?

-- Maybe I'm not doing things correctly, but when I put more than one target block in an activated ability, the ability is never able to be activated. If I change one to "chooseItem" or "chooseItems", the ability works (and I understand why we wouldn't want to go that route). I think this is particularly problematic when an ability needs the first target to get the second. For example, Keeper of the Dead requires two targets and the second target needs to be controlled by the first target. I could remove that requirement and see if it becomes available, but I'm just wondering if there is a trick or anyone else has noted this issue.

Next:

Back tomorrow for more coding.
---------------------------------------------
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 thefiremind » 05 Nov 2016, 23:01

Splinterverse wrote:-- Is there a trick to making reveal actually happen?
Can you provide a code example of what you're trying to do? I remember having problems with doing something after using Reveal, so maybe you encountered the same problem.
Splinterverse wrote:-- Maybe I'm not doing things correctly, but when I put more than one target block in an activated ability, the ability is never able to be activated.
There's a dependency="1" attribute that needs to be put in one of the 2 target blocks when one depends on the other. If I remember correctly, you need to put it on the first target block (which will be read by the second). Look at Bioshift, I think it's used there.

I coded Krovikan Vampire my way, and I'm tired now. I really, really hope it works.
I suggest to put the text on the trigger that truly refers to the ability (where I left the English one). It shouldn't matter much, though.
Super-lengthy Krovikan Vampire ability, partially tested (Version 2) | Open
Code: Select all
  <TRIGGERED_ABILITY replacement_effect="1" linked_ability_group="1">
    <TRIGGER value="ZONECHANGE_BEGIN" to_zone="ZONE_GRAVEYARD" from_zone="ZONE_BATTLEFIELD">
    local tobj = TriggerObject()
    if tobj:GetCardType():Test(CARD_TYPE_CREATURE) then
       local interrogation = MTG():ClearInterrogationQuery()
       interrogation:SetObject( EffectSource() )
       interrogation:SetSecondaryObject(tobj)
       if interrogation:Test(INTERROGATE_DAMAGE_DEALT, INTERROGATE_THIS_TURN) then
          -- This creature has been damaged by the Vampire, save it in LinkedDC
          local linkedDC = LinkedDC():Get_Chest(0)
          if linkedDC == nil then
             linkedDC = LinkedDC():Make_Chest(0)
          end
          local index = linkedDC:Get_Int(-1111)
          linkedDC:Set_CardPtr(index, tobj)
          linkedDC:Protect_CardPtr(index)
          linkedDC:Int_Inc(-1111)
       end
    end
    return false
    </TRIGGER>
  </TRIGGERED_ABILITY>
  <TRIGGERED_ABILITY linked_ability_group="1">
    <LOCALISED_TEXT LanguageCode="en-US"><![CDATA[At the beginning of each end step, if a creature dealt damage by Krovikan Vampire this turn died, put that card onto the battlefield under your control. Sacrifice it when you lose control of Krovikan Vampire.]]></LOCALISED_TEXT>
    <TRIGGER value="BEGINNING_OF_STEP">
    if MTG():GetStep() == STEP_CLEANUP then
       LinkedDC():Free_Compartment(0) -- Clear the data for the turn that just ended
    elseif MTG():GetStep() == STEP_END_OF_TURN then
       return true
    end
    return false
    </TRIGGER>
    <INTERVENING_IF>
    if EffectSource() ~= nil then
       -- Check if there are creatures saved in LinkedDC
       local linkedDC = LinkedDC():Get_Chest(0)
       if linkedDC ~= nil then
          local count = linkedDC:Get_Int(-1111)
          for i=0,count-1 do
             local creature = linkedDC:Get_CardPtr(i)
             if creature ~= nil then
                return true
             end
          end
       end
    end
    return false
    </INTERVENING_IF>
    <RESOLUTION_TIME_ACTION>
    local source = EffectSource()
    if source ~= nil then
       local player = EffectController()
       local delayDC = EffectDC():Make_Chest(0)
       local creatureDC = delayDC:Make_Chest(3)
       local linkedDC = LinkedDC():Get_Chest(0)
       local count = linkedDC:Get_Int(-1111)
       for i=0,count-1 do
          -- Creatures that are still in LinkedDC will be saved in another DC and then put onto the battlefield
          local creature = linkedDC:Get_CardPtr(i)
          if creature ~= nil then
             local index = creatureDC:Count()
             creatureDC:Set_CardPtr(index, creature)
             creatureDC:Protect_CardPtr(index)
             creature:PutOntoBattlefield(player)
          end
       end
       count = creatureDC:Count()
       if count &gt; 0 then
          -- If we actually put any creature onto the battlefield, then we need the delayed trigger for the sacrifices
          delayDC:Set_CardPtr(0, source)
          delayDC:Set_PlayerPtr(1, player)
          delayDC:Set_Int(2, count)
          MTG():CreateDelayedTrigger(1, delayDC)
       end
    end
    </RESOLUTION_TIME_ACTION>
  </TRIGGERED_ABILITY>
  <TRIGGERED_ABILITY replacement_effect="1" resource_id="1">
    <TRIGGER value="CONTROLLER_CHANGED">
    return TriggerObject() == EffectDC():Get_CardPtr(0)
    </TRIGGER>
    <TRIGGER value="ZONECHANGE_BEGIN" to_zone="ZONE_ANY" from_zone="ZONE_BATTLEFIELD">
    return TriggerObject() == EffectDC():Get_CardPtr(0)
    </TRIGGER>
    <RESOLUTION_TIME_ACTION>
    local player = EffectDC():Get_PlayerPtr(1)
    local count = EffectDC():Get_Int(2)
    local creatureDC = EffectDC():Get_Chest(3)
    for i=0,count-1 do
       local creature = creatureDC:Get_CardPtr(i)
       if creature ~= nil then
          player:Sacrifice(creature)
       end
    end
    </RESOLUTION_TIME_ACTION>
    <CLEANUP fire_once="1" />
  </TRIGGERED_ABILITY>
A note: I was unsure if the sacrifice trigger should use the stack or not. I found Ray of Command in DotP2015 and I saw that it was using replacement_effect for the same purpose, so I used it too.
Last edited by thefiremind on 06 Nov 2016, 23:06, edited 2 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: 722 times

Re: Community Wad

Postby Splinterverse » 06 Nov 2016, 11:01

thefiremind wrote:
Splinterverse wrote:-- Is there a trick to making reveal actually happen?
Can you provide a code example of what you're trying to do? I remember having problems with doing something after using Reveal, so maybe you encountered the same problem.
It's really almost every case where I use reveal; very few have worked. This isn't just a problem for my cards; I'm finding a lot in the .wad that aren't working on the reveal front either. Here are a couple of many that have been problematic:
Code: Select all
<COST type="Reveal" definition="0" compartment="1" query_tag="CARD_QUERY_CHOOSE_CARDS_TO_REVEAL" item_count_any_number_of="1" />
Code: Select all
<RESOLUTION_TIME_ACTION>
         local player = MTG():GetNthPlayer(0)
         local filter = ClearFilter()
         filter:SetZone( ZONE_HAND, player)
         filter:Add( FE_TYPE, OP_IS, CARD_TYPE_CREATURE )
         local creaturesInHand = filter:Count()
         if creaturesInHand &gt; 0 then
            player:SetItemCount( creaturesInHand )
            for i = 0,(creaturesInHand-1) do
               player:SetItemPrompt (i, "SPL_CARD_QUERY_CHOOSE_CARD_TO_REVEAL" )
            end
            player:ChooseItems( EffectDC():Make_Targets(0), QUERY_FLAG_UP_TO )
         end
      </RESOLUTION_TIME_ACTION>
      <RESOLUTION_TIME_ACTION>
         EffectDC():Set_Int(10, 0)
         local creaturesToReveal = EffectDC():Get_Targets(0):Count()
         local reveal_count = 0            
         for i=0, (creaturesToReveal-1) do
            local creature = EffectDC():Get_Targets(0):Get_CardPtr(i)
            if creature ~= nil then
               creature:Reveal()
               reveal_count = reveal_count + 1
            end
            EffectDC():Set_Int(10, reveal_count)
         end         
      </RESOLUTION_TIME_ACTION>
thefiremind wrote:
Splinterverse wrote:-- Maybe I'm not doing things correctly, but when I put more than one target block in an activated ability, the ability is never able to be activated.
There's a dependency="1" attribute that needs to be put in one of the 2 target blocks when one depends on the other. If I remember correctly, you need to put it on the first target block (which will be read by the second). Look at Bioshift, I think it's used there.
I will check out Bioshift. Thanks for the tip!

thefiremind wrote:I coded Krovikan Vampire my way, and I'm tired now.
Cool. I will test this 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 thefiremind » 06 Nov 2016, 14:10

Splinterverse wrote:It's really almost every case where I use reveal; very few have worked. This isn't just a problem for my cards; I'm finding a lot in the .wad that aren't working on the reveal front either.
About the first example, I don't think I have ever tried to use item_count_any_number_of="1" on a Reveal cost: it may be bugged. What about the associated COST_DEFINITION? Could there be errors in it?

About the second example, I can't understand what it's trying to achieve by using MTG():GetNthPlayer(0), but aside from that, I can't see errors in the code. I searched for "reveal" in the whole DotP section of the forums and saw lots of reports of it not working, but no sure cause or solution. I have a faint memory of someone saying that it might work only on the first action of an ability, but I can't find that post, did I imagine it? :shock:

The fact that card:Reveal() has been substituted by player:RevealDCToMe(chest) from DotP2015 onwards is also a hint that something could have been broken in the original function.

It's not pretty, but if you want to simulate a "RevealDCToMe" behavior, you could gather all the cards to reveal in a chest, then present each player with a query as if they needed to choose a card among them, but either you unselect all the cards so that none can be chosen, or you let them choose without coding any consequence to the choice.
< 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: Community Wad

Postby Splinterverse » 06 Nov 2016, 15:02

thefiremind wrote:
Splinterverse wrote:It's really almost every case where I use reveal; very few have worked. This isn't just a problem for my cards; I'm finding a lot in the .wad that aren't working on the reveal front either.
About the first example, I don't think I have ever tried to use item_count_any_number_of="1" on a Reveal cost: it may be bugged. What about the associated COST_DEFINITION? Could there be errors in it?

About the second example, I can't understand what it's trying to achieve by using MTG():GetNthPlayer(0), but aside from that, I can't see errors in the code. I searched for "reveal" in the whole DotP section of the forums and saw lots of reports of it not working, but no sure cause or solution. I have a faint memory of someone saying that it might work only on the first action of an ability, but I can't find that post, did I imagine it? :shock:

The fact that card:Reveal() has been substituted by player:RevealDCToMe(chest) from DotP2015 onwards is also a hint that something could have been broken in the original function.

It's not pretty, but if you want to simulate a "RevealDCToMe" behavior, you could gather all the cards to reveal in a chest, then present each player with a query as if they needed to choose a card among them, but either you unselect all the cards so that none can be chosen, or you let them choose without coding any consequence to the choice.
Hmm... I don't know about that post. I haven't read many of the older posts.

I don't think the cost definition was the problem because I've seen instances of that cost without the any_number and it still doesn't work (for me).

Your simulation of RevealDCToMe does work. It's what I used to get Enduring Renewal to work. I also use it in my test cards to see what the AI has in hand.
---------------------------------------------
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 » 06 Nov 2016, 19:40

thefiremind wrote:
Splinterverse wrote:It's really almost every case where I use reveal; very few have worked. This isn't just a problem for my cards; I'm finding a lot in the .wad that aren't working on the reveal front either.
I searched for "reveal" in the whole DotP section of the forums and saw lots of reports of it not working, but no sure cause or solution. I have a faint memory of someone saying that it might work only on the first action of an ability, but I can't find that post, did I imagine it? :shock:
The closest post I know of to that was my own: viewtopic.php?f=109&t=15783&p=185269&hilit=Reveal#p185269

But it's more about revealing before choosing, not revealing only in the first action.

----

I'll go back through all of these posts in a few days and answer anything unanswered. Until then, sorry for my absence. I've been really busy, and I will be for at least another couple of days.
_______________________________
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 thefiremind » 06 Nov 2016, 19:58

Xander9009 wrote:The closest post I know of to that was my own: viewtopic.php?f=109&t=15783&p=185269&hilit=Reveal#p185269

But it's more about revealing before choosing, not revealing only in the first action.
That must be the one, I simply couldn't remember exactly what it was about. Thanks for retrieving it. :)
< 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

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