halved ac-bonus from dex

This commit is contained in:
Llywelwyn 2023-08-21 00:58:19 +01:00
parent 91c2972935
commit 07fd9ac377
4 changed files with 7 additions and 3 deletions

View file

@ -2,8 +2,12 @@
{ {
"id": "equipment", "id": "equipment",
"table": [ "table": [
{ "id": "equip_pitchfork", "weight": 1, "difficulty": 1},
{ "id": "equip_sickle", "weight": 1, "difficulty": 1},
{ "id": "equip_handaxe", "weight": 1, "difficulty": 1},
{ "id": "equip_dagger", "weight": 3, "difficulty": 1}, { "id": "equip_dagger", "weight": 3, "difficulty": 1},
{ "id": "equip_shortsword", "weight": 3, "difficulty": 1}, { "id": "equip_shortsword", "weight": 3, "difficulty": 1},
{ "id": "equip_rapier", "weight": 2, "difficulty": 1},
{ "id": "equip_smallshield", "weight": 3, "difficulty": 1}, { "id": "equip_smallshield", "weight": 3, "difficulty": 1},
{ "id": "equip_mediumshield", "weight": 2, "difficulty": 1}, { "id": "equip_mediumshield", "weight": 2, "difficulty": 1},
{ "id": "equip_body_weakleather", "weight": 4, "difficulty": 1}, { "id": "equip_body_weakleather", "weight": 4, "difficulty": 1},

View file

@ -102,7 +102,7 @@ pub fn draw_ui(ecs: &World, ctx: &mut Rltk) {
armour_ac_bonus += ac.amount; armour_ac_bonus += ac.amount;
} }
} }
let armour_class = stats.bac - attributes.dexterity.bonus - skill_ac_bonus - armour_ac_bonus; let armour_class = stats.bac - (attributes.dexterity.bonus / 2) - skill_ac_bonus - armour_ac_bonus;
ctx.print_color(26, 53, RGB::named(rltk::PINK), RGB::named(rltk::BLACK), "AC"); ctx.print_color(26, 53, RGB::named(rltk::PINK), RGB::named(rltk::BLACK), "AC");
ctx.print_color(28, 53, RGB::named(rltk::WHITE), RGB::named(rltk::BLACK), armour_class); ctx.print_color(28, 53, RGB::named(rltk::WHITE), RGB::named(rltk::BLACK), armour_class);
// Draw level // Draw level

View file

@ -228,7 +228,7 @@ fn get_starting_inventory(class: Classes, rng: &mut RandomNumberGenerator) -> (V
carried = vec!["food_rations".to_string()]; carried = vec!["food_rations".to_string()];
} }
Classes::Rogue => { Classes::Rogue => {
equipped = vec!["equip_rapier".to_string(), "equip_body_leather".to_string()]; equipped = vec!["equip_rapier".to_string(), "equip_body_weakleather".to_string()];
carried = vec![ carried = vec![
"equip_dagger".to_string(), "equip_dagger".to_string(),
"equip_dagger".to_string(), "equip_dagger".to_string(),

View file

@ -141,7 +141,7 @@ impl<'a> System<'a> for MeleeCombatSystem {
// Get armour class // Get armour class
let bac = target_pools.bac; let bac = target_pools.bac;
let attribute_ac_bonus = target_attributes.dexterity.bonus; let attribute_ac_bonus = target_attributes.dexterity.bonus / 2;
let skill_ac_bonus = gamesystem::skill_bonus(Skill::Defence, &*target_skills); let skill_ac_bonus = gamesystem::skill_bonus(Skill::Defence, &*target_skills);
let mut armour_ac_bonus = 0; let mut armour_ac_bonus = 0;
for (wielded, ac) in (&equipped, &ac).join() { for (wielded, ac) in (&equipped, &ac).join() {