Files
CHOMPStation2/code/game/objects/items/weapons/dice.dm
mwerezak 6dee9cf65d Adds sharp and edge flags to appropriate items
Went through as many /obj/item/weapons as I could find and added sharp
and edge flags where appropriate.
2014-06-16 13:26:44 -04:00

29 lines
918 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
attack_verb = list("diced")
/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>")