Merge branch 'fix-tds-retaliation' into 'master'

Tormented demons now correctly retaliate if attacked while non-aggressive.

See merge request 2009scape/2009scape!256
This commit is contained in:
Ceikry 2021-09-13 22:14:04 +00:00
commit fc0418e6ba

View file

@ -151,6 +151,8 @@ public class TormentedDemonNPC extends AbstractNPC {
@Override
public void onImpact(final Entity entity, BattleState state) {
// Call the parent class's onImpact handler to ensure that retaliation happens if the TD is non-aggressive.
super.onImpact(entity, state);
// "The demon will switch prayers after it receives 31 damage from one attack style."
// This is done in onImpact so that it happens after the damage that caused the switch is dealt.
CombatStyle damaged = getMostDamagedStyle();