implemented en translation for Hammer, Bow, Scepter and Staff skills

skill tree translation

Clamped earning SP to avoid u16 overflow.

translation fixes

Fixed exp scaling function

Fixed exp scaling function

remove debug combat rating display

Update overhead.rs

implemented en translation for Axe
This commit is contained in:
Noé 2021-01-08 02:27:23 +01:00 committed by Sam
parent a606313856
commit acbd965e65
5 changed files with 731 additions and 232 deletions

View File

@ -4,30 +4,207 @@
(
string_map: {
"hud.rank_up": "New Skillpoint",
"hud.skills.sp_available": "{number} Skillpoints available",
"hud.skills.not_unlocked": "Not yet unlocked",
"hud.skill.sp_available": "{number} SP available",
"hud.skill.not_unlocked": "Not yet unlocked",
"hud.skill.req_sp": "\n\nRequires {number} SP",
// Skills
// General Tree
"hud.skills.inc_health_title": "Increase Health",
"hud.skills.inc_health": "Increases max health by 5{}",
"hud.skills.inc_stam_title": "Increase Stamina",
"hud.skills.inc_stam": "Increases max stamina by 5{}",
"hud.skills.unlck_sword_title": "Unlock Sword",
"hud.skills.unlck_sword": "Unlocks sword skill tree{}",
"hud.skills.unlck_axe_title": "Unlock Axe",
"hud.skills.unlck_axe": "Unlocks axe skill tree{}",
"hud.skills.unlck_hammer_title": "Unlock Hammer",
"hud.skills.unlck_hammer": "Unlocks hammer skill tree{}",
"hud.skills.unlck_bow_title": "Unlock Bow",
"hud.skills.unlck_bow": "Unlocks bow skill tree{}",
"hud.skills.unlck_staff_title": "Unlock Staff",
"hud.skills.unlck_staff": "Unlocks staff skill tree{}",
"hud.skills.unlck_sceptre_title": "Unlock Sceptre",
"hud.skills.unlck_sceptre": "Unlocks sceptre skill tree{}",
"hud.skills.dodge_title": "Dodge",
"hud.skills.dodge": "Dodging avoids melee attacks{}",
"hud.skills.dodge_title": "Roll Stamina Cost",
"hud.skills.dodge": "Rolling uses 20% less stamina{}",
// General
"hud.skill.inc_health_title": "Increase Health",
"hud.skill.inc_health": "Increases max health by 5{}",
"hud.skill.inc_stam_title": "Increase Stamina",
"hud.skill.inc_stam": "Increases max stamina by 5{}",
"hud.skill.unlck_sword_title": "Unlock Sword",
"hud.skill.unlck_sword": "Unlocks sword skill tree{}",
"hud.skill.unlck_axe_title": "Unlock Axe",
"hud.skill.unlck_axe": "Unlocks axe skill tree{}",
"hud.skill.unlck_hammer_title": "Unlock Hammer",
"hud.skill.unlck_hammer": "Unlocks hammer skill tree{}",
"hud.skill.unlck_bow_title": "Unlock Bow",
"hud.skill.unlck_bow": "Unlocks bow skill tree{}",
"hud.skill.unlck_staff_title": "Unlock Staff",
"hud.skill.unlck_staff": "Unlocks staff skill tree{}",
"hud.skill.unlck_sceptre_title": "Unlock Sceptre",
"hud.skill.unlck_sceptre": "Unlocks sceptre skill tree{}",
"hud.skill.dodge_title": "Dodge",
"hud.skill.dodge": "Dodging avoids melee attacks{}",
"hud.skill.dodge_title": "Roll Stamina Cost",
"hud.skill.dodge": "Rolling uses 20% less stamina{}",
"hud.skill.roll_stamina_title": "Roll Stamina Cost",
"hud.skill.roll_stamina": "Rolling uses 20% less stamina{}",
"hud.skill.roll_speed_title": "Rolling Speed",
"hud.skill.roll_speed": "Roll 30% faster{}",
"hud.skill.roll_dur_title": "Rolling Duration",
"hud.skill.roll_dur": "Roll for 20% more time{}",
// Sceptre
"hud.skill.sc_projectile_speed_title": "Projectile Speed",
"hud.skill.sc_projectile_speed": "Projectile threw 25% faster{}",
"hud.skill.sc_energy_cost_title" : "Energy Cost",
"hud.skill.sc_energy_cost" : "Decreases energy cost of bomb by 20%{}",
"hud.skill.sc_radius_title" : "Radius",
"hud.skill.sc_radius" : "Increases radius by 40%{}",
"hud.skill.sc_damage_title" : "Damage",
"hud.skill.sc_damage" : "Increases damage by 20%{}",
"hud.skill.sc_heal_title" : "Heal",
"hud.skill.sc_heal" : "Increases healing by 20%{}",
"hud.skill.sc_heal_cost_title" : "Heal Cost",
"hud.skill.sc_heal_cost" : "Use 10% less energy when healing{}",
"hud.skill.sc_lifesteal_efficiency_title" : "Lifesteal Efficiency",
"hud.skill.sc_lifesteal_efficiency" : "Thieve 50% more health{}",
"hud.skill.sc_range_title" : "Range",
"hud.skill.sc_range" : "Longer beam, by 25%{}",
"hud.skill.sc_energy_regen_title" : "Energy Regen",
"hud.skill.sc_energy_regen" : "Increases energy regen from dealing damage by 10%{}",
"hud.skill.sc_damage_title" : "Damage",
"hud.skill.sc_damage" : "Increases damage by 30%{}",
"hud.skill.sc_beam_heal_title" : "Beam Heal",
"hud.skill.sc_beam_heal" : "Increased healing from the beam by 20%{}",
// Staff
"hud.skill.st_shockwave_range_title" : "Shockwave Range",
"hud.skill.st_shockwave_range" : "throw things that used to be out of reach, range increased 20%{}",
"hud.skill.st_shockwave_cost_title" : "Shockwave Cost",
"hud.skill.st_shockwave_cost" : "Decreases the energy cost to throw helpless villagers by 20%{}",
"hud.skill.st_shockwave_knockback_title" : "Shockwave Knockback",
"hud.skill.st_shockwave_knockback" : "Increases throw potential by 30%{}",
"hud.skill.st_shockwave_damage_title" : "Shockwave Damage",
"hud.skill.st_shockwave_damage" : "Increases the damage done by 30%{}",
"hud.skill.st_shockwave_unlock_title" : "Shockwave Unlock",
"hud.skill.st_shockwave_unlock" : "Unlocks the ability to throw enemies away using fire{}",
"hud.skill.st_flame_velocity_title" : "Flame Velocity",
"hud.skill.st_flame_velocity" : "Gets the fire there faster, 25% faster{}",
"hud.skill.st_flamethrower_range_title" : "Flamethrower Range",
"hud.skill.st_flamethrower_range" : "For when the flames just won't reach, they go 25% further{}",
"hud.skill.st_energy_drain_title" : "Energy Drain",
"hud.skill.st_energy_drain" : "Decreases the rate energy is drained by 20%{}",
"hud.skill.st_flamethrower_damage_title" : "Flamethrower Damage",
"hud.skill.st_flamethrower_damage" : "Increases damage by 30%{}",
"hud.skill.st_explosion_radius_title" : "Explosion Radius",
"hud.skill.st_explosion_radius" : "Bigger is better, increases explosion radius by 10%{}",
"hud.skill.st_stamina_regen_title" : "Stamina Regen",
"hud.skill.st_stamina_regen" : "Increases stamina gain by 20%{}",
"hud.skill.st_damage_title" : "Damage",
"hud.skill.st_damage" : "Increases damage by 20%{}",
"hud.skill.st_explosion_title" : "Explosion",
"hud.skill.st_explosion" : "When fire just isn't enough{}",
// Bow
"hud.skill.bow_projectile_speed_title" : "Projectile Speed",
"hud.skill.bow_projectile_speed" : "Allows you to shoot arrows further, faster, by 50%{}",
"hud.skill.bow_arrow_count_title" : "Arrow Count",
"hud.skill.bow_arrow_count" : "shoot an additional arrow when you leap{}",
"hud.skill.bow_repeater_cost_title" : "Repeater Cost",
"hud.skill.bow_repeater_cost" : "Decreases the energy cost to become a gliding repeater by 25%{}",
"hud.skill.bow_repeater_glide_title" : "Repeater Glide",
"hud.skill.bow_repeater_glide" : "Glide further while repeating{}",
"hud.skill.bow_repeater_damage_title" : "Repeater Damage",
"hud.skill.bow_repeater_damage" : "Increases the damage done by 30%{}",
"hud.skill.bow_repeater_unlock_title" : "Repeater Unlock",
"hud.skill.bow_repeater_unlock" : "Unlocks the ability to leap in the air and shoot a barrage of arrows{}",
"hud.skill.bow_charged_knockback_title" : "Charged Knockback",
"hud.skill.bow_charged_knockback" : "throw enemies further by 50%{}",
"hud.skill.bow_charged_move_speed_title" : "Charged Move Speed",
"hud.skill.bow_charged_move_speed" : "Increases how fast you can shuffle while charging the attack by 25%{}",
"hud.skill.bow_charged_speed_title" : "Charged Speed",
"hud.skill.bow_charged_speed" : "Increases the rate that you charge the attack by 25%{}",
"hud.skill.bow_charged_projectile_speed_title" : "Charged Projectile Speed",
"hud.skill.bow_charged_projectile_speed" : "Increases throw potential applied to arrow while charging by 20%{}",
"hud.skill.bow_charged_drain_title" : "Charged Drain",
"hud.skill.bow_charged_drain" : "Decreases the rate of stamina drain by 25%{}",
"hud.skill.bow_charged_damage_title" : "Charged Damage",
"hud.skill.bow_charged_damage" : "Increases damage by 25%{}",
"hud.skill.bow_energy_regen_title" : "Energy Regen",
"hud.skill.bow_energy_regen" : "Increases stamina gain by 50%{}",
"hud.skill.bow_damage_title" : "Damage",
"hud.skill.bow_damage" : "Increases damage by 30%{}",
// Hammer
"hud.skill.hmr_leap_radius_title" : "Leap Radius",
"hud.skill.hmr_leap_radius" : "Increases attack radius on ground slam by 1 meter{}",
"hud.skill.hmr_leap_distance_title" : "Leap Distance",
"hud.skill.hmr_leap_distance" : "Increases distance of leap by 25%{}",
"hud.skill.hmr_leap_cost_title" : "Leap Cost",
"hud.skill.hmr_leap_cost" : "Decreases cost of leap by 25%{}",
"hud.skill.hmr_leap_knockback_title" : "Leap Knockback",
"hud.skill.hmr_leap_knockback" : "Increases knockback from leap by 50%{}",
"hud.skill.hmr_leap_damage_title" : "Leap Damage",
"hud.skill.hmr_leap_damage" : "Increases damage of leap by 40%{}",
"hud.skill.hmr_unlock_leap_title" : "Unlock Leap",
"hud.skill.hmr_unlock_leap" : "Unlocks a leap{}",
"hud.skill.hmr_charged_rate_title" : "Charge Rate",
"hud.skill.hmr_charged_rate" : "Increases the rate that you charge the swing by 25%{}",
"hud.skill.hmr_charged_melee_nrg_drain_title" : "Charged Melee Energy Drain",
"hud.skill.hmr_charged_melee_nrg_drain" : "Decreases the rate energy drains when charging by 25%{}",
"hud.skill.hmr_charged_melee_damage_title" : "Charged Melee Damage",
"hud.skill.hmr_charged_melee_damage" : "Increases the damage of the charged swing by 25%{}",
"hud.skill.hmr_charged_melee_knockback_title" : "Charged Melee Knockback",
"hud.skill.hmr_charged_melee_knockback" : "Massively increases throw potential of swing by 50%{}",
"hud.skill.hmr_single_strike_regen_title" : "Single Strike Regen",
"hud.skill.hmr_single_strike_regen" : "Increases stamina gain with each successive strike{}",
"hud.skill.hmr_single_strike_speed_title" : "Single Strike Speed",
"hud.skill.hmr_single_strike_speed" : "Increases the attack speed with each successive strike{}",
"hud.skill.hmr_single_strike_damage_title" : "Single Strike Damage",
"hud.skill.hmr_single_strike_damage" : "Increases the damage with each successive strike{}",
"hud.skill.hmr_single_strike_knockback_title" : "Single Strike Knockback",
"hud.skill.hmr_single_strike_knockback" : "Increase throw potential of swings by 50%{}",
"hud.skill." : "",
// Sword
"hud.skill.sw_trip_str_combo_title": "Triple Strike Combo",
"hud.skill.sw_trip_str_combo": "Unlocks combo scaling on triple strike{}",
"hud.skill.sw_trip_str_dmg_title": "Triple Strike Damage",
"hud.skill.sw_trip_str_dmg": "Increases the damage each successive strike does{}",
"hud.skill.sw_trip_str_sp_title": "Triple Strike Speed",
"hud.skill.sw_trip_str_sp": "Increases attack speed gained by each successive strike{}",
"hud.skill.sw_trip_str_reg_title": "Triple Strike Regen",
"hud.skill.sw_trip_str_reg": "Increases stamina gain on each successive strike{}",
"hud.skill.sw_dash_dmg_title": "Dash Damage",
"hud.skill.sw_dash_dmg": "Increases initial damage of the dash by 20%{}",
"hud.skill.sw_dash_drain_title": "Dash Drain",
"hud.skill.sw_dash_drain": "Decreases the rate energy is drained while dashing by 25%{}",
"hud.skill.sw_dash_cost_title": "Dash Cost",
"hud.skill.sw_dash_cost": "Decreases the initial cost of the dash by 25%{}",
"hud.skill.sw_dash_speed_title": "Dash Speed",
"hud.skill.sw_dash_speed": "Increases how fast you go while dashing by 30%{}",
"hud.skill.sw_dash_inf_title": "Dash Infinite",
"hud.skill.sw_dash_inf": "Allows you to dash for as long as you have energy{}",
"hud.skill.sw_dash_scale_title": "Dash Scaling Damage",
"hud.skill.sw_dash_scale": "Increases the damage scaling from the dash by 20%{}",
"hud.skill.sw_spin_title": "Spin Unlock",
"hud.skill.sw_spin": "Unlocks the sword spin{}",
"hud.skill.sw_spin_dmg_title": "Spin Damage",
"hud.skill.sw_spin_dmg": "Increases the damage done by 40%{}",
"hud.skill.sw_spin_spd_title": "Spin Speed",
"hud.skill.sw_spin_spd": "Increase the speed at which you spin by 25%{}",
"hud.skill.sw_spin_cost_title": "Spin Cost",
"hud.skill.sw_spin_cost": "Decreases the energy cost of each spin by 25%{}",
"hud.skill.sw_spin_spins_title": "Spin Spins",
"hud.skill.sw_spin_spins": "Increases the number of times you can spin{}",
"hud.skill.sw_interrupt_title": "Interrupting Attacks",
"hud.skill.sw_interrupt": "Allows you to immediately cancel an attack with another attack{}",
"hud.skill.axe_double_strike_combo_title": "Double Strike Combo",
"hud.skill.axe_double_strike_combo": "Unlocks a second strike{}",
"hud.skill.axe_double_strike_damage_title": "Double Strike Damage",
"hud.skill.axe_double_strike_damage": "Increases the damage dealt in each successive strike{}",
"hud.skill.axe_double_strike_speed_title": "Double Strike Speed",
"hud.skill.axe_double_strike_speed": "Increases the attack speed with each successive strike{}",
"hud.skill.axe_double_strike_regen_title": "Double Strike Regen",
"hud.skill.axe_double_strike_regen": "Increases stamina gain with each successive strike{}",
"hud.skill.axe_infinite_axe_spin_title": "Infinite Axe Spin",
"hud.skill.axe_infinite_axe_spin": "Spin for as long as you have energy{}",
"hud.skill.axe_spin_damage_title": "Spin Damage",
"hud.skill.axe_spin_damage": "Increases the damage each spin does by 30%{}",
"hud.skill.axe_spin_helicopter_title": "Spin Helicopter",
"hud.skill.axe_spin_helicopter": "You fall a little slower while spinning{}",
"hud.skill.axe_spin_speed_title": "Spin Speed",
"hud.skill.axe_spin_speed": "Increases your spin speed by 25%{}",
"hud.skill.axe_spin_cost_title": "Spin Cost",
"hud.skill.axe_spin_cost": "Decreases stamina cost of spinning by 25%",
"hud.skill.axe_unlock_leap_title": "Unlock Leap",
"hud.skill.axe_unlock_leap": "Unlocks a leap spin{}",
"hud.skill.axe_leap_damage_title": "Leap Damage",
"hud.skill.axe_leap_damage": "Increases damage of leap by 35%{}",
"hud.skill.axe_leap_knockback_title": "Leap Knockback",
"hud.skill.axe_leap_knockback": "Increases knockback from leap by 40%",
"hud.skill.axe_leap_cost_title": "Leap Cost",
"hud.skill.axe_leap_cost": "Decreases cost of leap by 25%{}",
"hud.skill.axe_leap_distance_title": "Leap Distance",
"hud.skill.axe_leap_distance": "Increases distance of leap by 20%{}",
},

View File

@ -1424,7 +1424,7 @@
"voxel.object.potion_red",
(0.0, 0.0, 0.0), (-50.0, 30.0, 20.0), 0.9,
),
Consumable("PotionExp"): VoxTrans(
Ingredient("PotionExp"): VoxTrans(
"voxel.object.potion_turq",
(0.0, 0.0, 0.0), (-50.0, 30.0, 20.0), 0.8,
),
@ -1439,11 +1439,11 @@
"voxel.sprite.mushrooms.mushroom-10",
(0.0, 0.0, 0.0), (-50.0, 70.0, 40.0), 1.0,
),
Consumable("Velorite"): VoxTrans(
Ingredient("Velorite"): VoxTrans(
"voxel.sprite.velorite.velorite_ore",
(0.0, -1.0, 0.0), (-50.0, 40.0, 20.0), 0.8,
),
Consumable("VeloriteFrag"): VoxTrans(
Ingredient("VeloriteFrag"): VoxTrans(
"voxel.sprite.velorite.velorite_1",
(0.0, 0.0, 0.0), (-50.0, 40.0, 20.0), 0.8,
),

View File

@ -223,7 +223,7 @@ pub enum SkillGroupType {
impl SkillGroupType {
/// Gets the cost in experience of earning a skill point
pub fn skill_point_cost(self, level: u16) -> u16 {
10 * (35.0 * (0.8 * level as f32 - 1.5).atan() + 50.0).floor() as u16
10 * (35.0 * (0.08 * level as f32 - 1.5).atan() + 50.0).floor() as u16
}
/// Gets the total amount of skill points that can be spent in a particular
@ -447,8 +447,8 @@ impl SkillSet {
.iter_mut()
.find(|x| x.skill_group_type == skill_group_type)
{
skill_group.available_sp += number_of_skill_points;
skill_group.earned_sp += number_of_skill_points;
skill_group.available_sp = skill_group.available_sp.saturating_add(number_of_skill_points);
skill_group.earned_sp = skill_group.earned_sp.saturating_add(number_of_skill_points);
} else {
warn!("Tried to add skill points to a skill group that player does not have");
}
@ -535,7 +535,7 @@ impl SkillSet {
.find(|x| x.skill_group_type == skill_group_type)
{
let needed_sp = self.skill_point_cost(skill);
skill_group.available_sp > needed_sp
skill_group.available_sp >= needed_sp
} else {
false
}

File diff suppressed because it is too large Load Diff

View File

@ -284,16 +284,16 @@ impl<'a> Widget for Overhead<'a> {
});
}
// Name
// Text::new(name)
Text::new(&format!("{} [{:?}]", name, combat_rating)) // <- Uncomment to debug combat ratings
Text::new(name)
//Text::new(&format!("{} [{:?}]", name, combat_rating)) // <- Uncomment to debug combat ratings
.font_id(self.fonts.cyri.conrod_id)
.font_size(font_size)
.color(Color::Rgba(0.0, 0.0, 0.0, 1.0))
.x_y(-1.0, name_y)
.parent(id)
.set(state.ids.name_bg, ui);
// Text::new(name)
Text::new(&format!("{} [{:?}]", name, combat_rating)) // <- Uncomment to debug combat ratings
Text::new(name)
//Text::new(&format!("{} [{:?}]", name, combat_rating)) // <- Uncomment to debug combat ratings
.font_id(self.fonts.cyri.conrod_id)
.font_size(font_size)
.color(if self.in_group {