Search in sources :

Example 1 with ZoneBossDetail

use of com.skelril.skree.content.zone.ZoneBossDetail in project Skree by Skelril.

the class DaBombBossManager 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) 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 2 with ZoneBossDetail

use of com.skelril.skree.content.zone.ZoneBossDetail in project Skree by Skelril.

the class FrimusBossManager method handleDamaged.

private void handleDamaged() {
    List<Instruction<DamagedCondition, Boss<Living, ZoneBossDetail<FreakyFourInstance>>>> damagedProcessor = getDamagedProcessor();
    damagedProcessor.add((condition, boss) -> {
        DamageEntityEvent event = condition.getEvent();
        new PlayerCombatParser() {

            @Override
            public void processPlayerAttack(Player attacker, Living defender) {
                if (condition.getDamageSource().get() instanceof IndirectEntityDamageSource) {
                    attacker.sendMessage(Text.of(TextColors.RED, "Projectiles can't harm me... Mwahahaha!"));
                    event.setCancelled(true);
                }
            }
        }.parse(event);
        return Optional.empty();
    });
}
Also used : DamageEntityEvent(org.spongepowered.api.event.entity.DamageEntityEvent) Player(org.spongepowered.api.entity.living.player.Player) Living(org.spongepowered.api.entity.living.Living) IndirectEntityDamageSource(org.spongepowered.api.event.cause.entity.damage.source.IndirectEntityDamageSource) 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) PlayerCombatParser(com.skelril.nitro.combat.PlayerCombatParser)

Example 3 with ZoneBossDetail

use of com.skelril.skree.content.zone.ZoneBossDetail in project Skree by Skelril.

the class FrimusBossManager 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, Math.max(1, Probability.getRandom(EntityHealthUtil.getHealth((Living) attacked)) - 5));
            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) ZoneBossDetail(com.skelril.skree.content.zone.ZoneBossDetail)

Example 4 with ZoneBossDetail

use of com.skelril.skree.content.zone.ZoneBossDetail in project Skree by Skelril.

the class SnipeeBossManager method handleDamaged.

private void handleDamaged() {
    List<Instruction<DamagedCondition, Boss<Living, ZoneBossDetail<FreakyFourInstance>>>> damagedProcessor = getDamagedProcessor();
    damagedProcessor.add(new BackTeleportInstruction(config));
    damagedProcessor.add(new HealableInstruction());
}
Also used : Living(org.spongepowered.api.entity.living.Living) HealableInstruction(com.skelril.skree.content.zone.group.freakyfour.boss.bossmove.HealableInstruction) 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) BackTeleportInstruction(com.skelril.skree.content.zone.group.freakyfour.boss.bossmove.BackTeleportInstruction)

Example 5 with ZoneBossDetail

use of com.skelril.skree.content.zone.ZoneBossDetail in project Skree by Skelril.

the class SnipeeBossManager 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) 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)

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