mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-08-22 19:47:22 +01:00
* Migrate organs to the new attack chain. * Migrate additional organs and rod of asclepius. * Update regenerative core. * Call parent activate_self of regenerative core.
685 lines
27 KiB
Plaintext
685 lines
27 KiB
Plaintext
//The chests dropped by mob spawner tendrils. Also contains associated loot.
|
|
|
|
/obj/structure/closet/crate/necropolis
|
|
name = "necropolis chest"
|
|
desc = "It's watching you closely."
|
|
icon_state = "necrocrate"
|
|
icon_opened = "necrocrate_open"
|
|
icon_closed = "necrocrate"
|
|
resistance_flags = LAVA_PROOF | FIRE_PROOF | ACID_PROOF
|
|
|
|
/obj/structure/closet/crate/necropolis/ex_act(severity) // So vetus explosion won't destroy everything inside
|
|
return
|
|
|
|
/obj/structure/closet/crate/necropolis/tendril
|
|
desc = "It's watching you suspiciously."
|
|
|
|
/obj/structure/closet/crate/necropolis/tendril/populate_contents()
|
|
var/loot = rand(1, 24)
|
|
switch(loot)
|
|
if(1)
|
|
new /obj/item/shared_storage/red(src)
|
|
if(2)
|
|
new /obj/item/clothing/head/helmet/space/cult(src)
|
|
new /obj/item/clothing/suit/space/cult(src)
|
|
if(3)
|
|
new /obj/item/soulstone/anybody(src)
|
|
if(4)
|
|
new /obj/item/organ/internal/cyberimp/arm/katana(src)
|
|
if(5)
|
|
new /obj/item/book_of_babel(src)
|
|
if(6)
|
|
new /obj/item/pickaxe/diamond(src)
|
|
if(7)
|
|
new /obj/item/clothing/suit/hooded/cultrobes(src)
|
|
new /obj/item/bedsheet/cult(src)
|
|
if(8)
|
|
if(prob(50))
|
|
new /obj/item/disk/design_disk/modkit_disk/resonator_blast(src)
|
|
else
|
|
new /obj/item/disk/design_disk/modkit_disk/rapid_repeater(src)
|
|
if(9)
|
|
new /obj/item/rod_of_asclepius(src)
|
|
if(10)
|
|
new /obj/item/organ/internal/heart/cursed/wizard(src)
|
|
if(11)
|
|
new /obj/item/ship_in_a_bottle(src)
|
|
if(12)
|
|
new /obj/item/clothing/suit/hooded/berserker(src)
|
|
if(13)
|
|
new /obj/item/nullrod/scythe/talking(src)
|
|
if(14)
|
|
new /obj/item/nullrod/armblade/mining(src)
|
|
if(15)
|
|
if(prob(50))
|
|
new /obj/item/disk/design_disk/modkit_disk/mob_and_turf_aoe(src)
|
|
else
|
|
new /obj/item/disk/design_disk/modkit_disk/bounty(src)
|
|
if(16)
|
|
new /obj/item/warp_cube/red(src)
|
|
if(17)
|
|
new /obj/item/wisp_lantern(src)
|
|
if(18)
|
|
new /obj/item/immortality_talisman(src)
|
|
if(19)
|
|
new /obj/item/gun/magic/hook(src)
|
|
if(20)
|
|
new /obj/item/reagent_containers/drinks/everfull(src)
|
|
if(21)
|
|
new /obj/item/reagent_containers/drinks/bottle/holywater/hell(src)
|
|
if(22)
|
|
new /obj/item/spellbook/oneuse/summonitem(src)
|
|
if(23)
|
|
new /obj/item/borg/upgrade/modkit/lifesteal(src)
|
|
new /obj/item/bedsheet/cult(src)
|
|
if(24)
|
|
switch(rand(1, 10))
|
|
if(1)
|
|
new /obj/item/blank_tarot_card(src)
|
|
if(2 to 5)
|
|
new /obj/item/tarot_card_pack(src)
|
|
if(6 to 8)
|
|
new /obj/item/tarot_card_pack/jumbo(src)
|
|
if(9, 10)
|
|
new /obj/item/tarot_card_pack/mega(src)
|
|
|
|
//KA modkit design discs
|
|
/obj/item/disk/design_disk/modkit_disk
|
|
name = "\improper KA mod disk"
|
|
desc = "A design disk containing the design for a unique kinetic accelerator modkit. It's compatible with a research console."
|
|
icon_state = "datadisk1"
|
|
var/modkit_design
|
|
|
|
/obj/item/disk/design_disk/modkit_disk/Initialize(mapload)
|
|
. = ..()
|
|
if(modkit_design)
|
|
blueprint = new modkit_design
|
|
|
|
/obj/item/disk/design_disk/modkit_disk/mob_and_turf_aoe
|
|
name = "\improper KA mod disk (Offensive mining explosion)"
|
|
modkit_design = /datum/design/offensive_turf_aoe_modkit
|
|
|
|
/obj/item/disk/design_disk/modkit_disk/rapid_repeater
|
|
name = "\improper KA mod disk (Rapid repeater)"
|
|
modkit_design = /datum/design/rapid_repeater_modkit
|
|
|
|
/obj/item/disk/design_disk/modkit_disk/resonator_blast
|
|
name = "\improper KA mod disk (Resonator blast)"
|
|
modkit_design = /datum/design/resonator_blast_modkit
|
|
|
|
/obj/item/disk/design_disk/modkit_disk/bounty
|
|
name = "\improper KA mod disk (Death syphon)"
|
|
modkit_design = /datum/design/bounty_modkit
|
|
|
|
/datum/design/offensive_turf_aoe_modkit
|
|
name = "Kinetic Accelerator Offensive Mining Explosion Mod"
|
|
desc = "A device which causes kinetic accelerators to fire AoE blasts that destroy rock and damage creatures."
|
|
id = "hyperaoemod"
|
|
materials = list(MAT_METAL = 7000, MAT_GLASS = 3000, MAT_SILVER= 3000, MAT_GOLD = 3000, MAT_DIAMOND = 4000)
|
|
build_path = /obj/item/borg/upgrade/modkit/aoe/turfs/andmobs
|
|
category = list("Mining", "Cyborg Upgrades")
|
|
build_type = PROTOLATHE | MECHFAB
|
|
requires_whitelist = TRUE
|
|
|
|
/datum/design/rapid_repeater_modkit
|
|
name = "Kinetic Accelerator Rapid Repeater Mod"
|
|
desc = "A device which greatly reduces a kinetic accelerator's cooldown on striking a living target or rock, but greatly increases its base cooldown."
|
|
id = "repeatermod"
|
|
materials = list(MAT_METAL = 5000, MAT_GLASS = 5000, MAT_URANIUM = 8000, MAT_BLUESPACE = 2000)
|
|
build_path = /obj/item/borg/upgrade/modkit/cooldown/repeater
|
|
category = list("Mining", "Cyborg Upgrades")
|
|
build_type = PROTOLATHE | MECHFAB
|
|
requires_whitelist = TRUE
|
|
|
|
/datum/design/resonator_blast_modkit
|
|
name = "Kinetic Accelerator Resonator Blast Mod"
|
|
desc = "A device which causes kinetic accelerators to fire shots that leave and detonate resonator blasts."
|
|
id = "resonatormod"
|
|
materials = list(MAT_METAL = 5000, MAT_GLASS = 5000, MAT_SILVER= 5000, MAT_URANIUM = 5000)
|
|
build_path = /obj/item/borg/upgrade/modkit/resonator_blasts
|
|
category = list("Mining", "Cyborg Upgrades")
|
|
build_type = PROTOLATHE | MECHFAB
|
|
requires_whitelist = TRUE
|
|
|
|
/datum/design/bounty_modkit
|
|
name = "Kinetic Accelerator Death Syphon Mod"
|
|
desc = "A device which causes kinetic accelerators to permanently gain damage against creature types killed with it."
|
|
id = "bountymod"
|
|
materials = list(MAT_METAL = 4000, MAT_SILVER = 4000, MAT_GOLD = 4000, MAT_BLUESPACE = 4000)
|
|
reagents_list = list("blood" = 40)
|
|
build_path = /obj/item/borg/upgrade/modkit/bounty
|
|
category = list("Mining", "Cyborg Upgrades")
|
|
build_type = PROTOLATHE | MECHFAB
|
|
requires_whitelist = TRUE
|
|
|
|
//Spooky special loot
|
|
|
|
// Beserker armor
|
|
|
|
#define MAX_BERSERK_CHARGE 100
|
|
#define PROJECTILE_HIT_MULTIPLIER 1.5
|
|
#define DAMAGE_TO_CHARGE_SCALE 0.75
|
|
#define CHARGE_DRAINED_PER_SECOND 5
|
|
#define BERSERK_DAMAGE_REDUCTION 0.6
|
|
#define BERSERK_ATTACK_SPEED_MODIFIER 0.5
|
|
#define BERSERK_COLOUR "#950a0a"
|
|
|
|
/obj/item/clothing/suit/hooded/berserker
|
|
name = "berserker hardsuit"
|
|
desc = "Voices echo from the hardsuit, driving the user insane. Is not space-proof."
|
|
icon_state = "hardsuit-berserker"
|
|
allowed = list(/obj/item/flashlight, /obj/item/tank/internals, /obj/item/resonator, /obj/item/mining_scanner, /obj/item/t_scanner/adv_mining_scanner, /obj/item/gun/energy/kinetic_accelerator, /obj/item/pickaxe, /obj/item/spear)
|
|
armor = list(MELEE = 30, BULLET = 15, LASER = 10, ENERGY = 10, BOMB = 150, RAD = 0, FIRE = INFINITY, ACID = INFINITY)
|
|
hoodtype = /obj/item/clothing/head/hooded/berserker
|
|
flags_inv = HIDEGLOVES | HIDESHOES | HIDEJUMPSUIT | HIDETAIL
|
|
heat_protection = UPPER_TORSO | LOWER_TORSO | LEGS | FEET | ARMS | HANDS
|
|
body_parts_covered = UPPER_TORSO | LOWER_TORSO | LEGS | FEET | ARMS | HANDS
|
|
max_heat_protection_temperature = FIRE_IMMUNITY_MAX_TEMP_PROTECT
|
|
resistance_flags = FIRE_PROOF | ACID_PROOF
|
|
respects_nodrop = TRUE
|
|
sprite_sheets = list(
|
|
"Tajaran" = 'icons/mob/clothing/species/tajaran/suit.dmi',
|
|
"Unathi" = 'icons/mob/clothing/species/unathi/suit.dmi',
|
|
"Vox" = 'icons/mob/clothing/species/vox/suit.dmi',
|
|
"Vulpkanin" = 'icons/mob/clothing/species/vulpkanin/suit.dmi'
|
|
)
|
|
hide_tail_by_species = list("Unathi", "Tajaran", "Vox", "Vulpkanin")
|
|
insert_max = 0
|
|
|
|
/obj/item/clothing/suit/hooded/berserker/Initialize(mapload)
|
|
. = ..()
|
|
AddComponent(/datum/component/anti_magic, ALL, inventory_flags = ITEM_SLOT_OUTER_SUIT)
|
|
|
|
/obj/item/clothing/head/hooded/berserker
|
|
name = "berserker helmet"
|
|
desc = "Peering into the eyes of the helmet is enough to seal damnation."
|
|
icon_state = "hardsuit0-berserker"
|
|
light_color = BERSERK_COLOUR
|
|
light_power = 4
|
|
actions_types = list(/datum/action/item_action/berserk_mode)
|
|
armor = list(MELEE = 30, BULLET = 15, LASER = 10, ENERGY = 10, BOMB = 150, RAD = 0, FIRE = INFINITY, ACID = INFINITY)
|
|
heat_protection = HEAD
|
|
max_heat_protection_temperature = FIRE_IMMUNITY_MAX_TEMP_PROTECT
|
|
resistance_flags = FIRE_PROOF | ACID_PROOF
|
|
flags = BLOCKHAIR
|
|
flags_cover = HEADCOVERSEYES | HEADCOVERSMOUTH
|
|
flags_inv = HIDEMASK | HIDEEARS | HIDEEYES | HIDEFACE
|
|
sprite_sheets = list(
|
|
"Grey" = 'icons/mob/clothing/species/grey/helmet.dmi',
|
|
"Tajaran" = 'icons/mob/clothing/species/tajaran/helmet.dmi',
|
|
"Unathi" = 'icons/mob/clothing/species/unathi/helmet.dmi',
|
|
"Vox" = 'icons/mob/clothing/species/vox/helmet.dmi',
|
|
"Vulpkanin" = 'icons/mob/clothing/species/vulpkanin/helmet.dmi'
|
|
)
|
|
/// Current charge of berserk, goes from 0 to 100
|
|
var/berserk_charge = 0
|
|
/// Status of berserk
|
|
var/berserk_active = FALSE
|
|
|
|
|
|
/obj/item/clothing/head/hooded/berserker/examine()
|
|
. = ..()
|
|
. += SPAN_NOTICE("Berserk mode is [berserk_charge]% charged.")
|
|
|
|
/obj/item/clothing/head/hooded/berserker/process()
|
|
if(berserk_active)
|
|
berserk_charge = clamp(berserk_charge - CHARGE_DRAINED_PER_SECOND * 2, 0, MAX_BERSERK_CHARGE)
|
|
if(!berserk_charge)
|
|
if(ishuman(loc))
|
|
end_berserk(loc)
|
|
|
|
/obj/item/clothing/head/hooded/berserker/dropped(mob/user)
|
|
. = ..()
|
|
end_berserk(user)
|
|
|
|
/obj/item/clothing/head/hooded/berserker/Destroy()
|
|
end_berserk()
|
|
return ..()
|
|
|
|
|
|
/obj/item/clothing/head/hooded/berserker/hit_reaction(mob/living/carbon/human/owner, atom/movable/hitby, attack_text = "the attack", final_block_chance = 0, damage = 0, attack_type = MELEE_ATTACK)
|
|
if(berserk_active)
|
|
return
|
|
if(isprojectile(hitby))
|
|
var/obj/projectile/P = hitby
|
|
if(P.damage_type == STAMINA)
|
|
return //no disabler rage
|
|
var/berserk_value = damage * DAMAGE_TO_CHARGE_SCALE
|
|
if(attack_type == PROJECTILE_ATTACK)
|
|
berserk_value *= PROJECTILE_HIT_MULTIPLIER
|
|
berserk_charge = clamp(round(berserk_charge + berserk_value), 0, MAX_BERSERK_CHARGE)
|
|
if(berserk_charge >= MAX_BERSERK_CHARGE)
|
|
to_chat(owner, SPAN_BOLDNOTICE("Berserk mode is fully charged!"))
|
|
|
|
/// Starts berserk, giving the wearer 40% brute / burn resist, doubled attacking speed, NOGUNS trait, and colours them blood red.
|
|
/obj/item/clothing/head/hooded/berserker/proc/berserk_mode(mob/living/carbon/human/user)
|
|
to_chat(user, SPAN_WARNING("You enter berserk mode."))
|
|
playsound(user, 'sound/magic/staff_healing.ogg', 50)
|
|
set_light(3)
|
|
user.physiology.burn_mod *= BERSERK_DAMAGE_REDUCTION
|
|
user.physiology.brute_mod *= BERSERK_DAMAGE_REDUCTION
|
|
user.next_move_modifier *= BERSERK_ATTACK_SPEED_MODIFIER
|
|
user.add_atom_colour(BERSERK_COLOUR, TEMPORARY_COLOUR_PRIORITY)
|
|
ADD_TRAIT(user, TRAIT_CHUNKYFINGERS, BERSERK_TRAIT)
|
|
set_nodrop(TRUE)
|
|
suit.set_nodrop(TRUE, loc)
|
|
berserk_active = TRUE
|
|
START_PROCESSING(SSobj, src)
|
|
|
|
/// Ends berserk, reverting the changes from the proc [berserk_mode]
|
|
/obj/item/clothing/head/hooded/berserker/proc/end_berserk(mob/living/carbon/human/user)
|
|
if(!berserk_active)
|
|
return
|
|
berserk_active = FALSE
|
|
if(QDELETED(user))
|
|
return
|
|
to_chat(user, SPAN_WARNING("You exit berserk mode."))
|
|
playsound(user, 'sound/magic/summonitems_generic.ogg', 50)
|
|
set_light(0)
|
|
user.physiology.burn_mod /= BERSERK_DAMAGE_REDUCTION
|
|
user.physiology.brute_mod /= BERSERK_DAMAGE_REDUCTION
|
|
user.next_move_modifier /= BERSERK_ATTACK_SPEED_MODIFIER
|
|
user.remove_atom_colour(TEMPORARY_COLOUR_PRIORITY, BERSERK_COLOUR)
|
|
REMOVE_TRAIT(user, TRAIT_CHUNKYFINGERS, BERSERK_TRAIT)
|
|
set_nodrop(FALSE)
|
|
suit.set_nodrop(FALSE)
|
|
STOP_PROCESSING(SSobj, src)
|
|
|
|
/datum/action/item_action/berserk_mode
|
|
name = "Berserk"
|
|
desc = "Increase your movement and melee speed while also increasing your melee armor for a short amount of time."
|
|
|
|
/datum/action/item_action/berserk_mode/Trigger(left_click)
|
|
if(istype(target, /obj/item/clothing/head/hooded/berserker))
|
|
var/obj/item/clothing/head/hooded/berserker/berzerk = target
|
|
if(berzerk.berserk_active)
|
|
to_chat(owner, SPAN_WARNING("You are already berserk!"))
|
|
return
|
|
if(berzerk.berserk_charge < 100)
|
|
to_chat(owner, SPAN_WARNING("You don't have a full charge."))
|
|
return
|
|
berzerk.berserk_mode(owner)
|
|
return
|
|
return ..()
|
|
|
|
#undef MAX_BERSERK_CHARGE
|
|
#undef PROJECTILE_HIT_MULTIPLIER
|
|
#undef DAMAGE_TO_CHARGE_SCALE
|
|
#undef CHARGE_DRAINED_PER_SECOND
|
|
#undef BERSERK_DAMAGE_REDUCTION
|
|
#undef BERSERK_ATTACK_SPEED_MODIFIER
|
|
#undef BERSERK_COLOUR
|
|
|
|
|
|
//Rod of Asclepius
|
|
#define RIGHT_HAND 0
|
|
#define LEFT_HAND 1
|
|
|
|
/obj/item/rod_of_asclepius
|
|
name = "\improper Rod of Asclepius"
|
|
desc = "A wooden rod about the size of your forearm with a snake carved around it, winding its way up the sides of the rod. Something about it seems to inspire in you the responsibilty and duty to help others."
|
|
icon = 'icons/obj/lavaland/artefacts.dmi'
|
|
icon_state = "asclepius_dormant"
|
|
lefthand_file = 'icons/mob/inhands/staves_lefthand.dmi'
|
|
righthand_file = 'icons/mob/inhands/staves_righthand.dmi'
|
|
var/activated = FALSE
|
|
var/usedHand
|
|
var/mob/living/carbon/owner
|
|
new_attack_chain = TRUE
|
|
|
|
/obj/item/rod_of_asclepius/activate_self(mob/user)
|
|
if(activated)
|
|
return ..()
|
|
if(!iscarbon(user))
|
|
to_chat(user, SPAN_WARNING("The snake carving seems to come alive, if only for a moment, before returning to its dormant state, almost as if it finds you incapable of holding its oath."))
|
|
return ITEM_INTERACT_COMPLETE
|
|
var/mob/living/carbon/itemUser = user
|
|
usedHand = itemUser.l_hand == src ? LEFT_HAND : RIGHT_HAND
|
|
if(itemUser.has_status_effect(STATUS_EFFECT_HIPPOCRATIC_OATH))
|
|
to_chat(user, SPAN_WARNING("You can't possibly handle the responsibility of more than one rod!"))
|
|
return ITEM_INTERACT_COMPLETE
|
|
var/failText = SPAN_WARNING("The snake seems unsatisfied with your incomplete oath and returns to its previous place on the rod, returning to its dormant, wooden state. You must stand still while completing your oath!")
|
|
to_chat(itemUser, SPAN_NOTICE("The wooden snake that was carved into the rod seems to suddenly come alive and begins to slither down your arm! The compulsion to help others grows abnormally strong..."))
|
|
if(do_after_once(itemUser, 40, target = itemUser))
|
|
itemUser.say("I swear to fulfill, to the best of my ability and judgment, this covenant:")
|
|
else
|
|
to_chat(itemUser, failText)
|
|
return ITEM_INTERACT_COMPLETE
|
|
if(do_after(itemUser, 20, target = itemUser))
|
|
itemUser.say("I will apply, for the benefit of the sick, all measures that are required, avoiding those twin traps of overtreatment and therapeutic nihilism.")
|
|
else
|
|
to_chat(itemUser, failText)
|
|
return ITEM_INTERACT_COMPLETE
|
|
if(do_after(itemUser, 30, target = itemUser))
|
|
itemUser.say("I will remember that I remain a member of society, with special obligations to all my fellow human beings, those sound of mind and body as well as the infirm.")
|
|
else
|
|
to_chat(itemUser, failText)
|
|
return ITEM_INTERACT_COMPLETE
|
|
if(do_after(itemUser, 30, target = itemUser))
|
|
itemUser.say("If I do not violate this oath, may I enjoy life and art, respected while I live and remembered with affection thereafter. May I always act so as to preserve the finest traditions of my calling and may I long experience the joy of healing those who seek my help.")
|
|
else
|
|
to_chat(itemUser, failText)
|
|
return ITEM_INTERACT_COMPLETE
|
|
to_chat(itemUser, SPAN_NOTICE("The snake, satisfied with your oath, attaches itself and the rod to your forearm with an inseparable grip. Your thoughts seem to only revolve around the core idea of helping others, and harm is nothing more than a distant, wicked memory..."))
|
|
|
|
activated(itemUser)
|
|
return ITEM_INTERACT_COMPLETE
|
|
|
|
/obj/item/rod_of_asclepius/Destroy()
|
|
owner = null
|
|
return ..()
|
|
|
|
/obj/item/rod_of_asclepius/dropped(mob/user, silent)
|
|
..()
|
|
if(!activated || QDELETED(src))
|
|
return
|
|
END_OF_TICK(CALLBACK(src, PROC_REF(try_attach_to_owner))) // Do this once the drop call stack is done. The holding limb might be getting removed
|
|
|
|
/obj/item/rod_of_asclepius/proc/try_attach_to_owner()
|
|
if(!ishuman(owner) || QDELETED(owner))
|
|
deactivate()
|
|
return
|
|
|
|
var/mob/living/carbon/human/thief = loc
|
|
|
|
if(thief == owner) // stealing from yourself, huh?
|
|
return
|
|
|
|
if(ishuman(thief))
|
|
thief.drop_item_to_ground(src, force = TRUE, silent = TRUE) // You're not my owner!
|
|
|
|
if(owner.stat == DEAD)
|
|
qdel(src) // Oh no! Oh well a new rod will be made from the STATUS_EFFECT_HIPPOCRATIC_OATH
|
|
return
|
|
|
|
set_nodrop(TRUE, loc)
|
|
var/mob/living/carbon/human/H = owner
|
|
var/limb_regrown = FALSE
|
|
|
|
if(usedHand == LEFT_HAND)
|
|
limb_regrown = H.regrow_external_limb_if_missing("l_arm")
|
|
limb_regrown = H.regrow_external_limb_if_missing("l_hand") || limb_regrown
|
|
H.drop_l_hand(TRUE)
|
|
H.put_in_l_hand(src, TRUE)
|
|
else
|
|
limb_regrown = H.regrow_external_limb_if_missing("r_arm")
|
|
limb_regrown = H.regrow_external_limb_if_missing("r_hand") || limb_regrown
|
|
H.drop_r_hand(TRUE)
|
|
H.put_in_r_hand(src, TRUE)
|
|
|
|
if(!limb_regrown)
|
|
to_chat(H, SPAN_NOTICE("The Rod of Asclepius suddenly grows back out of your arm!"))
|
|
else
|
|
H.update_body() // Update the limb sprites
|
|
to_chat(H, SPAN_NOTICE("Your arm suddenly grows back with the Rod of Asclepius still attached!"))
|
|
|
|
/obj/item/rod_of_asclepius/proc/activated(mob/living/carbon/new_owner)
|
|
owner = new_owner
|
|
flags = NODROP
|
|
desc = "A short wooden rod with a mystical snake inseparably gripping itself and the rod to your forearm. It flows with a healing energy that disperses amongst yourself and those around you. "
|
|
icon_state = "asclepius_active"
|
|
activated = TRUE
|
|
|
|
owner.apply_status_effect(STATUS_EFFECT_HIPPOCRATIC_OATH)
|
|
RegisterSignal(owner, COMSIG_PARENT_QDELETING, PROC_REF(deactivate))
|
|
|
|
/obj/item/rod_of_asclepius/proc/deactivate()
|
|
if(owner)
|
|
UnregisterSignal(owner, COMSIG_PARENT_QDELETING)
|
|
owner = null
|
|
|
|
flags = NONE
|
|
activated = FALSE
|
|
desc = initial(desc)
|
|
icon_state = initial(icon_state)
|
|
|
|
#undef RIGHT_HAND
|
|
#undef LEFT_HAND
|
|
|
|
/obj/item/organ/internal/cyberimp/arm/katana
|
|
name = "dark shard"
|
|
desc = "An eerie metal shard surrounded by dark energies."
|
|
icon = 'icons/obj/lavaland/artefacts.dmi'
|
|
icon_state = "cursed_katana_organ"
|
|
status = 0
|
|
contents = newlist(/obj/item/cursed_katana)
|
|
|
|
/obj/item/organ/internal/cyberimp/arm/katana/prepare_eat()
|
|
return // It's a shard
|
|
|
|
|
|
/obj/item/organ/internal/cyberimp/arm/katana/activate_self(mob/living/carbon/user)
|
|
if(..())
|
|
return ITEM_INTERACT_COMPLETE
|
|
to_chat(user,SPAN_USERDANGER("The mass goes up your arm and inside it!"))
|
|
playsound(user, 'sound/misc/demon_consume.ogg', 50, TRUE)
|
|
RegisterSignal(user, COMSIG_MOB_DEATH, PROC_REF(user_death))
|
|
|
|
user.drop_item()
|
|
insert(user)
|
|
return ITEM_INTERACT_COMPLETE
|
|
|
|
/obj/item/organ/internal/cyberimp/arm/katana/emp_act() //Organic, no emp stuff
|
|
return
|
|
|
|
/obj/item/organ/internal/cyberimp/arm/katana/Retract()
|
|
var/obj/item/cursed_katana/katana = holder
|
|
if(!katana)
|
|
return FALSE
|
|
if(!katana.drew_blood)
|
|
to_chat(owner, SPAN_USERDANGER("[katana] lashes out at you in hunger!"))
|
|
playsound(owner, 'sound/misc/demon_attack1.ogg', 50, TRUE)
|
|
if(parent_organ)
|
|
owner.apply_damage(25, BRUTE, parent_organ, TRUE)
|
|
katana.drew_blood = FALSE
|
|
katana.clean_blood()
|
|
return ..()
|
|
|
|
|
|
/obj/item/organ/internal/cyberimp/arm/katana/proc/user_death(mob/user)
|
|
SIGNAL_HANDLER
|
|
INVOKE_ASYNC(src, PROC_REF(user_death_async), user)
|
|
|
|
/obj/item/organ/internal/cyberimp/arm/katana/proc/user_death_async(mob/user)
|
|
Retract()
|
|
user.visible_message(SPAN_WARNING("[user] begins to turn to dust, his soul being contained within [src]!"),
|
|
SPAN_USERDANGER("You feel your body begin to turn to dust, your soul being drawn into [src]!"))
|
|
forceMove(get_turf(owner))
|
|
remove(user)
|
|
addtimer(CALLBACK(user, TYPE_PROC_REF(/mob, dust)), 1 SECONDS)
|
|
|
|
|
|
/obj/item/organ/internal/cyberimp/arm/katana/remove(mob/living/carbon/M, special)
|
|
UnregisterSignal(M, COMSIG_MOB_DEATH)
|
|
. = ..()
|
|
|
|
#define HARM_SLASH "Harm"
|
|
#define DISARM_SLASH "Disarm"
|
|
#define GRAB_SLASH "Grab"
|
|
#define HELP_SLASH "Help"
|
|
#define COMBO_STEPS "steps"
|
|
#define COMBO_PROC "proc"
|
|
#define ATTACK_STRIKE "Hilt Strike"
|
|
#define ATTACK_DASH "Dash Attack"
|
|
#define ATTACK_CUT "Tendon Cut"
|
|
#define ATTACK_HEAL "Dark Heal"
|
|
|
|
|
|
/obj/item/cursed_katana
|
|
name = "cursed katana"
|
|
desc = "A katana used to seal something vile away long ago. \
|
|
Even with the weapon destroyed, all the pieces containing the creature have coagulated back together to find a new host."
|
|
icon = 'icons/obj/lavaland/artefacts.dmi'
|
|
icon_state = "cursed_katana"
|
|
lefthand_file = 'icons/mob/inhands/weapons_lefthand.dmi'
|
|
righthand_file = 'icons/mob/inhands/weapons_righthand.dmi'
|
|
force = 15
|
|
armor_penetration_percentage = 40
|
|
armor_penetration_flat = 10
|
|
sharp = TRUE
|
|
w_class = WEIGHT_CLASS_HUGE
|
|
attack_verb = list("attack", "slash", "stab", "slice", "tear", "lacerate", "rip", "dice", "cut")
|
|
hitsound = 'sound/weapons/bladeslice.ogg'
|
|
var/drew_blood = FALSE
|
|
var/timerid
|
|
var/list/input_list = list()
|
|
var/list/combo_strings = list()
|
|
var/list/combo_list = list()
|
|
|
|
|
|
/obj/item/cursed_katana/Initialize(mapload)
|
|
. = ..()
|
|
AddComponent(/datum/component/parry, _stamina_constant = 2, _stamina_coefficient = 0.5, _parryable_attack_types = NON_PROJECTILE_ATTACKS)
|
|
combo_list = list(
|
|
ATTACK_STRIKE = list(COMBO_STEPS = list(DISARM_SLASH, DISARM_SLASH, DISARM_SLASH), COMBO_PROC = TYPE_PROC_REF(/obj/item/cursed_katana, strike)),
|
|
ATTACK_DASH = list(COMBO_STEPS = list(GRAB_SLASH, GRAB_SLASH, GRAB_SLASH), COMBO_PROC = TYPE_PROC_REF(/obj/item/cursed_katana, dash)),
|
|
ATTACK_CUT = list(COMBO_STEPS = list(HARM_SLASH, HARM_SLASH, HARM_SLASH), COMBO_PROC = TYPE_PROC_REF(/obj/item/cursed_katana, cut)),
|
|
ATTACK_HEAL = list(COMBO_STEPS = list(HELP_SLASH, HELP_SLASH, HELP_SLASH, HELP_SLASH), COMBO_PROC = TYPE_PROC_REF(/obj/item/cursed_katana, heal)),
|
|
)
|
|
|
|
for(var/combo in combo_list)
|
|
var/list/combo_specifics = combo_list[combo]
|
|
var/step_string = english_list(combo_specifics[COMBO_STEPS])
|
|
combo_strings += (SPAN_NOTICE("<b>[combo]</b> - [step_string]"))
|
|
|
|
/obj/item/cursed_katana/examine(mob/user)
|
|
. = ..()
|
|
. += drew_blood ? (SPAN_NOTICE("It's sated... for now.")) : (SPAN_DANGER("It will not be sated until it tastes blood."))
|
|
. += combo_strings
|
|
|
|
/obj/item/cursed_katana/dropped(mob/user)
|
|
. = ..()
|
|
reset_inputs(null, TRUE)
|
|
|
|
/obj/item/cursed_katana/attack_self__legacy__attackchain(mob/user)
|
|
. = ..()
|
|
reset_inputs(user, TRUE)
|
|
|
|
/obj/item/cursed_katana/attack__legacy__attackchain(mob/living/target, mob/user, click_parameters)
|
|
if(target.stat == DEAD || target == user) //No, you can not stab yourself to cloak / not take the penalty for not drawing blood
|
|
return ..()
|
|
if(HAS_TRAIT(user, TRAIT_PACIFISM))
|
|
to_chat(user, SPAN_WARNING("You don't want to harm [target]!"))
|
|
return TRUE
|
|
drew_blood = TRUE
|
|
if(user.a_intent == INTENT_DISARM)
|
|
input_list += DISARM_SLASH
|
|
if(user.a_intent == INTENT_HARM)
|
|
input_list += HARM_SLASH
|
|
if(user.a_intent == INTENT_GRAB)
|
|
input_list += GRAB_SLASH
|
|
if(user.a_intent == INTENT_HELP)
|
|
input_list += HELP_SLASH
|
|
if(ishostile(target) || isbasicmob(target))
|
|
user.changeNext_move(CLICK_CD_RAPID)
|
|
if(length(input_list) > 4)
|
|
reset_inputs(user, TRUE)
|
|
if(check_input(target, user))
|
|
reset_inputs(null, TRUE)
|
|
return TRUE
|
|
else
|
|
timerid = addtimer(CALLBACK(src, PROC_REF(reset_inputs), user, FALSE), 5 SECONDS, TIMER_UNIQUE|TIMER_OVERRIDE|TIMER_STOPPABLE)
|
|
return ..()
|
|
|
|
/obj/item/cursed_katana/hit_reaction(mob/living/carbon/human/owner, atom/movable/hitby, attack_text = "the attack", final_block_chance = 0, damage = 0, attack_type = MELEE_ATTACK)
|
|
if(attack_type == PROJECTILE_ATTACK)
|
|
final_block_chance = 0 //Don't bring a sword to a gunfight
|
|
return ..()
|
|
|
|
/obj/item/cursed_katana/proc/check_input(mob/living/target, mob/user)
|
|
for(var/combo in combo_list)
|
|
var/list/combo_specifics = combo_list[combo]
|
|
if(compare_list(input_list,combo_specifics[COMBO_STEPS]))
|
|
INVOKE_ASYNC(src, combo_specifics[COMBO_PROC], target, user)
|
|
return TRUE
|
|
return FALSE
|
|
|
|
/obj/item/cursed_katana/proc/reset_inputs(mob/user, deltimer)
|
|
input_list.Cut()
|
|
if(user)
|
|
to_chat(user, SPAN_NOTICE("You return to neutral stance."))
|
|
if(deltimer && timerid)
|
|
deltimer(timerid)
|
|
|
|
/obj/item/cursed_katana/proc/strike(mob/living/target, mob/user)
|
|
user.visible_message(SPAN_WARNING("[user] strikes [target] with [src]'s hilt!"),
|
|
SPAN_NOTICE("You hilt strike [target]!"))
|
|
to_chat(target, SPAN_USERDANGER("You've been struck by [user]!"))
|
|
playsound(src, 'sound/weapons/genhit3.ogg', 50, TRUE)
|
|
RegisterSignal(target, COMSIG_MOVABLE_IMPACT, PROC_REF(strike_throw_impact))
|
|
var/atom/throw_target = get_edge_target_turf(target, user.dir)
|
|
target.throw_at(throw_target, 5, 3, user, FALSE, callback = CALLBACK(target, TYPE_PROC_REF(/datum, UnregisterSignal), target, COMSIG_MOVABLE_IMPACT))
|
|
target.apply_damage(17, BRUTE, BODY_ZONE_CHEST)
|
|
to_chat(target, SPAN_USERDANGER("You've been struck by [user]!"))
|
|
user.do_attack_animation(target, ATTACK_EFFECT_PUNCH)
|
|
|
|
/obj/item/cursed_katana/proc/strike_throw_impact(mob/living/source, atom/hit_atom, datum/thrownthing/thrownthing)
|
|
SIGNAL_HANDLER
|
|
|
|
UnregisterSignal(source, COMSIG_MOVABLE_IMPACT)
|
|
source.apply_damage(5, BRUTE, BODY_ZONE_CHEST)
|
|
if(ishostile(source))
|
|
var/mob/living/simple_animal/hostile/target = source
|
|
target.ranged_cooldown += 2 SECONDS
|
|
else if(iscarbon(source))
|
|
var/mob/living/carbon/target = source
|
|
target.AdjustConfused(8 SECONDS)
|
|
return NONE
|
|
|
|
/obj/item/cursed_katana/proc/heal(mob/living/target, mob/living/user)
|
|
user.visible_message(SPAN_WARNING("[user] lets [src] feast on [target]'s blood!"),
|
|
SPAN_WARNING("You let [src] feast on [target], and it heals you, at a price!"))
|
|
target.apply_damage(15, BRUTE, BODY_ZONE_CHEST, TRUE)
|
|
user.apply_status_effect(STATUS_EFFECT_SHADOW_MEND)
|
|
|
|
/obj/item/cursed_katana/proc/cut(mob/living/target, mob/user)
|
|
user.visible_message(SPAN_WARNING("[user] cuts [target]'s tendons!"),
|
|
SPAN_NOTICE("You tendon cut [target]!"))
|
|
to_chat(target, SPAN_USERDANGER("Your tendons have been cut by [user]!"))
|
|
target.apply_damage(15, BRUTE, BODY_ZONE_CHEST, TRUE)
|
|
user.do_attack_animation(target, ATTACK_EFFECT_DISARM)
|
|
playsound(src, 'sound/weapons/rapierhit.ogg', 50, TRUE)
|
|
var/datum/status_effect/saw_bleed/bloodletting/A = target.has_status_effect(STATUS_EFFECT_BLOODLETTING)
|
|
if(!A)
|
|
target.apply_status_effect(STATUS_EFFECT_BLOODLETTING)
|
|
else
|
|
A.add_bleed(6)
|
|
|
|
/obj/item/cursed_katana/proc/dash(mob/living/target, mob/user)
|
|
var/turf/dash_target = get_turf(target)
|
|
var/turf/user_turf = get_turf(user)
|
|
if(!is_teleport_allowed(dash_target.z)) //No teleporting at CC
|
|
to_chat(user, (SPAN_USERDANGER("You can not dash here!")))
|
|
return
|
|
user.visible_message(SPAN_WARNING("[user] dashes through [target]!"),
|
|
SPAN_NOTICE("You dash through [target]!"))
|
|
to_chat(target, (SPAN_USERDANGER("[user] dashes through you!")))
|
|
playsound(src, 'sound/magic/blink.ogg', 50, TRUE)
|
|
for(var/mob/living/legion_killer in orange(1, user)) // We have replaced the AOE slash move, we want to be able to deal with legion skulls however
|
|
legion_killer.adjustBruteLoss(5)
|
|
target.apply_damage(12, BRUTE, BODY_ZONE_CHEST, TRUE)
|
|
for(var/distance in 0 to 8)
|
|
var/turf/current_dash_target = dash_target
|
|
current_dash_target = get_step(current_dash_target, user.dir)
|
|
if(!current_dash_target.is_blocked_turf(exclude_mobs = TRUE))
|
|
dash_target = current_dash_target
|
|
else
|
|
break
|
|
for(var/mob/living/additional_target in dash_target) //Slash through every mob you cut through
|
|
additional_target.apply_damage(15, BRUTE, BODY_ZONE_CHEST, TRUE)
|
|
to_chat(additional_target, SPAN_USERDANGER("You've been sliced by [user]!"))
|
|
user_turf.Beam(dash_target, icon_state = "warp_beam", time = 0.3 SECONDS, maxdistance = INFINITY)
|
|
user.forceMove(dash_target)
|
|
|
|
|
|
#undef HARM_SLASH
|
|
#undef DISARM_SLASH
|
|
#undef GRAB_SLASH
|
|
#undef HELP_SLASH
|
|
#undef COMBO_STEPS
|
|
#undef COMBO_PROC
|
|
#undef ATTACK_STRIKE
|
|
#undef ATTACK_DASH
|
|
#undef ATTACK_CUT
|
|
#undef ATTACK_HEAL
|