It is currently 02 Aug 2025, 11:47
   
Text Size

TFM&G2K's Planeswalkers Pool v8g (12/Sep/2014)

Moderator: CCGHQ Admins

Re: TFM&G2K's Planeswalkers Pool v8 (15/Aug/2014)

Postby volrathxp » 15 Aug 2014, 21:14

thefiremind wrote:The Chain Veil is now inside the pool! Enjoy and let me know of any problems.
Seems to be working pretty good so far. It infinites properly so that is good.
volrathxp
User avatar
volrathxp
 
Posts: 362
Joined: 23 Jul 2014, 17:34
Has thanked: 9 times
Been thanked: 17 times

Re: TFM&G2K's Planeswalkers Pool v8b (15/Aug/2014)

Postby gorem2k » 17 Aug 2014, 11:54

Upcoming planeswalker from Commander 2014 set.
Teferi, Temporal Archmage | Open
Image


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>
=P~ =P~ =P~ =P~ =P~
gorem2k
 
Posts: 464
Joined: 01 Apr 2013, 04:21
Has thanked: 48 times
Been thanked: 33 times

Re: TFM&G2K's Planeswalkers Pool v8b (15/Aug/2014)

Postby 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>
Anyway, this would require to set proper AI_AVAILABILITY blocks for each and every loyalty ability... a daunting task. 8-[
< 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: 722 times

Re: TFM&G2K's Planeswalkers Pool v8b (15/Aug/2014)

Postby gorem2k » 17 Aug 2014, 12:59

thefiremind wrote:There is a player:IsSorceryTime() function, if you want to shorten the code:
Great, that's much better. and replace player with EffectController() to make it only two lines.
thefiremind wrote:Anyway, this would require to set proper AI_AVAILABILITY blocks for each and every loyalty ability... a daunting task. 8-[
Is there a post or a wiki that explains how AI_AVAILABILITY works? I've never examined that functionality.
gorem2k
 
Posts: 464
Joined: 01 Apr 2013, 04:21
Has thanked: 48 times
Been thanked: 33 times

Re: TFM&G2K's Planeswalkers Pool v8b (15/Aug/2014)

Postby thefiremind » 17 Aug 2014, 14:16

gorem2k wrote:Is there a post or a wiki that explains how AI_AVAILABILITY works? I've never examined that functionality.
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.
< 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: 722 times

Re: TFM&G2K's Planeswalkers Pool v5e (31/Jan/2014)

Postby braquio » 18 Aug 2014, 16:47

thefiremind wrote:
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
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.
I still have the same problem
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>
Sacrifice() is not a player function? May be if we write something like this:
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
User avatar
braquio
 
Posts: 143
Joined: 16 Feb 2014, 19:21
Has thanked: 15 times
Been thanked: 9 times

Re: TFM&G2K's Planeswalkers Pool v8c (18/Aug/2014)

Postby 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
Code: Select all
local target = EffectDC():Get_Targets(0) and EffectDC():Get_Targets(0):Get_CardPtr(0)
is perfectly fine and very useful: if EffectDC():Get_Targets(0) is nil, the "and" evaluation will give up without throwing errors for calling Get_CardPtr on a nil value.
< 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: 722 times

Re: TFM&G2K's Planeswalkers Pool v8c (18/Aug/2014)

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

Postby thefiremind » 19 Aug 2014, 08:05

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.
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?
< 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: 722 times

Re: TFM&G2K's Planeswalkers Pool v8c (18/Aug/2014)

Postby volrathxp » 19 Aug 2014, 10:49

thefiremind wrote:
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.
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?
Strange. I didn't have this issue with Tezz either when I was playing around with him.
volrathxp
User avatar
volrathxp
 
Posts: 362
Joined: 23 Jul 2014, 17:34
Has thanked: 9 times
Been thanked: 17 times

Re: TFM&G2K's Planeswalkers Pool v8c (18/Aug/2014)

Postby Kithkin » 19 Aug 2014, 15:20

volrathxp wrote:
thefiremind wrote:
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.
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?
Strange. I didn't have this issue with Tezz either when I was playing around with him.
I just played a deck with Tezzeret, Agent of Bolas, and it worked just fine.
User avatar
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)

Postby TQP » 19 Aug 2014, 19:54

thefiremind wrote:
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.
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?
Aw, sorry, now it's work fine, that was my bad :oops:
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)

Postby gorem2k » 20 Aug 2014, 11:48

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
This in _PLANESWALKERS_MANAGER_991800002:
| 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() &lt;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>
Will greatly improve the performance. I also happen to have lag when I have lots of planewalkers in play. And my machine is not a top of the line, but not that old either, (dual core 2.9GHZ)

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.
gorem2k
 
Posts: 464
Joined: 01 Apr 2013, 04:21
Has thanked: 48 times
Been thanked: 33 times

Re: TFM&G2K's Planeswalkers Pool v6d (05/Jun/2014)

Postby thefiremind » 20 Aug 2014, 12:13

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

Re: TFM&G2K's Planeswalkers Pool v6d (05/Jun/2014)

Postby gorem2k » 20 Aug 2014, 13:19

thefiremind wrote:
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.
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.
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 graveyard #-o I think it's missing something in the <TRIGGER> block, maybe it should go through a planeswalkers filter first?

ok i think it's this
Code: Select all
filter:Add( FE_CONTROLLER, OP_IS, EffectController() )
Not sure because manager is on both side. (or is it?, if AI isn't planeswalkers, does he have an invisible token?) Anyway, I will test by removing this line first

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() &lt;0 and
       CounterTypeIndex() == MTG():GetCountersType("Loyalty") and
       TriggerObject():CountCounters( MTG():GetCountersType("Loyalty") ) &lt; 1
    </TRIGGER>
    <RESOLUTION_TIME_ACTION>
    if TriggerObject() ~= nil then
       TriggerObject():PutInGraveyard()
    end
    </RESOLUTION_TIME_ACTION>
  </TRIGGERED_ABILITY>
No need to update/release a new version, unless more people complains about the lag.
gorem2k
 
Posts: 464
Joined: 01 Apr 2013, 04:21
Has thanked: 48 times
Been thanked: 33 times

PreviousNext

Return to 2014

Who is online

Users browsing this forum: roman and 8 guests

Main Menu

User Menu

Our Partners


Who is online

In total there are 9 users online :: 1 registered, 0 hidden and 8 guests (based on users active over the past 10 minutes)
Most users ever online was 7303 on 15 Jul 2025, 20:46

Users browsing this forum: roman and 8 guests

Login Form