Struct ffxiv_crafting::Status
source · pub struct Status {
pub buffs: Buffs,
pub attributes: Attributes,
pub recipe: Recipe,
pub caches: Caches,
pub durability: u16,
pub craft_points: i32,
pub progress: u16,
pub quality: u32,
pub step: i32,
pub condition: Condition,
}
Expand description
Status 储存一次制作模拟所需的全部状态信息
Fields§
§buffs: Buffs
玩家当前身上的buff
attributes: Attributes
玩家的装备属性
recipe: Recipe
本次制作配方
caches: Caches
预计算数据
durability: u16
剩余耐久
craft_points: i32
剩余制作力
progress: u16
进展
quality: u32
品质
step: i32
步数
condition: Condition
制作状态
Implementations§
source§impl Status
impl Status
pub fn new(attributes: Attributes, recipe: Recipe, rlv: RecipeLevel) -> Self
pub fn calc_durability(&self, durability: u16) -> u16
pub fn calc_synthesis(&self, efficiency: f32) -> u16
pub fn calc_touch(&self, efficiency: f32) -> u32
pub fn new_duration_buff(&self, dt: u8) -> u8
sourcepub fn craft_point(&self, skill: Actions) -> i32
pub fn craft_point(&self, skill: Actions) -> i32
计算当前状态指定技能消耗的CP。 考虑连击与球色
sourcepub fn cast_action(&mut self, action: Actions)
pub fn cast_action(&mut self, action: Actions)
发动一次技能。
sourcepub fn success_rate(&self, action: Actions) -> u8
pub fn success_rate(&self, action: Actions) -> u8
计算当前状态下某技能的成功概率,返回结果介于[0..=100]之间。
sourcepub fn is_action_allowed(&self, action: Actions) -> Result<(), CastActionError>
pub fn is_action_allowed(&self, action: Actions) -> Result<(), CastActionError>
当前状态是否允许发动某技能。
sourcepub fn is_finished(&self) -> bool
pub fn is_finished(&self) -> bool
本次制作是否已经结束。
sourcepub fn high_quality_probability(&self) -> Option<i32>
pub fn high_quality_probability(&self) -> Option<i32>
计算当前状态的HQ概率。 返回一个百分数,即: 如果返回89,则代表概率为89%。
Calculate the HQ probability of current status. The return value is a percentage, that is, if 89 is returned, it means that the probability is 89%.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Status
impl RefUnwindSafe for Status
impl Send for Status
impl Sync for Status
impl Unpin for Status
impl UnwindSafe for Status
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