Skip to content

Commit

Permalink
[MIRROR] Balance changes to swords, energy shields and modsuit shield…
Browse files Browse the repository at this point in the history
…s. [MDB IGNORE] (#1072)

* Balance changes to swords, energy shields and modsuit shields. (#80072)

---------

Co-authored-by: SkyratBot <[email protected]>
Co-authored-by: necromanceranne <[email protected]>
Co-authored-by: MrMelbert <51863163+MrMelbert@ users.noreply.github.com>
  • Loading branch information
4 people authored Dec 12, 2023
1 parent 44da490 commit cbc9583
Show file tree
Hide file tree
Showing 18 changed files with 85 additions and 34 deletions.
24 changes: 18 additions & 6 deletions code/game/objects/items/dualsaber.dm
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
item_flags = NO_BLOOD_ON_ITEM
var/w_class_on = WEIGHT_CLASS_BULKY
var/saber_color = "green"
var/two_hand_force = 34
var/two_hand_force = 40
var/hacked = FALSE
var/list/possible_colors = list("red", "blue", "green", "purple")

Expand Down Expand Up @@ -151,9 +151,21 @@
user.adjustStaminaLoss(25)

/obj/item/dualsaber/hit_reaction(mob/living/carbon/human/owner, atom/movable/hitby, attack_text = "the attack", final_block_chance = 0, damage = 0, attack_type = MELEE_ATTACK, damage_type = BRUTE)
if(HAS_TRAIT(src, TRAIT_WIELDED))
return ..()
return 0
if(!HAS_TRAIT(src, TRAIT_WIELDED))
return FALSE //not interested unless we're wielding

if(attack_type == PROJECTILE_ATTACK)
var/obj/projectile/our_projectile = hitby

if(our_projectile.reflectable)
final_block_chance = 0 //we handle this via IsReflect(), effectively 75% block
else
final_block_chance -= 25 //We aren't AS good at blocking physical projectiles, like ballistics and thermals

if(attack_type == LEAP_ATTACK)
final_block_chance -= 50 //We are particularly bad at blocking someone JUMPING at us..

return ..()

/obj/item/dualsaber/process()
if(HAS_TRAIT(src, TRAIT_WIELDED))
Expand All @@ -164,8 +176,8 @@
STOP_PROCESSING(SSobj, src)

/obj/item/dualsaber/IsReflect()
if(HAS_TRAIT(src, TRAIT_WIELDED))
return 1
if(HAS_TRAIT(src, TRAIT_WIELDED) && prob(block_chance))
return TRUE

/obj/item/dualsaber/ignition_effect(atom/A, mob/user)
// same as /obj/item/melee/energy, mostly
Expand Down
4 changes: 4 additions & 0 deletions code/game/objects/items/melee/energy.dm
Original file line number Diff line number Diff line change
Expand Up @@ -203,6 +203,10 @@
/obj/item/melee/energy/sword/hit_reaction(mob/living/carbon/human/owner, atom/movable/hitby, attack_text = "the attack", final_block_chance = 0, damage = 0, attack_type = MELEE_ATTACK, damage_type = BRUTE)
if(!HAS_TRAIT(src, TRAIT_TRANSFORM_ACTIVE))
return FALSE

if(attack_type == LEAP_ATTACK)
final_block_chance -= 25 //OH GOD GET IT OFF ME

return ..()

/obj/item/melee/energy/sword/cyborg
Expand Down
14 changes: 12 additions & 2 deletions code/game/objects/items/melee/misc.dm
Original file line number Diff line number Diff line change
Expand Up @@ -112,8 +112,8 @@
INVOKE_ASYNC(baned_target, TYPE_PROC_REF(/mob/living/carbon/human, emote), "scream")

/obj/item/melee/sabre/hit_reaction(mob/living/carbon/human/owner, atom/movable/hitby, attack_text = "the attack", final_block_chance = 0, damage = 0, attack_type = MELEE_ATTACK, damage_type = BRUTE)
if(attack_type == PROJECTILE_ATTACK)
final_block_chance = 0 //Don't bring a sword to a gunfight
if(attack_type == PROJECTILE_ATTACK || attack_type == LEAP_ATTACK)
final_block_chance = 0 //Don't bring a sword to a gunfight, and also you aren't going to really block someone full body tackling you with a sword
return ..()

/obj/item/melee/sabre/on_exit_storage(datum/storage/container)
Expand Down Expand Up @@ -191,6 +191,11 @@
hitsound = 'sound/weapons/rapierhit.ogg'
block_sound = 'sound/weapons/parry.ogg'

/obj/item/melee/beesword/hit_reaction(mob/living/carbon/human/owner, atom/movable/hitby, attack_text = "the attack", final_block_chance = 0, damage = 0, attack_type = MELEE_ATTACK, damage_type = BRUTE)
if(attack_type == PROJECTILE_ATTACK || attack_type == LEAP_ATTACK)
final_block_chance = 0 //Don't bring a sword to a gunfight, and also you aren't going to really block someone full body tackling you with a sword
return ..()

/obj/item/melee/beesword/afterattack(atom/target, mob/user, proximity)
. = ..()
if(!proximity)
Expand Down Expand Up @@ -482,3 +487,8 @@
armour_penetration = 50
attack_verb_continuous = list("smacks", "strikes", "cracks", "beats")
attack_verb_simple = list("smack", "strike", "crack", "beat")

/obj/item/melee/cleric_mace/hit_reaction(mob/living/carbon/human/owner, atom/movable/hitby, attack_text = "the attack", final_block_chance = 0, damage = 0, attack_type = MELEE_ATTACK, damage_type = BRUTE)
if(attack_type == PROJECTILE_ATTACK || attack_type == LEAP_ATTACK)
final_block_chance = 0 //Don't bring a...mace to a gunfight, and also you aren't going to really block someone full body tackling you with a mace
return ..()
27 changes: 23 additions & 4 deletions code/game/objects/items/shields.dm
Original file line number Diff line number Diff line change
Expand Up @@ -240,8 +240,8 @@
. += span_info("The mounted bulb has burnt out. You can try replacing it with a new <b>flash</b>.")

/obj/item/shield/energy
name = "energy combat shield"
desc = "A shield that reflects almost all energy projectiles, but is useless against physical attacks. It can be retracted, expanded, and stored anywhere."
name = "combat energy shield"
desc = "A hardlight shield capable of reflecting blocked energy projectiles, as well las providing well-rounded defense from most all other attacks."
icon_state = "eshield"
inhand_icon_state = "eshield"
w_class = WEIGHT_CLASS_TINY
Expand All @@ -261,6 +261,8 @@
var/active_throw_speed = 2
/// Whether clumsy people can transform this without side effects.
var/can_clumsy_use = FALSE
/// The chance for projectiles to be reflected by the shield
var/reflection_probability = 50

/obj/item/shield/energy/Initialize(mapload)
. = ..()
Expand All @@ -275,10 +277,19 @@
RegisterSignal(src, COMSIG_TRANSFORMING_ON_TRANSFORM, PROC_REF(on_transform))

/obj/item/shield/energy/hit_reaction(mob/living/carbon/human/owner, atom/movable/hitby, attack_text = "the attack", final_block_chance = 0, damage = 0, attack_type = MELEE_ATTACK, damage_type = BRUTE)
return FALSE
if(!HAS_TRAIT(src, TRAIT_TRANSFORM_ACTIVE))
return FALSE

if(attack_type == PROJECTILE_ATTACK)
var/obj/projectile/our_projectile = hitby

if(our_projectile.reflectable) //We handle this via IsReflect() instead.
final_block_chance = 0

return ..()

/obj/item/shield/energy/IsReflect()
return HAS_TRAIT(src, TRAIT_TRANSFORM_ACTIVE)
return HAS_TRAIT(src, TRAIT_TRANSFORM_ACTIVE) && prob(reflection_probability)

/*
* Signal proc for [COMSIG_TRANSFORMING_ON_TRANSFORM].
Expand All @@ -291,6 +302,14 @@
playsound(src, active ? 'sound/weapons/saberon.ogg' : 'sound/weapons/saberoff.ogg', 35, TRUE)
return COMPONENT_NO_DEFAULT_MESSAGE

/obj/item/shield/energy/advanced
name = "advanced combat energy shield"
desc = "A hardlight shield capable of reflecting all energy projectiles, as well las providing well-rounded defense from most all other attacks. \
Often employed by Nanotrasen deathsquads."
icon_state = "advanced_eshield"
inhand_icon_state = "advanced_eshield"
reflection_probability = 100 //Guaranteed reflection

/obj/item/shield/riot/tele
name = "telescopic shield"
desc = "An advanced riot shield made of lightweight materials that collapses for easy storage."
Expand Down
2 changes: 1 addition & 1 deletion code/game/objects/items/storage/toolbox.dm
Original file line number Diff line number Diff line change
Expand Up @@ -418,7 +418,7 @@
dog_fashion = null

/obj/item/storage/toolbox/guncase/doublesword
name = "double-energy sword weapon case"
name = "double-bladed energy sword weapon case"
weapon_to_spawn = /obj/item/dualsaber
extra_to_spawn = /obj/item/soap/syndie

Expand Down
1 change: 1 addition & 0 deletions code/game/objects/items/storage/uplink_kits.dm
Original file line number Diff line number Diff line change
Expand Up @@ -627,6 +627,7 @@
new /obj/item/card/emag/doorjack (src)
new /obj/item/reagent_containers/hypospray/medipen/stimulants (src)
new /obj/item/grenade/c4 (src)
new /obj/item/mod/module/energy_shield(src)

/// Surplus Ammo Box

Expand Down
5 changes: 5 additions & 0 deletions code/game/objects/items/weaponry.dm
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,11 @@ for further reading, please see: https://github.com/tgstation/tgstation/pull/301
user.visible_message(span_suicide("[user] is falling on [src]! It looks like [user.p_theyre()] trying to commit suicide!"))
return BRUTELOSS

/obj/item/claymore/hit_reaction(mob/living/carbon/human/owner, atom/movable/hitby, attack_text = "the attack", final_block_chance = 0, damage = 0, attack_type = MELEE_ATTACK, damage_type = BRUTE)
if(attack_type == PROJECTILE_ATTACK || attack_type == LEAP_ATTACK)
final_block_chance = 0 //Don't bring a sword to a gunfight, and also you aren't going to really block someone full body tackling you with a sword
return ..()

//statistically similar to e-cutlasses
/obj/item/claymore/cutlass
name = "cutlass"
Expand Down
2 changes: 1 addition & 1 deletion code/modules/clothing/outfits/ert.dm
Original file line number Diff line number Diff line change
Expand Up @@ -442,7 +442,7 @@
mask = /obj/item/clothing/mask/gas/sechailer/swat
shoes = /obj/item/clothing/shoes/combat/swat
l_pocket = /obj/item/melee/energy/sword/saber
r_pocket = /obj/item/shield/energy
r_pocket = /obj/item/shield/energy/advanced
l_hand = /obj/item/gun/energy/pulse/loyalpin

skillchips = list(
Expand Down
4 changes: 2 additions & 2 deletions code/modules/jobs/job_types/chaplain/chaplain_nullrod.dm
Original file line number Diff line number Diff line change
Expand Up @@ -136,8 +136,8 @@
menu_description = "A sharp claymore which provides a low chance of blocking incoming melee attacks. Can be worn on the back or belt."

/obj/item/nullrod/claymore/hit_reaction(mob/living/carbon/human/owner, atom/movable/hitby, attack_text = "the attack", final_block_chance = 0, damage = 0, attack_type = MELEE_ATTACK, damage_type = BRUTE)
if(attack_type == PROJECTILE_ATTACK)
final_block_chance = 0 //Don't bring a sword to a gunfight
if(attack_type == PROJECTILE_ATTACK || attack_type == LEAP_ATTACK)
final_block_chance = 0 //Don't bring a sword to a gunfight, and also you aren't going to really block someone full body tackling you with a sword
return ..()

/obj/item/nullrod/claymore/darkblade
Expand Down
4 changes: 2 additions & 2 deletions code/modules/mining/lavaland/tendril_loot.dm
Original file line number Diff line number Diff line change
Expand Up @@ -1003,8 +1003,8 @@
return ..()

/obj/item/cursed_katana/hit_reaction(mob/living/carbon/human/owner, atom/movable/hitby, attack_text = "the attack", final_block_chance = 0, damage = 0, attack_type = MELEE_ATTACK, damage_type = BRUTE)
if(attack_type == PROJECTILE_ATTACK)
final_block_chance = 0 //Don't bring a sword to a gunfight
if(attack_type == PROJECTILE_ATTACK || attack_type == LEAP_ATTACK)
final_block_chance = 0 //Don't bring a sword to a gunfight, and also you aren't going to really block someone full body tackling you with a sword
return ..()

/obj/item/cursed_katana/proc/can_combo_attack(mob/user, mob/living/target)
Expand Down
6 changes: 3 additions & 3 deletions code/modules/mod/modules/modules_antag.dm
Original file line number Diff line number Diff line change
Expand Up @@ -88,16 +88,16 @@
desc = "A personal, protective forcefield typically seen in military applications. \
This advanced deflector shield is essentially a scaled down version of those seen on starships, \
and the power cost can be an easy indicator of this. However, it is capable of blocking nearly any incoming attack, \
though with its' low amount of separate charges, the user remains mortal."
but only once every few seconds; a grim reminder of the users mortality."
icon_state = "energy_shield"
complexity = 3
idle_power_cost = DEFAULT_CHARGE_DRAIN * 0.5
use_power_cost = DEFAULT_CHARGE_DRAIN * 2
incompatible_modules = list(/obj/item/mod/module/energy_shield)
/// Max charges of the shield.
var/max_charges = 3
var/max_charges = 1
/// The time it takes for the first charge to recover.
var/recharge_start_delay = 20 SECONDS
var/recharge_start_delay = 10 SECONDS
/// How much time it takes for charges to recover after they started recharging.
var/charge_increment_delay = 1 SECONDS
/// How much charge is recovered per recovery.
Expand Down
4 changes: 2 additions & 2 deletions code/modules/projectiles/guns/magic/staff.dm
Original file line number Diff line number Diff line change
Expand Up @@ -262,8 +262,8 @@
)

/obj/item/gun/magic/staff/spellblade/hit_reaction(mob/living/carbon/human/owner, atom/movable/hitby, attack_text = "the attack", final_block_chance = 0, damage = 0, attack_type = MELEE_ATTACK, damage_type = BRUTE)
if(attack_type == PROJECTILE_ATTACK)
final_block_chance = 0
if(attack_type == PROJECTILE_ATTACK || attack_type == LEAP_ATTACK)
final_block_chance = 0 //Don't bring a sword to a gunfight, and also you aren't going to really block someone full body tackling you with a sword
return ..()

/obj/item/gun/magic/staff/locker
Expand Down
4 changes: 2 additions & 2 deletions code/modules/uplink/uplink_items/dangerous.dm
Original file line number Diff line number Diff line change
Expand Up @@ -61,11 +61,11 @@
/datum/uplink_item/dangerous/doublesword
name = "Double-Bladed Energy Sword"
desc = "The double-bladed energy sword does slightly more damage than a standard energy sword and will deflect \
all energy projectiles, but requires two hands to wield."
energy projectiles it blocks, but requires two hands to wield. It also struggles to protect you from tackles."
progression_minimum = 30 MINUTES
item = /obj/item/dualsaber

cost = 16
cost = 13
purchasable_from = ~(UPLINK_NUKE_OPS | UPLINK_CLOWN_OPS) //nukies get their own version

/datum/uplink_item/dangerous/doublesword/get_discount_value(discount_type)
Expand Down
18 changes: 9 additions & 9 deletions code/modules/uplink/uplink_items/nukeops.dm
Original file line number Diff line number Diff line change
Expand Up @@ -47,12 +47,12 @@

/datum/uplink_item/weapon_kits/core
name = "Core Equipment Box (Essential)"
desc = "This box contains an airlock authentification override card, a C-4 explosive charge, a freedom implant and a stimpack injector. \
desc = "This box contains an airlock authentification override card, a MODsuit energy shield module, a C-4 explosive charge, a freedom implant and a stimpack injector. \
The most important support items for most operatives to succeed in their mission, bundled together. It is highly recommend you buy this kit. \
Note: This bundle is not at a discount. You can purchase all of these items separately. You do not NEED these items, but most operatives fail WITHOUT at \
least SOME of these items. More experienced operatives can do without."
item = /obj/item/storage/box/syndie_kit/core_gear
cost = 14 //freedom 5, doormag 3, c-4 1, stimpack 5
cost = 22 //freedom 5, doormag 3, c-4 1, stimpack 5, shield modsuit module 8
limited_stock = 1
cant_discount = TRUE
purchasable_from = UPLINK_NUKE_OPS
Expand Down Expand Up @@ -172,8 +172,8 @@

/datum/uplink_item/weapon_kits/medium_cost/sword_and_board
name = "Energy Shield and Sword Case (Very Hard)"
desc = "A case containing an energy sword and energy shield. The shield is capable of deflecting \
energy and laser projectiles, and the sword most forms of attack. Perfect for the enterprising nuclear knight. "
desc = "A case containing an energy sword and energy shield. Paired together, it provides considerable defensive power without lethal potency. \
Perfect for the enterprising nuclear knight. Comes with a medieval helmet for your MODsuit!"
item = /obj/item/storage/toolbox/guncase/sword_and_board

/datum/uplink_item/weapon_kits/medium_cost/cqc
Expand Down Expand Up @@ -354,8 +354,8 @@
item = /obj/item/ammo_box/magazine/sniper_rounds/marksman

/datum/uplink_item/weapon_kits/high_cost/doublesword
name = "Double-Energy Sword Case (Very Hard)"
desc = "A case containing a double-energy sword, anti-slip module, meth autoinjector, and a bar of soap. \
name = "Double-Bladed Energy Sword Case (Very Hard)"
desc = "A case containing a double-bladed energy sword, anti-slip module, meth autoinjector, and a bar of soap. \
Some say the most infamous nuclear operatives utilized this combination of equipment to slaughter hundreds \
of Nanotrasen employees. However, some also say this is an embellishment from the Tiger Co-operative. \
The soap did most of the work. Comes with a prisoner uniform so you fit the part."
Expand Down Expand Up @@ -595,10 +595,10 @@

/datum/uplink_item/suits/energy_shield
name = "MODsuit Energy Shield Module"
desc = "An energy shield module for a MODsuit. The shields can handle up to three impacts \
within a short duration and will rapidly recharge while not under fire."
desc = "An energy shield module for a MODsuit. The shields can stop a single impact \
before needing to recharge. Used wisely, this module will keep you alive for a lot longer."
item = /obj/item/mod/module/energy_shield
cost = 15
cost = 8
purchasable_from = UPLINK_NUKE_OPS | UPLINK_CLOWN_OPS

/datum/uplink_item/suits/emp_shield
Expand Down
Binary file modified icons/mob/clothing/back.dmi
Binary file not shown.
Binary file modified icons/mob/inhands/equipment/shields_lefthand.dmi
Binary file not shown.
Binary file modified icons/mob/inhands/equipment/shields_righthand.dmi
Binary file not shown.
Binary file modified icons/obj/weapons/shields.dmi
Binary file not shown.

0 comments on commit cbc9583

Please sign in to comment.