[][src]Struct genie_dat::CombatUnitType

pub struct CombatUnitType {
    pub costs: ArrayVec<[AttributeCost; 3]>,
    pub create_time: u16,
    pub create_at_building: Option<UnitTypeID>,
    pub create_button: i8,
    pub rear_attack_modifier: f32,
    pub flank_attack_modifier: f32,
    pub hero_flag: u8,
    pub garrison_sprite: Option<SpriteID>,
    pub volley_fire_amount: f32,
    pub max_attacks_in_volley: i8,
    pub volley_spread: (f32, f32),
    pub volley_start_spread_adjustment: f32,
    pub volley_missile: Option<UnitTypeID>,
    pub special_attack_sprite: Option<SpriteID>,
    pub special_attack_flag: i8,
    pub displayed_pierce_armor: i16,
    // some fields omitted
}

Fields

costs: ArrayVec<[AttributeCost; 3]>

The costs of creating a unit of this type.

create_time: u16create_at_building: Option<UnitTypeID>

Unit type ID of the building or unit where this unit can be created.

create_button: i8

Button location index where the button to create this unit should be shown when a create_at_building unit is selected.

rear_attack_modifier: f32flank_attack_modifier: f32hero_flag: u8

Is this unit a hero unit?

TODO what is special about hero units? Does it just opt into the healing behaviour?

garrison_sprite: Option<SpriteID>volley_fire_amount: f32max_attacks_in_volley: i8volley_spread: (f32, f32)volley_start_spread_adjustment: f32volley_missile: Option<UnitTypeID>special_attack_sprite: Option<SpriteID>special_attack_flag: i8displayed_pierce_armor: i16

Implementations

impl CombatUnitType[src]

pub fn read_from(input: impl Read, version: f32) -> Result<Self>[src]

Read this unit type from an input stream.

pub fn write_to(&self, output: impl Write, version: f32) -> Result<()>[src]

Write this unit type to an output stream.

Methods from Deref<Target = BaseCombatUnitType>

pub fn write_to(&self, output: impl Write, version: f32) -> Result<()>[src]

Write this unit type to an output stream.

Trait Implementations

impl Clone for CombatUnitType[src]

impl Debug for CombatUnitType[src]

impl Default for CombatUnitType[src]

impl Deref for CombatUnitType[src]

type Target = BaseCombatUnitType

The resulting type after dereferencing.

impl From<CombatUnitType> for UnitType[src]

Auto Trait Implementations

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.