Saber SMG update, add armour piercing variable

This commit is contained in:
Markolie
2015-09-21 22:50:07 +02:00
parent cc641cb477
commit ea305d3ffa
11 changed files with 76 additions and 7 deletions
@@ -262,7 +262,7 @@ emp_act
else
visible_message("\red <B>[src] has been attacked in the [hit_area] with [I.name] by [user]!</B>")
var/armor = run_armor_check(affecting, "melee", "Your armor has protected your [hit_area].", "Your armor has softened hit to your [hit_area].")
var/armor = run_armor_check(affecting, "melee", "Your armor has protected your [hit_area].", "Your armor has softened hit to your [hit_area].", I.armour_penetration)
var/weapon_sharp = is_sharp(I)
var/weapon_edge = has_edge(I)
if ((weapon_sharp || weapon_edge) && prob(getarmor(user.zone_sel.selecting, "melee")))
+10 -2
View File
@@ -10,8 +10,16 @@
1 - halfblock
2 - fullblock
*/
/mob/living/proc/run_armor_check(var/def_zone = null, var/attack_flag = "melee", var/absorb_text = null, var/soften_text = null)
/mob/living/proc/run_armor_check(var/def_zone = null, var/attack_flag = "melee", var/absorb_text = null, var/soften_text = null, armour_penetration, penetrated_text)
var/armor = getarmor(def_zone, attack_flag)
//the if "armor" check is because this is used for everything on /living, including humans
if(armor && armour_penetration)
armor = max(0, armor - armour_penetration)
if(penetrated_text)
src << "<span class='userdanger'>[penetrated_text]</span>"
else
src << "<span class='userdanger'>Your armor was penetrated!</span>"
if(armor >= 100)
if(absorb_text)
@@ -42,7 +50,7 @@
Stun(2)
//Armor
var/armor = run_armor_check(def_zone, P.flag)
var/armor = run_armor_check(def_zone, P.flag, "", "", P.armour_penetration)
var/proj_sharp = is_sharp(P)
var/proj_edge = has_edge(P)
if ((proj_sharp || proj_edge) && prob(getarmor(def_zone, P.flag)))
+1
View File
@@ -5,6 +5,7 @@
item_state = "energy_katana"
force = 40
throwforce = 20
armour_penetration = 15
var/cooldown = 0 // Because spam aint cool, yo.
var/datum/effect/effect/system/spark_spread/spark_system
@@ -24,7 +24,21 @@
desc = "A 9mm bullet casing."
caliber = "9mm"
projectile_type = "/obj/item/projectile/bullet/weakbullet3"
/obj/item/ammo_casing/c9mmap
desc = "A 9mm bullet casing."
caliber = "9mm"
projectile_type =/obj/item/projectile/bullet/armourpiercing
/obj/item/ammo_casing/c9mmtox
desc = "A 9mm bullet casing."
caliber = "9mm"
projectile_type = /obj/item/projectile/bullet/toxinbullet
/obj/item/ammo_casing/c9mminc
desc = "A 9mm bullet casing."
caliber = "9mm"
projectile_type = /obj/item/projectile/bullet/incendiary/firebullet
/obj/item/ammo_casing/c45
desc = "A .45 bullet casing."
@@ -132,11 +132,23 @@
icon_state = "smg9mm"
ammo_type = "/obj/item/ammo_casing/c9mm"
caliber = "9mm"
max_ammo = 20
max_ammo = 30
/obj/item/ammo_box/magazine/smgm9mm/ap
name = "SMG magazine (Armour Piercing 9mm)"
ammo_type = /obj/item/ammo_casing/c9mmap
/obj/item/ammo_box/magazine/smgm9mm/toxin
name = "SMG magazine (Toxin Tipped 9mm)"
ammo_type = /obj/item/ammo_casing/c9mmtox
/obj/item/ammo_box/magazine/smgm9mm/fire
name = "SMG Magazine (Incendiary 9mm)"
ammo_type = /obj/item/ammo_casing/c9mminc
/obj/item/ammo_box/magazine/smgm9mm/update_icon()
..()
icon_state = "[initial(icon_state)]-[round(ammo_count(),5)]"
icon_state = "[initial(icon_state)]-[round(ammo_count(),6)]"
/obj/item/ammo_box/magazine/smgm45
name = "SMG magazine (.45)"
@@ -27,6 +27,18 @@
/obj/item/projectile/bullet/weakbullet3
damage = 20
/obj/item/projectile/bullet/toxinbullet
damage = 15
damage_type = TOX
/obj/item/projectile/bullet/incendiary/firebullet
damage = 10
/obj/item/projectile/bullet/armourpiercing
damage = 17
armour_penetration = 10
/obj/item/projectile/bullet/pellet
name = "pellet"
@@ -53,7 +53,7 @@
var/mob/living/carbon/human/H = target
var/headarmor = 0 // Target's head armour
armor_block = H.run_armor_check(affecting, "melee") // For normal attack damage
armor_block = H.run_armor_check(affecting, "melee","","",armour_penetration) // For normal attack damage
//If they have a hat/helmet and the user is targeting their head.
if(istype(H.head, /obj/item/clothing/head) && affecting == "head")
@@ -126,13 +126,34 @@
/datum/design/mag_smg
name = "Saber Submachine Gun Magazine (9mm)"
desc = "A 20-round magazine for the Saber submachine gun."
desc = "A 30-round magazine for the Saber submachine gun."
id = "mag_smg"
req_tech = list("combat" = 4, "materials" = 3)
build_type = PROTOLATHE
materials = list(MAT_METAL = 2000)
build_path = /obj/item/ammo_box/magazine/smgm9mm
category = list("Weapons")
/datum/design/mag_smg/ap_mag
name = "Saber Submachine Gun Magazine (9mmAP)"
desc = "A 30-round armour piercing magazine for the Saber submachine gun. Deals slightly less damage but bypasses most armor."
id = "mag_smg_ap"
materials = list(MAT_METAL = 3000, MAT_SILVER = 100)
build_path = /obj/item/ammo_box/magazine/smgm9mm/ap
/datum/design/mag_smg/incin_mag
name = "Saber Submachine Gun Magazine (9mmIC)"
desc = "A 30-round incendiary round magazine for the Saber submachine gun. Deals significantly less damage but sets the target on fire."
id = "mag_smg_ic"
materials = list(MAT_METAL = 3000, MAT_SILVER = 100, MAT_GLASS = 400)
build_path = /obj/item/ammo_box/magazine/smgm9mm/fire
/datum/design/mag_smg/incin_tox
name = "Saber Submachine Gun Magazine (9mmTX)"
desc = "A 30-round uranium tipped round magazine for the Saber submachine gun. Deals toxin damage, but less overall damage."
id = "mag_smg_tx"
materials = list(MAT_METAL = 3000, MAT_GLASS = 200, MAT_URANIUM = 1000)
build_path = /obj/item/ammo_box/magazine/smgm9mm/toxin
/datum/design/rapidsyringe
name = "Rapid Syringe Gun"