Search in sources :

Example 1 with Soulbinding

use of com.ebicep.warlords.abilties.Soulbinding in project Warlords by ebicep.

the class CooldownManager method getNumberOfBoundPlayersLink.

public int getNumberOfBoundPlayersLink(WarlordsPlayer warlordsPlayer) {
    int counter = 0;
    for (Soulbinding soulbinding : new CooldownFilter<>(this, RegularCooldown.class).filterCooldownClassAndMapToObjectsOfClass(Soulbinding.class).collect(Collectors.toList())) {
        if (soulbinding.hasBoundPlayerLink(warlordsPlayer)) {
            counter++;
        }
    }
    incrementCooldown(new RegularCooldown<Void>("KB Resistance", "KB", null, null, this.warlordsPlayer, CooldownTypes.BUFF, cooldownManager -> {
    }, counter * 20), (int) (counter * 1.2 * 20), (int) (3.6 * 20));
    return counter;
}
Also used : PersistentCooldown(com.ebicep.warlords.player.cooldowns.cooldowns.PersistentCooldown) Soulbinding(com.ebicep.warlords.abilties.Soulbinding) OrbsOfLife(com.ebicep.warlords.abilties.OrbsOfLife) Predicate(java.util.function.Predicate) Collectors(java.util.stream.Collectors) Intervene(com.ebicep.warlords.abilties.Intervene) UndyingArmy(com.ebicep.warlords.abilties.UndyingArmy) PlayerFilter(com.ebicep.warlords.util.warlords.PlayerFilter) ArrayList(java.util.ArrayList) Consumer(java.util.function.Consumer) List(java.util.List) RegularCooldown(com.ebicep.warlords.player.cooldowns.cooldowns.RegularCooldown) WarlordsPlayer(com.ebicep.warlords.player.WarlordsPlayer) Optional(java.util.Optional) Pair(com.ebicep.warlords.util.java.Pair) Soulbinding(com.ebicep.warlords.abilties.Soulbinding)

Aggregations

Intervene (com.ebicep.warlords.abilties.Intervene)1 OrbsOfLife (com.ebicep.warlords.abilties.OrbsOfLife)1 Soulbinding (com.ebicep.warlords.abilties.Soulbinding)1 UndyingArmy (com.ebicep.warlords.abilties.UndyingArmy)1 WarlordsPlayer (com.ebicep.warlords.player.WarlordsPlayer)1 PersistentCooldown (com.ebicep.warlords.player.cooldowns.cooldowns.PersistentCooldown)1 RegularCooldown (com.ebicep.warlords.player.cooldowns.cooldowns.RegularCooldown)1 Pair (com.ebicep.warlords.util.java.Pair)1 PlayerFilter (com.ebicep.warlords.util.warlords.PlayerFilter)1 ArrayList (java.util.ArrayList)1 List (java.util.List)1 Optional (java.util.Optional)1 Consumer (java.util.function.Consumer)1 Predicate (java.util.function.Predicate)1 Collectors (java.util.stream.Collectors)1