Giant chestplate regeneration passive
This commit is contained in:
@@ -159,6 +159,8 @@ export interface ServerAfterEvents {
|
||||
chat_send: EventSignal<Readonly<ChatSendEvent>>;
|
||||
player_join: EventSignal<{ readonly player: Player }>;
|
||||
player_leave: EventSignal<{ readonly player: Player }>;
|
||||
// they were hurt, after before handlers had their say. amount is what they took
|
||||
player_damage: EventSignal<Readonly<PlayerDamageEvent>>;
|
||||
// they drop what they carried and respawn right after
|
||||
player_death: EventSignal<PlayerDeathEvent>;
|
||||
server_start: EventSignal<Record<never, never>>;
|
||||
@@ -239,6 +241,20 @@ export interface Player {
|
||||
add_modifier(attribute: Id, modifier: AttributeModifier): void;
|
||||
// whether it had it
|
||||
remove_modifier(attribute: Id, id: string): boolean;
|
||||
// status effects, like minecraft's: "bworld:regeneration", "bworld:speed"... duration in ticks, -1 for forever.
|
||||
// adding one they have merges them like minecraft: the stronger wins, and a weaker longer one waits under it
|
||||
add_effect(id: Id, duration: number, options?: EffectOptions): void;
|
||||
// the one they have of that type, undefined when they don't
|
||||
effect(id: Id): { readonly amplifier: number; readonly duration: number } | undefined;
|
||||
// whether they had it
|
||||
remove_effect(id: Id): boolean;
|
||||
}
|
||||
|
||||
export interface EffectOptions {
|
||||
amplifier?: number; // level minus 1: 1 is regeneration II
|
||||
ambient?: boolean; // fainter particles, like from a beacon
|
||||
show_particles?: boolean;
|
||||
show_icon?: boolean;
|
||||
}
|
||||
|
||||
// like minecraft's: the base, plus every add_value, plus that times each add_multiplied_base, then times 1 + each
|
||||
|
||||
Reference in New Issue
Block a user