Page 1 of 1

Trojan seems to always kill robots - a bug?

Posted: Tue May 30, 2017 8:06 pm
by Franzy
In 1.4, Trojan seems to always kill robots and turrents, no matter how many health they have left after hack expires. It easily kills advanced hunter drones and advanced mechs on full health. I've never seen a robot to survive Trojan actually. Seems kinda strange and super-OP if it is intentional (I wonder if it works vs. Sectopods :))

I think it's a bug, because it looks like that:
- Robot loses hack effect and takes around 5 damage
- Robot gets stunned and its hp bar disappears
- At the beginning of the next alien turn robot is dead.

Re: Trojan seems to always kill robots - a bug?

Posted: Tue May 30, 2017 8:14 pm
by chrisb
I'll have a look at it this evening. If that's the case it's likely a bug, IIRC it should top out at 8 damage?

Re: Trojan seems to always kill robots - a bug?

Posted: Tue May 30, 2017 8:51 pm
by Aurien
I have had this happen as well twice today one was a normal drone other was a m2 mech.

Re: Trojan seems to always kill robots - a bug?

Posted: Tue May 30, 2017 9:02 pm
by nmkaplan
Add my experience to the mix as well, exactly as OP described it.

I was stealthing my way through the beginning of an Advent HQ, taking out all the turrets and solo drones from concealment with haywire/trojan.

I trojan'd a hunter drone with 8hp and it took 7 damage. I had just started to say "oh well" when the drone then blew up, seemingly for no reason.

Re: Trojan seems to always kill robots - a bug?

Posted: Tue May 30, 2017 9:58 pm
by Kyrsoh
My Trojan hacker just killed an undamaged M2 Heavy MEC on Veteran (15 HP, 3 Armour) with that. It is a bug, I think.

Re: Trojan seems to always kill robots - a bug?

Posted: Wed May 31, 2017 3:00 am
by chrisb
So I tried to spend some time debugging this and haven't really gotten far yet. Any time I try to do this in a test setup the game crashes on the enemy turn that trojan procs right near the end of the turn.

What might help is if someone could provide a tactical save after hacking but before the trojan tick occurs.

Re: Trojan seems to always kill robots - a bug?

Posted: Thu Jun 01, 2017 10:02 am
by Franzy
*UPDATE*
So yesterday I had a similar situation with a heavy turret. I shot it down with hywire and after a turn it took 5 damage from trojan, and as the turn ended it took ANOTHER 5 damage, leaving it with 1hp! So apparently the problem is not instakill but that damage applies twice, as the trojan runs out and once more in the end of the turn.

Re: Trojan seems to always kill robots - a bug?

Posted: Thu Jun 01, 2017 2:27 pm
by Aurien
I had the problem again last night was like franzy described Trojan applied at start of the turn leaving mech with 3 hp, the mech was not targetable and died at the end of my turn, the kill animation didn't play and it just stood there for the rest of the mission, sorry no save as was an ironman game.

Re: Trojan seems to always kill robots - a bug?

Posted: Thu Jun 01, 2017 6:29 pm
by azarga
I like the OP trojan. When you find the lines that were causing this behavior, please specify them here, so that I could restore this bug, kthx.
:D

Re: Trojan seems to always kill robots - a bug?

Posted: Fri Jun 02, 2017 11:40 am
by Frei_Ninjesus
Just to add my experience: Last night I used shutdown on a Heavy Mec with 16hp, at the end of the stun it lost around 8hp so I had to actively kill it before it regained it's actions on the following turn.

Re: Trojan seems to always kill robots - a bug?

Posted: Fri Jun 02, 2017 8:50 pm
by Franzy
*Update*
Used hywire on a heavy mech, it took 5 damage and got stunned... than took another 5 damage on the following turn... and another 3 (killing itself) on the turn after that, all the while it was stunned. So apparently Trojan just does not wear off, ticking like a crazy dot every turn and keeping enemy stunned:)

Re: Trojan seems to always kill robots - a bug?

Posted: Sat Jun 03, 2017 4:41 pm
by chrisb
I found the bug for this. The event handler wasn't being removed properly for the TrojanVirus effect that is added to the enemy unit. It fires at the beginning of every turn, both player and enemy. The first two ticks it is ignored since the mec is still stunned or mind controlled, and the 3rd tick it applies the damage, removes AP and then removes itself completely. Because the event handler wasn't being removed, it was firing again on the player start of turn, causing more damage, so effectively it was hitting twice per turn.

Fix is in for it now, thanks for the feedback everyone!

Re: Trojan seems to always kill robots - a bug?

Posted: Sun Jun 04, 2017 8:38 am
by Kyrsoh
Chrisb: thank you!

Re: Trojan seems to always kill robots - a bug?

Posted: Tue Jun 06, 2017 6:25 pm
by wobuffet
chrisb wrote:I found the bug for this. The event handler wasn't being removed properly for the TrojanVirus effect that is added to the enemy unit. It fires at the beginning of every turn, both player and enemy. The first two ticks it is ignored since the mec is still stunned or mind controlled, and the 3rd tick it applies the damage, removes AP and then removes itself completely. Because the event handler wasn't being removed, it was firing again on the player start of turn, causing more damage, so effectively it was hitting twice per turn.

Fix is in for it now, thanks for the feedback everyone!
Awesome! Any chance we can implement the fix ourselves?

Re: Trojan seems to always kill robots - a bug?

Posted: Wed Jun 07, 2017 12:47 pm
by chrisb
wobuffet wrote:
chrisb wrote:I found the bug for this. The event handler wasn't being removed properly for the TrojanVirus effect that is added to the enemy unit. It fires at the beginning of every turn, both player and enemy. The first two ticks it is ignored since the mec is still stunned or mind controlled, and the 3rd tick it applies the damage, removes AP and then removes itself completely. Because the event handler wasn't being removed, it was firing again on the player start of turn, causing more damage, so effectively it was hitting twice per turn.

Fix is in for it now, thanks for the feedback everyone!
Awesome! Any chance we can implement the fix ourselves?
With a mod maybe, it required implementing a function in X2Effect_TrojanVirus