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 Speed I layer for the learned character passive. */
|
|
public final class SpeedI implements AutoCloseable {
|
|
public static final String ID = "speed_i";
|
|
private final PersistentPotionEffect effect;
|
|
|
|
public SpeedI(EquipmentSessions sessions) {
|
|
effect = new PersistentPotionEffect(ID, PotionEffectType.SPEED, 0, true, sessions);
|
|
}
|
|
|
|
public PassiveDefinition definition() {
|
|
return new PassiveDefinition(ID, "Speed I", Map.of(Stat.DEX, BigInteger.valueOf(14)), Set.of(), BigInteger.ONE,
|
|
List.of("Continuously provides the standard native Speed I effect while this character is active.",
|
|
"Does not stack with equal Speed I and preserves stronger unrelated Speed effects."));
|
|
}
|
|
|
|
public void install(org.bukkit.plugin.Plugin plugin) { effect.install(plugin); }
|
|
public void sweep() { effect.sweep(); }
|
|
@Override public void close() { effect.close(); }
|
|
}
|