Files

478 lines
16 KiB
Plaintext

// todo: rebalance combat stats
/obj/item/nullrod
name = "null rod"
desc = "A rod of pure obsidian, its very presence disrupts and dampens the powers of paranormal phenomenae."
icon = 'icons/obj/weapons.dmi'
icon_state = "nullrod"
item_state = "nullrod"
slot_flags = SLOT_BELT
damage_force = 15
throw_speed = 1
throw_range = 4
throw_force = 10
w_class = WEIGHT_CLASS_SMALL
drop_sound = 'sound/items/drop/sword.ogg'
pickup_sound = 'sound/items/pickup/sword.ogg'
suit_storage_class = SUIT_STORAGE_CLASS_HARDWEAR | SUIT_STORAGE_CLASS_SOFTWEAR
var/reskinned = FALSE
var/defend_chance = 0 // The base chance for the weapon to parry.
var/projectile_parry_chance = 0 // The base chance for a projectile to be deflected.
item_icons = list(
SLOT_ID_LEFT_HAND = 'icons/mob/items/lefthand_melee.dmi',
SLOT_ID_RIGHT_HAND = 'icons/mob/items/righthand_melee.dmi',
)
var/SA_bonus_damage = 35 // 50 total against demons and aberrations.
var/SA_vulnerability = MOB_CLASS_DEMONIC | MOB_CLASS_ABERRATION
/obj/item/nullrod/Initialize(mapload)
. = ..()
AddComponent(/datum/component/anti_magic, TRUE, TRUE, FALSE, null, null, FALSE)
/obj/item/nullrod/afterattack(atom/target, mob/user, clickchain_flags, list/params)
if(!(clickchain_flags & CLICKCHAIN_HAS_PROXIMITY))
return
if (istype(target, /turf/simulated/floor))
to_chat(user, "<span class='notice'>You hit the floor with the [src].</span>")
call(TYPE_PROC_REF(/obj/effect/rune, revealrunes))(src)
if (isliving(target))
var/mob/living/tm = target // targeted mob
if(SA_vulnerability & tm.mob_class)
tm.apply_damage(SA_bonus_damage) // fuck em
/obj/item/nullrod/attack_self(mob/user, datum/event_args/actor/actor)
. = ..()
if(.)
return
if(user && (user.mind.isholy) && !reskinned)
reskin_holy_weapon(user)
/**
* reskin_holy_weapon: Shows a user a list of all available nullrod reskins and based on his choice replaces the nullrod with the reskinned version
*
* Arguments:
* * M The mob choosing a nullrod reskin
*/
/obj/item/nullrod/proc/reskin_holy_weapon(mob/living/L)
if(GLOB.holy_weapon_type)
return
var/obj/item/holy_weapon
var/list/holy_weapons_list = typesof(/obj/item/nullrod)
var/list/display_names = list()
var/list/nullrod_icons = list()
for(var/V in holy_weapons_list)
var/obj/item/nullrod/rodtype = V
if (V)
display_names[initial(rodtype.name)] = rodtype
nullrod_icons += list(initial(rodtype.name) = image(icon = initial(rodtype.icon), icon_state = initial(rodtype.icon_state)))
nullrod_icons = sortList(nullrod_icons)
var/choice = show_radial_menu(L, inv_inside ? get_turf(L) : src, nullrod_icons, custom_check = CALLBACK(src, PROC_REF(check_menu), L), radius = 42, require_near = TRUE)
if(!choice || !check_menu(L))
return
var/A = display_names[choice] // This needs to be on a separate var as list member access is not allowed for new
holy_weapon = new A
GLOB.holy_weapon_type = holy_weapon.type
if(holy_weapon)
reskinned = TRUE
qdel(src)
L.put_in_active_hand(holy_weapon)
/**
* check_menu: Checks if we are allowed to interact with a radial menu
*
* Arguments:
* * user The mob interacting with a menu
*/
/obj/item/nullrod/proc/check_menu(mob/user)
if(!istype(user))
return FALSE
if(QDELETED(src) || reskinned)
return FALSE
if(user.incapacitated())
return FALSE
return TRUE
/obj/item/nullrod/proc/jedi_spin(mob/living/user)
for(var/i in list(NORTH,SOUTH,EAST,WEST,EAST,SOUTH,NORTH,SOUTH,EAST,WEST,EAST,SOUTH))
user.setDir(i)
if(i == WEST)
user.emote("flip")
sleep(1)
/obj/item/nullrod/godhand
icon_state = "disintegrate"
item_state = "disintegrate"
name = "god hand"
desc = "This hand of yours glows with an awesome power!"
damage_type = DAMAGE_TYPE_BURN
attack_verb = list("punched", "cross countered", "pummeled")
/obj/item/nullrod/godhand/Initialize(mapload)
. = ..()
ADD_TRAIT(src, TRAIT_ITEM_NODROP, HAND_REPLACEMENT_TRAIT)
/obj/item/nullrod/staff
icon_state = "godstaff-red"
item_state = "godstaff-red"
name = "red holy staff"
desc = "It has a mysterious, protective aura."
damage_force = 5
slot_flags = SLOT_BACK
defend_chance = 50
var/shield_icon = "shield-red"
/obj/item/nullrod/staff/blue
name = "blue holy staff"
icon_state = "godstaff-blue"
item_state = "godstaff-blue"
shield_icon = "shield-old"
/obj/item/nullrod/claymore
icon_state = "claymore"
item_state = "claymore"
name = "holy claymore"
desc = "A weapon fit for a crusade!"
slot_flags = SLOT_BACK|SLOT_BELT
damage_mode = DAMAGE_MODE_SHARP | DAMAGE_MODE_EDGE
projectile_parry_chance = 30
attack_sound = 'sound/weapons/bladeslice.ogg'
attack_verb = list("attacked", "slashed", "stabbed", "sliced", "torn", "ripped", "diced", "cut")
/obj/item/nullrod/claymore/darkblade
icon_state = "cultblade"
item_state = "cultblade"
name = "dark blade"
desc = "Spread the glory of the dark gods!"
slot_flags = SLOT_BELT
attack_sound = 'sound/hallucinations/growl1.ogg'
/obj/item/nullrod/claymore/chainsaw_sword
icon_state = "chainsword1"
item_state = "chainsword1"
name = "sacred chainsaw sword"
desc = "Suffer not a heretic to live."
slot_flags = SLOT_BELT
damage_mode = DAMAGE_MODE_SHARP | DAMAGE_MODE_EDGE
attack_verb = list("sawed", "torn", "cut", "chopped", "diced")
attack_sound = 'sound/weapons/chainsaw_attack.ogg'
/obj/item/nullrod/claymore/glowing
icon_state = "swordon"
item_state = "swordon"
name = "force weapon"
desc = "The blade glows with the power of faith. Or possibly a battery."
slot_flags = SLOT_BELT
/obj/item/nullrod/claymore/katana
name = "\improper Hanzo steel"
desc = "Capable of cutting clean through a holy claymore."
icon_state = "katana"
item_state = "katana"
slot_flags = SLOT_BELT | SLOT_BACK
/obj/item/nullrod/claymore/multiverse
name = "extradimensional blade"
desc = "Once the harbinger of an interdimensional war, its sharpness fluctuates wildly."
icon_state = "multiverse"
item_state = "multiverse"
slot_flags = SLOT_BELT
/obj/item/nullrod/claymore/multiverse/legacy_mob_melee_hook(mob/target, mob/user, clickchain_flags, list/params, mult, target_zone, intent)
damage_force = rand(1, 30)
return ..()
/obj/item/nullrod/claymore/saber
name = "light energy sword"
attack_sound = 'sound/weapons/blade1.ogg'
icon_state = "swordblue"
item_state = "swordblue"
desc = "If you strike me down, I shall become more robust than you can possibly imagine."
slot_flags = SLOT_BELT
/obj/item/nullrod/claymore/saber/red
name = "dark energy sword"
icon_state = "swordred"
item_state = "swordred"
desc = "Woefully ineffective when used on steep terrain."
/obj/item/nullrod/claymore/saber/pirate
name = "nautical energy sword"
icon_state = "cutlass1"
item_state = "cutlass1"
desc = "Convincing HR that your religion involved piracy was no mean feat."
/obj/item/nullrod/sord
name = "\improper UNREAL SORD"
desc = "This thing is so unspeakably HOLY you are having a hard time even holding it."
icon_state = "sord"
item_state = "sord"
slot_flags = SLOT_BELT
damage_force = 4.13
throw_force = 1
attack_sound = 'sound/weapons/bladeslice.ogg'
attack_verb = list("attacked", "slashed", "stabbed", "sliced", "torn", "ripped", "diced", "cut")
/obj/item/nullrod/scythe
icon_state = "rscythe"
item_state = "rscythe"
name = "reaper scythe"
desc = "Ask not for whom the bell tolls..."
slot_flags = SLOT_BACK
damage_mode = DAMAGE_MODE_SHARP | DAMAGE_MODE_EDGE
attack_verb = list("chopped", "sliced", "cut", "reaped")
/obj/item/nullrod/scythe/vibro
icon_state = "hfrequency0"
item_state = "hfrequency1"
name = "high frequency blade"
desc = "Bad references are the DNA of the soul."
attack_verb = list("chopped", "sliced", "cut", "zandatsu'd")
attack_sound = 'sound/weapons/rapierhit.ogg'
/obj/item/nullrod/scythe/spellblade
icon_state = "spellblade"
item_state = "spellblade"
name = "dormant spellblade"
desc = "The blade grants the wielder nearly limitless power...if they can figure out how to turn it on, that is."
attack_sound = 'sound/weapons/rapierhit.ogg'
/obj/item/nullrod/hammmer
icon_state = "hammeron"
item_state = "hammeron"
name = "relic war hammer"
desc = "This war hammer cost the chaplain forty thousand space dollars."
slot_flags = SLOT_BELT
attack_verb = list("smashed", "bashed", "hammered", "crunched")
/obj/item/nullrod/chainsaw
name = "chainsaw hand"
desc = "Good? Bad? You're the guy with the chainsaw hand."
icon_state = "chainsaw_on"
item_state = "mounted_chainsaw"
damage_mode = DAMAGE_MODE_SHARP | DAMAGE_MODE_EDGE
attack_verb = list("sawed", "torn", "cut", "chopped", "diced")
attack_sound = 'sound/weapons/chainsaw_attack.ogg'
/obj/item/nullrod/chainsaw/Initialize(mapload)
. = ..()
ADD_TRAIT(src, TRAIT_ITEM_NODROP, HAND_REPLACEMENT_TRAIT)
/obj/item/nullrod/clown
icon = 'icons/obj/wizard.dmi'
icon_state = "clownrender"
item_state = "render"
name = "clown dagger"
desc = "Used for absolutely hilarious sacrifices."
attack_sound = 'sound/items/bikehorn.ogg'
damage_mode = DAMAGE_MODE_SHARP
attack_verb = list("attacked", "slashed", "stabbed", "sliced", "torn", "ripped", "diced", "cut")
/obj/item/nullrod/pride_hammer
icon_state = "pride"
item_state = "pride"
name = "Pride-struck Hammer"
desc = "It resonates an aura of Pride."
damage_force = 16
throw_force = 15
w_class = 4
slot_flags = SLOT_BACK
attack_verb = list("attacked", "smashed", "crushed", "splattered", "cracked")
attack_sound = 'sound/weapons/resonator_blast.ogg'
/obj/item/nullrod/pride_hammer/afterattack(atom/target, mob/user, clickchain_flags, list/params)
. = ..()
if(!(clickchain_flags & CLICKCHAIN_HAS_PROXIMITY))
return
if(prob(30) && ishuman(target))
var/mob/living/carbon/human/H = target
user.reagents.trans_to(H, user.reagents.total_volume, 1, 1, 0)
to_chat(user, "<span class='notice'>Your pride reflects on [H].</span>")
to_chat(H, "<span class='userdanger'>You feel insecure, taking on [user]'s burden.</span>")
/obj/item/nullrod/whip
name = "holy whip"
desc = "What a terrible night to be on Space Station 13."
icon_state = "chain"
item_state = "chain"
slot_flags = SLOT_BELT
damage_force = 12
reach = 2
attack_verb = list("whipped", "lashed")
attack_sound = 'sound/weapons/towelwhip.ogg'
/obj/item/nullrod/fedora
name = "atheist's fedora"
desc = "The brim of the hat is as sharp as your wit. The edge would hurt almost as much as disproving the existence of God."
icon_state = "fedora"
item_state = "fedora"
slot_flags = SLOT_HEAD
damage_mode = DAMAGE_MODE_SHARP
icon = 'icons/obj/clothing/hats.dmi'
damage_force = 0
throw_speed = 4
throw_range = 7
throw_force = 30
attack_verb = list("enlightened", "redpilled")
/obj/item/nullrod/armblade
name = "dark blessing"
desc = "Particularly twisted deities grant gifts of dubious value."
icon_state = "arm_blade"
item_state = "arm_blade"
damage_mode = DAMAGE_MODE_SHARP | DAMAGE_MODE_EDGE
/obj/item/nullrod/armblade/Initialize(mapload)
. = ..()
ADD_TRAIT(src, TRAIT_ITEM_NODROP, HAND_REPLACEMENT_TRAIT)
/obj/item/nullrod/armblade/claw
name = "profane blessing"
icon_state = "ling_claw"
item_state = "ling_claw"
/obj/item/nullrod/armblade/tentacle
name = "unholy blessing"
icon_state = "tentacle"
item_state = "tentacle"
/obj/item/nullrod/carp
name = "carp-sie plushie"
desc = "An adorable stuffed toy that resembles the god of all carp. The teeth look pretty sharp. Activate it to receive the blessing of Carp-Sie."
icon = 'icons/obj/toy.dmi'
icon_state = "basecarp"
item_state = "basecarp"
damage_force = 15
attack_verb = list("bitten", "eaten", "fin slapped")
attack_sound = 'sound/weapons/bite.ogg'
var/used_blessing = FALSE
/obj/item/nullrod/carp/attack_self(mob/user, datum/event_args/actor/actor)
. = ..()
if(.)
return
if(used_blessing)
else if(user.mind && (user.mind.isholy))
to_chat(user, "You are blessed by Carp-Sie. Wild space carp will no longer attack you.")
user.add_iff_faction(MOB_IFF_FACTION_CARP)
used_blessing = TRUE
/obj/item/nullrod/claymore/bostaff //May as well make it a "claymore" and inherit the blocking
name = "monk's staff"
desc = "A long, tall staff made of polished wood. Traditionally used in ancient old-Earth martial arts, it is now used to harass the clown."
damage_force = 15
defend_chance = 40
slot_flags = SLOT_BACK
damage_mode = DAMAGE_MODE_SHARP
attack_sound = "swing_hit"
attack_verb = list("smashed", "slammed", "whacked", "thwacked")
icon_state = "bostaff0"
item_state = "bostaff0"
/obj/item/nullrod/claymore/bostaff/legacy_mob_melee_hook(mob/target, mob/user, clickchain_flags, list/params, mult, target_zone, intent)
add_fingerprint(user)
if(!issilicon(target))
return ..()
if(!isliving(target))
return ..()
if(user.a_intent == INTENT_DISARM)
if(!ishuman(target))
return ..()
var/mob/living/carbon/human/H = target
var/list/fluffmessages = list("[user] clubs [H] with [src]!", \
"[user] smacks [H] with the butt of [src]!", \
"[user] broadsides [H] with [src]!", \
"[user] smashes [H]'s head with [src]!", \
"[user] beats [H] with front of [src]!", \
"[user] twirls and slams [H] with [src]!")
H.visible_message("<span class='warning'>[pick(fluffmessages)]</span>", \
"<span class='userdanger'>[pick(fluffmessages)]</span>")
playsound(get_turf(user), 'sound/effects/woodhit.ogg', 75, 1, -1)
if(prob(25))
jedi_spin(usr)
else
return ..()
/obj/item/nullrod/tribal_knife
icon_state = "crysknife"
item_state = "crysknife"
name = "arrhythmic knife"
desc = "They say fear is the true mind killer, but stabbing them in the head works too. Honour compels you to not sheathe it once drawn."
damage_mode = DAMAGE_MODE_SHARP
attack_sound = 'sound/weapons/bladeslice.ogg'
attack_verb = list("attacked", "slashed", "stabbed", "sliced", "torn", "ripped", "diced", "cut")
// no this is hrp
// /obj/item/nullrod/tribal_knife/process(delta_time)
// slowdown = rand(-2, 2)
/obj/item/nullrod/pitchfork
icon_state = "pitchfork0"
name = "unholy pitchfork"
desc = "Holding this makes you look absolutely devilish."
attack_verb = list("poked", "impaled", "pierced", "jabbed")
attack_sound = 'sound/weapons/bladeslice.ogg'
damage_mode = DAMAGE_MODE_SHARP
/obj/item/nullrod/egyptian
name = "egyptian staff"
desc = "A tutorial in mummification is carved into the staff. You could probably craft the wraps if you had some cloth."
icon_state = "pharaoh_sceptre"
item_state = "pharaoh_sceptre"
attack_verb = list("bashed", "smacked", "whacked")
/obj/item/nullrod/rosary
icon_state = "rosary"
item_state = null
name = "prayer beads"
desc = "A set of prayer beads used by many of the more traditional religions in space"
damage_force = 4
throw_force = 0
attack_verb = list("whipped", "repented", "lashed", "flagellated")
drop_sound = 'sound/items/drop/card.ogg'
pickup_sound = 'sound/items/pickup/card.ogg'
var/praying = FALSE
var/deity_name = "Coderbus" //This is the default, hopefully won't actually appear if the religion subsystem is running properly
/obj/item/nullrod/rosary/Initialize(mapload)
.=..()
if(GLOB.deity)
deity_name = GLOB.deity
/obj/item/nullrod/rosary/legacy_mob_melee_hook(mob/target, mob/user, clickchain_flags, list/params, mult, target_zone, intent)
if(user.a_intent == INTENT_HARM)
return ..()
if(!isliving(target))
return ..()
var/mob/living/L = target
if(!user.mind || user.mind.assigned_role != "Chaplain")
to_chat(user, "<span class='notice'>You are not close enough with [deity_name] to use [src].</span>")
return
if(praying)
to_chat(user, "<span class='notice'>You are already using [src].</span>")
return
user.visible_message("<span class='info'>[user] kneels[L == user ? null : " next to [L]"] and begins to utter a prayer to [deity_name].</span>", \
"<span class='info'>You kneel[L == user ? null : " next to [L]"] and begin a prayer to [deity_name].</span>")
praying = TRUE
if(do_after(user, 20, target = L))
L.reagents?.add_reagent(/datum/reagent/water/holywater, 5)
to_chat(L, "<span class='notice'>[user]'s prayer to [deity_name] has eased your pain!</span>")
L.adjustToxLoss(-5, TRUE, TRUE)
L.adjustOxyLoss(-5)
L.adjustBruteLoss(-5)
L.adjustFireLoss(-5)
praying = FALSE
else
to_chat(user, "<span class='notice'>Your prayer to [deity_name] was interrupted.</span>")
praying = FALSE