pub struct Ability {Show 18 fields
pub id: u32,
pub name: String,
pub description: String,
pub tags: Vec<AbilityTag>,
pub effects: Vec<AbilityEffect>,
pub cooldown: f32,
pub cast_time: f32,
pub channel_time: f32,
pub resource_cost: Vec<(ResourceType, f32)>,
pub range: f32,
pub radius: f32,
pub level: u32,
pub max_level: u32,
pub glyph: char,
pub rank_bonuses: Vec<RankBonus>,
pub combo_points_generated: u32,
pub combo_points_consumed: Option<u32>,
pub interrupt_flags: InterruptFlags,
}Fields§
§id: u32§name: String§description: String§effects: Vec<AbilityEffect>§cooldown: f32§cast_time: f32§channel_time: f32§resource_cost: Vec<(ResourceType, f32)>§range: f32§radius: f32§level: u32§max_level: u32§glyph: char§rank_bonuses: Vec<RankBonus>§combo_points_generated: u32§combo_points_consumed: Option<u32>§interrupt_flags: InterruptFlagsImplementations§
Source§impl Ability
impl Ability
pub fn new(id: u32, name: impl Into<String>) -> Self
pub fn with_description(self, d: impl Into<String>) -> Self
pub fn with_cooldown(self, cd: f32) -> Self
pub fn with_cast_time(self, ct: f32) -> Self
pub fn with_cost(self, resource: ResourceType, amount: f32) -> Self
pub fn with_range(self, r: f32) -> Self
pub fn with_radius(self, r: f32) -> Self
pub fn with_tag(self, tag: AbilityTag) -> Self
pub fn with_effect(self, eff: AbilityEffect) -> Self
pub fn with_glyph(self, g: char) -> Self
pub fn has_tag(&self, tag: AbilityTag) -> bool
pub fn is_instant(&self) -> bool
pub fn scaled_damage(&self, base_attack: f32) -> f32
pub fn tooltip(&self) -> Vec<String>
pub fn fireball() -> Self
pub fn blink() -> Self
pub fn void_strike() -> Self
pub fn temporal_freeze() -> Self
pub fn entropy_cascade() -> Self
pub fn iron_skin() -> Self
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Ability
impl RefUnwindSafe for Ability
impl Send for Ability
impl Sync for Ability
impl Unpin for Ability
impl UnsafeUnpin for Ability
impl UnwindSafe for Ability
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
Source§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Convert
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can
then be further downcast into Box<ConcreteType> where ConcreteType implements Trait.Source§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Convert
Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be
further downcast into Rc<ConcreteType> where ConcreteType implements Trait.Source§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
Convert
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.Source§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
Convert
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.