How to achieve effect"deals 1 damage to 3 different players"
New decks and cards for Stainless Games' release
Moderator: CCGHQ Admins
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>
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.
< DotP2013 (and formerly 2012) modder >
WADs unrecognized by the game? Look here.
Need a basic modding tutorial? Try this.
Want to start coding cards? Try my web generator.
WADs unrecognized by the game? Look here.
Need a basic modding tutorial? Try this.
Want to start coding cards? Try my web generator.
-

thefiremind - Programmer
- Posts: 1651
- Joined: 07 Nov 2011, 10:55
- Has thanked: 60 times
- Been thanked: 361 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: BloodReyvyn and 0 guests


