diff --git a/code/modules/projectiles/guns/oddity_items.dm b/code/modules/projectiles/guns/oddity_items.dm index bb6ac830247..65f361740c6 100644 --- a/code/modules/projectiles/guns/oddity_items.dm +++ b/code/modules/projectiles/guns/oddity_items.dm @@ -495,45 +495,115 @@ /obj/item/tool/nailstick/ogre name = "\"Oni\" Greatclub" desc = "An anomalous clothing created by rivals of the unknown person(or group?) of the bluecross, their work marked by a crimson cross, these items are known to vanish and reappear when left alone. \ - A wooden club inscribed with several symbols of jana, though they make no sense put together. The steel is of unusual qualities. \ - The more harmed you are harder it is to swing but the rubys glow more, melting through armor and flesh alike." + A stone club inscribed with several symbols of jana, though they make no sense put together. The steel is of unusual qualities. \ + When swinging against a tile or open air, a gemstone will hover in the air, hit it again to hit the gem at a nearby hostile target. \ + The more hurt the user is the sharper the gemstone will be." icon_state = "oni" //Sprite by cupofmothium damtype = BURN - force = WEAPON_FORCE_HARMLESS - throwforce = WEAPON_FORCE_HARMLESS + force = WEAPON_FORCE_ROBUST + throwforce = WEAPON_FORCE_ROBUST w_class = ITEM_SIZE_NORMAL armor_divisor = ARMOR_PEN_HALF structure_damage_factor = STRUCTURE_DAMAGE_DESTRUCTIVE tool_qualities = list(QUALITY_HAMMERING = 20) - max_upgrades = 2 + max_upgrades = 4 //Not that good price_tag = 3500 matter = list(MATERIAL_STEEL = 4, MATERIAL_MARBLE = 1) + var/GemCooldown = FALSE + var/GemCooldown_timer = 1 SECONDS + var/GemColor = "#ff0000" + var/GemType = /obj/item/projectile/blood_gen + var/GemDamage_Boost = 0 + var/friendly_fire_protection = TRUE + + embed_mult = 0 + +/obj/item/tool/nailstick/ogre/attack_self(mob/user) + friendly_fire_protection = !friendly_fire_protection + if(friendly_fire_protection) + to_chat(user, SPAN_NOTICE("Gemstones will now care about friendly fire.")) + else + to_chat(user, SPAN_NOTICE("Gemstones will not care about same faction or colony allies.")) + + +/obj/item/tool/nailstick/ogre/afterattack(atom/target, mob/user, proximity_flag, params) + . = ..() + if(proximity_flag && isturf(target)) + var/turf/T = get_turf(target) + for(var/obj/item/projectile/blood_gen/BG in T.contents) + var/obj/item/projectile/blood_gen/GB = BG + for(var/mob/M in view(5, user)) + if(M.stat != DEAD) + if(friendly_fire_protection) + if(M.faction != user.faction && M.colony_friend != user.colony_friend && M.friendly_to_colony != user.friendly_to_colony) + GB.launch(M) + GB.def_zone = BP_CHEST + GB.original_firer = user + GB.firer = user + GB.friendly_faction = user.faction + break + continue + if(M != user) + GB.launch(M) + GB.firer = user + GB.def_zone = BP_CHEST + GB.original_firer = user + + if(!GemCooldown) + GemCooldown = TRUE + addtimer(CALLBACK(src, PROC_REF(clear_cooldown)), GemCooldown_timer) + new GemType(T, src, GemColor, rand(0, 36) * 10, GemDamage_Boost) + playsound(T, 'sound/weapons/metal_disk_fick.ogg', 100) + +/obj/item/tool/nailstick/ogre/proc/clear_cooldown() + GemCooldown = FALSE + +/obj/item/projectile/blood_gen + var/time2activate = 7 SECONDS + icon_state = "gemstone" + icon = 'icons/obj/spatial_cut.dmi' + color = "#ff0000" + alpha = 150 + + damage_types = list(BURN = 5) + armor_divisor = 5 + + var/qdel_timer + var/friendly_faction = "" + +/obj/item/projectile/blood_gen/attack_mob(mob/living/target_mob, distance, miss_modifier=0) + //Anti-FF + if(friendly_faction == target_mob.faction) + return FALSE // so these pass through friends of the o.g shooter + if(original_firer == target_mob) + return FALSE // so these pass through the o.g shooter + ..() + +/obj/item/projectile/blood_gen/Initialize(mapload, obj/item/tool/nailstick/ogre/C, _color = color, _angle, GemDamage_Boost) + . = ..() + color = _color + qdel_timer = QDEL_IN(src, time2activate) + damage_types = list(BURN = 10, BRUTE = GemDamage_Boost) + /obj/item/tool/nailstick/ogre/resolve_attackby(atom/target, mob/user) - //Little icky but it works - var/safty_math = user.health - user.maxHealth - var/safty_health = max(1, user.health) - var/real_mod = 0 - var/delay_adder = user.maxHealth / safty_health + if(ishuman(user)) + var/mob/living/carbon/human/H = user + GemDamage_Boost = 0 + var/damages = H.getOxyLoss() + H.getBruteLoss() + H.getFireLoss() + + if(damages) + damages *= 0.2 -// message_admins("1ogre: safty_math [safty_math] safty_health [safty_health] delay_adder [delay_adder]") + GemDamage_Boost = damages + GemCooldown_timer = (1.5 + (damages / 10)) SECONDS - delay_adder = round(delay_adder) - delay_adder = clamp(delay_adder, 0, 8) -// message_admins("2ogre: safty_math [safty_math] safty_health [safty_health] delay_adder [delay_adder]") - real_mod += -safty_math - real_mod *= 0.5 //Insanely op + else -// message_admins("3ogre: safty_math [safty_math] safty_health [safty_health] delay_adder [delay_adder]") -// message_admins("4ogre: armor_divisor [armor_divisor]") - armor_divisor += real_mod -// message_admins("5ogre: armor_divisor [armor_divisor]") - clickdelay_offset = delay_adder + GemCooldown_timer = 2 SECONDS //Rack em up! .=..() - refresh_upgrades() - /obj/item/tool/knife/dagger/vail_render name = "\"Vail Render\" dagger" diff --git a/icons/obj/spatial_cut.dmi b/icons/obj/spatial_cut.dmi index 1d003c488d1..f81b4e5d5e2 100644 Binary files a/icons/obj/spatial_cut.dmi and b/icons/obj/spatial_cut.dmi differ diff --git a/sound/weapons/metal_disk_fick.ogg b/sound/weapons/metal_disk_fick.ogg new file mode 100644 index 00000000000..7ff75f71e66 Binary files /dev/null and b/sound/weapons/metal_disk_fick.ogg differ