diff --git a/code/modules/awaymissions/mission_code/ghost_role_spawners/golems.dm b/code/modules/awaymissions/mission_code/ghost_role_spawners/golems.dm index f064f4c27b6..636204c296e 100644 --- a/code/modules/awaymissions/mission_code/ghost_role_spawners/golems.dm +++ b/code/modules/awaymissions/mission_code/ghost_role_spawners/golems.dm @@ -132,11 +132,4 @@ desc = "A humanoid shape, empty, lifeless, and full of potential." mob_name = "a free golem" can_transfer = FALSE - mob_species = /datum/species/golem/adamantine - -/obj/effect/mob_spawn/human/golem/adamantine/New() //check config to see if we allow free golems to spawn - ..() - if(!config.unrestricted_free_golems && (GAMEMODE_IS_BLOB || GAMEMODE_IS_NUCLEAR || GAMEMODE_IS_WIZARD)) - qdel(src) - else if(!prob(config.prob_free_golems)) - qdel(src) \ No newline at end of file + mob_species = /datum/species/golem/adamantine \ No newline at end of file diff --git a/code/modules/mob/living/carbon/human/human_defense.dm b/code/modules/mob/living/carbon/human/human_defense.dm index bcff3030376..965a2c81ab2 100644 --- a/code/modules/mob/living/carbon/human/human_defense.dm +++ b/code/modules/mob/living/carbon/human/human_defense.dm @@ -10,7 +10,8 @@ emp_act /mob/living/carbon/human/bullet_act(obj/item/projectile/P, def_zone) - + if(!dna.species.bullet_act(P, src)) + return FALSE if(P.is_reflectable) if(check_reflect(def_zone)) // Checks if you've passed a reflection% check visible_message("The [P.name] gets reflected by [src]!", \ @@ -295,6 +296,8 @@ emp_act if(Iforce > 10 || Iforce >= 5 && prob(33)) forcesay(GLOB.hit_appends) //forcesay checks stat already + dna.species.spec_attacked_by(I, user, affecting, user.a_intent, src) + //this proc handles being hit by a thrown atom /mob/living/carbon/human/hitby(atom/movable/AM, skipcatch = 0, hitpush = 1, blocked = 0) var/obj/item/I @@ -321,6 +324,8 @@ emp_act visible_message("[I] embeds itself in [src]'s [L.name]!","[I] embeds itself in your [L.name]!") hitpush = 0 skipcatch = 1 //can't catch the now embedded item + if(!blocked) + dna.species.spec_hitby(AM, src) return ..() /mob/living/carbon/human/proc/bloody_hands(var/mob/living/source, var/amount = 2) diff --git a/code/modules/mob/living/carbon/human/species/_species.dm b/code/modules/mob/living/carbon/human/species/_species.dm index d07ef2b9f32..f1aa0928e21 100644 --- a/code/modules/mob/living/carbon/human/species/_species.dm +++ b/code/modules/mob/living/carbon/human/species/_species.dm @@ -360,6 +360,8 @@ var/datum/unarmed_attack/attack = user.dna.species.unarmed user.do_attack_animation(target, attack.animation_type) + if(attack.harmless) + target.visible_message("[user] [pick(attack.attack_verb)]ed [target]!") add_attack_logs(user, target, "Melee attacked with fists", target.ckey ? null : ATKLOG_ALL) if(!iscarbon(user)) @@ -509,6 +511,7 @@ var/miss_sound = 'sound/weapons/punchmiss.ogg' var/sharp = FALSE var/animation_type = ATTACK_EFFECT_PUNCH + var/harmless = FALSE //if set to true, attacks won't be admin logged and punches will "hit" for no damage /datum/unarmed_attack/diona attack_verb = list("lash", "bludgeon") @@ -719,6 +722,13 @@ It'll return null if the organ doesn't correspond, so include null checks when u if(abs(temperature - M.bodytemperature) > 10) //If our water and mob temperature varies by more than 10K, cool or/ heat them appropriately M.bodytemperature = (temperature + M.bodytemperature) * 0.5 //Approximation for gradual heating or cooling +/datum/species/proc/bullet_act(obj/item/projectile/P, mob/living/carbon/human/H) //return TRUE if hit, FALSE if stopped/reflected/etc + return TRUE + +/datum/species/proc/spec_hitby(atom/movable/AM, mob/living/carbon/human/H) + +/datum/species/proc/spec_attacked_by(obj/item/I, mob/living/user, obj/item/bodypart/affecting, intent, mob/living/carbon/human/H) + /proc/get_random_species(species_name = FALSE) // Returns a random non black-listed or hazardous species, either as a string or datum var/static/list/random_species = list() if(!random_species.len) diff --git a/code/modules/mob/living/carbon/human/species/golem.dm b/code/modules/mob/living/carbon/human/species/golem.dm index f2e0ad753eb..3dfc01f0e27 100644 --- a/code/modules/mob/living/carbon/human/species/golem.dm +++ b/code/modules/mob/living/carbon/human/species/golem.dm @@ -85,7 +85,7 @@ H.equip_to_slot_or_del(new /obj/item/clothing/shoes/golem(H), slot_shoes) H.equip_to_slot_or_del(new /obj/item/clothing/mask/gas/golem(H), slot_wear_mask) H.equip_to_slot_or_del(new /obj/item/clothing/gloves/golem(H), slot_gloves) - H.skin_colour = golem_colour + //H.skin_colour = golem_colour H.regenerate_icons() to_chat(H, info_text) @@ -386,16 +386,16 @@ for(var/i=1, i <= rand(3, 5), i++) new /obj/item/stack/ore/glass(get_turf(H)) qdel(H) -/* + /datum/species/golem/sand/bullet_act(obj/item/projectile/P, mob/living/carbon/human/H) if(!(P.original == H && P.firer == H)) if(P.flag == "bullet" || P.flag == "bomb") playsound(H, 'sound/effects/shovel_dig.ogg', 70, 1) H.visible_message("The [P.name] sinks harmlessly in [H]'s sandy body!", \ "The [P.name] sinks harmlessly in [H]'s sandy body!") - return BULLET_ACT_BLOCK - return BULLET_ACT_HIT -*/ + return FALSE + return TRUE + /datum/unarmed_attack/golem/sand attack_sound = 'sound/effects/shovel_dig.ogg' @@ -419,21 +419,28 @@ for(var/i=1, i <= rand(3, 5), i++) new /obj/item/shard(get_turf(H)) qdel(H) -/* + /datum/species/golem/glass/bullet_act(obj/item/projectile/P, mob/living/carbon/human/H) if(!(P.original == H && P.firer == H)) //self-shots don't reflect - if(P.flag == "laser" || P.flag == "energy") + if(P.is_reflectable) H.visible_message("The [P.name] gets reflected by [H]'s glass skin!", \ "The [P.name] gets reflected by [H]'s glass skin!") if(P.starting) var/new_x = P.starting.x + pick(0, 0, 0, 0, 0, -1, 1, -2, 2) var/new_y = P.starting.y + pick(0, 0, 0, 0, 0, -1, 1, -2, 2) - var/turf/target = get_turf(P.starting) + var/turf/curloc = get_turf(H) + // redirect the projectile - P.preparePixelProjectile(locate(CLAMP(target.x + new_x, 1, world.maxx), CLAMP(target.y + new_y, 1, world.maxy), H.z), H) - return BULLET_ACT_FORCE_PIERCE - return BULLET_ACT_HIT -*/ + P.firer = src + P.original = locate(new_x, new_y, P.z) + P.starting = curloc + P.current = curloc + P.yo = new_y - curloc.y + P.xo = new_x - curloc.x + P.Angle = null + return FALSE + return TRUE + /datum/unarmed_attack/golem/glass attack_sound = 'sound/effects/glassbr2.ogg' @@ -473,7 +480,6 @@ do_teleport(H, picked) return TRUE -/* /datum/species/golem/bluespace/spec_hitby(atom/movable/AM, mob/living/carbon/human/H) ..() var/obj/item/I @@ -494,11 +500,11 @@ if(world.time > last_teleport + teleport_cooldown && user != H) reactive_teleport(H) -/datum/species/golem/bluespace/on_hit(obj/item/projectile/P, mob/living/carbon/human/H) - ..() +/datum/species/golem/bluespace/bullet_act(obj/item/projectile/P, mob/living/carbon/human/H) if(world.time > last_teleport + teleport_cooldown) reactive_teleport(H) -*/ + return TRUE + /datum/species/golem/bluespace/on_species_gain(mob/living/carbon/C, datum/species/old_species) ..() if(ishuman(C)) @@ -568,8 +574,8 @@ golem_colour = "ff0" //say_mod = "honks" punchdamagelow = 0 - punchdamagehigh = 1 - punchstunthreshold = 2 //Harmless and can't stun + punchdamagehigh = 0 + punchstunthreshold = 1 //Harmless and can't stun skinned_type = /obj/item/stack/ore/bananium info_text = "As a Bananium Golem, you are made for pranking. Your body emits natural honks, and you can barely even hurt people when punching them. Your skin also bleeds banana peels when damaged." prefix = "Bananium" @@ -587,7 +593,6 @@ last_banana = world.time last_honk = world.time H.job = "Clown" - H.mutations.Add(CLUMSY) H.mutations.Add(COMIC) H.equip_to_slot_or_del(new /obj/item/reagent_containers/food/drinks/bottle/bottleofbanana(H), slot_r_store) H.equip_to_slot_or_del(new /obj/item/bikehorn(H), slot_l_store) @@ -595,7 +600,7 @@ /datum/species/golem/bananium/get_random_name() var/golem_name = pick(GLOB.clown_names) return golem_name -/* + /datum/species/golem/bananium/spec_attack_hand(mob/living/carbon/human/M, mob/living/carbon/human/H, datum/martial_art/attacker_style) ..() if(world.time > last_banana + banana_cooldown && M != H && M.a_intent != INTENT_HELP) @@ -608,11 +613,11 @@ new/obj/item/grown/bananapeel/specialpeel(get_turf(H)) last_banana = world.time -/datum/species/golem/bananium/on_hit(obj/item/projectile/P, mob/living/carbon/human/H) - ..() +/datum/species/golem/bananium/bullet_act(obj/item/projectile/P, mob/living/carbon/human/H) if(world.time > last_banana + banana_cooldown) new/obj/item/grown/bananapeel/specialpeel(get_turf(H)) last_banana = world.time + return TRUE /datum/species/golem/bananium/spec_hitby(atom/movable/AM, mob/living/carbon/human/H) ..() @@ -624,7 +629,7 @@ else new/obj/item/grown/bananapeel/specialpeel(get_turf(H)) last_banana = world.time -*/ + /datum/species/golem/bananium/handle_life(mob/living/carbon/human/H) if(!active) if(world.time > last_honk + honkooldown) @@ -639,8 +644,10 @@ playsound(get_turf(H), 'sound/misc/sadtrombone.ogg', 70, 0) /datum/unarmed_attack/golem/bananium - attack_verb = list("honk") + attack_verb = list("HONK") attack_sound = 'sound/items/airhorn2.ogg' + animation_type = ATTACK_EFFECT_DISARM + harmless = TRUE //... /datum/species/golem/tranquillite