the StaticEffect keyword
Post MTG Forge Related Programming Questions Here
Moderators: timmermac, Blacksmith, KrazyTheFox, Agetian, friarsol, CCGHQ Admins
3 posts
• Page 1 of 1
the StaticEffect keyword
by Sloth » 29 Jul 2010, 10:45
First and foremost I have to say this keyword works fine and is a great addition. Thank you once again Beached As.
I'm still testing a lot of possible new cards to add and one application has its issues:
2. I also noticed that when your opponent has just two Reckless Ones out, one is 1/1 and the other is 2/2 (when I play two they are both 2/2 as they should).
3. All the StaticEffect cards do not care for changelings.
I'm still testing a lot of possible new cards to add and one application has its issues:
- Code: Select all
StaticEffect:Play:Self:SetPT/
- Code: Select all
Reckless One
3 R
Creature Goblin Avatar
no text
1/1
Haste
StaticEffect:Play:Self:SetPT/Type.Goblin/Type.Goblin:Permanents you Control:Reckless One's power and toughness are each equal to the number of Goblins on the battlefield.
2. I also noticed that when your opponent has just two Reckless Ones out, one is 1/1 and the other is 2/2 (when I play two they are both 2/2 as they should).
3. All the StaticEffect cards do not care for changelings.
-
Sloth - Programmer
- Posts: 3498
- Joined: 23 Jun 2009, 19:40
- Has thanked: 125 times
- Been thanked: 507 times
Re: the StaticEffect keyword
by Rob Cashwalker » 29 Jul 2010, 11:28
In my opinion, a static pump keyword should mirror the spPump, abPump and spAllPump keywords as much as possible and it should make use of the existing Count$ syntax.
Imperious Prefect -
stAllPump:TypeYouCtrl.Elf:+1/+1
A static effect that sets the creatures power and/or toughness should also be just as clearly expressed in text. The syntax needs to be specific to the function.
Nightmare -
stSetPower:Count$TypeYouCtrl.Swamp
stSetTough:Count$TypeYouCtrl.Swamp
or
stSetPT:X/X
SVar:X:Count$TypeYouCtrl.Swamp
See how simple the syntax can be? Sure, there might be some code overlap and duplication, but in the long run it will be less than individual cards.
The Whenever keyword also falls into this category of trying to do too much at once that makes the syntax too easy to screw up.
Imperious Prefect -
stAllPump:TypeYouCtrl.Elf:+1/+1
A static effect that sets the creatures power and/or toughness should also be just as clearly expressed in text. The syntax needs to be specific to the function.
Nightmare -
stSetPower:Count$TypeYouCtrl.Swamp
stSetTough:Count$TypeYouCtrl.Swamp
or
stSetPT:X/X
SVar:X:Count$TypeYouCtrl.Swamp
See how simple the syntax can be? Sure, there might be some code overlap and duplication, but in the long run it will be less than individual cards.
The Whenever keyword also falls into this category of trying to do too much at once that makes the syntax too easy to screw up.
The Force will be with you, Always.
-
Rob Cashwalker - Programmer
- Posts: 2167
- Joined: 09 Sep 2008, 15:09
- Location: New York
- Has thanked: 5 times
- Been thanked: 40 times
Re: the StaticEffect keyword
by Sloth » 17 Sep 2010, 10:24
This keyword is quite powerful, but it still has some bugs and a little chaotic syntax.
It does two things:
A. It allows cards to give keywords to other cards and itself as a static ability (allowing even for special conditions). This is implemented quite good. The only bug I know of is, that a Sliver creature that ceases to be a Sliver will still get a bonus as long as Shadow Sliver is on the battlefield.
B. It allows Creatures to have P/T defining abilities. This is implemented a little hacky (imho) and the syntax is very unflexible (it's used on less than a dozen cards).
I would like to do three things:
1. Change the restrictions of the affected cards to isValidCard to get some more implementable cards (equipped, untapped and isToken would be possible).
2. This would make it easy to fix the bug in A, by checking if the affected card is still Valid (this will not get checked at the moment).
3. Add more special conditions like Threshold and Hellbend.
But before I start I would be glad to have some feedback on this topic and the Proposition of Rob to split the keyword into stAllPump and stSetPower.
I would try to code stAllPump and leave the code of the StaticEffect keyword as it is.
It does two things:
A. It allows cards to give keywords to other cards and itself as a static ability (allowing even for special conditions). This is implemented quite good. The only bug I know of is, that a Sliver creature that ceases to be a Sliver will still get a bonus as long as Shadow Sliver is on the battlefield.
B. It allows Creatures to have P/T defining abilities. This is implemented a little hacky (imho) and the syntax is very unflexible (it's used on less than a dozen cards).
I would like to do three things:
1. Change the restrictions of the affected cards to isValidCard to get some more implementable cards (equipped, untapped and isToken would be possible).
2. This would make it easy to fix the bug in A, by checking if the affected card is still Valid (this will not get checked at the moment).
3. Add more special conditions like Threshold and Hellbend.
But before I start I would be glad to have some feedback on this topic and the Proposition of Rob to split the keyword into stAllPump and stSetPower.
I would try to code stAllPump and leave the code of the StaticEffect keyword as it is.
-
Sloth - Programmer
- Posts: 3498
- Joined: 23 Jun 2009, 19:40
- Has thanked: 125 times
- Been thanked: 507 times
3 posts
• Page 1 of 1
Who is online
Users browsing this forum: No registered users and 14 guests