pub struct Fortress {
Show 21 fields pub buildings: [FortressBuilding; 12], pub units: [FortressUnit; 3], pub resources: [FortessRessource; 3], pub building_max_lvl: u8, pub wall_combat_lvl: u16, pub time_stamp: Option<DateTime<Local>>, pub building_upgrade: Option<FortressBuildingType>, pub building_upgrade_finish: Option<DateTime<Local>>, pub building_upgrade_began: Option<DateTime<Local>>, pub level: u16, pub honor: u32, pub rank: u32, pub gem_stone_target: Option<GemType>, pub gem_search_finish: Option<DateTime<Local>>, pub gem_search_began: Option<DateTime<Local>>, pub gem_search_cost: FortressCost, pub attack_target: Option<PlayerId>, pub attack_free_reroll: Option<DateTime<Local>>, pub opponent_reroll_price: u64, pub quarry_next_level_production: u64, pub woodcutter_next_level_production: u64, /* private fields */
}

Fields§

§buildings: [FortressBuilding; 12]§units: [FortressUnit; 3]§resources: [FortessRessource; 3]§building_max_lvl: u8

The highest level buildings can be upgraded to

§wall_combat_lvl: u16§time_stamp: Option<DateTime<Local>>

This seems to be the last time resources were collected, but this also seems to get set by something else

§building_upgrade: Option<FortressBuildingType>

The building, that is currently being upgraded

§building_upgrade_finish: Option<DateTime<Local>>

The time at which the upgrade is finished

§building_upgrade_began: Option<DateTime<Local>>§level: u16

The level visible on the HOF screen for fortress. Should be all building levels summed up

§honor: u32§rank: u32§gem_stone_target: Option<GemType>§gem_search_finish: Option<DateTime<Local>>§gem_search_began: Option<DateTime<Local>>§gem_search_cost: FortressCost§attack_target: Option<PlayerId>

The next enemy you can choose to battle. This should always be Some(), but there is the edgecase of being the first player on a server to get a fortress, which I can not even test for, so I just assume this could be none then.

§attack_free_reroll: Option<DateTime<Local>>

The time at which switching is free again

§opponent_reroll_price: u64

The price in silver rerolling costs

§quarry_next_level_production: u64

The amount of stone the quarry produces on the next level per hour

§woodcutter_next_level_production: u64

The amount of wood the woodcutter produces on the next level per hour

Implementations§

Trait Implementations§

source§

impl Clone for Fortress

source§

fn clone(&self) -> Fortress

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for Fortress

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl Default for Fortress

source§

fn default() -> Fortress

Returns the “default value” for a type. Read more
source§

impl<'de> Deserialize<'de> for Fortress

source§

fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>
where __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
source§

impl Serialize for Fortress

source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
source§

impl<T, U> Into<U> for T
where U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T> Same for T

§

type Output = T

Should always be Self
source§

impl<T> ToOwned for T
where T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a [WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a [WithDispatch] wrapper. Read more
source§

impl<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,