pub enum LawEffect {
Show 14 variants
ThisAttackDamageBonus,
NextAttackDamageBonus,
NextAttackSplash,
ReduceLongestCooldown,
ReduceAllCooldowns,
ReadyShortestCooldown,
HealPercentMaxHp,
DamageBuff,
AttackSpeedBuff,
DamageReduction,
AoeDerivedDamage,
NextSkillPayloadBonus,
NextSkillEcho,
ReduceShortestCooldown,
}Expand description
What a law does when it fires. One action, one number
(LawTemplate::effect_value) plus an optional duration.
ThisAttackDamageBonus— the strike that triggered the law deals+value%damage.NextAttackDamageBonus— the owner’s next Basic Attack deals+value%.NextAttackSplash— the owner’s next Basic Attack additionally strikes every OTHER living enemy forvalue%of Attack.ReduceLongestCooldown— the largest remaining skill cooldown drops byvalueticks.ReduceAllCooldowns— every remaining skill cooldown drops byvalueticks.ReadyShortestCooldown— the skill with the smallest remaining cooldown becomes ready now (valueunused).HealPercentMaxHp— restorevalue%of max HP.DamageBuff—+value%damage foreffect_duration_ticks.AttackSpeedBuff—+value%Basic Attack speed foreffect_duration_ticks.DamageReduction—-value%incoming damage foreffect_duration_ticks.AoeDerivedDamage— derived damage worthvalue%of Attack to every living enemy.NextSkillPayloadBonus— the owner’s next original Skill deals+value%.NextSkillEcho— the owner’s next original Skill echoes: its target additionally takesvalue%of Attack as derived damage.
IMPLEMENTER’S NOTE on NextSkillEcho (FL-06, FL-12). The catalog words
it “the next original Skill gets a derived repeat at value%”. A fractional
re-cast is not expressible on this branch: ability scripts take a level, not
a power scalar, so a “40% repeat” would have to be either a full second cast
or nothing. The echo is the honest form of the same beat — a derived,
non-Core strike worth value% of Attack landing with the skill — and it
keeps the anti-loop trivial, because nothing re-enters the cast path. When
abilities grow a power scalar this becomes a real scaled repeat without a
content change.
Variants§
ThisAttackDamageBonus
NextAttackDamageBonus
NextAttackSplash
ReduceLongestCooldown
ReduceAllCooldowns
ReadyShortestCooldown
HealPercentMaxHp
DamageBuff
AttackSpeedBuff
DamageReduction
AoeDerivedDamage
NextSkillPayloadBonus
NextSkillEcho
ReduceShortestCooldown
BAL-029 Open with Magic: cuts the SHORTEST remaining Skill cooldown
by effect_value ticks, capped at ready. New variants append at the
tail.
Implementations§
Trait Implementations§
Source§impl<'de> Deserialize<'de> for LawEffect
impl<'de> Deserialize<'de> for LawEffect
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>,
Source§impl FromWasmAbi for LawEffectwhere
Self: DeserializeOwned,
impl FromWasmAbi for LawEffectwhere
Self: DeserializeOwned,
Source§impl IntoWasmAbi for LawEffect
impl IntoWasmAbi for LawEffect
Source§impl JsonSchema for LawEffect
impl JsonSchema for LawEffect
Source§fn schema_name() -> String
fn schema_name() -> String
Source§fn schema_id() -> Cow<'static, str>
fn schema_id() -> Cow<'static, str>
Source§fn json_schema(generator: &mut SchemaGenerator) -> Schema
fn json_schema(generator: &mut SchemaGenerator) -> Schema
§fn is_referenceable() -> bool
fn is_referenceable() -> bool
$ref keyword. Read moreSource§impl OptionFromWasmAbi for LawEffectwhere
Self: DeserializeOwned,
impl OptionFromWasmAbi for LawEffectwhere
Self: DeserializeOwned,
Source§impl OptionIntoWasmAbi for LawEffect
impl OptionIntoWasmAbi for LawEffect
Source§impl RefFromWasmAbi for LawEffectwhere
Self: DeserializeOwned,
impl RefFromWasmAbi for LawEffectwhere
Self: DeserializeOwned,
Source§type Abi = <JsType as RefFromWasmAbi>::Abi
type Abi = <JsType as RefFromWasmAbi>::Abi
Self are recovered from.Source§impl Tsify for LawEffect
impl Tsify for LawEffect
const DECL: &'static str = "/**\n * What a law does when it fires. One action, one number\n * ([`LawTemplate::effect_value`]) plus an optional duration.\n *\n * * `ThisAttackDamageBonus` \u{2014} the strike that triggered the law deals\n * `+value%` damage.\n * * `NextAttackDamageBonus` \u{2014} the owner\\\'s next Basic Attack deals `+value%`.\n * * `NextAttackSplash` \u{2014} the owner\\\'s next Basic Attack additionally strikes\n * every OTHER living enemy for `value%` of Attack.\n * * `ReduceLongestCooldown` \u{2014} the largest remaining skill cooldown drops by\n * `value` ticks.\n * * `ReduceAllCooldowns` \u{2014} every remaining skill cooldown drops by `value`\n * ticks.\n * * `ReadyShortestCooldown` \u{2014} the skill with the smallest remaining cooldown\n * becomes ready now (`value` unused).\n * * `HealPercentMaxHp` \u{2014} restore `value%` of max HP.\n * * `DamageBuff` \u{2014} `+value%` damage for `effect_duration_ticks`.\n * * `AttackSpeedBuff` \u{2014} `+value%` Basic Attack speed for\n * `effect_duration_ticks`.\n * * `DamageReduction` \u{2014} `-value%` incoming damage for\n * `effect_duration_ticks`.\n * * `AoeDerivedDamage` \u{2014} derived damage worth `value%` of Attack to every\n * living enemy.\n * * `NextSkillPayloadBonus` \u{2014} the owner\\\'s next original Skill deals\n * `+value%`.\n * * `NextSkillEcho` \u{2014} the owner\\\'s next original Skill echoes: its target\n * additionally takes `value%` of Attack as derived damage.\n *\n * IMPLEMENTER\\\'S NOTE on `NextSkillEcho` (`FL-06`, `FL-12`). The catalog words\n * it \\\"the next original Skill gets a derived repeat at `value%`\\\". A fractional\n * re-cast is not expressible on this branch: ability scripts take a level, not\n * a power scalar, so a \\\"40% repeat\\\" would have to be either a full second cast\n * or nothing. The echo is the honest form of the same beat \u{2014} a derived,\n * non-Core strike worth `value%` of Attack landing with the skill \u{2014} and it\n * keeps the anti-loop trivial, because nothing re-enters the cast path. When\n * abilities grow a power scalar this becomes a real scaled repeat without a\n * content change.\n */\nexport type LawEffect = \"ThisAttackDamageBonus\" | \"NextAttackDamageBonus\" | \"NextAttackSplash\" | \"ReduceLongestCooldown\" | \"ReduceAllCooldowns\" | \"ReadyShortestCooldown\" | \"HealPercentMaxHp\" | \"DamageBuff\" | \"AttackSpeedBuff\" | \"DamageReduction\" | \"AoeDerivedDamage\" | \"NextSkillPayloadBonus\" | \"NextSkillEcho\" | \"ReduceShortestCooldown\";"
const SERIALIZATION_CONFIG: SerializationConfig
type JsType = JsType
fn into_js(&self) -> Result<Self::JsType, Error>where
Self: Serialize,
fn from_js<T>(js: T) -> Result<Self, Error>
Source§impl VectorFromWasmAbi for LawEffectwhere
Self: DeserializeOwned,
impl VectorFromWasmAbi for LawEffectwhere
Self: DeserializeOwned,
type Abi = <JsType as VectorFromWasmAbi>::Abi
unsafe fn vector_from_abi(js: Self::Abi) -> Box<[Self]>
Source§impl VectorIntoWasmAbi for LawEffect
impl VectorIntoWasmAbi for LawEffect
type Abi = <JsType as VectorIntoWasmAbi>::Abi
fn vector_into_abi(vector: Box<[Self]>) -> Self::Abi
impl Copy for LawEffect
impl Eq for LawEffect
impl StructuralPartialEq for LawEffect
Auto Trait Implementations§
impl Freeze for LawEffect
impl RefUnwindSafe for LawEffect
impl Send for LawEffect
impl Sync for LawEffect
impl Unpin for LawEffect
impl UnwindSafe for LawEffect
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<T> FutureExt for T
impl<T> FutureExt for T
§fn with_context(self, otel_cx: Context) -> WithContext<Self>
fn with_context(self, otel_cx: Context) -> WithContext<Self>
§fn with_current_context(self) -> WithContext<Self>
fn with_current_context(self) -> WithContext<Self>
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> ReturnWasmAbi for Twhere
T: IntoWasmAbi,
impl<T> ReturnWasmAbi for Twhere
T: IntoWasmAbi,
Source§type Abi = <T as IntoWasmAbi>::Abi
type Abi = <T as IntoWasmAbi>::Abi
IntoWasmAbi::AbiSource§fn return_abi(self) -> <T as ReturnWasmAbi>::Abi
fn return_abi(self) -> <T as ReturnWasmAbi>::Abi
IntoWasmAbi::into_abi, except that it may throw and never
return in the case of Err.