mirror of
https://github.com/PolarisSS13/Polaris.git
synced 2025-12-25 17:42:26 +00:00
Merge pull request #7015 from Zuhayr/attackverbremoval
Attack proc removal/refactor.
This commit is contained in:
@@ -8,14 +8,11 @@
|
||||
w_class = 2
|
||||
gas_transfer_coefficient = 0.90
|
||||
|
||||
//Monkeys can not take the muzzle off of themself! Call PETA!
|
||||
/obj/item/clothing/mask/muzzle/attack_paw(mob/user as mob)
|
||||
if (src == user.wear_mask)
|
||||
return
|
||||
else
|
||||
..()
|
||||
return
|
||||
|
||||
// Clumsy folks can't take the mask off themselves.
|
||||
/obj/item/clothing/mask/muzzle/attack_hand(mob/user as mob)
|
||||
if(user.wear_mask == src && !user.IsAdvancedToolUser())
|
||||
return 0
|
||||
..()
|
||||
|
||||
/obj/item/clothing/mask/surgical
|
||||
name = "sterile mask"
|
||||
|
||||
@@ -58,9 +58,6 @@
|
||||
if(world.time > last_action + action_time)
|
||||
finished_task()
|
||||
|
||||
/obj/machinery/botany/attack_paw(mob/user as mob)
|
||||
return attack_hand(user)
|
||||
|
||||
/obj/machinery/botany/attack_ai(mob/user as mob)
|
||||
return attack_hand(user)
|
||||
|
||||
|
||||
@@ -73,10 +73,6 @@
|
||||
|
||||
manual_unbuckle(user)
|
||||
|
||||
|
||||
/obj/effect/plantsegment/attack_paw(mob/user as mob)
|
||||
manual_unbuckle(user)
|
||||
|
||||
/obj/effect/plantsegment/proc/unbuckle()
|
||||
if(buckled_mob)
|
||||
if(buckled_mob.buckled == src) //this is probably unneccesary, but it doesn't hurt
|
||||
|
||||
@@ -5,12 +5,6 @@
|
||||
icon = 'icons/mob/alien.dmi'
|
||||
icon_state = "alien"
|
||||
pass_flags = PASSTABLE
|
||||
melee_damage_lower = 1
|
||||
melee_damage_upper = 3
|
||||
attacktext = "bites"
|
||||
attack_sound = null
|
||||
friendly = "nuzzles"
|
||||
wall_smash = 0
|
||||
health = 100
|
||||
maxHealth = 100
|
||||
|
||||
|
||||
@@ -14,128 +14,14 @@
|
||||
updatehealth()
|
||||
return
|
||||
|
||||
/mob/living/carbon/alien/attack_animal(mob/living/M as mob)
|
||||
/mob/living/carbon/alien/attack_hand(mob/living/carbon/M as mob)
|
||||
|
||||
if(istype(M,/mob/living/simple_animal))
|
||||
var/mob/living/simple_animal/S = M
|
||||
if(S.melee_damage_upper == 0)
|
||||
S.emote("[S.friendly] [src]")
|
||||
else
|
||||
for(var/mob/O in viewers(src, null))
|
||||
O.show_message("\red <B>[S]</B> [S.attacktext] [src]!", 1)
|
||||
var/damage = rand(S.melee_damage_lower, S.melee_damage_upper)
|
||||
adjustBruteLoss(damage)
|
||||
S.attack_log += text("\[[time_stamp()]\] <font color='red'>attacked [src.name] ([src.ckey])</font>")
|
||||
src.attack_log += text("\[[time_stamp()]\] <font color='orange'>was attacked by [S.name] ([S.ckey])</font>")
|
||||
updatehealth()
|
||||
|
||||
/mob/living/carbon/alien/attack_paw(mob/living/carbon/monkey/M as mob)
|
||||
if(!(istype(M, /mob/living/carbon/monkey))) return//Fix for aliens receiving double messages when attacking other aliens.
|
||||
|
||||
if (!ticker)
|
||||
M << "You cannot attack people before the game has started."
|
||||
return
|
||||
|
||||
if (istype(loc, /turf) && istype(loc.loc, /area/start))
|
||||
M << "No attacking people at spawn, you jackass."
|
||||
return
|
||||
..()
|
||||
|
||||
switch(M.a_intent)
|
||||
|
||||
if ("help")
|
||||
help_shake_act(M)
|
||||
else
|
||||
if (istype(wear_mask, /obj/item/clothing/mask/muzzle))
|
||||
return
|
||||
if (health > 0)
|
||||
playsound(loc, 'sound/weapons/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)
|
||||
adjustBruteLoss(rand(1, 3))
|
||||
updatehealth()
|
||||
return
|
||||
|
||||
|
||||
/mob/living/carbon/alien/attack_slime(mob/living/carbon/slime/M as mob)
|
||||
if (!ticker)
|
||||
M << "You cannot attack people before the game has started."
|
||||
return
|
||||
|
||||
if(M.Victim) return // can't attack while eating!
|
||||
|
||||
if (health > -100)
|
||||
|
||||
for(var/mob/O in viewers(src, null))
|
||||
if ((O.client && !( O.blinded )))
|
||||
O.show_message(text("\red <B>The [M.name] glomps []!</B>", src), 1)
|
||||
|
||||
var/damage = rand(1, 3)
|
||||
|
||||
if(M.is_adult)
|
||||
damage = rand(20, 40)
|
||||
else
|
||||
damage = rand(5, 35)
|
||||
|
||||
adjustBruteLoss(damage)
|
||||
|
||||
|
||||
updatehealth()
|
||||
|
||||
return
|
||||
|
||||
/mob/living/carbon/alien/attack_hand(mob/living/carbon/human/M as mob)
|
||||
if (!ticker)
|
||||
M << "You cannot attack people before the game has started."
|
||||
return
|
||||
|
||||
if (istype(loc, /turf) && istype(loc.loc, /area/start))
|
||||
M << "No attacking people at spawn, you jackass."
|
||||
return
|
||||
|
||||
..()
|
||||
|
||||
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)
|
||||
|
||||
Weaken(5)
|
||||
if (stuttering < 5)
|
||||
stuttering = 5
|
||||
Stun(5)
|
||||
|
||||
for(var/mob/O in viewers(src, null))
|
||||
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)
|
||||
return
|
||||
else
|
||||
M << "\red Not enough charge! "
|
||||
return
|
||||
|
||||
switch(M.a_intent)
|
||||
|
||||
if ("help")
|
||||
if (health > 0)
|
||||
help_shake_act(M)
|
||||
else
|
||||
if (M.health >= -75.0)
|
||||
if ((M.head && M.head.flags & 4) || (M.wear_mask && !( M.wear_mask.flags & 32 )) )
|
||||
M << "\blue <B>Remove that mask!</B>"
|
||||
return
|
||||
var/obj/effect/equip_e/human/O = new /obj/effect/equip_e/human( )
|
||||
O.source = M
|
||||
O.target = src
|
||||
O.s_loc = M.loc
|
||||
O.t_loc = loc
|
||||
O.place = "CPR"
|
||||
requests += O
|
||||
spawn( 0 )
|
||||
O.process()
|
||||
return
|
||||
|
||||
if ("grab")
|
||||
if (M == src)
|
||||
|
||||
@@ -1,14 +1,15 @@
|
||||
/mob/living/carbon/alien/diona/attack_hand(mob/living/carbon/human/M as mob)
|
||||
|
||||
//Let people pick the little buggers up.
|
||||
if(M.a_intent == "help")
|
||||
if(M.species && M.species.name == "Diona")
|
||||
M << "You feel your being twine with that of [src] as it merges with your biomass."
|
||||
src << "You feel your being twine with that of [M] as you merge with its biomass."
|
||||
src.verbs += /mob/living/carbon/alien/diona/proc/split
|
||||
src.verbs -= /mob/living/carbon/alien/diona/proc/merge
|
||||
src.loc = M
|
||||
else
|
||||
get_scooped(M)
|
||||
if(istype(M))
|
||||
//Let people pick the little buggers up.
|
||||
if(M.a_intent == "help")
|
||||
if(M.species && M.species.name == "Diona")
|
||||
M << "You feel your being twine with that of [src] as it merges with your biomass."
|
||||
src << "You feel your being twine with that of [M] as you merge with its biomass."
|
||||
src.verbs += /mob/living/carbon/alien/diona/proc/split
|
||||
src.verbs -= /mob/living/carbon/alien/diona/proc/merge
|
||||
src.loc = M
|
||||
else
|
||||
get_scooped(M)
|
||||
|
||||
..()
|
||||
@@ -5,8 +5,6 @@
|
||||
speak_emote = list("hisses")
|
||||
icon_state = "larva"
|
||||
language = "Hivemind"
|
||||
melee_damage_lower = 3
|
||||
melee_damage_upper = 6
|
||||
|
||||
amount_grown = 0
|
||||
max_grown = 200
|
||||
|
||||
@@ -83,22 +83,6 @@
|
||||
|
||||
return
|
||||
|
||||
|
||||
/mob/living/carbon/attack_paw(mob/M as mob)
|
||||
if(!istype(M, /mob/living/carbon)) return
|
||||
|
||||
for(var/datum/disease/D in viruses)
|
||||
|
||||
if(D.spread_by_touch())
|
||||
M.contract_disease(D, 0, 1, CONTACT_HANDS)
|
||||
|
||||
for(var/datum/disease/D in M.viruses)
|
||||
|
||||
if(D.spread_by_touch())
|
||||
contract_disease(D, 0, 1, CONTACT_HANDS)
|
||||
|
||||
return
|
||||
|
||||
/mob/living/carbon/electrocute_act(var/shock_damage, var/obj/source, var/siemens_coeff = 1.0, var/def_zone = null)
|
||||
if(status_flags & GODMODE) return 0 //godmode
|
||||
shock_damage *= siemens_coeff
|
||||
|
||||
@@ -24,10 +24,6 @@ var/const/MAX_ACTIVE_TIME = 400
|
||||
var/strength = 5
|
||||
var/attached = 0
|
||||
|
||||
/obj/item/clothing/mask/facehugger/attack_paw(user as mob) //can be picked up by aliens
|
||||
attack_hand(user)
|
||||
return
|
||||
|
||||
/obj/item/clothing/mask/facehugger/attack_hand(user as mob)
|
||||
|
||||
if((stat == CONSCIOUS && !sterile))
|
||||
|
||||
@@ -186,25 +186,6 @@
|
||||
updatehealth()
|
||||
return
|
||||
|
||||
|
||||
/mob/living/carbon/human/attack_animal(mob/living/M as mob)
|
||||
if(M.melee_damage_upper == 0)
|
||||
M.emote("[M.friendly] [src]")
|
||||
else
|
||||
if(M.attack_sound)
|
||||
playsound(loc, M.attack_sound, 50, 1, 1)
|
||||
for(var/mob/O in viewers(src, null))
|
||||
O.show_message("\red <B>[M]</B> [M.attacktext] [src]!", 1)
|
||||
M.attack_log += text("\[[time_stamp()]\] <font color='red'>attacked [src.name] ([src.ckey])</font>")
|
||||
src.attack_log += text("\[[time_stamp()]\] <font color='orange'>was attacked by [M.name] ([M.ckey])</font>")
|
||||
var/damage = rand(M.melee_damage_lower, M.melee_damage_upper)
|
||||
var/dam_zone = pick("chest", "l_hand", "r_hand", "l_leg", "r_leg")
|
||||
var/datum/organ/external/affecting = get_organ(ran_zone(dam_zone))
|
||||
var/armor = run_armor_check(affecting, "melee")
|
||||
apply_damage(damage, BRUTE, affecting, armor)
|
||||
if(armor >= 2) return
|
||||
|
||||
|
||||
/mob/living/carbon/human/proc/implant_loyalty(mob/living/carbon/human/M, override = FALSE) // Won't override by default.
|
||||
if(!config.use_loyalty_implants && !override) return // Nuh-uh.
|
||||
|
||||
@@ -223,69 +204,6 @@
|
||||
return 1
|
||||
return 0
|
||||
|
||||
/mob/living/carbon/human/attack_slime(mob/living/carbon/slime/M as mob)
|
||||
if(M.Victim) return // can't attack while eating!
|
||||
|
||||
if (health > -100)
|
||||
|
||||
for(var/mob/O in viewers(src, null))
|
||||
if ((O.client && !( O.blinded )))
|
||||
O.show_message(text("\red <B>The [M.name] glomps []!</B>", src), 1)
|
||||
|
||||
var/damage = rand(1, 3)
|
||||
|
||||
if(M.is_adult)
|
||||
damage = rand(10, 35)
|
||||
else
|
||||
damage = rand(5, 25)
|
||||
|
||||
|
||||
var/dam_zone = pick("head", "chest", "l_arm", "r_arm", "l_leg", "r_leg", "groin")
|
||||
|
||||
var/datum/organ/external/affecting = get_organ(ran_zone(dam_zone))
|
||||
var/armor_block = run_armor_check(affecting, "melee")
|
||||
apply_damage(damage, BRUTE, affecting, armor_block)
|
||||
|
||||
|
||||
if(M.powerlevel > 0)
|
||||
var/stunprob = 10
|
||||
var/power = M.powerlevel + rand(0,3)
|
||||
|
||||
switch(M.powerlevel)
|
||||
if(1 to 2) stunprob = 20
|
||||
if(3 to 4) stunprob = 30
|
||||
if(5 to 6) stunprob = 40
|
||||
if(7 to 8) stunprob = 60
|
||||
if(9) stunprob = 70
|
||||
if(10) stunprob = 95
|
||||
|
||||
if(prob(stunprob))
|
||||
M.powerlevel -= 3
|
||||
if(M.powerlevel < 0)
|
||||
M.powerlevel = 0
|
||||
|
||||
for(var/mob/O in viewers(src, null))
|
||||
if ((O.client && !( O.blinded )))
|
||||
O.show_message(text("\red <B>The [M.name] has shocked []!</B>", src), 1)
|
||||
|
||||
Weaken(power)
|
||||
if (stuttering < power)
|
||||
stuttering = power
|
||||
Stun(power)
|
||||
|
||||
var/datum/effect/effect/system/spark_spread/s = new /datum/effect/effect/system/spark_spread
|
||||
s.set_up(5, 1, src)
|
||||
s.start()
|
||||
|
||||
if (prob(stunprob) && M.powerlevel >= 8)
|
||||
adjustFireLoss(M.powerlevel * rand(6,10))
|
||||
|
||||
|
||||
updatehealth()
|
||||
|
||||
return
|
||||
|
||||
|
||||
/mob/living/carbon/human/restrained()
|
||||
if (handcuffed)
|
||||
return 1
|
||||
@@ -293,8 +211,6 @@
|
||||
return 1
|
||||
return 0
|
||||
|
||||
|
||||
|
||||
/mob/living/carbon/human/var/co2overloadtime = null
|
||||
/mob/living/carbon/human/var/temperature_resistance = T0C+75
|
||||
|
||||
@@ -775,9 +691,12 @@
|
||||
return number
|
||||
|
||||
|
||||
/mob/living/carbon/human/IsAdvancedToolUser()
|
||||
return species.has_fine_manipulation
|
||||
|
||||
/mob/living/carbon/human/IsAdvancedToolUser(var/silent)
|
||||
if(species.has_fine_manipulation)
|
||||
return 1
|
||||
if(!silent)
|
||||
src << "<span class='warning'>You don't have the dexterity to use [src]!</span>"
|
||||
return 0
|
||||
|
||||
/mob/living/carbon/human/abiotic(var/full_body = 0)
|
||||
if(full_body && ((src.l_hand && !( src.l_hand.abstract )) || (src.r_hand && !( src.r_hand.abstract )) || (src.back || src.wear_mask || src.head || src.shoes || src.w_uniform || src.wear_suit || src.glasses || src.l_ear || src.r_ear || src.gloves)))
|
||||
|
||||
@@ -1,93 +1,72 @@
|
||||
/mob/living/carbon/human/attack_hand(mob/living/carbon/human/M as mob)
|
||||
if (istype(loc, /turf) && istype(loc.loc, /area/start))
|
||||
M << "No attacking people at spawn, you jackass."
|
||||
return
|
||||
/mob/living/carbon/human/attack_hand(mob/living/carbon/M as mob)
|
||||
|
||||
var/datum/organ/external/temp = M:organs_by_name["r_hand"]
|
||||
if (M.hand)
|
||||
temp = M:organs_by_name["l_hand"]
|
||||
if(temp && !temp.is_usable())
|
||||
M << "\red You can't use your [temp.display_name]."
|
||||
return
|
||||
var/mob/living/carbon/human/H = M
|
||||
if(istype(H))
|
||||
var/datum/organ/external/temp = H.organs_by_name["r_hand"]
|
||||
if(H.hand)
|
||||
temp = H.organs_by_name["l_hand"]
|
||||
if(temp && !temp.is_usable())
|
||||
H << "\red You can't use your [temp.display_name]."
|
||||
return
|
||||
|
||||
..()
|
||||
|
||||
if((M != src) && check_shields(0, M.name))
|
||||
visible_message("\red <B>[M] attempted to touch [src]!</B>")
|
||||
return 0
|
||||
// Should this all be in Touch()?
|
||||
if(istype(H))
|
||||
if((H != src) && check_shields(0, H.name))
|
||||
visible_message("\red <B>[H] attempted to touch [src]!</B>")
|
||||
return 0
|
||||
|
||||
|
||||
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("\red <B>[src] has been touched with the stun gloves by [M]!</B>")
|
||||
M.attack_log += text("\[[time_stamp()]\] <font color='red'>Stungloved [src.name] ([src.ckey])</font>")
|
||||
src.attack_log += text("\[[time_stamp()]\] <font color='orange'>Has been stungloved by [M.name] ([M.ckey])</font>")
|
||||
|
||||
msg_admin_attack("[M.name] ([M.ckey]) stungloved [src.name] ([src.ckey]) (<A HREF='?_src_=holder;adminplayerobservecoodjump=1;X=[M.x];Y=[M.y];Z=[M.z]'>JMP</a>)")
|
||||
|
||||
var/armorblock = run_armor_check(M.zone_sel.selecting, "energy")
|
||||
apply_effects(5,5,0,0,5,0,0,armorblock)
|
||||
return 1
|
||||
else
|
||||
M << "\red Not enough charge! "
|
||||
visible_message("\red <B>[src] has been touched with the stun gloves by [M]!</B>")
|
||||
return
|
||||
|
||||
if(istype(M.gloves , /obj/item/clothing/gloves/boxing/hologlove))
|
||||
if(istype(H.gloves, /obj/item/clothing/gloves/boxing/hologlove))
|
||||
|
||||
var/damage = rand(0, 9)
|
||||
if(!damage)
|
||||
playsound(loc, 'sound/weapons/punchmiss.ogg', 25, 1, -1)
|
||||
visible_message("\red <B>[M] has attempted to punch [src]!</B>")
|
||||
visible_message("\red <B>[H] has attempted to punch [src]!</B>")
|
||||
return 0
|
||||
var/datum/organ/external/affecting = get_organ(ran_zone(M.zone_sel.selecting))
|
||||
var/datum/organ/external/affecting = get_organ(ran_zone(H.zone_sel.selecting))
|
||||
var/armor_block = run_armor_check(affecting, "melee")
|
||||
|
||||
if(HULK in M.mutations) damage += 5
|
||||
if(HULK in H.mutations)
|
||||
damage += 5
|
||||
|
||||
playsound(loc, "punch", 25, 1, -1)
|
||||
|
||||
visible_message("\red <B>[M] has punched [src]!</B>")
|
||||
visible_message("\red <B>[H] has punched [src]!</B>")
|
||||
|
||||
apply_damage(damage, HALLOSS, affecting, armor_block)
|
||||
if(damage >= 9)
|
||||
visible_message("\red <B>[M] has weakened [src]!</B>")
|
||||
visible_message("\red <B>[H] has weakened [src]!</B>")
|
||||
apply_effect(4, WEAKEN, armor_block)
|
||||
|
||||
return
|
||||
else
|
||||
if(istype(M,/mob/living/carbon))
|
||||
// log_debug("No gloves, [M] is truing to infect [src]")
|
||||
M.spread_disease_to(src, "Contact")
|
||||
|
||||
if(istype(M,/mob/living/carbon))
|
||||
M.spread_disease_to(src, "Contact")
|
||||
|
||||
switch(M.a_intent)
|
||||
if("help")
|
||||
if(health >= config.health_threshold_crit)
|
||||
|
||||
if(istype(H) && health < config.health_threshold_crit)
|
||||
|
||||
if((H.head && (H.head.flags & HEADCOVERSMOUTH)) || (H.wear_mask && (H.wear_mask.flags & MASKCOVERSMOUTH)))
|
||||
H << "\blue <B>Remove your mask!</B>"
|
||||
return 0
|
||||
if((head && (head.flags & HEADCOVERSMOUTH)) || (wear_mask && (wear_mask.flags & MASKCOVERSMOUTH)))
|
||||
H << "\blue <B>Remove [src]'s mask!</B>"
|
||||
return 0
|
||||
|
||||
var/obj/effect/equip_e/human/O = new /obj/effect/equip_e/human()
|
||||
O.source = M
|
||||
O.target = src
|
||||
O.s_loc = M.loc
|
||||
O.t_loc = loc
|
||||
O.place = "CPR"
|
||||
requests += O
|
||||
spawn(0)
|
||||
O.process()
|
||||
else
|
||||
help_shake_act(M)
|
||||
return 1
|
||||
// if(M.health < -75) return 0
|
||||
|
||||
if((M.head && (M.head.flags & HEADCOVERSMOUTH)) || (M.wear_mask && (M.wear_mask.flags & MASKCOVERSMOUTH)))
|
||||
M << "\blue <B>Remove your mask!</B>"
|
||||
return 0
|
||||
if((head && (head.flags & HEADCOVERSMOUTH)) || (wear_mask && (wear_mask.flags & MASKCOVERSMOUTH)))
|
||||
M << "\blue <B>Remove his mask!</B>"
|
||||
return 0
|
||||
|
||||
var/obj/effect/equip_e/human/O = new /obj/effect/equip_e/human()
|
||||
O.source = M
|
||||
O.target = src
|
||||
O.s_loc = M.loc
|
||||
O.t_loc = loc
|
||||
O.place = "CPR"
|
||||
requests += O
|
||||
spawn(0)
|
||||
O.process()
|
||||
return 1
|
||||
|
||||
if("grab")
|
||||
@@ -111,42 +90,43 @@
|
||||
|
||||
if("hurt")
|
||||
|
||||
if(!istype(H))
|
||||
attack_generic(H,rand(1,3),"punched")
|
||||
return
|
||||
|
||||
// See if they can attack, and which attacks to use.
|
||||
var/datum/unarmed_attack/attack = M.species.unarmed
|
||||
if(!attack.is_usable(M))
|
||||
attack = M.species.secondary_unarmed
|
||||
if(!attack.is_usable(M))
|
||||
var/datum/unarmed_attack/attack = H.species.unarmed
|
||||
if(!attack.is_usable(H))
|
||||
attack = H.species.secondary_unarmed
|
||||
if(!attack.is_usable(H))
|
||||
return 0
|
||||
|
||||
M.attack_log += text("\[[time_stamp()]\] <font color='red'>[pick(attack.attack_verb)]ed [src.name] ([src.ckey])</font>")
|
||||
src.attack_log += text("\[[time_stamp()]\] <font color='orange'>Has been [pick(attack.attack_verb)]ed by [M.name] ([M.ckey])</font>")
|
||||
msg_admin_attack("[key_name(M)] [pick(attack.attack_verb)]ed [key_name(src)]")
|
||||
H.attack_log += text("\[[time_stamp()]\] <font color='red'>[pick(attack.attack_verb)]ed [src.name] ([src.ckey])</font>")
|
||||
src.attack_log += text("\[[time_stamp()]\] <font color='orange'>Has been [pick(attack.attack_verb)]ed by [H.name] ([M.ckey])</font>")
|
||||
msg_admin_attack("[key_name(H)] [pick(attack.attack_verb)]ed [key_name(src)]")
|
||||
|
||||
var/damage = rand(0, 5)//BS12 EDIT
|
||||
if(!damage)
|
||||
playsound(loc, attack.miss_sound, 25, 1, -1)
|
||||
visible_message("\red <B>[M] tried to [pick(attack.attack_verb)] [src]!</B>")
|
||||
visible_message("\red <B>[H] tried to [pick(attack.attack_verb)] [src]!</B>")
|
||||
return 0
|
||||
|
||||
|
||||
var/datum/organ/external/affecting = get_organ(ran_zone(M.zone_sel.selecting))
|
||||
var/datum/organ/external/affecting = get_organ(ran_zone(H.zone_sel.selecting))
|
||||
var/armor_block = run_armor_check(affecting, "melee")
|
||||
|
||||
if(HULK in M.mutations) damage += 5
|
||||
|
||||
if(HULK in H.mutations) damage += 5
|
||||
|
||||
playsound(loc, attack.attack_sound, 25, 1, -1)
|
||||
|
||||
visible_message("\red <B>[M] [pick(attack.attack_verb)]ed [src]!</B>")
|
||||
visible_message("\red <B>[H] [pick(attack.attack_verb)]ed [src]!</B>")
|
||||
//Rearranged, so claws don't increase weaken chance.
|
||||
if(damage >= 5 && prob(50))
|
||||
visible_message("\red <B>[M] has weakened [src]!</B>")
|
||||
visible_message("\red <B>[H] has weakened [src]!</B>")
|
||||
apply_effect(3, WEAKEN, armor_block)
|
||||
|
||||
damage += attack.damage
|
||||
apply_damage(damage, BRUTE, affecting, armor_block, sharp=attack.sharp, edge=attack.edge)
|
||||
|
||||
|
||||
if("disarm")
|
||||
M.attack_log += text("\[[time_stamp()]\] <font color='red'>Disarmed [src.name] ([src.ckey])</font>")
|
||||
src.attack_log += text("\[[time_stamp()]\] <font color='orange'>Has been disarmed by [M.name] ([M.ckey])</font>")
|
||||
@@ -222,4 +202,20 @@
|
||||
return
|
||||
|
||||
/mob/living/carbon/human/proc/afterattack(atom/target as mob|obj|turf|area, mob/living/user as mob|obj, inrange, params)
|
||||
return
|
||||
return
|
||||
|
||||
/mob/living/carbon/human/attack_generic(var/mob/user, var/damage, var/attack_message)
|
||||
|
||||
if(!damage)
|
||||
return
|
||||
|
||||
user.attack_log += text("\[[time_stamp()]\] <font color='red'>attacked [src.name] ([src.ckey])</font>")
|
||||
src.attack_log += text("\[[time_stamp()]\] <font color='orange'>was attacked by [user.name] ([user.ckey])</font>")
|
||||
src.visible_message("<span class='danger'>[user] has [attack_message] [src]!</span>")
|
||||
|
||||
var/dam_zone = pick("head", "chest", "l_arm", "r_arm", "l_leg", "r_leg", "groin")
|
||||
var/datum/organ/external/affecting = get_organ(ran_zone(dam_zone))
|
||||
var/armor_block = run_armor_check(affecting, "melee")
|
||||
apply_damage(damage, BRUTE, affecting, armor_block)
|
||||
updatehealth()
|
||||
return 1
|
||||
@@ -1,23 +0,0 @@
|
||||
/mob/living/carbon/human/attack_paw(mob/M as mob)
|
||||
..()
|
||||
if (M.a_intent == "help")
|
||||
help_shake_act(M)
|
||||
else
|
||||
if (istype(wear_mask, /obj/item/clothing/mask/muzzle))
|
||||
return
|
||||
|
||||
for(var/mob/O in viewers(src, null))
|
||||
O.show_message(text("\red <B>[M.name] has bit []!</B>", src), 1)
|
||||
|
||||
var/damage = rand(1, 3)
|
||||
var/dam_zone = pick("chest", "l_hand", "r_hand", "l_leg", "r_leg")
|
||||
var/datum/organ/external/affecting = get_organ(ran_zone(dam_zone))
|
||||
apply_damage(damage, BRUTE, affecting, run_armor_check(affecting, "melee"))
|
||||
|
||||
for(var/datum/disease/D in M.viruses)
|
||||
if(istype(D, /datum/disease/jungle_fever))
|
||||
var/mob/living/carbon/human/H = src
|
||||
src = null
|
||||
src = H.monkeyize()
|
||||
contract_disease(D,1,0)
|
||||
return
|
||||
@@ -83,7 +83,7 @@
|
||||
Atkcool = 0
|
||||
|
||||
if(Target.Adjacent(src))
|
||||
Target.attack_slime(src)
|
||||
UnarmedAttack(Target)
|
||||
return
|
||||
if(!Target.lying && prob(80))
|
||||
|
||||
@@ -94,7 +94,7 @@
|
||||
Atkcool = 0
|
||||
|
||||
if(Target.Adjacent(src))
|
||||
Target.attack_slime(src)
|
||||
UnarmedAttack(Target)
|
||||
|
||||
else
|
||||
if(!Atkcool && Target.Adjacent(src))
|
||||
|
||||
@@ -119,7 +119,7 @@
|
||||
if(istype(AM, /obj/structure/window) || istype(AM, /obj/structure/grille))
|
||||
if(nutrition <= get_hunger_nutrition() && !Atkcool)
|
||||
if (is_adult || prob(5))
|
||||
AM.attack_slime(src)
|
||||
UnarmedAttack(AM)
|
||||
spawn()
|
||||
Atkcool = 1
|
||||
sleep(45)
|
||||
@@ -253,84 +253,7 @@
|
||||
updatehealth()
|
||||
return
|
||||
|
||||
/mob/living/carbon/slime/attack_slime(mob/living/carbon/slime/M as mob)
|
||||
if (!ticker)
|
||||
M << "You cannot attack people before the game has started."
|
||||
return
|
||||
|
||||
if (Victim) return // can't attack while eating!
|
||||
|
||||
if (health > -100)
|
||||
|
||||
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
|
||||
|
||||
/mob/living/carbon/slime/attack_animal(mob/living/M as mob)
|
||||
if(M.melee_damage_upper == 0)
|
||||
M.emote("[M.friendly] [src]")
|
||||
else
|
||||
if(M.attack_sound)
|
||||
playsound(loc, M.attack_sound, 50, 1, 1)
|
||||
visible_message("<span class='danger'>[M] [M.attacktext] [src]!</span>", \
|
||||
"<span class='userdanger'>[M] [M.attacktext] [src]!</span>")
|
||||
M.attack_log += text("\[[time_stamp()]\] <font color='red'>attacked [src.name] ([src.ckey])</font>")
|
||||
src.attack_log += text("\[[time_stamp()]\] <font color='orange'>was attacked by [M.name] ([M.ckey])</font>")
|
||||
var/damage = rand(M.melee_damage_lower, M.melee_damage_upper)
|
||||
attacked += 10
|
||||
adjustBruteLoss(damage)
|
||||
updatehealth()
|
||||
|
||||
/mob/living/carbon/slime/attack_paw(mob/living/carbon/monkey/M as mob)
|
||||
if(!(istype(M, /mob/living/carbon/monkey)))
|
||||
return // Fix for aliens receiving double messages when attacking other aliens.
|
||||
|
||||
if (!ticker)
|
||||
M << "You cannot attack people before the game has started."
|
||||
return
|
||||
|
||||
if (istype(loc, /turf) && istype(loc.loc, /area/start))
|
||||
M << "No attacking people at spawn, you jackass."
|
||||
return
|
||||
|
||||
..()
|
||||
|
||||
switch(M.a_intent)
|
||||
|
||||
if ("help")
|
||||
help_shake_act(M)
|
||||
else
|
||||
if (istype(wear_mask, /obj/item/clothing/mask/muzzle))
|
||||
return
|
||||
if (health > 0)
|
||||
attacked += 10
|
||||
//playsound(loc, 'sound/weapons/bite.ogg', 50, 1, -1)
|
||||
visible_message("<span class='danger'>[M.name] has attacked [src]!</span>", \
|
||||
"<span class='userdanger'>[M.name] has attacked [src]!</span>")
|
||||
adjustBruteLoss(rand(1, 3))
|
||||
updatehealth()
|
||||
return
|
||||
|
||||
|
||||
/mob/living/carbon/slime/attack_hand(mob/living/carbon/human/M as mob)
|
||||
if (!ticker)
|
||||
M << "You cannot attack people before the game has started."
|
||||
return
|
||||
|
||||
if (istype(loc, /turf) && istype(loc.loc, /area/start))
|
||||
M << "No attacking people at spawn, you jackass."
|
||||
return
|
||||
|
||||
..()
|
||||
|
||||
@@ -387,18 +310,6 @@
|
||||
|
||||
return
|
||||
|
||||
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
|
||||
M << "\red Not enough charge! "
|
||||
return
|
||||
|
||||
switch(M.a_intent)
|
||||
|
||||
if ("help")
|
||||
|
||||
@@ -143,58 +143,7 @@
|
||||
health = 100 - getOxyLoss() - getToxLoss() - getFireLoss() - getBruteLoss()
|
||||
return
|
||||
|
||||
//mob/living/carbon/monkey/bullet_act(var/obj/item/projectile/Proj)taken care of in living
|
||||
|
||||
|
||||
/mob/living/carbon/monkey/attack_paw(mob/M as mob)
|
||||
..()
|
||||
|
||||
if (M.a_intent == "help")
|
||||
help_shake_act(M)
|
||||
else
|
||||
if ((M.a_intent == "hurt" && !( istype(wear_mask, /obj/item/clothing/mask/muzzle) )))
|
||||
if ((prob(75) && health > 0))
|
||||
playsound(loc, 'sound/weapons/bite.ogg', 50, 1, -1)
|
||||
for(var/mob/O in viewers(src, null))
|
||||
O.show_message("\red <B>[M.name] has bit [name]!</B>", 1)
|
||||
var/damage = rand(1, 5)
|
||||
adjustBruteLoss(damage)
|
||||
health = 100 - getOxyLoss() - getToxLoss() - getFireLoss() - getBruteLoss()
|
||||
for(var/datum/disease/D in M.viruses)
|
||||
if(istype(D, /datum/disease/jungle_fever))
|
||||
contract_disease(D,1,0)
|
||||
else
|
||||
for(var/mob/O in viewers(src, null))
|
||||
O.show_message("\red <B>[M.name] has attempted to bite [name]!</B>", 1)
|
||||
return
|
||||
|
||||
/mob/living/carbon/monkey/attack_hand(mob/living/carbon/human/M as mob)
|
||||
if (!ticker)
|
||||
M << "You cannot attack people before the game has started."
|
||||
return
|
||||
|
||||
if (istype(loc, /turf) && istype(loc.loc, /area/start))
|
||||
M << "No attacking people at spawn, you jackass."
|
||||
return
|
||||
|
||||
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)
|
||||
Weaken(5)
|
||||
if (stuttering < 5)
|
||||
stuttering = 5
|
||||
Stun(5)
|
||||
|
||||
for(var/mob/O in viewers(src, null))
|
||||
if (O.client)
|
||||
O.show_message("\red <B>[src] has been touched with the stun gloves by [M]!</B>", 1, "\red You hear someone fall", 2)
|
||||
return
|
||||
else
|
||||
M << "\red Not enough charge! "
|
||||
return
|
||||
|
||||
if (M.a_intent == "help")
|
||||
help_shake_act(M)
|
||||
@@ -254,82 +203,6 @@
|
||||
O.show_message(text("\red <B>[] has disarmed [name]!</B>", M), 1)
|
||||
return
|
||||
|
||||
/mob/living/carbon/monkey/attack_animal(mob/living/M as mob)
|
||||
|
||||
if(M.melee_damage_upper == 0)
|
||||
M.emote("[M.friendly] [src]")
|
||||
else
|
||||
if(M.attack_sound)
|
||||
playsound(loc, M.attack_sound, 50, 1, 1)
|
||||
for(var/mob/O in viewers(src, null))
|
||||
O.show_message("\red <B>[M]</B> [M.attacktext] [src]!", 1)
|
||||
M.attack_log += text("\[[time_stamp()]\] <font color='red'>attacked [src.name] ([src.ckey])</font>")
|
||||
src.attack_log += text("\[[time_stamp()]\] <font color='orange'>was attacked by [M.name] ([M.ckey])</font>")
|
||||
var/damage = rand(M.melee_damage_lower, M.melee_damage_upper)
|
||||
adjustBruteLoss(damage)
|
||||
updatehealth()
|
||||
|
||||
|
||||
/mob/living/carbon/monkey/attack_slime(mob/living/carbon/slime/M as mob)
|
||||
if (!ticker)
|
||||
M << "You cannot attack people before the game has started."
|
||||
return
|
||||
|
||||
if(M.Victim) return // can't attack while eating!
|
||||
|
||||
if (health > -100)
|
||||
|
||||
for(var/mob/O in viewers(src, null))
|
||||
if ((O.client && !( O.blinded )))
|
||||
O.show_message(text("\red <B>The [M.name] glomps []!</B>", src), 1)
|
||||
|
||||
var/damage = rand(1, 3)
|
||||
|
||||
if(M.is_adult)
|
||||
damage = rand(20, 40)
|
||||
else
|
||||
damage = rand(5, 35)
|
||||
|
||||
adjustBruteLoss(damage)
|
||||
|
||||
if(M.powerlevel > 0)
|
||||
var/stunprob = 10
|
||||
var/power = M.powerlevel + rand(0,3)
|
||||
|
||||
switch(M.powerlevel)
|
||||
if(1 to 2) stunprob = 20
|
||||
if(3 to 4) stunprob = 30
|
||||
if(5 to 6) stunprob = 40
|
||||
if(7 to 8) stunprob = 60
|
||||
if(9) stunprob = 70
|
||||
if(10) stunprob = 95
|
||||
|
||||
if(prob(stunprob))
|
||||
M.powerlevel -= 3
|
||||
if(M.powerlevel < 0)
|
||||
M.powerlevel = 0
|
||||
|
||||
for(var/mob/O in viewers(src, null))
|
||||
if ((O.client && !( O.blinded )))
|
||||
O.show_message(text("\red <B>The [M.name] has shocked []!</B>", src), 1)
|
||||
|
||||
Weaken(power)
|
||||
if (stuttering < power)
|
||||
stuttering = power
|
||||
Stun(power)
|
||||
|
||||
var/datum/effect/effect/system/spark_spread/s = new /datum/effect/effect/system/spark_spread
|
||||
s.set_up(5, 1, src)
|
||||
s.start()
|
||||
|
||||
if (prob(stunprob) && M.powerlevel >= 8)
|
||||
adjustFireLoss(M.powerlevel * rand(6,10))
|
||||
|
||||
|
||||
updatehealth()
|
||||
|
||||
return
|
||||
|
||||
/mob/living/carbon/monkey/Stat()
|
||||
..()
|
||||
statpanel("Status")
|
||||
@@ -393,8 +266,10 @@
|
||||
del(src)
|
||||
return
|
||||
|
||||
|
||||
/mob/living/carbon/monkey/IsAdvancedToolUser()//Unless its monkey mode monkeys cant use advanced tools
|
||||
//Unless its monkey mode monkeys cant use advanced tools
|
||||
/mob/living/carbon/monkey/IsAdvancedToolUser(var/silent)
|
||||
if(!silent)
|
||||
src << "<span class='warning'>You don't have the dexterity to use [src]!</span>"
|
||||
return 0
|
||||
|
||||
/mob/living/carbon/monkey/say(var/message, var/datum/language/speaking = null, var/verb="says", var/alt_name="", var/italics=0, var/message_range = world.view, var/list/used_radios = list())
|
||||
@@ -412,4 +287,4 @@
|
||||
|
||||
message = capitalize(trim_left(message))
|
||||
|
||||
..(message, speaking, verb, alt_name, italics, message_range, used_radios)
|
||||
..(message, speaking, verb, alt_name, italics, message_range, used_radios)
|
||||
@@ -179,3 +179,15 @@
|
||||
return 0
|
||||
|
||||
// End BS12 momentum-transfer code.
|
||||
|
||||
/mob/living/attack_generic(var/mob/user, var/damage, var/attack_message)
|
||||
|
||||
if(!damage)
|
||||
return
|
||||
|
||||
adjustBruteLoss(damage)
|
||||
user.attack_log += text("\[[time_stamp()]\] <font color='red'>attacked [src.name] ([src.ckey])</font>")
|
||||
src.attack_log += text("\[[time_stamp()]\] <font color='orange'>was attacked by [user.name] ([user.ckey])</font>")
|
||||
src.visible_message("<span class='danger'>[user] has [attack_message] [src]!</span>")
|
||||
spawn(1) updatehealth()
|
||||
return 1
|
||||
|
||||
@@ -37,12 +37,4 @@
|
||||
|
||||
var/tod = null // Time of death
|
||||
var/update_slimes = 1
|
||||
var/silent = null //Can't talk. Value goes down every life proc.
|
||||
|
||||
// Putting these here for attack_animal().
|
||||
var/melee_damage_lower = 0
|
||||
var/melee_damage_upper = 0
|
||||
var/attacktext = "attacks"
|
||||
var/attack_sound = null
|
||||
var/friendly = "nuzzles"
|
||||
var/wall_smash = 0
|
||||
var/silent = null //Can't talk. Value goes down every life proc.
|
||||
@@ -542,20 +542,6 @@ var/list/ai_verbs_default = list(
|
||||
updatehealth()
|
||||
return 2
|
||||
|
||||
/mob/living/silicon/ai/attack_animal(mob/living/M as mob)
|
||||
if(M.melee_damage_upper == 0)
|
||||
M.emote("[M.friendly] [src]")
|
||||
else
|
||||
if(M.attack_sound)
|
||||
playsound(loc, M.attack_sound, 50, 1, 1)
|
||||
for(var/mob/O in viewers(src, null))
|
||||
O.show_message("\red <B>[M]</B> [M.attacktext] [src]!", 1)
|
||||
M.attack_log += text("\[[time_stamp()]\] <font color='red'>attacked [src.name] ([src.ckey])</font>")
|
||||
src.attack_log += text("\[[time_stamp()]\] <font color='orange'>was attacked by [M.name] ([M.ckey])</font>")
|
||||
var/damage = rand(M.melee_damage_lower, M.melee_damage_upper)
|
||||
adjustBruteLoss(damage)
|
||||
updatehealth()
|
||||
|
||||
/mob/living/silicon/ai/reset_view(atom/A)
|
||||
if(camera)
|
||||
camera.SetLuminosity(0)
|
||||
|
||||
@@ -14,11 +14,6 @@
|
||||
/obj/machinery/computer/drone_control/attack_ai(var/mob/user as mob)
|
||||
return src.attack_hand(user)
|
||||
|
||||
/obj/machinery/computer/drone_control/attack_paw(var/mob/user as mob)
|
||||
|
||||
return src.attack_hand(user)
|
||||
return
|
||||
|
||||
/obj/machinery/computer/drone_control/attack_hand(var/mob/user as mob)
|
||||
if(..())
|
||||
return
|
||||
|
||||
@@ -871,81 +871,6 @@ var/list/robot_verbs_default = list(
|
||||
spark_system.start()
|
||||
return ..()
|
||||
|
||||
|
||||
|
||||
/mob/living/silicon/robot/attack_slime(mob/living/carbon/slime/M as mob)
|
||||
if (!ticker)
|
||||
M << "You cannot attack people before the game has started."
|
||||
return
|
||||
|
||||
if(M.Victim) return // can't attack while eating!
|
||||
|
||||
if (health > -100)
|
||||
|
||||
for(var/mob/O in viewers(src, null))
|
||||
if ((O.client && !( O.blinded )))
|
||||
O.show_message(text("\red <B>The [M.name] glomps []!</B>", src), 1)
|
||||
|
||||
var/damage = rand(1, 3)
|
||||
|
||||
if(M.is_adult)
|
||||
damage = rand(20, 40)
|
||||
else
|
||||
damage = rand(5, 35)
|
||||
|
||||
damage = round(damage / 2) // borgs recieve half damage
|
||||
adjustBruteLoss(damage)
|
||||
|
||||
|
||||
if(M.powerlevel > 0)
|
||||
var/stunprob = 10
|
||||
|
||||
switch(M.powerlevel)
|
||||
if(1 to 2) stunprob = 20
|
||||
if(3 to 4) stunprob = 30
|
||||
if(5 to 6) stunprob = 40
|
||||
if(7 to 8) stunprob = 60
|
||||
if(9) stunprob = 70
|
||||
if(10) stunprob = 95
|
||||
|
||||
if(prob(stunprob))
|
||||
M.powerlevel -= 3
|
||||
if(M.powerlevel < 0)
|
||||
M.powerlevel = 0
|
||||
|
||||
for(var/mob/O in viewers(src, null))
|
||||
if ((O.client && !( O.blinded )))
|
||||
O.show_message(text("\red <B>The [M.name] has electrified []!</B>", src), 1)
|
||||
|
||||
flick("noise", flash)
|
||||
|
||||
var/datum/effect/effect/system/spark_spread/s = new /datum/effect/effect/system/spark_spread
|
||||
s.set_up(5, 1, src)
|
||||
s.start()
|
||||
|
||||
if (prob(stunprob) && M.powerlevel >= 8)
|
||||
adjustBruteLoss(M.powerlevel * rand(6,10))
|
||||
|
||||
|
||||
updatehealth()
|
||||
|
||||
return
|
||||
|
||||
/mob/living/silicon/robot/attack_animal(mob/living/M as mob)
|
||||
if(M.melee_damage_upper == 0)
|
||||
M.emote("[M.friendly] [src]")
|
||||
else
|
||||
if(M.attack_sound)
|
||||
playsound(loc, M.attack_sound, 50, 1, 1)
|
||||
for(var/mob/O in viewers(src, null))
|
||||
O.show_message("\red <B>[M]</B> [M.attacktext] [src]!", 1)
|
||||
M.attack_log += text("\[[time_stamp()]\] <font color='red'>attacked [src.name] ([src.ckey])</font>")
|
||||
src.attack_log += text("\[[time_stamp()]\] <font color='orange'>was attacked by [M.name] ([M.ckey])</font>")
|
||||
var/damage = rand(M.melee_damage_lower, M.melee_damage_upper)
|
||||
adjustBruteLoss(damage)
|
||||
updatehealth()
|
||||
|
||||
|
||||
/mob/living/silicon/robot/attack_hand(mob/user)
|
||||
|
||||
add_fingerprint(user)
|
||||
@@ -967,6 +892,10 @@ var/list/robot_verbs_default = list(
|
||||
user << "You remove \the [broken_device]."
|
||||
user.put_in_active_hand(broken_device)
|
||||
|
||||
//Robots take half damage from basic attacks.
|
||||
/mob/living/silicon/robot/attack_generic(var/mob/user, var/damage, var/attack_message)
|
||||
return ..(user,Floor(damage/2),attack_message)
|
||||
|
||||
/mob/living/silicon/robot/proc/allowed(mob/M)
|
||||
//check if it doesn't require any access at all
|
||||
if(check_access(null))
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
a_intent = "harm"
|
||||
stop_automated_movement = 1
|
||||
status_flags = CANPUSH
|
||||
attacktext = "nips"
|
||||
attacktext = "nipped"
|
||||
friendly = "prods"
|
||||
wander = 0
|
||||
pass_flags = PASSTABLE
|
||||
|
||||
@@ -86,25 +86,6 @@
|
||||
step(AM, t)
|
||||
now_pushing = null
|
||||
|
||||
|
||||
/mob/living/simple_animal/construct/attack_animal(mob/living/M as mob)
|
||||
if(istype(M, /mob/living/simple_animal/construct/builder))
|
||||
health += 5
|
||||
M.emote("mends some of \the <EM>[src]'s</EM> wounds.")
|
||||
else
|
||||
if(M.melee_damage_upper <= 0)
|
||||
M.emote("[M.friendly] \the <EM>[src]</EM>")
|
||||
else
|
||||
if(M.attack_sound)
|
||||
playsound(loc, M.attack_sound, 50, 1, 1)
|
||||
for(var/mob/O in viewers(src, null))
|
||||
O.show_message("<span class='attack'>\The <EM>[M]</EM> [M.attacktext] \the <EM>[src]</EM>!</span>", 1)
|
||||
M.attack_log += text("\[[time_stamp()]\] <font color='red'>attacked [src.name] ([src.ckey])</font>")
|
||||
src.attack_log += text("\[[time_stamp()]\] <font color='orange'>was attacked by [M.name] ([M.ckey])</font>")
|
||||
|
||||
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
|
||||
@@ -139,7 +120,7 @@
|
||||
harm_intent_damage = 0
|
||||
melee_damage_lower = 30
|
||||
melee_damage_upper = 30
|
||||
attacktext = "smashes their armoured gauntlet into"
|
||||
attacktext = "smashed their armoured gauntlet into"
|
||||
speed = 3
|
||||
wall_smash = 1
|
||||
attack_sound = 'sound/weapons/punch3.ogg'
|
||||
@@ -214,7 +195,7 @@
|
||||
health = 75
|
||||
melee_damage_lower = 25
|
||||
melee_damage_upper = 25
|
||||
attacktext = "slashes"
|
||||
attacktext = "slashed"
|
||||
speed = -1
|
||||
see_in_dark = 7
|
||||
attack_sound = 'sound/weapons/bladeslice.ogg'
|
||||
@@ -239,7 +220,7 @@
|
||||
harm_intent_damage = 5
|
||||
melee_damage_lower = 5
|
||||
melee_damage_upper = 5
|
||||
attacktext = "rams"
|
||||
attacktext = "rammed"
|
||||
speed = 0
|
||||
wall_smash = 1
|
||||
attack_sound = 'sound/weapons/punch2.ogg'
|
||||
@@ -266,7 +247,7 @@
|
||||
harm_intent_damage = 0
|
||||
melee_damage_lower = 50
|
||||
melee_damage_upper = 50
|
||||
attacktext = "brutally crushes"
|
||||
attacktext = "brutally crushed"
|
||||
speed = 5
|
||||
wall_smash = 1
|
||||
attack_sound = 'sound/weapons/punch4.ogg'
|
||||
|
||||
@@ -308,10 +308,9 @@
|
||||
dir = SOUTH
|
||||
|
||||
if(isturf(movement_target.loc) )
|
||||
movement_target.attack_animal(src)
|
||||
else if(ishuman(movement_target.loc) )
|
||||
if(prob(20))
|
||||
emote("stares at the [movement_target] that [movement_target.loc] has with a sad puppy-face")
|
||||
UnarmedAttack(movement_target)
|
||||
else if(ishuman(movement_target.loc) && prob(20))
|
||||
custom_emote(1,"stares at the [movement_target] that [movement_target.loc] has with sad puppy eyes.")
|
||||
|
||||
if(prob(1))
|
||||
emote(pick("dances around","chases its tail"))
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
response_disarm = "gently pushes aside the"
|
||||
response_harm = "kicks the"
|
||||
faction = "goat"
|
||||
attacktext = "kicks"
|
||||
attacktext = "kicked"
|
||||
health = 40
|
||||
melee_damage_lower = 1
|
||||
melee_damage_upper = 5
|
||||
@@ -102,7 +102,7 @@
|
||||
response_help = "pets the"
|
||||
response_disarm = "gently pushes aside the"
|
||||
response_harm = "kicks the"
|
||||
attacktext = "kicks"
|
||||
attacktext = "kicked"
|
||||
health = 50
|
||||
var/datum/reagents/udder = null
|
||||
|
||||
@@ -163,7 +163,7 @@
|
||||
response_help = "pets the"
|
||||
response_disarm = "gently pushes aside the"
|
||||
response_harm = "kicks the"
|
||||
attacktext = "kicks"
|
||||
attacktext = "kicked"
|
||||
health = 1
|
||||
var/amount_grown = 0
|
||||
pass_flags = PASSTABLE | PASSGRILLE
|
||||
@@ -204,7 +204,7 @@ var/global/chicken_count = 0
|
||||
response_help = "pets the"
|
||||
response_disarm = "gently pushes aside the"
|
||||
response_harm = "kicks the"
|
||||
attacktext = "kicks"
|
||||
attacktext = "kicked"
|
||||
health = 10
|
||||
var/eggsleft = 0
|
||||
var/body_color
|
||||
|
||||
@@ -9,8 +9,7 @@
|
||||
speak_emote = list("hisses")
|
||||
health = 5
|
||||
maxHealth = 5
|
||||
attacktext = "bites"
|
||||
attacktext = "bites"
|
||||
attacktext = "bitten"
|
||||
melee_damage_lower = 1
|
||||
melee_damage_upper = 2
|
||||
response_help = "pets"
|
||||
|
||||
@@ -26,8 +26,7 @@
|
||||
health = 10
|
||||
maxHealth = 10
|
||||
|
||||
attacktext = "shocks"
|
||||
attacktext = "shocks"
|
||||
attacktext = "shocked"
|
||||
melee_damage_lower = 1
|
||||
melee_damage_upper = 3
|
||||
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
harm_intent_damage = 5
|
||||
melee_damage_lower = 25
|
||||
melee_damage_upper = 25
|
||||
attacktext = "slashes"
|
||||
attacktext = "slashed"
|
||||
a_intent = "harm"
|
||||
attack_sound = 'sound/weapons/bladeslice.ogg'
|
||||
min_oxy = 0
|
||||
|
||||
@@ -141,10 +141,10 @@
|
||||
var/mob/living/L = target_mob
|
||||
L.adjustBruteLoss(damage)
|
||||
return L
|
||||
else if(istype(target_mob,/obj/mecha))
|
||||
var/obj/mecha/M = target_mob
|
||||
M.attack_animal(src)
|
||||
return M
|
||||
//else if(istype(target_mob,/obj/mecha))
|
||||
//var/obj/mecha/M = target_mob
|
||||
//M.attack_animal(src)
|
||||
//return M
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -20,7 +20,7 @@
|
||||
harm_intent_damage = 8
|
||||
melee_damage_lower = 15
|
||||
melee_damage_upper = 15
|
||||
attacktext = "bites"
|
||||
attacktext = "bitten"
|
||||
attack_sound = 'sound/weapons/bite.ogg'
|
||||
|
||||
//Space carp aren't affected by atmos.
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
maxHealth = 80
|
||||
melee_damage_lower = 25
|
||||
melee_damage_upper = 50
|
||||
attacktext = "chomps"
|
||||
attacktext = "chomped"
|
||||
attack_sound = 'sound/weapons/bite.ogg'
|
||||
faction = "creature"
|
||||
speed = 4
|
||||
@@ -16,7 +16,7 @@
|
||||
harm_intent_damage = 10
|
||||
melee_damage_lower = 15
|
||||
melee_damage_upper = 15
|
||||
attacktext = "grips"
|
||||
attacktext = "gripped"
|
||||
attack_sound = 'sound/hallucinations/growl1.ogg'
|
||||
|
||||
min_oxy = 0
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
maxHealth = 15
|
||||
melee_damage_lower = 2
|
||||
melee_damage_upper = 3
|
||||
attacktext = "claws"
|
||||
attacktext = "clawed"
|
||||
projectilesound = 'sound/weapons/Gunshot.ogg'
|
||||
projectiletype = /obj/item/projectile/hivebotbullet
|
||||
faction = "hivebot"
|
||||
|
||||
@@ -89,17 +89,17 @@
|
||||
/mob/living/simple_animal/hostile/proc/AttackingTarget()
|
||||
if(!Adjacent(target_mob))
|
||||
return
|
||||
if(isliving(target_mob))
|
||||
var/mob/living/L = target_mob
|
||||
L.attack_animal(src)
|
||||
return L
|
||||
if(istype(target_mob,/obj/mecha))
|
||||
var/obj/mecha/M = target_mob
|
||||
M.attack_animal(src)
|
||||
return M
|
||||
if(istype(target_mob,/obj/machinery/bot))
|
||||
var/obj/machinery/bot/B = target_mob
|
||||
B.attack_animal(src)
|
||||
//if(isliving(target_mob))
|
||||
//var/mob/living/L = target_mob
|
||||
//L.attack_animal(src)
|
||||
//return L
|
||||
//if(istype(target_mob,/obj/mecha))
|
||||
//var/obj/mecha/M = target_mob
|
||||
//M.attack_animal(src)
|
||||
//return M
|
||||
//if(istype(target_mob,/obj/machinery/bot))
|
||||
//var/obj/machinery/bot/B = target_mob
|
||||
//B.attack_animal(src)
|
||||
|
||||
/mob/living/simple_animal/hostile/proc/LoseTarget()
|
||||
stance = HOSTILE_STANCE_IDLE
|
||||
@@ -193,10 +193,10 @@
|
||||
/mob/living/simple_animal/hostile/proc/DestroySurroundings()
|
||||
if(prob(break_stuff_probability))
|
||||
for(var/dir in cardinal) // North, South, East, West
|
||||
for(var/obj/structure/window/obstacle in get_step(src, dir))
|
||||
if(obstacle.dir == reverse_dir[dir]) // So that windows get smashed in the right order
|
||||
obstacle.attack_animal(src)
|
||||
return
|
||||
var/obj/structure/obstacle = locate(/obj/structure, get_step(src, dir))
|
||||
if(istype(obstacle, /obj/structure/window) || istype(obstacle, /obj/structure/closet) || istype(obstacle, /obj/structure/table) || istype(obstacle, /obj/structure/grille))
|
||||
obstacle.attack_animal(src)
|
||||
//for(var/obj/structure/window/obstacle in get_step(src, dir))
|
||||
//if(obstacle.dir == reverse_dir[dir]) // So that windows get smashed in the right order
|
||||
//obstacle.attack_animal(src)
|
||||
//return
|
||||
//var/obj/structure/obstacle = locate(/obj/structure, get_step(src, dir))
|
||||
//if(istype(obstacle, /obj/structure/window) || istype(obstacle, /obj/structure/closet) || istype(obstacle, /obj/structure/table) || istype(obstacle, /obj/structure/grille))
|
||||
//obstacle.attack_animal(src)
|
||||
|
||||
@@ -20,7 +20,7 @@
|
||||
harm_intent_damage = 5
|
||||
melee_damage_lower = 8
|
||||
melee_damage_upper = 12
|
||||
attacktext = "attacks"
|
||||
attacktext = "attacked"
|
||||
attack_sound = 'sound/weapons/bite.ogg'
|
||||
|
||||
min_oxy = 0
|
||||
@@ -56,7 +56,7 @@
|
||||
// Aggro when you try to open them. Will also pickup loot when spawns and drop it when dies.
|
||||
/mob/living/simple_animal/hostile/mimic/crate
|
||||
|
||||
attacktext = "bites"
|
||||
attacktext = "bitten"
|
||||
|
||||
stop_automated_movement = 1
|
||||
wander = 0
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
harm_intent_damage = 5
|
||||
melee_damage_lower = 30
|
||||
melee_damage_upper = 30
|
||||
attacktext = "slashes"
|
||||
attacktext = "slashed"
|
||||
attack_sound = 'sound/weapons/bladeslice.ogg'
|
||||
|
||||
min_oxy = 5
|
||||
|
||||
@@ -21,7 +21,7 @@
|
||||
harm_intent_damage = 8
|
||||
melee_damage_lower = 10
|
||||
melee_damage_upper = 10
|
||||
attacktext = "attacks"
|
||||
attacktext = "attacked"
|
||||
attack_sound = 'sound/items/bikehorn.ogg'
|
||||
|
||||
min_oxy = 5
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
harm_intent_damage = 5
|
||||
melee_damage_lower = 15
|
||||
melee_damage_upper = 15
|
||||
attacktext = "punches"
|
||||
attacktext = "punched"
|
||||
a_intent = "harm"
|
||||
var/corpse = /obj/effect/landmark/mobcorpse/russian
|
||||
var/weapon1 = /obj/item/weapon/kitchenknife
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
harm_intent_damage = 5
|
||||
melee_damage_lower = 10
|
||||
melee_damage_upper = 10
|
||||
attacktext = "punches"
|
||||
attacktext = "punched"
|
||||
a_intent = "harm"
|
||||
var/corpse = /obj/effect/landmark/mobcorpse/syndicatesoldier
|
||||
var/weapon1
|
||||
@@ -55,7 +55,7 @@
|
||||
icon_living = "syndicatemelee"
|
||||
weapon1 = /obj/item/weapon/melee/energy/sword/red
|
||||
weapon2 = /obj/item/weapon/shield/energy
|
||||
attacktext = "slashes"
|
||||
attacktext = "slashed"
|
||||
status_flags = 0
|
||||
|
||||
/mob/living/simple_animal/hostile/syndicate/melee/attackby(var/obj/item/O as obj, var/mob/user as mob)
|
||||
@@ -144,7 +144,7 @@
|
||||
maxHealth = 15
|
||||
melee_damage_lower = 15
|
||||
melee_damage_upper = 15
|
||||
attacktext = "cuts"
|
||||
attacktext = "cut"
|
||||
attack_sound = 'sound/weapons/bladeslice.ogg'
|
||||
faction = "syndicate"
|
||||
min_oxy = 0
|
||||
|
||||
@@ -21,7 +21,7 @@
|
||||
harm_intent_damage = 5
|
||||
melee_damage_lower = 8
|
||||
melee_damage_upper = 12
|
||||
attacktext = "bites"
|
||||
attacktext = "bitten"
|
||||
attack_sound = 'sound/weapons/bite.ogg'
|
||||
|
||||
//Space carp aren't affected by atmos.
|
||||
|
||||
@@ -232,22 +232,6 @@
|
||||
drop_held_item(0)
|
||||
return
|
||||
|
||||
/mob/living/simple_animal/parrot/attack_paw(mob/living/carbon/monkey/M as mob)
|
||||
attack_hand(M)
|
||||
|
||||
//Simple animals
|
||||
/mob/living/simple_animal/parrot/attack_animal(mob/living/M as mob)
|
||||
if(client) return
|
||||
|
||||
|
||||
if(parrot_state == PARROT_PERCH)
|
||||
parrot_sleep_dur = parrot_sleep_max //Reset it's sleep timer if it was perched
|
||||
|
||||
if(M.melee_damage_upper > 0)
|
||||
parrot_interest = M
|
||||
parrot_state = PARROT_SWOOP | PARROT_ATTACK //Attack other animals regardless
|
||||
icon_state = "parrot_fly"
|
||||
|
||||
//Mobs with objects
|
||||
/mob/living/simple_animal/parrot/attackby(var/obj/item/O as obj, var/mob/user as mob)
|
||||
..()
|
||||
@@ -753,3 +737,21 @@
|
||||
if(!message || stat)
|
||||
return
|
||||
speech_buffer.Add(message)
|
||||
|
||||
/mob/living/simple_animal/parrot/attack_generic(var/mob/user, var/damage, var/attack_message)
|
||||
|
||||
var/success = ..()
|
||||
|
||||
if(client)
|
||||
return success
|
||||
|
||||
if(parrot_state == PARROT_PERCH)
|
||||
parrot_sleep_dur = parrot_sleep_max //Reset it's sleep timer if it was perched
|
||||
|
||||
if(!success)
|
||||
return 0
|
||||
|
||||
parrot_interest = user
|
||||
parrot_state = PARROT_SWOOP | PARROT_ATTACK //Attack other animals regardless
|
||||
icon_state = "parrot_fly"
|
||||
return success
|
||||
@@ -16,7 +16,7 @@
|
||||
response_harm = "punches the"
|
||||
melee_damage_lower = 5
|
||||
melee_damage_upper = 15
|
||||
attacktext = "drains the life from"
|
||||
attacktext = "drained the life from"
|
||||
minbodytemp = 0
|
||||
maxbodytemp = 4000
|
||||
min_oxy = 0
|
||||
|
||||
@@ -47,11 +47,12 @@
|
||||
var/speed = 0 //LETS SEE IF I CAN SET SPEEDS FOR SIMPLE MOBS WITHOUT DESTROYING EVERYTHING. Higher speed is slower, negative speed is faster
|
||||
|
||||
//LETTING SIMPLE ANIMALS ATTACK? WHAT COULD GO WRONG. Defaults to zero so Ian can still be cuddly
|
||||
melee_damage_lower = 0
|
||||
melee_damage_upper = 0
|
||||
attacktext = "attacks"
|
||||
attack_sound = null
|
||||
friendly = "nuzzles" //If the mob does no damage with it's attack
|
||||
var/melee_damage_lower = 0
|
||||
var/melee_damage_upper = 0
|
||||
var/attacktext = "attacked"
|
||||
var/attack_sound = null
|
||||
var/friendly = "nuzzles"
|
||||
var/wall_smash = 0
|
||||
|
||||
/mob/living/simple_animal/New()
|
||||
..()
|
||||
@@ -209,19 +210,6 @@
|
||||
if(act == "scream") act = "whimper" //ugly hack to stop animals screaming when crushed :P
|
||||
..(act, type, desc)
|
||||
|
||||
/mob/living/simple_animal/attack_animal(mob/living/M as mob)
|
||||
if(M.melee_damage_upper == 0)
|
||||
M.emote("[M.friendly] [src]")
|
||||
else
|
||||
if(M.attack_sound)
|
||||
playsound(loc, M.attack_sound, 50, 1, 1)
|
||||
for(var/mob/O in viewers(src, null))
|
||||
O.show_message("\red <B>[M]</B> [M.attacktext] [src]!", 1)
|
||||
M.attack_log += text("\[[time_stamp()]\] <font color='red'>attacked [src.name] ([src.ckey])</font>")
|
||||
src.attack_log += text("\[[time_stamp()]\] <font color='orange'>was attacked by [M.name] ([M.ckey])</font>")
|
||||
var/damage = rand(M.melee_damage_lower, M.melee_damage_upper)
|
||||
adjustBruteLoss(damage)
|
||||
|
||||
/mob/living/simple_animal/bullet_act(var/obj/item/projectile/Proj)
|
||||
if(!Proj || Proj.nodamage)
|
||||
return
|
||||
@@ -266,29 +254,6 @@
|
||||
|
||||
return
|
||||
|
||||
|
||||
/mob/living/simple_animal/attack_slime(mob/living/carbon/slime/M as mob)
|
||||
if (!ticker)
|
||||
M << "You cannot attack people before the game has started."
|
||||
return
|
||||
|
||||
if(M.Victim) return // can't attack while eating!
|
||||
|
||||
visible_message("\red <B>The [M.name] glomps [src]!</B>")
|
||||
|
||||
var/damage = rand(1, 3)
|
||||
|
||||
if(M.is_adult)
|
||||
damage = rand(20, 40)
|
||||
else
|
||||
damage = rand(5, 35)
|
||||
|
||||
adjustBruteLoss(damage)
|
||||
|
||||
|
||||
return
|
||||
|
||||
|
||||
/mob/living/simple_animal/attackby(var/obj/item/O as obj, var/mob/user as mob) //Marker -Agouri
|
||||
if(istype(O, /obj/item/stack/medical))
|
||||
|
||||
|
||||
@@ -57,7 +57,7 @@
|
||||
|
||||
melee_damage_lower = 10
|
||||
melee_damage_upper = 15
|
||||
attacktext = "bites"
|
||||
attacktext = "bitten"
|
||||
|
||||
animate_movement = SLIDE_STEPS
|
||||
|
||||
|
||||
@@ -921,10 +921,10 @@ note dizziness decrements automatically in the mob's Life() proc.
|
||||
return facedir(SOUTH)
|
||||
|
||||
|
||||
/mob/proc/IsAdvancedToolUser()//This might need a rename but it should replace the can this mob use things check
|
||||
//This might need a rename but it should replace the can this mob use things check
|
||||
/mob/proc/IsAdvancedToolUser()
|
||||
return 0
|
||||
|
||||
|
||||
/mob/proc/Stun(amount)
|
||||
if(status_flags & CANSTUN)
|
||||
stunned = max(max(stunned,amount),0) //can't go below 0, getting a low amount of stun doesn't lower your current stun
|
||||
|
||||
@@ -21,11 +21,6 @@
|
||||
|
||||
return
|
||||
|
||||
|
||||
/obj/item/weapon/paper_bin/attack_paw(mob/user as mob)
|
||||
return attack_hand(user)
|
||||
|
||||
|
||||
/obj/item/weapon/paper_bin/attack_hand(mob/user as mob)
|
||||
if (hasorgans(user))
|
||||
var/datum/organ/external/temp = user:organs_by_name["r_hand"]
|
||||
|
||||
@@ -18,9 +18,6 @@
|
||||
attack_ai(mob/user as mob)
|
||||
return attack_hand(user)
|
||||
|
||||
attack_paw(mob/user as mob)
|
||||
return attack_hand(user)
|
||||
|
||||
attack_hand(mob/user as mob)
|
||||
user.set_machine(src)
|
||||
|
||||
|
||||
@@ -64,12 +64,7 @@
|
||||
icon_state = "stamp-cent"
|
||||
item_color = "centcomm"
|
||||
|
||||
|
||||
/obj/item/weapon/stamp/attack_paw(mob/user as mob)
|
||||
return attack_hand(user)
|
||||
|
||||
// Syndicate stamp to forge documents.
|
||||
|
||||
/obj/item/weapon/stamp/chameleon/attack_self(mob/user as mob)
|
||||
|
||||
var/list/stamp_types = typesof(/obj/item/weapon/stamp) - src.type // Get all stamp types except our own
|
||||
|
||||
@@ -819,7 +819,6 @@
|
||||
if(inoperable())
|
||||
return 0
|
||||
if(!user.IsAdvancedToolUser())
|
||||
user << "<span class='warning'>You don't have the dexterity to use [src]!</span>"
|
||||
return 0
|
||||
if(user.restrained())
|
||||
user << "<span class='warning'>You must have free hands to use [src].</span>"
|
||||
|
||||
@@ -1,6 +1,3 @@
|
||||
/turf/simulated/floor/engine/attack_paw(var/mob/user as mob)
|
||||
return src.attack_hand(user)
|
||||
|
||||
/turf/simulated/floor/engine/attack_hand(var/mob/user as mob)
|
||||
if ((!( user.canmove ) || user.restrained() || !( user.pulling )))
|
||||
return
|
||||
|
||||
@@ -63,10 +63,6 @@
|
||||
break
|
||||
return foundgenerator
|
||||
|
||||
|
||||
/obj/machinery/computer/gravity_control_computer/attack_paw(mob/user as mob)
|
||||
return attack_hand(user)
|
||||
|
||||
/obj/machinery/computer/gravity_control_computer/attack_ai(mob/user as mob)
|
||||
return attack_hand(user)
|
||||
|
||||
|
||||
@@ -87,7 +87,7 @@
|
||||
/obj/machinery/light_construct/examine(mob/user)
|
||||
if(!..(user, 2))
|
||||
return
|
||||
|
||||
|
||||
switch(src.stage)
|
||||
if(1)
|
||||
user << "It's an empty frame."
|
||||
@@ -307,6 +307,17 @@
|
||||
if(on != on_gs)
|
||||
on_gs = on
|
||||
|
||||
/obj/machinery/light/attack_generic(var/mob/user, var/damage)
|
||||
if(!damage)
|
||||
return
|
||||
if(status == LIGHT_EMPTY||status == LIGHT_BROKEN)
|
||||
user << "That object is useless to you."
|
||||
return
|
||||
if(!(status == LIGHT_OK||status == LIGHT_BURNED))
|
||||
return
|
||||
visible_message("<span class='danger'>[user] smashes the light!</span>")
|
||||
broken()
|
||||
return 1
|
||||
|
||||
// attempt to set the light's on/off status
|
||||
// will not switch on if broken/burned/empty
|
||||
@@ -452,19 +463,8 @@
|
||||
src.flicker(1)
|
||||
return
|
||||
|
||||
/obj/machinery/light/attack_animal(mob/living/M)
|
||||
if(M.melee_damage_upper == 0) return
|
||||
if(status == LIGHT_EMPTY||status == LIGHT_BROKEN)
|
||||
M << "\red That object is useless to you."
|
||||
return
|
||||
else if (status == LIGHT_OK||status == LIGHT_BURNED)
|
||||
for(var/mob/O in viewers(src))
|
||||
O.show_message("\red [M.name] smashed the light!", 3, "You hear a tinkle of breaking glass", 2)
|
||||
broken()
|
||||
return
|
||||
// attack with hand - remove tube/bulb
|
||||
// if hands aren't protected and the light is on, burn the player
|
||||
|
||||
/obj/machinery/light/attack_hand(mob/user)
|
||||
|
||||
add_fingerprint(user)
|
||||
|
||||
@@ -266,9 +266,6 @@ display round(lastgen) and phorontank amount
|
||||
/obj/machinery/power/port_gen/pacman/attack_ai(mob/user as mob)
|
||||
interact(user)
|
||||
|
||||
/obj/machinery/power/port_gen/pacman/attack_paw(mob/user as mob)
|
||||
interact(user)
|
||||
|
||||
/obj/machinery/power/port_gen/pacman/interact(mob/user)
|
||||
if (get_dist(src, user) > 1 )
|
||||
if (!istype(user, /mob/living/silicon/ai))
|
||||
|
||||
@@ -74,7 +74,6 @@
|
||||
return
|
||||
|
||||
if (!user.IsAdvancedToolUser())
|
||||
user << "\red You don't have the dexterity to do this!"
|
||||
return
|
||||
if(istype(user, /mob/living))
|
||||
var/mob/living/M = user
|
||||
|
||||
@@ -39,7 +39,6 @@
|
||||
/obj/item/weapon/gun/launcher/Fire(atom/target as mob|obj|turf|area, mob/living/user as mob|obj, params, reflex = 0)
|
||||
|
||||
if (!user.IsAdvancedToolUser())
|
||||
user << "\red You don't have the dexterity to do this!"
|
||||
return 0
|
||||
|
||||
add_fingerprint(user)
|
||||
|
||||
@@ -172,9 +172,6 @@
|
||||
/obj/machinery/chem_dispenser/attack_ai(mob/user as mob)
|
||||
return src.attack_hand(user)
|
||||
|
||||
/obj/machinery/chem_dispenser/attack_paw(mob/user as mob)
|
||||
return src.attack_hand(user)
|
||||
|
||||
/obj/machinery/chem_dispenser/attack_hand(mob/user as mob)
|
||||
if(stat & BROKEN)
|
||||
return
|
||||
@@ -460,9 +457,6 @@
|
||||
/obj/machinery/chem_master/attack_ai(mob/user as mob)
|
||||
return src.attack_hand(user)
|
||||
|
||||
/obj/machinery/chem_master/attack_paw(mob/user as mob)
|
||||
return src.attack_hand(user)
|
||||
|
||||
/obj/machinery/chem_master/attack_hand(mob/user as mob)
|
||||
if(stat & BROKEN)
|
||||
return
|
||||
@@ -686,9 +680,6 @@
|
||||
/obj/machinery/computer/pandemic/attack_ai(mob/user as mob)
|
||||
return src.attack_hand(user)
|
||||
|
||||
/obj/machinery/computer/pandemic/attack_paw(mob/user as mob)
|
||||
return src.attack_hand(user)
|
||||
|
||||
/obj/machinery/computer/pandemic/attack_hand(mob/user as mob)
|
||||
if(stat & (NOPOWER|BROKEN))
|
||||
return
|
||||
@@ -922,9 +913,6 @@
|
||||
src.updateUsrDialog()
|
||||
return 0
|
||||
|
||||
/obj/machinery/reagentgrinder/attack_paw(mob/user as mob)
|
||||
return src.attack_hand(user)
|
||||
|
||||
/obj/machinery/reagentgrinder/attack_ai(mob/user as mob)
|
||||
return 0
|
||||
|
||||
|
||||
@@ -127,7 +127,7 @@
|
||||
if(istype(W,/obj/item/weapon/storage))
|
||||
..() // -> item/attackby()
|
||||
return
|
||||
|
||||
|
||||
// Eating with forks
|
||||
if(istype(W,/obj/item/weapon/kitchen/utensil))
|
||||
var/obj/item/weapon/kitchen/utensil/U = W
|
||||
@@ -156,16 +156,16 @@
|
||||
if (reagents.total_volume <= 0)
|
||||
del(src)
|
||||
return
|
||||
|
||||
|
||||
if (is_sliceable())
|
||||
//these are used to allow hiding edge items in food that is not on a table/tray
|
||||
var/can_slice_here = isturf(src.loc) && ((locate(/obj/structure/table) in src.loc) || (locate(/obj/machinery/optable) in src.loc) || (locate(/obj/item/weapon/tray) in src.loc))
|
||||
var/hide_item = !has_edge(W) || !can_slice_here
|
||||
|
||||
|
||||
if (hide_item)
|
||||
if (W.w_class >= src.w_class || W.is_robot_module())
|
||||
return
|
||||
|
||||
|
||||
user << "\red You slip [W] inside [src]."
|
||||
user.u_equip(W)
|
||||
if ((user.client && user.s_active != src))
|
||||
@@ -174,19 +174,19 @@
|
||||
add_fingerprint(user)
|
||||
contents += W
|
||||
return
|
||||
|
||||
|
||||
if (has_edge(W))
|
||||
if (!can_slice_here)
|
||||
user << "\red You cannot slice [src] here! You need a table or at least a tray to do it."
|
||||
return
|
||||
|
||||
|
||||
var/slices_lost = 0
|
||||
if (W.w_class > 3)
|
||||
user.visible_message("\blue [user] crudely slices \the [src] with [W]!", "\blue You crudely slice \the [src] with your [W]!")
|
||||
slices_lost = rand(1,min(1,round(slices_num/2)))
|
||||
else
|
||||
user.visible_message("\blue [user] slices \the [src]!", "\blue You slice \the [src]!")
|
||||
|
||||
|
||||
var/reagents_per_slice = reagents.total_volume/slices_num
|
||||
for(var/i=1 to (slices_num-slices_lost))
|
||||
var/obj/slice = new slice_path (src.loc)
|
||||
@@ -195,7 +195,7 @@
|
||||
return
|
||||
|
||||
/obj/item/weapon/reagent_containers/food/snacks/proc/is_sliceable()
|
||||
return (slices_num <= 0 || !slices_num || !slice_path)
|
||||
return (slices_num <= 0 || !slices_num || !slice_path)
|
||||
|
||||
/obj/item/weapon/reagent_containers/food/snacks/Del()
|
||||
if(contents)
|
||||
@@ -203,38 +203,27 @@
|
||||
something.loc = get_turf(src)
|
||||
..()
|
||||
|
||||
/obj/item/weapon/reagent_containers/food/snacks/attack_animal(var/mob/M)
|
||||
if(isanimal(M))
|
||||
if(iscorgi(M))
|
||||
if(bitecount == 0 || prob(50))
|
||||
M.emote("nibbles away at the [src]")
|
||||
bitecount++
|
||||
if(bitecount >= 5)
|
||||
var/sattisfaction_text = pick("burps from enjoyment", "yaps for more", "woofs twice", "looks at the area where the [src] was")
|
||||
if(sattisfaction_text)
|
||||
M.emote("[sattisfaction_text]")
|
||||
del(src)
|
||||
if(ismouse(M))
|
||||
var/mob/living/simple_animal/mouse/N = M
|
||||
N << text("\blue You nibble away at [src].")
|
||||
if(prob(50))
|
||||
N.visible_message("[N] nibbles away at [src].", "")
|
||||
//N.emote("nibbles away at the [src]")
|
||||
N.health = min(N.health + 1, N.maxHealth)
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
/// FOOD END
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
/obj/item/weapon/reagent_containers/food/snacks/attack_generic(var/mob/living/user)
|
||||
|
||||
if(isanimal(user) || isalien(user))
|
||||
|
||||
if(bitecount == 0 || prob(50))
|
||||
user.custom_emote(1,"nibbles away at the [src]")
|
||||
bitecount++
|
||||
|
||||
if(reagents && user.reagents)
|
||||
reagents.trans_to_ingest(user, bitesize)
|
||||
|
||||
spawn(5)
|
||||
if(!src && !user.client)
|
||||
user.custom_emote(1,"[pick("burps", "cries for more", "burps twice", "looks at the area where the food was")]")
|
||||
del(src)
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
On_Consume(user)
|
||||
|
||||
//////////////////////////////////////////////////
|
||||
////////////////////////////////////////////Snacks
|
||||
|
||||
@@ -14,10 +14,6 @@
|
||||
flags = FPRINT | TABLEPASS | OPENCONTAINER
|
||||
slot_flags = SLOT_BELT
|
||||
|
||||
/obj/item/weapon/reagent_containers/hypospray/attack_paw(mob/user as mob)
|
||||
return src.attack_hand(user)
|
||||
|
||||
|
||||
/obj/item/weapon/reagent_containers/hypospray/New() //comment this to make hypos start off empty
|
||||
..()
|
||||
reagents.add_reagent("tricordrazine", 30)
|
||||
|
||||
@@ -45,9 +45,6 @@
|
||||
..()
|
||||
update_icon()
|
||||
|
||||
attack_paw()
|
||||
return attack_hand()
|
||||
|
||||
attackby(obj/item/I as obj, mob/user as mob)
|
||||
|
||||
return
|
||||
@@ -308,9 +305,6 @@
|
||||
..()
|
||||
update_icon()
|
||||
|
||||
attack_paw()
|
||||
return attack_hand()
|
||||
|
||||
attackby(obj/item/I as obj, mob/user as mob)
|
||||
|
||||
return
|
||||
|
||||
@@ -204,31 +204,27 @@
|
||||
update()
|
||||
return
|
||||
|
||||
|
||||
// monkeys can only pull the flush lever
|
||||
/obj/machinery/disposal/attack_paw(mob/user as mob)
|
||||
if(stat & BROKEN)
|
||||
return
|
||||
|
||||
flush = !flush
|
||||
update()
|
||||
return
|
||||
|
||||
// ai as human but can't flush
|
||||
/obj/machinery/disposal/attack_ai(mob/user as mob)
|
||||
interact(user, 1)
|
||||
|
||||
// human interact with machine
|
||||
/obj/machinery/disposal/attack_hand(mob/user as mob)
|
||||
|
||||
if(stat & BROKEN)
|
||||
return
|
||||
|
||||
if(user && user.loc == src)
|
||||
usr << "\red You cannot reach the controls from inside."
|
||||
return
|
||||
/*
|
||||
if(mode==-1)
|
||||
usr << "\red The disposal units power is disabled."
|
||||
return
|
||||
*/
|
||||
interact(user, 0)
|
||||
|
||||
// Clumsy folks can only flush it.
|
||||
if(user.IsAdvancedToolUser(1))
|
||||
interact(user, 0)
|
||||
else
|
||||
flush = !flush
|
||||
update()
|
||||
return
|
||||
|
||||
// user interaction
|
||||
/obj/machinery/disposal/interact(mob/user, var/ai=0)
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
speed = 2
|
||||
melee_damage_lower = 5
|
||||
melee_damage_upper = 15
|
||||
attacktext = "mauls"
|
||||
attacktext = "mauled"
|
||||
cold_damage_per_tick = 0
|
||||
speak_chance = 5
|
||||
speak = list("Hruuugh!","Hrunnph")
|
||||
@@ -33,7 +33,7 @@
|
||||
speed = 1
|
||||
melee_damage_lower = 1
|
||||
melee_damage_upper = 8
|
||||
attacktext = "gouges"
|
||||
attacktext = "gouged"
|
||||
cold_damage_per_tick = 0
|
||||
speak_chance = 5
|
||||
speak = list("Awrr?","Aowrl!","Worrl")
|
||||
@@ -54,7 +54,7 @@
|
||||
speed = 1
|
||||
melee_damage_lower = 3
|
||||
melee_damage_upper = 12
|
||||
attacktext = "gouges"
|
||||
attacktext = "gouged"
|
||||
cold_damage_per_tick = 0
|
||||
speak_chance = 5
|
||||
speak = list("Shuhn","Shrunnph?","Shunpf")
|
||||
|
||||
@@ -24,10 +24,6 @@
|
||||
user << "The station AI is not to interact with these devices."
|
||||
return
|
||||
|
||||
/obj/machinery/keycard_auth/attack_paw(mob/user as mob)
|
||||
user << "You are too primitive to use this device."
|
||||
return
|
||||
|
||||
/obj/machinery/keycard_auth/attackby(obj/item/weapon/W as obj, mob/user as mob)
|
||||
if(stat & (NOPOWER|BROKEN))
|
||||
user << "This device is not powered."
|
||||
@@ -53,6 +49,8 @@
|
||||
if(user.stat || stat & (NOPOWER|BROKEN))
|
||||
user << "This device is not powered."
|
||||
return
|
||||
if(!user.IsAdvancedToolUser())
|
||||
return 0
|
||||
if(busy)
|
||||
user << "This device is busy."
|
||||
return
|
||||
|
||||
@@ -64,12 +64,6 @@
|
||||
else
|
||||
..()
|
||||
|
||||
/obj/machinery/shield_capacitor/attack_paw(user as mob)
|
||||
return src.attack_hand(user)
|
||||
|
||||
/obj/machinery/shield_capacitor/attack_ai(user as mob)
|
||||
return src.attack_hand(user)
|
||||
|
||||
/obj/machinery/shield_capacitor/attack_hand(mob/user)
|
||||
if(stat & (BROKEN))
|
||||
return
|
||||
|
||||
@@ -80,9 +80,6 @@
|
||||
else
|
||||
..()
|
||||
|
||||
/obj/machinery/shield_gen/attack_paw(user as mob)
|
||||
return src.attack_hand(user)
|
||||
|
||||
/obj/machinery/shield_gen/attack_ai(user as mob)
|
||||
return src.attack_hand(user)
|
||||
|
||||
@@ -146,16 +143,16 @@
|
||||
//figure out how much energy we need to draw from the capacitor
|
||||
if(active && owned_capacitor && owned_capacitor.active)
|
||||
var/target_renwick_increase = min(target_field_strength - average_field_strength, strengthen_rate) + renwick_upkeep_per_field //per field tile
|
||||
|
||||
|
||||
var/required_energy = field.len * target_renwick_increase / energy_conversion_rate
|
||||
var/assumed_charge = min(owned_capacitor.stored_charge, required_energy)
|
||||
total_renwick_increase = assumed_charge * energy_conversion_rate
|
||||
owned_capacitor.stored_charge -= assumed_charge
|
||||
else
|
||||
renwick_upkeep_per_field = max(renwick_upkeep_per_field, 0.5)
|
||||
|
||||
|
||||
var/renwick_increase_per_field = total_renwick_increase/field.len //per field tile
|
||||
|
||||
|
||||
average_field_strength = 0 //recalculate the average field strength
|
||||
for(var/obj/effect/energy_field/E in field)
|
||||
var/amount_to_strengthen = renwick_increase_per_field - renwick_upkeep_per_field
|
||||
@@ -164,7 +161,7 @@
|
||||
E.ticks_recovering -= 1
|
||||
else
|
||||
E.Strengthen(amount_to_strengthen)
|
||||
|
||||
|
||||
average_field_strength += E.strength
|
||||
|
||||
average_field_strength /= field.len
|
||||
@@ -190,7 +187,7 @@
|
||||
strengthen_rate = between(0, strengthen_rate + text2num(href_list["strengthen_rate"]), max_strengthen_rate)
|
||||
else if( href_list["target_field_strength"] )
|
||||
target_field_strength = between(1, target_field_strength + text2num(href_list["target_field_strength"]), max_field_strength)
|
||||
|
||||
|
||||
updateDialog()
|
||||
|
||||
/obj/machinery/shield_gen/ex_act(var/severity)
|
||||
@@ -236,24 +233,24 @@
|
||||
//grab the border tiles in a circle around this machine
|
||||
/obj/machinery/shield_gen/proc/get_shielded_turfs()
|
||||
var/list/out = list()
|
||||
|
||||
|
||||
var/turf/gen_turf = get_turf(src)
|
||||
if (!gen_turf)
|
||||
return
|
||||
|
||||
|
||||
var/turf/T
|
||||
for (var/x_offset = -field_radius; x_offset <= field_radius; x_offset++)
|
||||
T = locate(gen_turf.x + x_offset, gen_turf.y - field_radius, gen_turf.z)
|
||||
if (T) out += T
|
||||
|
||||
|
||||
T = locate(gen_turf.x + x_offset, gen_turf.y + field_radius, gen_turf.z)
|
||||
if (T) out += T
|
||||
|
||||
|
||||
for (var/y_offset = -field_radius+1; y_offset < field_radius; y_offset++)
|
||||
T = locate(gen_turf.x - field_radius, gen_turf.y + y_offset, gen_turf.z)
|
||||
if (T) out += T
|
||||
|
||||
|
||||
T = locate(gen_turf.x + field_radius, gen_turf.y + y_offset, gen_turf.z)
|
||||
if (T) out += T
|
||||
|
||||
|
||||
return out
|
||||
|
||||
@@ -7,10 +7,10 @@
|
||||
|
||||
/*
|
||||
How to tweak the SM
|
||||
|
||||
|
||||
POWER_FACTOR directly controls how much power the SM puts out at a given level of excitation (power var). Making this lower means you have to work the SM harder to get the same amount of power.
|
||||
CRITICAL_TEMPERATURE The temperature at which the SM starts taking damage.
|
||||
|
||||
|
||||
CHARGING_FACTOR Controls how much emitter shots excite the SM.
|
||||
DAMAGE_RATE_LIMIT Controls the maximum rate at which the SM will take damage due to high temperatures.
|
||||
*/
|
||||
@@ -77,7 +77,7 @@
|
||||
var/config_hallucination_power = 0.1
|
||||
|
||||
var/obj/item/device/radio/radio
|
||||
|
||||
|
||||
var/debug = 0
|
||||
|
||||
shard //Small subtype, less efficient and more sensitive, but less boom.
|
||||
@@ -203,7 +203,7 @@
|
||||
//If chain reacting at oxygen == 1, we want the power at 800 K to stabilize at a power level of 250
|
||||
equilibrium_power = 250
|
||||
icon_state = base_icon_state
|
||||
|
||||
|
||||
temp_factor = ( (equilibrium_power/DECAY_FACTOR)**3 )/800
|
||||
power = max( (removed.temperature * temp_factor) * oxygen + power, 0)
|
||||
|
||||
@@ -216,13 +216,13 @@
|
||||
var/heat_capacity = removed.heat_capacity()
|
||||
removed.adjust_multi("phoron", max(device_energy / PHORON_RELEASE_MODIFIER, 0), \
|
||||
"oxygen", max((device_energy + removed.temperature - T0C) / OXYGEN_RELEASE_MODIFIER, 0))
|
||||
|
||||
|
||||
var/thermal_power = THERMAL_RELEASE_MODIFIER * device_energy
|
||||
if (debug)
|
||||
var/heat_capacity_new = removed.heat_capacity()
|
||||
visible_message("[src]: Releasing [round(thermal_power)] W.")
|
||||
visible_message("[src]: Releasing additional [round((heat_capacity_new - heat_capacity)*removed.temperature)] W with exhaust gasses.")
|
||||
|
||||
|
||||
removed.add_thermal_energy(thermal_power)
|
||||
removed.temperature = between(0, removed.temperature, 10000)
|
||||
|
||||
@@ -255,11 +255,6 @@
|
||||
damage += Proj.damage * config_bullet_energy
|
||||
return 0
|
||||
|
||||
|
||||
/obj/machinery/power/supermatter/attack_paw(mob/user as mob)
|
||||
return attack_hand(user)
|
||||
|
||||
|
||||
/obj/machinery/power/supermatter/attack_robot(mob/user as mob)
|
||||
if(Adjacent(user))
|
||||
return attack_hand(user)
|
||||
@@ -282,7 +277,7 @@
|
||||
var/distance = get_dist(R, src)
|
||||
if(distance <= 15)
|
||||
//for collectors using standard phoron tanks at 1013 kPa, the actual power generated will be this power*POWER_FACTOR*20*29 = power*POWER_FACTOR*580
|
||||
R.receive_pulse(power * POWER_FACTOR * (min(3/distance, 1))**2)
|
||||
R.receive_pulse(power * POWER_FACTOR * (min(3/distance, 1))**2)
|
||||
return
|
||||
|
||||
/obj/machinery/power/supermatter/attackby(obj/item/weapon/W as obj, mob/living/user as mob)
|
||||
|
||||
@@ -100,15 +100,6 @@
|
||||
else
|
||||
..()
|
||||
|
||||
/obj/vehicle/attack_animal(var/mob/living/simple_animal/M as mob)
|
||||
if(M.melee_damage_upper == 0) return
|
||||
health -= M.melee_damage_upper
|
||||
src.visible_message("\red <B>[M] has [M.attacktext] [src]!</B>")
|
||||
M.attack_log += text("\[[time_stamp()]\] <font color='red'>attacked [src.name]</font>")
|
||||
if(prob(10))
|
||||
new /obj/effect/decal/cleanable/blood/oil(src.loc)
|
||||
healthcheck()
|
||||
|
||||
/obj/vehicle/bullet_act(var/obj/item/projectile/Proj)
|
||||
health -= Proj.damage
|
||||
..()
|
||||
@@ -355,4 +346,15 @@
|
||||
// Stat update procs
|
||||
//-------------------------------------------------------
|
||||
/obj/vehicle/proc/update_stats()
|
||||
return
|
||||
return
|
||||
|
||||
/obj/vehicle/attack_generic(var/mob/user, var/damage, var/attack_message)
|
||||
if(!damage)
|
||||
return
|
||||
visible_message("<span class='danger'>[user] [attack_message] the [src]!</span>")
|
||||
user.attack_log += text("\[[time_stamp()]\] <font color='red'>attacked [src.name]</font>")
|
||||
src.health -= damage
|
||||
if(prob(10))
|
||||
new /obj/effect/decal/cleanable/blood/oil(src.loc)
|
||||
spawn(1) healthcheck()
|
||||
return 1
|
||||
@@ -32,16 +32,11 @@
|
||||
state("The [src.name] Buzzes", "blue")
|
||||
return
|
||||
..()
|
||||
return
|
||||
return
|
||||
|
||||
/obj/machinery/computer/curer/attack_ai(var/mob/user as mob)
|
||||
return src.attack_hand(user)
|
||||
|
||||
/obj/machinery/computer/curer/attack_paw(var/mob/user as mob)
|
||||
|
||||
return src.attack_hand(user)
|
||||
return
|
||||
|
||||
/obj/machinery/computer/curer/attack_hand(var/mob/user as mob)
|
||||
if(..())
|
||||
return
|
||||
|
||||
@@ -36,9 +36,6 @@
|
||||
/obj/machinery/computer/diseasesplicer/attack_ai(var/mob/user as mob)
|
||||
return src.attack_hand(user)
|
||||
|
||||
/obj/machinery/computer/diseasesplicer/attack_paw(var/mob/user as mob)
|
||||
return src.attack_hand(user)
|
||||
|
||||
/obj/machinery/computer/diseasesplicer/attack_hand(var/mob/user as mob)
|
||||
if(..()) return
|
||||
ui_interact(user)
|
||||
|
||||
Reference in New Issue
Block a user