mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-08-29 23:17:02 +01:00
New gun: Freeze Gun. Metroids beware!
I also nerfed the damage water inflicts on Metroids because the previous amount of damage was absolutely insane. git-svn-id: http://tgstation13.googlecode.com/svn/trunk@1835 316c924e-a436-60f5-8080-3fe189b3f50e
This commit is contained in:
@@ -62,6 +62,20 @@ var/const/PROJECTILE_DART = 8
|
||||
damage_type = PROJECTILE_BOLT
|
||||
icon_state = "cbbolt"
|
||||
|
||||
freeze
|
||||
name = "freeze beam"
|
||||
icon_state = "ice_2"
|
||||
var/temperature = 0
|
||||
|
||||
proc/Freeze(atom/A as mob|obj|turf|area)
|
||||
if(istype(A, /mob))
|
||||
var/mob/M = A
|
||||
if(M.bodytemperature > temperature)
|
||||
M.bodytemperature = temperature
|
||||
|
||||
|
||||
|
||||
|
||||
Bump(atom/A as mob|obj|turf|area)
|
||||
if(A == firer)
|
||||
loc = A.loc
|
||||
@@ -86,10 +100,16 @@ var/const/PROJECTILE_DART = 8
|
||||
M.attack_log += text("[] <b>UNKOWN SUBJECT (No longer exists)</b> shot <b>[]/[]</b> with a <b>[]</b>", world.time, M, M.ckey, src)
|
||||
spawn(0)
|
||||
if(A)
|
||||
A.bullet_act(damage_type, src, def_zone)
|
||||
if(istype(A,/turf) && !istype(src, /obj/item/projectile/beam))
|
||||
for(var/obj/O in A)
|
||||
O.bullet_act(damage_type, src, def_zone)
|
||||
|
||||
if(istype(src, /obj/item/projectile/freeze))
|
||||
var/obj/item/projectile/freeze/F = src
|
||||
F.Freeze(A)
|
||||
else
|
||||
|
||||
A.bullet_act(damage_type, src, def_zone)
|
||||
if(istype(A,/turf) && !istype(src, /obj/item/projectile/beam))
|
||||
for(var/obj/O in A)
|
||||
O.bullet_act(damage_type, src, def_zone)
|
||||
del(src)
|
||||
return
|
||||
|
||||
@@ -743,12 +763,90 @@ var/const/PROJECTILE_DART = 8
|
||||
|
||||
freeze
|
||||
name = "freeze gun"
|
||||
icon_state = "freezegun100"
|
||||
icon_state = "freezegun"
|
||||
fire_sound = 'pulse3.ogg'
|
||||
desc = "A gun that shoots supercooled hydrogen particles to drastically chill a target's body temperature."
|
||||
var/temperature = T20C
|
||||
var/current_temperature = T20C
|
||||
charge_cost = 100
|
||||
origin_tech = "combat=3;materials=4;powerstorage=3;magnets=2"
|
||||
|
||||
|
||||
New()
|
||||
power_supply = new /obj/item/weapon/cell/crap(src)
|
||||
power_supply.give(power_supply.maxcharge)
|
||||
spawn()
|
||||
Life()
|
||||
|
||||
|
||||
load_into_chamber()
|
||||
if(in_chamber)
|
||||
return 1
|
||||
if(power_supply.charge < charge_cost)
|
||||
return 0
|
||||
in_chamber = new /obj/item/projectile/freeze(src)
|
||||
power_supply.use(charge_cost)
|
||||
return 1
|
||||
|
||||
attack_self(mob/living/user as mob)
|
||||
user.machine = src
|
||||
var/temp_text = ""
|
||||
if(temperature > (T0C - 50))
|
||||
temp_text = "<FONT color=black>[temperature] ([round(temperature-T0C)]°C) ([round(temperature*1.8-459.67)]°F)</FONT>"
|
||||
else
|
||||
temp_text = "<FONT color=blue>[temperature] ([round(temperature-T0C)]°C) ([round(temperature*1.8-459.67)]°F)</FONT>"
|
||||
|
||||
var/dat = {"<B>Freeze Gun Configuration: </B><BR>
|
||||
Current output temperature: [temp_text]<BR>
|
||||
Target output temperature: <A href='?src=\ref[src];temp=-100'>-</A> <A href='?src=\ref[src];temp=-10'>-</A> <A href='?src=\ref[src];temp=-1'>-</A> [current_temperature] <A href='?src=\ref[src];temp=1'>+</A> <A href='?src=\ref[src];temp=10'>+</A> <A href='?src=\ref[src];temp=100'>+</A><BR>
|
||||
"}
|
||||
|
||||
user << browse(dat, "window=freezegun;size=450x300")
|
||||
onclose(user, "freezegun")
|
||||
|
||||
Topic(href, href_list)
|
||||
if (..())
|
||||
return
|
||||
usr.machine = src
|
||||
src.add_fingerprint(usr)
|
||||
if(href_list["temp"])
|
||||
var/amount = text2num(href_list["temp"])
|
||||
if(amount > 0)
|
||||
src.current_temperature = min(T20C, src.current_temperature+amount)
|
||||
else
|
||||
src.current_temperature = max(0, src.current_temperature+amount)
|
||||
if (istype(src.loc, /mob))
|
||||
attack_self(src.loc)
|
||||
src.add_fingerprint(usr)
|
||||
return
|
||||
|
||||
proc/Life()
|
||||
while(src)
|
||||
sleep(10)
|
||||
|
||||
switch(temperature)
|
||||
if(0 to 10) charge_cost = 500
|
||||
if(11 to 50) charge_cost = 150
|
||||
if(51 to 100) charge_cost = 100
|
||||
if(101 to 150) charge_cost = 75
|
||||
if(151 to 200) charge_cost = 50
|
||||
if(201 to 300) charge_cost = 25
|
||||
|
||||
if(current_temperature != temperature)
|
||||
var/difference = abs(current_temperature - temperature)
|
||||
if(difference >= 10)
|
||||
if(current_temperature < temperature)
|
||||
temperature -= 10
|
||||
else
|
||||
temperature += 10
|
||||
|
||||
else
|
||||
temperature = current_temperature
|
||||
|
||||
if (istype(src.loc, /mob))
|
||||
attack_self(src.loc)
|
||||
|
||||
|
||||
|
||||
|
||||
crossbow
|
||||
@@ -881,6 +979,12 @@ var/const/PROJECTILE_DART = 8
|
||||
user.bullet_act(in_chamber.damage_type)
|
||||
del(in_chamber)
|
||||
else
|
||||
if(istype(src, /obj/item/weapon/gun/energy/freeze))
|
||||
var/obj/item/projectile/freeze/F = in_chamber
|
||||
var/obj/item/weapon/gun/energy/freeze/Fgun = src
|
||||
|
||||
F.temperature = Fgun.temperature
|
||||
|
||||
in_chamber.original = targloc
|
||||
in_chamber.loc = get_turf(user)
|
||||
user.next_move = world.time + 4
|
||||
|
||||
Reference in New Issue
Block a user