Package de.Keyle.MyPet.api.skill
package de.Keyle.MyPet.api.skill
The skill system: registration, typed state, upgrades, and experience.
SkillManager is the central registry of every
Skill implementation, keyed by the name its
SkillName annotation declares. Skills is the per-pet container holding that
pet's live skill instances, and PetExperience tracks its experience and level.
A skill's persisted data is a SkillState record, written and read through a
SkillStateCodec registered via SkillStateCodecs. Its skilltree progression is
an Upgrade produced by an UpgradeParser, registered via SkillUpgrades
and described for the web editor by an UpgradeSchema; UpgradeComputer
accumulates the resulting values. ActiveSkill, ToggleableSkill,
OnHitSkill and OnDamageByEntitySkill mark how a skill is triggered.
-
ClassDescriptionMarker interface for skills that can be manually activated by the player (e.g., via a command or hotkey).Interface for skills that react when the pet receives damage from another entity.Interface for skills that trigger when the pet deals melee damage to a target.Manages a pet's experience points, level progression, and the damage-tracking maps used to attribute kills for XP distribution.Annotation that declares the canonical name of a
Skillimplementation.Marker interface for the typed, immutable state record exposed by aSkill.SkillStateCodec<T extends SkillState>Bundles the write and read halves of a skill's persisted state into one object.Self-registering handle pairing a skill'sSkillStateCodecwith its state class, declared as a static field on the skill's impl class.Self-registering handle pairing a skill'sUpgradeSchemawith itsUpgradeParser, declared as a static field on the skill's impl class.A skill the owner can switch on or off at runtime (from the pet menu) independently of whether the skilltree granted it.Persisted on/off flag for a toggleable skill.Represents a single level-up upgrade for a skill.Tracks the cumulative value of a single skill property (e.g.Indicates whether the value change was caused by adding or removing modifiers.Listener interface notified whenever theUpgradeComputer's current value changes due to modifier addition or removal.UpgradeParser<S extends Skill>Reads one level's upgrade for a skill out of a skilltree's JSON.Helpers forUpgradeParserimplementations.Declarative description of a skill's upgrade JSON fields, registered alongside theUpgradeParserand shipped to the web editor as skill metadata.Collects the fields a skill's upgrade JSON declares.One upgrade field: name (the exact JSON key the parser reads), type, and display hints.The kinds of field a skill's upgrade JSON can declare.