mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-08-22 03:27:05 +01:00
* Initial commit. Event. * Started converting mobs to basic mobs. Migo and Creature. Needs aggressiveness AI * Makes CI happy * Fixes some file names * Ticks files * Fixes file again * Update code/modules/events/demon_incursion.dm Co-authored-by: Luc <89928798+lewcc@users.noreply.github.com> Signed-off-by: PollardTheDragon <144391971+PollardTheDragon@users.noreply.github.com> * Announcement sound, spawn adjustments * Reduced spread when portals multiply * Elite spawns when portal count gets high * Fixes missing comma * Converted migo, blank, and most of hellhounds to basic mobs. Added new controllers and behaviors * Fixes * Linters! * Faithless moved to basic mob * LINTERS * Makes skeletons basic mobs * Fixes, Ranged Attacks, Ranged variants of nether mobs * Handles portal expansion chance * Linters * Fixes mobs not breaking shit * Fixes ranged attacks * Fixes ranged attacks * oops * Another oops. No config changes are needed here * Twenty percent chance that a nether mob is a grappler * Dimensional tear fixes * Adjusts awaken distance for hostile mobs, makes variable melee attack rate for basic mobs * Variable initial spawns, variable spread rates. * Whole lot of fixes from merge, hellhound completion * Updated lavaland winter biodome * Makes basic mobs able to hurt other mobs * Makes spawners properly rally basic mobs to beat up the attacker * Extra line * Removed comment * Makes hellhounds stop resting when attacked or when they find a new target * Fixed initial portal spawn amounts * Borgs now affected by basic mobs * Nerfs portal spawn rate, nerfs portal integrity, nerfs portal max mobs * Grapplers now teleport to missed turfs * Removes duplicate notices * Buff portals a small bit * Makes nether portals no longer RR - the body is now recoverable from the blank it became * Makes portals layer above mobs * Removed excess ranged attack var * Changes list for determining start count to rely on mobs with client instead of all clients * Nerfs portal max mobs * Portals can no longer spread to within 3 tiles of another portal except on initial event start * Adjusts target portal count for big mobs * Spawners now properly remove nest values of basic mobs * Portals now glow an evil red. When portals are destroyed, 50% chance per mob to slay the mob * add prowling and return to home behaviors * cut this down * be a tiny bit smarter * Some code cleanup * Removes hostile base type, removing excess code * Gives /obj/ a basic mob attack handler. Fixes turrets * Gives basic mobs a HUD * Fixes skeleton death flag * Adjusted initial spawns * Incursion portals now slowly convert turfs, up to range 3 of them, to hellish flooring * Increases reward per destroyed portal * Makes the final portal of an incursion play a sound on destruction, couple portal fixes * Fixes basic mob xenobiology interactions * Non-shit portal sprites * Adds hostile machine element, mobs now actively target turrets and emitters * Properly gibs things when they should gib * Linter fix * Portals now layer under living mobs but over dead ones * Adds blackbox checking for demon incursion portal counts * Increases mob sight range slightly to account for widescreen, adds alt-color for grappler, delays incursion announcement a bit more * Portals now are more likely to spread the less there are * Incursion portals now repair themselves after not being damaged for some time * Grilles now shock basic mobs * Portals will now clean up basic mob corpses near them by gibbing them * Portal spread chance is now exponential regression * Portal mob spawns now linearly scale in time * Fixes some skeleton oversights in ruin mapping * Demon incursions no longer can spread to tiles in a space area, such as near brig plating * Moves corpse cleanup to mobs via component * Portals now drop bodies that are being eaten when they're destroyed. * Addresses code review * Docs some vars --------- Signed-off-by: PollardTheDragon <144391971+PollardTheDragon@users.noreply.github.com> Co-authored-by: Luc <89928798+lewcc@users.noreply.github.com> Co-authored-by: warriorstar-orion <orion@snowfrost.garden>
132 lines
4.4 KiB
Plaintext
132 lines
4.4 KiB
Plaintext
/mob/living/simple_animal/attack_hand(mob/living/carbon/human/M)
|
|
..()
|
|
switch(M.a_intent)
|
|
|
|
if(INTENT_HELP)
|
|
if(health > 0)
|
|
visible_message("<span class='notice'>[M] [response_help] [src].</span>", "<span class='notice'>[M] [response_help] you.</span>")
|
|
playsound(loc, 'sound/weapons/thudswoosh.ogg', 50, TRUE, -1)
|
|
|
|
if(INTENT_GRAB)
|
|
grabbedby(M)
|
|
|
|
if(INTENT_HARM, INTENT_DISARM)
|
|
if(HAS_TRAIT(M, TRAIT_PACIFISM))
|
|
to_chat(M, "<span class='warning'>You don't want to hurt [src]!</span>")
|
|
return
|
|
M.do_attack_animation(src, ATTACK_EFFECT_PUNCH)
|
|
visible_message("<span class='danger'>[M] [response_harm] [src]!</span>", "<span class='userdanger'>[M] [response_harm] you!</span>")
|
|
playsound(loc, attacked_sound, 25, TRUE, -1)
|
|
attack_threshold_check(harm_intent_damage)
|
|
add_attack_logs(M, src, "Melee attacked with fists")
|
|
updatehealth()
|
|
return TRUE
|
|
|
|
/mob/living/simple_animal/attack_hulk(mob/living/carbon/human/user, does_attack_animation = FALSE)
|
|
if(user.a_intent == INTENT_HARM)
|
|
if(HAS_TRAIT(user, TRAIT_PACIFISM))
|
|
to_chat(user, "<span class='warning'>You don't want to hurt [src]!</span>")
|
|
return FALSE
|
|
..(user, TRUE)
|
|
playsound(loc, "punch", 25, TRUE, -1)
|
|
visible_message("<span class='danger'>[user] has punched [src]!</span>", "<span class='userdanger'>[user] has punched [src]!</span>")
|
|
adjustBruteLoss(15)
|
|
return TRUE
|
|
|
|
/mob/living/simple_animal/attack_alien(mob/living/carbon/alien/humanoid/M)
|
|
if(..()) //if harm or disarm intent.
|
|
if(M.a_intent == INTENT_DISARM)
|
|
playsound(loc, 'sound/weapons/pierce.ogg', 25, TRUE, -1)
|
|
visible_message("<span class='danger'>[M] [response_disarm] [name]!</span>", "<span class='userdanger'>[M] [response_disarm] you!</span>")
|
|
add_attack_logs(M, src, "Alien disarmed")
|
|
else
|
|
var/damage = rand(15, 30)
|
|
visible_message("<span class='danger'>[M] has slashed at [src]!</span>", \
|
|
"<span class='userdanger'>[M] has slashed at [src]!</span>")
|
|
playsound(loc, 'sound/weapons/slice.ogg', 25, TRUE, -1)
|
|
add_attack_logs(M, src, "Alien attacked")
|
|
attack_threshold_check(damage)
|
|
return TRUE
|
|
|
|
/mob/living/simple_animal/attack_larva(mob/living/carbon/alien/larva/L)
|
|
if(..()) //successful larva bite
|
|
if(stat != DEAD)
|
|
var/damage = rand(5, 10)
|
|
. = attack_threshold_check(damage)
|
|
if(.)
|
|
L.amount_grown = min(L.amount_grown + damage, L.max_grown)
|
|
|
|
/mob/living/simple_animal/attack_animal(mob/living/simple_animal/M)
|
|
. = ..()
|
|
if(.)
|
|
var/damage = rand(M.melee_damage_lower, M.melee_damage_upper)
|
|
return attack_threshold_check(damage, M.melee_damage_type)
|
|
|
|
/mob/living/simple_animal/attack_slime(mob/living/simple_animal/slime/M)
|
|
if(..()) //successful slime attack
|
|
var/damage = rand(15, 25)
|
|
if(M.is_adult)
|
|
damage = rand(20, 35)
|
|
return attack_threshold_check(damage)
|
|
|
|
/mob/living/simple_animal/proc/attack_threshold_check(damage, damagetype = BRUTE, armorcheck = MELEE)
|
|
var/temp_damage = damage
|
|
if(!damage_coeff[damagetype])
|
|
temp_damage = 0
|
|
else
|
|
temp_damage *= damage_coeff[damagetype]
|
|
|
|
if(temp_damage >= 0 && temp_damage <= force_threshold)
|
|
visible_message("<span class='warning'>[src] looks unharmed.</span>")
|
|
return FALSE
|
|
else
|
|
apply_damage(damage, damagetype, null, getarmor(null, armorcheck))
|
|
return TRUE
|
|
|
|
/mob/living/simple_animal/bullet_act(obj/item/projectile/Proj)
|
|
if(!Proj)
|
|
return
|
|
apply_damage(Proj.damage, Proj.damage_type)
|
|
Proj.on_hit(src, 0)
|
|
return FALSE
|
|
|
|
/mob/living/simple_animal/ex_act(severity, origin)
|
|
if(origin && istype(origin, /datum/spacevine_mutation) && isvineimmune(src))
|
|
return
|
|
..()
|
|
var/bomb_armor = getarmor(null, BOMB)
|
|
switch(severity)
|
|
if(1)
|
|
if(prob(bomb_armor))
|
|
adjustBruteLoss(500)
|
|
else
|
|
gib()
|
|
return
|
|
if(2)
|
|
var/bloss = 60
|
|
if(prob(bomb_armor))
|
|
bloss = bloss / 1.5
|
|
adjustBruteLoss(bloss)
|
|
if(3)
|
|
var/bloss = 30
|
|
if(prob(bomb_armor))
|
|
bloss = bloss / 1.5
|
|
adjustBruteLoss(bloss)
|
|
|
|
/mob/living/simple_animal/blob_act(obj/structure/blob/B)
|
|
adjustBruteLoss(20)
|
|
|
|
/mob/living/simple_animal/do_attack_animation(atom/A, visual_effect_icon, used_item, no_effect)
|
|
if(!no_effect && !visual_effect_icon && melee_damage_upper)
|
|
if(melee_damage_upper < 10)
|
|
visual_effect_icon = ATTACK_EFFECT_PUNCH
|
|
else
|
|
visual_effect_icon = ATTACK_EFFECT_SMASH
|
|
..()
|
|
|
|
/mob/living/simple_animal/handle_basic_attack(mob/living/basic/attacker, modifiers)
|
|
. = ..()
|
|
if(.)
|
|
var/damage = rand(attacker.melee_damage_lower, attacker.melee_damage_upper)
|
|
return attack_threshold_check(damage, attacker.melee_damage_type)
|