This commit is contained in:
YakumoChen
2019-10-23 00:18:21 +00:00
committed by GitHub
parent 1e0f31ad4a
commit b78e6f27b6
@@ -101,8 +101,10 @@
stored.forceMove(src)
stored.notransform = TRUE
if(source.convert_damage)
var/damapply = (stored.maxHealth - (stored.health + stored.maxHealth)/2) //Carbons go from -100 to 100 naturally, while simplemobs only go from 0 to 100. Can't do a direct conversion.
shape.apply_damage(damapply, source.convert_damage_type)
var/damage_percent = (stored.maxHealth - stored.health)/stored.maxHealth;
var/damapply = damage_percent * shape.maxHealth;
shape.apply_damage(damapply, source.convert_damage_type, forced = TRUE);
slink = soullink(/datum/soullink/shapeshift, stored , shape)
slink.source = src
@@ -152,8 +154,10 @@
stored.death()
else if(source.convert_damage)
stored.revive(full_heal = TRUE)
var/damapply = (shape.maxHealth - 2*shape.health) //Since we halved incoming damage, double outgoing.
stored.apply_damage(damapply, source.convert_damage_type)
var/damage_percent = (shape.maxHealth - shape.health)/shape.maxHealth;
var/damapply = stored.maxHealth * damage_percent
stored.apply_damage(damapply, source.convert_damage_type, forced = TRUE)
qdel(shape)
qdel(src)