Board index Programs with AI or Rules Enforcement Magic: The Gathering - Duels of the Planeswalkers Programming Talk
Mishra's Workshop: possible approach (open to enhancements)
Moderator: CCGHQ Admins
Mishra's Workshop: possible approach (open to enhancements)
by thefiremind » 15 Jan 2013, 12:38
I just thought about a possible way to code Mishra's Workshop. It still has some problems, but I hope it can be an inspiration for enhancements and eventually a bug-free version (not necessarily from me ).
This approach still has problems:
If anybody comes with a good idea, feel free to experiment.
I attached the new Mishra's Workshop art, used for the MTGO Cube version (much better than the original).
- Code: Select all
<?xml version='1.0'?>
<CARD_V2>
<FILENAME text="MISHRAS_WORKSHOP_202578" />
<CARDNAME text="MISHRAS_WORKSHOP" />
<TITLE>
<LOCALISED_TEXT LanguageCode="en-US"><![CDATA[Mishra’s Workshop]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="it-IT"><![CDATA[Mishra’s Workshop]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="de-DE"><![CDATA[Mishra’s Workshop]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="fr-FR"><![CDATA[Mishra’s Workshop]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="es-ES"><![CDATA[Mishra’s Workshop]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="jp-JA"><![CDATA[Mishra’s Workshop]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="ko-KR"><![CDATA[Mishra’s Workshop]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="ru-RU"><![CDATA[Mishra’s Workshop]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="pt-BR"><![CDATA[Mishra’s Workshop]]></LOCALISED_TEXT>
</TITLE>
<MULTIVERSEID value="202578" />
<ARTID value="A202578" />
<ARTIST name="Sam Burley" />
<CASTING_COST cost="" />
<FLAVOURTEXT>
<LOCALISED_TEXT LanguageCode="en-US"><![CDATA[Though he eventually came to despise Tocasia, Mishra listened well to her lessons on clarity of purpose. Unlike his brother, he focused his mind on a single goal.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="it-IT"><![CDATA[Though he eventually came to despise Tocasia, Mishra listened well to her lessons on clarity of purpose. Unlike his brother, he focused his mind on a single goal.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="de-DE"><![CDATA[Though he eventually came to despise Tocasia, Mishra listened well to her lessons on clarity of purpose. Unlike his brother, he focused his mind on a single goal.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="fr-FR"><![CDATA[Though he eventually came to despise Tocasia, Mishra listened well to her lessons on clarity of purpose. Unlike his brother, he focused his mind on a single goal.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="es-ES"><![CDATA[Though he eventually came to despise Tocasia, Mishra listened well to her lessons on clarity of purpose. Unlike his brother, he focused his mind on a single goal.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="jp-JA"><![CDATA[Though he eventually came to despise Tocasia, Mishra listened well to her lessons on clarity of purpose. Unlike his brother, he focused his mind on a single goal.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="ko-KR"><![CDATA[Though he eventually came to despise Tocasia, Mishra listened well to her lessons on clarity of purpose. Unlike his brother, he focused his mind on a single goal.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="ru-RU"><![CDATA[Though he eventually came to despise Tocasia, Mishra listened well to her lessons on clarity of purpose. Unlike his brother, he focused his mind on a single goal.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="pt-BR"><![CDATA[Though he eventually came to despise Tocasia, Mishra listened well to her lessons on clarity of purpose. Unlike his brother, he focused his mind on a single goal.]]></LOCALISED_TEXT>
</FLAVOURTEXT>
<TYPE metaname="Land" />
<EXPANSION value="ME4" />
<RARITY metaname="R" />
<STATIC_ABILITY filter_zone="ZONE_HAND">
<LOCALISED_TEXT LanguageCode="en-US"><![CDATA[{T}: Add {3} to your mana pool. Spend this mana only to cast artifact spells.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="it-IT"><![CDATA[{T}: Add {3} to your mana pool. Spend this mana only to cast artifact spells.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="de-DE"><![CDATA[{T}: Add {3} to your mana pool. Spend this mana only to cast artifact spells.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="fr-FR"><![CDATA[{T}: Add {3} to your mana pool. Spend this mana only to cast artifact spells.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="es-ES"><![CDATA[{T}: Add {3} to your mana pool. Spend this mana only to cast artifact spells.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="jp-JA"><![CDATA[{T}: Add {3} to your mana pool. Spend this mana only to cast artifact spells.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="ko-KR"><![CDATA[{T}: Add {3} to your mana pool. Spend this mana only to cast artifact spells.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="ru-RU"><![CDATA[{T}: Add {3} to your mana pool. Spend this mana only to cast artifact spells.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="pt-BR"><![CDATA[{T}: Add {3} to your mana pool. Spend this mana only to cast artifact spells.]]></LOCALISED_TEXT>
<FILTER>
return FilteredCard() ~= nil and
FilteredCard():GetCardType():Test( CARD_TYPE_ARTIFACT ) ~= 0 and
FilteredCard():GetPlayer() == EffectController() and
FilteredCard():GetConvertedManaCost() > 2
</FILTER>
<CONTINUOUS_ACTION layer="8">
if FilteredCard() ~= nil and Object():Tapped() == 0 then
FilteredCard():DecreaseCost( 3 )
end
</CONTINUOUS_ACTION>
</STATIC_ABILITY>
<TRIGGERED_ABILITY forced_skip="1">
<TRIGGER value="SPELL_PLAYED" simple_qualifier="objectyoucontrol">
return Object():Tapped() == 0 and
TriggerObject():GetCardType():Test( CARD_TYPE_ARTIFACT ) ~= 0 and
TriggerObject():GetConvertedManaCost() > 2
</TRIGGER>
<PLAY_TIME_ACTION>
MTG():FireTrigger( TRIGGER_BECAME_TAPPED_FOR_MANA, Object() )
</PLAY_TIME_ACTION>
<RESOLUTION_TIME_ACTION>
if EffectSource() ~= nil then
EffectSource():Tap()
end
</RESOLUTION_TIME_ACTION>
</TRIGGERED_ABILITY>
<AI_BASE_SCORE score="600" zone="ZONE_IN_PLAY" />
</CARD_V2>
This approach still has problems:
- If I have only this land, maybe I want to cast an artifact that costs less than with it.
- With multiple Mishra's Workshops under the same player's control, they would be all tapped no matter what's the cost of the artifact that has been cast.
If anybody comes with a good idea, feel free to experiment.
I attached the new Mishra's Workshop art, used for the MTGO Cube version (much better than the original).
- Attachments
-
- A202578.zip
- Sam Burley's art for Mishra's Workshop
- (96.68 KiB) Downloaded 209 times
< Former DotP 2012/2013/2014 modder >
Currently busy with life...
Currently busy with life...
-
thefiremind - Programmer
- Posts: 3515
- Joined: 07 Nov 2011, 10:55
- Has thanked: 118 times
- Been thanked: 721 times
1 post
• Page 1 of 1
Who is online
Users browsing this forum: No registered users and 21 guests