mirror of
https://github.com/VOREStation/VOREStation.git
synced 2026-07-11 23:23:55 +01:00
Unlucky trait (#18463)
* this compiles * more edits * Upports OP21's immovable rod Makes it NOT shit. * actually enable this lol * CLANG * we all fall down * break it * stairs * bye async * makes doorcrushes less lethal * more unluck! * dice and stumble vore * major version * Update clang.dm * More tweaks. BS Cracker Makes bluespace cracker better code quality too * Cut down on lists here * Adds the traits * glass shapnel * Update unlucky.dm * Modular Shock * Charger and thrown * Defib nat 1 * Gravity Falls * gibby * no longer gib, just hurt a LOT * Better Washer * Update washing_machine.dm * Even less jank * Moves some stuff around * linters * Update unlucky.dm * Table stubbing * fixes mirror break, evil only * PIPEBOMB * Update negative.dm * Update mail.dm * glasses fly off your face if you fall * Update unlucky.dm * evil beaker and spooky events in the dark * Evil beaker spilling * Unlucky people have custom maint loot * Get sick while searching * Update _lootable.dm * whoop * Update _lootable.dm * washer will always wash * Lowered to 5 * ash * Update areas.dm * get knocked * picking up items * Dice * Update unlucky.dm * Update code/game/objects/items/devices/defib.dm Co-authored-by: Guti <32563288+TheCaramelion@users.noreply.github.com> * Update code/modules/economy/vending.dm Co-authored-by: Guti <32563288+TheCaramelion@users.noreply.github.com> * Update code/game/area/areas.dm Co-authored-by: Guti <32563288+TheCaramelion@users.noreply.github.com> * Update code/datums/components/traits/unlucky.dm Co-authored-by: Guti <32563288+TheCaramelion@users.noreply.github.com> * Update code/datums/components/traits/unlucky.dm Co-authored-by: Guti <32563288+TheCaramelion@users.noreply.github.com> * Update code/datums/components/traits/unlucky.dm Co-authored-by: Guti <32563288+TheCaramelion@users.noreply.github.com> * Update code/datums/components/traits/unlucky.dm Co-authored-by: Guti <32563288+TheCaramelion@users.noreply.github.com> * Nicer damage * these * this * mini DCS update * Excludes * Proper inherit * Update unlucky.dm * Update code/datums/components/traits/unlucky.dm * These * thes too * user * no hardrefs * only these 2 --------- Co-authored-by: Guti <32563288+TheCaramelion@users.noreply.github.com>
This commit is contained in:
@@ -22,7 +22,7 @@
|
||||
|
||||
/datum/blob_type/energized_jelly/on_attack(obj/structure/blob/B, mob/living/victim, def_zone)
|
||||
victim.electrocute_act(10, src, 1, def_zone)
|
||||
victim.stun_effect_act(0, 40, BP_TORSO, src)
|
||||
victim.stun_effect_act(0, 40, BP_TORSO, src, electric = TRUE)
|
||||
|
||||
/datum/blob_type/energized_jelly/on_chunk_tick(obj/item/blobcore_chunk/B)
|
||||
for(var/mob/living/L in oview(world.view, get_turf(B)))
|
||||
|
||||
@@ -590,6 +590,13 @@ GLOBAL_LIST_EMPTY(vending_products)
|
||||
addtimer(CALLBACK(src, PROC_REF(delayed_vend), R, user), vend_delay)
|
||||
|
||||
/obj/machinery/vending/proc/delayed_vend(datum/stored_item/vending_product/R, mob/user)
|
||||
if(HAS_TRAIT(user, TRAIT_UNLUCKY) && prob(10))
|
||||
visible_message(span_infoplain(span_bold("\The [src]") + " clunks and fails to dispense any item."))
|
||||
playsound(src, "sound/[vending_sound]", 100, TRUE, 1)
|
||||
vend_ready = 1
|
||||
currently_vending = null
|
||||
SStgui.update_uis(src)
|
||||
return
|
||||
R.get_product(get_turf(src))
|
||||
if(has_logs)
|
||||
do_logging(R, user, 1)
|
||||
@@ -715,9 +722,11 @@ GLOBAL_LIST_EMPTY(vending_products)
|
||||
return
|
||||
|
||||
//Somebody cut an important wire and now we're following a new definition of "pitch."
|
||||
/obj/machinery/vending/proc/throw_item()
|
||||
/obj/machinery/vending/proc/throw_item(forced_target)
|
||||
var/obj/item/throw_item = null
|
||||
var/mob/living/target = locate() in view(7,src)
|
||||
if(forced_target && isliving(forced_target))
|
||||
target = forced_target
|
||||
if(!target)
|
||||
return 0
|
||||
|
||||
|
||||
@@ -27,3 +27,16 @@
|
||||
to_chat(user, span_warning("You need at least one working hand to snap your fingers."))
|
||||
return FALSE
|
||||
. = ..()
|
||||
|
||||
/decl/emote/audible/snap/do_extra(mob/user)
|
||||
. = ..()
|
||||
if(HAS_TRAIT(user, TRAIT_UNLUCKY) && prob(0.1) && ishuman(user)) //1 in a thousand
|
||||
var/mob/living/carbon/human/unlucky_human = user
|
||||
var/datum/component/omen/bad_luck = unlucky_human.GetComponent(/datum/component/omen) //Also going to make sure they got the EVIL version.
|
||||
if(bad_luck.evil)
|
||||
unlucky_human.visible_message(span_danger("[unlucky_human] snaps, their hand fading to ash!"), span_danger(span_huge("OH GOD YOUR HAND")))
|
||||
for(var/limb in list(BP_L_HAND, BP_R_HAND))
|
||||
var/obj/item/organ/external/L = unlucky_human.get_organ(limb)
|
||||
if(istype(L) && L.is_usable() && !L.splinted)
|
||||
L.droplimb(TRUE, DROPLIMB_BURN)
|
||||
break
|
||||
|
||||
@@ -91,10 +91,10 @@
|
||||
sides = 10
|
||||
result = 10
|
||||
|
||||
/obj/item/dice/attack_self(mob/user as mob)
|
||||
/obj/item/dice/attack_self(mob/user)
|
||||
rollDice(user, 0)
|
||||
|
||||
/obj/item/dice/proc/rollDice(mob/user as mob, var/silent = 0)
|
||||
/obj/item/dice/proc/rollDice(mob/user, silent = FALSE)
|
||||
result = rand(1, sides)
|
||||
if(loaded)
|
||||
if(cheater)
|
||||
@@ -103,6 +103,9 @@
|
||||
else if(prob(75)) //makeshift weighted dice don't always work
|
||||
result = loaded
|
||||
icon_state = "[name][result]"
|
||||
var/result_override = SEND_SIGNAL(user, COMSIG_MOB_ROLLED_DICE, src, silent, result) //We can override dice rolls!
|
||||
if(result_override)
|
||||
result = result_override
|
||||
|
||||
if(!silent)
|
||||
var/comment = ""
|
||||
@@ -192,18 +195,18 @@
|
||||
/obj/item/dice,
|
||||
)
|
||||
|
||||
/obj/item/storage/dicecup/attack_self(mob/user as mob)
|
||||
/obj/item/storage/dicecup/attack_self(mob/user)
|
||||
user.visible_message(span_notice("[user] shakes [src]."), \
|
||||
span_notice("You shake [src]."), \
|
||||
span_notice("You hear dice rolling."))
|
||||
rollCup(user)
|
||||
|
||||
/obj/item/storage/dicecup/proc/rollCup(mob/user as mob)
|
||||
/obj/item/storage/dicecup/proc/rollCup(mob/user)
|
||||
for(var/obj/item/dice/I in src.contents)
|
||||
var/obj/item/dice/D = I
|
||||
D.rollDice(user, 1)
|
||||
|
||||
/obj/item/storage/dicecup/proc/revealDice(var/mob/viewer)
|
||||
/obj/item/storage/dicecup/proc/revealDice(mob/viewer)
|
||||
for(var/obj/item/dice/I in src.contents)
|
||||
var/obj/item/dice/D = I
|
||||
to_chat(viewer, "The [D.name] shows a [D.result].")
|
||||
@@ -230,3 +233,40 @@
|
||||
. = ..()
|
||||
for(var/i = 1 to 5)
|
||||
new /obj/item/dice(src)
|
||||
|
||||
/obj/item/dice/d20/cursed
|
||||
name = "d20"
|
||||
desc = "A dice with twenty sides."
|
||||
icon_state = "d2020"
|
||||
sides = 20
|
||||
result = 20
|
||||
|
||||
///If the dice will apply the major version of unlucky or not.
|
||||
var/evil = TRUE
|
||||
|
||||
|
||||
/obj/item/dice/d20/cursed/rollDice(mob/user, silent = FALSE)
|
||||
..()
|
||||
if(result == 1)
|
||||
to_chat(user, span_cult("You feel extraordinarily unlucky..."))
|
||||
if(evil)
|
||||
user.AddComponent(
|
||||
/datum/component/omen/dice,\
|
||||
incidents_left = 1,\
|
||||
luck_mod = 1,\
|
||||
damage_mod = 1,\
|
||||
evil = TRUE,\
|
||||
safe_disposals = FALSE,\
|
||||
vorish = TRUE,\
|
||||
)
|
||||
|
||||
else
|
||||
user.AddComponent(
|
||||
/datum/component/omen/dice,\
|
||||
incidents_left = 1,\
|
||||
luck_mod = 0.3,\
|
||||
damage_mod = 1,\
|
||||
evil = FALSE,\
|
||||
safe_disposals = FALSE,\
|
||||
vorish = TRUE,\
|
||||
)
|
||||
|
||||
@@ -322,7 +322,7 @@
|
||||
if(!H.lying || H.handcuffed || arrest_type)
|
||||
cuff = FALSE
|
||||
if(!cuff)
|
||||
H.stun_effect_act(0, stun_strength, null)
|
||||
H.stun_effect_act(0, stun_strength, null, electric = TRUE)
|
||||
playsound(src, 'sound/weapons/egloves.ogg', 50, 1, -1)
|
||||
do_attack_animation(H)
|
||||
busy = TRUE
|
||||
|
||||
@@ -388,13 +388,14 @@
|
||||
return
|
||||
|
||||
/mob/living/carbon/slip(var/slipped_on,stun_duration=8)
|
||||
SEND_SIGNAL(src, COMSIG_ON_CARBON_SLIP, slipped_on, stun_duration)
|
||||
if(buckled)
|
||||
return 0
|
||||
return FALSE
|
||||
stop_pulling()
|
||||
to_chat(src, span_warning("You slipped on [slipped_on]!"))
|
||||
playsound(src, 'sound/misc/slip.ogg', 50, 1, -3)
|
||||
Weaken(FLOOR(stun_duration/2, 1))
|
||||
return 1
|
||||
return TRUE
|
||||
|
||||
/mob/living/carbon/proc/add_chemical_effect(var/effect, var/magnitude = 1)
|
||||
if(effect in chem_effects)
|
||||
|
||||
@@ -1506,12 +1506,12 @@
|
||||
if(lying)
|
||||
playsound(src, 'sound/misc/slip.ogg', 25, 1, -1)
|
||||
drop_both_hands()
|
||||
return 0
|
||||
return FALSE
|
||||
if((species.flags & NO_SLIP && !footcoverage_check) || (shoes && (shoes.item_flags & NOSLIP))) //Footwear negates a species' natural traction.
|
||||
return 0
|
||||
return FALSE
|
||||
if(..(slipped_on,stun_duration))
|
||||
drop_both_hands()
|
||||
return 1
|
||||
return TRUE
|
||||
|
||||
/mob/living/carbon/human/proc/relocate()
|
||||
set category = "Object"
|
||||
|
||||
@@ -58,7 +58,7 @@ emp_act
|
||||
|
||||
return (..(P , def_zone))
|
||||
|
||||
/mob/living/carbon/human/stun_effect_act(var/stun_amount, var/agony_amount, var/def_zone)
|
||||
/mob/living/carbon/human/stun_effect_act(var/stun_amount, var/agony_amount, var/def_zone, var/used_weapon=null, var/electric = FALSE)
|
||||
var/obj/item/organ/external/affected = get_organ(check_zone(def_zone))
|
||||
var/siemens_coeff = get_siemens_coefficient_organ(affected)
|
||||
if(fire_stacks < 0) // Water makes you more conductive.
|
||||
@@ -87,7 +87,7 @@ emp_act
|
||||
var/emote_scream = pick("screams in pain and ", "lets out a sharp cry and ", "cries out and ")
|
||||
automatic_custom_emote(VISIBLE_MESSAGE, "[affected.organ_can_feel_pain() ? "" : emote_scream] drops what they were holding in their [affected.name]!", check_stat = TRUE)
|
||||
|
||||
..(stun_amount, agony_amount, def_zone)
|
||||
..(stun_amount, agony_amount, def_zone, used_weapon, electric)
|
||||
|
||||
/mob/living/carbon/human/getarmor(var/def_zone, var/type)
|
||||
var/armorval = 0
|
||||
@@ -433,8 +433,8 @@ emp_act
|
||||
return
|
||||
if(in_throw_mode && speed <= THROWFORCE_SPEED_DIVISOR) //empty active hand and we're in throw mode
|
||||
if(canmove && !restrained() && !src.is_incorporeal())
|
||||
if(isturf(O.loc))
|
||||
if(can_catch(O))
|
||||
if(isturf(O.loc) && can_catch(O))
|
||||
if(!SEND_SIGNAL(src, COMSIG_HUMAN_ON_CATCH_THROW, source, speed))
|
||||
put_in_active_hand(O)
|
||||
visible_message(span_warning("[src] catches [O]!"))
|
||||
throw_mode_off()
|
||||
|
||||
@@ -828,3 +828,26 @@
|
||||
addiction = REAGENT_ID_ASUSTENANCE
|
||||
custom_only = FALSE
|
||||
hidden = TRUE //Disabled on Virgo
|
||||
|
||||
/datum/trait/negative/unlucky
|
||||
name = "Unlucky"
|
||||
desc = "You are naturally unlucky and ill-events often befall you."
|
||||
cost = -2
|
||||
is_genetrait = FALSE
|
||||
hidden = FALSE
|
||||
custom_only = FALSE
|
||||
added_component_path = /datum/component/omen/trait
|
||||
excludes = list(/datum/trait/negative/unlucky/major)
|
||||
|
||||
|
||||
/datum/trait/negative/unlucky/major
|
||||
name = "Unlucky, Major"
|
||||
desc = "Your luck is extremely awful and potentially fatal."
|
||||
cost = -5
|
||||
tutorial = "You should avoid disposal bins."
|
||||
is_genetrait = TRUE
|
||||
hidden = FALSE
|
||||
added_component_path = /datum/component/omen/trait/major
|
||||
excludes = list(/datum/trait/negative/unlucky)
|
||||
activation_message= span_cult(span_bold("What a terrible night to have a curse!"))
|
||||
primitive_expression_messages=list("unluckily stubs their toe!")
|
||||
|
||||
@@ -117,7 +117,7 @@
|
||||
// Getting hurt in VR doesn't damage the physical body, but you still got hurt.
|
||||
if(ishuman(vr_holder) && total_damage)
|
||||
var/mob/living/carbon/human/V = vr_holder
|
||||
V.stun_effect_act(0, total_damage*2/3, null) // 200 damage leaves the user in paincrit for several seconds, agony reaches 0 after around 2m.
|
||||
V.stun_effect_act(0, total_damage*2/3, null, electric = FALSE) // 200 damage leaves the user in paincrit for several seconds, agony reaches 0 after around 2m.
|
||||
to_chat(vr_holder, span_warning("Pain from your time in VR lingers.")) // 250 damage leaves the user unconscious for several seconds in addition to paincrit
|
||||
|
||||
// Maintain a link with the mob, but don't use teleop
|
||||
|
||||
@@ -126,7 +126,7 @@
|
||||
|
||||
//Stun Beams
|
||||
if(P.taser_effect)
|
||||
stun_effect_act(0, P.agony, def_zone, P)
|
||||
stun_effect_act(0, P.agony, def_zone, P, electric = TRUE)
|
||||
if(!P.nodamage)
|
||||
apply_damage(P.damage, P.damage_type, def_zone, absorb, soaked, 0, sharp=proj_sharp, edge=proj_edge, used_weapon=P, projectile=TRUE)
|
||||
qdel(P)
|
||||
@@ -146,8 +146,9 @@
|
||||
// return absorb
|
||||
|
||||
//Handles the effects of "stun" weapons
|
||||
/mob/living/proc/stun_effect_act(var/stun_amount, var/agony_amount, var/def_zone, var/used_weapon=null)
|
||||
/mob/living/proc/stun_effect_act(var/stun_amount, var/agony_amount, var/def_zone, var/used_weapon=null, var/electric = FALSE)
|
||||
flash_pain()
|
||||
SEND_SIGNAL(src, COMSIG_STUN_EFFECT_ACT, stun_amount, agony_amount, def_zone, used_weapon, electric)
|
||||
|
||||
if (stun_amount)
|
||||
Stun(stun_amount)
|
||||
|
||||
@@ -91,7 +91,7 @@
|
||||
to_chat(src, span_danger("Warning: Electromagnetic pulse detected."))
|
||||
..()
|
||||
|
||||
/mob/living/silicon/stun_effect_act(var/stun_amount, var/agony_amount)
|
||||
/mob/living/silicon/stun_effect_act(var/stun_amount, var/agony_amount, var/def_zone, var/used_weapon=null, var/electric = FALSE)
|
||||
return //immune
|
||||
|
||||
/mob/living/silicon/electrocute_act(var/shock_damage, var/obj/source, var/siemens_coeff = 0.0, var/def_zone = null, var/stun = 1)
|
||||
|
||||
@@ -190,9 +190,8 @@
|
||||
. = min(., 1.0)
|
||||
|
||||
// Electricity
|
||||
/mob/living/simple_mob/electrocute_act(var/shock_damage, var/obj/source, var/siemens_coeff = 1.0, var/def_zone = null)
|
||||
var/zap = min((1-get_shock_protection()), siemens_coeff)
|
||||
shock_damage *= zap
|
||||
/mob/living/simple_mob/electrocute_act(var/shock_damage, var/obj/source, var/siemens_coeff = 1.0, var/def_zone = null, var/stun = 1)
|
||||
shock_damage *= siemens_coeff
|
||||
if(shock_damage < 1)
|
||||
return 0
|
||||
|
||||
@@ -217,7 +216,7 @@
|
||||
. = min(., 1.0)
|
||||
|
||||
// Shot with taser/stunvolver
|
||||
/mob/living/simple_mob/stun_effect_act(var/stun_amount, var/agony_amount, var/def_zone, var/used_weapon=null)
|
||||
/mob/living/simple_mob/stun_effect_act(var/stun_amount, var/agony_amount, var/def_zone, var/used_weapon=null, var/electric = FALSE)
|
||||
if(taser_kill)
|
||||
var/stunDam = 0
|
||||
var/agonyDam = 0
|
||||
|
||||
@@ -44,7 +44,7 @@
|
||||
adjust_discipline(2) // Justified.
|
||||
|
||||
// Shocked grilles don't hurt slimes, and in fact give them charge.
|
||||
/mob/living/simple_mob/slime/xenobio/electrocute_act(shock_damage, obj/source, siemens_coeff = 1.0, def_zone = null)
|
||||
/mob/living/simple_mob/slime/xenobio/electrocute_act(shock_damage, obj/source, siemens_coeff = 1.0, def_zone = null, stun = 1)
|
||||
power_charge = between(0, power_charge + round(shock_damage / 10), 10)
|
||||
to_chat(src, span_notice("\The [source] shocks you, and it charges you."))
|
||||
|
||||
|
||||
@@ -116,8 +116,19 @@
|
||||
// On-click handling. Turns on the computer if it's off and opens the GUI.
|
||||
/obj/item/modular_computer/attack_self(var/mob/user)
|
||||
if(enabled && screen_on)
|
||||
if(isliving(user) && HAS_TRAIT(user, TRAIT_UNLUCKY) && prob(5))
|
||||
var/mob/living/unlucky_soul = user
|
||||
to_chat(user, span_danger("You interact with \the [src] and are met with a sudden shock!"))
|
||||
var/datum/effect/effect/system/spark_spread/s = new /datum/effect/effect/system/spark_spread
|
||||
s.set_up(5, 1, src)
|
||||
s.start()
|
||||
unlucky_soul.electrocute_act(5, src, 1)
|
||||
return
|
||||
tgui_interact(user)
|
||||
else if(!enabled && screen_on)
|
||||
if(HAS_TRAIT(user, TRAIT_UNLUCKY) && prob(25))
|
||||
to_chat(user, "You try to turn on \the [src] but it doesn't respond.")
|
||||
return
|
||||
turn_on(user)
|
||||
|
||||
/obj/item/modular_computer/attackby(var/obj/item/W, var/mob/user)
|
||||
|
||||
@@ -193,7 +193,7 @@
|
||||
var/mob/living/L = P
|
||||
if(L.client)
|
||||
L.client.Process_Grab() // Update any miscellanous grabs, possibly break grab-chains
|
||||
|
||||
SEND_SIGNAL(AM, COMSIG_MOVED_UP_STAIRS, AM, oldloc)
|
||||
return TRUE
|
||||
|
||||
/obj/structure/stairs/bottom/use_stairs_instant(var/atom/movable/AM)
|
||||
@@ -231,6 +231,7 @@
|
||||
L.client.Process_Grab()
|
||||
else
|
||||
AM.forceMove(get_turf(top))
|
||||
SEND_SIGNAL(AM, COMSIG_MOVED_UP_STAIRS, AM)
|
||||
|
||||
|
||||
//////////////////////////////////////////////////////////////////////
|
||||
@@ -452,7 +453,7 @@
|
||||
var/mob/living/L = P
|
||||
if(L.client)
|
||||
L.client.Process_Grab() // Update any miscellanous grabs, possibly break grab-chains
|
||||
|
||||
SEND_SIGNAL(AM, COMSIG_MOVED_DOWN_STAIRS, AM, oldloc)
|
||||
return TRUE
|
||||
|
||||
/obj/structure/stairs/top/use_stairs_instant(var/atom/movable/AM)
|
||||
@@ -489,6 +490,7 @@
|
||||
L.client.Process_Grab()
|
||||
else
|
||||
AM.forceMove(get_turf(bottom))
|
||||
SEND_SIGNAL(AM, COMSIG_MOVED_DOWN_STAIRS, AM)
|
||||
|
||||
// Mapping pieces, placed at the bottommost part of the stairs
|
||||
/obj/structure/stairs/spawner
|
||||
|
||||
@@ -852,7 +852,7 @@ GLOBAL_LIST_EMPTY(light_type_cache)
|
||||
|
||||
// break the light and make sparks if was on
|
||||
|
||||
/obj/machinery/light/proc/broken(var/skip_sound_and_sparks = 0)
|
||||
/obj/machinery/light/proc/broken(var/skip_sound_and_sparks = FALSE)
|
||||
if(status == LIGHT_EMPTY)
|
||||
return
|
||||
|
||||
|
||||
@@ -150,7 +150,7 @@
|
||||
overlay_above_everything = TRUE
|
||||
color = "#3e5064"
|
||||
|
||||
/obj/machinery/light/small/fairylights/broken()
|
||||
/obj/machinery/light/small/fairylights/broken(var/skip_sound_and_sparks = FALSE)
|
||||
return
|
||||
|
||||
/obj/machinery/light/small/fairylights/flicker
|
||||
|
||||
@@ -273,7 +273,7 @@
|
||||
target.visible_message(span_danger("[target] has been zapped with [src] by [user]!"))
|
||||
|
||||
playsound(src, 'sound/weapons/egloves.ogg', 50, 1, -1)
|
||||
target.stun_effect_act(0, agony, hit_zone, src)
|
||||
target.stun_effect_act(0, agony, hit_zone, src, electric = TRUE)
|
||||
msg_admin_attack("[key_name(user)] stunned [key_name(target)] with the [src].")
|
||||
if(ishuman(target))
|
||||
var/mob/living/carbon/human/H = target
|
||||
@@ -495,7 +495,7 @@
|
||||
else
|
||||
target.visible_message(span_danger("[target] has been prodded with [src] by [user]!"))
|
||||
playsound(src, 'sound/weapons/egloves.ogg', 50, 1, -1)
|
||||
target.stun_effect_act(stun, agony, hit_zone, src)
|
||||
target.stun_effect_act(stun, agony, hit_zone, src, electric = TRUE)
|
||||
msg_admin_attack("[key_name(user)] stunned [key_name(target)] with the [src].")
|
||||
if(ishuman(target))
|
||||
var/mob/living/carbon/human/H = target
|
||||
|
||||
@@ -2,6 +2,14 @@
|
||||
//The winner of the pull has an effect applied to them.
|
||||
//Crackers do already exist, but these ones are a more memey scene item.
|
||||
|
||||
#define SHRINKING_CRACKER "shrinking"
|
||||
#define GROWING_CRACKER "growing"
|
||||
#define DRUGGED_CRACKER "drugged"
|
||||
#define INVISIBLE_CRACKER "invisibility"
|
||||
#define FALLING_CRACKER "knockdown"
|
||||
#define TELEPORTING_CRACKER "teleport"
|
||||
#define WEALTHY_CRACKER "wealth"
|
||||
|
||||
/obj/item/cracker
|
||||
name = "bluespace cracker" //I have no idea why this was called shrink ray when this increased and decreased size.
|
||||
desc = "A celebratory little game with a bluespace twist! Pull it between two people until it snaps, and the person who recieves the larger end gets a prize!"
|
||||
@@ -13,26 +21,35 @@
|
||||
)
|
||||
item_state = "blue"
|
||||
var/rigged = 0 //So that they can be rigged by varedits to go one way or the other. positive values mean holder always wins, negative values mean target always wins.
|
||||
var/list/prizes = list("shrinking","growing","drugged","invisibility","knocked over","teleport","wealth")
|
||||
var/list/jokes = list(
|
||||
"When is a boat just like snow? When it's adrift.",
|
||||
"What happens to naughty elves? Santa gives them the sack.",
|
||||
"What do you call an old snowman? Water.",
|
||||
"Why has Santa been banned from sooty chimneys? Carbon footprints.",
|
||||
"What goes down but doesn't come up? A yo.",
|
||||
"What's green and fuzzy, has four legs and would kill you if it fell from a tree? A pool table.",
|
||||
"Why did the blind man fall into the well? Because he couldn't see that well.",
|
||||
"What did the pirate get on his report card? Seven Cs",
|
||||
"What do you call a fish with no eyes? Fsh",
|
||||
"How do you make an egg roll? You push it.",
|
||||
"What do you call a deer with no eyes? NO EYED DEER!",
|
||||
"What's red, and smells like blue paint? Red paint.",
|
||||
"Where do cows go to dance? A meat ball.",
|
||||
"What do you call a person who steals all your toenail clippings? A cliptoemaniac.",
|
||||
"What's brown and sticky? A stick.",
|
||||
"What's the best way to kill a circus? Go for the juggler.",
|
||||
"What do you call a cow with no legs? Ground Beef.",
|
||||
"Why'd the scarecrow win the Nobel prize? He was outstanding in his field.")
|
||||
var/prize //What prize we have loaded
|
||||
var/joke //What joke we have loaded
|
||||
|
||||
/obj/item/cracker/Initialize(mapload)
|
||||
. = ..()
|
||||
var/style = pick("blue","green","yellow","red","heart","hazard")
|
||||
icon_state = style
|
||||
item_state = style
|
||||
if(!prize)
|
||||
prize = pick(SHRINKING_CRACKER,GROWING_CRACKER,GROWING_CRACKER,INVISIBLE_CRACKER,FALLING_CRACKER,TELEPORTING_CRACKER,WEALTHY_CRACKER)
|
||||
if(!joke)
|
||||
joke = pick("When is a boat just like snow? When it's adrift.",
|
||||
"What happens to naughty elves? Santa gives them the sack.",
|
||||
"What do you call an old snowman? Water.",
|
||||
"Why has Santa been banned from sooty chimneys? Carbon footprints.",
|
||||
"What goes down but doesn't come up? A yo.",
|
||||
"What's green and fuzzy, has four legs and would kill you if it fell from a tree? A pool table.",
|
||||
"Why did the blind man fall into the well? Because he couldn't see that well.",
|
||||
"What did the pirate get on his report card? Seven Cs",
|
||||
"What do you call a fish with no eyes? Fsh",
|
||||
"How do you make an egg roll? You push it.",
|
||||
"What do you call a deer with no eyes? NO EYED DEER!",
|
||||
"What's red, and smells like blue paint? Red paint.",
|
||||
"Where do cows go to dance? A meat ball.",
|
||||
"What do you call a person who steals all your toenail clippings? A cliptoemaniac.",
|
||||
"What's brown and sticky? A stick.",
|
||||
"What's the best way to kill a circus? Go for the juggler.",
|
||||
"What do you call a cow with no legs? Ground Beef.",
|
||||
"Why'd the scarecrow win the Nobel prize? He was outstanding in his field.")
|
||||
|
||||
/obj/item/cracker/attack(atom/A, mob/living/user, adjacent, params)
|
||||
var/mob/living/carbon/human/target = A
|
||||
@@ -56,8 +73,6 @@
|
||||
to_chat(user, span_notice("\The [src] is no longer in-hand!"))
|
||||
to_chat(target, span_notice("\The [src] is no longer in-hand!"))
|
||||
return
|
||||
var/prize = pick(prizes)
|
||||
var/joke = pick(jokes)
|
||||
var/mob/living/carbon/human/winner
|
||||
var/mob/living/carbon/human/loser
|
||||
if(!rigged)
|
||||
@@ -74,46 +89,52 @@
|
||||
else
|
||||
winner = target
|
||||
loser = user
|
||||
if(HAS_TRAIT(loser, TRAIT_UNLUCKY) && prob(66))
|
||||
if(prize == (SHRINKING_CRACKER || GROWING_CRACKER || FALLING_CRACKER || TELEPORTING_CRACKER)) //If we're unlucky and the prize is bad, chance for us to get it!
|
||||
var/former_winner = winner
|
||||
winner = loser
|
||||
loser = former_winner
|
||||
|
||||
var/spawnloc = get_turf(winner)
|
||||
|
||||
winner.visible_message(span_notice("\The [winner] wins the cracker prize!"),span_notice("You win the cracker prize!"))
|
||||
if(prize == "shrinking")
|
||||
winner.resize(0.25)
|
||||
winner.visible_message(span_bold("\The [winner]") + " shrinks suddenly!")
|
||||
if(prize == "growing")
|
||||
winner.resize(2)
|
||||
winner.visible_message(span_bold("\The [winner]") + " grows in height suddenly.")
|
||||
if(prize == "drugged")
|
||||
winner.druggy = max(winner.druggy, 50)
|
||||
if(prize == "invisibility")
|
||||
if(!winner.cloaked)
|
||||
winner.visible_message(span_bold("\The [winner]") + " vanishes from sight.")
|
||||
winner.cloak()
|
||||
spawn(600)
|
||||
if(winner.cloaked)
|
||||
winner.uncloak()
|
||||
winner.visible_message(span_bold("\The [winner]") + " appears as if from thin air.")
|
||||
if(prize == "knocked over")
|
||||
winner.visible_message(span_bold("\The [winner]") + " is suddenly knocked to the ground.")
|
||||
winner.weakened = max(winner.weakened,50)
|
||||
if(prize == "teleport")
|
||||
if(loser.can_be_drop_pred && loser.vore_selected)
|
||||
if(winner.devourable && winner.can_be_drop_prey)
|
||||
winner.visible_message(span_bold("\The [winner]") + " is teleported to somewhere nearby...")
|
||||
var/datum/effect/effect/system/spark_spread/spk
|
||||
spk = new(winner)
|
||||
switch(prize)
|
||||
if(SHRINKING_CRACKER)
|
||||
winner.resize(0.25)
|
||||
winner.visible_message(span_bold("\The [winner]") + " shrinks suddenly!")
|
||||
if(GROWING_CRACKER)
|
||||
winner.resize(2)
|
||||
winner.visible_message(span_bold("\The [winner]") + " grows in height suddenly.")
|
||||
if(GROWING_CRACKER)
|
||||
winner.druggy = max(winner.druggy, 50)
|
||||
if(INVISIBLE_CRACKER)
|
||||
if(!winner.cloaked)
|
||||
winner.visible_message(span_bold("\The [winner]") + " vanishes from sight.")
|
||||
winner.cloak()
|
||||
spawn(600)
|
||||
if(winner.cloaked)
|
||||
winner.uncloak()
|
||||
winner.visible_message(span_bold("\The [winner]") + " appears as if from thin air.")
|
||||
if(FALLING_CRACKER)
|
||||
winner.visible_message(span_bold("\The [winner]") + " is suddenly knocked to the ground.")
|
||||
winner.weakened = max(winner.weakened,50)
|
||||
if(TELEPORTING_CRACKER)
|
||||
if(loser.can_be_drop_pred && loser.vore_selected)
|
||||
if(winner.devourable && winner.can_be_drop_prey)
|
||||
winner.visible_message(span_bold("\The [winner]") + " is teleported to somewhere nearby...")
|
||||
var/datum/effect/effect/system/spark_spread/spk
|
||||
spk = new(winner)
|
||||
|
||||
var/T = get_turf(winner)
|
||||
spk.set_up(5, 0, winner)
|
||||
spk.attach(winner)
|
||||
playsound(T, "sparks", 50, 1)
|
||||
anim(T,winner,'icons/mob/mob.dmi',,"phaseout",,winner.dir)
|
||||
winner.forceMove(loser.vore_selected)
|
||||
if(prize == "wealth")
|
||||
new /obj/random/cash/huge(spawnloc)
|
||||
new /obj/random/cash/huge(spawnloc)
|
||||
winner.visible_message(span_bold("\The [winner]") + " has a whole load of cash fall at their feet!")
|
||||
var/T = get_turf(winner)
|
||||
spk.set_up(5, 0, winner)
|
||||
spk.attach(winner)
|
||||
playsound(T, "sparks", 50, 1)
|
||||
anim(T,winner,'icons/mob/mob.dmi',,"phaseout",,winner.dir)
|
||||
winner.forceMove(loser.vore_selected)
|
||||
if(WEALTHY_CRACKER)
|
||||
new /obj/random/cash/huge(spawnloc)
|
||||
new /obj/random/cash/huge(spawnloc)
|
||||
winner.visible_message(span_bold("\The [winner]") + " has a whole load of cash fall at their feet!")
|
||||
|
||||
playsound(user, 'sound/effects/snap.ogg', 50, 1)
|
||||
user.drop_item(src)
|
||||
@@ -123,40 +144,33 @@
|
||||
J.info = joke
|
||||
qdel(src)
|
||||
|
||||
/obj/item/cracker/Initialize(mapload)
|
||||
var/list/styles = list("blue","green","yellow","red","heart","hazard")
|
||||
var/style = pick(styles)
|
||||
icon_state = style
|
||||
item_state = style
|
||||
. = ..()
|
||||
|
||||
/obj/item/cracker/shrinking
|
||||
name = "shrinking bluespace cracker"
|
||||
prizes = list("shrinking")
|
||||
prize = SHRINKING_CRACKER
|
||||
|
||||
/obj/item/cracker/growing
|
||||
name = "growing bluespace cracker"
|
||||
prizes = list("growing")
|
||||
prize = GROWING_CRACKER
|
||||
|
||||
/obj/item/cracker/invisibility
|
||||
name = "cloaking bluespace cracker"
|
||||
prizes = list("invisibility")
|
||||
prize = INVISIBLE_CRACKER
|
||||
|
||||
/obj/item/cracker/drugged
|
||||
name = "psychedelic bluespace cracker"
|
||||
prizes = list("drugged")
|
||||
prize = GROWING_CRACKER
|
||||
|
||||
/obj/item/cracker/knockover
|
||||
name = "forceful bluespace cracker"
|
||||
prizes = list("knocked over")
|
||||
prize = FALLING_CRACKER
|
||||
|
||||
/obj/item/cracker/vore
|
||||
name = "teleporting bluespace cracker"
|
||||
prizes = list("teleport")
|
||||
prize = TELEPORTING_CRACKER
|
||||
|
||||
/obj/item/cracker/money
|
||||
name = "fortuitous bluespace cracker"
|
||||
prizes = list("wealth")
|
||||
prize = WEALTHY_CRACKER
|
||||
|
||||
/obj/item/clothing/head/paper_crown
|
||||
name = "paper crown"
|
||||
@@ -181,3 +195,11 @@
|
||||
|
||||
/obj/item/paper/cracker_joke/update_icon()
|
||||
return
|
||||
|
||||
#undef SHRINKING_CRACKER
|
||||
#undef GROWING_CRACKER
|
||||
#undef DRUGGED_CRACKER
|
||||
#undef INVISIBLE_CRACKER
|
||||
#undef FALLING_CRACKER
|
||||
#undef TELEPORTING_CRACKER
|
||||
#undef WEALTHY_CRACKER
|
||||
|
||||
Reference in New Issue
Block a user