use of org.spongepowered.api.entity.living.monster.Zombie in project Skree by Skelril.
the class CatacombsInstance method spawnStrong.
private Boss<Zombie, CatacombsBossDetail> spawnStrong(Location<World> loc) {
Zombie zombie = spawnZombie(loc);
Boss<Zombie, CatacombsBossDetail> boss = new Boss<>(zombie, new CatacombsBossDetail(this, wave * 2));
List<Instruction<BindCondition, Boss<Zombie, CatacombsBossDetail>>> bindProcessor = boss.getBindProcessor();
bindProcessor.add(new CatacombsHealthInstruction(25));
bindProcessor.add(new NamedBindInstruction<>("Wrathful Zombie"));
return boss;
}
use of org.spongepowered.api.entity.living.monster.Zombie in project Skree by Skelril.
the class CatacombsInstance method spawnNormal.
private Boss<Zombie, CatacombsBossDetail> spawnNormal(Location<World> loc) {
Zombie zombie = spawnZombie(loc);
Boss<Zombie, CatacombsBossDetail> boss = new Boss<>(zombie, new CatacombsBossDetail(this, wave));
List<Instruction<BindCondition, Boss<Zombie, CatacombsBossDetail>>> bindProcessor = boss.getBindProcessor();
bindProcessor.add(new CatacombsHealthInstruction(20));
bindProcessor.add(new NamedBindInstruction<>("Guardian Zombie"));
return boss;
}
use of org.spongepowered.api.entity.living.monster.Zombie in project Skree by Skelril.
the class CatacombsHealthInstruction method apply.
@Override
public Optional<Instruction<BindCondition, Boss<Zombie, CatacombsBossDetail>>> apply(BindCondition bindCondition, Boss<Zombie, CatacombsBossDetail> zombieCatacombsBossDetailBoss) {
Zombie targetEntity = zombieCatacombsBossDetailBoss.getTargetEntity().get();
int wave = zombieCatacombsBossDetailBoss.getDetail().getWave();
EntityHealthUtil.setMaxHealth(targetEntity, wave * baseHP, true);
return Optional.empty();
}
use of org.spongepowered.api.entity.living.monster.Zombie in project Skree by Skelril.
the class BlipDefense method apply.
@Override
public Optional<Instruction<DamagedCondition, Boss<Zombie, CatacombsBossDetail>>> apply(DamagedCondition damagedCondition, Boss<Zombie, CatacombsBossDetail> zombieCatacombsBossDetailBoss) {
CatacombsBossDetail detail = zombieCatacombsBossDetailBoss.getDetail();
if (activate(detail)) {
Zombie boss = zombieCatacombsBossDetailBoss.getTargetEntity().get();
Vector3d vel = EntityDirectionUtil.getFacingVector(boss);
vel = vel.mul(getMultiplier());
vel = new Vector3d(vel.getX(), Math.min(getYCiel(), Math.max(getYFloor(), vel.getY())), vel.getZ());
boss.setVelocity(vel);
}
return Optional.empty();
}
use of org.spongepowered.api.entity.living.monster.Zombie 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