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
@@ -312,3 +312,30 @@
pixel_x = rand(-4,4)
pixel_y = rand(-4,4)
animate(src, pixel_y = pixel_y + 32, alpha = 0, time = 25)
/obj/effect/temp_visual/bleed
name = "bleed"
icon = 'icons/effects/bleed.dmi'
icon_state = "bleed0"
duration = 10
var/shrink = TRUE
/obj/effect/temp_visual/bleed/Initialize(mapload, atom/size_calc_target)
. = ..()
var/size_matrix = matrix()
if(size_calc_target)
layer = size_calc_target.layer + 0.01
var/icon/I = icon(size_calc_target.icon, size_calc_target.icon_state, size_calc_target.dir)
size_matrix = matrix() * (I.Height()/world.icon_size)
transform = size_matrix //scale the bleed overlay's size based on the target's icon size
var/matrix/M = transform
if(shrink)
M = size_matrix*0.1
else
M = size_matrix*2
animate(src, alpha = 20, transform = M, time = duration, flags = ANIMATION_PARALLEL)
/obj/effect/temp_visual/bleed/explode
icon_state = "bleed10"
duration = 12
shrink = FALSE
@@ -0,0 +1,58 @@
/obj/item/weapon/melee/transforming //TODO: make transforming energy weapons a subtype of this
var/active = FALSE
var/force_on = 30 //force when active
var/throwforce_on = 20
var/icon_state_on = "axe1"
var/hitsound_on = 'sound/weapons/blade1.ogg'
var/list/attack_verb_on = list("attacked", "slashed", "stabbed", "sliced", "torn", "ripped", "diced", "cut")
var/list/attack_verb_off = list("attacked", "slashed", "stabbed", "sliced", "torn", "ripped", "diced", "cut")
w_class = WEIGHT_CLASS_SMALL
sharpness = IS_SHARP
var/w_class_on = WEIGHT_CLASS_BULKY
/obj/item/weapon/melee/transforming/Initialize()
. = ..()
if(active)
if(attack_verb_on.len)
attack_verb = attack_verb_on
else
if(attack_verb_off.len)
attack_verb = attack_verb_off
/obj/item/weapon/melee/transforming/attack_self(mob/living/carbon/user)
if(transform_weapon(user))
clumsy_transform_effect(user)
/obj/item/weapon/melee/transforming/proc/transform_weapon(mob/living/user, supress_message_text)
active = !active
if(active)
force = force_on
throwforce = throwforce_on
hitsound = hitsound_on
throw_speed = 4
if(attack_verb_on.len)
attack_verb = attack_verb_on
icon_state = icon_state_on
w_class = w_class_on
else
force = initial(force)
throwforce = initial(throwforce)
hitsound = initial(hitsound)
throw_speed = initial(throw_speed)
if(attack_verb_off.len)
attack_verb = attack_verb_off
icon_state = initial(icon_state)
w_class = initial(w_class)
transform_messages(user, supress_message_text)
add_fingerprint(user)
return TRUE
/obj/item/weapon/melee/transforming/proc/transform_messages(mob/living/user, supress_message_text)
playsound(user, active ? 'sound/weapons/saberon.ogg' : 'sound/weapons/saberoff.ogg', 35, 1) //changed it from 50% volume to 35% because deafness
if(!supress_message_text)
to_chat(user, "<span class='notice'>[src] [active ? "is now active":"can now be concealed"].</span>")
/obj/item/weapon/melee/transforming/proc/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(5,5)