diff --git a/ModularTegustation/tegu_items/rcorp/objective.dm b/ModularTegustation/tegu_items/rcorp/objective.dm index e87a0e7b31ba..e9b3dc6ab524 100644 --- a/ModularTegustation/tegu_items/rcorp/objective.dm +++ b/ModularTegustation/tegu_items/rcorp/objective.dm @@ -186,9 +186,103 @@ GLOBAL_VAR_INIT(rcorp_payload, null) icon = 'ModularTegustation/Teguicons/32x32.dmi' icon_state = "executive" icon_living = "executive" - health = 300 //Fragile so they protect you - maxHealth = 300 + health = 1000 //Fragile so they protect you + maxHealth = 1000 + damage_coeff = list(BRUTE = 1, RED_DAMAGE = 1, WHITE_DAMAGE = 1, BLACK_DAMAGE = 1, PALE_DAMAGE = 1) + var/max_protection = 0.9 + var/base_resistance = 1 + var/guarding_allies = 0 + var/final_resistance = 1 + var/total_ally_protection = 0 + var/per_ally_protection = 0.25 + var/view_check_time = 1 SECONDS + var/view_check + var/barrier_count + var/max_barrier_count = 6 + var/sniper + var/warning + var/danger = FALSE + var/sniper_time = 0.5 + var/warning_time = 0.25 + var/sniper_safe = 1 + + var/list/shrimp_abilities = list( + /obj/effect/proc_holder/spell/pointed/shrimp_airstrike, + /obj/effect/proc_holder/spell/pointed/shrimp_barricade, + /obj/effect/proc_holder/spell/pointed/shrimp_heal, + ) + +/mob/living/simple_animal/hostile/shrimp_vip/Initialize() + . = ..() + + for (var/A in shrimp_abilities) + if (ispath(A, /obj/effect/proc_holder/spell)) + var/obj/effect/proc_holder/spell/AS = new A(src) + AddSpell(AS) +/mob/living/simple_animal/hostile/shrimp_vip/Login() + . = ..() + to_chat(src, "

You are Shimp VIP, A Objective Role Abnormality.


\ + |Supportive Barrier|: For each ally you are able to see, you take 25% less damage. For a max of 90% less damage from all attacks.
\ +
\ + |Sniper Target|: There is an R-Corp Sniper who is aiming at you. As long as you are able to see 2 allies, they will not be able to fire at you.
\ +
\ + |Airstrike Call|: After you click on your 'Airstrike' ability, The next turf you click on will call in a Airstrike on that location.
\ + There is a 3 second delay before a missile hits the ground, and they deal 200 RED damage in a 5x5 AoE when they land. In total you will fire 5 missiles.
\ +
\ + |Barricade Call|: After you click on your 'Barricade' ability, The next turf you click on will call in a Barricade to that location.
\ + You are able to have 6 barricades up at once, but you can still send down the pod to block damage.
\ +
\ + |Healing Call|: After you click on your 'Healing' ability, The next target you click on will have a HP bullet fired at them.
\ + Your HP bullets are not able to target yourself, and you are able to miss them if you don't click on an ally.
") + +/mob/living/simple_animal/hostile/shrimp_vip/Life() + . = ..() + if(!.) // Dead + return FALSE + if((view_check < world.time) && !(status_flags & GODMODE) && (client)) + Protection() + +/mob/living/simple_animal/hostile/shrimp_vip/proc/Protection() + view_check = world.time + view_check_time + var/temp_guarding_allies = 0 + for(var/mob/living/simple_animal/hostile/A in livinginview(7, src)) + if(src != A && faction_check_mob(A, FALSE)) + temp_guarding_allies += 1 + if (temp_guarding_allies != guarding_allies) + guarding_allies = temp_guarding_allies + total_ally_protection = guarding_allies * per_ally_protection + if (total_ally_protection > max_protection) + total_ally_protection = max_protection + final_resistance = base_resistance - total_ally_protection + ChangeResistances(list(RED_DAMAGE = final_resistance, WHITE_DAMAGE = final_resistance, BLACK_DAMAGE = final_resistance, PALE_DAMAGE = final_resistance)) + if (guarding_allies <= sniper_safe) + if (!sniper) + sniper = addtimer(CALLBACK(src, PROC_REF(SniperShoot)), sniper_time MINUTES, TIMER_STOPPABLE) + if (!warning) + warning = addtimer(CALLBACK(src, PROC_REF(SniperWarning)), warning_time MINUTES, TIMER_STOPPABLE) + if (guarding_allies >= (sniper_safe + 1)) + if (sniper) + deltimer(sniper) + sniper = null + if (warning) + deltimer(warning) + warning = null + if (danger == TRUE) + to_chat(src, span_nicegreen("You start to feel safer... Looks like that sniper can't get a good shot on you.")) + danger = FALSE + +/mob/living/simple_animal/hostile/shrimp_vip/proc/SniperShoot() + to_chat(src, span_userdanger("You are hit by a sniper bullet from an unknown sniper...")) + deal_damage(300, RED_DAMAGE) + playsound_local(src, 'sound/weapons/gun/sniper/shot.ogg', 75) + sniper = null + +/mob/living/simple_animal/hostile/shrimp_vip/proc/SniperWarning() + to_chat(src, span_userdanger("You feel a shiver down your spine... Someone is aiming towards you, Get back to your allies to be safer!")) + playsound_local(src, 'sound/weapons/gun/sniper/rack.ogg', 75) + danger = TRUE + warning = null /mob/living/simple_animal/hostile/shrimp_vip/death(gibbed) for(var/mob/M in GLOB.player_list) @@ -197,6 +291,122 @@ GLOBAL_VAR_INIT(rcorp_payload, null) SSticker.force_ending = 1 ..() +/obj/effect/proc_holder/spell/pointed/shrimp_airstrike + name = "Airstrike Call" + desc = "Call in your off field support to send in a airstrike on your foes!" + panel = "Shrimp" + has_action = TRUE + action_icon = 'icons/mob/actions/actions_shrimp.dmi' + action_icon_state = "airstrike" + clothes_req = FALSE + charge_max = 600 + selection_type = "range" + active_msg = "You prepare your airstrike call..." + deactive_msg = "You put away your airstrike call..." + +/obj/structure/closet/supplypod/shrimpmissle + style = STYLE_RED_MISSILE + effectMissile = TRUE + explosionSize = list(0,0,0,0) + +/obj/effect/proc_holder/spell/pointed/shrimp_airstrike/cast(list/targets, mob/user) + var/target = targets[1] + user.visible_message(span_danger("[user] called an airstrike."), span_alert("You targeted [target]")) + addtimer(CALLBACK(src, PROC_REF(Airstrike), target), 1) + +/obj/effect/proc_holder/spell/pointed/shrimp_airstrike/proc/Airstrike(target) + var/turf/T = get_turf(target) + for (var/i in 1 to 5) + var/obj/structure/closet/supplypod/shrimpmissle/pod = new() + var/landingzone = locate(T.x + rand(-1,1), T.y + rand(-1,1), T.z) + if (landingzone) + new /obj/effect/pod_landingzone(landingzone, pod) + else + new /obj/effect/pod_landingzone(T, pod) + var/mob/dummy = new(landingzone) + dummy.faction = list("hostile") + dummy.visible_message("A MISSILE IS FALLING NEAR YOUR LOCATION!") + sleep(34) + for(var/turf/AT in range(2, landingzone)) + new /obj/effect/temp_visual/smash_effect(AT) + dummy.HurtInTurf(AT, list(), (200), RED_DAMAGE, check_faction = TRUE, hurt_mechs = TRUE) + playsound(dummy, 'sound/effects/explosion2.ogg', 50, TRUE) + qdel(dummy) + sleep(rand()*2) + +/obj/effect/proc_holder/spell/pointed/shrimp_barricade + name = "Barricade Call" + desc = "Call in your off field support to send in a barricade!" + panel = "Shrimp" + has_action = TRUE + action_icon = 'icons/mob/actions/actions_shrimp.dmi' + action_icon_state = "barricade" + clothes_req = FALSE + charge_max = 100 + selection_type = "range" + active_msg = "You prepare your barricade call ..." + deactive_msg = "You put away your barricade call ..." + +/obj/effect/proc_holder/spell/pointed/shrimp_barricade/cast(list/targets, mob/user) + var/target = targets[1] + if (istype(target, /obj/structure/barricade/security)) + to_chat(user, span_warning("There is a barricade there already!")) + return + else + user.visible_message(span_danger("[user] calls in a barricade."), span_alert("You targeted [target]")) + addtimer(CALLBACK(src, PROC_REF(Airstrike), target, user), 1) + +/obj/effect/proc_holder/spell/pointed/shrimp_barricade/proc/Airstrike(target, user) + if(istype(user, /mob/living/simple_animal/hostile/shrimp_vip)) + var/mob/living/simple_animal/hostile/shrimp_vip/shrimp = user + var/turf/T = get_turf(target) + var/obj/structure/closet/supplypod/extractionpod/pod = new() + pod.explosionSize = list(0,0,0,0) + if (shrimp.barrier_count < shrimp.max_barrier_count) + var/obj/structure/barricade/security/shrimp/barrier = new /obj/structure/barricade/security/shrimp(pod) + barrier.shrimp = shrimp + shrimp.barrier_count += 1 + else + to_chat(shrimp, "You have created too many barriers, Break some!") + new /obj/effect/pod_landingzone(T, pod) + stoplag(2) + +/obj/structure/barricade/security/shrimp + var/mob/living/simple_animal/hostile/shrimp_vip/shrimp + +/obj/structure/barricade/security/shrimp/Destroy() + shrimp.barrier_count -= 1 + . = ..() + +/obj/effect/proc_holder/spell/pointed/shrimp_heal + name = "Shrimp Reinforce" + desc = "Reinforce one of your allies by having your off field support shot them with a HP bullet!" + panel = "Shrimp" + has_action = TRUE + action_icon = 'icons/hud/screen_skills.dmi' + action_icon_state = "healing" + clothes_req = FALSE + charge_max = 100 + selection_type = "range" + active_msg = "You prepare your heal call ..." + deactive_msg = "You put away your heal call ..." + var/healamount = 50 + +/obj/effect/proc_holder/spell/pointed/shrimp_heal/cast(list/targets, mob/user) + var/target = targets[1] + if (istype(target, /mob/living/simple_animal/hostile/shrimp_vip)) + to_chat(user, span_warning("You can't target yourself!")) + return + else + if (istype(target, /mob/living/simple_animal)) + var/mob/living/simple_animal/S = target + S.adjustBruteLoss(-healamount) + user.visible_message(span_danger("[user] calls in a HP bullet on [target]."), span_alert("You targeted [target]")) + playsound(get_turf(S), 'ModularTegustation/Tegusounds/weapons/guns/manager_bullet_fire.ogg', 10, 0, 3) + new /obj/effect/temp_visual/heal(get_turf(S), "#FF4444") + else + to_chat(user, span_warning("You can't target a non-simple animal!")) + //Arbiter /obj/effect/mob_spawn/human/arbiter/rcorp important_info = "You are hostile to R-Corp. Assist abnormalities in killing them all." diff --git a/icons/mob/actions/actions_shrimp.dmi b/icons/mob/actions/actions_shrimp.dmi new file mode 100644 index 000000000000..c71f39aef41f Binary files /dev/null and b/icons/mob/actions/actions_shrimp.dmi differ