Failed headrevs become enemies of the state (#58160)

This commit is contained in:
tralezab
2021-04-10 18:18:46 -07:00
committed by GitHub
parent 0b3661b6e9
commit 6df96d4964
7 changed files with 124 additions and 25 deletions
+2 -2
View File
@@ -719,9 +719,9 @@
var/count = 1
for(var/datum/objective/objective in objectives)
if(objective.check_completion())
objective_parts += "<b>Objective #[count]</b>: [objective.explanation_text] <span class='greentext'>Success!</span>"
objective_parts += "<b>[objective.objective_name] #[count]</b>: [objective.explanation_text] <span class='greentext'>Success!</span>"
else
objective_parts += "<b>Objective #[count]</b>: [objective.explanation_text] <span class='redtext'>Fail.</span>"
objective_parts += "<b>[objective.objective_name] #[count]</b>: [objective.explanation_text] <span class='redtext'>Fail.</span>"
count++
return objective_parts.Join("<br>")
+2 -3
View File
@@ -659,9 +659,8 @@
/datum/mind/proc/announce_objectives()
var/obj_count = 1
to_chat(current, "<span class='notice'>Your current objectives:</span>")
for(var/objective in get_all_objectives())
var/datum/objective/O = objective
to_chat(current, "<B>Objective #[obj_count]</B>: [O.explanation_text]")
for(var/datum/objective/objective as anything in get_all_objectives())
to_chat(current, "<B>[objective.objective_name] #[obj_count]</B>: [objective.explanation_text]")
obj_count++
/datum/mind/proc/find_syndicate_uplink()
+15
View File
@@ -5,6 +5,8 @@ GLOBAL_LIST(admin_objective_list) //Prefilled admin assignable objective list
var/datum/team/team //An alternative to 'owner': a team. Use this when writing new code.
var/name = "generic objective" //Name for admin prompts
var/explanation_text = "Nothing" //What that person is supposed to do.
///name used in printing this objective (Objective #1)
var/objective_name = "Objective"
var/team_explanation_text //For when there are multiple owners.
var/datum/mind/target = null //If they are focused on a particular person.
var/target_amount = 0 //If they are focused on a particular number. Steal objectives have their own counter.
@@ -515,6 +517,19 @@ GLOBAL_LIST(admin_objective_list) //Prefilled admin assignable objective list
return FALSE
return TRUE
/datum/objective/exile
name = "exile"
explanation_text = "Stay alive off station. Do not go to CentCom."
/datum/objective/exile/check_completion()
var/list/owners = get_owners()
for(var/datum/mind/mind as anything in owners)
if(!considered_alive(mind))
return FALSE
if(SSmapping.level_has_any_trait(mind.current.z, list(ZTRAIT_STATION, ZTRAIT_CENTCOM))) //went to centcom or ended round on station
return FALSE
return TRUE
/datum/objective/martyr
name = "martyr"
explanation_text = "Die a glorious death."
@@ -0,0 +1,25 @@
/**
* When the revolution wins, any remaining heads and security become Enemies of the Revolution.
* Previously being nonantagonists, they only have one simple objective: survive!
*/
/datum/antagonist/enemy_of_the_revolution
name = "Enemy of the Revolution"
show_in_antagpanel = FALSE
/datum/antagonist/enemy_of_the_revolution/proc/forge_objectives()
var/datum/objective/survive/survive = new
survive.owner = owner
survive.explanation_text = "The station has been overrun by revolutionaries, stay alive until the end."
objectives += survive
/datum/antagonist/enemy_of_the_revolution/on_gain()
//the state version of this antag has to sleep a tick, this doesn't because it's not replacing an old antag datum.
owner.special_role = "revolution enemy"
forge_objectives()
. = ..()
/datum/antagonist/enemy_of_the_revolution/greet()
to_chat(owner, "<span class='userdanger'>The station is lost.</span>")
to_chat(owner, "<b>As a surviving loyalist of the previous system, Your days are numbered.</b>")
owner.announce_objectives()
@@ -0,0 +1,66 @@
/**
* When the station wins, any remaining living headrevs become Enemies of the State, a small solo antagonist.
* They either have the choice to fuck off and do their own thing, or try and regain their honor with a hijack.
*/
/datum/antagonist/enemy_of_the_state
name = "Enemy of the State"
show_in_antagpanel = FALSE
show_name_in_check_antagonists = TRUE
hijack_speed = 2 //not like they have much to do
/datum/antagonist/enemy_of_the_state/proc/forge_objectives()
var/datum/objective/exile/exile_choice = new
exile_choice.owner = owner
exile_choice.objective_name = "Choice"
objectives += exile_choice
var/datum/objective/hijack/hijack_choice = new
hijack_choice.owner = owner
hijack_choice.objective_name = "Choice"
objectives += hijack_choice
/datum/antagonist/enemy_of_the_state/on_gain()
owner.special_role = "exiled headrev"
forge_objectives()
. = ..()
/datum/antagonist/enemy_of_the_state/greet()
to_chat(owner, "<span class='userdanger'>The revolution is dead.</span>")
to_chat(owner, "<span class='boldannounce'>You're an enemy of the state to Nanotrasen. You're a loose end to the Syndicate.</span>")
to_chat(owner, "<b>It's time to live out your days as an exile... or go out in one last big bang.</b>")
owner.announce_objectives()
/datum/antagonist/enemy_of_the_state/roundend_report()
var/list/report = list()
if(!owner)
CRASH("Antagonist datum without owner")
report += printplayer(owner)
//needs to complete only one objective, not all
var/option_chosen = FALSE
var/badass = FALSE
if(objectives.len)
report += printobjectives(objectives)
for(var/datum/objective/objective in objectives)
if(objective.check_completion())
option_chosen = TRUE
if(istype(objective, /datum/objective/hijack))
badass = TRUE
break
if(objectives.len == 0 || option_chosen)
if(badass)
report += "<span class='greentext big'>Major [name] Victory</span>"
report += "<B>[name] chose the badass option, and hijacked the shuttle!</B>"
else
report += "<span class='greentext big'>Minor [name] Victory</span>"
report += "<B>[name] has survived as an exile!</B>"
else
report += "<span class='redtext big'>The [name] has failed!</span>"
return report.Join("<br>")
@@ -12,6 +12,8 @@
antag_hud_type = ANTAG_HUD_REV
antag_hud_name = "rev"
var/datum/team/revolution/rev_team
///when this antagonist is being de-antagged, this is why
var/deconversion_reason
/// What message should the player receive when they are being demoted, and the revolution has won?
var/victory_message = "The revolution has overpowered the command staff! Viva la revolution! Execute any head of staff and security should you find them alive."
@@ -229,9 +231,8 @@
to_chat(owner, "<span class='userdanger'>The frame's firmware detects and deletes your neural reprogramming! You remember nothing but the name of the one who flashed you.</span>")
/datum/antagonist/rev/head/farewell()
if (announce_victorious())
if (announce_victorious() || deconversion_reason == DECONVERTER_STATION_WIN)
return
if((ishuman(owner.current)))
if(owner.current.stat != DEAD)
owner.current.visible_message("<span class='deconversion_message'>[owner.current] looks like [owner.current.p_theyve()] just remembered [owner.current.p_their()] real allegiance!</span>", null, null, null, owner.current)
@@ -251,12 +252,18 @@
if(iscarbon(owner.current) && deconverter != DECONVERTER_REVS_WIN)
var/mob/living/carbon/C = owner.current
C.Unconscious(100)
deconversion_reason = deconverter
owner.remove_antag_datum(type)
/datum/antagonist/rev/head/remove_revolutionary(borged,deconverter)
/datum/antagonist/rev/head/remove_revolutionary(borged, deconverter)
var/re_antag = FALSE
var/datum/mind/old_owner = owner //owner gets nulled when rev antag removed
if(borged || deconverter == DECONVERTER_STATION_WIN || deconverter == DECONVERTER_REVS_WIN)
if(owner.current.stat != DEAD && deconverter == DECONVERTER_STATION_WIN)
re_antag = TRUE
. = ..()
if(re_antag)
old_owner.add_antag_datum(/datum/antagonist/enemy_of_the_state) //needs to be post ..() so old antag status is cleaned up
/datum/antagonist/rev/head/equip_rev()
var/mob/living/carbon/C = owner.current
if(!ishuman(C))
@@ -280,21 +287,6 @@
S.Insert(C)
to_chat(C, "Your eyes have been implanted with a cybernetic security HUD which will help you keep track of who is mindshield-implanted, and therefore unable to be recruited.")
/// "Enemy of the Revolutionary", given to heads and security when the revolution wins
/datum/antagonist/revolution_enemy
name = "Enemy of the Revolution"
show_in_antagpanel = FALSE
/datum/antagonist/revolution_enemy/on_gain()
owner.special_role = "revolution enemy"
var/datum/objective/survive/survive = new /datum/objective/survive
survive.owner = owner
survive.explanation_text = "The station has been overrun by revolutionaries, stay alive until the end."
objectives += survive
return ..()
/datum/team/revolution
name = "Revolution"
var/max_headrevs = 3
@@ -429,7 +421,7 @@
var/mob/living/carbon/target_body = mind.current
mind.add_antag_datum(/datum/antagonist/revolution_enemy)
mind.add_antag_datum(/datum/antagonist/enemy_of_the_revolution)
if (!istype(target_body))
continue
+2
View File
@@ -1726,6 +1726,8 @@
#include "code\modules\antagonists\revenant\revenant_antag.dm"
#include "code\modules\antagonists\revenant\revenant_blight.dm"
#include "code\modules\antagonists\revenant\revenant_spawn_event.dm"
#include "code\modules\antagonists\revolution\enemy_of_the_revolution.dm"
#include "code\modules\antagonists\revolution\enemy_of_the_state.dm"
#include "code\modules\antagonists\revolution\revolution.dm"
#include "code\modules\antagonists\santa\santa.dm"
#include "code\modules\antagonists\separatist\separatist.dm"