NeoAnderson wrote:1. About the token manager, i know that it should be created just once, but with your trigger i csn see the ability granted once for each instance of the card.
2. About the list i have removed cards who counts spells that are targetting...
3. About cards who ask to name a card or a type, i don't think we can access to that information without modify these cards to support this function.
4. Would be better to check if the abilities are enabled inside this function.
5. Facedown is a RSN_Characteristics so is easy to check. Anyway it is not needed to add this check because is already included in my function for facedown cast. You will not have any delve with facedown.
6. About Radkos i made that count inside my morph functions you can check with that.
7. To check all the cards onto battlefield you can make another function who cycle the Object with cards onto battlefield calling this function.
- Code: Select all
UpdateColourlessCostValue = function(oTarget)
local filter = ClearFilter()
local subfilter = filter:AddSubFilter_Or()
subfi[code][/code]lter:Add( FE_TYPE, OP_IS, CARD_TYPE_ARTIFACT )
subfilter:Add( FE_TYPE, OP_IS, CARD_TYPE_CREATURE )
subfilter:Add( FE_TYPE, OP_IS, CARD_TYPE_ENCHANTMENT )
subfilter:Add( FE_TYPE, OP_IS, CARD_TYPE_LAND )
subfilter:Add( FE_TYPE, OP_IS, CARD_TYPE_PLANESWALKER )
local Count = filter:Count()
local iMod = 0
for i=0,(Count-1) do
iMod = iMod + GetColorlessCostModification(oTarget, filter:GetNthEvaluatedObject(i))
end
return iMod
end
7B. If you follow my suggestion from point 4 we could use something like :
- Code: Select all
UpdateColourlessCostValue = function(oTarget)
local filter = ClearFilter()
local subfilter = filter:AddSubFilter_Or()
subfilter:Add( FE_TYPE, OP_IS, CARD_TYPE_ARTIFACT )
subfilter:Add( FE_TYPE, OP_IS, CARD_TYPE_CREATURE )
subfilter:Add( FE_TYPE, OP_IS, CARD_TYPE_ENCHANTMENT )
subfilter:Add( FE_TYPE, OP_IS, CARD_TYPE_LAND )
subfilter:Add( FE_TYPE, OP_IS, CARD_TYPE_PLANESWALKER )
local Count = filter:Count()
local iMod = 0
for i=0,(Count-1) do
local Card = filter:GetNthEvaluatedObject(i)
if Card ~= nil and RSN_Characteristics_Get( SomeCard, ABILITIES_ACTIVE ) then
iMod = iMod + GetColorlessCostModification(oTarget, Card)
end
end
return iMod
end
In this way we compare only with cards with enabled abilities.
8. I think you have to change some uppercase to lower case because Lua is case sensitive so Else or End are not the same of else and end..
9. About
Locket of Yesterdays i think it should be :
- Code: Select all
elseif ( sName == "LOCKET_OF_YESTERDAYS" ) then
local filter = ClearFilter()
filter:Add(FE_CARD_NAME, OP_IS, oTarget:GetCardName())
filter:Add(FE_CARD_INSTANCE, OP_NOT, oTarget)
filter:SetZone( ZONE_GRAVEYARD, EffectController() )
10.
Urza's Incubator is wrong it check for chosen type...
11.
Animar, Soul of Elements and
Herald of War should return a negative value..
Anyway i will check later your code..
1. No matter how many cards you have with the token creating code, only one is made per player, and each token only grants to permanents you control, so it'll never double up. I may still be misunderstanding you, though.
3.That's what I was thinking. I was just hoping someone else could prove me wrong. I can accept it not working with 3 cards, though.
4. I was already planning to have that check done inside the function (I might not have been clear on that point), I just hadn't gotten there yet. It's in it now. I just meant that the code I posted is how one would normally check, perhaps in another ability that needs to know.
5. Alright. Do you happen to remember off-hand what you called it or should I just look in your lol file?
6. I copied the vanilla game's
Rakdos, Lord of Riots so it SHOULD work. I'm just paranoid. I'll get around to testing soon anyway.
7. I could, but I rather like having just one function which can easily, logically, and simply handle both situations because it's VERY rare that we'll be calling it for a specific card's interaction with another specific card. Call with one parameter: checks total cost change; call with two parameters: checks particular cost change. I'm pretty sure I have it right now (I'm updating the code in my post as I find things that need changed).
7B. I am following that suggestion (I was even already going to haha). I put it immediately before checking the name, though because of the fact that I still currently have them as a single function.
8. I didn't know Lua was case sensitive, but I actually already DID change them all because I was annoyed that Notepad++ wasn't highlighting them correctly lol.
9. See, that's what I was thinking, but as I said (I think I did... might not have), how I have it is how TFM coded the card. I'm going to test that one specifically and find out which it is. Since we're both in agreement, I went ahead and changed it. We'll see once I can test it if it's right or wrong.
10. My bad. It's not correctly not doing anything haha (thanks to point 3).
11. I caught those two before you posted.
Sorry, I just didn't update the code on here quickly enough.
For checking my code later: Okay, cool. 95% of it is repetition and doesn't really need checked. Just the first bit and the overall structure, as well as possibly the non-normal ones.
It's in a working state now as far as I can tell. So, Tajahn, if you want to post your Delve code, I'll incorporate this when I can and test it, otherwise, the code in my post where I explain how to do it will have everything for you to test it.
EDIT:
I've attached a zip with everything that SHOULD be needed to test this. Make sure you move ABILITIES_ACTIVE_MANAGER.xml and GetColorlessCostModification.LOL where they should go (CARDS and FUNCTIONS) and add the token creation code in the last file to your delve cards. Once you do,
- Code: Select all
local CostChange = GetColorlessCostModification(SomeCard)
should work. It probably won't, because I'm sure I messed something up, but that's why it needs tested! lol