From 9e88e7f1dbbd3baa08a7d3dd513c2a12439fa041 Mon Sep 17 00:00:00 2001 From: FalseIncarnate Date: Wed, 7 Jun 2017 02:35:23 -0400 Subject: [PATCH 1/3] Adds Highlander Style: The Martial Art of Highlanders Adds a new martial art: Highlander Style! - Wielders of the powerful Highlander claymores are imbued with this mythical prowress. Should your both your hands ever lack a grip on a Highlander claymore, you will relinquish your newfound skill. - Highlander Style grants immunity to ranged attacks and an unwavering distain of cowardly guns. Just like with Sleeping Carp, you will deflect projectiles and cannot fire guns (but can pick them up to throw in the trash where they belong). Adds new weapon: Highlander Claymore - Grants the wielder the Highlander Style while held in either hand. - Normal claymores were left in, but do not provide the martial art (so they are "safe" to use outside highlander) Minor refactor to martial arts which prevent use of guns. - No longer relies on the name of the style, but rather the new aptly-named var: `can_use_guns` :cl: rscadd: Adds Highlander Style, granted to the wielder of Highlander Claymores. This martial art allows you to deflect ranged attacks from the weapons of COWARDS. FOR THE HONOR OF THE HIGHLANDERS! tweak: Highlander now equips combatants with a Highlander claymore instead of a normal claymore. FIGHT ON BROTHERS! /:cl: --- .../items/weapons/highlander_swords.dm | 46 +++++++++++++++++++ code/modules/admin/verbs/onlyone.dm | 2 +- code/modules/martial_arts/martial.dm | 2 + code/modules/martial_arts/sleeping_carp.dm | 2 + code/modules/mob/living/carbon/human/human.dm | 4 +- paradise.dme | 1 + 6 files changed, 54 insertions(+), 3 deletions(-) create mode 100644 code/game/objects/items/weapons/highlander_swords.dm diff --git a/code/game/objects/items/weapons/highlander_swords.dm b/code/game/objects/items/weapons/highlander_swords.dm new file mode 100644 index 00000000000..4b575dcd065 --- /dev/null +++ b/code/game/objects/items/weapons/highlander_swords.dm @@ -0,0 +1,46 @@ + +//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 + can_use_guns = 0 + 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/weapon/claymore/highlander + name = "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/weapon/claymore/highlander/equipped(mob/user, slot) + if(!ishuman(user)) + return + var/mob/living/carbon/human/H = user + if(slot == slot_r_hand || slot == slot_l_hand) + if(H.martial_art && H.martial_art != style) + style.teach(H, 1) + to_chat(H, "THERE CAN ONLY BE ONE!") + else if(H.martial_art && H.martial_art == style) + style.remove(H) + var/obj/item/weapon/claymore/highlander/sword = H.is_in_hands(/obj/item/weapon/claymore/highlander) + if(sword) + //if we have a highlander sword in the other hand, relearn the style from that sword. + sword.style.teach(H, 1) + + return + +/obj/item/weapon/claymore/highlander/dropped(mob/user) + if(!ishuman(user)) + return + var/mob/living/carbon/human/H = user + style.remove(H) + var/obj/item/weapon/claymore/highlander/sword = H.is_in_hands(/obj/item/weapon/claymore/highlander) + if(sword) + //if we have a highlander sword in the other hand, relearn the style from that sword. + sword.style.teach(H, 1) + return diff --git a/code/modules/admin/verbs/onlyone.dm b/code/modules/admin/verbs/onlyone.dm index 9bfe544cef5..79914745e79 100644 --- a/code/modules/admin/verbs/onlyone.dm +++ b/code/modules/admin/verbs/onlyone.dm @@ -37,7 +37,7 @@ H.equip_to_slot_or_del(new /obj/item/clothing/under/kilt(H), slot_w_uniform) H.equip_to_slot_or_del(new /obj/item/device/radio/headset/heads/captain(H), slot_l_ear) H.equip_to_slot_or_del(new /obj/item/clothing/head/beret(H), slot_head) - H.equip_to_slot_or_del(new /obj/item/weapon/claymore(H), slot_r_hand) + H.equip_to_slot_or_del(new /obj/item/weapon/claymore/highlander(H), slot_r_hand) H.equip_to_slot_or_del(new /obj/item/clothing/shoes/combat(H), slot_shoes) H.equip_to_slot_or_del(new /obj/item/weapon/pinpointer(H.loc), slot_l_store) diff --git a/code/modules/martial_arts/martial.dm b/code/modules/martial_arts/martial.dm index 3f1705f4651..625a2846429 100644 --- a/code/modules/martial_arts/martial.dm +++ b/code/modules/martial_arts/martial.dm @@ -7,6 +7,8 @@ var/datum/martial_art/base = null // The permanent style var/deflection_chance = 0 //Chance to deflect projectiles var/help_verb = null + var/can_use_guns = 1 //set to zero to prevent users of this style from using guns (sleeping carp, highlander). They can still pick them up, but not fire them. + var/no_guns_message = "" //message to tell the style user if they try and use a gun while can_use_guns = 0 (DISHONORABRU!) /datum/martial_art/proc/disarm_act(var/mob/living/carbon/human/A, var/mob/living/carbon/human/D) return 0 diff --git a/code/modules/martial_arts/sleeping_carp.dm b/code/modules/martial_arts/sleeping_carp.dm index 960844a063a..12ae14f153f 100644 --- a/code/modules/martial_arts/sleeping_carp.dm +++ b/code/modules/martial_arts/sleeping_carp.dm @@ -8,6 +8,8 @@ name = "The Sleeping Carp" deflection_chance = 100 help_verb = /mob/living/carbon/human/proc/sleeping_carp_help + can_use_guns = 0 + no_guns_message = "Use of ranged weaponry would bring dishonor to the clan." /datum/martial_art/the_sleeping_carp/proc/check_streak(var/mob/living/carbon/human/A, var/mob/living/carbon/human/D) if(findtext(streak,WRIST_WRENCH_COMBO)) diff --git a/code/modules/mob/living/carbon/human/human.dm b/code/modules/mob/living/carbon/human/human.dm index 000a7a52bd0..cd1e53e7290 100644 --- a/code/modules/mob/living/carbon/human/human.dm +++ b/code/modules/mob/living/carbon/human/human.dm @@ -1985,8 +1985,8 @@ to_chat(src, "Your fingers don't fit in the trigger guard!") return 0 - if(martial_art && martial_art.name == "The Sleeping Carp") //great dishonor to famiry - to_chat(src, "Use of ranged weaponry would bring dishonor to the clan.") + if(martial_art && !martial_art.can_use_guns) //great dishonor to famiry + to_chat(src, "[martial_art.no_guns_message]") return 0 return . diff --git a/paradise.dme b/paradise.dme index 869bffe601b..8ce3b789f72 100644 --- a/paradise.dme +++ b/paradise.dme @@ -804,6 +804,7 @@ #include "code\game\objects\items\weapons\garrote.dm" #include "code\game\objects\items\weapons\gift_wrappaper.dm" #include "code\game\objects\items\weapons\handcuffs.dm" +#include "code\game\objects\items\weapons\highlander_swords.dm" #include "code\game\objects\items\weapons\holosign.dm" #include "code\game\objects\items\weapons\holy_weapons.dm" #include "code\game\objects\items\weapons\kitchen.dm" From 81030c717cde1a6ad6fa70ac567a0ccaeb565764 Mon Sep 17 00:00:00 2001 From: FalseIncarnate Date: Wed, 7 Jun 2017 15:11:37 -0400 Subject: [PATCH 2/3] Destroy() --- code/game/objects/items/weapons/highlander_swords.dm | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/code/game/objects/items/weapons/highlander_swords.dm b/code/game/objects/items/weapons/highlander_swords.dm index 4b575dcd065..284a909a227 100644 --- a/code/game/objects/items/weapons/highlander_swords.dm +++ b/code/game/objects/items/weapons/highlander_swords.dm @@ -17,6 +17,13 @@ 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/weapon/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/weapon/claymore/highlander/equipped(mob/user, slot) if(!ishuman(user)) return @@ -32,8 +39,6 @@ //if we have a highlander sword in the other hand, relearn the style from that sword. sword.style.teach(H, 1) - return - /obj/item/weapon/claymore/highlander/dropped(mob/user) if(!ishuman(user)) return @@ -43,4 +48,3 @@ if(sword) //if we have a highlander sword in the other hand, relearn the style from that sword. sword.style.teach(H, 1) - return From c2ad198203e0e00af1201be7e461177adf5819d9 Mon Sep 17 00:00:00 2001 From: FalseIncarnate Date: Fri, 9 Jun 2017 21:39:50 -0400 Subject: [PATCH 3/3] can_use_guns -> no_guns --- code/game/objects/items/weapons/highlander_swords.dm | 2 +- code/modules/martial_arts/martial.dm | 4 ++-- code/modules/martial_arts/sleeping_carp.dm | 2 +- code/modules/mob/living/carbon/human/human.dm | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/code/game/objects/items/weapons/highlander_swords.dm b/code/game/objects/items/weapons/highlander_swords.dm index 284a909a227..22686b90c96 100644 --- a/code/game/objects/items/weapons/highlander_swords.dm +++ b/code/game/objects/items/weapons/highlander_swords.dm @@ -5,7 +5,7 @@ /datum/martial_art/highlander name = "Highlander Style" deflection_chance = 100 - can_use_guns = 0 + no_guns = TRUE no_guns_message = "You'd never stoop so low as to use the weapon of a COWARD!" diff --git a/code/modules/martial_arts/martial.dm b/code/modules/martial_arts/martial.dm index 625a2846429..10b3e8f3ad0 100644 --- a/code/modules/martial_arts/martial.dm +++ b/code/modules/martial_arts/martial.dm @@ -7,8 +7,8 @@ var/datum/martial_art/base = null // The permanent style var/deflection_chance = 0 //Chance to deflect projectiles var/help_verb = null - var/can_use_guns = 1 //set to zero to prevent users of this style from using guns (sleeping carp, highlander). They can still pick them up, but not fire them. - var/no_guns_message = "" //message to tell the style user if they try and use a gun while can_use_guns = 0 (DISHONORABRU!) + var/no_guns = FALSE //set to TRUE to prevent users of this style from using guns (sleeping carp, highlander). They can still pick them up, but not fire them. + var/no_guns_message = "" //message to tell the style user if they try and use a gun while no_guns = TRUE (DISHONORABRU!) /datum/martial_art/proc/disarm_act(var/mob/living/carbon/human/A, var/mob/living/carbon/human/D) return 0 diff --git a/code/modules/martial_arts/sleeping_carp.dm b/code/modules/martial_arts/sleeping_carp.dm index 12ae14f153f..c6af4679552 100644 --- a/code/modules/martial_arts/sleeping_carp.dm +++ b/code/modules/martial_arts/sleeping_carp.dm @@ -8,7 +8,7 @@ name = "The Sleeping Carp" deflection_chance = 100 help_verb = /mob/living/carbon/human/proc/sleeping_carp_help - can_use_guns = 0 + no_guns = TRUE no_guns_message = "Use of ranged weaponry would bring dishonor to the clan." /datum/martial_art/the_sleeping_carp/proc/check_streak(var/mob/living/carbon/human/A, var/mob/living/carbon/human/D) diff --git a/code/modules/mob/living/carbon/human/human.dm b/code/modules/mob/living/carbon/human/human.dm index cd1e53e7290..e8737175b23 100644 --- a/code/modules/mob/living/carbon/human/human.dm +++ b/code/modules/mob/living/carbon/human/human.dm @@ -1985,7 +1985,7 @@ to_chat(src, "Your fingers don't fit in the trigger guard!") return 0 - if(martial_art && !martial_art.can_use_guns) //great dishonor to famiry + if(martial_art && martial_art.no_guns) //great dishonor to famiry to_chat(src, "[martial_art.no_guns_message]") return 0