framework

This commit is contained in:
silicons
2021-03-20 16:02:26 -07:00
parent efa4139aff
commit 02b52e6142
11 changed files with 132 additions and 58 deletions
+15
View File
@@ -453,6 +453,21 @@ GLOBAL_VAR_INIT(embedpocalypse, FALSE) // if true, all items will be able to emb
SHOULD_CALL_PARENT(TRUE)
SEND_SIGNAL(src, COMSIG_ITEM_PICKUP, user)
item_flags |= IN_INVENTORY
if(combat_flags & (ITEM_CAN_BLOCK | ITEM_CAN_PARRY) && user.client && !(type in user.client.block_parry_hinted))
var/list/dat = list("<span class='boldnotice'>You have picked up an item that can be used to block and/or parry:</span>")
// cit change - parry/block feedback
var/datum/block_parry_data/data = return_block_parry_datum(block_parry_data)
if(combat_flags & ITEM_CAN_BLOCK)
dat += "[src] can be used to block damage using directional block. Press your active block keybind to use it."
if(data.block_automatic_enabled)
dat += "[src] is also capable of automatically blocking damage, if you are facing the right direction (usually towards your attacker)!"
if(combat_flags & ITEM_CAN_PARRY)
dat += "[src] can be used to parry damage using active parry. Pressed your active parry keybind to initiate a timed parry sequence."
if(data.parry_automatic_enabled)
dat += "[src] is also capable of automatically parrying an incoming attack, if your mouse is over your attacker at the time if you being hit in a direct, melee attack."
dat += "Examine [src] to get a full readout of its block/parry stats."
to_chat(user, dat.Join("<br>"))
user.client.block_parry_hinted |= type
// called when "found" in pockets and storage items. Returns 1 if the search should end.
/obj/item/proc/on_found(mob/finder)
-1
View File
@@ -61,7 +61,6 @@
TEXT_ATTACK_TYPE_PROJECTILE = 1 // extremely harsh window for projectiles
)
// not extremely punishing to fail, but no spamming the parry.
parry_cooldown = 1.5 SECONDS
parry_failed_stagger_duration = 1.5 SECONDS
parry_failed_clickcd_duration = 1 SECONDS
+9 -14
View File
@@ -72,15 +72,16 @@
block_parry_data = /datum/block_parry_data/captain_saber
/datum/block_parry_data/captain_saber
parry_time_windup = 0.5
parry_time_active = 4
parry_time_spindown = 1
parry_time_windup = 0
parry_time_active = 6
parry_time_spindown = 0
parry_time_perfect = 0.75
parry_time_perfect_leeway = 0.75
parry_imperfect_falloff_percent = 30
parry_efficiency_perfect = 100
parry_failed_stagger_duration = 3 SECONDS
parry_failed_clickcd_duration = 1 SECONDS
parry_flags = NONE
/obj/item/melee/sabre/Initialize()
. = ..()
@@ -176,28 +177,22 @@
// Fast, efficient parry.
/datum/block_parry_data/traitor_rapier
parry_time_windup = 0.5
parry_time_active = 5
parry_time_windup = 0
parry_time_active = 6
parry_time_spindown = 0
parry_time_active_visual_override = 3
parry_time_spindown_visual_override = 2
parry_flags = PARRY_DEFAULT_HANDLE_FEEDBACK | PARRY_LOCK_ATTACKING
parry_time_perfect = 0
parry_time_perfect_leeway = 3
parry_time_perfect = 1
parry_time_perfect_leeway = 1
parry_time_perfect_leeway_override = list(
TEXT_ATTACK_TYPE_PROJECTILE = 1
)
parry_imperfect_falloff_percent_override = list(
TEXT_ATTACK_TYPE_PROJECTILE = 50 // useless after 3rd decisecond
)
parry_imperfect_falloff_percent = 30
parry_efficiency_to_counterattack = INFINITY
parry_efficiency_considered_successful = 1
parry_efficiency_perfect = 100
parry_data = list(
PARRY_DISARM_ATTACKER = TRUE,
PARRY_KNOCKDOWN_ATTACKER = 10
)
parry_stamina_cost = 5
parry_failed_stagger_duration = 2 SECONDS
parry_failed_clickcd_duration = CLICK_CD_RANGE
parry_cooldown = 0