Board index
Programs with AI or Rules Enforcement
Magic: The Gathering - Duels of the Planeswalkers
New MTG Cards and Decks (2010, 2012, 2013, 2014, 2015, Magic Duels)
2014




Overgrown battlement help
Moderator: CCGHQ Admins
9 posts
• Page 1 of 1
Overgrown battlement help
by wtb300 » 13 Nov 2013, 01:31
Sorry i am new to the site and i hope im posting this in the right place. the card works to the point that it taps and the mana pool comes up but it doesn't add the mana to my pool.and the script log shows this.
[lua] [string "OVERGROWN_BATTLEMENT_100193610_TITLE (CONTINUOUS_ACTION)~0x0000..."]:8: ')' expected near 'characteristic'
dont know how to post the cards code lol sry i can email it if you like
figured it out
[lua] [string "OVERGROWN_BATTLEMENT_100193610_TITLE (CONTINUOUS_ACTION)~0x0000..."]:8: ')' expected near 'characteristic'
figured it out
- Code: Select all
<?xml version='1.0' encoding='UTF-8'?>
<CARD_V2 ExportVersion="1">
<FILENAME text="OVERGROWN_BATTLEMENT_100193610" />
<CARDNAME text="OVERGROWN_BATTLEMENT" />
<TITLE>
<LOCALISED_TEXT LanguageCode="en-US"><![CDATA[Overgrown Battlement]]></LOCALISED_TEXT>
</TITLE>
<MULTIVERSEID value="100193610" />
<ARTID value="100193610" />
<ARTIST name="Franz Vohwinkel" />
<CASTING_COST cost="{1}{G}" />
<FLAVOURTEXT>
<LOCALISED_TEXT LanguageCode="en-US"><![CDATA[“Our enemy is nothing less than the end of all life. We shall not want for allies.”
—The War Diaries]]></LOCALISED_TEXT>
</FLAVOURTEXT>
<TYPE metaname="Creature" />
<SUB_TYPE metaname="Wall" />
<EXPANSION value="ROE" />
<RARITY metaname="C" />
<POWER value="0" />
<TOUGHNESS value="4" />
<STATIC_ABILITY>
<LOCALISED_TEXT LanguageCode="en-US"><![CDATA[Defender]]></LOCALISED_TEXT>
<INTRINSIC characteristic="CHARACTERISTIC_DEFENDER" />
</STATIC_ABILITY>
<ACTIVATED_ABILITY forced_skip="1">
<LOCALISED_TEXT LanguageCode="en-US"><![CDATA[{T}: Add {G} to your mana pool for each creature with defender you control.]]></LOCALISED_TEXT>
<COST type="TapSelf" />
<PLAY_TIME_ACTION>
RSN_MarkManaAbilityStart()
</PLAY_TIME_ACTION>
<RESOLUTION_TIME_ACTION>
local filter = ClearFilter()
filter:Add( FE_TYPE, OP_IS, INTRINSIC characteristic="CHARACTERISTIC_DEFENDER" )
filter:Add( FE_CONTROLLER, OP_IS, EffectController())
RSN_Produce( "{G}", filter:Count() )
</RESOLUTION_TIME_ACTION>
<RESOLUTION_TIME_ACTION>
RSN_EliminateExtraManaTokens()
</RESOLUTION_TIME_ACTION>
<RESOLUTION_TIME_ACTION>
G2K_DisplayManaPool(EffectController())
RSN_MarkManaAbilityEnd()
</RESOLUTION_TIME_ACTION>
<AI_AVAILABILITY window_step="upkeep" type="window" />
<AI_AVAILABILITY window_step="main_1" window_turn="my_turn" type="window" />
<AI_AVAILABILITY window_step="begin_combat" window_turn="their_turn" type="window" />
<AI_AVAILABILITY window_step="declare_attackers" window_turn="their_turn" type="window" />
<AI_AVAILABILITY window_step="declare_blockers" type="window" />
<AI_AVAILABILITY window_step="main_2" window_turn="my_turn" type="window" />
<AI_AVAILABILITY window_step="end_of_turn" type="window" />
<AI_AVAILABILITY window_step="end_of_turn" window_turn="their_turn" type="window" />
<AI_AVAILABILITY type="in_response" response_source="1" response_target="1" />
<AI_AVAILABILITY type="in_response" response_source="1" />
<AI_AVAILABILITY type="in_response" response_target="1" />
</ACTIVATED_ABILITY>
<STATIC_ABILITY>
<CONTINUOUS_ACTION layer="0">
RSN_ClearCanProduceMana()
RSN_MarkCanProduceMana( "{G}" )
</CONTINUOUS_ACTION>
<CONTINUOUS_ACTION layer="8">
local oCard = EffectSource()
if (oCard ~= nil) then
local oCharacteristics = oCard:GetCurrentCharacteristics()
if (((oCharacteristics ~= nil) and (oCharacteristics:Bool_Get( CHARACTERISTIC_CANT_USE_ACTIVATED_ABILITIES ))) or
(EffectController():GetCurrentCharacteristics():Bool_Get( PLAYER_CHARACTERISTIC_CANT_ACTIVATE_NONMANA_ABILITIES ))) then
local filter = ClearFilter()
filter:Add( FE_TYPE, OP_IS, INTRINSIC characteristic="CHARACTERISTIC_DEFENDER" )
filter:Add( FE_CONTROLLER, OP_IS, EffectController())
local numAbilities = filter:CountStopAt(19)
oCharacteristics:GrantAbility( numAbilities )
end
end
</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>
<MANA_ABILITY resource_id="0">
<PRODUCES amount="{0}" />
</MANA_ABILITY>
<MANA_ABILITY resource_id="1">
<PRODUCES amount="{G}" />
</MANA_ABILITY>
<MANA_ABILITY resource_id="2">
<PRODUCES amount="{G}{G}" />
</MANA_ABILITY>
<MANA_ABILITY resource_id="3">
<PRODUCES amount="{G}{G}{G}" />
</MANA_ABILITY>
<MANA_ABILITY resource_id="4">
<PRODUCES amount="{G}{G}{G}{G}" />
</MANA_ABILITY>
<MANA_ABILITY resource_id="5">
<PRODUCES amount="{G}{G}{G}{G}{G}" />
</MANA_ABILITY>
<MANA_ABILITY resource_id="6">
<PRODUCES amount="{G}{G}{G}{G}{G}{G}" />
</MANA_ABILITY>
<MANA_ABILITY resource_id="7">
<PRODUCES amount="{G}{G}{G}{G}{G}{G}{G}" />
</MANA_ABILITY>
<MANA_ABILITY resource_id="8">
<PRODUCES amount="{G}{G}{G}{G}{G}{G}{G}{G}" />
</MANA_ABILITY>
<MANA_ABILITY resource_id="9">
<PRODUCES amount="{G}{G}{G}{G}{G}{G}{G}{G}{G}" />
</MANA_ABILITY>
<MANA_ABILITY resource_id="10">
<PRODUCES amount="{G}{G}{G}{G}{G}{G}{G}{G}{G}{G}" />
</MANA_ABILITY>
<MANA_ABILITY resource_id="11">
<PRODUCES amount="{G}{G}{G}{G}{G}{G}{G}{G}{G}{G}{G}" />
</MANA_ABILITY>
<MANA_ABILITY resource_id="12">
<PRODUCES amount="{G}{G}{G}{G}{G}{G}{G}{G}{G}{G}{G}{G}" />
</MANA_ABILITY>
<MANA_ABILITY resource_id="13">
<PRODUCES amount="{G}{G}{G}{G}{G}{G}{G}{G}{G}{G}{G}{G}{G}" />
</MANA_ABILITY>
<MANA_ABILITY resource_id="14">
<PRODUCES amount="{G}{G}{G}{G}{G}{G}{G}{G}{G}{G}{G}{G}{G}{G}" />
</MANA_ABILITY>
<MANA_ABILITY resource_id="15">
<PRODUCES amount="{G}{G}{G}{G}{G}{G}{G}{G}{G}{G}{G}{G}{G}{G}{G}" />
</MANA_ABILITY>
<MANA_ABILITY resource_id="16">
<PRODUCES amount="{G}{G}{G}{G}{G}{G}{G}{G}{G}{G}{G}{G}{G}{G}{G}{G}" />
</MANA_ABILITY>
<MANA_ABILITY resource_id="17">
<PRODUCES amount="{G}{G}{G}{G}{G}{G}{G}{G}{G}{G}{G}{G}{G}{G}{G}{G}{G}" />
</MANA_ABILITY>
<MANA_ABILITY resource_id="18">
<PRODUCES amount="{G}{G}{G}{G}{G}{G}{G}{G}{G}{G}{G}{G}{G}{G}{G}{G}{G}{G}" />
</MANA_ABILITY>
<MANA_ABILITY resource_id="19">
<PRODUCES amount="{G}{G}{G}{G}{G}{G}{G}{G}{G}{G}{G}{G}{G}{G}{G}{G}{G}{G}{G}" />
</MANA_ABILITY>
<TOKEN_REGISTRATION reservation="1" type="RSN_TOKEN_MANA_G" />
<HELP title="MORE_INFO_BADGE_TITLE_6" body="MORE_INFO_BADGE_BODY_6" zone="ZONE_ANY" />
<SFX text="COMBAT_BLUNT_LARGE_ATTACK" power_boundary_min="4" power_boundary_max="-1" />
<SFX text="COMBAT_BLUNT_SMALL_ATTACK" power_boundary_min="1" power_boundary_max="3" />
</CARD_V2>
Last edited by wtb300 on 13 Nov 2013, 01:51, edited 3 times in total.
Re: Overgrown battlement help
by RiiakShiNal » 13 Nov 2013, 01:35
That error means there is a problem in the coding of the card (syntax error) on line 8 of one of the CONTINUOUS_ACTION blocks, though without seeing the code I can't tell you any more.
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: Overgrown battlement help
by wtb300 » 13 Nov 2013, 01:39
i tried posting the code but im not sure how. it says the xml is an attack
Re: Overgrown battlement help
by MC Brodie » 13 Nov 2013, 01:51
I think you need 5 posts before you can have somewhat large posts. So try it now.
-----------------------------------------------------------------------
Song of the Day: 46 and 2 (cover)
Song of the Day: 46 and 2 (cover)
Re: Overgrown battlement help
by MC Brodie » 13 Nov 2013, 02:07
That's an interesting take on Riiak's backup mana abilities
. I'm not sure all of that is needed but I'm not the person to ask. I'm sure he'll add his input for that section.
I think your problem lies in your filter for defender. To test for defender use:
.

I think your problem lies in your filter for defender. To test for defender use:
- Code: Select all
filter:Add( FE_CHARACTERISTIC, OP_HAS, CHARACTERISTIC_DEFENDER )

Last edited by MC Brodie on 13 Nov 2013, 02:40, edited 1 time in total.
-----------------------------------------------------------------------
Song of the Day: 46 and 2 (cover)
Song of the Day: 46 and 2 (cover)
Re: Overgrown battlement help
by wtb300 » 13 Nov 2013, 02:22
Brilliant. Works perfectly now. thank you so much.
Re: Overgrown battlement help
by RiiakShiNal » 13 Nov 2013, 02:37
It's recommended to start using RSN_CheckSwitchToFallback() as it handles some more situations and requires less code on the card so your fallback block could look more like this:
- Code: Select all
<CONTINUOUS_ACTION layer="8">
local oCard = EffectSource()
if (oCard ~= nil) then
local oCharacteristics = oCard:GetCurrentCharacteristics()
if (RSN_CheckSwitchToFallback(oCard)) then
local filter = ClearFilter()
filter:Add( FE_CHARACTERISTIC, OP_HAS, CHARACTERISTIC_DEFENDER )
filter:Add( FE_CONTROLLER, OP_IS, EffectController())
local numAbilities = filter:CountStopAt(19)
oCharacteristics:GrantAbility( numAbilities )
end
end
</CONTINUOUS_ACTION>
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: Overgrown battlement help
by wtb300 » 13 Nov 2013, 02:55
Thanks for all the help. It was my first attempt at coding so I used the code from Tolarian Academy and tried to modify it to fit. I'll take your advice and switch it to RSN_CheckSwitchToFallback().
9 posts
• Page 1 of 1
Who is online
Users browsing this forum: No registered users and 6 guests