Skip to content

Commit

Permalink
Bulk combat changes; Armor Divisors, bullet balance, mob health/armor…
Browse files Browse the repository at this point in the history
…, etc. (#5029)

* Impliments Eris style armor-divisors. Tweaks bullets

oh my GOD holy FUCK jesus CHRIST. ports discordia-space/CEV-Eris#7353

Currently not working but saving my progress here.

* first workiing version.

Ports even more random bullshit from Upstream to get this working. SEEMS to function and has no serious runtimes on basic testing but some behaviors seem odd(HP does less damage than its wounding would suggest against unarmored targets. Possibly because of lower armor divisor?)

* Update code/game/machinery/vendor/misc_vendors.dm

* Update code/game/objects/items/stacks/matter_synth.dm

* Reduces mag capacity of 12mms which are frankly disgustiing right now lmfao. They're back to 7/5(auto/revolver). Also nukes mob-modifiers and fixes them to mesh with new code. Generally weak mobs don't get to have modifiers other than speed

Also ports MORE coe that Rebel and Co.:tm: failed to port when doing erismed 4 and seems to have fixed wounding mults to...actually work.

* tweaks

Slugs AP down from 2 to 1.5
slug damage down to from 45 to 35
slugs wounding from 1.5 to 1.25
big mobs(berserkers, nightmares, renders) all given a pretty significant boost in armor rating up to 100% more.  - Note, simple mobs armor appears to not function as expected so this may make 0 difference.
Hopefuly fixes mobs not taking halloss and brings agony armor to the same standard as other combat armor types. For future reference, if your mob is meant to be pain immune make it 100 or whatever other arbitrary number.

Moves the last of the guns with agony damage to halloss in line with other weapons.

Nerfs buckshot a tiny bit, halloss 5-0, damage 15-16(remember that these numbers be applied up to 4 times depending on range.)

Brass kit pen bonus down from 1 to 0.5
other weapon mods that give penetration generally reduced in effectiveness(by about half on average).

unfucks the clothing readout, it has obscuration + stiffness again.

adds some new greebles to the gun info readout(including roughly how much damage it'll do against various levels of armor. for reference, 10 armor is the bullet armor of a plate carrier.

Another small note, the numbers displayed in the info tab SHOULD be accurate but please let me know(with specific detail) if you find any of them are or feel off, the most info the better.

* more tweaks

Tweaks the balance on some weapon mods, particularly those that remove armor pen multiplier.

Hopefuly fixes the issue with supereffective damage being bork'd.

makes HP/rubbers not sharp, makes HV sharp(this was a weird choice anyway and was causing issues).

Nukes halloss from HP, raises HP damage a bit. They should generally perform akin to ball with better damage against unarmored/soft targets.

also fixes a misstype <:3 oops

* SLIGHTLY functional. Fixes a few bugs.

* updates to master or something

* Fixes, more more fixes.

Rats are no longer immune to bullets.

Simplemobs are no longer immune to bullets.

Wield Delay Factor raised from 0 to 2, this will result in a slightly higher amount of time to wield(and thus higher vig needed to instant wield) but my testing didn't....really show that it was super significant. you can still instant wield a nagant with 25 vig(starting for BS) and i suspect this may need to be tweaked later.

* fixes some armor values that i forgot to set. Oops lol!

* [BOUNTY] MELEE REWORK! (#7780)

* Bring back the past

* spears can't broadstrike

* ui

* Fixes and indicators

* push attack

* fixes

* intervention attacks

* distant attacks

* human shield grabfu

* fixes part 3 the fixes strike back electric boogaloo

* fxi + grab stuff

* Update human_defense.dm

* Apply suggestions from code review

Co-authored-by: Pink-Chink <[email protected]>

* Update melee.dm

* Update item_attack.dm

* Update item_attack.dm

* Update item_attack.dm

* Update living_defense.dm

* Update item_attack.dm

* Update item_attack.dm

* last one?

* yep

* Update alerts.dmi

Co-authored-by: Pink-Chink <[email protected]>

* Makes melee less cringe (#7801)

* melee is less cringe

* pulling attacks

* better name for attacks

* Update code/modules/mob/living/carbon/human/human.dm

* Update code/modules/mob/living/carbon/human/human_defense.dm

Co-authored-by: Firefox13 <[email protected]>
Co-authored-by: hyperioo <[email protected]>

* Another(last one) batch of melee rework fixes (#7821)

* afsd

* Update energy.dm

* Update code/modules/mob/living/carbon/human/human_defense.dm

Co-authored-by: KIROV#6255 <[email protected]>

* Update human_defense.dm

Co-authored-by: KIROV#6255 <[email protected]>

* Update mob_grab_specials.dm

* double tact changes (#7847)

* Blocking(melee) (#7704)

* Update click.dm

* blockin'

* fixing

* fixes and hud

* fixes

* god help me

* Update base_screen_objects.dm

* PIECE OF FUCKING SHITTY GARBAGE

* DONE?!

* Finally done.

* Update human_defense.dm

* hotkey command hijinks

* visual clue

* rng gone

* tgui shit

i swear if it breaks something

* Update human_attackhand.dm

* Update human_attackhand.dm

* Revert "tgui shit"

This reverts commit 944a03e04333a5a15e56241ae573c7f749de5c0d.

* Apply suggestions from code review

Co-authored-by: Pink-Chink <[email protected]>

Co-authored-by: Pink-Chink <[email protected]>

* Eris melee, Eris blocking, oprobably more bugs,

* i hate code.

comments out ricochet mod, may or may not have been working but needs tweaking anyway.

attempts to fix a bug where weapons/projectiles with the sharp flag didn't cause damage to structures.

creates some new defines for fast-tweaking mob health. Not actually implemented fully yet, but look forward to that.

* fixes 'n nuffs.

claymore is bulky, gets double tact.
absolute shortsword is not bulky, now normal size with some "extra bulk" added

facto and psi omnitools no longer have double tact.

Some minor fixes for info displays for armor/tools/weapons.

Gleam midlaser undone, has a proper heavy laser like its parent again.

* more tweaks.

TK no longer suffers from windup on every swing.

some more RIGs have a bit of ablative above standard.

HP have less base damage so they actually function as intended.

Buffs baseline plasma & light plasma bolt by like, five points each.

* ugh

fixes penetration mods making guns AP go down instead of up.

* more fixes

Spiders have had their health reduced by half across the board.

Injection armor resistance math works again

Armor divisor readout fixed.

turns out i fucked up the math on armor divisor multipliers for firearms and most of them actually had less than 1(because it was intended to b additive, which wew handle differently to Eris. This has been fixed, guns will no longer make their own divisor lesser unless its on purpose. oopsie!
armor divisor multiplier fixed fr fr this time, oops.

fixes bluecross armor math, maybe.  oops!

* Update vacuum.dm

tersus no longer has double tact.

* NERFS

Actually implements more of the mob health defines, and makes the following tweaks.

Termite health cut by 50%

Cavemob(Wurms/Sargoyle) cut by 25%

ameridien golem health cut by 50%

Weak greyson mobs(roomba/drones) cut by 20%

Robust greyson mobs(Synths/mechs) cut by 30%

Voidwolf healths cut by 25%

psimobs health cut by 50%

Daskvey mobs health cut by 40%

* buffs guns, nerfs not guns

Full auto no longer carries a -0.2 damage penalty.

* ygh

guns display pain they inflict properly again.

Double tact no longer applies to bulky items that aren't wielded, now only applies to HUGE items that aren't wielded and anything larger, period.

Negative proj_pen_base now actually displays it as a downside.

voidwolf reavers and excelsior mindslaves no longer use HV ammo- they're dangerous enough without hitscan AP stuff. if this neuters them too much we will adjust to some inbetween.

OKB given armor against pain, radiation and bio. because duh.

* ugh

updates a comment

No losing double-tact by wielding huge items. all huge items will have double tact.

Vexilar forceblade doesn't get broad strikes due to bugs but also due to the fact that it does as much damage as a halberd without double-tact.

* more fixes

nerfs excel bear health from 400-300

nerfs excelsior universal healthmod by about 30%

MAYBE fixes armor divisors being weird?

Buffs AP rounds so that they aren't just worse ball. They now have the same wounding mult as ball while having far more AP.

Generally nerfs ball a bit- primarily in terms of armor divisor. This won't make a HUGE difference in PVE as you'll still generally want that upfront damage unless fighting unarmored enemies(in which case HP all the way).

scattershot buffed. More damage, much more pellets.

Mech HMG buffed a good bit, previous damage was....sub 9mm.

buffs shotgun slugs, doubles their AP to compensate for their damage/ammo setup not REALLY being quite as good as say....8.6. Now itll be your relatively cheap armor-cracker.

slightly buffs biomatter slugs with 1 more AD

Potentiallly after these changes get some testing specialized armors may get a bit of a buff due to how armor now works so that they *actually* provide good defense at higher levels, obviously we want bulletproof to be able to resist some bullets.

* FUUCK

Vigilance AP scaling is dead.

places a missing if statement that was causing certain machines/structurse to be immune to impaling/piercing type damage(including HV damage :D )

fixes energy armor on BS ablative gear

fixes mods giving way too much pen-mult. oops(again. Again.)

* small fixes

Greyson limbs have more armor again

armblade(and by extension wolverine claws) have gotten a damage buff as well as sharp/edge.

The armblade(but 'not' wolverine claws) have gotten a buff to their speed.

Kitchen knife(and by extension all subtypes) get slightly faster attacks. As do butterfly/switchblades

* oopslol, now it compiles

* whatever

Halberd now has 3 mods instead of 1. the single mod slot was an eris change that we're tossing.

Sanctifier no longer gives flat 8 damage, now instead gives + 25% damage. Holy oils no longer give flat 8 damage, now give 30% bonus damage.  This is intended to hopefuly dial back on gamer builds for melee weapons that doo 100+ damage.

probably fixes tasers not caring about energy armor.

shields can block projectiles again. bust out the AP

Human shields are no longer able to protect you if they are dead.

energy spear gets reach.

RIGs have a cost now.

Hussar rig has had a nerf to its ablative armor due to ease of production.

* borg gun buff

defense borg gun was still suffering from -0.2 damage as well as having slightly worse(-0.1) damage than its namesake. it has been unfucked.

* more random trash

tweaks some damage values. Generally, HV/HP have been given more damage to hopefully narrow the gap between them and ball in their niche.

Pistols have lost some AP but gained a lil damage(except for 9mm

beams have gotten some adjustment, getting some more AD/wounding mult depending on beam.

* Update living_defense.dm

trilby code to make rubbers not be hard-meta because they ignore armor l o l

* Tabs in, like I SAID

* fuck my life.

WO armor no longer has ERT armor level ablative armor

ERT RIG has proper levels of ablative

CO/WO rig have proper levels of ablative.

voidwolf reavers no longer have shell casings that are full bullets, oops

actually fixes the CO tan armor sprite for womyn

* fixes n balanzs

repairing RIGs ablative armor is now slower and more difficult, you may wish to go to the guild to get this done.

12mm mag/speedloaders no longer lie about capacity.

hydrogen sword/esword no longer have double tact. e-sword now has 40dam, same as the hydrogen sword.

full-sized gladstone no longer has 0.1 armor divisor, oops lol

Harm intent now stops you from interacting with walls with tools, hitting the wall instead. use any other intent if you want to work on it.

Diamond edge no longer accepts prying as a valid quality

Whetstone may no longer be attached to tools with hammering quality

* complie

* yea

BS prosthetics have the same armor as Soteria limbs now.

Excelsior prosthetics buffed a bit, now 10 across the board, still worse than the armor but not by too much.

dreamdaemon and stalker armor stats swapped.

whetstone no longer blacklisted from tools with hammering.

diamond edge may be placed on prying stuff again.

obj/item/too./hammer and subtypes blacklisted from getting whetstone & diamond edge. they're hammers

energy cutlass damage nerfed to be equivalent to the handmade version. get the real one if you want big boy sword.

hypersaw/chainsaw now have 15 basedamage and 2x damage when on, this gives it the same damage while hopefuly making it less OP when modded and gives them a (small) buff of 2 points.  For reference, a chainsaw fully modded(whetstone, diamond edge, expansion slot, sanctifier, and exp fuel tank) does about 70 damage, hypersaw would do a bit less since it has one less slot. chainsaw is now bulky.

* yea

plasma/light given a 0.35 nerf to its AD to bring it more in line with previous uses as a fast but low-penetrating projectile.

Warhammer given more damage/AP

Halberd made more expensive, worse AP, more damage.

Scourge given less AP(whip form has negative AP) and a bit more damage.

Flanged mace AD reduced

longsword ad reduced, damage raised slightly

Shortsword AD reduced

* Update scrap.dm

hammers will no longer attempt to cube scrap if you are on harm intent.

* Update skin.dmf

blocking now keyed to V instead of F.

* makes it compile

* Update data_star.dm

* cherry picks the artist PR into mine, oops

* Update living_defense.dm

makes it compile. apparently switch values need to be low to high now, lol

* Revert "Update data_star.dm"

This reverts commit 663bf5e.

* Update human_attackhand.dm

* Update human_attackhand.dm

* Update human_attackhand.dm

---------

Co-authored-by: ErisMeleeEnjoyer <[email protected]>
Co-authored-by: Pink-Chink <[email protected]>
Co-authored-by: Alliostra <[email protected]>
Co-authored-by: Firefox13 <[email protected]>
Co-authored-by: hyperioo <[email protected]>
Co-authored-by: KIROV#6255 <[email protected]>
Co-authored-by: Trilby <[email protected]>
Co-authored-by: Trilbyspaceclone <[email protected]>
  • Loading branch information
9 people authored Jul 12, 2024
1 parent a405073 commit 418a060
Show file tree
Hide file tree
Showing 289 changed files with 3,618 additions and 2,469 deletions.
9 changes: 9 additions & 0 deletions code/__DEFINES/items_clothing.dm
Original file line number Diff line number Diff line change
Expand Up @@ -239,3 +239,12 @@
#define MEDIUM_OBSCURATION 3
#define HEAVY_OBSCURATION 5

//RIG ablation
#define ABLATION_CERAMIC 3
#define ABLATION_SOFT 5
#define ABLATION_STANDARD 10
#define ABLATION_RESILIENT 15
#define ABLATION_DURABLE 20
#define ABLATION_EVERLASTING 30

//Style amount
6 changes: 4 additions & 2 deletions code/__DEFINES/misc.dm
Original file line number Diff line number Diff line change
Expand Up @@ -181,8 +181,10 @@


// Special return values from bullet_act(). Positive return values are already used to indicate the blocked level of the projectile.
#define PROJECTILE_CONTINUE -1 //if the projectile should continue flying after calling bullet_act()
#define PROJECTILE_FORCE_MISS -2 //if the projectile should treat the attack as a miss (suppresses attack and admin logs) - only applies to mobs.
#define PROJECTILE_STOP 1 //if the projectile should stop flying after calling bullet_act()
#define PROJECTILE_CONTINUE -1 //if the projectile should continue flying after calling bullet_act()
#define PROJECTILE_FORCE_MISS -2 //if the projectile should treat the attack as a miss (suppresses attack and admin logs) - only applies to mobs.
#define PROJECTILE_FORCE_MISS_SILENCED -2.5 //if the projectile should do the same thing as above, but not give the miss message

//Camera capture modes
#define CAPTURE_MODE_REGULAR 0 //Regular polaroid camera mode
Expand Down
36 changes: 31 additions & 5 deletions code/__DEFINES/mobs.dm
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@
#define DEFAULT_ATTACK_COOLDOWN 8 //Default timeout for aggressive actions
#define DEFAULT_QUICK_COOLDOWN 4

#define FAST_WEAPON_COOLDOWN 3
#define FAST_WEAPON_COOLDOWN -2
#define DEFAULT_WEAPON_COOLDOWN 5
#define SLOW_WEAPON_COOLDOWN 7

Expand All @@ -112,6 +112,32 @@
#define MOB_TINY 5
#define MOB_MINISCULE 1

// Defines mob health modifier, all mobs of a subtype will have their health modified by this. Mobs may have multiple types, attached to a max() operator.
// Mobs may have multiple types, attached to a max() operator. this is mostly because some 'miscelaneous' mobs are grouped more generally.
// If you don't see something here that seems to fit what you want, it may very well not have a define.
#define ROACH_HEALTH_MOD 1 //all roaches other than kaisers./
#define SPIDER_HEALTH_MOD 0.5 //all spiders other than reapers./
#define TERMITE_HEALTH_MOD 0.5 //all termites./
#define CAVEMOB_HEALTH_MOD 0.70 //wurms, Sargoyle./
#define AMGOLEM_HEALTH_MOD 0.70 //ameridien golems./
#define CHURCHMOB_HEALTH_MOD 1 //Rooks and other church related mobs.
#define XENOMORPH_HEALTH_MOD 1 //Xenos, duh. includes queens.
#define REPUBLICON_HEALTH_MOD 1 //preppers bots, including seekers and drones.
#define GREYSONWEAK_HEALTH_MOD 0.8 //Weak greyson bots
#define GREYSONROBUST_HEALTH_MOD 0.70 //Strong greyson bots
#define CARP_HEALTH_MOD 1 //All space carp./
#define VOIDWOLF_HEALTH_MOD 0.75 //all voidwolves other than reavers.
#define MEGAFAUNA_HEALTH_MOD 1 //all megafauna other than levaiathans. Renders, mukwah, nightmare stalkers.
#define VOXBIRD_HEALTH_MOD 1 //all the tribal birds./
#define EXCELSIOR_HEALTH_MOD 0.7 //all the excelsior mobs, including mindslaves, and bears.
#define LEVIATHAN_HEALTH_MOD 1 //leviathans; Kaiser, Reaper, Patriarch, etc./
#define PSIMOB_HEALTH_MOD 0.5 //Deepmaints mobs other than bosses./
#define DVEY_HEALTH_MOD 0.6 //'corrupted beings', I.E Daskvey and their pets./
#define PSIBOSS_HEALTH_MOD 1 //deepmaints bosses, be careful with this one. it's generally preferable to manually tweak them because they're...yknow, uniques./




// Defines how strong the species is compared to humans. Think like strength in D&D
#define STR_VHIGH 2
#define STR_HIGH 1
Expand Down Expand Up @@ -366,10 +392,10 @@

// Termite defines

#define TERMITE_HEALTH_LOW 20
#define TERMITE_HEALTH_MED 45
#define TERMITE_HEALTH_HIGH 70
#define TERMITE_HEALTH_ULTRA 100
#define TERMITE_HEALTH_LOW 20 * TERMITE_HEALTH_MOD
#define TERMITE_HEALTH_MED 45 * TERMITE_HEALTH_MOD
#define TERMITE_HEALTH_HIGH 70 * TERMITE_HEALTH_MOD
#define TERMITE_HEALTH_ULTRA 100 * TERMITE_HEALTH_MOD

#define TERMITE_DMG_LOW 15
#define TERMITE_DMG_MED 25
Expand Down
31 changes: 19 additions & 12 deletions code/__DEFINES/weapons.dm
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,14 @@
#define WEAPON_FORCE_GODLIKE 88 // currently only used by the energy axe, which can only be obtained via admin verbs

//Armor Penetration: Ignores a certain amount of armor for the purposes of inflicting damage.
#define ARMOR_PEN_GRAZING 5
#define ARMOR_PEN_SHALLOW 10
#define ARMOR_PEN_MODERATE 15
#define ARMOR_PEN_DEEP 20
#define ARMOR_PEN_EXTREME 25
#define ARMOR_PEN_MASSIVE 30
#define ARMOR_PEN_HALF 50
#define ARMOR_PEN_GRAZING 1.2
#define ARMOR_PEN_SHALLOW 1.4
#define ARMOR_PEN_MODERATE 1.6
#define ARMOR_PEN_DEEP 1.8
#define ARMOR_PEN_HALF 2
#define ARMOR_PEN_EXTREME 2.5
#define ARMOR_PEN_MASSIVE 3
#define ARMOR_PEN_MAX 10

//Wounding Multiplier: Increases damage taken, applied after armor.
#define WOUNDING_HARMLESS 0.25
Expand All @@ -28,7 +29,13 @@
#define WOUNDING_SERIOUS 1.25
#define WOUNDING_WIDE 1.5
#define WOUNDING_EXTREME 1.75
#define WOUNDING_DEVESTATIING 2
#define WOUNDING_DEVESTATING 2

//Injury Type: Degrades specific wounding multipliers depending on sharpness and edge

#define INJURY_TYPE_LIVING "living" // Anything with soft organs
#define INJURY_TYPE_UNLIVING "unliving" // Things with hard vital parts, but not a proper organism, such as robots. TODO: FBPs into their own species - all robotic limbs possessing the defined species regardless of torso
#define INJURY_TYPE_HOMOGENOUS "homogenous" // Solid objects, such as walls, slimes (they contain a slime core, but otherwise are a single "cell", with no distinct organs), golems

//Resistance values, used on floors, windows, airlocks, girders, and similar hard targets.
//Resistance value is also used on simple animals.
Expand Down Expand Up @@ -77,10 +84,10 @@ Fire delay 15 = 40 rounds per minute
*/

//Quick defines for fire modes
#define FULL_AUTO_150 list(mode_name = "full auto", mode_desc = "150 rounds per minute", mode_type = /datum/firemode/automatic, fire_delay = 4 , icon="auto", damage_mult_add = -0.2)
#define FULL_AUTO_200 list(mode_name = "full auto", mode_desc = "200 rounds per minute", mode_type = /datum/firemode/automatic, fire_delay = 3 , icon="auto", damage_mult_add = -0.2)
#define FULL_AUTO_300 list(mode_name = "full auto", mode_desc = "300 rounds per minute", mode_type = /datum/firemode/automatic, fire_delay = 2 , icon="auto", damage_mult_add = -0.2)
#define FULL_AUTO_600 list(mode_name = "fuller auto", mode_desc = "600 rounds per minute", mode_type = /datum/firemode/automatic, fire_delay = 1 , icon="fuller", damage_mult_add = -0.2)
#define FULL_AUTO_150 list(mode_name = "full auto", mode_desc = "150 rounds per minute", mode_type = /datum/firemode/automatic, fire_delay = 4 , icon="auto")
#define FULL_AUTO_200 list(mode_name = "full auto", mode_desc = "200 rounds per minute", mode_type = /datum/firemode/automatic, fire_delay = 3 , icon="auto")
#define FULL_AUTO_300 list(mode_name = "full auto", mode_desc = "300 rounds per minute", mode_type = /datum/firemode/automatic, fire_delay = 2 , icon="auto")
#define FULL_AUTO_600 list(mode_name = "fuller auto", mode_desc = "600 rounds per minute", mode_type = /datum/firemode/automatic, fire_delay = 1 , icon="fuller")

#define FULL_AUTO_150_NOLOSS list(mode_name = "full auto", mode_desc = "150 rounds per minute", mode_type = /datum/firemode/automatic, fire_delay = 4 , icon="auto")
#define FULL_AUTO_200_NOLOSS list(mode_name = "full auto", mode_desc = "200 rounds per minute", mode_type = /datum/firemode/automatic, fire_delay = 3 , icon="auto")
Expand Down
13 changes: 9 additions & 4 deletions code/_onclick/click.dm
Original file line number Diff line number Diff line change
Expand Up @@ -156,20 +156,25 @@
// A is a turf or is on a turf, or in something on a turf (pen in a box); but not something in something on a turf (pen in a box in a backpack)
sdepth = A.storage_depth_turf()
if(isturf(A) || isturf(A.loc) || (sdepth != -1 && sdepth <= 1))
if(A.Adjacent(src)) // see adjacent.dm
var/adjacent = A.Adjacent(src)
if(adjacent) // see adjacent.dm
if(W)
// Return 1 in attackby() to prevent afterattack() effects (when safely moving items for example)
var/resolved = (LEGACY_SEND_SIGNAL(W, COMSIG_IATTACK, A, src, params)) || (LEGACY_SEND_SIGNAL(A, COMSIG_ATTACKBY, W, src, params)) || W.resolve_attackby(A, src, params)
var/resolved = (LEGACY_SEND_SIGNAL(W, COMSIG_IATTACK, A, src, params)) || (LEGACY_SEND_SIGNAL(A, COMSIG_ATTACKBY, W, src, params))
if(!resolved && A && W)
W.afterattack(A, src, 1, params) // 1: clicking something Adjacent
if(W.double_tact(src, A, adjacent))
resolved = W.resolve_attackby(A, src, params)
if(!resolved)
W.afterattack(A, src, 1, params) // 1: clicking something Adjacent
else
if(ismob(A)) // No instant mob attacking
setClickCooldown(DEFAULT_ATTACK_COOLDOWN)
UnarmedAttack(A, 1, params)
return
else // non-adjacent click
if(W)
W.afterattack(A, src, 0, params) // 0: not Adjacent
if(W.double_tact(src, A))
W.afterattack(A, src, 0, params) // 0: not Adjacent
else
setClickCooldown(DEFAULT_ATTACK_COOLDOWN) // no ranged spam
RangedAttack(A, params)
Expand Down
26 changes: 26 additions & 0 deletions code/_onclick/hud/screen_objects/base_screen_objects.dm
Original file line number Diff line number Diff line change
Expand Up @@ -979,6 +979,32 @@ obj/screen/fire/DEADelize()
icon_state = "act_throw_off"
//-----------------------throw END------------------------------

//-----------------------block------------------------------
/obj/screen/block
name = "block"
icon_state = "block_off"
screen_loc = "15:-16,3"
layer = HUD_LAYER
plane = HUD_PLANE

/obj/screen/block/New()
..()
update_icon()

/obj/screen/block/Click()
if(usr.client)
usr.client.blocking()
update_icon()

/obj/screen/block/update_icon()
if(ishuman(parentmob))//always true, but just in case
var/mob/living/carbon/human/H = parentmob
if(H.blocking)
icon_state = "block_on"
else
icon_state = "block_off"
//-----------------------block END------------------------------

//-----------------------drop------------------------------
/obj/screen/drop
name = "drop"
Expand Down
Loading

0 comments on commit 418a060

Please sign in to comment.