mirror of
https://github.com/CHOMPstation/CHOMPstation.git
synced 2026-08-30 07:26:39 +01:00
Alien stun chance on harm decreased. Alien stab intent changed to stun intent which deals light damage. It does have a very high chance of knock down and an even higher chance of disarming the target. Hud icon changed to reflect this. Upped the chance aliens stunning cyborgs with stun intent. Updated aliens attacking monkeys code. Aliens can now directly attack the AI. General code cleanup for alien attacks and others attacking aliens (hand to hand). Humanoid aliens may no longer run on tables. Fixed a typo in the Corrode ability. Increased the amount of abuse resin walls can take. Changed how damaging them works (as windows). Hulks may now smash straight through resin walls. Aliens may now destroy them without acid (and can no longer use acid on them). Spit now produces a message when used. Fixed aliens not being stunned by stun batons. Aliens can now attack/destroy turrets. Removed alien vision loss from being shot by lasors. Aliens are not deterred by flash now (flashbangs should still work). You can no-longer stab aliens in their nonexistent eyes with screwdrivers or forks. Changing a mob into an alien now properly sets their intent (help). Minor, misc alien code adjustments. git-svn-id: http://tgstation13.googlecode.com/svn/trunk@762 316c924e-a436-60f5-8080-3fe189b3f50e
211 lines
7.7 KiB
Plaintext
211 lines
7.7 KiB
Plaintext
/*
|
|
CONTAINS:
|
|
SWORD
|
|
AXE
|
|
STUN BATON
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
// SWORD
|
|
/obj/item/weapon/sword/attack(target as mob, mob/user as mob)
|
|
if(istype(target, /mob/living))
|
|
target:fireloss += 20
|
|
..()
|
|
|
|
|
|
/obj/item/weapon/sword/attack_self(mob/user as mob)
|
|
if ((user.mutations & 16) && prob(50))
|
|
user << "\red You accidentally cut yourself with [src]."
|
|
user.bruteloss += 5
|
|
user.fireloss +=5
|
|
src.active = !( src.active )
|
|
if (src.active)
|
|
user << "\blue [src] is now active."
|
|
src.force = 30
|
|
if(istype(src,/obj/item/weapon/sword/pirate))
|
|
src.icon_state = "cutlass1"
|
|
else
|
|
src.icon_state = "sword1"
|
|
src.w_class = 4
|
|
playsound(user, 'saberon.ogg', 50, 1)
|
|
else
|
|
user << "\blue [src] can now be concealed."
|
|
src.force = 3
|
|
if(istype(src,/obj/item/weapon/sword/pirate))
|
|
src.icon_state = "cutlass0"
|
|
else
|
|
src.icon_state = "sword0"
|
|
src.w_class = 2
|
|
playsound(user, 'saberoff.ogg', 50, 1)
|
|
src.add_fingerprint(user)
|
|
return
|
|
|
|
|
|
// AXE
|
|
|
|
/obj/item/weapon/axe/attack(target as mob, mob/user as mob)
|
|
..()
|
|
|
|
/obj/item/weapon/axe/attack_self(mob/user as mob)
|
|
src.active = !( src.active )
|
|
if (src.active)
|
|
user << "\blue The axe is now energised."
|
|
src.force = 150
|
|
src.icon_state = "axe1"
|
|
src.w_class = 5
|
|
else
|
|
user << "\blue The axe can now be concealed."
|
|
src.force = 40
|
|
src.icon_state = "axe0"
|
|
src.w_class = 5
|
|
src.add_fingerprint(user)
|
|
return
|
|
|
|
|
|
|
|
|
|
// STUN BATON
|
|
|
|
/obj/item/weapon/baton/proc/update_icon()
|
|
if(src.status)
|
|
icon_state = "stunbaton_active"
|
|
else
|
|
icon_state = "stunbaton"
|
|
|
|
/obj/item/weapon/baton/attack_self(mob/user as mob)
|
|
src.status = !( src.status )
|
|
if ((usr.mutations & 16) && prob(50))
|
|
usr << "\red You grab the stunbaton on the wrong side."
|
|
usr.paralysis += 60
|
|
return
|
|
if (src.status)
|
|
user << "\blue The baton is now on."
|
|
playsound(src.loc, "sparks", 75, 1, -1)
|
|
else
|
|
user << "\blue The baton is now off."
|
|
playsound(src.loc, "sparks", 75, 1, -1)
|
|
|
|
update_icon()
|
|
src.add_fingerprint(user)
|
|
return
|
|
|
|
/obj/item/weapon/baton/attack(mob/M as mob, mob/user as mob)
|
|
if ((usr.mutations & 16) && prob(50))
|
|
usr << "\red You grab the stunbaton on the wrong side."
|
|
usr.weakened += 30
|
|
return
|
|
src.add_fingerprint(user)
|
|
var/mob/living/carbon/human/H = M
|
|
|
|
if ((istype(H, /mob/living/carbon/human) && istype(H, /obj/item/clothing/head) && H.flags & 8 && prob(80)))
|
|
M << "\red The helmet protects you from being hit hard in the head!"
|
|
return
|
|
if (status == 0 || (status == 1 && charges ==0))
|
|
if(user.a_intent == "hurt")
|
|
/* if (!istype(H:r_hand, /obj/item/weapon/shield/riot) && prob(40))
|
|
for(var/mob/O in viewers(M, null))
|
|
if (O.client) O.show_message(text("\red <B>[] has blocked []'s stun baton with the riot shield!</B>", M, user), 1, "\red You hear a cracking sound", 2)
|
|
return
|
|
if (!istype(H:l_hand, /obj/item/weapon/shield/riot) && prob(40))
|
|
for(var/mob/O in viewers(M, null))
|
|
if (O.client) O.show_message(text("\red <B>[] has blocked []'s stun baton with the riot shield!</B>", M, user), 1, "\red You hear a cracking sound", 2)
|
|
return*/
|
|
if (M.weakened < 5 && (!(M.mutations & 8)) /*&& (!istype(H:wear_suit, /obj/item/clothing/suit/judgerobe))*/)
|
|
M.weakened = 5
|
|
..()
|
|
for(var/mob/O in viewers(M))
|
|
if (O.client) O.show_message("\red <B>[M] has been beaten with the stun baton by [user]!</B>", 1)
|
|
if(status == 1 && charges == 0)
|
|
user << "\red Not enough charge"
|
|
return
|
|
else
|
|
for(var/mob/O in viewers(M))
|
|
if (O.client) O.show_message("\red <B>[M] has been prodded with the stun baton by [user]! Luckily it was off.</B>", 1)
|
|
if(status == 1 && charges == 0)
|
|
user << "\red Not enough charge"
|
|
return
|
|
if((charges > 0 && status == 1) && (istype(H, /mob/living/carbon)))
|
|
flick("baton_active", src)
|
|
if (user.a_intent == "hurt")
|
|
/* if (!istype(H:r_hand, /obj/item/weapon/shield/riot) && prob(40))
|
|
for(var/mob/O in viewers(M, null))
|
|
if (O.client) O.show_message(text("\red <B>[] has blocked []'s stun baton with the riot shield!</B>", M, user), 1, "\red You hear a cracking sound", 2)
|
|
return
|
|
if (!istype(H:l_hand, /obj/item/weapon/shield/riot) && prob(40))
|
|
for(var/mob/O in viewers(M, null))
|
|
if (O.client) O.show_message(text("\red <B>[] has blocked []'s stun baton with the riot shield!</B>", M, user), 1, "\red You hear a cracking sound", 2)
|
|
return*/
|
|
playsound(src.loc, 'Genhit.ogg', 50, 1, -1)
|
|
if(isrobot(user))
|
|
var/mob/living/silicon/robot/R = user
|
|
R.cell.charge -= 20
|
|
else
|
|
charges--
|
|
if (M.weakened < 1 && (!(M.mutations & 8)) /*&& (!istype(H:wear_suit, /obj/item/clothing/suit/judgerobe))*/)
|
|
M.weakened = 1
|
|
if (M.stuttering < 1 && (!(M.mutations & 8)) /*&& (!istype(H:wear_suit, /obj/item/clothing/suit/judgerobe))*/)
|
|
M.stuttering = 1
|
|
..()
|
|
if (M.stunned < 1 && (!(M.mutations & 8)) /*&& (!istype(H:wear_suit, /obj/item/clothing/suit/judgerobe))*/)
|
|
M.stunned = 1
|
|
else
|
|
/* if (!istype(H:r_hand, /obj/item/weapon/shield/riot) && prob(40))
|
|
for(var/mob/O in viewers(M, null))
|
|
if (O.client) O.show_message(text("\red <B>[] has blocked []'s stun baton with the riot shield!</B>", M, user), 1, "\red You hear a cracking sound", 2)
|
|
return
|
|
if (!istype(H:l_hand, /obj/item/weapon/shield/riot) && prob(40))
|
|
for(var/mob/O in viewers(M, null))
|
|
if (O.client) O.show_message(text("\red <B>[] has blocked []'s stun baton with the riot shield!</B>", M, user), 1, "\red You hear a cracking sound", 2)
|
|
return*/
|
|
playsound(src.loc, 'Egloves.ogg', 50, 1, -1)
|
|
if(isrobot(user))
|
|
var/mob/living/silicon/robot/R = user
|
|
R.cell.charge -= 20
|
|
else
|
|
charges--
|
|
if (M.weakened < 10 && (!(M.mutations & 8)) /*&& (!istype(H:wear_suit, /obj/item/clothing/suit/judgerobe))*/)
|
|
M.weakened = 10
|
|
if (M.stuttering < 10 && (!(M.mutations & 8)) /*&& (!istype(H:wear_suit, /obj/item/clothing/suit/judgerobe))*/)
|
|
M.stuttering = 10
|
|
if (M.stunned < 10 && (!(M.mutations & 8)) /*&& (!istype(H:wear_suit, /obj/item/clothing/suit/judgerobe))*/)
|
|
M.stunned = 10
|
|
user.lastattacked = M
|
|
M.lastattacker = user
|
|
for(var/mob/O in viewers(M))
|
|
if (O.client) O.show_message("\red <B>[M] has been stunned with the stun baton by [user]!</B>", 1, "\red You hear someone fall", 2)
|
|
|
|
/obj/item/weapon/classic_baton/attack(mob/M as mob, mob/user as mob)
|
|
if ((usr.mutations & 16) && prob(50))
|
|
usr << "\red You club yourself over the head."
|
|
usr.weakened = max(3 * force, usr.weakened)
|
|
if(ishuman(usr))
|
|
var/mob/living/carbon/human/H = usr
|
|
H.TakeDamage("head", 2 * force, 0)
|
|
else
|
|
usr.bruteloss += 2 * force
|
|
return
|
|
src.add_fingerprint(user)
|
|
|
|
if (user.a_intent == "hurt")
|
|
playsound(src.loc, "swing_hit", 50, 1, -1)
|
|
if (M.weakened < 8 && (!(M.mutations & 8)) /*&& (!istype(H:wear_suit, /obj/item/clothing/suit/judgerobe))*/)
|
|
M.weakened = 8
|
|
if (M.stuttering < 8 && (!(M.mutations & 8)) /*&& (!istype(H:wear_suit, /obj/item/clothing/suit/judgerobe))*/)
|
|
M.stuttering = 8
|
|
..()
|
|
if (M.stunned < 8 && (!(M.mutations & 8)) /*&& (!istype(H:wear_suit, /obj/item/clothing/suit/judgerobe))*/)
|
|
M.stunned = 8
|
|
for(var/mob/O in viewers(M))
|
|
if (O.client) O.show_message("\red <B>[M] has been beaten with the police baton by [user]!</B>", 1, "\red You hear someone fall", 2)
|
|
else
|
|
playsound(src.loc, 'Genhit.ogg', 50, 1, -1)
|
|
if (M.weakened < 5 && (!(M.mutations & 8)) /*&& (!istype(H:wear_suit, /obj/item/clothing/suit/judgerobe))*/)
|
|
M.weakened = 5
|
|
if (M.stunned < 5 && (!(M.mutations & 8)) /*&& (!istype(H:wear_suit, /obj/item/clothing/suit/judgerobe))*/)
|
|
M.stunned = 5
|
|
for(var/mob/O in viewers(M))
|
|
if (O.client) O.show_message("\red <B>[M] has been stunned with the police baton by [user]!</B>", 1, "\red You hear someone fall", 2)
|