From 04a1c7ada40e015ac86b41ba64d5ed1db5cd8bf0 Mon Sep 17 00:00:00 2001 From: Useroth Date: Sat, 27 Apr 2019 15:32:32 +0200 Subject: [PATCH] Energy net and capture objective tweak. --- code/game/gamemodes/objective.dm | 6 ++-- .../suit/n_suit_verbs/energy_net_nets.dm | 33 ++++++++++++++++++- 2 files changed, 35 insertions(+), 4 deletions(-) diff --git a/code/game/gamemodes/objective.dm b/code/game/gamemodes/objective.dm index 7532d18d06..f6b1def645 100644 --- a/code/game/gamemodes/objective.dm +++ b/code/game/gamemodes/objective.dm @@ -542,6 +542,7 @@ GLOBAL_LIST_EMPTY(possible_items_special) return checking.researched_nodes.len >= target_amount /datum/objective/capture + var/captured_amount = 0 /datum/objective/capture/proc/gen_amount_goal() target_amount = rand(5,10) @@ -549,8 +550,7 @@ GLOBAL_LIST_EMPTY(possible_items_special) return target_amount /datum/objective/capture/check_completion()//Basically runs through all the mobs in the area to determine how much they are worth. - var/captured_amount = 0 - var/area/centcom/holding/A = GLOB.areas_by_type[/area/centcom/holding] + /*var/area/centcom/holding/A = GLOB.areas_by_type[/area/centcom/holding] for(var/mob/living/carbon/human/M in A)//Humans. if(M.stat == DEAD)//Dead folks are worth less. captured_amount+=0.5 @@ -573,7 +573,7 @@ GLOBAL_LIST_EMPTY(possible_items_special) if(M.stat == DEAD) captured_amount+=1 continue - captured_amount+=2 + captured_amount+=2*/ //Removed in favour of adding points on capture, in energy_net_nets.dm return captured_amount >= target_amount diff --git a/code/modules/ninja/suit/n_suit_verbs/energy_net_nets.dm b/code/modules/ninja/suit/n_suit_verbs/energy_net_nets.dm index e2609e8d09..6b01256b1b 100644 --- a/code/modules/ninja/suit/n_suit_verbs/energy_net_nets.dm +++ b/code/modules/ninja/suit/n_suit_verbs/energy_net_nets.dm @@ -59,9 +59,40 @@ It is possible to destroy the net by the occupant or someone else. continue H.dropItemToGround(W) - if(affecting in GLOB.alive_mob_list) //Feel free to suggest a better check if it's alive. + if(affecting.stat != DEAD) affecting.revive(1, 1) //Basically a full heal, including limbs/organs. + var/datum/antagonist/antag_datum + for(antag_datum in GLOB.antagonists) + if(antag_datum.owner == master) + break + + for(var/datum/objective/capture/capture in antag_datum) + if(istype(affecting, /mob/living/carbon/human)) //Humans. + if(affecting.stat == DEAD)//Dead folks are worth less. + capture.captured_amount+=0.5 + continue + capture.captured_amount+=1 + if(istype(affecting, /mob/living/carbon/monkey)) //Monkeys are almost worthless, you failure. + capture.captured_amount+=0.1 + if(istype(affecting, /mob/living/carbon/alien/larva)) //Larva are important for research. + if(affecting.stat == DEAD) + capture.captured_amount+=0.5 + continue + capture.captured_amount+=1 + if(istype(affecting, /mob/living/carbon/alien/humanoid)) //Aliens are worth twice as much as humans. + if(istype(affecting, /mob/living/carbon/alien/humanoid/royal/queen)) //Queens are worth three times as much as humans. + if(affecting.stat == DEAD) + capture.captured_amount+=1.5 + else + capture.captured_amount+=3 + continue + if(affecting.stat == DEAD) + capture.captured_amount+=1 + continue + capture.captured_amount+=2 + + playsound(affecting, 'sound/effects/sparks4.ogg', 50, 1) new /obj/effect/temp_visual/dir_setting/ninja/phase/out(affecting.drop_location(), affecting.dir)