This commit is contained in:
silicons
2020-07-27 14:09:37 -07:00
parent dc278d7b02
commit 5bf4afcade
4 changed files with 15 additions and 13 deletions

View File

@@ -63,7 +63,7 @@
return
. |= I.attack(src, user, attackchain_flags, damage_multiplier)
if(!(. & NO_AUTO_CLICKDELAY_HANDLING)) // SAFETY NET - unless the proc tells us we should not handle this, give them the basic melee cooldown!
I.ApplyAttackCooldown(user, src)
I.ApplyAttackCooldown(user, src, attackchain_flags)
/**
* Called when someone uses us to attack a mob in melee combat.
@@ -138,13 +138,13 @@
if(!(SKILL_TRAIN_ATTACK_OBJ in I.used_skills[skill]))
continue
user.mind.auto_gain_experience(skill, I.skill_gain)
I.ApplyAttackCooldown(user, src)
if(!(attackchain_flags & NO_AUTO_CLICKDELAY_HANDLING))
I.ApplyAttackCooldown(user, src, attackchain_flags)
if(totitemdamage)
visible_message("<span class='danger'>[user] has hit [src] with [I]!</span>", null, null, COMBAT_MESSAGE_RANGE)
//only witnesses close by and the victim see a hit message.
log_combat(user, src, "attacked", I)
take_damage(totitemdamage, I.damtype, "melee", 1)
return TRUE
/mob/living/attacked_by(obj/item/I, mob/living/user, attackchain_flags = NONE, damage_multiplier = 1)
var/list/block_return = list()

View File

@@ -667,6 +667,8 @@
var/bleed_stacks_per_hit = 3
total_mass = 2.75
total_mass_on = 5
attack_speed = 0
attack_unwieldlyness = CLICK_CD_MELEE * 0.5
/obj/item/melee/transforming/cleaving_saw/examine(mob/user)
. = ..()
@@ -685,8 +687,12 @@
return FALSE
. = ..()
if(.)
if(active)
attack_unwieldlyness = CLICK_CD_MELEE
else
attack_unwieldlyness = CLICK_CD_MELEE * 0.5
transform_cooldown = world.time + (CLICK_CD_MELEE * 0.5)
user.SetNextAction(CLICK_CD_MELEE * 0.25)
user.SetNextAction(CLICK_CD_MELEE * 0.25, considered_action = FALSE, flush = TRUE)
/obj/item/melee/transforming/cleaving_saw/transform_messages(mob/living/user, supress_message_text)
if(!supress_message_text)
@@ -701,11 +707,6 @@
to_chat(user, "<span class='warning'>You accidentally cut yourself with [src], like a doofus!</span>")
user.take_bodypart_damage(10)
/obj/item/melee/transforming/cleaving_saw/ApplyAttackCooldown(mob/user, atom/target)
. = ..()
if(!active)
user.SetNextAction(CLICK_CD_MELEE * 0.5) //when closed, it attacks very rapidly
/obj/item/melee/transforming/cleaving_saw/nemesis_effects(mob/living/user, mob/living/target)
var/datum/status_effect/stacking/saw_bleed/B = target.has_status_effect(STATUS_EFFECT_SAWBLEED)
if(!B)

View File

@@ -190,8 +190,8 @@
/**
* Called after a successful attack to set a mob's clickdelay.
*/
/obj/item/proc/ApplyAttackCooldown(mob/user, atom/target)
user.DelayNextAction(attack_unwieldlyness, clickdelay_mod_bypass)
/obj/item/proc/ApplyAttackCooldown(mob/user, atom/target, attackchain_flags)
user.DelayNextAction(attack_unwieldlyness, clickdelay_mod_bypass, !(attackchain_flags & ATTACK_IGNORE_ACTION))
/**
* Get estimated time that a user has to not attack for to use us

View File

@@ -87,7 +87,7 @@ Difficulty: Medium
/mob/living/simple_animal/hostile/megafauna/blood_drunk_miner/adjustHealth(amount, updating_health = TRUE, forced = FALSE)
var/adjustment_amount = amount * 0.1
if(world.time + adjustment_amount > next_action)
DelayNextAction(adjustment_amount, flush = TRUE) //attacking it interrupts it attacking, but only briefly
DelayNextAction(adjustment_amount, considered_action = FALSE, flush = TRUE) //attacking it interrupts it attacking, but only briefly
. = ..()
/mob/living/simple_animal/hostile/megafauna/blood_drunk_miner/death()
@@ -126,7 +126,8 @@ Difficulty: Medium
L.gib()
return TRUE
DelayNextAction(CLICK_CD_MELEE, flush = TRUE)
miner_saw.melee_attack_chain(src, target, null, ATTACK_IGNORE_CLICKDELAY)
miner_saw.melee_attack_chain(src, target, null, ATTACK_IGNORE_CLICKDELAY | ATTACK_IGNORE_ACTION | NO_AUTO_CLICKDELAY_HANDLING)
DiscardCurrentAction()
if(guidance)
adjustHealth(-2)
transform_weapon()