-
-
Notifications
You must be signed in to change notification settings - Fork 444
/
Copy pathbloodsucker_objectives.dm
94 lines (76 loc) · 3.12 KB
/
bloodsucker_objectives.dm
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
/datum/objective/monsterhunter
name = "destroymonsters"
explanation_text = "Destroy all monsters on ."
/datum/objective/monsterhunter/New()
update_explanation_text()
..()
// EXPLANATION
/datum/objective/monsterhunter/update_explanation_text()
. = ..()
explanation_text = "Destroy all monsters on [station_name()]."
// WIN CONDITIONS?
/datum/objective/monsterhunter/check_completion()
var/list/datum/mind/monsters = list()
for(var/datum/antagonist/monster in GLOB.antagonists)
var/datum/mind/brain = monster.owner
if(!brain || brain == owner)
continue
if(!brain.current || brain.current.stat == DEAD)
continue
if(IS_HERETIC(brain.current) || IS_BLOODSUCKER(brain.current) || iscultist(brain.current) || is_servant_of_ratvar(brain.current) || IS_WIZARD(brain.current))
monsters += brain
if(brain.has_antag_datum(/datum/antagonist/changeling))
monsters += brain
return completed || !monsters.len
//////////////////////////////////////////////////////////////////////////////////////
/datum/objective/survive/bloodsucker
name = "bloodsuckersurvive"
explanation_text = "Survive the entire shift without succumbing to Final Death."
//////////////////////////////////////////////////////////////////////////////////////
/datum/objective/bloodsucker_lair
name = "claim lair"
explanation_text = "Create a lair by claiming a coffin, and protect it until the end of the shift."
martyr_compatible = TRUE
// WIN CONDITIONS?
/datum/objective/bloodsucker_lair/check_completion()
var/datum/antagonist/bloodsucker/bloodsuckerdatum = owner.has_antag_datum(/datum/antagonist/bloodsucker)
if(bloodsuckerdatum && bloodsuckerdatum.coffin && bloodsuckerdatum.bloodsucker_lair_area)
return TRUE
return FALSE
//////////////////////////////////////////////////////////////////////////////////////
/datum/objective/vassal
name = "vassalization"
martyr_compatible = TRUE
var/target_department_type = FALSE
/// Look at all crew members, and for/loop through.
/datum/objective/vassal/proc/return_possible_targets()
var/list/possible_targets = list()
for(var/datum/mind/possible_target in get_crewmember_minds())
// Check One: Default Valid User
if(possible_target != owner && ishuman(possible_target.current) && possible_target.current.stat != DEAD)
// Check Two: Am Bloodsucker?
if(IS_BLOODSUCKER(possible_target.current))
continue
possible_targets += possible_target
return possible_targets
#define VASSALIZE_COMMAND "command_vassalization"
// GENERATE
/datum/objective/vassal/New()
var/list/possible_targets = return_possible_targets()
find_target(possible_targets)
update_explanation_text()
..()
// EXPLANATION
/datum/objective/vassal/update_explanation_text()
. = ..()
if(target?.current)
explanation_text = "Ensure [target.name], the [!target_department_type ? target.assigned_role : target.special_role], is Vassalized via the Persuasion Rack."
else
explanation_text = "Free Objective"
/datum/objective/vassal/admin_edit(mob/admin)
admin_simple_target_pick(admin)
// WIN CONDITIONS?
/datum/objective/vassal/check_completion()
if(!target || target.has_antag_datum(/datum/antagonist/vassal))
return TRUE
return FALSE