30 lines
1.2 KiB
Java
30 lines
1.2 KiB
Java
package games.dmg.fantasystick.passive;
|
|
|
|
import games.dmg.fantasystick.progression.Stat;
|
|
import games.dmg.fantasystick.session.EquipmentSessions;
|
|
import java.math.BigInteger;
|
|
import java.util.List;
|
|
import java.util.Map;
|
|
import java.util.Set;
|
|
import org.bukkit.potion.PotionEffectType;
|
|
|
|
/** Current-session native Night Vision I layer for the learned character passive. */
|
|
public final class LowLightVision implements AutoCloseable {
|
|
public static final String ID = "low_light_vision";
|
|
private final PersistentPotionEffect effect;
|
|
|
|
public LowLightVision(EquipmentSessions sessions) {
|
|
effect = new PersistentPotionEffect(ID, PotionEffectType.NIGHT_VISION, 0, false, sessions);
|
|
}
|
|
|
|
public PassiveDefinition definition() {
|
|
return new PassiveDefinition(ID, "Low-Light Vision", Map.of(Stat.WIS, BigInteger.valueOf(12)), Set.of(), BigInteger.ONE,
|
|
List.of("Continuously provides native Night Vision I while this character is active.",
|
|
"Preserves unrelated Night Vision and does not change light, darkness or mob behavior."));
|
|
}
|
|
|
|
public void install(org.bukkit.plugin.Plugin plugin) { effect.install(plugin); }
|
|
public void sweep() { effect.sweep(); }
|
|
@Override public void close() { effect.close(); }
|
|
}
|