|
18 | 18 | ////////////////////////////////////////////////////////////////////////// |
19 | 19 | /datum/action/cooldown/spell/touch/devour_will |
20 | 20 | name = "Devour Will" |
21 | | - desc = "Creates a dark bead that can be used on a human to begin draining the lucidity and willpower from a living target, knocking them unconscious for a time.<br>Being interrupted will knock you down for a time." |
| 21 | + desc = "Creates a dark bead that can be used on a human to begin draining the lucidity and willpower from a living target, knocking them unconscious for a time.\ |
| 22 | + <br>Being interrupted will knock you down for a time." |
22 | 23 | panel = "Darkspawn" |
23 | 24 | button_icon = 'yogstation/icons/mob/actions/actions_darkspawn.dmi' |
24 | 25 | sound = null |
|
61 | 62 | if(target.stat == DEAD) |
62 | 63 | to_chat(caster, span_warning("[target] is too weak to drain.")) |
63 | 64 | return |
64 | | - if(target.has_status_effect(STATUS_EFFECT_DEVOURED_WILL)) |
65 | | - to_chat(caster, span_warning("[target]'s mind has not yet recovered enough willpower to be worth devouring.")) |
66 | | - return |
| 65 | + if(get_shadow_tumor(target)) |
| 66 | + to_chat(owner, span_danger("[target] already has a dark bead lodged within their psyche.")) |
| 67 | + return FALSE |
| 68 | + |
| 69 | + var/datum/team/darkspawn/team = darkspawn.get_team() |
| 70 | + if(!team) |
| 71 | + CRASH("darkspawn without a team is trying to thrall someone") |
67 | 72 |
|
68 | 73 | caster.Immobilize(1 SECONDS) // So they don't accidentally move while beading |
| 74 | + target.Immobilize(6 SECONDS) //we remove this if it's canceled early |
69 | 75 | target.silent += 5 |
70 | 76 |
|
71 | 77 | caster.balloon_alert(caster, "Cera ko...") |
|
78 | 84 | if(!do_after(caster, 5 SECONDS, target)) |
79 | 85 | to_chat(target, span_boldwarning("All right... You're all right.")) |
80 | 86 | caster.Knockdown(5 SECONDS) |
| 87 | + target.SetImmobilized(0) |
81 | 88 | eating = FALSE |
82 | 89 | return FALSE |
83 | 90 | eating = FALSE |
84 | 91 |
|
85 | | - if(target.has_status_effect(STATUS_EFFECT_DEVOURED_WILL)) |
86 | | - to_chat(caster, span_warning("[target]'s mind has not yet recovered enough willpower to be worth devouring.")) |
87 | | - return |
| 92 | + if(get_shadow_tumor(target)) |
| 93 | + to_chat(owner, span_danger("[target] already has a dark bead lodged within their psyche.")) |
| 94 | + return FALSE |
88 | 95 |
|
89 | 96 | //put the victim to sleep before the visible_message proc so the victim doesn't see it |
90 | 97 | to_chat(target, span_progenitor("You suddenly feel... empty. Thoughts try to form, but flit away. You slip into a deep, deep slumber...")) |
91 | 98 | playsound(target, 'yogstation/sound/magic/devour_will_end.ogg', 75, FALSE) |
92 | 99 | target.playsound_local(target, 'yogstation/sound/magic/devour_will_victim.ogg', 50, FALSE) |
93 | | - target.Unconscious(5 SECONDS) |
94 | | - |
95 | | - //get how much lucidity and willpower will be given |
96 | | - var/willpower_amount = 2 |
97 | | - var/lucidity_amount = 1 |
98 | | - if(HAS_TRAIT(target, TRAIT_DARKSPAWN_DEVOURED)) //change the numbers before text |
99 | | - lucidity_amount = 0 |
100 | | - willpower_amount *= 0.5 |
101 | | - willpower_amount = round(willpower_amount) //make sure it's a whole number still |
102 | 100 |
|
103 | 101 | //format the text output to the darkspawn |
104 | 102 | var/list/self_text = list() |
105 | 103 |
|
106 | 104 | caster.balloon_alert(caster, "...akkraup'dej") |
107 | | - self_text += span_velvet("You devour [target]'s will.") |
108 | | - if(HAS_TRAIT(target, TRAIT_DARKSPAWN_DEVOURED)) |
109 | | - self_text += span_warning("[target]'s mind is already damaged by previous devouring and has granted less willpower and no lucidity.") |
110 | | - else |
111 | | - self_text += span_velvet("This individual's lucidity brings you one step closer to the sacrament...") |
112 | | - self_text += span_warning("After meddling with [target]'s mind, they will grant less willpower and no lucidity any future times their will is devoured.") |
113 | | - self_text += span_warning("[target] is now severely weakened and will take some time to recover.") |
114 | | - caster.visible_message(span_warning("[caster] gently lowers [target] to the ground..."), self_text.Join("<br>")) |
115 | | - |
116 | | - //pass out the willpower and lucidity to the darkspawns |
117 | | - var/datum/team/darkspawn/team = darkspawn.get_team() |
118 | | - if(team) |
119 | | - team.grant_willpower(willpower_amount) |
120 | | - team.grant_lucidity(lucidity_amount) |
121 | | - |
122 | | - //apply the long-term debuffs to the victim |
123 | | - target.apply_status_effect(STATUS_EFFECT_BROKEN_WILL) |
124 | | - target.apply_status_effect(STATUS_EFFECT_DEVOURED_WILL) |
125 | | - ADD_TRAIT(target, TRAIT_DARKSPAWN_DEVOURED, type) |
126 | | - return TRUE |
127 | | - |
128 | | -////////////////////////////////////////////////////////////////////////// |
129 | | -//--------------------------Glorified handcuffs-------------------------// |
130 | | -////////////////////////////////////////////////////////////////////////// |
131 | | -/datum/action/cooldown/spell/touch/restrain_body |
132 | | - name = "Restrain body" |
133 | | - desc = "Forms rudimentary restraints on a target's hands." |
134 | | - panel = "Darkspawn" |
135 | | - button_icon = 'yogstation/icons/mob/actions/actions_darkspawn.dmi' |
136 | | - sound = null |
137 | | - background_icon_state = "bg_alien" |
138 | | - overlay_icon_state = "bg_alien_border" |
139 | | - buttontooltipstyle = "alien" |
140 | | - button_icon_state = "restrain_body" |
141 | | - check_flags = AB_CHECK_HANDS_BLOCKED | AB_CHECK_IMMOBILE | AB_CHECK_LYING | AB_CHECK_CONSCIOUS |
142 | | - spell_requirements = SPELL_REQUIRES_HUMAN |
143 | | - invocation_type = INVOCATION_NONE |
144 | | - hand_path = /obj/item/melee/touch_attack/darkspawn |
145 | | - resource_costs = list(ANTAG_RESOURCE_DARKSPAWN = 5) |
146 | | - //Boolean on whether we're tying someone's hands |
147 | | - var/tying = FALSE |
148 | | - |
149 | | -/datum/action/cooldown/spell/touch/restrain_body/can_cast_spell(feedback) |
150 | | - if(tying) |
151 | | - return |
152 | | - return ..() |
153 | | - |
154 | | -/datum/action/cooldown/spell/touch/restrain_body/is_valid_target(atom/cast_on) |
155 | | - return iscarbon(cast_on) |
156 | | - |
157 | | -/datum/action/cooldown/spell/touch/restrain_body/cast_on_hand_hit(obj/item/melee/touch_attack/hand, mob/living/carbon/target, mob/living/carbon/caster) |
158 | | - var/datum/antagonist/darkspawn/darkspawn = isdarkspawn(caster) |
159 | | - if(!darkspawn || tying || target == caster) //no tying yourself |
160 | | - return |
161 | | - if(is_team_darkspawn(target)) |
162 | | - to_chat(caster, span_warning("You cannot restrain allies.")) |
163 | | - return |
164 | | - if(!istype(target)) |
165 | | - to_chat(caster, span_warning("[target]'s mind is too pitiful to be of any use.")) |
166 | | - return |
167 | | - if(target.handcuffed) |
168 | | - to_chat(caster, span_warning("[target] is already restrained.")) |
169 | | - return |
170 | 105 |
|
171 | | - caster.balloon_alert(caster, "Koce ra...") |
172 | | - to_chat(caster, span_velvet("You begin restraining [target]...")) |
173 | | - playsound(target, 'yogstation/sound/ambience/antag/veil_mind_gasp.ogg', 50, TRUE) |
174 | | - tying = TRUE |
175 | | - if(!do_after(caster, 1.5 SECONDS, target, progress = FALSE)) |
176 | | - tying = FALSE |
177 | | - return FALSE |
178 | | - tying = FALSE |
| 106 | + var/obj/item/organ/shadowtumor/bead = target.getorganslot(ORGAN_SLOT_BRAIN_TUMOR) |
| 107 | + if(!bead || !istype(bead)) |
| 108 | + bead = new |
| 109 | + bead.Insert(target, FALSE, FALSE) |
| 110 | + bead.antag_team = team |
179 | 111 |
|
180 | | - target.silent += 5 |
181 | | - |
182 | | - if(target.handcuffed) |
183 | | - to_chat(caster, span_warning("[target] is already restrained.")) |
184 | | - return |
| 112 | + //pass out the willpower and lucidity to the darkspawns |
| 113 | + if(!HAS_TRAIT(target, TRAIT_DARKSPAWN_DEVOURED)) |
| 114 | + ADD_TRAIT(target, TRAIT_DARKSPAWN_DEVOURED, type) |
| 115 | + self_text += span_velvet("You place a dark bead deep within [target]'s psyche.") |
| 116 | + self_text += span_velvet("This individual's lucidity brings you one step closer to the sacrament...") |
| 117 | + self_text += span_velvet("You also feed off their will to fuel your growth.") |
| 118 | + self_text += span_velvet("No further attempts to drain this individual will provide willpower or lucidity.") |
| 119 | + team.grant_willpower(2) |
| 120 | + team.grant_lucidity(1) |
| 121 | + else |
| 122 | + self_text += span_velvet("You replace the dark bead deep within [target]'s psyche.") |
185 | 123 |
|
186 | | - playsound(target, 'yogstation/sound/magic/devour_will_form.ogg', 50, TRUE) |
187 | | - target.set_handcuffed(new /obj/item/restraints/handcuffs/darkspawn(target)) |
188 | | - target.update_handcuffed() |
| 124 | + caster.visible_message(span_warning("[caster] gently lowers [target] to the ground..."), self_text.Join("<br>")) |
189 | 125 |
|
| 126 | + //apply the long-term debuff to the victim |
| 127 | + target.apply_status_effect(STATUS_EFFECT_BROKEN_WILL) |
190 | 128 | return TRUE |
191 | 129 |
|
192 | | -//the restrains in question |
193 | | -/obj/item/restraints/handcuffs/darkspawn |
194 | | - name = "shadow stitched restraints" |
195 | | - desc = "Bindings created by stitching together shadows." |
196 | | - icon_state = "handcuffAlien" |
197 | | - lefthand_file = 'icons/mob/inhands/equipment/security_lefthand.dmi' |
198 | | - righthand_file = 'icons/mob/inhands/equipment/security_righthand.dmi' |
199 | | - breakouttime = 30 SECONDS |
200 | | - flags_1 = NONE |
201 | | - item_flags = DROPDEL |
202 | | - |
203 | | -/obj/item/restraints/handcuffs/darkspawn/Initialize(mapload) |
204 | | - . = ..() |
205 | | - add_atom_colour(COLOR_VELVET, FIXED_COLOUR_PRIORITY) |
206 | | - |
207 | 130 | ////////////////////////////////////////////////////////////////////////// |
208 | 131 | //-----------------------Recall shuttle ability-------------------------// |
209 | 132 | ////////////////////////////////////////////////////////////////////////// |
|
0 commit comments