diff --git a/code/__DEFINES/~darkpack/storyteller_stats.dm b/code/__DEFINES/~darkpack/storyteller_stats.dm index 7e384fd4aaf8..9b066f82cc47 100644 --- a/code/__DEFINES/~darkpack/storyteller_stats.dm +++ b/code/__DEFINES/~darkpack/storyteller_stats.dm @@ -1,7 +1,5 @@ // Stat Flags -#define AFFECTS_HEALTH (1<<0) -#define AFFECTS_SPEED (1<<1) -#define AFFECTS_STATS (1<<2) // If the stat affects other stats, like courage or permanent willpower. +#define AFFECTS_STATS (1<<0) // If the stat affects other stats, like courage or permanent willpower. #define STAT_FREEBIE_POINTS /datum/st_stat/freebie diff --git a/code/controllers/subsystem/ticker.dm b/code/controllers/subsystem/ticker.dm index 82b0c4d396b4..f143d3bf327b 100644 --- a/code/controllers/subsystem/ticker.dm +++ b/code/controllers/subsystem/ticker.dm @@ -374,6 +374,7 @@ SUBSYSTEM_DEF(ticker) iter_human.increment_scar_slot() iter_human.load_persistent_scars() iter_human.load_guestbook() // DARKPACK EDIT ADD + iter_human.update_soak() // DARKPACK EDIT ADDITION if(!iter_human.hardcore_survival_score) continue diff --git a/code/modules/mob/dead/new_player/new_player.dm b/code/modules/mob/dead/new_player/new_player.dm index 9d8977e9cf9f..92d635270e01 100644 --- a/code/modules/mob/dead/new_player/new_player.dm +++ b/code/modules/mob/dead/new_player/new_player.dm @@ -256,7 +256,9 @@ humanc.increment_scar_slot() humanc.load_persistent_scars() + humanc.load_guestbook() // DARKPACK EDIT ADD + humanc.update_soak() // DARKPACK EDIT ADDITION if(GLOB.curse_of_madness_triggered) give_madness(humanc, GLOB.curse_of_madness_triggered) diff --git a/code/modules/mob/living/basic/lavaland/goliath/goliath.dm b/code/modules/mob/living/basic/lavaland/goliath/goliath.dm index 6aef2570060d..a4aee0cf99c8 100644 --- a/code/modules/mob/living/basic/lavaland/goliath/goliath.dm +++ b/code/modules/mob/living/basic/lavaland/goliath/goliath.dm @@ -94,7 +94,7 @@ . += span_info("Someone appears to have attached a saddle to this one.") // Goliaths can summon tentacles more frequently as they take damage, scary. -/mob/living/basic/mining/goliath/apply_damage(damage, damagetype, def_zone, blocked, forced, spread_damage, wound_bonus, exposed_wound_bonus, sharpness, attack_direction, attacking_item, wound_clothing) +/mob/living/basic/mining/goliath/apply_damage(damage, damagetype, def_zone, blocked, forced, spread_damage, wound_bonus, exposed_wound_bonus, sharpness, attack_direction, attacking_item, wound_clothing, soak_difficulty = 6, unsoakable = FALSE) // DARKPACK EDIT CHANGE - (soak) . = ..() if (. <= 0) return diff --git a/code/modules/mob/living/carbon/damage_procs.dm b/code/modules/mob/living/carbon/damage_procs.dm index 874e0f96d736..f1aca8c39e1b 100644 --- a/code/modules/mob/living/carbon/damage_procs.dm +++ b/code/modules/mob/living/carbon/damage_procs.dm @@ -11,7 +11,10 @@ attack_direction = null, attacking_item, wound_clothing = TRUE, -) + soak_difficulty = 6, + unsoakable = FALSE, +) // DARKPACK EDIT CHANGE - (soak) + // Spread damage should always have def zone be null if(spread_damage) def_zone = null @@ -35,6 +38,7 @@ var/species_mod = (100 - dna.species.damage_modifier) / 100 return ..() * species_mod + /mob/living/carbon/human/apply_damage( damage = 0, damagetype = BRUTE, @@ -48,7 +52,9 @@ attack_direction = null, attacking_item, wound_clothing = TRUE, -) + soak_difficulty = 6, + unsoakable = FALSE, +) // DARKPACK EDIT CHANGE - (soak) // Add relevant DR modifiers into blocked value to pass to parent blocked += physiology?.damage_resistance diff --git a/code/modules/mob/living/damage_procs.dm b/code/modules/mob/living/damage_procs.dm index 61850f26f10a..ef3412ccd64d 100644 --- a/code/modules/mob/living/damage_procs.dm +++ b/code/modules/mob/living/damage_procs.dm @@ -17,6 +17,8 @@ * * attack_direction - Direction of the attack from the attacker to [src]. * * attacking_item - Item that is attacking [src]. * * wound_clothing - If this should cause damage to clothing. + * * soak_difficulty - The difficulty of soaking an attack. Base is 6, adjusted by some unique effects, rare disciplines, and more. Only reference this if you've used the proper path and checked iscarbon() for apply_damage() or it'll throw up errors. + * * unsoakable - Whether an attack is soakable or not. By default off, some damage types and specific effects are unsoakable. * * Returns the amount of damage dealt. */ @@ -33,8 +35,14 @@ attack_direction = null, attacking_item, wound_clothing = TRUE, -) + soak_difficulty = 6, + unsoakable = FALSE, +) // DARKPACK EDIT CHANGE - (soak) SHOULD_CALL_PARENT(TRUE) + + if(!forced && unsoakable == FALSE) //If the damage isn't forced and isn't unsoakable, run it through the soak proc. Soak runs before damage mods. + damage = soak_roll(damage, damagetype, def_zone, sharpness, attacking_item, soak_difficulty) + var/damage_amount = damage if(!forced) damage_amount *= ((100 - blocked) / 100) @@ -580,3 +588,55 @@ break if(. && update_health) updatehealth() + +// DARKPACK EDIT ADD START - (soak) +/mob/living/proc/soak_roll( + damage = 0, + damagetype = BRUTE, + def_zone = null, + sharpness = NONE, + attacking_item, + soak_difficulty = 6) + + var/roll_used = soak_dice_bashing + switch(damagetype) + if(BRUTE) + if(isprojectile(attacking_item)) + if(get_kindred_splat(src) && !def_zone == HEAD) + roll_used = soak_dice_bashing //Kindred take bullets as bashing unless they're to the head. + else + roll_used = soak_dice_lethal //Otherwise it's lethal damage. + else if(!sharpness == NONE) + roll_used = soak_dice_lethal //Sharp or piercing objects deal lethal to every splat. + else + roll_used = soak_dice_bashing //Everything else should take Bashing. + if(BURN) + roll_used = soak_dice_aggravated //Burning is always Agg. + if(TOX) + roll_used = soak_dice_lethal //Poisons can vary from Bashing to Lethal, but the vast majority are Lethal. + if(OXY) + roll_used = 0 //Oxygen damage is applied automatically and cannot be soaked. + if(STAMINA) + roll_used = soak_dice_bashing //Stamina damage is a little weird, but as per exhaustion rules for rituals and the like, you can soak it like Bashing. Not too sure about it though. + if(BRAIN) + roll_used = soak_dice_lethal //Not many situations where you'd take direct brain damage really, but it'd be lethal in this case. + if(AGGRAVATED) + roll_used = soak_dice_aggravated //Well, obviously. + + if(roll_used < 1) + return damage //Skip the roll if it can't be soaked. Covers negative numbers too, in case of edge cases. + + var/datum/storyteller_roll/soak/soak_roll = new() + + soak_roll.difficulty = soak_difficulty //Overrides difficulty for adjustments when soak difficulty is different. + var/successes = soak_roll.st_roll(src, src, roll_used) + + if(successes > 0) + damage = (max(0, damage - (successes * (1 TTRPG_DAMAGE)))) + to_chat(src, span_warning("You stand firm and are able to absorb some of the damage!")) + + return damage + +/mob/living/proc/update_soak() //Pretty basic calculation for the average entity, soak is Bashing only using Stamina. + soak_dice_bashing = st_get_stat(STAT_STAMINA) +// DARKPACK EDIT ADD END diff --git a/code/modules/mob/living/silicon/robot/robot_defense.dm b/code/modules/mob/living/silicon/robot/robot_defense.dm index b3c899b25421..a029e80a3c13 100644 --- a/code/modules/mob/living/silicon/robot/robot_defense.dm +++ b/code/modules/mob/living/silicon/robot/robot_defense.dm @@ -537,7 +537,7 @@ GLOBAL_LIST_INIT(blacklisted_borg_hats, typecacheof(list( //Hats that don't real . = TRUE return ..() || . -/mob/living/silicon/robot/apply_damage(damage, damagetype, def_zone, blocked, forced, spread_damage, wound_bonus, exposed_wound_bonus, sharpness, attack_direction, attacking_item, wound_clothing) +/mob/living/silicon/robot/apply_damage(damage, damagetype, def_zone, blocked, forced, spread_damage, wound_bonus, exposed_wound_bonus, sharpness, attack_direction, attacking_item, wound_clothing, soak_difficulty = 6, unsoakable = FALSE) // DARKPACK EDIT CHANGE - (soak) var/mob/living/silicon/robot/borg = src var/obj/item/shield_module/shield = locate() in borg if(!shield) diff --git a/code/modules/unit_tests/baton.dm b/code/modules/unit_tests/baton.dm index 8b27b4d9ca30..fe610bc2dadc 100644 --- a/code/modules/unit_tests/baton.dm +++ b/code/modules/unit_tests/baton.dm @@ -15,6 +15,7 @@ /datum/unit_test/baton/Run() var/mob/living/carbon/human/consistent/secoff = EASY_ALLOCATE() var/mob/living/carbon/human/consistent/tider = EASY_ALLOCATE() + tider.st_set_stat(STAT_STAMINA, 0) // DARKPACK EDIT ADD //Avoids reading as broken because damage was soaked. ADD_TRAIT(secoff, TRAIT_PERFECT_ATTACKER, TRAIT_SOURCE_UNIT_TESTS) var/obj/item/melee/baton/stun_baton = allocate(baton_type) diff --git a/code/modules/unit_tests/combat.dm b/code/modules/unit_tests/combat.dm index 113abac1339c..7ab03e612430 100644 --- a/code/modules/unit_tests/combat.dm +++ b/code/modules/unit_tests/combat.dm @@ -3,6 +3,7 @@ var/mob/living/carbon/human/victim = allocate(/mob/living/carbon/human/consistent) puncher.st_set_stat(STAT_STRENGTH, 1) // DARKPACK EDIT ADD + victim.st_set_stat(STAT_STAMINA, 0) // DARKPACK EDIT ADD //Avoids reading as broken because damage was soaked. // Avoid all randomness in tests ADD_TRAIT(puncher, TRAIT_PERFECT_ATTACKER, INNATE_TRAIT) @@ -16,6 +17,9 @@ var/mob/living/carbon/human/victim = allocate(/mob/living/carbon/human/consistent) var/obj/item/storage/toolbox/toolbox = allocate(/obj/item/storage/toolbox) + + victim.st_set_stat(STAT_STAMINA, 0) // DARKPACK EDIT ADD //Avoids reading as broken because damage was soaked. + tider.put_in_active_hand(toolbox, forced = TRUE) tider.set_combat_mode(TRUE) victim.attackby(toolbox, tider) @@ -27,6 +31,8 @@ var/mob/living/carbon/human/victim = allocate(/mob/living/carbon/human/consistent) var/obj/item/weldingtool/welding_tool = allocate(/obj/item/weldingtool) + victim.st_set_stat(STAT_STAMINA, 0) // DARKPACK EDIT ADD //Prevents potential issue with soak absorbing hit and causing this to fail to runtime properly. + attacker.put_in_active_hand(welding_tool, forced = TRUE) attacker.set_combat_mode(TRUE) @@ -106,6 +112,7 @@ /datum/unit_test/self_punch/Run() var/mob/living/carbon/human/dummy = allocate(/mob/living/carbon/human/consistent) + dummy.st_set_stat(STAT_STAMINA, 0) // DARKPACK EDIT ADD //Avoids reading as broken because damage was soaked. ADD_TRAIT(dummy, TRAIT_PERFECT_ATTACKER, TRAIT_SOURCE_UNIT_TESTS) dummy.set_combat_mode(TRUE) dummy.ClickOn(dummy) @@ -119,6 +126,7 @@ var/mob/living/carbon/human/victim = allocate(/mob/living/carbon/human/consistent) ADD_TRAIT(attacker, TRAIT_PERFECT_ATTACKER, TRAIT_SOURCE_UNIT_TESTS) ADD_TRAIT(attacker, TRAIT_HANDS_BLOCKED, TRAIT_SOURCE_UNIT_TESTS) + victim.st_set_stat(STAT_STAMINA, 0) // DARKPACK EDIT ADD //Prevents potential issue with soak absorbing hit and causing this to fail to runtime properly. attacker.set_combat_mode(TRUE) attacker.ClickOn(victim) TEST_ASSERT_EQUAL(victim.get_brute_loss(), 0, "Victim took brute damage from being punched by a handcuffed attacker") @@ -133,6 +141,7 @@ /datum/unit_test/handcuff_bite/Run() var/mob/living/carbon/human/attacker = allocate(/mob/living/carbon/human/consistent) var/mob/living/carbon/human/victim = allocate(/mob/living/carbon/human/consistent) + victim.st_set_stat(STAT_STAMINA, 0) // DARKPACK EDIT ADD //Avoids reading as broken because damage was soaked. ADD_TRAIT(attacker, TRAIT_PERFECT_ATTACKER, TRAIT_SOURCE_UNIT_TESTS) ADD_TRAIT(attacker, TRAIT_HANDS_BLOCKED, TRAIT_SOURCE_UNIT_TESTS) attacker.set_combat_mode(TRUE) diff --git a/code/modules/unit_tests/combat_blocking.dm b/code/modules/unit_tests/combat_blocking.dm index 17e2da816db4..457fe65be1b5 100644 --- a/code/modules/unit_tests/combat_blocking.dm +++ b/code/modules/unit_tests/combat_blocking.dm @@ -9,6 +9,7 @@ victim.put_in_active_hand(chair, forced = TRUE) attacker.set_combat_mode(TRUE) ADD_TRAIT(attacker, TRAIT_PERFECT_ATTACKER, TRAIT_SOURCE_UNIT_TESTS) + victim.st_set_stat(STAT_STAMINA, 0) // DARKPACK EDIT ADD //Prevents potential issue with soak absorbing hit and causing this to fail to runtime properly. click_wrapper(attacker, victim) TEST_ASSERT_EQUAL(victim.get_brute_loss(), 0, "Victim took damage from being punched despite having a 100% block chance chair in their hands.") @@ -24,6 +25,7 @@ victim.put_in_active_hand(shield, forced = TRUE) attacker.set_combat_mode(TRUE) ADD_TRAIT(attacker, TRAIT_PERFECT_ATTACKER, TRAIT_SOURCE_UNIT_TESTS) + victim.st_set_stat(STAT_STAMINA, 0) // DARKPACK EDIT ADD //Prevents potential issue with soak absorbing hit and causing this to fail to runtime properly. click_wrapper(attacker, victim) TEST_ASSERT_EQUAL(victim.get_brute_loss(), 0, "Victim took damage from being punched despite having a 100% block chance shield in their hands.") diff --git a/code/modules/unit_tests/combat_eyestab.dm b/code/modules/unit_tests/combat_eyestab.dm index d065607bec2b..4e97802a4c94 100644 --- a/code/modules/unit_tests/combat_eyestab.dm +++ b/code/modules/unit_tests/combat_eyestab.dm @@ -6,6 +6,8 @@ var/mob/living/carbon/human/consistent/victim = EASY_ALLOCATE() var/obj/item/screwdriver/stabber = EASY_ALLOCATE() + victim.st_set_stat(STAT_STAMINA, 0) // DARKPACK EDIT ADD //Avoids reading as broken because damage was soaked. + attacker.zone_selected = BODY_ZONE_PRECISE_EYES attacker.put_in_active_hand(stabber, forced = TRUE) diff --git a/code/modules/unit_tests/combat_pistol_whip.dm b/code/modules/unit_tests/combat_pistol_whip.dm index f67a57f9841a..7d70f2ac2a0c 100644 --- a/code/modules/unit_tests/combat_pistol_whip.dm +++ b/code/modules/unit_tests/combat_pistol_whip.dm @@ -8,6 +8,7 @@ attacker.put_in_active_hand(gun, forced = TRUE) victim.forceMove(locate(attacker.x + 1, attacker.y, attacker.z)) + victim.st_set_stat(STAT_STAMINA, 0) // DARKPACK EDIT ADD //Avoids reading as broken because damage was soaked. var/expected_ammo = gun.magazine.max_ammo + 1 // These assertions are just here because I don't understand gun code diff --git a/code/modules/unit_tests/explosion_action.dm b/code/modules/unit_tests/explosion_action.dm index 6e9abb3c2dc9..e495bf69359a 100644 --- a/code/modules/unit_tests/explosion_action.dm +++ b/code/modules/unit_tests/explosion_action.dm @@ -23,6 +23,7 @@ var/mob/living/simple_animal/test_simple_animal = allocate(/mob/living/simple_animal) test_simple_animal.maxHealth = MAX_LIVING_HEALTH test_simple_animal.health = MAX_LIVING_HEALTH + test_simple_animal.st_set_stat(STAT_STAMINA, 0) // DARKPACK EDIT ADD //Avoids reading as broken because damage was soaked. EX_ACT(test_simple_animal, EXPLODE_NONE) // should do nothing. TEST_ASSERT_EQUAL(test_simple_animal.health, MAX_LIVING_HEALTH, "EX_ACT() with EXPLODE_NONE severity should not affect the health of a simple animal! Something has gone terribly wrong!") @@ -62,6 +63,8 @@ var/mob/living/carbon/alien/test_alien = allocate(/mob/living/carbon/alien) test_alien.maxHealth = MAX_LIVING_HEALTH test_alien.health = MAX_LIVING_HEALTH + test_alien.st_set_stat(STAT_STAMINA, 0) // DARKPACK EDIT ADD //Avoids reading as broken because damage was soaked. + EX_ACT(test_alien, EXPLODE_NONE) // should do nothing. read_alien_damages(test_alien) @@ -84,6 +87,7 @@ // Let's check to make sure the armor system works as expected. Corgi dogs are the only one that have this implemented on the basic level, so let's use that. var/mob/living/basic/pet/dog/corgi/test_dog = set_up_test_dog() + test_dog.st_set_stat(STAT_STAMINA, 0) // DARKPACK EDIT ADD //Avoids reading as broken because damage was soaked. // those two items should give us a 100% armor rating, so let's test that to make sure it works (all ex_act checks should now be prob(100)), no room for error. EX_ACT(test_dog, EXPLODE_LIGHT) // should do 20 damage (basic animals do a prob() check based on the armor rating, and divide the expected brute loss by 1.5). diff --git a/code/modules/unit_tests/hulk.dm b/code/modules/unit_tests/hulk.dm index aed8c1459062..6467d5a3f5f9 100644 --- a/code/modules/unit_tests/hulk.dm +++ b/code/modules/unit_tests/hulk.dm @@ -7,6 +7,7 @@ var/mob/living/carbon/human/hulk = allocate(/mob/living/carbon/human/consistent) var/mob/living/carbon/human/dummy = allocate(/mob/living/carbon/human/consistent) + dummy.st_set_stat(STAT_STAMINA, 0) // DARKPACK EDIT ADD //Avoids reading as broken because damage was soaked. RegisterSignal(dummy, COMSIG_ATOM_HULK_ATTACK, PROC_REF(hulk_sig_fire)) RegisterSignal(dummy, COMSIG_ATOM_ATTACK_HAND, PROC_REF(hand_sig_fire)) diff --git a/code/modules/unit_tests/human_through_recycler.dm b/code/modules/unit_tests/human_through_recycler.dm index 1f62a022c05c..19240d25abde 100644 --- a/code/modules/unit_tests/human_through_recycler.dm +++ b/code/modules/unit_tests/human_through_recycler.dm @@ -8,6 +8,8 @@ var/turf/open/stage = get_turf(chewer) assistant.forceMove(stage) // put the assistant in the recycler, to ensure that the recycler still registers incoming input. + assistant.st_set_stat(STAT_STAMINA, 0) // DARKPACK EDIT ADD //Avoids reading as broken because damage was soaked. + // okay, let's first test the basics of how an emagged recycler should operate TEST_ASSERT_NULL(QDELETED(assistant), "Assistant was deleted by the emagged recycler!") // The assistant should not be deleted by the recycler. if(assistant.stat < UNCONSCIOUS) diff --git a/code/modules/unit_tests/liver.dm b/code/modules/unit_tests/liver.dm index 2b24997c28ac..fc5b851fdd51 100644 --- a/code/modules/unit_tests/liver.dm +++ b/code/modules/unit_tests/liver.dm @@ -16,6 +16,8 @@ TEST_ASSERT_EQUAL(mrbones.has_reagent(/datum/reagent/toxin/bonehurtingjuice), FALSE, "Skeleton somehow has bone hurting juice before drinking") TEST_ASSERT_EQUAL(mrbones.has_reagent(/datum/reagent/consumable/milk), FALSE, "Skeleton somehow has milk before drinking") + mrbones.st_set_stat(STAT_STAMINA, 0) // DARKPACK EDIT ADD //Avoids reading as broken because damage was soaked. + // Test bone hurting juice reactions mrbones.reagents.add_reagent(bonehurting, 40) diff --git a/code/modules/unit_tests/medical_wounds.dm b/code/modules/unit_tests/medical_wounds.dm index 161492a726a9..0e588637b166 100644 --- a/code/modules/unit_tests/medical_wounds.dm +++ b/code/modules/unit_tests/medical_wounds.dm @@ -1,6 +1,7 @@ /// This test is used to make sure a flesh-and-bone base human can suffer all the types of wounds, and that suffering more severe wounds removes and replaces the lesser wound. Also tests that [/mob/living/carbon/proc/fully_heal] removes all wounds /datum/unit_test/test_human_base/Run() var/mob/living/carbon/human/victim = allocate(/mob/living/carbon/human/consistent) + victim.st_set_stat(STAT_STAMINA, 0) // DARKPACK EDIT ADD //Avoids reading as broken because damage was soaked. /// the limbs have no wound resistance like the chest and head do, so let's go with the r_arm var/obj/item/bodypart/tested_part = victim.get_bodypart(BODY_ZONE_R_ARM) diff --git a/code/modules/unit_tests/mob_damage.dm b/code/modules/unit_tests/mob_damage.dm index 21e723282129..499f83faea61 100644 --- a/code/modules/unit_tests/mob_damage.dm +++ b/code/modules/unit_tests/mob_damage.dm @@ -10,6 +10,7 @@ SSmobs.pause() var/mob/living/carbon/human/dummy = allocate(/mob/living/carbon/human/consistent) dummy.maxHealth = 200 // tank mode + dummy.st_set_stat(STAT_STAMINA, 0) // DARKPACK EDIT ADD //Avoids reading as broken because damage was soaked. /* The sanity tests: here we make sure that: 1) That damage procs are returning the expected values. They should be returning the actual amount of damage taken/healed. diff --git a/code/modules/unit_tests/tail_wag.dm b/code/modules/unit_tests/tail_wag.dm index 03b921ac01bc..de7d01101232 100644 --- a/code/modules/unit_tests/tail_wag.dm +++ b/code/modules/unit_tests/tail_wag.dm @@ -7,6 +7,7 @@ var/mob/living/carbon/human/dummy = allocate(/mob/living/carbon/human/consistent) var/obj/item/organ/tail/cat/dummy_tail = allocate(/obj/item/organ/tail/cat) dummy_tail.Insert(dummy, special = TRUE, movement_flags = DELETE_IF_REPLACED) + dummy.st_set_stat(STAT_STAMINA, 0) // DARKPACK EDIT ADD //Avoids reading as broken because damage was soaked. // SANITY TEST diff --git a/modular_darkpack/master_files/code/modules/mob/living/carbon/carbon_defines.dm b/modular_darkpack/master_files/code/modules/mob/living/carbon/carbon_defines.dm index 1c3c3d17781d..903c68e3c056 100644 --- a/modular_darkpack/master_files/code/modules/mob/living/carbon/carbon_defines.dm +++ b/modular_darkpack/master_files/code/modules/mob/living/carbon/carbon_defines.dm @@ -8,4 +8,3 @@ var/fakediablerist = FALSE var/can_be_embraced = TRUE - diff --git a/modular_darkpack/master_files/code/modules/mob/living/carbon/human/human.dm b/modular_darkpack/master_files/code/modules/mob/living/carbon/human/human.dm index f78afb1a0081..0e285070ff59 100644 --- a/modular_darkpack/master_files/code/modules/mob/living/carbon/human/human.dm +++ b/modular_darkpack/master_files/code/modules/mob/living/carbon/human/human.dm @@ -33,3 +33,35 @@ . = ..() + +/mob/living/carbon/human/update_soak() //Fairly complex list here. Kindred can soak lethal with Stamina, and Agg with Fortitude. Garou can soak everything in every form except their breed form, in which they can only soak Lethal and Bashing. + . = ..() + if(get_kindred_splat(src)) + soak_dice_bashing = st_get_stat(STAT_STAMINA) //Stamina already has the Fortitude bonus added for Bashing and Lethal. + soak_dice_lethal = st_get_stat(STAT_STAMINA) + soak_dice_aggravated = 0 //Reset it beforehand in case you had leftover agg dice. + var/datum/discipline/soak_visceratika = get_discipline(/datum/discipline/visceratika) + var/datum/discipline/soak_fortitude = get_discipline(/datum/discipline/fortitude) + if(soak_visceratika && soak_visceratika.level >= 4) + soak_dice_aggravated += 1 //1 Agg and Lethal soak, 2 Bashing from Armour of Terra. + soak_dice_lethal += 1 + soak_dice_bashing += 2 + if(soak_fortitude) + soak_dice_aggravated += soak_fortitude.level + + if(get_shifter_splat(src)) + soak_dice_bashing = st_get_stat(STAT_STAMINA) + soak_dice_lethal = st_get_stat(STAT_STAMINA) + var/datum/splat/werewolf/shifter/shifter_splat = get_shifter_splat(src) + if(shifter_splat.is_breed_form() && (shifter_splat.get_breed_form_species() != /datum/species/human/shifter/war)) //Garou don't soak Agg in breed form except for Crinos-born. Adjustment will need to be added once Corax are in for their +2 bashing soak diff. + soak_dice_aggravated = 0 + return + soak_dice_aggravated = st_get_stat(STAT_STAMINA) + + if(get_ghoul_splat(src)) + soak_dice_lethal = st_get_stat(STAT_STAMINA) //Ghouls and Revenants, V20, Page 42 + var/datum/discipline/soak_fortitude = src.get_discipline(/datum/discipline/fortitude) + if(!soak_fortitude) + return + soak_dice_lethal += soak_fortitude.level //Ghouls can soak lethal and agg via fortitude. + soak_dice_aggravated = soak_fortitude.level diff --git a/modular_darkpack/master_files/code/modules/mob/living/living_defines.dm b/modular_darkpack/master_files/code/modules/mob/living/living_defines.dm index c4fa9ff11c8d..08d3151f8d1b 100644 --- a/modular_darkpack/master_files/code/modules/mob/living/living_defines.dm +++ b/modular_darkpack/master_files/code/modules/mob/living/living_defines.dm @@ -53,3 +53,8 @@ //thaumaturgy & necro path stuff var/research_points = 0 var/collected_souls = 0 + + // The number of dice available to soak bashing, lethal, and aggravated damage + var/soak_dice_bashing = 0 + var/soak_dice_lethal = 0 + var/soak_dice_aggravated = 0 diff --git a/modular_darkpack/modules/npc/code/human/socialroles/__socialrole.dm b/modular_darkpack/modules/npc/code/human/socialroles/__socialrole.dm index e0044c436c31..fdf5dd98f3a8 100644 --- a/modular_darkpack/modules/npc/code/human/socialroles/__socialrole.dm +++ b/modular_darkpack/modules/npc/code/human/socialroles/__socialrole.dm @@ -241,8 +241,6 @@ fully_replace_character_name(name, real_name) - maxHealth = round(initial(maxHealth)+(initial(maxHealth)/3)*(st_get_stat(STAT_STAMINA))) - health = round(initial(health)+(initial(health)/3)*(st_get_stat(STAT_STAMINA))) last_health = health is_criminal = socialrole.is_criminal diff --git a/modular_darkpack/modules/powers/code/discipline/dominate/possession/possession_datums.dm b/modular_darkpack/modules/powers/code/discipline/dominate/possession/possession_datums.dm index fe6f156a4b71..57d888465a03 100644 --- a/modular_darkpack/modules/powers/code/discipline/dominate/possession/possession_datums.dm +++ b/modular_darkpack/modules/powers/code/discipline/dominate/possession/possession_datums.dm @@ -68,7 +68,7 @@ if(mortal.mind) vamp.mind = mortal.mind - vamp.adjust_brute_loss(50) + vamp.apply_damage(50) vamp.visible_message(span_danger("[vamp] suddenly convulses violently and falls into what appears to be a coma!")) to_chat(vamp, span_boldwarning("The psychic shock of your host's death sends you into torpor!")) vamp.torpor(DAMAGE_TRAIT) diff --git a/modular_darkpack/modules/powers/code/discipline/fortitude/fortitude.dm b/modular_darkpack/modules/powers/code/discipline/fortitude/fortitude.dm index b0fc61089dc7..7ef632a73de7 100644 --- a/modular_darkpack/modules/powers/code/discipline/fortitude/fortitude.dm +++ b/modular_darkpack/modules/powers/code/discipline/fortitude/fortitude.dm @@ -7,14 +7,24 @@ /datum/discipline_power/fortitude name = "Fortitude power name" desc = "Fortitude power description" + vitae_cost = 0 //Passive only, only keeping the discipline_power effects for the stamina boosts. activate_sound = 'modular_darkpack/modules/powers/sounds/fortitude_activate.ogg' deactivate_sound = 'modular_darkpack/modules/powers/sounds/fortitude_deactivate.ogg' +/datum/discipline_power/fortitude/activate() //Override base calls. + SHOULD_CALL_PARENT(FALSE) + return + +/datum/discipline_power/fortitude/deactivate() + SHOULD_CALL_PARENT(FALSE) + return + + //FORTITUDE 1 /datum/discipline_power/fortitude/one name = "Fortitude 1" - desc = "Harden your muscles. Become sturdier than the bodybuilders." + desc = "Harden your muscles. Become sturdier than the bodybuilders. No active effect." level = 1 @@ -30,21 +40,13 @@ /datum/discipline_power/fortitude/five ) -/datum/discipline_power/fortitude/one/activate() - . = ..() - owner.apply_status_effect(/datum/status_effect/fortitude/one) - -/datum/discipline_power/fortitude/one/deactivate() - . = ..() - owner.remove_status_effect(/datum/status_effect/fortitude/one) - /datum/discipline_power/fortitude/one/post_gain() owner.st_add_stat_mod(STAT_STAMINA, 1, "Fortitude") //FORTITUDE 2 /datum/discipline_power/fortitude/two name = "Fortitude 2" - desc = "Become as stone. Let nothing breach your protections." + desc = "Become as stone. Let nothing breach your protections. No active effect." level = 2 @@ -60,21 +62,13 @@ /datum/discipline_power/fortitude/five ) -/datum/discipline_power/fortitude/two/activate() - . = ..() - owner.apply_status_effect(/datum/status_effect/fortitude/two) - -/datum/discipline_power/fortitude/two/deactivate() - . = ..() - owner.remove_status_effect(/datum/status_effect/fortitude/two) - /datum/discipline_power/fortitude/two/post_gain() owner.st_add_stat_mod(STAT_STAMINA, 2, "Fortitude") //FORTITUDE 3 /datum/discipline_power/fortitude/three name = "Fortitude 3" - desc = "Look down upon those who would try to kill you. Shrug off grievous attacks." + desc = "Look down upon those who would try to kill you. Shrug off grievous attacks. No active effect." level = 3 @@ -90,21 +84,13 @@ /datum/discipline_power/fortitude/five ) -/datum/discipline_power/fortitude/three/activate() - . = ..() - owner.apply_status_effect(/datum/status_effect/fortitude/three) - -/datum/discipline_power/fortitude/three/deactivate() - . = ..() - owner.remove_status_effect(/datum/status_effect/fortitude/three) - /datum/discipline_power/fortitude/three/post_gain() owner.st_add_stat_mod(STAT_STAMINA, 3, "Fortitude") //FORTITUDE 4 /datum/discipline_power/fortitude/four name = "Fortitude 4" - desc = "Be like steel. Walk into fire and come out only singed." + desc = "Be like steel. Walk into fire and come out only singed. No active effect." level = 4 @@ -120,21 +106,13 @@ /datum/discipline_power/fortitude/five ) -/datum/discipline_power/fortitude/four/activate() - . = ..() - owner.apply_status_effect(/datum/status_effect/fortitude/four) - -/datum/discipline_power/fortitude/four/deactivate() - . = ..() - owner.remove_status_effect(/datum/status_effect/fortitude/four) - /datum/discipline_power/fortitude/four/post_gain() owner.st_add_stat_mod(STAT_STAMINA, 4, "Fortitude") //FORTITUDE 5 /datum/discipline_power/fortitude/five name = "Fortitude 5" - desc = "Reach the pinnacle of toughness. Never fear anything again." + desc = "Reach the pinnacle of toughness. Never fear anything again. No active effect." level = 5 @@ -150,13 +128,5 @@ /datum/discipline_power/fortitude/four ) -/datum/discipline_power/fortitude/five/activate() - . = ..() - owner.apply_status_effect(/datum/status_effect/fortitude/five) - -/datum/discipline_power/fortitude/five/deactivate() - . = ..() - owner.remove_status_effect(/datum/status_effect/fortitude/five) - /datum/discipline_power/fortitude/five/post_gain() owner.st_add_stat_mod(STAT_STAMINA, 5, "Fortitude") diff --git a/modular_darkpack/modules/powers/code/discipline/fortitude/fortitude_status_effect.dm b/modular_darkpack/modules/powers/code/discipline/fortitude/fortitude_status_effect.dm deleted file mode 100644 index 9322969bae80..000000000000 --- a/modular_darkpack/modules/powers/code/discipline/fortitude/fortitude_status_effect.dm +++ /dev/null @@ -1,105 +0,0 @@ -#define BASHING_LETHAL_PROTECTION 15 -#define AGGRAVATED_PROTECTION 10 - -/datum/status_effect/fortitude - // All IDs are the same to prevent stacking multiple Fortitude statuses - id = "fortitude" - status_type = STATUS_EFFECT_REPLACE - alert_type = null - - var/armor_type - -/datum/status_effect/fortitude/on_apply() - . = ..() - if (!.) - return - - if (ishuman(owner)) - var/mob/living/carbon/human/human_owner = owner - human_owner.physiology.armor = human_owner.physiology.armor.add_other_armor(armor_type) - -/datum/status_effect/fortitude/on_remove() - . = ..() - - if (ishuman(owner)) - var/mob/living/carbon/human/human_owner = owner - human_owner.physiology.armor = human_owner.physiology.armor.subtract_other_armor(armor_type) - -// Status effect ranks -/datum/status_effect/fortitude/one - armor_type = /datum/armor/fortitude1 - -/datum/armor/fortitude1 - acid = 1 * AGGRAVATED_PROTECTION - bio = 1 * AGGRAVATED_PROTECTION - bomb = 1 * BASHING_LETHAL_PROTECTION - bullet = 1 * BASHING_LETHAL_PROTECTION - consume = 1 * BASHING_LETHAL_PROTECTION - energy = 1 * BASHING_LETHAL_PROTECTION - laser = 1 * BASHING_LETHAL_PROTECTION - fire = 1 * AGGRAVATED_PROTECTION - melee = 1 * BASHING_LETHAL_PROTECTION - wound = 1 * BASHING_LETHAL_PROTECTION - -/datum/status_effect/fortitude/two - armor_type = /datum/armor/fortitude2 - -/datum/armor/fortitude2 - acid = 2 * AGGRAVATED_PROTECTION - bio = 2 * AGGRAVATED_PROTECTION - bomb = 2 * BASHING_LETHAL_PROTECTION - bullet = 2 * BASHING_LETHAL_PROTECTION - consume = 2 * BASHING_LETHAL_PROTECTION - energy = 2 * BASHING_LETHAL_PROTECTION - laser = 2 * BASHING_LETHAL_PROTECTION - fire = 2 * AGGRAVATED_PROTECTION - melee = 2 * BASHING_LETHAL_PROTECTION - wound = 2 * BASHING_LETHAL_PROTECTION - -/datum/status_effect/fortitude/three - armor_type = /datum/armor/fortitude3 - -/datum/armor/fortitude3 - acid = 3 * AGGRAVATED_PROTECTION - bio = 3 * AGGRAVATED_PROTECTION - bomb = 3 * BASHING_LETHAL_PROTECTION - bullet = 3 * BASHING_LETHAL_PROTECTION - consume = 3 * BASHING_LETHAL_PROTECTION - energy = 3 * BASHING_LETHAL_PROTECTION - laser = 3 * BASHING_LETHAL_PROTECTION - fire = 3 * AGGRAVATED_PROTECTION - melee = 3 * BASHING_LETHAL_PROTECTION - wound = 3 * BASHING_LETHAL_PROTECTION - -/datum/status_effect/fortitude/four - armor_type = /datum/armor/fortitude4 - -/datum/armor/fortitude4 - acid = 4 * AGGRAVATED_PROTECTION - bio = 4 * AGGRAVATED_PROTECTION - bomb = 4 * BASHING_LETHAL_PROTECTION - bullet = 4 * BASHING_LETHAL_PROTECTION - consume = 4 * BASHING_LETHAL_PROTECTION - energy = 4 * BASHING_LETHAL_PROTECTION - laser = 4 * BASHING_LETHAL_PROTECTION - fire = 4 * AGGRAVATED_PROTECTION - melee = 4 * BASHING_LETHAL_PROTECTION - wound = 4 * BASHING_LETHAL_PROTECTION - -/datum/status_effect/fortitude/five - armor_type = /datum/armor/fortitude5 - -/datum/armor/fortitude5 - acid = 5 * AGGRAVATED_PROTECTION - bio = 5 * AGGRAVATED_PROTECTION - bomb = 5 * BASHING_LETHAL_PROTECTION - bullet = 5 * BASHING_LETHAL_PROTECTION - consume = 5 * BASHING_LETHAL_PROTECTION - energy = 5 * BASHING_LETHAL_PROTECTION - laser = 5 * BASHING_LETHAL_PROTECTION - fire = 5 * AGGRAVATED_PROTECTION - melee = 5 * BASHING_LETHAL_PROTECTION - wound = 5 * BASHING_LETHAL_PROTECTION - -#undef BASHING_LETHAL_PROTECTION -#undef AGGRAVATED_PROTECTION diff --git a/modular_darkpack/modules/powers/code/discipline/quietus/components/scorptions_touch.dm b/modular_darkpack/modules/powers/code/discipline/quietus/components/scorptions_touch.dm index b2a45ad0ae75..5a0f30b782f4 100644 --- a/modular_darkpack/modules/powers/code/discipline/quietus/components/scorptions_touch.dm +++ b/modular_darkpack/modules/powers/code/discipline/quietus/components/scorptions_touch.dm @@ -67,7 +67,7 @@ // apply non transmittable disease to the mortal victim if they reach zero stamina to_chat(victim, span_userdanger("You feel deathly ill as the poison ravages your body!")) - victim.adjust_fire_loss(2 * poison_potency) + victim.apply_damage((2 * poison_potency), BURN, unsoakable = TRUE) //victim.AdjustKnockdown(3 SECONDS) this is from the old code? to_chat(user, span_warning("Your venomous touch burns [victim]!")) diff --git a/modular_darkpack/modules/powers/code/discipline/quietus/quietus.dm b/modular_darkpack/modules/powers/code/discipline/quietus/quietus.dm index c2b2b00ba203..c0881f697af5 100644 --- a/modular_darkpack/modules/powers/code/discipline/quietus/quietus.dm +++ b/modular_darkpack/modules/powers/code/discipline/quietus/quietus.dm @@ -202,7 +202,7 @@ to_chat(owner, span_warning("[victim] resists Dargon's Call.")) return - victim.adjust_fire_loss(10 * net_successes) + victim.apply_damage((10 * net_successes), BURN) to_chat(owner, span_boldwarning("You invoke Dagon's Call on [victim], choking them with their own blood!")) to_chat(victim, span_userdanger("Your blood vessels burst as you drown in your own blood!")) diff --git a/modular_darkpack/modules/powers/code/discipline/thanatosis/thanatosis.dm b/modular_darkpack/modules/powers/code/discipline/thanatosis/thanatosis.dm index 1a68c4332394..3d0d5376f485 100644 --- a/modular_darkpack/modules/powers/code/discipline/thanatosis/thanatosis.dm +++ b/modular_darkpack/modules/powers/code/discipline/thanatosis/thanatosis.dm @@ -103,7 +103,7 @@ /datum/discipline_power/thanatosis/putrefaction/activate(mob/living/target) . = ..() - target.adjust_brute_loss(successes * 25) + target.apply_damage(successes * 25) target.apply_status_effect(STATUS_EFFECT_PUTREFACTION, owner) //ASHES TO ASHES @@ -248,9 +248,9 @@ chosen_part.dismember(BURN) else target.visible_message(span_danger("[target]'s body withers under the curse!"), span_userdanger("YOUR BODY WITHERS UNDER THE CURSE!")) - target.adjust_brute_loss(150) + target.apply_damage(150, unsoakable = TRUE) else - target.adjust_brute_loss(150) + target.apply_damage(150) //NECROSIS /datum/discipline_power/thanatosis/necrosis @@ -301,7 +301,7 @@ /datum/discipline_power/thanatosis/necrosis/activate(mob/living/carbon/human/target) . = ..() - target.adjust_brute_loss(3 TTRPG_DAMAGE) + target.apply_damage(3 TTRPG_DAMAGE, unsoakable = TRUE) if(successes <= 1) to_chat(owner, span_warning("Necrosis has failed to affect [target]!")) diff --git a/modular_darkpack/modules/powers/code/discipline/thaumaturgy/paths/levinbolt.dm b/modular_darkpack/modules/powers/code/discipline/thaumaturgy/paths/levinbolt.dm index 07ecc504117b..160411b63ae3 100644 --- a/modular_darkpack/modules/powers/code/discipline/thaumaturgy/paths/levinbolt.dm +++ b/modular_darkpack/modules/powers/code/discipline/thaumaturgy/paths/levinbolt.dm @@ -263,9 +263,9 @@ if(ishuman(attacker)) var/mob/living/carbon/human/H = attacker H.electrocution_animation(40) + attacker.apply_damage(30, BURN, soak_difficulty = 8) attacker.adjust_jitter_up_to(2 SECONDS, 15) attacker.Stun(3 SECONDS) - attacker.adjust_fire_loss(30) /datum/discipline_power/thaumaturgy/path/levinbolt/three/proc/powerarray_target_click(mob/source, atom/target, params) SIGNAL_HANDLER @@ -452,12 +452,13 @@ owner.Beam(target, icon_state="lightning[rand(1,12)]", time = 10) - target.adjust_fire_loss(20) target.adjust_jitter_up_to(3 SECONDS, 15) if(ishuman(target)) var/mob/living/carbon/human/H = target H.electrocution_animation(50) + target.apply_damage(20, BURN, soak_difficulty = 8) + if(prob(60)) target.Stun(1 SECONDS) target.visible_message(span_warning("[target] convulses from the electrical shock!")) diff --git a/modular_darkpack/modules/powers/code/discipline/thaumaturgy/paths/lure_of_flames.dm b/modular_darkpack/modules/powers/code/discipline/thaumaturgy/paths/lure_of_flames.dm index f9a544d98c60..899d2fcbc61f 100644 --- a/modular_darkpack/modules/powers/code/discipline/thaumaturgy/paths/lure_of_flames.dm +++ b/modular_darkpack/modules/powers/code/discipline/thaumaturgy/paths/lure_of_flames.dm @@ -179,8 +179,8 @@ return var/damage_amount = 25 + owner.thaum_damage_plus + success_count - target.adjust_fire_loss(damage_amount) + target.apply_damage(damage_amount, BURN, soak_difficulty = 7) target.adjust_fire_stacks(4 + success_count) target.ignite_mob() @@ -249,7 +249,7 @@ if(L == owner) // Don't damage self - but caster still gets set on fire continue - L.adjust_fire_loss(base_damage) + L.apply_damage(base_damage, BURN, soak_difficulty = 8) // Chance to ignite based on successes if(prob(ignite_chance)) diff --git a/modular_darkpack/modules/powers/code/discipline/visceratika.dm b/modular_darkpack/modules/powers/code/discipline/visceratika.dm index 9d17cad7b8b7..4404bb25895b 100644 --- a/modular_darkpack/modules/powers/code/discipline/visceratika.dm +++ b/modular_darkpack/modules/powers/code/discipline/visceratika.dm @@ -20,10 +20,8 @@ owner.update_body() // since dot 4 is always active and requires no roll if(level >= 4) - owner.physiology.brute_mod *= 0.8 + owner.physiology.burn_mod *= 0.5 //Halves burn damage dice pools, V20 Core Page 476 owner.physiology.heat_mod *= 0.5 - //owner.physiology.clone_mod *= 0.9 - //ADD_TRAIT(owner, TRAIT_IGNOREDAMAGESLOWDOWN, TRAIT_GENERIC) ADD_TRAIT(owner, TRAIT_NOSOFTCRIT, DISCIPLINE_TRAIT(type)) if(!(owner.is_clan(/datum/subsplat/vampire_clan/gargoyle))) ADD_TRAIT(owner, TRAIT_MASQUERADE_VIOLATING_FACE, DISCIPLINE_TRAIT(type)) diff --git a/modular_darkpack/modules/storyteller_dice/code/roll_subtypes.dm b/modular_darkpack/modules/storyteller_dice/code/roll_subtypes.dm index 1f94e682f3f5..c19aeeaec825 100644 --- a/modular_darkpack/modules/storyteller_dice/code/roll_subtypes.dm +++ b/modular_darkpack/modules/storyteller_dice/code/roll_subtypes.dm @@ -118,3 +118,11 @@ applicable_stats = list(STAT_INTELLIGENCE, STAT_OCCULT) reroll_cooldown = 1 SCENES difficulty = 8 + +// Soak +/datum/storyteller_roll/soak + bumper_text = "soak" + roll_output_type = ROLL_PUBLIC + numerical = TRUE + spammy_roll = TRUE + difficulty = 6 diff --git a/modular_darkpack/modules/storyteller_stats/code/_st_stats.dm b/modular_darkpack/modules/storyteller_stats/code/_st_stats.dm index b7cd90e076fa..67865eea5a12 100644 --- a/modular_darkpack/modules/storyteller_stats/code/_st_stats.dm +++ b/modular_darkpack/modules/storyteller_stats/code/_st_stats.dm @@ -195,3 +195,7 @@ points -= amount freebie_cost_spent += amount return TRUE + + +/datum/st_stat/proc/update_mob(mob/living/our_mob) + return diff --git a/modular_darkpack/modules/storyteller_stats/code/mob_affecting_adjustments/mob_procs.dm b/modular_darkpack/modules/storyteller_stats/code/mob_affecting_adjustments/mob_procs.dm index 4f7ff1e5b93e..c97ac312f1b4 100644 --- a/modular_darkpack/modules/storyteller_stats/code/mob_affecting_adjustments/mob_procs.dm +++ b/modular_darkpack/modules/storyteller_stats/code/mob_affecting_adjustments/mob_procs.dm @@ -58,10 +58,7 @@ /mob/living/proc/update_modifiers_from_stats(initial = FALSE) for(var/stat_typepath in storyteller_stats) var/datum/st_stat/stat_datum = storyteller_stats[stat_typepath] - if(stat_datum.stat_flags & AFFECTS_HEALTH) - recalculate_max_health(initial) - if(stat_datum.stat_flags & AFFECTS_SPEED) - add_or_update_variable_movespeed_modifier(/datum/movespeed_modifier/dexterity, multiplicative_slowdown = -(st_get_stat(STAT_DEXTERITY) / 20)) + stat_datum.update_mob(src) /datum/preferences/proc/apply_stats_from_prefs(mob/living/carbon/human/character) diff --git a/modular_darkpack/modules/storyteller_stats/code/mob_affecting_adjustments/recalculate_max_health.dm b/modular_darkpack/modules/storyteller_stats/code/mob_affecting_adjustments/recalculate_max_health.dm deleted file mode 100644 index bf6f264b9637..000000000000 --- a/modular_darkpack/modules/storyteller_stats/code/mob_affecting_adjustments/recalculate_max_health.dm +++ /dev/null @@ -1,8 +0,0 @@ -//Function for updating a player's health based on their current stats. -/mob/living/proc/recalculate_max_health(initial = FALSE) - var/old_max_health = maxHealth - maxHealth = round(initial(maxHealth) + ((initial(maxHealth)/8) * st_get_stat(STAT_STAMINA))) - if(initial) - health = maxHealth - else if(health > 0) - health = max(health + maxHealth - old_max_health, 1) diff --git a/modular_darkpack/modules/storyteller_stats/code/st_stats/default_attributes.dm b/modular_darkpack/modules/storyteller_stats/code/st_stats/default_attributes.dm index 194cb87643c3..23ddfe88d5ae 100644 --- a/modular_darkpack/modules/storyteller_stats/code/st_stats/default_attributes.dm +++ b/modular_darkpack/modules/storyteller_stats/code/st_stats/default_attributes.dm @@ -7,13 +7,18 @@ name = "Dexterity" description = "Affects your speed and melee weapon accuracy. Increases your defense against being knocked down in unarmed combat. Increases the speed of certain actions." subcategory = "Physical" - stat_flags = AFFECTS_SPEED + +/datum/st_stat/attribute/dexterity/update_mob(mob/living/our_mob) + our_mob.add_or_update_variable_movespeed_modifier(/datum/movespeed_modifier/dexterity, multiplicative_slowdown = -(get_score() / 20)) /datum/st_stat/attribute/stamina name = "Stamina" description = "Affects your maximum health. Used in Quietus." subcategory = "Physical" - stat_flags = AFFECTS_HEALTH + +/datum/st_stat/attribute/stamina/update_mob(mob/living/our_mob) + var/mob/living/carbon/carbon_mob = astype(our_mob) + carbon_mob?.update_soak() /datum/st_stat/attribute/charisma name = "Charisma" diff --git a/modular_darkpack/modules/vampire_the_masquerade/code/splats/ghoul_splat/ghoul_splat.dm b/modular_darkpack/modules/vampire_the_masquerade/code/splats/ghoul_splat/ghoul_splat.dm index e1662ce508e1..78e6274bd325 100644 --- a/modular_darkpack/modules/vampire_the_masquerade/code/splats/ghoul_splat/ghoul_splat.dm +++ b/modular_darkpack/modules/vampire_the_masquerade/code/splats/ghoul_splat/ghoul_splat.dm @@ -38,6 +38,7 @@ owner.give_st_power(discipline, 1) if(ispath(discipline, /datum/discipline/dementation)) owner.add_quirk(/datum/quirk/darkpack/derangement) + owner.update_soak() //Updates Soak in case they've inherited Fortitude. /datum/splat/vampire/ghoul/on_lose_or_destroy() owner.remove_st_power(/datum/discipline/bloodheal) diff --git a/modular_darkpack/modules/vitae/code/embracing.dm b/modular_darkpack/modules/vitae/code/embracing.dm index 2eb95a1d87ab..eb95af7bf8ac 100644 --- a/modular_darkpack/modules/vitae/code/embracing.dm +++ b/modular_darkpack/modules/vitae/code/embracing.dm @@ -26,6 +26,8 @@ for(var/i in 1 to 3) childe.give_st_power(clan_disciplines[i]) + childe.update_soak() //Updates soak rolls to reflect that they're now a Kindred. + var/datum/st_stat/morality_path/morality/stat_morality_childe = childe.storyteller_stats[STAT_MORALITY] if(stat_morality_childe) diff --git a/modular_darkpack/modules/werewolf_the_apocalypse/code/silver_damage.dm b/modular_darkpack/modules/werewolf_the_apocalypse/code/silver_damage.dm index 24dc27e71fe0..e6d19ac257e7 100644 --- a/modular_darkpack/modules/werewolf_the_apocalypse/code/silver_damage.dm +++ b/modular_darkpack/modules/werewolf_the_apocalypse/code/silver_damage.dm @@ -19,23 +19,23 @@ /obj/projectile/bullet/proc/fera_silver_damage(mob/living/carbon/human/target, dice = 0) if(!istype(target)) return - var/datum/splat/werewolf/shifter/shot_pup_splat = get_shifter_splat(target) + var/datum/splat/werewolf/shifter/shot_pup_splat = get_garou_splat(target) if(shot_pup_splat) var/mob/living/carbon/human/shot_pup = target shot_pup.apply_status_effect(STATUS_EFFECT_SILVER_BULLET_STACKS) if(!shot_pup_splat.is_breed_form()) // IDK. This is might TTRPG inaccurate RN because i think it should acctaully convert ALL the damage to agg not just add some agg to it. - shot_pup.apply_damage(dice TTRPG_DAMAGE, AGGRAVATED) + shot_pup.apply_damage(dice TTRPG_DAMAGE, AGGRAVATED, unsoakable = TRUE) //Agg from silver is unsoakable. /obj/item/proc/fera_silver_damage(mob/living/carbon/human/target, dice = 0, gnosis_damage = 0) if(!istype(target)) return - var/datum/splat/werewolf/shifter/shot_pup_splat = get_shifter_splat(target) + var/datum/splat/werewolf/shifter/shot_pup_splat = get_garou_splat(target) if(shot_pup_splat) var/mob/living/carbon/human/shot_pup = target shot_pup_splat.adjust_gnosis(-gnosis_damage, TRUE) // W20 p. 290 - Werewolves dont take silver damage in breed form because they arent spirits if(!shot_pup_splat.is_breed_form()) - shot_pup.apply_damage(dice TTRPG_DAMAGE, AGGRAVATED) + shot_pup.apply_damage(dice TTRPG_DAMAGE, AGGRAVATED, unsoakable = TRUE) //Agg from silver is unsoakable. diff --git a/modular_darkpack/modules/werewolf_the_apocalypse/code/splats/transformation.dm b/modular_darkpack/modules/werewolf_the_apocalypse/code/splats/transformation.dm index a11ab096902d..a89d556c285d 100644 --- a/modular_darkpack/modules/werewolf_the_apocalypse/code/splats/transformation.dm +++ b/modular_darkpack/modules/werewolf_the_apocalypse/code/splats/transformation.dm @@ -87,6 +87,7 @@ /datum/splat/werewolf/shifter/proc/transform_finish(form_to_transform, time_taken = DOGGY_ANIMATION_TIME) animate(owner, transform = null, color = "#FFFFFF", time = time_taken * 0.1) owner.set_species(form_to_transform) + owner.update_soak() /datum/splat/werewolf/shifter/proc/is_breed_form() if(!owner?.dna) diff --git a/tgstation.dme b/tgstation.dme index cd3182ae4953..737622c92ca5 100644 --- a/tgstation.dme +++ b/tgstation.dme @@ -7605,7 +7605,6 @@ #include "modular_darkpack\modules\powers\code\discipline\dominate\status_effects\conditioning_status_effect.dm" #include "modular_darkpack\modules\powers\code\discipline\dominate\status_effects\mesmerize_status_effect.dm" #include "modular_darkpack\modules\powers\code\discipline\fortitude\fortitude.dm" -#include "modular_darkpack\modules\powers\code\discipline\fortitude\fortitude_status_effect.dm" #include "modular_darkpack\modules\powers\code\discipline\obeah\obeah.dm" #include "modular_darkpack\modules\powers\code\discipline\obeah\shepherds_watch.dm" #include "modular_darkpack\modules\powers\code\discipline\obfuscate\obfuscate.dm" @@ -7760,7 +7759,6 @@ #include "modular_darkpack\modules\storyteller_stats\code\stat_pref_middleware.dm" #include "modular_darkpack\modules\storyteller_stats\code\mob_affecting_adjustments\mob_procs.dm" #include "modular_darkpack\modules\storyteller_stats\code\mob_affecting_adjustments\movespeed_modifier.dm" -#include "modular_darkpack\modules\storyteller_stats\code\mob_affecting_adjustments\recalculate_max_health.dm" #include "modular_darkpack\modules\storyteller_stats\code\st_stats\default_abilities.dm" #include "modular_darkpack\modules\storyteller_stats\code\st_stats\default_attributes.dm" #include "modular_darkpack\modules\storyteller_stats\code\st_stats\default_morality.dm"