Re: Community Wad
Carpet of Flowers .I don't know where the code goes wrong.It is triggered as normal at main phase 1 but is triggered twice at main phase 2.Here is the code
- Code: Select all
<?xml version='1.0' encoding='UTF-8'?>
<CARD_V2 ExportVersion="1">
<FILENAME text="CARPET_OF_FLOWERS_CW_5858" />
<CARDNAME text="CARPET_OF_FLOWERS" />
<TITLE>
<LOCALISED_TEXT LanguageCode="en-US"><![CDATA[Carpet of Flowers]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="fr-FR"><![CDATA[Carpet of Flowers]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="es-ES"><![CDATA[Carpet of Flowers]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="de-DE"><![CDATA[Carpet of Flowers]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="it-IT"><![CDATA[Carpet of Flowers]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="jp-JA"><![CDATA[Carpet of Flowers]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="ko-KR"><![CDATA[Carpet of Flowers]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="ru-RU"><![CDATA[Carpet of Flowers]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="pt-BR"><![CDATA[Carpet of Flowers]]></LOCALISED_TEXT>
</TITLE>
<MULTIVERSEID value="5858" />
<ARTID value="CW5858" />
<ARTIST name="Rebecca Guay" />
<CASTING_COST cost="{G}" />
<TYPE metaname="Enchantment" />
<EXPANSION value="UZ" />
<RARITY metaname="U" />
<TRIGGERED_ABILITY forced_skip="1">
<LOCALISED_TEXT LanguageCode="en-US"><![CDATA[At the beginning of each of your main phases, if you haven’t added mana to your mana pool with this ability this turn, you may add up to X mana of any one color to your mana pool, where X is the number of Islands target opponent controls.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="fr-FR"><![CDATA[At the beginning of each of your main phases, if you haven’t added mana to your mana pool with this ability this turn, you may add up to X mana of any one color to your mana pool, where X is the number of Islands target opponent controls.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="es-ES"><![CDATA[At the beginning of each of your main phases, if you haven’t added mana to your mana pool with this ability this turn, you may add up to X mana of any one color to your mana pool, where X is the number of Islands target opponent controls.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="de-DE"><![CDATA[At the beginning of each of your main phases, if you haven’t added mana to your mana pool with this ability this turn, you may add up to X mana of any one color to your mana pool, where X is the number of Islands target opponent controls.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="it-IT"><![CDATA[All’inizio della tua fase principale prima del combattimento, puoi aggiungere alla tua riserva di mana fino a X mana di un qualsiasi colore, dove X è il numero di Isole controllate dall’avversario bersaglio.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="jp-JA"><![CDATA[At the beginning of each of your main phases, if you haven’t added mana to your mana pool with this ability this turn, you may add up to X mana of any one color to your mana pool, where X is the number of Islands target opponent controls.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="ko-KR"><![CDATA[At the beginning of each of your main phases, if you haven’t added mana to your mana pool with this ability this turn, you may add up to X mana of any one color to your mana pool, where X is the number of Islands target opponent controls.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="ru-RU"><![CDATA[At the beginning of each of your main phases, if you haven’t added mana to your mana pool with this ability this turn, you may add up to X mana of any one color to your mana pool, where X is the number of Islands target opponent controls.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="pt-BR"><![CDATA[At the beginning of each of your main phases, if you haven’t added mana to your mana pool with this ability this turn, you may add up to X mana of any one color to your mana pool, where X is the number of Islands target opponent controls.]]></LOCALISED_TEXT>
<TRIGGER value="BEGINNING_OF_PLAYERS_STEP" simple_qualifier="controller">
return MTG():GetStep() == STEP_MAIN_1 or MTG():GetStep() == STEP_MAIN_2
</TRIGGER>
<MAY />
<TARGET tag="CARD_QUERY_CHOOSE_OPPONENT" definition="0" compartment="0" count="1" />
<TARGET_DEFINITION id="0">
local filter = ClearFilter()
filter:SetFilterType( FILTER_TYPE_PLAYERS )
filter:Add( FE_TEAM, OP_NOT, EffectController():GetTeam() )
</TARGET_DEFINITION>
<PLAY_TIME_ACTION>
RSN_MarkManaAbilityStart()
local oPlayer = EffectController()
local oCard = EffectSource()
if (oPlayer ~= nil) then
oPlayer:BeginNewMultipleChoice()
oPlayer:AddMultipleChoiceAnswer( "RSN_MODE_PRODUCE_W" )
oPlayer:AddMultipleChoiceAnswer( "RSN_MODE_PRODUCE_U" )
oPlayer:AddMultipleChoiceAnswer( "RSN_MODE_PRODUCE_B" )
oPlayer:AddMultipleChoiceAnswer( "RSN_MODE_PRODUCE_R" )
oPlayer:AddMultipleChoiceAnswer( "RSN_MODE_PRODUCE_G" )
oPlayer:AskMultipleChoiceQuestion( "MODE_CHOOSE_ONE", oCard )
end
</PLAY_TIME_ACTION>
<RESOLUTION_TIME_ACTION>
local chosen_player = EffectDC():Get_Targets(0):Get_PlayerPtr(0)
local filter = ClearFilter()
filter:Add( FE_SUBTYPE, OP_IS, LAND_TYPE_ISLAND )
filter:Add( FE_CONTROLLER, OP_IS, chosen_player)
local total = filter:Count()
local nColour = EffectController():GetMultipleChoiceResult() + 1
if (nColour == COLOUR_BLACK) then
RSN_Produce( "{B}", total )
elseif (nColour == COLOUR_BLUE) then
RSN_Produce( "{U}", total )
elseif (nColour == COLOUR_GREEN) then
RSN_Produce( "{G}", total )
elseif (nColour == COLOUR_RED) then
RSN_Produce( "{R}", total )
elseif (nColour == COLOUR_WHITE) then
RSN_Produce( "{W}", total )
end
</RESOLUTION_TIME_ACTION>
<RESOLUTION_TIME_ACTION>
RSN_EliminateExtraManaTokens()
S_DisplayManaPool(EffectController())
</RESOLUTION_TIME_ACTION>
</TRIGGERED_ABILITY>
<STATIC_ABILITY>
<CONTINUOUS_ACTION layer="0">
RSN_ClearCanProduceMana()
RSN_MarkCanProduceMana( "{W}{U}{B}{R}{G}" )
</CONTINUOUS_ACTION>
</STATIC_ABILITY>
<TRIGGERED_ABILITY forced_skip="1" replacement_effect="1">
<TRIGGER value="BEGINNING_OF_STEP" pre_trigger="1" />
<RESOLUTION_TIME_ACTION>
RSN_ClearProducedMana()
</RESOLUTION_TIME_ACTION>
</TRIGGERED_ABILITY>
<TOKEN_REGISTRATION reservation="1" type="RSN_TOKEN_MANA_W" />
<TOKEN_REGISTRATION reservation="1" type="RSN_TOKEN_MANA_U" />
<TOKEN_REGISTRATION reservation="1" type="RSN_TOKEN_MANA_B" />
<TOKEN_REGISTRATION reservation="1" type="RSN_TOKEN_MANA_R" />
<TOKEN_REGISTRATION reservation="1" type="RSN_TOKEN_MANA_G" />
<AUTHOR><![CDATA[zhupiter]]></AUTHOR>
<EDITORS><![CDATA[zhupiter]]></EDITORS>
<DATE><![CDATA[13-9-15]]></DATE>
</CARD_V2>