Merge branch 'master' into pawnch_2_the_pawnchening
This commit is contained in:
@@ -511,7 +511,7 @@ GLOBAL_VAR_INIT(dynamic_storyteller_type, /datum/dynamic_storyteller/classic)
|
||||
drafted_rules -= starting_rule
|
||||
|
||||
starting_rule.trim_candidates()
|
||||
starting_rule.scale_up(extra_rulesets_amount, threat)
|
||||
starting_rule.scale_up(extra_rulesets_amount, threat_level)
|
||||
if (starting_rule.pre_execute())
|
||||
log_threat("[starting_rule.ruletype] - <b>[starting_rule.name]</b> [starting_rule.cost + starting_rule.scaled_times * starting_rule.scaling_cost] threat", verbose = TRUE)
|
||||
if(starting_rule.flags & HIGHLANDER_RULESET)
|
||||
|
||||
@@ -241,5 +241,5 @@
|
||||
requirements = list(10,10,10,10,10,10,10,10,10,10)
|
||||
high_population_requirement = 10
|
||||
repeatable = TRUE
|
||||
flags = TRAITOR_RULESET
|
||||
flags = TRAITOR_RULESET | MINOR_RULESET
|
||||
property_weights = list("story_potential" = 2, "trust" = -1, "extended" = 2)
|
||||
|
||||
@@ -53,6 +53,8 @@ Property weights are:
|
||||
var/turf/T = get_turf(H)
|
||||
if(H.stat != DEAD && is_station_level(T.z) && !("Station" in H.faction))
|
||||
threat += H.threat()
|
||||
for(var/obj/item/phylactery/P in GLOB.poi_list)
|
||||
threat += 25 // can't be giving them too much of a break
|
||||
for (var/mob/M in mode.current_players[CURRENT_LIVING_PLAYERS])
|
||||
if (M?.mind?.assigned_role && M.stat != DEAD)
|
||||
var/datum/job/J = SSjob.GetJob(M.mind.assigned_role)
|
||||
@@ -135,17 +137,19 @@ Property weights are:
|
||||
if (GLOB.dynamic_classic_secret && !((rule.flags & TRAITOR_RULESET) || (rule.flags & MINOR_RULESET)))
|
||||
continue
|
||||
rule.trim_candidates()
|
||||
var/cost_difference = abs(rule.cost-(mode.threat_level-mode.threat))
|
||||
/* Basically, the closer the cost is to the current threat-level-away-from-threat, the more likely it is to
|
||||
pick this particular ruleset.
|
||||
Let's use a toy example: there's 60 threat level and 10 threat spent.
|
||||
We want to pick a ruleset that's close to that, so we run the below equation, on two rulesets.
|
||||
Ruleset 1 has 30 cost, ruleset 2 has 5 cost.
|
||||
When we do the math, ruleset 1's threat_weight is 0.538, and ruleset 2's is 0.238, meaning ruleset 1
|
||||
is 2.26 times as likely to be picked, all other things considered.
|
||||
Of course, we don't want it to GUARANTEE the closest, that's no fun, so it's just a weight.
|
||||
*/
|
||||
var/threat_weight = 1-abs(1-LOGISTIC_FUNCTION(2,0.05,cost_difference,0))
|
||||
var/threat_weight = 1
|
||||
if(!(rule.flags & MINOR_RULESET)) // makes the traitor rulesets always possible anyway
|
||||
var/cost_difference = abs(rule.cost-(mode.threat_level-mode.threat))
|
||||
/* Basically, the closer the cost is to the current threat-level-away-from-threat, the more likely it is to
|
||||
pick this particular ruleset.
|
||||
Let's use a toy example: there's 60 threat level and 10 threat spent.
|
||||
We want to pick a ruleset that's close to that, so we run the below equation, on two rulesets.
|
||||
Ruleset 1 has 30 cost, ruleset 2 has 5 cost.
|
||||
When we do the math, ruleset 1's threat_weight is 0.538, and ruleset 2's is 0.238, meaning ruleset 1
|
||||
is 2.26 times as likely to be picked, all other things considered.
|
||||
Of course, we don't want it to GUARANTEE the closest, that's no fun, so it's just a weight.
|
||||
*/
|
||||
threat_weight = 1-abs(1-LOGISTIC_FUNCTION(2,0.05,cost_difference,0))
|
||||
if (rule.ready())
|
||||
var/property_weight = 0
|
||||
for(var/property in property_weights)
|
||||
@@ -168,8 +172,10 @@ Property weights are:
|
||||
|
||||
rule.candidates = list(newPlayer)
|
||||
rule.trim_candidates()
|
||||
var/cost_difference = abs(rule.cost-(mode.threat_level-mode.threat))
|
||||
var/threat_weight = 1-abs(1-(LOGISTIC_FUNCTION(2,0.05,cost_difference,0)))
|
||||
var/threat_weight = 1
|
||||
if(!(rule.flags & MINOR_RULESET))
|
||||
var/cost_difference = abs(rule.cost-(mode.threat_level-mode.threat))
|
||||
threat_weight = 1-abs(1-(LOGISTIC_FUNCTION(2,0.05,cost_difference,0)))
|
||||
if (rule.ready())
|
||||
var/property_weight = 0
|
||||
for(var/property in property_weights)
|
||||
@@ -200,7 +206,7 @@ Property weights are:
|
||||
weight = 1
|
||||
event_frequency_lower = 2 MINUTES
|
||||
event_frequency_upper = 10 MINUTES
|
||||
flags = WAROPS_ALWAYS_ALLOWED | FORCE_IF_WON
|
||||
flags = WAROPS_ALWAYS_ALLOWED
|
||||
min_players = 40
|
||||
var/refund_cooldown = 0
|
||||
|
||||
@@ -245,7 +251,10 @@ Property weights are:
|
||||
config_tag = "random"
|
||||
weight = 1
|
||||
desc = "No weighting at all; every ruleset has the same chance of happening. Cooldowns vary wildly. As random as it gets."
|
||||
forced_threat_level = 100
|
||||
|
||||
/datum/dynamic_storyteller/random/on_start()
|
||||
..()
|
||||
GLOB.dynamic_forced_threat_level = rand(0,100)
|
||||
|
||||
/datum/dynamic_storyteller/random/get_midround_cooldown()
|
||||
return rand(GLOB.dynamic_midround_delay_min/2, GLOB.dynamic_midround_delay_max*2)
|
||||
@@ -318,9 +327,10 @@ Property weights are:
|
||||
property_weights = list("story_potential" = 2)
|
||||
|
||||
|
||||
/datum/dynamic_storyteller/story/do_process()
|
||||
/datum/dynamic_storyteller/story/calculate_threat()
|
||||
var/current_time = (world.time / SSautotransfer.targettime)*180
|
||||
mode.threat_level = round(mode.initial_threat_level*(sin(current_time)+0.5),0.1)
|
||||
mode.threat_level = round(mode.initial_threat_level*(sin(current_time)+0.25),0.1)
|
||||
..()
|
||||
|
||||
/datum/dynamic_storyteller/classic
|
||||
name = "Classic"
|
||||
|
||||
@@ -113,24 +113,24 @@
|
||||
desc = "Looks like some cables tied together. Could be used to tie something up."
|
||||
icon_state = "cuff"
|
||||
item_state = "coil"
|
||||
item_color = "red"
|
||||
color = "#ff0000"
|
||||
color = "red"
|
||||
lefthand_file = 'icons/mob/inhands/equipment/tools_lefthand.dmi'
|
||||
righthand_file = 'icons/mob/inhands/equipment/tools_righthand.dmi'
|
||||
custom_materials = list(/datum/material/iron=150, /datum/material/glass=75)
|
||||
breakouttime = 300 //Deciseconds = 30s
|
||||
cuffsound = 'sound/weapons/cablecuff.ogg'
|
||||
|
||||
/obj/item/restraints/handcuffs/cable/Initialize(mapload, param_color)
|
||||
. = ..()
|
||||
|
||||
var/list/cable_colors = GLOB.cable_colors
|
||||
item_color = param_color || item_color || pick(cable_colors)
|
||||
if(cable_colors[item_color])
|
||||
item_color = cable_colors[item_color]
|
||||
color = null
|
||||
add_atom_colour(item_color, FIXED_COLOUR_PRIORITY)
|
||||
cuffsound = 'sound/weapons/cablecuff.ogg'
|
||||
|
||||
/obj/item/restraints/handcuffs/cable/attack_self(mob/user)
|
||||
to_chat(user, "<span class='notice'>You start unwinding the cable restraints back into coil</span>")
|
||||
if(!do_after(user, 25, TRUE, user))
|
||||
return
|
||||
qdel(src)
|
||||
var/obj/item/stack/cable_coil/coil = new(get_turf(user))
|
||||
coil.amount = 15
|
||||
user.put_in_hands(coil)
|
||||
coil.color = color
|
||||
to_chat(user, "<span class='notice'>You unwind the cable restraints back into coil</span>")
|
||||
|
||||
/obj/item/restraints/handcuffs/cable/red
|
||||
item_color = "red"
|
||||
color = "#ff0000"
|
||||
@@ -162,6 +162,13 @@
|
||||
/obj/item/restraints/handcuffs/cable/white
|
||||
item_color = "white"
|
||||
|
||||
/obj/item/restraints/handcuffs/cable/random
|
||||
|
||||
/obj/item/restraints/handcuffs/cable/random/Initialize(mapload)
|
||||
. = ..()
|
||||
var/list/cable_colors = GLOB.cable_colors
|
||||
color = pick(cable_colors)
|
||||
|
||||
/obj/item/restraints/handcuffs/cable/attackby(obj/item/I, mob/user, params)
|
||||
..()
|
||||
if(istype(I, /obj/item/stack/rods))
|
||||
|
||||
@@ -21,7 +21,7 @@
|
||||
if (!spell)
|
||||
return FALSE
|
||||
if (autorobeless && spell.clothes_req)
|
||||
spell.clothes_req = FALSE
|
||||
spell.clothes_req = NONE
|
||||
target.AddSpell(spell)
|
||||
return TRUE
|
||||
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
attack_verb = list("beaten")
|
||||
armor = list("melee" = 0, "bullet" = 0, "laser" = 0, "energy" = 0, "bomb" = 50, "bio" = 0, "rad" = 0, "fire" = 80, "acid" = 80)
|
||||
|
||||
var/stamforce = 25
|
||||
var/stamforce = 35
|
||||
var/status = FALSE
|
||||
var/knockdown = TRUE
|
||||
var/obj/item/stock_parts/cell/cell
|
||||
|
||||
Reference in New Issue
Block a user