mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-07-21 12:04:48 +01:00
More revenant updates
This commit is contained in:
@@ -81,7 +81,7 @@
|
||||
return
|
||||
A.attack_ghost(src)
|
||||
if(ishuman(A) && in_range(src, A))
|
||||
src.Harvest(A)
|
||||
Harvest(A)
|
||||
|
||||
/mob/living/simple_animal/revenant/proc/Harvest(mob/living/carbon/human/target)
|
||||
if(!castcheck(0))
|
||||
@@ -118,10 +118,6 @@
|
||||
if(5 to INFINITY)
|
||||
src << "<span class='info'>Such a feast! [target] will yield much essence to you.</span>"
|
||||
if(do_after(src, 30, 9, 0, target)) //how about now
|
||||
if(!in_range(src, target))
|
||||
src << "<span class='warning'>You are not close enough to siphon [target]'s soul. The link has been broken.</span>"
|
||||
draining = 0
|
||||
return
|
||||
if(!target.stat)
|
||||
src << "<span class='warning'>They are now powerful enough to fight off your draining.</span>"
|
||||
target << "<span class='boldannounce'>You feel something tugging across your body before subsiding.</span>"
|
||||
@@ -142,6 +138,10 @@
|
||||
drained_mobs.Add(target)
|
||||
target.death(0)
|
||||
icon_state = "revenant_idle"
|
||||
else
|
||||
src << "<span class='warning'>You are not close enough to siphon [target]'s soul. The link has been broken.</span>"
|
||||
draining = 0
|
||||
return
|
||||
draining = 0
|
||||
return
|
||||
|
||||
@@ -224,65 +224,61 @@
|
||||
|
||||
..()
|
||||
|
||||
/mob/living/simple_animal/revenant/proc/castcheck(var/essence_cost)
|
||||
var/mob/living/simple_animal/revenant/user = usr
|
||||
if(!istype(user) || !user)
|
||||
/mob/living/simple_animal/revenant/proc/castcheck(essence_cost)
|
||||
if(!src)
|
||||
return
|
||||
var/turf/T = get_turf(usr)
|
||||
var/turf/T = get_turf(src)
|
||||
if(istype(T, /turf/simulated/wall))
|
||||
user << "<span class='warning'>You cannot use abilities from inside of a wall.</span>"
|
||||
src << "<span class='warning'>You cannot use abilities from inside of a wall.</span>"
|
||||
return 0
|
||||
if(!user.change_essence_amount(essence_cost, 1))
|
||||
user << "<span class='warning'>You lack the essence to use that ability.</span>"
|
||||
if(src.inhibited)
|
||||
src << "<span class='warning'>Your powers have been suppressed by nulling energy!</span>"
|
||||
return 0
|
||||
if(user.inhibited)
|
||||
user << "<span class='warning'>Your powers have been suppressed by nulling energy!</span>"
|
||||
if(!src.change_essence_amount(essence_cost, 1))
|
||||
src << "<span class='warning'>You lack the essence to use that ability.</span>"
|
||||
return 0
|
||||
return 1
|
||||
|
||||
/mob/living/simple_animal/revenant/proc/change_essence_amount(var/essence_amt, var/silent = 0, var/source = null)
|
||||
var/mob/living/simple_animal/revenant/user = usr
|
||||
if(!istype(usr) || !usr)
|
||||
/mob/living/simple_animal/revenant/proc/change_essence_amount(essence_amt, silent = 0, source = null)
|
||||
if(!src)
|
||||
return
|
||||
if(user.essence + essence_amt <= 0)
|
||||
if(essence + essence_amt <= 0)
|
||||
return
|
||||
user.essence += essence_amt
|
||||
user.essence = max(0, user.essence)
|
||||
essence += essence_amt
|
||||
essence = max(0, essence)
|
||||
if(essence_amt > 0)
|
||||
user.essence_accumulated += essence_amt
|
||||
user.essence_accumulated = max(0, user.essence_accumulated)
|
||||
essence_accumulated += essence_amt
|
||||
essence_accumulated = max(0, essence_accumulated)
|
||||
if(!silent)
|
||||
if(essence_amt > 0)
|
||||
user << "<span class='notice'>Gained [essence_amt]E from [source].</span>"
|
||||
src << "<span class='notice'>Gained [essence_amt]E from [source].</span>"
|
||||
else
|
||||
user << "<span class='danger'>Lost [essence_amt]E from [source].</span>"
|
||||
src << "<span class='danger'>Lost [essence_amt]E from [source].</span>"
|
||||
return 1
|
||||
|
||||
/mob/living/simple_animal/revenant/proc/reveal(time)
|
||||
var/mob/living/simple_animal/revenant/R = usr
|
||||
if(!istype(usr) || !usr)
|
||||
if(!src)
|
||||
return
|
||||
if(time <= 0)
|
||||
return
|
||||
R.revealed = 1
|
||||
R.invisibility = 0
|
||||
R << "<span class='warning'>You have been revealed.</span>"
|
||||
revealed = 1
|
||||
invisibility = 0
|
||||
src << "<span class='warning'>You have been revealed.</span>"
|
||||
spawn(time)
|
||||
R.revealed = 0
|
||||
R.invisibility = INVISIBILITY_OBSERVER
|
||||
R << "<span class='notice'>You are once more concealed.</span>"
|
||||
revealed = 0
|
||||
invisibility = INVISIBILITY_OBSERVER
|
||||
src << "<span class='notice'>You are once more concealed.</span>"
|
||||
|
||||
/mob/living/simple_animal/revenant/proc/stun(time)
|
||||
var/mob/living/simple_animal/revenant/R = usr
|
||||
if(!istype(usr) || !usr)
|
||||
if(!src)
|
||||
return
|
||||
if(time <= 0)
|
||||
return
|
||||
R.notransform = 1
|
||||
R << "<span class='warning'>You cannot move!</span>"
|
||||
notransform = 1
|
||||
src << "<span class='warning'>You cannot move!</span>"
|
||||
spawn(time)
|
||||
R.notransform = 0
|
||||
R << "<span class='notice'>You can move again!</span>"
|
||||
notransform = 0
|
||||
src << "<span class='notice'>You can move again!</span>"
|
||||
|
||||
/datum/objective/revenant
|
||||
var/targetAmount = 100
|
||||
|
||||
@@ -45,7 +45,7 @@
|
||||
clothes_req = 0
|
||||
range = 1
|
||||
var/reveal = 80
|
||||
var/stun = 10
|
||||
var/stun = 20
|
||||
var/locked = 1
|
||||
|
||||
/obj/effect/proc_holder/spell/aoe_turf/revenant_light/cast(list/targets, var/mob/living/simple_animal/revenant/user = usr)
|
||||
@@ -96,7 +96,7 @@
|
||||
clothes_req = 0
|
||||
range = 1
|
||||
var/reveal = 100
|
||||
var/stun = 10
|
||||
var/stun = 20
|
||||
var/locked = 1
|
||||
|
||||
/obj/effect/proc_holder/spell/aoe_turf/revenant_defile/cast(list/targets, var/mob/living/simple_animal/revenant/user = usr)
|
||||
@@ -118,9 +118,9 @@
|
||||
spawn(0)
|
||||
if(T.flags & NOJAUNT)
|
||||
T.flags -= NOJAUNT
|
||||
if(!istype(T, /turf/simulated/wall/cult) && istype(T, /turf/simulated/wall) && prob(30))
|
||||
if(!istype(T, /turf/simulated/wall/cult) && istype(T, /turf/simulated/wall) && prob(40))
|
||||
T.ChangeTurf(/turf/simulated/wall/cult)
|
||||
if(!istype(T, /turf/simulated/floor/engine/cult) && istype(T, /turf/simulated/floor) && prob(30))
|
||||
if(!istype(T, /turf/simulated/floor/engine/cult) && istype(T, /turf/simulated/floor) && prob(40))
|
||||
T.ChangeTurf(/turf/simulated/floor/engine/cult)
|
||||
for(var/mob/living/carbon/human/human in T.contents)
|
||||
human << "<span class='warning'>You suddenly feel tired.</span>"
|
||||
@@ -166,22 +166,10 @@
|
||||
bot.locked = 0
|
||||
bot.open = 1
|
||||
bot.Emag(null)
|
||||
for(var/mob/living/silicon/robot/robot in T.contents)
|
||||
robot.visible_message("<span class='warning'>[robot] lets out an alarm!</span>", \
|
||||
"<span class='boldannounce'>01001111 01010110 01000101 01010010 01001100 01001111 01000001 01000100</span>") //Translates to "OVERLOAD"
|
||||
robot << 'sound/misc/interference.ogg'
|
||||
robot.emp_act(2)
|
||||
playsound(robot, 'sound/machines/warning-buzzer.ogg', 50, 1)
|
||||
for(var/mob/living/carbon/human/human in T.contents)
|
||||
human << "<span class='deadsay'>You feel a burst of cold throughout your body...</span>"
|
||||
human.emp_act(2)
|
||||
for(var/obj/machinery/mach in T.contents)
|
||||
switch(rand(1,10))
|
||||
if(1 to 3)
|
||||
mach.emp_act(1)
|
||||
if(4 to 9)
|
||||
mach.emp_act(2)
|
||||
if(10)
|
||||
mach.emag_act(null)
|
||||
if(prob(10))
|
||||
mach.emag_act(null)
|
||||
|
||||
empulse(user.loc, 3, 5)
|
||||
user.reveal(reveal)
|
||||
user.stun(stun)
|
||||
|
||||
Reference in New Issue
Block a user