mirror of
https://github.com/Aurorastation/Aurora.3.git
synced 2026-08-29 07:59:01 +01:00
Merge branch 'master' into development
# Conflicts: # maps/aurora/aurora-3_sublevel.dmm # maps/aurora/aurora-4_mainlevel.dmm # maps/aurora/aurora-5_interstitial.dmm
This commit is contained in:
@@ -5,6 +5,9 @@
|
||||
icon_state = "d66"
|
||||
w_class = 1
|
||||
var/sides = 6
|
||||
var/weighted = FALSE //if this dice can cheat or something
|
||||
var/favored_number = 1 //related to the var above
|
||||
var/weighted_value = 70 //what is the chance of falling on the favored number
|
||||
attack_verb = list("diced")
|
||||
|
||||
/obj/item/weapon/dice/New()
|
||||
@@ -12,7 +15,12 @@
|
||||
|
||||
/obj/item/weapon/dice/throw_impact(atom/hit_atom)
|
||||
..()
|
||||
var/result = rand(1, sides)
|
||||
var/result
|
||||
if((weighted) && (prob(weighted_value)))
|
||||
result = favored_number
|
||||
else
|
||||
result = rand(1, sides)
|
||||
|
||||
var/comment = ""
|
||||
if(sides == 20 && result == 20)
|
||||
comment = "Nat 20!"
|
||||
|
||||
Reference in New Issue
Block a user