High Quality Resources for Collectible Card Games and Home of the CCGHQ Team
https://www.slightlymagic.net/forum/
https://www.slightlymagic.net/forum/viewtopic.php?f=109&t=15783
For Sanctimony, are you testing for manually tapped mountains or for mountains tapped automatically by playing a spell? The auto-tapping of lands does not fire the trigger properly. It's an engine bug that we can't fix. Riiak's manual mana functions include a bit which manually fires the trigger, but that only works for manually tapped lands.Splinterverse wrote:Problem cards:
Sanctimony http://pastebin.com/zsZX9bUE Does not work. Could be that is not for controller's mana but rather an opponent's.
Scarscale Ritual http://pastebin.com/jV6aGaVx Not prompting to put a -1/-1 counter on a creature. Everything else works.
Scythe of the Wretched http://pastebin.com/xpwxu1Tg Not attaching to the creature that controller gains control of. Everything else works.
Soul Exchange http://pastebin.com/4NPrup4f Does not put counters on returned creature if exiled one is a Thrull. Everything else works.
<RESOLUTION_TIME_ACTION>
local oTargets = EffectDC():Get_Targets(1)
if oTargets ~= nil then
local oTarget = oTargets:Get_CardPtr(0)
if oTarget ~= nil then
local iCounterType = MTG():MinusOneMinusOneCounters()
if iCounterType ~= nil and iCounterType > 0 then
oTarget:AddCounters(iCounterType, 1)
Debug("Added counters")
else
Debug("iCounterType", iCounterType)
end
else
Debug("oTarget", oTarget)
end
else
Debug("oTargets", oTargets)
end
</RESOLUTION_TIME_ACTION><COST type="Generic">
<PREREQUISITE>
local oFilter = ClearFilter()
oFilter:Add(FE_TYPE, OP_IS, CARD_TYPE_CREATURE)
oFilter:Add(FE_CONTROLLER, OP_IS, EffectController())
return oFilter:CountStopAt(1) == 1
</PREREQUISITE>
<RESOLUTION_TIME_ACTION>
local oFilter = ClearFilter()
oFilter:Add(FE_TYPE, OP_IS, CARD_TYPE_CREATURE)
oFilter:Add(FE_CONTROLLER, OP_IS, EffectController())
EffectController():ChooseItem("CARD_QUERY_CHOOSE_CARD_TO_EXILE", EffectDC():Make_Targets(0))
</RESOLUTION_TIME_ACTION>
<RESOLUTION_TIME_ACTION>
local oCreature = EffectDC():Get_Targets(0) and EffectDC():Get_Targets(0):Get_CardPtr(0)
if oCreature ~= nil then
if oCreature:GetSubType():Test(CREATURE_TYPE_THRULL) then
LinkedDC():Set_Int(33, 1)
end
oCreature:Exile()
end
</RESOLUTION_TIME_ACTION>
</COST>I'm sure it was just a copy/paste error. Even though it was a long time ago, I do remember that Carrion took me several times to get working.Xander9009 wrote:migookman: Is there a particular reason Carrion only allows sacrificing of non-tokens? I figure it's probably just a copy-paste error, but since it also make tokens, I'm not sure if it was to prevent some AI-infinite cycle or something.
I think that would be helpful. It seems like the current expansion shown is the most recent. I think the expansion tag should probably contain the first appearance expansion and then others could be added elsewhere. Probably too late to make that change though.Xander9009 wrote:Hey guys, do you think the cards should be given tags for which main sets they've appeared in? So you could search for something like "Printing sets (contains) -> Nyx" to find all of the Journey in Nyx cards using the deck builder's advanced search?
Not at all. With the CW Contents spreadsheet came a complete listing of cards from every set, which could easily be used to iterate through every card in the CW and set the expansion tag to the earliest. The process of adding the reprints to another tag would be automatic as well. It'd probably go up near the top right after the normal expansion line, and it would be formatted just like the <AUTHOR> and <EDITOR> tags with a CDATA section.Splinterverse wrote:I think that would be helpful. It seems like the current expansion shown is the most recent. I think the expansion tag should probably contain the first appearance expansion and then others could be added elsewhere. Probably too late to make that change though.Xander9009 wrote:Hey guys, do you think the cards should be given tags for which main sets they've appeared in? So you could search for something like "Printing sets (contains) -> Nyx" to find all of the Journey in Nyx cards using the deck builder's advanced search?
Scarscale Ritual is displaying "oTargets" as a result of the debug. It's not adding the counter; I'm guessing it's not getting the value it needs. Maybe I should move it all out of the cost and do it in the main ability? http://pastebin.com/mPw4wiNHXander9009 wrote:Scarscale Ritual: 4 things.Splinterverse wrote:Problem cards:
Scythe of the Wretched http://pastebin.com/xpwxu1Tg Not attaching to the creature that controller gains control of. Everything else works.
1: In the prerequisite, there's no reason to check if the creature is tapped.
2: It's a lot cleaner to just type filter:CountStopAt(1) == 1. This is a minor speed improvement, since the game doesn't need to count all of the possible targets, just if there is one.
3: When adding counters in a cost, make sure you call PLW_ShutDownDoublingSeason(). It needs to be done in the same RTA immediately before adding the counters. Without it, Doubling Season and similar cards (though there aren't any others for -1/-1 counters that I know of) will add extra counters. They shouldn't though, because they specify "if an effect". These aren't effects though; they're costs.
4: When using a target tag to select something that isn't actually be targeted (such as when the card specifies "choose a ..."), make sure to add 'not_targeted="1"' to the target tag. This lets the game know not consider protection/shroud and not to fire the BECAME_TARGET_OF_SPELL_OR_ABILITY trigger.
However, after all of that, I'm not actually sure why it isn't working. Try this code and see what pops up in-game.Note that the last two debug messages will only show the name of the variable, not the contents (which, since those will only appear if they're nil, would just be "oTarget (nil)". I've actually updated the CW_GENERAL.LOL file to include a third parameter to force the second's type to be displayed if if type doesn't match a set of expected types. For instance, if the second parameter is 'nil' or 'userdata' and the third parameter is '1' or 'true', then it would display "oTargets: (nil)" or "oTargets (userdata)". ('userdata', for the record, is what data chests, cards, and players are.) So, this would be a great place to put 'Debug("oTargets", oTargets, true)', but that'll throw an exception until you have the updated function file. Suffice it to say for now that if you see the name of any variable, there's something wrong with it. In the case of iCounterType, if it's <= 0, it'll show you its value.
- Code: Select all
<RESOLUTION_TIME_ACTION>
local oTargets = EffectDC():Get_Targets(1)
if oTargets ~= nil then
local oTarget = oTargets:Get_CardPtr(0)
if oTarget ~= nil then
local iCounterType = MTG():MinusOneMinusOneCounters()
if iCounterType ~= nil and iCounterType > 0 then
oTarget:AddCounters(iCounterType, 1)
Debug("Added counters")
else
Debug("iCounterType", iCounterType)
end
else
Debug("oTarget", oTarget)
end
else
Debug("oTargets", oTargets)
end
</RESOLUTION_TIME_ACTION>
Scythe of the Wretched: TriggerObject() is nil by that point. In the trigger, you protect the pointer so it can be referenced by the rest of the ability. But when you then call PutOntoBattlefield, it changes zones again, which means the pointer needs protected again just like it was in the trigger. Protect the pointer, then resurrect it, then attach the equipment.
<COST type="Generic">
<PREREQUISITE>
local oFilter = ClearFilter()
oFilter:Add( FE_TYPE, OP_IS, CARD_TYPE_CREATURE )
oFilter:Add( FE_CONTROLLER, OP_IS, EffectController() )
return oFilter:CountStopAt(1) == 1
</PREREQUISITE>
<TARGET tag="CW_CARD_QUERY_CHOOSE_CREATURE_TO_GET_MINUSONE_MINUSONE_COUNTER" definition="1" compartment="1" count="1" not_targeted="1" />
<TARGET_DEFINITION id="1">
local filter = ClearFilter()
filter:Add( FE_TYPE, OP_IS, CARD_TYPE_CREATURE )
filter:Add( FE_CONTROLLER, OP_IS, EffectController() )
</TARGET_DEFINITION>
<!-- <RESOLUTION_TIME_ACTION>
local target_creature = EffectDC():Get_Targets(1) and EffectDC():Get_Targets(1):Get_CardPtr(0)
PLW_ShutDownDoublingSeason()
target_creature:AddCounters(MTG():MinusOneMinusOneCounters(), 1)
</RESOLUTION_TIME_ACTION> -->
<RESOLUTION_TIME_ACTION>
local oController = EffectController()
if oController ~= nil then
local oFilter = ClearFilter()
oFilter:Add( FE_TYPE, OP_IS, CARD_TYPE_CREATURE )
oFilter:Add( FE_CONTROLLER, OP_IS, EffectController() )
oController:ChooseItem("CW_CARD_QUERY_CHOOSE_CREATURE_TO_GET_MINUSONE_MINUSONE_COUNTER", EffectDC():Make_Targets(1))
end
</RESOLUTION_TIME_ACTION>
<RESOLUTION_TIME_ACTION>
local oTargets = EffectDC():Get_Targets(1)
if oTargets ~= nil then
local oTarget = oTargets:Get_CardPtr(0)
if oTarget ~= nil then
local iCounterType = MTG():MinusOneMinusOneCounters()
if iCounterType ~= nil and iCounterType > 0 then
oTarget:AddCounters(iCounterType, 1)
Debug("Added counters")
else
Debug("iCounterType", iCounterType)
end
else
Debug("oTarget", oTarget)
end
else
Debug("oTargets", oTargets)
end
</RESOLUTION_TIME_ACTION>
</COST>Both of the above worked. They will be uploaded later today.Xander9009 wrote:If it's displaying oTargets, then oTargets is nil. EffectDC():Get_Targets(1) didn't work. I'm not 100% certain why it's not working, but if the targeting isn't getting the creature properly, then it'll either just need the TARGET and TARGET_DEFINITION tags moved out of the COST block, or else it will need to use a ChooseItem function to get the creature to use. If it's the latter, here you go.Of course, if that works, it can be shortened by removing the debug sections and shortening the target retrieval to one line like normal.
- Code: Select all
<COST type="Generic">
<PREREQUISITE>
local oFilter = ClearFilter()
oFilter:Add( FE_TYPE, OP_IS, CARD_TYPE_CREATURE )
oFilter:Add( FE_CONTROLLER, OP_IS, EffectController() )
return oFilter:CountStopAt(1) == 1
</PREREQUISITE>
<TARGET tag="CW_CARD_QUERY_CHOOSE_CREATURE_TO_GET_MINUSONE_MINUSONE_COUNTER" definition="1" compartment="1" count="1" not_targeted="1" />
<TARGET_DEFINITION id="1">
local filter = ClearFilter()
filter:Add( FE_TYPE, OP_IS, CARD_TYPE_CREATURE )
filter:Add( FE_CONTROLLER, OP_IS, EffectController() )
</TARGET_DEFINITION>
<!-- <RESOLUTION_TIME_ACTION>
local target_creature = EffectDC():Get_Targets(1) and EffectDC():Get_Targets(1):Get_CardPtr(0)
PLW_ShutDownDoublingSeason()
target_creature:AddCounters(MTG():MinusOneMinusOneCounters(), 1)
</RESOLUTION_TIME_ACTION> -->
<RESOLUTION_TIME_ACTION>
local oController = EffectController()
if oController ~= nil then
local oFilter = ClearFilter()
oFilter:Add( FE_TYPE, OP_IS, CARD_TYPE_CREATURE )
oFilter:Add( FE_CONTROLLER, OP_IS, EffectController() )
oController:ChooseItem("CW_CARD_QUERY_CHOOSE_CREATURE_TO_GET_MINUSONE_MINUSONE_COUNTER", EffectDC():Make_Targets(1))
end
</RESOLUTION_TIME_ACTION>
<RESOLUTION_TIME_ACTION>
local oTargets = EffectDC():Get_Targets(1)
if oTargets ~= nil then
local oTarget = oTargets:Get_CardPtr(0)
if oTarget ~= nil then
local iCounterType = MTG():MinusOneMinusOneCounters()
if iCounterType ~= nil and iCounterType > 0 then
oTarget:AddCounters(iCounterType, 1)
Debug("Added counters")
else
Debug("iCounterType", iCounterType)
end
else
Debug("oTarget", oTarget)
end
else
Debug("oTargets", oTargets)
end
</RESOLUTION_TIME_ACTION>
</COST>
For the equipment, best guess? Move the attachment to a new RTA. Since the card is changing zones, the attach function might not work until that RTA has finished. Often times, zone-changes don't fully take effect until the next RTA.
Hmmm... nothing in my trash from that list. Maybe there was a connection issue during upload and I thought they made it?Xander9009 wrote:Open up drive.google.com. Search it for one of the cards (I used selective memory). Specifically, you're checking if there are any versions in the trash. I don't have any versions of that in the trash, and the current one doesn't have any other versions. That means that, according to google drive, I may not have had access to it ever. However, there's a good chance that if it was deleted/moved, it wouldn't have shown up in my trash on Google Drive, so I need you to check your end.