Re: Community Wad
Alright, so after some testing, it appears the game can't handle (or I was doing it wrong) the idea of performing a card query before untapping during the player's turn. No matter how I handled it, it always untapped the cards, and THEN asked which ones to untap. This does basically the same thing as the code I posted before, but with two alterations.cenarius wrote:I'm sorry, i was so focused on "Withdraw" that i forgot to test your code for "Static Orb".Xander9009 wrote:I fixed that error (because I noticed it) but apparently only corrected my local copy and not the copy in my post. Should be MTG():GetNthStartingPlayer().
It's tested now, but it doesn't work, it still remains asking for me to do something, but now i don't know because i can't do anything now, before i was able to select things, now nothing.
Here's the code, with some syntaxis errors fixed, tough i don't know if my corrections are ok (for example, on the "filter" block there was an "end" missing for the "if" you used so i just putted it on the lowest part). That, and the log system of the game doesn't give me any messages so i can "dig". Please take a look at this:There is no rush just take your time. I would have given a fight but you use the "chest" method and i really don't know how to handle them.
- Code: Select all
<STATIC_ABILITY linked_ability_group="1">
<LOCALISED_TEXT LanguageCode="en-US"><![CDATA[As long as Static Orb is untapped, players can’t untap more than two permanents during their untap steps.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="fr-FR"><![CDATA[Si l’Orbe statique est dégagée, les joueurs ne peuvent pas dégager plus de deux permanents pendant leur étape de dégagement.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="es-ES"><![CDATA[Mientras la Esfera estática esté enderezada, los jugadores no pueden enderezar más de dos permanentes durante su fase de enderezar.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="de-DE"><![CDATA[Wenn die Statische Sphäre nicht getappt ist, können Spieler nicht mehr als zwei bleibende Karten während ihres Enttappsegments enttappen.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="it-IT"><![CDATA[Se il Globo della Staticità è STAPpato, i giocatori non possono STAPpare più di due permanenti durante il proprio STAP.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="jp-JA"><![CDATA[As long as Static Orb is untapped, players can’t untap more than two permanents during their untap steps.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="ko-KR"><![CDATA[As long as Static Orb is untapped, players can’t untap more than two permanents during their untap steps.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="ru-RU"><![CDATA[As long as Static Orb is untapped, players can’t untap more than two permanents during their untap steps.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="pt-BR"><![CDATA[As long as Static Orb is untapped, players can’t untap more than two permanents during their untap steps.]]></LOCALISED_TEXT>
<FILTER filter_id="0">
local NumPlayers = MTG():GetNumberOfStartingPlayers()
local PlayerID = -1
for i=0,NumPlayers-1 do
if MTG():GetNthStartingPlayer(i) ~= nil and MTG():GetNthStartingPlayer(i):MyTurn() then
PlayerID = i
end
end
if PlayerID >= 0 then
local filter = ClearFilter()
filter:Add(FE_TEAM, OP_IS, MTG():GetNthStartingPlayer(PlayerID):GetTeam())
local subfilter = filter:AddSubFilter_Or()
subfilter:Add(FE_TYPE, OP_IS, CARD_TYPE_ARTIFACT)
subfilter:Add(FE_TYPE, OP_IS, CARD_TYPE_CREATURE)
subfilter:Add(FE_TYPE, OP_IS, CARD_TYPE_ENCHANTMENT)
subfilter:Add(FE_TYPE, OP_IS, CARD_TYPE_LAND)
subfilter:Add(FE_TYPE, OP_IS, CARD_TYPE_PLANESWALKER)
end
</FILTER>
<CONTINUOUS_ACTION layer="8" filter_id="0">
local Card = FilteredCard()
if Card ~= nil and EffectSource() ~= nil and EffectSource():IsTapped() == false then
local Found = false
local IgnoreChest = LinkedDC()
for i=0,3 do
local IgnoredPlayerChest = IgnoreChest:Get_Chest(i)
if IgnoredPlayerChest ~= nil then
local IgnoredCardZero = IgnoredPlayerChest:Get_CardPtr(0)
local IgnoredCardOne = IgnoredPlayerChest:Get_CardPtr(1)
if ( (IgnoredCardZero ~= nil and IgnoredCardZero == Card) or (IgnoredCardOne ~= nil and IgnoredCardOne == Card) ) then
Found = true
end
end
end
if Found == false then
Card:GetCurrentCharacteristics():Bool_Set( CHARACTERISTIC_DOESNT_UNTAP, 1 )
end
end
</CONTINUOUS_ACTION>
</STATIC_ABILITY>
<TRIGGERED_ABILITY linked_ability_group="1" replacement_effect="1" priority="-10">
<TRIGGER value="BEGINNING_OF_PLAYERS_STEP" >
return TriggerPlayer() ~= nil and MTG():GetStep() == STEP_UNTAP and EffectSource() ~= nil and EffectSource():IsTapped() == false
</TRIGGER>
<RESOLUTION_TIME_ACTION>
local player = TriggerPlayer()
local filter = ClearFilter()
filter:Add(FE_CONTROLLER, OP_IS, player)
local subfilter = filter:AddSubFilter_Or()
subfilter:Add(FE_TYPE, OP_IS, CARD_TYPE_ARTIFACT)
subfilter:Add(FE_TYPE, OP_IS, CARD_TYPE_CREATURE)
subfilter:Add(FE_TYPE, OP_IS, CARD_TYPE_ENCHANTMENT)
subfilter:Add(FE_TYPE, OP_IS, CARD_TYPE_LAND)
subfilter:Add(FE_TYPE, OP_IS, CARD_TYPE_PLANESWALKER)
local Count = filter:Count()
if Count > 0 then
player:SetItemCount(2)
player:SetItemPrompt( 0, "CARD_QUERY_CHOOSE_PERMANENT_TO_UNTAP" )
player:SetItemPrompt( 1, "CARD_QUERY_CHOOSE_PERMANENT_TO_UNTAP" )
player:ChooseItems( EffectDC():Make_Targets(0), QUERY_FLAG_UP_TO )
end
</RESOLUTION_TIME_ACTION>
<RESOLUTION_TIME_ACTION>
local TargetChest = EffectDC():Get_Targets(0)
if TriggerPlayer() ~= nil and TargetChest ~= nil then
local NumPlayers = MTG():GetNumberOfStartingPlayers()
local PlayerID = -1
for i=0,NumPlayers-1 do
if MTG():GetNthStartingPlayer(i) ~= nil and MTG():GetNthStartingPlayer(i) == TriggerPlayer() then
PlayerID = i
end
end
if PlayerID >= 0 then
local IgnoreChest = LinkedDC():Make_Chest(PlayerID)
local TargetZero = TargetChest:Get_CardPtr(0)
if TargetZero ~= nil then
IgnoreChest:Set_CardPtr(0, TargetZero)
end
local TargetOne = TargetChest:Get_CardPtr(1)
if TargetOne ~= nil then
IgnoreChest:Set_CardPtr(1, TargetOne)
end
end
end
</RESOLUTION_TIME_ACTION>
</TRIGGERED_ABILITY>
1: It triggers at the end of every turn rather than the beginning. It simply asks the next player which cards they want to untap, and stores those cards (and everyone else's) in the LinkedDC().
2: It grants the ability at all times to all cards not in the LinkedDC(). This way, the cards DO have the doesn't untap characteristic by the time the player's turn rolls around. (Otherwise, even though it's a static ability, it doesn't take effect until after the untap has already happened. It's almost like the game untaps everything before sending out triggers and updates for the turn change.)
It's now in the CW since it works, but yeah, this card turned out a bit more complicated than it first seemed. Either way, my original idea remains the same, with the only real problems being untapping fewer than necessary permanents and probably 2HG games.
- Static Orb - Tested | Open
from the casting cost and put it as a generic cost that bases the cost off of the CMC of the selected target. It won't look as nice that way and you will need to adjust the text of the card so that the player knows the