diff --git a/mona_core/src/weapon/weapon_config.rs b/mona_core/src/weapon/weapon_config.rs index 1eb82967..9aca0ae2 100644 --- a/mona_core/src/weapon/weapon_config.rs +++ b/mona_core/src/weapon/weapon_config.rs @@ -22,7 +22,7 @@ pub enum WeaponConfig { CursedBlade { rate: f64 }, SapwoodBlade { rate: f64 }, XiphosMoonlight { rate: f64 }, - KeyOfKhajNisut { stack: f64 }, + KeyOfKhajNisut { stack: f64, rate: f64 }, ToukabouShigure { rate: f64 }, LightOfFoliarIncision { rate: f64 }, WolfFang { e_stack: f64, q_stack: f64 }, diff --git a/mona_core/src/weapon/weapons/swords/key_of_khaj_nisut.rs b/mona_core/src/weapon/weapons/swords/key_of_khaj_nisut.rs index 8b75e470..5e56136a 100644 --- a/mona_core/src/weapon/weapons/swords/key_of_khaj_nisut.rs +++ b/mona_core/src/weapon/weapons/swords/key_of_khaj_nisut.rs @@ -12,6 +12,7 @@ use crate::weapon::weapon_sub_stat::WeaponSubStatFamily; pub struct KeyOfKhajNisutEffect { pub stack: f64, + pub rate: f64, } impl WeaponEffect for KeyOfKhajNisutEffect { @@ -26,6 +27,15 @@ impl WeaponEffect for KeyOfKhajNisutEffect { Box::new(move |hp, _, grad| (em_bonus, 0.0)), "圣显之钥被动等效" ); + + let em_bonus2 = (0.0005 * refine + 0.0015) * self.rate; + attribute.add_edge1( + AttributeName::HP, + AttributeName::ElementalMasteryExtra, + Box::new(move |hp, _| hp * em_bonus2), + Box::new(move |hp, _, grad| (0.0, 0.0)), + "圣显之钥被动等效" + ); } } @@ -57,11 +67,11 @@ impl WeaponTrait for KeyOfKhajNisut { ]); fn get_effect(character: &CharacterCommonData, config: &WeaponConfig) -> Option>> { - let stack = match *config { - WeaponConfig::KeyOfKhajNisut { stack } => stack, - _ => 0.0 + let (stack, rate) = match *config { + WeaponConfig::KeyOfKhajNisut { stack, rate } => (stack, rate), + _ => (0.0, 0.0) }; - Some(Box::new(KeyOfKhajNisutEffect { stack })) + Some(Box::new(KeyOfKhajNisutEffect { stack, rate })) } }