mirror of
https://github.com/VOREStation/VOREStation.git
synced 2026-08-23 12:08:28 +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:
@@ -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,\
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user