Game crash when Harpy Mage summon Bladewing while dying. (rare bug)

** Platform, device version and operating system**
Steam, PC, Windows 10

Screenshot or image

What you were expecting to happen, and what actually happened
Finish a explore battle in Suncrest but the game freezes.

How often does this happen? When did it begin happening?
It happens consistenly every time devouring a troop with Vash dagon to kill Harpy Mage (as the last troop in the enemy team) and her trait “Deadly Flock” activates.

Steps to make it happen again
I’m using this team [1056,6256,6650,6700,3026,2,1,2,3,2,3,2,14012] i usualy end a match devouring my Irongut with Vash Dagon, but this sometimes activates Harpy mage sumoning trait “Deadly Flock” causing the game to completelly freeze.

A curious thing that I tried to reproduce under Android. I got “Deadly Flock” worked on HKI devouring, Bladewing appeared in the first slot, then both Bladewing and Harpy Mage were killed by Vash’Dagon. Another case: Harpy Mage was too healthy, so after Bladewing appearing and Vash’Dagon’s true damage dealing Harpy Mage survived. No freezes were detected.

1 Like

Wondering if that’s not similiar to what happened in past to Vash’Dagon and Arachnean Weaver combo… there were also game freezes there…

1 Like

Yep tried to reproduce over Android myself, it’s fine, is like if Tom Howard himself had programmed that version… it just works (≧∇≦)ノ
Thanks for the help!

TLDR: please fix scatter damage, inconsistent behaviour is better then unresponsive game.

Tested on both Harpy Mage and Arachnean Weaver. Bug seems time related, so far I’ve seen 3 outcomes when trait procs:

    1. Both summoner and summoned troops take damage. Game continue to run. (4x speed)
    1. Summoned troop appears, game becomes unresponsive while consuming 100% of cpu core. (2x speed)
    1. Summoned troop appears, only summoner takes damage and dies. (0.25x speed). Game continues.

Freeze itself is caused by scatter damage assignment code. Function takes amount of hits and list of targets as parameters. It then repeatedly picks random target from targets and assigns it 1 point from hits, until hits is zero.
Code won’t assign more points than target has health (and armor), unless all other target player troops are assigned enough points.
If troop somehow sneaks in after targets is set, game won’t be able to progress and will loop forever, because it checks two troops, but can only ‘damage’ one.

Sacrificial Priest and Sunbird have similar spells, but are scripted slightly differently, so I’ve only seen outcome 3.

Oh i omited that little bit, i’m using 4x speed.