Re: General XML/LUA Editing Findings
Returning back to my earlier post where I mentioned that I was trying to make Hermetic Study.
This is the code I had:
If I ping another creature, then the enchantment moves onto whichever creature I've targeted. So I need to work out how to target another creature without changing who is being enchanted. Maybe re-target the parent card once the effect has actioned... not sure really!
This is the code I had:
- Code: Select all
<STATIC_ABILITY layer="0" tag="HERMETIC_STUDY_RULE_1">
<TARGET_DETERMINATION>
return TargetCreatureGood()
</TARGET_DETERMINATION>
<PLAYTIME>
ChooseTarget( "ChooseCreatureToGainPing" )
</PLAYTIME>
<EFFECT>
EnchantCreature()
</EFFECT>
</STATIC_ABILITY>
<ACTIVATED_ABILITY tag="HERMETIC_STUDY_RULE_2" unlikely_to_attack="1" layer="7c">
<COST type="Mana" cost="0" />
<TARGET_DETERMINATION>
return TargetCreatureOrPlayerBad()
</TARGET_DETERMINATION>
<PLAYTIME>
ChooseTarget( "ChooseCreatureOrPlayerOneDamage" )
</PLAYTIME>
<EFFECT>
DealDamageToTarget( 1 )
</EFFECT>
<AI_PLAY_SCORE>
if (MTG():GetStep() == STEP_MAIN_2 and Object():GetController():MyTurn() == 0) then
return (2000)
else
if (MTG():GetStep() == STEP_DECLARE_BLOCKERS) then
return (1000)
else
if (MTG():GetStep() == STEP_DECLARE_ATTACKERS) then
return (500)
else
return (0)
end
end
end
</AI_PLAY_SCORE>
<AI_AVAILABILITY behaviour="InResponseOrBeforeMyUntap"/>
</ACTIVATED_ABILITY>
If I ping another creature, then the enchantment moves onto whichever creature I've targeted. So I need to work out how to target another creature without changing who is being enchanted. Maybe re-target the parent card once the effect has actioned... not sure really!