From 0b8f311e65ef22da2f0e10a68c9118b2e154de24 Mon Sep 17 00:00:00 2001 From: zerothebigboy Date: Sat, 3 Oct 2020 03:47:27 -0400 Subject: [PATCH] a --- .../living/simple_animal/guardian/guardian.dm | 23 ++++-- .../simple_animal/guardian/types/assassin.dm | 2 + .../simple_animal/guardian/types/charger.dm | 3 + .../simple_animal/guardian/types/explosive.dm | 2 + .../guardian/types/gravitokinetic.dm | 73 +++++++++++++++++++ .../simple_animal/guardian/types/protector.dm | 9 ++- .../simple_animal/guardian/types/support.dm | 10 ++- tgstation.dme | 1 + 8 files changed, 109 insertions(+), 14 deletions(-) create mode 100644 code/modules/mob/living/simple_animal/guardian/types/gravitokinetic.dm diff --git a/code/modules/mob/living/simple_animal/guardian/guardian.dm b/code/modules/mob/living/simple_animal/guardian/guardian.dm index 954e968bd7..ae045dbd26 100644 --- a/code/modules/mob/living/simple_animal/guardian/guardian.dm +++ b/code/modules/mob/living/simple_animal/guardian/guardian.dm @@ -22,7 +22,7 @@ GLOBAL_LIST_EMPTY(parasites) //all currently existing/living guardians icon_state = "magicbase" icon_living = "magicbase" icon_dead = "magicbase" - speed = 0 + speed = -0.5 blood_volume = 0 a_intent = INTENT_HARM stop_automated_movement = 1 @@ -511,7 +511,7 @@ GLOBAL_LIST_EMPTY(parasites) //all currently existing/living guardians var/used_message = "All the cards seem to be blank now." var/failure_message = "..And draw a card! It's...blank? Maybe you should try again later." var/ling_failure = "The deck refuses to respond to a souless creature such as you." - var/list/possible_guardians = list("Assassin", "Chaos", "Charger", "Explosive", "Lightning", "Protector", "Ranged", "Standard", "Support") + var/list/possible_guardians = list("Assassin", "Chaos", "Gravitokinetic", "Charger", "Explosive", "Lightning", "Protector", "Ranged", "Standard", "Support") var/random = TRUE var/allowmultiple = FALSE var/allowling = TRUE @@ -559,6 +559,9 @@ GLOBAL_LIST_EMPTY(parasites) //all currently existing/living guardians if("Chaos") pickedtype = /mob/living/simple_animal/hostile/guardian/fire + if("Gravitokinetic") + pickedtype = /mob/living/simple_animal/hostile/guardian/gravitokinetic + if("Standard") pickedtype = /mob/living/simple_animal/hostile/guardian/punch @@ -615,10 +618,10 @@ GLOBAL_LIST_EMPTY(parasites) //all currently existing/living guardians random = FALSE /obj/item/guardiancreator/choose/dextrous - possible_guardians = list("Assassin", "Chaos", "Charger", "Dextrous", "Explosive", "Lightning", "Protector", "Ranged", "Standard", "Support") + possible_guardians = list("Assassin", "Chaos", "Gravitokinetic", "Charger", "Dextrous", "Explosive", "Lightning", "Protector", "Ranged", "Standard", "Support") /obj/item/guardiancreator/choose/wizard - possible_guardians = list("Assassin", "Chaos", "Charger", "Dextrous", "Explosive", "Lightning", "Protector", "Ranged", "Standard") + possible_guardians = list("Assassin", "Chaos", "Gravitokinetic", "Charger", "Dextrous", "Explosive", "Lightning", "Protector", "Ranged", "Standard") allowmultiple = TRUE /obj/item/guardiancreator/tech @@ -634,7 +637,7 @@ GLOBAL_LIST_EMPTY(parasites) //all currently existing/living guardians ling_failure = "The holoparasites recoil in horror. They want nothing to do with a creature like you." /obj/item/guardiancreator/tech/choose/traitor - possible_guardians = list("Assassin", "Chaos", "Charger", "Explosive", "Lightning", "Protector", "Ranged", "Standard", "Support") + possible_guardians = list("Assassin", "Chaos", "Gravitokinetic", "Charger", "Explosive", "Lightning", "Protector", "Ranged", "Standard", "Support") allowling = FALSE /obj/item/guardiancreator/tech/choose/traitor/check_uplink_validity() @@ -644,10 +647,10 @@ GLOBAL_LIST_EMPTY(parasites) //all currently existing/living guardians random = FALSE /obj/item/guardiancreator/tech/choose/dextrous - possible_guardians = list("Assassin", "Chaos", "Charger", "Dextrous", "Explosive", "Lightning", "Protector", "Ranged", "Standard", "Support") + possible_guardians = list("Assassin", "Chaos", "Gravitokinetic", "Charger", "Dextrous", "Explosive", "Lightning", "Protector", "Ranged", "Standard", "Support") /obj/item/guardiancreator/tech/choose/nukie // lacks support and protector as encouraging nukies to play turtle isnt fun and dextrous is epic - possible_guardians = list("Assassin", "Chaos", "Charger", "Dextrous", "Explosive", "Lightning", "Ranged", "Standard") + possible_guardians = list("Assassin", "Chaos", "Gravitokinetic", "Charger", "Dextrous", "Explosive", "Lightning", "Ranged", "Standard") /obj/item/guardiancreator/tech/choose/nukie/check_uplink_validity() return !used @@ -666,6 +669,8 @@ GLOBAL_LIST_EMPTY(parasites) //all currently existing/living guardians
Explosive: High damage resist and medium power attack that may explosively teleport targets. Can turn any object, including objects too large to pick up, into a bomb, dealing explosive damage to the next person to touch it. The object will return to normal after the trap is triggered or after a delay.

+ Gravitokinetic: Attacks will apply crushing gravity to the target. Can target the ground as well to slow targets advancing on you, but this will affect the user.
+
Lightning: Attacks apply lightning chains to targets. Has a lightning chain to the user. Lightning chains shock everything near them, doing constant damage.

Protector: Causes you to teleport to it when out of range, unlike other parasites. Has two modes; Combat, where it does and takes medium damage, and Protection, where it does and takes almost no damage but moves slightly slower.
@@ -695,6 +700,8 @@ GLOBAL_LIST_EMPTY(parasites) //all currently existing/living guardians
Explosive: High damage resist and medium power attack that may explosively teleport targets. Can turn any object, including objects too large to pick up, into a bomb, dealing explosive damage to the next person to touch it. The object will return to normal after the trap is triggered or after a delay.

+ Gravitokinetic: Attacks will apply crushing gravity to the target. Can target the ground as well to slow targets advancing on you, but this will affect the user.
+
Lightning: Attacks apply lightning chains to targets. Has a lightning chain to the user. Lightning chains shock everything near them, doing constant damage.

Protector: Causes you to teleport to it when out of range, unlike other parasites. Has two modes; Combat, where it does and takes medium damage, and Protection, where it does and takes almost no damage but moves slightly slower.
@@ -720,6 +727,8 @@ GLOBAL_LIST_EMPTY(parasites) //all currently existing/living guardians
Explosive: High damage resist and medium power attack that may explosively teleport targets. Can turn any object, including objects too large to pick up, into a bomb, dealing explosive damage to the next person to touch it. The object will return to normal after the trap is triggered or after a delay.

+ Gravitokinetic: Attacks will apply crushing gravity to the target. Can target the ground as well to slow targets advancing on you, but this will affect the user.
+
Lightning: Attacks apply lightning chains to targets. Has a lightning chain to the user. Lightning chains shock everything near them, doing constant damage.

Ranged: Has two modes. Ranged; which fires a constant stream of weak, armor-ignoring projectiles. Scout; Cannot attack, but can move through walls and is quite hard to see. Can lay surveillance snares, which alert it when crossed, in either mode.
diff --git a/code/modules/mob/living/simple_animal/guardian/types/assassin.dm b/code/modules/mob/living/simple_animal/guardian/types/assassin.dm index 3bc079f6d5..b5bb91d34f 100644 --- a/code/modules/mob/living/simple_animal/guardian/types/assassin.dm +++ b/code/modules/mob/living/simple_animal/guardian/types/assassin.dm @@ -1,5 +1,7 @@ //Assassin /mob/living/simple_animal/hostile/guardian/assassin + melee_damage_lower = 15 + melee_damage_upper = 15 attack_verb_continuous = "slashes" attack_verb_simple = "slash" attack_sound = 'sound/weapons/bladeslice.ogg' diff --git a/code/modules/mob/living/simple_animal/guardian/types/charger.dm b/code/modules/mob/living/simple_animal/guardian/types/charger.dm index 0b4952aa9e..9060350df4 100644 --- a/code/modules/mob/living/simple_animal/guardian/types/charger.dm +++ b/code/modules/mob/living/simple_animal/guardian/types/charger.dm @@ -1,8 +1,11 @@ //Charger /mob/living/simple_animal/hostile/guardian/charger + melee_damage_lower = 15 + melee_damage_upper = 15 ranged = 1 //technically ranged_message = "charges" ranged_cooldown_time = 20 + speed = -1 damage_coeff = list(BRUTE = 0.2, BURN = 0.5, TOX = 0.5, CLONE = 0.5, STAMINA = 0, OXY = 0.5) playstyle_string = "As a charger type you do medium damage, take half damage, have near immunity to brute damage, move very fast, and can charge at a location, damaging any target hit and forcing them to drop any items they are holding." magic_fluff_string = "..And draw the Hunter, an alien master of rapid assault." diff --git a/code/modules/mob/living/simple_animal/guardian/types/explosive.dm b/code/modules/mob/living/simple_animal/guardian/types/explosive.dm index b9037ff4a4..39a7bfaebd 100644 --- a/code/modules/mob/living/simple_animal/guardian/types/explosive.dm +++ b/code/modules/mob/living/simple_animal/guardian/types/explosive.dm @@ -1,5 +1,7 @@ //Bomb /mob/living/simple_animal/hostile/guardian/bomb + melee_damage_lower = 15 + melee_damage_upper = 15 damage_coeff = list(BRUTE = 0.6, BURN = 0.6, TOX = 0.6, CLONE = 0.6, STAMINA = 0, OXY = 0.6) playstyle_string = "As an explosive type, you have moderate close combat abilities, take half damage, may explosively teleport targets on attack, and are capable of converting nearby items and objects into disguised bombs via alt click." magic_fluff_string = "..And draw the Scientist, master of explosive death." diff --git a/code/modules/mob/living/simple_animal/guardian/types/gravitokinetic.dm b/code/modules/mob/living/simple_animal/guardian/types/gravitokinetic.dm new file mode 100644 index 0000000000..34948d3e0c --- /dev/null +++ b/code/modules/mob/living/simple_animal/guardian/types/gravitokinetic.dm @@ -0,0 +1,73 @@ +//gravitokinetic +/mob/living/simple_animal/hostile/guardian/gravitokinetic + melee_damage_lower = 15 + melee_damage_upper = 15 + damage_coeff = list(BRUTE = 0.75, BURN = 0.75, TOX = 0.75, CLONE = 0.75, STAMINA = 0, OXY = 0.75) + playstyle_string = "As a gravitokinetic type, you can alt click to make the gravity on the ground stronger, and punching applies this effect to a target." + magic_fluff_string = "..And draw the Singularity, an anomalous force of terror." + tech_fluff_string = "Boot sequence complete. Gravitokinetic modules loaded. Holoparasite swarm online." + carp_fluff_string = "CARP CARP CARP! Caught one! It's a gravitokinetic carp! Now do you understand the gravity of the situation?" + var/list/gravito_targets = list() + var/gravity_power_range = 10 //how close the stand must stay to the target to keep the heavy gravity + +///Removes gravity from affected mobs upon guardian death to prevent permanent effects +/mob/living/simple_animal/hostile/guardian/gravitokinetic/death() + . = ..() + for(var/i in gravito_targets) + remove_gravity(i) + +/mob/living/simple_animal/hostile/guardian/gravitokinetic/AttackingTarget() + . = ..() + if(isliving(target) && target != src && target != summoner) + to_chat(src, "Your punch has applied heavy gravity to [target]!") + add_gravity(target, 5) + to_chat(target, "Everything feels really heavy!") + +/mob/living/simple_animal/hostile/guardian/gravitokinetic/AltClickOn(atom/A) + if(isopenturf(A) && is_deployed() && stat != DEAD && in_range(src, A) && !incapacitated()) + var/turf/T = A + if(isspaceturf(T)) + to_chat(src, "You cannot add gravity to space!") + return + visible_message("[src] slams their fist into the [T]!", "You modify the gravity of the [T].") + do_attack_animation(T) + add_gravity(T, 3) + return + return ..() + +/mob/living/simple_animal/hostile/guardian/gravitokinetic/Recall(forced) + . = ..() + to_chat(src, "You have released your gravitokinetic powers!") + for(var/i in gravito_targets) + remove_gravity(i) + +/mob/living/simple_animal/hostile/guardian/gravitokinetic/Manifest(forced) + . = ..() + //just make sure to reapply a gravity immunity wherever you summon. it can be overridden but not by you at least + summoner.AddElement(/datum/element/forced_gravity, 1) + AddElement(/datum/element/forced_gravity, 1) + +/mob/living/simple_animal/hostile/guardian/gravitokinetic/Moved(oldLoc, dir) + . = ..() + for(var/i in gravito_targets) + if(get_dist(src, i) > gravity_power_range) + remove_gravity(i) + +/mob/living/simple_animal/hostile/guardian/gravitokinetic/proc/add_gravity(atom/A, new_gravity = 3) + if(gravito_targets[A]) + return + A.AddElement(/datum/element/forced_gravity, new_gravity) + gravito_targets[A] = new_gravity + RegisterSignal(A, COMSIG_MOVABLE_MOVED, .proc/__distance_check) + playsound(src, 'sound/effects/gravhit.ogg', 100, TRUE) + +/mob/living/simple_animal/hostile/guardian/gravitokinetic/proc/remove_gravity(atom/target) + if(isnull(gravito_targets[target])) + return + UnregisterSignal(target, COMSIG_MOVABLE_MOVED) + target.RemoveElement(/datum/element/forced_gravity, gravito_targets[target]) + gravito_targets -= target + +/mob/living/simple_animal/hostile/guardian/gravitokinetic/proc/__distance_check(atom/movable/AM, OldLoc, Dir, Forced) + if(get_dist(src, AM) > gravity_power_range) + remove_gravity(AM) \ No newline at end of file diff --git a/code/modules/mob/living/simple_animal/guardian/types/protector.dm b/code/modules/mob/living/simple_animal/guardian/types/protector.dm index cf6bd3cdb5..99272a6d3f 100644 --- a/code/modules/mob/living/simple_animal/guardian/types/protector.dm +++ b/code/modules/mob/living/simple_animal/guardian/types/protector.dm @@ -1,5 +1,7 @@ //Protector /mob/living/simple_animal/hostile/guardian/protector + melee_damage_lower = 15 + melee_damage_upper = 15 range = 15 //worse for it due to how it leashes damage_coeff = list(BRUTE = 0.4, BURN = 0.4, TOX = 0.4, CLONE = 0.4, STAMINA = 0, OXY = 0.4) playstyle_string = "As a protector type you cause your summoner to leash to you instead of you leashing to them and have two modes; Combat Mode, where you do and take medium damage, and Protection Mode, where you do and take almost no damage, but move slightly slower." @@ -31,9 +33,10 @@ cooldown = world.time + 10 if(toggle) cut_overlays() - melee_damage_lower = 15 - melee_damage_upper = 15 - speed = 0 + add_overlay(cooloverlay) //readd the guardian's colors + melee_damage_lower = initial(melee_damage_lower) + melee_damage_upper = initial(melee_damage_upper) + speed = initial(speed) damage_coeff = list(BRUTE = 0.4, BURN = 0.4, TOX = 0.4, CLONE = 0.4, STAMINA = 0, OXY = 0.4) to_chat(src, "You switch to combat mode.") toggle = FALSE diff --git a/code/modules/mob/living/simple_animal/guardian/types/support.dm b/code/modules/mob/living/simple_animal/guardian/types/support.dm index eee3eb0cdb..b51552acd2 100644 --- a/code/modules/mob/living/simple_animal/guardian/types/support.dm +++ b/code/modules/mob/living/simple_animal/guardian/types/support.dm @@ -4,6 +4,8 @@ friendly_verb_continuous = "heals" friendly_verb_simple = "heal" damage_coeff = list(BRUTE = 0.7, BURN = 0.7, TOX = 0.7, CLONE = 0.7, STAMINA = 0, OXY = 0.7) + melee_damage_lower = 15 + melee_damage_upper = 15 playstyle_string = "As a support type, you have 30% damage reduction and may toggle your basic attacks to a healing mode. In addition, Alt-Clicking on an adjacent object or mob will warp them to your bluespace beacon after a short delay." magic_fluff_string = "..And draw the CMO, a potent force of life... and death." carp_fluff_string = "CARP CARP CARP! You caught a support carp. It's a kleptocarp!" @@ -43,15 +45,15 @@ if(src.loc == summoner) if(toggle) a_intent = INTENT_HARM - speed = 0 + speed = initial(speed) damage_coeff = list(BRUTE = 0.7, BURN = 0.7, TOX = 0.7, CLONE = 0.7, STAMINA = 0, OXY = 0.7) - melee_damage_lower = 15 - melee_damage_upper = 15 + melee_damage_lower = initial(melee_damage_lower) + melee_damage_upper = initial(melee_damage_upper) to_chat(src, "You switch to combat mode.") toggle = FALSE else a_intent = INTENT_HELP - speed = 1 + speed = initial(speed) damage_coeff = list(BRUTE = 1, BURN = 1, TOX = 1, CLONE = 1, STAMINA = 0, OXY = 1) melee_damage_lower = 0 melee_damage_upper = 0 diff --git a/tgstation.dme b/tgstation.dme index 23f262d7a5..3c9934252b 100644 --- a/tgstation.dme +++ b/tgstation.dme @@ -2677,6 +2677,7 @@ #include "code\modules\mob\living\simple_animal\guardian\types\dextrous.dm" #include "code\modules\mob\living\simple_animal\guardian\types\explosive.dm" #include "code\modules\mob\living\simple_animal\guardian\types\fire.dm" +#include "code\modules\mob\living\simple_animal\guardian\types\gravitokinetic.dm" #include "code\modules\mob\living\simple_animal\guardian\types\lightning.dm" #include "code\modules\mob\living\simple_animal\guardian\types\protector.dm" #include "code\modules\mob\living\simple_animal\guardian\types\ranged.dm"