mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-01-21 15:01:52 +00:00
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:
@@ -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"
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user