Converting more auto_custom antagonists. (#35484)

* Thinning out auto_custom uses.

* Not sure what i was thinking.

* Not sure what happened here.

* Fixes

* Forgot i'm doing this so i can remove this

* C

* Valentine antag datums

* This is what i get for adding it manually.
This commit is contained in:
AnturK
2018-02-16 07:44:41 +01:00
committed by CitadelStationBot
parent 757df53aa3
commit 993f15a415
19 changed files with 269 additions and 116 deletions
+1
View File
@@ -46,6 +46,7 @@
/datum/antagonist/ert/proc/forge_objectives()
if(ert_team)
objectives |= ert_team.objectives
owner.objectives |= objectives
/datum/antagonist/ert/proc/equipERT()
var/mob/living/carbon/human/H = owner.current
@@ -0,0 +1,4 @@
/datum/antagonist/nightmare
name = "Nightmare"
show_in_antagpanel = FALSE
show_name_in_check_antagonists = TRUE
@@ -0,0 +1,33 @@
/datum/antagonist/official
name = "CentCom Official"
show_name_in_check_antagonists = TRUE
show_in_antagpanel = FALSE
var/datum/objective/mission
/datum/antagonist/official/greet()
to_chat(owner, "<B><font size=3 color=red>You are a CentCom Official.</font></B>")
to_chat(owner, "Central Command is sending you to [station_name()] with the task: [mission.explanation_text]")
/datum/antagonist/official/proc/equip_official()
var/mob/living/carbon/human/H = owner.current
if(!istype(H))
return
H.equipOutfit(/datum/outfit/centcom_official)
if(CONFIG_GET(flag/enforce_human_authority))
H.set_species(/datum/species/human)
/datum/antagonist/official/proc/forge_objectives()
if(!mission)
var/datum/objective/missionobj = new
missionobj.owner = owner
missionobj.explanation_text = "Conduct a routine preformance review of [station_name()] and its Captain."
missionobj.completed = 1
mission = missionobj
objectives |= mission
owner.objectives |= objectives
/datum/antagonist/official/on_gain()
forge_objectives()
. = ..()
equip_official()
+19 -27
View File
@@ -62,6 +62,15 @@
var/perfectsouls = 0 //How many perfect, regen-cap increasing souls the revenant has. //TODO, add objective for getting a perfect soul(s?)
var/generated_objectives_and_spells = FALSE
/mob/living/simple_animal/revenant/Initialize(mapload)
. = ..()
AddSpell(new /obj/effect/proc_holder/spell/targeted/night_vision/revenant(null))
AddSpell(new /obj/effect/proc_holder/spell/targeted/revenant_transmit(null))
AddSpell(new /obj/effect/proc_holder/spell/aoe_turf/revenant/defile(null))
AddSpell(new /obj/effect/proc_holder/spell/aoe_turf/revenant/overload(null))
AddSpell(new /obj/effect/proc_holder/spell/aoe_turf/revenant/blight(null))
AddSpell(new /obj/effect/proc_holder/spell/aoe_turf/revenant/malfunction(null))
/mob/living/simple_animal/revenant/Login()
..()
to_chat(src, "<span class='deadsay'><span class='big bold'>You are a revenant.</span></span>")
@@ -73,26 +82,10 @@
to_chat(src, "<b>Be sure to read the wiki page at https://tgstation13.org/wiki/Revenant to learn more.</b>")
if(!generated_objectives_and_spells)
generated_objectives_and_spells = TRUE
mind.remove_all_antag()
mind.wipe_memory()
SEND_SOUND(src, sound('sound/effects/ghost.ogg'))
var/datum/objective/revenant/objective = new
objective.owner = mind
mind.objectives += objective
to_chat(src, "<b>Objective #1</b>: [objective.explanation_text]")
var/datum/objective/revenantFluff/objective2 = new
objective2.owner = mind
mind.objectives += objective2
to_chat(src, "<b>Objective #2</b>: [objective2.explanation_text]")
mind.assigned_role = ROLE_REVENANT
mind.special_role = ROLE_REVENANT
mind.add_antag_datum(/datum/antagonist/auto_custom)
AddSpell(new /obj/effect/proc_holder/spell/targeted/night_vision/revenant(null))
AddSpell(new /obj/effect/proc_holder/spell/targeted/revenant_transmit(null))
AddSpell(new /obj/effect/proc_holder/spell/aoe_turf/revenant/defile(null))
AddSpell(new /obj/effect/proc_holder/spell/aoe_turf/revenant/overload(null))
AddSpell(new /obj/effect/proc_holder/spell/aoe_turf/revenant/blight(null))
AddSpell(new /obj/effect/proc_holder/spell/aoe_turf/revenant/malfunction(null))
SEND_SOUND(src, sound('sound/effects/ghost.ogg'))
mind.add_antag_datum(/datum/antagonist/revenant)
//Life, Stat, Hud Updates, and Say
/mob/living/simple_animal/revenant/Life()
@@ -219,7 +212,7 @@
var/reforming_essence = essence_regen_cap //retain the gained essence capacity
var/obj/item/ectoplasm/revenant/R = new(get_turf(src))
R.essence = max(reforming_essence - 15 * perfectsouls, 75) //minus any perfect souls
R.client_to_revive = client //If the essence reforms, the old revenant is put back in the body
R.old_key = client.key //If the essence reforms, the old revenant is put back in the body
R.revenant = src
invisibility = INVISIBILITY_ABSTRACT
revealed = FALSE
@@ -328,7 +321,7 @@
var/essence = 75 //the maximum essence of the reforming revenant
var/reforming = TRUE
var/inert = FALSE
var/client/client_to_revive
var/old_key //key of the previous revenant, will have first pick on reform.
var/mob/living/simple_animal/revenant/revenant
/obj/item/ectoplasm/revenant/New()
@@ -375,11 +368,11 @@
message_admins("Revenant ectoplasm was left undestroyed for 1 minute and is reforming into a new revenant.")
forceMove(drop_location()) //In case it's in a backpack or someone's hand
revenant.forceMove(loc)
if(client_to_revive)
if(old_key)
for(var/mob/M in GLOB.dead_mob_list)
if(M.client == client_to_revive) //Only recreates the mob if the mob the client is in is dead
revenant.client = client_to_revive
key_of_revenant = client_to_revive.key
if(M.client && M.client.key == old_key) //Only recreates the mob if the mob the client is in is dead
key_of_revenant = old_key
break
if(!key_of_revenant)
message_admins("The new revenant's old client either could not be found or is in a new, living mob - grabbing a random candidate instead...")
var/list/candidates = pollCandidatesForMob("Do you want to be [revenant.name] (reforming)?", ROLE_REVENANT, null, ROLE_REVENANT, 50, revenant)
@@ -390,7 +383,6 @@
visible_message("<span class='revenwarning'>[src] settles down and seems lifeless.</span>")
return
var/client/C = pick(candidates)
revenant.client = C
key_of_revenant = C.key
if(!key_of_revenant)
qdel(revenant)
@@ -399,8 +391,8 @@
visible_message("<span class='revenwarning'>[src] settles down and seems lifeless.</span>")
return
message_admins("[key_of_revenant] has been [client_to_revive ? "re":""]made into a revenant by reforming ectoplasm.")
log_game("[key_of_revenant] was [client_to_revive ? "re":""]made as a revenant by reforming ectoplasm.")
message_admins("[key_of_revenant] has been [old_key == key_of_revenant ? "re":""]made into a revenant by reforming ectoplasm.")
log_game("[key_of_revenant] was [old_key == key_of_revenant ? "re":""]made as a revenant by reforming ectoplasm.")
visible_message("<span class='revenboldnotice'>[src] suddenly rises into the air before fading away.</span>")
revenant.essence = essence
@@ -0,0 +1,21 @@
/datum/antagonist/revenant
name = "Revenant"
show_in_antagpanel = FALSE
show_name_in_check_antagonists = TRUE
/datum/antagonist/revenant/greet()
owner.announce_objectives()
/datum/antagonist/revenant/proc/forge_objectives()
var/datum/objective/revenant/objective = new
objective.owner = owner
objectives += objective
var/datum/objective/revenantFluff/objective2 = new
objective2.owner = owner
objectives += objective2
owner.objectives |= objectives
/datum/antagonist/revenant/on_gain()
forge_objectives()
. = ..()
@@ -0,0 +1,19 @@
/datum/team/nation
name = "Nation"
/datum/antagonist/separatist
name = "Separatists"
show_in_antagpanel = FALSE
show_name_in_check_antagonists = TRUE
var/datum/team/nation/nation
/datum/antagonist/separatist/create_team(datum/team/nation/new_team)
if(!new_team)
return
nation = new_team
/datum/antagonist/separatist/get_team()
return nation
/datum/antagonist/separatist/greet()
to_chat(owner, "<B>You are a separatist! [nation.name] forever! Protect the sovereignty of your newfound land with your comrades in arms!</B>")
@@ -26,6 +26,8 @@
new_objective2.explanation_text = "[objective_verb] everyone[summoner ? " else while you're at it":""]."
objectives += new_objective2
owner.objectives |= objectives
/datum/antagonist/slaughter/laughter
name = "Laughter demon"
objective_verb = "Hug and Tickle"
@@ -0,0 +1,39 @@
/datum/antagonist/survivalist
name = "Survivalist"
show_in_antagpanel = FALSE
show_name_in_check_antagonists = TRUE
var/greet_message = ""
/datum/antagonist/survivalist/proc/forge_objectives()
var/datum/objective/survive/survive = new
survive.owner = owner
objectives += survive
owner.objectives |= objectives
/datum/antagonist/survivalist/on_gain()
owner.special_role = "survivalist"
forge_objectives()
. = ..()
/datum/antagonist/survivalist/greet()
to_chat(owner, "<B>You are the survivalist![greet_message]</B>")
owner.announce_objectives()
/datum/antagonist/survivalist/guns
greet_message = "Your own safety matters above all else, and the only way to ensure your safety is to stockpile weapons! Grab as many guns as possible, by any means necessary. Kill anyone who gets in your way."
/datum/antagonist/survivalist/guns/forge_objectives()
var/datum/objective/steal_five_of_type/summon_guns/guns = new
guns.owner = owner
objectives += guns
..()
/datum/antagonist/survivalist/magic
name = "Amateur Magician"
greet_message = "Grow your newfound talent! Grab as many magical artefacts as possible, by any means necessary. Kill anyone who gets in your way."
/datum/antagonist/survivalist/magic/forge_objectives()
var/datum/objective/steal_five_of_type/summon_magic/magic = new
magic.owner = owner
objectives += magic
..()
@@ -0,0 +1,24 @@
/datum/antagonist/heartbreaker
name = "heartbreaker"
roundend_category = "valentines"
show_in_antagpanel = FALSE
show_name_in_check_antagonists = TRUE
/datum/antagonist/heartbreaker/proc/forge_objectives()
var/datum/objective/martyr/normiesgetout = new
normiesgetout.owner = owner
objectives += normiesgetout
owner.objectives += objectives
/datum/antagonist/heartbreaker/on_gain()
forge_objectives()
. = ..()
/datum/antagonist/heartbreaker/on_removal()
owner.objectives -= objectives
. = ..()
/datum/antagonist/heartbreaker/greet()
to_chat(owner, "<span class='warning'><B>You didn't get a date! They're all having fun without you! you'll show them though...</B></span>")
owner.announce_objectives()
@@ -0,0 +1,37 @@
/datum/antagonist/valentine
name = "valentine"
roundend_category = "valentines" //there's going to be a ton of them so put them in separate category
show_in_antagpanel = FALSE
var/datum/mind/date
/datum/antagonist/valentine/proc/forge_objectives()
var/datum/objective/protect/protect_objective = new /datum/objective/protect
protect_objective.owner = owner
protect_objective.target = date
protect_objective.explanation_text = "Protect [date.name], your date."
objectives += protect_objective
owner.objectives += objectives
/datum/antagonist/valentine/on_gain()
forge_objectives()
. = ..()
/datum/antagonist/valentine/on_removal()
owner.objectives -= objectives
/datum/antagonist/valentine/greet()
to_chat(owner, "<span class='warning'><B>You're on a date with [date.name]! Protect them at all costs. This takes priority over all other loyalties.</B></span>")
//Squashed up a bit
/datum/antagonist/valentine/roundend_report()
var/objectives_complete = TRUE
if(owner.objectives.len)
for(var/datum/objective/objective in owner.objectives)
if(!objective.check_completion())
objectives_complete = FALSE
break
if(objectives_complete)
return "<span class='greentext big'>[owner.name] protected their date</span>"
else
return "<span class='redtext big'>[owner.name] date failed!</span>"
@@ -0,0 +1,29 @@
/datum/antagonist/wishgranter
name = "Wishgranter Avatar"
show_in_antagpanel = FALSE
show_name_in_check_antagonists = TRUE
/datum/antagonist/wishgranter/proc/forge_objectives()
var/datum/objective/hijack/hijack = new
hijack.owner = owner
objectives += hijack
owner.objectives |= objectives
/datum/antagonist/wishgranter/on_gain()
owner.special_role = "Avatar of the Wish Granter"
forge_objectives()
. = ..()
give_powers()
/datum/antagonist/wishgranter/greet()
to_chat(owner, "<B>Your inhibitions are swept away, the bonds of loyalty broken, you are free to murder as you please!</B>")
owner.announce_objectives()
/datum/antagonist/wishgranter/proc/give_powers()
var/mob/living/carbon/human/H = owner.current
if(!istype(H))
return
H.dna.add_mutation(HULK)
H.dna.add_mutation(XRAY)
H.dna.add_mutation(COLDRES)
H.dna.add_mutation(TK)