Merge pull request #10518 from Seris02/explosionport

ports the explosion rework thingamajig
This commit is contained in:
kevinz000
2020-01-12 00:38:43 -08:00
committed by GitHub
10 changed files with 52 additions and 51 deletions

View File

@@ -197,11 +197,11 @@
if(!ascended)
var/b_loss
switch (severity)
if (1)
if (EXPLODE_DEVASTATE)
b_loss = 500
if (2)
if (EXPLODE_HEAVY)
b_loss = 150
if(3)
if(EXPLODE_LIGHT)
b_loss = 30
if(has_bane(BANE_LIGHT))
b_loss *=2

View File

@@ -107,15 +107,15 @@ In all, this is a lot like the monkey code. /N
return
..()
switch (severity)
if (1)
if (EXPLODE_DEVASTATE)
gib()
return
if (2)
if (EXPLODE_HEAVY)
take_overall_damage(60, 60)
adjustEarDamage(30,120)
if(3)
if(EXPLODE_LIGHT)
take_overall_damage(30,0)
if(prob(50))
Unconscious(20)

View File

@@ -326,38 +326,49 @@
..()
if (!severity)
return
var/b_loss = 0
var/f_loss = 0
var/bomb_armor = max(0,(100-getarmor(null, "bomb"))/100)
var/brute_loss = 0
var/burn_loss = 0
var/bomb_armor = getarmor(null, "bomb")
//200 max knockdown for EXPLODE_HEAVY
//160 max knockdown for EXPLODE_LIGHT
switch (severity)
if (1)
if(bomb_armor)
b_loss = (350*bomb_armor)+150
var/atom/throw_target = get_edge_target_turf(src, get_dir(src, get_step_away(src, src)))
throw_at(throw_target, 200, 4)
damage_clothes(400*bomb_armor, BRUTE, "bomb")
else
damage_clothes(400,BRUTE,"bomb")
if (EXPLODE_DEVASTATE)
if(bomb_armor < EXPLODE_GIB_THRESHOLD) //gibs the mob if their bomb armor is lower than EXPLODE_GIB_THRESHOLD
for(var/I in contents)
var/atom/A = I
A.ex_act(severity)
gib()
return
else
brute_loss = 500
var/atom/throw_target = get_edge_target_turf(src, get_dir(src, get_step_away(src, src)))
throw_at(throw_target, 200, 4)
damage_clothes(400 - bomb_armor, BRUTE, "bomb")
if (2)
b_loss = 60*bomb_armor
f_loss = 60*bomb_armor
damage_clothes(200*bomb_armor, BRUTE, "bomb")
if (EXPLODE_HEAVY)
brute_loss = 60
burn_loss = 60
if(bomb_armor)
brute_loss = 30*(2 - round(bomb_armor*0.01, 0.05))
burn_loss = brute_loss //damage gets reduced from 120 to up to 60 combined brute+burn
damage_clothes(200 - bomb_armor, BRUTE, "bomb")
if (!istype(ears, /obj/item/clothing/ears/earmuffs))
adjustEarDamage(30, 120)
Unconscious(200*bomb_armor)
Unconscious(20) //short amount of time for follow up attacks against elusive enemies like wizards
Knockdown(200 - (bomb_armor * 1.6)) //between ~4 and ~20 seconds of knockdown depending on bomb armor
if(3)
b_loss = 30*bomb_armor
if(EXPLODE_LIGHT)
brute_loss = 30
if(bomb_armor)
brute_loss = 15*(2 - round(bomb_armor*0.01, 0.05))
damage_clothes(max(50 - bomb_armor, 0), BRUTE, "bomb")
if (!istype(ears, /obj/item/clothing/ears/earmuffs))
adjustEarDamage(15,60)
Unconscious(100*bomb_armor)
Knockdown(160 - (bomb_armor * 1.6)) //100 bomb armor will prevent knockdown altogether
take_overall_damage(b_loss,f_loss)
take_overall_damage(brute_loss,burn_loss)
//attempt to dismember bodyparts
if(severity <= 2 || !bomb_armor)

View File

@@ -189,18 +189,18 @@
..()
switch (severity)
if (1)
if (EXPLODE_DEVASTATE)
gib()
return
if (2)
if (EXPLODE_HEAVY)
take_overall_damage(60, 60)
damage_clothes(200, BRUTE, "bomb")
adjustEarDamage(30, 120)
if(prob(70))
Unconscious(200)
if(3)
if(EXPLODE_LIGHT)
take_overall_damage(30, 0)
damage_clothes(50, BRUTE, "bomb")
adjustEarDamage(15,60)

View File

@@ -122,19 +122,19 @@
..()
var/bomb_armor = getarmor(null, "bomb")
switch (severity)
if (1)
if (EXPLODE_DEVASTATE)
if(prob(bomb_armor))
adjustBruteLoss(500)
else
gib()
return
if (2)
if (EXPLODE_HEAVY)
var/bloss = 60
if(prob(bomb_armor))
bloss = bloss / 1.5
adjustBruteLoss(bloss)
if(3)
if(EXPLODE_LIGHT)
var/bloss = 30
if(prob(bomb_armor))
bloss = bloss / 1.5

View File

@@ -103,13 +103,13 @@
/mob/living/simple_animal/hostile/megafauna/ex_act(severity, target)
switch (severity)
if (1)
if (EXPLODE_DEVASTATE)
adjustBruteLoss(250)
if (2)
if (EXPLODE_HEAVY)
adjustBruteLoss(100)
if(3)
if(EXPLODE_LIGHT)
adjustBruteLoss(50)
/mob/living/simple_animal/hostile/megafauna/proc/SetRecoveryTime(buffer_time)