wall refactor

This commit is contained in:
Fox-McCloud
2015-11-04 19:41:00 -05:00
parent b3f41720f5
commit e2772fb45b
2 changed files with 14 additions and 32 deletions
+13 -8
View File
@@ -259,22 +259,27 @@
/turf/simulated/wall/attack_hand(mob/user as mob)
user.changeNext_move(CLICK_CD_MELEE)
if (HULK in user.mutations)
if (prob(40) || rotting)
user << text("\blue You smash through the wall.")
if (prob(hardness) || rotting)
playsound(src, 'sound/effects/meteorimpact.ogg', 100, 1)
user << text("<span class='notice'>You smash through the wall.</span>")
user.say(pick(";RAAAAAAAARGH!", ";HNNNNNNNNNGGGGGGH!", ";GWAAAAAAAARRRHHH!", "NNNNNNNNGGGGGGGGHH!", ";AAAAAAARRRGH!" ))
dismantle_wall(1)
return
else
usr << text("\blue You punch the wall.")
take_damage(rand(25, 75))
playsound(src, 'sound/effects/bang.ogg', 50, 1)
user << text("<span class='notice'>You punch the wall.</span>")
return
if(rotting)
user << "\blue The wall crumbles under your touch."
dismantle_wall()
return
if(hardness <= 10)
user << "<span class='notice'>This wall feels rather unstable.</span>"
return
else
user << "<span class='notice'>The wall crumbles under your touch.</span>"
dismantle_wall()
return
user << "\blue You push the wall but nothing happens!"
user << "<span class='notice'>You push the wall but nothing happens!</span>"
playsound(src, 'sound/weapons/Genhit.ogg', 25, 1)
src.add_fingerprint(user)
..()
+1 -24
View File
@@ -7,34 +7,11 @@
explosion_block = 2
damage_cap = 200
max_temperature = 6000
hardness = 10
walltype = "rwall"
var/d_state = 0
/turf/simulated/wall/r_wall/attack_hand(mob/user as mob)
user.changeNext_move(CLICK_CD_MELEE)
if (HULK in user.mutations)
if (prob(10) || rotting)
usr << text("\blue You smash through the wall.")
usr.say(pick(";RAAAAAAAARGH!", ";HNNNNNNNNNGGGGGGH!", ";GWAAAAAAAARRRHHH!", "NNNNNNNNGGGGGGGGHH!", ";AAAAAAARRRGH!" ))
dismantle_wall(1)
return
else
usr << text("\blue You punch the wall.")
return
if(rotting)
user << "\blue This wall feels rather unstable."
return
user << "\blue You push the wall but nothing happens!"
playsound(src, 'sound/weapons/Genhit.ogg', 25, 1)
src.add_fingerprint(user)
..()
return
/turf/simulated/wall/r_wall/attackby(obj/item/W as obj, mob/user as mob, params)
user.changeNext_move(CLICK_CD_MELEE)
if (!user.IsAdvancedToolUser())