Ports baystation armor system (#2954)

Ports Baystation12/Baystation12#12658

Changing how the calculation of armor works , instead of just being a check if it is protected fully, half or nothing. Making armor more reliable and less rng dependant.

Also, uranium meteors will irradiate nearby people when they explode.
This commit is contained in:
Alberyk
2017-07-15 10:24:03 -03:00
committed by skull132
parent 41e39f52d1
commit 2f949ecb45
52 changed files with 274 additions and 248 deletions
+2 -2
View File
@@ -942,11 +942,11 @@ var/global/list/obj/item/device/pda/PDAs = list()
message += "Large clouds of noxious smoke billow forth from your [P]!"
if(i>=65 && i<=75) //Weaken
if(M && isliving(M))
M.apply_effects(0,1)
M.apply_effects(weaken = 1)
message += "Your [P] flashes with a blinding white light! You feel weaker."
if(i>=75 && i<=85) //Stun and stutter
if(M && isliving(M))
M.apply_effects(1,0,0,0,1)
M.apply_effects(stun = 1, stutter = 1)
message += "Your [P] flashes with a blinding white light! You feel weaker."
if(i>=85) //Sparks
spark(P.loc, 2)
+6 -4
View File
@@ -12,22 +12,24 @@
/obj/item/borg/stun/apply_hit_effect(mob/living/M, mob/living/silicon/robot/user, var/hit_zone)
if(!istype(user))
return
return 0
user.visible_message("<span class='danger'>\The [user] has prodded \the [M] with \a [src]!</span>")
if(!user.cell || !user.cell.checked_use(1250)) //Slightly more than a baton.
return
return 0
playsound(loc, 'sound/weapons/Egloves.ogg', 50, 1, -1)
M.apply_effect(5, STUTTER)
M.stun_effect_act(0, 70, check_zone(hit_zone), src)
if(ishuman(M))
var/mob/living/carbon/human/H = M
H.forcesay(hit_appends)
return 0
/obj/item/borg/overdrive
name = "overdrive"
icon = 'icons/obj/decals.dmi'
@@ -66,7 +66,7 @@
/obj/item/weapon/dnainjector/proc/inject(mob/M as mob, mob/user as mob)
if(istype(M,/mob/living))
var/mob/living/L = M
L.apply_effect(rand(5,20), IRRADIATE, check_protection = 0)
L.apply_effect(rand(5,20), IRRADIATE, blocked = 0)
if (!(NOCLONE in M.mutations)) // prevents drained people from having their DNA changed
if (buf.types & DNA2_BUF_UI)
@@ -65,7 +65,7 @@
return ..()
/obj/item/weapon/material/apply_hit_effect()
..()
. = ..()
if(!unbreakable)
if(material.is_brittle())
health = 0
@@ -92,7 +92,7 @@ Commenting this out pending rebalancing of radiation based on small objects.
if(!material.radioactivity)
return
for(var/mob/living/L in range(1,src))
L.apply_effect(round(material.radioactivity/30),IRRADIATE,0)
L.apply_effect(round(material.radioactivity/30),IRRADIATE, blocked = L.getarmor(null, "rad"))
*/
/*
+12 -13
View File
@@ -73,7 +73,7 @@
//armour
var/blocked = L.run_armor_check(target_zone, "melee")
if(blocked >= 2)
if(blocked >= 100)
return
var/success = L.apply_damage(30, BRUTE, target_zone, blocked, src)
@@ -81,19 +81,18 @@
return 0
//trap the victim in place
if(!blocked)
set_dir(L.dir)
can_buckle = 1
buckle_mob(L)
L << "<span class='danger'>The steel jaws of \the [src] bite into you, trapping you in place!</span>"
deployed = 0
can_buckle = initial(can_buckle)
playsound(src, 'sound/weapons/beartrap_shut.ogg', 100, 1)//Really loud snapping sound
set_dir(L.dir)
can_buckle = 1
buckle_mob(L)
L << "<span class='danger'>The steel jaws of \the [src] bite into you, trapping you in place!</span>"
deployed = 0
can_buckle = initial(can_buckle)
playsound(src, 'sound/weapons/beartrap_shut.ogg', 100, 1)//Really loud snapping sound
if (istype(L, /mob/living/simple_animal/hostile/bear))
var/mob/living/simple_animal/hostile/bear/bear = L
bear.anger += 15//Beartraps make bears really angry
bear.instant_aggro()
if (istype(L, /mob/living/simple_animal/hostile/bear))
var/mob/living/simple_animal/hostile/bear/bear = L
bear.anger += 15//Beartraps make bears really angry
bear.instant_aggro()
/obj/item/weapon/beartrap/Crossed(AM as mob|obj)
if(deployed && isliving(AM))
@@ -73,19 +73,21 @@
padding_material = null
update_icon()
/obj/item/weapon/stool/attack(mob/M as mob, mob/user as mob)
if (prob(5) && istype(M,/mob/living))
user.visible_message("<span class='danger'>[user] breaks [src] over [M]'s back!</span>")
/obj/item/weapon/stool/apply_hit_effect(mob/living/target, mob/living/user, var/hit_zone)
if (prob(5))
user.visible_message("<span class='danger'>[user] breaks [src] over [target]'s back!</span>")
user.setClickCooldown(DEFAULT_ATTACK_COOLDOWN)
user.do_attack_animation(M)
user.do_attack_animation(target)
user.remove_from_mob(src)
dismantle()
qdel(src)
var/mob/living/T = M
T.Weaken(10)
T.apply_damage(20)
var/blocked = target.run_armor_check(hit_zone, "melee")
target.Weaken(10 * BLOCKED_MULT(blocked))
target.apply_damage(20, BRUTE, hit_zone, blocked, src)
return
..()
/obj/item/weapon/stool/ex_act(severity)
@@ -151,7 +151,7 @@
occupant.apply_effect(6, STUN, blocked)
occupant.apply_effect(6, WEAKEN, blocked)
occupant.apply_effect(6, STUTTER, blocked)
occupant.apply_damage(10, BRUTE, def_zone)
occupant.apply_damage(10, BRUTE, def_zone, blocked)
playsound(src.loc, 'sound/weapons/punch1.ogg', 50, 1, -1)
if(istype(A, /mob/living))
var/mob/living/victim = A
@@ -160,7 +160,7 @@
victim.apply_effect(6, STUN, blocked)
victim.apply_effect(6, WEAKEN, blocked)
victim.apply_effect(6, STUTTER, blocked)
victim.apply_damage(10, BRUTE, def_zone)
victim.apply_damage(10, BRUTE, def_zone, blocked)
if(pulling)
occupant.visible_message("<span class='danger'>[pulling] has thrusted \the [name] into \the [A], throwing \the [occupant] out of it!</span>")
+27 -19
View File
@@ -217,25 +217,7 @@
if (istype(W, /obj/item/weapon/grab) && get_dist(src,user)<2)
var/obj/item/weapon/grab/G = W
if(istype(G.affecting,/mob/living))
var/mob/living/M = G.affecting
var/state = G.state
qdel(W) //gotta delete it here because if window breaks, it won't get deleted
switch (state)
if(1)
M.visible_message("<span class='warning'>[user] slams [M] against \the [src]!</span>")
M.apply_damage(7)
hit(10)
if(2)
M.visible_message("<span class='danger'>[user] bashes [M] against \the [src]!</span>")
if (prob(50))
M.Weaken(1)
M.apply_damage(10)
hit(25)
if(3)
M.visible_message("<span class='danger'><big>[user] crushes [M] against \the [src]!</big></span>")
M.Weaken(5)
M.apply_damage(20)
hit(50)
grab_smash_attack(G, BRUTE)
return
if(W.flags & NOBLUDGEON) return
@@ -285,6 +267,32 @@
..()
return
/obj/structure/window/proc/grab_smash_attack(obj/item/weapon/grab/G, var/damtype = BRUTE)
var/mob/living/M = G.affecting
var/mob/living/user = G.assailant
var/state = G.state
qdel(G) //gotta delete it here because if window breaks, it won't get deleted
var/def_zone = ran_zone("head", 20)
var/blocked = M.run_armor_check(def_zone, "melee")
switch (state)
if(1)
M.visible_message("<span class='warning'>[user] slams [M] against \the [src]!</span>")
M.apply_damage(7, damtype, def_zone, blocked, src)
hit(10)
if(2)
M.visible_message("<span class='danger'>[user] bashes [M] against \the [src]!</span>")
if (prob(50))
M.Weaken(1)
M.apply_damage(10, damtype, def_zone, blocked, src)
hit(25)
if(3)
M.visible_message("<span class='danger'><big>[user] crushes [M] against \the [src]!</big></span>")
M.Weaken(5)
M.apply_damage(20, damtype, def_zone, blocked, src)
hit(50)
/obj/structure/window/proc/hit(var/damage, var/sound_effect = 1)
if(reinf) damage *= 0.5
take_damage(damage)