diff --git a/source/core/src/main/com/csse3200/game/components/npc/SplitMoblings.java b/source/core/src/main/com/csse3200/game/components/npc/SplitMoblings.java index 660021c9e..11fda5ceb 100644 --- a/source/core/src/main/com/csse3200/game/components/npc/SplitMoblings.java +++ b/source/core/src/main/com/csse3200/game/components/npc/SplitMoblings.java @@ -25,7 +25,7 @@ public class SplitMoblings extends Component { public static final float MAX_X_BOUNDS = (float) 18.5; public static final float MIN_Y_BOUNDS = 0; public static final float MAX_Y_BOUNDS = 8; - public static final String DIE_START_EVENT = "dieStart"; + public static final String DIE_START_EVENT = "splitDeath"; /** * Initialises a component that splits mob into multiple moblings. Amount of diff --git a/source/core/src/main/com/csse3200/game/components/tasks/MobTask/MobTask.java b/source/core/src/main/com/csse3200/game/components/tasks/MobTask/MobTask.java index a9bcdf627..d93528f36 100644 --- a/source/core/src/main/com/csse3200/game/components/tasks/MobTask/MobTask.java +++ b/source/core/src/main/com/csse3200/game/components/tasks/MobTask/MobTask.java @@ -195,6 +195,7 @@ private void animate() { case ATTACK -> owner.getEntity().getEvents().trigger("water_slime_attack"); case DEATH -> { owner.getEntity().getEvents().trigger("water_slime_death"); + owner.getEntity().getEvents().trigger("splitDeath"); } case DEFAULT -> owner.getEntity().getEvents().trigger("default"); } diff --git a/source/core/src/main/com/csse3200/game/entities/factories/NPCFactory.java b/source/core/src/main/com/csse3200/game/entities/factories/NPCFactory.java index d8b3ac9b8..4cdec4518 100644 --- a/source/core/src/main/com/csse3200/game/entities/factories/NPCFactory.java +++ b/source/core/src/main/com/csse3200/game/entities/factories/NPCFactory.java @@ -469,6 +469,7 @@ public static Entity createSplittingXenoGrunt(int health) { /** * Create Splitting water slime * + * @require Entity to have a "splitDeath" * @return */ public static Entity createSplittingWaterSlime(int health) {