It is currently 05 Aug 2025, 00:55
   
Text Size

the StaticEffect keyword

Post MTG Forge Related Programming Questions Here

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

the StaticEffect keyword

Postby 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:
Code: Select all
StaticEffect:Play:Self:SetPT/
1. the card.txt entry for your example card Reckless One has to be fixed:
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.
The condition "Permanents you control" is wrong in this entry since Reckless One should count your opponents goblins too.

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.
User avatar
Sloth
Programmer
 
Posts: 3498
Joined: 23 Jun 2009, 19:40
Has thanked: 125 times
Been thanked: 507 times

Re: the StaticEffect keyword

Postby 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.
The Force will be with you, Always.
User avatar
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

Postby 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.
User avatar
Sloth
Programmer
 
Posts: 3498
Joined: 23 Jun 2009, 19:40
Has thanked: 125 times
Been thanked: 507 times


Return to Developer's Corner

Who is online

Users browsing this forum: No registered users and 6 guests

Main Menu

User Menu

Our Partners


Who is online

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

Login Form