Skip to content

Commit

Permalink
Getting Medieval - Breach Cleaver (#26298)
Browse files Browse the repository at this point in the history
* Securiblade, Sheaths

* Snakesfang and Cleaver

* Crates and Armory

* Origin Tech Fix

* Chargers can now accept securiblades

* Clan Cleaver is now Breach Cleaver

* Armor Checking

* Comment and description fixes

* State comment

* More Comments

* Contains list fix

Co-authored-by: 1080pCat <[email protected]>
Signed-off-by: PollardTheDragon <[email protected]>

* Breacher sword hates doors

* Tab indentation

* Breacher Armor Buff - Status Effect while wielding

* Breach Cleaver Sounds - courtesy of Stoniest

* Snakesfang Codersprites

* Define Fix

* Breach Cleaver - Icon Codersprites

* Breach Cleaver Codersprites

* Gave help-intent attack on cleaver an animation

* Reduced sound intensity of wielded harm

* Moved variables below inherits

* Buff spacing, guard clause

* Improved examine

* Guard clauses the secsword powercell

* Sword mode defines

* Added undefs

* Spacing

* Securiblade loreful examine_more

* Examine_More for all swords

* Grammar

Co-authored-by: Luc <[email protected]>
Signed-off-by: PollardTheDragon <[email protected]>

* Moved defines, added auto-docs, grammar

* Fixed secsword recharging

* Secsword burn function fix

* Cleaver Armor Buff Fix

* Fix to buff

* Securiblade burn fix, stamina charge reduction fix

* Breach Cleaver - Wielding sprite consistency, fixed sheath orientation when unsheathed

* Fixes securiblade EMP oversight

* Snakesfang can parry now

* Spelling

* Removed define indents

* Early returns

* A whole lot of fixes. Qdels the cell on delete.

* stun_delay proc doc

* Update code/datums/uplink_items/uplink_general.dm

Signed-off-by: DGamerL <[email protected]>

* Merged IF statements, relocated inits

* Armor change

* Remove null in cell variable

* Ifs to Switch

* Revert "Armor change"

This reverts commit 6b61e33.

* Better Ifs to Switch

* Removes roundstart armory blade, increases crate cost to 550

* Removed extraneous loc check, removed extraneous link cell proc

* Added null check to secsword/emp_act

* Added clear_cell proc to replace duplicate icon updates and cell nulls

* No vars in proc argument

* Properly nulls cell. Fixes cell sabotage for sword

* JustTheCleaver

* Forgot about the recharger

* Logic Change - Combined two Ifs

Co-authored-by: DGamerL <[email protected]>
Signed-off-by: PollardTheDragon <[email protected]>

* Removed  extraneous permit var

Co-authored-by: DGamerL <[email protected]>
Signed-off-by: PollardTheDragon <[email protected]>

* Early returns on object attacks

* Fixed missing cleaver sheath

* Fixed comment format

Co-authored-by: 1080pCat <[email protected]>
Signed-off-by: PollardTheDragon <[email protected]>

* Removed extraneous line

Co-authored-by: DGamerL <[email protected]>
Signed-off-by: PollardTheDragon <[email protected]>

* cleaving_armor_boost variable standardization

* Added intent and effects to attack logs

* Added notice to description span for antags

* Made the armor buff into a var

* Replaced get_dir(src, get_step away(H, src) with user.src

* Fixed stat check

* AP Changes

---------

Signed-off-by: PollardTheDragon <[email protected]>
Signed-off-by: DGamerL <[email protected]>
Co-authored-by: 1080pCat <[email protected]>
Co-authored-by: S34N <[email protected]>
Co-authored-by: Luc <[email protected]>
Co-authored-by: DGamerL <[email protected]>
  • Loading branch information
5 people authored Aug 9, 2024
1 parent 8ee325e commit 2d94ff1
Show file tree
Hide file tree
Showing 13 changed files with 171 additions and 0 deletions.
2 changes: 2 additions & 0 deletions code/__DEFINES/status_effects.dm
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,8 @@

#define STATUS_EFFECT_CHAINSAW_SLAYING /datum/status_effect/chainsaw_slaying // Stun immunity, very slight damage resistance

#define STATUS_EFFECT_BREACH_AND_CLEAVE /datum/status_effect/breaching_and_cleaving // Stamina damage resist, Additional ranged armor

#define STATUS_EFFECT_HOPE /datum/status_effect/hope // Healing that scales when injured (but not in deep crit), and nice messages to keep the hope

#define STATUS_EFFECT_DRILL_PAYBACK /datum/status_effect/drill_payback // Slight antistun and healing, along with visual effect. Works only in range of the vault, and for 30 seconds after it ends.
Expand Down
27 changes: 27 additions & 0 deletions code/datums/status_effects/buffs.dm
Original file line number Diff line number Diff line change
Expand Up @@ -627,6 +627,33 @@
H.physiology.burn_mod /=0.8
H.physiology.stamina_mod /= 0.8

/datum/status_effect/breaching_and_cleaving
id = "breaching_and_cleaving"
duration = -1
status_type = STATUS_EFFECT_UNIQUE
alert_type = /atom/movable/screen/alert/status_effect/breaching_and_cleaving
var/datum/armor/cleaving_armor_boost = new /datum/armor(0, 30, 30, 30, 0, 0, 50, 0, 0)

/atom/movable/screen/alert/status_effect/breaching_and_cleaving
name = "Breaching and Cleaving!"
desc = "<span class='danger'>Doors, people, machines... nothing will stand before your martial prowess!</span>"
icon_state = "breachcleaver"

/datum/status_effect/breaching_and_cleaving/on_apply()
. = ..()
if(!. || !ishuman(owner))
return
var/mob/living/carbon/human/H = owner
H.physiology.armor = H.physiology.armor.attachArmor(cleaving_armor_boost)
H.physiology.stamina_mod *= 0.8

/datum/status_effect/breaching_and_cleaving/on_remove()
if(ishuman(owner))
var/mob/living/carbon/human/H = owner
H.physiology.armor = H.physiology.armor.detachArmor(cleaving_armor_boost)
H.physiology.stamina_mod /= 0.8
QDEL_NULL(cleaving_armor_boost)

/datum/status_effect/hope
id = "hope"
duration = -1
Expand Down
10 changes: 10 additions & 0 deletions code/datums/uplink_items/uplink_traitor.dm
Original file line number Diff line number Diff line change
Expand Up @@ -404,6 +404,16 @@
species = list("Drask")
surplus = 0

// Unathi
/datum/uplink_item/species_restricted/breach_cleaver
name = "Breach Cleaver"
desc = "This massive blade harkens back to the wars on Moghes. Wielding it imbues you with the unquenchable desire for martial prowess. \
Requires two hands to be wielded. Comes in a scabbard. Has different effects based on intent."
reference = "CLV"
item = /obj/item/storage/belt/sheath/breach_cleaver
cost = 65 // Incredibly strong melee weapon on par with a chainsaw.
species = list("Unathi")

// -------------------------------------
// ITEMS BLACKLISTED FROM NUCLEAR AGENTS
// -------------------------------------
Expand Down
121 changes: 121 additions & 0 deletions code/game/objects/items/weapons/melee/melee_misc.dm
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,127 @@
plastitanium edge that can cause untold harm to a soft target. In the right hands, it can be a terrifying weapon to behold, \
and it’s said that blood runs down the blade in just the right way, to drip artfully from the twin ‘fangs’ at its apex."

// Unathi Sword
/obj/item/melee/breach_cleaver
name = "breach cleaver"
desc = "Massive, heavy, and utterly impractical. This sharpened chunk of steel is too big and too heavy to be called a sword."
lefthand_file = 'icons/mob/inhands/weapons_lefthand.dmi'
righthand_file = 'icons/mob/inhands/weapons_righthand.dmi'
base_icon_state = "breach_cleaver"
icon_state = "breach_cleaver0"
flags = CONDUCT
force = 5
throwforce = 5
armour_penetration_flat = 30
w_class = WEIGHT_CLASS_BULKY
sharp = TRUE
origin_tech = "combat=6;syndicate=5"
attack_verb = list("slashed", "cleaved", "chopped")
hitsound = 'sound/weapons/swordhitheavy.ogg'
materials = list(MAT_METAL = 2000)
/// How much damage the sword does when wielded
var/force_wield = 40

/obj/item/melee/breach_cleaver/Initialize(mapload)
. = ..()
AddComponent(/datum/component/two_handed, force_wielded = force_wield, force_unwielded = force, icon_wielded = "[base_icon_state]1", wield_callback = CALLBACK(src, PROC_REF(wield)), unwield_callback = CALLBACK(src, PROC_REF(unwield)))
AddComponent(/datum/component/parry, _stamina_constant = 2, _stamina_coefficient = 0.5, _parryable_attack_types = NON_PROJECTILE_ATTACKS)

/obj/item/melee/breach_cleaver/examine(mob/user)
. = ..()
if(isAntag(user))
. += "<span class='notice'>When wielded, this blade has different effects depending on your intent, similar to a martial art. \
Help intent will strike with the flat, dealing stamina, disarm intent forces them away, grab intent knocks down the target, \
and harm intent deals heavy damage.</span>"

/obj/item/melee/breach_cleaver/examine_more(mob/user)
. = ..()
. += "Massive, heavy, and utterly impractical. This sharpened chunk of steel is too big and too heavy to be called a sword."
. += ""
. += "The Unathi Breach Cleaver is a weapon the scaled, warlike race favours for its impressive weight and myriad combat applications. \
The pinnacle of Moghes' combat technology, it combines all of this knowledge into a massive, heavy slab of alloyed metal that most \
species find difficult to lift, let alone use in any sort of fight."
. += ""
. += "Actually a little lightweight for its size, a Breach Cleaver is unmatched in combat utility as a weapon, a tool for getting into\
places and as a slab of armour for the wielder. The leather of the Kar'oche beast, a predator native to Moghes, binds the hilt, \
allowing it to be gripped securely by its warrior. The wide blade is often etched with scenes depicting military victories or great hunts."

/obj/item/melee/breach_cleaver/update_icon_state()
icon_state = "[base_icon_state]0"

/obj/item/melee/breach_cleaver/proc/wield(obj/item/source, mob/living/carbon/human/user)
to_chat(user, "<span class='notice'>You heave [src] up in both hands.</span>")
user.apply_status_effect(STATUS_EFFECT_BREACH_AND_CLEAVE)
update_icon_state()

/obj/item/melee/breach_cleaver/proc/unwield(obj/item/source, mob/living/carbon/human/user)
user.remove_status_effect(STATUS_EFFECT_BREACH_AND_CLEAVE)
update_icon_state()

/obj/item/melee/breach_cleaver/attack_obj(obj/O, mob/living/user, params)
if(!HAS_TRAIT(src, TRAIT_WIELDED)) // Only works good when wielded
return ..()
if(!ismachinery(O) && !isstructure(O)) // This sword hates doors
return ..()
if(SEND_SIGNAL(src, COMSIG_ITEM_ATTACK_OBJ, O, user) & COMPONENT_NO_ATTACK_OBJ)
return
if(flags & (NOBLUDGEON))
return
var/mob/living/carbon/human/H = user
H.changeNext_move(CLICK_CD_MELEE)
H.do_attack_animation(O)
H.visible_message("<span class='danger'>[H] has hit [O] with [src]!</span>", "<span class='danger'>You hit [O] with [src]!</span>")
var/damage = force_wield
damage += H.physiology.melee_bonus
O.take_damage(damage * 3, BRUTE, MELEE, TRUE, get_dir(src, H), 30) // Multiplied to do big damage to doors, closets, windows, and machines, but normal damage to mobs.

/obj/item/melee/breach_cleaver/attack(mob/target, mob/living/user)
if(!HAS_TRAIT(src, TRAIT_WIELDED) || !ishuman(target))
return ..()

var/mob/living/carbon/human/H = target
var/obj/item/organ/external/targetlimb = H.get_organ(ran_zone(user.zone_selected))

switch(user.a_intent)
if(INTENT_HELP) // Stamina damage
H.visible_message("<span class='danger'>[user] slams [H] with the flat of the blade!</span>", \
"<span class='userdanger'>[user] slams you with the flat of the blade!</span>", \
"<span class='italics'>You hear a thud.</span>")
user.do_attack_animation(H, ATTACK_EFFECT_DISARM)
playsound(loc, 'sound/weapons/swordhit.ogg', 50, TRUE, -1)
H.AdjustConfused(4 SECONDS, 0, 4 SECONDS)
H.apply_damage(40, STAMINA, targetlimb, H.run_armor_check(targetlimb, MELEE))
add_attack_logs(user, H, "Slammed by a breach cleaver. (Help intent, Stamina)", ATKLOG_ALL)

if(INTENT_DISARM) // Slams away
if(H.stat != CONSCIOUS || IS_HORIZONTAL(H))
return ..()

H.visible_message("<span class='danger'>[user] smashes [H] with the blade's tip!</span>", \
"<span class='userdanger'>[user] smashes you with the blade's tip!</span>", \
"<span class='italics'>You hear crushing.</span>")

user.do_attack_animation(H, ATTACK_EFFECT_KICK)
playsound(get_turf(user), 'sound/weapons/sonic_jackhammer.ogg', 50, TRUE, -1)
H.apply_damage(25, BRUTE, targetlimb, H.run_armor_check(targetlimb, MELEE))
var/atom/throw_target = get_edge_target_turf(H, user.dir, TRUE)
H.throw_at(throw_target, 4, 1)
add_attack_logs(user, H, "Smashed away by a breach cleaver. (Disarm intent, Knockback)", ATKLOG_ALL)

if(INTENT_GRAB) // Knocks down
H.visible_message("<span class='danger'>[user] cleaves [H] with an overhead strike!</span>", \
"<span class='userdanger'>[user] cleaves you with an overhead strike!</span>", \
"<span class='italics'>You hear a chopping noise.</span>")

user.do_attack_animation(H, ATTACK_EFFECT_DISARM)
playsound(get_turf(user), 'sound/weapons/armblade.ogg', 50, TRUE, -1)
H.apply_damage(30, BRUTE, targetlimb, H.run_armor_check(targetlimb, MELEE), TRUE)
H.KnockDown(4 SECONDS)
add_attack_logs(user, H, "Cleaved overhead with a breach cleaver. (Grab intent, Knockdown)", ATKLOG_ALL)

if(INTENT_HARM)
return ..()

/obj/item/melee/icepick
name = "ice pick"
desc = "Used for chopping ice. Also excellent for mafia esque murders."
Expand Down
11 changes: 11 additions & 0 deletions code/game/objects/items/weapons/storage/belt.dm
Original file line number Diff line number Diff line change
Expand Up @@ -798,6 +798,17 @@
new /obj/item/melee/snakesfang(src)
update_appearance(UPDATE_ICON_STATE)

/obj/item/storage/belt/sheath/breach_cleaver
name = "breach cleaver scabbard"
desc = "Can hold massive cleavers."
icon_state = "breachcleaversheath"
item_state = "breachcleaversheath"
can_hold = list(/obj/item/melee/breach_cleaver)

/obj/item/storage/belt/sheath/breach_cleaver/populate_contents()
new /obj/item/melee/breach_cleaver(src)
update_icon()

// -------------------------------------
// Bluespace Belt
// -------------------------------------
Expand Down
Binary file modified icons/mob/clothing/belt.dmi
Binary file not shown.
Binary file modified icons/mob/inhands/weapons_lefthand.dmi
Binary file not shown.
Binary file modified icons/mob/inhands/weapons_righthand.dmi
Binary file not shown.
Binary file modified icons/mob/screen_alert.dmi
Binary file not shown.
Binary file modified icons/obj/clothing/belts.dmi
Binary file not shown.
Binary file modified icons/obj/weapons/melee.dmi
Binary file not shown.
Binary file added sound/weapons/swordhit.ogg
Binary file not shown.
Binary file added sound/weapons/swordhitheavy.ogg
Binary file not shown.

0 comments on commit 2d94ff1

Please sign in to comment.