mirror of
https://github.com/PolarisSS13/Polaris.git
synced 2026-08-29 08:09:34 +01:00
Implementing tranquilizer rifle and pistols.
This commit is contained in:
@@ -1,5 +1,4 @@
|
||||
// Phase weapons go here
|
||||
|
||||
/obj/item/gun/energy/phasegun
|
||||
name = "phase carbine"
|
||||
desc = "The RayZar EW26 Artemis is a downsized energy weapon, specifically designed for use against wildlife."
|
||||
@@ -12,6 +11,30 @@
|
||||
projectile_type = /obj/item/projectile/energy/phase
|
||||
one_handed_penalty = 15
|
||||
|
||||
/obj/item/gun/energy/phasegun/tranq_rifle
|
||||
name = "tranquilizer rifle"
|
||||
desc = "A niche RayZar product designed for nonlethal animal control. A specialized emitter disrupts the nervous system of the target, eventually inducing sleep. Only rated for use on wildlife."
|
||||
icon_state = "phaserifle"
|
||||
item_state = "phaserifle"
|
||||
wielded_item_state = "phaserifle-wielded"
|
||||
w_class = ITEMSIZE_LARGE
|
||||
slot_flags = SLOT_BACK
|
||||
charge_cost = 140
|
||||
projectile_type = /obj/item/projectile/energy/phase/tranq
|
||||
accuracy = 15
|
||||
one_handed_penalty = 30
|
||||
|
||||
/obj/item/gun/energy/phasegun/tranq_pistol
|
||||
name = "tranquilizer pistol"
|
||||
desc = "A niche RayZar product designed for nonlethal animal control. A specialized emitter disrupts the nervous system of the target, eventually inducing sleep. Only rated for use on wildlife."
|
||||
icon_state = "phase"
|
||||
item_state = "taser"
|
||||
w_class = ITEMSIZE_NORMAL
|
||||
slot_flags = SLOT_BELT|SLOT_HOLSTER
|
||||
charge_cost = 200
|
||||
projectile_type = /obj/item/projectile/energy/phase/tranq/weak
|
||||
one_handed_penalty = 0
|
||||
|
||||
/obj/item/gun/energy/phasegun/mounted
|
||||
self_recharge = 1
|
||||
use_external_power = 1
|
||||
@@ -65,4 +88,4 @@
|
||||
charge_cost = 100
|
||||
projectile_type = /obj/item/projectile/energy/phase/heavy/cannon
|
||||
accuracy = 15
|
||||
one_handed_penalty = 65
|
||||
one_handed_penalty = 65
|
||||
|
||||
@@ -820,3 +820,9 @@
|
||||
if(silenced)
|
||||
volume = 5
|
||||
playsound(A, hitsound_wall, volume, 1, -1)
|
||||
|
||||
|
||||
/obj/item/projectile/proc/apply_SA_vulnerability(var/mob/living/simple_mob/victim)
|
||||
if(!nodamage && SA_bonus_damage && istype(victim) && (SA_vulnerability & victim.mob_class))
|
||||
return SA_bonus_damage
|
||||
return 0
|
||||
|
||||
@@ -292,4 +292,33 @@
|
||||
range = 10
|
||||
damage = 15
|
||||
SA_bonus_damage = 60 // 75 total on animals
|
||||
hud_state = "laser_heat"
|
||||
hud_state = "laser_heat"
|
||||
|
||||
/obj/item/projectile/energy/phase/tranq
|
||||
name = "tranquilizer wave"
|
||||
range = 10
|
||||
damage = 0
|
||||
nodamage = TRUE
|
||||
SA_bonus_damage = 0
|
||||
hud_state = "laser_heat"
|
||||
var/tranq_duration = 30 SECONDS
|
||||
var/tranq_delay = 10 SECONDS
|
||||
var/tranq_delay_modifier = 0.7
|
||||
|
||||
/obj/item/projectile/energy/phase/tranq/weak
|
||||
range = 6
|
||||
tranq_duration = 20 SECONDS
|
||||
tranq_delay = 15 SECONDS
|
||||
tranq_delay_modifier = 0.9
|
||||
|
||||
// Being hit with a tranq shot either shaves a percentage off the remaining delay, or starts the timer.
|
||||
/obj/item/projectile/energy/phase/tranq/apply_SA_vulnerability(var/mob/living/simple_mob/victim)
|
||||
..()
|
||||
if(!istype(victim) || victim.stat != CONSCIOUS || !(SA_vulnerability & victim.mob_class))
|
||||
return
|
||||
if(victim.tranq_countdown <= 0)
|
||||
victim.tranq_countdown = tranq_duration / SSmobs.wait
|
||||
else
|
||||
victim.tranq_countdown *= tranq_delay_modifier
|
||||
victim.tranq_duration = (victim.tranq_duration > 0) ? min(tranq_duration, victim.tranq_duration) : tranq_duration
|
||||
victim.tranq_countdown = max(1, round(victim.tranq_countdown))
|
||||
|
||||
Reference in New Issue
Block a user