mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-08-22 11:37:40 +01:00
fix incorrect match path
can butcher with any sharp item on harm intent simple_animal/attacked_by() moved var/foldable to box level some fixes with attack code updated slime code, can now mousedrop as a slime to feed on mobs adds sound to simple_animal/attackby
This commit is contained in:
@@ -219,15 +219,12 @@ emp_act
|
||||
if(I.attack_verb && I.attack_verb.len)
|
||||
visible_message("<span class='combat danger'>[src] has been [pick(I.attack_verb)] in the [hit_area] with [I] by [user]!</span>",
|
||||
"<span class='combat userdanger'>[src] has been [pick(I.attack_verb)] in the [hit_area] with [I] by [user]!</span>"))
|
||||
else if(I.force == 0)
|
||||
visible_message("<span class='combat danger'>[src] has been [pick("tapped","patted")] on the [hit_area] with [I] by [user]!</span>", \
|
||||
"<span class='combat userdanger'>[src] has been [pick("tapped","patted")] on the [hit_area] with [I] by [user]!</span>")
|
||||
else
|
||||
else if(I.force)
|
||||
visible_message("<span class='combat danger'>[src] has been attacked in the [hit_area] with [I] by [user]!</span>",
|
||||
"<span class='combat userdanger'>[src] has been attacked in the [hit_area] with [I] by [user]!</span>"))
|
||||
else
|
||||
return 0
|
||||
|
||||
if(!I.force)
|
||||
return 0
|
||||
var/armor = run_armor_check(affecting, "melee", "<span class='warning'>Your armour has protected your [hit_area].</span>", "<span class='warning'>Your armour has softened hit to your [hit_area].</span>", armour_penetration = I.armour_penetration)
|
||||
var/weapon_sharp = is_sharp(I)
|
||||
if(weapon_sharp && prob(getarmor(user.zone_sel.selecting, "melee")))
|
||||
|
||||
@@ -193,6 +193,12 @@
|
||||
updatehealth()
|
||||
return
|
||||
|
||||
/mob/living/carbon/slime/MouseDrop(atom/movable/A)
|
||||
if(isliving(A) && A != usr)
|
||||
var/mob/living/Food = A
|
||||
if(Food.Adjacent(usr) && !stat && Food.stat != DEAD) //messy
|
||||
Feedon(Food)
|
||||
..()
|
||||
|
||||
/mob/living/carbon/slime/unEquip(obj/item/W as obj)
|
||||
return
|
||||
@@ -200,28 +206,25 @@
|
||||
/mob/living/carbon/slime/attack_ui(slot)
|
||||
return
|
||||
|
||||
/mob/living/carbon/slime/attack_slime(mob/living/carbon/slime/M as mob)
|
||||
/mob/living/carbon/slime/attack_slime(mob/living/carbon/slime/M)
|
||||
if(!ticker)
|
||||
to_chat(M, "You cannot attack people before the game has started.")
|
||||
return
|
||||
|
||||
if(Victim) return // can't attack while eating!
|
||||
if(Victim)
|
||||
return // can't attack while eating!
|
||||
|
||||
M.do_attack_animation(src)
|
||||
visible_message("<span class='danger'> The [M.name] has glomped [src]!</span>", \
|
||||
"<span class='userdanger'> The [M.name] has glomped [src]!</span>")
|
||||
var/damage = rand(1, 3)
|
||||
attacked += 5
|
||||
if(M.is_adult)
|
||||
damage = rand(1, 6)
|
||||
else
|
||||
damage = rand(1, 3)
|
||||
if(health > -100)
|
||||
|
||||
M.do_attack_animation(src)
|
||||
visible_message("<span class='danger'> The [M.name] has glomped [src]!</span>", \
|
||||
"<span class='userdanger'> The [M.name] has glomped [src]!</span>")
|
||||
var/damage = rand(1, 3)
|
||||
attacked += 5
|
||||
|
||||
if(M.is_adult)
|
||||
damage = rand(1, 6)
|
||||
else
|
||||
damage = rand(1, 3)
|
||||
|
||||
adjustBruteLoss(damage)
|
||||
|
||||
updatehealth()
|
||||
return
|
||||
|
||||
@@ -327,20 +330,6 @@
|
||||
if(S.next_step(M, src))
|
||||
return 1
|
||||
|
||||
/*
|
||||
if(M.gloves && istype(M.gloves,/obj/item/clothing/gloves))
|
||||
var/obj/item/clothing/gloves/G = M.gloves
|
||||
if(G.cell)
|
||||
if(M.a_intent == "hurt")//Stungloves. Any contact will stun the alien.
|
||||
if(G.cell.charge >= 2500)
|
||||
G.cell.use(2500)
|
||||
visible_message("<span class='warning'>[src] has been touched with the stun gloves by [M]!</span>")
|
||||
return
|
||||
else
|
||||
to_chat(M, "<span class='warning'>Not enough charge! </span>")
|
||||
return
|
||||
*/
|
||||
|
||||
switch(M.a_intent)
|
||||
|
||||
if(INTENT_HELP)
|
||||
@@ -373,9 +362,9 @@
|
||||
playsound(loc, "punch", 25, 1, -1)
|
||||
visible_message("<span class='danger'>[M] has punched [src]!</span>", \
|
||||
"<span class='userdanger'>[M] has punched [src]!</span>")
|
||||
|
||||
adjustBruteLoss(damage)
|
||||
updatehealth()
|
||||
if(health > -100)
|
||||
adjustBruteLoss(damage)
|
||||
updatehealth()
|
||||
else
|
||||
playsound(loc, 'sound/weapons/punchmiss.ogg', 25, 1, -1)
|
||||
visible_message("<span class='danger'>[M] has attempted to punch [src]!</span>")
|
||||
@@ -404,13 +393,14 @@
|
||||
var/damage = rand(15, 30)
|
||||
if(damage >= 25)
|
||||
damage = rand(20, 40)
|
||||
visible_message("<span class='danger'>[M] has attacked [name]!</span>", \
|
||||
"<span class='userdanger'>[M] has attacked [name]!</span>")
|
||||
visible_message("<span class='danger'>[M] has slashed [name]!</span>", \
|
||||
"<span class='userdanger'>[M] has slashed [name]!</span>")
|
||||
else
|
||||
visible_message("<span class='danger'>[M] has wounded [name]!</span>", \
|
||||
"<span class='userdanger'>)[M] has wounded [name]!</span>")
|
||||
adjustBruteLoss(damage)
|
||||
updatehealth()
|
||||
if(health > -100)
|
||||
adjustBruteLoss(damage)
|
||||
updatehealth()
|
||||
else
|
||||
playsound(loc, 'sound/weapons/slashmiss.ogg', 25, 1, -1)
|
||||
visible_message("<span class='danger'>[M] has attempted to lunge at [name]!</span>", \
|
||||
|
||||
@@ -983,11 +983,12 @@
|
||||
return 0
|
||||
|
||||
/mob/living/proc/attempt_harvest(obj/item/I, mob/user)
|
||||
if(stat == DEAD && !isnull(butcher_results)) //can we butcher it?
|
||||
if(istype(I, /obj/item/weapon/kitchen/knife))
|
||||
if(user.a_intent == INTENT_HARM && stat == DEAD && butcher_results) //can we butcher it?
|
||||
var/sharpness = is_sharp(I)
|
||||
if(sharpness)
|
||||
to_chat(user, "<span class='notice'>You begin to butcher [src]...</span>")
|
||||
playsound(loc, 'sound/weapons/slice.ogg', 50, 1, -1)
|
||||
if(do_mob(user, src, 80))
|
||||
if(do_mob(user, src, 80/sharpness) && Adjacent(I))
|
||||
harvest(user)
|
||||
return 1
|
||||
|
||||
|
||||
@@ -0,0 +1,13 @@
|
||||
/mob/living/silicon/apply_damage(damage = 0,damagetype = BRUTE, def_zone = null, blocked = FALSE)
|
||||
blocked = (100-blocked)/100
|
||||
if(!damage || (blocked <= 0))
|
||||
return 0
|
||||
switch(damagetype)
|
||||
if(BRUTE)
|
||||
adjustBruteLoss(damage * blocked)
|
||||
if(BURN)
|
||||
adjustFireLoss(damage * blocked)
|
||||
else
|
||||
return 1
|
||||
updatehealth()
|
||||
return 1
|
||||
@@ -276,9 +276,6 @@
|
||||
var/damage = rand(M.melee_damage_lower, M.melee_damage_upper)
|
||||
attack_threshold_check(damage,M.melee_damage_type)
|
||||
|
||||
/mob/living/simple_animal/proc/attacked_by(obj/item/I, mob/living/user) // Handled in _onclick/click.dm
|
||||
return
|
||||
|
||||
/mob/living/simple_animal/bullet_act(var/obj/item/projectile/Proj)
|
||||
if(!Proj)
|
||||
return
|
||||
@@ -422,6 +419,7 @@
|
||||
else
|
||||
visible_message("<span class='danger'>[O] bounces harmlessly off of [src].</span>",\
|
||||
"<span class='userdanger'>[O] bounces harmlessly off of [src].</span>")
|
||||
playsound(loc, O.hitsound, 50, 1, -1)
|
||||
else
|
||||
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>")
|
||||
|
||||
Reference in New Issue
Block a user