Skip to content

Commit

Permalink
Give_life
Browse files Browse the repository at this point in the history
  • Loading branch information
Rex9001 committed Feb 25, 2024
1 parent caa62c3 commit edb769f
Show file tree
Hide file tree
Showing 4 changed files with 45 additions and 1 deletion.
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
/datum/action/cooldown/mob_cooldown/bloodling/give_life
name = "Give Life"
desc = "Bestow the gift of life onto the ignorant."
button_icon_state = "alien_hide"

/datum/action/cooldown/mob_cooldown/bloodling/give_life/set_click_ability(mob/on_who)
. = ..()
if(!.)
return
to_chat(on_who, span_noticealien("You prepare to bestow a life. <b>Click a target to grant them the gift!</b>"))

/datum/action/cooldown/mob_cooldown/bloodling/give_life/unset_click_ability(mob/on_who, refund_cooldown = TRUE)
. = ..()
if(!.)
return

to_chat(on_who, span_noticealien("They do not deserve it... Yet..."))

/datum/action/cooldown/mob_cooldown/bloodling/give_life/PreActivate(atom/target)
if(!ismob(target))
owner.balloon_alert(owner, "only works on mobs!")
return FALSE
var/mob/living/mob_target = target
if(mob_target.ckey && !mob_target.stat == CONSCIOUS)
owner.balloon_alert(owner, "only works on non-sentient conscious mobs!")
return FALSE
return ..()

/datum/action/cooldown/mob_cooldown/bloodling/give_life/Activate(atom/target)
var/mob/living/target_mob = target

var/question = "Would you like to be a [target_mob] servant of [owner]?"
var/list/candidates = poll_candidates_for_mobs(question, ROLE_SENTIENCE, ROLE_SENTIENCE, 10 SECONDS, target_mob, POLL_IGNORE_SHUTTLE_DENIZENS)
if(!LAZYLEN(candidates) && !LAZYLEN(target_mob))
return FALSE
var/mob/dead/observer/C = pick_n_take(candidates)
message_admins("[key_name_admin(C)] has taken control of ([key_name_admin(target_mob)])")
target_mob.ghostize(FALSE)
target_mob.key = C.key
return TRUE

Original file line number Diff line number Diff line change
Expand Up @@ -243,6 +243,7 @@
/datum/action/cooldown/spell/aoe/repulse/bloodling,
/datum/action/cooldown/mob_cooldown/bloodling/transfer_biomass,
/datum/action/cooldown/mob_cooldown/bloodling/heal,
/datum/action/cooldown/mob_cooldown/bloodling/give_life,
)
speed = 2

Expand All @@ -259,5 +260,6 @@
/datum/action/cooldown/spell/aoe/repulse/bloodling,
/datum/action/cooldown/mob_cooldown/bloodling/transfer_biomass,
/datum/action/cooldown/mob_cooldown/bloodling/heal,
/datum/action/cooldown/mob_cooldown/bloodling/give_life,
)
speed = 2.5
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@

/mob/living/basic/bloodling/minion/harvester
name = "harvester"
desc = "A vague mass of flesh with two large scything talons."
desc = "A mass of flesh with two large scything talons."

health = 100
maxHealth = 100
Expand Down
1 change: 1 addition & 0 deletions tgstation.dme
Original file line number Diff line number Diff line change
Expand Up @@ -5742,6 +5742,7 @@
#include "monkestation\code\modules\antagonists\bloodling\abilities\build.dm"
#include "monkestation\code\modules\antagonists\bloodling\abilities\devour.dm"
#include "monkestation\code\modules\antagonists\bloodling\abilities\dissonant_shriek.dm"
#include "monkestation\code\modules\antagonists\bloodling\abilities\give_life.dm"
#include "monkestation\code\modules\antagonists\bloodling\abilities\heal.dm"
#include "monkestation\code\modules\antagonists\bloodling\abilities\hide.dm"
#include "monkestation\code\modules\antagonists\bloodling\abilities\infest.dm"
Expand Down

0 comments on commit edb769f

Please sign in to comment.