Board index
Programs with AI or Rules Enforcement
Magic: The Gathering - Duels of the Planeswalkers
Programming Talk
Programs with AI or Rules Enforcement
Magic: The Gathering - Duels of the Planeswalkers
Programming Talk
Pack's Disdain problem.
Moderator: CCGHQ Admins
6 posts
• Page 1 of 1
Pack's Disdain problem.
by alexandreonly » 12 Sep 2012, 17:07
When i include this card in the deck, the deck simply don't show up.
- Code: Select all
<?xml version='1.0'?>
<CARD_V2>
<FILENAME text="PACK’S_DISDAIN_153165" />
<CARDNAME text="PACK’S_DISDAIN" />
<TITLE>
<LOCALISED_TEXT LanguageCode="en-US"><![CDATA[Pack’s Disdain]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="de-DE"><![CDATA[Pack’s Disdain]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="es-ES"><![CDATA[Pack’s Disdain]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="fr-FR"><![CDATA[Pack’s Disdain]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="it-IT"><![CDATA[Pack’s Disdain]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="jp-JA"><![CDATA[Pack’s Disdain]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="ko-KR"><![CDATA[Pack’s Disdain]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="ru-RU"><![CDATA[Pack’s Disdain]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="pt-BR"><![CDATA[Pack’s Disdain]]></LOCALISED_TEXT>
</TITLE>
<MULTIVERSEID value="153165" />
<ARTID value="153165" />
<ARTIST name="Pete Venters" />
<CASTING_COST cost="{1}{B}" />
<FLAVOURTEXT>
<LOCALISED_TEXT LanguageCode="en-US"><![CDATA[Like the sun to a flower, the adoring gaze of the tribe is sustenance to an elf. To be shunned is to wither.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="de-DE"><![CDATA[Like the sun to a flower, the adoring gaze of the tribe is sustenance to an elf. To be shunned is to wither.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="es-ES"><![CDATA[Like the sun to a flower, the adoring gaze of the tribe is sustenance to an elf. To be shunned is to wither.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="fr-FR"><![CDATA[Like the sun to a flower, the adoring gaze of the tribe is sustenance to an elf. To be shunned is to wither.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="it-IT"><![CDATA[Like the sun to a flower, the adoring gaze of the tribe is sustenance to an elf. To be shunned is to wither.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="jp-JA"><![CDATA[Like the sun to a flower, the adoring gaze of the tribe is sustenance to an elf. To be shunned is to wither.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="ko-KR"><![CDATA[Like the sun to a flower, the adoring gaze of the tribe is sustenance to an elf. To be shunned is to wither.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="ru-RU"><![CDATA[Like the sun to a flower, the adoring gaze of the tribe is sustenance to an elf. To be shunned is to wither.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="pt-BR"><![CDATA[Like the sun to a flower, the adoring gaze of the tribe is sustenance to an elf. To be shunned is to wither.]]></LOCALISED_TEXT>
</FLAVOURTEXT>
<TYPE metaname="Instant" />
<EXPANSION value="DPG" />
<RARITY metaname="C" />
<TRIGGERED_ABILITY active_zone="ZONE_STACK">
<TRIGGER value="SPELL_PLAYED" simple_qualifier="self" />
<RESOLUTION_TIME_ACTION>
-- Set things up here.
EffectDC():Make_Chest( 0 )
-- Look-up creature types in player's library and in play.
RSN_FindPlayerCreatureTypesInZones( EffectDC():Get_Chest( 0 ), EffectController(), ZONE_IN_PLAY, ZONE_LIBRARY )
-- Set the best type as default
local nBestIndex = EffectDC():Get_Chest( 0 ):Int_Get( REGISTER_SELECTION_BEST_TYPE_INDEX )
EffectDC():Get_Chest( 0 ):Int_Set( REGISTER_SELECTION_SELECTED_INDEX, nBestIndex )
</RESOLUTION_TIME_ACTION>
<RESOLUTION_TIME_ACTION repeating="1">
return RSN_ChooseCreatureTypeFromDC( EffectController(), EffectDC():Get_Chest( 0 ) )
</RESOLUTION_TIME_ACTION>
<RESOLUTION_TIME_ACTION>
local nChosenType = RSN_GetChosenCreatureType( EffectDC():Get_Chest( 0 ) )
ObjectDC():Int_Set( 0, nChosenType )
</RESOLUTION_TIME_ACTION>
</TRIGGERED_ABILITY>
<SPELL_ABILITY filter_zone="ZONE_IN_PLAY">
<LOCALISED_TEXT LanguageCode="en-US"><![CDATA[Choose a creature type. Target creature gets -1/-1 until end of turn for each permanent of the chosen type you control.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="de-DE"><![CDATA[Choose a creature type. Target creature gets -1/-1 until end of turn for each permanent of the chosen type you control.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="es-ES"><![CDATA[Choose a creature type. Target creature gets -1/-1 until end of turn for each permanent of the chosen type you control.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="fr-FR"><![CDATA[Choose a creature type. Target creature gets -1/-1 until end of turn for each permanent of the chosen type you control.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="it-IT"><![CDATA[Choose a creature type. Target creature gets -1/-1 until end of turn for each permanent of the chosen type you control.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="jp-JA"><![CDATA[Choose a creature type. Target creature gets -1/-1 until end of turn for each permanent of the chosen type you control.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="ko-KR"><![CDATA[Choose a creature type. Target creature gets -1/-1 until end of turn for each permanent of the chosen type you control.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="ru-RU"><![CDATA[Choose a creature type. Target creature gets -1/-1 until end of turn for each permanent of the chosen type you control.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="pt-BR"><![CDATA[Choose a creature type. Target creature gets -1/-1 until end of turn for each permanent of the chosen type you control.]]></LOCALISED_TEXT>
<TARGET_DEFINITION id="0">
local filter = Object():GetFilter()
filter:Clear()
filter:AddCardType( CARD_TYPE_CREATURE )
filter:SetZone( ZONE_IN_PLAY )
filter:SetHint( HINT_ALLIED_ONLY, EffectController() )
</TARGET_DEFINITION>
<TARGET_DETERMINATION>
return AtLeastOneTargetFromDefinition(0)
</TARGET_DETERMINATION>
<PLAY_TIME_ACTION target_choosing="1">
EffectController():ChooseTarget( 0, "CARD_QUERY_CHOOSE_CREATURE_TO_GET_-1_-1_PER_CREATURE_OF_CHOOSEN_TYPE", EffectDC():Make_Targets(0) )
</PLAY_TIME_ACTION>
<RESOLUTION_TIME_ACTION>
local filter = Object():GetFilter()
local nChosenType = ObjectDC():Int_Get( 0 )
filter:Clear()
filter:SetZone( ZONE_IN_PLAY )
filter:AddSubType( nChosenType )
filter:SetController( EffectController() )
filter:NotTargetted()
local total = filter:Count()
EffectDC():Set_Int( 1, total )
</RESOLUTION_TIME_ACTION>
<CONTINUOUS_ACTION layer="7C">
local target = EffectDC():Get_Targets(0):Get_CardPtr(0)
if target ~= nil then
local total = EffectDC():Get_Int(1)
local characteristics = target:GetCurrentCharacteristics()
characteristics:Power_Add(-total)
characteristics:Toughness_Add(-total)
end
</CONTINUOUS_ACTION>
<DURATION simple_duration="UntilEOT" />
</SPELL_ABILITY>
</CARD_V2>
- alexandreonly
- Posts: 145
- Joined: 04 Jul 2011, 17:27
- Has thanked: 0 time
- Been thanked: 8 times
Re: Pack's Disdain problem.
by Dysgenics » 12 Sep 2012, 17:37
The apostrophe you're using in the filename is a special character that isn't being recognized correctly.
If you rename the card to use a standard apostrophe (i.e. ' instead of ’), it should work for you.
(Don't forget to update the reference in the deck list file)
Note that you can leave the special ’ in the localised text, so it'll still be reflected on the card.
If you rename the card to use a standard apostrophe (i.e. ' instead of ’), it should work for you.
(Don't forget to update the reference in the deck list file)
Note that you can leave the special ’ in the localised text, so it'll still be reflected on the card.
Re: Pack's Disdain problem.
by alexandreonly » 12 Sep 2012, 18:35
Thanks, now the card appear in the game, but it does nothing when i cast. Maybe sombe problem with the register. I choose the target and the creature type, and then nothing happens.Dysgenics wrote:The apostrophe you're using in the filename is a special character that isn't being recognized correctly.
If you rename the card to use a standard apostrophe (i.e. ' instead of ’), it should work for you.
(Don't forget to update the reference in the deck list file)
Note that you can leave the special ’ in the localised text, so it'll still be reflected on the card.
- alexandreonly
- Posts: 145
- Joined: 04 Jul 2011, 17:27
- Has thanked: 0 time
- Been thanked: 8 times
Re: Pack's Disdain problem.
by RiiakShiNal » 13 Sep 2012, 00:00
You should be able to do it all in the same ability (so you don't need to use ObjectDC() or a triggered ability) so that could reduce your complexity some.alexandreonly wrote:Thanks, now the card appear in the game, but it does nothing when i cast. Maybe sombe problem with the register. I choose the target and the creature type, and then nothing happens.
- Code: Select all
<?xml version='1.0'?>
<CARD_V2>
<FILENAME text="PACK’S_DISDAIN_153165" />
<CARDNAME text="PACK’S_DISDAIN" />
<TITLE>
<LOCALISED_TEXT LanguageCode="en-US"><![CDATA[Pack’s Disdain]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="de-DE"><![CDATA[Pack’s Disdain]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="es-ES"><![CDATA[Pack’s Disdain]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="fr-FR"><![CDATA[Pack’s Disdain]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="it-IT"><![CDATA[Pack’s Disdain]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="jp-JA"><![CDATA[Pack’s Disdain]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="ko-KR"><![CDATA[Pack’s Disdain]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="ru-RU"><![CDATA[Pack’s Disdain]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="pt-BR"><![CDATA[Pack’s Disdain]]></LOCALISED_TEXT>
</TITLE>
<MULTIVERSEID value="153165" />
<ARTID value="153165" />
<ARTIST name="Pete Venters" />
<CASTING_COST cost="{1}{B}" />
<FLAVOURTEXT>
<LOCALISED_TEXT LanguageCode="en-US"><![CDATA[Like the sun to a flower, the adoring gaze of the tribe is sustenance to an elf. To be shunned is to wither.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="de-DE"><![CDATA[Like the sun to a flower, the adoring gaze of the tribe is sustenance to an elf. To be shunned is to wither.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="es-ES"><![CDATA[Like the sun to a flower, the adoring gaze of the tribe is sustenance to an elf. To be shunned is to wither.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="fr-FR"><![CDATA[Like the sun to a flower, the adoring gaze of the tribe is sustenance to an elf. To be shunned is to wither.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="it-IT"><![CDATA[Like the sun to a flower, the adoring gaze of the tribe is sustenance to an elf. To be shunned is to wither.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="jp-JA"><![CDATA[Like the sun to a flower, the adoring gaze of the tribe is sustenance to an elf. To be shunned is to wither.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="ko-KR"><![CDATA[Like the sun to a flower, the adoring gaze of the tribe is sustenance to an elf. To be shunned is to wither.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="ru-RU"><![CDATA[Like the sun to a flower, the adoring gaze of the tribe is sustenance to an elf. To be shunned is to wither.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="pt-BR"><![CDATA[Like the sun to a flower, the adoring gaze of the tribe is sustenance to an elf. To be shunned is to wither.]]></LOCALISED_TEXT>
</FLAVOURTEXT>
<TYPE metaname="Instant" />
<EXPANSION value="DPG" />
<RARITY metaname="C" />
<SPELL_ABILITY filter_zone="ZONE_IN_PLAY">
<LOCALISED_TEXT LanguageCode="en-US"><![CDATA[Choose a creature type. Target creature gets -1/-1 until end of turn for each permanent of the chosen type you control.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="de-DE"><![CDATA[Choose a creature type. Target creature gets -1/-1 until end of turn for each permanent of the chosen type you control.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="es-ES"><![CDATA[Choose a creature type. Target creature gets -1/-1 until end of turn for each permanent of the chosen type you control.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="fr-FR"><![CDATA[Choose a creature type. Target creature gets -1/-1 until end of turn for each permanent of the chosen type you control.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="it-IT"><![CDATA[Choose a creature type. Target creature gets -1/-1 until end of turn for each permanent of the chosen type you control.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="jp-JA"><![CDATA[Choose a creature type. Target creature gets -1/-1 until end of turn for each permanent of the chosen type you control.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="ko-KR"><![CDATA[Choose a creature type. Target creature gets -1/-1 until end of turn for each permanent of the chosen type you control.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="ru-RU"><![CDATA[Choose a creature type. Target creature gets -1/-1 until end of turn for each permanent of the chosen type you control.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="pt-BR"><![CDATA[Choose a creature type. Target creature gets -1/-1 until end of turn for each permanent of the chosen type you control.]]></LOCALISED_TEXT>
<TARGET_DEFINITION id="0">
local filter = Object():GetFilter()
filter:Clear()
filter:AddCardType( CARD_TYPE_CREATURE )
filter:SetZone( ZONE_IN_PLAY )
filter:SetHint( HINT_ENEMY_ONLY, EffectController() )
</TARGET_DEFINITION>
<TARGET_DETERMINATION>
return AtLeastOneTargetFromDefinition(0)
</TARGET_DETERMINATION>
<PLAY_TIME_ACTION>
-- Set things up here.
EffectDC():Make_Chest( 2 )
-- Look-up creature types in player's library and in play.
RSN_FindPlayerCreatureTypesInZones( EffectDC():Get_Chest( 2 ), EffectController(), ZONE_IN_PLAY, ZONE_LIBRARY )
-- Set the best type as default
local nBestIndex = EffectDC():Get_Chest( 2 ):Int_Get( REGISTER_SELECTION_BEST_TYPE_INDEX )
EffectDC():Get_Chest( 2 ):Int_Set( REGISTER_SELECTION_SELECTED_INDEX, nBestIndex )
</PLAY_TIME_ACTION>
<PLAY_TIME_ACTION repeating="1">
return RSN_ChooseCreatureTypeFromDC( EffectController(), EffectDC():Get_Chest( 2 ) )
</PLAY_TIME_ACTION>
<PLAY_TIME_ACTION target_choosing="1">
EffectController():ChooseTarget( 0, "CARD_QUERY_CHOOSE_CREATURE_TO_GET_-1_-1_PER_CREATURE_OF_CHOOSEN_TYPE", EffectDC():Make_Targets(0) )
</PLAY_TIME_ACTION>
<RESOLUTION_TIME_ACTION>
local filter = Object():GetFilter()
local nChosenType = RSN_GetChosenCreatureType( EffectDC():Get_Chest( 2 ) )
filter:Clear()
filter:SetZone( ZONE_IN_PLAY )
filter:AddSubType( nChosenType )
filter:SetController( EffectController() )
filter:NotTargetted()
local total = filter:Count()
EffectDC():Set_Int( 1, total )
</RESOLUTION_TIME_ACTION>
<CONTINUOUS_ACTION layer="7C">
local target = EffectDC():Get_Targets(0):Get_CardPtr(0)
if target ~= nil then
local total = EffectDC():Get_Int(1)
local characteristics = target:GetCurrentCharacteristics()
characteristics:Power_Add(-total)
characteristics:Toughness_Add(-total)
end
</CONTINUOUS_ACTION>
<DURATION simple_duration="UntilEOT" />
</SPELL_ABILITY>
</CARD_V2>
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: 2189
- Joined: 16 May 2011, 21:37
- Has thanked: 75 times
- Been thanked: 497 times
Re: Pack's Disdain problem.
by alexandreonly » 13 Sep 2012, 16:17
It's crashing the game now. I don't know whyRiiakShiNal wrote:You should be able to do it all in the same ability (so you don't need to use ObjectDC() or a triggered ability) so that could reduce your complexity some.alexandreonly wrote:Thanks, now the card appear in the game, but it does nothing when i cast. Maybe sombe problem with the register. I choose the target and the creature type, and then nothing happens.Granted, I have not tested this, all I've done is remove the triggered ability (by moving the choose creature type code into the spell ability and changed the EffectDC register used so it doesn't conflict) and eliminated the need to use ObjectDC (in case that was somehow causing the problem). I imagine that when the card goes to the graveyard the ObjectDC would be cleared which may be why the card failed to work properly (by eliminating the need to use ObjectDC we get around this).
- Code: Select all
<?xml version='1.0'?>
<CARD_V2>
<FILENAME text="PACK’S_DISDAIN_153165" />
<CARDNAME text="PACK’S_DISDAIN" />
<TITLE>
<LOCALISED_TEXT LanguageCode="en-US"><![CDATA[Pack’s Disdain]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="de-DE"><![CDATA[Pack’s Disdain]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="es-ES"><![CDATA[Pack’s Disdain]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="fr-FR"><![CDATA[Pack’s Disdain]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="it-IT"><![CDATA[Pack’s Disdain]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="jp-JA"><![CDATA[Pack’s Disdain]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="ko-KR"><![CDATA[Pack’s Disdain]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="ru-RU"><![CDATA[Pack’s Disdain]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="pt-BR"><![CDATA[Pack’s Disdain]]></LOCALISED_TEXT>
</TITLE>
<MULTIVERSEID value="153165" />
<ARTID value="153165" />
<ARTIST name="Pete Venters" />
<CASTING_COST cost="{1}{B}" />
<FLAVOURTEXT>
<LOCALISED_TEXT LanguageCode="en-US"><![CDATA[Like the sun to a flower, the adoring gaze of the tribe is sustenance to an elf. To be shunned is to wither.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="de-DE"><![CDATA[Like the sun to a flower, the adoring gaze of the tribe is sustenance to an elf. To be shunned is to wither.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="es-ES"><![CDATA[Like the sun to a flower, the adoring gaze of the tribe is sustenance to an elf. To be shunned is to wither.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="fr-FR"><![CDATA[Like the sun to a flower, the adoring gaze of the tribe is sustenance to an elf. To be shunned is to wither.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="it-IT"><![CDATA[Like the sun to a flower, the adoring gaze of the tribe is sustenance to an elf. To be shunned is to wither.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="jp-JA"><![CDATA[Like the sun to a flower, the adoring gaze of the tribe is sustenance to an elf. To be shunned is to wither.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="ko-KR"><![CDATA[Like the sun to a flower, the adoring gaze of the tribe is sustenance to an elf. To be shunned is to wither.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="ru-RU"><![CDATA[Like the sun to a flower, the adoring gaze of the tribe is sustenance to an elf. To be shunned is to wither.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="pt-BR"><![CDATA[Like the sun to a flower, the adoring gaze of the tribe is sustenance to an elf. To be shunned is to wither.]]></LOCALISED_TEXT>
</FLAVOURTEXT>
<TYPE metaname="Instant" />
<EXPANSION value="DPG" />
<RARITY metaname="C" />
<SPELL_ABILITY filter_zone="ZONE_IN_PLAY">
<LOCALISED_TEXT LanguageCode="en-US"><![CDATA[Choose a creature type. Target creature gets -1/-1 until end of turn for each permanent of the chosen type you control.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="de-DE"><![CDATA[Choose a creature type. Target creature gets -1/-1 until end of turn for each permanent of the chosen type you control.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="es-ES"><![CDATA[Choose a creature type. Target creature gets -1/-1 until end of turn for each permanent of the chosen type you control.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="fr-FR"><![CDATA[Choose a creature type. Target creature gets -1/-1 until end of turn for each permanent of the chosen type you control.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="it-IT"><![CDATA[Choose a creature type. Target creature gets -1/-1 until end of turn for each permanent of the chosen type you control.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="jp-JA"><![CDATA[Choose a creature type. Target creature gets -1/-1 until end of turn for each permanent of the chosen type you control.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="ko-KR"><![CDATA[Choose a creature type. Target creature gets -1/-1 until end of turn for each permanent of the chosen type you control.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="ru-RU"><![CDATA[Choose a creature type. Target creature gets -1/-1 until end of turn for each permanent of the chosen type you control.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="pt-BR"><![CDATA[Choose a creature type. Target creature gets -1/-1 until end of turn for each permanent of the chosen type you control.]]></LOCALISED_TEXT>
<TARGET_DEFINITION id="0">
local filter = Object():GetFilter()
filter:Clear()
filter:AddCardType( CARD_TYPE_CREATURE )
filter:SetZone( ZONE_IN_PLAY )
filter:SetHint( HINT_ENEMY_ONLY, EffectController() )
</TARGET_DEFINITION>
<TARGET_DETERMINATION>
return AtLeastOneTargetFromDefinition(0)
</TARGET_DETERMINATION>
<PLAY_TIME_ACTION>
-- Set things up here.
EffectDC():Make_Chest( 2 )
-- Look-up creature types in player's library and in play.
RSN_FindPlayerCreatureTypesInZones( EffectDC():Get_Chest( 2 ), EffectController(), ZONE_IN_PLAY, ZONE_LIBRARY )
-- Set the best type as default
local nBestIndex = EffectDC():Get_Chest( 2 ):Int_Get( REGISTER_SELECTION_BEST_TYPE_INDEX )
EffectDC():Get_Chest( 2 ):Int_Set( REGISTER_SELECTION_SELECTED_INDEX, nBestIndex )
</PLAY_TIME_ACTION>
<PLAY_TIME_ACTION repeating="1">
return RSN_ChooseCreatureTypeFromDC( EffectController(), EffectDC():Get_Chest( 2 ) )
</PLAY_TIME_ACTION>
<PLAY_TIME_ACTION target_choosing="1">
EffectController():ChooseTarget( 0, "CARD_QUERY_CHOOSE_CREATURE_TO_GET_-1_-1_PER_CREATURE_OF_CHOOSEN_TYPE", EffectDC():Make_Targets(0) )
</PLAY_TIME_ACTION>
<RESOLUTION_TIME_ACTION>
local filter = Object():GetFilter()
local nChosenType = RSN_GetChosenCreatureType( EffectDC():Get_Chest( 2 ) )
filter:Clear()
filter:SetZone( ZONE_IN_PLAY )
filter:AddSubType( nChosenType )
filter:SetController( EffectController() )
filter:NotTargetted()
local total = filter:Count()
EffectDC():Set_Int( 1, total )
</RESOLUTION_TIME_ACTION>
<CONTINUOUS_ACTION layer="7C">
local target = EffectDC():Get_Targets(0):Get_CardPtr(0)
if target ~= nil then
local total = EffectDC():Get_Int(1)
local characteristics = target:GetCurrentCharacteristics()
characteristics:Power_Add(-total)
characteristics:Toughness_Add(-total)
end
</CONTINUOUS_ACTION>
<DURATION simple_duration="UntilEOT" />
</SPELL_ABILITY>
</CARD_V2>
- alexandreonly
- Posts: 145
- Joined: 04 Jul 2011, 17:27
- Has thanked: 0 time
- Been thanked: 8 times
Re: Pack's Disdain problem.
by RiiakShiNal » 13 Sep 2012, 20:12
It might have been due to the fact that in my last post, the code was still using the special apostrophe. Below is the code that I tried locally which worked fine (NOTE: I codify the card and file names differently from you, I use different art ids and expansion values and I localized the text from gatherer). The ability code is, however, exactly as I put in my last post (with different indention to be slightly easier to read for me anyway).alexandreonly wrote:It's crashing the game now. I don't know why
- Code: Select all
<?xml version='1.0'?>
<CARD_V2>
<FILENAME text="PACKS_DISDAIN_153165" />
<CARDNAME text="PACKS_DISDAIN" />
<TITLE>
<LOCALISED_TEXT LanguageCode="en-US"><![CDATA[Pack’s Disdain]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="fr-FR"><![CDATA[Dédain de la meute]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="es-ES"><![CDATA[Desdén de la manada]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="de-DE"><![CDATA[Missmut der Meute]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="it-IT"><![CDATA[Sdegno del Branco]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="jp-JA"><![CDATA[群れの侮蔑]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="ko-KR"><![CDATA[Pack's Disdain]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="ru-RU"><![CDATA[Презрение Стаи]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="pt-BR"><![CDATA[Desprezo do Grupo]]></LOCALISED_TEXT>
</TITLE>
<MULTIVERSEID value="153165" />
<ARTID value="RSN153165" />
<ARTIST name="Pete Venters" />
<CASTING_COST cost="{1}{B}" />
<FLAVOURTEXT>
<LOCALISED_TEXT LanguageCode="en-US"><![CDATA[Like the sun to a flower, the adoring gaze of the tribe is sustenance to an elf. To be shunned is to wither.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="fr-FR"><![CDATA[Comme pour la fleur et le soleil, l'elfe a besoin du regard d'adoration de la tribu pour subsister. Être banni, c'est se faner.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="es-ES"><![CDATA[Como el sol para una flor, la mirada de admiración de la tribu es vital para un elfo. Ser rechazado es marchitarse.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="de-DE"><![CDATA[Jeder Elf braucht die bewundernden Blicke seines Stammes wie eine Blume die Sonne. Wer ausgestoßen wird, verwelkt.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="it-IT"><![CDATA[Come il sole per un fiore, lo sguardo di adorazione della tribù è il nutrimento di un elfo. Sfuggirgli significa appassire.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="jp-JA"><![CDATA[花に対する太陽のように、部族の愛情こもった視線はエルフにとって滋養となる。 遠ざけられることは萎えることなのだ。]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="ko-KR"><![CDATA[Like the sun to a flower, the adoring gaze of the tribe is sustenance to an elf. To be shunned is to wither.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="ru-RU"><![CDATA[Как солнце для цветка, восхищенный взгляд соплеменников нужен эльфу, чтобы выжить. Стать изгоем значит увянуть.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="pt-BR"><![CDATA[Assim como o sol para uma flor, o olhar adorador da tribo é o sustento de um elfo. Ser evitado é murchar.]]></LOCALISED_TEXT>
</FLAVOURTEXT>
<TYPE metaname="Instant" />
<EXPANSION value="MOR" />
<RARITY metaname="C" />
<SPELL_ABILITY filter_zone="ZONE_IN_PLAY">
<LOCALISED_TEXT LanguageCode="en-US"><![CDATA[Choose a creature type. Target creature gets -1/-1 until end of turn for each permanent of the chosen type you control.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="fr-FR"><![CDATA[Choisissez un type de créature. La créature ciblée gagne -1/-1 jusqu'à la fin du tour pour chaque permanent que vous contrôlez du type choisi.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="es-ES"><![CDATA[Elige un tipo de criatura. La criatura objetivo obtiene -1/-1 hasta el final del turno por cada permanente del tipo elegido que controlas.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="de-DE"><![CDATA[Bestimme einen Kreaturentyp. Eine Kreatur deiner Wahl erhält für jede bleibende Karte des bestimmten Typs, die du kontrollierst, -1/-1 bis zum Ende des Zuges.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="it-IT"><![CDATA[Scegli un tipo di creatura. Una creatura bersaglio prende -1/-1 fino alla fine del turno per ogni permanente che controlli del tipo scelto.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="jp-JA"><![CDATA[クリーチャー1体を対象とする。クリーチャー・タイプを1つ選ぶ。 そのクリーチャーは、ターン終了時まであなたがコントロールする選ばれたタイプを持つパーマネント1つにつき-1/-1の修整を受ける。]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="ko-KR"><![CDATA[Choose a creature type. Target creature gets -1/-1 until end of turn for each permanent of the chosen type you control.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="ru-RU"><![CDATA[Выберите тип существа. Целевое существо получает -1/-1 до конца хода за каждый перманент выбранного типа под вашим контролем.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="pt-BR"><![CDATA[Escolha um tipo de criatura. A criatura alvo recebe -1/-1 até o final do turno para cada permanente do tipo escolhido que você controla.]]></LOCALISED_TEXT>
<TARGET_DEFINITION id="0">
local filter = Object():GetFilter()
filter:Clear()
filter:AddCardType( CARD_TYPE_CREATURE )
filter:SetZone( ZONE_IN_PLAY )
filter:SetHint( HINT_ENEMY_ONLY, EffectController() )
</TARGET_DEFINITION>
<TARGET_DETERMINATION>
return AtLeastOneTargetFromDefinition(0)
</TARGET_DETERMINATION>
<PLAY_TIME_ACTION>
-- Set things up here.
EffectDC():Make_Chest( 2 )
-- Look-up creature types in player's library and in play.
RSN_FindPlayerCreatureTypesInZones( EffectDC():Get_Chest( 2 ), EffectController(), ZONE_IN_PLAY, ZONE_LIBRARY )
-- Set the best type as default
local nBestIndex = EffectDC():Get_Chest( 2 ):Int_Get( REGISTER_SELECTION_BEST_TYPE_INDEX )
EffectDC():Get_Chest( 2 ):Int_Set( REGISTER_SELECTION_SELECTED_INDEX, nBestIndex )
</PLAY_TIME_ACTION>
<PLAY_TIME_ACTION repeating="1">
return RSN_ChooseCreatureTypeFromDC( EffectController(), EffectDC():Get_Chest( 2 ) )
</PLAY_TIME_ACTION>
<PLAY_TIME_ACTION target_choosing="1">
EffectController():ChooseTarget( 0, "CARD_QUERY_CHOOSE_CREATURE_TO_GET_-1_-1_PER_CREATURE_OF_CHOOSEN_TYPE", EffectDC():Make_Targets(0) )
</PLAY_TIME_ACTION>
<RESOLUTION_TIME_ACTION>
local filter = Object():GetFilter()
local nChosenType = RSN_GetChosenCreatureType( EffectDC():Get_Chest( 2 ) )
filter:Clear()
filter:SetZone( ZONE_IN_PLAY )
filter:AddSubType( nChosenType )
filter:SetController( EffectController() )
filter:NotTargetted()
local total = filter:Count()
EffectDC():Set_Int( 1, total )
</RESOLUTION_TIME_ACTION>
<CONTINUOUS_ACTION layer="7C">
local target = EffectDC():Get_Targets(0):Get_CardPtr(0)
if target ~= nil then
local total = EffectDC():Get_Int(1)
local characteristics = target:GetCurrentCharacteristics()
characteristics:Power_Add(-total)
characteristics:Toughness_Add(-total)
end
</CONTINUOUS_ACTION>
<DURATION simple_duration="UntilEOT" />
</SPELL_ABILITY>
</CARD_V2>
- Code: Select all
RSN_FindPlayerCreatureTypesInZones( EffectDC():Get_Chest( 2 ), EffectController(), ZONE_IN_PLAY )
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: 2189
- Joined: 16 May 2011, 21:37
- Has thanked: 75 times
- Been thanked: 497 times
6 posts
• Page 1 of 1
Who is online
Users browsing this forum: No registered users and 9 guests