Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Time Ripper. #2749

Open
wants to merge 5 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 4 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file modified ModularTegustation/Teguicons/32x64.dmi
Binary file not shown.
Binary file modified ModularTegustation/Teguicons/64x64.dmi
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -0,0 +1,203 @@
//He is too weak to go into Star but he is also a major pain in the ass, so Urban Nightmare seems right.
/mob/living/simple_animal/hostile/distortion/Timeripper
name = "The Time Ripper"
desc = "Looks like a prosthetic user from T-Corp."
icon = 'ModularTegustation/Teguicons/32x64.dmi'
icon_state = "Ripper"
icon_living = "Ripper"
maxHealth = 6000 //Decently high. 2 phase boss. 3000 for each.
health = 6000
fear_level = HE_LEVEL
move_to_delay = 3
damage_coeff = list(RED_DAMAGE = 0.7, WHITE_DAMAGE = 0.7, BLACK_DAMAGE = 1, PALE_DAMAGE = 0.2)
melee_damage_lower = 25
melee_damage_upper = 30
melee_damage_type = BLACK_DAMAGE
stat_attack = HARD_CRIT
ranged = TRUE
attack_sound = 'sound/weapons/fixer/generic/nail2.ogg'
attack_verb_continuous = "stabs"
attack_verb_simple = "pierces"
//Variables important for distortions
//The EGO worn by the egoist
ego_list = list(
/obj/item/clothing/suit/armor/ego_gear/he/nixie,
/obj/item/ego_weapon/thirteen
)
//The egoist's name, if specified. Otherwise picks a random name.
egoist_names = list("Jack")
//The mob's gender, which will be inherited by the egoist. Can be left unspecified for a random pick.
gender = MALE
//The Egoist's outfit, which should usually be civilian unless you want them to be a fixer or something.
egoist_outfit = /datum/outfit/job/civilian
//Loot on death; distortions should be valuable targets in general.
/// Prolonged exposure to a monolith will convert the distortion into an abnormality. Black swan is the most strongly related to this guy, but I might make one for it later.
monolith_abnormality = /mob/living/simple_animal/hostile/abnormality/silence //Both hate their time being wasted and that there is a price to it, even if this thing cannot fight back.
egoist_attributes = 100

var/unmanifesting
var/can_act = TRUE
var/current_stage = 1 //changes behaviour slightly on phase 2
var/counter_threshold = 300
var/stage_threshold = 3000 // enters stage 2 at or below this threshold
var/finishing = FALSE
var/countering = FALSE //are we //Are you?
var/counter_speed = 2 //subtracted from the movedelay when dashing
var/counter_ready = FALSE
var/damage_taken
var/damage_up = 5
var/nightmare_mode = FALSE
var/frozen_time = 600
var/no_dehead = 0

loot = list(/obj/item/documents/ncorporation, /obj/item/documents/ncorporation)

/mob/living/simple_animal/hostile/distortion/Timeripper/proc/DashCounter() //increases move speed and hits with a powerful attack that knocks back far away
playsound(get_turf(src), 'sound/effects/hokma_meltdown.ogg', 75, 0, 3)
switch(current_stage)
if(1)
icon_state = "Ripper"
if(2)
icon_state = "Ripper2"
countering = TRUE
counter_ready = FALSE
//Speed becomes 4 or 2 and returns to 6 or 4 after 4 seconds.
TemporarySpeedChange(-counter_speed, 4 SECONDS)
visible_message(span_warning("[src] sprints toward [target] with accelerated speed!"), span_notice("You accelerate self!"), span_notice("You hear footsteps speed up."))
addtimer(CALLBACK(src, PROC_REF(DisableCounter)), 4 SECONDS) //disables the counter after 4 seconds

/mob/living/simple_animal/hostile/distortion/Timeripper/proc/DisableCounter() //resets the counter
if(countering)
countering = FALSE
playsound(get_turf(src), 'sound/effects/hokma_meltdown.ogg', 75, 0, 3)
SLEEP_CHECK_DEATH(10)
icon_state = icon_living

/mob/living/simple_animal/hostile/distortion/Timeripper/OpenFire(target)
if(!can_act)
return

if(counter_ready)
switch(current_stage)
if(1)
return DashCounter()
if(2)
if(prob(80))
if(isliving(target))
return Timestop(target)
return DashCounter()
return


Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Don't need a return at the end of code

Suggested change
return

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The return has been removed.


//Phase 2
/mob/living/simple_animal/hostile/distortion/Timeripper/proc/StageTransition()
icon = 'ModularTegustation/Teguicons/64x64.dmi'
icon_living = "Ripper2"
pixel_x = -16
if(!countering && can_act)
icon_state = icon_living
current_stage = 2
counter_threshold = 300
playsound(get_turf(src), 'sound/effects/clockcult_gateway_disrupted.ogg', 75, 0, 3)

/mob/living/simple_animal/hostile/distortion/Timeripper/adjustHealth(amount, updating_health = TRUE, forced = FALSE)
. = ..()
if(. > 0)
damage_taken += .
if(damage_taken >= counter_threshold && !counter_ready && !countering)
counter_ready = TRUE
damage_taken = 0
if((health <= stage_threshold) && (current_stage == 1))
StageTransition()



/mob/living/simple_animal/hostile/distortion/Timeripper/AttackingTarget(atom/attacked_target)
. = ..()
if(.)
if(finishing)
return FALSE
if(!istype(attacked_target, /mob/living/carbon/human))
return
var/mob/living/carbon/human/H = attacked_target

if(H.health < 0)

finishing = TRUE
switch(current_stage)
if(1)
icon = 'ModularTegustation/Teguicons/64x64.dmi'
icon_state = "Ripper2"
if(2)
icon_state = "Ripper2"
Comment on lines +127 to +132
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This could be compressed a lot, unless thats meant to be two unique sprites

Suggested change
switch(current_stage)
if(1)
icon = 'ModularTegustation/Teguicons/64x64.dmi'
icon_state = "Ripper2"
if(2)
icon_state = "Ripper2"
icon_state = "Ripper2"
if(current_stage == 1)
icon = 'ModularTegustation/Teguicons/64x64.dmi'

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Indeed they are, without that, his first phase blinks for a split second into invisibility, which looked awkward, so I added that. It was not quite necessary but it gave him more flavor instead of just punching corpse and tearing off its head.

playsound(get_turf(src), 'sound/hallucinations/wail.ogg', 50, 1)
SLEEP_CHECK_DEATH(5)

//Steals your brain and time, dusting your body, borrowed from Warden.
if(no_dehead)
H.gib()
melee_damage_lower += damage_up
melee_damage_upper += damage_up
finishing = FALSE
switch(current_stage)
if(1)
icon_state = "Ripper"
icon = 'ModularTegustation/Teguicons/32x64.dmi'
if(2)
icon_state = "Ripper2"
else
var/obj/item/bodypart/head/head = H.get_bodypart("head")
if(QDELETED(head))
return
head.dismember()
QDEL_NULL(head)
H.regenerate_icons()
visible_message(span_danger("\The [src] takes [H]'s head off to add a brain to collection!"))
new /obj/effect/gibspawner/generic/silent(get_turf(H))
melee_damage_lower += damage_up
melee_damage_upper += damage_up
finishing = FALSE
switch(current_stage)
if(1)
icon_state = "Ripper"
icon = 'ModularTegustation/Teguicons/32x64.dmi'
if(2)
icon_state = "Ripper2"

/mob/living/simple_animal/hostile/distortion/Timeripper/proc/Timestop()
say("Your time is mine.")
can_act = FALSE
SLEEP_CHECK_DEATH(12)
new /obj/effect/timestop(get_turf(src), 4, 40, list(src))
can_act = TRUE


/mob/living/simple_animal/hostile/distortion/Timeripper/Life()
. = ..()
//Passive regen.
if(health <= maxHealth*1 && stat != DEAD)
adjustBruteLoss(-2)
if(!target)
adjustBruteLoss(-6)


/mob/living/simple_animal/hostile/distortion/Timeripper/AttackingTarget(atom/attacked_target) //His blades are pretty fucked up but this is better than freezing you in time each melee hit.
if(finishing)
return
. = ..()
if(.)
if(!istype(attacked_target, /mob/living/carbon/human))
return
var/mob/living/carbon/human/H = attacked_target
if(nightmare_mode)
new /obj/effect/timestop(get_turf(src), 1, 17.9, list(src))
addtimer(CALLBACK (H, TYPE_PROC_REF(/mob/living, Stun), frozen_time SECONDS), 0 SECONDS)
to_chat(H, span_warning("You cannot move, it is as if you are frozen in time despite not being frozen anymore..."))
H.add_movespeed_modifier(/datum/movespeed_modifier/grab_slowdown/aggressive)
addtimer(CALLBACK(H, TYPE_PROC_REF(/mob, remove_movespeed_modifier), /datum/movespeed_modifier/grab_slowdown/aggressive), 4 SECONDS, TIMER_UNIQUE | TIMER_OVERRIDE)
else
H.add_movespeed_modifier(/datum/movespeed_modifier/grab_slowdown/aggressive)
addtimer(CALLBACK(H, TYPE_PROC_REF(/mob, remove_movespeed_modifier), /datum/movespeed_modifier/grab_slowdown/aggressive), 4 SECONDS, TIMER_UNIQUE | TIMER_OVERRIDE)