It is currently 14 Sep 2025, 22:11
   
Text Size

Card Contributions

Post MTG Forge Related Programming Questions Here

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

Re: Card Contributions

Postby Sloth » 29 Jan 2012, 19:25

ArsenalNut wrote:Looking at Demonmail Huaberk. Since eqPump doesn't support non mana cost, are there any problems implementing like this instead?
Demonmail Hauberk | Open
Name:Demonmail Hauberk
ManaCost:4
Types:Artifact Equipment
Text:no text
A:AB$ Attach | Cost$ Sac<1/Creature> | ValidTgts$ Creature.YouCtrl | TgtPrompt$ Select targe creature you control | SorcerySpeed$ True | PrecostDesc$ Equip - | SpellDescription$ Attach CARDNAME to target creature you control.
S:Mode$ Continuous | Affected$ Card.EquippedBy | AddPower$ 4 | AddToughness$ 2 | Description$ Equipped creature gets +4/+2.
SVar:Rarity:Uncommon
SVar:Picture:http://www.wizards.com/global/images/magic/general/demonmail_hauberk.jpg
End
I think a script like this should be the future of all equipments.
User avatar
Sloth
Programmer
 
Posts: 3498
Joined: 23 Jun 2009, 19:40
Has thanked: 125 times
Been thanked: 507 times

Re: Card Contributions

Postby friarsol » 29 Jan 2012, 19:52

I believe that's the idea. Here are some cards that interact with Equip abilities:

Bludgeon Brawl
Leonin Shikari
Puresteel Paladin
friarsol
Global Moderator
 
Posts: 7593
Joined: 15 May 2010, 04:20
Has thanked: 243 times
Been thanked: 965 times

Re: Card Contributions

Postby jeffwadsworth » 29 Jan 2012, 20:47

friarsol wrote:I believe that's the idea. Here are some cards that interact with Equip abilities:

Bludgeon Brawl
Leonin Shikari
Puresteel Paladin
Puresteel Paladin using Arsenal's tech.

| Open
Name:Puresteel Paladin
ManaCost:W W
Types:Creature Human Knight
Text:no text
PT:2/2
T:Mode$ ChangesZone | ValidCard$ Equipment.YouCtrl | Origin$ Any | Destination$ Battlefield | Execute$ TrigDraw | TriggerZones$ Battlefield | OptionalDecider$ You | TriggerDescription$ Whenever an Equipment enters the battlefield under your control, you may draw a card.
SVar:TrigDraw:AB$ Draw | Cost$ 0 | NumCards$ 1
S:Mode$ Continuous | Affected$ Equipment.YouCtrl | AddAbility$ ABAttach | MetalCraft$ True | Description$ Metalcraft — Equipment you control have equip 0 as long as you control three or more artifacts.
SVar:ABAttach:AB$ Attach | Cost$ 0 | ValidTgts$ Creature.YouCtrl | TgtPrompt$ Select targe creature you control | SorcerySpeed$ True | PrecostDesc$ Equip - | SpellDescription$ Attach CARDNAME to target creature you control.
SVar:Rarity:Rare
SVar:Picture:http://www.wizards.com/global/images/magic/general/puresteel_palandin.jpg
End


Anyone see a problem? Of course, it leaves the current attachment code on there.
Last edited by jeffwadsworth on 29 Jan 2012, 21:12, edited 1 time in total.
jeffwadsworth
Super Tester Elite
 
Posts: 1172
Joined: 20 Oct 2010, 04:47
Location: USA
Has thanked: 287 times
Been thanked: 70 times

Re: Card Contributions

Postby Sloth » 29 Jan 2012, 21:08

friarsol wrote:I believe that's the idea. Here are some cards that interact with Equip abilities:

Bludgeon Brawl
Leonin Shikari
Puresteel Paladin
For Leonin Shikari we would need a flag for equip abilities (simply "Equip$ True").

jeffwadsworth wrote:Puresteel Paladin using Arsenal's tech.

| Open
Name:Puresteel Paladin
ManaCost:W W
Types:Creature Human Knight
Text:no text
PT:2/2
T:Mode$ ChangesZone | ValidCard$ Equipment.YouCtrl | Origin$ Any | Destination$ Battlefield | Execute$ TrigDraw | TriggerZones$ Battlefield | OptionalDecider$ You | TriggerDescription$ Whenever an Equipment enters the battlefield under your control, you may draw a card.
SVar:TrigDraw:AB$ Draw | Cost$ 0 | NumCards$ 1
S:Mode$ Continuous | Affected$ Equipment.YouCtrl | AddAbility$ ABAttach | MetalCraft$ True | Description$ Metalcraft — Equipment you control have equip 0 as long as you control three or more artifacts.
SVar:ABAttach:AB$ Attach | Cost$ 0 | ValidTgts$ Creature.YouCtrl | TgtPrompt$ Select targe creature you control | SorcerySpeed$ True | PrecostDesc$ Equip - | SpellDescription$ Attach CARDNAME to target creature you control.
SVar:Rarity:Rare
SVar:Picture:http://www.wizards.com/global/images/magic/general/puresteel_palandin.jpg
End


Anyone see a problem?
Looks good. AbilityFactories are sweet indeed.
User avatar
Sloth
Programmer
 
Posts: 3498
Joined: 23 Jun 2009, 19:40
Has thanked: 125 times
Been thanked: 507 times

Re: Card Contributions

Postby jeffwadsworth » 29 Jan 2012, 21:20

So, say we have Warlord's Axe. Current script:

| Open
Name:Warlord's Axe
ManaCost:3
Types:Artifact Equipment
Text:Equipped creature gets +3/+1.
K:eqPump 4:+3/+1
SVar:Rarity:Uncommon
SVar:Picture:http://www.wizards.com/global/images/magic/general/warlords_axe.jpg
SetInfo:M11|Uncommon|http://magiccards.info/scans/en/m11/220.jpg
Oracle:Equipped creature gets +3/+1.\nEquip {4} ({4}: Attach to target creature you control. Equip only as a sorcery.)
End


Should we change all equipment to:

| Open
Name:Warlord's Axe
ManaCost:3
Types:Artifact Equipment
Text:no text
A:AB$ Attach | Cost$ 4 | ValidTgts$ Creature.YouCtrl | TgtPrompt$ Select targe creature you control | SorcerySpeed$ True | PrecostDesc$ Equip - | SpellDescription$ Equipped creature gets +3/+1.
S:Mode$ Continuous | Affected$ Card.EquippedBy | AddPower$ 3 | AddToughness$ 1 | Description$ Equipped creature gets +3/+1.
SVar:Rarity:Uncommon
SVar:Picture:http://www.wizards.com/global/images/magic/general/warlords_axe.jpg
SetInfo:M11|Uncommon|http://magiccards.info/scans/en/m11/220.jpg
Oracle:Equipped creature gets +3/+1.\nEquip {4} ({4}: Attach to target creature you control. Equip only as a sorcery.)
End
jeffwadsworth
Super Tester Elite
 
Posts: 1172
Joined: 20 Oct 2010, 04:47
Location: USA
Has thanked: 287 times
Been thanked: 70 times

Re: Card Contributions

Postby slapshot5 » 29 Jan 2012, 21:25

Either that, or add code for AB$Equip that handles the SorcerySpeed and targeting restrictions and PrecostDesc for you. That's kind of what I had been thinking. I don't think it'd be any different functionally from what you have there, but the AI could be handled different for a vanilla Equip this way (but, maybe that's not necessary).

-slapshot5
slapshot5
Programmer
 
Posts: 1391
Joined: 03 Jan 2010, 17:47
Location: Mac OS X
Has thanked: 25 times
Been thanked: 68 times

Re: Card Contributions

Postby jeffwadsworth » 02 Feb 2012, 21:21

So has any consensus been reached on this "conversion" idea or does Slapshot's other idea work better?
jeffwadsworth
Super Tester Elite
 
Posts: 1172
Joined: 20 Oct 2010, 04:47
Location: USA
Has thanked: 287 times
Been thanked: 70 times

Re: Card Contributions

Postby ArsenalNut » 03 Feb 2012, 14:22

jeffwadsworth wrote:So has any consensus been reached on this "conversion" idea or does Slapshot's other idea work better?
My concern is the use of Static effects for the equipment bonuses to the equipped creature. I know these are constantly called to update the status. I haven't looked at how eqPump works to know if it is more efficient in applying the bonuses.

Otherwise, if the eqPump is going to be phase out, I would vote for making an Equip AF like Slapshot suggested so it eliminates the possible user errors of forgetting the sorcery speed or getting the targeting wrong in scripts.
So many cards, so little time
User avatar
ArsenalNut
 
Posts: 512
Joined: 08 Jul 2011, 03:49
Has thanked: 27 times
Been thanked: 121 times

Re: Card Contributions

Postby friarsol » 03 Feb 2012, 14:46

I don't think there should be any concern with using Static Abilities this way. It's the only way to handle layering properly. eqPump is decidedly less efficient in applying bonuses, and has many other limitations besides.

I don't think we need a whole new AF for Equipment, it should just use the same code-base already started for Attaching things (centralized AI is a good thing). We should try to come up with the best way to simplify timing/targeting restrictions for Equip abilities however.
friarsol
Global Moderator
 
Posts: 7593
Joined: 15 May 2010, 04:20
Has thanked: 243 times
Been thanked: 965 times

Re: Card Contributions

Postby ArsenalNut » 03 Feb 2012, 16:29

friarsol wrote:I don't think there should be any concern with using Static Abilities this way. It's the only way to handle layering properly. eqPump is decidedly less efficient in applying bonuses, and has many other limitations besides.

I don't think we need a whole new AF for Equipment, it should just use the same code-base already started for Attaching things (centralized AI is a good thing). We should try to come up with the best way to simplify timing/targeting restrictions for Equip abilities however.
I was thinking the script line for the equip ability should look something like
Code: Select all
A:AB$ Equip | Cost$ <cost> | SpellDescription$ (Attach to target creature you control. Equip only as a sorcery.)
Ultimately this could point back to the current Attach AF with sorcery speed, targets as Creature.YouCtrl, and the cost description automatically setup.
So many cards, so little time
User avatar
ArsenalNut
 
Posts: 512
Joined: 08 Jul 2011, 03:49
Has thanked: 27 times
Been thanked: 121 times

Re: Card Contributions

Postby ArsenalNut » 06 Feb 2012, 14:45

Jace's Archivist | Open
Name:Jace's Archivist
ManaCost:1 U U
Types:Creature Vedalken Wizard
Text:no text
PT:2/2
A:AB$ Discard | Cost$ U T | Defined$ You | CheckSVar$ HandSize | SVarCompare$ GE1 | Mode$ Hand | SubAbility$ DBOppDiscard1 | SpellDescription$ Each player discards his or her hand, then draws cards equal to the greatest number of cards a player discarded this way.
A:AB$ Discard | Cost$ U T | Defined$ You | CheckSVar$ HandSize | SVarCompare$ LT1 | RememberDiscarded$ True | Mode$ Hand | SubAbility$ DBOppDiscard2
SVar:DBOppDiscard1:DB$ Discard | Cost$ U T | Defined$ Opponent | RememberDiscarded$ True | Mode$ Hand | SubAbility$ DBDraw
SVar:DBOppDiscard2:DB$ Discard | Cost$ U T | Defined$ Opponent | Mode$ Hand | SubAbility$ DBDraw
SVar:DBDraw:DB$ Draw | Defined$ You | NumCards$ X | SubAbility$ DBOppDraw
SVar:DBOppDraw:DB$ Draw | Defined$ Opponent | NumCards$ X | SubAbility$ DBCleanup
SVar:DBCleanup:DB$ Cleanup | ClearRemembered$ True
SVar:X:Remembered$Amount
SVar:Y:Count$CardsInYourHand
SVar:HandSize:Count$CardsInOppHand/Minus.Y
SVar:Rarity:Rare
SVar:Picture:http://www.wizards.com/global/images/magic/general/jaces_archivist.jpg
End

Anybody see an issue with implementing Jace's Archivist like this?
So many cards, so little time
User avatar
ArsenalNut
 
Posts: 512
Joined: 08 Jul 2011, 03:49
Has thanked: 27 times
Been thanked: 121 times

Re: Card Contributions

Postby Sloth » 06 Feb 2012, 14:55

ArsenalNut wrote:
Jace's Archivist | Open
Name:Jace's Archivist
ManaCost:1 U U
Types:Creature Vedalken Wizard
Text:no text
PT:2/2
A:AB$ Discard | Cost$ U T | Defined$ You | CheckSVar$ HandSize | SVarCompare$ GE1 | Mode$ Hand | SubAbility$ DBOppDiscard1 | SpellDescription$ Each player discards his or her hand, then draws cards equal to the greatest number of cards a player discarded this way.
A:AB$ Discard | Cost$ U T | Defined$ You | CheckSVar$ HandSize | SVarCompare$ LT1 | RememberDiscarded$ True | Mode$ Hand | SubAbility$ DBOppDiscard2
SVar:DBOppDiscard1:DB$ Discard | Cost$ U T | Defined$ Opponent | RememberDiscarded$ True | Mode$ Hand | SubAbility$ DBDraw
SVar:DBOppDiscard2:DB$ Discard | Cost$ U T | Defined$ Opponent | Mode$ Hand | SubAbility$ DBDraw
SVar:DBDraw:DB$ Draw | Defined$ You | NumCards$ X | SubAbility$ DBOppDraw
SVar:DBOppDraw:DB$ Draw | Defined$ Opponent | NumCards$ X | SubAbility$ DBCleanup
SVar:DBCleanup:DB$ Cleanup | ClearRemembered$ True
SVar:X:Remembered$Amount
SVar:Y:Count$CardsInYourHand
SVar:HandSize:Count$CardsInOppHand/Minus.Y
SVar:Rarity:Rare
SVar:Picture:http://www.wizards.com/global/images/magic/general/jaces_archivist.jpg
End

Anybody see an issue with implementing Jace's Archivist like this?
If the hand size of the player with the most cards in his hand changes to be less than the hand of the other while this ability is on the stack, it miscalculates.

EDIT: Maybe it works with a condition.
User avatar
Sloth
Programmer
 
Posts: 3498
Joined: 23 Jun 2009, 19:40
Has thanked: 125 times
Been thanked: 507 times

Re: Card Contributions

Postby ArsenalNut » 06 Feb 2012, 15:31

Glint Hawk | Open
Name:Glint Hawk
ManaCost:W
Types:Creature Bird
Text:no text
PT:2/2
K:Flying
T:Mode$ ChangesZone | Origin$ Any | Destination$ Battlefield | ValidCard$ Card.Self | Execute$ TrigChangeZone | TriggerDescription$ When CARDNAME enters the battlefield, sacrifice it unless you return an artifact you control to its owner's hand.
SVar:TrigChangeZone:AB$ ChangeZone | Cost$ 0 | Origin$ Battlefield | Destination$ Hand | Hidden$ True | ChangeType$ Artifact.YouCtrl | RememberChanged$ True | SubAbility$ DBSac
SVar:DBSac:DB$ Sacrifice | Cost$ 0 | Defined$ Self | SubAbility$ DBCleanup | ConditionCheckSVar$ X | ConditionSVarCompare$ LT1
SVar:DBCleanup:DB$ Cleanup | ClearRemembered$ True
SVar:X:Remembered$Amount
SVar:RemAIDeck:True
SVar:Rarity:Common
SVar:Picture:http://www.wizards.com/global/images/magic/general/glint_hawk.jpg
SetInfo:SOM|Common|http://magiccards.info/scans/en/som/10.jpg
Oracle:Flying\nWhen Glint Hawk enters the battlefield, sacrifice it unless you return an artifact you control to its owner's hand.
End

Any problem using this script to replace the hard coded ETB trigger that doesn't work for the computer?
So many cards, so little time
User avatar
ArsenalNut
 
Posts: 512
Joined: 08 Jul 2011, 03:49
Has thanked: 27 times
Been thanked: 121 times

Re: Card Contributions

Postby friarsol » 06 Feb 2012, 16:25

Sloth wrote:
ArsenalNut wrote:
Jace's Archivist | Open
Name:Jace's Archivist
ManaCost:1 U U
Types:Creature Vedalken Wizard
Text:no text
PT:2/2
A:AB$ Discard | Cost$ U T | Defined$ You | CheckSVar$ HandSize | SVarCompare$ GE1 | Mode$ Hand | SubAbility$ DBOppDiscard1 | SpellDescription$ Each player discards his or her hand, then draws cards equal to the greatest number of cards a player discarded this way.
A:AB$ Discard | Cost$ U T | Defined$ You | CheckSVar$ HandSize | SVarCompare$ LT1 | RememberDiscarded$ True | Mode$ Hand | SubAbility$ DBOppDiscard2
SVar:DBOppDiscard1:DB$ Discard | Cost$ U T | Defined$ Opponent | RememberDiscarded$ True | Mode$ Hand | SubAbility$ DBDraw
SVar:DBOppDiscard2:DB$ Discard | Cost$ U T | Defined$ Opponent | Mode$ Hand | SubAbility$ DBDraw
SVar:DBDraw:DB$ Draw | Defined$ You | NumCards$ X | SubAbility$ DBOppDraw
SVar:DBOppDraw:DB$ Draw | Defined$ Opponent | NumCards$ X | SubAbility$ DBCleanup
SVar:DBCleanup:DB$ Cleanup | ClearRemembered$ True
SVar:X:Remembered$Amount
SVar:Y:Count$CardsInYourHand
SVar:HandSize:Count$CardsInOppHand/Minus.Y
SVar:Rarity:Rare
SVar:Picture:http://www.wizards.com/global/images/magic/general/jaces_archivist.jpg
End

Anybody see an issue with implementing Jace's Archivist like this?
If the hand size of the player with the most cards in his hand changes to be less than the hand of the other while this ability is on the stack, it miscalculates.

EDIT: Maybe it works with a condition.
Can you Remember all of the cards Discarded and take the Max of Remembered.YouCtrl and Remembered.YouDontCtrl ?
friarsol
Global Moderator
 
Posts: 7593
Joined: 15 May 2010, 04:20
Has thanked: 243 times
Been thanked: 965 times

Re: Card Contributions

Postby ArsenalNut » 06 Feb 2012, 16:31

Sloth wrote:
ArsenalNut wrote:
Jace's Archivist | Open
Name:Jace's Archivist
ManaCost:1 U U
Types:Creature Vedalken Wizard
Text:no text
PT:2/2
A:AB$ Discard | Cost$ U T | Defined$ You | CheckSVar$ HandSize | SVarCompare$ GE1 | Mode$ Hand | SubAbility$ DBOppDiscard1 | SpellDescription$ Each player discards his or her hand, then draws cards equal to the greatest number of cards a player discarded this way.
A:AB$ Discard | Cost$ U T | Defined$ You | CheckSVar$ HandSize | SVarCompare$ LT1 | RememberDiscarded$ True | Mode$ Hand | SubAbility$ DBOppDiscard2
SVar:DBOppDiscard1:DB$ Discard | Cost$ U T | Defined$ Opponent | RememberDiscarded$ True | Mode$ Hand | SubAbility$ DBDraw
SVar:DBOppDiscard2:DB$ Discard | Cost$ U T | Defined$ Opponent | Mode$ Hand | SubAbility$ DBDraw
SVar:DBDraw:DB$ Draw | Defined$ You | NumCards$ X | SubAbility$ DBOppDraw
SVar:DBOppDraw:DB$ Draw | Defined$ Opponent | NumCards$ X | SubAbility$ DBCleanup
SVar:DBCleanup:DB$ Cleanup | ClearRemembered$ True
SVar:X:Remembered$Amount
SVar:Y:Count$CardsInYourHand
SVar:HandSize:Count$CardsInOppHand/Minus.Y
SVar:Rarity:Rare
SVar:Picture:http://www.wizards.com/global/images/magic/general/jaces_archivist.jpg
End

Anybody see an issue with implementing Jace's Archivist like this?
If the hand size of the player with the most cards in his hand changes to be less than the hand of the other while this ability is on the stack, it miscalculates.

EDIT: Maybe it works with a condition.
Jace's Archivist | Open
Name:Jace's Archivist
ManaCost:1 U U
Types:Creature Vedalken Wizard
Text:no text
PT:2/2
A:AB$ Discard | Cost$ U T | Defined$ You | RememberDiscarded$ True | Mode$ Hand | SubAbility$ DBTestHand | SpellDescription$ Each player discards his or her hand, then draws cards equal to the greatest number of cards a player discarded this way.
SVar:DBTestHand:DB$ Cleanup | ClearRemembered$ True | ConditionCheckSVar$ HandSizeTest | ConditionSVarCompare$ GE1 | SubAbility$ DBOppDiscard1
SVar:DBOppDiscard1:DB$ Discard | Cost$ 0 | Defined$ Opponent | ConditionCheckSVar$ X | ConditionSVarCompare$ GE1 | Mode$ Hand | SubAbility$ DBOppDiscard2
SVar:DBOppDiscard2:DB$ Discard | Cost$ 0 | Defined$ Opponent | ConditionCheckSVar$ X | ConditionSVarCompare$ LT1 | RememberDiscarded$ True | Mode$ Hand | SubAbility$ DBDraw
SVar:DBDraw:DB$ Draw | Defined$ You | NumCards$ X | SubAbility$ DBOppDraw
SVar:DBOppDraw:DB$ Draw | Defined$ Opponent | NumCards$ X | SubAbility$ DBCleanup
SVar:DBCleanup:DB$ Cleanup | ClearRemembered$ True
SVar:X:Remembered$Amount
SVar:Y:Count$CardsInYourHand
SVar:HandSizeTest:Count$CardsInOppHand/Minus.X
SVar:Rarity:Rare
SVar:Picture:http://www.wizards.com/global/images/magic/general/jaces_archivist.jpg
End

I think this works but I didn't get a chance to test it yet. I am having problems with the mana pool throwing NPE right now.
So many cards, so little time
User avatar
ArsenalNut
 
Posts: 512
Joined: 08 Jul 2011, 03:49
Has thanked: 27 times
Been thanked: 121 times

PreviousNext

Return to Developer's Corner

Who is online

Users browsing this forum: No registered users and 63 guests

Main Menu

User Menu

Our Partners


Who is online

In total there are 63 users online :: 0 registered, 0 hidden and 63 guests (based on users active over the past 10 minutes)
Most users ever online was 7967 on 09 Sep 2025, 23:08

Users browsing this forum: No registered users and 63 guests

Login Form