Search in sources :

Example 6 with ZoneBossDetail

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);
}
Also used : Entity(org.spongepowered.api.entity.Entity) Boss(com.skelril.openboss.Boss) CaveSpider(org.spongepowered.api.entity.living.monster.CaveSpider) ZoneBossDetail(com.skelril.skree.content.zone.ZoneBossDetail)

Example 7 with ZoneBossDetail

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();
    });
}
Also used : ArmorEquipable(org.spongepowered.api.entity.ArmorEquipable) Living(org.spongepowered.api.entity.living.Living) NamedBindInstruction(com.skelril.skree.content.zone.group.catacombs.instruction.bossmove.NamedBindInstruction) Instruction(com.skelril.openboss.Instruction) HealthBindInstruction(com.skelril.skree.content.zone.group.freakyfour.boss.bossmove.HealthBindInstruction) HealableInstruction(com.skelril.skree.content.zone.group.freakyfour.boss.bossmove.HealableInstruction) BackTeleportInstruction(com.skelril.skree.content.zone.group.freakyfour.boss.bossmove.BackTeleportInstruction) ZoneBossDetail(com.skelril.skree.content.zone.ZoneBossDetail)

Example 8 with ZoneBossDetail

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();
    });
}
Also used : Entity(org.spongepowered.api.entity.Entity) Living(org.spongepowered.api.entity.living.Living) NamedBindInstruction(com.skelril.skree.content.zone.group.catacombs.instruction.bossmove.NamedBindInstruction) Instruction(com.skelril.openboss.Instruction) HealthBindInstruction(com.skelril.skree.content.zone.group.freakyfour.boss.bossmove.HealthBindInstruction) HealableInstruction(com.skelril.skree.content.zone.group.freakyfour.boss.bossmove.HealableInstruction) BackTeleportInstruction(com.skelril.skree.content.zone.group.freakyfour.boss.bossmove.BackTeleportInstruction) ZoneBossDetail(com.skelril.skree.content.zone.ZoneBossDetail)

Example 9 with ZoneBossDetail

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());
}
Also used : Living(org.spongepowered.api.entity.living.Living) FreakyFourBossDeath(com.skelril.skree.content.zone.group.freakyfour.boss.bossmove.FreakyFourBossDeath) NamedBindInstruction(com.skelril.skree.content.zone.group.catacombs.instruction.bossmove.NamedBindInstruction) Instruction(com.skelril.openboss.Instruction) HealthBindInstruction(com.skelril.skree.content.zone.group.freakyfour.boss.bossmove.HealthBindInstruction) ZoneBossDetail(com.skelril.skree.content.zone.ZoneBossDetail)

Example 10 with ZoneBossDetail

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();
    });
}
Also used : FreakyFourInstance(com.skelril.skree.content.zone.group.freakyfour.FreakyFourInstance) CaveSpider(org.spongepowered.api.entity.living.monster.CaveSpider) Living(org.spongepowered.api.entity.living.Living) Instruction(com.skelril.openboss.Instruction) ZoneBossDetail(com.skelril.skree.content.zone.ZoneBossDetail)

Aggregations

ZoneBossDetail (com.skelril.skree.content.zone.ZoneBossDetail)15 Living (org.spongepowered.api.entity.living.Living)12 Instruction (com.skelril.openboss.Instruction)11 NamedBindInstruction (com.skelril.skree.content.zone.group.catacombs.instruction.bossmove.NamedBindInstruction)10 HealthBindInstruction (com.skelril.skree.content.zone.group.freakyfour.boss.bossmove.HealthBindInstruction)10 BackTeleportInstruction (com.skelril.skree.content.zone.group.freakyfour.boss.bossmove.BackTeleportInstruction)6 HealableInstruction (com.skelril.skree.content.zone.group.freakyfour.boss.bossmove.HealableInstruction)6 Boss (com.skelril.openboss.Boss)4 FreakyFourBossDeath (com.skelril.skree.content.zone.group.freakyfour.boss.bossmove.FreakyFourBossDeath)4 Entity (org.spongepowered.api.entity.Entity)4 CaveSpider (org.spongepowered.api.entity.living.monster.CaveSpider)2 PlayerCombatParser (com.skelril.nitro.combat.PlayerCombatParser)1 FreakyFourInstance (com.skelril.skree.content.zone.group.freakyfour.FreakyFourInstance)1 EntityZombie (net.minecraft.entity.monster.EntityZombie)1 ArmorEquipable (org.spongepowered.api.entity.ArmorEquipable)1 Giant (org.spongepowered.api.entity.living.monster.Giant)1 Zombie (org.spongepowered.api.entity.living.monster.Zombie)1 Player (org.spongepowered.api.entity.living.player.Player)1 IndirectEntityDamageSource (org.spongepowered.api.event.cause.entity.damage.source.IndirectEntityDamageSource)1 DamageEntityEvent (org.spongepowered.api.event.entity.DamageEntityEvent)1