Re: Formal Request Thread
Posted: 07 Dec 2015, 11:53
Having problems coding the following:
Anthroplasm. It goes to the graveyard when the +1+1 counters are removed.
Anthroplasm. It goes to the graveyard when the +1+1 counters are removed.
- Code: Select all
<COST mana_cost="{X}" type="Mana" />
<COST type="TapSelf" />
<PLAY_TIME_ACTION>
local count = EffectSource():CountCounters( MTG():PlusOnePlusOneCounters() )
EffectSource():RemoveCounters( MTG():PlusOnePlusOneCounters(), count )
</PLAY_TIME_ACTION>
<RESOLUTION_TIME_ACTION>
local effectSource = EffectSource()
if effectSource ~= nil then
effectSource:AddCounters( MTG():PlusOnePlusOneCounters(), GetEffectX())
end
</RESOLUTION_TIME_ACTION>
</ACTIVATED_ABILITY>
- Code: Select all
<TRIGGER value="BEGINNING_OF_PLAYERS_STEP">
return MTG():GetStep() == STEP_END_OF_TURN
</TRIGGER>
<AVAILABILITY>
local num_starting_players = MTG():GetNumberOfStartingPlayers()
for i=0,(num_starting_players-1) do
local player = MTG():GetNthStartingPlayer(i)
if (player ~= nil and player:GetTeam() ~= EffectController():GetTeam()) then
local interrogation = MTG():ClearInterrogationQuery()
interrogation:SetSecondaryPlayer(player)
if interrogation:Test( INTERROGATE_DAMAGE_DEALT, INTERROGATE_THIS_TURN ) then
-- bloodthirst!
return true
end
end
end
-- no bloodthirst!
return false
</AVAILABILITY>
<RESOLUTION_TIME_ACTION>
if EffectSource() ~= nil then
EffectSourceLKI():DealDamageTo(2, TriggerPlayer())
end
</RESOLUTION_TIME_ACTION>
</TRIGGERED_ABILITY>