It is currently 25 Apr 2024, 00:44
   
Text Size

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

Moderator: CCGHQ Admins

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

Postby sumomole » 16 Apr 2013, 17:38

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:
User avatar
sumomole
Programmer
 
Posts: 611
Joined: 07 Jun 2011, 08:34
Has thanked: 51 times
Been thanked: 234 times

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

Postby BETenner » 17 Apr 2013, 03:27

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~
BETenner
 
Posts: 36
Joined: 07 Mar 2013, 14:20
Has thanked: 7 times
Been thanked: 4 times

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

Postby Takhen » 07 May 2013, 14:04

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?
User avatar
Takhen
 
Posts: 235
Joined: 04 Feb 2013, 19:35
Has thanked: 0 time
Been thanked: 0 time

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

Postby Takhen » 04 Jul 2013, 13:20

up
User avatar
Takhen
 
Posts: 235
Joined: 04 Feb 2013, 19:35
Has thanked: 0 time
Been thanked: 0 time

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

Postby binibirocha » 26 Nov 2013, 15:52

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>
binibirocha
 
Posts: 10
Joined: 15 Nov 2013, 23:59
Has thanked: 3 times
Been thanked: 1 time

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

Postby thefiremind » 26 Nov 2013, 17:32

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.
< 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: 721 times

Previous

Return to 2013

Who is online

Users browsing this forum: No registered users and 7 guests


Who is online

In total there are 7 users online :: 0 registered, 0 hidden and 7 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 7 guests

Login Form