New SVar: DamageMe?
Post MTG Forge Related Programming Questions Here
Moderators: timmermac, Blacksmith, KrazyTheFox, Agetian, friarsol, CCGHQ Admins
New SVar: DamageMe?
by rikimbo » 11 Jun 2014, 02:27
There are SVars that influence choices, like SacMe or DiscardMeByOpp. I was toying around with the idea of having one for (direct) damage.
It came about because of cards like Saber Ants, Mogg Maniac, Stuffy Doll, etc. which like to be dealt damage. The AI can usually play well around Stuffy Doll, but sometimes I'll see my opponent hit my Saber Ants with a big burn spell. The AI is also very conservative when it has a few creatures out (including those mentioned) and it has a damage-to-all spell like Blasphemous Act.
The DamageMe SVar could influence the following:
-- Discourage an opponent from targeting a creature with a high DamageMe score with direct damage.
-- Influence (either positively or negatively, depending on the controller) the choice to play a damage-to-all spell.
I don't think the DamageMe should encourage an AI to target its own creatures with a direct damage spell, though. Or at least, not unless the amount of damage is high.
Thoughts?
(Some creatures that like being dealt damage: Boros Reckoner, Broodhatch Nantuko, Deep-Slumber Titan, Fungusaur, High Priest of Penance, Mogg Maniac, Saber Ants, Sekki, Seasons' Guide, Spitemare, Sprouting Phytohydra, Stuffy Doll.)
(Tangent 1: Swans of Bryn Argoll is special because it benefits whoever dealt the damage, rather than the controller. But it seems to be rather exceptional... are there others?)
(Tangent 2: Vigor essentially gives this property to all your other creatures...)
(Tangent 3: A negative score for Jackal Pup, Firedrinker Satyr, Filthy Cur, et al?)
It came about because of cards like Saber Ants, Mogg Maniac, Stuffy Doll, etc. which like to be dealt damage. The AI can usually play well around Stuffy Doll, but sometimes I'll see my opponent hit my Saber Ants with a big burn spell. The AI is also very conservative when it has a few creatures out (including those mentioned) and it has a damage-to-all spell like Blasphemous Act.
The DamageMe SVar could influence the following:
-- Discourage an opponent from targeting a creature with a high DamageMe score with direct damage.
-- Influence (either positively or negatively, depending on the controller) the choice to play a damage-to-all spell.
I don't think the DamageMe should encourage an AI to target its own creatures with a direct damage spell, though. Or at least, not unless the amount of damage is high.
Thoughts?
(Some creatures that like being dealt damage: Boros Reckoner, Broodhatch Nantuko, Deep-Slumber Titan, Fungusaur, High Priest of Penance, Mogg Maniac, Saber Ants, Sekki, Seasons' Guide, Spitemare, Sprouting Phytohydra, Stuffy Doll.)
(Tangent 1: Swans of Bryn Argoll is special because it benefits whoever dealt the damage, rather than the controller. But it seems to be rather exceptional... are there others?)
(Tangent 2: Vigor essentially gives this property to all your other creatures...)
(Tangent 3: A negative score for Jackal Pup, Firedrinker Satyr, Filthy Cur, et al?)
-
rikimbo - Posts: 52
- Joined: 25 Mar 2014, 14:15
- Location: Winnipeg
- Has thanked: 10 times
- Been thanked: 7 times
Re: New SVar: DamageMe?
by excessum » 11 Jun 2014, 04:09
The above is going to be very hard to determine since it combines many factors. Using a Boros Reckoner as an example:The DamageMe SVar could influence the following:
-- Discourage an opponent from targeting a creature with a high DamageMe score with direct damage.
-- Influence (either positively or negatively, depending on the controller) the choice to play a damage-to-all spell.
1) burn him (and have something take damage: is it lethal to me? will I lose an important creature?)
2) attack/block (and trade my blocking Desecration Demon? lose a creature due to re-directed damage?)
As a minimum, this would require code in AiAttack/BlockController and DamageDeal/DamageAllAi and each addition would be non-trivial since it links to so many other parameters.
Re: New SVar: DamageMe?
by rikimbo » 11 Jun 2014, 12:15
I was thinking of playing around in DamageDealAi and DamageAllAi. I wasn't thinking of tackling the intricacies of how those creatures affect combat decisions. (at least not yet.)
For the direct damage AI, I was thinking about some pretty easy heuristics that would already make things better. For example, if a creature likes being dealt damage but I still want to kill it, then AI should try to match the damage dealt to the toughness of the creature (I don't mean for X spells, but rather, Acceptable Losses is a bad choice for Saber Ants, and an even worse choice for Broodhatch Nantuko.)
As for the DamageAll part, as far as I can tell, the AI makes some kind of assessment to determine whether or not a damage-to-all spell will be beneficial to itself. I was thinking the DamageMe SVar would just lower/raise the influence of creatures that have it towards making that decision. (As in, I don't have to worry if this spell would kill my Saber Ants.)
EDIT: Checks like the above could be added in, looking specifically for the most common flavours of "I like being damaged", ie. damage reflection (Mogg Maniac, Spitemare, Boros Reckoner), and damage makes creatures (Broodhatch Nantuko, Saber Ants, Druid's Call). I'm not sure which is preferable -- avoiding new SVars or avoiding checking too many specific cases in AI decision-making code.
For the direct damage AI, I was thinking about some pretty easy heuristics that would already make things better. For example, if a creature likes being dealt damage but I still want to kill it, then AI should try to match the damage dealt to the toughness of the creature (I don't mean for X spells, but rather, Acceptable Losses is a bad choice for Saber Ants, and an even worse choice for Broodhatch Nantuko.)
As for the DamageAll part, as far as I can tell, the AI makes some kind of assessment to determine whether or not a damage-to-all spell will be beneficial to itself. I was thinking the DamageMe SVar would just lower/raise the influence of creatures that have it towards making that decision. (As in, I don't have to worry if this spell would kill my Saber Ants.)
EDIT: Checks like the above could be added in, looking specifically for the most common flavours of "I like being damaged", ie. damage reflection (Mogg Maniac, Spitemare, Boros Reckoner), and damage makes creatures (Broodhatch Nantuko, Saber Ants, Druid's Call). I'm not sure which is preferable -- avoiding new SVars or avoiding checking too many specific cases in AI decision-making code.
-
rikimbo - Posts: 52
- Joined: 25 Mar 2014, 14:15
- Location: Winnipeg
- Has thanked: 10 times
- Been thanked: 7 times
Re: New SVar: DamageMe?
by excessum » 11 Jun 2014, 12:56
The premise is sound, I am just concerned about the tediousness of the implementation which you have correctly identified already with regard to "checking too many specific cases in AI decision-making code". It is probably safe to go with new SVars as long as it is really necessary.
4 posts
• Page 1 of 1
Who is online
Users browsing this forum: No registered users and 106 guests