Board index
Programs with AI or Rules Enforcement
Magic: The Gathering - Duels of the Planeswalkers
Programming Talk



Meandering Towershell - Khans of Tarkir
Moderator: CCGHQ Admins
8 posts
• Page 1 of 1
Meandering Towershell - Khans of Tarkir
by NeoAnderson » 27 Sep 2014, 11:53
I am trying to understand if the card Meandering Towershell can be properly coded.
The mechanic is not complex but the interactions to make it rules compliant are really weird.
Rulings
1. Is simple to code, no problems.
2. Avoid it's own triggering is simple to do, but i honestly don't know how to avoid other cards that check ATTACKING trigger will fire! One solution is to Put it back onto battlefield after ATTACKERS_DECLARED but if we do in this way, if we skip the combat this phase will never be played.
3. It can be done using a check into raid function through an RSN_OBJECTDC value.
4. This doesn't create problems, we need to store the player who controls it before to exile the card, then when it should return onto battlefield we check that player if is not nil and if is its turn.
Any idea how to PutOntoBattlefieldAttacking without fire Attacking trigger??
The mechanic is not complex but the interactions to make it rules compliant are really weird.
Rulings
- 1. 20/09/2014 As Meandering Towershell returns to the battlefield because of the delayed triggered ability, you choose which
opponent or opposing planeswalker it’s attacking. It doesn’t have to attack the same opponent or opposing planeswalker that it was when it was exiled.
2. 20/09/2014 If Meandering Towershell enters the battlefield attacking, it wasn’t declared as an attacking creature that turn. Abilities that trigger when a creature attacks, including its own triggered ability, won’t trigger.
3. 20/09/2014 On the turn Meandering Towershell attacks and is exiled, raid abilities will see it as a creature that attacked. Conversely, on the turn Meandering Towershell enters the battlefield attacking, raid abilities will not.
4. 20/09/2014 If you attack with a Meandering Towershell that you don’t own, you’ll control it when it returns to the battlefield.
1. Is simple to code, no problems.
2. Avoid it's own triggering is simple to do, but i honestly don't know how to avoid other cards that check ATTACKING trigger will fire! One solution is to Put it back onto battlefield after ATTACKERS_DECLARED but if we do in this way, if we skip the combat this phase will never be played.
3. It can be done using a check into raid function through an RSN_OBJECTDC value.
4. This doesn't create problems, we need to store the player who controls it before to exile the card, then when it should return onto battlefield we check that player if is not nil and if is its turn.
Any idea how to PutOntoBattlefieldAttacking without fire Attacking trigger??
- NeoAnderson
- Posts: 914
- Joined: 10 Sep 2013, 07:49
- Has thanked: 18 times
- Been thanked: 139 times
Re: Meandering Towershell - Khans of Tarkir
by RiiakShiNal » 27 Sep 2014, 15:37
No, if it fires the ATTACKING trigger then there is no way to put something onto the battlefield attacking without firing the trigger (because we have to use the DotP functions for some things).
Just getting started: Xander9009's DotP 2014 Community Wad
Need a deck builder: DotP 2014 Deck Builder
Problems Modding: DotP 2014 Frequent Modding Mistakes
Need a deck builder: DotP 2014 Deck Builder
Problems Modding: DotP 2014 Frequent Modding Mistakes
- RiiakShiNal
- Programmer
- Posts: 2188
- Joined: 16 May 2011, 21:37
- Has thanked: 75 times
- Been thanked: 497 times
Re: Meandering Towershell - Khans of Tarkir
by NeoAnderson » 27 Sep 2014, 15:43
The problem is not the function : PutOntoBattlefieldTappedAndAttacking() this function doesn't fire the Trigger Attacking, but i see that at end of declare blockers probably the game check which creatures are attacking.RiiakShiNal wrote:No, if it fires the ATTACKING trigger then there is no way to put something onto the battlefield attacking without firing the trigger (because we have to use the DotP functions for some things).
For this reason if we put it onto battlefield at Beginning of Declare Blockers step the trigger ATTACKING doesn't fire, but if we use this solution, if we will not attack with a creature the game doesn't enter into combat phases, so the creature remains exiled until we attack....
- NeoAnderson
- Posts: 914
- Joined: 10 Sep 2013, 07:49
- Has thanked: 18 times
- Been thanked: 139 times
Re: Meandering Towershell - Khans of Tarkir
by thefiremind » 27 Sep 2014, 18:03
NeoAnderson wrote:Any idea how to PutOntoBattlefieldAttacking without fire Attacking trigger??
I'm confused... does it fire the trigger or not?NeoAnderson wrote:PutOntoBattlefieldTappedAndAttacking() this function doesn't fire the Trigger Attacking

< 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: Meandering Towershell - Khans of Tarkir
by NeoAnderson » 27 Sep 2014, 20:15
I explain better, the card require we call back it from exile at beginning of declare_attackers step, doing this way at end of that step it is recognized as attacking creature, so the trigger ATTACKING fires.thefiremind wrote:NeoAnderson wrote:Any idea how to PutOntoBattlefieldAttacking without fire Attacking trigger??I'm confused... does it fire the trigger or not?NeoAnderson wrote:PutOntoBattlefieldTappedAndAttacking() this function doesn't fire the Trigger Attacking
To avoid this i tried to call back from exile at beginning of declare_blockers step. Doing in this way it works without fire the trigger ATTACKING, but to works we need to declare attack at least with another creature, otherwise the game doesn't enter into combat steps, and skip directly to the main phase 2, the card remain exiled until we declare an attack...
- NeoAnderson
- Posts: 914
- Joined: 10 Sep 2013, 07:49
- Has thanked: 18 times
- Been thanked: 139 times
Re: Meandering Towershell - Khans of Tarkir
by thefiremind » 27 Sep 2014, 20:36
That means the problem is in the function, just as RiiakShiNal said: a creature should fire the ATTACKING trigger only when it's declared as an attacker "manually". I don't think there's anything you can do about that.NeoAnderson wrote:doing this way at end of that step it is recognized as attacking creature, so the trigger ATTACKING fires.
< 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: Meandering Towershell - Khans of Tarkir
by NeoAnderson » 27 Sep 2014, 20:43
The only idea i have is if we could force manually to enter into combat steps. Do you know if there is a way to set a step?thefiremind wrote:That means the problem is in the function, just as RiiakShiNal said: a creature should fire the ATTACKING trigger only when it's declared as an attacker "manually". I don't think there's anything you can do about that.NeoAnderson wrote:doing this way at end of that step it is recognized as attacking creature, so the trigger ATTACKING fires.
- NeoAnderson
- Posts: 914
- Joined: 10 Sep 2013, 07:49
- Has thanked: 18 times
- Been thanked: 139 times
Re: Meandering Towershell - Khans of Tarkir
by RiiakShiNal » 28 Sep 2014, 00:03
There is no way to manually set a step, if we could then we likely would not have as many problems with skipping phases and turns.
Just getting started: Xander9009's DotP 2014 Community Wad
Need a deck builder: DotP 2014 Deck Builder
Problems Modding: DotP 2014 Frequent Modding Mistakes
Need a deck builder: DotP 2014 Deck Builder
Problems Modding: DotP 2014 Frequent Modding Mistakes
- RiiakShiNal
- Programmer
- Posts: 2188
- Joined: 16 May 2011, 21:37
- Has thanked: 75 times
- Been thanked: 497 times
8 posts
• Page 1 of 1
Who is online
Users browsing this forum: No registered users and 3 guests