Files
Paradise/code/game/objects/items/weapons/dice.dm
petethegoat@gmail.com 2c3a60e350 You can carve out books with a pair of wirecutters or a kitchen knife to create a handy hiding place.
Dice are no longer the same size as fire extinguishers

git-svn-id: http://tgstation13.googlecode.com/svn/trunk@5078 316c924e-a436-60f5-8080-3fe189b3f50e
2012-11-15 20:15:49 +00:00

28 lines
888 B
Plaintext

/obj/item/weapon/dice
name = "d6"
desc = "A dice with six sides."
icon = 'icons/obj/dice.dmi'
icon_state = "d66"
w_class = 1
var/sides = 6
/obj/item/weapon/dice/New()
icon_state = "[name][rand(sides)]"
/obj/item/weapon/dice/d20
name = "d20"
desc = "A dice with twenty sides."
icon_state = "d2020"
sides = 20
/obj/item/weapon/dice/attack_self(mob/user as mob)
var/result = rand(1, sides)
var/comment = ""
if(sides == 20 && result == 20)
comment = "Nat 20!"
else if(sides == 20 && result == 1)
comment = "Ouch, bad luck."
icon_state = "[name][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>")