It is currently 19 Jul 2025, 22:38
   
Text Size

Formal Request Thread

Moderator: CCGHQ Admins

Re: Formal Request Thread

Postby RiiakShiNal » 21 Dec 2013, 01:59

NeoAnderson wrote:I know i always use that page as a guide for function i still don't know! :(
The unbelievable think is how to program a function without leaving the possibility to use it for multiple situations!
All Wasted time! Anyway would be interesting if could be possible to see the decomplied function, but as i have seen for 2014 there are not decomplied LoL files.
Actually the LOL files that can be decoded have been:
DotP 2014: Decompilable LOL contents
Though like all previous versions functions that are hard-coded into the engine still have no code in the LOL files so looking for code for BESPOKE_Retether_SetOnlyCreaturesCanBeEnchantedFlag() is pointless. All the functions listed on the DotP 2014 functions page are hard-coded into the engine so we don't have code for any of them.

NeoAnderson wrote:
thefiremind wrote:You can't. With my suggestion I meant to get informed about the possible combos and hard-code the combo cards' names into Xenograft code. Personally, I don't see any other way out, and I don't think it's possible to make a Xenograft that the AI will use like a human. I'm sure that people who worked on this kind of functionality before (like RiiakShiNal or sumomole) will be more helpful than me on this matter.
As i was imaging at this point i think the best solution is to let the AI CHOOSE for a value between the first Type and the latest one, then add that type. Who knows, could be interesting to view if it can add useful types!
There isn't any way to detect card combos or which creature type would be best to choose for a particular combo. However, in code that uses choose a creature type functions you can make certain assumptions and guesstimate what would make the most sense. For example you could make a card that would choose the most logical choice based on creature types in various zones, a card that gives opponent creatures of a type -1/-1 would want to pick a creature type that appears most on the battlefield and/or graveyard (if there are a bunch in the graveyard there is a good possibility that there are more in the deck). Whereas a card that gives a positive effect to creatures the player controls might want to look at the type which has the most cards in the battlefield, hand, and library to make the most appropriate choice. Ultimately the best automatic choice for any given card can be guesstimated using most and/or least counted types in one or more given zones.

Having the AI choose the type can be tricky for some cards as the AI is probably a Min/Max simulation AI in which case for cards that effect those in play or those in it's own deck it might be able to make a decent decision if it could choose from all types at once, however, since most choose creature type functions require making multiple decisions to allow for types beyond what will show in a single multiple choice decision this can lead to poor choices due to simulation choice limiting or even hung games due to the AI trying to simulate all possible options. I toyed with trying to allow the AI to choose a creature type in DotP 2013 and gave up due to these problems and hard-coded an AI choice into the cards I made that used choose creature type functions based on best guesstimate for a card.
RiiakShiNal
Programmer
 
Posts: 2188
Joined: 16 May 2011, 21:37
Has thanked: 75 times
Been thanked: 497 times

Re: Formal Request Thread

Postby NeoAnderson » 21 Dec 2013, 02:06

thefiremind wrote:The problem is that putting an Aura onto the battlefield and attach it to a creature doesn't target the creature (you can enchant creatures with shroud this way). I have only one idea, it's not elegant and it may cause unwanted effects (if it works at all :lol:) but that's all I have: grant your artifacts protection from Auras with no parent. I think you need a FILTER_CONDITION with FilteredCard():GetParent() == nil because I don't think there's another way, and some unusual protections were making DotP2013 crash, that's why I don't know if it works on DotP2014.
I tried your solution you can see the code here but it doesn't work :-(

Code: Select all
  <STATIC_ABILITY>
   <FILTER filter_id="0">
    local filter = ClearFilter()
    filter:Add( FE_TYPE, OP_IS, CARD_TYPE_ARTIFACT )
    filter:Add( FE_TYPE, OP_NOT, CARD_TYPE_CREATURE  )
    filter:Add( FE_CONTROLLER, OP_IS, EffectController())
    </FILTER>
<CONTINUOUS_ACTION layer="6" filter_id="0">
    if FilteredCard() ~= nil and EffectSource():IsTapped() == false then
       local characteristics = FilteredCard():GetCurrentCharacteristics()
       characteristics:Bool_Set( CHARACTERISTIC_INDESTRUCTIBLE, 1 )
        characteristics:GrantAbility(1)
    end
    </CONTINUOUS_ACTION>
</STATIC_ABILITY>

<STATIC_ABILITY resource_id="1">
    <FILTER_CONDITION id="1">
    local card = FilteredCard()
    if card ~= nil then
       if card():GetParent() == nil  then
             return true
       end
    end
    return false
    </FILTER_CONDITION>
  <CONTINUOUS_ACTION layer="0">
    if EffectSource() ~= nil then
    local filter = ClearFilter()
    filter:Add( FE_SUBTYPE, OP_IS, ENCHANTMENT_TYPE_AURA )
    filter:Add( FE_LUA_CONDITION, 1, EffectController(), EffectDC() )
       EffectSource():Protection()
    end
    </CONTINUOUS_ACTION>
</STATIC_ABILITY>
NeoAnderson
 
Posts: 914
Joined: 10 Sep 2013, 07:49
Has thanked: 18 times
Been thanked: 139 times

Re: Formal Request Thread

Postby NeoAnderson » 21 Dec 2013, 04:19

RiiakShiNal wrote:There isn't any way to detect card combos or which creature type would be best to choose for a particular combo. However, in code that uses choose a creature type functions you can make certain assumptions and guesstimate what would make the most sense. For example you could make a card that would choose the most logical choice based on creature types in various zones, a card that gives opponent creatures of a type -1/-1 would want to pick a creature type that appears most on the battlefield and/or graveyard (if there are a bunch in the graveyard there is a good possibility that there are more in the deck). Whereas a card that gives a positive effect to creatures the player controls might want to look at the type which has the most cards in the battlefield, hand, and library to make the most appropriate choice. Ultimately the best automatic choice for any given card can be guesstimated using most and/or least counted types in one or more given zones.

Having the AI choose the type can be tricky for some cards as the AI is probably a Min/Max simulation AI in which case for cards that effect those in play or those in it's own deck it might be able to make a decent decision if it could choose from all types at once, however, since most choose creature type functions require making multiple decisions to allow for types beyond what will show in a single multiple choice decision this can lead to poor choices due to simulation choice limiting or even hung games due to the AI trying to simulate all possible options. I toyed with trying to allow the AI to choose a creature type in DotP 2013 and gave up due to these problems and hard-coded an AI choice into the cards I made that used choose creature type functions based on best guesstimate for a card.
Thanks you my friend, i was imaging a situation like this.
I think as you said the best solution is to make some basic checks and assign a value to each creature type based on this checks,
Then select the creature type with greatest assigned value.
Anyway i will try something during these days.

Now about the card i was discussing with TheFiremind Guardian Beast have you any suggestion how to resolve the issue about Aura card who are directly putonbattlefield?
NeoAnderson
 
Posts: 914
Joined: 10 Sep 2013, 07:49
Has thanked: 18 times
Been thanked: 139 times

Re: Formal Request Thread

Postby RiiakShiNal » 21 Dec 2013, 13:10

NeoAnderson wrote:Now about the card i was discussing with TheFiremind Guardian Beast have you any suggestion how to resolve the issue about Aura card who are directly putonbattlefield?
I can't think of any way to prevent the targeting, but you might be able to prevent the actual attachment by overriding the AURA_ATTACHED trigger. The problem with that of course is that players shouldn't even be able to attempt to attach an aura to a non-creature artifact you control when Guardian Beast is untapped since they would not be legal targets.
RiiakShiNal
Programmer
 
Posts: 2188
Joined: 16 May 2011, 21:37
Has thanked: 75 times
Been thanked: 497 times

Re: Formal Request Thread

Postby NeoAnderson » 21 Dec 2013, 14:07

RiiakShiNal wrote:
NeoAnderson wrote:Now about the card i was discussing with TheFiremind Guardian Beast have you any suggestion how to resolve the issue about Aura card who are directly putonbattlefield?
I can't think of any way to prevent the targeting, but you might be able to prevent the actual attachment by overriding the AURA_ATTACHED trigger. The problem with that of course is that players shouldn't even be able to attempt to attach an aura to a non-creature artifact you control when Guardian Beast is untapped since they would not be legal targets.
Thanks a lot my friend,
About the targetting action it can be prevented only if the card is considered for cast, in fact the first trigger CARD_CONSIDERED_FOR_TARGETTING is working, the problem is about the card not going to be cast.
I was missing AURA_ATTACHED Trigger, now it works but it is appeared another problem, but this time i think is easier to resolve.

With the follow trigger the Aura cannot be Attached to the Non-Creature artifact and if there aren't other legal targets where attach it, the game will not exit from target selection.

Code: Select all
<TRIGGERED_ABILITY replacement_effect="1">
      <TRIGGER value="AURA_ATTACHED" pre_trigger="1">
    if EffectSource():IsTapped() == false and  SecondaryObject()~= nil and TriggerObject()~= nil and TriggerObject():GetSubType():Test( ENCHANTMENT_TYPE_AURA ) and SecondaryObject():GetCardType():Test(

CARD_TYPE_ARTIFACT ) then
      if SecondaryObject():GetCardType():Test( CARD_TYPE_CREATURE ) then
         return false
       else
         return true
       end
    else
        return false
    end
    </TRIGGER>
</TRIGGERED_ABILITY>
I think we can manage how to resolve this issue retrieving the GetErstwhileZone() of the Aura and if it is not a Token we could send it back to that zone.
Another option is simply to Counter that Aura.
NeoAnderson
 
Posts: 914
Joined: 10 Sep 2013, 07:49
Has thanked: 18 times
Been thanked: 139 times

Re: Formal Request Thread

Postby RiiakShiNal » 21 Dec 2013, 14:53

NeoAnderson wrote:About the targetting action it can be prevented only if the card is considered for cast, in fact the first trigger CARD_CONSIDERED_FOR_TARGETTING is working, the problem is about the card not going to be cast.
In your query though you specifically asked about auras that are put directly onto the battlefield which is why I said I couldn't think of a way to prevent the targeting. I am aware of CARD_CONSIDERED_FOR_TARGETTING though as has already been stated it doesn't work if the card is non-targeted (which is what I was getting at). If a card puts an aura directly into play in a non-targeted fashion then while overriding AURA_ATTACHED will prevent attaching it to that card it won't necessarily prevent the selection of that card which is probably what is causing the problem with target selection because the engine believes there is a valid target even though there may not be one.
RiiakShiNal
Programmer
 
Posts: 2188
Joined: 16 May 2011, 21:37
Has thanked: 75 times
Been thanked: 497 times

Re: Formal Request Thread

Postby NeoAnderson » 21 Dec 2013, 15:50

RiiakShiNal wrote:
NeoAnderson wrote:About the targetting action it can be prevented only if the card is considered for cast, in fact the first trigger CARD_CONSIDERED_FOR_TARGETTING is working, the problem is about the card not going to be cast.
In your query though you specifically asked about auras that are put directly onto the battlefield which is why I said I couldn't think of a way to prevent the targeting. I am aware of CARD_CONSIDERED_FOR_TARGETTING though as has already been stated it doesn't work if the card is non-targeted (which is what I was getting at). If a card puts an aura directly into play in a non-targeted fashion then while overriding AURA_ATTACHED will prevent attaching it to that card it won't necessarily prevent the selection of that card which is probably what is causing the problem with target selection because the engine believes there is a valid target even though there may not be one.
Again sorry for the misunderstanding.
You're right, honestly, i think the problem is :
1. If i try to normally cast an Aura the engine look for the suitable targets first and this activate the first trigger CARD_CONSIDERED_FOR_TARGETTING so it works because the overriding action happens before we can cast the Aura, so that card is marked as cannot be played (no suitable targets).
2. When we use putonbattlefield the first trigger(CARD_CONSIDERED_FOR_TARGETTING) never fire because the card is played without targets checks, so also if we override the AURA_ATTACHED trigger it endlessly loop because the Aura target definition normally can target that cards.
The weird thing is that it seems i cannot do anything to break this loop.
I have tried to set the AURA_ATTACHED trigger as replacement_effect and pre_trigger but it loop endlessly into target selection.
So i tried to use these actions inside the trigger evaluation to override the aura Attach:
A. PutInHand the aura (NOT WORK)
B. CounterSpell (NOT WORK)

I have tried to set the AURA_ATTACHED trigger without replacement_effect and pre_trigger but it remains attached to the card.
So i tried to use these actions at RESOLUTION_TIME_ACTION using TriggerObjeckLKI to point to the Aura:
A. PutInHand the aura (NOT WORK)
B. Using a filter set to (FE_CARD_INSTANCE, OP_IS, TriggerObjectLKI()),and a RESOLUTION_TIME_ACTION
local oOwner = TriggerObjectLKI():GetOwner() FilteredCard():QueueZoneChange( ZONE_HAND, oOwner )
But it doesn't work.

I just made an interesting test, i modified the Xml of an Aura spell i am using for tests, i changed it to target Lands.
I used a card to put it on battlefield also if i have no lands into play.
The card is selectable from the chest to be played, and when i play it nothing happens.
So if there is a way to modify the aura target definition as replacement effect, to exclude somethings, it could work.
What you think?

UPDATE :
I get a result it is not really nice solution but it avoid that the Aura is assigned if is not cast.
Don't ask me why or how i find this solution but i swear i tried everything, many different functions and alternatives.
I have found that if we use Chooseitems, to select a new target into AURA_ATTACHED trigger as replacement_effect, doesn't matter which target we choose the Aura is not put in game, if it is not a token it remains into its zone.
So this solution is not elegant but simulate a good part of what we were looking for.
The only problem is if we use an effect to put a token of an aura on the battlefield, and we have many legal targets but we select a non legal target the token will be lost. A normal behaviour should be to ask to target a legal object.


Here you can find the code :
Code: Select all
<TRIGGERED_ABILITY replacement_effect="1">
      <TRIGGER value="AURA_ATTACHED" pre_trigger="1">
    if EffectSource():IsTapped() == false and  SecondaryObject()~= nil and TriggerObject()~= nil and TriggerObject():GetSubType():Test( ENCHANTMENT_TYPE_AURA ) and SecondaryObject():GetCardType():Test(CARD_TYPE_ARTIFACT ) then
      if SecondaryObject():GetCardType():Test( CARD_TYPE_CREATURE ) then
         return false
       else
          local opponent_player = TriggerObject():GetController()
          if opponent_player ~= nil then
             local oVal = 1
            local filter = ClearFilter()
             filter:Add( FE_IS_PERMANENT, true )
             opponent_player:SetItemCount( oVal )
             for i=0, 1-1 do
                 opponent_player:SetItemPrompt( i, "CARD_QUERY_CANNOT_TARGET_THIS" )
             end
                 opponent_player:ChooseItems( EffectDC():Make_Targets(2), QUERY_FLAG_UP_TO )
          end
          local target = EffectDC():Make_Targets(2)
          if (target ~= nil and EffectSource() ~= nil) then
           TriggerObject():Attach( target )
          end
          return true
       end
    else
        return false
    end
</TRIGGER>
</TRIGGERED_ABILITY>
NeoAnderson
 
Posts: 914
Joined: 10 Sep 2013, 07:49
Has thanked: 18 times
Been thanked: 139 times

Re: Formal Request Thread

Postby RiiakShiNal » 21 Dec 2013, 19:26

NeoAnderson wrote:So if there is a way to modify the aura target definition as replacement effect, to exclude somethings, it could work.
What you think?
There is no way to programmatically change the attach definition of an aura (or equipment) as the engine does not give us this ability. Aura attach definitions would have to be written with Guardian Beast in mind and check for it (which is just too much work for a single card, we could make cards endlessly complex by trying to compensate for everything). Solutions are best kept as simple as possible with a minimum of code as the more code you add the more bugs and potential for problematic interactions increases.

NeoAnderson wrote:I get a result it is not really nice solution but it avoid that the Aura is assigned if is not cast.
Don't ask me why or how i find this solution but i swear i tried everything, many different functions and alternatives.
I have found that if we use Chooseitems, to select a new target into AURA_ATTACHED trigger as replacement_effect, doesn't matter which target we choose the Aura is not put in game, if it is not a token it remains into its zone.
So this solution is not elegant but simulate a good part of what we were looking for.
The only problem is if we use an effect to put a token of an aura on the battlefield, and we have many legal targets but we select a non legal target the token will be lost. A normal behaviour should be to ask to target a legal object.
Looking at your code I can't really say I follow it as there seem to be some issues.

NeoAnderson wrote:
Code: Select all
<TRIGGERED_ABILITY replacement_effect="1">
      <TRIGGER value="AURA_ATTACHED" pre_trigger="1">
...
                 opponent_player:ChooseItems( EffectDC():Make_Targets(2), QUERY_FLAG_UP_TO )
...
This doesn't seem right as to ask the player any questions you need to use replacement_query="1" or it doesn't work right.

Also I'm not sure how well asking a choice of the player inside of a TRIGGER works.

NeoAnderson wrote:
Code: Select all
          local target = EffectDC():Make_Targets(2)
          if (target ~= nil and EffectSource() ~= nil) then
           TriggerObject():Attach( target )
          end
This bit is absolutely pointless for multiple reasons:
  • Assigning target a brand new empty data chest then trying to attach a card to an empty data chest? Just saying it sounds pointless.
  • Trying to get the target from the ChooseItems() in the same block doesn't work. There is a reason why ChooseItem() and ChooseItems() are generally the last commands done in a block before returning. This means that even if you change it from Make_Targets(2) to Get_Targets(2) it won't make a difference.
  • You can't attach a card to a data chest no matter what you do, you can only attach a card to another card.
  • Why are you checking to see if EffectSource() is not nil when you don't use it at all in that block?
RiiakShiNal
Programmer
 
Posts: 2188
Joined: 16 May 2011, 21:37
Has thanked: 75 times
Been thanked: 497 times

Re: Formal Request Thread

Postby NeoAnderson » 21 Dec 2013, 21:52

RiiakShiNal wrote:There is no way to programmatically change the attach definition of an aura (or equipment) as the engine does not give us this ability. Aura attach definitions would have to be written with Guardian Beast in mind and check for it (which is just too much work for a single card, we could make cards endlessly complex by trying to compensate for everything). Solutions are best kept as simple as possible with a minimum of code as the more code you add the more bugs and potential for problematic interactions increases.
I understand your meaning, i was simply fighting with engine limitations i don't like when something so simple seems to be impossible to do for unreasonable missings.

RiiakShiNal wrote:Looking at your code I can't really say I follow it as there seem to be some issues.
NeoAnderson wrote:
Code: Select all
<TRIGGERED_ABILITY replacement_effect="1">
      <TRIGGER value="AURA_ATTACHED" pre_trigger="1">
...
                 opponent_player:ChooseItems( EffectDC():Make_Targets(2), QUERY_FLAG_UP_TO )
...
RiiakShiNal wrote:This doesn't seem right as to ask the player any questions you need to use replacement_query="1" or it doesn't work right.Also I'm not sure how well asking a choice of the player inside of a TRIGGER works.
As i was saying i know this action has not much sense i was just saying this action break the aura targetting loop.


NeoAnderson wrote:
Code: Select all
          local target = EffectDC():Make_Targets(2)
          if (target ~= nil and EffectSource() ~= nil) then
           TriggerObject():Attach( target )
          end
RiiakShiNal wrote:This bit is absolutely pointless for multiple reasons:
  • Assigning target a brand new empty data chest then trying to attach a card to an empty data chest? Just saying it sounds pointless.
  • Trying to get the target from the ChooseItems() in the same block doesn't work. There is a reason why ChooseItem() and ChooseItems() are generally the last commands done in a block before returning. This means that even if you change it from Make_Targets(2) to Get_Targets(2) it won't make a difference.
  • You can't attach a card to a data chest no matter what you do, you can only attach a card to another card.
  • Why are you checking to see if EffectSource() is not nil when you don't use it at all in that block?
About the code i have posted this solution is already no sense if i wrote it right, but i also posted the wrong code, i had many files opened while i was modifying the card and i have posted the wrong one.
The code i was using is :
Code: Select all
<TRIGGERED_ABILITY replacement_effect="1">
      <TRIGGER value="AURA_ATTACHED" pre_trigger="1">
    if EffectSource():IsTapped() == false and  SecondaryObject()~= nil and TriggerObject()~= nil and TriggerObject():GetSubType():Test( ENCHANTMENT_TYPE_AURA ) and SecondaryObject():GetCardType():Test(CARD_TYPE_ARTIFACT ) then
      if SecondaryObject():GetCardType():Test( CARD_TYPE_CREATURE ) then
         return false
       else
          local opponent_player = TriggerObject():GetController()
          if opponent_player ~= nil then
             local oVal = 1
            local filter = ClearFilter()
             filter:Add( FE_IS_PERMANENT, true )
             opponent_player:SetItemCount( oVal )
             for i=0, 1-1 do
                 opponent_player:SetItemPrompt( i, "CARD_QUERY_CANNOT_TARGET_THIS" )
             end
                 opponent_player:ChooseItems( EffectDC():Make_Targets(2), QUERY_FLAG_UP_TO )
          end
          local target = EffectDC():Get_Targets(2):Get_CardPtr(0)
          if (target ~= nil) then
           TriggerObject():Attach( target )
          end
          return true
       end
    else
        return false
    end
</TRIGGER>
</TRIGGERED_ABILITY>
UPDATE :Now starting from the code above and with some little modifications we can get it work :
Code: Select all
<TRIGGERED_ABILITY replacement_effect="1" replacement_query="1">
      <TRIGGER value="AURA_ATTACHED" pre_trigger="1">
    if EffectSource():IsTapped() == false and  SecondaryObject()~= nil and TriggerObject()~= nil and TriggerObject():GetSubType():Test( ENCHANTMENT_TYPE_AURA ) and SecondaryObject():GetCardType():Test(CARD_TYPE_ARTIFACT ) and SecondaryObject():GetController() == EffectController()  then
      if SecondaryObject():GetCardType():Test( CARD_TYPE_CREATURE ) then
         return false
       else
          local opponent_player = TriggerObject():GetController()
          if opponent_player ~= nil then
             local oVal = 1
            local filter = ClearFilter()
             filter:Add( FE_IS_PERMANENT, true )
             opponent_player:SetItemCount( oVal )
             for i=0, 1-1 do
                 opponent_player:SetItemPrompt( i, "CARD_QUERY_CANNOT_TARGET_THIS" )
             end
                 opponent_player:ChooseItems( EffectDC():Make_Targets(2), QUERY_FLAG_UP_TO )
          end
          local target = EffectDC():Get_Targets(2):Get_CardPtr(0)
          if (target ~= nil) then
           TriggerObject():Attach( target )
          end
           local oNumArtifactsNonCreatures = CountcardTypeANotTypeBControlledBy(CARD_TYPE_ARTIFACT, CARD_TYPE_CREATURE, ZONE_BATTLEFIELD, SecondaryObject():GetController())
          local filter = ClearFilter()
           filter = TriggerObject():LoadTargetDefinition(0)
           local oNum = filter:Count()
           if oNum &gt; oNumArtifactsNonCreatures then
              TriggerObject():PutOntoBattlefield( opponent_player )
           end
          return true
       end
    else
        return false
    end
</TRIGGER>
</TRIGGERED_ABILITY>
1. I have added Controller check into trigger (SecondaryObject():GetController() == EffectController())
2. I made a simple function to count the non-creatures Artifacts CountcardTypeANotTypeBControlledBy(CARD_TYPE_ARTIFACT, CARD_TYPE_CREATURE, ZONE_BATTLEFIELD, SecondaryObject():GetController())
3. We load the Source Aura targetting definition TriggerObject():LoadTargetDefinition(0)
3A. Then we count the Source suitable targets.
4. If the Suitable targets are greater then Non-Creatures Artifacts controlled by target player we put the aura again on battlefield.

I know that apparently it seems a weird way to resolve this issue but it works, I think i only need to make a dinamyc check to return the source target definition. in this example i know it works because the Aura i used was using definition(0), but this is doable because i have a seen a fix by TheFiremind who do something similar to retrieve the not empty datachest.
Anyway i also take a look of all the Aura cards code, and all of them use definition "0".
My worry is about the AI because an human player will understand that targetting a not suitable target will loop to a new target selction so probably the player will choose a legal target, but what about the AI?
Anytime the target choose is repeated all the source targets will available so theoretically the AI could select always the same target.

I have another question now i am focusing about controller change trigger.
I can confirm to TheFiremind the Trigger works so it can be used with replacement_effect, but i have seen the follow behaviour.
Game situation :

In play under my control : Guardian Beast and Artifact1 (non-creature artifact)
a. Guardian Beast is untapped.
b. Opponent cast Master Thief and target Artifact1
c. Guardian Beast ability override the control change Artifact1 remains under my control.
d. I tap Guardian Beast, Artifact1 go under control of Opponent.

Now i really don't know if this card is supposed to work so, anyone have more information about it?
Because if the behaviour is normal i can leave it so, otherwise i have to study something to avoid this behaviour.

HEre there is the complete card code :
Guardian Beast | Open
Code: Select all
<?xml version='1.0' encoding='UTF-8'?>
<CARD_V2 ExportVersion="1">
  <FILENAME text="GUARDIAN_BEAST_202539" />
  <CARDNAME text="GUARDIAN_BEAST" />
  <TITLE>
    <LOCALISED_TEXT LanguageCode="en-US"><![CDATA[Guardian Beast]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="fr-FR"><![CDATA[Guardian Beast]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="es-ES"><![CDATA[Guardian Beast]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="de-DE"><![CDATA[Guardian Beast]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="it-IT"><![CDATA[Guardian Beast]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="jp-JA"><![CDATA[Guardian Beast]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="ko-KR"><![CDATA[Guardian Beast]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="ru-RU"><![CDATA[Guardian Beast]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="pt-BR"><![CDATA[Guardian Beast]]></LOCALISED_TEXT>
  </TITLE>
  <MULTIVERSEID value="202539" />
  <ARTID value="202539" />
  <ARTIST name="Ken Meyer, Jr." />
  <CASTING_COST cost="{3}{B}" />
  <TYPE metaname="Creature" />
  <SUB_TYPE metaname="Beast" />
  <EXPANSION value="ME4" />
  <RARITY metaname="R" />
  <POWER value="2" />
  <TOUGHNESS value="4" />
  <STATIC_ABILITY>
    <LOCALISED_TEXT LanguageCode="en-US"><![CDATA[As long as Guardian Beast is untapped, noncreature artifacts you control can’t be enchanted, they have indestructible, and other players can’t gain control of them. This effect doesn’t remove Auras already attached to those artifacts.]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="fr-FR"><![CDATA[As long as Guardian Beast is untapped, noncreature artifacts you control can’t be enchanted, they have indestructible, and other players can’t gain control of them. This effect doesn’t remove Auras already attached to those artifacts.]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="es-ES"><![CDATA[As long as Guardian Beast is untapped, noncreature artifacts you control can’t be enchanted, they have indestructible, and other players can’t gain control of them. This effect doesn’t remove Auras already attached to those artifacts.]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="de-DE"><![CDATA[As long as Guardian Beast is untapped, noncreature artifacts you control can’t be enchanted, they have indestructible, and other players can’t gain control of them. This effect doesn’t remove Auras already attached to those artifacts.]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="it-IT"><![CDATA[Fintanto che la Guardian Beast è STAPpata, gli artefatti non creatura che controlli non possono essere incantati, hanno indistruttibile, e gli altri giocatori non possono prenderne il controllo. Questo effetto non rimuove le Aure già assegnate a quegli artefatti.]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="jp-JA"><![CDATA[As long as Guardian Beast is untapped, noncreature artifacts you control can’t be enchanted, they have indestructible, and other players can’t gain control of them. This effect doesn’t remove Auras already attached to those artifacts.]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="ko-KR"><![CDATA[As long as Guardian Beast is untapped, noncreature artifacts you control can’t be enchanted, they have indestructible, and other players can’t gain control of them. This effect doesn’t remove Auras already attached to those artifacts.]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="ru-RU"><![CDATA[As long as Guardian Beast is untapped, noncreature artifacts you control can’t be enchanted, they have indestructible, and other players can’t gain control of them. This effect doesn’t remove Auras already attached to those artifacts.]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="pt-BR"><![CDATA[As long as Guardian Beast is untapped, noncreature artifacts you control can’t be enchanted, they have indestructible, and other players can’t gain control of them. This effect doesn’t remove Auras already attached to those artifacts.]]></LOCALISED_TEXT>
   <FILTER filter_id="0">
    local filter = ClearFilter()
    filter:Add( FE_TYPE, OP_IS, CARD_TYPE_ARTIFACT )
    filter:Add( FE_TYPE, OP_NOT, CARD_TYPE_CREATURE  )
    filter:Add( FE_CONTROLLER, OP_IS, EffectController())
    </FILTER>
<CONTINUOUS_ACTION layer="6" filter_id="0">
    if FilteredCard() ~= nil and EffectSource():IsTapped() == false then
       local characteristics = FilteredCard():GetCurrentCharacteristics()
       characteristics:Bool_Set( CHARACTERISTIC_INDESTRUCTIBLE, 1 )
    end
    </CONTINUOUS_ACTION>
</STATIC_ABILITY>

<TRIGGERED_ABILITY replacement_effect="1" replacement_query="1">
      <TRIGGER value="AURA_ATTACHED" pre_trigger="1">
    if EffectSource():IsTapped() == false and  SecondaryObject()~= nil and TriggerObject()~= nil and TriggerObject():GetSubType():Test( ENCHANTMENT_TYPE_AURA ) and SecondaryObject():GetCardType():Test(CARD_TYPE_ARTIFACT ) and SecondaryObject():GetController() == EffectController()  then
      if SecondaryObject():GetCardType():Test( CARD_TYPE_CREATURE ) then
         return false
       else
          local opponent_player = TriggerObject():GetController()
          if opponent_player ~= nil then
             local oVal = 1
            local filter = ClearFilter()
             filter:Add( FE_IS_PERMANENT, true )
             opponent_player:SetItemCount( oVal )
             for i=0, 1-1 do
                 opponent_player:SetItemPrompt( i, "CARD_QUERY_CANNOT_TARGET_THIS" )
             end
                 opponent_player:ChooseItems( EffectDC():Make_Targets(2), QUERY_FLAG_UP_TO )
          end
          local target = EffectDC():Get_Targets(2):Get_CardPtr(0)
          if (target ~= nil) then
           TriggerObject():Attach( target )
          end
           local oNumArtifactsNonCreatures = CountcardTypeANotTypeBControlledBy(CARD_TYPE_ARTIFACT, CARD_TYPE_CREATURE, ZONE_BATTLEFIELD, SecondaryObject():GetController())
          local filter = ClearFilter()
           filter = TriggerObject():LoadTargetDefinition(0)
           local oNum = filter:Count()
           if oNum &gt; oNumArtifactsNonCreatures then
              TriggerObject():PutOntoBattlefield( opponent_player )
           end
          return true
       end
    else
        return false
    end
</TRIGGER>
</TRIGGERED_ABILITY>

<TRIGGERED_ABILITY replacement_effect="1">
      <TRIGGER value="CARD_CONSIDERED_FOR_TARGETTING" simple_qualifier="objectyoucontrol" pre_trigger="1">
    if EffectSource():IsTapped() == false and  SecondaryObject()~= nil and TriggerObject()~= nil and SecondaryObject():GetSubType():Test( ENCHANTMENT_TYPE_AURA ) and TriggerObject():GetCardType():Test( CARD_TYPE_ARTIFACT ) then
      if TriggerObject():GetCardType():Test( CARD_TYPE_CREATURE ) then
         return false
       else
         return true
       end
    else
        return false
    end
    </TRIGGER>
</TRIGGERED_ABILITY>

<TRIGGERED_ABILITY replacement_effect="1">
    <TRIGGER value="CONTROLLER_CHANGED" simple_qualifier="objectyoucontrol" pre_trigger="1">
    if EffectSource():IsTapped() == false and TriggerObject()~= nil and TriggerObject():GetCardType():Test( CARD_TYPE_ARTIFACT ) then
      if TriggerObject():GetCardType():Test( CARD_TYPE_CREATURE ) then
         return false
       else
         return true
       end
    else
        return false
    end
    </TRIGGER>
  </TRIGGERED_ABILITY>
  <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>
Function needed :
CountcardTypeANotTypeBControlledBy | Open
Code: Select all
CountcardTypeANotTypeBControlledBy = function(nTypeA, nTypeB, nZone, nPlayer)
-- returns the number of card of the TYPEA (nTYPE) not TypeB, considering the zone (nZone) controlled by nPlayer
-- else returns 0
  local oFilter = ClearFilter()
  oFilter:Add(FE_TYPE, OP_IS, nTypeA)
  oFilter:Add(FE_TYPE, OP_NOT, nTypeB)
  oFilter:Add(FE_CONTROLLER, OP_IS, nPlayer)
  oFilter:SetZone( nZone )
  if (oFilter:Count() > 0) then
    return oFilter:Count()
  end
  return 0
end
NeoAnderson
 
Posts: 914
Joined: 10 Sep 2013, 07:49
Has thanked: 18 times
Been thanked: 139 times

Re: Formal Request Thread

Postby thefiremind » 22 Dec 2013, 09:57

NeoAnderson wrote:My worry is about the AI because an human player will understand that targetting a not suitable target will loop to a new target selction so probably the player will choose a legal target, but what about the AI?
Anytime the target choose is repeated all the source targets will available so theoretically the AI could select always the same target.
Try to give the AI opponent a deck with some damaging Auras for your artifacts and see what happens. If you see the AI thinking too much, or stalling the game completely, then you need to find another solution (I still don't have any).

NeoAnderson wrote:I have another question now i am focusing about controller change trigger.
I can confirm to TheFiremind the Trigger works so it can be used with replacement_effect, but i have seen the follow behaviour.
Game situation :

In play under my control : Guardian Beast and Artifact1 (non-creature artifact)
a. Guardian Beast is untapped.
b. Opponent cast Master Thief and target Artifact1
c. Guardian Beast ability override the control change Artifact1 remains under my control.
d. I tap Guardian Beast, Artifact1 go under control of Opponent.

Now i really don't know if this card is supposed to work so, anyone have more information about it?
Because if the behaviour is normal i can leave it so, otherwise i have to study something to avoid this behaviour.
At least I can understand why this happens: the replacement effect avoids that the creature switches controller, but the continuous action that switches controller is still there and continuously tries to do its thing. When you tap Guardian Beast it can finally switch controller, and it does. I'm pretty sure it shouldn't work like this. You could try to add a continuous action that "covers" the original one:

Code: Select all
<TRIGGERED_ABILITY replacement_effect="1">
    <TRIGGER value="CONTROLLER_CHANGED" simple_qualifier="objectyoucontrol" pre_trigger="1">
    if EffectSource():IsTapped() == false and TriggerObject()~= nil and TriggerObject():GetCardType():Test( CARD_TYPE_ARTIFACT ) then
      if TriggerObject():GetCardType():Test( CARD_TYPE_CREATURE ) then
         return false
       else
         MTG():OverrideEvent() -- when you add an action to the trigger, this is needed
         return true
       end
    else
        return false
    end
    </TRIGGER>
    <CONTINUOUS_ACTION layer="2">
    local card = TriggerObject()
    if card ~= nil then
       card:SetController(EffectController())
    end
    </CONTINUOUS_ACTION>
    <DURATION>
    return TriggerObject() == nil
    </DURATION>
  </TRIGGERED_ABILITY>
< Former DotP 2012/2013/2014 modder >
Currently busy with life...
User avatar
thefiremind
Programmer
 
Posts: 3515
Joined: 07 Nov 2011, 10:55
Has thanked: 118 times
Been thanked: 722 times

Re: Formal Request Thread

Postby NeoAnderson » 22 Dec 2013, 10:54

thefiremind wrote:Try to give the AI opponent a deck with some damaging Auras for your artifacts and see what happens. If you see the AI thinking too much, or stalling the game completely, then you need to find another solution (I still don't have any).
I know my friend, I think i have to set a custom deck just to make test with AI, also if you consider that we are talking about a particular event, because this happens only when the player use an effect to put an Aura directly onto battlefield.
Normal aura casting is already override by the first trigger, so as you can understand is not simple to create a situation where the AI have to putonbattlefield an Aura. i think i have to prepare a custom card just to do this and make a deck only with Auras and this custom card.
Anyway if you consider that normally the aura are normal cast by the players there are really few circumstances where we need to use this Trigger.


thefiremind wrote: At least I can understand why this happens: the replacement effect avoids that the creature switches controller, but the continuous action that switches controller is still there and continuously tries to do its thing. When you tap Guardian Beast it can finally switch controller, and it does. I'm pretty sure it shouldn't work like this. You could try to add a continuous action that "covers" the original one:

Code: Select all
<TRIGGERED_ABILITY replacement_effect="1">
    <TRIGGER value="CONTROLLER_CHANGED" simple_qualifier="objectyoucontrol" pre_trigger="1">
    if EffectSource():IsTapped() == false and TriggerObject()~= nil and TriggerObject():GetCardType():Test( CARD_TYPE_ARTIFACT ) then
      if TriggerObject():GetCardType():Test( CARD_TYPE_CREATURE ) then
         return false
       else
         MTG():OverrideEvent() -- when you add an action to the trigger, this is needed
         return true
       end
    else
        return false
    end
    </TRIGGER>
    <CONTINUOUS_ACTION layer="2">
    local card = TriggerObject()
    if card ~= nil then
       card:SetController(EffectController())
    end
    </CONTINUOUS_ACTION>
    <DURATION>
    return TriggerObject() == nil
    </DURATION>
  </TRIGGERED_ABILITY>
I still haven't tried your code Fire, Does the engine consider last effect to override the previous? If yes it could work. Do you think is useless to add another condition to the duration? return TriggerObject() == nil or EffectSource == nil

Now i am making some other card from Arabian Nights set but old card are sometime difficult to make because some rules have been clarified lately and some of them no longer exist.
I would code Oubliette but it is really complicated, because the are so many interactions with counters and auras and i am not sure is completely possible to code.
NeoAnderson
 
Posts: 914
Joined: 10 Sep 2013, 07:49
Has thanked: 18 times
Been thanked: 139 times

Re: Formal Request Thread

Postby thefiremind » 22 Dec 2013, 12:04

NeoAnderson wrote:I still haven't tried your code Fire, Does the engine consider last effect to override the previous? If yes it could work.
Unless the pre-trigger activates the new continuous action before the original one, it should work.

NeoAnderson wrote:Do you think is useless to add another condition to the duration? return TriggerObject() == nil or EffectSource == nil
If you add that condition, then you'll lose control of the artifact when Guardian Beast leaves the battlefield.

NeoAnderson wrote:Now i am making some other card from Arabian Nights set but old card are sometime difficult to make because some rules have been clarified lately and some of them no longer exist.
I would code Oubliette but it is really complicated, because the are so many interactions with counters and auras and i am not sure is completely possible to code.
The counters can definitely be stored and re-applied later, but it's not easy. By using the code that I made for Gilder Bairn you can keep track of the counters that have been used during the duel, so that you can check for the presence of a finite set of counters on any permanent. This way you can save the amount of each counter type on the creature exiled with Oubliette and retrieve the information later. How to store this information is up to you... I would make a chest and organize it this way:
Code: Select all
register    stored
number      information
--------    -----------
  0         number of registers used
  1         counter type index 1
  2         amount of counters with index 1
  3         counter type index 2
  4         amount of counters with index 2
 ...        ...
Exiling and returning Auras is something that Flickerform does as well. I can't find Flickerform on my DotP2014 mods folder, but it would be strange that nobody coded it yet.
< Former DotP 2012/2013/2014 modder >
Currently busy with life...
User avatar
thefiremind
Programmer
 
Posts: 3515
Joined: 07 Nov 2011, 10:55
Has thanked: 118 times
Been thanked: 722 times

Re: Formal Request Thread

Postby NeoAnderson » 22 Dec 2013, 12:20

thefiremind wrote:The counters can definitely be stored and re-applied later, but it's not easy. By using the code that I made for Gilder Bairn you can keep track of the counters that have been used during the duel, so that you can check for the presence of a finite set of counters on any permanent. This way you can save the amount of each counter type on the creature exiled with Oubliette and retrieve the information later. How to store this information is up to you... I would make a chest and organize it this way:
Code: Select all
register    stored
number      information
--------    -----------
  0         number of registers used
  1         counter type index 1
  2         amount of counters with index 1
  3         counter type index 2
  4         amount of counters with index 2
 ...        ...
Exiling and returning Auras is something that Flickerform does as well. I can't find Flickerform on my DotP2014 mods folder, but it would be strange that nobody coded it yet.
Thanks for your kindness i will take a look about your mentioned cards later, i know that probably can be made but there are many checks to consider, as like :
1. If Oubliette leaves the battlefield before its first ability has resolved, its second ability will trigger and do nothing. Then its first ability will resolve and exile the targeted creature forever.
2. If the exiled card is returned to the battlefield and, for some reason, it now can't be enchanted by an Aura that was also exiled by Oubliette, that Aura will remain exiled.

Anyway i will try soon. Thanks again.

Now i am fighting with Dandan i am not sure this card can be coded.
Because i have no idea how to avoid to attack a specified player!
My first approach was to use a static ability to set can't attack value to 1 when opponents controls no islands.
Now the problem comes out when we play with more than one opponent. So i added this trigger
Code: Select all
<TRIGGERED_ABILITY forced_skip="1">
    <TRIGGER value="BEGINNING_OF_PLAYERS_STEP" simple_qualifier="controller">
    return MTG():GetStep() == STEP_DECLARE_ATTACKERS
    </TRIGGER>

   <CONTINUOUS_ACTION layer="0">
    if EffectSource() ~= nil then
       local filter = ClearFilter()
        filter:Add( FE_CARD_INSTANCE, OP_IS, EffectSource() )
        local myTeam = EffectController():GetTeam()
        for i=0,MTG():GetNumberOfPlayers()-1 do
           local nthPlayer = MTG():GetNthPlayer(i)
           if nthPlayer:GetTeam() ~= myTeam then
               local oNumIslands = CountcardSubtypeControlledBy(LAND_TYPE_ISLAND, nthPlayer, ZONE_BATTLEFIELD)
               if oNumIslands == 0 then
                  nthPlayer:Protection()
               end
            end
        end
    end
   </CONTINUOUS_ACTION>
     <DURATION>
     return MTG():GetStep() == STEP_DECLARE_BLOCKERS
     </DURATION>
  </TRIGGERED_ABILITY>
It was a trial to check if givin protection from the card before attacking could avoid to target that player, but obviously doesn't work.
Have you any suggestion? Until now i haven't seen already code cards with this effect.
NeoAnderson
 
Posts: 914
Joined: 10 Sep 2013, 07:49
Has thanked: 18 times
Been thanked: 139 times

Re: Formal Request Thread

Postby thefiremind » 22 Dec 2013, 12:39

NeoAnderson wrote:1. If Oubliette leaves the battlefield before its first ability has resolved, its second ability will trigger and do nothing. Then its first ability will resolve and exile the targeted creature forever.
Save the required information and protect the card pointers only if EffectSource() ~= nil, otherwise just exile everything and forget about it.
NeoAnderson wrote:2. If the exiled card is returned to the battlefield and, for some reason, it now can't be enchanted by an Aura that was also exiled by Oubliette, that Aura will remain exiled.
A CanAttachTo check should be enough to solve this problem.

NeoAnderson wrote:Now i am fighting with Dandan i am not sure this card can be coded.
Because i have no idea how to avoid to attack a specified player!

[...]

Have you any suggestion? Until now i haven't seen already code cards with this effect.
There is a card with a similar effect: Form of the Dragon. In the CANT_ATTACK_PLAYER_TEST trigger, TriggerObject is the affected creature, TriggerPlayer is the defending player, and you return true when the creature can't attack. So you just need this:
Code: Select all
  <TRIGGERED_ABILITY replacement_effect="1">
    -- Localised text omitted
    <TRIGGER value="CANT_ATTACK_PLAYER_TEST" simple_qualifier="self" pre_trigger="1">
    return CountcardSubtypeControlledBy(LAND_TYPE_ISLAND, TriggerPlayer(), ZONE_BATTLEFIELD) == 0
    </TRIGGER>
  </TRIGGERED_ABILITY>
------------------------

EDIT: Just for your information, I saw "oNumIslands" in your code and so I guessed that you haven't really understood the meaning of the lowercase letter that RiiakShiNal adds to the variable names. RiiakShiNal's purpose is to remember what data type he stored into the variable, with "o" meaning "object". Since you are storing a number in "oNumIslands", the "o" isn't quite right... but of course you can name variables as you wish, their name is useful only to the human who needs to read the code.
< Former DotP 2012/2013/2014 modder >
Currently busy with life...
User avatar
thefiremind
Programmer
 
Posts: 3515
Joined: 07 Nov 2011, 10:55
Has thanked: 118 times
Been thanked: 722 times

Re: Formal Request Thread

Postby NeoAnderson » 22 Dec 2013, 12:58

Ok thanks a lot for all these informations and also for your time, i am learning a lot from you, Riiak, sumomole and other friends. I will let you know if it will work.

About "oVariable" ahahhaha :lol: You're right i used because when i started to make cards i have really few knowledge about what i was doing. Now is a little bit better, and i got your meaning :-)

Update : Just to inform you, your sggestion perfectly works, i was already looking for that trigger but i was not sure how it works. You know that the forum search not alwayd return requested query.

Dandan | Open
Code: Select all
<?xml version='1.0' encoding='UTF-8'?>
<CARD_V2 ExportVersion="1">
  <FILENAME text="DANDÂN_106631" />
  <CARDNAME text="DANDÂN" />
  <TITLE>
    <LOCALISED_TEXT LanguageCode="en-US"><![CDATA[Dandân]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="fr-FR"><![CDATA[Dandân]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="es-ES"><![CDATA[Dandân]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="de-DE"><![CDATA[Dandân]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="it-IT"><![CDATA[Dandân]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="jp-JA"><![CDATA[ダンダーン]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="ko-KR"><![CDATA[Dandân]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="ru-RU"><![CDATA[Дандан]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="pt-BR"><![CDATA[Dandã]]></LOCALISED_TEXT>
  </TITLE>
  <MULTIVERSEID value="106631" />
  <ARTID value="106631" />
  <ARTIST name="Drew Tucker" />
  <CASTING_COST cost="{U}{U}" />
  <FLAVOURTEXT>
    <LOCALISED_TEXT LanguageCode="en-US"><![CDATA[“Catch good today. Start replacing crew tomorrow.”
—Faysal al-Mousa, fisher captain, log]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="fr-FR"><![CDATA[« Bonne pêche aujourd’hui. Songer à remplacer l’équipage de demain.  »
—Faysal al-Mousa, capitaine pêcheur, journal de bord]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="es-ES"><![CDATA[“Hoy buena pesca. Mañana comienzo a buscar nueva tripulación.”
—Diario de a bordo de Faysal al-Mousa, capitán de pesquero]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="de-DE"><![CDATA[„Habe heute einen guten Fang gemacht. Morgen muss ich mich allerdings um eine neue Crew kümmern.”
—Faysal al-Mousa, Kapitänslogbuch]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="it-IT"><![CDATA[“Oggi fatta buona pesca. Domani sostituire uomini perduti.”
—Faysal al-Mousa, capitano di peschereccio, giornale di bordo]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="jp-JA"><![CDATA[今日は大漁。  明日は代わりの乗組員捜しだ。
――漁船の船長、フェイサル・アル=ムーサの航海日誌]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="ko-KR"><![CDATA[“Catch good today. Start replacing crew tomorrow.”
—Faysal al-Mousa, fisher captain, log]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="ru-RU"><![CDATA[«Хороший улов. Надо бы завтра начать замену команды», Фейсал ал-Моуза, капитан рыбаков, судовой журнал]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="pt-BR"><![CDATA[“Boa pesca. Começar a substituir a tripulação amanhã.”
—Faysal al-Mousa, capitão pescador, diário]]></LOCALISED_TEXT>
  </FLAVOURTEXT>
  <TYPE metaname="Creature" />
  <SUB_TYPE metaname="Fish" />
  <EXPANSION value="AN" />
  <RARITY metaname="C" />
  <POWER value="4" />
  <TOUGHNESS value="1" />

  <TRIGGERED_ABILITY replacement_effect="1">
    <LOCALISED_TEXT LanguageCode="en-US"><![CDATA[Dandân can’t attack unless defending player controls an Island.]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="fr-FR"><![CDATA[Le Dandân ne peut pas attaquer à moins que le joueur défenseur ne contrôle une île.]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="es-ES"><![CDATA[El Dandân no puede atacar a menos que el jugador defensor controle una isla.]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="de-DE"><![CDATA[Der Dandân kann nicht angreifen, falls der verteidigende Spieler keine Insel kontrolliert.]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="it-IT"><![CDATA[Il Dandân non può attaccare a meno che il giocatore in difesa non controlli un’Isola.]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="jp-JA"><![CDATA[ダンダーンは、防御側プレイヤーが島をコントロールしていないかぎり、攻撃に参加できない。]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="ko-KR"><![CDATA[Dandân can’t attack unless defending player controls an Island.]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="ru-RU"><![CDATA[Дандан не может атаковать, если защищающийся игрок не контролирует остров.]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="pt-BR"><![CDATA[Dandã não pode atacar, a menos que o jogador defensor controle uma Ilha.]]></LOCALISED_TEXT>
    <TRIGGER value="CANT_ATTACK_PLAYER_TEST" simple_qualifier="self" pre_trigger="1">
    return CountcardSubtypeControlledBy(LAND_TYPE_ISLAND, TriggerPlayer(), ZONE_BATTLEFIELD) == 0
    </TRIGGER>
  </TRIGGERED_ABILITY>

  <STATIC_ABILITY>
    <LOCALISED_TEXT LanguageCode="en-US"><![CDATA[When you control no Islands, sacrifice Dandân.]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="fr-FR"><![CDATA[Quand vous ne contrôlez pas d’île, sacrifiez le Dandân.]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="es-ES"><![CDATA[Cuando no controles una isla, sacrifica el Dandân.]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="de-DE"><![CDATA[Opfere den Dandân, wenn du keine Insel kontrollierst.]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="it-IT"><![CDATA[Quando non controlli Isole, sacrifica il Dandân.]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="jp-JA"><![CDATA[あなたが島をコントロールしていないとき、ダンダーンを生け贄に捧げる。]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="ko-KR"><![CDATA[When you control no Islands, sacrifice Dandân.]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="ru-RU"><![CDATA[Когда вы не контролируете Островов, пожертвуйте Дандана.]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="pt-BR"><![CDATA[Quando você não controlar nenhuma Ilha, sacrifique Dandã.]]></LOCALISED_TEXT>
      <CONTINUOUS_ACTION>
    if EffectSource() ~= nil then
       local filter = ClearFilter()
       filter:Add( FE_SUBTYPE, OP_IS, LAND_TYPE_ISLAND )
        filter:Add( FE_CONTROLLER, OP_IS, EffectController() )
       local total = filter:CountStopAt( 1 )
       if total &lt; 1 then
       EffectController():Sacrifice(EffectSource())
       end
    end
      </CONTINUOUS_ACTION>
    </STATIC_ABILITY>
 <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>
NeoAnderson
 
Posts: 914
Joined: 10 Sep 2013, 07:49
Has thanked: 18 times
Been thanked: 139 times

PreviousNext

Return to 2014

Who is online

Users browsing this forum: No registered users and 4 guests

Main Menu

User Menu

Our Partners


Who is online

In total there are 4 users online :: 0 registered, 0 hidden and 4 guests (based on users active over the past 10 minutes)
Most users ever online was 7303 on 15 Jul 2025, 20:46

Users browsing this forum: No registered users and 4 guests

Login Form