Creature
One Voxelmon: wild, a player's companion, or kept in a player's team.
Every creature has a lasting id. A wild one exists only while it is in the world, and a player's is saved with that player. Spawning, changing and removing creatures needs creatures.
A handle to something in the game. Once that thing is gone, its calls fail with Gone. You get one from world.creatures_near(...), a team, and events.
Methods
| Method | Description |
|---|---|
fn id(&self) -> Result<CreatureId>long id() | Its lasting ID. |
fn species(&self) -> Result<Species>Species species() | Its species. |
fn level(&self) -> Result<i64>long level() | Its level. |
fn experience(&self) -> Result<i64>long experience() | Experience toward its next level. |
fn health(&self) -> Result<f64>double health() | Its health now. |
fn max_health(&self) -> Result<f64>double maxHealth() | Its most health. |
fn size(&self) -> Result<Size>Size size() | How large it is. |
fn moves(&self) -> Result<Vec<Move>>List<Move> moves() | The moves it knows (up to four). |
fn stats(&self) -> Result<Stats>Stats stats() | Its battle stats at its level. |
fn status(&self) -> Result<Status>Status status() | A status it suffers in battle. |
fn owner(&self) -> Result<Option<PlayerId>>Optional<String> owner() | Its player, if it is someone's. |
fn state(&self) -> Result<CreatureState>CreatureState state() | Where it is. |
fn position(&self) -> Result<Option<Place>>Optional<Place> position() | Where it is, if in the world. |
fn set_level(&self, level: i64) -> Result<()>void setLevel(long level) creatures | Sets its level (its stats follow). |
fn add_experience(&self, amount: i64) -> Result<()>void addExperience(long amount) creatures | Gives experience (it may level up and evolve). |
fn heal(&self, amount: f64) -> Result<()>void heal(double amount) | Gives back health. |
fn heal_fully(&self) -> Result<()>void healFully() | Health, moves and status restored, as at a clinic. |
fn damage(&self, amount: f64) -> Result<()>void damage(double amount) | Hurts it. |
fn teach(&self, r#move: Move, slot: i64) -> Result<()>void teach(Move move, long slot) creatures | Teaches a move in place of the one in that slot (0 to 3). |
fn teleport(&self, place: Place) -> Result<()>void teleport(Place place) creatures | Moves it, if in the world. |
fn rile(&self, player: Player) -> Result<()>void rile(Player player) | Turns a wild one on a player for a while. |
fn give_to(&self, player: Player) -> Result<bool>boolean giveTo(Player player) creatures | Makes a wild one theirs, as if caught; false if their team is full. |
fn challenge(&self, player: Player) -> Result<Option<Battle>>Optional<Battle> challenge(Player player) | Starts a turn-based battle between a wild one and a player, in a turn-based world. |
fn remove(&self) -> Result<()>void remove() creatures | Takes a wild one out of the world. |
Stats
A creature's battle stats.
Plain data, copied between the server and the plugin.
| Field | Description |
|---|---|
health: i64long health() | Most health. |
attack: i64long attack() | Attack. |
defense: i64long defense() | Defense. |
speed: i64long speed() | Battle speed: who moves first. |
Size
How large a creature is drawn.
One of a fixed set of values.
| Value | Meaning |
|---|---|
Size::MicroscopicSize.MICROSCOPIC | Microscopic. |
Size::TinySize.TINY | Tiny. |
Size::PetiteSize.PETITE | Petite. |
Size::SmallSize.SMALL | Small. |
Size::AverageSize.AVERAGE | Average. |
Size::LargeSize.LARGE | Large. |
Size::HugeSize.HUGE | Huge. |
Size::GiganticSize.GIGANTIC | Gigantic. |
Size::ColossalSize.COLOSSAL | Colossal. |
Size::VoxelordSize.VOXELORD | A town's Voxelord. |
Status
A battle status.
One of a fixed set of values.
| Value | Meaning |
|---|---|
Status::HealthyStatus.HEALTHY | None. |
Status::BurnStatus.BURN | Burned. |
Status::PoisonStatus.POISON | Poisoned. |
Status::FrostStatus.FROST | Frozen. |
Status::ParalysisStatus.PARALYSIS | Paralysed. |
Status::SleepStatus.SLEEP | Asleep. |
CreatureState
Where a creature is.
One of a fixed set of values.
| Value | Meaning |
|---|---|
CreatureState::WildCreatureState.WILD | Wild, in the world. |
CreatureState::OutCreatureState.OUT | A player's companion, out of its cube. |
CreatureState::InCubeCreatureState.IN_CUBE | In a cube on its player's belt. |
CreatureState::StoredCreatureState.STORED | In its player's storage. |
CreatureState::InBattleCreatureState.IN_BATTLE | In a battle. |
Events
Related events: CreatureSpawning, CreatureSpawned, CreatureDamaging, CreatureBeaten, CaptureAttempt, CreatureCaptured, CreatureLevelledUp, CreatureEvolving, CreatureEvolved, CompanionSentOut, CompanionRecalled, CreaturePetted.