pub enum Op {
AddPercent,
MulFactor,
FlatAdd,
CostMul,
SpawnRateMul,
EffectMul,
}Expand description
What math the primitive performs. Sign of magnitude decides boon vs
bane: a MulFactor with magnitude < 1.0 is a debuff, > 1.0 a buff.
Variants§
AddPercent
Add to the additive percent on the target (target’s add_percent
gains magnitude). 0.10 = +10%.
MulFactor
Multiply the multiplicative factor on the target. 2.0 = ×2,
0.5 = ÷2.
FlatAdd
Add to the flat FPS contribution on the target.
CostMul
Multiply the COST of buying a fingerer (< 1.0 is a discount,
> 1.0 is inflation). Only meaningful when target is a fingerer.
SpawnRateMul
Scale the inter-arrival cooldown of a powerup kind. < 1.0 =
spawns more often, > 1.0 = rarer. Only meaningful when target is
a PowerupSpawn(kind).
EffectMul
Scale the reward / duration of a powerup-related effect. Used with
Target::PowerupReward(kind) and Target::PowerupDuration(kind).
Trait Implementations§
impl Copy for Op
impl StructuralPartialEq for Op
Auto Trait Implementations§
impl Freeze for Op
impl RefUnwindSafe for Op
impl Send for Op
impl Sync for Op
impl Unpin for Op
impl UnsafeUnpin for Op
impl UnwindSafe for Op
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<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