It is currently 23 May 2024, 21:28
   
Text Size

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

Moderator: CCGHQ Admins

Re: TFM&G2K's Planeswalkers Pool v4 (2/Sep/2013)

Postby thefiremind » 10 Sep 2013, 18:10

Misplay wrote:The only issue I've got with your mod, it's when I attack a planeswalker with several creatures. In this case, only one of them seems to deal damage to the planeswalker.
This is strange... I often got attacked by only 1 creature in my tests, but I think I got attacked by 2 creatures a couple of times and everything went right. And it seems something that gorem2k (or anybody else) should have noticed at least once before now.

I'd like to have more information:
  • Did the game generate SCRIPT_LOG.TXT after playing?
  • Which creature dealt damage and which ones didn't?
  • Which Planeswalker were you attacking?
and I'd like to have confirmation of the bug by other people.
< 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

Re: TFM&G2K's Planeswalkers Pool v4 (2/Sep/2013)

Postby Misplay » 10 Sep 2013, 23:49

> Did the game generate SCRIPT_LOG.TXT after playing?
No.

> Which Planeswalker were you attacking?
I tested several times with Chandra (Pyromaster) and then, with Garruk (Primal hunter).
In each case, there was only one planeswalker in play.
I never tested with both in play or with others planeswalkers...

> Which creature dealt damage and which ones didn't?
It's weird.

With Chandra, the LAST creature only does the damages.
Ex: I've got an eternal witness and a Llanowar elf in play. I attack with both. I tap the eternal witness first and then, the Elf. Chandra will lose 1 counter.

With Garruk, the FIRST creature only does the damages.
Ex: I've got a token wolf (2/2) and a Llanowar elf in play. I attack with both. I tap the token first and then, the Elf. Garruk will lose 2 counters.



BTW, I found another bug, when I use "pestilence demon". When I use his ability with a planeswalker on my side (Liliana [Dark realms]), I've got the choice to redirect the damages to my own planeswalker.
However, this is a minor bug, because I'm not a cheater and I always choose to not redirect the damages. :wink:
Misplay
 
Posts: 92
Joined: 29 Aug 2013, 08:26
Has thanked: 50 times
Been thanked: 10 times

Re: TFM&G2K's Planeswalkers Pool v4 (2/Sep/2013)

Postby gorem2k » 11 Sep 2013, 01:20

Misplay wrote:BTW, I found another bug, when I use "pestilence demon".
I confirm. this and effect like Slagstorm can redirect to owner's planeswalkers.

as for other bug reported, I'm just about to test...

I confirm the combat damage as well. :oops:

planeswalker damage bug

I think the problem is with Damage():RedirectAllTo(target) as once this is called, looks like damage from other creatures in that delayDC is erased. I've REM that line and yes, the player lost 3 life (attacking with Llanowar Elves and Eternal Witness) and Chandra lost 3 counters. not 2 or 1.

Code: Select all
...
  <TRIGGERED_ABILITY replacement_effect="1" resource_id="1">
    <CLEANUP>
    return MTG():GetStep() == STEP_END_OF_COMBAT
    </CLEANUP>
    <COUNTER_REGISTRATION name="Loyalty" proliferate="11" />
    <TRIGGER value="SOURCE_DEALS_DAMAGE_TO_PLAYER" damage_type="combat" pre_trigger="1">
    if TriggerObject() == EffectDC():Get_CardPtr(0) then
       local target = EffectDC():Get_CardPtr(1)
       if target ~= nil then
          EffectDC():Set_Int( 2, Damage():GetAmount() )
          PLW_SetLastDamager( target, TriggerObject() )
          -- Damage():RedirectAllTo(target)
       end
       return true
    end
    return false
    -- APPROXIMATION: if the Planeswalker isn't a creature, damage triggers from the source won't trigger
    </TRIGGER>
...
EDIT2: removed replacement effect and now it works. but I'm sure thefiremind will come up with something else tomorrow or eventually.

Code: Select all
  <TRIGGERED_ABILITY resource_id="1">
    <CLEANUP>
    return MTG():GetStep() == STEP_END_OF_COMBAT
    </CLEANUP>
    <COUNTER_REGISTRATION name="Loyalty" proliferate="11" />
    <TRIGGER value="SOURCE_DEALS_DAMAGE_TO_PLAYER" damage_type="combat">
    if TriggerObject() == EffectDC():Get_CardPtr(0) then
       local target = EffectDC():Get_CardPtr(1)
       if target ~= nil then
          EffectDC():Set_Int( 2, Damage():GetAmount() )
          PLW_SetLastDamager( target, TriggerObject() )
          Damage():RedirectAllTo(target)
       end
       return true
    end
    return false
    -- APPROXIMATION: if the Planeswalker isn't a creature, damage triggers from the source won't trigger
    </TRIGGER>
my guess is, if we keep replacement_effect (for faster resolution) we would have to Int_Add the damage instead of Set_Int because it seems to me that damage gets replaced by the other so only one value is kept.
gorem2k
 
Posts: 464
Joined: 01 Apr 2013, 04:21
Has thanked: 48 times
Been thanked: 33 times

Re: TFM&G2K's Planeswalkers Pool v4 (2/Sep/2013)

Postby thefiremind » 11 Sep 2013, 09:03

The Slagstorm problem should be easy to fix, I just never thought about that. :lol: About the RedirectAllTo, since it works only for creatures, we could use it only when the Planeswalker is also a creature... then we should test it with Gideon and unpreventable combat damage... or just live with that happily, since it's something that isn't very likely to happen. :P
Last edited by thefiremind on 12 Sep 2013, 08:29, edited 1 time in total.
< 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

Re: TFM&G2K's Planeswalkers Pool v4 (2/Sep/2013)

Postby gorem2k » 11 Sep 2013, 12:05

thefiremind wrote:Before moving it to first post, could someone test the bugs again on the new version? Just in case I did something stupid and the result is worse than before. :lol:
I attacked a 5 loyalties Chandra, Pyromaster with both a 1/1 and a 2/1 creatures. she's lost only 1 counter.

| Open
Code: Select all
    <TRIGGER value="SOURCE_DEALS_DAMAGE_TO_PLAYER" damage_type="combat" pre_trigger="1">
    if TriggerObject() == EffectDC():Get_CardPtr(0) then
       local target = EffectDC():Get_CardPtr(1)
       if target ~= nil then
          EffectDC():Set_Int( 2, Damage():GetAmount() )
                MTG():MessageAllPlayers("damage = "..EffectDC():Get_Int(2) )
          PLW_SetLastDamager( target, TriggerObject() )
          if target:GetCardType():Test(CARD_TYPE_CREATURE) then
             Damage():RedirectAllTo(target)
          else
             Damage():Multiply(0)
          end
       end
       return true
    end
    return false
    -- APPROXIMATION: if the Planeswalker isn't a creature, damage triggers from the source won't trigger
    </TRIGGER>
this display two times; "1 damage" then "2 damage". so again my guess is RESOLUTION_TIME_ACTION in a replacement effect, only resolves once using either one of these two damage value.
Last edited by gorem2k on 11 Sep 2013, 12:27, edited 1 time in total.
gorem2k
 
Posts: 464
Joined: 01 Apr 2013, 04:21
Has thanked: 48 times
Been thanked: 33 times

Re: TFM&G2K's Planeswalkers Pool v4 (2/Sep/2013)

Postby thefiremind » 11 Sep 2013, 12:23

Now I remember what I changed lately: everything was done inside the delayed trigger's TRIGGER block. I had to move the part that removes the counters into a RESOLUTION_TIME_ACTION because it wasn't triggering Vraska's COUNTERS_CHANGED otherwise. I don't know why this made the trigger work only once per combat, so I'm out of ideas right now.
< 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

Re: TFM&G2K's Planeswalkers Pool v4 (2/Sep/2013)

Postby gorem2k » 11 Sep 2013, 12:35

thefiremind wrote:Now I remember what I changed lately: everything was done inside the delayed trigger's TRIGGER block. I had to move the part that removes the counters into a RESOLUTION_TIME_ACTION because it wasn't triggering Vraska's COUNTERS_CHANGED otherwise. I don't know why this made the trigger work only once per combat, so I'm out of ideas right now.
I would say, put Vraska in the missing list for v4b. I'd rather want combat working than having one more planeswalker in the pool. :)
gorem2k
 
Posts: 464
Joined: 01 Apr 2013, 04:21
Has thanked: 48 times
Been thanked: 33 times

Re: TFM&G2K's Planeswalkers Pool v4 (2/Sep/2013)

Postby thefiremind » 12 Sep 2013, 08:21

gorem2k wrote:I would say, put Vraska in the missing list for v4b. I'd rather want combat working than having one more planeswalker in the pool. :)
I hope to find another way. At the moment, I have 2 ideas to test:
  1. Use a PLAY_TIME_ACTION rather than a RESOLUTION_TIME_ACTION. This shouldn't be different at all in a replacement_effect trigger, but who knows, weird bugs might be solved by weird solutions. PLAY_TIME_ACTIONs seem to be ignored in replacement_effect triggers.
  2. Move the counter removing to the trigger condition again, then fire an OBJECT_TAKES_DAMAGE trigger inside the RESOLUTION_TIME_ACTION that will be caught by Vraska instead of catching COUNTERS_CHANGED. I can't set the damage with FireTrigger, but luckily Vraska doesn't need to know how much damage was dealt to her in order to destroy the creature. This might not work properly if the bug affects FireTrigger as well, and only 1 trigger gets fired when multiple creatures are involved.
EDIT: Idea 2 was the way to follow. The bug was affecting FireTrigger as well, so I made another delayed trigger that calls FireTrigger. Both combat damage and Vraska's first ability seem to work fine now.
< 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

Re: TFM&G2K's Planeswalkers Pool v4b (12/Sep/2013)

Postby Misplay » 12 Sep 2013, 11:44

Incredible... Your new version works perfectly well.
- Vraska's first ability -> OK!
- Number of counters removed when several creatures attack -> OK!

Well done, Mr Phelps!!! :D
Misplay
 
Posts: 92
Joined: 29 Aug 2013, 08:26
Has thanked: 50 times
Been thanked: 10 times

Re: TFM&G2K's Planeswalkers Pool v4b (12/Sep/2013)

Postby Drakno » 12 Sep 2013, 13:04

So, when is karn coming out?
Drakno
 
Posts: 52
Joined: 15 Oct 2012, 19:03
Has thanked: 33 times
Been thanked: 2 times

Re: TFM&G2K's Planeswalkers Pool v4b (12/Sep/2013)

Postby gorem2k » 14 Sep 2013, 16:28

tfm, if I have Mesa Enchantress in play and I cast a planeswalker, it let me draw a card, do you think it's possible to bypass Mesa trigger in your planeswalker manager?
gorem2k
 
Posts: 464
Joined: 01 Apr 2013, 04:21
Has thanked: 48 times
Been thanked: 33 times

Re: TFM&G2K's Planeswalkers Pool v4b (12/Sep/2013)

Postby thefiremind » 14 Sep 2013, 16:35

gorem2k wrote:tfm, if I have Mesa Enchantress in play and I cast a planeswalker, it let me draw a card, do you think it's possible to bypass Mesa trigger in your planeswalker manager?
No, that demands a modification on Mesa Enchantress. If we could manipulate triggers of other cards, we would be able to code Torpor Orb... but unfortunately we can't.
< 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

Re: TFM&G2K's Planeswalkers Pool v4b (12/Sep/2013)

Postby gorem2k » 14 Sep 2013, 19:29

OK, then I have a suggestion.

In manager:
Code: Select all
    <RESOLUTION_TIME_ACTION>
    local target = EffectDC():Get_Targets(0) and EffectDC():Get_Targets(0):Get_CardPtr(0)
    if target ~= nil then
       local defending = TriggerObject() and TriggerObject():GetPlayerAttacked()
       if defending ~= nil then
          defending:SetCustomQueryInstructionCardPtr(target)
          defending:BeginNewMultipleChoice()
          defending:AddMultipleChoiceAnswer("CONTROL_MB_CONFIRM")
          defending:AskMultipleChoiceQuestion( "PLW_CARD_QUERY_ATTACKED_PLANESWALKER", TriggerObject() )
       end
    end
    </RESOLUTION_TIME_ACTION>
you could set the query only if defending:IsHuman(), because AI doesnt need to know who we attack and sometimes there's a waiting for decision.
gorem2k
 
Posts: 464
Joined: 01 Apr 2013, 04:21
Has thanked: 48 times
Been thanked: 33 times

Re: TFM&G2K's Planeswalkers Pool v4b (12/Sep/2013)

Postby thefiremind » 14 Sep 2013, 19:47

gorem2k wrote:you could set the query only if defending:IsHuman(), because AI doesnt need to know who we attack and sometimes there's a waiting for decision.
That's a good idea, I'll implement it. :)
< 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

Re: TFM&G2K's Planeswalkers Pool v4b (12/Sep/2013)

Postby gorem2k » 14 Sep 2013, 20:10

about this:
Code: Select all
-- APPROXIMATION: in 2HG with both teammates using Planeswalkers, the question will be asked twice
maybe you can also apply this:

Code: Select all
if MTG():GetGameType() == GAME_TYPE_TWO_HEADED_GIANT then
and define "defending" accordingly... though you might already have tried.
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: No registered users and 27 guests


Who is online

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

Login Form