Files
Bubberstation/code/game/gamemodes/devil/devil agent/devil_agent.dm
lordpidey ec2f666f29 Devil agent (#19391)
add: Added Devil agent gamemode, where multiple devils are each trying to buy more souls than the next in line.
add: If you've already sold your soul, you can sell it again to a different devil. You can even go back and forth for INFINITE POWER.

This adds a new gamemode. Devil Agent. It works much like Double Agent, except devils instead of traitors, and instead of killing, the devil simply has to control more souls than the enemy.

Also, whether this is included in the rotation depends on the config settings. By default, it will be disabled.
2016-07-31 17:02:21 +12:00

44 lines
1.5 KiB
Plaintext

/datum/game_mode/devil/devil_agents
name = "Devil Agents"
config_tag = "devil_agents"
required_players = 25
required_enemies = 3
recommended_enemies = 8
reroll_friendly = 0
traitors_possible = 10 //hard limit on traitors if scaling is turned off
num_modifier = 4
objective_count = 2
var/list/target_list = list()
var/list/late_joining_list = list()
minimum_devils = 3
announce_text = "There are devil agents onboard the station, trying to outbid each other!\n\
+ <span class='danger'>Devils</span>: Purchase souls and interfere with your rivals!\n\
+ <span class='notice'>Crew</span>: Resist the lure of sin and remain pure!"
/datum/game_mode/devil/devil_agents/post_setup()
var/i = 0
for(var/datum/mind/devil in devils)
i++
if(i + 1 > devils.len)
i = 0
target_list[devil] = devils[i + 1]
..()
/datum/game_mode/devil/devil_agents/add_devil_objectives(datum/mind/devil_mind, quantity)
..(devil_mind, quantity - give_outsell_objective(devil_mind))
/datum/game_mode/devil/devil_agents/proc/give_outsell_objective(datum/mind/devil)
//If you override this method, have it return the number of objectives added.
if(target_list.len && target_list[devil]) // Is a double agent
var/datum/mind/target_mind = target_list[devil]
var/datum/objective/devil/outsell/outsellobjective = new
outsellobjective.owner = devil
outsellobjective.target = target_mind
outsellobjective.update_explanation_text()
devil.objectives += outsellobjective
return 1
return 0