Skip to content

Commit

Permalink
yea
Browse files Browse the repository at this point in the history
  • Loading branch information
FalloutFalcon committed Sep 30, 2024
1 parent 28fcdaf commit 78b3f4e
Show file tree
Hide file tree
Showing 6 changed files with 164 additions and 142 deletions.
1 change: 0 additions & 1 deletion code/game/objects/items/melee/dualenergy.dm
Original file line number Diff line number Diff line change
Expand Up @@ -186,4 +186,3 @@

/obj/item/melee/duelenergy/halberd/yellow
possible_colors = list("yellow")

Original file line number Diff line number Diff line change
Expand Up @@ -195,3 +195,121 @@
bug.death(1)
else
qdel(target)

/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 = 'icons/obj/weapon/spear.dmi'
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/melee/spear/S = new /obj/item/melee/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 //20 + 2 (WEIGHT_CLASS_SMALL) * 4 (EMBEDDED_IMPACT_PAIN_MULTIPLIER) = 28 damage on hit due to guaranteed embedding
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/throwing_star/magspear
name = "magnetic spear"
desc = "A reusable spear that is typically loaded into kinetic spearguns."
icon = 'icons/obj/ammo_bullets.dmi'
icon_state = "magspear"
throwforce = 25 //kills regular carps in one hit
force = 10
throw_range = 0 //throwing these invalidates the speargun
attack_verb = list("stabbed", "ripped", "gored", "impaled")
embedding = list("pain_mult" = 8, "embed_chance" = 100, "fall_chance" = 0, "impact_pain_mult" = 15) //55 damage+embed on hit

/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_HUGE
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'
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()
30 changes: 27 additions & 3 deletions code/game/objects/items/melee/sword.dm
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
_stamina_constant = self_stam_const, \
_stamina_coefficient = self_stam_coef, \
_parryable_attack_types = NON_PROJECTILE_ATTACKS, \
_riposte = riposte, \
_riposte = riposte, \
_requires_activation = parry_transformed, \
)

Expand All @@ -36,7 +36,7 @@
if(attack_type == PROJECTILE_ATTACK)
final_block_chance = projectile_block_chance //Don't bring a sword to a gunfight
return ..()

/obj/item/melee/sword/claymore
name = "claymore"
desc = "What are you standing around staring at this for? Get to killing!"
Expand Down Expand Up @@ -80,7 +80,31 @@

/obj/item/melee/sword/mass/ComponentInitialize()
. = ..()
AddComponent(/datum/component/two_handed, force_unwielded=20, force_wielded=22, icon_wielded="[base_icon_state]1")
AddComponent(/datum/component/two_handed, force_unwielded = 20, force_wielded = 22, icon_wielded = "[base_icon_state]_w")

/obj/item/melee/sword/mass/hit_reaction(mob/living/carbon/human/owner, atom/movable/hitby, attack_text = "the attack", final_block_chance = 0, damage = 0, attack_type = MELEE_ATTACK)
. = ..()
if(.)
on_block(owner, hitby, attack_text, damage, attack_type)

/obj/item/melee/sword/mass/proc/on_block(mob/living/carbon/human/owner, atom/movable/hitby, attack_text = "the attack", damage = 0, attack_type = MELEE_ATTACK)
if (obj_integrity <= damage)
var/turf/T = get_turf(owner)
T.visible_message("<span class='warning'>[hitby] destroys [src]!</span>")
qdel(src)
return FALSE
take_damage(damage)

/obj/item/melee/sword/mass/examine(mob/user)
. = ..()
var/healthpercent = round((obj_integrity/max_integrity) * 100, 1)
switch(healthpercent)
if(50 to 99)
. += "<span class='info'>It looks slightly damaged.</span>"
if(25 to 50)
. += "<span class='info'>It appears heavily damaged.</span>"
if(0 to 25)
. += "<span class='warning'>It's falling apart!</span>"

/obj/item/melee/sword/katana
name = "katana"
Expand Down
119 changes: 0 additions & 119 deletions code/game/objects/items/melee/weaponry.dm

This file was deleted.

35 changes: 18 additions & 17 deletions code/game/objects/items/shields.dm
Original file line number Diff line number Diff line change
@@ -1,32 +1,23 @@
/obj/item/shield
name = "shield"
icon = 'icons/obj/shields.dmi'
block_chance = 50
block_cooldown_time = 0 SECONDS
armor = list("melee" = 50, "bullet" = 50, "laser" = 50, "energy" = 0, "bomb" = 30, "bio" = 0, "rad" = 0, "fire" = 80, "acid" = 70)
var/transparent = FALSE // makes beam projectiles pass through the shield

/obj/item/shield/proc/on_shield_block(mob/living/carbon/human/owner, atom/movable/hitby, attack_text = "the attack", damage = 0, attack_type = MELEE_ATTACK)
return TRUE

/obj/item/shield/riot
name = "riot shield"
desc = "A shield adept at blocking blunt objects from connecting with the torso of the shield wielder."
icon_state = "riot"
lefthand_file = 'icons/mob/inhands/equipment/shields_lefthand.dmi'
righthand_file = 'icons/mob/inhands/equipment/shields_righthand.dmi'
block_chance = 50
block_cooldown_time = 0 SECONDS
slot_flags = ITEM_SLOT_BACK
force = 10
throwforce = 5
throw_speed = 2
throw_range = 3
w_class = WEIGHT_CLASS_BULKY
custom_materials = list(/datum/material/glass=7500, /datum/material/iron=1000)
attack_verb = list("shoved", "bashed")
armor = list("melee" = 50, "bullet" = 50, "laser" = 50, "energy" = 0, "bomb" = 30, "bio" = 0, "rad" = 0, "fire" = 80, "acid" = 70)
var/cooldown = 0 //shield bash cooldown. based on world.time
transparent = TRUE
max_integrity = 75
material_flags = MATERIAL_NO_EFFECTS
var/transparent = FALSE // makes beam projectiles pass through the shield

/obj/item/shield/proc/on_shield_block(mob/living/carbon/human/owner, atom/movable/hitby, attack_text = "the attack", damage = 0, attack_type = MELEE_ATTACK)
return TRUE

/obj/item/shield/hit_reaction(mob/living/carbon/human/owner, atom/movable/hitby, attack_text = "the attack", final_block_chance = 0, damage = 0, attack_type = MELEE_ATTACK)
if(transparent && (hitby.pass_flags & PASSGLASS))
Expand All @@ -35,10 +26,20 @@
final_block_chance += 30
if(attack_type == LEAP_ATTACK)
final_block_chance = 100
. = .()
. = ..()
if(.)
on_shield_block(owner, hitby, attack_text, damage, attack_type)

/obj/item/shield/riot
name = "riot shield"
desc = "A shield adept at blocking blunt objects from connecting with the torso of the shield wielder."
icon_state = "riot"
custom_materials = list(/datum/material/glass=7500, /datum/material/iron=1000)

transparent = TRUE
max_integrity = 75
material_flags = MATERIAL_NO_EFFECT

/obj/item/shield/riot/attackby(obj/item/W, mob/user, params)
if(istype(W, /obj/item/melee/baton))
if(cooldown < world.time - 25)
Expand Down
3 changes: 1 addition & 2 deletions shiptest.dme
Original file line number Diff line number Diff line change
Expand Up @@ -1324,14 +1324,13 @@
#include "code\game\objects\items\melee\dualenergy.dm"
#include "code\game\objects\items\melee\energy.dm"
#include "code\game\objects\items\melee\knife.dm"
#include "code\game\objects\items\melee\misc.dm"
#include "code\game\objects\items\melee\melee.dm"
#include "code\game\objects\items\melee\powerfist.dm"
#include "code\game\objects\items\melee\spear.dm"
#include "code\game\objects\items\melee\stunbaton.dm"
#include "code\game\objects\items\melee\sword.dm"
#include "code\game\objects\items\melee\teleprod.dm"
#include "code\game\objects\items\melee\trickweapon.dm"
#include "code\game\objects\items\melee\weaponry.dm"
#include "code\game\objects\items\robot\ai_upgrades.dm"
#include "code\game\objects\items\robot\robot_items.dm"
#include "code\game\objects\items\robot\robot_parts.dm"
Expand Down

0 comments on commit 78b3f4e

Please sign in to comment.