NeoAnderson wrote:Xander my friend,
1. About the colour production, the card is allowed as by rules to produce one of its colour or colouless mana, anyway inside the convoke card code there is a check if the color produced is not inside the cost it will be used to reduce colourless cost.
The reminder text is misleading.
Here, assuming they're correct, in the first rule listed, it says the creature can only be tapped to reduce the colored cost if they share a color. So a Ragin Goblin cannot be tapped for

even though the reminder text suggests it might be. It may only be tapped for

. So, a
Raging Goblin being tapped for the convoke ability on
Conclave Equenaut should only have the option for

. It doesn't matter so much because of the fact that your code accounts for this, but it would make using the ability much smoother (and still rule compliant, despite what the reminder text suggests).
NeoAnderson wrote:2. About the function for colour cost change i already made it and i am also using, i started from our colourless function!
Anyway i found only few cards that can change colour cost.
here you can see that functions :
- COLOUR COST CHANGE FUNCTIONS | Open
- Code: Select all
UpdateWhiteCostValue = 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:EvaluateObjects()
local iMod = 0
for i=0,(Count-1) do
local Card = filter:GetNthEvaluatedObject(i)
if Card ~= nil and RSN_Characteristics_GetInt( Card, NEO_ABILITIES_ACTIVE ) == 1 then
iMod = iMod + GetWhiteCostModification(oTarget, Card)
end
end
return iMod
end
GetWhiteCostModification = function(oTarget, oModifier)
-- Returns an integer number for how much oModifier modifies oTarget's colorless mana most
if oModifier ~= nil then
local sName = oModifier:GetCardName()
local CostChange = 0
if oModifier:GetController() == oTarget:GetController() then
if ( sName == "ALABASTER_LEECH" and oTarget:GetColour():Test(COLOUR_WHITE) ) then
return 1
end
end
end
return 0
end
UpdateBlueCostValue = 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:EvaluateObjects()
local iMod = 0
for i=0,(Count-1) do
local Card = filter:GetNthEvaluatedObject(i)
if Card ~= nil and RSN_Characteristics_GetInt( Card, NEO_ABILITIES_ACTIVE ) == 1 then
iMod = iMod + GetBlueCostModification(oTarget, Card)
end
end
return iMod
end
GetBlueCostModification = function(oTarget, oModifier)
-- Returns an integer number for how much oModifier modifies oTarget's colorless mana most
if oModifier ~= nil then
local sName = oModifier:GetCardName()
local CostChange = 0
if oModifier:GetController() == oTarget:GetController() then
if ( sName == "SAPPHIRE_LEECH" and oTarget:GetColour():Test(COLOUR_BLUE) ) then
return 1
end
end
end
return 0
end
UpdateBlackCostValue = 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:EvaluateObjects()
local iMod = 0
for i=0,(Count-1) do
local Card = filter:GetNthEvaluatedObject(i)
if Card ~= nil and RSN_Characteristics_GetInt( Card, NEO_ABILITIES_ACTIVE ) == 1 then
iMod = iMod + GetBlackCostModification(oTarget, Card)
end
end
return iMod
end
GetBlackCostModification = function(oTarget, oModifier)
-- Returns an integer number for how much oModifier modifies oTarget's colorless mana most
if oModifier ~= nil then
local sName = oModifier:GetCardName()
local CostChange = 0
if oModifier:GetController() == oTarget:GetController() then
if ( sName == "ANDRADITE_LEECH" and oTarget:GetColour():Test(COLOUR_BLACK) ) then
return 1
elseif ( sName == "DERELOR" and oTarget:GetColour():Test(COLOUR_BLACK) ) then
return 1
elseif ( sName == "RAGEMONGER" and oTarget:GetSubType():Test(CREATURE_TYPE_MINOTAUR) ) then
return -1
elseif ( sName == "EDGEWALKER" and oTarget:GetSubType():Test(CREATURE_TYPE_CLERIC) ) then
return -1
end
end
end
return 0
end
UpdateRedCostValue = 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:EvaluateObjects()
local iMod = 0
for i=0,(Count-1) do
local Card = filter:GetNthEvaluatedObject(i)
if Card ~= nil and RSN_Characteristics_GetInt( Card, NEO_ABILITIES_ACTIVE ) == 1 then
iMod = iMod + GetRedCostModification(oTarget, Card)
end
end
return iMod
end
GetRedCostModification = function(oTarget, oModifier)
-- Returns an integer number for how much oModifier modifies oTarget's colorless mana most
if oModifier ~= nil then
local sName = oModifier:GetCardName()
local CostChange = 0
if oModifier:GetController() == oTarget:GetController() then
if ( sName == "RUBY_LEECH" and oTarget:GetColour():Test(COLOUR_RED) ) then
return 1
elseif ( sName == "RAGEMONGER" and oTarget:GetSubType():Test(CREATURE_TYPE_MINOTAUR) ) then
return -1
elseif ( sName == "EDGEWALKER" and oTarget:GetSubType():Test(CREATURE_TYPE_CLERIC) ) then
return -1
end
end
end
return 0
end
UpdateGreenCostValue = 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:EvaluateObjects()
local iMod = 0
for i=0,(Count-1) do
local Card = filter:GetNthEvaluatedObject(i)
if Card ~= nil and RSN_Characteristics_GetInt( Card, NEO_ABILITIES_ACTIVE ) == 1 then
iMod = iMod + GetGreenCostModification(oTarget, Card)
end
end
return iMod
end
GetGreenCostModification = function(oTarget, oModifier)
-- Returns an integer number for how much oModifier modifies oTarget's colorless mana most
if oModifier ~= nil then
local sName = oModifier:GetCardName()
local CostChange = 0
if oModifier:GetController() == oTarget:GetController() then
if ( sName == "JADE_LEECH" and oTarget:GetColour():Test(COLOUR_GREEN) ) then
return 1
end
end
end
return 0
end
Ah. I misread your post. I thought it said it was NOT compliant with those cards. My mistake

I'm really happy with this. There are a lot of cards that use convoke, especially newer ones, and the more cards we can code, the better! Thank you
