Remove roll skills

This commit is contained in:
juliancoffee 2024-03-19 00:51:04 +02:00
parent 55ae460d1d
commit 90454b1287
7 changed files with 17 additions and 92 deletions

View File

@ -48,9 +48,6 @@
Sceptre(ADuration): 2,
Sceptre(ARange): 2,
Sceptre(ACost): 2,
Roll(Cost): 2,
Roll(Strength): 2,
Roll(Duration): 2,
Climb(Cost): 2,
Climb(Speed): 2,
Swim(Speed): 2,

View File

@ -6,9 +6,6 @@
UnlockGroup(Weapon(Bow)),
UnlockGroup(Weapon(Staff)),
UnlockGroup(Weapon(Sceptre)),
Roll(Cost),
Roll(Strength),
Roll(Duration),
Climb(Cost),
Climb(Speed),
Swim(Speed),

View File

@ -3,9 +3,6 @@
({
"max": [
// General skills
(Roll(Cost), 2),
(Roll(Strength), 2),
(Roll(Duration), 2),
(Climb(Cost), 2),
(Climb(Speed), 2),
(Swim(Speed), 2),
@ -144,9 +141,6 @@
// Just copypasta from max with random reductions
"middle": [
// General skills
(Roll(Cost), 2),
(Roll(Strength), 1),
(Roll(Duration), 1),
// Sword
(UnlockGroup(Weapon(Sword)), 1),

View File

@ -36,12 +36,6 @@ hud-skill-unlck_sceptre_title = Sceptre proficiency
hud-skill-unlck_sceptre = Unlocks the sceptre skill tree.{ $SP }
hud-skill-dodge_title = Dodge
hud-skill-dodge = Dodging grants temporary immunity to attacks while you're rolling.
hud-skill-roll_energy_title = Roll Energy Cost
hud-skill-roll_energy = Rolling uses { $boost } % less energy.{ $SP }
hud-skill-roll_speed_title = Rolling Speed
hud-skill-roll_speed = Roll { $boost } % faster.{ $SP }
hud-skill-roll_dur_title = Rolling Duration
hud-skill-roll_dur = Roll for { $boost } % more time.{ $SP }
hud-skill-climbing_title = Climbing
hud-skill-climbing = Ability to climb surfaces.
hud-skill-climbing_cost_title = Climbing Cost

View File

@ -1240,12 +1240,12 @@ impl CharacterAbility {
0.0
};
CharacterAbility::Roll {
energy_cost: 12.0,
energy_cost: 10.85,
// Remaining recover flows into buildup
buildup_duration: 0.05 + remaining_recover,
movement_duration: 0.33,
movement_duration: 0.36,
recover_duration: 0.125,
roll_strength: 3.0,
roll_strength: 3.3075,
attack_immunities: AttackFilters {
melee: true,
projectiles: false,
@ -1944,29 +1944,7 @@ impl CharacterAbility {
}
}
fn adjusted_by_general_skills(&mut self, skillset: &SkillSet) {
if let CharacterAbility::Roll {
ref mut energy_cost,
ref mut roll_strength,
ref mut movement_duration,
..
} = self
{
use skills::RollSkill::{Cost, Duration, Strength};
let modifiers = SKILL_MODIFIERS.general_tree.roll;
if let Ok(level) = skillset.skill_level(Skill::Roll(Cost)) {
*energy_cost *= modifiers.energy_cost.powi(level.into());
}
if let Ok(level) = skillset.skill_level(Skill::Roll(Strength)) {
*roll_strength *= modifiers.strength.powi(level.into());
}
if let Ok(level) = skillset.skill_level(Skill::Roll(Duration)) {
*movement_duration *= modifiers.duration.powi(level.into());
}
}
}
fn adjusted_by_general_skills(&mut self, _skillset: &SkillSet) {}
fn adjusted_by_hammer_skills(&mut self, skillset: &SkillSet) {
#![allow(clippy::enum_glob_use)]

View File

@ -166,11 +166,7 @@ pub enum SceptreSkill {
pub enum GeneralSkill {}
#[derive(Clone, Copy, Debug, Hash, PartialEq, Eq, Serialize, Deserialize, Ord, PartialOrd)]
pub enum RollSkill {
Cost,
Strength,
Duration,
}
pub enum RollSkill {}
#[derive(Clone, Copy, Debug, Hash, PartialEq, Eq, Serialize, Deserialize, Ord, PartialOrd)]
pub enum ClimbSkill {
@ -470,17 +466,10 @@ impl MiningTreeModifiers {
}
pub struct GeneralTreeModifiers {
pub roll: RollTreeModifiers,
pub swim: SwimTreeModifiers,
pub climb: ClimbTreeModifiers,
}
pub struct RollTreeModifiers {
pub energy_cost: f32,
pub strength: f32,
pub duration: f32,
}
pub struct SwimTreeModifiers {
pub speed: f32,
}
@ -493,11 +482,6 @@ pub struct ClimbTreeModifiers {
impl GeneralTreeModifiers {
const fn get() -> Self {
Self {
roll: RollTreeModifiers {
energy_cost: 0.95,
strength: 1.05,
duration: 1.05,
},
swim: SwimTreeModifiers { speed: 1.25 },
climb: ClimbTreeModifiers {
energy_cost: 0.8,

View File

@ -33,8 +33,8 @@ use common::{
slot::EquipSlot,
},
skills::{
self, AxeSkill, BowSkill, ClimbSkill, HammerSkill, MiningSkill, RollSkill,
SceptreSkill, Skill, StaffSkill, SwimSkill, SwordSkill, SKILL_MODIFIERS,
self, AxeSkill, BowSkill, ClimbSkill, HammerSkill, MiningSkill, SceptreSkill, Skill,
StaffSkill, SwimSkill, SwordSkill, SKILL_MODIFIERS,
},
skillset::{SkillGroupKind, SkillSet},
Body, CharacterState, Energy, Health, Inventory, Poise,
@ -1386,7 +1386,7 @@ impl<'a> Diary<'a> {
skills_bot_l,
skills_bot_r,
);
use skills::RollSkill::*;
use SkillGroupKind::*;
use ToolKind::*;
// General Combat
@ -1478,20 +1478,23 @@ impl<'a> Diary<'a> {
position: MidTopWithMarginOn(state.ids.skills_bot_l[0], 3.0),
id: state.ids.skill_general_roll_0,
},
SkillIcon::Unlockable {
skill: Skill::Roll(Cost),
SkillIcon::Descriptive {
title: "hud-skill-dodge_title",
desc: "hud-skill-dodge",
image: self.imgs.utility_cost_skill,
position: MidTopWithMarginOn(state.ids.skills_bot_l[1], 3.0),
id: state.ids.skill_general_roll_1,
},
SkillIcon::Unlockable {
skill: Skill::Roll(Strength),
SkillIcon::Descriptive {
title: "hud-skill-dodge_title",
desc: "hud-skill-dodge",
image: self.imgs.utility_speed_skill,
position: MidTopWithMarginOn(state.ids.skills_bot_l[2], 3.0),
id: state.ids.skill_general_roll_2,
},
SkillIcon::Unlockable {
skill: Skill::Roll(Duration),
SkillIcon::Descriptive {
title: "hud-skill-dodge_title",
desc: "hud-skill-dodge",
image: self.imgs.utility_duration_skill,
position: MidTopWithMarginOn(state.ids.skills_bot_l[3], 3.0),
id: state.ids.skill_general_roll_3,
@ -2858,7 +2861,6 @@ fn skill_strings(skill: Skill) -> SkillStrings<'static> {
Skill::Staff(s) => staff_skill_strings(s),
Skill::Sceptre(s) => sceptre_skill_strings(s),
// movement trees
Skill::Roll(s) => roll_skill_strings(s),
Skill::Climb(s) => climb_skill_strings(s),
Skill::Swim(s) => swim_skill_strings(s),
// mining
@ -3202,27 +3204,6 @@ fn sceptre_skill_strings(skill: SceptreSkill) -> SkillStrings<'static> {
}
}
fn roll_skill_strings(skill: RollSkill) -> SkillStrings<'static> {
let modifiers = SKILL_MODIFIERS.general_tree.roll;
match skill {
RollSkill::Cost => SkillStrings::with_mult(
"hud-skill-roll_energy_title",
"hud-skill-roll_energy",
modifiers.energy_cost,
),
RollSkill::Strength => SkillStrings::with_mult(
"hud-skill-roll_speed_title",
"hud-skill-roll_speed",
modifiers.strength,
),
RollSkill::Duration => SkillStrings::with_mult(
"hud-skill-roll_dur_title",
"hud-skill-roll_dur",
modifiers.duration,
),
}
}
fn climb_skill_strings(skill: ClimbSkill) -> SkillStrings<'static> {
let modifiers = SKILL_MODIFIERS.general_tree.climb;
match skill {