Okay, I finally had some free time and motivation and I went through the 300+ cards with FE_IS_PERMANENT and replaced all instances.
For horsemanship, the first thing to notice is that their layers are messed up. Layers in Continuous Actions run in order. First, layer 0, then layer 1, and so on. So, if you use layer 8 to grant an ability which itself runs on layer 6, that will probably not work.
0-5: Nothing happens.
6: Nothing happens (it doesn't currently have horsemanship to run the necessary code).
7: Nothing happens.
8: Grants horsemanship ability.
Repeat.
In order for this to work, you'll need to make sure that the granted ability's CA runs on a higher layer than the one granting the ability. Either reverse them (granting ability uses layer 6, granted ability uses 8) or reduce them to 5 (granting) and leave granted ability at layer 6. In either case, make sure that one or the other uses layer 6 so cards that call LoseAllAbilities() work properly (they invalidate layer 6 effects, I think), which means the layer 6 ability
needs to be the granted ability (like it is), which means reducing the granting ability from layer 8 to layer 5 or less.
However, to add a small bit of complexity to the situation, notice that the ability with resource_id 6 might cause issues with LoseAllAbilities. It also needs to be granted from layer 6 on the affected card to work properly, I think. (Please correct me if I'm wrong.) What I mean by that is if a card is targeted by this and then by
Turn to Frog, it should lose horsemanship, which means losing both the CA and the TA associated with Horsemanship. In order to lose both, the need to be tied to a layer 6 CA on the targeted creature. Try this. If it doesn't work, then just reduce the granting ability's layer to 5 and it'll have a small window in which it can improperly interact with
Turn to Frog and similar cards.
- Code: Select all
<SPELL_ABILITY>
<LOCALISED_TEXT LanguageCode="en-US"><![CDATA[Target creature gets +3/+3 and gains horsemanship until end of turn.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="fr-FR"><![CDATA[Target creature gets +3/+3 and gains horsemanship until end of turn.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="es-ES"><![CDATA[Target creature gets +3/+3 and gains horsemanship until end of turn.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="de-DE"><![CDATA[Target creature gets +3/+3 and gains horsemanship until end of turn.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="it-IT"><![CDATA[Target creature gets +3/+3 and gains horsemanship until end of turn.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="jp-JA"><![CDATA[Target creature gets +3/+3 and gains horsemanship until end of turn.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="ko-KR"><![CDATA[Target creature gets +3/+3 and gains horsemanship until end of turn.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="ru-RU"><![CDATA[Target creature gets +3/+3 and gains horsemanship until end of turn.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="pt-BR"><![CDATA[Target creature gets +3/+3 and gains horsemanship until end of turn.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="zh-CN"><![CDATA[Target creature gets +3/+3 and gains horsemanship until end of turn.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="zh-HK"><![CDATA[Target creature gets +3/+3 and gains horsemanship until end of turn.]]></LOCALISED_TEXT>
<TARGET tag="SPL_CARD_QUERY_CHOOSE_CREATURE" definition="0" compartment="0" count="1" />
<TARGET_DEFINITION id="0">
local filter = ClearFilter()
filter:Add( FE_TYPE, OP_IS, CARD_TYPE_CREATURE )
</TARGET_DEFINITION>
<CONTINUOUS_ACTION layer="7C">
local target = EffectDC():Get_Targets(0) and EffectDC():Get_Targets(0):Get_CardPtr(0)
if target ~= nil then
local characteristics = target:GetCurrentCharacteristics()
characteristics:Power_Add( 3 )
characteristics:Toughness_Add( 3 )
end
</CONTINUOUS_ACTION>
<CONTINUOUS_ACTION layer="5">
local target = EffectDC():Get_Targets(0) and EffectDC():Get_Targets(0):Get_CardPtr(0)
if target ~= nil then
local characteristics = target:GetCurrentCharacteristics()
characteristics:GrantAbility(5)
end
</CONTINUOUS_ACTION>
<DURATION simple_duration="UntilEOT" />
</SPELL_ABILITY>
<STATIC_ABILITY resource_id="5">
<LOCALISED_TEXT LanguageCode="en-US"><![CDATA[Horsemanship]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="fr-FR"><![CDATA[Horsemanship]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="es-ES"><![CDATA[Horsemanship]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="de-DE"><![CDATA[Horsemanship]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="it-IT"><![CDATA[Horsemanship]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="jp-JA"><![CDATA[Horsemanship]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="ko-KR"><![CDATA[Horsemanship]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="ru-RU"><![CDATA[Horsemanship]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="pt-BR"><![CDATA[Horsemanship]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="zh-CN"><![CDATA[Horsemanship]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="zh-HK"><![CDATA[Horsemanship]]></LOCALISED_TEXT>
<CONTINUOUS_ACTION layer="6">
RSN_Characteristics_Set(EffectSource(), CW_CHARACTERISTIC_HORSEMANSHIP, 1)
EffectSource():GetCurrentCharacteristics():GrantAbility(6)
</CONTINUOUS_ACTION>
</STATIC_ABILITY>
<TRIGGERED_ABILITY replacement_effect="1" resource_id="6">
<TRIGGER value="EVASION_TEST" simple_qualifier="self" pre_trigger="1">
return RSN_Characteristics_Get( SecondaryObject(), CW_CHARACTERISTIC_HORSEMANSHIP ) == false
</TRIGGER>
</TRIGGERED_ABILITY>
For the error, let's hope that fixes it, but I doubt it will. I checked CW_CHARACTERISTIC_HORSEMANSHIP, and it was valid and defined, so I'm not sure what's going on there yet.
For targeting them, I'm not certain... It's probably something to do with the targeting cards checking before the layering system applies the characteristic, but it should be working since the same thing works with things that grant flying and similar abilities... Remind me about this later and I'll see about testing it.
Regarding the
Wheel of Torture, it's not that it necessarily defaults to it, but if a source you control would deal non-combat damage to a player that controls a planeswalker, you may optionally redirect all of that damage to a planeswalker said opponent controls.
Shock can only target a player, but you can still opt to have the damage dealt to the player be redirected to their planeswalkers (you just can't split the damage up). This only applies to non-combat damage because combat damage results from attacking, which is actually directly declared against a planeswalker, so it's unnecessary.
Are you sure it wasn't just the opponent prioritizing the planeswalker over the player using that rule?
For casting only during a declare attackers step during which you've been attacked, you'd need to track attacks and return true only if you've been attacked this step (not this turn, since multiple attacks would interact badly). I started working on an update to the _MANAGER_TRACKING card to include attacks when I first read this, but it's not ready.
For the MID issue with lands, for now just use negative numbers starting with -1.
EDIT: Also, I realized why FE_IS_PERMANENT was still in use. I only altered what was necessary for planeswalkers, and FE_IS_PERMANENT, while not interacting properly with managers,
does interact properly with planeswalkers, so I ignored it before.