This commit is contained in:
@@ -86,7 +86,7 @@ pub struct Pokemon {
|
||||
ability_index: AbilityIndex,
|
||||
/// An ability can be overriden to an arbitrary ability. This is for example used for the Mummy
|
||||
/// ability.
|
||||
override_ability: Option<Ability>,
|
||||
override_ability: Option<Arc<dyn Ability>>,
|
||||
|
||||
/// If in battle, we have additional data.
|
||||
battle_data: RwLock<Option<PokemonBattleData>>,
|
||||
@@ -416,7 +416,7 @@ impl Pokemon {
|
||||
self.override_ability.is_some()
|
||||
}
|
||||
/// Returns the currently active ability.
|
||||
pub fn active_ability(&self) -> &Ability {
|
||||
pub fn active_ability(&self) -> &Arc<dyn Ability> {
|
||||
if let Some(v) = &self.override_ability {
|
||||
return v;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user