pub struct UnitDef {
pub unit_type: UnitType,
pub health: u64,
pub attack: u64,
pub armor: u64,
pub attack_range: u64,
pub specials: BTreeMap<u64, Special>,
pub multiple_moves_threshold: u64,
pub infinite_range_threshold: u64,
pub unobstructed_sight_threshold: u64,
}Expand description
Defines the base stats and specials of a specific unit type.
Fields§
§unit_type: UnitType§health: u64§attack: u64§armor: u64§attack_range: u64§specials: BTreeMap<u64, Special>Contains the special definitions for this unit type, with the key being the minimum number of units of this type needed to activate the corresponding special.
multiple_moves_threshold: u64The minimum number of JEDI units required for activating their
‘double movement’ feature. Should be ignored for other unit types.
infinite_range_threshold: u64The minimum number of SITH units required for activating their
infinite attack range feature. Should be ignored for other unit types.
unobstructed_sight_threshold: u64The minimum number of SITH units required for activating their
‘unobstructed sight’ feature. Should be ignored for other unit types.
Implementations§
Trait Implementations§
impl StructuralPartialEq for UnitDef
Auto Trait Implementations§
impl Freeze for UnitDef
impl RefUnwindSafe for UnitDef
impl Send for UnitDef
impl Sync for UnitDef
impl Unpin for UnitDef
impl UnwindSafe for UnitDef
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