Splinterverse, here are my suggestions for fixing the cards on which you were looking for feedback. I apologize for making you wait until this morning!
Consulate Surveillance: I think that your problem is that a "player" can't technically also be an "object." Try using this code to get it to work:
- Code: Select all
<ACTIVATED_ABILITY>
<LOCALISED_TEXT LanguageCode="en-US"><![CDATA[Pay two energy counters: Prevent all damage that would be dealt to you this turn by a source of your choice.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="fr-FR"><![CDATA[Payez two energy counters : Prévenez toutes les blessures qui devraient vous être infligées ce tour-ci par une source de votre choix.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="es-ES"><![CDATA[Pagar two energy counters: Prevén todo el daño que la fuente de tu elección fuera a hacerte este turno.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="de-DE"><![CDATA[Bezahle two energy counters: Verhindere allen Schaden, der dir in diesem Zug von einer Quelle, die du bestimmst, zugefügt würde.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="it-IT"><![CDATA[Paga two energy counters: Previeni tutto il danno che ti verrebbe inflitto in questo turno da una fonte a tua scelta.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="jp-JA"><![CDATA[two energy countersを支払う:このターン、あなたが選んだ発生源1つからあなたに与えられるすべてのダメージを軽減する。]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="ko-KR"><![CDATA[two energy counters를 지불한다: 당신이 선택한 원천이 이 턴에 당신에게 입히려는 모든 피해를 방지한다.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="ru-RU"><![CDATA[Заплатите two energy counters: предотвратите все повреждения, которые должны быть нанесены вам в этом ходу источником по вашему выбору.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="pt-BR"><![CDATA[Pague two energy counters: Previna todo o dano que seria causado a você neste turno por uma fonte a sua escolha.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="zh-CN"><![CDATA[支付two energy counters:选择一个来源。于本回合中,防止该来源将对你造成的所有伤害。]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="zh-HK"><![CDATA[支付two energy counters:選擇一個來源。於本回合中,防止該來源將對你造成的所有傷害。]]></LOCALISED_TEXT>
<COST type="Generic"><!-- ENERGY COST -->
<PREREQUISITE>
return CW_Cost_CanPayEnergy(2)
</PREREQUISITE>
<RESOLUTION_TIME_ACTION>
CW_Cost_PayEnergy(2)
</RESOLUTION_TIME_ACTION>
</COST>
<TARGET tag="CARD_QUERY_CHOOSE_SOURCE_PREVENT_DAMAGE" definition="0" compartment="0" count="1" />
<TARGET_DEFINITION id="0">
local filter = ClearFilter()
filter:SetFilterType( FILTER_TYPE_CARDS )
local subfilter = filter:AddSubFilter_Or()
subfilter:Add( FE_ZONE, OP_IS, ZONE_STACK )
subfilter:Add( FE_ZONE, OP_IS, ZONE_GRAVEYARD )
subfilter:Add( FE_ZONE, OP_IS, ZONE_BATTLEFIELD )
subfilter:Add( FE_ZONE, OP_IS, ZONE_EXILE )
</TARGET_DEFINITION>
<RESOLUTION_TIME_ACTION>
local target = EffectDC():Get_Targets(0):Get_CardPtr(0)
if target ~= nil then
local delayDC = EffectDC():Make_Chest(1)
delayDC:Set_CardPtr(0, target)
delayDC:Protect_CardPtr(0)
MTG():CreateDelayedTrigger(1, delayDC)
end
</RESOLUTION_TIME_ACTION>
<AI_SIMPLIFIED_TARGETING compartment="0" hint="HINT_ENEMY_ONLY" />
<SFX text="TARGET_SUN_PLAY" />
<AI_AVAILABILITY window_step="upkeep" type="window" />
<AI_AVAILABILITY window_step="main_1" window_turn="my_turn" type="window" />
<AI_AVAILABILITY window_step="begin_combat" window_turn="their_turn" type="window" />
<AI_AVAILABILITY window_step="declare_attackers" window_turn="their_turn" type="window" />
<AI_AVAILABILITY window_step="declare_blockers" type="window" />
<AI_AVAILABILITY window_step="main_2" window_turn="my_turn" type="window" />
<AI_AVAILABILITY window_step="end_of_turn" type="window" />
<AI_AVAILABILITY window_step="end_of_turn" window_turn="their_turn" type="window" />
<AI_AVAILABILITY type="in_response" response_source="1" response_target="1" />
<AI_AVAILABILITY type="in_response" response_source="1" />
<AI_AVAILABILITY type="in_response" response_target="1" />
</ACTIVATED_ABILITY>
<TRIGGERED_ABILITY resource_id="1" replacement_effect="1">
<TRIGGER value="SOURCE_DEALS_DAMAGE_TO_PLAYER" pre_trigger="1" damage_type="all">
return SecondaryPlayer() == EffectController() and TriggerObject() == EffectDC():Get_CardPtr(0)
</TRIGGER>
<CLEANUP simple_cleanup="EndOfTurn" />
<RESOLUTION_TIME_ACTION>
Damage():PreventAll()
</RESOLUTION_TIME_ACTION>
</TRIGGERED_ABILITY>
Eliminate the Competition: I base my suggestions for this one largely on Neo's
Champion of Stray Souls. Try this and see if it works:
- Code: Select all
<COST type="Generic">
<PREREQUISITE>
local filter = ClearFilter()
filter:Add(FE_CARD_INSTANCE, OP_NOT, EffectSource())
filter:Add(FE_TYPE, OP_IS, CARD_TYPE_CREATURE)
filter:Add(FE_CONTROLLER, OP_IS, EffectController())
return filter:CountStopAt(1) == 1
</PREREQUISITE>
<RESOLUTION_TIME_ACTION>
local Controller = EffectController()
local filter = ClearFilter()
filter:Add(FE_CONTROLLER, OP_IS, Controller)
filter:Add(FE_TYPE, OP_IS, CARD_TYPE_CREATURE)
filter:Add(FE_CARD_INSTANCE, OP_NOT, EffectSource())
local Count = EffectDC():Get_Targets(1):Count()
if Count > 0 then
Controller:SetItemCount(Count)
for i=0,Count-1 do
Controller:SetItemPrompt(i, "CARD_QUERY_CHOOSE_CREATURE_TO_SACRIFICE")
end
Controller:ChooseItems(EffectDC():Make_Targets(0))
end
</RESOLUTION_TIME_ACTION>
<RESOLUTION_TIME_ACTION>
local Creatures = EffectDC():Get_Targets(0)
if Creatures ~= nil then
local Count = Creatures:Count()
for i=0,Count-1 do
local Creature = Creatures:Get_CardPtr(i)
if Creature ~= nil then
EffectController():Sacrifice(Creature)
end
end
end
</RESOLUTION_TIME_ACTION>
</COST>
<TARGET tag="CARD_QUERY_CHOOSE_CREATURE_DESTROY" definition="1" compartment="1" up_to="1" dependancy="1">
local filter = ClearFilter()
filter:Add(FE_TYPE, OP_IS, CARD_TYPE_CREATURE)
filter:Add(FE_CONTROLLER, OP_IS, EffectController())
MTG():SetTargetCount(filter:Count())
</TARGET>
<TARGET_DEFINITION id="1">
local filter = ClearFilter()
filter:Add(FE_TYPE, OP_IS, CARD_TYPE_CREATURE)
</TARGET_DEFINITION>
<RESOLUTION_TIME_ACTION>
local Targets = EffectDC():Get_Targets(1):Count()
for i = 0, (Targets-1) do
local creature = EffectDC():Get_Targets(1) and EffectDC():Get_Targets(1):Get_CardPtr(i)
if creature ~= nil then
creature:Destroy()
end
end
</RESOLUTION_TIME_ACTION>
Rashmi, EC: You have to specify the number of factors for which you are interrogating in the interrogation query (so "NUM SPELLS CAST, THIS TURN, 2" [see code for real example, but you can get the idea]). You also want to put the card directly into your hand if you don't cast it rather than drawing the card so that you don't trigger any "draw card" triggers. Try this, based on Xander's
Mind's Dilation, and see if it works:
- Code: Select all
<TRIGGER value="SPELL_PLAYED" simple_qualifier="controller">
local oTriggerObject = TriggerObject()
local oController = EffectController()
if oTriggerObject ~= nil and oController ~= nil then
local oInterrogation = MTG():ClearInterrogationQuery()
oInterrogation:SetPlayer(oController)
return oInterrogation:Count(INTERROGATE_SPELLS_CAST, INTERROGATE_THIS_TURN, 2) == 1
end
return false
</TRIGGER>
<RESOLUTION_TIME_ACTION>
local oTriggerObject = TriggerObject()
local oController = EffectController()
if oTriggerObject ~= nil and oController ~= nil then
local oCard = oController:Library_GetTop()
if oCard ~= nil then
EffectDC():Set_CardPtr(0, oCard)
EffectDC():Protect_CardPtr(0)
oCard:Exile()
end
end
end
</RESOLUTION_TIME_ACTION>
<RESOLUTION_TIME_ACTION>
local oController = EffectController()
local oCard = EffectDC():Get_CardPtr(0)
if oController ~= nil and oCard ~= nil and oController:CanCastSpellForFree(oCard) then
oController:BeginNewMultipleChoice()
oController:AddMultipleChoiceAnswer("CARD_QUERY_BRING_TO_LIGHT_CAST_CARD")
oController:AddMultipleChoiceAnswer("CARD_QUERY_DO_NOTHING")
oController:AskMultipleChoiceQuestion("CARD_QUERY_BRING_TO_LIGHT", oCard)
end
</RESOLUTION_TIME_ACTION>
<RESOLUTION_TIME_ACTION>
local oController = EffectController()
local oCard = EffectDC():Get_CardPtr(0)
if oController ~= nil and oCard ~= nil and oController:GetMultipleChoiceResult() == 0 and oController:CanCastSpellForFree(oCard) then
oController:CastSpellForFree(oCard)
else ocard:PutInHand(oController)
end
</RESOLUTION_TIME_ACTION>
</TRIGGERED_ABILITY>
For
Revolutionary Rebuff, I base my suggestions on
Spiketail Drakeling, modified so that the affected spell is nonartifact. I think that it just needed a few more lines of code than you gave it. I'm not a proficient enough coder to explain why my suggestion might work when your version doesn't, however. Try this and see if it works:
- Code: Select all
<TARGET tag="CARD_QUERY_CHOOSE_SPELL_TO_COUNTER" definition="0" compartment="0" count="1" />
<TARGET_DEFINITION id="0">
local filter = ClearFilter()
filter:SetZone( ZONE_STACK )
filter:Add( FE_TYPE, OP_NOT, CARD_TYPE_ARTIFACT )
</TARGET_DEFINITION>
<RESOLUTION_TIME_ACTION>
local target = EffectDC():Get_Targets(0):Get_CardPtr(0)
if target ~= nil then
local controller = target:GetPlayer()
if controller ~= nil and controller:CanPayManaCost("{2}") then
controller:BeginNewMultipleChoice()
controller:AddMultipleChoiceAnswer( "TFM_CARD_QUERY_OPTION_PAY_COST" )
controller:AddMultipleChoiceAnswer( "CARD_QUERY_OPTION_IS_COUNTERED" )
controller:AskMultipleChoiceQuestion( "CARD_QUERY_MC_PAY_2_OR_COUNTERED", target )
end
end
</RESOLUTION_TIME_ACTION>
<RESOLUTION_TIME_ACTION>
local target = EffectDC():Get_Targets(0):Get_CardPtr(0)
if target ~= nil then
local controller = target:GetPlayer()
if controller ~= nil and controller:CanPayManaCost("{2}") then
local result = controller:GetMultipleChoiceResult()
if result == 0 then
controller:PayManaCost("{2}")
else
target:CounterSpell()
end
else
target:CounterSpell()
end
end
</RESOLUTION_TIME_ACTION>
<AI_SIMPLIFIED_TARGETING compartment="0" hint="HINT_ENEMY_ONLY" />
This should get you closer to where you want to be, at least. If you have any more questions or concerns, just let me know.