Skip to content

Commit

Permalink
Merge pull request tgstation#14313 from tkdrg/goooof
Browse files Browse the repository at this point in the history
Revert "Merge pull request tgstation#12935 from AndrewJacksonThe2nd/objectives_rework"
  • Loading branch information
Aranclanos committed Jan 8, 2016
2 parents 50bb326 + 5589ac7 commit 95df33b
Show file tree
Hide file tree
Showing 14 changed files with 2,812 additions and 2,560 deletions.
3,268 changes: 1,687 additions & 1,581 deletions code/datums/mind.dm

Large diffs are not rendered by default.

15 changes: 9 additions & 6 deletions code/game/gamemodes/antag_spawner.dm
Original file line number Diff line number Diff line change
Expand Up @@ -92,13 +92,14 @@
M << "<B>Your service has not gone unrewarded, however. Studying under [usr.real_name], you have learned stealthy, robeless spells. You are able to cast knock and mindswap."

equip_antag(M)
var/mob/living/carbon/human/H = usr
var/wizard_name_first = pick(wizard_first)
var/wizard_name_second = pick(wizard_second)
var/randomname = "[wizard_name_first] [wizard_name_second]"
var/datum/objective/default/protect/new_objective = add_objective(M.mind, /datum/objective/default/protect)
new_objective.target = H.mind
new_objective.explanation_text = "Protect [H.real_name], the wizard."
var/datum/objective/protect/new_objective = new /datum/objective/protect
new_objective.owner = M:mind
new_objective:target = usr:mind
new_objective.explanation_text = "Protect [usr.real_name], the wizard."
M.mind.objectives += new_objective
ticker.mode.apprentices += M.mind
M.mind.special_role = "apprentice"
ticker.mode.update_wiz_icons_added(M.mind)
Expand Down Expand Up @@ -251,14 +252,16 @@
S.mind.assigned_role = "Slaughter Demon"
S.mind.special_role = "Slaughter Demon"
ticker.mode.traitors += S.mind
var/datum/objective/default/assassinate/new_objective = add_objective(S.mind, /datum/objective/default/assassinate)
var/datum/objective/assassinate/new_objective = new /datum/objective/assassinate
new_objective.owner = S.mind
new_objective.target = usr.mind
new_objective.explanation_text = "Kill [usr.real_name], the one who summoned you."
S.mind.objectives += new_objective
var/datum/objective/new_objective2 = new /datum/objective
new_objective2.owner = S.mind
new_objective2.explanation_text = "Kill everyone else while you're at it."
S.mind.objectives += new_objective2
S << S.playstyle_string
S << "<B>You are currently not currently in the same plane of existence as the station. Ctrl+Click a blood pool to manifest.</B>"
S << "<B>Objective #[1]</B>: [new_objective.explanation_text]"
S << "<B>Objective #[2]</B>: [new_objective2.explanation_text]"
S << "<B>Objective #[2]</B>: [new_objective2.explanation_text]"
61 changes: 60 additions & 1 deletion code/game/gamemodes/changeling/changeling.dm
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,9 @@ var/list/slot2type = list("head" = /obj/item/clothing/head/changeling, "wear_mas

/datum/game_mode/proc/forge_changeling_objectives(datum/mind/changeling, var/team_mode = 0)
//OBJECTIVES - random traitor objectives. Unique objectives "steal brain" and "identity theft".
//No escape alone because changelings aren't suited for it and it'd probably just lead to rampant robusting
//If it seems like they'd be able to do it in play, add a 10% chance to have to escape alone

var/escape_objective_possible = TRUE

//if there's a team objective, check if it's compatible with escape objectives
Expand All @@ -121,7 +124,63 @@ var/list/slot2type = list("head" = /obj/item/clothing/head/changeling, "wear_mas
escape_objective_possible = FALSE
break

generate_objectives(changeling, 4, escape_objective_possible)
var/datum/objective/absorb/absorb_objective = new
absorb_objective.owner = changeling
absorb_objective.gen_amount_goal(6, 8)
changeling.objectives += absorb_objective

if(prob(60))
var/datum/objective/steal/steal_objective = new
steal_objective.owner = changeling
steal_objective.find_target()
changeling.objectives += steal_objective

var/list/active_ais = active_ais()
if(active_ais.len && prob(100/joined_player_list.len))
var/datum/objective/destroy/destroy_objective = new
destroy_objective.owner = changeling
destroy_objective.find_target()
changeling.objectives += destroy_objective
else
if(prob(70))
var/datum/objective/assassinate/kill_objective = new
kill_objective.owner = changeling
if(team_mode) //No backstabbing while in a team
kill_objective.find_target_by_role(role = "Changeling", role_type = 1, invert = 1)
else
kill_objective.find_target()
changeling.objectives += kill_objective
else
var/datum/objective/maroon/maroon_objective = new
maroon_objective.owner = changeling
if(team_mode)
maroon_objective.find_target_by_role(role = "Changeling", role_type = 1, invert = 1)
else
maroon_objective.find_target()
changeling.objectives += maroon_objective

if (!(locate(/datum/objective/escape) in changeling.objectives) && escape_objective_possible)
var/datum/objective/escape/escape_with_identity/identity_theft = new
identity_theft.owner = changeling
identity_theft.target = maroon_objective.target
identity_theft.update_explanation_text()
changeling.objectives += identity_theft
escape_objective_possible = FALSE

if (!(locate(/datum/objective/escape) in changeling.objectives) && escape_objective_possible)
if(prob(50))
var/datum/objective/escape/escape_objective = new
escape_objective.owner = changeling
changeling.objectives += escape_objective
else
var/datum/objective/escape/escape_with_identity/identity_theft = new
identity_theft.owner = changeling
if(team_mode)
identity_theft.find_target_by_role(role = "Changeling", role_type = 1, invert = 1)
else
identity_theft.find_target()
changeling.objectives += identity_theft
escape_objective_possible = FALSE



Expand Down
Loading

0 comments on commit 95df33b

Please sign in to comment.