Board index
Programs with AI or Rules Enforcement
Magic: The Gathering - Duels of the Planeswalkers
Programming Talk



Will of the Council
Moderator: CCGHQ Admins
Re: Will of the Council
by RiiakShiNal » 22 Aug 2014, 10:28
You changed LinkedDC() to EffectDC() in one place (RESOLUTION_TIME_ACTION), but not the other (CONTINUOUS_ACTION). Also since you didn't add linked_ability_group to the ability LinkedDC() is nil.volrathxp wrote:So according to Kith, Council Guardian isn't actually granting protection. Here's the code, maybe I copied something wrong.
- Council Guardian | Open
- Code: Select all
<?xml version='1.0' encoding='UTF-8'?>
<CARD_V2 ExportVersion="1">
<FILENAME text="COUNCIL_GUARDIAN_1000382238" />
<CARDNAME text="COUNCIL_GUARDIAN" />
<TITLE>
<LOCALISED_TEXT LanguageCode="en-US"><![CDATA[Council Guardian]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="fr-FR"><![CDATA[Council Guardian]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="es-ES"><![CDATA[Council Guardian]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="de-DE"><![CDATA[Council Guardian]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="it-IT"><![CDATA[Council Guardian]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="jp-JA"><![CDATA[議会の守衛]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="ko-KR"><![CDATA[Council Guardian]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="ru-RU"><![CDATA[Council Guardian]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="pt-BR"><![CDATA[Council Guardian]]></LOCALISED_TEXT>
</TITLE>
<MULTIVERSEID value="1000382238" />
<ARTID value="1000382238" />
<ARTIST name="Volkan Baga" />
<CASTING_COST cost="{5}{W}" />
<TYPE metaname="Creature" />
<SUB_TYPE metaname="Giant" />
<SUB_TYPE metaname="Soldier" />
<EXPANSION value="CNS" />
<RARITY metaname="U" />
<POWER value="5" />
<TOUGHNESS value="5" />
<TRIGGERED_ABILITY>
<LOCALISED_TEXT LanguageCode="en-US"><![CDATA[Will of the council — When Council Guardian enters the battlefield, starting with you, each player votes for blue, black, red, or green. Council Guardian gains protection from each color with the most votes or tied for most votes.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="fr-FR"><![CDATA[Will of the council — When Council Guardian enters the battlefield, starting with you, each player votes for blue, black, red, or green. Council Guardian gains protection from each color with the most votes or tied for most votes.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="es-ES"><![CDATA[Will of the council — When Council Guardian enters the battlefield, starting with you, each player votes for blue, black, red, or green. Council Guardian gains protection from each color with the most votes or tied for most votes.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="de-DE"><![CDATA[Will of the council — When Council Guardian enters the battlefield, starting with you, each player votes for blue, black, red, or green. Council Guardian gains protection from each color with the most votes or tied for most votes.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="it-IT"><![CDATA[Will of the council — When Council Guardian enters the battlefield, starting with you, each player votes for blue, black, red, or green. Council Guardian gains protection from each color with the most votes or tied for most votes.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="jp-JA"><![CDATA[議決 ― 議会の守衛が戦場に出たとき、あなたから始めて各プレイヤーは青、黒、赤、緑のいずれかに投票する。議会の守衛は最多あるいは最多と同数の票を獲得した各色に対するプロテクションを得る。]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="ko-KR"><![CDATA[Will of the council — When Council Guardian enters the battlefield, starting with you, each player votes for blue, black, red, or green. Council Guardian gains protection from each color with the most votes or tied for most votes.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="ru-RU"><![CDATA[Will of the council — When Council Guardian enters the battlefield, starting with you, each player votes for blue, black, red, or green. Council Guardian gains protection from each color with the most votes or tied for most votes.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="pt-BR"><![CDATA[Will of the council — When Council Guardian enters the battlefield, starting with you, each player votes for blue, black, red, or green. Council Guardian gains protection from each color with the most votes or tied for most votes.]]></LOCALISED_TEXT>
<TRIGGER value="ZONECHANGE_END" simple_qualifier="self" to_zone="ZONE_BATTLEFIELD" />
<RESOLUTION_TIME_ACTION>
VXP_SetupVote()
</RESOLUTION_TIME_ACTION>
<RESOLUTION_TIME_ACTION repeating="1">
return VXP_ConductVoteMultipleChoice( EffectSourceLKI(), "CARD_QUERY_VOTE", "CARD_QUERY_VOTE_BLUE", "CARD_QUERY_VOTE_BLACK", "CARD_QUERY_VOTE_RED", "CARD_QUERY_VOTE_GREEN" )
</RESOLUTION_TIME_ACTION>
<RESOLUTION_TIME_ACTION>
VXP_TallyVotes()
VXP_ShowVoteWinners("Blue", "Black", "Red", "Green")
local tWinners = VXP_GetWinners()
for i = 1, tWinners[0] do
-- Get choice (remember choices are 0-indexed so we
-- add 1 to make sure we don't have any zeros in the mix.)
EffectDC():Int_Set(i - 1, tWinners[i] + 1)
end
</RESOLUTION_TIME_ACTION>
<CONTINUOUS_ACTION layer="6">
if (EffectSource ~= nil) then
local nIndex = 0
while (LinkedDC():Int_Get(nIndex) > 0) do
local nChoice = EffectDC():Int_Get(nIndex)
local oFilter = ClearFilter()
nIndex = nIndex + 1
if (nChoice == 1) then
-- First choice let's say it was Blue (like on the card)
oFilter:Add( FE_COLOUR, OP_IS, COLOUR_BLUE )
elseif (nChoice == 2) then
-- Second choice let's say it was Black (like on the card)
oFilter:Add( FE_COLOUR, OP_IS, COLOUR_BLACK )
elseif (nChoice == 3) then
-- Third choice let's say it was Red (like on the card)
oFilter:Add( FE_COLOUR, OP_IS, COLOUR_RED )
else
-- Fourth choice let's say it was Green (like on the card)
oFilter:Add( FE_COLOUR, OP_IS, COLOUR_GREEN )
end
EffectSource():Protection()
end
end
</CONTINUOUS_ACTION>
<DURATION>
return EffectSource() == nil
</DURATION>
</TRIGGERED_ABILITY>
<SFX text="COMBAT_BLUNT_LARGE_ATTACK" power_boundary_min="4" power_boundary_max="-1" />
<SFX text="COMBAT_BLUNT_SMALL_ATTACK" power_boundary_min="1" power_boundary_max="3" />
</CARD_V2>
volrathxp wrote:Also need a spot check on my Custodi Squire to make sure I understood setting that up right.
- Custodi Squire | Open
- Code: Select all
<?xml version='1.0' encoding='UTF-8'?>
<CARD_V2 ExportVersion="1">
<FILENAME text="CUSTODI_SQUIRE_1000382243" />
<CARDNAME text="CUSTODI_SQUIRE" />
<TITLE>
<LOCALISED_TEXT LanguageCode="en-US"><![CDATA[Custodi Squire]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="fr-FR"><![CDATA[Custodi Squire]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="es-ES"><![CDATA[Custodi Squire]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="de-DE"><![CDATA[Custodi Squire]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="it-IT"><![CDATA[Custodi Squire]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="jp-JA"><![CDATA[カストーディの従者]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="ko-KR"><![CDATA[Custodi Squire]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="ru-RU"><![CDATA[Custodi Squire]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="pt-BR"><![CDATA[Custodi Squire]]></LOCALISED_TEXT>
</TITLE>
<MULTIVERSEID value="1000382243" />
<ARTID value="1000382243" />
<ARTIST name="Alex Horley-Orlandelli" />
<CASTING_COST cost="{4}{W}" />
<TYPE metaname="Creature" />
<SUB_TYPE metaname="Spirit" />
<SUB_TYPE metaname="Cleric" />
<EXPANSION value="CNS" />
<RARITY metaname="C" />
<POWER value="3" />
<TOUGHNESS value="3" />
<STATIC_ABILITY>
<LOCALISED_TEXT LanguageCode="en-US"><![CDATA[Flying]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="fr-FR"><![CDATA[Vol]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="es-ES"><![CDATA[Vuela.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="de-DE"><![CDATA[Fliegend]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="it-IT"><![CDATA[Volare]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="jp-JA"><![CDATA[飛行]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="ko-KR"><![CDATA[비행]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="ru-RU"><![CDATA[Полет]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="pt-BR"><![CDATA[Voar]]></LOCALISED_TEXT>
<INTRINSIC characteristic="CHARACTERISTIC_FLYING" />
</STATIC_ABILITY>
<TRIGGERED_ABILITY>
<LOCALISED_TEXT LanguageCode="en-US"><![CDATA[Will of the council — When Custodi Squire enters the battlefield, starting with you, each player votes for an artifact, creature, or enchantment card in your graveyard. Return each card with the most votes or tied for most votes to your hand.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="fr-FR"><![CDATA[Will of the council — When Custodi Squire enters the battlefield, starting with you, each player votes for an artifact, creature, or enchantment card in your graveyard. Return each card with the most votes or tied for most votes to your hand.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="es-ES"><![CDATA[Will of the council — When Custodi Squire enters the battlefield, starting with you, each player votes for an artifact, creature, or enchantment card in your graveyard. Return each card with the most votes or tied for most votes to your hand.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="de-DE"><![CDATA[Will of the council — When Custodi Squire enters the battlefield, starting with you, each player votes for an artifact, creature, or enchantment card in your graveyard. Return each card with the most votes or tied for most votes to your hand.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="it-IT"><![CDATA[Will of the council — When Custodi Squire enters the battlefield, starting with you, each player votes for an artifact, creature, or enchantment card in your graveyard. Return each card with the most votes or tied for most votes to your hand.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="jp-JA"><![CDATA[議決 ― カストーディの従者が戦場に出たとき、あなたから始めて各プレイヤーは、あなたの墓地にあるアーティファクト・カード1枚か、クリーチャー・カード1枚か、エンチャント・カード1枚に投票する。最多あるいは最多と同数の票を獲得した各カードをあなたの手札に戻す。]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="ko-KR"><![CDATA[Will of the council — When Custodi Squire enters the battlefield, starting with you, each player votes for an artifact, creature, or enchantment card in your graveyard. Return each card with the most votes or tied for most votes to your hand.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="ru-RU"><![CDATA[Will of the council — When Custodi Squire enters the battlefield, starting with you, each player votes for an artifact, creature, or enchantment card in your graveyard. Return each card with the most votes or tied for most votes to your hand.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="pt-BR"><![CDATA[Will of the council — When Custodi Squire enters the battlefield, starting with you, each player votes for an artifact, creature, or enchantment card in your graveyard. Return each card with the most votes or tied for most votes to your hand.]]></LOCALISED_TEXT>
<RESOLUTION_TIME_ACTION>
VXP_SetupVote()
</RESOLUTION_TIME_ACTION>
<RESOLUTION_TIME_ACTION repeating="1">
-- Not controlled by you.
local oFilter = ClearFilter()
local oFilter:SetZone( ZONE_GRAVEYARD )
oFilter:Add( FE_CONTROLLER, OP_IS, EffectController() )
-- Non-Land (done this way to exclude invisible tokens)
local oSubFilter = oFilter:AddSubFilter_Or()
oSubFilter:Add( FE_TYPE, OP_IS, CARD_TYPE_ARTIFACT )
oSubFilter:Add( FE_TYPE, OP_IS, CARD_TYPE_CREATURE )
oSubFilter:Add( FE_TYPE, OP_IS, CARD_TYPE_ENCHANTMENT )
-- Do the vote.
return VXP_ConductVoteFilterSingle( "CARD_QUERY_CUSTODI_SQUIRE_QUESTION" )
</RESOLUTION_TIME_ACTION>
<RESOLUTION_TIME_ACTION>
-- This is a required step, we have to tally the votes before we do anything else.
VXP_TallyVotes()
-- This will show the winners along with votes for the winners (will show both in case of tie, up to card to handle ties).
VXP_ShowVoteWinners("Sickness", "Psychosis")
-- Get our winner(s) and exile them:
local tWinners = VXP_GetWinners()
local nNumCards = tWinners[0]
for i = 1, nNumCards do
local oCard = tWinners[i]
if (oCard ~= nil) then
oCard:PutInHand()
end
end
</RESOLUTION_TIME_ACTION>
</TRIGGERED_ABILITY>
<HELP title="MORE_INFO_BADGE_TITLE_10" body="MORE_INFO_BADGE_BODY_10" zone="ZONE_ANY" />
<SFX text="COMBAT_BLUNT_LARGE_ATTACK" power_boundary_min="4" power_boundary_max="-1" />
<SFX text="COMBAT_BLUNT_SMALL_ATTACK" power_boundary_min="1" power_boundary_max="3" />
</CARD_V2>
- (Not really a problem) In this case VXP_ShowVoteWinners() will not take any parameters (any parameters will be ignored). Since it is not being used for a multiple choice question it doesn't need any strings it will pull the card names from the cards (unfortunately I believe it gets the name from the CARDNAME tag in the XML rather than the localized friendly name).
- (Not really a problem) You didn't change the comments on the filter. Not necessary, but could be confusing if someone looks at the code of your card.
Looks good, I don't see anything that would cause it to not work.
Just getting started: Xander9009's DotP 2014 Community Wad
Need a deck builder: DotP 2014 Deck Builder
Problems Modding: DotP 2014 Frequent Modding Mistakes
Need a deck builder: DotP 2014 Deck Builder
Problems Modding: DotP 2014 Frequent Modding Mistakes
- RiiakShiNal
- Programmer
- Posts: 2188
- Joined: 16 May 2011, 21:37
- Has thanked: 75 times
- Been thanked: 497 times
Re: Will of the Council
by volrathxp » 22 Aug 2014, 11:01
Gotcha. On the comments, I plan on sitting down and going through all the cards in the DLC anyways and fixing the things like the AI scores, combat animation, etc. I'll fix comments then.RiiakShiNal wrote:You changed LinkedDC() to EffectDC() in one place (RESOLUTION_TIME_ACTION), but not the other (CONTINUOUS_ACTION). Also since you didn't add linked_ability_group to the ability LinkedDC() is nil.volrathxp wrote:So according to Kith, Council Guardian isn't actually granting protection. Here's the code, maybe I copied something wrong.
- Council Guardian | Open
- Code: Select all
<?xml version='1.0' encoding='UTF-8'?>
<CARD_V2 ExportVersion="1">
<FILENAME text="COUNCIL_GUARDIAN_1000382238" />
<CARDNAME text="COUNCIL_GUARDIAN" />
<TITLE>
<LOCALISED_TEXT LanguageCode="en-US"><![CDATA[Council Guardian]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="fr-FR"><![CDATA[Council Guardian]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="es-ES"><![CDATA[Council Guardian]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="de-DE"><![CDATA[Council Guardian]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="it-IT"><![CDATA[Council Guardian]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="jp-JA"><![CDATA[議会の守衛]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="ko-KR"><![CDATA[Council Guardian]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="ru-RU"><![CDATA[Council Guardian]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="pt-BR"><![CDATA[Council Guardian]]></LOCALISED_TEXT>
</TITLE>
<MULTIVERSEID value="1000382238" />
<ARTID value="1000382238" />
<ARTIST name="Volkan Baga" />
<CASTING_COST cost="{5}{W}" />
<TYPE metaname="Creature" />
<SUB_TYPE metaname="Giant" />
<SUB_TYPE metaname="Soldier" />
<EXPANSION value="CNS" />
<RARITY metaname="U" />
<POWER value="5" />
<TOUGHNESS value="5" />
<TRIGGERED_ABILITY>
<LOCALISED_TEXT LanguageCode="en-US"><![CDATA[Will of the council — When Council Guardian enters the battlefield, starting with you, each player votes for blue, black, red, or green. Council Guardian gains protection from each color with the most votes or tied for most votes.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="fr-FR"><![CDATA[Will of the council — When Council Guardian enters the battlefield, starting with you, each player votes for blue, black, red, or green. Council Guardian gains protection from each color with the most votes or tied for most votes.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="es-ES"><![CDATA[Will of the council — When Council Guardian enters the battlefield, starting with you, each player votes for blue, black, red, or green. Council Guardian gains protection from each color with the most votes or tied for most votes.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="de-DE"><![CDATA[Will of the council — When Council Guardian enters the battlefield, starting with you, each player votes for blue, black, red, or green. Council Guardian gains protection from each color with the most votes or tied for most votes.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="it-IT"><![CDATA[Will of the council — When Council Guardian enters the battlefield, starting with you, each player votes for blue, black, red, or green. Council Guardian gains protection from each color with the most votes or tied for most votes.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="jp-JA"><![CDATA[議決 ― 議会の守衛が戦場に出たとき、あなたから始めて各プレイヤーは青、黒、赤、緑のいずれかに投票する。議会の守衛は最多あるいは最多と同数の票を獲得した各色に対するプロテクションを得る。]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="ko-KR"><![CDATA[Will of the council — When Council Guardian enters the battlefield, starting with you, each player votes for blue, black, red, or green. Council Guardian gains protection from each color with the most votes or tied for most votes.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="ru-RU"><![CDATA[Will of the council — When Council Guardian enters the battlefield, starting with you, each player votes for blue, black, red, or green. Council Guardian gains protection from each color with the most votes or tied for most votes.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="pt-BR"><![CDATA[Will of the council — When Council Guardian enters the battlefield, starting with you, each player votes for blue, black, red, or green. Council Guardian gains protection from each color with the most votes or tied for most votes.]]></LOCALISED_TEXT>
<TRIGGER value="ZONECHANGE_END" simple_qualifier="self" to_zone="ZONE_BATTLEFIELD" />
<RESOLUTION_TIME_ACTION>
VXP_SetupVote()
</RESOLUTION_TIME_ACTION>
<RESOLUTION_TIME_ACTION repeating="1">
return VXP_ConductVoteMultipleChoice( EffectSourceLKI(), "CARD_QUERY_VOTE", "CARD_QUERY_VOTE_BLUE", "CARD_QUERY_VOTE_BLACK", "CARD_QUERY_VOTE_RED", "CARD_QUERY_VOTE_GREEN" )
</RESOLUTION_TIME_ACTION>
<RESOLUTION_TIME_ACTION>
VXP_TallyVotes()
VXP_ShowVoteWinners("Blue", "Black", "Red", "Green")
local tWinners = VXP_GetWinners()
for i = 1, tWinners[0] do
-- Get choice (remember choices are 0-indexed so we
-- add 1 to make sure we don't have any zeros in the mix.)
EffectDC():Int_Set(i - 1, tWinners[i] + 1)
end
</RESOLUTION_TIME_ACTION>
<CONTINUOUS_ACTION layer="6">
if (EffectSource ~= nil) then
local nIndex = 0
while (LinkedDC():Int_Get(nIndex) > 0) do
local nChoice = EffectDC():Int_Get(nIndex)
local oFilter = ClearFilter()
nIndex = nIndex + 1
if (nChoice == 1) then
-- First choice let's say it was Blue (like on the card)
oFilter:Add( FE_COLOUR, OP_IS, COLOUR_BLUE )
elseif (nChoice == 2) then
-- Second choice let's say it was Black (like on the card)
oFilter:Add( FE_COLOUR, OP_IS, COLOUR_BLACK )
elseif (nChoice == 3) then
-- Third choice let's say it was Red (like on the card)
oFilter:Add( FE_COLOUR, OP_IS, COLOUR_RED )
else
-- Fourth choice let's say it was Green (like on the card)
oFilter:Add( FE_COLOUR, OP_IS, COLOUR_GREEN )
end
EffectSource():Protection()
end
end
</CONTINUOUS_ACTION>
<DURATION>
return EffectSource() == nil
</DURATION>
</TRIGGERED_ABILITY>
<SFX text="COMBAT_BLUNT_LARGE_ATTACK" power_boundary_min="4" power_boundary_max="-1" />
<SFX text="COMBAT_BLUNT_SMALL_ATTACK" power_boundary_min="1" power_boundary_max="3" />
</CARD_V2>volrathxp wrote:Also need a spot check on my Custodi Squire to make sure I understood setting that up right.
- Custodi Squire | Open
- Code: Select all
<?xml version='1.0' encoding='UTF-8'?>
<CARD_V2 ExportVersion="1">
<FILENAME text="CUSTODI_SQUIRE_1000382243" />
<CARDNAME text="CUSTODI_SQUIRE" />
<TITLE>
<LOCALISED_TEXT LanguageCode="en-US"><![CDATA[Custodi Squire]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="fr-FR"><![CDATA[Custodi Squire]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="es-ES"><![CDATA[Custodi Squire]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="de-DE"><![CDATA[Custodi Squire]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="it-IT"><![CDATA[Custodi Squire]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="jp-JA"><![CDATA[カストーディの従者]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="ko-KR"><![CDATA[Custodi Squire]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="ru-RU"><![CDATA[Custodi Squire]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="pt-BR"><![CDATA[Custodi Squire]]></LOCALISED_TEXT>
</TITLE>
<MULTIVERSEID value="1000382243" />
<ARTID value="1000382243" />
<ARTIST name="Alex Horley-Orlandelli" />
<CASTING_COST cost="{4}{W}" />
<TYPE metaname="Creature" />
<SUB_TYPE metaname="Spirit" />
<SUB_TYPE metaname="Cleric" />
<EXPANSION value="CNS" />
<RARITY metaname="C" />
<POWER value="3" />
<TOUGHNESS value="3" />
<STATIC_ABILITY>
<LOCALISED_TEXT LanguageCode="en-US"><![CDATA[Flying]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="fr-FR"><![CDATA[Vol]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="es-ES"><![CDATA[Vuela.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="de-DE"><![CDATA[Fliegend]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="it-IT"><![CDATA[Volare]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="jp-JA"><![CDATA[飛行]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="ko-KR"><![CDATA[비행]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="ru-RU"><![CDATA[Полет]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="pt-BR"><![CDATA[Voar]]></LOCALISED_TEXT>
<INTRINSIC characteristic="CHARACTERISTIC_FLYING" />
</STATIC_ABILITY>
<TRIGGERED_ABILITY>
<LOCALISED_TEXT LanguageCode="en-US"><![CDATA[Will of the council — When Custodi Squire enters the battlefield, starting with you, each player votes for an artifact, creature, or enchantment card in your graveyard. Return each card with the most votes or tied for most votes to your hand.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="fr-FR"><![CDATA[Will of the council — When Custodi Squire enters the battlefield, starting with you, each player votes for an artifact, creature, or enchantment card in your graveyard. Return each card with the most votes or tied for most votes to your hand.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="es-ES"><![CDATA[Will of the council — When Custodi Squire enters the battlefield, starting with you, each player votes for an artifact, creature, or enchantment card in your graveyard. Return each card with the most votes or tied for most votes to your hand.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="de-DE"><![CDATA[Will of the council — When Custodi Squire enters the battlefield, starting with you, each player votes for an artifact, creature, or enchantment card in your graveyard. Return each card with the most votes or tied for most votes to your hand.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="it-IT"><![CDATA[Will of the council — When Custodi Squire enters the battlefield, starting with you, each player votes for an artifact, creature, or enchantment card in your graveyard. Return each card with the most votes or tied for most votes to your hand.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="jp-JA"><![CDATA[議決 ― カストーディの従者が戦場に出たとき、あなたから始めて各プレイヤーは、あなたの墓地にあるアーティファクト・カード1枚か、クリーチャー・カード1枚か、エンチャント・カード1枚に投票する。最多あるいは最多と同数の票を獲得した各カードをあなたの手札に戻す。]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="ko-KR"><![CDATA[Will of the council — When Custodi Squire enters the battlefield, starting with you, each player votes for an artifact, creature, or enchantment card in your graveyard. Return each card with the most votes or tied for most votes to your hand.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="ru-RU"><![CDATA[Will of the council — When Custodi Squire enters the battlefield, starting with you, each player votes for an artifact, creature, or enchantment card in your graveyard. Return each card with the most votes or tied for most votes to your hand.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="pt-BR"><![CDATA[Will of the council — When Custodi Squire enters the battlefield, starting with you, each player votes for an artifact, creature, or enchantment card in your graveyard. Return each card with the most votes or tied for most votes to your hand.]]></LOCALISED_TEXT>
<RESOLUTION_TIME_ACTION>
VXP_SetupVote()
</RESOLUTION_TIME_ACTION>
<RESOLUTION_TIME_ACTION repeating="1">
-- Not controlled by you.
local oFilter = ClearFilter()
local oFilter:SetZone( ZONE_GRAVEYARD )
oFilter:Add( FE_CONTROLLER, OP_IS, EffectController() )
-- Non-Land (done this way to exclude invisible tokens)
local oSubFilter = oFilter:AddSubFilter_Or()
oSubFilter:Add( FE_TYPE, OP_IS, CARD_TYPE_ARTIFACT )
oSubFilter:Add( FE_TYPE, OP_IS, CARD_TYPE_CREATURE )
oSubFilter:Add( FE_TYPE, OP_IS, CARD_TYPE_ENCHANTMENT )
-- Do the vote.
return VXP_ConductVoteFilterSingle( "CARD_QUERY_CUSTODI_SQUIRE_QUESTION" )
</RESOLUTION_TIME_ACTION>
<RESOLUTION_TIME_ACTION>
-- This is a required step, we have to tally the votes before we do anything else.
VXP_TallyVotes()
-- This will show the winners along with votes for the winners (will show both in case of tie, up to card to handle ties).
VXP_ShowVoteWinners("Sickness", "Psychosis")
-- Get our winner(s) and exile them:
local tWinners = VXP_GetWinners()
local nNumCards = tWinners[0]
for i = 1, nNumCards do
local oCard = tWinners[i]
if (oCard ~= nil) then
oCard:PutInHand()
end
end
</RESOLUTION_TIME_ACTION>
</TRIGGERED_ABILITY>
<HELP title="MORE_INFO_BADGE_TITLE_10" body="MORE_INFO_BADGE_BODY_10" zone="ZONE_ANY" />
<SFX text="COMBAT_BLUNT_LARGE_ATTACK" power_boundary_min="4" power_boundary_max="-1" />
<SFX text="COMBAT_BLUNT_SMALL_ATTACK" power_boundary_min="1" power_boundary_max="3" />
</CARD_V2>
- (Not really a problem) In this case VXP_ShowVoteWinners() will not take any parameters (any parameters will be ignored). Since it is not being used for a multiple choice question it doesn't need any strings it will pull the card names from the cards (unfortunately I believe it gets the name from the CARDNAME tag in the XML rather than the localized friendly name).
- (Not really a problem) You didn't change the comments on the filter. Not necessary, but could be confusing if someone looks at the code of your card.
Looks good, I don't see anything that would cause it to not work.

volrathxp
Who is online
Users browsing this forum: Baidu [Spider] and 6 guests