[MIRROR] Standardizes Adding Datum Actions into a proc/define (Bonus AI Support) (Bonus Useless Code Cleanup) [MDB IGNORE] (#24761)

* Standardizes Adding Datum Actions into a proc/define (Bonus AI Support) (Bonus Useless Code Cleanup)

* Update ooze.dm

* Modular audit - no more creating actions in nullspace

* Update drone.dm

---------

Co-authored-by: san7890 <the@san7890.com>
Co-authored-by: Giz <13398309+vinylspiders@users.noreply.github.com>
This commit is contained in:
SkyratBot
2023-11-03 02:42:48 -04:00
committed by GitHub
co-authored by san7890 Giz
parent c12301fbb8
commit 84ab3d7a3a
85 changed files with 385 additions and 514 deletions
+7
View File
@@ -41,3 +41,10 @@ DEFINE_BITFIELD(check_flags, list(
#define UPDATE_BUTTON_BACKGROUND (1<<2)
#define UPDATE_BUTTON_OVERLAY (1<<3)
#define UPDATE_BUTTON_STATUS (1<<4)
/// Takes in a typepath of a `/datum/action` and adds it to `src`.
/// Only useful if you want to add the action and never desire to reference it again ever.
#define GRANT_ACTION(typepath) do {\
var/datum/action/_ability = new typepath(src);\
_ability.Grant(src);\
} while (FALSE)
+6 -6
View File
@@ -83,8 +83,7 @@
var/mob/living/owner
var/bubble_icon = "default"
var/datum/action/innate/imaginary_join/join
var/datum/action/innate/imaginary_hide/hide
/mob/camera/imaginary_friend/Login()
. = ..()
@@ -105,10 +104,11 @@
*/
/mob/camera/imaginary_friend/Initialize(mapload)
. = ..()
join = new
join.Grant(src)
hide = new
hide.Grant(src)
var/static/list/grantable_actions = list(
/datum/action/innate/imaginary_join,
/datum/action/innate/imaginary_hide,
)
grant_actions_by_list(grantable_actions)
/// Links this imaginary friend to the provided mob
/mob/camera/imaginary_friend/proc/attach_to_owner(mob/living/imaginary_friend_owner)
+6 -14
View File
@@ -391,8 +391,7 @@
/mob/living/basic/clown/mutant/glutton/Initialize(mapload)
. = ..()
var/datum/action/cooldown/regurgitate/spit = new(src)
spit.Grant(src)
GRANT_ACTION(/datum/action/cooldown/regurgitate)
AddElement(/datum/element/swabable, CELL_LINE_TABLE_GLUTTON, CELL_VIRUS_TABLE_GENERIC_MOB, 1, 5)
AddComponent(/datum/component/tameable, food_types = list(/obj/item/food/cheesiehonkers, /obj/item/food/cornchips), tame_chance = 30, bonus_tame_chance = 0, after_tame = CALLBACK(src, PROC_REF(tamed)))
@@ -541,22 +540,15 @@
BB_EMOTE_SEE = list("bites into the banana", "plucks a banana off its head", "photosynthesizes"),
BB_EMOTE_SOUND = list('sound/items/bikehorn.ogg'),
)
///Our peel dropping ability
var/datum/action/cooldown/rustle/banana_rustle
///Our banana bunch spawning ability
var/datum/action/cooldown/exquisite_bunch/banana_bunch
/mob/living/basic/clown/banana/Initialize(mapload)
. = ..()
banana_rustle = new()
banana_rustle.Grant(src)
banana_bunch = new()
banana_bunch.Grant(src)
/mob/living/basic/clown/banana/Destroy()
. = ..()
QDEL_NULL(banana_rustle)
QDEL_NULL(banana_bunch)
var/static/list/innate_actions = list(
/datum/action/cooldown/exquisite_bunch,
/datum/action/cooldown/rustle,
)
grant_actions_by_list(innate_actions)
///drops peels around the mob when activated
/datum/action/cooldown/rustle
@@ -80,9 +80,7 @@
structure_types_typecache = structure_types,\
)
add_traits(list(TRAIT_HEALS_FROM_CULT_PYLONS, TRAIT_SPACEWALK), INNATE_TRAIT)
for(var/spell in construct_spells)
var/datum/action/new_spell = new spell(src)
new_spell.Grant(src)
grant_actions_by_list(construct_spells)
var/spell_count = 1
for(var/datum/action/spell as anything in actions)
@@ -15,11 +15,11 @@
attack_verb_simple = "ram"
attack_sound = 'sound/weapons/punch2.ogg'
construct_spells = list(
/datum/action/cooldown/spell/aoe/magic_missile/lesser,
/datum/action/cooldown/spell/conjure/construct/lesser,
/datum/action/cooldown/spell/conjure/cult_floor,
/datum/action/cooldown/spell/conjure/cult_wall,
/datum/action/cooldown/spell/conjure/soulstone,
/datum/action/cooldown/spell/conjure/construct/lesser,
/datum/action/cooldown/spell/aoe/magic_missile/lesser,
/datum/action/innate/cult/create_rune/revive,
)
playstyle_string = "<b>You are an Artificer. You are incredibly weak and fragile, \
@@ -19,8 +19,8 @@
mob_size = MOB_SIZE_LARGE
force_threshold = 10
construct_spells = list(
/datum/action/cooldown/spell/forcewall/cult,
/datum/action/cooldown/spell/basic_projectile/juggernaut,
/datum/action/cooldown/spell/forcewall/cult,
/datum/action/innate/cult/create_rune/wall,
)
playstyle_string = span_bold("You are a Juggernaut. Though slow, your shell can withstand heavy punishment, create shield walls, rip apart enemies and walls alike, and even deflect energy weapons.")
@@ -40,15 +40,14 @@
///how much charge we give off to cells around us when rubbed
var/recharge_value = 75
/mob/living/basic/festivus/Initialize(mapload)
. = ..()
AddComponent(/datum/component/seethrough_mob)
var/static/list/death_loot = list(/obj/item/stack/rods)
AddElement(/datum/element/death_drops, death_loot)
AddComponent(/datum/component/aggro_emote, emote_list = string_list(list("growls")), emote_chance = 20)
var/datum/action/cooldown/mob_cooldown/charge_apc/charge_ability = new(src)
charge_ability.Grant(src)
ai_controller.set_blackboard_key(BB_FESTIVE_APC, charge_ability)
grant_actions_by_list(list(/datum/action/cooldown/mob_cooldown/charge_apc = BB_FESTIVE_APC))
/datum/ai_controller/basic_controller/festivus_pole
blackboard = list(
@@ -20,6 +20,4 @@
/datum/action/cooldown/spell/jaunt/ethereal_jaunt/ash,
/datum/action/cooldown/spell/pointed/cleave,
)
for (var/action in actions_to_add)
var/datum/action/cooldown/new_action = new action(src)
new_action.Grant(src)
grant_actions_by_list(actions_to_add)
@@ -11,7 +11,7 @@
melee_damage_upper = 20
sight = SEE_MOBS
ai_controller = /datum/ai_controller/basic_controller/stalker
/// Associative list of action types we would like to have, and what blackboard key (if any) to put it in
/// Actions to grant on spawn
var/static/list/actions_to_add = list(
/datum/action/cooldown/spell/emp/eldritch = BB_GENERIC_ACTION,
/datum/action/cooldown/spell/jaunt/ethereal_jaunt/ash = null,
@@ -21,12 +21,7 @@
/mob/living/basic/heretic_summon/stalker/Initialize(mapload)
. = ..()
AddComponent(/datum/component/ai_target_timer)
for (var/action_type in actions_to_add)
var/datum/action/new_action = new action_type(src)
new_action.Grant(src)
var/blackboard_key = actions_to_add[action_type]
if (!isnull(blackboard_key))
ai_controller?.set_blackboard_key(blackboard_key, new_action)
grant_actions_by_list(actions_to_add)
/// Changes shape and lies in wait when it has no target, uses EMP and attacks once it does
/datum/ai_controller/basic_controller/stalker
@@ -32,8 +32,7 @@
/obj/item/shard,
)
AddElement(/datum/element/death_drops, loot)
var/datum/action/cooldown/spell/jaunt/mirror_walk/jaunt = new (src)
jaunt.Grant(src)
GRANT_ACTION(/datum/action/cooldown/spell/jaunt/mirror_walk)
/mob/living/basic/heretic_summon/maid_in_the_mirror/death(gibbed)
var/turf/death_turf = get_turf(src)
@@ -15,8 +15,12 @@
maxHealth = 65
health = 65
sight = SEE_MOBS|SEE_OBJS|SEE_TURFS
/// Some ability we use to make people go blind
var/blind_action_type = /datum/action/cooldown/spell/pointed/blind/eldritch
/// List of innate abilities we have to add.
var/static/list/innate_abilities = list(
/datum/action/cooldown/spell/jaunt/ethereal_jaunt/ash/long = null,
/datum/action/cooldown/spell/list_target/telepathy/eldritch = null,
/datum/action/innate/expand_sight = null,
)
/mob/living/basic/heretic_summon/raw_prophet/Initialize(mapload)
. = ..()
@@ -39,19 +43,13 @@
unlink_message = on_unlink_message, \
)
// We don't use these for AI so we can just repeat the same adding process
var/static/list/add_abilities = list(
/datum/action/cooldown/spell/jaunt/ethereal_jaunt/ash/long,
/datum/action/cooldown/spell/list_target/telepathy/eldritch,
/datum/action/innate/expand_sight,
)
for (var/ability_type in add_abilities)
var/datum/action/new_action = new ability_type(src)
new_action.Grant(src)
grant_actions_by_list(get_innate_abilities())
var/datum/action/cooldown/blind = new blind_action_type(src)
blind.Grant(src)
ai_controller?.set_blackboard_key(BB_TARGETTED_ACTION, blind)
/// Returns a list of abilities that we should add.
/mob/living/basic/heretic_summon/raw_prophet/proc/get_innate_abilities()
var/list/returnable_list = innate_abilities.Copy()
returnable_list += list(/datum/action/cooldown/spell/pointed/blind/eldritch = BB_TARGETTED_ACTION)
return returnable_list
/*
* Callback for the mind_linker component.
@@ -78,7 +76,11 @@
/// NPC variant with a less bullshit ability
/mob/living/basic/heretic_summon/raw_prophet/ruins
ai_controller = /datum/ai_controller/basic_controller/raw_prophet
blind_action_type = /datum/action/cooldown/mob_cooldown/watcher_gaze
/mob/living/basic/heretic_summon/raw_prophet/ruins/get_innate_abilities()
var/list/returnable_list = innate_abilities.Copy()
returnable_list += list(/datum/action/cooldown/mob_cooldown/watcher_gaze = BB_TARGETTED_ACTION)
return returnable_list
/// Walk and attack people, blind them when we can
/datum/ai_controller/basic_controller/raw_prophet
@@ -17,13 +17,12 @@
/mob/living/basic/heretic_summon/rust_walker/Initialize(mapload)
. = ..()
AddElement(/datum/element/footstep, FOOTSTEP_MOB_RUST)
var/datum/action/cooldown/spell/aoe/rust_conversion/small/conversion = new(src)
conversion.Grant(src)
ai_controller?.set_blackboard_key(BB_GENERIC_ACTION, conversion)
var/datum/action/cooldown/spell/basic_projectile/rust_wave/short/wave = new(src)
wave.Grant(src)
ai_controller?.set_blackboard_key(BB_TARGETTED_ACTION, wave)
var/static/list/grantable_spells = list(
/datum/action/cooldown/spell/aoe/rust_conversion/small = BB_GENERIC_ACTION,
/datum/action/cooldown/spell/basic_projectile/rust_wave/short = BB_TARGETTED_ACTION,
)
grant_actions_by_list(grantable_spells)
/mob/living/basic/heretic_summon/rust_walker/setDir(newdir)
. = ..()
@@ -28,15 +28,13 @@
/mob/living/basic/mining/ice_demon/Initialize(mapload)
. = ..()
var/datum/action/cooldown/mob_cooldown/slippery_ice_floors/ice_floor = new(src)
ice_floor.Grant(src)
ai_controller.set_blackboard_key(BB_DEMON_SLIP_ABILITY, ice_floor)
var/datum/action/cooldown/mob_cooldown/ice_demon_teleport/demon_teleport = new(src)
demon_teleport.Grant(src)
ai_controller.set_blackboard_key(BB_DEMON_TELEPORT_ABILITY, demon_teleport)
var/datum/action/cooldown/spell/conjure/create_afterimages/afterimage = new(src)
afterimage.Grant(src)
ai_controller.set_blackboard_key(BB_DEMON_CLONE_ABILITY, afterimage)
var/static/list/innate_actions = list(
/datum/action/cooldown/mob_cooldown/slippery_ice_floors = BB_DEMON_SLIP_ABILITY,
/datum/action/cooldown/mob_cooldown/ice_demon_teleport = BB_DEMON_TELEPORT_ABILITY,
/datum/action/cooldown/spell/conjure/create_afterimages = BB_DEMON_CLONE_ABILITY,
)
grant_actions_by_list(innate_actions)
AddComponent(\
/datum/component/ranged_attacks,\
projectile_type = /obj/projectile/temp/ice_demon,\
@@ -40,17 +40,20 @@
/mob/living/basic/mining/ice_whelp/Initialize(mapload)
. = ..()
ADD_TRAIT(src, TRAIT_NO_GLIDE, INNATE_TRAIT)
AddElement(/datum/element/footstep, FOOTSTEP_MOB_HEAVY)
AddComponent(/datum/component/basic_mob_ability_telegraph)
AddComponent(/datum/component/basic_mob_attack_telegraph, telegraph_duration = 0.6 SECONDS)
var/datum/action/cooldown/mob_cooldown/fire_breath/ice/flamethrower = new(src)
flamethrower.Grant(src)
ai_controller.set_blackboard_key(BB_WHELP_STRAIGHTLINE_FIRE, flamethrower)
var/datum/action/cooldown/mob_cooldown/fire_breath/ice/cross/wide_flames = new(src)
wide_flames.Grant(src)
ai_controller.set_blackboard_key(BB_WHELP_WIDESPREAD_FIRE, wide_flames)
RegisterSignal(src, COMSIG_HOSTILE_PRE_ATTACKINGTARGET, PROC_REF(pre_attack))
var/static/list/innate_actions = list(
/datum/action/cooldown/mob_cooldown/fire_breath/ice = BB_WHELP_STRAIGHTLINE_FIRE,
/datum/action/cooldown/mob_cooldown/fire_breath/ice/cross = BB_WHELP_WIDESPREAD_FIRE,
)
grant_actions_by_list(innate_actions)
/mob/living/basic/mining/ice_whelp/proc/pre_attack(mob/living/sculptor, atom/target)
SIGNAL_HANDLER
@@ -36,16 +36,16 @@
/mob/living/basic/mega_arachnid/Initialize(mapload)
. = ..()
AddComponent(/datum/component/seethrough_mob)
var/datum/action/cooldown/spell/pointed/projectile/flesh_restraints/restrain = new(src)
var/datum/action/cooldown/mob_cooldown/secrete_acid/acid_spray = new(src)
acid_spray.Grant(src)
restrain.Grant(src)
var/static/list/innate_actions = list(
/datum/action/cooldown/mob_cooldown/secrete_acid = BB_ARACHNID_SLIP,
/datum/action/cooldown/spell/pointed/projectile/flesh_restraints = BB_ARACHNID_RESTRAIN,
)
grant_actions_by_list(innate_actions)
AddElement(/datum/element/swabable, CELL_LINE_TABLE_MEGA_ARACHNID, CELL_VIRUS_TABLE_GENERIC_MOB, 1, 5)
AddComponent(/datum/component/seethrough_mob)
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()
. = ..()
@@ -56,12 +56,12 @@
/mob/living/basic/seedling/Initialize(mapload)
. = ..()
var/datum/action/cooldown/mob_cooldown/projectile_attack/rapid_fire/seedling/seed_attack = new(src)
seed_attack.Grant(src)
ai_controller.set_blackboard_key(BB_RAPIDSEEDS_ABILITY, seed_attack)
var/datum/action/cooldown/mob_cooldown/solarbeam/beam_attack = new(src)
beam_attack.Grant(src)
ai_controller.set_blackboard_key(BB_SOLARBEAM_ABILITY, beam_attack)
var/static/list/innate_actions = list(
/datum/action/cooldown/mob_cooldown/projectile_attack/rapid_fire/seedling = BB_RAPIDSEEDS_ABILITY,
/datum/action/cooldown/mob_cooldown/solarbeam = BB_SOLARBEAM_ABILITY,
)
grant_actions_by_list(innate_actions)
var/petal_color = pick(possible_colors)
@@ -174,9 +174,10 @@
/mob/living/basic/venus_human_trap/Initialize(mapload)
. = ..()
AddElement(/datum/element/lifesteal, 5)
var/datum/action/cooldown/vine_tangle/tangle = new(src)
tangle.Grant(src)
ai_controller.set_blackboard_key(BB_TARGETTED_ACTION, tangle)
var/static/list/innate_actions = list(
/datum/action/cooldown/vine_tangle = BB_TARGETTED_ACTION,
)
grant_actions_by_list(innate_actions)
/mob/living/basic/venus_human_trap/RangedAttack(atom/victim)
if(!combat_mode)
@@ -37,8 +37,6 @@
/mob/living/basic/mining/bileworm/Initialize(mapload)
. = ..()
//traits and elements
ADD_TRAIT(src, TRAIT_IMMOBILIZED, INNATE_TRAIT)
if(ispath(evolve_path))
@@ -47,16 +45,14 @@
//setup mob abilities
var/datum/action/cooldown/mob_cooldown/projectile_attack/dir_shots/bileworm/spew_bile = new attack_action_path(src)
spew_bile.Grant(src)
//well, one of them has to start on infinite cooldown
var/datum/action/cooldown/mob_cooldown/projectile_attack/dir_shots/bileworm/spew_bile = new(src)
spew_bile.Grant(src)
spew_bile.StartCooldownSelf(INFINITY)
var/datum/action/cooldown/mob_cooldown/resurface/resurface = new(src)
resurface.Grant(src)
var/datum/action/cooldown/mob_cooldown/devour/devour = new(src)
devour.Grant(src)
var/datum/action/adjust_vision/bileworm/adjust_vision = new(src)
adjust_vision.Grant(src)
ai_controller.set_blackboard_key(BB_BILEWORM_SPEW_BILE, spew_bile)
ai_controller.set_blackboard_key(BB_BILEWORM_RESURFACE, resurface)
ai_controller.set_blackboard_key(BB_BILEWORM_DEVOUR, devour)
ai_controller?.set_blackboard_key(BB_BILEWORM_SPEW_BILE, spew_bile)
var/static/list/other_innate_actions = list(
/datum/action/adjust_vision/bileworm = null,
/datum/action/cooldown/mob_cooldown/devour = BB_BILEWORM_DEVOUR,
/datum/action/cooldown/mob_cooldown/resurface = BB_BILEWORM_RESURFACE,
)
@@ -43,10 +43,6 @@
beam.Grant(src)
ai_controller.set_blackboard_key(BB_TARGETTED_ACTION, beam)
/mob/living/basic/mining/brimdemon/Destroy()
QDEL_NULL(beam)
return ..()
/mob/living/basic/mining/brimdemon/RangedAttack(atom/target, modifiers)
beam.Trigger(target = target)
@@ -47,13 +47,11 @@
else
can_lay_eggs = FALSE
var/datum/action/cooldown/mob_cooldown/spit_ore/spit = new(src)
var/datum/action/cooldown/mob_cooldown/burrow/burrow = new(src)
spit.Grant(src)
burrow.Grant(src)
ai_controller.set_blackboard_key(BB_SPIT_ABILITY, spit)
ai_controller.set_blackboard_key(BB_BURROW_ABILITY, burrow)
AddElement(/datum/element/wall_tearer, allow_reinforced = FALSE)
var/static/list/innate_actions = list(
/datum/action/cooldown/mob_cooldown/spit_ore = BB_SPIT_ABILITY,
/datum/action/cooldown/mob_cooldown/burrow = BB_BURROW_ABILITY,
)
grant_actions_by_list(innate_actions)
AddComponent(/datum/component/ai_listen_to_weather)
AddComponent(\
/datum/component/appearance_on_aggro,\
@@ -44,6 +44,8 @@
COOLDOWN_DECLARE(ability_animation_cooldown)
/// Our base tentacles ability
var/datum/action/cooldown/mob_cooldown/goliath_tentacles/tentacles
/// Our melee tentacles ability
var/datum/action/cooldown/mob_cooldown/tentacle_burst/melee_tentacles
/// Our long-ranged tentacles ability
var/datum/action/cooldown/mob_cooldown/tentacle_grasp/tentacle_line
/// Things we want to eat off the floor (or a plate, we're not picky)
@@ -76,7 +78,7 @@
tentacles = new (src)
tentacles.Grant(src)
var/datum/action/cooldown/mob_cooldown/tentacle_burst/melee_tentacles = new (src)
melee_tentacles = new(src)
melee_tentacles.Grant(src)
AddComponent(/datum/component/revenge_ability, melee_tentacles, targetting = ai_controller.blackboard[BB_TARGETTING_DATUM], max_range = 1, target_self = TRUE)
tentacle_line = new (src)
@@ -88,12 +90,6 @@
ai_controller.set_blackboard_key(BB_BASIC_FOODS, goliath_foods)
ai_controller.set_blackboard_key(BB_GOLIATH_TENTACLES, tentacles)
/mob/living/basic/mining/goliath/Destroy()
QDEL_NULL(tentacles)
QDEL_NULL(tentacle_line)
return ..()
/mob/living/basic/mining/goliath/examine(mob/user)
. = ..()
if (saddled)
@@ -41,7 +41,7 @@
var/datum/action/cooldown/mob_cooldown/skull_launcher/skull_launcher = new(src)
skull_launcher.Grant(src)
skull_launcher.spawn_type = brood_type
ai_controller.blackboard[BB_TARGETTED_ACTION] = skull_launcher
ai_controller.set_blackboard_key(BB_TARGETTED_ACTION, skull_launcher)
/// Create what we want to drop on death, in proc form so we can always return a static list
/mob/living/basic/mining/legion/proc/get_loot_list()
@@ -52,9 +52,7 @@
move_resist = MOVE_RESIST_DEFAULT,\
)
AddComponent(/datum/component/ai_retaliate_advanced, CALLBACK(src, PROC_REF(attack_intruder)))
var/datum/action/cooldown/mob_cooldown/mook_ability/mook_jump/jump = new(src)
jump.Grant(src)
ai_controller.set_blackboard_key(BB_MOOK_JUMP_ABILITY, jump)
grant_actions_by_list(get_innate_abilities())
ore_overlay = mutable_appearance(icon, "mook_ore_overlay")
@@ -68,6 +66,13 @@
AddComponent(/datum/component/obeys_commands, pet_commands)
/// Returns a list of actions and blackboard keys to pass into `grant_actions_by_list`.
/mob/living/basic/mining/mook/proc/get_innate_abilities()
var/static/list/innate_abilities = list(
/datum/action/cooldown/mob_cooldown/mook_ability/mook_jump = BB_MOOK_JUMP_ABILITY,
)
return innate_abilities
/mob/living/basic/mining/mook/proc/grant_healer_abilities()
AddComponent(\
/datum/component/healing_touch,\
@@ -198,9 +203,18 @@
neutral_stance = mutable_appearance(icon, "mook_axe_overlay")
attack_stance = mutable_appearance(icon, "axe_strike_overlay")
update_appearance()
var/datum/action/cooldown/mob_cooldown/mook_ability/mook_leap/leap = new(src)
leap.Grant(src)
ai_controller.set_blackboard_key(BB_MOOK_LEAP_ABILITY, leap)
/mob/living/basic/mining/mook/worker/get_innate_abilities()
var/static/list/worker_innate_abilites = null
if(isnull(worker_innate_abilites))
worker_innate_abilites = list()
worker_innate_abilites += ..()
worker_innate_abilites += list(
/datum/action/cooldown/mob_cooldown/mook_ability/mook_leap = BB_MOOK_LEAP_ABILITY,
)
return worker_innate_abilites
/mob/living/basic/mining/mook/worker/attack_sequence(atom/target)
. = ..()
@@ -58,14 +58,13 @@
after_tame = CALLBACK(src, PROC_REF(activate_bot)),\
)
var/datum/action/cooldown/mob_cooldown/minedrone/toggle_light/toggle_light_action = new(src)
var/datum/action/cooldown/mob_cooldown/minedrone/toggle_meson_vision/toggle_meson_vision_action = new(src)
var/datum/action/cooldown/mob_cooldown/minedrone/dump_ore/dump_ore_action = new(src)
toggle_light_action.Grant(src)
toggle_meson_vision_action.Grant(src)
dump_ore_action.Grant(src)
ai_controller.set_blackboard_key(BB_MINEBOT_LIGHT_ABILITY, toggle_light_action)
ai_controller.set_blackboard_key(BB_MINEBOT_DUMP_ABILITY, dump_ore_action)
var/static/list/innate_actions = list(
/datum/action/cooldown/mob_cooldown/minedrone/toggle_light = BB_MINEBOT_LIGHT_ABILITY,
/datum/action/cooldown/mob_cooldown/minedrone/toggle_meson_vision = null,
/datum/action/cooldown/mob_cooldown/minedrone/dump_ore = BB_MINEBOT_DUMP_ABILITY,
)
grant_actions_by_list(innate_actions)
stored_gun = new(src)
var/obj/item/implant/radio/mining/comms = new(src)
@@ -105,11 +105,6 @@
ai_controller.set_blackboard_key(BB_CARP_RIFT, teleport)
ai_controller.set_blackboard_key(BB_OBSTACLE_TARGETTING_WHITELIST, allowed_obstacle_targets)
/mob/living/basic/carp/Destroy()
QDEL_NULL(teleport)
return ..()
/// Tell the elements and the blackboard what food we want to eat
/mob/living/basic/carp/proc/setup_eating()
AddElement(/datum/element/basic_eating, food_types = desired_food)
@@ -63,13 +63,12 @@
outline_colour = COLOR_PINK,\
)
var/datum/action/cooldown/mob_cooldown/lay_web/webbing = new(src)
webbing.webbing_time *= 0.7
webbing.Grant(src)
ai_controller?.set_blackboard_key(BB_SPIDER_WEB_ACTION, webbing)
var/static/list/innate_actions = list(
/datum/action/cooldown/mob_cooldown/lay_web = BB_SPIDER_WEB_ACTION,
/datum/action/cooldown/mob_cooldown/lay_web/sticky_web = null,
/datum/action/cooldown/mob_cooldown/lay_web/web_spikes = null,
)
grant_actions_by_list(innate_actions)
var/datum/action/cooldown/mob_cooldown/lay_web/web_spikes/spikes_web = new(src)
spikes_web.Grant(src)
var/datum/action/cooldown/mob_cooldown/lay_web/sticky_web/web_sticky = new(src)
web_sticky.Grant(src)
/datum/action/cooldown/mob_cooldown/lay_web/flesh
webbing_time = 3 SECONDS
@@ -37,8 +37,7 @@
/mob/living/basic/demon/slaughter/Initialize(mapload)
. = ..()
var/datum/action/cooldown/spell/jaunt/bloodcrawl/slaughter_demon/crawl = new crawl_type(src)
crawl.Grant(src)
GRANT_ACTION(/datum/action/cooldown/spell/jaunt/bloodcrawl/slaughter_demon)
RegisterSignal(src, COMSIG_LIVING_UNARMED_ATTACK, PROC_REF(on_attack))
RegisterSignals(src, list(COMSIG_MOB_ENTER_JAUNT, COMSIG_MOB_AFTER_EXIT_JAUNT), PROC_REF(on_crawl))
@@ -52,9 +52,11 @@
/mob/living/basic/eyeball/Initialize(mapload)
. = ..()
var/datum/action/cooldown/spell/pointed/death_glare/glare = new(src)
glare.Grant(src)
ai_controller.set_blackboard_key(BB_GLARE_ABILITY, glare)
var/static/list/innate_actions = list(
/datum/action/cooldown/spell/pointed/death_glare = BB_GLARE_ABILITY
)
grant_actions_by_list(innate_actions)
AddElement(/datum/element/simple_flying)
AddComponent(/datum/component/tameable, food_types = list(/obj/item/food/grown/carrot), tame_chance = 100, after_tame = CALLBACK(src, PROC_REF(on_tame)))
ADD_TRAIT(src, TRAIT_SPACEWALK, INNATE_TRAIT)
@@ -95,8 +95,7 @@
/mob/living/basic/hivebot/mechanic/Initialize(mapload)
. = ..()
var/datum/action/cooldown/spell/conjure/foam_wall/foam = new(src)
foam.Grant(src)
GRANT_ACTION(/datum/action/cooldown/spell/conjure/foam_wall)
RegisterSignal(src, COMSIG_HOSTILE_PRE_ATTACKINGTARGET, PROC_REF(pre_attack))
/mob/living/basic/hivebot/mechanic/proc/pre_attack(mob/living/fixer, atom/target)
@@ -2,6 +2,8 @@
#define HEARTBEAT_FAST (0.6 SECONDS)
#define HEARTBEAT_FRANTIC (0.4 SECONDS)
#define SPIKES_ABILITY_TYPEPATH /datum/action/cooldown/mob_cooldown/chasing_spikes
/mob/living/basic/meteor_heart
name = "meteor heart"
desc = "A pulsing lump of flesh and bone growing directly out of the ground."
@@ -25,10 +27,7 @@
maximum_survivable_temperature = 1500
combat_mode = TRUE
move_resist = INFINITY // This mob IS the floor
/// Action which sends a line of spikes chasing a player
var/datum/action/cooldown/mob_cooldown/chasing_spikes/spikes
/// Action which summons areas the player can't stand in
var/datum/action/cooldown/mob_cooldown/spine_traps/traps
/// Looping heartbeat sound
var/datum/looping_sound/heartbeat/soundloop
@@ -39,14 +38,11 @@
AddElement(/datum/element/death_drops, death_loot)
AddElement(/datum/element/relay_attackers)
spikes = new(src)
spikes.Grant(src)
ai_controller.set_blackboard_key(BB_METEOR_HEART_GROUND_SPIKES, spikes)
traps = new(src)
traps.Grant(src)
ai_controller.set_blackboard_key(BB_METEOR_HEART_SPINE_TRAPS, traps)
var/static/list/innate_actions = list(
SPIKES_ABILITY_TYPEPATH = BB_METEOR_HEART_GROUND_SPIKES,
/datum/action/cooldown/mob_cooldown/spine_traps = BB_METEOR_HEART_SPINE_TRAPS,
)
grant_actions_by_list(innate_actions)
ai_controller.set_ai_status(AI_STATUS_OFF)
RegisterSignal(src, COMSIG_MOB_ABILITY_FINISHED, PROC_REF(used_ability))
@@ -60,12 +56,13 @@
soundloop.pressure_affected = FALSE
soundloop.start()
AddComponent(/datum/component/bloody_spreader,\
AddComponent(\
/datum/component/bloody_spreader,\
blood_left = INFINITY,\
blood_dna = list("meaty DNA" = "MT-"),\
diseases = null,\
)
/// Called when we get mad at something, either for attacking us or attacking the nearby area
/mob/living/basic/meteor_heart/proc/aggro()
if (ai_controller.ai_status == AI_STATUS_ON)
@@ -85,13 +82,11 @@
/// Animate when using certain abilities
/mob/living/basic/meteor_heart/proc/used_ability(mob/living/owner, datum/action/cooldown/mob_cooldown/ability)
SIGNAL_HANDLER
if (ability != spikes)
if(!istype(ability, SPIKES_ABILITY_TYPEPATH))
return
Shake(1, 0, 1.5 SECONDS)
/mob/living/basic/meteor_heart/Destroy()
QDEL_NULL(spikes)
QDEL_NULL(traps)
QDEL_NULL(soundloop)
return ..()
@@ -136,3 +131,5 @@
#undef HEARTBEAT_NORMAL
#undef HEARTBEAT_FAST
#undef HEARTBEAT_FRANTIC
#undef SPIKES_ABILITY_TYPEPATH
@@ -39,8 +39,7 @@
min_health_slowdown = -1.5,\
)
var/datum/action/cooldown/spell/jaunt/creature_teleport/teleport = new(src)
teleport.Grant(src)
GRANT_ACTION(/datum/action/cooldown/spell/jaunt/creature_teleport)
/mob/living/basic/creature/proc/can_be_seen(turf/location)
// Check for darkness
@@ -36,21 +36,16 @@
AddElement(/datum/element/effect_trail, /obj/effect/temp_visual/paper_scatter)
/mob/living/basic/paper_wizard/proc/grant_abilities()
summon = new(src)
summon.Grant(src)
ai_controller.set_blackboard_key(BB_WIZARD_SUMMON_MINIONS, summon)
mimic = new(src)
mimic.Grant(src)
ai_controller.set_blackboard_key(BB_WIZARD_MIMICS, mimic)
var/static/list/innate_actions = list(
/datum/action/cooldown/spell/conjure/wizard_summon_minions = BB_WIZARD_SUMMON_MINIONS,
/datum/action/cooldown/spell/pointed/wizard_mimic = BB_WIZARD_MIMICS,
)
grant_actions_by_list(innate_actions)
/mob/living/basic/paper_wizard/proc/grant_loot()
AddElement(/datum/element/death_drops, dropped_loot)
/mob/living/basic/paper_wizard/Destroy()
QDEL_NULL(summon)
QDEL_NULL(mimic)
return ..()
/datum/ai_controller/basic_controller/paper_wizard
blackboard = list(
BB_TARGETTING_DATUM = new /datum/targetting_datum/basic,
@@ -64,13 +64,12 @@
after_assumed_control = CALLBACK(src, PROC_REF(became_player_controlled)),\
)
var/datum/action/cooldown/mob_cooldown/domain/domain = new(src)
domain.Grant(src)
ai_controller.set_blackboard_key(BB_DOMAIN_ABILITY, domain)
var/static/list/innate_actions = list(
/datum/action/cooldown/mob_cooldown/domain = BB_DOMAIN_ABILITY,
/datum/action/cooldown/mob_cooldown/riot = BB_RAISE_HORDE_ABILITY,
)
var/datum/action/cooldown/mob_cooldown/riot/riot = new(src)
riot.Grant(src)
ai_controller.set_blackboard_key(BB_RAISE_HORDE_ABILITY, riot)
grant_actions_by_list(innate_actions)
/mob/living/basic/regal_rat/examine(mob/user)
. = ..()
@@ -97,9 +97,7 @@
AddElement(/datum/element/simple_flying)
add_traits(list(TRAIT_SPACEWALK, TRAIT_SIXTHSENSE, TRAIT_FREE_HYPERSPACE_MOVEMENT), INNATE_TRAIT)
for(var/ability in abilities)
var/datum/action/spell = new ability(src)
spell.Grant(src)
grant_actions_by_list(abilities)
RegisterSignal(src, COMSIG_LIVING_BANED, PROC_REF(on_baned))
RegisterSignal(src, COMSIG_MOVABLE_PRE_MOVE, PROC_REF(on_move))
@@ -76,11 +76,6 @@
buffet = new(src)
buffet.Grant(src)
/mob/living/basic/space_dragon/Destroy()
QDEL_NULL(fire_breath)
QDEL_NULL(buffet)
return ..()
/mob/living/basic/space_dragon/Login()
. = ..()
if(!isnull(chosen_colour))
@@ -19,7 +19,12 @@
melee_damage_upper = 25
gold_core_spawnable = HOSTILE_SPAWN
ai_controller = /datum/ai_controller/basic_controller/giant_spider
/// Actions to grant on Initialize
var/list/innate_actions = null
/mob/living/basic/spider/giant/Initialize(mapload)
. = ..()
grant_actions_by_list(innate_actions)
/**
* ### Ambush Spider
@@ -42,7 +47,8 @@
melee_damage_upper = 30
speed = 5
player_speed_modifier = -3.1
menu_description = "Slow spider, with a strong disarming pull and above avarage health and damage."
menu_description = "Slow spider, with a strong disarming pull and above average health and damage."
innate_actions = list(/datum/action/cooldown/mob_cooldown/sneak/spider)
/mob/living/basic/spider/giant/ambush/Initialize(mapload)
. = ..()
@@ -50,9 +56,6 @@
AddElement(/datum/element/web_walker, /datum/movespeed_modifier/slow_web)
var/datum/action/cooldown/mob_cooldown/sneak/spider/sneak_web = new(src)
sneak_web.Grant(src)
/**
* ### Guard Spider
* A subtype of the giant spider which is similar on every single way,
@@ -74,13 +77,11 @@
speed = 5
player_speed_modifier = -4
menu_description = "Tanky and strong able to shed a carcass for protection."
innate_actions = list(/datum/action/cooldown/mob_cooldown/web_effigy)
/mob/living/basic/spider/giant/guard/Initialize(mapload)
. = ..()
AddElement(/datum/element/web_walker, /datum/movespeed_modifier/average_web)
var/datum/action/cooldown/mob_cooldown/web_effigy/shed = new(src)
shed.Grant(src)
/**
* ### Hunter Spider
@@ -105,7 +106,6 @@
/mob/living/basic/spider/giant/hunter/Initialize(mapload)
. = ..()
AddElement(/datum/element/web_walker, /datum/movespeed_modifier/fast_web)
/**
@@ -131,14 +131,12 @@
player_speed_modifier = -3.1
sight = SEE_SELF|SEE_MOBS
menu_description = "Fast spider able to see enemies through walls, send messages to the nest and the ability to travel in vents."
innate_actions = list(/datum/action/cooldown/mob_cooldown/command_spiders/communication_spiders)
/mob/living/basic/spider/giant/scout/Initialize(mapload)
. = ..()
ADD_TRAIT(src, TRAIT_VENTCRAWLER_ALWAYS, INNATE_TRAIT)
var/datum/action/cooldown/mob_cooldown/command_spiders/communication_spiders/spiders_communication = new(src)
spiders_communication.Grant(src)
/**
* ### Nurse Spider
*
@@ -210,21 +208,16 @@
speed = 4
player_speed_modifier = -3.1
web_type = /datum/action/cooldown/mob_cooldown/lay_web/sealer
menu_description = "Avarage speed spider with self healing abilities and multiple web types to reinforce the nest with little to no damage and low health."
menu_description = "Average speed spider with self healing abilities and multiple web types to reinforce the nest with little to no damage and low health."
innate_actions = list(
/datum/action/cooldown/mob_cooldown/lay_web/solid_web,
/datum/action/cooldown/mob_cooldown/lay_web/sticky_web,
/datum/action/cooldown/mob_cooldown/lay_web/web_passage,
/datum/action/cooldown/mob_cooldown/lay_web/web_spikes,
)
/mob/living/basic/spider/giant/tangle/Initialize(mapload)
. = ..()
var/datum/action/cooldown/mob_cooldown/lay_web/solid_web/web_solid = new(src)
web_solid.Grant(src)
var/datum/action/cooldown/mob_cooldown/lay_web/web_passage/passage_web = new(src)
passage_web.Grant(src)
var/datum/action/cooldown/mob_cooldown/lay_web/web_spikes/spikes_web = new(src)
spikes_web.Grant(src)
var/datum/action/cooldown/mob_cooldown/lay_web/sticky_web/web_sticky = new(src)
web_sticky.Grant(src)
AddElement(/datum/element/web_walker, /datum/movespeed_modifier/average_web)
@@ -364,7 +357,12 @@
web_speed = 0.7
web_type = /datum/action/cooldown/mob_cooldown/lay_web/sealer
menu_description = "Tank spider variant with an enormous amount of health and damage, but is very slow when not on webbing. It also has a charge ability to close distance with a target after a small windup."
/// Charging ability
innate_actions = list(
/datum/action/cooldown/mob_cooldown/charge/basic_charge,
/datum/action/cooldown/mob_cooldown/lay_web/solid_web,
/datum/action/cooldown/mob_cooldown/lay_web/web_passage,
)
/// Charging ability, kept seperate from innate_actions due to implementation details
var/datum/action/cooldown/mob_cooldown/charge/basic_charge/charge
/mob/living/basic/spider/giant/tarantula/Initialize(mapload)
@@ -405,15 +403,14 @@
player_speed_modifier = -2.5
gold_core_spawnable = NO_SPAWN
menu_description = "Assassin spider variant with an unmatched speed and very deadly poison, but has very low amount of health and damage."
innate_actions = list(
/datum/action/cooldown/mob_cooldown/defensive_mode,
)
/mob/living/basic/spider/giant/viper/Initialize(mapload)
. = ..()
AddElement(/datum/element/bonus_damage)
var/datum/action/cooldown/mob_cooldown/defensive_mode/defensive_action = new(src)
defensive_action.Grant(src)
/**
* ### Spider Broodmother
*
@@ -440,38 +437,21 @@
web_speed = 0.5
web_type = /datum/action/cooldown/mob_cooldown/lay_web/sealer
menu_description = "Royal spider variant specializing in reproduction and leadership, deals low damage."
innate_actions = list(
/datum/action/cooldown/mob_cooldown/command_spiders,
/datum/action/cooldown/mob_cooldown/lay_eggs,
/datum/action/cooldown/mob_cooldown/lay_eggs/abnormal,
/datum/action/cooldown/mob_cooldown/lay_eggs/enriched,
/datum/action/cooldown/mob_cooldown/lay_web/solid_web,
/datum/action/cooldown/mob_cooldown/lay_web/sticky_web,
/datum/action/cooldown/mob_cooldown/lay_web/web_passage,
/datum/action/cooldown/mob_cooldown/lay_web/web_spikes,
/datum/action/cooldown/mob_cooldown/set_spider_directive,
/datum/action/cooldown/mob_cooldown/wrap,
)
/mob/living/basic/spider/giant/midwife/Initialize(mapload)
. = ..()
var/datum/action/cooldown/mob_cooldown/lay_web/solid_web/web_solid = new(src)
web_solid.Grant(src)
var/datum/action/cooldown/mob_cooldown/lay_web/web_passage/passage_web = new(src)
passage_web.Grant(src)
var/datum/action/cooldown/mob_cooldown/lay_web/web_spikes/spikes_web = new(src)
spikes_web.Grant(src)
var/datum/action/cooldown/mob_cooldown/lay_web/sticky_web/web_sticky = new(src)
web_sticky.Grant(src)
var/datum/action/cooldown/mob_cooldown/wrap/wrapping = new(src)
wrapping.Grant(src)
var/datum/action/cooldown/mob_cooldown/lay_eggs/make_eggs_tier1 = new(src)
make_eggs_tier1.Grant(src)
var/datum/action/cooldown/mob_cooldown/lay_eggs/abnormal/make_eggs_tier2 = new(src)
make_eggs_tier2.Grant(src)
var/datum/action/cooldown/mob_cooldown/lay_eggs/enriched/make_eggs_tier3 = new(src)
make_eggs_tier3.Grant(src)
var/datum/action/cooldown/mob_cooldown/set_spider_directive/give_orders = new(src)
give_orders.Grant(src)
var/datum/action/cooldown/mob_cooldown/command_spiders/not_hivemind_talk = new(src)
not_hivemind_talk.Grant(src)
AddElement(/datum/element/web_walker, /datum/movespeed_modifier/average_web)
@@ -586,18 +566,15 @@
unsuitable_heat_damage = 1
menu_description = "Stronger assassin spider variant with an unmatched speed, high amount of health and very deadly poison, but deals very low amount of damage. It also has ability to ventcrawl."
apply_spider_antag = FALSE
innate_actions = list(
/datum/action/cooldown/mob_cooldown/lay_web/sticky_web,
/datum/action/cooldown/mob_cooldown/lay_web/web_spikes,
)
/mob/living/basic/spider/giant/viper/wizard/Initialize(mapload)
. = ..()
ADD_TRAIT(src, TRAIT_VENTCRAWLER_ALWAYS, INNATE_TRAIT)
var/datum/action/cooldown/mob_cooldown/lay_web/web_spikes/spikes_web = new(src)
spikes_web.Grant(src)
var/datum/action/cooldown/mob_cooldown/lay_web/sticky_web/web_sticky = new(src)
web_sticky.Grant(src)
/**
* ### Sergeant Araneus
*
@@ -32,10 +32,9 @@
/mob/living/basic/spider/growing/young/ambush/Initialize(mapload)
. = ..()
AddElement(/datum/element/web_walker, /datum/movespeed_modifier/slow_web)
var/datum/action/cooldown/mob_cooldown/sneak/spider/sneak_web = new(src)
sneak_web.Grant(src)
GRANT_ACTION(/datum/action/cooldown/mob_cooldown/sneak/spider)
AddElement(/datum/element/web_walker, /datum/movespeed_modifier/slow_web)
/// Will differentiate into the "scout" giant spider.
/mob/living/basic/spider/growing/young/scout
@@ -56,14 +56,14 @@
/mob/living/basic/statue/Initialize(mapload, mob/living/creator)
. = ..()
AddComponent(/datum/component/unobserved_actor, unobserved_flags = NO_OBSERVED_MOVEMENT | NO_OBSERVED_ATTACKS)
ADD_TRAIT(src, TRAIT_UNOBSERVANT, INNATE_TRAIT)
AddComponent(/datum/component/unobserved_actor, unobserved_flags = NO_OBSERVED_MOVEMENT | NO_OBSERVED_ATTACKS)
// Give spells
var/datum/action/cooldown/spell/aoe/flicker_lights/flicker = new(src)
flicker.Grant(src)
var/datum/action/cooldown/spell/aoe/blindness/blind = new(src)
blind.Grant(src)
var/static/list/innate_actions = list(
/datum/action/cooldown/spell/aoe/blindness,
/datum/action/cooldown/spell/aoe/flicker_lights,
)
grant_actions_by_list(innate_actions)
// Set creator
if(creator)
@@ -6,8 +6,7 @@
icon_state = "aliend"
/mob/living/carbon/alien/adult/drone/Initialize(mapload)
var/datum/action/cooldown/alien/evolve_to_praetorian/evolution = new(src)
evolution.Grant(src)
GRANT_ACTION(/datum/action/cooldown/alien/evolve_to_praetorian)
return ..()
/mob/living/carbon/alien/adult/drone/create_internal_organs()
@@ -9,11 +9,12 @@
/mob/living/carbon/alien/adult/royal/praetorian/Initialize(mapload)
real_name = name
var/datum/action/cooldown/spell/aoe/repulse/xeno/tail_whip = new(src)
tail_whip.Grant(src)
var/static/list/innate_actions = list(
/datum/action/cooldown/alien/evolve_to_queen,
/datum/action/cooldown/spell/aoe/repulse/xeno,
)
var/datum/action/cooldown/alien/evolve_to_queen/evolution = new(src)
evolution.Grant(src)
grant_actions_by_list(innate_actions)
return ..()
@@ -7,8 +7,7 @@
alien_speed = 0.2
/mob/living/carbon/alien/adult/sentinel/Initialize(mapload)
var/datum/action/cooldown/mob_cooldown/sneak/alien/sneaky_beaky = new(src)
sneaky_beaky.Grant(src)
GRANT_ACTION(/datum/action/cooldown/mob_cooldown/sneak/alien)
return ..()
/mob/living/carbon/alien/adult/sentinel/create_internal_organs()
@@ -55,11 +55,11 @@
real_name = src.name
var/datum/action/cooldown/spell/aoe/repulse/xeno/tail_whip = new(src)
tail_whip.Grant(src)
var/datum/action/cooldown/alien/promote/promotion = new(src)
promotion.Grant(src)
var/static/list/innate_actions = list(
/datum/action/cooldown/alien/promote,
/datum/action/cooldown/spell/aoe/repulse/xeno,
)
grant_actions_by_list(innate_actions)
return ..()
@@ -31,10 +31,12 @@
//This is fine right now, if we're adding organ specific damage this needs to be updated
/mob/living/carbon/alien/larva/Initialize(mapload)
var/datum/action/cooldown/alien/larva_evolve/evolution = new(src)
evolution.Grant(src)
var/datum/action/cooldown/alien/hide/hide = new(src)
hide.Grant(src)
var/static/list/innate_actions = list(
/datum/action/cooldown/alien/hide,
/datum/action/cooldown/alien/larva_evolve,
)
grant_actions_by_list(innate_actions)
return ..()
/mob/living/carbon/alien/larva/create_internal_organs()
@@ -59,9 +59,7 @@
AddComponent(/datum/component/gps, gps_name)
ADD_TRAIT(src, TRAIT_SPACEWALK, INNATE_TRAIT)
add_traits(list(TRAIT_NO_TELEPORT, TRAIT_MARTIAL_ARTS_IMMUNE), MEGAFAUNA_TRAIT)
for(var/action_type in attack_action_types)
var/datum/action/innate/megafauna_attack/attack_action = new action_type()
attack_action.Grant(src)
grant_actions_by_list(attack_action_types)
/mob/living/simple_animal/hostile/megafauna/Moved(atom/old_loc, movement_dir, forced, list/old_locs, momentum_change = TRUE)
//Safety check
@@ -67,21 +67,23 @@ Difficulty: Medium
. = ..()
miner_saw = new(src)
ADD_TRAIT(src, TRAIT_NO_FLOATING_ANIM, INNATE_TRAIT)
dash = new /datum/action/cooldown/mob_cooldown/dash()
kinetic_accelerator = new /datum/action/cooldown/mob_cooldown/projectile_attack/kinetic_accelerator()
dash_attack = new /datum/action/cooldown/mob_cooldown/dash_attack()
transform_weapon = new /datum/action/cooldown/mob_cooldown/transform_weapon()
dash = new /datum/action/cooldown/mob_cooldown/dash
kinetic_accelerator = new /datum/action/cooldown/mob_cooldown/projectile_attack/kinetic_accelerator
dash_attack = new /datum/action/cooldown/mob_cooldown/dash_attack
transform_weapon = new /datum/action/cooldown/mob_cooldown/transform_weapon
dash.Grant(src)
kinetic_accelerator.Grant(src)
dash_attack.Grant(src)
transform_weapon.Grant(src)
AddComponent(/datum/component/boss_music, 'sound/lavaland/bdm_boss.ogg', 167 SECONDS)
/mob/living/simple_animal/hostile/megafauna/blood_drunk_miner/Destroy()
QDEL_NULL(dash)
QDEL_NULL(kinetic_accelerator)
QDEL_NULL(dash_attack)
QDEL_NULL(transform_weapon)
dash = null
kinetic_accelerator = null
dash_attack = null
transform_weapon = null
return ..()
/mob/living/simple_animal/hostile/megafauna/blood_drunk_miner/OpenFire()
@@ -86,10 +86,10 @@ Difficulty: Hard
/mob/living/simple_animal/hostile/megafauna/bubblegum/Initialize(mapload)
. = ..()
ADD_TRAIT(src, TRAIT_NO_FLOATING_ANIM, INNATE_TRAIT)
triple_charge = new /datum/action/cooldown/mob_cooldown/charge/triple_charge()
hallucination_charge = new /datum/action/cooldown/mob_cooldown/charge/hallucination_charge()
hallucination_charge_surround = new /datum/action/cooldown/mob_cooldown/charge/hallucination_charge/hallucination_surround()
blood_warp = new /datum/action/cooldown/mob_cooldown/blood_warp()
triple_charge = new(src)
hallucination_charge = new(src)
hallucination_charge_surround = new(src)
blood_warp = new(src)
triple_charge.Grant(src)
hallucination_charge.Grant(src)
hallucination_charge_surround.Grant(src)
@@ -105,10 +105,10 @@ Difficulty: Hard
sound_volume = 200)
/mob/living/simple_animal/hostile/megafauna/bubblegum/Destroy()
QDEL_NULL(triple_charge)
QDEL_NULL(hallucination_charge)
QDEL_NULL(hallucination_charge_surround)
QDEL_NULL(blood_warp)
triple_charge = null
hallucination_charge = null
hallucination_charge_surround = null
blood_warp = null
return ..()
/mob/living/simple_animal/hostile/megafauna/bubblegum/update_cooldowns(list/cooldown_updates, ignore_staggered = FALSE)
@@ -71,11 +71,11 @@
/mob/living/simple_animal/hostile/megafauna/colossus/Initialize(mapload)
. = ..()
ADD_TRAIT(src, TRAIT_NO_FLOATING_ANIM, INNATE_TRAIT) //we don't want this guy to float, messes up his animations.
spiral_shots = new /datum/action/cooldown/mob_cooldown/projectile_attack/spiral_shots/colossus()
random_shots = new /datum/action/cooldown/mob_cooldown/projectile_attack/random_aoe/colossus()
shotgun_blast = new /datum/action/cooldown/mob_cooldown/projectile_attack/shotgun_blast/colossus()
dir_shots = new /datum/action/cooldown/mob_cooldown/projectile_attack/dir_shots/alternating/colossus()
colossus_final = new /datum/action/cooldown/mob_cooldown/projectile_attack/colossus_final()
spiral_shots = new(src)
random_shots = new(src)
shotgun_blast = new(src)
dir_shots = new(src)
colossus_final = new(src)
spiral_shots.Grant(src)
random_shots.Grant(src)
shotgun_blast.Grant(src)
@@ -87,10 +87,10 @@
/mob/living/simple_animal/hostile/megafauna/colossus/Destroy()
RemoveElement(/datum/element/projectile_shield)
QDEL_NULL(spiral_shots)
QDEL_NULL(random_shots)
QDEL_NULL(shotgun_blast)
QDEL_NULL(dir_shots)
spiral_shots = null
random_shots = null
shotgun_blast = null
dir_shots = null
return ..()
/mob/living/simple_animal/hostile/megafauna/colossus/OpenFire()
@@ -62,12 +62,12 @@ Difficulty: Extremely Hard
/mob/living/simple_animal/hostile/megafauna/demonic_frost_miner/Initialize(mapload)
. = ..()
frost_orbs = new /datum/action/cooldown/mob_cooldown/projectile_attack/rapid_fire/shrapnel()
hard_frost_orbs = new /datum/action/cooldown/mob_cooldown/projectile_attack/rapid_fire/shrapnel/strong()
snowball_machine_gun = new /datum/action/cooldown/mob_cooldown/projectile_attack/rapid_fire()
hard_snowball_machine_gun = new /datum/action/cooldown/mob_cooldown/direct_and_aoe()
ice_shotgun = new /datum/action/cooldown/mob_cooldown/projectile_attack/shotgun_blast/pattern()
hard_ice_shotgun = new /datum/action/cooldown/mob_cooldown/projectile_attack/shotgun_blast/pattern/circular()
frost_orbs = new(src)
hard_frost_orbs = new(src)
snowball_machine_gun = new(src)
hard_snowball_machine_gun = new(src)
ice_shotgun = new(src)
hard_ice_shotgun = new(src)
frost_orbs.Grant(src)
hard_frost_orbs.Grant(src)
snowball_machine_gun.Grant(src)
@@ -83,12 +83,12 @@ Difficulty: Extremely Hard
AddComponent(/datum/component/boss_music, 'sound/lavaland/bdm_boss.ogg', 167 SECONDS)
/mob/living/simple_animal/hostile/megafauna/demonic_frost_miner/Destroy()
QDEL_NULL(frost_orbs)
QDEL_NULL(hard_frost_orbs)
QDEL_NULL(snowball_machine_gun)
QDEL_NULL(hard_snowball_machine_gun)
QDEL_NULL(ice_shotgun)
QDEL_NULL(hard_ice_shotgun)
frost_orbs = null
hard_frost_orbs = null
snowball_machine_gun = null
hard_snowball_machine_gun = null
ice_shotgun = null
hard_ice_shotgun = null
return ..()
/mob/living/simple_animal/hostile/megafauna/demonic_frost_miner/OpenFire()
@@ -80,10 +80,10 @@
/mob/living/simple_animal/hostile/megafauna/dragon/Initialize(mapload)
. = ..()
fire_cone = new /datum/action/cooldown/mob_cooldown/fire_breath/cone()
meteors = new /datum/action/cooldown/mob_cooldown/meteors()
mass_fire = new /datum/action/cooldown/mob_cooldown/fire_breath/mass_fire()
lava_swoop = new /datum/action/cooldown/mob_cooldown/lava_swoop()
fire_cone = new(src)
meteors = new(src)
mass_fire = new(src)
lava_swoop = new(src)
fire_cone.Grant(src)
meteors.Grant(src)
mass_fire.Grant(src)
@@ -95,10 +95,10 @@
AddElement(/datum/element/change_force_on_death, move_force = MOVE_FORCE_DEFAULT)
/mob/living/simple_animal/hostile/megafauna/dragon/Destroy()
QDEL_NULL(fire_cone)
QDEL_NULL(meteors)
QDEL_NULL(mass_fire)
QDEL_NULL(lava_swoop)
fire_cone = null
meteors = null
mass_fire = null
lava_swoop = null
return ..()
/mob/living/simple_animal/hostile/megafauna/dragon/OpenFire()
@@ -29,9 +29,7 @@
/mob/living/simple_animal/hostile/asteroid/elite/Initialize(mapload)
. = ..()
AddComponent(/datum/component/seethrough_mob)
for(var/action_type in attack_action_types)
var/datum/action/innate/elite_attack/attack_action = new action_type()
attack_action.Grant(src)
grant_actions_by_list(attack_action_types)
//Prevents elites from attacking members of their faction (can't hurt themselves either) and lets them mine rock with an attack despite not being able to smash walls.
/mob/living/simple_animal/hostile/asteroid/elite/AttackingTarget(atom/attacked_target)
@@ -41,6 +41,8 @@
ADD_TRAIT(src, TRAIT_VENTCRAWLER_ALWAYS, INNATE_TRAIT)
AddElement(/datum/element/content_barfer)
grant_actions_by_list(get_innate_actions())
/mob/living/simple_animal/hostile/ooze/attacked_by(obj/item/I, mob/living/user)
if(!eat_atom(I, TRUE))
return ..()
@@ -71,6 +73,10 @@
if(ooze_nutrition <= 0)
adjustBruteLoss(0.25 * seconds_per_tick)
/// Returns an applicable list of actions to grant to the mob. Will return a list or null.
/mob/living/simple_animal/hostile/ooze/proc/get_innate_actions()
return null
///Does ooze_nutrition + supplied amount and clamps it within 0 and 500
/mob/living/simple_animal/hostile/ooze/proc/adjust_ooze_nutrition(amount)
ooze_nutrition = clamp(ooze_nutrition + amount, 0, 500)
@@ -106,23 +112,20 @@
armour_penetration = 15
obj_damage = 20
death_message = "collapses into a pile of goo!"
///The ability to give yourself a metabolic speed boost which raises heat
var/datum/action/cooldown/metabolicboost/boost
///The ability to consume mobs
var/datum/action/consume/consume
///Initializes the mobs abilities and gives them to the mob
/mob/living/simple_animal/hostile/ooze/gelatinous/Initialize(mapload)
. = ..()
boost = new
boost.Grant(src)
consume = new
consume.Grant(src)
/mob/living/simple_animal/hostile/ooze/gelatinous/Destroy()
. = ..()
QDEL_NULL(boost)
QDEL_NULL(consume)
/mob/living/simple_animal/hostile/ooze/gelatinous/get_innate_actions()
var/static/list/innate_actions = list(
/datum/action/cooldown/metabolicboost,
)
return innate_actions
///If this mob gets resisted by something, its trying to escape consumption.
/mob/living/simple_animal/hostile/ooze/gelatinous/container_resist_act(mob/living/user)
@@ -284,15 +287,14 @@
obj_damage = 15
death_message = "deflates and spills its vital juices!"
edible_food_types = MEAT | VEGETABLES
ghost_controllable = TRUE //SKYRAT EDIT ADDITION - These guys can be helpful... maybe players will be helpful.
/mob/living/simple_animal/hostile/ooze/grapes/Initialize(mapload)
. = ..()
var/datum/action/cooldown/globules/glob_shooter = new(src)
glob_shooter.Grant(src)
var/datum/action/cooldown/gel_cocoon/gel_cocoon = new(src)
gel_cocoon.Grant(src)
/mob/living/simple_animal/hostile/ooze/grapes/get_innate_actions()
var/static/list/innate_actions = list(
/datum/action/cooldown/globules,
/datum/action/cooldown/gel_cocoon,
)
return innate_actions
/mob/living/simple_animal/hostile/ooze/grapes/add_cell_sample()
AddElement(/datum/element/swabable, CELL_LINE_TABLE_GRAPE, CELL_VIRUS_TABLE_GENERIC_MOB, 1, 5)
@@ -28,8 +28,7 @@
/mob/living/simple_animal/hostile/vatbeast/Initialize(mapload)
. = ..()
var/datum/action/cooldown/tentacle_slap/slapper = new(src)
slapper.Grant(src)
GRANT_ACTION(/datum/action/cooldown/tentacle_slap)
add_cell_sample()
AddComponent(/datum/component/tameable, list(/obj/item/food/fries, /obj/item/food/cheesyfries, /obj/item/food/cornchips, /obj/item/food/carrotfries), tame_chance = 30, bonus_tame_chance = 0, after_tame = CALLBACK(src, PROC_REF(tamed)))
@@ -57,12 +57,6 @@
blink.outer_tele_radius = 3
blink.Grant(src)
/mob/living/simple_animal/hostile/wizard/Destroy()
QDEL_NULL(fireball)
QDEL_NULL(magic_missile)
QDEL_NULL(blink)
return ..()
/mob/living/simple_animal/hostile/wizard/handle_automated_action()
. = ..()
if(target && next_cast < world.time)
@@ -164,8 +164,7 @@
amount_grown = 0
for(var/datum/action/innate/slime/evolve/E in actions)
E.Remove(src)
var/datum/action/innate/slime/reproduce/reproduce_action = new
reproduce_action.Grant(src)
GRANT_ACTION(/datum/action/innate/slime/reproduce)
regenerate_icons()
update_name()
else
+18
View File
@@ -560,3 +560,21 @@
raw_lines += recent_speech[key]
return raw_lines
/// Takes in an associated list (key `/datum/action` typepaths, value is the AI blackboard key) and handles granting the action and adding it to the mob's AI controller blackboard.
/// This is only useful in instances where you don't want to store the reference to the action on a variable on the mob.
/// You can set the value to null if you don't want to add it to the blackboard (like in player controlled instances). Is also safe with null AI controllers.
/// Assumes that the action will be initialized and held in the mob itself, which is typically standard.
/mob/proc/grant_actions_by_list(list/input)
if(length(input) <= 0)
return
for(var/action in input)
var/datum/action/ability = new action(src)
ability.Grant(src)
var/blackboard_key = input[action]
if(isnull(blackboard_key))
continue
ai_controller?.set_blackboard_key(blackboard_key, ability)
@@ -17,7 +17,7 @@
join_action.Remove(ghost)
return TRUE
var/datum/action/innate/join_soulcatcher/new_join_action = new
var/datum/action/innate/join_soulcatcher/new_join_action = new(ghost)
new_join_action.Grant(ghost)
return TRUE
@@ -95,7 +95,7 @@
to_chat(human_target, span_notice("Your body feels hotter..."))
if(5)
var/datum/action/cooldown/mob_cooldown/fire_breath/granted_action
granted_action = new()
granted_action = new(human_target)
granted_action.Grant(human_target)
to_chat(human_target, span_notice("Your throat feels larger..."))
if(6 to INFINITY)
@@ -40,14 +40,10 @@
/mob/living/simple_animal/hostile/blackmesa/xen/headcrab/Initialize(mapload)
. = ..()
charge = new /datum/action/cooldown/mob_cooldown/charge/basic_charge()
charge = new(src)
charge.Grant(src)
charge.cooldown_time = 0
/mob/living/simple_animal/hostile/blackmesa/xen/headcrab/Destroy()
QDEL_NULL(charge)
return ..()
/mob/living/simple_animal/hostile/blackmesa/xen/headcrab/Shoot(atom/targeted_atom)
throw_at(targeted_atom, throw_at_range, throw_at_speed)
playsound(
@@ -39,11 +39,11 @@
/mob/living/simple_animal/hostile/blackmesa/xen/houndeye/Initialize(mapload)
. = ..()
charge = new /datum/action/cooldown/mob_cooldown/charge/basic_charge()
charge = new(src)
charge.Grant(src)
/mob/living/simple_animal/hostile/blackmesa/xen/houndeye/Destroy()
QDEL_NULL(charge)
charge = null
return ..()
/mob/living/simple_animal/hostile/blackmesa/xen/houndeye/OpenFire()
@@ -119,7 +119,7 @@ GLOBAL_LIST_INIT(clockwork_slabs, list())
qdel(quick_bound_scriptures[position])
//Put the quickbound action onto the slab, the slab should grant when picked up
var/datum/action/innate/clockcult/quick_bind/quickbound = new
var/datum/action/innate/clockcult/quick_bind/quickbound = new(src)
quickbound.scripture = spell
quickbound.slab_weakref = WEAKREF(src)
quick_bound_scriptures[position] = quickbound
@@ -48,7 +48,7 @@ GLOBAL_LIST_EMPTY(clockwork_marauders)
if(length(loot))
AddElement(/datum/element/death_drops, loot)
var/datum/action/innate/clockcult/comm/communicate = new
var/datum/action/innate/clockcult/comm/communicate = new(src)
communicate.Grant(src)
GLOB.clockwork_marauders += src
@@ -261,7 +261,7 @@ GLOBAL_LIST_EMPTY(clock_scriptures_by_type)
/datum/scripture/slab/New()
. = ..()
pointed_spell = new
pointed_spell = new(src)
pointed_spell.name = src.name
pointed_spell.deactive_msg = ""
pointed_spell.parent_scripture = src
@@ -221,7 +221,7 @@ GLOBAL_LIST_EMPTY(cortical_borers)
reagent_holder = new /obj/item/reagent_containers/borer(src)
for(var/action_type in known_abilities)
var/datum/action/attack_action = new action_type()
var/datum/action/attack_action = new action_type(src)
attack_action.Grant(src)
if(mind)
@@ -107,5 +107,5 @@
/datum/borer_evolution/diveworm/empowered_offspring/on_evolve(mob/living/basic/cortical_borer/cortical_owner)
. = ..()
var/datum/action/cooldown/borer/empowered_offspring/attack_action = new()
var/datum/action/cooldown/borer/empowered_offspring/attack_action = new(cortical_owner)
attack_action.Grant(cortical_owner)
@@ -12,7 +12,7 @@
/datum/borer_evolution/hivelord/produce_offspring/on_evolve(mob/living/basic/cortical_borer/cortical_owner)
. = ..()
var/datum/action/cooldown/borer/produce_offspring/attack_action = new()
var/datum/action/cooldown/borer/produce_offspring/attack_action = new(cortical_owner)
attack_action.Grant(cortical_owner)
// T2
@@ -25,7 +25,7 @@
/datum/borer_evolution/hivelord/blood_chemical/on_evolve(mob/living/basic/cortical_borer/cortical_owner)
. = ..()
var/datum/action/cooldown/borer/learn_bloodchemical/attack_action = new()
var/datum/action/cooldown/borer/learn_bloodchemical/attack_action = new(cortical_owner)
attack_action.Grant(cortical_owner)
// T3
@@ -51,7 +51,7 @@
/datum/borer_evolution/hivelord/stealth_mode/on_evolve(mob/living/basic/cortical_borer/cortical_owner)
. = ..()
var/datum/action/cooldown/borer/stealth_mode/attack_action = new()
var/datum/action/cooldown/borer/stealth_mode/attack_action = new(cortical_owner)
attack_action.Grant(cortical_owner)
// T5
@@ -12,7 +12,7 @@
/datum/borer_evolution/symbiote/willing_host/on_evolve(mob/living/basic/cortical_borer/cortical_owner)
. = ..()
var/datum/action/cooldown/borer/willing_host/attack_action = new()
var/datum/action/cooldown/borer/willing_host/attack_action = new(cortical_owner)
attack_action.Grant(cortical_owner)
// T2
@@ -107,6 +107,6 @@
/datum/borer_evolution/symbiote/revive_host/on_evolve(mob/living/basic/cortical_borer/cortical_owner)
. = ..()
var/datum/action/cooldown/borer/revive_host/attack_action = new()
var/datum/action/cooldown/borer/revive_host/attack_action = new(cortical_owner)
attack_action.Grant(cortical_owner)
@@ -35,7 +35,6 @@
butcher_results = list(/obj/item/food/meat/slab/human = 15) //It's a pretty big dude. Actually killing one is a feat.
gold_core_spawnable = FALSE //Should stay exclusive to changelings tbh, otherwise makes it much less significant to sight one
var/datum/action/innate/turn_to_human
var/datum/action/innate/devour
var/transformed_time = 0
var/playstyle_string = span_infoplain("<b><font size=3 color='red'>We have entered our true form!</font> We are unbelievably powerful, and regenerate life at a steady rate. However, most of \
our abilities are useless in this form, and we must utilise the abilities that we have gained as a result of our transformation. Currently, we are incapable of returning to a human. \
@@ -51,10 +50,9 @@
/mob/living/simple_animal/hostile/true_changeling/Initialize(mapload)
. = ..()
to_chat(src, playstyle_string)
turn_to_human = new /datum/action/innate/turn_to_human
devour = new /datum/action/innate/devour
turn_to_human = new(src)
turn_to_human.Grant(src)
devour.Grant(src)
GRANT_ACTION(/datum/action/innate/devour)
ADD_TRAIT(src, TRAIT_VENTCRAWLER_ALWAYS, INNATE_TRAIT)
/mob/living/simple_animal/hostile/true_changeling/Life()
+2 -2
View File
@@ -10,8 +10,8 @@
/datum/quirk/hydra/add(client/client_source)
var/mob/living/carbon/human/hydra = quirk_holder
var/datum/action/innate/hydra/spell = new
var/datum/action/innate/hydrareset/resetspell = new
var/datum/action/innate/hydra/spell = new(hydra)
var/datum/action/innate/hydrareset/resetspell = new(hydra)
spell.Grant(hydra)
spell.owner = hydra
resetspell.Grant(hydra)
@@ -11,7 +11,7 @@
/datum/nifsoft/action_granter/activate()
. = ..()
if(active)
granted_action = new action_to_grant
granted_action = new action_to_grant(linked_mob)
granted_action.Grant(linked_mob)
return
@@ -34,7 +34,7 @@ GLOBAL_LIST_EMPTY(hivemind_users)
linker_action_path = /datum/action/innate/hivemind_config, \
)
keyboard_action = new
keyboard_action = new(linked_mob)
keyboard_action.Grant(linked_mob)
active_network = user_network
@@ -21,7 +21,7 @@
/datum/nifsoft/soulcatcher/New()
. = ..()
soulcatcher_action = new
soulcatcher_action = new(linked_mob)
soulcatcher_action.Grant(linked_mob)
soulcatcher_action.parent_nifsoft = WEAKREF(src)
@@ -466,5 +466,5 @@ GLOBAL_LIST_EMPTY(soulcatchers)
if(locate(/datum/action/innate/join_soulcatcher) in actions)
return
var/datum/action/innate/join_soulcatcher/new_join_action = new
var/datum/action/innate/join_soulcatcher/new_join_action = new(src)
new_join_action.Grant(src)
@@ -45,10 +45,10 @@
if(!outside_hearing)
ADD_TRAIT(src, TRAIT_DEAF, INNATE_TRAIT)
var/datum/action/innate/leave_soulcatcher/leave_action = new
var/datum/action/innate/leave_soulcatcher/leave_action = new(src)
leave_action.Grant(src)
var/datum/action/innate/soulcatcher_user/soulcatcher_action = new
var/datum/action/innate/soulcatcher_user/soulcatcher_action = new(src)
soulcatcher_action.Grant(src)
var/datum/component/soulcatcher_user/user_component = AddComponent(/datum/component/soulcatcher_user)
soulcatcher_action.soulcatcher_user_component = WEAKREF(user_component)
@@ -6,7 +6,7 @@
/obj/item/bloodcrawl_bottle/attack_self(mob/user)
to_chat(user, span_notice("You drink the contents of [src]."))
var/datum/action/cooldown/spell/jaunt/bloodcrawl/new_spell = new ()
var/datum/action/cooldown/spell/jaunt/bloodcrawl/new_spell = new(user)
new_spell.Grant(user)
user.log_message("learned the spell bloodcrawl ([new_spell])", LOG_ATTACK, color="orange")
qdel(src)
@@ -96,7 +96,7 @@
if(eyes)
eyes.eye_icon_state = "None"
screen = new
screen = new(transformer)
screen.Grant(transformer)
return
@@ -5,8 +5,6 @@
icon = 'modular_skyrat/modules/xenos_skyrat_redo/icons/big_xenos.dmi'
rotate_on_lying = FALSE
base_pixel_x = -16 //All of the xeno sprites are 64x64, and we want them to be level with the tile they are on, much like oversized quirk users
/// Holds the ability for quick resting without using the ic panel, and without editing xeno huds
var/datum/action/cooldown/alien/skyrat/sleepytime/rest_button
mob_size = MOB_SIZE_LARGE
layer = LARGE_MOB_LAYER //above most mobs, but below speechbubbles
plane = GAME_PLANE_UPPER_FOV_HIDDEN
@@ -17,8 +15,6 @@
var/alt_inhands_file = 'modular_skyrat/modules/xenos_skyrat_redo/icons/big_xenos.dmi'
/// Setting this will give a xeno generic_evolve set to evolve them into this type
var/next_evolution
/// Holds the ability for evolving into whatever type next_evolution is set to
var/datum/action/cooldown/alien/skyrat/generic_evolve/evolve_ability
/// Keeps track of if a xeno has evolved recently, if so then we prevent them from evolving until that time is up
var/has_evolved_recently = FALSE
/// How long xenos should be unable to evolve after recently evolving
@@ -35,24 +31,15 @@
. = ..()
AddComponent(/datum/component/seethrough_mob)
rest_button = new /datum/action/cooldown/alien/skyrat/sleepytime()
rest_button.Grant(src)
GRANT_ACTION(/datum/action/cooldown/alien/skyrat/sleepytime)
if(next_evolution)
evolve_ability = new /datum/action/cooldown/alien/skyrat/generic_evolve()
evolve_ability.Grant(src)
GRANT_ACTION(/datum/action/cooldown/alien/skyrat/generic_evolve)
pixel_x = -16
ADD_TRAIT(src, TRAIT_XENO_HEAL_AURA, TRAIT_XENO_INNATE)
real_name = "alien [caste]"
/mob/living/carbon/alien/adult/skyrat/Destroy()
QDEL_NULL(rest_button)
if(evolve_ability)
QDEL_NULL(evolve_ability)
return ..()
/// Called when a larva or xeno evolves, adds a configurable timer on evolving again to the xeno
/mob/living/carbon/alien/adult/skyrat/proc/has_just_evolved()
if(has_evolved_recently)
@@ -9,29 +9,20 @@
icon_state = "aliendefender"
melee_damage_lower = 25
melee_damage_upper = 30
/// Holds the basic charge ability that the defender will be granted
var/datum/action/cooldown/mob_cooldown/charge/basic_charge/defender/charge
/// Holds the wrecking ball tail sweep that the defender will be granted
var/datum/action/cooldown/spell/aoe/repulse/xeno/skyrat_tailsweep/tail_sweep
next_evolution = /mob/living/carbon/alien/adult/skyrat/warrior
/mob/living/carbon/alien/adult/skyrat/defender/Initialize(mapload)
. = ..()
tail_sweep = new /datum/action/cooldown/spell/aoe/repulse/xeno/skyrat_tailsweep()
tail_sweep.Grant(src)
charge = new /datum/action/cooldown/mob_cooldown/charge/basic_charge/defender()
charge.Grant(src)
var/static/list/innate_actions = list(
/datum/action/cooldown/spell/aoe/repulse/xeno/skyrat_tailsweep,
/datum/action/cooldown/mob_cooldown/charge/basic_charge/defender,
)
grant_actions_by_list(innate_actions)
REMOVE_TRAIT(src, TRAIT_VENTCRAWLER_ALWAYS, INNATE_TRAIT)
add_movespeed_modifier(/datum/movespeed_modifier/alien_heavy)
/mob/living/carbon/alien/adult/skyrat/defender/Destroy()
QDEL_NULL(charge)
QDEL_NULL(tail_sweep)
return ..()
/mob/living/carbon/alien/adult/skyrat/defender/create_internal_organs()
organs += new /obj/item/organ/internal/alien/plasmavessel/small
..()
@@ -7,20 +7,13 @@
maxHealth = 200
health = 200
icon_state = "aliendrone"
/// Holds the healing aura ability the drone will be granted
var/datum/action/cooldown/alien/skyrat/heal_aura/heal_aura_ability
melee_damage_lower = 15
melee_damage_upper = 20
next_evolution = /mob/living/carbon/alien/adult/skyrat/praetorian
/mob/living/carbon/alien/adult/skyrat/drone/Initialize(mapload)
. = ..()
heal_aura_ability = new /datum/action/cooldown/alien/skyrat/heal_aura()
heal_aura_ability.Grant(src)
/mob/living/carbon/alien/adult/skyrat/drone/Destroy()
QDEL_NULL(heal_aura_ability)
return ..()
GRANT_ACTION(/datum/action/cooldown/alien/skyrat/heal_aura)
/mob/living/carbon/alien/adult/skyrat/drone/create_internal_organs()
organs += new /obj/item/organ/internal/alien/plasmavessel
@@ -59,6 +52,8 @@
return TRUE
/datum/action/cooldown/alien/skyrat/heal_aura/proc/aura_deactivate()
if(!aura_active)
return
aura_active = FALSE
QDEL_NULL(aura_healing_component)
owner.balloon_alert(owner, "healing aura ended")
@@ -7,30 +7,22 @@
maxHealth = 400
health = 400
icon_state = "alienpraetorian"
/// Holds the improved healing aura ability to be granted to the praetorian later
var/datum/action/cooldown/alien/skyrat/heal_aura/juiced/heal_aura_ability
/// Holds the less lethal tail sweep ability to be granted to the praetorian later
var/datum/action/cooldown/spell/aoe/repulse/xeno/skyrat_tailsweep/hard_throwing/tail_sweep
melee_damage_lower = 25
melee_damage_upper = 30
next_evolution = /mob/living/carbon/alien/adult/skyrat/queen
/mob/living/carbon/alien/adult/skyrat/praetorian/Initialize(mapload)
. = ..()
heal_aura_ability = new /datum/action/cooldown/alien/skyrat/heal_aura/juiced()
heal_aura_ability.Grant(src)
tail_sweep = new /datum/action/cooldown/spell/aoe/repulse/xeno/skyrat_tailsweep/hard_throwing()
tail_sweep.Grant(src)
var/static/list/innate_actions = list(
/datum/action/cooldown/alien/skyrat/heal_aura/juiced,
/datum/action/cooldown/spell/aoe/repulse/xeno/skyrat_tailsweep/hard_throwing,
)
grant_actions_by_list(innate_actions)
REMOVE_TRAIT(src, TRAIT_VENTCRAWLER_ALWAYS, INNATE_TRAIT)
add_movespeed_modifier(/datum/movespeed_modifier/alien_big)
/mob/living/carbon/alien/adult/skyrat/praetorian/Destroy()
QDEL_NULL(heal_aura_ability)
return ..()
/mob/living/carbon/alien/adult/skyrat/praetorian/create_internal_organs()
organs += new /obj/item/organ/internal/alien/plasmavessel/large
organs += new /obj/item/organ/internal/alien/neurotoxin/spitter
@@ -7,30 +7,21 @@
maxHealth = 500
health = 500
icon_state = "alienqueen"
/// Holds the less lethal tail sweep ability to be granted to the queen later
var/datum/action/cooldown/spell/aoe/repulse/xeno/skyrat_tailsweep/hard_throwing/tail_sweep
/// Holds the queen screech ability to be granted to her later
var/datum/action/cooldown/alien/skyrat/queen_screech/screech
melee_damage_lower = 30
melee_damage_upper = 35
/mob/living/carbon/alien/adult/skyrat/queen/Initialize(mapload)
. = ..()
tail_sweep = new /datum/action/cooldown/spell/aoe/repulse/xeno/skyrat_tailsweep/hard_throwing()
tail_sweep.Grant(src)
screech = new /datum/action/cooldown/alien/skyrat/queen_screech()
screech.Grant(src)
var/static/list/innate_actions = list(
/datum/action/cooldown/spell/aoe/repulse/xeno/skyrat_tailsweep/hard_throwing,
/datum/action/cooldown/alien/skyrat/queen_screech,
)
grant_actions_by_list(innate_actions)
REMOVE_TRAIT(src, TRAIT_VENTCRAWLER_ALWAYS, INNATE_TRAIT)
add_movespeed_modifier(/datum/movespeed_modifier/alien_big)
/mob/living/carbon/alien/adult/skyrat/queen/Destroy()
QDEL_NULL(tail_sweep)
QDEL_NULL(screech)
return ..()
/mob/living/carbon/alien/adult/skyrat/queen/create_internal_organs()
organs += new /obj/item/organ/internal/alien/plasmavessel/large/queen
organs += new /obj/item/organ/internal/alien/resinspinner
@@ -9,35 +9,20 @@
maxHealth = 350
health = 350
icon_state = "alienravager"
/// Holds the triple charge ability to be granted to the ravager later
var/datum/action/cooldown/mob_cooldown/charge/triple_charge/ravager/triple_charge
/// Holds the slicing tail sweep ability to be granted to the ravager later
var/datum/action/cooldown/spell/aoe/repulse/xeno/skyrat_tailsweep/slicing/tailsweep_slice
/// Holds the endure ability to be granted to the ravager later
var/datum/action/cooldown/alien/skyrat/literally_too_angry_to_die/you_cant_hurt_me_jack
melee_damage_lower = 30
melee_damage_upper = 35
/mob/living/carbon/alien/adult/skyrat/ravager/Initialize(mapload)
. = ..()
tailsweep_slice = new /datum/action/cooldown/spell/aoe/repulse/xeno/skyrat_tailsweep/slicing()
tailsweep_slice.Grant(src)
you_cant_hurt_me_jack = new /datum/action/cooldown/alien/skyrat/literally_too_angry_to_die()
you_cant_hurt_me_jack.Grant(src)
triple_charge = new /datum/action/cooldown/mob_cooldown/charge/triple_charge/ravager()
triple_charge.Grant(src)
var/static/list/innate_actions = list(
/datum/action/cooldown/spell/aoe/repulse/xeno/skyrat_tailsweep/slicing,
/datum/action/cooldown/alien/skyrat/literally_too_angry_to_die,
/datum/action/cooldown/mob_cooldown/charge/triple_charge/ravager,
)
grant_actions_by_list(innate_actions)
REMOVE_TRAIT(src, TRAIT_VENTCRAWLER_ALWAYS, INNATE_TRAIT)
/mob/living/carbon/alien/adult/skyrat/ravager/Destroy()
//QDEL_NULL(triple_charge)
QDEL_NULL(tailsweep_slice)
QDEL_NULL(you_cant_hurt_me_jack)
QDEL_NULL(triple_charge)
return ..()
/mob/living/carbon/alien/adult/skyrat/ravager/create_internal_organs()
organs += new /obj/item/organ/internal/alien/plasmavessel
..()
@@ -20,15 +20,11 @@
/mob/living/carbon/alien/adult/skyrat/runner/Initialize(mapload)
. = ..()
AddComponent(/datum/component/tackler, stamina_cost = 0, base_knockdown = 2, range = 10, speed = 2, skill_mod = 7, min_distance = 0)
evade_ability = new /datum/action/cooldown/alien/skyrat/evade()
evade_ability = new(src)
evade_ability.Grant(src)
add_movespeed_modifier(/datum/movespeed_modifier/alien_quick)
/mob/living/carbon/alien/adult/skyrat/runner/Destroy()
QDEL_NULL(evade_ability)
return ..()
/mob/living/carbon/alien/adult/skyrat/runner/create_internal_organs()
organs += new /obj/item/organ/internal/alien/plasmavessel/small/tiny
..()
@@ -9,34 +9,20 @@
icon_state = "alienwarrior"
melee_damage_lower = 30
melee_damage_upper = 35
/// Holds the charge ability that will be given to the warrior later
var/datum/action/cooldown/mob_cooldown/charge/basic_charge/defender/charge
/// Holds the tail sweep ability that will be given to the warrior later
var/datum/action/cooldown/spell/aoe/repulse/xeno/skyrat_tailsweep/tail_sweep
/// Holds the agility ability that will be given to the warrior later
var/datum/action/cooldown/alien/skyrat/warrior_agility/agility
/mob/living/carbon/alien/adult/skyrat/warrior/Initialize(mapload)
. = ..()
tail_sweep = new /datum/action/cooldown/spell/aoe/repulse/xeno/skyrat_tailsweep()
tail_sweep.Grant(src)
charge = new /datum/action/cooldown/mob_cooldown/charge/basic_charge/defender()
charge.Grant(src)
agility = new /datum/action/cooldown/alien/skyrat/warrior_agility()
agility.Grant(src)
var/static/list/innate_actions = list(
/datum/action/cooldown/spell/aoe/repulse/xeno/skyrat_tailsweep,
/datum/action/cooldown/mob_cooldown/charge/basic_charge/defender,
/datum/action/cooldown/alien/skyrat/warrior_agility,
)
grant_actions_by_list(innate_actions)
REMOVE_TRAIT(src, TRAIT_VENTCRAWLER_ALWAYS, INNATE_TRAIT)
add_movespeed_modifier(/datum/movespeed_modifier/alien_big)
/mob/living/carbon/alien/adult/skyrat/warrior/Destroy()
QDEL_NULL(charge)
QDEL_NULL(tail_sweep)
QDEL_NULL(agility)
return ..()
/mob/living/carbon/alien/adult/skyrat/warrior/create_internal_organs()
organs += new /obj/item/organ/internal/alien/plasmavessel
..()
+1 -1
View File
@@ -4517,11 +4517,11 @@
#include "code\modules\mob\living\basic\farm_animals\gorilla\gorilla_accessories.dm"
#include "code\modules\mob\living\basic\farm_animals\gorilla\gorilla_ai.dm"
#include "code\modules\mob\living\basic\farm_animals\gorilla\gorilla_emotes.dm"
#include "code\modules\mob\living\basic\heretic\_heretic_summon.dm"
#include "code\modules\mob\living\basic\heretic\ash_spirit.dm"
#include "code\modules\mob\living\basic\heretic\fire_shark.dm"
#include "code\modules\mob\living\basic\heretic\flesh_stalker.dm"
#include "code\modules\mob\living\basic\heretic\flesh_worm.dm"
#include "code\modules\mob\living\basic\heretic\heretic_summon.dm"
#include "code\modules\mob\living\basic\heretic\maid_in_the_mirror.dm"
#include "code\modules\mob\living\basic\heretic\raw_prophet.dm"
#include "code\modules\mob\living\basic\heretic\rust_walker.dm"