You can now flip coins,AKA the D2

This commit is contained in:
Jarcolr
2014-03-13 18:56:01 +02:00
parent 951b1b71fc
commit 51177f2663
+11
View File
@@ -150,3 +150,14 @@
string_attached = null
user << "\blue You detach the string from the coin."
else ..()
/obj/item/weapon/coin/attack_self(mob/user as mob)
var/result = rand(1, sides)
var/comment = ""
if(result == 1)
comment = "tails"
else if(result == 2)
comment = "heads"
user.visible_message("<span class='notice'>[user] has thrown [src]. It lands on [comment]! </span>", \
"<span class='notice'>You throw [src]. It lands on [comment]! </span>", \
"<span class='notice'>You hear [src] landing on [comment]! </span>")