Selecting attack during enemy's turn

General feedback and discussion of the game.

Moderators: Forum Moderators, Developers

Strategy_Guru
Posts: 2
Joined: November 3rd, 2017, 11:15 am

Selecting attack during enemy's turn

Post by Strategy_Guru » November 3rd, 2017, 11:24 am

Hello im new in this forum, i just wanted to ask if i can select attack type during enemy turn instead of AI selecting for me.
I would like to select the counter attack according to situation but i m not allowed.
Your help is appreciated.

User avatar
Vyncyn
Forum Regular
Posts: 384
Joined: April 6th, 2013, 5:51 pm

Re: Selecting attack during enemy's turn

Post by Vyncyn » November 3rd, 2017, 2:08 pm

Not possible. The AI automatically selects the attack that would do the most damage.

User avatar
James_The_Invisible
Posts: 465
Joined: October 28th, 2012, 1:58 pm
Location: Somewhere in the Northlands, fighting dark forces

Re: Selecting attack during enemy's turn

Post by James_The_Invisible » November 3rd, 2017, 2:30 pm

It is possible with WML. Attacks have property defense_weight, if you set it to 0, the attack will be ignored on defense.
I remember that there was an add-on which allowed you to select attack for defense though I have no idea how it was called.

Tad_Carlucci
Developer
Posts: 317
Joined: April 24th, 2016, 4:18 pm

Re: Selecting attack during enemy's turn

Post by Tad_Carlucci » November 3rd, 2017, 3:28 pm

"Not possible" means "not currently possible".

It would be possible to allow you to select a unit, during your turn, and choose a preferred defense. That requires some UI changes, and some database (Savegame) changes but is, technically, possible.

The question is finding someone willing to expend the effort required for the feature.

And the other question is: as a counter-attack, the fact the enemy cannot counter-counter your bow is immaterial. So would you really choose to impose less damage in your counter-attack?

Maybe "not possible" should have read "not rational" instead :)
I forked real life and now I'm getting merge conflicts.

User avatar
Pentarctagon
Forum Administrator
Posts: 3568
Joined: March 22nd, 2009, 10:50 pm
Location: Earth (occasionally)

Re: Selecting attack during enemy's turn

Post by Pentarctagon » November 3rd, 2017, 3:34 pm

Tad_Carlucci wrote:"Not possible" means "not currently possible".

It would be possible to allow you to select a unit, during your turn, and choose a preferred defense. That requires some UI changes, and some database (Savegame) changes but is, technically, possible.

The question is finding someone willing to expend the effort required for the feature.

And the other question is: as a counter-attack, the fact the enemy cannot counter-counter your bow is immaterial. So would you really choose to impose less damage in your counter-attack?
I imagine this would be more useful for UMC than generally, given there can be abilities/weapon specials defined that the AI doesn't take into account.

For mainline though, there are a few cases like the Elvish Druid that have a more damaging ranged attack as well as a second ranged attack that deals less damage but inflicts slows.
99 little bugs in the code, 99 little bugs
take one down, patch it around
-2,147,483,648 little bugs in the code

Tad_Carlucci
Developer
Posts: 317
Joined: April 24th, 2016, 4:18 pm

Re: Selecting attack during enemy's turn

Post by Tad_Carlucci » November 3rd, 2017, 5:22 pm

Ah. OK. I see it.

Sure.

OP: Your best bet is to head over the Github an open an issue with the feature request. That way, if/when it gets done, you'll get notified.
I forked real life and now I'm getting merge conflicts.

User avatar
Poison
Posts: 89
Joined: August 13th, 2017, 4:54 pm

Re: Selecting attack during enemy's turn

Post by Poison » November 3rd, 2017, 8:07 pm

If my units are low on health they use the slow counter(Since duids are being mentioned, that's exactly what they do, if close to death they use the slow attack to counter)?? :? Surely the AI does take the special into consideration??

User avatar
Vyncyn
Forum Regular
Posts: 384
Joined: April 6th, 2013, 5:51 pm

Re: Selecting attack during enemy's turn

Post by Vyncyn » November 3rd, 2017, 8:57 pm

There are tactical advantages to choosing your counter attack. Like for example when the enemy doesn't die on your counter attack he can't move another one in and you are able to finish the enemy unit with another warrior who needs the exp more.
It would still be more of a nuisance than a benefit having to choose your attack every time the enemy attacks those units, especially in multiplayer.

User avatar
Pentarctagon
Forum Administrator
Posts: 3568
Joined: March 22nd, 2009, 10:50 pm
Location: Earth (occasionally)

Re: Selecting attack during enemy's turn

Post by Pentarctagon » November 3rd, 2017, 10:08 pm

Poison wrote:If my units are low on health they use the slow counter(Since duids are being mentioned, that's exactly what they do, if close to death they use the slow attack to counter)?? :? Surely the AI does take the special into consideration??
But if, for example, you've got 3 enemies that can attack you, and you aren't at low health until the third attacker, it would be beneficial to be able to tell your unit to use the Slows attack against all 3 enemies.
99 little bugs in the code, 99 little bugs
take one down, patch it around
-2,147,483,648 little bugs in the code

Strategy_Guru
Posts: 2
Joined: November 3rd, 2017, 11:15 am

Re: Selecting attack during enemy's turn

Post by Strategy_Guru » November 3rd, 2017, 10:13 pm

Thank you for your help.
My concern was for letting low exp unit kill the enemy unit instead of more exp one that is why i wanted the unit currently counter attacking with high exp to afflict less damage rather completely killing so that low exp unit can kill enemy unit in my turn.

User avatar
Poison
Posts: 89
Joined: August 13th, 2017, 4:54 pm

Re: Selecting attack during enemy's turn

Post by Poison » November 4th, 2017, 2:51 am

Pentarctagon wrote:
Poison wrote:If my units are low on health they use the slow counter(Since duids are being mentioned, that's exactly what they do, if close to death they use the slow attack to counter)?? :? Surely the AI does take the special into consideration??
But if, for example, you've got 3 enemies that can attack you, and you aren't at low health until the third attacker, it would be beneficial to be able to tell your unit to use the Slows attack against all 3 enemies.
I was just wondering about it because people here (including some devs) say that the AI doesn't take the special into consideration and doesn't plan ahead, I've noticed both the usage of slow or poison and opponents trying to reach the leader by eliminating the units in front of him, so these two points don't seem that valid? :hmm: Regarding the counter attack choice, you could have a right click option to swap which would be just text before you receive the attacks and if you don't use it it will work normally. This way the player can just leave it default and just intervene here and there.

User avatar
zookeeper
WML Wizard
Posts: 9739
Joined: September 11th, 2004, 10:40 pm
Location: Finland

Re: Selecting attack during enemy's turn

Post by zookeeper » November 4th, 2017, 9:31 am

Excluding the influence of defense_weight, the AI does take specials into account, and chooses the attack that results in the lowest chance to die and the lowest likely damage received. Thus, in most cases, an Elvish Druid will retaliate with entangle, but for example against a Dwarvish Thunderer it probably wouldn't.

Tad_Carlucci
Developer
Posts: 317
Joined: April 24th, 2016, 4:18 pm

Re: Selecting attack during enemy's turn

Post by Tad_Carlucci » November 4th, 2017, 9:40 am

Don't forget, the implementation has to work from MP as well as SP.

Off the top of my head, the best choice seems to be to allow you to select a preferred counter for a given unit of yours. This would completely override the AI choice. So, if, given all factors, the AI would choose your long sword most of the time, or your bow the others, but you checked to always counter with your no-damage Wand of Slowness, then the wand is used until you direct otherwise, or until the beginning of your next turn (which you could be given the choice of, as well).

This choice would need to be made during your normal turn. Once you click End Turn, that's it. No changing your mind because your opponent feigned and attacked with a slow-resistant unit you failed to see was in range turning your unit into a quivering pool of gook and your entire line collapses as units pour through the gap and your last turn turns out to actually be your Last Turn! Fade to black, roll the credits.

Unfortunately, while I can see how to go about it, I don't have the knowledge to put it into practice. So, once again, I'd suggest that, if you really are interested in seeing the feature added, filing an issue on the Github site would be best.
I forked real life and now I'm getting merge conflicts.

gnombat
Posts: 150
Joined: June 10th, 2010, 8:49 pm
Contact:

Re: Selecting attack during enemy's turn

Post by gnombat » November 4th, 2017, 10:26 am

Tad_Carlucci wrote:Don't forget, the implementation has to work from MP as well as SP.
This is not strictly necessary - it could be a SP-only feature, like choosing which unit to level up to when defending.

User avatar
Poison
Posts: 89
Joined: August 13th, 2017, 4:54 pm

Re: Selecting attack during enemy's turn

Post by Poison » November 4th, 2017, 10:45 am

Tad_Carlucci wrote:Don't forget, the implementation has to work from MP as well as SP.

Off the top of my head, the best choice seems to be to allow you to select a preferred counter for a given unit of yours. This would completely override the AI choice. So, if, given all factors, the AI would choose your long sword most of the time, or your bow the others, but you checked to always counter with your no-damage Wand of Slowness, then the wand is used until you direct otherwise, or until the beginning of your next turn (which you could be given the choice of, as well).

This choice would need to be made during your normal turn. Once you click End Turn, that's it. No changing your mind because your opponent feigned and attacked with a slow-resistant unit you failed to see was in range turning your unit into a quivering pool of gook and your entire line collapses as units pour through the gap and your last turn turns out to actually be your Last Turn! Fade to black, roll the credits.

Unfortunately, while I can see how to go about it, I don't have the knowledge to put it into practice. So, once again, I'd suggest that, if you really are interested in seeing the feature added, filing an issue on the Github site would be best.
Yes that was exactly what I was thinking too, before you end your turn, except the bold part, it should just revert to default and show no prompt. Maybe add an option "<counternamehere>for this turn" "<counternamehere>for all turns" so the player doesn't have to switch to his preference every time if he wants to keep an attack.
gnombat wrote:This is not strictly necessary - it could be a SP-only feature, like choosing which unit to level up to when defending.
Surely a feature like that would be extremely useful in mp? :geek:

Post Reply