Struct rpg::character::Character [] [src]

pub struct Character { /* fields omitted */ }

The character the player is impersonating

Methods

impl Character
[src]

Creates a new instance of Character

Updates the given attribute

Calculates and returns the current attack damage of the character based on the attibutes

Returns the value of the specified attribute

A setter method for the head armor slot. Panics whether the given item is not of type ItemType::ArmorHead

A setter method for the chest armor slot. Panics whether the given item is not of type ItemType::ArmorChest

A setter method for the legs armor slot. Panics whether the given item is not of type ItemType::ArmorLegs

A setter method for the feet armor slot. Panics whether the given item is not of type ItemType::ArmorFeet

A setter method for the right weapon slot

A setter method for the left weapon slot

Returns the default attributes for a character