part 2: bloody tendency
This commit is contained in:
@@ -32,11 +32,21 @@
|
||||
|
||||
/datum/antagonist/traitor/proc/create_contracts()
|
||||
var/contract_generation_quantity = 6
|
||||
|
||||
var/lowest_TC_threshold = 28 // We don't want the sum of all the payouts to be under this amount
|
||||
var/total = 0
|
||||
var/lowest_paying_sum = 0
|
||||
var/datum/syndicate_contract/lowest_paying_contract
|
||||
for(var/i = 1; i <= contract_generation_quantity; i++)
|
||||
var/datum/syndicate_contract/contract_to_add = new(owner)
|
||||
var/contract_payout_total = contract_to_add.contract.payout + contract_to_add.contract.payout_bonus
|
||||
if(!lowest_paying_contract || (contract_payout_total < lowest_paying_sum))
|
||||
lowest_paying_sum = contract_payout_total
|
||||
lowest_paying_contract = contract_to_add
|
||||
total += contract_payout_total
|
||||
contract_to_add.id = i
|
||||
assigned_contracts.Add(contract_to_add)
|
||||
if(total < lowest_TC_threshold) // If the threshold for TC payouts isn't reached, boost the lowest paying contract
|
||||
lowest_paying_contract.contract.payout_bonus += (lowest_TC_threshold - total)
|
||||
|
||||
/datum/antagonist/traitor/apply_innate_effects()
|
||||
if(owner.assigned_role == "Clown")
|
||||
|
||||
Reference in New Issue
Block a user