[][src]Struct dsa::Hero

pub struct Hero {
    pub name: String,
    pub health: isize,
    pub stamina: isize,
    pub astral: isize,
    pub qualities: HashMap<Quality, isize>,
    pub skills: HashMap<String, (isize, [Quality; 3])>,
}

Public container for the hero attributes.

The fields themselves are documented below. All fields are public to allow for easy data access. Hero implements std::str::FromStr so parse() can be called on a str containing the xml export of the Heldensoftware.

Examples

use dsa::Hero;

let hero = "<helden>…</helden>".parse::<Hero>();
assert!(hero.is_err());

Fields

name: String

Hero's name, e.g. Elvenor Elvington

health: isize

Maximum health as per base+(KO+KO+KK)/2

stamina: isize

Maximum stamina as per base+(MU+KO+GE)/2

astral: isize

Maximum astral points as per base+(MU+IN+CH)/2

qualities: HashMap<Quality, isize>

The basic attributes (MU, KL, etc.)

skills: HashMap<String, (isize, [Quality; 3])>

All skills documented in the xml, as a map of name to skill-level and attributes to roll on

Trait Implementations

impl Clone for Hero[src]

impl Debug for Hero[src]

impl Default for Hero[src]

impl FromStr for Hero[src]

type Err = Error

The associated error which can be returned from parsing.

Auto Trait Implementations

impl RefUnwindSafe for Hero

impl Send for Hero

impl Sync for Hero

impl Unpin for Hero

impl UnwindSafe for Hero

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<V, T> VZip<V> for T where
    V: MultiLane<T>, 
[src]