Adds the Cleaving Saw as what will be the reward for killing a miniboss (#28565)

* Adds the Cleaving Saw as what will be a reward for killing a miniboss

* slashslice

* wowduh

* some tweaks

* bleed!

* a little slower

* Smaller cleave, higher damage

* more info

* saw icon

* It's finally dooooone!

* done
This commit is contained in:
Joan Lung
2017-06-25 12:49:32 -04:00
committed by Jordan Brown
parent 70e712017e
commit 601ad4beda
11 changed files with 253 additions and 0 deletions
@@ -528,8 +528,99 @@
///Bosses
//Miniboss Miner
/obj/item/weapon/melee/transforming/cleaving_saw
name = "cleaving saw"
desc = "This saw, effective at drawing the blood of beasts, transforms into a long cleaver that makes use of centrifugal force."
force = 12
force_on = 20 //force when active
throwforce = 20
throwforce_on = 20
icon = 'icons/obj/lavaland/artefacts.dmi'
lefthand_file = 'icons/mob/inhands/64x64_lefthand.dmi'
righthand_file = 'icons/mob/inhands/64x64_righthand.dmi'
inhand_x_dimension = 64
inhand_y_dimension = 64
icon_state = "cleaving_saw"
icon_state_on = "cleaving_saw_open"
slot_flags = SLOT_BELT
attack_verb_off = list("attacked", "sawed", "sliced", "torn", "ripped", "diced", "cut")
attack_verb_on = list("cleaved", "swiped", "slashed", "chopped")
hitsound = 'sound/weapons/bladeslice.ogg'
hitsound_on = 'sound/weapons/bladeslice.ogg'
w_class = WEIGHT_CLASS_BULKY
sharpness = IS_SHARP
var/transform_cooldown
var/swiping = FALSE
var/beast_force_bonus = 30
/obj/item/weapon/melee/transforming/cleaving_saw/examine(mob/user)
..()
to_chat(user, "<span class='notice'>It is [active ? "open, and will cleave enemies in a wide arc":"closed, and can be used for rapid consecutive attacks that cause beastly enemies to bleed"].<br>\
Both modes will build up existing bleed effects, doing a burst of high damage if the bleed is built up high enough.<br>\
Transforming it immediately after an attack causes the next attack to come out faster.</span>")
/obj/item/weapon/melee/transforming/cleaving_saw/suicide_act(mob/user)
user.visible_message("<span class='suicide'>[user] is [active ? "closing [src] on [user.p_their()] neck" : "opening [src] into [user.p_their()] chest"]! It looks like [user.p_theyre()] trying to commit suicide!</span>")
transform_cooldown = 0
transform_weapon(user, TRUE)
return BRUTELOSS
/obj/item/weapon/melee/transforming/cleaving_saw/transform_weapon(mob/living/user, supress_message_text)
if(transform_cooldown > world.time)
return FALSE
. = ..()
if(.)
transform_cooldown = world.time + (CLICK_CD_MELEE * 0.5)
user.changeNext_move(CLICK_CD_MELEE * 0.25)
/obj/item/weapon/melee/transforming/cleaving_saw/transform_messages(mob/living/user, supress_message_text)
if(!supress_message_text)
if(active)
to_chat(user, "<span class='notice'>You open [src]. It will now cleave enemies in a wide arc.</span>")
else
to_chat(user, "<span class='notice'>You close [src]. It will now attack rapidly and cause beastly enemies to bleed.</span>")
playsound(user, 'sound/magic/clockwork/fellowship_armory.ogg', 35, TRUE, frequency = 90000 - (active * 30000))
/obj/item/weapon/melee/transforming/cleaving_saw/clumsy_transform_effect(mob/living/user)
if(user.disabilities & CLUMSY && prob(50))
to_chat(user, "<span class='warning'>You accidentally cut yourself with [src], like a doofus!</span>")
user.take_bodypart_damage(10)
/obj/item/weapon/melee/transforming/cleaving_saw/melee_attack_chain(mob/user, atom/target, params)
..()
if(!active)
user.changeNext_move(CLICK_CD_MELEE * 0.5) //when closed, it attacks very rapidly
/obj/item/weapon/melee/transforming/cleaving_saw/attack(mob/living/target, mob/living/carbon/human/user)
if(!active || swiping || !target.density || get_turf(target) == get_turf(user))
var/beast_bonus_active = FALSE
var/datum/status_effect/saw_bleed/B = target.has_status_effect(STATUS_EFFECT_SAWBLEED)
if(istype(target, /mob/living/simple_animal/hostile/asteroid) || ismegafauna(target))
if(!active)
if(!B)
target.apply_status_effect(STATUS_EFFECT_SAWBLEED)
else
B.add_bleed(B.bleed_buildup)
else
force += beast_force_bonus //we do bonus damage against beastly creatures
beast_bonus_active = TRUE
..()
if(beast_bonus_active)
if(B)
B.add_bleed(B.bleed_buildup)
force -= beast_force_bonus
return
var/turf/user_turf = get_turf(user)
var/dir_to_target = get_dir(user_turf, get_turf(target))
swiping = TRUE
for(var/i in 1 to 3)
var/turf/T = get_step(user_turf, turn(dir_to_target, 90 - (45 * i)))
for(var/mob/living/L in T)
if(user.Adjacent(L) && L.density)
melee_attack_chain(user, L)
swiping = FALSE
//Dragon