-
Notifications
You must be signed in to change notification settings - Fork 112
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
23 changed files
with
2,837 additions
and
2,270 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,57 @@ | ||
use crate::attribute::Attribute; | ||
use crate::character::character_common_data::CharacterCommonData; | ||
use crate::common::i18n::locale; | ||
use crate::common::item_config_type::{ItemConfig, ItemConfigType}; | ||
use crate::common::WeaponType; | ||
use crate::weapon::weapon_effect::WeaponEffect; | ||
use crate::weapon::weapon_static_data::WeaponStaticData; | ||
use crate::weapon::weapon_trait::WeaponTrait; | ||
use crate::weapon::{WeaponConfig, WeaponName}; | ||
use crate::weapon::weapon_base_atk::WeaponBaseATKFamily; | ||
use crate::weapon::weapon_sub_stat::WeaponSubStatFamily; | ||
use crate::weapon::weapons::prospectors_drill::ProspectorsDrillEffect; | ||
|
||
pub struct RangeGauge; | ||
|
||
impl WeaponTrait for RangeGauge { | ||
const META_DATA: WeaponStaticData = WeaponStaticData { | ||
name: WeaponName::RangeGauge, | ||
internal_name: "Bow_Mechanic", | ||
weapon_type: WeaponType::Bow, | ||
weapon_sub_stat: Some(WeaponSubStatFamily::ATK60), | ||
weapon_base: WeaponBaseATKFamily::ATK565, | ||
star: 4, | ||
#[cfg(not(target_family = "wasm"))] | ||
effect: Some(locale!( | ||
zh_cn: "受到治疗或进行治疗时,将赋予一枚团结标记,持续30秒,至多拥有三枚团结标记。施放元素战技或元素爆发时,将消耗所有的团结标记,产生持续10秒的「抗争」效果:每枚消耗的团结标记提高<span style=\"color: #409EFF;\">3%-4%-5%-6%-7%</span>攻击力与<span style=\"color: #409EFF;\">7%-8.5%-10%-11.5%-13%</span>所有元素伤害加成。每15秒至多触发一次抗争效果;角色处于队伍后台时也能获得团结标记。", | ||
en: "When the wielder is healed or heals others, they will gain a Unity's Symbol that lasts 30s, up to a maximum of 3 Symbols. When using their Elemental Skill or Burst, all Symbols will be consumed and the Struggle effect will be granted for 10s. For each Symbol consumed, gain <span style=\"color: #409EFF;\">3%-4%-5%-6%-7%</span> ATK and <span style=\"color: #409EFF;\">7%-8.5%-10%-11.5%-13%</span> All Elemental DMG Bonus. The Struggle effect can be triggered once every 15s, and Symbols can be gained even when the character is not on the field." | ||
)), | ||
#[cfg(not(target_family = "wasm"))] | ||
name_locale: locale!( | ||
zh_cn: "测距规", | ||
en: "Range Gauge" | ||
) | ||
}; | ||
|
||
#[cfg(not(target_family = "wasm"))] | ||
const CONFIG_DATA: Option<&'static [ItemConfig]> = Some(&[ | ||
ItemConfig { | ||
name: "stack", | ||
title: locale!( | ||
zh_cn: "团结标记数量", | ||
en: "Unity's Symbol Amount" | ||
), | ||
config: ItemConfigType::Float { min: 0.0, max: 3.0, default: 3.0 } | ||
} | ||
]); | ||
|
||
fn get_effect<A: Attribute>(character: &CharacterCommonData, config: &WeaponConfig) -> Option<Box<dyn WeaponEffect<A>>> { | ||
let stack = match *config { | ||
WeaponConfig::RangeGauge { stack } => stack, | ||
_ => 0.0 | ||
}; | ||
Some(Box::new(ProspectorsDrillEffect { | ||
stack | ||
})) | ||
} | ||
} |
63 changes: 63 additions & 0 deletions
63
mona_core/src/weapon/weapons/catalysts/ballad_of_the_boundless_blue.rs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,63 @@ | ||
use crate::attribute::{Attribute, AttributeName}; | ||
use crate::character::character_common_data::CharacterCommonData; | ||
use crate::common::i18n::locale; | ||
use crate::common::item_config_type::ItemConfig; | ||
use crate::common::WeaponType; | ||
use crate::weapon::weapon_common_data::WeaponCommonData; | ||
use crate::weapon::weapon_effect::WeaponEffect; | ||
use crate::weapon::weapon_static_data::WeaponStaticData; | ||
use crate::weapon::weapon_trait::WeaponTrait; | ||
use crate::weapon::{WeaponConfig, WeaponName}; | ||
use crate::weapon::weapon_base_atk::WeaponBaseATKFamily; | ||
use crate::weapon::weapon_sub_stat::WeaponSubStatFamily; | ||
|
||
pub struct BalladOfTheBoundlessBlueEffect { | ||
pub stack: f64, | ||
} | ||
|
||
impl<A: Attribute> WeaponEffect<A> for BalladOfTheBoundlessBlueEffect { | ||
fn apply(&self, data: &WeaponCommonData, attribute: &mut A) { | ||
let refine = data.refine as f64; | ||
|
||
attribute.set_value_by(AttributeName::BonusNormalAttack, "无垠蔚蓝之歌被动", (0.06 + 0.02 * refine) * self.stack); | ||
attribute.set_value_by(AttributeName::BonusChargedAttack, "无垠蔚蓝之歌被动", (0.045 + 0.015 * refine) * self.stack); | ||
} | ||
} | ||
|
||
pub struct BalladOfTheBoundlessBlue; | ||
|
||
impl WeaponTrait for BalladOfTheBoundlessBlue { | ||
const META_DATA: WeaponStaticData = WeaponStaticData { | ||
name: WeaponName::BalladOfTheBoundlessBlue, | ||
internal_name: "Catalyst_DandelionPoem", | ||
weapon_type: WeaponType::Catalyst, | ||
weapon_sub_stat: Some(WeaponSubStatFamily::Recharge67), | ||
weapon_base: WeaponBaseATKFamily::ATK565, | ||
star: 4, | ||
#[cfg(not(target_family = "wasm"))] | ||
effect: Some(locale!( | ||
zh_cn: "普通攻击或重击命中敌人后的6秒内,普通攻击造成的伤害提升<span style=\"color: #409EFF;\">8%-10%-12%-14%-16%</span>,重击造成的伤害提升<span style=\"color: #409EFF;\">6%-7.5%-9%-10.5%-12%</span>。该效果至多叠加3次,每0.3秒至多触发一次。", | ||
en: "Within 6s after Normal or Charged Attacks hit an opponent, Normal Attack DMG will be increased by <span style=\"color: #409EFF;\">8%-10%-12%-14%-16%</span> and Charged Attack DMG will be increased by <span style=\"color: #409EFF;\">6%-7.5%-9%-10.5%-12%</span>. Max 3 stacks. This effect can be triggered once every 0.3s." | ||
)), | ||
#[cfg(not(target_family = "wasm"))] | ||
name_locale: locale!( | ||
zh_cn: "无垠蔚蓝之歌", | ||
en: "Ballad of the Boundless Blue" | ||
) | ||
}; | ||
|
||
#[cfg(not(target_family = "wasm"))] | ||
const CONFIG_DATA: Option<&'static [ItemConfig]> = Some(&[ | ||
ItemConfig::STACK03 | ||
]); | ||
|
||
fn get_effect<A: Attribute>(character: &CharacterCommonData, config: &WeaponConfig) -> Option<Box<dyn WeaponEffect<A>>> { | ||
let stack = match *config { | ||
WeaponConfig::BalladOfTheBoundlessBlue { stack } => stack, | ||
_ => 0.0 | ||
}; | ||
Some(Box::new(BalladOfTheBoundlessBlueEffect { | ||
stack | ||
})) | ||
} | ||
} |
64 changes: 64 additions & 0 deletions
64
mona_core/src/weapon/weapons/catalysts/cashflow_supervision.rs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,64 @@ | ||
use crate::attribute::{Attribute, AttributeCommon, AttributeName}; | ||
use crate::character::character_common_data::CharacterCommonData; | ||
use crate::common::i18n::locale; | ||
use crate::common::item_config_type::ItemConfig; | ||
use crate::common::WeaponType; | ||
use crate::weapon::weapon_common_data::WeaponCommonData; | ||
use crate::weapon::weapon_effect::WeaponEffect; | ||
use crate::weapon::weapon_static_data::WeaponStaticData; | ||
use crate::weapon::weapon_trait::WeaponTrait; | ||
use crate::weapon::{WeaponConfig, WeaponName}; | ||
use crate::weapon::weapon_base_atk::WeaponBaseATKFamily; | ||
use crate::weapon::weapon_sub_stat::WeaponSubStatFamily; | ||
|
||
pub struct CashflowSupervisionEffect { | ||
pub stack: f64, | ||
} | ||
|
||
impl<A: Attribute> WeaponEffect<A> for CashflowSupervisionEffect { | ||
fn apply(&self, data: &WeaponCommonData, attribute: &mut A) { | ||
let refine = data.refine as f64; | ||
|
||
attribute.add_atk_percentage("金流监督被动", 0.12 + 0.04 * refine); | ||
attribute.set_value_by(AttributeName::BonusNormalAttack, "金流监督被动", (0.012 + 0.04 * refine) * self.stack); | ||
attribute.set_value_by(AttributeName::BonusChargedAttack, "金流监督被动", (0.105 + 0.035 * refine) * self.stack); | ||
} | ||
} | ||
|
||
pub struct CashflowSupervision; | ||
|
||
impl WeaponTrait for CashflowSupervision { | ||
const META_DATA: WeaponStaticData = WeaponStaticData { | ||
name: WeaponName::CashflowSupervision, | ||
internal_name: "Catalyst_Wheatley", | ||
weapon_type: WeaponType::Catalyst, | ||
weapon_sub_stat: Some(WeaponSubStatFamily::CriticalRate48), | ||
weapon_base: WeaponBaseATKFamily::ATK674, | ||
star: 5, | ||
#[cfg(not(target_family = "wasm"))] | ||
effect: Some(locale!( | ||
zh_cn: "攻击力提升<span style=\"color: #409EFF;\">16%-20%-24%-28%-32%</span>。当前生命值提升或降低时,普通攻击造成的伤害提升<span style=\"color: #409EFF;\">16%-20%-24%-28%-32%</span>,重击造成的伤害提升<span style=\"color: #409EFF;\">14%-17.5%-21%-24.5%-28%</span>。该效果持续4秒,至多叠加3层,每0.3秒至多触发一次;处于叠加3层的状态下时,攻击速度提升8%。", | ||
en: "ATK is increased by <span style=\"color: #409EFF;\">16%-20%-24%-28%-32%</span>. When current HP increases or decreases, Normal Attack DMG will be increased by <span style=\"color: #409EFF;\">16%-20%-24%-28%-32%</span> and Charged Attack DMG will be increased by <span style=\"color: #409EFF;\">14%-17.5%-21%-24.5%-28%</span> for 4s. Max 3 stacks. This effect can be triggered once every 0.3s. When the wielder has 3 stacks, ATK SPD will be increased by 8%." | ||
)), | ||
#[cfg(not(target_family = "wasm"))] | ||
name_locale: locale!( | ||
zh_cn: "金流监督", | ||
en: "Cashflow Supervision" | ||
) | ||
}; | ||
|
||
#[cfg(not(target_family = "wasm"))] | ||
const CONFIG_DATA: Option<&'static [ItemConfig]> = Some(&[ | ||
ItemConfig::STACK03 | ||
]); | ||
|
||
fn get_effect<A: Attribute>(character: &CharacterCommonData, config: &WeaponConfig) -> Option<Box<dyn WeaponEffect<A>>> { | ||
let stack = match *config { | ||
WeaponConfig::CashflowSupervision { stack } => stack, | ||
_ => 0.0 | ||
}; | ||
Some(Box::new(CashflowSupervisionEffect { | ||
stack | ||
})) | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.