Removes RnG from the Ablative Trenchcoat and Armor (#19958)

* removes RnG from the Ablative Trenchcoat and Armor

* Snowball suggestion

* don't ever let anyone tell you I'm smart

* Charlie Requests

* HAHA I AM SMART

* Hal8999 Review

* merge conflicts, who knows how they work? I don't
This commit is contained in:
Coolrune206
2022-12-29 05:02:17 +10:00
committed by GitHub
parent 6ec12bd917
commit 3042cfde66
2 changed files with 18 additions and 4 deletions

View File

@@ -315,12 +315,19 @@
item_state = "armor_reflec"
blood_overlay_type = "armor"
armor = list(MELEE = 5, BULLET = 5, LASER = 75, ENERGY = 50, BOMB = 0, BIO = 0, RAD = 0, FIRE = INFINITY, ACID = INFINITY)
var/hit_reflect_chance = 40
var/last_reflect_time
var/reflect_cooldown = 5 SECONDS
/obj/item/clothing/suit/armor/laserproof/IsReflect()
var/mob/living/carbon/human/user = loc
if(prob(hit_reflect_chance) && (user.wear_suit == src))
if(user.wear_suit != src)
return 0
if(world.time - last_reflect_time >= reflect_cooldown)
last_reflect_time = world.time
return 1
if(world.time - last_reflect_time <= 1) // This is so if multiple energy projectiles hit at once, they're all reflected
return 1
return 0
/obj/item/clothing/suit/armor/vest/det_suit
name = "armor"

View File

@@ -535,12 +535,19 @@
put_on_delay = 4 SECONDS
sprite_sheets = list("Vox" = 'icons/mob/clothing/species/vox/suit.dmi',
"Grey" = 'icons/mob/clothing/species/grey/suit.dmi')
var/hit_reflect_chance = 50
var/last_reflect_time
var/reflect_cooldown = 4 SECONDS
/obj/item/clothing/suit/hooded/ablative/IsReflect()
var/mob/living/carbon/human/user = loc
if(prob(hit_reflect_chance) && (user.wear_suit == src))
if(user.wear_suit != src)
return 0
if(world.time - last_reflect_time >= reflect_cooldown)
last_reflect_time = world.time
return 1
if(world.time - last_reflect_time <= 1) // This is so if multiple energy projectiles hit at once, they're all reflected
return 1
return 0
/*
* Misc