diff --git a/code/game/objects/items/shields.dm b/code/game/objects/items/shields.dm index fc7b196bd2..1459afeb2d 100644 --- a/code/game/objects/items/shields.dm +++ b/code/game/objects/items/shields.dm @@ -197,10 +197,10 @@ if(obj_integrity >= max_integrity) to_chat(user, "[src] is already in perfect condition.") else - var/obj/item/stack/sheet/mineral/titanium/T = W - T.use(1) + var/obj/item/stack/S = W + S.use(1) obj_integrity = max_integrity - to_chat(user, "You repair [src] with [T].") + to_chat(user, "You repair [src] with [S].") else return ..() diff --git a/code/modules/antagonists/clockcult/clock_items/clock_weapons/ratvarian_shield.dm b/code/modules/antagonists/clockcult/clock_items/clock_weapons/ratvarian_shield.dm new file mode 100644 index 0000000000..a681e9b38b --- /dev/null +++ b/code/modules/antagonists/clockcult/clock_items/clock_weapons/ratvarian_shield.dm @@ -0,0 +1,82 @@ +//Subtype of (riot) shield because of already implemented shieldbash stuff aswell as integrity and simillar things +//ratvarian shield: A shield that absorbs energy from attacks and uses it to empower its bashes with remendous force. It is also quite resistant to damage, though less so against lasers and energy weaponry. + +/obj/item/shield/riot/ratvarian + name = "ratvarian shield" + icon_state = "ratvarian_shield" //Its icons are in the same place the normal shields are in + item_state = "ratvarian_shield" + desc = "A resilient shield made out of brass.. It feels warm to the touch." + var/clockwork_desc = "A powerful shield of ratvarian making. It absorbs blocked attacks to charge devastating bashes." + armor = list("melee" = 80, "bullet" = 70, "laser" = -10, "energy" = -20, "bomb" = 60, "bio" = 0, "rad" = 0, "fire" = 100, "acid" = 100) + shield_flags = SHIELD_FLAGS_DEFAULT + max_integrity = 300 //High integrity, extremely strong against melee / bullets, but still quite easy to destroy with lasers and energy + repair_material = /obj/item/stack/tile/brass + var/dam_absorbed = 0 + var/bash_mult_steps = 30 + var/max_bash_mult = 4 + +/obj/item/shield/riot/ratvarian/examine(mob/user) + if((is_servant_of_ratvar(user) || isobserver(user))) + desc = clockwork_desc + desc +="\n The shield has absorbed [dam_absorbed] damage, multiplying the effectiveness of its bashes by [calc_bash_mult()]" + . = ..() + desc = initial(desc) + +obj/item/shield/riot/ratvarian/proc/calc_bash_mult() + var/bash_mult = 0 + if(!dam_absorbed) + return 1 + else + bash_mult += round(clamp(1 + (dam_absorbed / bash_mult_steps), 1, max_bash_mult), 0.1) //Multiplies the effect of bashes by up to [max_bash_mult], though never less than one + return bash_mult + +/obj/item/shield/riot/ratvarian/proc/calc_bash_absorb_use() + var/absorb_use = 0 + absorb_use = max(0, round(dam_absorbed * (calc_bash_mult() / round(1 + (dam_absorbed / bash_mult_steps), 0.1)), 1)) //Calculates how much of the absorbed damage the bash would actually use, so its not wasted + return absorb_use + +/obj/item/shield/riot/ratvarian/on_shield_block(mob/living/owner, atom/object, damage, attack_text, attack_type, armour_penetration, mob/attacker, def_zone, final_block_chance, list/block_return) + if(!damage) + return ..() + + if(!is_servant_of_ratvar(owner)) + owner.visible_message("As [owner] blocks the attack with [src], [owner.p_they()] suddenly drops it, whincing in pain! ", "As you block the attack with [src], it heats up tremendously, forcing you to drop it from the pain alone! ") + owner.emote("scream") + playsound(src, 'sound/machines/fryer/deep_fryer_emerge.ogg', 50) + if(iscarbon(owner)) //Type safety for if a drone somehow got a shield (ratvar protect us) + var/mob/living/carbon/C = owner + var/obj/item/bodypart/part = C.get_holding_bodypart_of_item(src) + C.apply_damage((iscultist(C) ? damage * 2 : damage), BURN, (istype(part, /obj/item/bodypart/l_arm) ? BODY_ZONE_L_ARM : BODY_ZONE_R_ARM)) //Deals the damage to the holder instead of absorbing it instead + forcedrops. Doubled if a cultist of Nar'Sie. + else + owner.adjustFireLoss(iscultist(owner) ? damage * 2 : damage) + addtimer(CALLBACK(owner, /mob/living.proc/dropItemToGround, src, TRUE), 1) + else if(!is_servant_of_ratvar(attacker)) //No exploiting my snowflake mechanics + dam_absorbed += damage + playsound(owner, 'sound/machines/clockcult/steam_whoosh.ogg', 30) + + if(damage <= 10) //The shield itself is hard to break, this DOES NOT modify the actual blocking-mechanic + damage = 0 + else + damage -= 5 + return ..() + +/obj/item/shield/riot/ratvarian/shatter(mob/living/carbon/human/owner) + playsound(owner, 'sound/magic/clockwork/anima_fragment_death.ogg', 50) + new /obj/item/clockwork/alloy_shards/large(get_turf(src)) + +/obj/item/shield/riot/ratvarian/user_shieldbash(mob/living/user, atom/target, harmful) + if(!harmful || !is_servant_of_ratvar(user)) // No fun for non-clockies, but you can keep the normal bashes. Until you try to block with it. + shieldbash_knockback = initial(shieldbash_knockback) + shieldbash_brutedamage = initial(shieldbash_brutedamage) //Prevention for funky stuff that might happen otherwise + shieldbash_stamdmg = initial(shieldbash_stamdmg) + return ..() + var/actual_bash_mult = calc_bash_mult() + shieldbash_knockback = round(initial(shieldbash_knockback) * actual_bash_mult, 1) //Modifying the strength of the bash, done with initial() to prevent magic-number issues if the original shieldbash values are changed + shieldbash_brutedamage = round(initial(shieldbash_brutedamage) * actual_bash_mult, 1) //Where I think of it, better round this stuff because we don't need even more things that deal like 3.25 damage + shieldbash_stamdmg = round(initial(shieldbash_stamdmg) * actual_bash_mult, 1) //Like 20 brute and 60 stam + a fuckton of knockback at the moment (at maximum charge), seems mostly fine? I think? + . = ..() + if(.) //If this bash actually hit someone + if(actual_bash_mult > 1) + playsound(user, 'sound/magic/fireball.ogg', 50, TRUE, frequency = 1.25) + dam_absorbed -= calc_bash_absorb_use() + return diff --git a/code/modules/antagonists/clockcult/clock_scriptures/scripture_scripts.dm b/code/modules/antagonists/clockcult/clock_scriptures/scripture_scripts.dm index 130fc24583..c40168a986 100644 --- a/code/modules/antagonists/clockcult/clock_scriptures/scripture_scripts.dm +++ b/code/modules/antagonists/clockcult/clock_scriptures/scripture_scripts.dm @@ -100,6 +100,24 @@ quickbind = TRUE quickbind_desc = "Creates a Judicial Visor, which can smite an area, applying Belligerent and briefly stunning." +//Nezbere's shield: Creates a ratvarian shield which absorbs attacks, see ratvarian_shield.dm for details. +/datum/clockwork_scripture/create_object/nezberes_shield + descname = "Shield with empowerable bashes" + name = "Nezbere's shield" + desc = "Creates a shield which generates charge from blocking damage, using it to empower its bashes tremendously. It is repaired with brass, and while very durable, extremely weak to lasers and, even more so, to energy weaponry." + invocations = list("Shield me...", "... from the coming dark!") + channel_time = 20 + power_cost = 600 //Shouldn't be too spammable but not too hard to get either + whispered = TRUE + creator_message = "You form a ratvarian shield, which is capable of absorbing blocked attacks to empower its bashes." + object_path = /obj/item/shield/riot/ratvarian + usage_tip = "Bashes will only use charge when performed with intent to harm." + tier = SCRIPTURE_SCRIPT + space_allowed = TRUE + primary_component = VANGUARD_COGWHEEL + sort_priority = 5 + quickbind = TRUE + quickbind_desc = "Creates a Ratvarian shield, which can absorb energy from attacks for use in powerful bashes." //Clockwork Armaments: Grants the invoker the ability to call forth a Ratvarian spear and clockwork armor. /datum/clockwork_scripture/clockwork_armaments @@ -113,7 +131,7 @@ usage_tip = "Throwing the spear at a mob will do massive damage and knock them down, but break the spear. You will need to wait for 30 seconds before resummoning it." tier = SCRIPTURE_SCRIPT primary_component = VANGUARD_COGWHEEL - sort_priority = 5 + sort_priority = 6 important = TRUE quickbind = TRUE quickbind_desc = "Permanently binds clockwork armor and a Ratvarian spear to you." @@ -213,7 +231,7 @@ usage_tip = "This gateway is strictly one-way and will only allow things through the invoker's portal." tier = SCRIPTURE_SCRIPT primary_component = GEIS_CAPACITOR - sort_priority = 6 + sort_priority = 7 quickbind = TRUE quickbind_desc = "Allows you to create a one-way Spatial Gateway to a living Servant or Clockwork Obelisk." diff --git a/icons/mob/inhands/equipment/shields_lefthand.dmi b/icons/mob/inhands/equipment/shields_lefthand.dmi index 24bb824f1d..850bbaa043 100644 Binary files a/icons/mob/inhands/equipment/shields_lefthand.dmi and b/icons/mob/inhands/equipment/shields_lefthand.dmi differ diff --git a/icons/mob/inhands/equipment/shields_righthand.dmi b/icons/mob/inhands/equipment/shields_righthand.dmi index 31d84f480c..d4db35b9b2 100644 Binary files a/icons/mob/inhands/equipment/shields_righthand.dmi and b/icons/mob/inhands/equipment/shields_righthand.dmi differ diff --git a/icons/obj/shields.dmi b/icons/obj/shields.dmi index ed528d4a5a..c8b1110e1a 100644 Binary files a/icons/obj/shields.dmi and b/icons/obj/shields.dmi differ diff --git a/tgstation.dme b/tgstation.dme index f9f13c44a5..d6df631966 100755 --- a/tgstation.dme +++ b/tgstation.dme @@ -1468,6 +1468,7 @@ #include "code\modules\antagonists\clockcult\clock_items\soul_vessel.dm" #include "code\modules\antagonists\clockcult\clock_items\wraith_spectacles.dm" #include "code\modules\antagonists\clockcult\clock_items\clock_weapons\_call_weapon.dm" +#include "code\modules\antagonists\clockcult\clock_items\clock_weapons\ratvarian_shield.dm" #include "code\modules\antagonists\clockcult\clock_items\clock_weapons\ratvarian_spear.dm" #include "code\modules\antagonists\clockcult\clock_mobs\_eminence.dm" #include "code\modules\antagonists\clockcult\clock_mobs\clockwork_marauder.dm"