mirror of
https://gitlab.com/veloren/veloren.git
synced 2024-08-30 18:12:32 +00:00
feat: BuffKind::Frozen
This commit is contained in:
parent
9eefa89f90
commit
e06bd0eaa3
@ -270,6 +270,7 @@ lazy_static! {
|
|||||||
BuffKind::ProtectingWard => "protecting_ward",
|
BuffKind::ProtectingWard => "protecting_ward",
|
||||||
BuffKind::Frenzied => "frenzied",
|
BuffKind::Frenzied => "frenzied",
|
||||||
BuffKind::Crippled => "crippled",
|
BuffKind::Crippled => "crippled",
|
||||||
|
BuffKind::Frozen => "frozen",
|
||||||
};
|
};
|
||||||
let mut buff_parser = HashMap::new();
|
let mut buff_parser = HashMap::new();
|
||||||
BuffKind::iter().for_each(|kind| {buff_parser.insert(string_from_buff(kind).to_string(), kind);});
|
BuffKind::iter().for_each(|kind| {buff_parser.insert(string_from_buff(kind).to_string(), kind);});
|
||||||
|
@ -62,6 +62,8 @@ pub enum BuffKind {
|
|||||||
/// Strength scales the movement speed debuff non-linearly. 0.5 is 50%
|
/// Strength scales the movement speed debuff non-linearly. 0.5 is 50%
|
||||||
/// speed, 1.0 is 33% speed. Bleeding is at 10x the value of the strength.
|
/// speed, 1.0 is 33% speed. Bleeding is at 10x the value of the strength.
|
||||||
Crippled,
|
Crippled,
|
||||||
|
/// Prevents actions
|
||||||
|
Frozen,
|
||||||
}
|
}
|
||||||
|
|
||||||
#[cfg(not(target_arch = "wasm32"))]
|
#[cfg(not(target_arch = "wasm32"))]
|
||||||
@ -82,6 +84,7 @@ impl BuffKind {
|
|||||||
BuffKind::Burning => false,
|
BuffKind::Burning => false,
|
||||||
BuffKind::Crippled => false,
|
BuffKind::Crippled => false,
|
||||||
BuffKind::Frenzied => true,
|
BuffKind::Frenzied => true,
|
||||||
|
BuffKind::Frozen => false,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -301,6 +304,7 @@ impl Buff {
|
|||||||
],
|
],
|
||||||
data.duration,
|
data.duration,
|
||||||
),
|
),
|
||||||
|
BuffKind::Frozen => (vec![BuffEffect::MovementSpeed(0.1)], data.duration),
|
||||||
};
|
};
|
||||||
Buff {
|
Buff {
|
||||||
kind,
|
kind,
|
||||||
|
@ -743,6 +743,7 @@ fn insert_killing_buff(buff: BuffKind, localized_strings: &Localization, templat
|
|||||||
BuffKind::Bleeding => localized_strings.get("hud.outcome.bleeding"),
|
BuffKind::Bleeding => localized_strings.get("hud.outcome.bleeding"),
|
||||||
BuffKind::Cursed => localized_strings.get("hud.outcome.curse"),
|
BuffKind::Cursed => localized_strings.get("hud.outcome.curse"),
|
||||||
BuffKind::Crippled => localized_strings.get("hud.outcome.crippled"),
|
BuffKind::Crippled => localized_strings.get("hud.outcome.crippled"),
|
||||||
|
BuffKind::Frozen => localized_strings.get("hud.outcome.frozen"),
|
||||||
BuffKind::Regeneration
|
BuffKind::Regeneration
|
||||||
| BuffKind::Saturation
|
| BuffKind::Saturation
|
||||||
| BuffKind::Potion
|
| BuffKind::Potion
|
||||||
|
@ -3736,6 +3736,7 @@ pub fn get_buff_image(buff: BuffKind, imgs: &Imgs) -> conrod_core::image::Id {
|
|||||||
BuffKind::Cursed { .. } => imgs.debuff_skull_0,
|
BuffKind::Cursed { .. } => imgs.debuff_skull_0,
|
||||||
BuffKind::Burning { .. } => imgs.debuff_burning_0,
|
BuffKind::Burning { .. } => imgs.debuff_burning_0,
|
||||||
BuffKind::Crippled { .. } => imgs.debuff_crippled_0,
|
BuffKind::Crippled { .. } => imgs.debuff_crippled_0,
|
||||||
|
BuffKind::Frozen { .. } => imgs.debuff_frozen_0,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -3756,6 +3757,7 @@ pub fn get_buff_title(buff: BuffKind, localized_strings: &Localization) -> &str
|
|||||||
BuffKind::Cursed { .. } => localized_strings.get("buff.title.cursed"),
|
BuffKind::Cursed { .. } => localized_strings.get("buff.title.cursed"),
|
||||||
BuffKind::Burning { .. } => localized_strings.get("buff.title.burn"),
|
BuffKind::Burning { .. } => localized_strings.get("buff.title.burn"),
|
||||||
BuffKind::Crippled { .. } => localized_strings.get("buff.title.crippled"),
|
BuffKind::Crippled { .. } => localized_strings.get("buff.title.crippled"),
|
||||||
|
BuffKind::Frozen { .. } => localized_strings.get("buff.title.frozen"),
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -3788,6 +3790,7 @@ pub fn get_buff_desc(buff: BuffKind, data: BuffData, localized_strings: &Localiz
|
|||||||
BuffKind::Cursed { .. } => Cow::Borrowed(localized_strings.get("buff.desc.cursed")),
|
BuffKind::Cursed { .. } => Cow::Borrowed(localized_strings.get("buff.desc.cursed")),
|
||||||
BuffKind::Burning { .. } => Cow::Borrowed(localized_strings.get("buff.desc.burn")),
|
BuffKind::Burning { .. } => Cow::Borrowed(localized_strings.get("buff.desc.burn")),
|
||||||
BuffKind::Crippled { .. } => Cow::Borrowed(localized_strings.get("buff.desc.crippled")),
|
BuffKind::Crippled { .. } => Cow::Borrowed(localized_strings.get("buff.desc.crippled")),
|
||||||
|
BuffKind::Frozen { .. } => Cow::Borrowed(localized_strings.get("buff.desc.frozen")),
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -120,7 +120,8 @@ pub fn consumable_desc(effects: &[Effect], i18n: &Localization) -> String {
|
|||||||
| BuffKind::Cursed
|
| BuffKind::Cursed
|
||||||
| BuffKind::ProtectingWard
|
| BuffKind::ProtectingWard
|
||||||
| BuffKind::Crippled
|
| BuffKind::Crippled
|
||||||
| BuffKind::Frenzied => continue,
|
| BuffKind::Frenzied
|
||||||
|
| BuffKind::Frozen => continue,
|
||||||
};
|
};
|
||||||
|
|
||||||
write!(&mut description, "{}", buff_desc).unwrap();
|
write!(&mut description, "{}", buff_desc).unwrap();
|
||||||
@ -142,7 +143,8 @@ pub fn consumable_desc(effects: &[Effect], i18n: &Localization) -> String {
|
|||||||
| BuffKind::Cursed
|
| BuffKind::Cursed
|
||||||
| BuffKind::ProtectingWard
|
| BuffKind::ProtectingWard
|
||||||
| BuffKind::Crippled
|
| BuffKind::Crippled
|
||||||
| BuffKind::Frenzied => continue,
|
| BuffKind::Frenzied
|
||||||
|
| BuffKind::Frozen => continue,
|
||||||
}
|
}
|
||||||
} else if let BuffKind::Saturation | BuffKind::Regeneration = buff.kind {
|
} else if let BuffKind::Saturation | BuffKind::Regeneration = buff.kind {
|
||||||
i18n.get("buff.text.every_second").to_string()
|
i18n.get("buff.text.every_second").to_string()
|
||||||
|
Loading…
Reference in New Issue
Block a user