mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-08-31 00:58:26 +01:00
tweaks to the dice:
*the dice now all have different colors, to make them easy to tell the difference between them at a glance. *the d2 has been swapped out for a d00, though you can still create a d2 if someone demands it. *the generic pill bottle full of dice has been replaced with a proper dice bag. *actually throwing a die will now cause it to roll until the throw ends, at which point it will state the result of the throw. The old method still works as well. *most new dice have had their sprites edited to be smaller. *minor grammer corrections.
This commit is contained in:
@@ -33,6 +33,12 @@
|
||||
icon_state = "d10"
|
||||
sides = 10
|
||||
|
||||
/obj/item/weapon/dice/d00
|
||||
name = "d00"
|
||||
desc = "A die with ten sides. Works better for d100 rolls than a golfball."
|
||||
icon_state = "d00"
|
||||
sides = 10
|
||||
|
||||
/obj/item/weapon/dice/d12
|
||||
name = "d12"
|
||||
desc = "A die with twelve sides. There's an air of neglect about it."
|
||||
@@ -46,6 +52,13 @@
|
||||
sides = 20
|
||||
|
||||
/obj/item/weapon/dice/attack_self(mob/user as mob)
|
||||
diceroll(user)
|
||||
|
||||
/obj/item/weapon/dice/throw_at(atom/target, range, speed, mob/user as mob)
|
||||
..()
|
||||
diceroll(user)
|
||||
|
||||
/obj/item/weapon/dice/proc/diceroll(mob/user as mob)
|
||||
var/result = rand(1, sides)
|
||||
var/comment = ""
|
||||
if(sides == 20 && result == 20)
|
||||
@@ -53,6 +66,11 @@
|
||||
else if(sides == 20 && result == 1)
|
||||
comment = "Ouch, bad luck."
|
||||
icon_state = "[initial(icon_state)][result]"
|
||||
user.visible_message("<span class='notice'>[user] has thrown [src]. It lands on [result]. [comment]</span>", \
|
||||
"<span class='notice'>You throw [src]. It lands on a [result]. [comment]</span>", \
|
||||
"<span class='notice'>You hear [src] landing on a [result]. [comment]</span>")
|
||||
if(initial(icon_state) == "d00")
|
||||
result = (result - 1)*10
|
||||
if(user != null) //Dice was rolled in someone's hand
|
||||
user.visible_message("<span class='notice'>[user] has thrown [src]. It lands on [result]. [comment]</span>", \
|
||||
"<span class='notice'>You throw [src]. It lands on [result]. [comment]</span>", \
|
||||
"<span class='notice'>You hear [src] landing on [result]. [comment]</span>")
|
||||
else if(src.throwing == 0) //Dice was thrown and is coming to rest
|
||||
src.loc.visible_message("<span class='notice'>[src] rolls to a stop, landing on [result]. [comment]</span>")
|
||||
@@ -174,16 +174,18 @@
|
||||
|
||||
|
||||
/obj/item/weapon/storage/pill_bottle/dice
|
||||
name = "pack of dice"
|
||||
desc = "It's a small container with dice inside."
|
||||
name = "bag of dice"
|
||||
desc = "Contains all the luck you'll ever need."
|
||||
icon = 'icons/obj/dice.dmi'
|
||||
icon_state = "dicebag"
|
||||
|
||||
New()
|
||||
..()
|
||||
new /obj/item/weapon/dice/d2( src )
|
||||
new /obj/item/weapon/dice/d4( src )
|
||||
new /obj/item/weapon/dice( src )
|
||||
new /obj/item/weapon/dice/d8( src )
|
||||
new /obj/item/weapon/dice/d10( src )
|
||||
new /obj/item/weapon/dice/d00( src )
|
||||
new /obj/item/weapon/dice/d12( src )
|
||||
new /obj/item/weapon/dice/d20( src )
|
||||
|
||||
|
||||
Reference in New Issue
Block a user