Alien fixes/changes:

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
This commit is contained in:
noisomehollow@lycos.com
2011-01-03 23:32:18 +00:00
parent 0b69512b72
commit d2bb7d63ba
20 changed files with 670 additions and 444 deletions

View File

@@ -5,7 +5,6 @@
say_message = "hisses" say_message = "hisses"
icon = 'alien.dmi' icon = 'alien.dmi'
gender = NEUTER gender = NEUTER
flags = 258.0
toxloss = 250 toxloss = 250
var/alien_invis = 0.0 var/alien_invis = 0.0

View File

@@ -1,6 +1,7 @@
/mob/living/carbon/alien/larva /mob/living/carbon/alien/larva
name = "alien larva" name = "alien larva"
icon_state = "larva" icon_state = "larva"
flags = 258.0
health = 25 health = 25

View File

@@ -15,7 +15,7 @@
attack_hand(mob/user) attack_hand(mob/user)
if(!(istype(usr, /mob/living/silicon) || istype(usr, /mob/living/carbon/human))) if(!(istype(usr, /mob/living/silicon) || istype(usr, /mob/living/carbon/human)))
user << "\red You don't have the dexterity to do this" user << "\red You don't have the dexterity to do this."
return return
if(stat & (NOPOWER|BROKEN)) if(stat & (NOPOWER|BROKEN))
return return

View File

@@ -70,6 +70,8 @@
continue continue
if ((istype(O, /mob/living/carbon/human) && (istype(O:glasses, /obj/item/clothing/glasses/sunglasses)))) if ((istype(O, /mob/living/carbon/human) && (istype(O:glasses, /obj/item/clothing/glasses/sunglasses))))
continue continue
if (istype(O, /mob/living/carbon/alien))//So aliens don't get flashed (they have no external eyes)/N
continue
O.weakened = src.strength O.weakened = src.strength
if ((O.eye_stat > 15 && prob(O.eye_stat + 50))) if ((O.eye_stat > 15 && prob(O.eye_stat + 50)))

View File

@@ -359,6 +359,20 @@
user << browse(t, "window=turretid") user << browse(t, "window=turretid")
onclose(user, "turretid") onclose(user, "turretid")
/obj/machinery/turret/attack_alien(mob/living/carbon/alien/humanoid/M as mob)
if(!(stat & BROKEN))
playsound(src.loc, 'slash.ogg', 25, 1, -1)
for(var/mob/O in viewers(src, null))
if ((O.client && !( O.blinded )))
O.show_message(text("\red <B>[] has slashed at []!</B>", M, src), 1)
src.health -= 4
if (src.health <= 0)
src.die()
else
M << "\green That object is useless to you."
return
/obj/machinery/turretid/Topic(href, href_list) /obj/machinery/turretid/Topic(href, href_list)
..() ..()
if (src.locked) if (src.locked)

View File

@@ -39,9 +39,8 @@
density = 1 density = 1
opacity = 1 opacity = 1
anchored = 1 anchored = 1
unacidable = 0 //So aliens can destroy their own walls if they need to. //Alien can now normally destroy resin walls so they are no longer targetable with acid.
var/health = 50
var/health = 20
/obj/alien/weeds /obj/alien/weeds
name = "weeds" name = "weeds"

View File

@@ -1,4 +1,4 @@
// Alien Resin Walls are dense and block line of sight. They should probably be much stronger than they are now. -- TLE // Resin walls improved. /N
/*/obj/alien/resin/ex_act(severity) /*/obj/alien/resin/ex_act(severity)
world << "[severity] - [health]" world << "[severity] - [health]"
@@ -12,10 +12,116 @@
if(src.health < 1) if(src.health < 1)
del(src) del(src)
return*/ return*/
/*
/obj/alien/resin/attackby(obj/item/weapon/W as obj, mob/user as mob) /obj/alien/resin/attackby(obj/item/weapon/W as obj, mob/user as mob)
for(var/mob/M in viewers(src, null)) for(var/mob/M in viewers(src, null))
M.show_message(text("\red <B>[src] is struck with [src]!</B>"), 1) M.show_message(text("\red <B>[src] is struck with [src]!</B>"), 1)
src.health -= 2 src.health -= 2
if(src.health <= 0) if(src.health <= 0)
del(src) del(src)
*/
/obj/alien/resin/bullet_act(flag)
if (flag == PROJECTILE_BULLET)
health -= 35
if(health <=0)
src.density = 0
del(src)
return
/obj/alien/resin/ex_act(severity)
switch(severity)
if(1.0)
del(src)
return
if(2.0)
del(src)
return
if(3.0)
if (prob(50))
del(src)
return
return
/obj/alien/resin/blob_act()
density = 0
del(src)
/obj/alien/resin/meteorhit()
//*****RM
//world << "glass at [x],[y],[z] Mhit"
src.health = 0
src.density = 0
del(src)
return
/obj/alien/resin/hitby(AM as mob|obj)
..()
for(var/mob/O in viewers(src, null))
O.show_message(text("\red <B>[src] was hit by [AM].</B>"), 1)
var/tforce = 0
if(ismob(AM))
tforce = 10
else
tforce = AM:throwforce
playsound(src.loc, 'attackblob.ogg', 100, 1)
src.health = max(0, src.health - tforce)
if (src.health <= 0)
src.density = 0
del(src)
return
..()
return
/obj/alien/resin/attack_hand()
if ((usr.mutations & 8))
usr << text("\blue You easily destroy the resin wall.")
for(var/mob/O in oviewers())
if ((O.client && !( O.blinded )))
O << text("\red [] destroys the resin wall!", usr)
src.health = 0
src.density = 0
del(src)
return
/obj/alien/resin/attack_paw()
if ((usr.mutations & 8))
usr << text("\blue You easily destroy the resin wall.")
for(var/mob/O in oviewers())
if ((O.client && !( O.blinded )))
O << text("\red [] destroys the resin wall!", usr)
src.health = 0
src.density = 0
del(src)
return
/obj/alien/resin/attack_alien()
if (istype(usr, /mob/living/carbon/alien/larva))//Safety check for larva. /N
return
usr << text("\green You claw at the resin wall.")
for(var/mob/O in oviewers())
if ((O.client && !( O.blinded )))
O << text("\red [] claws at the resin wall!", usr)
playsound(src.loc, 'attackblob.ogg', 100, 1)
src.health -= rand(10, 20)
if(src.health <= 0)
usr << text("\green You slice the resin wall to pieces.")
for(var/mob/O in oviewers())
if ((O.client && !( O.blinded )))
O << text("\red [] slices the resin wall apart!", usr)
src.health = 0
src.density = 0
del(src)
return
return
/obj/alien/resin/attackby(obj/item/weapon/W as obj, mob/user as mob)
var/aforce = W.force
src.health = max(0, src.health - aforce)
playsound(src.loc, 'attackblob.ogg', 100, 1)
if (src.health <= 0)
src.density = 0
del(src)
return
..()
return

View File

@@ -10,6 +10,8 @@
var/mob/living/carbon/human/H = M var/mob/living/carbon/human/H = M
if (istype(H.glasses, /obj/item/clothing/glasses/sunglasses) || istype(H.head, /obj/item/clothing/head/helmet/welding)) if (istype(H.glasses, /obj/item/clothing/glasses/sunglasses) || istype(H.head, /obj/item/clothing/head/helmet/welding))
safety = 1 safety = 1
if (istype(M, /mob/living/carbon/alien))//So aliens don't get flashed (they have no external eyes)/N
safety = 1
if(isrobot(user)) if(isrobot(user))
spawn(0) spawn(0)
var/atom/movable/overlay/animation = new(user.loc) var/atom/movable/overlay/animation = new(user.loc)
@@ -21,7 +23,7 @@
sleep(5) sleep(5)
del(animation) del(animation)
if (!( safety )) if (!( safety ))
if (M.client) if (M.client)//Probably here to prevent forced conversion of dced players. /N
if (status == 0) if (status == 0)
user << "\red The bulb has been burnt out!" user << "\red The bulb has been burnt out!"
return return
@@ -48,12 +50,13 @@
if(user.mind in ticker.mode:head_revolutionaries) if(user.mind in ticker.mode:head_revolutionaries)
ticker.mode:add_revolutionary(M.mind) ticker.mode:add_revolutionary(M.mind)
for(var/mob/O in viewers(user, null)) for(var/mob/O in viewers(user, null))
if(status == 1) if(status == 1)
if(!istype(M, /mob/living/carbon/alien)) //So aliens don't show up as being blinded when it has no effect on them./N O.show_message(text("\red [] blinds [] with the flash!", user, M))
O.show_message(text("\red [] blinds [] with the flash!", user, M)) else
else for(var/mob/O in viewers(user, null))
O.show_message(text("\red [] fails to blind [] with the flash!", user, M)) if(status == 1)
O.show_message(text("\blue [] fails to blind [] with the flash!", user, M))
src.attack_self(user, 1) src.attack_self(user, 1)
return return
@@ -98,5 +101,7 @@
var/mob/living/carbon/human/H = M var/mob/living/carbon/human/H = M
if (istype(H.glasses, /obj/item/clothing/glasses/sunglasses) || istype(H.head, /obj/item/clothing/head/helmet/welding)) if (istype(H.glasses, /obj/item/clothing/glasses/sunglasses) || istype(H.head, /obj/item/clothing/head/helmet/welding))
safety = 1 safety = 1
if (istype(M, /mob/living/carbon/alien))//So aliens don't see those annoying flash screens.
safety = 1
if (!( safety )) if (!( safety ))
flick("flash", M.flash) flick("flash", M.flash)

View File

@@ -32,10 +32,15 @@ KNIFE
if(!(user.zone_sel.selecting == ("eyes" || "head"))) if(!(user.zone_sel.selecting == ("eyes" || "head")))
return ..() return ..()
var/mob/living/carbon/human/H = M var/mob/living/carbon/human/H = M
if(istype(M, /mob/living/carbon/human) && ((H.head && H.head.flags & HEADCOVERSEYES) || (H.wear_mask && H.wear_mask.flags & MASKCOVERSEYES) || (H.glasses && H.glasses.flags & GLASSESCOVERSEYES))) if(istype(M, /mob/living/carbon/human) && ((H.head && H.head.flags & HEADCOVERSEYES) || (H.wear_mask && H.wear_mask.flags & MASKCOVERSEYES) || (H.glasses && H.glasses.flags & GLASSESCOVERSEYES)))
// you can't stab someone in the eyes wearing a mask! // you can't stab someone in the eyes wearing a mask!
user << "\blue You're going to need to remove that mask/helmet/glasses first." user << "\blue You're going to need to remove that mask/helmet/glasses first."
return return
if(istype(M, /mob/living/carbon/alien))//Aliens don't have eyes./N
user << "\blue You cannot locate any eyes on this creature!"
return
for(var/mob/O in viewers(M, null)) for(var/mob/O in viewers(M, null))
if(O == (user || M)) continue if(O == (user || M)) continue
if(M == user) O.show_message(text("\red [] has stabbed themself with []!", user, src), 1) if(M == user) O.show_message(text("\red [] has stabbed themself with []!", user, src), 1)

View File

@@ -127,7 +127,7 @@ STUN BATON
if(status == 1 && charges == 0) if(status == 1 && charges == 0)
user << "\red Not enough charge" user << "\red Not enough charge"
return return
if((charges > 0 && status == 1) && (istype(H, /mob/living/carbon/human))) if((charges > 0 && status == 1) && (istype(H, /mob/living/carbon)))
flick("baton_active", src) flick("baton_active", src)
if (user.a_intent == "hurt") if (user.a_intent == "hurt")
/* if (!istype(H:r_hand, /obj/item/weapon/shield/riot) && prob(40)) /* if (!istype(H:r_hand, /obj/item/weapon/shield/riot) && prob(40))
@@ -176,39 +176,6 @@ STUN BATON
M.lastattacker = user M.lastattacker = user
for(var/mob/O in viewers(M)) 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) 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)
else if((charges > 0 && status == 1) && (istype(M, /mob/living/carbon/monkey)))
flick("baton_active", src)
if (user.a_intent == "hurt")
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)) )
M.weakened = 1
if (M.stuttering < 1 && (!(M.mutations & 8)) )
M.stuttering = 1
..()
if (M.stunned < 1 && (!(M.mutations & 8)) )
M.stunned = 1
else
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)) )
M.weakened = 10
if (M.stuttering < 10 && (!(M.mutations & 8)) )
M.stuttering = 10
if (M.stunned < 10 && (!(M.mutations & 8)) )
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) /obj/item/weapon/classic_baton/attack(mob/M as mob, mob/user as mob)
if ((usr.mutations & 16) && prob(50)) if ((usr.mutations & 16) && prob(50))

View File

@@ -36,10 +36,15 @@ WELDINGTOOOL
if(!(user.zone_sel.selecting == ("eyes" || "head"))) if(!(user.zone_sel.selecting == ("eyes" || "head")))
return ..() return ..()
var/mob/living/carbon/human/H = M var/mob/living/carbon/human/H = M
if(istype(M, /mob/living/carbon/human) && ((H.head && H.head.flags & HEADCOVERSEYES) || (H.wear_mask && H.wear_mask.flags & MASKCOVERSEYES) || (H.glasses && H.glasses.flags & GLASSESCOVERSEYES))) if(istype(M, /mob/living/carbon/human) && ((H.head && H.head.flags & HEADCOVERSEYES) || (H.wear_mask && H.wear_mask.flags & MASKCOVERSEYES) || (H.glasses && H.glasses.flags & GLASSESCOVERSEYES)))
// you can't stab someone in the eyes wearing a mask! // you can't stab someone in the eyes wearing a mask!
user << "\blue You're going to need to remove that mask/helmet/glasses first." user << "\blue You're going to need to remove that mask/helmet/glasses first."
return return
if(istype(M, /mob/living/carbon/alien))//Aliens don't have eyes./N
user << "\blue You cannot locate any eyes on this creature!"
return
for(var/mob/O in viewers(M, null)) for(var/mob/O in viewers(M, null))
if(O == (user || M)) continue if(O == (user || M)) continue
if(M == user) O.show_message(text("\red [] has stabbed themself with []!", user, src), 1) if(M == user) O.show_message(text("\red [] has stabbed themself with []!", user, src), 1)

View File

@@ -24,7 +24,7 @@ These are being worked on.
return return
/*Alien spit now works like a taser shot. It won't home in on the target but will act the same once it does hit. /*Alien spit now works like a taser shot. It won't home in on the target but will act the same once it does hit.
Doesn't work on silicon mobs or other aliens.*/ Doesn't work on other aliens/AI.*/
/mob/living/carbon/alien/humanoid/verb/spit(mob/target as mob in oview()) /mob/living/carbon/alien/humanoid/verb/spit(mob/target as mob in oview())
set name = "Spit Neurotoxin (50)" set name = "Spit Neurotoxin (50)"
set desc = "Spits neurotoxin at someone, paralyzing them for a short time." set desc = "Spits neurotoxin at someone, paralyzing them for a short time."
@@ -37,6 +37,10 @@ Doesn't work on silicon mobs or other aliens.*/
src << "\green Your allies are not a valid target." src << "\green Your allies are not a valid target."
return return
if(src.toxloss >= 50) if(src.toxloss >= 50)
src << "\green You spit neurotoxin at [target]."
for(var/mob/O in oviewers())
if ((O.client && !( O.blinded )))
O << "\red [src] spits neurotoxin at [target]!"
src.toxloss -= 50 src.toxloss -= 50
var/turf/T = usr.loc var/turf/T = usr.loc
var/turf/U = (istype(target, /atom/movable) ? target.loc : target) var/turf/U = (istype(target, /atom/movable) ? target.loc : target)
@@ -199,7 +203,7 @@ Doesn't work on silicon mobs or other aliens.*/
src.toxloss -= 100 src.toxloss -= 100
src << "\green You begin to shape a wall of resin." src << "\green You begin to shape a wall of resin."
for(var/mob/O in viewers(src, null)) for(var/mob/O in viewers(src, null))
O.show_message(text("\green <B>[src] vomits up a thick purple substance and begins to shape it!</B>"), 1) O.show_message(text("\red <B>[src] vomits up a thick purple substance and begins to shape it!</B>"), 1)
//var/obj/alien/resin/R = new(src.loc) //var/obj/alien/resin/R = new(src.loc)
new /obj/alien/resin(src.loc) new /obj/alien/resin(src.loc)
else else

View File

@@ -189,10 +189,8 @@ This is all very silly and I will probably remove it in the future. /N
return return
else if(flag == PROJECTILE_LASER) else if(flag == PROJECTILE_LASER)
var/d = 20 var/d = 20
// if (!src.eye_blurry) src.eye_blurry = 4 //This stuff makes no sense but lasers need a buff./ It really doesn't make any sense. /N
if (!src.eye_blurry) src.eye_blurry = 4 //This stuff makes no sense but lasers need a buff.
if (prob(25)) src.stunned++ if (prob(25)) src.stunned++
if (src.stat != 2) if (src.stat != 2)
src.bruteloss += d src.bruteloss += d
src.updatehealth() src.updatehealth()
@@ -615,25 +613,38 @@ This is all very silly and I will probably remove it in the future. /N
return return
/mob/living/carbon/alien/humanoid/attack_paw(mob/living/carbon/monkey/M as mob) /mob/living/carbon/alien/humanoid/attack_paw(mob/living/carbon/monkey/M as mob)
if(istype(M, /mob/living/carbon/alien)) return//Quick fix since these display double for aliens when they interact with aliens. if(!(istype(M, /mob/living/carbon/monkey))) return//Fix for aliens receiving double messages when attacking other aliens.
if (M.a_intent == "help")
src.sleeping = 0
src.resting = 0
if (src.paralysis >= 3) src.paralysis -= 3
if (src.stunned >= 3) src.stunned -= 3
if (src.weakened >= 3) src.weakened -= 3
for(var/mob/O in viewers(src, null))
O.show_message(text("\blue [M.name] shakes [src] trying to wake it up!", ), 1)
else
if (istype(src.wear_mask, /obj/item/clothing/mask/muzzle))
return
if (src.health > 0)
playsound(src.loc, 'bite.ogg', 50, 1, -1)
for(var/mob/O in viewers(src, null))
O.show_message(text("\red <B>[M.name] has bit [src]!</B>"), 1)
src.bruteloss += rand(1, 3)
src.updatehealth() if (!ticker)
M << "You cannot attack people before the game has started."
return
if (istype(src.loc, /turf) && istype(src.loc.loc, /area/start))
M << "No attacking people at spawn, you jackass."
return
..()
switch(M.a_intent)
if ("help")
src.sleeping = 0
src.resting = 0
if (src.paralysis >= 3) src.paralysis -= 3
if (src.stunned >= 3) src.stunned -= 3
if (src.weakened >= 3) src.weakened -= 3
for(var/mob/O in viewers(src, null))
if ((O.client && !( O.blinded )))
O.show_message(text("\blue [M.name] shakes [src] trying to wake it up!", ), 1)
else
if (istype(src.wear_mask, /obj/item/clothing/mask/muzzle))
return
if (src.health > 0)
playsound(src.loc, '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)
src.bruteloss += rand(1, 3)
src.updatehealth()
return return
/mob/living/carbon/alien/humanoid/attack_hand(mob/living/carbon/human/M as mob) /mob/living/carbon/alien/humanoid/attack_hand(mob/living/carbon/human/M as mob)
@@ -647,7 +658,7 @@ This is all very silly and I will probably remove it in the future. /N
..() ..()
if ((M.gloves && M.gloves.elecgen == 1 && M.a_intent == "hurt") /*&& (!istype(src:wear_suit, /obj/item/clothing/suit/judgerobe))*/) if(M.gloves && M.gloves.elecgen == 1)//Stungloves. Any contact will stun the alien.
if(M.gloves.uses > 0) if(M.gloves.uses > 0)
M.gloves.uses-- M.gloves.uses--
if (src.weakened < 5) if (src.weakened < 5)
@@ -657,40 +668,39 @@ This is all very silly and I will probably remove it in the future. /N
if (src.stunned < 5) if (src.stunned < 5)
src.stunned = 5 src.stunned = 5
for(var/mob/O in viewers(src, null)) for(var/mob/O in viewers(src, null))
if (O.client) if ((O.client && !( O.blinded )))
O.show_message("\red <B>[src] has been touched with the stun gloves by [M]!</B>", 1, "\red You hear someone fall", 2) O.show_message("\red <B>[src] has been touched with the stun gloves by [M]!</B>", 1, "\red You hear someone fall.", 2)
else
M.gloves.elecgen = 0
M << "\red Not enough charge! "
return
if (M.a_intent == "help") switch(M.a_intent)
if (src.health > 0)
src.sleeping = 0 if ("help")
src.resting = 0 if (src.health > 0)
if (src.paralysis >= 3) src.paralysis -= 3 src.sleeping = 0
if (src.stunned >= 3) src.stunned -= 3 src.resting = 0
if (src.weakened >= 3) src.weakened -= 3 if (src.paralysis >= 3) src.paralysis -= 3
playsound(src.loc, 'thudswoosh.ogg', 50, 1, -1) if (src.stunned >= 3) src.stunned -= 3
for(var/mob/O in viewers(src, null)) if (src.weakened >= 3) src.weakened -= 3
O.show_message(text("\blue [] shakes [] trying to wake [] up!", M, src, src), 1) playsound(src.loc, 'thudswoosh.ogg', 50, 1, -1)
else for(var/mob/O in viewers(src, null))
if (M.health >= -75.0) if ((O.client && !( O.blinded )))
if (((M.head && M.head.flags & 4) || ((M.wear_mask && !( M.wear_mask.flags & 32 )) || ((src.head && src.head.flags & 4) || (src.wear_mask && !( src.wear_mask.flags & 32 )))))) O.show_message(text("\blue [] shakes [] trying to wake [] up!", M, src, src), 1)
M << "\blue <B>Remove that mask!</B>" else
return if (M.health >= -75.0)
var/obj/equip_e/human/O = new /obj/equip_e/human( ) if (((M.head && M.head.flags & 4) || ((M.wear_mask && !( M.wear_mask.flags & 32 )) || ((src.head && src.head.flags & 4) || (src.wear_mask && !( src.wear_mask.flags & 32 ))))))
O.source = M M << "\blue <B>Remove that mask!</B>"
O.target = src return
O.s_loc = M.loc var/obj/equip_e/human/O = new /obj/equip_e/human( )
O.t_loc = src.loc O.source = M
O.place = "CPR" O.target = src
src.requests += O O.s_loc = M.loc
spawn( 0 ) O.t_loc = src.loc
O.process() O.place = "CPR"
return src.requests += O
else spawn( 0 )
if (M.a_intent == "grab") O.process()
return
if ("grab")
if (M == src) if (M == src)
return return
var/obj/item/weapon/grab/G = new /obj/item/weapon/grab( M ) var/obj/item/weapon/grab/G = new /obj/item/weapon/grab( M )
@@ -705,50 +715,57 @@ This is all very silly and I will probably remove it in the future. /N
G.synch() G.synch()
playsound(src.loc, 'thudswoosh.ogg', 50, 1, -1) playsound(src.loc, 'thudswoosh.ogg', 50, 1, -1)
for(var/mob/O in viewers(src, null)) for(var/mob/O in viewers(src, null))
O.show_message(text("\red [] has grabbed [] passively!", M, src), 1) if ((O.client && !( O.blinded )))
else O.show_message(text("\red [] has grabbed [] passively!", M, src), 1)
if (M.a_intent == "hurt" && !(M.gloves && M.gloves.elecgen == 1))
var/damage = rand(1, 9) if ("hurt")
if (prob(90)) var/damage = rand(1, 9)
if (M.mutations & 8) if (prob(90))
damage += 5 if (M.mutations & 8)
spawn(0) damage += 5
src.paralysis += 1 spawn(0)
step_away(src,M,15) src.paralysis += 1
sleep(3) step_away(src,M,15)
step_away(src,M,15) sleep(3)
playsound(src.loc, "punch", 25, 1, -1) step_away(src,M,15)
for(var/mob/O in viewers(src, null)) playsound(src.loc, "punch", 25, 1, -1)
for(var/mob/O in viewers(src, null))
if ((O.client && !( O.blinded )))
O.show_message(text("\red <B>[] has punched []!</B>", M, src), 1) O.show_message(text("\red <B>[] has punched []!</B>", M, src), 1)
if (damage > 4.9) if (damage > 4.9)
if (src.weakened < 10) if (src.weakened < 10)
src.weakened = rand(10, 15) src.weakened = rand(10, 15)
for(var/mob/O in viewers(M, null)) for(var/mob/O in viewers(M, null))
if ((O.client && !( O.blinded )))
O.show_message(text("\red <B>[] has weakened []!</B>", M, src), 1, "\red You hear someone fall.", 2) O.show_message(text("\red <B>[] has weakened []!</B>", M, src), 1, "\red You hear someone fall.", 2)
src.bruteloss += damage src.bruteloss += damage
src.updatehealth() src.updatehealth()
else
playsound(src.loc, 'punchmiss.ogg', 25, 1, -1)
for(var/mob/O in viewers(src, null))
O.show_message(text("\red <B>[] has attempted to punch []!</B>", M, src), 1)
return
else else
if (!( src.lying ) && !(M.gloves && M.gloves.elecgen == 1)) playsound(src.loc, 'punchmiss.ogg', 25, 1, -1)
var/randn = rand(1, 100) for(var/mob/O in viewers(src, null))
if (randn <= 25) if ((O.client && !( O.blinded )))
src.weakened = 2 O.show_message(text("\red <B>[] has attempted to punch []!</B>", M, src), 1)
if ("disarm")
if (!src.lying)
var/randn = rand(1, 100)
if (randn <= 25)
src.weakened = 2
playsound(src.loc, '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 pushed down []!</B>", M, src), 1)
else
if (randn <= 60)
src.drop_item()
playsound(src.loc, 'thudswoosh.ogg', 50, 1, -1) playsound(src.loc, 'thudswoosh.ogg', 50, 1, -1)
for(var/mob/O in viewers(src, null)) for(var/mob/O in viewers(src, null))
O.show_message(text("\red <B>[] has pushed down []!</B>", M, src), 1) if ((O.client && !( O.blinded )))
else
if (randn <= 60)
src.drop_item()
playsound(src.loc, 'thudswoosh.ogg', 50, 1, -1)
for(var/mob/O in viewers(src, null))
O.show_message(text("\red <B>[] has disarmed []!</B>", M, src), 1) O.show_message(text("\red <B>[] has disarmed []!</B>", M, src), 1)
else else
playsound(src.loc, 'punchmiss.ogg', 25, 1, -1) playsound(src.loc, 'punchmiss.ogg', 25, 1, -1)
for(var/mob/O in viewers(src, null)) for(var/mob/O in viewers(src, null))
if ((O.client && !( O.blinded )))
O.show_message(text("\red <B>[] has attempted to disarm []!</B>", M, src), 1) O.show_message(text("\red <B>[] has attempted to disarm []!</B>", M, src), 1)
return return
@@ -768,25 +785,29 @@ In all, this is a lot like the monkey code. /N
..() ..()
if (M.a_intent == "help") switch(M.a_intent)
src.sleeping = 0
src.resting = 0
if (src.paralysis >= 3) src.paralysis -= 3
if (src.stunned >= 3) src.stunned -= 3
if (src.weakened >= 3) src.weakened -= 3
for(var/mob/O in viewers(src, null))
O.show_message(text("\blue [M.name] nuzzles [] trying to wake it up!", src), 1)
else if ("help")
if (src.health > 0) src.sleeping = 0
playsound(src.loc, 'bite.ogg', 50, 1, -1) src.resting = 0
var/damage = rand(1, 3) if (src.paralysis >= 3) src.paralysis -= 3
if (src.stunned >= 3) src.stunned -= 3
if (src.weakened >= 3) src.weakened -= 3
for(var/mob/O in viewers(src, null)) for(var/mob/O in viewers(src, null))
O.show_message(text("\red <B>[M.name] has bit []!</B>", src), 1) if ((O.client && !( O.blinded )))
src.bruteloss += damage O.show_message(text("\blue [M.name] nuzzles [] trying to wake it up!", src), 1)
src.updatehealth()
else else
M << "\green <B>[src.name] is too injured for that.</B>" if (src.health > 0)
playsound(src.loc, 'bite.ogg', 50, 1, -1)
var/damage = rand(1, 3)
for(var/mob/O in viewers(src, null))
if ((O.client && !( O.blinded )))
O.show_message(text("\red <B>[M.name] has bit []!</B>", src), 1)
src.bruteloss += damage
src.updatehealth()
else
M << "\green <B>[src.name] is too injured for that.</B>"
return return

View File

@@ -96,7 +96,7 @@
else if(flag == PROJECTILE_LASER) else if(flag == PROJECTILE_LASER)
var/d = 20 var/d = 20
if (!src.eye_blurry) src.eye_blurry = 4 //This stuff makes no sense but lasers need a buff. // if (!src.eye_blurry) src.eye_blurry = 4 //This stuff makes no sense but lasers need a buff./ It really doesn't make any sense. /N
if (prob(25)) src.stunned++ if (prob(25)) src.stunned++
if (src.stat != 2) if (src.stat != 2)
@@ -331,27 +331,38 @@
return return
/mob/living/carbon/alien/larva/attack_paw(mob/living/carbon/monkey/M as mob) /mob/living/carbon/alien/larva/attack_paw(mob/living/carbon/monkey/M as mob)
if(istype(M, /mob/living/carbon/alien)) return//Quick fix since these display double for aliens when they interact with aliens. if(!(istype(M, /mob/living/carbon/monkey))) return//Fix for aliens receiving double messages when attacking other aliens.
if (M.a_intent == "help")
src.sleeping = 0 if (!ticker)
src.resting = 0 M << "You cannot attack people before the game has started."
if (src.paralysis >= 3) src.paralysis -= 3 return
if (src.stunned >= 3) src.stunned -= 3
if (src.weakened >= 3) src.weakened -= 3 if (istype(src.loc, /turf) && istype(src.loc.loc, /area/start))
for(var/mob/O in viewers(src, null)) M << "No attacking people at spawn, you jackass."
O.show_message(text("\blue [M.name] shakes [src] trying to wake it up!", ), 1) return
else ..()
if (istype(src.wear_mask, /obj/item/clothing/mask/muzzle))
return switch(M.a_intent)
if (src.health > 0)
playsound(src.loc, 'bite.ogg', 50, 1, -1) if ("help")
src.sleeping = 0
src.resting = 0
if (src.paralysis >= 3) src.paralysis -= 3
if (src.stunned >= 3) src.stunned -= 3
if (src.weakened >= 3) src.weakened -= 3
for(var/mob/O in viewers(src, null)) for(var/mob/O in viewers(src, null))
O.show_message(text("\red <B>[M.name] has bit [src]!</B>"), 1) if ((O.client && !( O.blinded )))
var/damage = rand(1, 3) O.show_message(text("\blue [M.name] shakes [src] trying to wake it up!", ), 1)
else
src.bruteloss += damage if (istype(src.wear_mask, /obj/item/clothing/mask/muzzle))
return
src.updatehealth() if (src.health > 0)
playsound(src.loc, '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)
src.bruteloss += rand(1, 3)
src.updatehealth()
return return
/mob/living/carbon/alien/larva/attack_hand(mob/living/carbon/human/M as mob) /mob/living/carbon/alien/larva/attack_hand(mob/living/carbon/human/M as mob)
@@ -363,7 +374,9 @@
M << "No attacking people at spawn, you jackass." M << "No attacking people at spawn, you jackass."
return return
if ((M.gloves && M.gloves.elecgen == 1 && M.a_intent == "hurt") /*&& (!istype(src:wear_suit, /obj/item/clothing/suit/judgerobe))*/) ..()
if(M.gloves && M.gloves.elecgen == 1)//Stungloves. Any contact will stun the alien.
if(M.gloves.uses > 0) if(M.gloves.uses > 0)
M.gloves.uses-- M.gloves.uses--
if (src.weakened < 5) if (src.weakened < 5)
@@ -373,40 +386,39 @@
if (src.stunned < 5) if (src.stunned < 5)
src.stunned = 5 src.stunned = 5
for(var/mob/O in viewers(src, null)) for(var/mob/O in viewers(src, null))
if (O.client) if ((O.client && !( O.blinded )))
O.show_message("\red <B>[src] has been touched with the stun gloves by [M]!</B>", 1, "\red You hear someone fall", 2) O.show_message("\red <B>[src] has been touched with the stun gloves by [M]!</B>", 1, "\red You hear someone fall.", 2)
else
M.gloves.elecgen = 0
M << "\red Not enough charge! "
return
if (M.a_intent == "help") switch(M.a_intent)
if (src.health > 0)
src.sleeping = 0 if ("help")
src.resting = 0 if (src.health > 0)
if (src.paralysis >= 3) src.paralysis -= 3 src.sleeping = 0
if (src.stunned >= 3) src.stunned -= 3 src.resting = 0
if (src.weakened >= 3) src.weakened -= 3 if (src.paralysis >= 3) src.paralysis -= 3
playsound(src.loc, 'thudswoosh.ogg', 50, 1, -1) if (src.stunned >= 3) src.stunned -= 3
for(var/mob/O in viewers(src, null)) if (src.weakened >= 3) src.weakened -= 3
O.show_message(text("\blue [] shakes [] trying to wake [] up!", M, src, src), 1) playsound(src.loc, 'thudswoosh.ogg', 50, 1, -1)
else for(var/mob/O in viewers(src, null))
if (M.health >= -75.0) if ((O.client && !( O.blinded )))
if ((M.head && M.head.flags & 4) || (M.wear_mask && !( M.wear_mask.flags & 32 )) ) O.show_message(text("\blue [] shakes [] trying to wake [] up!", M, src, src), 1)
M << "\blue <B>Remove that mask!</B>" else
return if (M.health >= -75.0)
var/obj/equip_e/human/O = new /obj/equip_e/human( ) if ((M.head && M.head.flags & 4) || (M.wear_mask && !( M.wear_mask.flags & 32 )) )
O.source = M M << "\blue <B>Remove that mask!</B>"
O.target = src return
O.s_loc = M.loc var/obj/equip_e/human/O = new /obj/equip_e/human( )
O.t_loc = src.loc O.source = M
O.place = "CPR" O.target = src
src.requests += O O.s_loc = M.loc
spawn( 0 ) O.t_loc = src.loc
O.process() O.place = "CPR"
return src.requests += O
else spawn( 0 )
if (M.a_intent == "grab") O.process()
return
if ("grab")
if (M == src) if (M == src)
return return
var/obj/item/weapon/grab/G = new /obj/item/weapon/grab( M ) var/obj/item/weapon/grab/G = new /obj/item/weapon/grab( M )
@@ -421,33 +433,36 @@
G.synch() G.synch()
playsound(src.loc, 'thudswoosh.ogg', 50, 1, -1) playsound(src.loc, 'thudswoosh.ogg', 50, 1, -1)
for(var/mob/O in viewers(src, null)) for(var/mob/O in viewers(src, null))
O.show_message(text("\red [] has grabbed [] passively!", M, src), 1) if ((O.client && !( O.blinded )))
O.show_message(text("\red [] has grabbed [] passively!", M, src), 1)
else else
if (M.a_intent == "hurt" && !(M.gloves && M.gloves.elecgen == 1)) var/damage = rand(1, 9)
var/damage = rand(1, 9) if (prob(90))
if (M.mutations & 8)
if (prob(90)) damage += 5
if (M.mutations & 8 && prob(90)) spawn(0)
damage += 5 src.paralysis += 1
spawn(0) step_away(src,M,15)
src.paralysis += 1 sleep(3)
step_away(src,M,15) step_away(src,M,15)
sleep(3) playsound(src.loc, "punch", 25, 1, -1)
step_away(src,M,15) for(var/mob/O in viewers(src, null))
playsound(src.loc, "punch", 25, 1, -1) if ((O.client && !( O.blinded )))
for(var/mob/O in viewers(src, null))
O.show_message(text("\red <B>[] has punched []!</B>", M, src), 1) O.show_message(text("\red <B>[] has punched []!</B>", M, src), 1)
if (damage > 4.9)
src.bruteloss += damage if (src.weakened < 10)
src.weakened = rand(10, 15)
src.updatehealth() for(var/mob/O in viewers(M, null))
else if ((O.client && !( O.blinded )))
playsound(src.loc, 'punchmiss.ogg', 25, 1, -1) O.show_message(text("\red <B>[] has weakened []!</B>", M, src), 1, "\red You hear someone fall.", 2)
for(var/mob/O in viewers(src, null)) src.bruteloss += damage
O.show_message(text("\red <B>[] has attempted to punch []!</B>", M, src), 1) src.updatehealth()
return
else else
return playsound(src.loc, 'punchmiss.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 punch []!</B>", M, src), 1)
return return
/mob/living/carbon/alien/larva/attack_alien(mob/living/carbon/alien/humanoid/M as mob) /mob/living/carbon/alien/larva/attack_alien(mob/living/carbon/alien/humanoid/M as mob)
@@ -461,25 +476,29 @@
..() ..()
if (M.a_intent == "help") switch(M.a_intent)
src.sleeping = 0
src.resting = 0
if (src.paralysis >= 3) src.paralysis -= 3
if (src.stunned >= 3) src.stunned -= 3
if (src.weakened >= 3) src.weakened -= 3
for(var/mob/O in viewers(src, null))
O.show_message(text("\blue [M.name] nuzzles [] trying to wake it up!", src), 1)
else if ("help")
if (src.health > 0) src.sleeping = 0
playsound(src.loc, 'bite.ogg', 50, 1, -1) src.resting = 0
var/damage = rand(1, 3) if (src.paralysis >= 3) src.paralysis -= 3
if (src.stunned >= 3) src.stunned -= 3
if (src.weakened >= 3) src.weakened -= 3
for(var/mob/O in viewers(src, null)) for(var/mob/O in viewers(src, null))
O.show_message(text("\red <B>[M.name] has bit []!</B>", src), 1) if ((O.client && !( O.blinded )))
src.bruteloss += damage O.show_message(text("\blue [M.name] nuzzles [] trying to wake it up!", src), 1)
src.updatehealth()
else else
M << "\green <B>[src.name] is too injured for that.</B>" if (src.health > 0)
playsound(src.loc, 'bite.ogg', 50, 1, -1)
var/damage = rand(1, 3)
for(var/mob/O in viewers(src, null))
if ((O.client && !( O.blinded )))
O.show_message(text("\red <B>[M.name] has bit []!</B>", src), 1)
src.bruteloss += damage
src.updatehealth()
else
M << "\green <B>[src.name] is too injured for that.</B>"
return return
/mob/living/carbon/alien/larva/restrained() /mob/living/carbon/alien/larva/restrained()

View File

@@ -5,6 +5,18 @@
if (!dna) if (!dna)
dna = new /datum/dna( null ) dna = new /datum/dna( null )
/*
if(istype(src, /mob/living/carbon/human/vampire))
spawn (1)
src.verbs += /mob/proc/mist
src.verbs += /mob/proc/port
src.verbs += /mob/proc/hellfire
src.verbs += /mob/proc/veil
src.verbs += /mob/proc/charm
src.verbs += /mob/proc/lights
src.verbs += /mob/proc/blood
src.mutantrace = "vampire"
*/
spawn (1) spawn (1)
var/datum/organ/external/chest/chest = new /datum/organ/external/chest( src ) var/datum/organ/external/chest/chest = new /datum/organ/external/chest( src )
chest.owner = src chest.owner = src
@@ -1407,12 +1419,14 @@
M << "No attacking people at spawn, you jackass." M << "No attacking people at spawn, you jackass."
return return
if (M.a_intent == "help") switch(M.a_intent)
for(var/mob/O in viewers(src, null))
O.show_message(text("\blue [M] caresses [src] with its scythe like arm."), 1) if ("help")
else for(var/mob/O in viewers(src, null))
//This will be changed to skin, where we can skin a dead human corpse//Actually, that sounds kind of impractical./N if ((O.client && !( O.blinded )))
if (M.a_intent == "grab") O.show_message(text("\blue [M] caresses [src] with its scythe like arm."), 1)
if ("grab")
//This will be changed to skin, where we can skin a dead human corpse//Actually, that sounds kind of impractical./N
if (M == src) if (M == src)
return return
if (src.w_uniform) if (src.w_uniform)
@@ -1429,106 +1443,123 @@
G.synch() G.synch()
playsound(src.loc, 'thudswoosh.ogg', 50, 1, -1) playsound(src.loc, 'thudswoosh.ogg', 50, 1, -1)
for(var/mob/O in viewers(src, null)) for(var/mob/O in viewers(src, null))
O.show_message(text("\red [] has grabbed [] passively!", M, src), 1) if ((O.client && !( O.blinded )))
else O.show_message(text("\red [] has grabbed [] passively!", M, src), 1)
if (M.a_intent == "hurt")
if (src.w_uniform) if ("hurt")
src.w_uniform.add_fingerprint(M) if (src.w_uniform)
var/damage = rand(15, 30) // How much damage aliens do to humans? Increasing -- TLE src.w_uniform.add_fingerprint(M)
// I've decreased the chance of humans being protected by uniforms. Now aliens can actually damage them. var/damage = rand(15, 30) // How much damage aliens do to humans? Increasing -- TLE
var/datum/organ/external/affecting = src.organs["chest"] // I've decreased the chance of humans being protected by uniforms. Now aliens can actually damage them.
var/t = M.zone_sel.selecting var/datum/organ/external/affecting = src.organs["chest"]
if ((t in list( "eyes", "mouth" ))) var/t = M.zone_sel.selecting
t = "head" if ((t in list( "eyes", "mouth" )))
var/def_zone = ran_zone(t) t = "head"
if (src.organs[def_zone]) var/def_zone = ran_zone(t)
affecting = src.organs[def_zone] if (src.organs[def_zone])
if ((istype(affecting, /datum/organ/external) && prob(95))) affecting = src.organs[def_zone]
playsound(src.loc, 'slice.ogg', 25, 1, -1) if ((istype(affecting, /datum/organ/external) && prob(95)))
for(var/mob/O in viewers(src, null)) playsound(src.loc, 'slice.ogg', 25, 1, -1)
for(var/mob/O in viewers(src, null))
if ((O.client && !( O.blinded )))
O.show_message(text("\red <B>[] has slashed at []!</B>", M, src), 1) O.show_message(text("\red <B>[] has slashed at []!</B>", M, src), 1)
if (def_zone == "head") if (def_zone == "head")
if ((((src.head && src.head.body_parts_covered & HEAD) || (src.wear_mask && src.wear_mask.body_parts_covered & HEAD)) && prob(5))) if ((((src.head && src.head.body_parts_covered & HEAD) || (src.wear_mask && src.wear_mask.body_parts_covered & HEAD)) && prob(5)))
if (prob(20)) if (prob(20))
affecting.take_damage(damage, 0) affecting.take_damage(damage, 0)
else else
src.show_message("\red You have been protected from a hit to the head.") src.show_message("\red You have been protected from a hit to the head.")
return return
if (damage > 4.9) if (damage >= 25)
if (src.weakened < 10) if (src.weakened < 10)
src.weakened = rand(10, 15) src.weakened = rand(10, 15)
for(var/mob/O in viewers(M, null)) for(var/mob/O in viewers(M, null))
if ((O.client && !( O.blinded )))
O.show_message(text("\red <B>[] has wounded []!</B>", M, src), 1, "\red You hear someone fall.", 2) O.show_message(text("\red <B>[] has wounded []!</B>", M, src), 1, "\red You hear someone fall.", 2)
affecting.take_damage(damage)
else
if (def_zone == "chest")
if ((((src.wear_suit && src.wear_suit.body_parts_covered & UPPER_TORSO) || (src.w_uniform && src.w_uniform.body_parts_covered & LOWER_TORSO)) && prob(10)))
src.show_message("\blue You have been protected from a hit to the chest.")
return
if (damage >= 25)
if (prob(50))
if (src.weakened < 5)
src.weakened = 5
playsound(src.loc, 'slashmiss.ogg', 50, 1, -1)
for(var/mob/O in viewers(src, null))
if ((O.client && !( O.blinded )))
O.show_message(text("\red <B>[] has tackled down []!</B>", M, src), 1, "\red You hear someone fall.", 2)
else
if (src.stunned < 5)
src.stunned = 5
for(var/mob/O in viewers(src, null))
if ((O.client && !( O.blinded )))
O.show_message(text("\red <B>[] has stunned []!</B>", M, src), 1)
if(src.stat != 2) src.stat = 1
affecting.take_damage(damage) affecting.take_damage(damage)
else else
if (def_zone == "chest") if (def_zone == "groin")
if ((((src.wear_suit && src.wear_suit.body_parts_covered & UPPER_TORSO) || (src.w_uniform && src.w_uniform.body_parts_covered & LOWER_TORSO)) && prob(10))) if ((((src.wear_suit && src.wear_suit.body_parts_covered & LOWER_TORSO) || (src.w_uniform && src.w_uniform.body_parts_covered & LOWER_TORSO)) && prob(1)))
src.show_message("\blue You have been protected from a hit to the chest.") src.show_message("\blue You have been protected from a hit to the lower chest.")
return return
if (damage > 4.9) if (damage >= 25)
if (prob(50)) if (prob(50))
if (src.weakened < 5) if (src.weakened < 3)
src.weakened = 5 src.weakened = 3
playsound(src.loc, 'slashmiss.ogg', 50, 1, -1)
for(var/mob/O in viewers(src, null)) for(var/mob/O in viewers(src, null))
O.show_message(text("\red <B>[] has tackled down []!</B>", M, src), 1, "\red You hear someone fall.", 2) if ((O.client && !( O.blinded )))
O.show_message(text("\red <B>[] has tackled down []!</B>", M, src), 1, "\red You hear someone fall.", 2)
else else
if (src.stunned < 5) if (src.stunned < 3)
src.stunned = 5 src.stunned = 3
for(var/mob/O in viewers(src, null)) for(var/mob/O in viewers(src, null))
O.show_message(text("\red <B>[] has stunned []!</B>", M, src), 1) if ((O.client && !( O.blinded )))
O.show_message(text("\red <B>[] has stunned []!</B>", M, src), 1)
if(src.stat != 2) src.stat = 1 if(src.stat != 2) src.stat = 1
affecting.take_damage(damage) affecting.take_damage(damage)
else else
if (def_zone == "groin") affecting.take_damage(damage)
if ((((src.wear_suit && src.wear_suit.body_parts_covered & LOWER_TORSO) || (src.w_uniform && src.w_uniform.body_parts_covered & LOWER_TORSO)) && prob(1))) src.UpdateDamageIcon()
src.show_message("\blue You have been protected from a hit to the lower chest.") src.updatehealth()
return else
if (damage > 4.9) playsound(src.loc, 'slashmiss.ogg', 50, 1, -1)
if (prob(50)) for(var/mob/O in viewers(src, null))
if (src.weakened < 3) if ((O.client && !( O.blinded )))
src.weakened = 3 O.show_message(text("\red <B>[M] has lunged at [src] but missed!</B>"), 1)
for(var/mob/O in viewers(src, null)) if ("disarm")
O.show_message(text("\red <B>[] has tackled down []!</B>", M, src), 1, "\red You hear someone fall.", 2) var/damage = 5
else var/datum/organ/external/affecting = src.organs["chest"]
if (src.stunned < 3) var/t = M.zone_sel.selecting
src.stunned = 3 if ((t in list( "eyes", "mouth" )))
for(var/mob/O in viewers(src, null)) t = "head"
O.show_message(text("\red <B>[] has stunned []!</B>", M, src), 1) var/def_zone = ran_zone(t)
if(src.stat != 2) src.stat = 1 if (src.organs[def_zone])
affecting.take_damage(damage) affecting = src.organs[def_zone]
else if (src.w_uniform)
affecting.take_damage(damage) src.w_uniform.add_fingerprint(M)
var/randn = rand(1, 100)
src.UpdateDamageIcon() if (randn <= 90)
playsound(src.loc, 'pierce.ogg', 25, 1, -1)
src.updatehealth() if (src.weakened < 15)
src.weakened = rand(10, 15)
affecting.take_damage(damage)
for(var/mob/O in viewers(src, null))
if ((O.client && !( O.blinded )))
O.show_message(text("\red <B>[] has tackled down []!</B>", M, src), 1)
else
if (randn <= 99)
playsound(src.loc, 'slash.ogg', 25, 1, -1)
src.drop_item()
affecting.take_damage(damage)
for(var/mob/O in viewers(src, null))
if ((O.client && !( O.blinded )))
O.show_message(text("\red <B>[] disarmed []!</B>", M, src), 1)
else else
playsound(src.loc, 'slashmiss.ogg', 50, 1, -1) playsound(src.loc, 'slashmiss.ogg', 50, 1, -1)
for(var/mob/O in viewers(src, null)) for(var/mob/O in viewers(src, null))
O.show_message(text("\red <B>[M] has lunged at [src] but missed!</B>"), 1) if ((O.client && !( O.blinded )))
return O.show_message(text("\red <B>[] has tried to disarm []!</B>", M, src), 1)
else
//disarm
if (!( src.lying ))
if (src.w_uniform)
src.w_uniform.add_fingerprint(M)
var/randn = rand(1, 100)
if (randn <= 25)
playsound(src.loc, 'pierce.ogg', 25, 1, -1)
src.weakened = 2
for(var/mob/O in viewers(src, null))
O.show_message(text("\red <B>[] has tackled over []!</B>", M, src), 1)
else
if (randn <= 60)
playsound(src.loc, 'slash.ogg', 25, 1, -1)
src.drop_item()
for(var/mob/O in viewers(src, null))
O.show_message(text("\red <B>[] has knocked the item out of []'s hand!</B>", M, src), 1)
else
playsound(src.loc, 'slashmiss.ogg', 50, 1, -1)
for(var/mob/O in viewers(src, null))
O.show_message(text("\red <B>[] has tried to knock the item out of []'s hand!</B>", M, src), 1)
return return
/mob/living/carbon/human/attack_hand(mob/living/carbon/human/M as mob) /mob/living/carbon/human/attack_hand(mob/living/carbon/human/M as mob)

View File

@@ -283,28 +283,27 @@
M << "No attacking people at spawn, you jackass." M << "No attacking people at spawn, you jackass."
return return
if (M.a_intent == "help") switch(M.a_intent)
for(var/mob/O in viewers(src, null)) if ("help")
if ((O.client && !( O.blinded ))) for(var/mob/O in viewers(src, null))
O.show_message(text("\blue [M] caresses [src] with its scythe like arm."), 1) if ((O.client && !( O.blinded )))
else O.show_message(text("\blue [M] caresses [src] with its scythe like arm."), 1)
if (M.a_intent == "hurt")
if ((prob(95) && src.health > 0))
for(var/mob/O in viewers(src, null))
if ((O.client && !( O.blinded )))
O.show_message(text("\red <B>[] has slashed [src.name]!</B>", M), 1)
if ("hurt")
if ((prob(95) && src.health > 0))
playsound(src.loc, 'slice.ogg', 25, 1, -1) playsound(src.loc, 'slice.ogg', 25, 1, -1)
var/damage = rand(15, 30) var/damage = rand(15, 30)
if (prob(40)) if (damage >= 25)
damage = rand(20, 40) damage = rand(20, 40)
if (src.paralysis < 5) if (src.paralysis < 15)
src.paralysis = rand(10, 15) src.paralysis = rand(10, 15)
spawn( 0 ) for(var/mob/O in viewers(src, null))
for(var/mob/O in viewers(src, null)) if ((O.client && !( O.blinded )))
if ((O.client && !( O.blinded ))) O.show_message(text("\red <B>[] has wounded [src.name]!</B>", M), 1)
O.show_message(text("\red <B>[] has wounded [src.name]!</B>", M), 1) else
return for(var/mob/O in viewers(src, null))
if ((O.client && !( O.blinded )))
O.show_message(text("\red <B>[] has slashed [src.name]!</B>", M), 1)
src.bruteloss += damage src.bruteloss += damage
src.updatehealth() src.updatehealth()
else else
@@ -312,36 +311,39 @@
for(var/mob/O in viewers(src, null)) for(var/mob/O in viewers(src, null))
if ((O.client && !( O.blinded ))) if ((O.client && !( O.blinded )))
O.show_message(text("\red <B>[] has attempted to lunge at [src.name]!</B>", M), 1) O.show_message(text("\red <B>[] has attempted to lunge at [src.name]!</B>", M), 1)
else
if (M.a_intent == "grab") if ("grab")
if (M == src) if (M == src)
return return
var/obj/item/weapon/grab/G = new /obj/item/weapon/grab( M ) var/obj/item/weapon/grab/G = new /obj/item/weapon/grab( M )
G.assailant = M G.assailant = M
if (M.hand) if (M.hand)
M.l_hand = G M.l_hand = G
else
M.r_hand = G
G.layer = 20
G.affecting = src
src.grabbed_by += G
G.synch()
playsound(src.loc, 'thudswoosh.ogg', 50, 1, -1)
for(var/mob/O in viewers(src, null))
O.show_message(text("\red [] has grabbed [src.name] passively!", M), 1)
else else
if (!( src.paralysis )) M.r_hand = G
playsound(src.loc, 'pierce.ogg', 25, 1, -1) G.layer = 20
if(prob(25)) G.affecting = src
src.paralysis = 2 src.grabbed_by += G
for(var/mob/O in viewers(src, null)) G.synch()
if ((O.client && !( O.blinded ))) playsound(src.loc, 'thudswoosh.ogg', 50, 1, -1)
O.show_message(text("\red <B>[] has tackled down [src.name]!</B>", M), 1) for(var/mob/O in viewers(src, null))
else O.show_message(text("\red [] has grabbed [src.name] passively!", M), 1)
drop_item()
for(var/mob/O in viewers(src, null)) if ("disarm")
if ((O.client && !( O.blinded ))) playsound(src.loc, 'pierce.ogg', 25, 1, -1)
O.show_message(text("\red <B>[] has disarmed [src.name]!</B>", M), 1) var/damage = 5
if(prob(95))
src.weakened = 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 [src.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 [src.name]!</B>", M), 1)
src.bruteloss += damage
src.updatehealth()
return return
/mob/living/carbon/monkey/Stat() /mob/living/carbon/monkey/Stat()

View File

@@ -231,6 +231,40 @@
src.stunned = min(5, src.stunned) src.stunned = min(5, src.stunned)
return return
/mob/living/silicon/ai/attack_alien(mob/living/carbon/alien/humanoid/M as mob)
if (!ticker)
M << "You cannot attack people before the game has started."
return
if (istype(src.loc, /turf) && istype(src.loc.loc, /area/start))
M << "No attacking people at spawn, you jackass."
return
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]'s plating with its scythe like arm."), 1)
else //harm
var/damage = rand(10, 20)
if (prob(90))
playsound(src.loc, 'slash.ogg', 25, 1, -1)
for(var/mob/O in viewers(src, null))
if ((O.client && !( O.blinded )))
O.show_message(text("\red <B>[] has slashed at []!</B>", M, src), 1)
if(prob(8))
flick("noise", src.flash)
src.bruteloss += damage
src.updatehealth()
else
playsound(src.loc, 'slashmiss.ogg', 25, 1, -1)
for(var/mob/O in viewers(src, null))
if ((O.client && !( O.blinded )))
O.show_message(text("\red <B>[] took a swipe at []!</B>", M, src), 1)
return
/mob/living/silicon/ai/proc/switchCamera(var/obj/machinery/camera/C) /mob/living/silicon/ai/proc/switchCamera(var/obj/machinery/camera/C)
usr:cameraFollow = null usr:cameraFollow = null

View File

@@ -460,66 +460,79 @@
return ..() return ..()
/mob/living/silicon/robot/attack_alien(mob/living/carbon/alien/humanoid/M as mob) /mob/living/silicon/robot/attack_alien(mob/living/carbon/alien/humanoid/M as mob)
if (!ticker)
M << "You cannot attack people before the game has started."
return
if (M.a_intent == "help") if (istype(src.loc, /turf) && istype(src.loc.loc, /area/start))
for(var/mob/O in viewers(src, null)) M << "No attacking people at spawn, you jackass."
O.show_message(text("\blue [M] caresses [src]'s plating with its scythe like arm."), 1) return
else if (M.a_intent == "grab") switch(M.a_intent)
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
src.grabbed_by += G
G.synch()
playsound(src.loc, 'thudswoosh.ogg', 50, 1, -1)
for(var/mob/O in viewers(src, null))
O.show_message(text("\red [] has grabbed [] passively!", M, src), 1)
else if (M.a_intent == "hurt") if ("help")
var/damage = rand(10, 20)
if (prob(90))
/*
if (M.class == "combat")
damage += 15
if(prob(20))
src.weakened = max(src.weakened,4)
src.stunned = max(src.stunned,4)
*/
playsound(src.loc, 'slash.ogg', 25, 1, -1)
for(var/mob/O in viewers(src, null)) for(var/mob/O in viewers(src, null))
O.show_message(text("\red <B>[] has slashed at []!</B>", M, src), 1) if ((O.client && !( O.blinded )))
if(prob(8)) O.show_message(text("\blue [M] caresses [src]'s plating with its scythe like arm."), 1)
flick("noise", src.flash)
src.bruteloss += damage
src.updatehealth()
else
playsound(src.loc, 'slashmiss.ogg', 25, 1, -1)
for(var/mob/O in viewers(src, null))
O.show_message(text("\red <B>[] took a swipe at []!</B>", M, src), 1)
return
else if (M.a_intent == "disarm") if ("grab")
if(!(src.lying)) if (M == src)
var/randn = rand(1, 100) return
if (randn <= 40) var/obj/item/weapon/grab/G = new /obj/item/weapon/grab( M )
src.stunned = 5 G.assailant = M
step(src,get_dir(M,src)) if (M.hand)
spawn(5) step(src,get_dir(M,src)) M.l_hand = G
playsound(src.loc, 'slash.ogg', 50, 1, -1) else
M.r_hand = G
G.layer = 20
G.affecting = src
src.grabbed_by += G
G.synch()
playsound(src.loc, 'thudswoosh.ogg', 50, 1, -1)
for(var/mob/O in viewers(src, null))
if ((O.client && !( O.blinded )))
O.show_message(text("\red [] has grabbed [] passively!", M, src), 1)
if ("hurt")
var/damage = rand(10, 20)
if (prob(90))
/*
if (M.class == "combat")
damage += 15
if(prob(20))
src.weakened = max(src.weakened,4)
src.stunned = max(src.stunned,4)
What is this?*/
playsound(src.loc, 'slash.ogg', 25, 1, -1)
for(var/mob/O in viewers(src, null)) for(var/mob/O in viewers(src, null))
O.show_message(text("\red <B>[] has pushed back []!</B>", M, src), 1) O.show_message(text("\red <B>[] has slashed at []!</B>", M, src), 1)
if(prob(8))
flick("noise", src.flash)
src.bruteloss += damage
src.updatehealth()
else else
playsound(src.loc, 'slashmiss.ogg', 25, 1, -1) playsound(src.loc, 'slashmiss.ogg', 25, 1, -1)
for(var/mob/O in viewers(src, null)) for(var/mob/O in viewers(src, null))
O.show_message(text("\red <B>[] attempted to push back []!</B>", M, src), 1) if ((O.client && !( O.blinded )))
O.show_message(text("\red <B>[] took a swipe at []!</B>", M, src), 1)
if ("disarm")
if(!(src.lying))
var/randn = rand(1, 100)
if (randn <= 85)
src.stunned = 5
step(src,get_dir(M,src))
spawn(5) step(src,get_dir(M,src))
playsound(src.loc, 'pierce.ogg', 50, 1, -1)
for(var/mob/O in viewers(src, null))
if ((O.client && !( O.blinded )))
O.show_message(text("\red <B>[] has forced back []!</B>", M, src), 1)
else
playsound(src.loc, 'slashmiss.ogg', 25, 1, -1)
for(var/mob/O in viewers(src, null))
if ((O.client && !( O.blinded )))
O.show_message(text("\red <B>[] attempted to force back []!</B>", M, src), 1)
return return
/mob/living/silicon/robot/attack_hand(mob/user) /mob/living/silicon/robot/attack_hand(mob/user)

View File

@@ -240,7 +240,6 @@
if (src.client) if (src.client)
src.client.mob = O src.client.mob = O
O.loc = src.loc O.loc = src.loc
O.a_intent = "hurt"
O << "<B>You are now an alien.</B>" O << "<B>You are now an alien.</B>"
del(src) del(src)
return return

Binary file not shown.

Before

Width:  |  Height:  |  Size: 131 KiB

After

Width:  |  Height:  |  Size: 130 KiB