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



Spreading Seas
Moderator: CCGHQ Admins
Spreading Seas
by --Dream-- » 06 Sep 2012, 11:37
Spreading Seas - is it possible to code? Do I need to replace the enchanted land with an island and then "transform" it back if the enchantament is removed?
Re: Spreading Seas
by thefiremind » 06 Sep 2012, 12:06
If you clone an Island, you would change the enchanted land's name to Island and give it the basic supertype, which shouldn't happen. But I'm afraid it would be the closest you can get to the real deal.
The proper method should be:
- remove the existing land types (possible)
- remove all abilities (never used the LoseAllAbilities function but it should work)
- add the Island type (possible)
- if it's not basic (in that case it would automatically gain the mana ability for being a basic Island), grant it the mana ability for producing
... too bad this can't be done, because when the game evaluates a card that grants a mana ability without having an active mana ability itself, it crashes after a few seconds.
The proper method should be:
- remove the existing land types (possible)
- remove all abilities (never used the LoseAllAbilities function but it should work)
- add the Island type (possible)
- if it's not basic (in that case it would automatically gain the mana ability for being a basic Island), grant it the mana ability for producing

< 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: 722 times
Re: Spreading Seas
by RiiakShiNal » 06 Sep 2012, 12:27
Though in this case you could give the mana ability to the enchantment and whenever the enchantment is tapped (for mana) it forces the land it enchants to tap. Though this could create other complications such as an Icy Manipulator tapping the land (it won't tap the enchantment which actually produces the mana unless an ability is added that taps the enchantment when the land is tapped). Or something that would untap all lands or a target land (it wouldn't untap the enchantment which is actually where the mana is coming from unless you coded the enchantment to also untap when the land it enchants is untapped).thefiremind wrote:- if it's not basic (in that case it would automatically gain the mana ability for being a basic Island), grant it the mana ability for producing... too bad this can't be done, because when the game evaluates a card that grants a mana ability without having an active mana ability itself, it crashes after a few seconds.
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: Spreading Seas
by --Dream-- » 06 Sep 2012, 13:08
Hmm, I like this idea, I'm going to try it out. Is there any card already coded that is remotely similar to this one, i.e., that messes with land types and the sorts?RiiakShiNal wrote:Though in this case you could give the mana ability to the enchantment and whenever the enchantment is tapped (for mana) it forces the land it enchants to tap. Though this could create other complications such as an Icy Manipulator tapping the land (it won't tap the enchantment which actually produces the mana unless an ability is added that taps the enchantment when the land is tapped). Or something that would untap all lands or a target land (it wouldn't untap the enchantment which is actually where the mana is coming from unless you coded the enchantment to also untap when the land it enchants is untapped).thefiremind wrote:- if it's not basic (in that case it would automatically gain the mana ability for being a basic Island), grant it the mana ability for producing... too bad this can't be done, because when the game evaluates a card that grants a mana ability without having an active mana ability itself, it crashes after a few seconds.
Re: Spreading Seas
by RiiakShiNal » 06 Sep 2012, 13:46
Well there is at least one card that adds a land type (Life and Limb) though it does not do so in the same method and the best alternative there was to give the saprolings the basic supertype (even though you're not supposed to) due to a single enchantment needing to give all saprolings the ability to be tapped for green mana. As far as I know there are no cards that have been currently written that tap/untap based on a different card tapping/untapping, so that will need to be coded from scratch.--Dream-- wrote:Hmm, I like this idea, I'm going to try it out. Is there any card already coded that is remotely similar to this one, i.e., that messes with land types and the sorts?
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: Spreading Seas
by --Dream-- » 06 Sep 2012, 15:47
Here's what I have so far
I tested it with a Merfolk deck I made (because of all the creatures with islandwalk) and it doesnt seem to work (AI was able to block my creatures with islandwalk after I enchanted one of its lands with Spreading Seas)
- Code: Select all
<?xml version='1.0'?>
<CARD_V2>
<FILENAME text="SPREADING_SEAS_190405" />
<CARDNAME text="SPREADING_SEAS" />
<TITLE>
<LOCALISED_TEXT LanguageCode="en-US"><![CDATA[Spreading Seas]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="de-DE"><![CDATA[Spreading Seas]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="es-ES"><![CDATA[Spreading Seas]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="fr-FR"><![CDATA[Spreading Seas]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="it-IT"><![CDATA[Spreading Seas]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="jp-JA"><![CDATA[Spreading Seas]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="ko-KR"><![CDATA[Spreading Seas]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="ru-RU"><![CDATA[Spreading Seas]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="pt-BR"><![CDATA[Spreading Seas]]></LOCALISED_TEXT>
</TITLE>
<MULTIVERSEID value="190405" />
<ARTID value="190405" />
<ARTIST name="Jung Park" />
<CASTING_COST cost="{1}{U}" />
<FLAVOURTEXT>
<LOCALISED_TEXT LanguageCode="en-US"><![CDATA[Most inhabitants of Zendikar have given up on the idea of an accurate map.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="de-DE"><![CDATA[Most inhabitants of Zendikar have given up on the idea of an accurate map.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="es-ES"><![CDATA[Most inhabitants of Zendikar have given up on the idea of an accurate map.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="fr-FR"><![CDATA[Most inhabitants of Zendikar have given up on the idea of an accurate map.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="it-IT"><![CDATA[Most inhabitants of Zendikar have given up on the idea of an accurate map.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="jp-JA"><![CDATA[Most inhabitants of Zendikar have given up on the idea of an accurate map.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="ko-KR"><![CDATA[Most inhabitants of Zendikar have given up on the idea of an accurate map.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="ru-RU"><![CDATA[Most inhabitants of Zendikar have given up on the idea of an accurate map.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="pt-BR"><![CDATA[Most inhabitants of Zendikar have given up on the idea of an accurate map.]]></LOCALISED_TEXT>
</FLAVOURTEXT>
<TYPE metaname="Enchantment" />
<SUB_TYPE metaname="Aura" />
<EXPANSION value="DPG" />
<RARITY metaname="C" />
<STATIC_ABILITY attach_filter="1" filter_zone="ZONE_IN_PLAY">
<LOCALISED_TEXT LanguageCode="en-US"><![CDATA[Enchant land]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="it-IT"><![CDATA[Incanta terra]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="de-DE"><![CDATA[Landverzauberung]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="fr-FR"><![CDATA[Enchanter : terrain]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="es-ES"><![CDATA[Encantar tierra.]]></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[Encantar terreno]]></LOCALISED_TEXT>
<CONTINUOUS_ACTION>
local attach_filter = Object():AttachmentFilter_Get()
attach_filter:Clear()
attach_filter:AddCardType( CARD_TYPE_LAND )
</CONTINUOUS_ACTION>
</STATIC_ABILITY>
<TRIGGERED_ABILITY auto_skip="1" filter_zone="ZONE_IN_PLAY">
<LOCALISED_TEXT LanguageCode="en-US"><![CDATA[When Spreading Seas enters the battlefield, draw a card.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="de-DE"><![CDATA[When Spreading Seas enters the battlefield, draw a card.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="es-ES"><![CDATA[When Spreading Seas enters the battlefield, draw a card.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="fr-FR"><![CDATA[When Spreading Seas enters the battlefield, draw a card.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="it-IT"><![CDATA[When Spreading Seas enters the battlefield, draw a card.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="jp-JA"><![CDATA[When Spreading Seas enters the battlefield, draw a card.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="ko-KR"><![CDATA[When Spreading Seas enters the battlefield, draw a card.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="ru-RU"><![CDATA[When Spreading Seas enters the battlefield, draw a card.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="pt-BR"><![CDATA[When Spreading Seas enters the battlefield, draw a card.]]></LOCALISED_TEXT>
<TRIGGER value="ZONECHANGE_END" simple_qualifier="self" to_zone="ZONE_IN_PLAY" />
<RESOLUTION_TIME_ACTION>
local NumCards = 1
while (NumCards > 0) do
NumCards = NumCards - 1
EffectController():DrawCard()
end
</RESOLUTION_TIME_ACTION>
</TRIGGERED_ABILITY>
<STATIC_ABILITY filter_zone="ZONE_IN_PLAY">
<LOCALISED_TEXT LanguageCode="en-US"><![CDATA[Enchanted land is an Island.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="de-DE"><![CDATA[Enchanted land is an Island.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="es-ES"><![CDATA[Enchanted land is an Island.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="fr-FR"><![CDATA[Enchanted land is an Island.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="it-IT"><![CDATA[Enchanted land is an Island.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="jp-JA"><![CDATA[Enchanted land is an Island.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="ko-KR"><![CDATA[Enchanted land is an Island.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="ru-RU"><![CDATA[Enchanted land is an Island.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="pt-BR"><![CDATA[Enchanted land is an Island.]]></LOCALISED_TEXT>
<CONTINUOUS_ACTION layer="4">
local parent = Object():GetParent()
if parent ~= nil then
parent:GetCurrentCharacteristics():LoseAllAbilities()
parent:GetCurrentCharacteristics():Badge_Clear()
parent:GetCurrentCharacteristics():SubType_GetWritable(parent):Set( Island, parent )
end
</CONTINUOUS_ACTION>
</STATIC_ABILITY>
<MANA_ABILITY resource_id="1" filter_zone="ZONE_IN_PLAY">
<LOCALISED_TEXT LanguageCode="en-US"><![CDATA[{T}: Add {U} to your mana pool.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="de-DE"><![CDATA[{T}: Erhöhe deinen Manavorrat um {U}.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="es-ES"><![CDATA[{T}: Agrega {U} a tu reserva de maná.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="fr-FR"><![CDATA[{T}: Ajoutez {U} à votre réserve.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="it-IT"><![CDATA[{T}: Aggiungi {U} alla tua riserva di mana.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="jp-JA"><![CDATA[{T}: あなたのマナ・プールに{U}を加える。]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="ko-KR"><![CDATA[{T}: {U}를 당신의 마나풀에 담는다.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="ru-RU"><![CDATA[{T}: добавьте {U} в ваше хранилище маны.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="pt-BR"><![CDATA[{T}: Adicione {U} à sua reserva de mana.]]></LOCALISED_TEXT>
<AVAILABILITY>
return ( Object():GetParent() ) ~= nil and
( Object():GetParent():Tapped() ) == 0
</AVAILABILITY>
<COST type="tap">
Object():GetParent():Tap()
</COST>
<PRODUCES amount="{U}" />
</MANA_ABILITY>
<TRIGGERED_ABILITY internal="1" filter_zone="ZONE_IN_PLAY">
-- whenever the land becomes tapped, we tap the enchantment as well
<TRIGGER value="BECAME_TAPPED">
return TriggerObject() == Object():GetParent()
</TRIGGER>
<RESOLUTION_TIME_ACTION>
Object():Tap()
</RESOLUTION_TIME_ACTION>
</TRIGGERED_ABILITY>
<TRIGGERED_ABILITY internal="1" filter_zone="ZONE_IN_PLAY">
-- whenever the land becomes untapped, we tap the enchantment as well
<TRIGGER value="BECAME_UNTAPPED">
return TriggerObject() == Object():GetParent()
</TRIGGER>
<RESOLUTION_TIME_ACTION>
Object():Untap()
</RESOLUTION_TIME_ACTION>
</TRIGGERED_ABILITY>
<SPELL_ABILITY attach_filter="1" filter_zone="ZONE_IN_PLAY">
<TARGET_DEFINITION id="0">
local filter = Object():GetFilter()
filter:Clear()
filter:AddCardType( CARD_TYPE_LAND )
filter:SetZone( ZONE_IN_PLAY )
filter:SetHint( HINT_NEUTRAL, EffectController() )
</TARGET_DEFINITION>
<TARGET_DETERMINATION>
return AtLeastOneTargetFromDefinition(0)
</TARGET_DETERMINATION>
<PLAY_TIME_ACTION target_choosing="1">
EffectController():ChooseTarget( 0, "CARD_QUERY_CHOOSE_PERMANENT_TO_ENCHANT", EffectDC():Make_Targets(0) )
</PLAY_TIME_ACTION>
<RESOLUTION_TIME_ACTION>
local target_card = EffectDC():Get_Targets(0):Get_CardPtr(0)
if target_card ~= nil then
Object():Enchant( target_card )
end
</RESOLUTION_TIME_ACTION>
</SPELL_ABILITY>
</CARD_V2>
I tested it with a Merfolk deck I made (because of all the creatures with islandwalk) and it doesnt seem to work (AI was able to block my creatures with islandwalk after I enchanted one of its lands with Spreading Seas)
Re: Spreading Seas
by RiiakShiNal » 06 Sep 2012, 16:02
Your mana ability probably doesn't work right as AVAILABILITY does not work in mana abilities and your cost there also probably doesn't work right. If you check your SCRIPT_LOG I imagine it probably complains about Badge_Clear() (I think it wants to know which badge to clear) and thus does not execute the set afterwards (which is probably why the creature with Islandwalk was blockable).
Also instead of trying to use Island you may need to put it in quotation marks or LAND_TYPE_ISLAND (or you may even be forced to manually remove all land types then add LAND_TYPE_ISLAND using Add instead of Set).
You should probably have two more triggered abilities for when the enchantment becomes tapped/untapped to tap/untap the parent land.
Also instead of trying to use Island you may need to put it in quotation marks or LAND_TYPE_ISLAND (or you may even be forced to manually remove all land types then add LAND_TYPE_ISLAND using Add instead of Set).
You should probably have two more triggered abilities for when the enchantment becomes tapped/untapped to tap/untap the parent land.
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: Spreading Seas
by --Dream-- » 06 Sep 2012, 16:17
How can I remove all land types?RiiakShiNal wrote:Your mana ability probably doesn't work right as AVAILABILITY does not work in mana abilities and your cost there also probably doesn't work right. If you check your SCRIPT_LOG I imagine it probably complains about Badge_Clear() (I think it wants to know which badge to clear) and thus does not execute the set afterwards (which is probably why the creature with Islandwalk was blockable).
Also instead of trying to use Island you may need to put it in quotation marks or LAND_TYPE_ISLAND (or you may even be forced to manually remove all land types then add LAND_TYPE_ISLAND using Add instead of Set).
You should probably have two more triggered abilities for when the enchantment becomes tapped/untapped to tap/untap the parent land.

Also, I need to make sure that the land controller also controls the enchantment, right?
Re: Spreading Seas
by --Dream-- » 06 Sep 2012, 16:50
Now Im getting somewhere!
- Code: Select all
<?xml version='1.0'?>
<CARD_V2>
<FILENAME text="SPREADING_SEAS_190405" />
<CARDNAME text="SPREADING_SEAS" />
<TITLE>
<LOCALISED_TEXT LanguageCode="en-US"><![CDATA[Spreading Seas]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="de-DE"><![CDATA[Spreading Seas]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="es-ES"><![CDATA[Spreading Seas]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="fr-FR"><![CDATA[Spreading Seas]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="it-IT"><![CDATA[Spreading Seas]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="jp-JA"><![CDATA[Spreading Seas]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="ko-KR"><![CDATA[Spreading Seas]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="ru-RU"><![CDATA[Spreading Seas]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="pt-BR"><![CDATA[Spreading Seas]]></LOCALISED_TEXT>
</TITLE>
<MULTIVERSEID value="190405" />
<ARTID value="190405" />
<ARTIST name="Jung Park" />
<CASTING_COST cost="{1}{U}" />
<FLAVOURTEXT>
<LOCALISED_TEXT LanguageCode="en-US"><![CDATA[Most inhabitants of Zendikar have given up on the idea of an accurate map.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="de-DE"><![CDATA[Most inhabitants of Zendikar have given up on the idea of an accurate map.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="es-ES"><![CDATA[Most inhabitants of Zendikar have given up on the idea of an accurate map.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="fr-FR"><![CDATA[Most inhabitants of Zendikar have given up on the idea of an accurate map.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="it-IT"><![CDATA[Most inhabitants of Zendikar have given up on the idea of an accurate map.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="jp-JA"><![CDATA[Most inhabitants of Zendikar have given up on the idea of an accurate map.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="ko-KR"><![CDATA[Most inhabitants of Zendikar have given up on the idea of an accurate map.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="ru-RU"><![CDATA[Most inhabitants of Zendikar have given up on the idea of an accurate map.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="pt-BR"><![CDATA[Most inhabitants of Zendikar have given up on the idea of an accurate map.]]></LOCALISED_TEXT>
</FLAVOURTEXT>
<TYPE metaname="Enchantment" />
<SUB_TYPE metaname="Aura" />
<EXPANSION value="DPG" />
<RARITY metaname="C" />
<STATIC_ABILITY attach_filter="1" filter_zone="ZONE_IN_PLAY">
<LOCALISED_TEXT LanguageCode="en-US"><![CDATA[Enchant land]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="it-IT"><![CDATA[Incanta terra]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="de-DE"><![CDATA[Landverzauberung]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="fr-FR"><![CDATA[Enchanter : terrain]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="es-ES"><![CDATA[Encantar tierra.]]></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[Encantar terreno]]></LOCALISED_TEXT>
<CONTINUOUS_ACTION>
local attach_filter = Object():AttachmentFilter_Get()
attach_filter:Clear()
attach_filter:AddCardType( CARD_TYPE_LAND )
</CONTINUOUS_ACTION>
</STATIC_ABILITY>
<TRIGGERED_ABILITY auto_skip="1" filter_zone="ZONE_IN_PLAY">
<LOCALISED_TEXT LanguageCode="en-US"><![CDATA[When Spreading Seas enters the battlefield, draw a card.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="de-DE"><![CDATA[When Spreading Seas enters the battlefield, draw a card.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="es-ES"><![CDATA[When Spreading Seas enters the battlefield, draw a card.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="fr-FR"><![CDATA[When Spreading Seas enters the battlefield, draw a card.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="it-IT"><![CDATA[When Spreading Seas enters the battlefield, draw a card.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="jp-JA"><![CDATA[When Spreading Seas enters the battlefield, draw a card.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="ko-KR"><![CDATA[When Spreading Seas enters the battlefield, draw a card.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="ru-RU"><![CDATA[When Spreading Seas enters the battlefield, draw a card.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="pt-BR"><![CDATA[When Spreading Seas enters the battlefield, draw a card.]]></LOCALISED_TEXT>
<TRIGGER value="ZONECHANGE_END" simple_qualifier="self" to_zone="ZONE_IN_PLAY" />
<RESOLUTION_TIME_ACTION>
local NumCards = 1
while (NumCards > 0) do
NumCards = NumCards - 1
EffectController():DrawCard()
end
</RESOLUTION_TIME_ACTION>
</TRIGGERED_ABILITY>
<STATIC_ABILITY filter_zone="ZONE_IN_PLAY">
<LOCALISED_TEXT LanguageCode="en-US"><![CDATA[Enchanted land is an Island.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="de-DE"><![CDATA[Enchanted land is an Island.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="es-ES"><![CDATA[Enchanted land is an Island.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="fr-FR"><![CDATA[Enchanted land is an Island.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="it-IT"><![CDATA[Enchanted land is an Island.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="jp-JA"><![CDATA[Enchanted land is an Island.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="ko-KR"><![CDATA[Enchanted land is an Island.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="ru-RU"><![CDATA[Enchanted land is an Island.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="pt-BR"><![CDATA[Enchanted land is an Island.]]></LOCALISED_TEXT>
<CONTINUOUS_ACTION layer="4">
local parent = Object():GetParent()
if parent ~= nil then
parent:GetCurrentCharacteristics():LoseAllAbilities()
parent:GetCurrentCharacteristics():SubType_GetWritable(parent):Clear()
parent:GetCurrentCharacteristics():SubType_GetWritable(parent):Add( LAND_TYPE_ISLAND, parent )
end
</CONTINUOUS_ACTION>
<CONTINUOUS_ACTION layer="2">
local parent = Object():GetParent()
if parent ~= nil then
Object():SetController( parent:GetController() )
end
</CONTINUOUS_ACTION>
</STATIC_ABILITY>
<MANA_ABILITY resource_id="1" filter_zone="ZONE_IN_PLAY">
<LOCALISED_TEXT LanguageCode="en-US"><![CDATA[{T}: Add {U} to your mana pool.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="de-DE"><![CDATA[{T}: Erhöhe deinen Manavorrat um {U}.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="es-ES"><![CDATA[{T}: Agrega {U} a tu reserva de maná.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="fr-FR"><![CDATA[{T}: Ajoutez {U} à votre réserve.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="it-IT"><![CDATA[{T}: Aggiungi {U} alla tua riserva di mana.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="jp-JA"><![CDATA[{T}: あなたのマナ・プールに{U}を加える。]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="ko-KR"><![CDATA[{T}: {U}를 당신의 마나풀에 담는다.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="ru-RU"><![CDATA[{T}: добавьте {U} в ваше хранилище маны.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="pt-BR"><![CDATA[{T}: Adicione {U} à sua reserva de mana.]]></LOCALISED_TEXT>
<COST type="TapSelf" />
<PRODUCES amount="{U}" />
</MANA_ABILITY>
<TRIGGERED_ABILITY internal="1" filter_zone="ZONE_IN_PLAY">
-- whenever the land becomes tapped, we tap the enchantment as well
<TRIGGER value="BECAME_TAPPED">
return TriggerObject() == Object():GetParent()
</TRIGGER>
<RESOLUTION_TIME_ACTION>
Object():Tap()
</RESOLUTION_TIME_ACTION>
</TRIGGERED_ABILITY>
<TRIGGERED_ABILITY internal="1" filter_zone="ZONE_IN_PLAY">
-- whenever the land becomes untapped, we untap the enchantment as well
<TRIGGER value="BECAME_UNTAPPED">
return TriggerObject() == Object():GetParent()
</TRIGGER>
<RESOLUTION_TIME_ACTION>
Object():Untap()
</RESOLUTION_TIME_ACTION>
</TRIGGERED_ABILITY>
<TRIGGERED_ABILITY internal="1" filter_zone="ZONE_IN_PLAY">
-- whenever the enchantment becomes tapped, we tap the land as well
<TRIGGER value="BECAME_TAPPED" simple_qualifier="self" />
<RESOLUTION_TIME_ACTION>
Object():GetParent():Tap()
</RESOLUTION_TIME_ACTION>
</TRIGGERED_ABILITY>
<TRIGGERED_ABILITY internal="1" filter_zone="ZONE_IN_PLAY">
-- whenever the enchantment becomes untapped, we untap the land as well
<TRIGGER value="BECAME_UNTAPPED" simple_qualifier="self" />
<RESOLUTION_TIME_ACTION>
Object():GetParent():Untap()
</RESOLUTION_TIME_ACTION>
</TRIGGERED_ABILITY>
<SPELL_ABILITY attach_filter="1" filter_zone="ZONE_IN_PLAY">
<TARGET_DEFINITION id="0">
local filter = Object():GetFilter()
filter:Clear()
filter:AddCardType( CARD_TYPE_LAND )
filter:SetZone( ZONE_IN_PLAY )
filter:SetHint( HINT_NEUTRAL, EffectController() )
</TARGET_DEFINITION>
<TARGET_DETERMINATION>
return AtLeastOneTargetFromDefinition(0)
</TARGET_DETERMINATION>
<PLAY_TIME_ACTION target_choosing="1">
EffectController():ChooseTarget( 0, "CARD_QUERY_CHOOSE_PERMANENT_TO_ENCHANT", EffectDC():Make_Targets(0) )
</PLAY_TIME_ACTION>
<RESOLUTION_TIME_ACTION>
local target_card = EffectDC():Get_Targets(0):Get_CardPtr(0)
if target_card ~= nil then
Object():Enchant( target_card )
end
</RESOLUTION_TIME_ACTION>
</SPELL_ABILITY>
</CARD_V2>
Re: Spreading Seas
by --Dream-- » 06 Sep 2012, 21:03
So, after some testing, it seems the enchanted land does become an island but keeps its first mana ability. Also, the enchantment mana ability doesnt work. Any ideas? 

Re: Spreading Seas
by RiiakShiNal » 06 Sep 2012, 23:38
That could mean that LoseAllAbilities() does not affect mana abilities (though if the land is basic it will automatically get the ability to be tapped for--Dream-- wrote:So, after some testing, it seems the enchanted land does become an island but keeps its first mana ability. Also, the enchantment mana ability doesnt work. Any ideas?

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: Spreading Seas
by --Dream-- » 07 Sep 2012, 08:38
After further testing with multi-coloured decks, it's clear that the enchanted land produces
and is usable by its controller. So I guess everything is right then 


Re: Spreading Seas
by RiiakShiNal » 07 Sep 2012, 11:51
That is probably only true when the enchanted land is BASIC, if you enchant say a Strip Mine / Cloudpost then when it becomes an island it won't be basic and will not have the ability to produce--Dream-- wrote:After further testing with multi-coloured decks, it's clear that the enchanted land producesand is usable by its controller. So I guess everything is right then

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: Spreading Seas
by --Dream-- » 07 Sep 2012, 17:20
It works because Im giving it the SUPERTYPE_BASIC thing. It actually "morphs" into an Island keeping its original flavour text and name.
14 posts
• Page 1 of 1
Who is online
Users browsing this forum: No registered users and 27 guests