Fixed salamander attack style

This commit is contained in:
Doggo
2024-06-23 13:11:23 +00:00
committed by Ryan
parent 28b168e742
commit 8d2b454b1c
@@ -90,6 +90,8 @@ class SalamanderSwingHandler(private var style: CombatStyle) : CombatSwingHandle
} }
override fun calculateHit(entity: Entity?, victim: Entity?, modifier: Double): Int { override fun calculateHit(entity: Entity?, victim: Entity?, modifier: Double): Int {
entity ?: return 0
//Checking style is necessary for ::calcmaxhit to function after changing attack style but before attacking //Checking style is necessary for ::calcmaxhit to function after changing attack style but before attacking
checkStyle(entity) checkStyle(entity)
if (style == CombatStyle.MAGIC) { if (style == CombatStyle.MAGIC) {
@@ -144,7 +146,7 @@ class SalamanderSwingHandler(private var style: CombatStyle) : CombatSwingHandle
/** /**
* The instance for the swing handler. * The instance for the swing handler.
*/ */
val INSTANCE = SalamanderSwingHandler(CombatStyle.MELEE) val INSTANCE = SalamanderSwingHandler(CombatStyle.RANGE)
/** /**
* Gets the id of the tar used by a salamander. * Gets the id of the tar used by a salamander.