Skip to content

Commit

Permalink
more attack translation keys
Browse files Browse the repository at this point in the history
  • Loading branch information
Lamby777 committed Jun 4, 2024
1 parent 2c1fbd2 commit 92e6c4d
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 4 deletions.
24 changes: 24 additions & 0 deletions pets-gd/i18n/translations.csv
Original file line number Diff line number Diff line change
Expand Up @@ -16,3 +16,27 @@ SKILL_PSI_REWIRE_DESC, Gamble away {percent} of your mana for the r
SKILL_RECOVERY_HP_AMOUNT_DESC, Heals {amount} of the target's HP.
SKILL_RECOVERY_HP_PERCENT_DESC, Heals {percent}% of the target's HP.
SKILL_RECOVERY_STATUS_DESC, Heals status effects up to {rating}★.
,
SKILL_ATTACK_FIRE_DMG_NAME, Caustics
SKILL_ATTACK_FIRE_FX_NAME, Flame
SKILL_ATTACK_ICE_DMG_NAME, Hail
SKILL_ATTACK_ICE_FX_NAME, Freeze
SKILL_ATTACK_ELECTRIC_DMG_NAME, Zap
SKILL_ATTACK_ELECTRIC_FX_NAME, Numb
SKILL_ATTACK_WIND_DMG_NAME, Gust
SKILL_ATTACK_WIND_FX_NAME, Daze
SKILL_ATTACK_EARTH_DMG_NAME, Quake
SKILL_ATTACK_EARTH_FX_NAME, Ground
SKILL_ATTACK_PSI_DMG_NAME, Psi
SKILL_ATTACK_PSI_FX_NAME, Brainwash
SKILL_ATTACK_SPIRIT_DMG_NAME, Vex
SKILL_ATTACK_SPIRIT_FX_NAME, Curse
,
SKILL_ATTACK_FUZZ_NAME, PK Fuzz
SKILL_ATTACK_WHIP_NAME, PK Whip
,
SKILL_ATTACK_TIER_A, A
SKILL_ATTACK_TIER_B, B
SKILL_ATTACK_TIER_C, C
SKILL_ATTACK_TIER_D, D
SKILL_ATTACK_TIER_E, E
10 changes: 6 additions & 4 deletions pets-lib/src/battle/skills/attack.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,19 @@ use super::*;

#[derive(Serialize, Deserialize)]
pub struct AttackSkill {
pub name: String,
/// translation key to the skill's name
pub tr_key: String,

pub element: Element,
pub power: u8,
pub plural: bool,
pub status_effect: Option<ChanceOfEffect>,
}

impl AttackSkill {
pub fn new(name: &str, element: Element, power: u8) -> Self {
pub fn new(tr_key: &str, element: Element, power: u8) -> Self {
Self {
name: name.to_owned(),
tr_key: tr_key.to_owned(),
element,
power,
plural: false,
Expand Down Expand Up @@ -57,7 +59,7 @@ impl AttackSkill {
#[typetag::serde]
impl SkillFamily for AttackSkill {
fn name(&self) -> String {
self.name.clone()
tr!("{}", self.tr_key.clone()).to_string()
}

/// Panics if neither damage nor effect are present
Expand Down

0 comments on commit 92e6c4d

Please sign in to comment.