diff --git a/code/datums/antagonists/datum_traitor.dm b/code/datums/antagonists/datum_traitor.dm index eeb803ca1e..2832db720e 100644 --- a/code/datums/antagonists/datum_traitor.dm +++ b/code/datums/antagonists/datum_traitor.dm @@ -85,7 +85,7 @@ if(owner.assigned_role == "Clown") var/mob/living/carbon/human/traitor_mob = owner.current if(traitor_mob&&istype(traitor_mob)) - if(!silent) + if(!silent) to_chat(traitor_mob, "Your training has allowed you to overcome your clownish nature, allowing you to wield weapons without harming yourself.") traitor_mob.dna.remove_mutation(CLOWNMUT) @@ -216,10 +216,16 @@ kill_objective.find_target() add_objective(kill_objective) else - var/datum/objective/steal/steal_objective = new - steal_objective.owner = owner - steal_objective.find_target() - add_objective(steal_objective) + if(prob(15) && !(locate(/datum/objective/download in owner.objectives))) + var/datum/objective/download/download_objective = new + download_objective.owner = owner + download_objective.gen_amount_goal() + add_objective(download_objective) + else + var/datum/objective/steal/steal_objective = new + steal_objective.owner = owner + steal_objective.find_target() + add_objective(steal_objective) /datum/antagonist/traitor/AI/forge_single_objective() .=1 diff --git a/code/game/gamemodes/changeling/changeling.dm b/code/game/gamemodes/changeling/changeling.dm index e67ac26d3a..015b6d9521 100644 --- a/code/game/gamemodes/changeling/changeling.dm +++ b/code/game/gamemodes/changeling/changeling.dm @@ -131,10 +131,16 @@ GLOBAL_LIST_INIT(slot2type, list("head" = /obj/item/clothing/head/changeling, "w 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 + if(prob(85)) + var/datum/objective/steal/steal_objective = new + steal_objective.owner = changeling + steal_objective.find_target() + changeling.objectives += steal_objective + else + var/datum/objective/download/download_objective = new + download_objective.owner = changeling + download_objective.gen_amount_goal() + changeling.objectives += download_objective var/list/active_ais = active_ais() if(active_ais.len && prob(100/GLOB.joined_player_list.len)) diff --git a/code/game/gamemodes/objective.dm b/code/game/gamemodes/objective.dm index 75ed90d712..49332a443b 100644 --- a/code/game/gamemodes/objective.dm +++ b/code/game/gamemodes/objective.dm @@ -506,24 +506,31 @@ GLOBAL_LIST_EMPTY(possible_items_special) explanation_text = "Download [target_amount] research level\s." return target_amount -/datum/objective/download/check_completion()//NINJACODE. - var/current_amount = 0 +/datum/objective/download/check_completion() + var/list/current_tech = list() var/list/datum/mind/owners = get_owners() - for(var/datum/mind/M in owners) - if(!ishuman(owner.current)) - continue - var/mob/living/carbon/human/H = owner.current - if(!H || H.stat == DEAD || !istype(H.wear_suit, /obj/item/clothing/suit/space/space_ninja)) - continue - var/obj/item/clothing/suit/space/space_ninja/SN = H.wear_suit - if(!SN.s_initialized) - continue - for(var/datum/tech/current_data in SN.stored_research) - if(current_data.level) - current_amount += (current_data.level-1) - return current_amount >= target_amount - - + for(var/datum/mind/owner in owners) + if(ismob(owner.current)) + var/mob/M = owner.current //Yeah if you get morphed and you eat a quantum tech disk with the RD's latest backup good on you soldier. + if(ishuman(M)) + var/mob/living/carbon/human/H = M + if(H && (H.stat != DEAD) && istype(H.wear_suit, /obj/item/clothing/suit/space/space_ninja)) + var/obj/item/clothing/suit/space/space_ninja/S = H.wear_suit + for(var/datum/tech/T in S.stored_research) + current_tech[T.id] = T.level? T.level : 0 + var/list/otherwise = M.GetAllContents() + for(var/obj/item/disk/tech_disk/TD in otherwise) + for(var/datum/tech/T in TD.tech_stored) + if(!T.id || !T.level) + continue + else if(!current_tech[T.id]) + current_tech[T.id] = T.level + else if(T.level > current_tech[T.id]) + current_tech[T.id] = T.level + var/total = 0 + for(var/i in current_tech) + total += current_tech[i] + return total >= target_amount /datum/objective/capture @@ -586,7 +593,7 @@ GLOBAL_LIST_EMPTY(possible_items_special) for(var/datum/mind/M in owners) if(!owner || !owner.changeling || !owner.changeling.stored_profiles) continue - absorbedcount += M.changeling.absorbedcount + absorbedcount += M.changeling.absorbedcount return absorbedcount >= target_amount