fheroes2 icon indicating copy to clipboard operation
fheroes2 copied to clipboard

Battle: improve defence of ranged units

Open fheroes2bugs opened this issue 1 year ago • 3 comments

Preliminary checks

Describe the problem requiring a solution

If a 2-cell creature (i.e. wolf, champion, cavalry, unicorn, hydra, griffin, roc, medusa, nomad) wants to defend a ranged unit from a 2-cell attacking creature (i.e. dragon, phoenix, cyplop) he is standing not in front of ranged creature. Example: Starting postion: image

Phoenix wants to defend druids: image

That was a mistake, druids die from dragons attack: image

https://github.com/ihhub/fheroes2/assets/145407420/a6644d3a-95f8-4bba-b3dd-8205c5f13ab7

Describe the possible solution

When playing against a 2-cell attacking creature (i.e. dragon, phoenix, cyplop) make a 2-cell creature (i.e. wolf, champion, cavalry, unicorn, hydra, griffin, roc, medusa, nomad) stay in front of ranged unit, so a dragon would not attack both of 2 units in one turn.

image

Additional info

version 1.09 save: defence dragon.zip

fheroes2bugs avatar Oct 17 '23 20:10 fheroes2bugs

Hi @oleg-derevenetz , I believe you improved this behavior some time ago, didn't you?

ihhub avatar Apr 13 '24 05:04 ihhub

Hi @ihhub

I believe you improved this behavior some time ago, didn't you?

Yes, but the current implementation doesn't take into account abilities of the enemy units.

oleg-derevenetz avatar Apr 13 '24 08:04 oleg-derevenetz

At version 1.1.0 unicorns try to defend druids, but druids still get killed: image

Also I want to metion, that in this battle phoenix does 0 damage to dragons. Phoenix want to defend elfs, but elfs die after dragons attack: image

The battle:

https://github.com/ihhub/fheroes2/assets/145407420/60095537-ea1a-4d91-8dde-083c960ab265

fheroes2bugs avatar May 30 '24 14:05 fheroes2bugs