Files
Paradise/code/game/objects/items/weapons/highlander_swords.dm
Chap d90a70ecda [REFACTOR] Consolidates SLOT_FLAG and SLOT_HUD into one ITEM_SLOT flag (#26743)
* IT WORKS UP UNTIL THIS POINT

* Consolidates SLOT_FLAG and SLOT_HUD into one

* Remove cover_both_ears

* SLOT_HUD to ITEM_SLOT

* Remove clothing_trait changes for the time being

* Remove accidental copy-paste

* Re-add no-slip var

* More failure to copy-paste correctly

* Leftover flag

* Combine left and right slot flags where possible

* UNGOOF MY DEFINES, PHAND IS NOT A THING

* Minor spacing changes

* Some more fixes from merge

* Seperates ITEM SLOT AMOUNT into two defines

* ON SECOND THOUGHT LETS NOT DO THAT.

* Addresses Contra's review

* Thank you GREP

* Rename ITEM_SLOT_FEET to ITEM_SLOT_SHOES

* Added a comment to the bitmasks in clothing defines

* Rename ITEM_SLOT_TIE to ITEM_SLOT_ACCESSORY

* These are for a seperate PR.

* Magboot fixes

* Requested changes

* Re-add accidental removal

* Wrong flags

* Update code/__DEFINES/clothing_defines.dm

Co-authored-by: Contrabang <91113370+Contrabang@users.noreply.github.com>
Signed-off-by: Chap <erwin@lombok.demon.nl>

* Requested changes

* Merge fixes

* Fix double headset

* Fixes multiple accessories

---------

Signed-off-by: Chap <erwin@lombok.demon.nl>
Co-authored-by: Adrer <adrermail@gmail.com>
Co-authored-by: Contrabang <91113370+Contrabang@users.noreply.github.com>
2024-11-13 13:02:29 +00:00

53 lines
1.8 KiB
Plaintext

//Highlander Style Martial Art
// Prevents use of guns, but makes the highlander impervious to ranged attacks. Their bravery in battle shields them from the weapons of COWARDS!
/datum/martial_art/highlander
name = "Highlander Style"
deflection_chance = 100
no_guns = TRUE
no_guns_message = "You'd never stoop so low as to use the weapon of a COWARD!"
//Highlander Claymore
// Grants the wielder the Highlander Style Martial Art
/obj/item/claymore/highlander
name = "\improper Highlander claymore"
desc = "Imbues the wielder with legendary martial prowress and a nigh-unquenchable thirst for glorious battle!"
var/datum/martial_art/highlander/style = new
/obj/item/claymore/highlander/Destroy()
if(ishuman(loc)) //just in case it gets destroyed while in someone's possession, such as due to acid or something?
var/mob/living/carbon/human/H = loc
style.remove(H)
QDEL_NULL(style)
return ..()
/obj/item/claymore/highlander/equipped(mob/user, slot)
if(!ishuman(user) || !user.mind)
return
var/mob/living/carbon/human/H = user
if(slot & ITEM_SLOT_BOTH_HANDS)
if(H.mind.martial_art != style)
style.teach(H, TRUE)
to_chat(H, "<span class='notice'>THERE CAN ONLY BE ONE!</span>")
else if(H.mind.martial_art && H.mind.martial_art == style)
style.remove(H)
var/obj/item/claymore/highlander/sword = H.is_in_hands(/obj/item/claymore/highlander)
if(sword)
//if we have a highlander sword in the other hand, relearn the style from that sword.
sword.style.teach(H, TRUE)
/obj/item/claymore/highlander/dropped(mob/user)
..()
if(!ishuman(user))
return
var/mob/living/carbon/human/H = user
if(H.mind.martial_art == style)
style.remove(H)
var/obj/item/claymore/highlander/sword = H.is_in_hands(/obj/item/claymore/highlander)
if(sword)
//if we have a highlander sword in the other hand, relearn the style from that sword.
sword.style.teach(H, TRUE)