Search in sources :

Example 11 with Zombie

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;
}
Also used : Boss(com.skelril.openboss.Boss) Zombie(org.spongepowered.api.entity.living.monster.Zombie) CatacombsHealthInstruction(com.skelril.skree.content.zone.group.catacombs.instruction.CatacombsHealthInstruction) Instruction(com.skelril.openboss.Instruction) CatacombsHealthInstruction(com.skelril.skree.content.zone.group.catacombs.instruction.CatacombsHealthInstruction)

Example 12 with Zombie

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;
}
Also used : Boss(com.skelril.openboss.Boss) Zombie(org.spongepowered.api.entity.living.monster.Zombie) CatacombsHealthInstruction(com.skelril.skree.content.zone.group.catacombs.instruction.CatacombsHealthInstruction) Instruction(com.skelril.openboss.Instruction) CatacombsHealthInstruction(com.skelril.skree.content.zone.group.catacombs.instruction.CatacombsHealthInstruction)

Example 13 with Zombie

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();
}
Also used : Zombie(org.spongepowered.api.entity.living.monster.Zombie)

Example 14 with Zombie

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();
}
Also used : CatacombsBossDetail(com.skelril.skree.content.zone.group.catacombs.CatacombsBossDetail) Zombie(org.spongepowered.api.entity.living.monster.Zombie) Vector3d(com.flowpowered.math.vector.Vector3d)

Example 15 with Zombie

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();
}
Also used : CatacombsBossDetail(com.skelril.skree.content.zone.group.catacombs.CatacombsBossDetail) Entity(org.spongepowered.api.entity.Entity) CatacombsInstance(com.skelril.skree.content.zone.group.catacombs.CatacombsInstance) Zombie(org.spongepowered.api.entity.living.monster.Zombie) World(org.spongepowered.api.world.World)

Aggregations

Zombie (org.spongepowered.api.entity.living.monster.Zombie)20 EntityZombie (net.minecraft.entity.monster.EntityZombie)7 Instruction (com.skelril.openboss.Instruction)6 Entity (org.spongepowered.api.entity.Entity)6 Boss (com.skelril.openboss.Boss)5 CatacombsHealthInstruction (com.skelril.skree.content.zone.group.catacombs.instruction.CatacombsHealthInstruction)5 Player (org.spongepowered.api.entity.living.player.Player)5 Vector3d (com.flowpowered.math.vector.Vector3d)4 CatacombsBossDetail (com.skelril.skree.content.zone.group.catacombs.CatacombsBossDetail)4 Living (org.spongepowered.api.entity.living.Living)4 World (org.spongepowered.api.world.World)4 ZoneBossDetail (com.skelril.skree.content.zone.ZoneBossDetail)2 CatacombsInstance (com.skelril.skree.content.zone.group.catacombs.CatacombsInstance)2 BlockType (org.spongepowered.api.block.BlockType)2 PotionEffect (org.spongepowered.api.effect.potion.PotionEffect)2 Cause (org.spongepowered.api.event.cause.Cause)2 DamageSource (org.spongepowered.api.event.cause.entity.damage.source.DamageSource)2 EntityDamageSource (org.spongepowered.api.event.cause.entity.damage.source.EntityDamageSource)2 SpawnCause (org.spongepowered.api.event.cause.entity.spawn.SpawnCause)2 ItemStack (org.spongepowered.api.item.inventory.ItemStack)2