pub struct BridgeCharge {
pub real_law_id: LawTemplateId,
pub fantasy_law_id: LawTemplateId,
pub toward_fantasy: i64,
pub toward_real: i64,
pub delivered_to_real: i64,
pub delivered_to_fantasy: i64,
}Expand description
One live bridge of ONE combatant, with its two independent charges, in
hundredths of a unit (CHARGE_SCALE).
toward_* is the charge being FILLED by the law on the opposite side while
that side is up; delivered_to_* is what a law received at the last flip
and is what amplifies it for the whole current phase.
Fields§
§real_law_id: LawTemplateId§fantasy_law_id: LawTemplateId§toward_fantasy: i64Resonance put in by the Real law, waiting for the flip that hands it to the Fantasy law.
toward_real: i64Resonance put in by the Fantasy law, waiting for the Real law.
delivered_to_real: i64Units delivered to the Real law at the last flip.
delivered_to_fantasy: i64Units delivered to the Fantasy law at the last flip.
Implementations§
Source§impl BridgeCharge
impl BridgeCharge
pub fn new(real_law_id: LawTemplateId, fantasy_law_id: LawTemplateId) -> Self
pub fn contains(&self, law_id: LawTemplateId) -> bool
Sourcepub fn other_end(&self, law_id: LawTemplateId) -> Option<LawTemplateId>
pub fn other_end(&self, law_id: LawTemplateId) -> Option<LawTemplateId>
The far end of this bridge for law_id, or None when law_id is not
part of it.
Sourcepub fn side_of(&self, law_id: LawTemplateId) -> Option<WorldSide>
pub fn side_of(&self, law_id: LawTemplateId) -> Option<WorldSide>
Which side of this bridge law_id sits on.
Trait Implementations§
Source§impl Clone for BridgeCharge
impl Clone for BridgeCharge
Source§fn clone(&self) -> BridgeCharge
fn clone(&self) -> BridgeCharge
Returns a copy of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for BridgeCharge
impl Debug for BridgeCharge
Source§impl PartialEq for BridgeCharge
impl PartialEq for BridgeCharge
impl Eq for BridgeCharge
impl StructuralPartialEq for BridgeCharge
Auto Trait Implementations§
impl Freeze for BridgeCharge
impl RefUnwindSafe for BridgeCharge
impl Send for BridgeCharge
impl Sync for BridgeCharge
impl Unpin for BridgeCharge
impl UnwindSafe for BridgeCharge
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