mirror of
https://gitlab.com/veloren/veloren.git
synced 2024-08-30 18:12:32 +00:00
Merge branch 'juliancoffee/remove-general-st' into 'master'
Remove health, energy and roll skills See merge request veloren/veloren!4382
This commit is contained in:
commit
fbca6d852b
@ -95,11 +95,13 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|||||||
- Plugin interface based on WASI 0.2 WIT, wasmtime executes these components.
|
- Plugin interface based on WASI 0.2 WIT, wasmtime executes these components.
|
||||||
- Balance changes; Smoother entity progression consisting of larger variety in (effective) health pools, DPS, entity flee_health alterations, and minor weight distribution changes for entity spawns.
|
- Balance changes; Smoother entity progression consisting of larger variety in (effective) health pools, DPS, entity flee_health alterations, and minor weight distribution changes for entity spawns.
|
||||||
- Made power of weapon tiers scale non-linearly.
|
- Made power of weapon tiers scale non-linearly.
|
||||||
- Sword Changes; Pommel Strike has been nerfed -> increased energy cost, increased _durations, and decreased poise damage. Heavy Sweep has been nerfed -> decreased poise damage and stun vulnerability damage. Pillar Thrust has been altered -> decreased maximum base damage with an increase in stun vulnerability damage.
|
- Sword Changes; Pommel Strike has been nerfed -> increased energy cost, increased durations, and decreased poise damage. Heavy Sweep has been nerfed -> decreased poise damage and stun vulnerability damage. Pillar Thrust has been altered -> decreased maximum base damage with an increase in stun vulnerability damage.
|
||||||
- Weapons block are based on poise.
|
- Weapons block are based on poise.
|
||||||
- Wooden Shield recipe.
|
- Wooden Shield recipe.
|
||||||
- Overhauled the visuals of several cave biomes.
|
- Overhauled the visuals of several cave biomes.
|
||||||
- Dropped items now merge dynamically (including non-stackables).
|
- Dropped items now merge dynamically (including non-stackables).
|
||||||
|
- You no longer need to unlock health, energy and roll skills to get to max.
|
||||||
|
- Rolls now don't skip recovery, and instead have increased buildup during ability interrupts.
|
||||||
|
|
||||||
### Removed
|
### Removed
|
||||||
|
|
||||||
|
@ -1,6 +1,4 @@
|
|||||||
({
|
({
|
||||||
General(HealthIncrease): 10,
|
|
||||||
General(EnergyIncrease): 5,
|
|
||||||
Hammer(SsKnockback): 2,
|
Hammer(SsKnockback): 2,
|
||||||
Hammer(SsDamage): 3,
|
Hammer(SsDamage): 3,
|
||||||
Hammer(SsRegen): 2,
|
Hammer(SsRegen): 2,
|
||||||
@ -50,9 +48,6 @@
|
|||||||
Sceptre(ADuration): 2,
|
Sceptre(ADuration): 2,
|
||||||
Sceptre(ARange): 2,
|
Sceptre(ARange): 2,
|
||||||
Sceptre(ACost): 2,
|
Sceptre(ACost): 2,
|
||||||
Roll(Cost): 2,
|
|
||||||
Roll(Strength): 2,
|
|
||||||
Roll(Duration): 2,
|
|
||||||
Climb(Cost): 2,
|
Climb(Cost): 2,
|
||||||
Climb(Speed): 2,
|
Climb(Speed): 2,
|
||||||
Swim(Speed): 2,
|
Swim(Speed): 2,
|
||||||
|
@ -1,16 +1,11 @@
|
|||||||
({
|
({
|
||||||
General: [
|
General: [
|
||||||
General(HealthIncrease),
|
|
||||||
General(EnergyIncrease),
|
|
||||||
UnlockGroup(Weapon(Sword)),
|
UnlockGroup(Weapon(Sword)),
|
||||||
UnlockGroup(Weapon(Axe)),
|
UnlockGroup(Weapon(Axe)),
|
||||||
UnlockGroup(Weapon(Hammer)),
|
UnlockGroup(Weapon(Hammer)),
|
||||||
UnlockGroup(Weapon(Bow)),
|
UnlockGroup(Weapon(Bow)),
|
||||||
UnlockGroup(Weapon(Staff)),
|
UnlockGroup(Weapon(Staff)),
|
||||||
UnlockGroup(Weapon(Sceptre)),
|
UnlockGroup(Weapon(Sceptre)),
|
||||||
Roll(Cost),
|
|
||||||
Roll(Strength),
|
|
||||||
Roll(Duration),
|
|
||||||
Climb(Cost),
|
Climb(Cost),
|
||||||
Climb(Speed),
|
Climb(Speed),
|
||||||
Swim(Speed),
|
Swim(Speed),
|
||||||
|
@ -1,4 +1,2 @@
|
|||||||
([
|
([
|
||||||
Skill((General(HealthIncrease), 2)),
|
|
||||||
Skill((General(EnergyIncrease), 1)),
|
|
||||||
])
|
])
|
||||||
|
@ -1,4 +1,2 @@
|
|||||||
([
|
([
|
||||||
Skill((General(HealthIncrease), 4)),
|
|
||||||
Skill((General(EnergyIncrease), 2)),
|
|
||||||
])
|
])
|
||||||
|
@ -1,4 +1,2 @@
|
|||||||
([
|
([
|
||||||
Skill((General(HealthIncrease), 6)),
|
|
||||||
Skill((General(EnergyIncrease), 3)),
|
|
||||||
])
|
])
|
||||||
|
@ -1,4 +1,2 @@
|
|||||||
([
|
([
|
||||||
Skill((General(HealthIncrease), 8)),
|
|
||||||
Skill((General(EnergyIncrease), 4)),
|
|
||||||
])
|
])
|
||||||
|
@ -1,4 +1,2 @@
|
|||||||
([
|
([
|
||||||
Skill((General(HealthIncrease), 10)),
|
|
||||||
Skill((General(EnergyIncrease), 5)),
|
|
||||||
])
|
])
|
||||||
|
@ -3,11 +3,6 @@
|
|||||||
({
|
({
|
||||||
"max": [
|
"max": [
|
||||||
// General skills
|
// General skills
|
||||||
(General(HealthIncrease), 10),
|
|
||||||
(General(EnergyIncrease), 5),
|
|
||||||
(Roll(Cost), 2),
|
|
||||||
(Roll(Strength), 2),
|
|
||||||
(Roll(Duration), 2),
|
|
||||||
(Climb(Cost), 2),
|
(Climb(Cost), 2),
|
||||||
(Climb(Speed), 2),
|
(Climb(Speed), 2),
|
||||||
(Swim(Speed), 2),
|
(Swim(Speed), 2),
|
||||||
@ -145,13 +140,6 @@
|
|||||||
],
|
],
|
||||||
// Just copypasta from max with random reductions
|
// Just copypasta from max with random reductions
|
||||||
"middle": [
|
"middle": [
|
||||||
// General skills
|
|
||||||
(General(HealthIncrease), 6),
|
|
||||||
(General(EnergyIncrease), 4),
|
|
||||||
(Roll(Cost), 2),
|
|
||||||
(Roll(Strength), 1),
|
|
||||||
(Roll(Duration), 1),
|
|
||||||
|
|
||||||
// Sword
|
// Sword
|
||||||
(UnlockGroup(Weapon(Sword)), 1),
|
(UnlockGroup(Weapon(Sword)), 1),
|
||||||
|
|
||||||
@ -235,8 +223,6 @@
|
|||||||
],
|
],
|
||||||
// Basic skill preset to unlock all abilities
|
// Basic skill preset to unlock all abilities
|
||||||
"basic": [
|
"basic": [
|
||||||
// General skills
|
|
||||||
|
|
||||||
// Sword
|
// Sword
|
||||||
(UnlockGroup(Weapon(Sword)), 1),
|
(UnlockGroup(Weapon(Sword)), 1),
|
||||||
|
|
||||||
|
@ -17,10 +17,6 @@ hud-skill-sp_available =
|
|||||||
hud-skill-not_unlocked = Not yet unlocked
|
hud-skill-not_unlocked = Not yet unlocked
|
||||||
hud-skill-req_sp = {"\u000A"}Requires { $number } SP
|
hud-skill-req_sp = {"\u000A"}Requires { $number } SP
|
||||||
hud-skill-set_as_exp_bar = Track progress on experience bar
|
hud-skill-set_as_exp_bar = Track progress on experience bar
|
||||||
hud-skill-inc_health_title = Increase health
|
|
||||||
hud-skill-inc_health = Increases your maximum health by { $boost } points.{ $SP }
|
|
||||||
hud-skill-inc_energy_title = Increase energy
|
|
||||||
hud-skill-inc_energy = Increases your maximum energy by { $boost } points.{ $SP }
|
|
||||||
|
|
||||||
hud-skill-unlck_sword_title = Sword proficiency
|
hud-skill-unlck_sword_title = Sword proficiency
|
||||||
hud-skill-unlck_sword = Unlocks the sword skill tree.{ $SP }
|
hud-skill-unlck_sword = Unlocks the sword skill tree.{ $SP }
|
||||||
@ -34,14 +30,6 @@ hud-skill-unlck_staff_title = Staff proficiency
|
|||||||
hud-skill-unlck_staff = Unlocks the staff skill tree.{ $SP }
|
hud-skill-unlck_staff = Unlocks the staff skill tree.{ $SP }
|
||||||
hud-skill-unlck_sceptre_title = Sceptre proficiency
|
hud-skill-unlck_sceptre_title = Sceptre proficiency
|
||||||
hud-skill-unlck_sceptre = Unlocks the sceptre skill tree.{ $SP }
|
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_title = Climbing
|
||||||
hud-skill-climbing = Ability to climb surfaces.
|
hud-skill-climbing = Ability to climb surfaces.
|
||||||
hud-skill-climbing_cost_title = Climbing Cost
|
hud-skill-climbing_cost_title = Climbing Cost
|
||||||
|
@ -1240,12 +1240,12 @@ impl CharacterAbility {
|
|||||||
0.0
|
0.0
|
||||||
};
|
};
|
||||||
CharacterAbility::Roll {
|
CharacterAbility::Roll {
|
||||||
energy_cost: 12.0,
|
energy_cost: 10.85,
|
||||||
// Remaining recover flows into buildup
|
// Remaining recover flows into buildup
|
||||||
buildup_duration: 0.05 + remaining_recover,
|
buildup_duration: 0.05 + remaining_recover,
|
||||||
movement_duration: 0.33,
|
movement_duration: 0.36,
|
||||||
recover_duration: 0.125,
|
recover_duration: 0.125,
|
||||||
roll_strength: 3.0,
|
roll_strength: 3.3075,
|
||||||
attack_immunities: AttackFilters {
|
attack_immunities: AttackFilters {
|
||||||
melee: true,
|
melee: true,
|
||||||
projectiles: false,
|
projectiles: false,
|
||||||
@ -1917,8 +1917,7 @@ impl CharacterAbility {
|
|||||||
Some(ToolKind::Staff) => self.adjusted_by_staff_skills(skillset),
|
Some(ToolKind::Staff) => self.adjusted_by_staff_skills(skillset),
|
||||||
Some(ToolKind::Sceptre) => self.adjusted_by_sceptre_skills(skillset),
|
Some(ToolKind::Sceptre) => self.adjusted_by_sceptre_skills(skillset),
|
||||||
Some(ToolKind::Pick) => self.adjusted_by_mining_skills(skillset),
|
Some(ToolKind::Pick) => self.adjusted_by_mining_skills(skillset),
|
||||||
None => self.adjusted_by_general_skills(skillset),
|
None | Some(_) => {},
|
||||||
Some(_) => {},
|
|
||||||
}
|
}
|
||||||
self
|
self
|
||||||
}
|
}
|
||||||
@ -1944,30 +1943,6 @@ 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_hammer_skills(&mut self, skillset: &SkillSet) {
|
fn adjusted_by_hammer_skills(&mut self, skillset: &SkillSet) {
|
||||||
#![allow(clippy::enum_glob_use)]
|
#![allow(clippy::enum_glob_use)]
|
||||||
use skills::{HammerSkill::*, Skill::Hammer};
|
use skills::{HammerSkill::*, Skill::Hammer};
|
||||||
|
@ -809,15 +809,14 @@ impl Body {
|
|||||||
bird_large::Species::SeaWyvern => 600,
|
bird_large::Species::SeaWyvern => 600,
|
||||||
bird_large::Species::WealdWyvern => 600,
|
bird_large::Species::WealdWyvern => 600,
|
||||||
},
|
},
|
||||||
Body::Humanoid(_) => 75,
|
Body::Humanoid(_) => 100,
|
||||||
_ => 100,
|
_ => 100,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#[allow(unreachable_patterns)]
|
|
||||||
pub fn base_health(&self) -> u16 {
|
pub fn base_health(&self) -> u16 {
|
||||||
match self {
|
match self {
|
||||||
Body::Humanoid(_) => 50,
|
Body::Humanoid(_) => 100,
|
||||||
Body::QuadrupedSmall(quadruped_small) => match quadruped_small.species {
|
Body::QuadrupedSmall(quadruped_small) => match quadruped_small.species {
|
||||||
// T1
|
// T1
|
||||||
quadruped_small::Species::Boar => 60,
|
quadruped_small::Species::Boar => 60,
|
||||||
@ -1042,7 +1041,6 @@ impl Body {
|
|||||||
arthropod::Species::Mosscrawler => 600,
|
arthropod::Species::Mosscrawler => 600,
|
||||||
arthropod::Species::Sandcrawler => 500,
|
arthropod::Species::Sandcrawler => 500,
|
||||||
arthropod::Species::Stagbeetle => 440,
|
arthropod::Species::Stagbeetle => 440,
|
||||||
_ => 150,
|
|
||||||
},
|
},
|
||||||
Body::Ship(_) => 1000,
|
Body::Ship(_) => 1000,
|
||||||
Body::Crustacean(_) => 40,
|
Body::Crustacean(_) => 40,
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
use crate::{comp, consts::ENERGY_PER_LEVEL};
|
use crate::comp;
|
||||||
use serde::{Deserialize, Serialize};
|
use serde::{Deserialize, Serialize};
|
||||||
use specs::{Component, DerefFlaggedStorage};
|
use specs::{Component, DerefFlaggedStorage};
|
||||||
use std::ops::Mul;
|
use std::ops::Mul;
|
||||||
@ -82,11 +82,8 @@ impl Energy {
|
|||||||
self.current = self.current.min(self.maximum);
|
self.current = self.current.min(self.maximum);
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn new(body: comp::Body, level: u16) -> Self {
|
pub fn new(body: comp::Body) -> Self {
|
||||||
let energy = u32::from(
|
let energy = u32::from(body.base_energy()) * Self::SCALING_FACTOR_INT;
|
||||||
body.base_energy()
|
|
||||||
.saturating_add(ENERGY_PER_LEVEL.saturating_mul(level)),
|
|
||||||
) * Self::SCALING_FACTOR_INT;
|
|
||||||
Energy {
|
Energy {
|
||||||
current: energy,
|
current: energy,
|
||||||
base_max: energy,
|
base_max: energy,
|
||||||
@ -130,15 +127,6 @@ impl Energy {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn update_max_energy(&mut self, body: comp::Body, level: u16) {
|
|
||||||
let old_max = self.base_max;
|
|
||||||
self.base_max = u32::from(
|
|
||||||
body.base_energy()
|
|
||||||
.saturating_add(ENERGY_PER_LEVEL.saturating_mul(level)),
|
|
||||||
) * Self::SCALING_FACTOR_INT;
|
|
||||||
self.current = (self.current + self.base_max - old_max).min(self.maximum);
|
|
||||||
}
|
|
||||||
|
|
||||||
pub fn refresh(&mut self) { self.current = self.maximum; }
|
pub fn refresh(&mut self) { self.current = self.maximum; }
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1,6 +1,4 @@
|
|||||||
use crate::{
|
use crate::{combat::DamageContributor, comp, resources::Time, uid::Uid, DamageSource};
|
||||||
combat::DamageContributor, comp, consts::HP_PER_LEVEL, resources::Time, uid::Uid, DamageSource,
|
|
||||||
};
|
|
||||||
use hashbrown::HashMap;
|
use hashbrown::HashMap;
|
||||||
use serde::{Deserialize, Serialize};
|
use serde::{Deserialize, Serialize};
|
||||||
use specs::{Component, DerefFlaggedStorage};
|
use specs::{Component, DerefFlaggedStorage};
|
||||||
@ -117,11 +115,8 @@ impl Health {
|
|||||||
self.current = self.current.min(self.maximum);
|
self.current = self.current.min(self.maximum);
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn new(body: comp::Body, level: u16) -> Self {
|
pub fn new(body: comp::Body) -> Self {
|
||||||
let health = u32::from(
|
let health = u32::from(body.base_health()) * Self::SCALING_FACTOR_INT;
|
||||||
body.base_health()
|
|
||||||
.saturating_add(HP_PER_LEVEL.saturating_mul(level)),
|
|
||||||
) * Self::SCALING_FACTOR_INT;
|
|
||||||
Health {
|
Health {
|
||||||
current: health,
|
current: health,
|
||||||
base_max: health,
|
base_max: health,
|
||||||
@ -139,16 +134,6 @@ impl Health {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// TODO: Delete this once stat points will be a thing
|
|
||||||
pub fn update_max_hp(&mut self, body: comp::Body, level: u16) {
|
|
||||||
let old_max = self.base_max;
|
|
||||||
self.base_max = u32::from(
|
|
||||||
body.base_health()
|
|
||||||
.saturating_add(HP_PER_LEVEL.saturating_mul(level)),
|
|
||||||
) * Self::SCALING_FACTOR_INT;
|
|
||||||
self.current = (self.current + self.base_max - old_max).min(self.maximum);
|
|
||||||
}
|
|
||||||
|
|
||||||
/// Returns a boolean if the delta was not zero.
|
/// Returns a boolean if the delta was not zero.
|
||||||
pub fn change_by(&mut self, change: HealthChange) -> bool {
|
pub fn change_by(&mut self, change: HealthChange) -> bool {
|
||||||
let prev_health = i64::from(self.current);
|
let prev_health = i64::from(self.current);
|
||||||
|
@ -1,9 +1,6 @@
|
|||||||
use crate::{
|
use crate::{
|
||||||
assets::{self, Asset, AssetExt},
|
assets::{self, Asset, AssetExt},
|
||||||
comp::{
|
comp::{item::tool::ToolKind, skills::Skill},
|
||||||
item::tool::ToolKind,
|
|
||||||
skills::{GeneralSkill, Skill},
|
|
||||||
},
|
|
||||||
};
|
};
|
||||||
use core::borrow::{Borrow, BorrowMut};
|
use core::borrow::{Borrow, BorrowMut};
|
||||||
use hashbrown::HashMap;
|
use hashbrown::HashMap;
|
||||||
@ -256,8 +253,6 @@ impl SkillGroup {
|
|||||||
pub struct SkillSet {
|
pub struct SkillSet {
|
||||||
skill_groups: HashMap<SkillGroupKind, SkillGroup>,
|
skill_groups: HashMap<SkillGroupKind, SkillGroup>,
|
||||||
skills: HashMap<Skill, u16>,
|
skills: HashMap<Skill, u16>,
|
||||||
pub modify_health: bool,
|
|
||||||
pub modify_energy: bool,
|
|
||||||
}
|
}
|
||||||
|
|
||||||
impl Component for SkillSet {
|
impl Component for SkillSet {
|
||||||
@ -273,8 +268,6 @@ impl Default for SkillSet {
|
|||||||
let mut skill_group = Self {
|
let mut skill_group = Self {
|
||||||
skill_groups: HashMap::new(),
|
skill_groups: HashMap::new(),
|
||||||
skills: SkillSet::initial_skills(),
|
skills: SkillSet::initial_skills(),
|
||||||
modify_health: false,
|
|
||||||
modify_energy: false,
|
|
||||||
};
|
};
|
||||||
|
|
||||||
// Insert default skill groups
|
// Insert default skill groups
|
||||||
@ -306,8 +299,6 @@ impl SkillSet {
|
|||||||
let mut skillset = SkillSet {
|
let mut skillset = SkillSet {
|
||||||
skill_groups,
|
skill_groups,
|
||||||
skills: SkillSet::initial_skills(),
|
skills: SkillSet::initial_skills(),
|
||||||
modify_health: true,
|
|
||||||
modify_energy: true,
|
|
||||||
};
|
};
|
||||||
let mut persistence_load_error = None;
|
let mut persistence_load_error = None;
|
||||||
|
|
||||||
@ -526,17 +517,8 @@ impl SkillSet {
|
|||||||
);
|
);
|
||||||
skill_group.available_sp = new_available_sp;
|
skill_group.available_sp = new_available_sp;
|
||||||
skill_group.ordered_skills.push(skill);
|
skill_group.ordered_skills.push(skill);
|
||||||
match skill {
|
if let Skill::UnlockGroup(group) = skill {
|
||||||
Skill::UnlockGroup(group) => {
|
|
||||||
this.unlock_skill_group(group);
|
this.unlock_skill_group(group);
|
||||||
},
|
|
||||||
Skill::General(GeneralSkill::HealthIncrease) => {
|
|
||||||
this.modify_health = true;
|
|
||||||
},
|
|
||||||
Skill::General(GeneralSkill::EnergyIncrease) => {
|
|
||||||
this.modify_energy = true;
|
|
||||||
},
|
|
||||||
_ => {},
|
|
||||||
}
|
}
|
||||||
this.skills.insert(skill, next_level);
|
this.skills.insert(skill, next_level);
|
||||||
Ok(())
|
Ok(())
|
||||||
|
@ -11,14 +11,12 @@ use serde::{Deserialize, Serialize};
|
|||||||
// SkillTree Modifiers below.
|
// SkillTree Modifiers below.
|
||||||
#[derive(Clone, Copy, Debug, Hash, PartialEq, Eq, Serialize, Deserialize, Ord, PartialOrd)]
|
#[derive(Clone, Copy, Debug, Hash, PartialEq, Eq, Serialize, Deserialize, Ord, PartialOrd)]
|
||||||
pub enum Skill {
|
pub enum Skill {
|
||||||
General(GeneralSkill),
|
|
||||||
Sword(SwordSkill),
|
Sword(SwordSkill),
|
||||||
Axe(AxeSkill),
|
Axe(AxeSkill),
|
||||||
Hammer(HammerSkill),
|
Hammer(HammerSkill),
|
||||||
Bow(BowSkill),
|
Bow(BowSkill),
|
||||||
Staff(StaffSkill),
|
Staff(StaffSkill),
|
||||||
Sceptre(SceptreSkill),
|
Sceptre(SceptreSkill),
|
||||||
Roll(RollSkill),
|
|
||||||
Climb(ClimbSkill),
|
Climb(ClimbSkill),
|
||||||
Swim(SwimSkill),
|
Swim(SwimSkill),
|
||||||
Pick(MiningSkill),
|
Pick(MiningSkill),
|
||||||
@ -162,19 +160,6 @@ pub enum SceptreSkill {
|
|||||||
ACost,
|
ACost,
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Clone, Copy, Debug, Hash, PartialEq, Eq, Serialize, Deserialize, Ord, PartialOrd)]
|
|
||||||
pub enum GeneralSkill {
|
|
||||||
HealthIncrease,
|
|
||||||
EnergyIncrease,
|
|
||||||
}
|
|
||||||
|
|
||||||
#[derive(Clone, Copy, Debug, Hash, PartialEq, Eq, Serialize, Deserialize, Ord, PartialOrd)]
|
|
||||||
pub enum RollSkill {
|
|
||||||
Cost,
|
|
||||||
Strength,
|
|
||||||
Duration,
|
|
||||||
}
|
|
||||||
|
|
||||||
#[derive(Clone, Copy, Debug, Hash, PartialEq, Eq, Serialize, Deserialize, Ord, PartialOrd)]
|
#[derive(Clone, Copy, Debug, Hash, PartialEq, Eq, Serialize, Deserialize, Ord, PartialOrd)]
|
||||||
pub enum ClimbSkill {
|
pub enum ClimbSkill {
|
||||||
Cost,
|
Cost,
|
||||||
@ -473,17 +458,10 @@ impl MiningTreeModifiers {
|
|||||||
}
|
}
|
||||||
|
|
||||||
pub struct GeneralTreeModifiers {
|
pub struct GeneralTreeModifiers {
|
||||||
pub roll: RollTreeModifiers,
|
|
||||||
pub swim: SwimTreeModifiers,
|
pub swim: SwimTreeModifiers,
|
||||||
pub climb: ClimbTreeModifiers,
|
pub climb: ClimbTreeModifiers,
|
||||||
}
|
}
|
||||||
|
|
||||||
pub struct RollTreeModifiers {
|
|
||||||
pub energy_cost: f32,
|
|
||||||
pub strength: f32,
|
|
||||||
pub duration: f32,
|
|
||||||
}
|
|
||||||
|
|
||||||
pub struct SwimTreeModifiers {
|
pub struct SwimTreeModifiers {
|
||||||
pub speed: f32,
|
pub speed: f32,
|
||||||
}
|
}
|
||||||
@ -496,11 +474,6 @@ pub struct ClimbTreeModifiers {
|
|||||||
impl GeneralTreeModifiers {
|
impl GeneralTreeModifiers {
|
||||||
const fn get() -> Self {
|
const fn get() -> Self {
|
||||||
Self {
|
Self {
|
||||||
roll: RollTreeModifiers {
|
|
||||||
energy_cost: 0.95,
|
|
||||||
strength: 1.05,
|
|
||||||
duration: 1.05,
|
|
||||||
},
|
|
||||||
swim: SwimTreeModifiers { speed: 1.25 },
|
swim: SwimTreeModifiers { speed: 1.25 },
|
||||||
climb: ClimbTreeModifiers {
|
climb: ClimbTreeModifiers {
|
||||||
energy_cost: 0.8,
|
energy_cost: 0.8,
|
||||||
|
@ -31,10 +31,6 @@ pub const MIN_RECOMMENDED_TOKIO_THREADS: usize = 2;
|
|||||||
|
|
||||||
pub const SOUND_TRAVEL_DIST_PER_VOLUME: f32 = 3.0;
|
pub const SOUND_TRAVEL_DIST_PER_VOLUME: f32 = 3.0;
|
||||||
|
|
||||||
// Stat increase per level (multiplied by 10 compared to what you'll see in UI)
|
|
||||||
pub const ENERGY_PER_LEVEL: u16 = 5;
|
|
||||||
pub const HP_PER_LEVEL: u16 = 5;
|
|
||||||
|
|
||||||
pub const TELEPORTER_RADIUS: f32 = 3.;
|
pub const TELEPORTER_RADIUS: f32 = 3.;
|
||||||
|
|
||||||
// Map settings
|
// Map settings
|
||||||
|
@ -4,7 +4,6 @@ use crate::{
|
|||||||
character_state::OutputEvents,
|
character_state::OutputEvents,
|
||||||
inventory::loadout_builder::{self, LoadoutBuilder},
|
inventory::loadout_builder::{self, LoadoutBuilder},
|
||||||
object::Body::FieryTornado,
|
object::Body::FieryTornado,
|
||||||
skillset::skills,
|
|
||||||
Behavior, BehaviorCapability,
|
Behavior, BehaviorCapability,
|
||||||
Body::Object,
|
Body::Object,
|
||||||
CharacterState, Projectile, StateUpdate,
|
CharacterState, Projectile, StateUpdate,
|
||||||
@ -131,14 +130,11 @@ impl CharacterBehavior for Data {
|
|||||||
body,
|
body,
|
||||||
);
|
);
|
||||||
|
|
||||||
let health = self.static_data.summon_info.has_health.then(|| {
|
let health = self
|
||||||
let health_level = skill_set
|
.static_data
|
||||||
.skill_level(skills::Skill::General(
|
.summon_info
|
||||||
skills::GeneralSkill::HealthIncrease,
|
.has_health
|
||||||
))
|
.then(|| comp::Health::new(body));
|
||||||
.unwrap_or(0);
|
|
||||||
comp::Health::new(body, health_level)
|
|
||||||
});
|
|
||||||
|
|
||||||
// Ray cast to check where summon should happen
|
// Ray cast to check where summon should happen
|
||||||
let summon_frac =
|
let summon_frac =
|
||||||
|
@ -1,11 +1,8 @@
|
|||||||
use common::{
|
use common::{
|
||||||
combat,
|
combat,
|
||||||
comp::{
|
comp::{
|
||||||
self,
|
self, item::MaterialStatManifest, CharacterState, Combo, Energy, Health, Inventory, Poise,
|
||||||
item::MaterialStatManifest,
|
Pos, Stats, StatsModifier,
|
||||||
skills::{GeneralSkill, Skill},
|
|
||||||
Body, CharacterState, Combo, Energy, Health, Inventory, Poise, Pos, SkillSet, Stats,
|
|
||||||
StatsModifier,
|
|
||||||
},
|
},
|
||||||
event::{DestroyEvent, EmitExt},
|
event::{DestroyEvent, EmitExt},
|
||||||
event_emitters,
|
event_emitters,
|
||||||
@ -33,7 +30,6 @@ pub struct ReadData<'a> {
|
|||||||
time: Read<'a, Time>,
|
time: Read<'a, Time>,
|
||||||
events: Events<'a>,
|
events: Events<'a>,
|
||||||
positions: ReadStorage<'a, Pos>,
|
positions: ReadStorage<'a, Pos>,
|
||||||
bodies: ReadStorage<'a, Body>,
|
|
||||||
char_states: ReadStorage<'a, CharacterState>,
|
char_states: ReadStorage<'a, CharacterState>,
|
||||||
inventories: ReadStorage<'a, Inventory>,
|
inventories: ReadStorage<'a, Inventory>,
|
||||||
msm: ReadExpect<'a, MaterialStatManifest>,
|
msm: ReadExpect<'a, MaterialStatManifest>,
|
||||||
@ -46,7 +42,6 @@ impl<'a> System<'a> for Sys {
|
|||||||
type SystemData = (
|
type SystemData = (
|
||||||
ReadData<'a>,
|
ReadData<'a>,
|
||||||
WriteStorage<'a, Stats>,
|
WriteStorage<'a, Stats>,
|
||||||
WriteStorage<'a, SkillSet>,
|
|
||||||
WriteStorage<'a, Health>,
|
WriteStorage<'a, Health>,
|
||||||
WriteStorage<'a, Poise>,
|
WriteStorage<'a, Poise>,
|
||||||
WriteStorage<'a, Energy>,
|
WriteStorage<'a, Energy>,
|
||||||
@ -63,7 +58,6 @@ impl<'a> System<'a> for Sys {
|
|||||||
(
|
(
|
||||||
read_data,
|
read_data,
|
||||||
stats,
|
stats,
|
||||||
mut skill_sets,
|
|
||||||
mut healths,
|
mut healths,
|
||||||
mut poises,
|
mut poises,
|
||||||
mut energies,
|
mut energies,
|
||||||
@ -120,31 +114,6 @@ impl<'a> System<'a> for Sys {
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
// Apply effects from leveling skills
|
|
||||||
let join = (
|
|
||||||
&mut skill_sets,
|
|
||||||
&mut healths,
|
|
||||||
&mut energies,
|
|
||||||
&read_data.bodies,
|
|
||||||
)
|
|
||||||
.lend_join();
|
|
||||||
join.for_each(|(mut skill_set, mut health, mut energy, body)| {
|
|
||||||
if skill_set.modify_health {
|
|
||||||
let health_level = skill_set
|
|
||||||
.skill_level(Skill::General(GeneralSkill::HealthIncrease))
|
|
||||||
.unwrap_or(0);
|
|
||||||
health.update_max_hp(*body, health_level);
|
|
||||||
skill_set.modify_health = false;
|
|
||||||
}
|
|
||||||
if skill_set.modify_energy {
|
|
||||||
let energy_level = skill_set
|
|
||||||
.skill_level(Skill::General(GeneralSkill::EnergyIncrease))
|
|
||||||
.unwrap_or(0);
|
|
||||||
energy.update_max_energy(*body, energy_level);
|
|
||||||
skill_set.modify_energy = false;
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
// Update energies and poises
|
// Update energies and poises
|
||||||
let join = (&read_data.char_states, &mut energies, &mut poises).lend_join();
|
let join = (&read_data.char_states, &mut energies, &mut poises).lend_join();
|
||||||
join.for_each(|(character_state, mut energy, mut poise)| {
|
join.for_each(|(character_state, mut energy, mut poise)| {
|
||||||
|
@ -2,8 +2,8 @@
|
|||||||
mod tests {
|
mod tests {
|
||||||
use common::{
|
use common::{
|
||||||
comp::{
|
comp::{
|
||||||
item::MaterialStatManifest, skills::GeneralSkill, tool::AbilityMap, CharacterActivity,
|
item::MaterialStatManifest, tool::AbilityMap, CharacterActivity, CharacterState,
|
||||||
CharacterState, Controller, Energy, Ori, PhysicsState, Poise, Pos, Skill, Stats, Vel,
|
Controller, Energy, Ori, PhysicsState, Poise, Pos, Stats, Vel,
|
||||||
},
|
},
|
||||||
resources::{DeltaTime, GameMode, Time},
|
resources::{DeltaTime, GameMode, Time},
|
||||||
shared_server_config::ServerConstants,
|
shared_server_config::ServerConstants,
|
||||||
@ -64,12 +64,7 @@ mod tests {
|
|||||||
.with(body.mass())
|
.with(body.mass())
|
||||||
.with(body.density())
|
.with(body.density())
|
||||||
.with(body)
|
.with(body)
|
||||||
.with(Energy::new(
|
.with(Energy::new(body))
|
||||||
body,
|
|
||||||
skill_set
|
|
||||||
.skill_level(Skill::General(GeneralSkill::EnergyIncrease))
|
|
||||||
.unwrap_or(0),
|
|
||||||
))
|
|
||||||
.with(Controller::default())
|
.with(Controller::default())
|
||||||
.with(Poise::new(body))
|
.with(Poise::new(body))
|
||||||
.with(skill_set)
|
.with(skill_set)
|
||||||
|
@ -1,10 +1,7 @@
|
|||||||
use common::{
|
use common::{
|
||||||
comp::{
|
comp::{
|
||||||
inventory::item::MaterialStatManifest,
|
inventory::item::MaterialStatManifest, tool::AbilityMap, Auras, Buffs, CharacterActivity,
|
||||||
skills::{GeneralSkill, Skill},
|
CharacterState, Collider, Combo, Controller, Energy, Health, Ori, Pos, Stats, Vel,
|
||||||
tool::AbilityMap,
|
|
||||||
Auras, Buffs, CharacterActivity, CharacterState, Collider, Combo, Controller, Energy,
|
|
||||||
Health, Ori, Pos, Stats, Vel,
|
|
||||||
},
|
},
|
||||||
resources::{DeltaTime, GameMode, Time},
|
resources::{DeltaTime, GameMode, Time},
|
||||||
shared_server_config::ServerConstants,
|
shared_server_config::ServerConstants,
|
||||||
@ -131,13 +128,8 @@ pub fn create_player(state: &mut State) -> Entity {
|
|||||||
.with(Buffs::default())
|
.with(Buffs::default())
|
||||||
.with(Combo::default())
|
.with(Combo::default())
|
||||||
.with(Auras::default())
|
.with(Auras::default())
|
||||||
.with(Energy::new(
|
.with(Energy::new(body))
|
||||||
body,
|
.with(Health::new(body))
|
||||||
skill_set
|
|
||||||
.skill_level(Skill::General(GeneralSkill::EnergyIncrease))
|
|
||||||
.unwrap_or(0),
|
|
||||||
))
|
|
||||||
.with(Health::new(body, body.base_health()))
|
|
||||||
.with(skill_set)
|
.with(skill_set)
|
||||||
.with(Stats::empty(body))
|
.with(Stats::empty(body))
|
||||||
.build()
|
.build()
|
||||||
|
@ -1689,7 +1689,7 @@ fn handle_spawn(
|
|||||||
comp::Ori::default(),
|
comp::Ori::default(),
|
||||||
comp::Stats::new(get_npc_name(id, npc::BodyType::from_body(body)), body),
|
comp::Stats::new(get_npc_name(id, npc::BodyType::from_body(body)), body),
|
||||||
comp::SkillSet::default(),
|
comp::SkillSet::default(),
|
||||||
Some(comp::Health::new(body, 0)),
|
Some(comp::Health::new(body)),
|
||||||
comp::Poise::new(body),
|
comp::Poise::new(body),
|
||||||
inventory,
|
inventory,
|
||||||
body,
|
body,
|
||||||
@ -1778,7 +1778,7 @@ fn handle_spawn_training_dummy(
|
|||||||
|
|
||||||
let stats = comp::Stats::new("Training Dummy".to_string(), body);
|
let stats = comp::Stats::new("Training Dummy".to_string(), body);
|
||||||
let skill_set = comp::SkillSet::default();
|
let skill_set = comp::SkillSet::default();
|
||||||
let health = comp::Health::new(body, 0);
|
let health = comp::Health::new(body);
|
||||||
let poise = comp::Poise::new(body);
|
let poise = comp::Poise::new(body);
|
||||||
|
|
||||||
server
|
server
|
||||||
|
@ -20,9 +20,7 @@ use common::{
|
|||||||
self,
|
self,
|
||||||
item::{ItemKind, MaterialStatManifest},
|
item::{ItemKind, MaterialStatManifest},
|
||||||
misc::PortalData,
|
misc::PortalData,
|
||||||
object,
|
object, ChatType, Content, Group, Inventory, LootOwner, Object, Player, Poise, Presence,
|
||||||
skills::{GeneralSkill, Skill},
|
|
||||||
ChatType, Content, Group, Inventory, LootOwner, Object, Player, Poise, Presence,
|
|
||||||
PresenceKind, BASE_ABILITY_LIMIT,
|
PresenceKind, BASE_ABILITY_LIMIT,
|
||||||
},
|
},
|
||||||
effect::Effect,
|
effect::Effect,
|
||||||
@ -299,12 +297,7 @@ impl StateExt for State {
|
|||||||
.with(body.collider())
|
.with(body.collider())
|
||||||
.with(comp::Controller::default())
|
.with(comp::Controller::default())
|
||||||
.with(body)
|
.with(body)
|
||||||
.with(comp::Energy::new(
|
.with(comp::Energy::new(body))
|
||||||
body,
|
|
||||||
skill_set
|
|
||||||
.skill_level(Skill::General(GeneralSkill::EnergyIncrease))
|
|
||||||
.unwrap_or(0),
|
|
||||||
))
|
|
||||||
.with(stats)
|
.with(stats)
|
||||||
.with(if body.is_humanoid() {
|
.with(if body.is_humanoid() {
|
||||||
comp::ActiveAbilities::default_limited(BASE_ABILITY_LIMIT)
|
comp::ActiveAbilities::default_limited(BASE_ABILITY_LIMIT)
|
||||||
@ -435,7 +428,7 @@ impl StateExt for State {
|
|||||||
.with(comp::CharacterActivity::default())
|
.with(comp::CharacterActivity::default())
|
||||||
// TODO: some of these are required in order for the character_behavior system to
|
// TODO: some of these are required in order for the character_behavior system to
|
||||||
// recognize a possesed airship; that system should be refactored to use `.maybe()`
|
// recognize a possesed airship; that system should be refactored to use `.maybe()`
|
||||||
.with(comp::Energy::new(ship.into(), 0))
|
.with(comp::Energy::new(ship.into()))
|
||||||
.with(comp::Stats::new("Airship".to_string(), body))
|
.with(comp::Stats::new("Airship".to_string(), body))
|
||||||
.with(comp::SkillSet::default())
|
.with(comp::SkillSet::default())
|
||||||
.with(comp::ActiveAbilities::default())
|
.with(comp::ActiveAbilities::default())
|
||||||
@ -734,16 +727,8 @@ impl StateExt for State {
|
|||||||
self.write_component_ignore_entity_dead(entity, body);
|
self.write_component_ignore_entity_dead(entity, body);
|
||||||
self.write_component_ignore_entity_dead(entity, body.mass());
|
self.write_component_ignore_entity_dead(entity, body.mass());
|
||||||
self.write_component_ignore_entity_dead(entity, body.density());
|
self.write_component_ignore_entity_dead(entity, body.density());
|
||||||
let (health_level, energy_level) = (
|
self.write_component_ignore_entity_dead(entity, comp::Health::new(body));
|
||||||
skill_set
|
self.write_component_ignore_entity_dead(entity, comp::Energy::new(body));
|
||||||
.skill_level(Skill::General(GeneralSkill::HealthIncrease))
|
|
||||||
.unwrap_or(0),
|
|
||||||
skill_set
|
|
||||||
.skill_level(Skill::General(GeneralSkill::EnergyIncrease))
|
|
||||||
.unwrap_or(0),
|
|
||||||
);
|
|
||||||
self.write_component_ignore_entity_dead(entity, comp::Health::new(body, health_level));
|
|
||||||
self.write_component_ignore_entity_dead(entity, comp::Energy::new(body, energy_level));
|
|
||||||
self.write_component_ignore_entity_dead(entity, Poise::new(body));
|
self.write_component_ignore_entity_dead(entity, Poise::new(body));
|
||||||
self.write_component_ignore_entity_dead(entity, stats);
|
self.write_component_ignore_entity_dead(entity, stats);
|
||||||
self.write_component_ignore_entity_dead(entity, active_abilities);
|
self.write_component_ignore_entity_dead(entity, active_abilities);
|
||||||
@ -778,9 +763,6 @@ impl StateExt for State {
|
|||||||
pets.len(),
|
pets.len(),
|
||||||
player_pos
|
player_pos
|
||||||
);
|
);
|
||||||
// This is the same as wild creatures naturally spawned in the world
|
|
||||||
const DEFAULT_PET_HEALTH_LEVEL: u16 = 0;
|
|
||||||
|
|
||||||
let mut rng = rand::thread_rng();
|
let mut rng = rand::thread_rng();
|
||||||
|
|
||||||
for (pet, body, stats) in pets {
|
for (pet, body, stats) in pets {
|
||||||
@ -791,7 +773,7 @@ impl StateExt for State {
|
|||||||
ori,
|
ori,
|
||||||
stats,
|
stats,
|
||||||
comp::SkillSet::default(),
|
comp::SkillSet::default(),
|
||||||
Some(comp::Health::new(body, DEFAULT_PET_HEALTH_LEVEL)),
|
Some(comp::Health::new(body)),
|
||||||
Poise::new(body),
|
Poise::new(body),
|
||||||
Inventory::with_loadout(
|
Inventory::with_loadout(
|
||||||
LoadoutBuilder::from_default(&body).build(),
|
LoadoutBuilder::from_default(&body).build(),
|
||||||
|
@ -13,8 +13,8 @@ use crate::{
|
|||||||
use common::{
|
use common::{
|
||||||
calendar::Calendar,
|
calendar::Calendar,
|
||||||
comp::{
|
comp::{
|
||||||
self, agent, biped_small, bird_medium, misc::PortalData, skillset::skills,
|
self, agent, biped_small, bird_medium, misc::PortalData, BehaviorCapability, ForceUpdate,
|
||||||
BehaviorCapability, ForceUpdate, Pos, Presence, Waypoint,
|
Pos, Presence, Waypoint,
|
||||||
},
|
},
|
||||||
event::{
|
event::{
|
||||||
CreateNpcEvent, CreateTeleporterEvent, CreateWaypointEvent, EmitExt, EventBus, NpcBuilder,
|
CreateNpcEvent, CreateTeleporterEvent, CreateWaypointEvent, EmitExt, EventBus, NpcBuilder,
|
||||||
@ -498,10 +498,7 @@ impl SpawnEntityData {
|
|||||||
inventory
|
inventory
|
||||||
};
|
};
|
||||||
|
|
||||||
let health_level = skill_set
|
let health = Some(comp::Health::new(body));
|
||||||
.skill_level(skills::Skill::General(skills::GeneralSkill::HealthIncrease))
|
|
||||||
.unwrap_or(0);
|
|
||||||
let health = Some(comp::Health::new(body, health_level));
|
|
||||||
let poise = comp::Poise::new(body);
|
let poise = comp::Poise::new(body);
|
||||||
|
|
||||||
// Allow Humanoid, BirdMedium, and Parrot to speak
|
// Allow Humanoid, BirdMedium, and Parrot to speak
|
||||||
|
@ -33,13 +33,12 @@ use common::{
|
|||||||
slot::EquipSlot,
|
slot::EquipSlot,
|
||||||
},
|
},
|
||||||
skills::{
|
skills::{
|
||||||
self, AxeSkill, BowSkill, ClimbSkill, GeneralSkill, HammerSkill, MiningSkill,
|
self, AxeSkill, BowSkill, ClimbSkill, HammerSkill, MiningSkill, SceptreSkill, Skill,
|
||||||
RollSkill, SceptreSkill, Skill, StaffSkill, SwimSkill, SwordSkill, SKILL_MODIFIERS,
|
StaffSkill, SwimSkill, SwordSkill, SKILL_MODIFIERS,
|
||||||
},
|
},
|
||||||
skillset::{SkillGroupKind, SkillSet},
|
skillset::{SkillGroupKind, SkillSet},
|
||||||
Body, CharacterState, Energy, Health, Inventory, Poise,
|
Body, CharacterState, Energy, Health, Inventory, Poise,
|
||||||
},
|
},
|
||||||
consts::{ENERGY_PER_LEVEL, HP_PER_LEVEL},
|
|
||||||
};
|
};
|
||||||
use conrod_core::{
|
use conrod_core::{
|
||||||
color, image,
|
color, image,
|
||||||
@ -1374,9 +1373,9 @@ impl<'a> Diary<'a> {
|
|||||||
|
|
||||||
// Number of skills per rectangle per weapon, start counting at 0
|
// Number of skills per rectangle per weapon, start counting at 0
|
||||||
// Maximum of 9 skills/8 indices
|
// Maximum of 9 skills/8 indices
|
||||||
let skills_top_l = 2;
|
let skills_top_l = 6;
|
||||||
let skills_top_r = 6;
|
let skills_top_r = 0;
|
||||||
let skills_bot_l = 4;
|
let skills_bot_l = 0;
|
||||||
let skills_bot_r = 5;
|
let skills_bot_r = 5;
|
||||||
|
|
||||||
self.setup_state_for_skill_icons(
|
self.setup_state_for_skill_icons(
|
||||||
@ -1387,7 +1386,7 @@ impl<'a> Diary<'a> {
|
|||||||
skills_bot_l,
|
skills_bot_l,
|
||||||
skills_bot_r,
|
skills_bot_r,
|
||||||
);
|
);
|
||||||
use skills::{GeneralSkill::*, RollSkill::*};
|
|
||||||
use SkillGroupKind::*;
|
use SkillGroupKind::*;
|
||||||
use ToolKind::*;
|
use ToolKind::*;
|
||||||
// General Combat
|
// General Combat
|
||||||
@ -1419,81 +1418,43 @@ impl<'a> Diary<'a> {
|
|||||||
// 5 1 6
|
// 5 1 6
|
||||||
// 3 0 4
|
// 3 0 4
|
||||||
// 8 2 7
|
// 8 2 7
|
||||||
SkillIcon::Unlockable {
|
// Bottom left skills
|
||||||
skill: Skill::General(HealthIncrease),
|
|
||||||
image: self.imgs.health_plus_skill,
|
|
||||||
position: MidTopWithMarginOn(state.ids.skills_top_l[0], 3.0),
|
|
||||||
id: state.ids.skill_general_stat_0,
|
|
||||||
},
|
|
||||||
SkillIcon::Unlockable {
|
|
||||||
skill: Skill::General(EnergyIncrease),
|
|
||||||
image: self.imgs.energy_plus_skill,
|
|
||||||
position: MidTopWithMarginOn(state.ids.skills_top_l[1], 3.0),
|
|
||||||
id: state.ids.skill_general_stat_1,
|
|
||||||
},
|
|
||||||
// Top right skills
|
|
||||||
SkillIcon::Unlockable {
|
SkillIcon::Unlockable {
|
||||||
skill: Skill::UnlockGroup(Weapon(Sword)),
|
skill: Skill::UnlockGroup(Weapon(Sword)),
|
||||||
image: self.imgs.unlock_sword_skill,
|
image: self.imgs.unlock_sword_skill,
|
||||||
position: MidTopWithMarginOn(state.ids.skills_top_r[0], 3.0),
|
position: MidTopWithMarginOn(state.ids.skills_top_l[0], 3.0),
|
||||||
id: state.ids.skill_general_tree_0,
|
id: state.ids.skill_general_tree_0,
|
||||||
},
|
},
|
||||||
SkillIcon::Unlockable {
|
SkillIcon::Unlockable {
|
||||||
skill: Skill::UnlockGroup(Weapon(Axe)),
|
skill: Skill::UnlockGroup(Weapon(Axe)),
|
||||||
image: self.imgs.unlock_axe_skill,
|
image: self.imgs.unlock_axe_skill,
|
||||||
position: MidTopWithMarginOn(state.ids.skills_top_r[1], 3.0),
|
position: MidTopWithMarginOn(state.ids.skills_top_l[1], 3.0),
|
||||||
id: state.ids.skill_general_tree_1,
|
id: state.ids.skill_general_tree_1,
|
||||||
},
|
},
|
||||||
SkillIcon::Unlockable {
|
SkillIcon::Unlockable {
|
||||||
skill: Skill::UnlockGroup(Weapon(Hammer)),
|
skill: Skill::UnlockGroup(Weapon(Hammer)),
|
||||||
image: self.imgs.unlock_hammer_skill,
|
image: self.imgs.unlock_hammer_skill,
|
||||||
position: MidTopWithMarginOn(state.ids.skills_top_r[2], 3.0),
|
position: MidTopWithMarginOn(state.ids.skills_top_l[2], 3.0),
|
||||||
id: state.ids.skill_general_tree_2,
|
id: state.ids.skill_general_tree_2,
|
||||||
},
|
},
|
||||||
SkillIcon::Unlockable {
|
SkillIcon::Unlockable {
|
||||||
skill: Skill::UnlockGroup(Weapon(Bow)),
|
skill: Skill::UnlockGroup(Weapon(Bow)),
|
||||||
image: self.imgs.unlock_bow_skill,
|
image: self.imgs.unlock_bow_skill,
|
||||||
position: MidTopWithMarginOn(state.ids.skills_top_r[3], 3.0),
|
position: MidTopWithMarginOn(state.ids.skills_top_l[3], 3.0),
|
||||||
id: state.ids.skill_general_tree_3,
|
id: state.ids.skill_general_tree_3,
|
||||||
},
|
},
|
||||||
SkillIcon::Unlockable {
|
SkillIcon::Unlockable {
|
||||||
skill: Skill::UnlockGroup(Weapon(Staff)),
|
skill: Skill::UnlockGroup(Weapon(Staff)),
|
||||||
image: self.imgs.unlock_staff_skill0,
|
image: self.imgs.unlock_staff_skill0,
|
||||||
position: MidTopWithMarginOn(state.ids.skills_top_r[4], 3.0),
|
position: MidTopWithMarginOn(state.ids.skills_top_l[4], 3.0),
|
||||||
id: state.ids.skill_general_tree_4,
|
id: state.ids.skill_general_tree_4,
|
||||||
},
|
},
|
||||||
SkillIcon::Unlockable {
|
SkillIcon::Unlockable {
|
||||||
skill: Skill::UnlockGroup(Weapon(Sceptre)),
|
skill: Skill::UnlockGroup(Weapon(Sceptre)),
|
||||||
image: self.imgs.unlock_sceptre_skill,
|
image: self.imgs.unlock_sceptre_skill,
|
||||||
position: MidTopWithMarginOn(state.ids.skills_top_r[5], 3.0),
|
position: MidTopWithMarginOn(state.ids.skills_top_l[5], 3.0),
|
||||||
id: state.ids.skill_general_tree_5,
|
id: state.ids.skill_general_tree_5,
|
||||||
},
|
},
|
||||||
// Bottom left skills
|
|
||||||
SkillIcon::Descriptive {
|
|
||||||
title: "hud-skill-dodge_title",
|
|
||||||
desc: "hud-skill-dodge",
|
|
||||||
image: self.imgs.skill_dodge_skill,
|
|
||||||
position: MidTopWithMarginOn(state.ids.skills_bot_l[0], 3.0),
|
|
||||||
id: state.ids.skill_general_roll_0,
|
|
||||||
},
|
|
||||||
SkillIcon::Unlockable {
|
|
||||||
skill: Skill::Roll(Cost),
|
|
||||||
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),
|
|
||||||
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),
|
|
||||||
image: self.imgs.utility_duration_skill,
|
|
||||||
position: MidTopWithMarginOn(state.ids.skills_bot_l[3], 3.0),
|
|
||||||
id: state.ids.skill_general_roll_3,
|
|
||||||
},
|
|
||||||
// Bottom right skills
|
// Bottom right skills
|
||||||
SkillIcon::Descriptive {
|
SkillIcon::Descriptive {
|
||||||
title: "hud-skill-climbing_title",
|
title: "hud-skill-climbing_title",
|
||||||
@ -2849,7 +2810,6 @@ impl<'a> Diary<'a> {
|
|||||||
fn skill_strings(skill: Skill) -> SkillStrings<'static> {
|
fn skill_strings(skill: Skill) -> SkillStrings<'static> {
|
||||||
match skill {
|
match skill {
|
||||||
// general tree
|
// general tree
|
||||||
Skill::General(s) => general_skill_strings(s),
|
|
||||||
Skill::UnlockGroup(s) => unlock_skill_strings(s),
|
Skill::UnlockGroup(s) => unlock_skill_strings(s),
|
||||||
// weapon trees
|
// weapon trees
|
||||||
Skill::Hammer(s) => hammer_skill_strings(s),
|
Skill::Hammer(s) => hammer_skill_strings(s),
|
||||||
@ -2857,7 +2817,6 @@ fn skill_strings(skill: Skill) -> SkillStrings<'static> {
|
|||||||
Skill::Staff(s) => staff_skill_strings(s),
|
Skill::Staff(s) => staff_skill_strings(s),
|
||||||
Skill::Sceptre(s) => sceptre_skill_strings(s),
|
Skill::Sceptre(s) => sceptre_skill_strings(s),
|
||||||
// movement trees
|
// movement trees
|
||||||
Skill::Roll(s) => roll_skill_strings(s),
|
|
||||||
Skill::Climb(s) => climb_skill_strings(s),
|
Skill::Climb(s) => climb_skill_strings(s),
|
||||||
Skill::Swim(s) => swim_skill_strings(s),
|
Skill::Swim(s) => swim_skill_strings(s),
|
||||||
// mining
|
// mining
|
||||||
@ -2866,21 +2825,6 @@ fn skill_strings(skill: Skill) -> SkillStrings<'static> {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
fn general_skill_strings(skill: GeneralSkill) -> SkillStrings<'static> {
|
|
||||||
match skill {
|
|
||||||
GeneralSkill::HealthIncrease => SkillStrings::with_const(
|
|
||||||
"hud-skill-inc_health_title",
|
|
||||||
"hud-skill-inc_health",
|
|
||||||
u32::from(HP_PER_LEVEL),
|
|
||||||
),
|
|
||||||
GeneralSkill::EnergyIncrease => SkillStrings::with_const(
|
|
||||||
"hud-skill-inc_energy_title",
|
|
||||||
"hud-skill-inc_energy",
|
|
||||||
u32::from(ENERGY_PER_LEVEL),
|
|
||||||
),
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
fn unlock_skill_strings(group: SkillGroupKind) -> SkillStrings<'static> {
|
fn unlock_skill_strings(group: SkillGroupKind) -> SkillStrings<'static> {
|
||||||
match group {
|
match group {
|
||||||
SkillGroupKind::Weapon(ToolKind::Sword) => {
|
SkillGroupKind::Weapon(ToolKind::Sword) => {
|
||||||
@ -3216,27 +3160,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> {
|
fn climb_skill_strings(skill: ClimbSkill) -> SkillStrings<'static> {
|
||||||
let modifiers = SKILL_MODIFIERS.general_tree.climb;
|
let modifiers = SKILL_MODIFIERS.general_tree.climb;
|
||||||
match skill {
|
match skill {
|
||||||
|
Loading…
Reference in New Issue
Block a user