How to achieve effect"deals 1 damage to 3 different players"
New decks and cards for Stainless Games' release
Moderator: CCGHQ Admins
4 posts
• Page 1 of 1
How to achieve effect"deals 1 damage to 3 different players"
by sumomole » 27 Feb 2012, 08:22
I know how to achieve “deals 1 damage to 3 different creatures”
But how to achieve “deals 1 damage to 3 different players” ?
But how to achieve “deals 1 damage to 3 different players” ?
- Code: Select all
<PLAY_TIME_ACTION>
local filter = Object():GetFilter()
local player = Object():GetPlayer()
filter:Clear()
filter:SetZone( ZONE_IN_PLAY )
filter:AddCardType( CARD_TYPE_CREATURE )
player:SetTargetCount(3)
for i=0,2 do
player:SetTargetPrompt( i, "CARD_QUERY_CHOOSE_DEAL_1_DAMAGE" )
end
player:ChooseTargets()
</PLAY_TIME_ACTION>
<RESOLUTION_TIME_ACTION>
local target_array = {}
for i=0,2 do
target_array[i] = Object():GetNthTargetCard(i)
end
for i=0,2 do
if target_array[i] ~= nil then
target_array[i]:DealDamage( 1, Object() )
end
end
</RESOLUTION_TIME_ACTION>
-
sumomole - Programmer
- Posts: 611
- Joined: 07 Jun 2011, 08:34
- Has thanked: 51 times
- Been thanked: 234 times
Re: How to achieve effect"deals 1 damage to 3 different play
by Eglin » 05 Mar 2012, 17:32
Have you looked at Inferno Titan? It seems like it should be straightforward to remove the bits that target creatures.
Re: How to achieve effect"deals 1 damage to 3 different play
by thefiremind » 05 Mar 2012, 19:04
I thought about that, too, and I was about to answer the topic, but Inferno Titan code allows to deal all damage to the same player, while he asked about "3 different players". Anyway, Inferno Titan could be a good start... you could try to save the first 2 targets so that you can exclude them in the following filters, but I don't know if it's possible.Eglin wrote:Have you looked at Inferno Titan? It seems like it should be straightforward to remove the bits that target creatures.
< Former DotP 2012/2013/2014 modder >
Currently busy with life...
Currently busy with life...
-
thefiremind - Programmer
- Posts: 3515
- Joined: 07 Nov 2011, 10:55
- Has thanked: 118 times
- Been thanked: 722 times
Re: How to achieve effect"deals 1 damage to 3 different play
by nabeshin » 09 Mar 2012, 22:02
I did Inferno Titan(and when I decided to improve its code... awful memories). I will advise to make all without filters, through - GetGlobalIndex, GetPlayerByGlobalIndex and GetNumberOfPlayers + AskMultipleChoiceQuestion
4 posts
• Page 1 of 1
Return to Magic: The Gathering - Duels of the Planeswalkers
Who is online
Users browsing this forum: No registered users and 1 guest