It is currently 19 Aug 2019, 16:44
   
Text Size

TriggerController

Post MTG Forge Related Programming Questions Here

Moderators: timmermac, friarsol, Blacksmith, KrazyTheFox, Agetian, CCGHQ Admins

TriggerController

Postby Sloth » 02 Apr 2012, 13:58

After much thought i brought myself to add this parameter for triggers.

What is it for?
It can be used for permanents with triggers like "When CARDNAME dies,..." or "When CARDNAME leaves the battlefield,...". Without this parameter the owner will control the ability (because the card is already in the graveyard when the trigger triggers).

Example:
| Open
Code: Select all
Name:Aven Fisher
ManaCost:3 U
Types:Creature Bird Soldier
Text:no text
PT:2/2
K:Flying
T:Mode$ ChangesZone | Origin$ Battlefield | Destination$ Graveyard | ValidCard$ Card.Self | OptionalDecider$ TriggeredCardController | TriggerController$ TriggeredCardController | Execute$ TrigDraw | TriggerDescription$ When CARDNAME is put into a graveyard from the battlefield, you may draw a card.
SVar:TrigDraw:AB$Draw | Cost$ 0 | Defined$ You | NumCards$ 1
.

Why can't this be solved in a way that doesn't require a change of scripts?
While the triggers mentioned above all need this change, some triggers do not. For example "When CARDNAME is put into your graveyard from the battlefield,..." was implemented correctly and wouldn't work correctly anymore if the owner is not the controller.

What needs to be done?
I'm afraid all cards with "When CARDNAME dies,...", "When CARDNAME leaves the battlefield,..." and some similar triggers need to be changed. :-D
User avatar
Sloth
Programmer
 
Posts: 3498
Joined: 23 Jun 2009, 19:40
Has thanked: 125 times
Been thanked: 507 times

Re: TriggerController

Postby moomarc » 02 Apr 2012, 14:28

Thanks Sloth. As soon as I've got my RL work out the way I'll help convert these. I'll also be able to post the script by Squee for Sylvan Hierophant which suffered from the lack of this feature. You rock! :supz:
-Marc
User avatar
moomarc
Pixel Commander
 
Posts: 2091
Joined: 04 Jun 2010, 15:22
Location: Johannesburg, South Africa
Has thanked: 371 times
Been thanked: 371 times

Re: TriggerController

Postby jeffwadsworth » 03 Apr 2012, 02:28

.Necrotic Plague comes to mind.
jeffwadsworth
Super Tester
 
Posts: 1164
Joined: 20 Oct 2010, 04:47
Location: USA
Has thanked: 286 times
Been thanked: 68 times

Re: TriggerController

Postby vinnie » 06 Jan 2017, 15:33

Ehy, this parameter is not documented:
http://www.slightlymagic.net/wiki/Forge_Trigger
User avatar
vinnie
 
Posts: 104
Joined: 21 Dec 2015, 14:03
Has thanked: 23 times
Been thanked: 6 times

Re: TriggerController

Postby friarsol » 06 Jan 2017, 15:46

vinnie wrote:Ehy, this parameter is not documented:
http://www.slightlymagic.net/wiki/Forge_Trigger
The great thing about Wikis is that anyone is able to fix things like that.
friarsol
Global Moderator
 
Posts: 7462
Joined: 15 May 2010, 04:20
Has thanked: 240 times
Been thanked: 933 times

Re: TriggerController

Postby vinnie » 06 Jan 2017, 16:57

Yep but my english and even more my knowledge of card script is to low, I am an user not a developer
User avatar
vinnie
 
Posts: 104
Joined: 21 Dec 2015, 14:03
Has thanked: 23 times
Been thanked: 6 times


Return to Developer's Corner

Who is online

Users browsing this forum: No registered users and 5 guests


Who is online

In total there are 5 users online :: 0 registered, 0 hidden and 5 guests (based on users active over the past 10 minutes)
Most users ever online was 287 on 31 Mar 2019, 04:11

Users browsing this forum: No registered users and 5 guests

Login Form