use of com.skelril.skree.content.zone.group.catacombs.CatacombsInstance in project Skree by Skelril.
the class UndeadMinionRetaliation method apply.
@Override
public Optional<Instruction<DamagedCondition, Boss<Zombie, CatacombsBossDetail>>> apply(DamagedCondition damagedCondition, Boss<Zombie, CatacombsBossDetail> zombieCatacombsBossDetailBoss) {
Zombie boss = zombieCatacombsBossDetailBoss.getTargetEntity().get();
CatacombsBossDetail detail = zombieCatacombsBossDetailBoss.getDetail();
CatacombsInstance inst = detail.getZone();
for (int i = quantity(detail); i > 0; --i) {
inst.spawnWaveMob(boss.getLocation());
}
return Optional.empty();
}
use of com.skelril.skree.content.zone.group.catacombs.CatacombsInstance in project Skree by Skelril.
the class DeathMark method apply.
@Override
public Optional<Instruction<DamagedCondition, Boss<Zombie, CatacombsBossDetail>>> apply(DamagedCondition damagedCondition, Boss<Zombie, CatacombsBossDetail> zombieCatacombsBossDetailBoss) {
new PlayerCombatParser() {
@Override
public void processPlayerAttack(Player attacker, Living defender) {
CatacombsBossDetail detail = zombieCatacombsBossDetailBoss.getDetail();
CatacombsInstance inst = detail.getZone();
if (detail.getMarked().isPresent()) {
if (attacker.equals(detail.getMarked().get())) {
inst.getPlayerMessageChannel(PlayerClassifier.SPECTATOR).send(Text.of(TextColors.YELLOW, attacker.getName() + " has been freed!"));
} else {
detail.getMarked().get().offer(Keys.HEALTH, 0D);
}
detail.setMarked(null);
} else if (activate(detail)) {
detail.setMarked(attacker);
inst.getPlayerMessageChannel(PlayerClassifier.SPECTATOR).send(Text.of(TextColors.DARK_RED, attacker.getName() + " has been marked!"));
}
}
}.parse(damagedCondition.getEvent());
return Optional.empty();
}
use of com.skelril.skree.content.zone.group.catacombs.CatacombsInstance in project Skree by Skelril.
the class ExplosiveArrowBarrage method apply.
@Override
public Optional<Instruction<DamagedCondition, Boss<Zombie, CatacombsBossDetail>>> apply(DamagedCondition damagedCondition, Boss<Zombie, CatacombsBossDetail> zombieCatacombsBossDetailBoss) {
CatacombsBossDetail detail = zombieCatacombsBossDetailBoss.getDetail();
CatacombsInstance inst = detail.getZone();
Zombie boss = zombieCatacombsBossDetailBoss.getTargetEntity().get();
if (activate(detail)) {
List<Entity> arrows = VelocityEntitySpawner.sendRadial(EntityTypes.TIPPED_ARROW, boss, Cause.source(SpawnCause.builder().type(SpawnTypes.PROJECTILE).build()).build());
Task.builder().execute(() -> {
for (Entity arrow : arrows) {
Location<World> target = arrow.getLocation();
target.getExtent().triggerExplosion(Explosion.builder().location(target).radius(explosionStrength(detail)).canCauseFire(allowFire(detail)).shouldBreakBlocks(allowBlockBreak(detail)).shouldDamageEntities(true).build(), Cause.source(SkreePlugin.container()).owner(boss).build());
}
}).delay(getDelay(detail), TimeUnit.SECONDS).submit(SkreePlugin.inst());
}
return Optional.empty();
}
Aggregations