Skip to content

Commit

Permalink
Merge pull request Huz2e#189 from Bruh-24/master
Browse files Browse the repository at this point in the history
Poison knife
  • Loading branch information
Huz2e authored Dec 5, 2024
2 parents f21d786 + 188e2f3 commit d19cc1f
Show file tree
Hide file tree
Showing 7 changed files with 75 additions and 1 deletion.
43 changes: 43 additions & 0 deletions modular_meta/features/venom_knife/code/knives.dm
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
/obj/item/knife/poison
name = "venom knife"
icon = 'icons/obj/weapons/stabby.dmi' // Пока что использует стандартный спрайт боевого ножа, если есть желание сделать уникальный спрайт - дерзайте.
icon_state = "buckknife"
worn_icon_state = "buckknife"
force = 12
throwforce = 15
throw_speed = 5
throw_range = 7
var/amount_per_transfer_from_this = 10
var/list/possible_transfer_amounts
desc = "An infamous knife of syndicate design, \
it has a tiny hole going through the blade to the handle which stores toxins. \
Use in-hand to to increase or decrease its transfer amount. \
Each hit has a 40% chance to transfer reagents from knife's internal storage to your victim"


/obj/item/knife/poison/Initialize(mapload)
. = ..()
create_reagents(40,OPENCONTAINER)
possible_transfer_amounts = list(5, 10)

/obj/item/knife/poison/attack_self(mob/user)
if(possible_transfer_amounts.len)
var/i=0
for(var/amount in possible_transfer_amounts)
i++
if(amount == amount_per_transfer_from_this)
if(i<possible_transfer_amounts.len)
amount_per_transfer_from_this = possible_transfer_amounts[i+1]
else
amount_per_transfer_from_this = possible_transfer_amounts[1]
balloon_alert(user, "Transferring [amount_per_transfer_from_this]u.")
to_chat(user, "<span class='notice'>[src]'s transfer amount is now [amount_per_transfer_from_this] units.</span>")
return

/obj/item/knife/poison/afterattack(mob/living/enemy, mob/user)
if(!istype(enemy))
return
if(reagents?.total_volume && enemy.reagents && prob(40))
reagents.trans_to(enemy, amount_per_transfer_from_this)
else
return ..()
8 changes: 8 additions & 0 deletions modular_meta/features/venom_knife/code/uplink.dm
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
/datum/uplink_item/stealthy_weapons/venom_knife
name = "Poison Knife"
desc = "Gorlex's new design on a combat knife, it has an integrated reagent container, \
with each attack it is able to deliver deadliest poisons known to humanity, poisons not included! \
Small note from Gorlex's engineers: use with poison kit to achieve best effect!"
cost = 8
item = /obj/item/knife/poison

Binary file not shown.
10 changes: 10 additions & 0 deletions modular_meta/features/venom_knife/includes.dm
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
#include "code\knives.dm"
#include "code\uplink.dm"

/datum/modpack/venom_knife
id = "venom_knife"
icon = 'modular_meta/features/venom_knife/preview.dmi'
name = "Ядовитый Нож"
group = "Features"
desc = "Нож передающий реагенты цели, доступен в аплинке, перенесено с Beestation"
author = "Bruh24"
Binary file added modular_meta/features/venom_knife/preview.dmi
Binary file not shown.
13 changes: 13 additions & 0 deletions modular_meta/features/venom_knife/readme.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
## Module ID: VENOM_KNIFE

### Defines:

- N/A

### TG Proc/File Changes:

- N/A

### TGUI Files:

- N/A
2 changes: 1 addition & 1 deletion modular_meta/main_modular_include.dm
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
#if CHEBUREK_CAR
#include "features\cheburek_car\includes.dm"
#endif

#include "features\venom_knife\includes.dm"
/* -- REVERTS -- */

#include "reverts\revert_glasses_protect_welding\includes.dm"
Expand Down

0 comments on commit d19cc1f

Please sign in to comment.