forked from Huz2e/massmeta
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request Huz2e#189 from Bruh-24/master
Poison knife
- Loading branch information
Showing
7 changed files
with
75 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 ..() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters