Page 2 of 5

Re: StaticEffectFactory

PostPosted: 09 Jul 2011, 11:46
by Chris H.
I see that Sol made an interesting merge recently. The new AF_Attach has/had a section for adding additional code that would handle pump like abilities. With this section filled out we could migrate the enPump cards over to AF_Attach.

With Sloth's recent work in static effects we have a second possible solution to AF_Attach. So Sol, I saw your Holy Strength merge. What are your plans? Should the enPump auras be converted to this format or do you plan to fill out the code in AF_Attach to handle the pump like abs?

Holy Strength | Open
Name:Holy Strength
ManaCost:W
Types:Enchantment Aura
Text:no text
K:Enchant creature
A:SP$ Attach | Cost$ W | ValidTgts$ Creature | AILogic$ Pump
S:Mode$ Continuous | Affected$ Creature.AttachedBy | AddPower$ 1 | AddToughness$ 2 | Description$ Enchanted creature gets +1/+2.
SVar:Rarity:Common
SVar:Picture:http://www.wizards.com/global/images/magic/general/holy_strength.jpg
SetInfo:8ED|Common|http://magiccards.info/scans/en/8e/24.jpg
SetInfo:LEA|Common|http://magiccards.info/scans/en/al/208.jpg
SetInfo:LEB|Common|http://magiccards.info/scans/en/be/210.jpg
SetInfo:7ED|Common|http://magiccards.info/scans/en/7e/20.jpg
SetInfo:5ED|Common|http://magiccards.info/scans/en/5e/311.jpg
SetInfo:4ED|Common|http://magiccards.info/scans/en/4e/280.jpg
SetInfo:9ED|Common|http://magiccards.info/scans/en/9e/19.jpg
SetInfo:10E|Common|http://magiccards.info/scans/en/10e/22.jpg
SetInfo:M11|Common|http://magiccards.info/scans/en/m11/16.jpg
SetInfo:M10|Common|http://magiccards.info/scans/en/m10/15.jpg
SetInfo:3ED|Common|http://magiccards.info/scans/en/rv/208.jpg
SetInfo:2ED|Common|http://magiccards.info/scans/en/un/209.jpg
End

Re: StaticEffectFactory

PostPosted: 09 Jul 2011, 13:19
by friarsol
Chris H. wrote:I see that Sol made an interesting merge recently. The new AF_Attach has/had a section for adding additional code that would handle pump like abilities. With this section filled out we could migrate the enPump cards over to AF_Attach.

With Sloth's recent work in static effects we have a second possible solution to AF_Attach. So Sol, I saw your Holy Strength merge. What are your plans? Should the enPump auras be converted to this format or do you plan to fill out the code in AF_Attach to handle the pump like abs?
What you see is the plan, instead of enPump and all the extra baggagage, we can just let StaticAbilities do the work they are already doing.

Attach will be have few parameters (What it can Attach, and How the AI will attempt to play it). And the AI portions of the code will look through the Static Effects of the Attachment and pick the most "suitable" to attach. We could start on converting enPumps to Attach and Statics as I continue to improve the AI. (Keyword repetition doesn't quite happen yet, although it's almost there. Other "weighting" doesn't occur yet either, but will slowly come around)

Once this conversion happens: we can start coding something for Auras that ETB without being Cast. The simplest way to do it is to have a non-Targeted "Choose Something to Attach" based off the SpellPermanent Attach Target.

Oh also, Holy Strength should probably be "Creature.EnchantedBy" not "AttachedBy" although, I think it's impossible for it to turn into a non-Aura Equipment.

Re: StaticEffectFactory

PostPosted: 09 Jul 2011, 13:39
by Chris H.
friarsol wrote:What you see is the plan, instead of enPump and all the extra baggagage, we can just let StaticAbilities do the work they are already doing.

Attach will be have few parameters (What it can Attach, and How the AI will attempt to play it). And the AI portions of the code will look through the Static Effects of the Attachment and pick the most "suitable" to attach. We could start on converting enPumps to Attach and Statics as I continue to improve the AI. (Keyword repetition doesn't quite happen yet, although it's almost there. Other "weighting" doesn't occur yet either, but will slowly come around)

Once this conversion happens: we can start coding something for Auras that ETB without being Cast. The simplest way to do it is to have a non-Targeted "Choose Something to Attach" based off the SpellPermanent Attach Target.

Oh also, Holy Strength should probably be "Creature.EnchantedBy" not "AttachedBy" although, I think it's impossible for it to turn into a non-Aura Equipment.
`
Sounds like a good plan, AF_Attach does the attaching and detaching and pass off the pumps to StaticAbilities. The StaticAbilities are turning out to be more human readable than the older style of st keywords.

Might as well start the conversion even if AF_Attach is not yet finished. I spent a few days recently looking at the old aura keyword code. Decided that it was not worth the effort to re-write. And there may be a problem outside of the aura keyword code itself. Not sure about it though.

Good catch on the "Creature.EnchantedBy", with over 400 auras it would be best to do this once and not have to go back and correct this.

Re: StaticEffectFactory

PostPosted: 09 Jul 2011, 13:58
by Chris H.
I have a question about StaticAbilities granting more than one keyword. How is this being handled? The original way in the enPump keywords would be to have:

keyword1 & keyword2 & keyword3

Does StaticAbilities use this system or some other?

Re: StaticEffectFactory

PostPosted: 09 Jul 2011, 14:08
by friarsol
Hmm.. I just tested EnchantedBy and it doesn't seem to work. Maybe it's called something else? Looks like we don't have anything for that. We just have AttachedBy for both Enchantment and Equipment.

Re: StaticEffectFactory

PostPosted: 09 Jul 2011, 14:14
by Chris H.
friarsol wrote:Hmm.. I just tested EnchantedBy and it doesn't seem to work. Maybe it's called something else? Looks like we don't have anything for that. We just have AttachedBy for both Enchantment and Equipment.
`
Do you you want to add something to the code to make this distinction? Granted, it may not make a difference now, but what about those unforeseen circumstances that crop up now and then. :mrgreen:

Re: StaticEffectFactory

PostPosted: 09 Jul 2011, 14:28
by friarsol
Chris H. wrote:Do you you want to add something to the code to make this distinction? Granted, it may not make a difference now, but what about those unforeseen circumstances that crop up now and then. :mrgreen:
Yea might as well have em in there.

Re: StaticEffectFactory

PostPosted: 09 Jul 2011, 14:30
by jeffwadsworth
Chris H. wrote:I have a question about StaticAbilities granting more than one keyword. How is this being handled? The original way in the enPump keywords would be to have:

keyword1 & keyword2 & keyword3

Does StaticAbilities use this system or some other?
AddKeyword$ Flying & HIDDEN Indestructible

Re: StaticEffectFactory

PostPosted: 09 Jul 2011, 16:14
by Sloth
jeffwadsworth wrote:
Chris H. wrote:I have a question about StaticAbilities granting more than one keyword. How is this being handled? The original way in the enPump keywords would be to have:

keyword1 & keyword2 & keyword3

Does StaticAbilities use this system or some other?
AddKeyword$ Flying & HIDDEN Indestructible
Yes it's the same as in AF Pump.

Re: StaticEffectFactory

PostPosted: 09 Jul 2011, 18:17
by Chris H.
Thank you Sloth and Jeff. That should make things easier.

Re: StaticEffectFactory

PostPosted: 09 Jul 2011, 18:33
by Chris H.
friarsol wrote:
Chris H. wrote:Do you you want to add something to the code to make this distinction? Granted, it may not make a difference now, but what about those unforeseen circumstances that crop up now and then. :mrgreen:
Yea might as well have em in there.
`
Thank you Sol.

Re: StaticEffectFactory

PostPosted: 09 Jul 2011, 22:52
by Chris H.
I am slowly working my way through the auras. I am only converting the very simple enPump auras that are similar to the aura that Sol converted today, Holy Strength.

Auras that use the enPumpCurse variant may need to wait, unless the AI code is in place.

We also have a large number of auras that use the "enPump:0/0" variant. They use the keyword solely to attach and to detach. The actual abilities of these auras are granted by one of the static keywords.

I think that it may be OK to replace just the "K:enPump:0/0" with "A:SP$ Attach | Cost$ | ValidTgts$ Creature | AILogic$ Pump" unless there is some sort of a reason to hold off at this time?

It should be possible to replace the "K:enPump:0/0" keyword now and to replace the static keyword portion once the StaticAbility AF can handle this.

Re: StaticEffectFactory

PostPosted: 10 Jul 2011, 09:34
by Sloth
Chris H. wrote:It should be possible to replace the "K:enPump:0/0" keyword now and to replace the static keyword portion once the StaticAbility AF can handle this.
I'm pretty sure all stPumpEnchanted keywords can be converted to continuous static effects already. :D

Re: StaticEffectFactory

PostPosted: 10 Jul 2011, 16:51
by jeffwadsworth
The StaticEffect scripts make the stPumpSelf stuff so much clearer. Love the CheckSVar idea.

Re: StaticEffectFactory

PostPosted: 11 Jul 2011, 01:38
by Chris H.
I have finished the simple enPump conversions. I plan to check out the enPump:0/0 auras that use stPumpEnchanted. With luck I may be able to convert a few dozen more auras.

EDIT:

I think that Jeff was able to do a total conversion of White Scarab. I think that the scarabs are/were using a combo of enPump:0/0 and stPumpEnchanted.


Do we have enough AI in place to handle the enPumpCurse auras at this time? If so, how is this handled. Is it as simple as giving it "IsCurse$ True"?

How will the AI handle auras like Twisted Experiment? This aura gives +3/-1. There may be times when this could be a buff and times when it could be a curse and used as a threat removal.