mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-07-20 04:26:03 +01:00
Assimilation Update (#40769)
* new objectives + qol * beep * oof * one line * prevent kill objectives from having the same target as assimilate objectives * Free objectivev * code review * fix * yes
This commit is contained in:
@@ -46,7 +46,7 @@
|
||||
if(CONFIG_GET(flag/protect_assistant_from_antagonist))
|
||||
restricted_jobs += "Assistant"
|
||||
|
||||
var/num_hosts = max( 1 , rand(0,1) + min(5, round(num_players() / 15) ) ) //1 host for every 15 players up to 75, with a 50% chance of an extra
|
||||
var/num_hosts = max( 1 , rand(0,1) + min(5, round(num_players() / 12) ) ) //1 host for every 12 players up to 60, with a 50% chance of an extra
|
||||
|
||||
for(var/j = 0, j < num_hosts, j++)
|
||||
if (!antag_candidates.len)
|
||||
@@ -66,6 +66,10 @@
|
||||
|
||||
|
||||
/datum/game_mode/hivemind/post_setup()
|
||||
if(hosts.len >= 4 && prob(35)) //Create the versus objective here since we want a common target for all the antags
|
||||
var/datum/antagonist/hivemind/hive
|
||||
hive.common_assimilation_obj = new /datum/objective/hivemind/assimilate_common
|
||||
hive.common_assimilation_obj.find_target_by_role(role = ROLE_HIVE, role_type = 1, invert = 1)
|
||||
for(var/datum/mind/i in hosts)
|
||||
i.add_antag_datum(/datum/antagonist/hivemind)
|
||||
return ..()
|
||||
|
||||
@@ -57,4 +57,40 @@
|
||||
var/datum/mind/M = L.mind
|
||||
if(M == target)
|
||||
return considered_alive(target)
|
||||
return FALSE
|
||||
return FALSE
|
||||
|
||||
/datum/objective/hivemind/biggest
|
||||
explanation_text = "End the round with more vessels than any other hivemind host."
|
||||
|
||||
/datum/objective/hivemind/biggest/check_completion()
|
||||
var/datum/antagonist/hivemind/host = owner.has_antag_datum(/datum/antagonist/hivemind)
|
||||
if(!host)
|
||||
return FALSE
|
||||
for(var/datum/antagonist/hivemind/H in GLOB.antagonists)
|
||||
if(H == host)
|
||||
continue
|
||||
if(H.hive_size >= host.hive_size)
|
||||
return FALSE
|
||||
return TRUE
|
||||
|
||||
/datum/objective/hivemind/assimilate_common
|
||||
explanation_text = "This is a bug. Error:HIVE3"
|
||||
|
||||
/datum/objective/hivemind/assimilate_common/update_explanation_text()
|
||||
if(target)
|
||||
explanation_text = "Ensure that you are the only host assimilating [target.name] at the end of the round."
|
||||
else
|
||||
explanation_text = "Free Objective."
|
||||
|
||||
/datum/objective/hivemind/assimilate_common/check_completion()
|
||||
var/datum/antagonist/hivemind/host = owner.has_antag_datum(/datum/antagonist/hivemind)
|
||||
if(!target)
|
||||
return TRUE
|
||||
if(!host || !target.current || !host.hivemembers.Find(target.current))
|
||||
return FALSE
|
||||
for(var/datum/antagonist/hivemind/H in GLOB.antagonists)
|
||||
if(H == host)
|
||||
continue
|
||||
if(H.hivemembers.Find(target.current))
|
||||
return FALSE
|
||||
return TRUE
|
||||
@@ -7,6 +7,7 @@
|
||||
var/special_role = ROLE_HIVE
|
||||
var/list/hivemembers = list()
|
||||
var/hive_size = 0
|
||||
var/static/datum/objective/hivemind/assimilate_common/common_assimilation_obj //Make it static since we want a common target for all the antags
|
||||
|
||||
var/list/upgrade_tiers = list(
|
||||
//Tier 1
|
||||
@@ -37,7 +38,10 @@
|
||||
for(var/power in upgrade_tiers)
|
||||
var/level = upgrade_tiers[power]
|
||||
if(hive_size >= level && !(locate(power) in owner.spell_list))
|
||||
owner.AddSpell(new power(null))
|
||||
var/obj/effect/proc_holder/spell/the_spell = new power(null)
|
||||
owner.AddSpell(the_spell)
|
||||
if(hive_size > 0)
|
||||
to_chat(owner, "<span class='assimilator'>We have unlocked [the_spell.name].</span><span class='bold'> [the_spell.desc]</span>")
|
||||
else if(hive_size < level && (locate(power) in owner.spell_list))
|
||||
owner.RemoveSpell(power)
|
||||
|
||||
@@ -126,7 +130,8 @@
|
||||
var/datum/objective/hivemind/hiveescape/hive_escape_objective = new
|
||||
hive_escape_objective.owner = owner
|
||||
objectives += hive_escape_objective
|
||||
if(prob(50))
|
||||
|
||||
if(prob(85))
|
||||
var/datum/objective/hivemind/assimilate/assim_objective = new
|
||||
assim_objective.owner = owner
|
||||
if(prob(25)) //Decently high chance to have to assimilate an implanted crew member
|
||||
@@ -135,11 +140,28 @@
|
||||
assim_objective.find_target_by_role(role = ROLE_HIVE, role_type = 1, invert = 1)
|
||||
assim_objective.update_explanation_text()
|
||||
objectives += assim_objective
|
||||
else
|
||||
var/datum/objective/hivemind/biggest/biggest_objective = new
|
||||
biggest_objective.owner = owner
|
||||
objectives += biggest_objective
|
||||
|
||||
if(prob(85) && common_assimilation_obj) //If the mode rolled the versus objective IE common_assimilation_obj is not null, add a very high chance to get this
|
||||
var/datum/objective/hivemind/assimilate_common/versus_objective = new
|
||||
versus_objective.owner = owner
|
||||
versus_objective.target = common_assimilation_obj.target
|
||||
versus_objective.update_explanation_text()
|
||||
objectives += versus_objective
|
||||
else if(prob(70))
|
||||
var/giveit = TRUE
|
||||
var/datum/objective/assassinate/kill_objective = new
|
||||
kill_objective.owner = owner
|
||||
kill_objective.find_target()
|
||||
objectives += kill_objective
|
||||
for(var/datum/objective/hivemind/assimilate/ass_obj in objectives)
|
||||
if(ass_obj.target == kill_objective.target)
|
||||
giveit = FALSE
|
||||
break
|
||||
if(giveit)
|
||||
objectives += kill_objective
|
||||
else
|
||||
var/datum/objective/maroon/maroon_objective = new
|
||||
maroon_objective.owner = owner
|
||||
@@ -157,8 +179,8 @@
|
||||
to_chat(owner.current, "<b>Your psionic powers will grow by assimilating the crew into your hive. Use the Assimilate Vessel spell on a stationary \
|
||||
target, and after ten seconds he will be one of the hive. This is completely silent and safe to use, and failing will reset the cooldown. As \
|
||||
you assimilate the crew, you will gain more powers to use. Most are silent and won't help you in a fight, but grant you great power over your \
|
||||
vessels. There are other hiveminds onboard the station, collaboration is possible, but a strong enough hivemind can reap many rewards from a \
|
||||
well planned betrayal.</b>")
|
||||
vessels. Hover your mouse over a power's action icon for an extended description on what it does. There are other hiveminds onboard the station, \
|
||||
collaboration is possible, but a strong enough hivemind can reap many rewards from a well planned betrayal.</b>")
|
||||
owner.current.playsound_local(get_turf(owner.current), 'sound/ambience/antag/tatoralert.ogg', 100, FALSE, pressure_affected = FALSE)
|
||||
|
||||
owner.announce_objectives()
|
||||
@@ -184,4 +206,4 @@
|
||||
return result.Join("<br>")
|
||||
|
||||
/datum/antagonist/hivemind/is_gamemode_hero()
|
||||
return SSticker.mode.name == "hivemind"
|
||||
return SSticker.mode.name == "Assimilation"
|
||||
|
||||
@@ -375,6 +375,7 @@ h1.alert, h2.alert {color: #000000;}
|
||||
.noticealien {color: #00c000;}
|
||||
.alertalien {color: #00c000; font-weight: bold;}
|
||||
.changeling {color: #800080; font-style: italic;}
|
||||
.assimilator {color: #800080; font-size: 16px ; font-weight: bold;}
|
||||
|
||||
.spider {color: #4d004d;}
|
||||
|
||||
|
||||
@@ -166,7 +166,6 @@
|
||||
else
|
||||
power *= 3
|
||||
if(power > 50 && user.z == target.z)
|
||||
to_chat(target, "<span class='userdanger'>You feel a sharp pain, and a foreign presence in your mind!!</span>")
|
||||
to_chat(user, "<span class='notice'>We have overloaded the vessel for a short time!</span>")
|
||||
target.Jitter(round(power/10))
|
||||
target.Unconscious(power)
|
||||
@@ -194,7 +193,6 @@
|
||||
if(!hive)
|
||||
return
|
||||
var/iterations = 0
|
||||
var/power = 5
|
||||
|
||||
if(!user.getBruteLoss() && !user.getFireLoss() && !user.getCloneLoss() && !user.getBrainLoss())
|
||||
to_chat(user, "<span class='notice'>We cannot heal ourselves any more with this power!</span>")
|
||||
@@ -202,17 +200,17 @@
|
||||
to_chat(user, "<span class='notice'>We begin siphoning power from our many vessels!</span>")
|
||||
while(iterations < 7)
|
||||
var/mob/living/carbon/human/target = pick(hive.hivemembers)
|
||||
if(!target)
|
||||
break
|
||||
if(!do_mob(user,user,15))
|
||||
to_chat(user, "<span class='warning'>Our concentration has been broken!</span>")
|
||||
break
|
||||
if(!target)
|
||||
to_chat(user, "<span class='warning'>We have run out of vessels to drain.</span>")
|
||||
break
|
||||
target.adjustBrainLoss(5)
|
||||
power = max(5-(round(get_dist(user, target)/40)),2)
|
||||
if(user.getBruteLoss() > user.getFireLoss())
|
||||
user.heal_ordered_damage(power, list(CLONE, BRUTE, BURN))
|
||||
user.heal_ordered_damage(5, list(CLONE, BRUTE, BURN))
|
||||
else
|
||||
user.heal_ordered_damage(power, list(CLONE, BURN, BRUTE))
|
||||
user.heal_ordered_damage(5, list(CLONE, BURN, BRUTE))
|
||||
if(!user.getBruteLoss() && !user.getFireLoss() && !user.getCloneLoss()) //If we don't have any of these, stop looping
|
||||
to_chat(user, "<span class='warning'>We finish our healing</span>")
|
||||
break
|
||||
|
||||
@@ -112,6 +112,7 @@ CONTINUOUS CLOCKWORK_CULT
|
||||
CONTINUOUS CHANGELING
|
||||
CONTINUOUS WIZARD
|
||||
#CONTINUOUS MONKEY
|
||||
CONTINUOUS HIVEMIND
|
||||
|
||||
##Note: do not toggle continuous off for these modes, as they have no antagonists and would thus end immediately!
|
||||
|
||||
|
||||
@@ -135,6 +135,7 @@ h1.alert, h2.alert {color: #000000;}
|
||||
.noticealien {color: #00c000;}
|
||||
.alertalien {color: #00c000; font-weight: bold;}
|
||||
.changeling {color: #800080; font-style: italic;}
|
||||
.assimilator {color: #800080; font-size: 2 ; font-weight: bold;}
|
||||
|
||||
.spider {color: #4d004d;}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user