diff --git a/code/_onclick/item_attack.dm b/code/_onclick/item_attack.dm index 618868072488..3062e78b2caf 100644 --- a/code/_onclick/item_attack.dm +++ b/code/_onclick/item_attack.dm @@ -302,12 +302,15 @@ return ATTACK_FAILED var/final_force = CALCULATE_FORCE(attacking_item, attack_modifiers) -// DARKPACK EDIT ADD START - if(isliving(user)) - var/mob/living/living_user = user - var/stat_multiplier = living_user.st_get_stat(STAT_MELEE) * 0.4 - final_force *= stat_multiplier -// DARKPACK EDIT ADD END + // DARKPACK EDIT ADD START - STORYTELLER_ROLLS/STORYTELLER_STATS + // This is pretty evil, but we are gonna convert all the tg force into the +# that melee weapons have listed. + // This means we can do stuff like set force of a baseball bat to 2 TTRPG_DAM and it just works. + var/bonus_dice = round(final_force / (1 TTRPG_DAMAGE)) + var/datum/storyteller_roll/damage/damage_roll = new() + damage_roll.applicable_stats = list(attacking_item.st_damage_stat) + var/damage_roll_result = damage_roll.st_roll(user, src, bonus_dice) + final_force = damage_roll_result TTRPG_DAMAGE + // DARKPACK EDIT ADD END if(final_force <= 0) return 0 @@ -348,8 +351,24 @@ if(mob_biotypes & (MOB_ROBOTIC|MOB_MINERAL|MOB_SKELETAL)) // this should probably check hit bodypart for humanoids final_force *= attacking_item.get_demolition_modifier(src) - // DARKPACK EDIT ADD START - (Makes Melee do Something) - final_force += final_force * (user.st_get_stat(STAT_MELEE) * 0.1) + // DARKPACK EDIT ADD START - STORYTELLER_ROLLS/STORYTELLER_STATS + var/datum/storyteller_roll/attack/attack_roll = new() + attack_roll.applicable_stats = list(attacking_item.st_attack_ability, attacking_item.st_attack_attribute) + attack_roll.difficulty = attacking_item.attack_difficulty + var/attack_roll_result = attack_roll.st_roll(user, src) + + // What i want to do is acctually have it return if not success. But that creates bad visual feedback as all the FX still play. just give them them SOME damage.. + if(attack_roll_result == ROLL_SUCCESS) + // This is pretty evil, but we are gonna convert all the tg force into the +# that melee weapons have listed. + // This means we can do stuff like set force of a baseball bat to 2 TTRPG_DAM and it just works. + var/bonus_dice = round(final_force / (1 TTRPG_DAMAGE)) + var/datum/storyteller_roll/damage/damage_roll = new() + damage_roll.applicable_stats = list(attacking_item.st_damage_stat) + var/damage_roll_result = damage_roll.st_roll(user, src, bonus_dice) + + final_force = max(damage_roll_result TTRPG_DAMAGE, 1 TTRPG_DAMAGE) + else + final_force = 1 TTRPG_DAMAGE // "SOME damage" in question // DARKPACK EDIT ADD END var/wounding = attacking_item.wound_bonus diff --git a/modular_darkpack/master_files/code/game/objects/items.dm b/modular_darkpack/master_files/code/game/objects/items.dm index 0ba0a0b0bbaa..381615140712 100644 --- a/modular_darkpack/master_files/code/game/objects/items.dm +++ b/modular_darkpack/master_files/code/game/objects/items.dm @@ -2,3 +2,9 @@ var/onflooricon var/onflooricon_state var/masquerade_violating + + // STORYTELLR_STATS + var/datum/st_stat/st_attack_ability = STAT_DEXTERITY + var/datum/st_stat/st_attack_attribute = STAT_MELEE + var/attack_difficulty = 6 + var/datum/st_stat/st_damage_stat = STAT_STRENGTH diff --git a/modular_darkpack/modules/powers/code/discipline/protean/claws.dm b/modular_darkpack/modules/powers/code/discipline/protean/claws.dm index fb4799c83acf..9a828d11a842 100644 --- a/modular_darkpack/modules/powers/code/discipline/protean/claws.dm +++ b/modular_darkpack/modules/powers/code/discipline/protean/claws.dm @@ -12,14 +12,9 @@ item_flags = DROPDEL masquerade_violating = TRUE obj_flags = NONE + st_attack_attribute = STAT_BRAWL /obj/item/gangrel_claws/Initialize(mapload) . = ..() ADD_TRAIT(src, TRAIT_NODROP, INNATE_TRAIT) -/obj/item/gangrel_claws/pre_attack(atom/target, mob/living/user, list/modifiers, list/attack_modifiers) - . = ..() - // Based on V20 - if(isliving(user)) - var/mob/living/living_user = user - force = (living_user.st_get_stat(STAT_STRENGTH) + 1) TTRPG_DAMAGE diff --git a/modular_darkpack/modules/weapons/code/melee.dm b/modular_darkpack/modules/weapons/code/melee.dm index 0e21ffffadc3..54bc7c392904 100644 --- a/modular_darkpack/modules/weapons/code/melee.dm +++ b/modular_darkpack/modules/weapons/code/melee.dm @@ -90,7 +90,6 @@ ONFLOOR_ICON_HELPER('modular_darkpack/modules/weapons/icons/weapons_onfloor.dmi') icon_state = "rapier" - /obj/item/melee/sabre/rapier/Initialize(mapload) . = ..() AddComponent(/datum/component/selling, 700, "rapier", FALSE)