Goliath code update

This commit is contained in:
Mark van Alphen
2019-06-02 05:03:38 +02:00
parent 8f26d19085
commit 4c40df0895
6 changed files with 89 additions and 38 deletions
@@ -77,7 +77,6 @@
stat_attack = 1
flying = TRUE
robust_searching = 1
var/fromtendril = FALSE
loot = list()
butcher_results = list(/obj/item/stack/ore/diamond = 2, /obj/item/stack/sheet/sinew = 2, /obj/item/stack/sheet/bone = 1)
@@ -56,7 +56,7 @@
var/tturf = get_turf(target)
if(get_dist(src, target) <= 7)//Screen range check, so you can't get tentacle'd offscreen
visible_message("<span class='warning'>The [src.name] digs its tentacles under [target.name]!</span>")
new /obj/effect/goliath_tentacle/original(tturf, src)
new /obj/effect/temp_visual/goliath_tentacle/original(tturf, src)
ranged_cooldown = world.time + ranged_cooldown_time
icon_state = icon_aggro
pre_attack = 0
@@ -74,44 +74,104 @@
icon_state = icon_aggro
return
/obj/effect/goliath_tentacle
name = "Goliath tentacle"
// Lavaland Goliath
/mob/living/simple_animal/hostile/asteroid/goliath/beast
name = "goliath"
desc = "A hulking, armor-plated beast with long tendrils arching from its back."
icon = 'icons/mob/lavaland/lavaland_monsters.dmi'
icon_state = "goliath"
icon_living = "goliath"
icon_aggro = "goliath"
icon_dead = "goliath_dead"
throw_message = "does nothing to the tough hide of the"
pre_attack_icon = "goliath2"
butcher_results = list(/obj/item/reagent_containers/food/snacks/goliath = 2, /obj/item/stack/sheet/animalhide/goliath_hide = 1, /obj/item/stack/sheet/bone = 2)
loot = list()
stat_attack = 1
robust_searching = 1
/mob/living/simple_animal/hostile/asteroid/goliath/beast/random/Initialize()
. = ..()
if(prob(1))
new /mob/living/simple_animal/hostile/asteroid/goliath/beast/ancient(loc)
return INITIALIZE_HINT_QDEL
/mob/living/simple_animal/hostile/asteroid/goliath/beast/ancient
name = "ancient goliath"
desc = "Goliaths are biologically immortal, and rare specimens have survived for centuries. This one is clearly ancient, and its tentacles constantly churn the earth around it."
icon_state = "Goliath"
icon_living = "Goliath"
icon_aggro = "Goliath_alert"
icon_dead = "Goliath_dead"
maxHealth = 400
health = 400
speed = 4
pre_attack_icon = "Goliath_preattack"
throw_message = "does nothing to the rocky hide of the"
loot = list(/obj/item/stack/sheet/animalhide/goliath_hide) //A throwback to the asteroid days
butcher_results = list(/obj/item/reagent_containers/food/snacks/goliath = 2, /obj/item/stack/sheet/bone = 2)
wander = FALSE
var/list/cached_tentacle_turfs
var/turf/last_location
var/tentacle_recheck_cooldown = 100
/mob/living/simple_animal/hostile/asteroid/goliath/beast/ancient/Life()
. = ..()
if(!.) // dead
return
if(isturf(loc))
if(!LAZYLEN(cached_tentacle_turfs) || loc != last_location || tentacle_recheck_cooldown <= world.time)
LAZYCLEARLIST(cached_tentacle_turfs)
last_location = loc
tentacle_recheck_cooldown = world.time + initial(tentacle_recheck_cooldown)
for(var/turf/simulated/floor/T in orange(4, loc))
LAZYADD(cached_tentacle_turfs, T)
for(var/t in cached_tentacle_turfs)
if(isfloorturf(t))
if(prob(10))
new /obj/effect/temp_visual/goliath_tentacle(t, src)
else
cached_tentacle_turfs -= t
/mob/living/simple_animal/hostile/asteroid/goliath/beast/tendril
fromtendril = TRUE
//tentacles
/obj/effect/temp_visual/goliath_tentacle
name = "goliath tentacle"
icon = 'icons/mob/lavaland/lavaland_monsters.dmi'
icon_state = "Goliath_tentacle_spawn"
layer = BELOW_MOB_LAYER
var/mob/living/spawner
var/timerid
/obj/effect/goliath_tentacle/New(var/loc, mob/living/new_spawner)
/obj/effect/temp_visual/goliath_tentacle/Initialize(mapload, mob/living/new_spawner)
. = ..()
for(var/obj/effect/goliath_tentacle/T in loc)
for(var/obj/effect/temp_visual/goliath_tentacle/T in loc)
if(T != src)
return INITIALIZE_HINT_QDEL
if(!QDELETED(new_spawner))
spawner = new_spawner
if(ismineralturf(loc))
var/turf/simulated/mineral/M = loc
M.gets_drilled()
deltimer(timerid)
timerid = addtimer(CALLBACK(src, .proc/tripanim), 7, TIMER_STOPPABLE)
/obj/effect/goliath_tentacle/original/New(var/loc, mob/living/new_spawner)
/obj/effect/temp_visual/goliath_tentacle/original/Initialize(mapload, new_spawner)
. = ..()
var/list/directions = cardinal.Copy()
for(var/i in 1 to 3)
var/spawndir = pick_n_take(directions)
var/turf/T = get_step(src, spawndir)
if(T)
new /obj/effect/goliath_tentacle(T, spawner)
new /obj/effect/temp_visual/goliath_tentacle(T, spawner)
/obj/effect/goliath_tentacle/proc/tripanim()
/obj/effect/temp_visual/goliath_tentacle/proc/tripanim()
icon_state = "Goliath_tentacle_wiggle"
deltimer(timerid)
timerid = addtimer(CALLBACK(src, .proc/trip), 3, TIMER_STOPPABLE)
/obj/effect/goliath_tentacle/proc/trip()
/obj/effect/temp_visual/goliath_tentacle/proc/trip()
var/latched = FALSE
for(var/mob/living/L in loc)
if((!QDELETED(spawner) && spawner.faction_check_mob(L)) || L.stat == DEAD)
@@ -126,22 +186,7 @@
deltimer(timerid)
timerid = addtimer(CALLBACK(src, .proc/retract), 10, TIMER_STOPPABLE)
/obj/effect/goliath_tentacle/proc/retract()
/obj/effect/temp_visual/goliath_tentacle/proc/retract()
icon_state = "Goliath_tentacle_retract"
deltimer(timerid)
timerid = QDEL_IN(src, 7)
/mob/living/simple_animal/hostile/asteroid/goliath/beast
name = "goliath"
desc = "A hulking, armor-plated beast with long tendrils arching from its back."
icon = 'icons/mob/lavaland/lavaland_monsters.dmi'
icon_state = "goliath"
icon_living = "goliath"
icon_aggro = "goliath"
icon_dead = "goliath_dead"
throw_message = "does nothing to the tough hide of the"
pre_attack_icon = "goliath2"
butcher_results = list(/obj/item/reagent_containers/food/snacks/goliath = 2, /obj/item/stack/sheet/animalhide/goliath_hide = 1, /obj/item/stack/sheet/bone = 2)
loot = list()
stat_attack = 1
robust_searching = 1
timerid = QDEL_IN(src, 5)
@@ -236,7 +236,6 @@
del_on_death = 1
stat_attack = 1
robust_searching = 1
var/fromtendril = FALSE
var/dwarf_mob = FALSE
var/mob/living/carbon/human/stored_mob
@@ -15,6 +15,7 @@
a_intent = INTENT_HARM
var/throw_message = "bounces off of"
var/icon_aggro = null // for swapping to when we get aggressive
var/fromtendril = FALSE
see_in_dark = 8
see_invisible = SEE_INVISIBLE_MINIMUM
mob_size = MOB_SIZE_LARGE
@@ -73,7 +73,7 @@
qdel(src)
/mob/living/simple_animal/hostile/spawner/lavaland/goliath
mob_type = /mob/living/simple_animal/hostile/asteroid/goliath/beast
mob_type = /mob/living/simple_animal/hostile/asteroid/goliath/beast/tendril
/mob/living/simple_animal/hostile/spawner/lavaland/legion
mob_type = /mob/living/simple_animal/hostile/asteroid/hivelord/legion/tendril