diff --git a/code/game/objects/items/weapons/material/twohanded_vr.dm b/code/game/objects/items/weapons/material/twohanded_vr.dm index 17f7a56caa..fe18087abc 100644 --- a/code/game/objects/items/weapons/material/twohanded_vr.dm +++ b/code/game/objects/items/weapons/material/twohanded_vr.dm @@ -26,7 +26,6 @@ edge = TRUE sharp = TRUE - /obj/item/weapon/material/twohanded/saber/handle_shield(mob/user, var/damage, atom/damage_source = null, mob/attacker = null, var/def_zone = null, var/attack_text = "the attack") if (src.wielded == 1) if(unique_parry_check(user, attacker, damage_source) && prob(50)) @@ -34,3 +33,47 @@ playsound(src, 'sound/weapons/punchmiss.ogg', 50, 1) return 1 return 0 + +/obj/item/weapon/material/twohanded/staff + w_class = ITEMSIZE_LARGE + default_material = MAT_WOOD + name = "staff" + desc = "A sturdy length of metal or wood. A common traveler's aid mostly used for support or probing unstable ground, but also a fairly effective weapon in a pinch." + description_info = "When wielded with two hands, staves can be used to parry incoming attacks. Being on disarm intent also grants them an added chance to stun or knock down opponents, and increases your chances of parrying an attack." + icon = 'icons/obj/weapons_vr.dmi' + icon_state = "mat_staff" + base_icon = "mat_staff" + item_state = "mat_staff" + item_icons = list( + slot_l_hand_str = 'icons/mob/items/lefthand_melee_vr.dmi', + slot_r_hand_str = 'icons/mob/items/righthand_melee_vr.dmi', + ) + force_wielded = 18 //a bit stronger than a stun baton + force_divisor = 0.45 + unwielded_force_divisor = 0.1 + var/base_parry_chance = 20 + var/disarm_defense = 1.5 //bonus multiplier to parry rate when in disarm stance + var/stun_chance = 25 //chance to weaken an opponent when used in disarm stance only, remembering that disarm also halves damage dealt + var/stun_duration = 2 + attack_verb = list("struck","smashed","thumped","thrashed","beaten","slammed","battered") + edge = FALSE + sharp = FALSE + +/obj/item/weapon/material/twohanded/staff/handle_shield(mob/user, var/damage, atom/damage_source = null, mob/attacker = null, var/def_zone = null, var/attack_text = "the attack") + var/parry_chance + if(src.wielded == 1) + if(user.a_intent == I_DISARM) + parry_chance = base_parry_chance * disarm_defense + else + parry_chance = base_parry_chance + if(unique_parry_check(user, attacker, damage_source) && prob(parry_chance)) + user.visible_message("\The [user] parries [attack_text] with \the [src]!") + playsound(src, 'sound/weapons/punchmiss.ogg', 50, 1) + return 1 + return 0 + +/obj/item/weapon/material/twohanded/staff/apply_hit_effect(mob/living/target, mob/living/user, var/hit_zone) + . = ..() + if(src.wielded == 1 && user.a_intent == I_DISARM && prob(stun_chance)) + target.Weaken(stun_duration) + user.visible_message("\The [user] trips [target] with \the [src]!") \ No newline at end of file diff --git a/code/modules/materials/materials/_materials.dm b/code/modules/materials/materials/_materials.dm index 05046ba85a..6ce2fab16c 100644 --- a/code/modules/materials/materials/_materials.dm +++ b/code/modules/materials/materials/_materials.dm @@ -352,6 +352,7 @@ var/list/name_to_material // If is_brittle() returns true, these are only good for a single strike. recipes = list( new /datum/stack_recipe("[display_name] baseball bat", /obj/item/weapon/material/twohanded/baseballbat, 10, time = 20, one_per_turf = 0, on_floor = 1, supplied_material = "[name]", pass_stack_color = TRUE), + new /datum/stack_recipe("[display_name] staff", /obj/item/weapon/material/twohanded/staff, 10, time = 20, one_per_turf = 0, on_floor = 1, supplied_material = "[name]", pass_stack_color = TRUE), new /datum/stack_recipe("[display_name] ashtray", /obj/item/weapon/material/ashtray, 2, one_per_turf = 1, on_floor = 1, supplied_material = "[name]", pass_stack_color = TRUE), new /datum/stack_recipe("[display_name] spoon", /obj/item/weapon/material/kitchen/utensil/spoon/plastic, 1, on_floor = 1, supplied_material = "[name]", pass_stack_color = TRUE), new /datum/stack_recipe("[display_name] armor plate", /obj/item/weapon/material/armor_plating, 1, time = 20, on_floor = 1, supplied_material = "[name]", pass_stack_color = TRUE), diff --git a/icons/mob/items/lefthand_melee_vr.dmi b/icons/mob/items/lefthand_melee_vr.dmi index ac33a12ad5..2cc11d8ed8 100644 Binary files a/icons/mob/items/lefthand_melee_vr.dmi and b/icons/mob/items/lefthand_melee_vr.dmi differ diff --git a/icons/mob/items/righthand_melee_vr.dmi b/icons/mob/items/righthand_melee_vr.dmi index ea3b23c817..29134f5dcb 100644 Binary files a/icons/mob/items/righthand_melee_vr.dmi and b/icons/mob/items/righthand_melee_vr.dmi differ diff --git a/icons/obj/weapons_vr.dmi b/icons/obj/weapons_vr.dmi index 7a1b9844d1..591c65ab09 100644 Binary files a/icons/obj/weapons_vr.dmi and b/icons/obj/weapons_vr.dmi differ