[−][src]Trait weasel::actor::Actor
A trait for objects which possess abilities and can act during a turn.
Required methods
fn abilities<'a>(&'a self) -> Box<dyn Iterator<Item = &'a Ability<R>> + 'a>
Returns an iterator over abilities.
fn abilities_mut<'a>(
&'a mut self
) -> Box<dyn Iterator<Item = &'a mut Ability<R>> + 'a>
&'a mut self
) -> Box<dyn Iterator<Item = &'a mut Ability<R>> + 'a>
Returns a mutable iterator over abilities.
fn ability(&self, id: &AbilityId<R>) -> Option<&Ability<R>>
Returns the ability with the given id.
fn ability_mut(&mut self, id: &AbilityId<R>) -> Option<&mut Ability<R>>
Returns a mutable reference to the ability with the given id.
fn add_ability(&mut self, ability: Ability<R>) -> Option<Ability<R>>
Adds a new ability. Replaces an existing ability with the same id. Returns the replaced ability, if present.
fn remove_ability(&mut self, id: &AbilityId<R>) -> Option<Ability<R>>
Removes an ability. Returns the removed ability, if present.
fn team_id(&self) -> &TeamId<R>
Returns the id of the team to which this actor belongs.
Implementors
impl<R: BattleRules> Actor<R> for Creature<R>
[src]
fn abilities<'a>(&'a self) -> Box<dyn Iterator<Item = &'a Ability<R>> + 'a>
[src]
fn abilities_mut<'a>(
&'a mut self
) -> Box<dyn Iterator<Item = &'a mut Ability<R>> + 'a>
[src]
&'a mut self
) -> Box<dyn Iterator<Item = &'a mut Ability<R>> + 'a>