Fixed ice spell casts allowing frozen victim movement for 1 tick

Fixed ice barrage animations
Players who get successfully frozen by an ice spell now receive the message "You have been frozen!"
This commit is contained in:
dam 2025-11-27 14:04:25 +02:00 committed by Ryan
parent 5533a2f78a
commit 1765f3a3b6
2 changed files with 210 additions and 209 deletions

View file

@ -130,14 +130,12 @@ public final class IceSpells extends CombatSpell {
if (state.getEstimatedHit() == -1) { if (state.getEstimatedHit() == -1) {
return; return;
} }
int ticks = (1 + (type.ordinal() - SpellType.RUSH.ordinal())) * 8; int ticks = (type.ordinal() - 4) * 8;
if (state.getEstimatedHit() > -1) { if (hasTimerActive(victim, "frozen") || hasTimerActive(victim, "frozen:immunity")) {
if (!hasTimerActive(victim, "frozen:immunity")) { if (type == SpellType.BARRAGE) { state.setFrozen(true); }
registerTimer(victim, spawnTimer("frozen", ticks, true)); return;
} else if (type == SpellType.BARRAGE) { }
state.setFrozen(true); registerTimer(victim, spawnTimer("frozen", ticks, true));
}
}
} }
@Override @Override

View file

@ -29,6 +29,9 @@ class Frozen : PersistTimer (1, "frozen", flags = arrayOf(TimerFlag.ClearOnDeath
removeTimer(entity, this) removeTimer(entity, this)
return return
} }
if (entity is Player) {
sendMessage(entity as Player, "You have been frozen!")
}
} }
override fun run (entity: Entity) : Boolean { override fun run (entity: Entity) : Boolean {