Ports dash weapons to the dash datum
This commit is contained in:
committed by
CitadelStationBot
parent
aec96bbbbe
commit
4e648765db
@@ -72,6 +72,173 @@
|
||||
if(is_servant_of_ratvar(C) && C.reagents)
|
||||
C.reagents.add_reagent("heparin", 1)
|
||||
|
||||
<<<<<<< HEAD
|
||||
=======
|
||||
/obj/item/twohanded/required/cult_bastard
|
||||
name = "bloody bastard sword"
|
||||
desc = "An enormous sword used by Nar-Sien cultists to rapidly harvest the souls of non-believers."
|
||||
w_class = WEIGHT_CLASS_HUGE
|
||||
block_chance = 50
|
||||
throwforce = 20
|
||||
force = 35
|
||||
armour_penetration = 45
|
||||
throw_speed = 1
|
||||
throw_range = 3
|
||||
sharpness = IS_SHARP
|
||||
light_color = "#ff0000"
|
||||
attack_verb = list("cleaved", "slashed", "torn", "hacked", "ripped", "diced", "carved")
|
||||
icon_state = "cultbastard"
|
||||
item_state = "cultbastard"
|
||||
hitsound = 'sound/weapons/bladeslice.ogg'
|
||||
lefthand_file = 'icons/mob/inhands/64x64_lefthand.dmi'
|
||||
righthand_file = 'icons/mob/inhands/64x64_righthand.dmi'
|
||||
inhand_x_dimension = 64
|
||||
inhand_y_dimension = 64
|
||||
actions_types = list()
|
||||
flags_2 = SLOWS_WHILE_IN_HAND_2
|
||||
var/datum/action/innate/dash/cult/jaunt
|
||||
var/datum/action/innate/cult/spin2win/linked_action
|
||||
var/spinning = FALSE
|
||||
var/spin_cooldown = 250
|
||||
var/list/shards = list()
|
||||
var/dash_toggled = TRUE
|
||||
|
||||
/obj/item/twohanded/required/cult_bastard/Initialize()
|
||||
. = ..()
|
||||
set_light(4)
|
||||
jaunt = new(src)
|
||||
linked_action = new(src)
|
||||
|
||||
/obj/item/twohanded/required/cult_bastard/can_be_pulled(user)
|
||||
return FALSE
|
||||
|
||||
/obj/item/twohanded/required/cult_bastard/attack_self(mob/user)
|
||||
dash_toggled = !dash_toggled
|
||||
if(dash_toggled)
|
||||
to_chat(loc, "<span class='notice'>You raise the [src] and prepare to jaunt with it.</span>")
|
||||
else
|
||||
to_chat(loc, "<span class='notice'>You lower the [src] and prepare to swing it normally.</span>")
|
||||
|
||||
/obj/item/twohanded/required/cult_bastard/pickup(mob/living/user)
|
||||
. = ..()
|
||||
if(!iscultist(user))
|
||||
if(!is_servant_of_ratvar(user))
|
||||
to_chat(user, "<span class='cultlarge'>\"I wouldn't advise that.\"</span>")
|
||||
to_chat(user, "<span class='warning'>An overwhelming sense of nausea overpowers you!</span>")
|
||||
user.Dizzy(80)
|
||||
user.Knockdown(30)
|
||||
return
|
||||
else
|
||||
to_chat(user, "<span class='cultlarge'>\"One of Ratvar's toys is trying to play with things [user.p_they()] shouldn't. Cute.\"</span>")
|
||||
to_chat(user, "<span class='userdanger'>A horrible force yanks at your arm!</span>")
|
||||
user.emote("scream")
|
||||
user.apply_damage(30, BRUTE, pick("l_arm", "r_arm"))
|
||||
user.Knockdown(50)
|
||||
return
|
||||
jaunt.Grant(user, src)
|
||||
linked_action.Grant(user, src)
|
||||
user.update_icons()
|
||||
|
||||
/obj/item/twohanded/required/cult_bastard/dropped(mob/user)
|
||||
. = ..()
|
||||
linked_action.Remove(user)
|
||||
jaunt.Remove(user)
|
||||
user.update_icons()
|
||||
|
||||
/obj/item/twohanded/required/cult_bastard/IsReflect()
|
||||
if(spinning)
|
||||
playsound(src, pick('sound/weapons/bulletflyby.ogg', 'sound/weapons/bulletflyby2.ogg', 'sound/weapons/bulletflyby3.ogg'), 75, 1)
|
||||
return TRUE
|
||||
else
|
||||
..()
|
||||
|
||||
/obj/item/twohanded/required/cult_bastard/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(prob(final_block_chance))
|
||||
if(attack_type == PROJECTILE_ATTACK)
|
||||
owner.visible_message("<span class='danger'>[owner] deflects [attack_text] with [src]!</span>")
|
||||
playsound(src, pick('sound/weapons/bulletflyby.ogg', 'sound/weapons/bulletflyby2.ogg', 'sound/weapons/bulletflyby3.ogg'), 100, 1)
|
||||
return TRUE
|
||||
else
|
||||
playsound(src, 'sound/weapons/parry.ogg', 75, 1)
|
||||
owner.visible_message("<span class='danger'>[owner] parries [attack_text] with [src]!</span>")
|
||||
return TRUE
|
||||
return FALSE
|
||||
|
||||
/obj/item/twohanded/required/cult_bastard/afterattack(atom/target, mob/user, proximity, click_parameters)
|
||||
. = ..()
|
||||
if(dash_toggled)
|
||||
jaunt.Teleport(user, target)
|
||||
return
|
||||
if(!proximity)
|
||||
return
|
||||
if(ishuman(target))
|
||||
var/mob/living/carbon/human/H = target
|
||||
if(H.stat != CONSCIOUS)
|
||||
var/obj/item/device/soulstone/SS = new /obj/item/device/soulstone(src)
|
||||
SS.attack(H, user)
|
||||
shards += SS
|
||||
return
|
||||
if(istype(target, /obj/structure/constructshell) && contents.len)
|
||||
var/obj/item/device/soulstone/SS = contents[1]
|
||||
if(istype(SS) && SS.transfer_soul("CONSTRUCT",target,user))
|
||||
qdel(SS)
|
||||
|
||||
/datum/action/innate/dash/cult
|
||||
name = "Rend the Veil"
|
||||
desc = "Use the sword to shear open the flimsy fabric of this reality and teleport to your target."
|
||||
icon_icon = 'icons/mob/actions/actions_cult.dmi'
|
||||
button_icon_state = "phaseshift"
|
||||
dash_sound = 'sound/magic/enter_blood.ogg'
|
||||
recharge_sound = 'sound/magic/exit_blood.ogg'
|
||||
beam_effect = "sendbeam"
|
||||
phasein = /obj/effect/temp_visual/dir_setting/cult/phase
|
||||
phaseout = /obj/effect/temp_visual/dir_setting/cult/phase/out
|
||||
|
||||
/datum/action/innate/dash/cult/IsAvailable()
|
||||
if(iscultist(holder) && current_charges)
|
||||
return TRUE
|
||||
else
|
||||
return FALSE
|
||||
|
||||
|
||||
|
||||
/datum/action/innate/cult/spin2win
|
||||
name = "Geometer's Fury"
|
||||
desc = "You draw on the power of the sword's ancient runes, spinning it wildly around you as you become immune to most attacks."
|
||||
background_icon_state = "bg_demon"
|
||||
button_icon_state = "sintouch"
|
||||
var/cooldown = 0
|
||||
var/mob/living/carbon/human/holder
|
||||
var/obj/item/twohanded/required/cult_bastard/sword
|
||||
|
||||
/datum/action/innate/cult/spin2win/Grant(mob/user, obj/bastard)
|
||||
. = ..()
|
||||
sword = bastard
|
||||
holder = user
|
||||
|
||||
/datum/action/innate/cult/spin2win/IsAvailable()
|
||||
if(iscultist(holder) && cooldown <= world.time)
|
||||
return TRUE
|
||||
else
|
||||
return FALSE
|
||||
|
||||
/datum/action/innate/cult/spin2win/Activate()
|
||||
cooldown = world.time + sword.spin_cooldown
|
||||
holder.changeNext_move(50)
|
||||
holder.apply_status_effect(/datum/status_effect/sword_spin)
|
||||
sword.spinning = TRUE
|
||||
sword.block_chance = 100
|
||||
sword.slowdown += 1.5
|
||||
addtimer(CALLBACK(src, .proc/stop_spinning), 50)
|
||||
holder.update_action_buttons_icon()
|
||||
|
||||
/datum/action/innate/cult/spin2win/proc/stop_spinning()
|
||||
sword.spinning = FALSE
|
||||
sword.block_chance = 50
|
||||
sword.slowdown -= 1.5
|
||||
sleep(sword.spin_cooldown)
|
||||
holder.update_action_buttons_icon()
|
||||
>>>>>>> 380413f... Ports dash weapons to the dash datum (#31222)
|
||||
|
||||
/obj/item/restraints/legcuffs/bola/cult
|
||||
name = "nar'sien bola"
|
||||
|
||||
Reference in New Issue
Block a user