Re: gorem2k mod
by gorem2k
maybe I will try again with fake planeswalkers sometimes but right now I'm working day and night on Ghostly Prison. it's a total mess, I can't even make the AI deal damage and I had to put all sorts of weird characteristics, an AddPlayScore, full of LinkedDC and other illogical stuff
just to make it pay 2, and well, I'm dead tired of coding! I need a break but I will get back asap. this card is a nightmare I tell you!
here is what I'M talking about....
here is what I'M talking about....
- Ghostly Prison | Open
- Code: Select all
<?xml version='1.0'?>
<CARD_V2 ExportVersion="1">
<FILENAME text="GHOSTLY_PRISON_444275264" />
<CARDNAME text="GHOSTLY_PRISON" />
<TITLE>
<LOCALISED_TEXT LanguageCode="en-US"><![CDATA[Ghostly Prison]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="fr-FR"><![CDATA[Prison fantomale]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="es-ES"><![CDATA[Prisión fantasmagórica]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="de-DE"><![CDATA[Gespenstisches Gefängnis]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="it-IT"><![CDATA[Prigione Spettrale]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="jp-JA"><![CDATA[亡霊の牢獄]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="ko-KR"><![CDATA[Ghostly Prison]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="ru-RU"><![CDATA[Ghostly Prison]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="pt-BR"><![CDATA[Ghostly Prison]]></LOCALISED_TEXT>
</TITLE>
<MULTIVERSEID value="444275264" />
<ARTID value="444275264" />
<ARTIST name="Wayne England" />
<CASTING_COST cost="{W}" />
<FLAVOURTEXT>
<LOCALISED_TEXT LanguageCode="en-US"><![CDATA[“May the memory of our fallen heroes ensnare the violent hearts of lesser men.”—Great Threshold of Monserkat inscription]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="fr-FR"><![CDATA[« Que la mémoire de nos héros tombés ensorcelle les cœurs violents des impurs. »—Inscription du Grand Seuil de Monserkat]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="es-ES"><![CDATA[“Que el recuerdo de nuestros héroes caídos atrape los corazones violentos de hombres menos valientes.”—Inscripción en el Gran Umbral de Monserkat]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="de-DE"><![CDATA[„Möge die Erinnerung an unsere gefallenen Helden die ungestümen Seelen niederer Männer bändigen.”—Inschrift der Großen Schwelle von Monserkat]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="it-IT"><![CDATA[“Possa il ricordo dei nostri eroi caduti intrappolare i cuori violenti degli uomini inferiori.”—Iscrizione sulla Grande Soglia di Monserkat]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="jp-JA"><![CDATA[「死せる英雄たちの記憶が、小さき者の逸る心を虜にしますように。」 ――モンザーカットの大門口に刻まれた文句]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="ko-KR"><![CDATA[“May the memory of our fallen heroes ensnare the violent hearts of lesser men.”—Great Threshold of Monserkat inscription]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="ru-RU"><![CDATA[“May the memory of our fallen heroes ensnare the violent hearts of lesser men.”—Great Threshold of Monserkat inscription]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="pt-BR"><![CDATA[“May the memory of our fallen heroes ensnare the violent hearts of lesser men.”—Great Threshold of Monserkat inscription]]></LOCALISED_TEXT>
</FLAVOURTEXT>
<TYPE metaname="Enchantment" />
<EXPANSION value="PC2" />
<RARITY metaname="U" />
<TRIGGERED_ABILITY linked_ability_group="1">
<LOCALISED_TEXT LanguageCode="en-US"><![CDATA[Creatures can’t attack you unless their controller pays {2} for each creature he or she controls that’s attacking you.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="fr-FR"><![CDATA[Les créatures ne peuvent pas vous attaquer à moins que leur contrôleur ne paie {2} pour chaque créature qu’il contrôle qui vous attaque.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="es-ES"><![CDATA[Las criaturas no pueden atacarte a menos que su controlador pague {2} por cada criatura que controla que te está atacando.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="de-DE"><![CDATA[Kreaturen können dich nicht angreifen, falls ihr Beherrscher nicht für jede dich angreifende Kreatur, die er kontrolliert, {2} bezahlt.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="it-IT"><![CDATA[Le creature non possono attaccarti a meno che il loro controllore non paghi {2} per ogni creatura che controlla che ti sta attaccando.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="jp-JA"><![CDATA[クリーチャーは、それのコントローラーが、そのプレイヤーがコントロールするあなたを攻撃しているクリーチャー1体につき{2}を支払わないかぎり、あなたを攻撃できない。]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="ko-KR"><![CDATA[Creatures can’t attack you unless their controller pays {2} for each creature he or she controls that’s attacking you.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="ru-RU"><![CDATA[Creatures can’t attack you unless their controller pays {2} for each creature he or she controls that’s attacking you.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="pt-BR"><![CDATA[Creatures can’t attack you unless their controller pays {2} for each creature he or she controls that’s attacking you.]]></LOCALISED_TEXT>
<TRIGGER value="BEGINNING_OF_PLAYERS_STEP">
local player = TriggerPlayer()
if player:GetTeam() ~= EffectController():GetTeam() and
EffectController():MyTurn() == false and
LinkedDC():Get_Int(1) < 1 and
MTG():GetStep() == STEP_BEGIN_COMBAT then
local filter = ClearFilter()
filter:Add( FE_TYPE, OP_IS, CARD_TYPE_CREATURE )
filter:Add( FE_CONTROLLER, OP_IS, player )
filter:SetZone( ZONE_BATTLEFIELD )
if filter:CountStopAt(1) == 1 then
return true
end
end
return false
</TRIGGER>
<RESOLUTION_TIME_ACTION>
local player = TriggerPlayer()
if player ~= nil then
local filter = ClearFilter()
filter:Add( FE_TYPE, OP_IS, CARD_TYPE_CREATURE )
filter:Add( FE_CONTROLLER, OP_IS, player )
filter:SetZone( ZONE_BATTLEFIELD )
local creatures = filter:Count()
if creatures > 0 then
local filter = ClearFilter()
filter:Add( FE_CARD_NAME, OP_IS, EffectSource() )
filter:Add( FE_CONTROLLER, OP_NOT, player )
filter:SetZone( ZONE_BATTLEFIELD )
local instances = filter:Count()
local max_creatures = 0
local min_cost = (2 * instances)
LinkedDC():Set_Int(0, min_cost)
for i = 0,(creatures-1) do
if player:CanPayManaCost("{" .. min_cost .. "}") then
max_creatures = max_creatures + 1
min_cost = min_cost + min_cost
end
end
local filter = ClearFilter()
filter:Add( FE_TYPE, OP_IS, CARD_TYPE_CREATURE )
filter:Add( FE_CONTROLLER, OP_IS, player )
filter:SetZone( ZONE_BATTLEFIELD )
local i = 0
player:SetItemCount( max_creatures )
while i < max_creatures do
player:SetItemPrompt (i, "CARD_QUERY_CHOOSE_CREATURE_YOU_CONTROL")
i = i + 1
end
player:ChooseItems( EffectDC():Make_Targets(1), QUERY_FLAG_UP_TO )
end
end
</RESOLUTION_TIME_ACTION>
<RESOLUTION_TIME_ACTION>
local player = TriggerPlayer()
if player ~= nil then
local filter = ClearFilter()
filter:Add( FE_TYPE, OP_IS, CARD_TYPE_CREATURE )
filter:Add( FE_CONTROLLER, OP_IS, player )
filter:SetZone( ZONE_BATTLEFIELD )
local creatures = filter:Count()
if creatures > 0 then
local filter = ClearFilter()
MTG():ClearFilterMark()
filter:Add( FE_TYPE, OP_IS, CARD_TYPE_CREATURE )
filter:Add( FE_CONTROLLER, OP_IS, player )
filter:SetZone( ZONE_BATTLEFIELD )
local min_cost = LinkedDC():Get_Int(0)
local total_cost = 0
for i = 0,(creatures-1) do
local target_card = EffectDC():Get_Targets(1):Get_CardPtr(i)
if target_card ~= nil then
target_card:MarkForFilter()
player:AddPlayScore(150)
total_cost = total_cost + min_cost
LinkedDC():Set_Int(1, total_cost)
end
end
end
end
</RESOLUTION_TIME_ACTION>
<RESOLUTION_TIME_ACTION>
local player = TriggerPlayer()
if player ~= nil then
local total_cost = LinkedDC():Get_Int(1)
if total_cost ~= 0 then
MTG():MessageAllPlayers("Paying {" .. total_cost .. "}")
player:PayManaCost("{" .. total_cost .. "}")
end
end
</RESOLUTION_TIME_ACTION>
</TRIGGERED_ABILITY>
-- unpaid creatures can't attack
<STATIC_ABILITY linked_ability_group="1">
<FILTER filter_id="0">
local filter = ClearFilter()
filter:Add(FE_TYPE, OP_IS, CARD_TYPE_CREATURE )
filter:Add(FE_CONTROLLER, OP_NOT, EffectController())
</FILTER>
<CONTINUOUS_ACTION layer="8" filter_id="0" linked_ability_group="1">
if FilteredCard() ~= nil then
if EffectController():MyTurn() == false and
MTG():GetStep() > STEP_BEGIN_COMBAT and MTG():GetStep() < STEP_DECLARE_BLOCKERS then
local characteristics = FilteredCard():GetCurrentCharacteristics()
characteristics:Bool_Set( CHARACTERISTIC_CANT_ATTACK, 1 )
characteristics:Bool_Set( CHARACTERISTIC_FLYING, 0 )
characteristics:Bool_Set( CHARACTERISTIC_MUST_ATTACK, 0 ) -- REMOVE!
end
end
</CONTINUOUS_ACTION>
<DURATION>
return EffectSource() == nil
</DURATION>
</STATIC_ABILITY>
-- paid creature can attack
<STATIC_ABILITY linked_ability_group="1">
<FILTER filter_id="1">
local filter = ClearFilter()
filter:SetMarkedObjectsOnly() -- should also add a condition for native CANT_ATTACK creatures
</FILTER>
<CONTINUOUS_ACTION layer="8" filter_id="1" linked_ability_group="1">
if FilteredCard() ~= nil then
if MTG():GetStep() ~= STEP_DECLARE_BLOCKERS then
local characteristics = FilteredCard():GetCurrentCharacteristics()
characteristics:Bool_Set( CHARACTERISTIC_CANT_ATTACK, 0 )
characteristics:Bool_Set( CHARACTERISTIC_FLYING, 1 )
characteristics:Bool_Set( CHARACTERISTIC_MUST_ATTACK, 1 ) -- REMOVE!
end
end
</CONTINUOUS_ACTION>
<DURATION>
return EffectSource() == nil
</DURATION>
</STATIC_ABILITY>
<TRIGGERED_ABILITY replacement_effect="1">
<TRIGGER value="BEGINNING_OF_PLAYERS_STEP" pre_trigger="1">
return TriggerPlayer():GetTeam() ~= EffectController():GetTeam() and MTG():GetPhase() ~= PHASE_COMBAT
</TRIGGER>
<RESOLUTION_TIME_ACTION>
local player = TriggerPlayer()
if player ~= nil then
local filter = ClearFilter()
MTG():ClearFilterMark()
LinkedDC():Int_Clear(0)
LinkedDC():Int_Clear(1)
end
</RESOLUTION_TIME_ACTION>
</TRIGGERED_ABILITY>
<AI_BASE_SCORE score="600" zone="ZONE_BATTLEFIELD" />
</CARD_V2>
)