Update weaponry.dm
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
/obj/item/banhammer
|
||||
w/obj/item/banhammer
|
||||
desc = "A banhammer."
|
||||
name = "banhammer"
|
||||
icon = 'icons/obj/items_and_weapons.dmi'
|
||||
@@ -286,6 +286,9 @@ for further reading, please see: https://github.com/tgstation/tgstation/pull/301
|
||||
parry_efficiency_to_counterattack = 100
|
||||
parry_efficiency_considered_successful = 65 // VERY generous
|
||||
parry_efficiency_perfect = 120
|
||||
parry_efficiency_perfect_override = list(
|
||||
"[ATTACK_TYPE_PROJECTILE]" = 30,
|
||||
)
|
||||
parry_failed_stagger_duration = 3 SECONDS
|
||||
parry_data = list(PARRY_COUNTERATTACK_MELEE_ATTACK_CHAIN = 2.5) // 7*2.5 = 17.5, 8*2.5 = 20, 9*2.5 = 22.5, 10*2.5 = 25
|
||||
|
||||
@@ -329,689 +332,4 @@ for further reading, please see: https://github.com/tgstation/tgstation/pull/301
|
||||
|
||||
/obj/item/melee/bokken/attackby(obj/item/I, mob/living/user, params)
|
||||
if(istype(I, /obj/item/pen))
|
||||
var/new_name = stripped_input(user, "What do you wish to name [src]?", "New Name", "bokken", 30)
|
||||
if(new_name)
|
||||
name = new_name
|
||||
if(I.tool_behaviour == TOOL_WELDER)
|
||||
var/new_burn = stripped_input(user, "What do you wish to burn into [src]?", "Burnt Inscription","", 140)
|
||||
if(new_burn)
|
||||
burned_in = new_burn
|
||||
if(!burnt)
|
||||
icon_state += "_burnt"
|
||||
item_state += "_burnt"
|
||||
burnt = TRUE
|
||||
update_icon()
|
||||
update_icon_state()
|
||||
if(istype(I, /obj/item/stack/rods))
|
||||
var/obj/item/stack/rods/R = I
|
||||
if(!reinforced)
|
||||
if(R.use(1))
|
||||
force++
|
||||
reinforced = TRUE
|
||||
to_chat(user, "<span class='notice'>You slide a metal rod into [src]\'s hilt. It feels a little heftier in your hands.")
|
||||
else
|
||||
to_chat(user, "<span class='notice'>[src] already has a weight slid into the hilt.")
|
||||
|
||||
/obj/item/melee/bokken/examine(mob/user)
|
||||
. = ..()
|
||||
if(quick_parry)
|
||||
. += " [src] is gripped in a way to emphasize quicker parries."
|
||||
if(reinforced)
|
||||
. += " There's a metal rod shoved into the base."
|
||||
if(burnt)
|
||||
. += " Burned into the \"blade\" is [burned_in]."
|
||||
|
||||
/obj/item/wirerod
|
||||
name = "wired rod"
|
||||
desc = "A rod with some wire wrapped around the top. It'd be easy to attach something to the top bit."
|
||||
icon_state = "wiredrod"
|
||||
item_state = "rods"
|
||||
flags_1 = CONDUCT_1
|
||||
force = 9
|
||||
throwforce = 10
|
||||
w_class = WEIGHT_CLASS_NORMAL
|
||||
custom_materials = list(/datum/material/iron=1150, /datum/material/glass=75)
|
||||
attack_verb = list("hit", "bludgeoned", "whacked", "bonked")
|
||||
|
||||
/obj/item/wirerod/attackby(obj/item/I, mob/user, params)
|
||||
if(istype(I, /obj/item/shard))
|
||||
var/obj/item/spear/S = new /obj/item/spear
|
||||
|
||||
remove_item_from_storage(user)
|
||||
if (!user.transferItemToLoc(I, S))
|
||||
return
|
||||
S.CheckParts(list(I))
|
||||
qdel(src)
|
||||
|
||||
user.put_in_hands(S)
|
||||
to_chat(user, "<span class='notice'>You fasten the glass shard to the top of the rod with the cable.</span>")
|
||||
|
||||
else if(istype(I, /obj/item/assembly/igniter) && !HAS_TRAIT(I, TRAIT_NODROP))
|
||||
var/obj/item/melee/baton/cattleprod/P = new /obj/item/melee/baton/cattleprod
|
||||
|
||||
remove_item_from_storage(user)
|
||||
|
||||
to_chat(user, "<span class='notice'>You fasten [I] to the top of the rod with the cable.</span>")
|
||||
|
||||
qdel(I)
|
||||
qdel(src)
|
||||
|
||||
user.put_in_hands(P)
|
||||
else
|
||||
return ..()
|
||||
|
||||
|
||||
/obj/item/throwing_star
|
||||
name = "throwing star"
|
||||
desc = "An ancient weapon still used to this day, due to its ease of lodging itself into its victim's body parts."
|
||||
icon_state = "throwingstar"
|
||||
item_state = "eshield0"
|
||||
lefthand_file = 'icons/mob/inhands/equipment/shields_lefthand.dmi'
|
||||
righthand_file = 'icons/mob/inhands/equipment/shields_righthand.dmi'
|
||||
force = 2
|
||||
throwforce = 20 //This is never used on mobs since this has a 100% embed chance.
|
||||
throw_speed = 4
|
||||
embedding = list("pain_mult" = 4, "embed_chance" = 100, "fall_chance" = 0, "embed_chance_turf_mod" = 15)
|
||||
armour_penetration = 40
|
||||
|
||||
w_class = WEIGHT_CLASS_SMALL
|
||||
sharpness = IS_SHARP
|
||||
custom_materials = list(/datum/material/iron=500, /datum/material/glass=500)
|
||||
resistance_flags = FIRE_PROOF
|
||||
|
||||
/obj/item/throwing_star/stamina
|
||||
name = "shock throwing star"
|
||||
desc = "An aerodynamic disc designed to cause excruciating pain when stuck inside fleeing targets, hopefully without causing fatal harm."
|
||||
throwforce = 5
|
||||
embedding = list("pain_chance" = 5, "embed_chance" = 100, "fall_chance" = 0, "jostle_chance" = 10, "pain_stam_pct" = 0.8, "jostle_pain_mult" = 3)
|
||||
|
||||
/obj/item/throwing_star/toy
|
||||
name = "toy throwing star"
|
||||
desc = "An aerodynamic disc strapped with adhesive for sticking to people, good for playing pranks and getting yourself killed by security."
|
||||
sharpness = IS_BLUNT
|
||||
force = 0
|
||||
throwforce = 0
|
||||
embedding = list("pain_mult" = 0, "jostle_pain_mult" = 0, "embed_chance" = 100, "fall_chance" = 0)
|
||||
|
||||
/obj/item/switchblade
|
||||
name = "switchblade"
|
||||
icon_state = "switchblade"
|
||||
lefthand_file = 'icons/mob/inhands/weapons/swords_lefthand.dmi'
|
||||
righthand_file = 'icons/mob/inhands/weapons/swords_righthand.dmi'
|
||||
desc = "A sharp, concealable, spring-loaded knife."
|
||||
flags_1 = CONDUCT_1
|
||||
force = 3
|
||||
w_class = WEIGHT_CLASS_SMALL
|
||||
throwforce = 5
|
||||
throw_speed = 3
|
||||
throw_range = 6
|
||||
custom_materials = list(/datum/material/iron=12000)
|
||||
hitsound = 'sound/weapons/genhit.ogg'
|
||||
attack_verb = list("stubbed", "poked")
|
||||
resistance_flags = FIRE_PROOF
|
||||
var/extended = 0
|
||||
var/extended_force = 20
|
||||
var/extended_throwforce = 23
|
||||
var/extended_icon_state = "switchblade_ext"
|
||||
var/retracted_icon_state = "switchblade"
|
||||
|
||||
/obj/item/switchblade/attack_self(mob/user)
|
||||
extended = !extended
|
||||
playsound(src.loc, 'sound/weapons/batonextend.ogg', 50, 1)
|
||||
if(extended)
|
||||
force = extended_force
|
||||
w_class = WEIGHT_CLASS_NORMAL
|
||||
throwforce = extended_throwforce
|
||||
icon_state = extended_icon_state
|
||||
attack_verb = list("slashed", "stabbed", "sliced", "torn", "ripped", "diced", "cut")
|
||||
hitsound = 'sound/weapons/bladeslice.ogg'
|
||||
sharpness = IS_SHARP
|
||||
else
|
||||
force = initial(force)
|
||||
w_class = WEIGHT_CLASS_SMALL
|
||||
throwforce = initial(throwforce)
|
||||
icon_state = retracted_icon_state
|
||||
attack_verb = list("stubbed", "poked")
|
||||
hitsound = 'sound/weapons/genhit.ogg'
|
||||
sharpness = IS_BLUNT
|
||||
|
||||
/obj/item/switchblade/suicide_act(mob/user)
|
||||
user.visible_message("<span class='suicide'>[user] is slitting [user.p_their()] own throat with [src]! It looks like [user.p_theyre()] trying to commit suicide!</span>")
|
||||
return (BRUTELOSS)
|
||||
|
||||
/obj/item/phone
|
||||
name = "red phone"
|
||||
desc = "Should anything ever go wrong..."
|
||||
icon = 'icons/obj/items_and_weapons.dmi'
|
||||
icon_state = "red_phone"
|
||||
force = 3
|
||||
throwforce = 2
|
||||
throw_speed = 3
|
||||
throw_range = 4
|
||||
w_class = WEIGHT_CLASS_SMALL
|
||||
attack_verb = list("called", "rang")
|
||||
hitsound = 'sound/weapons/ring.ogg'
|
||||
|
||||
/obj/item/phone/suicide_act(mob/user)
|
||||
if(locate(/obj/structure/chair/stool) in user.loc)
|
||||
user.visible_message("<span class='suicide'>[user] begins to tie a noose with [src]'s cord! It looks like [user.p_theyre()] trying to commit suicide!</span>")
|
||||
else
|
||||
user.visible_message("<span class='suicide'>[user] is strangling [user.p_them()]self with [src]'s cord! It looks like [user.p_theyre()] trying to commit suicide!</span>")
|
||||
return(OXYLOSS)
|
||||
|
||||
/obj/item/cane
|
||||
name = "cane"
|
||||
desc = "A cane used by a true gentleman. Or a clown."
|
||||
icon = 'icons/obj/items_and_weapons.dmi'
|
||||
icon_state = "cane"
|
||||
item_state = "stick"
|
||||
lefthand_file = 'icons/mob/inhands/weapons/melee_lefthand.dmi'
|
||||
righthand_file = 'icons/mob/inhands/weapons/melee_righthand.dmi'
|
||||
force = 5
|
||||
throwforce = 5
|
||||
w_class = WEIGHT_CLASS_SMALL
|
||||
custom_materials = list(/datum/material/iron=50)
|
||||
attack_verb = list("bludgeoned", "whacked", "disciplined", "thrashed")
|
||||
|
||||
/obj/item/staff
|
||||
name = "wizard staff"
|
||||
desc = "Apparently a staff used by the wizard."
|
||||
icon = 'icons/obj/wizard.dmi'
|
||||
icon_state = "staff"
|
||||
lefthand_file = 'icons/mob/inhands/weapons/staves_lefthand.dmi'
|
||||
righthand_file = 'icons/mob/inhands/weapons/staves_righthand.dmi'
|
||||
force = 3
|
||||
throwforce = 5
|
||||
throw_speed = 2
|
||||
throw_range = 5
|
||||
w_class = WEIGHT_CLASS_SMALL
|
||||
armour_penetration = 100
|
||||
attack_verb = list("bludgeoned", "whacked", "disciplined")
|
||||
resistance_flags = FLAMMABLE
|
||||
|
||||
/obj/item/staff/broom
|
||||
name = "broom"
|
||||
desc = "Used for sweeping, and flying into the night while cackling. Black cat not included."
|
||||
icon = 'icons/obj/wizard.dmi'
|
||||
icon_state = "broom"
|
||||
resistance_flags = FLAMMABLE
|
||||
|
||||
/obj/item/staff/stick
|
||||
name = "stick"
|
||||
desc = "A great tool to drag someone else's drinks across the bar."
|
||||
icon = 'icons/obj/items_and_weapons.dmi'
|
||||
icon_state = "cane"
|
||||
item_state = "stick"
|
||||
lefthand_file = 'icons/mob/inhands/weapons/melee_lefthand.dmi'
|
||||
righthand_file = 'icons/mob/inhands/weapons/melee_righthand.dmi'
|
||||
force = 3
|
||||
throwforce = 5
|
||||
throw_speed = 2
|
||||
throw_range = 5
|
||||
w_class = WEIGHT_CLASS_SMALL
|
||||
|
||||
/obj/item/ectoplasm
|
||||
name = "ectoplasm"
|
||||
desc = "Spooky."
|
||||
gender = PLURAL
|
||||
icon = 'icons/obj/wizard.dmi'
|
||||
icon_state = "ectoplasm"
|
||||
|
||||
/obj/item/ectoplasm/suicide_act(mob/user)
|
||||
user.visible_message("<span class='suicide'>[user] is inhaling [src]! It looks like [user.p_theyre()] trying to visit the astral plane!</span>")
|
||||
return (OXYLOSS)
|
||||
|
||||
/obj/item/mounted_chainsaw
|
||||
name = "mounted chainsaw"
|
||||
desc = "A chainsaw that has replaced your arm."
|
||||
icon_state = "chainsaw_on"
|
||||
item_state = "mounted_chainsaw"
|
||||
lefthand_file = 'icons/mob/inhands/weapons/chainsaw_lefthand.dmi'
|
||||
righthand_file = 'icons/mob/inhands/weapons/chainsaw_righthand.dmi'
|
||||
item_flags = ABSTRACT | DROPDEL
|
||||
w_class = WEIGHT_CLASS_BULKY
|
||||
force = 24
|
||||
throwforce = 0
|
||||
throw_range = 0
|
||||
throw_speed = 0
|
||||
sharpness = IS_SHARP
|
||||
attack_verb = list("sawed", "torn", "cut", "chopped", "diced")
|
||||
hitsound = 'sound/weapons/chainsawhit.ogg'
|
||||
total_mass = TOTAL_MASS_HAND_REPLACEMENT
|
||||
tool_behaviour = TOOL_SAW
|
||||
toolspeed = 1
|
||||
|
||||
/obj/item/mounted_chainsaw/Initialize()
|
||||
. = ..()
|
||||
ADD_TRAIT(src, TRAIT_NODROP, HAND_REPLACEMENT_TRAIT)
|
||||
|
||||
/obj/item/mounted_chainsaw/Destroy()
|
||||
var/obj/item/bodypart/part
|
||||
new /obj/item/chainsaw(get_turf(src))
|
||||
if(iscarbon(loc))
|
||||
var/mob/living/carbon/holder = loc
|
||||
var/index = holder.get_held_index_of_item(src)
|
||||
if(index)
|
||||
part = holder.hand_bodyparts[index]
|
||||
. = ..()
|
||||
if(part)
|
||||
part.drop_limb()
|
||||
|
||||
/obj/item/statuebust
|
||||
name = "bust"
|
||||
desc = "A priceless ancient marble bust, the kind that belongs in a museum." //or you can hit people with it
|
||||
icon = 'icons/obj/statue.dmi'
|
||||
icon_state = "bust"
|
||||
force = 15
|
||||
throwforce = 10
|
||||
throw_speed = 5
|
||||
throw_range = 2
|
||||
attack_verb = list("busted")
|
||||
var/impressiveness = 45
|
||||
|
||||
/obj/item/statuebust/Initialize()
|
||||
. = ..()
|
||||
AddElement(/datum/element/art, impressiveness)
|
||||
addtimer(CALLBACK(src, /datum.proc/_AddElement, list(/datum/element/beauty, 1000)), 0)
|
||||
|
||||
/obj/item/tailclub
|
||||
name = "tail club"
|
||||
desc = "For the beating to death of lizards with their own tails."
|
||||
icon_state = "tailclub"
|
||||
force = 14
|
||||
throwforce = 1 // why are you throwing a club do you even weapon
|
||||
throw_speed = 1
|
||||
throw_range = 1
|
||||
attack_verb = list("clubbed", "bludgeoned")
|
||||
|
||||
/obj/item/melee/chainofcommand/tailwhip
|
||||
name = "liz o' nine tails"
|
||||
desc = "A whip fashioned from the severed tails of lizards."
|
||||
icon_state = "tailwhip"
|
||||
item_flags = NONE
|
||||
|
||||
/obj/item/melee/chainofcommand/tailwhip/kitty
|
||||
name = "cat o' nine tails"
|
||||
desc = "A whip fashioned from the severed tails of cats."
|
||||
icon_state = "catwhip"
|
||||
|
||||
/obj/item/melee/skateboard
|
||||
name = "improvised skateboard"
|
||||
desc = "A skateboard. It can be placed on its wheels and ridden, or used as a strong weapon."
|
||||
icon_state = "skateboard"
|
||||
item_state = "skateboard"
|
||||
force = 12
|
||||
throwforce = 4
|
||||
w_class = WEIGHT_CLASS_NORMAL
|
||||
attack_verb = list("smacked", "whacked", "slammed", "smashed")
|
||||
///The vehicle counterpart for the board
|
||||
var/board_item_type = /obj/vehicle/ridden/scooter/skateboard
|
||||
|
||||
/obj/item/melee/skateboard/attack_self(mob/user)
|
||||
if(!user.canUseTopic(src, TRUE, FALSE, TRUE))
|
||||
return
|
||||
var/obj/vehicle/ridden/scooter/skateboard/S = new board_item_type(get_turf(user))
|
||||
S.buckle_mob(user)
|
||||
qdel(src)
|
||||
|
||||
/obj/item/melee/skateboard/pro
|
||||
name = "skateboard"
|
||||
desc = "A RaDSTORMz brand professional skateboard. It looks sturdy and well made."
|
||||
icon_state = "skateboard2"
|
||||
item_state = "skateboard2"
|
||||
board_item_type = /obj/vehicle/ridden/scooter/skateboard/pro
|
||||
custom_premium_price = 500
|
||||
|
||||
/obj/item/melee/skateboard/hoverboard
|
||||
name = "hoverboard"
|
||||
desc = "A blast from the past, so retro!"
|
||||
icon_state = "hoverboard_red"
|
||||
item_state = "hoverboard_red"
|
||||
board_item_type = /obj/vehicle/ridden/scooter/skateboard/hoverboard
|
||||
custom_premium_price = 2015
|
||||
|
||||
/obj/item/melee/skateboard/hoverboard/admin
|
||||
name = "\improper Board Of Directors"
|
||||
desc = "The engineering complexity of a spaceship concentrated inside of a board. Just as expensive, too."
|
||||
icon_state = "hoverboard_nt"
|
||||
item_state = "hoverboard_nt"
|
||||
board_item_type = /obj/vehicle/ridden/scooter/skateboard/hoverboard/admin
|
||||
|
||||
/obj/item/melee/baseball_bat
|
||||
name = "baseball bat"
|
||||
desc = "There ain't a skull in the league that can withstand a swatter."
|
||||
icon = 'icons/obj/items_and_weapons.dmi'
|
||||
icon_state = "baseball_bat"
|
||||
item_state = "baseball_bat"
|
||||
lefthand_file = 'icons/mob/inhands/weapons/melee_lefthand.dmi'
|
||||
righthand_file = 'icons/mob/inhands/weapons/melee_righthand.dmi'
|
||||
force = 10
|
||||
wound_bonus = -10
|
||||
throwforce = 12
|
||||
attack_verb = list("beat", "smacked")
|
||||
custom_materials = list(/datum/material/wood = MINERAL_MATERIAL_AMOUNT * 3.5)
|
||||
w_class = WEIGHT_CLASS_BULKY
|
||||
var/homerun_ready = 0
|
||||
var/homerun_able = 0
|
||||
total_mass = 2.7 //a regular wooden major league baseball bat weighs somewhere between 2 to 3.4 pounds, according to google
|
||||
|
||||
/obj/item/melee/baseball_bat/chaplain
|
||||
name = "blessed baseball bat"
|
||||
desc = "There ain't a cult in the league that can withstand a swatter."
|
||||
force = 14
|
||||
throwforce = 14
|
||||
obj_flags = UNIQUE_RENAME
|
||||
var/chaplain_spawnable = TRUE
|
||||
total_mass = TOTAL_MASS_MEDIEVAL_WEAPON
|
||||
|
||||
/obj/item/melee/baseball_bat/chaplain/Initialize()
|
||||
. = ..()
|
||||
AddComponent(/datum/component/anti_magic, TRUE, TRUE, FALSE, null, null, FALSE)
|
||||
|
||||
/obj/item/melee/baseball_bat/homerun
|
||||
name = "home run bat"
|
||||
desc = "This thing looks dangerous... Dangerously good at baseball, that is."
|
||||
homerun_able = 1
|
||||
|
||||
/obj/item/melee/baseball_bat/attack_self(mob/user)
|
||||
if(!homerun_able)
|
||||
..()
|
||||
return
|
||||
if(homerun_ready)
|
||||
to_chat(user, "<span class='notice'>You're already ready to do a home run!</span>")
|
||||
..()
|
||||
return
|
||||
to_chat(user, "<span class='warning'>You begin gathering strength...</span>")
|
||||
playsound(get_turf(src), 'sound/magic/lightning_chargeup.ogg', 65, 1)
|
||||
if(do_after(user, 90, target = src))
|
||||
to_chat(user, "<span class='userdanger'>You gather power! Time for a home run!</span>")
|
||||
homerun_ready = 1
|
||||
..()
|
||||
|
||||
/obj/item/melee/baseball_bat/attack(mob/living/target, mob/living/user)
|
||||
. = ..()
|
||||
var/atom/throw_target = get_edge_target_turf(target, user.dir)
|
||||
if(homerun_ready)
|
||||
user.visible_message("<span class='userdanger'>It's a home run!</span>")
|
||||
target.throw_at(throw_target, rand(8,10), 14, user)
|
||||
target.ex_act(EXPLODE_HEAVY)
|
||||
playsound(get_turf(src), 'sound/weapons/homerun.ogg', 100, 1)
|
||||
homerun_ready = 0
|
||||
return
|
||||
else if(!target.anchored)
|
||||
var/whack_speed = (prob(60) ? 1 : 4)
|
||||
target.throw_at(throw_target, rand(1, 2), whack_speed, user) // sorry friends, 7 speed batting caused wounds to absolutely delete whoever you knocked your target into (and said target)
|
||||
|
||||
/obj/item/melee/baseball_bat/ablative
|
||||
name = "metal baseball bat"
|
||||
desc = "This bat is made of highly reflective, highly armored material."
|
||||
icon_state = "baseball_bat_metal"
|
||||
item_state = "baseball_bat_metal"
|
||||
force = 12
|
||||
throwforce = 15
|
||||
|
||||
/obj/item/melee/baseball_bat/ablative/run_block(mob/living/owner, atom/object, damage, attack_text, attack_type, armour_penetration, mob/attacker, def_zone, final_block_chance, list/block_return)
|
||||
//some day this will reflect thrown items instead of lasers
|
||||
if(is_energy_reflectable_projectile(object) && (attack_type == ATTACK_TYPE_PROJECTILE))
|
||||
var/turf = get_turf(src)
|
||||
playsound(turf, pick('sound/weapons/effects/batreflect1.ogg', 'sound/weapons/effects/batreflect2.ogg'), 50, 1)
|
||||
return BLOCK_SUCCESS | BLOCK_SHOULD_REDIRECT | BLOCK_PHYSICAL_EXTERNAL | BLOCK_REDIRECTED
|
||||
return ..()
|
||||
|
||||
/obj/item/melee/baseball_bat/ablative/syndi
|
||||
name = "syndicate major league bat"
|
||||
desc = "A metal bat made by the syndicate for the major league team."
|
||||
force = 18 //Spear damage...
|
||||
throwforce = 30
|
||||
|
||||
/obj/item/melee/flyswatter
|
||||
name = "flyswatter"
|
||||
desc = "Useful for killing insects of all sizes."
|
||||
icon = 'icons/obj/items_and_weapons.dmi'
|
||||
icon_state = "flyswatter"
|
||||
item_state = "flyswatter"
|
||||
lefthand_file = 'icons/mob/inhands/weapons/melee_lefthand.dmi'
|
||||
righthand_file = 'icons/mob/inhands/weapons/melee_righthand.dmi'
|
||||
force = 1
|
||||
throwforce = 1
|
||||
attack_verb = list("swatted", "smacked")
|
||||
hitsound = 'sound/effects/snap.ogg'
|
||||
w_class = WEIGHT_CLASS_SMALL
|
||||
//Things in this list will be instantly splatted. Flyman weakness is handled in the flyman species weakness proc.
|
||||
var/list/strong_against
|
||||
var/list/spider_panic
|
||||
|
||||
/obj/item/melee/flyswatter/Initialize()
|
||||
. = ..()
|
||||
strong_against = typecacheof(list(
|
||||
/mob/living/simple_animal/hostile/poison/bees/,
|
||||
/mob/living/simple_animal/butterfly,
|
||||
/mob/living/simple_animal/cockroach,
|
||||
/obj/item/queen_bee
|
||||
))
|
||||
spider_panic = typecacheof(list(
|
||||
/mob/living/simple_animal/banana_spider,
|
||||
/mob/living/simple_animal/hostile/poison/giant_spider,
|
||||
))
|
||||
|
||||
/obj/item/melee/flyswatter/afterattack(atom/target, mob/user, proximity_flag)
|
||||
. = ..()
|
||||
if(proximity_flag)
|
||||
if(is_type_in_typecache(target, strong_against))
|
||||
new /obj/effect/decal/cleanable/insectguts(target.drop_location())
|
||||
to_chat(user, "<span class='warning'>You easily splat the [target].</span>")
|
||||
if(istype(target, /mob/living/))
|
||||
var/mob/living/bug = target
|
||||
bug.death(1)
|
||||
if(is_type_in_typecache(target, spider_panic))
|
||||
to_chat(user, "<span class='warning'>You easily land a critical blow on the [target].</span>")
|
||||
if(istype(target, /mob/living/))
|
||||
var/mob/living/bug = target
|
||||
bug.adjustBruteLoss(35) //What kinda mad man would go into melee with a spider?!
|
||||
else
|
||||
qdel(target)
|
||||
|
||||
/obj/item/circlegame
|
||||
name = "circled hand"
|
||||
desc = "If somebody looks at this while it's below your waist, you get to bop them."
|
||||
icon_state = "madeyoulook"
|
||||
force = 0
|
||||
throwforce = 0
|
||||
item_flags = DROPDEL | ABSTRACT
|
||||
attack_verb = list("bopped")
|
||||
|
||||
/obj/item/circlegame/Initialize()
|
||||
. = ..()
|
||||
var/mob/living/owner = loc
|
||||
if(!istype(owner))
|
||||
return
|
||||
RegisterSignal(owner, COMSIG_PARENT_EXAMINE, .proc/ownerExamined)
|
||||
|
||||
/obj/item/circlegame/Destroy()
|
||||
var/mob/owner = loc
|
||||
if(istype(owner))
|
||||
UnregisterSignal(owner, COMSIG_PARENT_EXAMINE)
|
||||
return ..()
|
||||
|
||||
/obj/item/circlegame/dropped(mob/user)
|
||||
UnregisterSignal(user, COMSIG_PARENT_EXAMINE) //loc will have changed by the time this is called, so Destroy() can't catch it
|
||||
// this is a dropdel item.
|
||||
return ..()
|
||||
|
||||
/// Stage 1: The mistake is made
|
||||
/obj/item/circlegame/proc/ownerExamined(mob/living/owner, mob/living/sucker)
|
||||
if(!istype(sucker) || !in_range(owner, sucker))
|
||||
return
|
||||
addtimer(CALLBACK(src, .proc/waitASecond, owner, sucker), 4)
|
||||
|
||||
/// Stage 2: Fear sets in
|
||||
/obj/item/circlegame/proc/waitASecond(mob/living/owner, mob/living/sucker)
|
||||
if(QDELETED(sucker) || QDELETED(src) || QDELETED(owner))
|
||||
return
|
||||
|
||||
if(owner == sucker) // big mood
|
||||
to_chat(owner, "<span class='danger'>Wait a second... you just looked at your own [src.name]!</span>")
|
||||
addtimer(CALLBACK(src, .proc/selfGottem, owner), 10)
|
||||
else
|
||||
to_chat(sucker, "<span class='danger'>Wait a second... was that a-</span>")
|
||||
addtimer(CALLBACK(src, .proc/GOTTEM, owner, sucker), 6)
|
||||
|
||||
/// Stage 3A: We face our own failures
|
||||
/obj/item/circlegame/proc/selfGottem(mob/living/owner)
|
||||
if(QDELETED(src) || QDELETED(owner))
|
||||
return
|
||||
|
||||
playsound(get_turf(owner), 'sound/effects/hit_punch.ogg', 50, TRUE, -1)
|
||||
owner.visible_message("<span class='danger'>[owner] shamefully bops [owner.p_them()]self with [owner.p_their()] [src.name].</span>", "<span class='userdanger'>You shamefully bop yourself with your [src.name].</span>", \
|
||||
"<span class='hear'>You hear a dull thud!</span>")
|
||||
log_combat(owner, owner, "bopped", src.name, "(self)")
|
||||
owner.do_attack_animation(owner)
|
||||
owner.apply_damage(100, STAMINA)
|
||||
owner.Knockdown(10)
|
||||
qdel(src)
|
||||
|
||||
/// Stage 3B: We face our reckoning (unless we moved away or they're incapacitated)
|
||||
/obj/item/circlegame/proc/GOTTEM(mob/living/owner, mob/living/sucker)
|
||||
if(QDELETED(sucker))
|
||||
return
|
||||
|
||||
if(QDELETED(src) || QDELETED(owner))
|
||||
to_chat(sucker, "<span class='warning'>Nevermind... must've been your imagination...</span>")
|
||||
return
|
||||
|
||||
if(!in_range(owner, sucker) || !(owner.mobility_flags & MOBILITY_USE))
|
||||
to_chat(sucker, "<span class='notice'>Phew... you moved away before [owner] noticed you saw [owner.p_their()] [src.name]...</span>")
|
||||
return
|
||||
|
||||
to_chat(owner, "<span class='warning'>[sucker] looks down at your [src.name] before trying to avert [sucker.p_their()] eyes, but it's too late!</span>")
|
||||
to_chat(sucker, "<span class='danger'><b>[owner] sees the fear in your eyes as you try to look away from [owner.p_their()] [src.name]!</b></span>")
|
||||
|
||||
playsound(get_turf(owner), 'sound/effects/hit_punch.ogg', 50, TRUE, -1)
|
||||
owner.do_attack_animation(sucker)
|
||||
|
||||
if(HAS_TRAIT(owner, TRAIT_HULK))
|
||||
owner.visible_message("<span class='danger'>[owner] bops [sucker] with [owner.p_their()] [src.name] much harder than intended, sending [sucker.p_them()] flying!</span>", \
|
||||
"<span class='danger'>You bop [sucker] with your [src.name] much harder than intended, sending [sucker.p_them()] flying!</span>", "<span class='hear'>You hear a sickening sound of flesh hitting flesh!</span>", ignored_mobs=list(sucker))
|
||||
to_chat(sucker, "<span class='userdanger'>[owner] bops you incredibly hard with [owner.p_their()] [src.name], sending you flying!</span>")
|
||||
sucker.apply_damage(50, STAMINA)
|
||||
sucker.Knockdown(50)
|
||||
log_combat(owner, sucker, "bopped", src.name, "(setup- Hulk)")
|
||||
var/atom/throw_target = get_edge_target_turf(sucker, owner.dir)
|
||||
sucker.throw_at(throw_target, 6, 3, owner)
|
||||
else
|
||||
owner.visible_message("<span class='danger'>[owner] bops [sucker] with [owner.p_their()] [src.name]!</span>", "<span class='danger'>You bop [sucker] with your [src.name]!</span>", \
|
||||
"<span class='hear'>You hear a dull thud!</span>", ignored_mobs=list(sucker))
|
||||
sucker.apply_damage(15, STAMINA)
|
||||
log_combat(owner, sucker, "bopped", src.name, "(setup)")
|
||||
to_chat(sucker, "<span class='userdanger'>[owner] bops you with [owner.p_their()] [src.name]!</span>")
|
||||
qdel(src)
|
||||
|
||||
/obj/item/slapper
|
||||
name = "slapper"
|
||||
desc = "This is how real men fight."
|
||||
icon_state = "latexballon"
|
||||
item_state = "nothing"
|
||||
force = 0
|
||||
throwforce = 0
|
||||
item_flags = DROPDEL | ABSTRACT
|
||||
attack_verb = list("slapped")
|
||||
hitsound = 'sound/effects/snap.ogg'
|
||||
|
||||
/obj/item/slapper/attack(mob/M, mob/living/carbon/human/user)
|
||||
if(ishuman(M))
|
||||
var/mob/living/carbon/human/L = M
|
||||
if(L && L.dna && L.dna.species)
|
||||
L.dna.species.stop_wagging_tail(M)
|
||||
if(user.a_intent != INTENT_HARM && ((user.zone_selected == BODY_ZONE_PRECISE_MOUTH) || (user.zone_selected == BODY_ZONE_PRECISE_EYES) || (user.zone_selected == BODY_ZONE_HEAD)))
|
||||
user.do_attack_animation(M)
|
||||
playsound(M, 'sound/weapons/slap.ogg', 50, 1, -1)
|
||||
user.visible_message("<span class='danger'>[user] slaps [M]!</span>",
|
||||
"<span class='notice'>You slap [M]!</span>",\
|
||||
"You hear a slap.")
|
||||
return
|
||||
else
|
||||
..()
|
||||
|
||||
/obj/item/proc/can_trigger_gun(mob/living/user)
|
||||
if(!user.can_use_guns(src))
|
||||
return FALSE
|
||||
return TRUE
|
||||
|
||||
/obj/item/extendohand
|
||||
name = "extendo-hand"
|
||||
desc = "Futuristic tech has allowed these classic spring-boxing toys to essentially act as a fully functional hand-operated hand prosthetic."
|
||||
icon = 'icons/obj/items_and_weapons.dmi'
|
||||
icon_state = "extendohand"
|
||||
item_state = "extendohand"
|
||||
lefthand_file = 'icons/mob/inhands/weapons/melee_lefthand.dmi'
|
||||
righthand_file = 'icons/mob/inhands/weapons/melee_righthand.dmi'
|
||||
force = 0
|
||||
throwforce = 5
|
||||
reach = 2
|
||||
|
||||
/obj/item/extendohand/acme
|
||||
name = "\improper ACME Extendo-Hand"
|
||||
desc = "A novelty extendo-hand produced by the ACME corporation. Originally designed to knock out roadrunners."
|
||||
|
||||
/obj/item/extendohand/attack(atom/M, mob/living/carbon/human/user)
|
||||
var/dist = get_dist(M, user)
|
||||
if(dist < reach)
|
||||
to_chat(user, "<span class='warning'>[M] is too close to use [src] on.</span>")
|
||||
return
|
||||
M.attack_hand(user)
|
||||
|
||||
//HF blade
|
||||
|
||||
/obj/item/vibro_weapon
|
||||
icon_state = "hfrequency0"
|
||||
lefthand_file = 'icons/mob/inhands/weapons/swords_lefthand.dmi'
|
||||
righthand_file = 'icons/mob/inhands/weapons/swords_righthand.dmi'
|
||||
name = "vibro sword"
|
||||
desc = "A potent weapon capable of cutting through nearly anything. Wielding it in two hands will allow you to deflect gunfire."
|
||||
armour_penetration = 100
|
||||
block_chance = 40
|
||||
throwforce = 20
|
||||
throw_speed = 4
|
||||
sharpness = IS_SHARP
|
||||
attack_verb = list("cut", "sliced", "diced")
|
||||
w_class = WEIGHT_CLASS_BULKY
|
||||
slot_flags = ITEM_SLOT_BACK
|
||||
hitsound = 'sound/weapons/bladeslice.ogg'
|
||||
var/wielded = FALSE // track wielded status on item
|
||||
|
||||
/obj/item/vibro_weapon/Initialize()
|
||||
. = ..()
|
||||
RegisterSignal(src, COMSIG_TWOHANDED_WIELD, .proc/on_wield)
|
||||
RegisterSignal(src, COMSIG_TWOHANDED_UNWIELD, .proc/on_unwield)
|
||||
|
||||
/obj/item/vibro_weapon/ComponentInitialize()
|
||||
. = ..()
|
||||
AddComponent(/datum/component/butchering, 20, 105)
|
||||
AddComponent(/datum/component/two_handed, force_multiplier=2, icon_wielded="hfrequency1")
|
||||
AddElement(/datum/element/sword_point)
|
||||
|
||||
/// triggered on wield of two handed item
|
||||
/obj/item/vibro_weapon/proc/on_wield(obj/item/source, mob/user)
|
||||
wielded = TRUE
|
||||
|
||||
/// triggered on unwield of two handed item
|
||||
/obj/item/vibro_weapon/proc/on_unwield(obj/item/source, mob/user)
|
||||
wielded = FALSE
|
||||
|
||||
/obj/item/vibro_weapon/update_icon_state()
|
||||
icon_state = "hfrequency0"
|
||||
|
||||
/obj/item/vibro_weapon/run_block(mob/living/owner, atom/object, damage, attack_text, attack_type, armour_penetration, mob/attacker, def_zone, final_block_chance, list/block_return)
|
||||
if(wielded)
|
||||
final_block_chance *= 2
|
||||
if(wielded || !(attack_type & ATTACK_TYPE_PROJECTILE))
|
||||
if(prob(final_block_chance))
|
||||
if(attack_type & ATTACK_TYPE_PROJECTILE)
|
||||
owner.visible_message("<span class='danger'>[owner] deflects [attack_text] with [src]!</span>")
|
||||
playsound(src, pick('sound/weapons/bulletflyby.ogg', 'sound/weapons/bulletflyby2.ogg', 'sound/weapons/bulletflyby3.ogg'), 75, 1)
|
||||
block_return[BLOCK_RETURN_REDIRECT_METHOD] = REDIRECT_METHOD_DEFLECT
|
||||
return BLOCK_SUCCESS | BLOCK_REDIRECTED | BLOCK_SHOULD_REDIRECT | BLOCK_PHYSICAL_EXTERNAL
|
||||
else
|
||||
owner.visible_message("<span class='danger'>[owner] parries [attack_text] with [src]!</span>")
|
||||
return BLOCK_SUCCESS | BLOCK_PHYSICAL_EXTERNAL
|
||||
return NONE
|
||||
var/new_name = stripped_input(user, "What do you wish to name [src]?", "New Name", "bo
|
||||
|
||||
Reference in New Issue
Block a user