NEMESiS wrote:One more;
Nomad Mythmaker can use its ability to cast enchantments on opponent's creatures. Should only work on your own creatures.
Good point here, but this is going to be very tough... if not impossible.
Nomad Mythmaker uses PseudoPlaySpell to put the Aura into play, but that function just casts the spell without making it count as cast, we have no power on how the targets are handled. I had a similar problem trying to code
Bitterheart Witch (for example it shouldn't allow you to choose a red Curse if you target a player with protection from red, but this can't be achieved in DotP2013) and I had to give up. I'll try to come up with an idea but I can't assure anything.
You could ask: why did the developers include a card that needs a specific support from the game functions without building that specific support? My answer is: I really don't know.

EDIT:
I made it! I'm really proud of the idea I had. I basically give protection from the chosen Aura to everything but the creatures controlled by the player. This way you can't enchant anything else.

The code is quite interesting so I'm posting it here for reference:
- Code: Select all
<RESOLUTION_TIME_ACTION>
local target = EffectDC():Get_Targets(0):Get_CardPtr(0)
local player = EffectController()
if target ~= nil then
local filter = Object():GetFilter()
filter:Clear()
filter:SetZone( ZONE_IN_PLAY )
filter:NotTargetted()
local filter_count = filter:EvaluateObjects()
if filter_count > 0 then
local index = 0
local to_protect_array = {}
for i=0,filter_count-1 do
local candidate = filter:GetNthEvaluatedObject(i)
if candidate:GetCardType():Test( CARD_TYPE_CREATURE ) == 0 or candidate:GetController() ~= player then
to_protect_array[index] = candidate
index = index + 1
end
end
for i=0,index-1 do
local to_protect = to_protect_array[i]
if to_protect ~= nil then
filter:Clear()
filter:SetCardInstance(target)
to_protect:Protection()
end
end
for i=0,MTG():GetNumberOfPlayers()-1 do
local nthPlayer = MTG():GetNthPlayer(i)
if nthPlayer ~= nil then
filter:Clear()
filter:SetCardInstance(target)
nthPlayer:Protection()
end
end
end
if target:GetZone() == ZONE_GRAVEYARD then
if target:GetCardType():Test( CARD_TYPE_ENCHANTMENT ) ~= 0 and target:GetSubType():Test( ENCHANTMENT_TYPE_AURA ) ~= 0 then
player:PseudoPlaySpell(target)
else
target:PutIntoPlay(player)
end
end
end
</RESOLUTION_TIME_ACTION>
The protection lasts only for this action, which is exactly what I wanted.
Let me know if you find problems with my fix.