mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2025-12-10 10:12:45 +00:00
247 lines
6.6 KiB
Plaintext
247 lines
6.6 KiB
Plaintext
|
|
|
|
/mob/living/carbon/amorph/attack_paw(mob/living/carbon/monkey/M as mob)
|
|
if (!ticker)
|
|
M << "You cannot attack people before the game has started."
|
|
return
|
|
|
|
..()
|
|
|
|
switch(M.a_intent)
|
|
|
|
if ("help")
|
|
help_shake_act(M)
|
|
else
|
|
if (istype(wear_mask, /obj/item/clothing/mask/muzzle))
|
|
return
|
|
if (health > 0)
|
|
attacked += 10
|
|
playsound(loc, 'sound/weapons/bite.ogg', 50, 1, -1)
|
|
for(var/mob/O in viewers(src, null))
|
|
if ((O.client && !( O.blinded )))
|
|
O.show_message(text("\red <B>[M.name] has bit [src]!</B>"), 1)
|
|
adjustBruteLoss(rand(0, 1))
|
|
updatehealth()
|
|
return
|
|
|
|
/mob/living/carbon/amorph/attack_hand(mob/living/carbon/human/M as mob)
|
|
|
|
if(M.gloves && istype(M.gloves,/obj/item/clothing/gloves))
|
|
var/obj/item/clothing/gloves/G = M.gloves
|
|
if(G.cell)
|
|
if(M.a_intent == "hurt")//Stungloves. Any contact will stun the alien.
|
|
if(G.cell.charge >= 2500)
|
|
G.cell.charge -= 2500
|
|
Weaken(5)
|
|
if (stuttering < 5)
|
|
stuttering = 5
|
|
Stun(5)
|
|
|
|
for(var/mob/O in viewers(src, null))
|
|
if (O.client)
|
|
O.show_message("\red <B>[src] has been touched with the stun gloves by [M]!</B>", 1, "\red You hear someone fall", 2)
|
|
return
|
|
else
|
|
M << "\red Not enough charge! "
|
|
return
|
|
|
|
if (M.a_intent == "help")
|
|
help_shake_act(M)
|
|
else
|
|
if (M.a_intent == "hurt")
|
|
var/attack_verb
|
|
switch(M.mutantrace)
|
|
if("lizard")
|
|
attack_verb = "scratch"
|
|
if("plant")
|
|
attack_verb = "slash"
|
|
else
|
|
attack_verb = "punch"
|
|
|
|
if(M.type == /mob/living/carbon/human/tajaran)
|
|
attack_verb = "slash"
|
|
|
|
if ((prob(75) && health > 0))
|
|
for(var/mob/O in viewers(src, null))
|
|
if ((O.client && !( O.blinded )))
|
|
O.show_message(text("\red <B>[] has [attack_verb]ed [name]!</B>", M), 1)
|
|
|
|
var/damage = rand(5, 10)
|
|
if(M.type != /mob/living/carbon/human/tajaran)
|
|
playsound(loc, "punch", 25, 1, -1)
|
|
else if(M.type == /mob/living/carbon/human/tajaran)
|
|
damage += 10
|
|
playsound(loc, 'sound/weapons/slice.ogg', 25, 1, -1)
|
|
adjustBruteLoss(damage/10)
|
|
updatehealth()
|
|
else
|
|
if(M.type != /mob/living/carbon/human/tajaran)
|
|
playsound(loc, 'sound/weapons/punchmiss.ogg', 25, 1, -1)
|
|
else if(M.type == /mob/living/carbon/human/tajaran)
|
|
playsound(loc, 'sound/weapons/slashmiss.ogg', 25, 1, -1)
|
|
for(var/mob/O in viewers(src, null))
|
|
if ((O.client && !( O.blinded )))
|
|
O.show_message(text("\red <B>[] has attempted to [attack_verb] [name]!</B>", M), 1)
|
|
else
|
|
if (M.a_intent == "grab")
|
|
if (M == src)
|
|
return
|
|
|
|
var/obj/item/weapon/grab/G = new /obj/item/weapon/grab( M )
|
|
G.assailant = M
|
|
if (M.hand)
|
|
M.l_hand = G
|
|
else
|
|
M.r_hand = G
|
|
G.layer = 20
|
|
G.affecting = src
|
|
G.synch()
|
|
|
|
LAssailant = M
|
|
|
|
playsound(loc, 'sound/weapons/thudswoosh.ogg', 50, 1, -1)
|
|
for(var/mob/O in viewers(src, null))
|
|
O.show_message(text("\red [] has grabbed [name] passively!", M), 1)
|
|
|
|
else
|
|
if (!( paralysis ))
|
|
drop_item()
|
|
playsound(loc, 'sound/weapons/thudswoosh.ogg', 50, 1, -1)
|
|
for(var/mob/O in viewers(src, null))
|
|
if ((O.client && !( O.blinded )))
|
|
O.show_message(text("\red <B>[] has disarmed [name]!</B>", M), 1)
|
|
return
|
|
|
|
|
|
|
|
/mob/living/carbon/amorph/attack_alien(mob/living/carbon/alien/humanoid/M as mob)
|
|
|
|
switch(M.a_intent)
|
|
if ("help")
|
|
for(var/mob/O in viewers(src, null))
|
|
if ((O.client && !( O.blinded )))
|
|
O.show_message(text("\blue [M] caresses [src] with its scythe like arm."), 1)
|
|
|
|
if ("hurt")
|
|
if ((prob(95) && health > 0))
|
|
playsound(loc, 'sound/weapons/slice.ogg', 25, 1, -1)
|
|
var/damage = rand(15, 30)
|
|
for(var/mob/O in viewers(src, null))
|
|
if ((O.client && !( O.blinded )))
|
|
O.show_message(text("\red <B>[] has slashed [name]!</B>", M), 1)
|
|
adjustBruteLoss(damage/10)
|
|
updatehealth()
|
|
react_to_attack(M)
|
|
else
|
|
playsound(loc, 'sound/weapons/slashmiss.ogg', 25, 1, -1)
|
|
for(var/mob/O in viewers(src, null))
|
|
if ((O.client && !( O.blinded )))
|
|
O.show_message(text("\red <B>[] has attempted to lunge at [name]!</B>", M), 1)
|
|
|
|
if ("grab")
|
|
if (M == src)
|
|
return
|
|
var/obj/item/weapon/grab/G = new /obj/item/weapon/grab( M )
|
|
G.assailant = M
|
|
if (M.hand)
|
|
M.l_hand = G
|
|
else
|
|
M.r_hand = G
|
|
G.layer = 20
|
|
G.affecting = src
|
|
G.synch()
|
|
|
|
LAssailant = M
|
|
|
|
playsound(loc, 'sound/weapons/thudswoosh.ogg', 50, 1, -1)
|
|
for(var/mob/O in viewers(src, null))
|
|
O.show_message(text("\red [] has grabbed [name] passively!", M), 1)
|
|
|
|
if ("disarm")
|
|
playsound(loc, 'sound/weapons/pierce.ogg', 25, 1, -1)
|
|
var/damage = 5
|
|
if(prob(95))
|
|
Weaken(rand(10,15))
|
|
for(var/mob/O in viewers(src, null))
|
|
if ((O.client && !( O.blinded )))
|
|
O.show_message(text("\red <B>[] has tackled down [name]!</B>", M), 1)
|
|
else
|
|
drop_item()
|
|
for(var/mob/O in viewers(src, null))
|
|
if ((O.client && !( O.blinded )))
|
|
O.show_message(text("\red <B>[] has disarmed [name]!</B>", M), 1)
|
|
adjustBruteLoss(damage)
|
|
react_to_attack(M)
|
|
updatehealth()
|
|
return
|
|
|
|
|
|
|
|
/mob/living/carbon/amorph/attack_animal(mob/living/simple_animal/M as mob)
|
|
if(M.melee_damage_upper == 0)
|
|
M.emote("[M.friendly] [src]")
|
|
else
|
|
for(var/mob/O in viewers(src, null))
|
|
O.show_message("\red <B>[M]</B> [M.attacktext] [src]!", 1)
|
|
var/damage = rand(M.melee_damage_lower, M.melee_damage_upper)
|
|
bruteloss += damage
|
|
|
|
/mob/living/carbon/amorph/attack_metroid(mob/living/carbon/metroid/M as mob)
|
|
if(M.Victim) return // can't attack while eating!
|
|
|
|
if (health > -100)
|
|
|
|
for(var/mob/O in viewers(src, null))
|
|
if ((O.client && !( O.blinded )))
|
|
O.show_message(text("\red <B>The [M.name] has [pick("bit","slashed")] []!</B>", src), 1)
|
|
|
|
var/damage = rand(1, 3)
|
|
|
|
if(istype(M, /mob/living/carbon/metroid/adult))
|
|
damage = rand(10, 35)
|
|
else
|
|
damage = rand(5, 25)
|
|
|
|
src.cloneloss += damage
|
|
|
|
UpdateDamageIcon()
|
|
|
|
|
|
if(M.powerlevel > 0)
|
|
var/stunprob = 10
|
|
var/power = M.powerlevel + rand(0,3)
|
|
|
|
switch(M.powerlevel)
|
|
if(1 to 2) stunprob = 20
|
|
if(3 to 4) stunprob = 30
|
|
if(5 to 6) stunprob = 40
|
|
if(7 to 8) stunprob = 60
|
|
if(9) stunprob = 70
|
|
if(10) stunprob = 95
|
|
|
|
if(prob(stunprob))
|
|
M.powerlevel -= 3
|
|
if(M.powerlevel < 0)
|
|
M.powerlevel = 0
|
|
|
|
for(var/mob/O in viewers(src, null))
|
|
if ((O.client && !( O.blinded )))
|
|
O.show_message(text("\red <B>The [M.name] has shocked []!</B>", src), 1)
|
|
|
|
Weaken(power)
|
|
if (stuttering < power)
|
|
stuttering = power
|
|
Stun(power)
|
|
|
|
var/datum/effect/effect/system/spark_spread/s = new /datum/effect/effect/system/spark_spread
|
|
s.set_up(5, 1, src)
|
|
s.start()
|
|
|
|
if (prob(stunprob) && M.powerlevel >= 8)
|
|
adjustFireLoss(M.powerlevel * rand(6,10))
|
|
|
|
|
|
updatehealth()
|
|
|
|
return
|