443a4501ec
* - I rearranged X_defense.dm mob files, more damage_procs.dm.Here's what's inside: * X_defense.dm: is for the procs of attacks onto the mob, all the XXX_act() proc (things happening to the mob), as well as protection check and get procs (armor, ear prot, projectile dismemberment) * damage_procs.dm: actual damage procs like adjustBruteLoss() getfireloss, any proc that handles damaging. - some bugfixes with gibspawner effects. - monkey's bodyparts can be dismembered and are used to create its icon. - brains are no longer carbons. - all carbon have bodyparts that can be dropped when the mob is gibbed. - adminspawned bodyparts now have a default icon. - robotic parts are now a child of bodyparts. - health analyzer on alien/monkey shows damage on each limb - added admin option to add/remove bodyparts for all carbon (instead of just remove on humans) - Fixes keycheck message spam for janicart and all when trying to move. - Fixes bug with buckling to a scooter while limbless. - removed arg "hit_zone" in proj's on_hit() because we can already use the def_zone var (where hit_zone got its value) - Fixes mob not getting any damage when hit by a projectile on their missing limb, despite a hit message shown). carbon/apply_damage() now when we specify a def_zone and the corresponding BP is missing we default to the chest instead of stopping the proc. Consistently with how human/attacked_by() default to its attack to chest if missing limb. - Fixes mini uzi icon when empty and no mag (typo). - I renamed and changed a bit check_eye_prot and ear prot - renamed flash_eyes to flash_act() - I made a soundbang_act() similar to flash_act but for loud bangs. - added a gib and dust animation to larva. - husked monkeys - no damage overlay for husk or skeleton. - damage overlay for robotic limb now. - no damage overlay when organic bodypart husked. - one handed human with a bloody hand still get a bloody single hand overlay. - fix admin heal being unable to heal robotic bodyparts. - slightly touched robotic bodypart sprites (head one pixel too high) - Fixes 18532 "beheaded husk has hair". - Fixes 18584 "Ling stasis appearance bug" - no more eyes or lipstick on husks. - can remove flashes/wires/cells from robot chest and head with crowbar. - Fixes not being able to surgically amputate robotic arm/leg. * More merge conflict fixes and adding the new files I forgot to add. * of course I forgot birdstation * More typos and stuff I forgot to undo. * Fixing a typo in examine.dm Removing an unnecessary check. Making admin heal regenerate limbs on all carbons. Monkey-human transformation now transfer missing limbs info and presence of a cavity implant. NODISMEMBER species can still lack a limb if the mob lacked a limb and changed into that new species. Changeling Regenerate ability now also regenerate limbs when in monkey form. (and remove some cryptic useless code) * Fixing more conflicts with remie's multihands PR. * Fixes runtime with hud when calling build_hand_slots(). Fixes lightgeist healing not working. Fixes null.handle_fall() runtimes with pirate mobs. Fixes typo in has_left_hadn() and has_right_hand(). * Derp, forgot to remove debug message.
223 lines
6.6 KiB
Plaintext
223 lines
6.6 KiB
Plaintext
#define DEVIL_HANDS_LAYER 1
|
|
#define DEVIL_HEAD_LAYER 2
|
|
#define DEVIL_TOTAL_LAYERS 2
|
|
|
|
|
|
/mob/living/carbon/true_devil
|
|
name = "True Devil"
|
|
desc = "A pile of infernal energy, taking a vaguely humanoid form."
|
|
icon = 'icons/mob/32x64.dmi'
|
|
icon_state = "true_devil"
|
|
gender = NEUTER
|
|
health = 350
|
|
maxHealth = 350
|
|
ventcrawler = 0
|
|
density = 1
|
|
pass_flags = 0
|
|
var/ascended = 0
|
|
sight = (SEE_TURFS | SEE_OBJS)
|
|
status_flags = CANPUSH
|
|
languages_spoken = ALL //The devil speaks all languages meme
|
|
languages_understood = ALL //The devil speaks all languages meme
|
|
mob_size = MOB_SIZE_LARGE
|
|
var/mob/living/oldform
|
|
var/list/devil_overlays[DEVIL_TOTAL_LAYERS]
|
|
bodyparts = list(/obj/item/bodypart/chest/devil, /obj/item/bodypart/head/devil, /obj/item/bodypart/l_arm/devil,
|
|
/obj/item/bodypart/r_arm/devil, /obj/item/bodypart/r_leg/devil, /obj/item/bodypart/l_leg/devil)
|
|
|
|
|
|
|
|
/mob/living/carbon/true_devil/New()
|
|
create_bodyparts() //initialize bodyparts
|
|
|
|
create_internal_organs()
|
|
..()
|
|
|
|
/mob/living/carbon/true_devil/create_internal_organs()
|
|
internal_organs += new /obj/item/organ/brain
|
|
internal_organs += new /obj/item/organ/tongue
|
|
..()
|
|
|
|
|
|
/mob/living/carbon/true_devil/proc/convert_to_archdevil()
|
|
maxHealth = 5000 // not an IMPOSSIBLE amount, but still near impossible.
|
|
ascended = 1
|
|
health = maxHealth
|
|
icon_state = "arch_devil"
|
|
|
|
/mob/living/carbon/true_devil/proc/set_name()
|
|
name = mind.devilinfo.truename
|
|
real_name = name
|
|
|
|
/mob/living/carbon/true_devil/Login()
|
|
..()
|
|
mind.announceDevilLaws()
|
|
mind.announce_objectives()
|
|
|
|
|
|
/mob/living/carbon/true_devil/death(gibbed)
|
|
stat = DEAD
|
|
..(gibbed)
|
|
drop_all_held_items()
|
|
spawn (0)
|
|
mind.devilinfo.beginResurrectionCheck(src)
|
|
|
|
|
|
/mob/living/carbon/true_devil/examine(mob/user)
|
|
var/msg = "<span class='info'>*---------*\nThis is \icon[src] <b>[src]</b>!\n"
|
|
|
|
//Left hand items
|
|
for(var/obj/item/I in held_items)
|
|
if(!(I.flags & ABSTRACT))
|
|
if(I.blood_DNA)
|
|
msg += "<span class='warning'>It is holding \icon[I] [I.gender==PLURAL?"some":"a"] blood-stained [I.name] in its [get_held_index_name(get_held_index_of_item(I))]!</span>\n"
|
|
else
|
|
msg += "It is holding \icon[I] \a [I] in its [get_held_index_name(get_held_index_of_item(I))].\n"
|
|
|
|
//Braindead
|
|
if(!client && stat != DEAD)
|
|
msg += "The devil seems to be in deep contemplation.\n"
|
|
|
|
//Damaged
|
|
if(stat == DEAD)
|
|
msg += "<span class='deadsay'>The hellfire seems to have been extinguished, for now at least.</span>\n"
|
|
else if(health < (maxHealth/10))
|
|
msg += "<span class='warning'>You can see hellfire inside of it's gaping wounds.</span>\n"
|
|
else if(health < (maxHealth/2))
|
|
msg += "<span class='warning'>You can see hellfire inside of it's wounds.</span>\n"
|
|
msg += "*---------*</span>"
|
|
user << msg
|
|
|
|
|
|
/mob/living/carbon/true_devil/IsAdvancedToolUser()
|
|
return 1
|
|
|
|
/mob/living/carbon/true_devil/canUseTopic(atom/movable/M, be_close = 0)
|
|
if(incapacitated())
|
|
return 0
|
|
if(be_close && !in_range(M, src))
|
|
return 0
|
|
return 1
|
|
|
|
/mob/living/carbon/true_devil/assess_threat()
|
|
return 666
|
|
|
|
/mob/living/carbon/true_devil/flash_act(intensity = 1, override_blindness_check = 0, affect_silicon = 0)
|
|
if(mind && has_bane(BANE_LIGHT))
|
|
mind.disrupt_spells(-500)
|
|
return ..() //flashes don't stop devils UNLESS it's their bane.
|
|
|
|
/mob/living/carbon/true_devil/soundbang_act()
|
|
return 0
|
|
|
|
/mob/living/carbon/true_devil/get_ear_protection()
|
|
return 2
|
|
|
|
|
|
/mob/living/carbon/true_devil/attacked_by(obj/item/I, mob/living/user, def_zone)
|
|
var/weakness = check_weakness(I, user)
|
|
apply_damage(I.force * weakness, I.damtype, def_zone)
|
|
var/message_verb = ""
|
|
if(I.attack_verb && I.attack_verb.len)
|
|
message_verb = "[pick(I.attack_verb)]"
|
|
else if(I.force)
|
|
message_verb = "attacked"
|
|
|
|
var/attack_message = "[src] has been [message_verb] with [I]."
|
|
if(user)
|
|
user.do_attack_animation(src)
|
|
if(user in viewers(src, null))
|
|
attack_message = "[user] has [message_verb] [src] with [I]!"
|
|
if(message_verb)
|
|
visible_message("<span class='danger'>[attack_message]</span>",
|
|
"<span class='userdanger'>[attack_message]</span>")
|
|
return TRUE
|
|
|
|
/mob/living/carbon/true_devil/Process_Spacemove(movement_dir = 0)
|
|
return 1
|
|
|
|
/mob/living/carbon/true_devil/singularity_act()
|
|
if(ascended)
|
|
return 0
|
|
return ..()
|
|
|
|
/mob/living/carbon/true_devil/attack_ghost(mob/dead/observer/user as mob)
|
|
if(ascended || user.mind.soulOwner == src.mind)
|
|
var/mob/living/simple_animal/imp/S = new(get_turf(loc))
|
|
S.key = user.key
|
|
S.mind.assigned_role = "Imp"
|
|
S.mind.special_role = "Imp"
|
|
var/datum/objective/newobjective = new
|
|
newobjective.explanation_text = "Try to get a promotion to a higher devilic rank."
|
|
S.mind.objectives += newobjective
|
|
S << S.playstyle_string
|
|
S << "<B>Objective #[1]</B>: [newobjective.explanation_text]"
|
|
return
|
|
else
|
|
return ..()
|
|
|
|
/mob/living/carbon/true_devil/can_be_revived()
|
|
return 1
|
|
|
|
/mob/living/carbon/true_devil/resist_fire()
|
|
//They're immune to fire.
|
|
|
|
/mob/living/carbon/true_devil/attack_hand(mob/living/carbon/human/M)
|
|
if(..())
|
|
switch(M.a_intent)
|
|
if ("harm")
|
|
var/damage = rand(1, 5)
|
|
playsound(loc, "punch", 25, 1, -1)
|
|
visible_message("<span class='danger'>[M] has punched [src]!</span>", \
|
|
"<span class='userdanger'>[M] has punched [src]!</span>")
|
|
adjustBruteLoss(damage)
|
|
add_logs(M, src, "attacked")
|
|
updatehealth()
|
|
if ("disarm")
|
|
if (!lying && !ascended) //No stealing the arch devil's pitchfork.
|
|
if (prob(5))
|
|
Paralyse(2)
|
|
playsound(loc, 'sound/weapons/thudswoosh.ogg', 50, 1, -1)
|
|
add_logs(M, src, "pushed")
|
|
visible_message("<span class='danger'>[M] has pushed down [src]!</span>", \
|
|
"<span class='userdanger'>[M] has pushed down [src]!</span>")
|
|
else
|
|
if (prob(25))
|
|
drop_item()
|
|
playsound(loc, 'sound/weapons/thudswoosh.ogg', 50, 1, -1)
|
|
visible_message("<span class='danger'>[M] has disarmed [src]!</span>", \
|
|
"<span class='userdanger'>[M] has disarmed [src]!</span>")
|
|
else
|
|
playsound(loc, 'sound/weapons/punchmiss.ogg', 25, 1, -1)
|
|
visible_message("<span class='danger'>[M] has attempted to disarm [src]!</span>")
|
|
|
|
/mob/living/carbon/true_devil/handle_breathing()
|
|
// devils do not need to breathe
|
|
|
|
/mob/living/carbon/true_devil/is_literate()
|
|
return 1
|
|
|
|
/mob/living/carbon/true_devil/ex_act(severity, ex_target)
|
|
if(!ascended)
|
|
var/b_loss
|
|
switch (severity)
|
|
if (1)
|
|
b_loss = 500
|
|
if (2)
|
|
b_loss = 150
|
|
if(3)
|
|
b_loss = 30
|
|
if(has_bane(BANE_LIGHT))
|
|
b_loss *=2
|
|
adjustBruteLoss(b_loss)
|
|
return ..()
|
|
|
|
|
|
/mob/living/carbon/true_devil/update_body() //we don't use the bodyparts layer for devils.
|
|
return
|
|
|
|
/mob/living/carbon/true_devil/update_body_parts()
|
|
return
|
|
|
|
/mob/living/carbon/true_devil/update_damage_overlays() //devils don't have damage overlays.
|
|
return |