pub enum ModifierSource {
GreenCoin,
PurpleCoin,
}Expand description
Stable identifier for the kind of buff or debuff a modifier represents. Used for de-duping in the UI (“3× Green Coin” instead of three identical chips), for save serialization, and for future per-source rules.
The string returned by Self::id is a load-bearing primary key —
renaming it silently invalidates every player’s saved progress on that
source. Treat it like a fingerer or upgrade id: cosmetic names live in
i18n.rs; the id stays stable forever.
Variants§
GreenCoin
Green Coin — rare powerup that attaches a permanent +10% AddPercent to a random owned fingerer.
PurpleCoin
Purple Coin — the existing Buff Golden, recast as a per-fingerer
modifier with a finite duration. Phase 3 of the Green Coin PR
absorbs Buff::FingererBoost into this source.
Implementations§
Trait Implementations§
Source§impl Clone for ModifierSource
impl Clone for ModifierSource
Source§fn clone(&self) -> ModifierSource
fn clone(&self) -> ModifierSource
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 ModifierSource
impl Debug for ModifierSource
Source§impl<'de> Deserialize<'de> for ModifierSource
impl<'de> Deserialize<'de> for ModifierSource
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
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 From<ModifierSourceV2> for ModifierSource
impl From<ModifierSourceV2> for ModifierSource
Source§fn from(s: ModifierSourceV2) -> Self
fn from(s: ModifierSourceV2) -> Self
Converts to this type from the input type.
Source§impl Hash for ModifierSource
impl Hash for ModifierSource
Source§impl PartialEq for ModifierSource
impl PartialEq for ModifierSource
Source§fn eq(&self, other: &ModifierSource) -> bool
fn eq(&self, other: &ModifierSource) -> bool
Tests for
self and other values to be equal, and is used by ==.Source§impl Serialize for ModifierSource
impl Serialize for ModifierSource
impl Copy for ModifierSource
impl Eq for ModifierSource
impl StructuralPartialEq for ModifierSource
Auto Trait Implementations§
impl Freeze for ModifierSource
impl RefUnwindSafe for ModifierSource
impl Send for ModifierSource
impl Sync for ModifierSource
impl Unpin for ModifierSource
impl UnsafeUnpin for ModifierSource
impl UnwindSafe for ModifierSource
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more