It is currently 19 Jul 2025, 08:10
   
Text Size

Community Wad

Moderator: CCGHQ Admins

Re: Community Wad

Postby Splinterverse » 12 Nov 2016, 00:14

I've created a function for use in dealing with situations where the Reveal functions are not working.

I've never made a function before, so I don't know how to go about testing or whether I've even go it right. The code works in a card I created for testing it, but I don't know what to do next. Any advice would be much appreciated.

Code: Select all
-----------------------------
--File Info------------------
-----------------------------
--A simple set of functions for revealing cards to other players.

-------------------------
--Card Chest Registers---
-------------------------

--Make sure registers are entered into CW_Constants.lol

-------------------------
--Function List----------
-------------------------

--Parameters in braces {} are optional.

--CW_Reveal_DC(oPlayer, iRevealDC)
--    Reveals the cards in the iDC to all other players
--    Input: {Player, Int}
--    Output: None

-------------------------
--Functions Definitions--
-------------------------

--Reveals cards in a DC to each player, but omits the player provided
--Input: Player, Chest
--Output: Bool
CW_Reveal_DC = function(oPlayer, iRevealDC)
   if oPlayer ~= nil and iRevealDC ~= nil then
      local iReviewDC = EffectDC():Make_Chest(900)
      local iCount = iRevealDC:Count()
      for i=0, iCount-1 do
         iRevealDC:QueryUnselect_CardPtr(i)
      end
      for i=0,MTG():GetNumberOfPlayers()-1 do
         local player = MTG():GetNthPlayer(i)
         if player ~= nil and player ~= oPlayer then
            player:ChooseItemFromDC( "SPL_CARD_QUERY_CHOOSE_A_CARD_TO_EXIT_THIS_VIEW", iRevealDC, iReviewDC, QUERY_FLAG_MAY )
         end
      end
      return true
   else
      return true
   end
end
---------------------------------------------
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 » 12 Nov 2016, 04:22

Still not going to be fully active yet, but I can answer the question about CW_Tokens(). The chest parameter is passed as-is to the MTG():PutTokensOntoBattlefield function, which only accepts chests. You can't specify a particular pointer, because the function may end up having to produce multiple tokens, in which case it fills in the chest from 0 up automatically.

Code: Select all
CW_Tokens("SOLDIER_C_1_1_W", 1, EffectController(), EffectDC():Make_Chest(1))
local oTokens = EffectDC():Get_Chest(1)
if oTokens ~= nil then
    local iCount = oTokens:Count()
    for i=0,iCount-1 do
        local oToken = oTokens:Get_CardPtr(i)
        if oToken ~= nil then
            -- Do something with the token
        end
    end
end
_______________________________
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 » 12 Nov 2016, 11:20

Splinterverse wrote:Selfless Squire (which I'm not sure if it is possible -- if you think it is, I am interested in your ideas).
I think it's impossible because we don't have a trigger for "Whenever damage that would be dealt to you is prevented". We could create a delayed trigger from her own damage prevention, but it wouldn't work for other cards that prevent damage. I guess it would be possible by changing all cards that prevent damage, but it wouldn't be worth it, of course.

You should add a RESOLUTION_TIME_ACTION in the spell ability that creates a delayed trigger, then add the corresponding resource_id to the triggered ability. It doesn't make sense otherwise.

The idea behind the official proliferate code is that everything happens automatically: you add "bad" counters to the opponents' permanents and "good" counters to your permanents. Whether a counter is "good" or "bad" is decided by the COUNTER_REGISTRATION block (except for the basic counters such as +1/+1) and its proliferate attribute: "good" counters have a positive number, "bad" counters have a negative number.
In order to make proliferate work manually we would need a way to associate each counter type (which is a number) with the counter's name, so that we can ask the players which type of counter to choose. This would require every card that makes counters to send information to a manager, so it would fall in the "possible by changing a ton of cards" category.
The automatic proliferate is good enough most of the times, though, and you can use it here, too. I see some problems in your code: you are checking if counters ~= nil before even declaring the counters variable, so that check will always be false. Also, you couldn't know since it's not intuitive at all, but GetBestOrWorstCounterType's argument actually selects "good" or "bad" counters. I can't remember if 1 is good and 0 is bad or vice versa, but if you check the proliferate code you'll see that one is used for permanents belonging to enemy teams. You should do the same here.

The problem here is that you are assuming you can still access the older tokens from the same EffectDC chest. This is not possible, since EffectDC is created anew for each time the ability runs. You should add linked_ability_group="1" and save the tokens into a LinkedDC chest: use LinkedDC():Make_Chest(1) inside the token creation function and refer to it outside, it should be enough to make it work.

You are complicating your life for no reason: just code a new goblin token with that ability, and spawn your new token from the Spymaster. :)

Player_Clash is a custom function created by someone: you can't access it as if it was a player method (it would probably be possible to code our functions so that you can do that, but it would be overly complicated). Search for it in the CW functions and use it as it's meant to be used.

Your trigger condition doesn't do what the ability says. You are making it trigger when you are dealing combat damage to the chosen player rather than any player, then you are searching for the chosen player in LinkedDC register #1 while you saved it on register #0. Remove the SecondaryPlayer condition from the trigger and use register 0 in the resolution action. Also substitute SecondaryObject with TriggerObjectLKI: as you rightfully assumed in the trigger condition, the creature dealing the damage is TriggerObject, not SecondaryObject. LKI is needed because the ability should work by using the creature's last known information if it's not on the battlefield anymore.
Unrelated to the card's functionality: TARGET_WHIP_PLAY won't animate as you wish it would.

I can't understand what you're trying to do in the PLAYER_TAKES_DAMAGE trigger. You are setting the 4 registers to 0, then you set the one corresponding to the TriggerPlayer to 0 again. I think you should use an interrogation rather than that trigger, it would make things easier. There's a SetCombatOnly function for the interrogation (always refer to the Wiki when in doubt) so I guess it would be possible.

Splinterverse wrote:-- Yrdris Maelstrom Wielder http://pastebin.com/5qw8L2jL
You should grant cascade to your cards on the stack, not in your hand.
< 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 » 12 Nov 2016, 14:02

thefiremind. Thank you for the valuable inputs as always. Much appreciated.

thefiremind wrote:
Player_Clash is a custom function created by someone: you can't access it as if it was a player method (it would probably be possible to code our functions so that you can do that, but it would be overly complicated). Search for it in the CW functions and use it as it's meant to be used.
I have looked at the function and almost every implementation of it. That's why I was asking in the Impossible Cards thread and here in the hopes that whoever created it (or those more skilled than I) could shed more light. I am not able to use it the way it is intended because the intended method is to have clash in one block and result in another. Since this card requires repetition, that simply isn't possible (at least as far as I can tell) with the current function code. This was my attempt to try the suggested Crazed Firecat approach, but it just won't work with the current function.

I guess it's not an impossible card, but would require a rework of the function (or a new function) and that may/may not be worth it. So, I won't put it in the impossible list, but I will shelve it for now.
---------------------------------------------
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 » 12 Nov 2016, 17:19

I posted before but I'd missed one 'minor' thing, which was that it doesn't require that you have the clash in one block and the result in another. Rather, it requires that the clash block be a repeating action, but this card requires you to clash multiple times. However, there is a simple solution. The clash function itself needed changed so it a parity instead of a plain RepCount.
Code: Select all
local n = MTG():GetActionRepCount() % 6
instead of
local n = MTG():GetActionRepCount()
And the card needed changed so it caught when the clash function was done, but return true to start again anyway if you won.

The Function also needed to be very slightly altered because it wasn't properly checking that the clash cards were valid before trying to access their CMC, which caused an error, but that was a general fix, not specifically for this card.

The working code once the RepCount was changed to a Parity was this:
Code: Select all
      <RESOLUTION_TIME_ACTION repeating="1">
         local oController = EffectController()
         local oOpponent = EffectDC():Get_Targets(0) and EffectDC():Get_Targets(0):Get_PlayerPtr(0)
         if oController ~= nil and oOpponent ~= nil then
            if MTG():GetActionRepCount() % 6 == 0 then
               oController:LoseLife(2)
               oController:DrawCards(2)
            end
            local bRepeat = Player_Clash(oOpponent)
            if MTG():GetActionRepCount() % 6 == 5 then
               bRepeat = TFM_MyPlayerDC(EffectController()):Get_Int(PLAYER_CLASH_RESULT) == 1
            end
            return bRepeat
         end
         return false
      </RESOLUTION_TIME_ACTION>
I already tested this and it worked, including if there was no card to clash with (because you drew them all), and it worked in all cases. I also took the chance (sorry Armodeus) to translate the function to use English variable names.

Since it was tested and working, I went ahead and added it to the CW.
_______________________________
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 » 12 Nov 2016, 19:01

A question about Proliferate . . . it looks like the current implementation automatically proliferates most counters on the battlefield, but the rules say that the players get to choose which ones get counters and which ones don't. Is the current implementation due to the difficulty of checking for each counter type? (Just trying to understand why there isn't a choice involved.)

I've successfully coded Parting Thoughts (which reads "Destroy target creature. You draw X cards and you lose X life, where X is the number of counters on that creature.") However, I had to hardcode each counter type and it checks the target for each type. I'm wondering if Proliferate could do something similar to allow for choice.
---------------------------------------------
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 tmxk2012917 » 12 Nov 2016, 20:27

I used the first ability of Chandra, Torch of Defiance to exile the top card of my library and I did not cast that card. However, my opponents were not dealt 2 damages.
tmxk2012917
 
Posts: 164
Joined: 15 Mar 2015, 09:52
Has thanked: 20 times
Been thanked: 12 times

Re: Community Wad

Postby Xander9009 » 12 Nov 2016, 20:48

Splinterverse wrote:A question about Proliferate . . . it looks like the current implementation automatically proliferates most counters on the battlefield, but the rules say that the players get to choose which ones get counters and which ones don't. Is the current implementation due to the difficulty of checking for each counter type? (Just trying to understand why there isn't a choice involved.)

I've successfully coded Parting Thoughts (which reads "Destroy target creature. You draw X cards and you lose X life, where X is the number of counters on that creature.") However, I had to hardcode each counter type and it checks the target for each type. I'm wondering if Proliferate could do something similar to allow for choice.
Hard-coding is a really bad idea for anything that can be done automatically, because if it's not updated as new counters are introduced, then the card stops working properly. Registering the different counter types is difficult, but doable. It's made even easier by the fact that I recently set up a few functions specifically for that so Fairgrounds Trumpeter was possible.

Like Fairgrounds Trumpeter, your card needs to create the _MANAGER_TRACKING. It stores all counters placed on permanents, but most importantly, you can use it to figure out which counter types exist in the current duel. It's set up in a slightly complicated way, because it has to track several things related to counters, including whether or not it was done "this turn".

Here's a diagram showing how it's organized: https://drive.google.com/file/d/0B-cZn2 ... sp=sharing (if you use draw.io) or https://drive.google.com/file/d/0B-cZn2 ... sp=sharing (png image if you don't use draw.io).

If you notice off the right, it has a sub-chest with the counter types.
Code: Select all
local oPlayerDC = CW_DC_PlayerDC(CW_TRACKING_COUNTER_CHEST)
if oPlayerDC ~= nil then
   local oCounterTypeChest = CW_DC_GetChest(oPlayerDC, CW_TRACKING_COUNTER_TYPE_CHEST)
   if oCounterTypeChest ~= nil then
      local iNumCounterTypes = oCounterTypeChest:Get_Int(0)
      for i=1,iNumCounterTypes do
         local iCounterType = oCounterTypeChest:Get_Int(i)
         --Do something with iCounterType
      end
   end
end
Regarding proliferate, it was simplified by the developers to always proliferate counters based on the counter's proliferate value. When you register a counter type, it always has a proliferate value. It's usually 11, 0, or -11. If you control the counter and it has a positive value, or if you don't control it and it has a negative value, then it's proliferated. I don't know what happens if it's 0, and I don't know if it can be numbers other than 11 (TFM might know; I'm pretty sure he looked into proliferate at one point, so he can correct me if I'm wrong).

We could theoretically write a more thorough proliferate function, but it would be pretty unnecessary in my opinion.
_______________________________
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 » 12 Nov 2016, 22:13

Finished coding for today.

COMMANDER 2016
Coded, tested, and uploaded:
Benefactor's Draught
Deepglow Skate
Faerie Artisans
Manifold Insights
Orzhov Advokist
Parting Thoughts
Saskia the Unyielding
Silas Renn, Seeker Adept
Tyman the Weaver
Yidris, Maelstrom Wielder

Commander 2016 progress update
-- All non-reprint cards have been coded except the two impossible ones (Cruel Entertainment and Selfless Squire).
-- Two have not been uploaded (Goblin Spymaster and Reyhan, Last of Abzan) that are included in the Open Items section below; other than that, all have been coded/tested/uploaded as of this update.

MISSING CARDS
Coded, tested, and uploaded:
Angel's Trumpet
Dwarven Song
Gravestorm
Great Oak Guardian
Greatbow Doyen
Greater Harvester
Greater Werewolf
Grief Tyrant
Grollub
Gruesome Discovery
Guard Dogs
Guiding Spirit
Head Games
Heart of Bogardan
Heartwood Dryad
Heaven's Gate
Hollow Specter
Painbringer
Sylvan Paradise

Bugs fixed:
Cabal Interrogator -- was automatically choosing player and was activate-able outside of sorcery time; tested
Charging Cinderhorn -- improved the check for creatures that attacked; tested
Graveyard Shovel -- was not targeting a player to exile card from graveyard; tested

Art uploaded :
Tymna the Weaver -- HQ replacement
Yidris Maelstrom -- HQ replacement

Open Items:

-- CW_CARD_QUERY_SPLINTERVERSE has been updated and uploaded.

-- Goblin Spymaster needs a token created with the ability "Creatures you control attack each combat if able." If someone could help with this or tell me how to do it, it would be much appreciated.

-- Reyhan, Last of the Abzan http://pastebin.com/g6r5qRNM It's triggered ability on creature death is not triggering. It's probably something simple that I'm doing that I can't see after staring at it for hours.

-- I'd like to implement the function I posted at viewtopic.php?f=109&t=15783&p=205559#p205524 but I need advice on how to test/implement.

Next:

Back tomorrow to continue working on Missing Cards.
---------------------------------------------
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 » 12 Nov 2016, 23:00

Splinterverse wrote:I've created a function for use in dealing with situations where the Reveal functions are not working.

I've never made a function before, so I don't know how to go about testing or whether I've even go it right. The code works in a card I created for testing it, but I don't know what to do next. Any advice would be much appreciated.

Code: Select all
-----------------------------
--File Info------------------
-----------------------------
--A simple set of functions for revealing cards to other players.

-------------------------
--Card Chest Registers---
-------------------------

--Make sure registers are entered into CW_Constants.lol

-------------------------
--Function List----------
-------------------------

--Parameters in braces {} are optional.

--CW_Reveal_DC(oPlayer, iRevealDC)
--    Reveals the cards in the iDC to all other players
--    Input: {Player, Int}
--    Output: None

-------------------------
--Functions Definitions--
-------------------------

--Reveals cards in a DC to each player, but omits the player provided
--Input: Player, Chest
--Output: Bool
CW_Reveal_DC = function(oPlayer, iRevealDC)
   if oPlayer ~= nil and iRevealDC ~= nil then
      local iReviewDC = EffectDC():Make_Chest(900)
      local iCount = iRevealDC:Count()
      for i=0, iCount-1 do
         iRevealDC:QueryUnselect_CardPtr(i)
      end
      for i=0,MTG():GetNumberOfPlayers()-1 do
         local player = MTG():GetNthPlayer(i)
         if player ~= nil and player ~= oPlayer then
            player:ChooseItemFromDC( "SPL_CARD_QUERY_CHOOSE_A_CARD_TO_EXIT_THIS_VIEW", iRevealDC, iReviewDC, QUERY_FLAG_MAY )
         end
      end
      return true
   else
      return true
   end
end
Sorry, but I didn't notice this before. It's got a couple of minor issues before being implemented as a standard function, but to use it as a function, just save it in a lol file and upload it to the auto-upload folder.

The minor issues are these:
  • Since it only ever returns true, you don't actually need to return anything. Returning true or false is only really helpful for passing information to the card. Since nothing's actually being passed back, you can just remove those lines with no problem.
  • Having a function file with only a single function is a bit unnecessary. Not exactly bad, but just putting it into CW_GENERAL should be just fine.
  • The parameter 'iRevealDC' is a data chest, but 'i' is for integers. It should be 'oRevealDC'.
  • Putting parameters in {braces} is how I denote the parameter is optional. In your function, if oPlayer isn't provided, the function will not perform correctly, so it's not optional. However, I'd honestly just leave it without that parameter at all. I'll leave it in, since I'm not the one making the function.
  • When you make an optional parameter, show what the default is. Then, in the function, make sure to actually set the default value if it's nil.
  • If you're going to use a specific register within any chest, you should always use either a constant (which should be over 1000) or make it a parameter so it can be changed if needed. So, the 900 should be changed.
  • As a general rule (for many reasons), always put optional parameters after required parameters. So, oRevealDC should be before oPlayer.

Code: Select all
-------------------------
--Function List----------
-------------------------

--Parameters in braces {} are optional.

--CW_General_RevealDC(oRevealDC{, oPlayer = EffectController(), iReviewDCRegister = 900})
--    Reveals cards in a DC to each player, but omits the player provided.
--    Input: Chest{, Player, Int}
--    Output: None

-------------------------
--Functions Definitions--
-------------------------

--Reveals cards in a DC to each player, but omits the player provided.
--Input: Chest{, Player, Int}
--Output: None
CW_General_RevealDC = function(oRevealDC, oPlayer, iReviewDCRegister)
   if oPlayer == nil then
      oPlayer = EffectController()
   end
   if iReviewDCRegister == nil then
      iReviewDCRegister = 900
   end
   if oPlayer ~= nil and oRevealDC ~= nil and type(iReviewDCRegister) == "number" then
      local oReviewDC = EffectDC():Make_Chest(iReviewDCRegister)
      local iCount = oRevealDC:Count()
      for i=0, iCount-1 do
         oRevealDC:QueryUnselect_CardPtr(i)
      end
      for i=0,MTG():GetNumberOfPlayers()-1 do
         local oNthPlayer = MTG():GetNthPlayer(i)
         if oNthPlayer ~= nil and oPlayer ~= oPlayer then
            oNthPlayer:ChooseItemFromDC("SPL_CARD_QUERY_CHOOSE_A_CARD_TO_EXIT_THIS_VIEW", oRevealDC, oReviewDC, QUERY_FLAG_MAY)
         end
      end
   else
      CW_General_Error("CW_General_RevealDC: Invalid parameters.")
   end
end
I've made those changes and added the above to CW_GENERAL.LOL.

Reyhan, Last of the Abzan: Line 65 should be using TriggerObjectLKI to be safe, but I don't think that would actually prevent it from working. However, one thing I see that is incorrect (it'll technically work in this case), the wording is an intervening if.

Try this.
Code: Select all
      <TRIGGER value="ZONECHANGE_BEGIN" simple_qualifier="objectyoucontrol" to_zone="ZONE_GRAVEYARD" from_zone="ZONE_BATTLEFIELD">
         return TriggerObject():GetCardType():Test( CARD_TYPE_CREATURE )
      </TRIGGER>
      <INTERVENING_IF>
         return TriggerObjectLKI() ~= nil and TriggerObjectLKI():CountCounters(MTG():PlusOnePlusOneCounters()) &gt; 0
      </INTERVENING_IF>
      <TARGET tag="SPL_CARD_QUERY_CHOOSE_CREATURE" definition="0" compartment="0" count="1" />
        <TARGET_DEFINITION id="0">
            local oFilter = ClearFilter()
            oFilter:Add(FE_TYPE, OP_IS, CARD_TYPE_CREATURE)
        </TARGET_DEFINITION>
        <RESOLUTION_TIME_ACTION>
            local oTarget = EffectDC():Get_Targets(0) and EffectDC():Get_Targets(0):Get_CardPtr(0)
            local iCounters = TriggerObjectLKI():CountCounters(MTG():PlusOnePlusOneCounters())
            if oTarget ~= nil and iCounters &gt; 0 then
                oTarget:AddCounters(MTG():PlusOnePlusOneCounters(), iCounters)
            end
        </RESOLUTION_TIME_ACTION>
No guarantees, though.

Goblin Spymaster's token will be added later tonight.

EDIT: 1) The token is done. TOKEN_GOBLIN_C_1_1_R_S_CW_1 and TOKEN_GOBLIN_C_1_1_R_S_CW_2. 2) I actually meant for Reyhan's code ot use TriggerObjectLKI(). I goofed... I'm not changing it now, though. Just keep it in mind if it doesn't work.
Last edited by Xander9009 on 13 Nov 2016, 10:02, edited 2 times in total.
_______________________________
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 » 13 Nov 2016, 09:59

Splinterverse wrote:I have looked at the function and almost every implementation of it. That's why I was asking in the Impossible Cards thread and here in the hopes that whoever created it (or those more skilled than I) could shed more light. I am not able to use it the way it is intended because the intended method is to have clash in one block and result in another.
What I actually meant was that you were calling
Code: Select all
oController:Player_Clash(...)
but that makes no sense because Player_Clash isn't a method belonging to the player object. You won't see any custom function using the ":" because we aren't adding our functions as methods for the objects we manipulate.

For Reyhan, try to use Xander9009's code. If it doesn't work either, then the problem is TriggerObjectLKI. I had a problem with it before (see here), so it seems that sometimes it doesn't get set. If it really is the problem, then you can do your own LKI management by inserting the following code inside the TRIGGER block:
Code: Select all
EffectDC():LKIShield_CardPtr(COMPARTMENT_ID_PARAM_TRIGGER_OBJECT)
After this, you can use TriggerObject() in place of TriggerObjectLKI().

About the "intervening if": you should use INTERVENING_IF anytime you find an ability text with a condition between two commas ("When something happens, if this is true, ...") because then the condition needs to be checked once for the trigger to happen, and once before resolution. Sometimes the ability works identically, in fact you can see lots of cards where the INTERVENING_IF has ignore_resolution_check="1": that means there's no need to check the ability before resolution because that condition has no way to be changed after the trigger. Reyhan falls into this category because the number of counters on the creature before it died can't change after it died, but it's good practice to use INTERVENING_IF anyway (you can add ignore_resolution_check="1", which should slightly improve performance since you skip a useless check).
< 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 » 13 Nov 2016, 10:30

Thanks Xander and thefiremind for the input. I am back online and will be trying your suggestions as I code today. Thanks!
---------------------------------------------
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 » 13 Nov 2016, 13:29

Quick question about choosing a player. I know that with cards, if it says "Choose a creature" (or other permanent) that if we use the target block we need to add not_targeted="1". But what about with players?

It seems like every example I find of "Choose an opponent" does not use it and does use the target block. Is it not possible to use the ChooseItem/Items method because players can't be objects?
---------------------------------------------
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 » 13 Nov 2016, 13:35

You should be able to use it, and if you can't, then just make it a choice instead of a target block.

There are 25 cards that choose a player or opponent, and of those, 14 use a target block and need to be corrected. However, there are 3 that use a target block with not_targeted successfully (I know because I made them). They're the offerings: Infernal Offering, Benevolent Offering, Intellectual Offering. When you use it, it'd be really helpful if you could verify that not-targeted allows players with Ivory Mask to be 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 » 13 Nov 2016, 13:52

Xander9009 wrote:When you use it, it'd be really helpful if you could verify that not-targeted allows players with Ivory Mask to be chosen.
Will do.
---------------------------------------------
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

PreviousNext

Return to 2014

Who is online

Users browsing this forum: No registered users and 6 guests

Main Menu

User Menu

Our Partners


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 7303 on 15 Jul 2025, 20:46

Users browsing this forum: No registered users and 6 guests

Login Form