use of com.skelril.skree.content.zone.ZoneBossDetail in project Skree by Skelril.
the class FreakyFourInstance method spawnCharlotteMinion.
private void spawnCharlotteMinion(Vector3d position) {
Entity entity = getRegion().getExtent().createEntity(EntityTypes.CAVE_SPIDER, position);
getRegion().getExtent().spawnEntity(entity, Cause.source(SpawnCause.builder().type(SpawnTypes.PLUGIN).build()).build());
Boss<CaveSpider, ZoneBossDetail<FreakyFourInstance>> boss = new Boss<>((CaveSpider) entity, new ZoneBossDetail<>(this));
charlotteMinions.add(boss);
charlotteManager.getMinionManager().bind(boss);
}
use of com.skelril.skree.content.zone.ZoneBossDetail in project Skree by Skelril.
the class SnipeeBossManager method handleBinds.
private void handleBinds() {
List<Instruction<BindCondition, Boss<Living, ZoneBossDetail<FreakyFourInstance>>>> bindProcessor = getBindProcessor();
bindProcessor.add(new NamedBindInstruction<>("Snipee"));
bindProcessor.add(new HealthBindInstruction<>(config.snipeeHP));
bindProcessor.add((condition, boss) -> {
Living entity = boss.getTargetEntity().get();
if (entity instanceof ArmorEquipable) {
((ArmorEquipable) entity).setItemInHand(HandTypes.MAIN_HAND, newItemStack(ItemTypes.BOW));
}
return Optional.empty();
});
}
use of com.skelril.skree.content.zone.ZoneBossDetail in project Skree by Skelril.
the class SnipeeBossManager method handleDamage.
private void handleDamage() {
List<Instruction<DamageCondition, Boss<Living, ZoneBossDetail<FreakyFourInstance>>>> damageProcessor = getDamageProcessor();
damageProcessor.add((condition, boss) -> {
Entity attacked = condition.getAttacked();
if (attacked instanceof Living) {
EntityHealthUtil.forceDamage((Living) attacked, EntityHealthUtil.getMaxHealth((Living) attacked) * config.snipeeDamage);
condition.getEvent().setBaseDamage(0);
}
return Optional.empty();
});
}
use of com.skelril.skree.content.zone.ZoneBossDetail in project Skree by Skelril.
the class CharlotteBossManager method handleUnbinds.
private void handleUnbinds() {
List<Instruction<UnbindCondition, Boss<Living, ZoneBossDetail<FreakyFourInstance>>>> unbindProcessor = getUnbindProcessor();
unbindProcessor.add(new FreakyFourBossDeath());
}
use of com.skelril.skree.content.zone.ZoneBossDetail in project Skree by Skelril.
the class CharlotteMinionManager method handleDamage.
private void handleDamage() {
List<Instruction<DamageCondition, Boss<CaveSpider, ZoneBossDetail<FreakyFourInstance>>>> damageProcessor = getDamageProcessor();
damageProcessor.add((condition, boss) -> {
FreakyFourInstance inst = boss.getDetail().getZone();
Optional<Living> optBossEnt = inst.getBoss(FreakyFourBoss.CHARLOTTE);
if (optBossEnt.isPresent()) {
EntityHealthUtil.heal(optBossEnt.get(), condition.getEvent().getBaseDamage());
}
return Optional.empty();
});
}
Aggregations