Board index Programs with AI or Rules Enforcement Magic: The Gathering - Duels of the Planeswalkers New MTG Cards and Decks (2010, 2012, 2013, 2014, 2015, Magic Duels) 2013
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
by sumomole » 16 Apr 2013, 17:38
Legion Loyalist is easy to code, you can find it here.BETenner wrote:097 - Legion Loyalist (the "can't be blocked by creature tokens" part is unimplemented)
-
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
by BETenner » 17 Apr 2013, 03:27
Oh thanks! I'll fix it in the next update~sumomole wrote:Legion Loyalist is easy to code, you can find it here.BETenner wrote:097 - Legion Loyalist (the "can't be blocked by creature tokens" part is unimplemented)
Re: [GTC] DLC mod for DotP 2013 (100/249) 16/04/2013
by 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?
Are these a start of the XMLs' collection I wanted? Why there are more different releases?
-
Takhen - Posts: 235
- Joined: 04 Feb 2013, 19:35
- Has thanked: 0 time
- Been thanked: 0 time
-
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)
by binibirocha » 26 Nov 2013, 15:52
thefiremind wrote:First of all, good to see another modder here.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 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 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:012 - Frontline Medic (the counter ability is not implemented because I couldn't find a way to determine whether 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)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. I would make the target definition for Smite like this:BETenner wrote:025 - Smite (this card is totally unimplemented cuz I couldn't find a way to filter only the blocked creatures)
- 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 > 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)
by thefiremind » 26 Nov 2013, 17:32
Sure, but this is a DotP2013 topic while your code is for DotP2014.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>
< Former DotP 2012/2013/2014 modder >
Currently busy with life...
Currently busy with life...
-
thefiremind - Programmer
- Posts: 3515
- Joined: 07 Nov 2011, 10:55
- Has thanked: 118 times
- Been thanked: 721 times
21 posts
• Page 2 of 2 • 1, 2
Who is online
Users browsing this forum: No registered users and 7 guests