mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-08-30 08:37:43 +01:00
-Added attack cooldown for space vines and simple animals
-Reduced some duplicate code in constructs.dm
This commit is contained in:
@@ -248,6 +248,7 @@
|
||||
|
||||
/obj/effect/spacevine/attackby(obj/item/weapon/W as obj, mob/user as mob)
|
||||
if (!W || !user || !W.type) return
|
||||
user.changeNext_move(8)
|
||||
|
||||
var/override = 0
|
||||
|
||||
|
||||
@@ -103,20 +103,6 @@
|
||||
var/damage = rand(M.melee_damage_lower, M.melee_damage_upper)
|
||||
adjustBruteLoss(damage)
|
||||
|
||||
/mob/living/simple_animal/construct/attackby(var/obj/item/O as obj, var/mob/user as mob)
|
||||
if(O.force)
|
||||
var/damage = O.force
|
||||
if(O.damtype == BURN || O.damtype == BRUTE)
|
||||
adjustBruteLoss(damage)
|
||||
for(var/mob/M in viewers(src, null))
|
||||
if ((M.client && !( M.blinded )))
|
||||
M.show_message("<span class='danger'>[src] has been attacked with [O] by [user]!</span>")
|
||||
else
|
||||
usr << "\red This weapon is ineffective, it does no damage."
|
||||
for(var/mob/M in viewers(src, null))
|
||||
if ((M.client && !( M.blinded )))
|
||||
M.show_message("\red [user] gently taps [src] with [O]. ")
|
||||
|
||||
/mob/living/simple_animal/construct/bullet_act(var/obj/item/projectile/Proj)
|
||||
if(!Proj)
|
||||
return
|
||||
@@ -149,26 +135,9 @@
|
||||
environment_smash = 2
|
||||
attack_sound = 'sound/weapons/punch3.ogg'
|
||||
status_flags = 0
|
||||
force_threshold = 11
|
||||
construct_spells = list(/obj/effect/proc_holder/spell/aoe_turf/conjure/lesserforcewall)
|
||||
|
||||
/mob/living/simple_animal/construct/armoured/attackby(var/obj/item/O as obj, var/mob/user as mob)
|
||||
if(O.force)
|
||||
if(O.force >= 11)
|
||||
if(O.damtype == BURN || O.damtype == BRUTE)
|
||||
adjustBruteLoss(O.force)
|
||||
for(var/mob/M in viewers(src, null))
|
||||
if ((M.client && !( M.blinded )))
|
||||
M.show_message("<span class='danger'>[src] has been attacked with [O] by [user]!</span>")
|
||||
else
|
||||
for(var/mob/M in viewers(src, null))
|
||||
if ((M.client && !( M.blinded )))
|
||||
M.show_message("\red \b [O] bounces harmlessly off of [src]. ")
|
||||
else
|
||||
usr << "\red This weapon is ineffective, it does no damage."
|
||||
for(var/mob/M in viewers(src, null))
|
||||
if ((M.client && !( M.blinded )))
|
||||
M.show_message("\red [user] gently taps [src] with [O]. ")
|
||||
|
||||
|
||||
/mob/living/simple_animal/construct/armoured/bullet_act(var/obj/item/projectile/P)
|
||||
if(istype(P, /obj/item/projectile/energy) || istype(P, /obj/item/projectile/beam))
|
||||
@@ -271,30 +240,10 @@
|
||||
speed = 5
|
||||
environment_smash = 2
|
||||
attack_sound = 'sound/weapons/punch4.ogg'
|
||||
force_threshold = 11
|
||||
var/energy = 0
|
||||
var/max_energy = 1000
|
||||
|
||||
/mob/living/simple_animal/construct/behemoth/attackby(var/obj/item/O as obj, var/mob/user as mob)
|
||||
if(O.force)
|
||||
if(O.force >= 11)
|
||||
var/damage = O.force
|
||||
if (O.damtype == STAMINA)
|
||||
damage = 0
|
||||
adjustBruteLoss(damage)
|
||||
for(var/mob/M in viewers(src, null))
|
||||
if ((M.client && !( M.blinded )))
|
||||
M.show_message("<span class='danger'>[src] has been attacked with [O] by [user]!</span>")
|
||||
else
|
||||
for(var/mob/M in viewers(src, null))
|
||||
if ((M.client && !( M.blinded )))
|
||||
M.show_message("\red \b [O] bounces harmlessly off of [src]. ")
|
||||
else
|
||||
usr << "\red This weapon is ineffective, it does no damage."
|
||||
for(var/mob/M in viewers(src, null))
|
||||
if ((M.client && !( M.blinded )))
|
||||
M.show_message("\red [user] gently taps [src] with [O]. ")
|
||||
|
||||
|
||||
|
||||
////////////////Powers//////////////////
|
||||
|
||||
|
||||
@@ -28,33 +28,21 @@
|
||||
status_flags = CANPUSH
|
||||
|
||||
|
||||
Life()
|
||||
..()
|
||||
if(stat == 2)
|
||||
new /obj/item/weapon/ectoplasm (src.loc)
|
||||
for(var/mob/M in viewers(src, null))
|
||||
if((M.client && !( M.blinded )))
|
||||
M.show_message("\red [src] lets out a contented sigh as their form unwinds. ")
|
||||
ghostize()
|
||||
qdel(src)
|
||||
return
|
||||
|
||||
|
||||
attackby(var/obj/item/O as obj, var/mob/user as mob) //Marker -Agouri
|
||||
if(istype(O, /obj/item/device/soulstone))
|
||||
O.transfer_soul("SHADE", src, user)
|
||||
else
|
||||
if(O.force)
|
||||
var/damage = O.force
|
||||
if (O.damtype == STAMINA)
|
||||
damage = 0
|
||||
health -= damage
|
||||
for(var/mob/M in viewers(src, null))
|
||||
if ((M.client && !( M.blinded )))
|
||||
M.show_message("<span class='danger'>[src] has been attacked with [O] by [user]!</span>")
|
||||
else
|
||||
usr << "\red This weapon is ineffective, it does no damage."
|
||||
for(var/mob/M in viewers(src, null))
|
||||
if ((M.client && !( M.blinded )))
|
||||
M.show_message("\red [user] gently taps [src] with [O]. ")
|
||||
/mob/living/simple_animal/shade/Life()
|
||||
..()
|
||||
if(stat == 2)
|
||||
new /obj/item/weapon/ectoplasm (src.loc)
|
||||
for(var/mob/M in viewers(src, null))
|
||||
if((M.client && !( M.blinded )))
|
||||
M.show_message("\red [src] lets out a contented sigh as their form unwinds. ")
|
||||
ghostize()
|
||||
qdel(src)
|
||||
return
|
||||
|
||||
|
||||
/mob/living/simple_animal/shade/attackby(var/obj/item/O as obj, var/mob/user as mob) //Marker -Agouri
|
||||
if(istype(O, /obj/item/device/soulstone))
|
||||
O.transfer_soul("SHADE", src, user)
|
||||
else
|
||||
..()
|
||||
return
|
||||
|
||||
@@ -30,6 +30,7 @@
|
||||
var/response_disarm = "shoves"
|
||||
var/response_harm = "hits"
|
||||
var/harm_intent_damage = 3
|
||||
var/force_threshold = 0 //Minimum force required to deal any damage
|
||||
|
||||
//Temperature effect
|
||||
var/minbodytemp = 250
|
||||
@@ -407,14 +408,22 @@
|
||||
if(istype(O, /obj/item/weapon/kitchenknife) || istype(O, /obj/item/weapon/butch))
|
||||
harvest()
|
||||
else
|
||||
user.changeNext_move(8)
|
||||
if(O.force)
|
||||
var/damage = O.force
|
||||
if (O.damtype == STAMINA)
|
||||
damage = 0
|
||||
adjustBruteLoss(damage)
|
||||
for(var/mob/M in viewers(src, null))
|
||||
if ((M.client && !( M.blinded )))
|
||||
M.show_message("<span class='danger'>"+"[src] has been attacked with [O] by [user]!</span>")
|
||||
if(O.force >= force_threshold)
|
||||
var/damage = O.force
|
||||
if (O.damtype == STAMINA)
|
||||
damage = 0
|
||||
adjustBruteLoss(damage)
|
||||
visible_message("<span class='danger'>[src] has been attacked with [O] by [user]!</span>",\
|
||||
"<span class='userdanger'>[src] has been attacked with [O] by [user]!</span>")
|
||||
else
|
||||
visible_message("<span class='danger'>[O] bounces harmlessly off of [src].</span>",\
|
||||
"<span class='userdanger'>[O] bounces harmlessly off of [src].</span>")
|
||||
else
|
||||
user << "\red This weapon is ineffective, it does no damage."
|
||||
user.visible_message("<span class='warning'>[user] gently taps [src] with [O].</span>",\
|
||||
"<span class='warning'>This weapon is ineffective, it does no damage..</span>")
|
||||
|
||||
/mob/living/simple_animal/movement_delay()
|
||||
var/tally = 0 //Incase I need to add stuff other than "speed" later
|
||||
|
||||
Reference in New Issue
Block a user