Page 3 of 5

Re: StaticEffectFactory

PostPosted: 11 Jul 2011, 01:55
by jeffwadsworth
Chris, AILogic$ Curse.

Re: StaticEffectFactory

PostPosted: 11 Jul 2011, 02:04
by Chris H.
jeffwadsworth wrote:Chris, AILogic$ Curse.
`
Thank you Jeff.

Re: StaticEffectFactory

PostPosted: 11 Jul 2011, 02:28
by friarsol
The AI is still pretty rudimentary as I got caught up in the Women's World Cup this morning/afternoon instead of adding more AI.

It looks like there's about 10 or so cards that give Power bonuses, but Toughness reductions. That might be enough to have it's own Logic. For now I'd say just use Pump for those, and I'll try to add a check to filter out creatures that would get killed by the Aura before I goto sleep tonight.

Re: StaticEffectFactory

PostPosted: 11 Jul 2011, 11:53
by Chris H.
friarsol wrote:The AI is still pretty rudimentary as I got caught up in the Women's World Cup this morning/afternoon instead of adding more AI.

It looks like there's about 10 or so cards that give Power bonuses, but Toughness reductions. That might be enough to have it's own Logic. For now I'd say just use Pump for those, and I'll try to add a check to filter out creatures that would get killed by the Aura before I goto sleep tonight.
`
Thank you Sol. Yeah, these cards can be tricky for the computer. The aura keywords were not updated to handle this well.

It might be (?) worth the effort to have it's own logic. With creatures that are unblockable, trample, first/double strike, etc. It can get tricky.

Re: StaticEffectFactory

PostPosted: 11 Jul 2011, 12:16
by friarsol
Chris H. wrote:Thank you Sol. Yeah, these cards can be tricky for the computer. The aura keywords were not updated to handle this well.

It might be (?) worth the effort to have it's own logic. With creatures that are unblockable, trample, first/double strike, etc. It can get tricky.
Well, at the very least it won't kill a Creature now when playing (I tested with Twisted Experiment ) The next piece of AI is not over-Enchanting cards. enPump did this by simply Filtering out any Cards that are being Enchanted. That's probably a fine way to get something in place, since this filter would happen after Enchant Magnets. I would like to flesh out the other Logics, and I (or someone else) can beef up specifics in Pump after.

Re: StaticEffectFactory

PostPosted: 11 Jul 2011, 13:39
by Chris H.
friarsol wrote:Well, at the very least it won't kill a Creature now when playing (I tested with Twisted Experiment ) The next piece of AI is not over-Enchanting cards. enPump did this by simply Filtering out any Cards that are being Enchanted. That's probably a fine way to get something in place, since this filter would happen after Enchant Magnets. I would like to flesh out the other Logics, and I (or someone else) can beef up specifics in Pump after.
`
I tested your code change and it is working. I did notice that the computer did not cast the Twisted Experiment as soon as it had a creature with a toughness greater than 1. The computer waited a few turns and then casted the aura. Not a complaint, just an observation.

Re: StaticEffectFactory

PostPosted: 11 Jul 2011, 13:52
by friarsol
Chris H. wrote:I tested your code change and it is working. I did notice that the computer did not cast the Twisted Experiment as soon as it had a creature with a toughness greater than 1. The computer waited a few turns and then casted the aura. Not a complaint, just an observation.
Just like all AFs there is a base canPlayAI() that determines if the SA will actually be cast. The Logic portion of the AF is simply to determine the best candidate, if any. We can tweak the numbers in canPlayAI() to cast Auras more aggressively (Like say be much more likely to play Auras before combat, and if the card returned doesn't have any suitable defenders for the next combat.)

Re: StaticEffectFactory

PostPosted: 11 Jul 2011, 19:04
by timmermac
friarsol wrote:
Chris H. wrote:Thank you Sol. Yeah, these cards can be tricky for the computer. The aura keywords were not updated to handle this well.

It might be (?) worth the effort to have it's own logic. With creatures that are unblockable, trample, first/double strike, etc. It can get tricky.
Well, at the very least it won't kill a Creature now when playing (I tested with Twisted Experiment ) The next piece of AI is not over-Enchanting cards. enPump did this by simply Filtering out any Cards that are being Enchanted. That's probably a fine way to get something in place, since this filter would happen after Enchant Magnets. I would like to flesh out the other Logics, and I (or someone else) can beef up specifics in Pump after.
The problem with setting any kind of limitation on the number enchantments an item will get is that there are cards that get power/toughness boosts for every enchantment that gets placed on them. Rabid Wombat is an example.

Re: StaticEffectFactory

PostPosted: 11 Jul 2011, 19:26
by jeffwadsworth
timmermac wrote:
friarsol wrote:
Chris H. wrote:Thank you Sol. Yeah, these cards can be tricky for the computer. The aura keywords were not updated to handle this well.

It might be (?) worth the effort to have it's own logic. With creatures that are unblockable, trample, first/double strike, etc. It can get tricky.
Well, at the very least it won't kill a Creature now when playing (I tested with Twisted Experiment ) The next piece of AI is not over-Enchanting cards. enPump did this by simply Filtering out any Cards that are being Enchanted. That's probably a fine way to get something in place, since this filter would happen after Enchant Magnets. I would like to flesh out the other Logics, and I (or someone else) can beef up specifics in Pump after.
The problem with setting any kind of limitation on the number enchantments an item will get is that there are cards that get power/toughness boosts for every enchantment that gets placed on them. Rabid Wombat is an example.
No doubt Sol will take that into account with the AI portion.

The card Training Grounds and Power Artifact are other ones to take into account for this AF.

Re: StaticEffectFactory

PostPosted: 11 Jul 2011, 19:28
by friarsol
timmermac wrote:The problem with setting any kind of limitation on the number enchantments an item will get is that there are cards that get power/toughness boosts for every enchantment that gets placed on them. Rabid Wombat is an example.
"That's probably a fine way to get something in place, since this filter would happen after Enchant Magnets." Rabid Wombat is one of those "Enchant Magnets" I referenced. If an Enchant Magnet is available one is used.

Currently enPump has this exact same restriction in place, so it wouldn't have any functional difference as the current state of Auras.

Re: StaticEffectFactory

PostPosted: 11 Jul 2011, 20:03
by Chris H.
I put together the original Rabid Wombat test in enPump. It worked but needed a lot of refinement. The only thing that is still around is the term that I coined Aura/Enchant Magnet. :)

At some point Sloth (I believe) created a SVar for cards that want to be enchanted.

We now have two variants, "SVar:EnchantMe:Multiple" and "SVar:EnchantMe:Once".

The SVar can be added to the scripts for those cards that need auras. Which in turn prevents us from having to go back and change the code every time a similar card is released.

Re: StaticEffectFactory

PostPosted: 13 Jul 2011, 02:02
by Chris H.
Sloth wrote:
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
`
I have started on these auras. I was right about replacing the "K:enPump:0/0" keyword and the only question here is the auras with stPumpEnchanted. Many of them are simple enough to convert. Some of them may not be doable?

Aboshan's Desire | Open
Name:Aboshan's Desire
ManaCost:U
Types:Enchantment Aura
Text:no text
K:Enchant creature
K:enPump:Flying
K:stPumpEnchanted:Creature:0/0/Shroud:Threshold:Threshold - Enchanted creature has shroud as long as seven or more cards are in your graveyard. (It can't be the target of spells or abilities.)
SVar:Rarity:Common
SVar:Picture:http://www.wizards.com/global/images/magic/general/aboshans_desire.jpg
SetInfo:ODY|Common|http://magiccards.info/scans/en/od/59.jpg
End


Clout of the Dominus | Open
Name:Clout of the Dominus
ManaCost:UR
Types:Enchantment Aura
Text:no text
K:Enchant creature
K:enPump:+0/+0
K:stPumpEnchanted:Creature.Blue:1/1/Shroud:No Condition:As long as enchanted creature is blue, it gets +1/+1 and has shroud. (It can't be the target of spells or abilities.)
K:stPumpEnchanted:Creature.Red:1/1/Haste:No Condition:As long as enchanted creature is red, it gets +1/+1 and has haste.
SVar:PlayMain1:TRUE
SVar:Rarity:Common
SVar:Picture:http://www.wizards.com/global/images/magic/general/clout_of_the_dominus.jpg
SetInfo:EVE|Common|http://magiccards.info/scans/en/eve/99.jpg
End

Re: StaticEffectFactory

PostPosted: 13 Jul 2011, 02:58
by jeffwadsworth
Chris H. wrote:
Sloth wrote:
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
`
I have started on these auras. I was right about replacing the "K:enPump:0/0" keyword and the only question here is the auras with stPumpEnchanted. Many of them are simple enough to convert. Some of them may not be doable?

Aboshan's Desire | Open
Name:Aboshan's Desire
ManaCost:U
Types:Enchantment Aura
Text:no text
K:Enchant creature
K:enPump:Flying
K:stPumpEnchanted:Creature:0/0/Shroud:Threshold:Threshold - Enchanted creature has shroud as long as seven or more cards are in your graveyard. (It can't be the target of spells or abilities.)
SVar:Rarity:Common
SVar:Picture:http://www.wizards.com/global/images/magic/general/aboshans_desire.jpg
SetInfo:ODY|Common|http://magiccards.info/scans/en/od/59.jpg
End


Clout of the Dominus | Open
Name:Clout of the Dominus
ManaCost:UR
Types:Enchantment Aura
Text:no text
K:Enchant creature
K:enPump:+0/+0
K:stPumpEnchanted:Creature.Blue:1/1/Shroud:No Condition:As long as enchanted creature is blue, it gets +1/+1 and has shroud. (It can't be the target of spells or abilities.)
K:stPumpEnchanted:Creature.Red:1/1/Haste:No Condition:As long as enchanted creature is red, it gets +1/+1 and has haste.
SVar:PlayMain1:TRUE
SVar:Rarity:Common
SVar:Picture:http://www.wizards.com/global/images/magic/general/clout_of_the_dominus.jpg
SetInfo:EVE|Common|http://magiccards.info/scans/en/eve/99.jpg
End
Chris, just do something like

S:Mode$ Continuous | Affected$ Creature.EnchantedBy+Blue | AddPower$ 1 | AddToughness$ 1 | AddKeyword$ Shroud
and use
Threshold$ True for the other one.

Re: StaticEffectFactory

PostPosted: 13 Jul 2011, 03:13
by friarsol
jeffwadsworth wrote:Chris, just do something like

S:Mode$ Continuous | Affected$ Creature.EnchantedBy+Blue | AddPower$ 1 | AddToughness$ 1 | AddKeyword$ Shroud
and use
Threshold$ True for the other one.
Man look at Jeff, all the tough love and dedication really paid off :D

Re: StaticEffectFactory

PostPosted: 13 Jul 2011, 03:57
by jeffwadsworth
friarsol wrote:
jeffwadsworth wrote:Chris, just do something like

S:Mode$ Continuous | Affected$ Creature.EnchantedBy+Blue | AddPower$ 1 | AddToughness$ 1 | AddKeyword$ Shroud
and use
Threshold$ True for the other one.
Man look at Jeff, all the tough love and dedication really paid off :D
More like obsession...the good kind.