mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-07-22 05:25:15 +01:00
[MIRROR] mega arachnid basic monster [MDB IGNORE] (#23135)
* mega arachnid basic monster (#77601) ## About The Pull Request the mega arachnid is now a basic monster. he is a very tricky and opportunistic creature he will plan his attacks carefully and only attack the weak. he will first try to throw fleshy legcuffs at his victims, if the victim becomes cuffed he will move in to attack him, otherwise he will run away from him while trying to throw restraints at his legs. while he is running away he will also release slippery acid to slip his prey. also when he is looking for his prey, he will be transparent for more stealth. after he finds his prey the transparency will wear off. he is also a very stealthy creature, he will break any lights and cameras near him and he can also climb trees to hide in them while he is looking for a victim. ## Why It's Good For The Game add more combat depth for the mega arachnid ## Changelog 🆑 refactor: the mega arachnid is now a basic monster ,please report any bugs feature: the mega arachnid now have an ability to slip victims /🆑 * mega arachnid basic monster --------- Co-authored-by: Ben10Omintrix <138636438+Ben10Omintrix@users.noreply.github.com>
This commit is contained in:
@@ -0,0 +1,56 @@
|
||||
//Large and powerful, but timid. It won't engage anything above 50 health, or anything without legcuffs.
|
||||
//It can fire fleshy snares that legcuff anyone that it hits, making them look especially tasty to the arachnid.
|
||||
/mob/living/basic/mega_arachnid
|
||||
name = "mega arachnid"
|
||||
desc = "Though physically imposing, it prefers to ambush its prey, and it will only engage with an already crippled opponent."
|
||||
icon = 'icons/mob/simple/jungle/arachnid.dmi'
|
||||
icon_state = "arachnid"
|
||||
icon_living = "arachnid"
|
||||
icon_dead = "arachnid_dead"
|
||||
mob_biotypes = MOB_ORGANIC|MOB_BUG
|
||||
melee_damage_lower = 30
|
||||
melee_damage_upper = 30
|
||||
maxHealth = 300
|
||||
health = 300
|
||||
|
||||
pixel_x = -16
|
||||
base_pixel_x = -16
|
||||
|
||||
habitable_atmos = list("min_oxy" = 0, "max_oxy" = 0, "min_plas" = 0, "max_plas" = 0, "min_co2" = 0, "max_co2" = 0, "min_n2" = 0, "max_n2" = 0)
|
||||
faction = list(FACTION_JUNGLE)
|
||||
obj_damage = 30
|
||||
environment_smash = ENVIRONMENT_SMASH_WALLS
|
||||
minimum_survivable_temperature = T0C
|
||||
maximum_survivable_temperature = T0C + 450
|
||||
status_flags = NONE
|
||||
lighting_cutoff_red = 5
|
||||
lighting_cutoff_green = 20
|
||||
lighting_cutoff_blue = 25
|
||||
mob_size = MOB_SIZE_LARGE
|
||||
|
||||
speak_emote = list("chitters")
|
||||
attack_sound = 'sound/weapons/bladeslice.ogg'
|
||||
attack_vis_effect = ATTACK_EFFECT_SLASH
|
||||
ai_controller = /datum/ai_controller/basic_controller/mega_arachnid
|
||||
alpha = 40
|
||||
|
||||
/mob/living/basic/mega_arachnid/Initialize(mapload)
|
||||
. = ..()
|
||||
var/datum/action/cooldown/spell/pointed/projectile/flesh_restraints/restrain = new(src)
|
||||
var/datum/action/small_sprite/mega_arachnid/mini_arachnid = new(src)
|
||||
var/datum/action/cooldown/mob_cooldown/secrete_acid/acid_spray = new(src)
|
||||
acid_spray.Grant(src)
|
||||
restrain.Grant(src)
|
||||
mini_arachnid.Grant(src)
|
||||
AddElement(/datum/element/swabable, CELL_LINE_TABLE_MEGA_ARACHNID, CELL_VIRUS_TABLE_GENERIC_MOB, 1, 5)
|
||||
AddComponent(/datum/component/appearance_on_aggro, alpha_on_aggro = 255, alpha_on_deaggro = alpha)
|
||||
AddComponent(/datum/component/tree_climber, climbing_distance = 15)
|
||||
ai_controller.set_blackboard_key(BB_ARACHNID_RESTRAIN, restrain)
|
||||
ai_controller.set_blackboard_key(BB_ARACHNID_SLIP, acid_spray)
|
||||
|
||||
/mob/living/basic/mega_arachnid/Login()
|
||||
. = ..()
|
||||
if(!. || !client)
|
||||
return FALSE
|
||||
|
||||
animate(src, alpha = 255, time = 2 SECONDS) //make them visible
|
||||
@@ -0,0 +1,80 @@
|
||||
|
||||
/datum/action/cooldown/spell/pointed/projectile/flesh_restraints
|
||||
name = "fleshy restraints"
|
||||
desc = "Launch at your prey to immobilize them."
|
||||
button_icon = 'icons/obj/restraints.dmi'
|
||||
button_icon_state = "flesh_snare"
|
||||
|
||||
cooldown_time = 6 SECONDS
|
||||
spell_requirements = NONE
|
||||
|
||||
active_msg = "You prepare to throw a restraint at your target!"
|
||||
cast_range = 8
|
||||
projectile_type = /obj/projectile/mega_arachnid
|
||||
|
||||
/obj/projectile/mega_arachnid
|
||||
name = "flesh snare"
|
||||
icon_state = "tentacle_end"
|
||||
damage = 0
|
||||
|
||||
/obj/projectile/mega_arachnid/on_hit(atom/target, blocked = FALSE)
|
||||
. = ..()
|
||||
if(!iscarbon(target) || blocked >= 100)
|
||||
return
|
||||
var/obj/item/restraints/legcuffs/beartrap/mega_arachnid/restraint = new(get_turf(target))
|
||||
restraint.spring_trap(null, target)
|
||||
|
||||
/obj/item/restraints/legcuffs/beartrap/mega_arachnid
|
||||
name = "fleshy restraints"
|
||||
desc = "Used by mega arachnids to immobilize their prey."
|
||||
flags_1 = NONE
|
||||
item_flags = DROPDEL
|
||||
icon_state = "flesh_snare"
|
||||
armed = TRUE
|
||||
|
||||
/obj/item/restraints/legcuffs/beartrap/mega_arachnid/Initialize(mapload)
|
||||
. = ..()
|
||||
AddElement(/datum/element/swabable, CELL_LINE_TABLE_MEGA_ARACHNID, CELL_VIRUS_TABLE_GENERIC_MOB, 1, 5)
|
||||
|
||||
|
||||
/datum/action/cooldown/mob_cooldown/secrete_acid
|
||||
name = "Secrete Acid"
|
||||
button_icon = 'icons/effects/acid.dmi'
|
||||
button_icon_state = "default"
|
||||
desc = "Secrete a slippery acid!"
|
||||
cooldown_time = 15 SECONDS
|
||||
melee_cooldown_time = 0 SECONDS
|
||||
click_to_activate = FALSE
|
||||
|
||||
/datum/action/cooldown/mob_cooldown/secrete_acid/Activate(atom/target_atom)
|
||||
RegisterSignal(owner, COMSIG_MOVABLE_MOVED, PROC_REF(release_acid))
|
||||
addtimer(CALLBACK(src, PROC_REF(deactivate_ability)), 3 SECONDS)
|
||||
StartCooldown()
|
||||
return TRUE
|
||||
|
||||
/datum/action/cooldown/mob_cooldown/secrete_acid/proc/release_acid()
|
||||
SIGNAL_HANDLER
|
||||
|
||||
var/turf/current_turf = owner.loc
|
||||
if(locate(/obj/effect/slippery_acid) in current_turf.contents)
|
||||
return
|
||||
|
||||
new /obj/effect/slippery_acid(current_turf)
|
||||
|
||||
/datum/action/cooldown/mob_cooldown/secrete_acid/proc/deactivate_ability()
|
||||
UnregisterSignal(owner, COMSIG_MOVABLE_MOVED)
|
||||
|
||||
/obj/effect/slippery_acid
|
||||
name = "slippery acid"
|
||||
icon = 'icons/effects/acid.dmi'
|
||||
icon_state = "default"
|
||||
layer = BELOW_MOB_LAYER
|
||||
plane = GAME_PLANE
|
||||
anchored = TRUE
|
||||
/// how long does the acid exist for
|
||||
var/duration_time = 5 SECONDS
|
||||
|
||||
/obj/effect/slippery_acid/Initialize(mapload)
|
||||
. = ..()
|
||||
AddComponent(/datum/component/slippery, 6 SECONDS)
|
||||
QDEL_IN(src, duration_time)
|
||||
@@ -0,0 +1,79 @@
|
||||
/datum/ai_controller/basic_controller/mega_arachnid
|
||||
blackboard = list(
|
||||
BB_TARGETTING_DATUM = new /datum/targetting_datum/basic,
|
||||
BB_BASIC_MOB_FLEEING = TRUE,
|
||||
)
|
||||
|
||||
ai_movement = /datum/ai_movement/basic_avoidance
|
||||
idle_behavior = /datum/idle_behavior/idle_random_walk
|
||||
planning_subtrees = list(
|
||||
/datum/ai_planning_subtree/simple_find_target,
|
||||
/datum/ai_planning_subtree/targeted_mob_ability/arachnid_restrain,
|
||||
/datum/ai_planning_subtree/basic_melee_attack_subtree/mega_arachnid,
|
||||
/datum/ai_planning_subtree/flee_target/mega_arachnid,
|
||||
/datum/ai_planning_subtree/climb_trees,
|
||||
/datum/ai_planning_subtree/find_and_hunt_target/destroy_surveillance,
|
||||
)
|
||||
|
||||
///destroy surveillance objects to boost our stealth
|
||||
/datum/ai_planning_subtree/find_and_hunt_target/destroy_surveillance
|
||||
target_key = BB_SURVEILLANCE_TARGET
|
||||
finding_behavior = /datum/ai_behavior/find_hunt_target/find_active_surveillance
|
||||
hunting_behavior = /datum/ai_behavior/hunt_target/unarmed_attack_target
|
||||
hunt_targets = list(/obj/machinery/camera, /obj/machinery/light)
|
||||
hunt_range = 7
|
||||
|
||||
/datum/ai_behavior/find_hunt_target/find_active_surveillance
|
||||
|
||||
/datum/ai_behavior/find_hunt_target/find_active_camera/valid_dinner(mob/living/source, obj/machinery/dinner, radius)
|
||||
if(dinner.machine_stat & BROKEN)
|
||||
return FALSE
|
||||
|
||||
return can_see(source, dinner, radius)
|
||||
|
||||
///spray slippery acid as we flee!
|
||||
/datum/ai_planning_subtree/flee_target/mega_arachnid
|
||||
flee_behaviour = /datum/ai_behavior/run_away_from_target/mega_arachnid
|
||||
|
||||
/datum/ai_planning_subtree/flee_target/mega_arachnid/SelectBehaviors(datum/ai_controller/controller, seconds_per_tick)
|
||||
if(!controller.blackboard[BB_BASIC_MOB_FLEEING])
|
||||
return
|
||||
var/datum/action/cooldown/slip_acid = controller.blackboard[BB_ARACHNID_SLIP]
|
||||
|
||||
if(!QDELETED(slip_acid) && slip_acid.IsAvailable())
|
||||
controller.queue_behavior(/datum/ai_behavior/use_mob_ability, BB_ARACHNID_SLIP)
|
||||
|
||||
return ..()
|
||||
|
||||
/datum/ai_behavior/run_away_from_target/mega_arachnid
|
||||
clear_failed_targets = FALSE
|
||||
run_distance = 5
|
||||
|
||||
///only engage in melee combat against cuffed targets, otherwise keep throwing restraints at them
|
||||
/datum/ai_planning_subtree/basic_melee_attack_subtree/mega_arachnid
|
||||
///minimum health our target must be before we can attack them
|
||||
var/minimum_health = 50
|
||||
|
||||
/datum/ai_planning_subtree/basic_melee_attack_subtree/mega_arachnid/SelectBehaviors(datum/ai_controller/controller, seconds_per_tick)
|
||||
var/atom/target = controller.blackboard[BB_BASIC_MOB_CURRENT_TARGET]
|
||||
if(!ishuman(target))
|
||||
return ..()
|
||||
|
||||
var/mob/living/carbon/human_target = target
|
||||
if(!human_target.legcuffed && human_target.health > minimum_health)
|
||||
return
|
||||
|
||||
return ..()
|
||||
|
||||
/datum/ai_planning_subtree/targeted_mob_ability/arachnid_restrain
|
||||
ability_key = BB_ARACHNID_RESTRAIN
|
||||
|
||||
/// only fire ability at humans if they are not cuffed
|
||||
/datum/ai_planning_subtree/targeted_mob_ability/arachnid_restrain/SelectBehaviors(datum/ai_controller/controller, seconds_per_tick)
|
||||
var/mob/living/target = controller.blackboard[target_key]
|
||||
if(!ishuman(target))
|
||||
return
|
||||
var/mob/living/carbon/human_target = target
|
||||
if(human_target.legcuffed)
|
||||
return
|
||||
return ..()
|
||||
@@ -42,7 +42,7 @@
|
||||
. = ..()
|
||||
var/static/list/death_loot = list(/obj/effect/decal/cleanable/robot_debris)
|
||||
AddElement(/datum/element/death_drops, death_loot)
|
||||
AddElement(/datum/element/appearance_on_aggro, overlay_icon = icon, overlay_state = "[initial(icon_state)]_attack")
|
||||
AddComponent(/datum/component/appearance_on_aggro, overlay_icon = icon, overlay_state = "[initial(icon_state)]_attack")
|
||||
if(!ranged_attacker)
|
||||
return
|
||||
AddComponent(/datum/component/ranged_attacks, /obj/item/ammo_casing/hivebot, cooldown_time = ranged_attack_cooldown)
|
||||
|
||||
Reference in New Issue
Block a user