Comment-out health/energy skills

This commit is contained in:
juliancoffee 2024-03-18 23:29:35 +02:00
parent 32989ffe99
commit 1e6e595a87
19 changed files with 74 additions and 29 deletions

View File

@ -1,6 +1,8 @@
({ ({
/*
General(HealthIncrease): 10, General(HealthIncrease): 10,
General(EnergyIncrease): 5, General(EnergyIncrease): 5,
*/
Hammer(SsKnockback): 2, Hammer(SsKnockback): 2,
Hammer(SsDamage): 3, Hammer(SsDamage): 3,
Hammer(SsRegen): 2, Hammer(SsRegen): 2,

View File

@ -1,7 +1,9 @@
({ ({
General: [ General: [
/*
General(HealthIncrease), General(HealthIncrease),
General(EnergyIncrease), General(EnergyIncrease),
*/
UnlockGroup(Weapon(Sword)), UnlockGroup(Weapon(Sword)),
UnlockGroup(Weapon(Axe)), UnlockGroup(Weapon(Axe)),
UnlockGroup(Weapon(Hammer)), UnlockGroup(Weapon(Hammer)),

View File

@ -1,4 +1,6 @@
([ ([
/*
Skill((General(HealthIncrease), 2)), Skill((General(HealthIncrease), 2)),
Skill((General(EnergyIncrease), 1)), Skill((General(EnergyIncrease), 1)),
*/
]) ])

View File

@ -1,4 +1,6 @@
([ ([
/*
Skill((General(HealthIncrease), 4)), Skill((General(HealthIncrease), 4)),
Skill((General(EnergyIncrease), 2)), Skill((General(EnergyIncrease), 2)),
*/
]) ])

View File

@ -1,4 +1,6 @@
([ ([
/*
Skill((General(HealthIncrease), 6)), Skill((General(HealthIncrease), 6)),
Skill((General(EnergyIncrease), 3)), Skill((General(EnergyIncrease), 3)),
*/
]) ])

View File

@ -1,4 +1,6 @@
([ ([
/*
Skill((General(HealthIncrease), 8)), Skill((General(HealthIncrease), 8)),
Skill((General(EnergyIncrease), 4)), Skill((General(EnergyIncrease), 4)),
*/
]) ])

View File

@ -1,4 +1,6 @@
([ ([
/*
Skill((General(HealthIncrease), 10)), Skill((General(HealthIncrease), 10)),
Skill((General(EnergyIncrease), 5)), Skill((General(EnergyIncrease), 5)),
*/
]) ])

View File

@ -3,8 +3,10 @@
({ ({
"max": [ "max": [
// General skills // General skills
/*
(General(HealthIncrease), 10), (General(HealthIncrease), 10),
(General(EnergyIncrease), 5), (General(EnergyIncrease), 5),
*/
(Roll(Cost), 2), (Roll(Cost), 2),
(Roll(Strength), 2), (Roll(Strength), 2),
(Roll(Duration), 2), (Roll(Duration), 2),
@ -146,8 +148,10 @@
// Just copypasta from max with random reductions // Just copypasta from max with random reductions
"middle": [ "middle": [
// General skills // General skills
/*
(General(HealthIncrease), 6), (General(HealthIncrease), 6),
(General(EnergyIncrease), 4), (General(EnergyIncrease), 4),
*/
(Roll(Cost), 2), (Roll(Cost), 2),
(Roll(Strength), 1), (Roll(Strength), 1),
(Roll(Duration), 1), (Roll(Duration), 1),

View File

@ -17,10 +17,10 @@ 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-health_title = Health
hud-skill-inc_health = Increases your maximum health by { $boost } points.{ $SP } hud-skill-health = Gives you the ability to withstand attacks.
hud-skill-inc_energy_title = Increase energy hud-skill-energy_title = Energy
hud-skill-inc_energy = Increases your maximum energy by { $boost } points.{ $SP } hud-skill-energy = Your main resource for actions.
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 }

View File

@ -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,

View File

@ -256,8 +256,9 @@ 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, //#[deprecated]
pub modify_energy: bool, //pub modify_health: bool,
//pub modify_energy: bool,
} }
impl Component for SkillSet { impl Component for SkillSet {
@ -273,8 +274,8 @@ 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_health: false,
modify_energy: false, //modify_energy: false,
}; };
// Insert default skill groups // Insert default skill groups
@ -306,8 +307,8 @@ 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_health: true,
modify_energy: true, //modify_energy: true,
}; };
let mut persistence_load_error = None; let mut persistence_load_error = None;
@ -530,12 +531,16 @@ impl SkillSet {
Skill::UnlockGroup(group) => { Skill::UnlockGroup(group) => {
this.unlock_skill_group(group); this.unlock_skill_group(group);
}, },
/*
Skill::General(GeneralSkill::HealthIncrease) => { Skill::General(GeneralSkill::HealthIncrease) => {
this.modify_health = true; this.modify_health = true;
}, },
*/
/*
Skill::General(GeneralSkill::EnergyIncrease) => { Skill::General(GeneralSkill::EnergyIncrease) => {
this.modify_energy = true; this.modify_energy = true;
}, },
*/
_ => {}, _ => {},
} }
this.skills.insert(skill, next_level); this.skills.insert(skill, next_level);

View File

@ -164,8 +164,10 @@ pub enum SceptreSkill {
#[derive(Clone, Copy, Debug, Hash, PartialEq, Eq, Serialize, Deserialize, Ord, PartialOrd)] #[derive(Clone, Copy, Debug, Hash, PartialEq, Eq, Serialize, Deserialize, Ord, PartialOrd)]
pub enum GeneralSkill { pub enum GeneralSkill {
/*
HealthIncrease, HealthIncrease,
EnergyIncrease, EnergyIncrease,
*/
} }
#[derive(Clone, Copy, Debug, Hash, PartialEq, Eq, Serialize, Deserialize, Ord, PartialOrd)] #[derive(Clone, Copy, Debug, Hash, PartialEq, Eq, Serialize, Deserialize, Ord, PartialOrd)]

View File

@ -132,12 +132,14 @@ impl CharacterBehavior for Data {
); );
let health = self.static_data.summon_info.has_health.then(|| { let health = self.static_data.summon_info.has_health.then(|| {
/*
let health_level = skill_set let health_level = skill_set
.skill_level(skills::Skill::General( .skill_level(skills::Skill::General(
skills::GeneralSkill::HealthIncrease, skills::GeneralSkill::HealthIncrease,
)) ))
.unwrap_or(0); .unwrap_or(0);
comp::Health::new(body, health_level) */
comp::Health::new(body, 0)
}); });
// Ray cast to check where summon should happen // Ray cast to check where summon should happen

View File

@ -33,7 +33,7 @@ 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>, //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 +46,7 @@ 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, SkillSet>,
WriteStorage<'a, Health>, WriteStorage<'a, Health>,
WriteStorage<'a, Poise>, WriteStorage<'a, Poise>,
WriteStorage<'a, Energy>, WriteStorage<'a, Energy>,
@ -63,7 +63,7 @@ impl<'a> System<'a> for Sys {
( (
read_data, read_data,
stats, stats,
mut skill_sets, //mut skill_sets,
mut healths, mut healths,
mut poises, mut poises,
mut energies, mut energies,
@ -120,6 +120,7 @@ impl<'a> System<'a> for Sys {
} }
}); });
/*
// Apply effects from leveling skills // Apply effects from leveling skills
let join = ( let join = (
&mut skill_sets, &mut skill_sets,
@ -144,6 +145,7 @@ impl<'a> System<'a> for Sys {
skill_set.modify_energy = false; 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();

View File

@ -66,9 +66,12 @@ mod tests {
.with(body) .with(body)
.with(Energy::new( .with(Energy::new(
body, body,
0,
/*
skill_set skill_set
.skill_level(Skill::General(GeneralSkill::EnergyIncrease)) .skill_level(Skill::General(GeneralSkill::EnergyIncrease))
.unwrap_or(0), .unwrap_or(0),
*/
)) ))
.with(Controller::default()) .with(Controller::default())
.with(Poise::new(body)) .with(Poise::new(body))

View File

@ -133,9 +133,12 @@ pub fn create_player(state: &mut State) -> Entity {
.with(Auras::default()) .with(Auras::default())
.with(Energy::new( .with(Energy::new(
body, body,
0,
/*
skill_set skill_set
.skill_level(Skill::General(GeneralSkill::EnergyIncrease)) .skill_level(Skill::General(GeneralSkill::EnergyIncrease))
.unwrap_or(0), .unwrap_or(0),
*/
)) ))
.with(Health::new(body, body.base_health())) .with(Health::new(body, body.base_health()))
.with(skill_set) .with(skill_set)

View File

@ -301,9 +301,12 @@ impl StateExt for State {
.with(body) .with(body)
.with(comp::Energy::new( .with(comp::Energy::new(
body, body,
0,
/*
skill_set skill_set
.skill_level(Skill::General(GeneralSkill::EnergyIncrease)) .skill_level(Skill::General(GeneralSkill::EnergyIncrease))
.unwrap_or(0), .unwrap_or(0),
*/
)) ))
.with(stats) .with(stats)
.with(if body.is_humanoid() { .with(if body.is_humanoid() {
@ -734,6 +737,7 @@ 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) = ( let (health_level, energy_level) = (
skill_set skill_set
.skill_level(Skill::General(GeneralSkill::HealthIncrease)) .skill_level(Skill::General(GeneralSkill::HealthIncrease))
@ -742,8 +746,9 @@ impl StateExt for State {
.skill_level(Skill::General(GeneralSkill::EnergyIncrease)) .skill_level(Skill::General(GeneralSkill::EnergyIncrease))
.unwrap_or(0), .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, comp::Health::new(body, 0));
self.write_component_ignore_entity_dead(entity, comp::Energy::new(body, 0));
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 +783,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 +793,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, 0)),
Poise::new(body), Poise::new(body),
Inventory::with_loadout( Inventory::with_loadout(
LoadoutBuilder::from_default(&body).build(), LoadoutBuilder::from_default(&body).build(),

View File

@ -498,10 +498,12 @@ impl SpawnEntityData {
inventory inventory
}; };
/*
let health_level = skill_set let health_level = skill_set
.skill_level(skills::Skill::General(skills::GeneralSkill::HealthIncrease)) .skill_level(skills::Skill::General(skills::GeneralSkill::HealthIncrease))
.unwrap_or(0); .unwrap_or(0);
let health = Some(comp::Health::new(body, health_level)); */
let health = Some(comp::Health::new(body, 0));
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

View File

@ -1,3 +1,4 @@
#![allow(deprecated)]
use super::{ use super::{
img_ids::{Imgs, ImgsRot}, img_ids::{Imgs, ImgsRot},
item_imgs::{animate_by_pulse, ItemImgs}, item_imgs::{animate_by_pulse, ItemImgs},
@ -1419,14 +1420,17 @@ 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), SkillIcon::Descriptive {
title: "hud-skill-health_title",
desc: "hud-skill-health",
image: self.imgs.health_plus_skill, image: self.imgs.health_plus_skill,
position: MidTopWithMarginOn(state.ids.skills_top_l[0], 3.0), position: MidTopWithMarginOn(state.ids.skills_top_l[0], 3.0),
id: state.ids.skill_general_stat_0, id: state.ids.skill_general_stat_0,
}, },
SkillIcon::Unlockable { SkillIcon::Descriptive {
skill: Skill::General(EnergyIncrease), title: "hud-skill-energy_title",
desc: "hud-skill-energy",
image: self.imgs.energy_plus_skill, image: self.imgs.energy_plus_skill,
position: MidTopWithMarginOn(state.ids.skills_top_l[1], 3.0), position: MidTopWithMarginOn(state.ids.skills_top_l[1], 3.0),
id: state.ids.skill_general_stat_1, id: state.ids.skill_general_stat_1,
@ -2849,7 +2853,9 @@ 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::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),
@ -2866,6 +2872,7 @@ fn skill_strings(skill: Skill) -> SkillStrings<'static> {
} }
} }
/*
fn general_skill_strings(skill: GeneralSkill) -> SkillStrings<'static> { fn general_skill_strings(skill: GeneralSkill) -> SkillStrings<'static> {
match skill { match skill {
GeneralSkill::HealthIncrease => SkillStrings::with_const( GeneralSkill::HealthIncrease => SkillStrings::with_const(
@ -2880,6 +2887,7 @@ fn general_skill_strings(skill: GeneralSkill) -> SkillStrings<'static> {
), ),
} }
} }
*/
fn unlock_skill_strings(group: SkillGroupKind) -> SkillStrings<'static> { fn unlock_skill_strings(group: SkillGroupKind) -> SkillStrings<'static> {
match group { match group {