Merge pull request #1063 from SkyMarshal/CoolTweaks

Table smashing is now more interesting.
This commit is contained in:
SkyMarshal
2012-05-14 21:27:02 -07:00
4 changed files with 84 additions and 17 deletions
+1
View File
@@ -813,6 +813,7 @@
density = 1
anchored = 1.0
layer = 2.8
var/dented = 0
New()
..()
@@ -355,14 +355,61 @@
if(ishuman(G.affecting))
var/mob/living/carbon/human/H = G.affecting
var/datum/organ/external/affecting = H.get_organ("head")
affecting.take_damage(4, 0)
H.UpdateDamageIcon()
H.updatehealth()
playsound(src.loc, 'punch1.ogg', 50, 1, -3)
src.add_blood(G.affecting)
for(var/mob/O in viewers(world.view, src))
if (O.client)
O << text("\red [] smashes []'s head on the table!", G.assailant, G.affecting)
//Fucking hacky, but whatever.
var/obj/machinery/computer/HolodeckControl/HC = locate() in world
if(istype(HC) && HC.safety) //If the computer exists, and the safety is active...
if(prob(25))
add_blood(G.affecting)
H.halloss += rand(10, 15)
G.assailant.visible_message("\red \The [G.assailant] smashes \the [H]'s head on \the [src] with enough force to engage \the [src]'s safeties!",\
"\red You smash \the [H]\s head on \the [src] with enough force to engage \the [src]'s safeties!",\
"\red You hear a whine as \the [src]'s engage.")
else
H.halloss += rand(5, 10)
G.assailant.visible_message("\red \The [G.assailant] smashes \the [H]'s head on \the [src]!",\
"\red You smash \the [H]\s head on \the [src]!",\
"\red You hear a whine as \the [src]'s is hit by something dense.")
H.UpdateDamageIcon()
H.updatehealth()
playsound(src.loc, 'punch1.ogg', 50, 1, -3)
else //Lets do REAL DAMAGE, YEAH!
G.affecting.attack_log += text("\[[time_stamp()]\] <font color='orange'>Has been smashed on a table by [G.assailant.name] ([G.assailant.ckey])</font>")
G.assailant.attack_log += text("\[[time_stamp()]\] <font color='red'>Smashed [G.affecting.name] ([G.affecting.ckey]) on a table.</font>")
log_admin("ATTACK: [G.assailant] ([G.assailant.ckey]) smashed [G.affecting] ([G.affecting.ckey]) on a table.")
message_admins("ATTACK: [G.assailant] ([G.assailant.ckey]) smashed [G.affecting] ([G.affecting.ckey]) on a table.")
log_attack("<font color='red'>[G.assailant] ([G.assailant.ckey]) smashed [G.affecting] ([G.affecting.ckey]) on a table.</font>")
if(prob(25))
add_blood(G.affecting)
affecting.take_damage(rand(10,15), 0)
H.Weaken(2)
if(prob(20)) // One chance in 20 to DENT THE TABLE
affecting.take_damage(rand(0,5), 0) //Extra damage
if(dented)
G.assailant.visible_message("\red \The [G.assailant] smashes \the [H]'s head on \the [src] with enough force to further deform \the [src]!\nYou wish you could unhear that sound.",\
"\red You smash \the [H]\s head on \the [src] with enough force to leave another dent!\n[prob(50)?"That was a satisfying noise." : "That sound will haunt your nightmares"]",\
"\red You hear the nauseating crunch of bone and gristle on solid metal and the squeal of said metal deforming.")
else
dented = 1
G.assailant.visible_message("\red \The [G.assailant] smashes \the [H]'s head on \the [src] so hard it left a dent!\nYou wish you could unhear that sound.",\
"\red You smash \the [H]\s head on \the [src] with enough force to leave a dent!\n[prob(5)?"That was a satisfying noise." : "That sound will haunt your nightmares"]",\
"\red You hear the nauseating crunch of bone and gristle on solid metal and the squeal of said metal deforming.")
else if(prob(50))
G.assailant.visible_message("\red [G.assailant] smashes \the [G.assailant]\s head on \the [src], [H.gender == MALE? "his" : "her"] bone and cartilage making a loud crunch!",\
"\red You smash \the [H]\s head on \the [src], [H.gender == MALE? "his" : "her"] bone and cartilage making a loud crunch!",\
"\red You hear the nauseating crunch of bone and gristle on solid metal, the noise echoing through the room.")
else
G.assailant.visible_message("\red [G.assailant] smashes \the [G.assailant]\s head on \the [src], [H.gender == MALE? "his" : "her"] nose smashed and face bloodied!",\
"\red You smash \the [H]\s head on \the [src], [H.gender == MALE? "his" : "her"] nose smashed and face bloodied!",\
"\red You hear the nauseating crunch of bone and gristle on solid metal and the gurgling gasp of someone who is trying to breathe through their own blood.")
else
affecting.take_damage(rand(5,10), 0)
G.assailant.visible_message("\red [G.assailant] smashes \the [H]\s head on \the [src]!",\
"\red You smash \the [H]\s head on \the [src]!",\
"\red You hear the nauseating crunch of bone and gristle on solid metal.")
H.UpdateDamageIcon()
H.updatehealth()
playsound(src.loc, 'punch1.ogg', 50, 1, -3)
return
G.affecting.loc = src.loc
G.affecting.Weaken(5)
-4
View File
@@ -677,10 +677,6 @@ var/list/obj/machinery/newscaster/allCasters = list() //list that will contain r
var/scribble=""
var/scribble_page = null
/*obj/item/weapon/newspaper/attack_hand(mob/user as mob)
..()
world << "derp"*/
obj/item/weapon/newspaper/attack_self(mob/user as mob)
if(ishuman(user))
var/mob/living/carbon/human/human_user = user
+28 -5
View File
@@ -159,14 +159,37 @@ TABLE AND RACK OBJECT INTERATIONS
var/mob/living/carbon/human/H = G.affecting
var/datum/organ/external/affecting = H.get_organ("head")
affecting.take_damage(4, 0)
if(prob(25))
add_blood(G.affecting)
affecting.take_damage(rand(10,15), 0)
H.Weaken(2)
if(prob(20)) // One chance in 20 to DENT THE TABLE
affecting.take_damage(rand(0,5), 0) //Extra damage
if(dented)
G.assailant.visible_message("\red \The [G.assailant] smashes \the [H]'s head on \the [src] with enough force to further deform \the [src]!\nYou wish you could unhear that sound.",\
"\red You smash \the [H]\s head on \the [src] with enough force to leave another dent!\n[prob(50)?"That was a satisfying noise." : "That sound will haunt your nightmares"]",\
"\red You hear the nauseating crunch of bone and gristle on solid metal and the squeal of said metal deforming.")
else
dented = 1
G.assailant.visible_message("\red \The [G.assailant] smashes \the [H]'s head on \the [src] so hard it left a dent!\nYou wish you could unhear that sound.",\
"\red You smash \the [H]\s head on \the [src] with enough force to leave a dent!\n[prob(5)?"That was a satisfying noise." : "That sound will haunt your nightmares"]",\
"\red You hear the nauseating crunch of bone and gristle on solid metal and the squeal of said metal deforming.")
else if(prob(50))
G.assailant.visible_message("\red [G.assailant] smashes \the [G.assailant]\s head on \the [src], [H.gender == MALE? "his" : "her"] bone and cartilage making a loud crunch!",\
"\red You smash \the [H]\s head on \the [src], [H.gender == MALE? "his" : "her"] bone and cartilage making a loud crunch!",\
"\red You hear the nauseating crunch of bone and gristle on solid metal, the noise echoing through the room.")
else
G.assailant.visible_message("\red [G.assailant] smashes \the [G.assailant]\s head on \the [src], [H.gender == MALE? "his" : "her"] nose smashed and face bloodied!",\
"\red You smash \the [H]\s head on \the [src], [H.gender == MALE? "his" : "her"] nose smashed and face bloodied!",\
"\red You hear the nauseating crunch of bone and gristle on solid metal and the gurgling gasp of someone who is trying to breathe through their own blood.")
else
affecting.take_damage(rand(5,10), 0)
G.assailant.visible_message("\red [G.assailant] smashes \the [H]\s head on \the [src]!",\
"\red You smash \the [H]\s head on \the [src]!",\
"\red You hear the nauseating crunch of bone and gristle on solid metal.")
H.UpdateDamageIcon()
H.updatehealth()
playsound(src.loc, 'punch1.ogg', 50, 1, -3)
src.add_blood(G.affecting)
for(var/mob/O in viewers(world.view, src))
if (O.client)
O << text("\red [] smashes []'s head on the table!", G.assailant, G.affecting)
return
G.affecting.loc = src.loc
G.affecting.Weaken(5)