It is currently 19 Apr 2024, 13:58
   
Text Size

Dotp bug (can be solved??)

Moderator: CCGHQ Admins

Dotp bug (can be solved??)

Postby NeoAnderson » 15 Oct 2014, 13:59

I would ask to skilled friends if they found this bug when they implemented their cards.
If we remove all the types from a card who is copying something (like clone) when we restore the normal values the picture will be stretched, this effect will not end if the card leave the battlefield, return into hand....
It is linked only to that card instance, in facts if you have another of this card it is not affected.

If someone want to make some test i post the code for 2 simple activated abilities, the first make a copy of the current card on target permanent, then remove all the types, colours and abilities.
The second ability simply end the effect of the first ability.


TESTING CODE - FOR PICTURES BUG | Open
Code: Select all
<ACTIVATED_ABILITY linked_ability_group="1" forced_skip="1">
    <LOCALISED_TEXT LanguageCode="en-US"><![CDATA[{0} : Remove types from target]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="it-IT"><![CDATA[{0} : Remove types from target]]></LOCALISED_TEXT>
    <COST mana_cost="{0}" type="Mana" />
   <TARGET tag="CARD_QUERY_CHOOSE_CARD" definition="0" compartment="0" count="1" />
      <TARGET_DEFINITION id="0">
      local filter = ClearFilter()
            local subfilter = filter:AddSubFilter_Or()
                  subfilter:Add( FE_TYPE, OP_IS, CARD_TYPE_ARTIFACT )
                  subfilter:Add( FE_TYPE, OP_IS, CARD_TYPE_CREATURE )
                  subfilter:Add( FE_TYPE, OP_IS, CARD_TYPE_ENCHANTMENT )
                  subfilter:Add( FE_TYPE, OP_IS, CARD_TYPE_LAND )
                  subfilter:Add( FE_TYPE, OP_IS, CARD_TYPE_PLANESWALKER )
      </TARGET_DEFINITION>

      <RESOLUTION_TIME_ACTION>
                      LinkedDC():Set_Int(88, 2)
                     EffectSource():StoreCopiableValues(EffectDC():Make_Chest(2))
      </RESOLUTION_TIME_ACTION>
      <RESOLUTION_TIME_ACTION>
                 local card = EffectDC():Get_Targets(0) and EffectDC():Get_Targets(0):Get_CardPtr(0)
                 if card ~= nil then
              card:UseCopiableValues(EffectDC():Get_Chest(2))
                end
      </RESOLUTION_TIME_ACTION>
   <CONTINUOUS_ACTION layer="1">
         local card = EffectDC():Get_Targets(0) and EffectDC():Get_Targets(0):Get_CardPtr(0)
         if card ~= nil and EffectDC():Get_Chest(2) ~= nil  then
           card:UseCopiableValues(EffectDC():Get_Chest(2))
        end
     </CONTINUOUS_ACTION>
     <CONTINUOUS_ACTION layer="4">
         local card = EffectDC():Get_Targets(0) and EffectDC():Get_Targets(0):Get_CardPtr(0)
         if card ~= nil then
              local characteristics = card:GetCurrentCharacteristics()
         local card_type = characteristics:CardType_GetWritable()
         local sub_type = characteristics:SubType_GetWritable()
         sub_type:ClearAllOfType( CARD_TYPE_ARTIFACT )
         sub_type:ClearAllOfType( CARD_TYPE_CREATURE )
         sub_type:ClearAllOfType( CARD_TYPE_ENCHANTMENT )
         sub_type:ClearAllOfType( CARD_TYPE_LAND )
         sub_type:ClearAllOfType( CARD_TYPE_PLANESWALKER )
         card_type:Clear()
        end
    </CONTINUOUS_ACTION>
     <CONTINUOUS_ACTION layer="5">
         local card = EffectDC():Get_Targets(0) and EffectDC():Get_Targets(0):Get_CardPtr(0)
         if card ~= nil then
         card:GetCurrentCharacteristics():Colour_Get():Clear()
        end
    </CONTINUOUS_ACTION>
     <CONTINUOUS_ACTION layer="6">
         local card = EffectDC():Get_Targets(0) and EffectDC():Get_Targets(0):Get_CardPtr(0)
         if card ~= nil then
         card:GetCurrentCharacteristics():LoseAllAbilities()
        end
    </CONTINUOUS_ACTION>
             <DURATION>
              return LinkedDC():Get_Int(88) == 1
              </DURATION>
  </ACTIVATED_ABILITY>
Here you can see a visual example with Dual Nature :
BEFORE TO APPLY THE EFFECT
Image
AFTER APPLIED THE EFFECT
Image
TWO DIFFERENT INSTANCE IN PLAY (1 AFFECTED AND 1 NORMAL )
Image

Would be nice if someone could have a solution for this issue! :wink:
NeoAnderson
 
Posts: 914
Joined: 10 Sep 2013, 07:49
Has thanked: 18 times
Been thanked: 139 times

Re: Dotp bug (can be solved??)

Postby sumomole » 16 Oct 2014, 22:28

the general illustrations size is 512*376, the illustration size of a colorless nonland nonartifact card is 712*1024, and the default value of LinkedDC():Get_Int(88) is 0. well, I think you know these, but actually I don't know what you want? :roll:
User avatar
sumomole
Programmer
 
Posts: 611
Joined: 07 Jun 2011, 08:34
Has thanked: 51 times
Been thanked: 234 times

Re: Dotp bug (can be solved??)

Postby NeoAnderson » 16 Oct 2014, 23:12

sumomole wrote:the general illustrations size is 512*376, the illustration size of a colorless nonland nonartifact card is 712*1024, and the default value of LinkedDC():Get_Int(88) is 0. well, I think you know these, but actually I don't know what you want? :roll:
Sumo the pictures you can see above are 512*376, the problem is :
If you remove all the type and colours from a card, when the effect ends and you restore the source values and colours it keeps the picture stretched to 712*1024.
It seems that the engine doesn't reload the right picture size and i don't know any way to force it to reload the frame!
About the LinkedDC i miss to upload the second ability i used to restore the register to 1. But it is just a test code to make tests, to show to other users what i was meaning.
NeoAnderson
 
Posts: 914
Joined: 10 Sep 2013, 07:49
Has thanked: 18 times
Been thanked: 139 times


Return to Programming Talk

Who is online

Users browsing this forum: No registered users and 23 guests


Who is online

In total there are 23 users online :: 0 registered, 0 hidden and 23 guests (based on users active over the past 10 minutes)
Most users ever online was 4143 on 23 Jan 2024, 08:21

Users browsing this forum: No registered users and 23 guests

Login Form