Slaughter demon, Morph, ERT / Deathsquad antag datums.

This commit is contained in:
AnturK
2018-02-05 23:59:18 +01:00
committed by CitadelStationBot
parent 7b46f951cc
commit f9666ab6c9
11 changed files with 498 additions and 162 deletions
@@ -17,6 +17,7 @@ GLOBAL_LIST_EMPTY(antagonists)
//Antag panel properties
var/show_in_antagpanel = TRUE //This will hide adding this antag type in antag panel, use only for internal subtypes that shouldn't be added directly but still show if possessed by mind
var/antagpanel_category = "Uncategorized" //Antagpanel will display these together, REQUIRED
var/show_name_in_check_antagonists = FALSE //Will append antagonist name in admin listings - use for categories that share more than one antag type
/datum/antagonist/New()
GLOB.antagonists += src
@@ -206,6 +207,7 @@ GLOBAL_LIST_EMPTY(antagonists)
/datum/antagonist/auto_custom
show_in_antagpanel = FALSE
antagpanel_category = "Other"
show_name_in_check_antagonists = TRUE
/datum/antagonist/auto_custom/on_gain()
..()
@@ -219,12 +221,10 @@ GLOBAL_LIST_EMPTY(antagonists)
already_registered_objectives |= A.objectives
objectives = owner.objectives - already_registered_objectives
/datum/antagonist/auto_custom/antag_listing_name()
return ..() + "([name])"
//This one is created by admin tools for custom objectives
/datum/antagonist/custom
antagpanel_category = "Custom"
show_name_in_check_antagonists = TRUE //They're all different
/datum/antagonist/custom/admin_add(datum/mind/new_owner,mob/admin)
var/custom_name = stripped_input(admin, "Custom antagonist name:", "Custom antag", "Antagonist")
@@ -232,7 +232,4 @@ GLOBAL_LIST_EMPTY(antagonists)
name = custom_name
else
return
..()
/datum/antagonist/custom/antag_listing_name()
return ..() + "([name])"
..()
@@ -1,3 +1,4 @@
<<<<<<< HEAD
/obj/item/antag_spawner
throw_speed = 1
throw_range = 5
@@ -264,3 +265,257 @@
veil_msg = "<span class='warning'>You sense an adorable presence lurking just beyond the veil...</span>"
objective_verb = "Hug and Tickle"
demon_type = /mob/living/simple_animal/slaughter/laughter
=======
/obj/item/antag_spawner
throw_speed = 1
throw_range = 5
w_class = WEIGHT_CLASS_TINY
var/used = FALSE
/obj/item/antag_spawner/proc/spawn_antag(client/C, turf/T, kind = "", datum/mind/user)
return
/obj/item/antag_spawner/proc/equip_antag(mob/target)
return
///////////WIZARD
/obj/item/antag_spawner/contract
name = "contract"
desc = "A magic contract previously signed by an apprentice. In exchange for instruction in the magical arts, they are bound to answer your call for aid."
icon = 'icons/obj/wizard.dmi'
icon_state ="scroll2"
/obj/item/antag_spawner/contract/attack_self(mob/user)
user.set_machine(src)
var/dat
if(used)
dat = "<B>You have already summoned your apprentice.</B><BR>"
else
dat = "<B>Contract of Apprenticeship:</B><BR>"
dat += "<I>Using this contract, you may summon an apprentice to aid you on your mission.</I><BR>"
dat += "<I>If you are unable to establish contact with your apprentice, you can feed the contract back to the spellbook to refund your points.</I><BR>"
dat += "<B>Which school of magic is your apprentice studying?:</B><BR>"
dat += "<A href='byond://?src=[REF(src)];school=[APPRENTICE_DESTRUCTION]'>Destruction</A><BR>"
dat += "<I>Your apprentice is skilled in offensive magic. They know Magic Missile and Fireball.</I><BR>"
dat += "<A href='byond://?src=[REF(src)];school=[APPRENTICE_BLUESPACE]'>Bluespace Manipulation</A><BR>"
dat += "<I>Your apprentice is able to defy physics, melting through solid objects and travelling great distances in the blink of an eye. They know Teleport and Ethereal Jaunt.</I><BR>"
dat += "<A href='byond://?src=[REF(src)];school=[APPRENTICE_HEALING]'>Healing</A><BR>"
dat += "<I>Your apprentice is training to cast spells that will aid your survival. They know Forcewall and Charge and come with a Staff of Healing.</I><BR>"
dat += "<A href='byond://?src=[REF(src)];school=[APPRENTICE_ROBELESS]'>Robeless</A><BR>"
dat += "<I>Your apprentice is training to cast spells without their robes. They know Knock and Mindswap.</I><BR>"
user << browse(dat, "window=radio")
onclose(user, "radio")
return
/obj/item/antag_spawner/contract/Topic(href, href_list)
..()
var/mob/living/carbon/human/H = usr
if(H.stat || H.restrained())
return
if(!ishuman(H))
return 1
if(loc == H || (in_range(src, H) && isturf(loc)))
H.set_machine(src)
if(href_list["school"])
if(used)
to_chat(H, "You already used this contract!")
return
var/list/candidates = pollCandidatesForMob("Do you want to play as a wizard's [href_list["school"]] apprentice?", ROLE_WIZARD, null, ROLE_WIZARD, 150, src)
if(LAZYLEN(candidates))
if(used)
to_chat(H, "You already used this contract!")
return
used = TRUE
var/client/C = pick(candidates)
spawn_antag(C, get_turf(src), href_list["school"],H.mind)
else
to_chat(H, "Unable to reach your apprentice! You can either attack the spellbook with the contract to refund your points, or wait and try again later.")
/obj/item/antag_spawner/contract/spawn_antag(client/C, turf/T, kind ,datum/mind/user)
new /obj/effect/particle_effect/smoke(T)
var/mob/living/carbon/human/M = new/mob/living/carbon/human(T)
C.prefs.copy_to(M)
M.key = C.key
var/datum/mind/app_mind = M.mind
var/datum/antagonist/wizard/apprentice/app = new()
app.master = user
app.school = kind
var/datum/antagonist/wizard/master_wizard = user.has_antag_datum(/datum/antagonist/wizard)
if(master_wizard)
if(!master_wizard.wiz_team)
master_wizard.create_wiz_team()
app.wiz_team = master_wizard.wiz_team
master_wizard.wiz_team.add_member(app_mind)
app_mind.add_antag_datum(app)
//TODO Kill these if possible
app_mind.assigned_role = "Apprentice"
app_mind.special_role = "apprentice"
//
SEND_SOUND(M, sound('sound/effects/magic.ogg'))
///////////BORGS AND OPERATIVES
/obj/item/antag_spawner/nuke_ops
name = "syndicate operative teleporter"
desc = "A single-use teleporter designed to quickly reinforce operatives in the field."
icon = 'icons/obj/device.dmi'
icon_state = "locator"
var/borg_to_spawn
/obj/item/antag_spawner/nuke_ops/proc/check_usability(mob/user)
if(used)
to_chat(user, "<span class='warning'>[src] is out of power!</span>")
return FALSE
if(!user.mind.has_antag_datum(/datum/antagonist/nukeop,TRUE))
to_chat(user, "<span class='danger'>AUTHENTICATION FAILURE. ACCESS DENIED.</span>")
return FALSE
if(!user.onSyndieBase())
to_chat(user, "<span class='warning'>[src] is out of range! It can only be used at your base!</span>")
return FALSE
return TRUE
/obj/item/antag_spawner/nuke_ops/attack_self(mob/user)
if(!(check_usability(user)))
return
to_chat(user, "<span class='notice'>You activate [src] and wait for confirmation.</span>")
var/list/nuke_candidates = pollGhostCandidates("Do you want to play as a syndicate [borg_to_spawn ? "[lowertext(borg_to_spawn)] cyborg":"operative"]?", ROLE_OPERATIVE, null, ROLE_OPERATIVE, 150, POLL_IGNORE_SYNDICATE)
if(LAZYLEN(nuke_candidates))
if(!(check_usability(user)))
return
used = TRUE
var/client/C = pick(nuke_candidates)
spawn_antag(C, get_turf(src), "syndieborg", user.mind)
do_sparks(4, TRUE, src)
qdel(src)
else
to_chat(user, "<span class='warning'>Unable to connect to Syndicate command. Please wait and try again later or use the teleporter on your uplink to get your points refunded.</span>")
/obj/item/antag_spawner/nuke_ops/spawn_antag(client/C, turf/T, kind, datum/mind/user)
var/mob/living/carbon/human/M = new/mob/living/carbon/human(T)
C.prefs.copy_to(M)
M.key = C.key
var/datum/antagonist/nukeop/new_op = new()
new_op.send_to_spawnpoint = FALSE
new_op.nukeop_outfit = /datum/outfit/syndicate/no_crystals
var/datum/antagonist/nukeop/creator_op = user.has_antag_datum(/datum/antagonist/nukeop,TRUE)
if(creator_op)
M.mind.add_antag_datum(new_op,creator_op.nuke_team)
M.mind.special_role = "Nuclear Operative"
//////SYNDICATE BORG
/obj/item/antag_spawner/nuke_ops/borg_tele
name = "syndicate cyborg teleporter"
desc = "A single-use teleporter designed to quickly reinforce operatives in the field.."
icon = 'icons/obj/device.dmi'
icon_state = "locator"
/obj/item/antag_spawner/nuke_ops/borg_tele/assault
name = "syndicate assault cyborg teleporter"
borg_to_spawn = "Assault"
/obj/item/antag_spawner/nuke_ops/borg_tele/medical
name = "syndicate medical teleporter"
borg_to_spawn = "Medical"
/obj/item/antag_spawner/nuke_ops/borg_tele/spawn_antag(client/C, turf/T, kind, datum/mind/user)
var/mob/living/silicon/robot/R
var/datum/antagonist/nukeop/creator_op = user.has_antag_datum(/datum/antagonist/nukeop,TRUE)
if(!creator_op)
return
switch(borg_to_spawn)
if("Medical")
R = new /mob/living/silicon/robot/modules/syndicate/medical(T)
else
R = new /mob/living/silicon/robot/modules/syndicate(T) //Assault borg by default
var/brainfirstname = pick(GLOB.first_names_male)
if(prob(50))
brainfirstname = pick(GLOB.first_names_female)
var/brainopslastname = pick(GLOB.last_names)
if(creator_op.nuke_team.syndicate_name) //the brain inside the syndiborg has the same last name as the other ops.
brainopslastname = creator_op.nuke_team.syndicate_name
var/brainopsname = "[brainfirstname] [brainopslastname]"
R.mmi.name = "Man-Machine Interface: [brainopsname]"
R.mmi.brain.name = "[brainopsname]'s brain"
R.mmi.brainmob.real_name = brainopsname
R.mmi.brainmob.name = brainopsname
R.real_name = R.name
R.key = C.key
var/datum/antagonist/nukeop/new_borg = new()
new_borg.send_to_spawnpoint = FALSE
R.mind.add_antag_datum(new_borg,creator_op.nuke_team)
R.mind.special_role = "Syndicate Cyborg"
///////////SLAUGHTER DEMON
/obj/item/antag_spawner/slaughter_demon //Warning edgiest item in the game
name = "vial of blood"
desc = "A magically infused bottle of blood, distilled from countless murder victims. Used in unholy rituals to attract horrifying creatures."
icon = 'icons/obj/wizard.dmi'
icon_state = "vial"
var/shatter_msg = "<span class='notice'>You shatter the bottle, no turning back now!</span>"
var/veil_msg = "<span class='warning'>You sense a dark presence lurking just beyond the veil...</span>"
var/mob/living/demon_type = /mob/living/simple_animal/slaughter
var/antag_type = /datum/antagonist/slaughter
/obj/item/antag_spawner/slaughter_demon/attack_self(mob/user)
if(!is_station_level(user.z))
to_chat(user, "<span class='notice'>You should probably wait until you reach the station.</span>")
return
if(used)
return
var/list/candidates = pollCandidatesForMob("Do you want to play as a [initial(demon_type.name)]?", ROLE_ALIEN, null, ROLE_ALIEN, 50, src)
if(LAZYLEN(candidates))
if(used)
return
used = TRUE
var/client/C = pick(candidates)
spawn_antag(C, get_turf(src), initial(demon_type.name),user.mind)
to_chat(user, shatter_msg)
to_chat(user, veil_msg)
playsound(user.loc, 'sound/effects/glassbr1.ogg', 100, 1)
qdel(src)
else
to_chat(user, "<span class='notice'>You can't seem to work up the nerve to shatter the bottle. Perhaps you should try again later.</span>")
/obj/item/antag_spawner/slaughter_demon/spawn_antag(client/C, turf/T, kind = "", datum/mind/user)
var/obj/effect/dummy/slaughter/holder = new /obj/effect/dummy/slaughter(T)
var/mob/living/simple_animal/slaughter/S = new demon_type(holder)
S.holder = holder
S.key = C.key
S.mind.assigned_role = S.name
S.mind.special_role = S.name
S.mind.add_antag_datum(antag_type)
to_chat(S, S.playstyle_string)
to_chat(S, "<B>You are currently not currently in the same plane of existence as the station. \
Ctrl+Click a blood pool to manifest.</B>")
/obj/item/antag_spawner/slaughter_demon/laughter
name = "vial of tickles"
desc = "A magically infused bottle of clown love, distilled from countless hugging attacks. Used in funny rituals to attract adorable creatures."
icon = 'icons/obj/wizard.dmi'
icon_state = "vial"
color = "#FF69B4" // HOT PINK
veil_msg = "<span class='warning'>You sense an adorable presence lurking just beyond the veil...</span>"
demon_type = /mob/living/simple_animal/slaughter/laughter
antag_type = /datum/antagonist/slaughter/laughter
>>>>>>> 126a544... Slaughter demon, Morph, ERT / Deathsquad antag datums. (#35156)
+19 -2
View File
@@ -27,8 +27,25 @@
/datum/team/proc/roundend_report()
var/list/report = list()
report += "<b>[name]:</b>"
report += "<span class='header'>[name]:</span>"
report += "The [member_name]s were:"
report += printplayerlist(members)
return report.Join("<br>")
if(objectives.len)
report += "<span class='header'>Team had following objectives:</span>"
var/win = TRUE
var/objective_count = 1
for(var/datum/objective/objective in objectives)
if(objective.check_completion())
report += "<B>Objective #[objective_count]</B>: [objective.explanation_text] <span class='greentext'><B>Success!</span>"
else
report += "<B>Objective #[objective_count]</B>: [objective.explanation_text] <span class='redtext'>Fail.</span>"
win = FALSE
objective_count++
if(win)
report += "<span class='greentext'>The [name] was successful!</span>"
else
report += "<span class='redtext'>The [name] have failed!</span>"
return "<div class='panel redborder'>[report.Join("<br>")]</div>"
+87
View File
@@ -0,0 +1,87 @@
//Both ERT and DS are handled by the same datums since they mostly differ in equipment in objective.
/datum/team/ert
name = "Emergency Response Team"
var/datum/objective/mission //main mission
/datum/antagonist/ert
name = "Emergency Response Officer"
var/datum/team/ert/ert_team
var/role = ERT_SEC
var/high_alert = FALSE
show_in_antagpanel = FALSE
/datum/antagonist/ert/on_gain()
update_name()
forge_objectives()
equipERT()
. = ..()
/datum/antagonist/ert/get_team()
return ert_team
/datum/antagonist/ert/proc/update_name()
var/new_name
switch(role)
if(ERT_ENG)
new_name = "Engineer [pick(GLOB.last_names)]"
if(ERT_MED)
new_name = "Medical Officer [pick(GLOB.last_names)]"
if(ERT_SEC)
new_name = "Security Officer [pick(GLOB.last_names)]"
if(ERT_LEADER)
new_name = "Commander [pick(GLOB.last_names)]"
name = "Emergency Response Commander"
if(DEATHSQUAD)
new_name = "Trooper [pick(GLOB.commando_names)]"
name = "Deathsquad Trooper"
if(DEATHSQUAD_LEADER)
new_name = "Officer [pick(GLOB.commando_names)]"
name = "Deathsquad Officer"
owner.current.fully_replace_character_name(owner.current.real_name,new_name)
/datum/antagonist/ert/create_team(datum/team/ert/new_team)
if(istype(new_team))
ert_team = new_team
/datum/antagonist/ert/proc/forge_objectives()
if(ert_team)
objectives |= ert_team.objectives
/datum/antagonist/ert/proc/equipERT()
var/mob/living/carbon/human/H = owner.current
if(!istype(H))
return
var/outfit
switch(role)
if(ERT_LEADER)
outfit = high_alert ? /datum/outfit/ert/commander/alert : /datum/outfit/ert/commander
if(ERT_ENG)
outfit = high_alert ? /datum/outfit/ert/engineer/alert : /datum/outfit/ert/engineer
if(ERT_MED)
outfit = high_alert ? /datum/outfit/ert/medic/alert : /datum/outfit/ert/medic
if(ERT_SEC)
outfit = high_alert ? /datum/outfit/ert/security/alert : /datum/outfit/ert/security
if(DEATHSQUAD)
outfit = /datum/outfit/death_commando/officer
if(DEATHSQUAD_LEADER)
outfit = /datum/outfit/death_commando
H.equipOutfit(outfit)
/datum/antagonist/ert/greet()
if(!ert_team)
return
var/leader = role == ERT_LEADER || role == DEATHSQUAD_LEADER
to_chat(owner, "<B><font size=3 color=red>You are the [name].</font></B>")
var/missiondesc = "Your squad is being sent on a mission to [station_name()] by Nanotrasen's Security Division."
if(leader) //If Squad Leader
missiondesc += " Lead your squad to ensure the completion of the mission. Board the shuttle when your team is ready."
else
missiondesc += " Follow orders given to you by your squad leader."
if(role != DEATHSQUAD && role != DEATHSQUAD_LEADER)
missiondesc += "Avoid civilian casualites when possible."
missiondesc += "<BR><B>Your Mission</B> : [ert_team.mission.explanation_text]"
to_chat(owner,missiondesc)
@@ -0,0 +1,6 @@
/datum/antagonist/morph
name = "Morph"
show_name_in_check_antagonists = TRUE
show_in_antagpanel = FALSE
//It does nothing! (Besides tracking)
+1 -4
View File
@@ -2,11 +2,11 @@
name = "Ninja"
antagpanel_category = "Ninja"
job_rank = ROLE_NINJA
show_name_in_check_antagonists = TRUE
var/helping_station = FALSE
var/give_objectives = TRUE
var/give_equipment = TRUE
/datum/antagonist/ninja/apply_innate_effects(mob/living/mob_override)
var/mob/living/M = mob_override || owner.current
update_ninja_icons_added(M)
@@ -141,9 +141,6 @@
message_admins("[key_name_admin(admin)] has [adj] ninja'ed [new_owner.current].")
log_admin("[key_name(admin)] has [adj] ninja'ed [new_owner.current].")
/datum/antagonist/ninja/antag_listing_name()
return ..() + "(Ninja)"
/datum/antagonist/ninja/proc/update_ninja_icons_added(var/mob/living/carbon/human/ninja)
var/datum/atom_hud/antag/ninjahud = GLOB.huds[ANTAG_HUD_NINJA]
ninjahud.join_hud(ninja)
@@ -0,0 +1,31 @@
/datum/antagonist/slaughter
name = "Slaughter demon"
show_name_in_check_antagonists = TRUE
var/objective_verb = "Kill"
var/datum/mind/summoner
job_rank = ROLE_ALIEN
show_in_antagpanel = FALSE
/datum/antagonist/slaughter/on_gain()
forge_objectives()
. = ..()
/datum/antagonist/slaughter/greet()
. = ..()
owner.announce_objectives()
/datum/antagonist/slaughter/proc/forge_objectives()
if(summoner)
var/datum/objective/assassinate/new_objective = new /datum/objective/assassinate
new_objective.owner = owner
new_objective.target = summoner
new_objective.explanation_text = "[objective_verb] [summoner.name], the one who summoned you."
objectives += new_objective
var/datum/objective/new_objective2 = new /datum/objective
new_objective2.owner = owner
new_objective2.explanation_text = "[objective_verb] everyone[summoner ? " else while you're at it":""]."
objectives += new_objective2
/datum/antagonist/slaughter/laughter
name = "Laughter demon"
objective_verb = "Hug and Tickle"