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)
2014




TFM&G2K's Planeswalkers Pool v8g (12/Sep/2014)
Moderator: CCGHQ Admins
Re: TFM&G2K's Planeswalkers Pool v8 (15/Aug/2014)
by volrathxp » 15 Aug 2014, 21:14
Seems to be working pretty good so far. It infinites properly so that is good.thefiremind wrote:The Chain Veil is now inside the pool! Enjoy and let me know of any problems.
volrathxp
Re: TFM&G2K's Planeswalkers Pool v8b (15/Aug/2014)
by gorem2k » 17 Aug 2014, 11:54
Upcoming planeswalker from Commander 2014 set.
Now we will have to replace <sorcery_time="1"> with :

Now we will have to replace <sorcery_time="1"> with :
- Code: Select all
<AVAILABILITY>
local player = EffectController()
local teferi_emblem = PLW_MyPlayerDC( player ):Get_Int(PLW_TEFERI_EMBLEM)
if player:MyTurn() and
(MTG():GetStep() == STEP_MAIN_1 or MTG():GetStep() == STEP_MAIN_2) and
teferi_emblem ~= 1 then
return true
elseif teferi_emblem == 1 then
return true
end
return false
</AVAILABILITY>





Re: TFM&G2K's Planeswalkers Pool v8b (15/Aug/2014)
by thefiremind » 17 Aug 2014, 12:26
There is a player:IsSorceryTime() function, if you want to shorten the code:

- Code: Select all
<AVAILABILITY>
local player = EffectController()
local teferi_emblem = PLW_MyPlayerDC(player):Get_Int(PLW_TEFERI_EMBLEM)
return teferi_emblem == 1 or player:IsSorceryTime()
</AVAILABILITY>

< 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: 722 times
Re: TFM&G2K's Planeswalkers Pool v8b (15/Aug/2014)
by gorem2k » 17 Aug 2014, 12:59
Great, that's much better. and replace player with EffectController() to make it only two lines.thefiremind wrote:There is a player:IsSorceryTime() function, if you want to shorten the code:
Is there a post or a wiki that explains how AI_AVAILABILITY works? I've never examined that functionality.thefiremind wrote:Anyway, this would require to set proper AI_AVAILABILITY blocks for each and every loyalty ability... a daunting task.
Re: TFM&G2K's Planeswalkers Pool v8b (15/Aug/2014)
by thefiremind » 17 Aug 2014, 14:16
Simply put, you need to tell the AI when it is best to use instant-speed spells and abilities, otherwise it will try and evaluate their usage every single time it can, slowing down the game a lot.gorem2k wrote:Is there a post or a wiki that explains how AI_AVAILABILITY works? I've never examined that functionality.
< 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: 722 times
Re: TFM&G2K's Planeswalkers Pool v5e (31/Jan/2014)
by braquio » 18 Aug 2014, 16:47
I still have the same problemthefiremind wrote:There was indeed a problem with his +1 ability, even though I would have expected the effect to be the opposite (sacrifice the creature without searching), anyway it should be fixed now.MasterXploder7 wrote:garruk the veil cursed is buggy, you dont sacrifice anything even though you pick a creature, its just targeted and then the ability resolves as normal without sacrificing, doesnt seem fair
Looking it's code i see:
- Code: Select all
<RESOLUTION_TIME_ACTION>
local target = EffectDC():Get_Targets(0) and EffectDC():Get_Targets(0):Get_CardPtr(0)
if target ~= nil then
EffectDC():Set_Int(2, 1)
target:Sacrifice()
end
</RESOLUTION_TIME_ACTION>
- Code: Select all
<RESOLUTION_TIME_ACTION>
if EffectDC():Get_Targets(0) ~= nil then
local target = EffectDC():Get_Targets(0):Get_CardPtr(0)
if target ~= nil then
EffectDC():Set_Int(2, 1)
EffectController():Sacrifice(target)
end
end
</RESOLUTION_TIME_ACTION>
____________________________________________________________________________________________________________________________
Braquio Dotp2014 DLC
Alternative Sealed Campaigns for DotP 2014
Braquio Dotp2014 DLC
Alternative Sealed Campaigns for DotP 2014
Re: TFM&G2K's Planeswalkers Pool v8c (18/Aug/2014)
by thefiremind » 18 Aug 2014, 18:05
DotP2012 allowed to call the Sacrifice function from objects as well, that's why I often make that mistake without being able to spot it afterwards. Anyway it's fixed now.
Note that
Note that
- Code: Select all
local target = EffectDC():Get_Targets(0) and EffectDC():Get_Targets(0):Get_CardPtr(0)
< 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: 722 times
Re: TFM&G2K's Planeswalkers Pool v8c (18/Aug/2014)
by TQP » 19 Aug 2014, 07:13
Hello. I think, "Tezzeret, Agent of Bolas" does not work correctly. If I cast -1 abbility, artifact become a 5/5 creature, yea, opponent can kill him with some spells (like "Murder"), but this 5/5 "creature" cant block or attack.
- TQP
- Posts: 7
- Joined: 08 Aug 2014, 02:48
- Has thanked: 0 time
- Been thanked: 0 time
Re: TFM&G2K's Planeswalkers Pool v8c (18/Aug/2014)
by thefiremind » 19 Aug 2014, 08:05
I can't see any possible reason for this problem: the creature type addition is managed exactly the same as all cards that do it. Are you sure there wasn't anything else on the battlefield that disables attacking/blocking?TQP wrote:Hello. I think, "Tezzeret, Agent of Bolas" does not work correctly. If I cast -1 abbility, artifact become a 5/5 creature, yea, opponent can kill him with some spells (like "Murder"), but this 5/5 "creature" cant block or attack.
< 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: 722 times
Re: TFM&G2K's Planeswalkers Pool v8c (18/Aug/2014)
by volrathxp » 19 Aug 2014, 10:49
Strange. I didn't have this issue with Tezz either when I was playing around with him.thefiremind wrote:I can't see any possible reason for this problem: the creature type addition is managed exactly the same as all cards that do it. Are you sure there wasn't anything else on the battlefield that disables attacking/blocking?TQP wrote:Hello. I think, "Tezzeret, Agent of Bolas" does not work correctly. If I cast -1 abbility, artifact become a 5/5 creature, yea, opponent can kill him with some spells (like "Murder"), but this 5/5 "creature" cant block or attack.
volrathxp
Re: TFM&G2K's Planeswalkers Pool v8c (18/Aug/2014)
by Kithkin » 19 Aug 2014, 15:20
I just played a deck with Tezzeret, Agent of Bolas, and it worked just fine.volrathxp wrote:Strange. I didn't have this issue with Tezz either when I was playing around with him.thefiremind wrote:I can't see any possible reason for this problem: the creature type addition is managed exactly the same as all cards that do it. Are you sure there wasn't anything else on the battlefield that disables attacking/blocking?TQP wrote:Hello. I think, "Tezzeret, Agent of Bolas" does not work correctly. If I cast -1 abbility, artifact become a 5/5 creature, yea, opponent can kill him with some spells (like "Murder"), but this 5/5 "creature" cant block or attack.
-
Kithkin - Posts: 456
- Joined: 21 Feb 2014, 07:12
- Location: Cologne, GERMANY
- Has thanked: 11 times
- Been thanked: 56 times
Re: TFM&G2K's Planeswalkers Pool v8c (18/Aug/2014)
by TQP » 19 Aug 2014, 19:54
Aw, sorry, now it's work fine, that was my badthefiremind wrote:I can't see any possible reason for this problem: the creature type addition is managed exactly the same as all cards that do it. Are you sure there wasn't anything else on the battlefield that disables attacking/blocking?TQP wrote:Hello. I think, "Tezzeret, Agent of Bolas" does not work correctly. If I cast -1 abbility, artifact become a 5/5 creature, yea, opponent can kill him with some spells (like "Murder"), but this 5/5 "creature" cant block or attack.

- TQP
- Posts: 7
- Joined: 08 Aug 2014, 02:48
- Has thanked: 0 time
- Been thanked: 0 time
Re: TFM&G2K's Planeswalkers Pool v6d (05/Jun/2014)
by gorem2k » 20 Aug 2014, 11:48
This in _PLANESWALKERS_MANAGER_991800002:thefiremind wrote:MasterXploder7 wrote:Is there anything i could do to use the PW without having that lag? I run the game on a laptop so i would have to assume the processor isnt that high powered. but none the less i hope there is an easy work around
- | Open
- Code: Select all
<!-- 1. Planeswalker goes to the graveyard when it has no loyalty counters left -->
<TRIGGERED_ABILITY replacement_effect="1">
<COUNTER_REGISTRATION name="Loyalty" proliferate="11" />
<TRIGGER value="COUNTERS_CHANGED">
return GetAmount() <1 and CounterTypeIndex() == MTG():GetCountersType("Loyalty")
</TRIGGER>
<FILTER filter_id="0">
local filter = ClearFilter()
filter:Add( FE_CONTROLLER, OP_IS, EffectController() )
PLW_FilterNameSet(filter, "PLANESWALKERS", true)
</FILTER>
<RESOLUTION_TIME_ACTION filter_id="0">
if FilteredCard() ~= nil and FilteredCard():CountCounters( MTG():GetCountersType("Loyalty") ) == 0 then
FilteredCard():PutInGraveyard()
end
</RESOLUTION_TIME_ACTION>
</TRIGGERED_ABILITY>
I suppose STATE_BASED_EFFECTS does check for a plethora of unneeded conditions whereas COUNTERS_CHANGED should just do what it has to. I'm not sure what TFM think about this, and why he decided not to use that trigger since he used it a couple of times in his mod.
Re: TFM&G2K's Planeswalkers Pool v6d (05/Jun/2014)
by thefiremind » 20 Aug 2014, 12:13
The reason was that I wanted to include the scenario of Planeswalkers that could enter the battlefield with 0 loyalty: in that case, no COUNTER_CHANGED trigger would fire. But since Wizards created no Planeswalker that starts with variable loyalty, I guess it would be fine to use COUNTERS_CHANGED.gorem2k wrote:I suppose STATE_BASED_EFFECTS does check for a plethora of unneeded conditions whereas COUNTERS_CHANGED should just do what it has to. I'm not sure what TFM think about this, and why he decided not to use that trigger since he used it a couple of times in his mod.
< 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: 722 times
Re: TFM&G2K's Planeswalkers Pool v6d (05/Jun/2014)
by gorem2k » 20 Aug 2014, 13:19
Wait, I am currently testing this and it failed this time, I had Dack Fayden with 2 loyalty on it, AI attacked him with a 3/3 flying, I couldn't block it and Dack Fayden didn't go to graveyardthefiremind wrote:The reason was that I wanted to include the scenario of Planeswalkers that could enter the battlefield with 0 loyalty: in that case, no COUNTER_CHANGED trigger would fire. But since Wizards created no Planeswalker that starts with variable loyalty, I guess it would be fine to use COUNTERS_CHANGED.gorem2k wrote:I suppose STATE_BASED_EFFECTS does check for a plethora of unneeded conditions whereas COUNTERS_CHANGED should just do what it has to. I'm not sure what TFM think about this, and why he decided not to use that trigger since he used it a couple of times in his mod.

ok i think it's this
- Code: Select all
filter:Add( FE_CONTROLLER, OP_IS, EffectController() )
That did the trick (so far) :
- Code: Select all
<!-- 1. Planeswalker goes to the graveyard when it has no loyalty counters left -->
<TRIGGERED_ABILITY replacement_effect="1">
<COUNTER_REGISTRATION name="Loyalty" proliferate="11" />
<TRIGGER value="COUNTERS_CHANGED">
return GetAmount() <0 and
CounterTypeIndex() == MTG():GetCountersType("Loyalty") and
TriggerObject():CountCounters( MTG():GetCountersType("Loyalty") ) < 1
</TRIGGER>
<RESOLUTION_TIME_ACTION>
if TriggerObject() ~= nil then
TriggerObject():PutInGraveyard()
end
</RESOLUTION_TIME_ACTION>
</TRIGGERED_ABILITY>
Who is online
Users browsing this forum: roman and 8 guests