Page 2 of 2

Re: [GTC] DLC mod for DotP 2013 (100/249) 16/04/2013

PostPosted: 16 Apr 2013, 17:38
by sumomole
BETenner wrote:097 - Legion Loyalist (the "can't be blocked by creature tokens" part is unimplemented)
Legion Loyalist is easy to code, you can find it here. :wink:

Re: [GTC] DLC mod for DotP 2013 (100/249) 16/04/2013

PostPosted: 17 Apr 2013, 03:27
by BETenner
sumomole wrote:
BETenner wrote:097 - Legion Loyalist (the "can't be blocked by creature tokens" part is unimplemented)
Legion Loyalist is easy to code, you can find it here. :wink:
Oh thanks! I'll fix it in the next update~

Re: [GTC] DLC mod for DotP 2013 (100/249) 16/04/2013

PostPosted: 07 May 2013, 14:04
by Takhen
In this time I'm seeing more only-card releases
Are these a start of the XMLs' collection I wanted? Why there are more different releases?

Re: GTC Mod for DotP2013 (100/249) 13/05/2013 STOPPED

PostPosted: 04 Jul 2013, 13:20
by Takhen
up

Re: [Gatecrash] GTC DLC mod for DotP2013 Part.1 (27/249)

PostPosted: 26 Nov 2013, 15:52
by binibirocha
thefiremind wrote:First of all, good to see another modder here. :)

BETenner wrote:012 - Frontline Medic (the counter ability is not implemented because I couldn't find a way to determine whether {X} is included in target spell's mana cost)
014 - Guardian of the Gateless (the ability to block any number of creatures is not implemented because I can't find a way to do so, it seems that DotP2013 does not support such action)
You are right on those 2 cards. Nothing can be done for blocking more than one creature. About Frontline Medic, there's a COLOUR_X constant that seems to exist for this particular need, but the game doesn't use it. A possible solution would be to give this "virtual color" to the right cards ourselves, but this would mean editing all the existing cards with {X} in their mana costs, and even after that, I'm not sure about the consequences. Another solution would be to give the target filter a list of card names that have {X} in their mana costs, so that the ability can counter them, but this would mean updating the card each time a new "X-card" is coded.

BETenner wrote:025 - Smite (this card is totally unimplemented cuz I couldn't find a way to filter only the blocked creatures)
According to this list, there's a SetBlockVictim function for the filter but there are no examples of its usage, maybe it isn't even made for cases like Smite. Luckily, we have the second best DotP2013 invention after the delayed triggers: filter evaluation. :lol: I would make the target definition for Smite like this:
Code: Select all
    <TARGET_DEFINITION id="0">
    MTG():ClearFilterMarkedObjectsInZone( ZONE_IN_PLAY )
    local filter = Object():GetFilter()
    filter:Clear()
    filter:AddCardType( CARD_TYPE_CREATURE )
    filter:SetZone( ZONE_IN_PLAY )
    filter:AddExtra( FILTER_EXTRA_CREATURE_ATTACKING ) -- if it's not attacking, it can't be blocked, right?
    local filter_count = filter:EvaluateObjects()
    if filter_count &gt; 0 then
       for i=0,filter_count-1 do
          local candidate = filter:GetNthEvaluatedObject(i)
          if candidate:IsBlocked() ~= 0 then
             candidate:MarkForFilter()
          end
       end
    end
    filter:SetMarkedObjectsOnly()
    filter:SetHint( HINT_ENEMY_ONLY, EffectController() )
    </TARGET_DEFINITION>
Code: Select all
I was able to code Smite using this...
<TARGET_DEFINITION id="0">
local filter = ClearFilter()
filter:Add( FE_TYPE, OP_IS, CARD_TYPE_CREATURE )
filter:Add( FE_IS_BLOCKED, true)
</TARGET_DEFINITION>

Re: [Gatecrash] GTC DLC mod for DotP2013 Part.1 (27/249)

PostPosted: 26 Nov 2013, 17:32
by thefiremind
binibirocha wrote:I was able to code Smite using this...
Code: Select all
<TARGET_DEFINITION id="0">
local filter = ClearFilter()
filter:Add( FE_TYPE, OP_IS, CARD_TYPE_CREATURE )
filter:Add( FE_IS_BLOCKED, true)
</TARGET_DEFINITION>
Sure, but this is a DotP2013 topic while your code is for DotP2014.