pub struct WeaponEnergyCost { /* private fields */ }
Implementations
sourceimpl WeaponEnergyCost
impl WeaponEnergyCost
pub fn from_reader(
connector: &Arc<Connector>,
reader: &mut dyn BinaryReader
) -> Result<WeaponEnergyCost, Error>
pub fn calculate_energy_usage(
&self,
value: f32,
energy: &mut f32,
particles: &mut f32,
ions: &mut f32,
controllable: &dyn Controllable
) -> Result<bool, Error>
pub fn calculate_energy_usage_for_pos(
&self,
pos: &Vector,
load: f32,
time: f32,
damage_hull: f32,
damage_shield: f32,
damage_energy: f32,
energy: &mut f32,
particles: &mut f32,
ions: &mut f32,
controllable: &dyn Controllable
) -> Result<bool, Error>
pub fn calculate_energy_usage_for_len(
&self,
len: f32,
load: f32,
time: f32,
damage_hull: f32,
damage_shield: f32,
damage_energy: f32,
energy: &mut f32,
particles: &mut f32,
ions: &mut f32,
controllable: &dyn Controllable
) -> Result<bool, Error>
sourcepub fn load(&self) -> &EnergyCost
pub fn load(&self) -> &EnergyCost
The EnergyCost for the shots’ load
sourcepub fn speed(&self) -> &EnergyCost
pub fn speed(&self) -> &EnergyCost
The EnergyCost for the shots’ speed
sourcepub fn time(&self) -> &EnergyCost
pub fn time(&self) -> &EnergyCost
The EnergyCost for the shots’ time
sourcepub fn damage_hull(&self) -> &EnergyCost
pub fn damage_hull(&self) -> &EnergyCost
The EnergyCost for the shots’ hull damage
sourcepub fn damage_hull_crit(&self) -> f32
pub fn damage_hull_crit(&self) -> f32
-1 = No damage 0 = No critical damage 3 = 300% critical damage (= 400% total damage)
Returns the amount of additional damage if the chance of a critical strike succeeded
sourcepub fn damage_hull_crit_chance(&self) -> f32
pub fn damage_hull_crit_chance(&self) -> f32
0 = No chance 1 = 100% chance
Returns the chance for an critical strike
sourcepub fn damage_shield(&self) -> &EnergyCost
pub fn damage_shield(&self) -> &EnergyCost
The EnergyCost for the shots’ shield damage
sourcepub fn damage_shield_crit(&self) -> f32
pub fn damage_shield_crit(&self) -> f32
-1 = No damage 0 = No critical damage 3 = 300% critical damage (= 400% total damage)
Returns the amount of additional damage if the chance of a critical strike succeeded
sourcepub fn damage_shield_crit_chance(&self) -> f32
pub fn damage_shield_crit_chance(&self) -> f32
0 = No chance 1 = 100% chance
Returns the chance for critical strike
sourcepub fn damage_energy(&self) -> &EnergyCost
pub fn damage_energy(&self) -> &EnergyCost
The EnergyCost for the shots’ energy damage
sourcepub fn damage_energy_crit(&self) -> f32
pub fn damage_energy_crit(&self) -> f32
-1 = No damage 0 = No critical damage 3 = 300% critical damage (= 400% total damage)
Returns the amount of additional damage if the chance of a critical strike succeeded
sourcepub fn damage_energy_crit_chance(&self) -> f32
pub fn damage_energy_crit_chance(&self) -> f32
0 = No chance 1 = 100% chance
Returns the chance for a critical strike
Methods from Deref<Target = EnergyCost>
pub fn calculate_energy_usage(
&self,
value: f32,
energy: &mut f32,
particles: &mut f32,
ions: &mut f32,
controllable: &dyn Controllable
) -> Result<bool, Error>
pub fn cost_energy(&self, value: f32) -> f32
pub fn cost_energy_polynomial(&self) -> &Polynomial
pub fn cost_particles(&self, value: f32) -> f32
pub fn cost_particles_polynomial(&self) -> &Polynomial
pub fn cost_ions(&self, value: f32) -> f32
pub fn cost_ions_polynomial(&self) -> &Polynomial
pub fn extended_cost_energy(&self, value: f32) -> f32
pub fn extended_cost_energy_polynomial(&self) -> &Polynomial
pub fn extended_cost_particles(&self, value: f32) -> f32
pub fn extended_cost_particles_polynomial(&self) -> &Polynomial
pub fn extended_cost_ions(&self, value: f32) -> f32
pub fn extended_cost_ions_polynomial(&self) -> &Polynomial
pub fn limit(&self) -> f32
pub fn extended_limit(&self) -> f32
Trait Implementations
sourceimpl Clone for WeaponEnergyCost
impl Clone for WeaponEnergyCost
sourcefn clone(&self) -> WeaponEnergyCost
fn clone(&self) -> WeaponEnergyCost
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read more