From dcaa0fda4aa33427e73f7ca1ede67521539fb938 Mon Sep 17 00:00:00 2001 From: NPC1314 <110836368+NPC1314@users.noreply.github.com> Date: Thu, 12 Dec 2024 19:23:00 +0100 Subject: [PATCH] Mob stuff (#1239) * mobs * somemore * more ai * Update stonekeep.dme * Update bloodcrawl.dm --- code/__DEFINES/ai/hostile.dm | 2 + code/datums/ai/behaviours/run_from_target.dm | 51 +- .../ai/behaviours/use_targeted_ability.dm | 50 ++ .../ai/subtrees/targeted_ability_use.dm | 28 + code/datums/outdoor_datum.dm | 1 + code/game/area/roguetownareas.dm | 2 +- .../objects/effects/spawners/roguemapgen.dm | 212 +++---- .../mob/living/carbon/human/npc/_npc.dm | 2 +- .../mob/living/carbon/human/npc/bum.dm | 92 --- .../carbon/human/npc/stonekeep_carbons.dm | 593 ++++++++++++++++++ .../simple_animal/rogue/creacher/bigrat.dm | 2 +- .../simple_animal/rogue/creacher/headless.dm | 2 +- .../simple_animal/rogue/creacher/lamia.dm | 8 +- .../simple_animal/rogue/creacher/mole.dm | 2 +- .../simple_animal/rogue/creacher/troll.dm | 2 +- .../simple_animal/rogue/creacher/trollbog.dm | 4 +- .../simple_animal/rogue/creacher/volf.dm | 4 +- code/modules/spells/spell_types/bloodcrawl.dm | 3 +- stonekeep.dme | 3 + 19 files changed, 839 insertions(+), 224 deletions(-) create mode 100644 code/datums/ai/behaviours/use_targeted_ability.dm create mode 100644 code/datums/ai/subtrees/targeted_ability_use.dm create mode 100644 code/modules/mob/living/carbon/human/npc/stonekeep_carbons.dm diff --git a/code/__DEFINES/ai/hostile.dm b/code/__DEFINES/ai/hostile.dm index 64a0e1a352..1d9c7978de 100644 --- a/code/__DEFINES/ai/hostile.dm +++ b/code/__DEFINES/ai/hostile.dm @@ -34,6 +34,7 @@ ///Basic Mob Keys ///Targetting subtrees +#define BB_TARGETED_ACTION "BB_targeted_action" #define BB_BASIC_MOB_CURRENT_TARGET "BB_basic_current_target" #define BB_BASIC_MOB_CURRENT_TARGET_HIDING_LOCATION "BB_basic_current_target_hiding_location" #define BB_TARGETTING_DATUM "targetting_datum" @@ -50,6 +51,7 @@ /// Flag to set on or off if you want your mob to prioritise running away #define BB_BASIC_MOB_FLEEING "BB_basic_fleeing" +#define BB_BASIC_MOB_NEXT_FLEEING "BB_nex_flee" ///List of mobs who have damaged us #define BB_BASIC_MOB_RETALIATE_LIST "BB_basic_mob_shitlist" diff --git a/code/datums/ai/behaviours/run_from_target.dm b/code/datums/ai/behaviours/run_from_target.dm index d5dfc13117..dc024a8bf7 100644 --- a/code/datums/ai/behaviours/run_from_target.dm +++ b/code/datums/ai/behaviours/run_from_target.dm @@ -1,3 +1,27 @@ +/** + * Get ranged target turf, but with direct targets as opposed to directions + * + * Starts at atom starting_atom and gets the exact angle between starting_atom and target + * Moves from starting_atom with that angle, Range amount of times, until it stops, bound to map size + * Arguments: + * * starting_atom - Initial Firer / Position + * * target - Target to aim towards + * * range - Distance of returned target turf from starting_atom + * * offset - Angle offset, 180 input would make the returned target turf be in the opposite direction + */ +/proc/get_ranged_target_turf_direct(atom/starting_atom, atom/target, range, offset) + var/angle = ATAN2(target.x - starting_atom.x, target.y - starting_atom.y) + if(offset) + angle += offset + var/turf/starting_turf = get_turf(starting_atom) + for(var/i in 1 to range) + var/turf/check = locate(starting_atom.x + cos(angle) * i, starting_atom.y + sin(angle) * i, starting_atom.z) + if(!check) + break + starting_turf = check + + return starting_turf + // Move to a position further away from your current target /datum/ai_behavior/run_away_from_target required_distance = 0 @@ -29,10 +53,31 @@ plot_path_away_from(controller, target) /datum/ai_behavior/run_away_from_target/proc/plot_path_away_from(datum/ai_controller/controller, atom/target) - var/run_direction = get_dir(controller.pawn, get_step_away(controller.pawn, target)) - var/turf/target_destination = get_ranged_target_turf(controller.pawn, run_direction, run_distance) - controller.set_movement_target(target_destination) + var/turf/target_destination = get_turf(controller.pawn) + var/static/list/offset_angles = list(45, 90, 135, 180, 225, 270) + for(var/angle in offset_angles) + var/turf/test_turf = get_furthest_turf(controller.pawn, angle, target) + if(isnull(test_turf)) + continue + var/distance_from_target = get_dist(target, test_turf) + if(distance_from_target <= get_dist(target, target_destination)) + continue + target_destination = test_turf + if(distance_from_target == run_distance) //we already got the max running distance + break + if (target_destination == get_turf(controller.pawn)) + return FALSE + set_movement_target(controller, target_destination) + return TRUE +/datum/ai_behavior/run_away_from_target/proc/get_furthest_turf(atom/source, angle, atom/target) + var/turf/return_turf + for(var/i in 1 to run_distance) + var/turf/test_destination = get_ranged_target_turf_direct(source, target, range = i, offset = angle) + if(is_blocked_turf(test_destination, exclude_mobs = !source.density)) + break + return_turf = test_destination + return return_turf /datum/ai_behavior/run_away_from_target/until_destination until_destination = TRUE diff --git a/code/datums/ai/behaviours/use_targeted_ability.dm b/code/datums/ai/behaviours/use_targeted_ability.dm new file mode 100644 index 0000000000..a24a69575c --- /dev/null +++ b/code/datums/ai/behaviours/use_targeted_ability.dm @@ -0,0 +1,50 @@ +/** + * # Targeted Mob Ability + * Attempts to use a mob's cooldown ability on a target + */ +/datum/ai_behavior/targeted_mob_ability + +/datum/ai_behavior/targeted_mob_ability/perform(seconds_per_tick, datum/ai_controller/controller, ability_key, target_key) + var/obj/effect/proc_holder/spell/ability = controller.blackboard[ability_key] + var/mob/living/target = controller.blackboard[target_key] + if(QDELETED(ability) || QDELETED(target)) + finish_action(controller, FALSE, ability_key, target_key) + return + var/mob/pawn = controller.pawn + pawn.face_atom(target) + var/result = ability.perform(targets = list(target), user = controller.pawn) + finish_action(controller, result, ability_key, target_key) + +/datum/ai_behavior/targeted_mob_ability/finish_action(datum/ai_controller/controller, succeeded, ability_key, target_key) + . = ..() + var/atom/target = controller.blackboard[target_key] + if (QDELETED(target)) + controller.clear_blackboard_key(target_key) + +/** + * # Try Mob Ability and clear target + * Attempts to use a mob's cooldown ability on a target and releases the target when the action completes + */ +/datum/ai_behavior/targeted_mob_ability/and_clear_target + +/datum/ai_behavior/targeted_mob_ability/and_clear_target/finish_action(datum/ai_controller/controller, succeeded, ability_key, target_key) + . = ..() + controller.clear_blackboard_key(target_key) + +/datum/ai_behavior/targeted_mob_ability/proc/get_ability_to_use(datum/ai_controller/controller, ability_key) + return controller.blackboard[ability_key] + +/** + * Attempts to move into the provided range and then use a mob's cooldown ability on a target + */ +/datum/ai_behavior/targeted_mob_ability/min_range + required_distance = 6 + behavior_flags = AI_BEHAVIOR_REQUIRE_MOVEMENT + var/datum/ai_movement/new_movement + +/datum/ai_behavior/targeted_mob_ability/min_range/setup(datum/ai_controller/controller, ability_key, target_key) + . = ..() + var/atom/target = controller.blackboard[target_key] + if(QDELETED(target)) + return FALSE + set_movement_target(controller, target, new_movement) diff --git a/code/datums/ai/subtrees/targeted_ability_use.dm b/code/datums/ai/subtrees/targeted_ability_use.dm new file mode 100644 index 0000000000..653d866394 --- /dev/null +++ b/code/datums/ai/subtrees/targeted_ability_use.dm @@ -0,0 +1,28 @@ +/// Attempts to use a mob ability on a target +/datum/ai_planning_subtree/targeted_mob_ability + /// Blackboard key for the ability + var/ability_key = BB_TARGETED_ACTION + /// Blackboard key for where the target ref is stored + var/target_key = BB_BASIC_MOB_CURRENT_TARGET + /// Behaviour to perform using ability + var/use_ability_behaviour = /datum/ai_behavior/targeted_mob_ability + /// If true we terminate planning after trying to use the ability. + var/finish_planning = TRUE + +/datum/ai_planning_subtree/targeted_mob_ability/SelectBehaviors(datum/ai_controller/controller, seconds_per_tick) + if (!ability_key) + CRASH("You forgot to tell this mob where to find its ability") + + if (!(target_key in controller.blackboard)) + return + + var/obj/effect/proc_holder/spell/using_action = controller.blackboard[ability_key] + if (!using_action?.recharging) + return + + controller.queue_behavior(use_ability_behaviour, ability_key, target_key) + if (finish_planning) + return SUBTREE_RETURN_FINISH_PLANNING + +/datum/ai_planning_subtree/targeted_mob_ability/continue_planning + finish_planning = FALSE diff --git a/code/datums/outdoor_datum.dm b/code/datums/outdoor_datum.dm index 02ea0c1215..38dfb7c0cd 100644 --- a/code/datums/outdoor_datum.dm +++ b/code/datums/outdoor_datum.dm @@ -120,6 +120,7 @@ Sunlight System for(var/obj/structure/thing in src.contents) // Checks to see if weatherproof objects on the tile if(thing.weatherproof == TRUE) .["WEATHERPROOF"] = TRUE // returns true to block the weather + .["SKYVISIBLE"] = FALSE return . .["WEATHERPROOF"] = weatherproof //If we are air or space, we aren't weatherproof else //We are open, so assume open to the elements diff --git a/code/game/area/roguetownareas.dm b/code/game/area/roguetownareas.dm index 3d204ad6b6..00ae620237 100644 --- a/code/game/area/roguetownareas.dm +++ b/code/game/area/roguetownareas.dm @@ -158,7 +158,7 @@ GLOBAL_LIST_INIT(roguetown_areas_typecache, typecacheof(/area/rogue/indoors/town /turf/open/floor/rogue/cobblerock) /area/rogue/outdoors/rtfield/outlaw - ambush_mobs = list(/mob/living/carbon/human/species/human/northern/bum/outlaw = 50) + ambush_mobs = list(/mob/living/carbon/human/species/human/northern/bum/skilled/outlaw = 50) name = "outlaw hideout" color = "#e9baa3" first_time_text = null diff --git a/code/game/objects/effects/spawners/roguemapgen.dm b/code/game/objects/effects/spawners/roguemapgen.dm index d76b32655a..c4200fbd38 100644 --- a/code/game/objects/effects/spawners/roguemapgen.dm +++ b/code/game/objects/effects/spawners/roguemapgen.dm @@ -293,14 +293,14 @@ /mob/living/carbon/human/species/human/northern/bum/ambush = 25, ) -/* .................. Ancient Tomb Danger ................... */ +/* .................. Skeleton Fighter Danger ................... */ /obj/effect/spawner/roguemap/ancientskellyguardmaybe icon = 'icons/roguetown/mob/skeleton_male.dmi' icon_state = "z" probby = 50 color = "#ff0000" spawned = list( - /obj/structure/idle_enemy/ancient_skeleton_guard = 100 + /obj/structure/idle_enemy/skeleton_fighter = 100 ) /* .................. Beggar Danger ................... */ @@ -383,25 +383,17 @@ spawned = list( /obj/structure/idle_enemy/hairy_spider = 100 ) -/* .................. Orc Warband Danger ................... */ -/obj/effect/spawner/roguemap/orc_warrior_maybe - icon = 'icons/roguetown/mob/monster/simple_orcs.dmi' - icon_state = "orcmarauder_spear" - probby = 50 - color = "#ff0000" - spawned = list( - /obj/structure/idle_enemy/orc_warrior = 65, - /obj/structure/idle_enemy/orc_spearman = 35 ) -/* .................. Orc Warband Danger Carbon ................... */ + +/* .................. Savage Orc Danger Carbon ................... */ /obj/effect/spawner/roguemap/orc_warrior_carbon_maybe icon = 'icons/roguetown/mob/monster/simple_orcs.dmi' icon_state = "orcmarauder_spear" probby = 50 color = "#ff5858" spawned = list( - /obj/structure/idle_enemy/orc_c_warrior = 65, - /obj/structure/idle_enemy/orc_c_marauder = 35 ) + /obj/structure/idle_enemy/savage_orc = 65, + /obj/structure/idle_enemy/savage_orc_looter = 35 ) /obj/effect/spawner/roguemap/orc_warlord_carbon icon = 'icons/roguetown/mob/monster/simple_orcs.dmi' @@ -409,7 +401,7 @@ probby = 100 color = "#ff0000" spawned = list( - /obj/structure/idle_enemy/orc_c_warlord = 100 ) + /obj/structure/idle_enemy/savage_orc_chieftain = 100 ) /* .................. Haunts Danger ................... */ @@ -439,6 +431,16 @@ spawned = list( /obj/structure/idle_enemy/volf= 100 ) +/* .................. Cabbit Cottage Danger ................... */ +/obj/effect/spawner/roguemap/cabbit_maybe + icon = 'icons/roguetown/mob/cabbit.dmi' + icon_state = "cabbit" + probby = 100 + color = "#ff0000" + spawned = list( + /obj/structure/idle_enemy/cabbit_boss= 50, + /mob/living/simple_animal/pet/cat/rogue/cabbit = 50 ) + // =================================================================================== /* .................. Idle Enemy Spawner ................... */ @@ -451,94 +453,82 @@ layer = BELOW_OBJ_LAYER mouse_opacity = MOUSE_OPACITY_TRANSPARENT -/obj/structure/idle_enemy/ancient_skeleton_guard -/obj/structure/idle_enemy/ancient_skeleton_guard/Initialize() - . = ..() - AddComponent(/datum/component/spawner/ancient_skeleton_guard) -/datum/component/spawner/ancient_skeleton_guard -// mob_types = list(/mob/living/carbon/human/species/skeleton/npc/ancient) - spawn_time = 0 - spawn_delay = 0 - max_mobs = 1 - range = 11 - spawn_text = "" -/* .................. Big Rat Spawner ................... */ -/obj/structure/idle_enemy/bigrat -/obj/structure/idle_enemy/bigrat/Initialize() +// *** CARBONS *** +/* .................. Skeleton Fighter Spawner ................... */ +/obj/structure/idle_enemy/skeleton_fighter +/obj/structure/idle_enemy/skeleton_fighter/Initialize() . = ..() - AddComponent(/datum/component/spawner/bigrat) -/datum/component/spawner/bigrat - mob_types = list(/mob/living/simple_animal/hostile/retaliate/rogue/bigrat) + AddComponent(/datum/component/spawner/skeleton_fighter) +/datum/component/spawner/skeleton_fighter + mob_types = list(/mob/living/carbon/human/species/skeleton/skilled/fighter) spawn_time = 0 spawn_delay = 0 max_mobs = 1 range = 11 spawn_text = "" -/* .................. Hostile Bum Spawner ................... */ -/obj/structure/idle_enemy/hostile_bum -/obj/structure/idle_enemy/hostile_bum/Initialize() +/* .................. Orc Carbons Spawner ................... */ +/obj/structure/idle_enemy/savage_orc +/obj/structure/idle_enemy/savage_orc/Initialize() . = ..() - AddComponent(/datum/component/spawner/hostile_bum) -/datum/component/spawner/hostile_bum - mob_types = list(/mob/living/carbon/human/species/human/northern/bum/ambush) + AddComponent(/datum/component/spawner/savage_orc) +/datum/component/spawner/savage_orc + mob_types = list(/mob/living/carbon/human/species/orc/skilled/savage) spawn_time = 0 spawn_delay = 0 max_mobs = 1 range = 11 spawn_text = "" -/* .................. Lesser Mole Spawner ................... */ -/obj/structure/idle_enemy/mole -/obj/structure/idle_enemy/mole/Initialize() +/obj/structure/idle_enemy/savage_orc_looter +/obj/structure/idle_enemy/savage_orc_looter/Initialize() . = ..() - AddComponent(/datum/component/spawner/mole) -/datum/component/spawner/mole - mob_types = list(/mob/living/simple_animal/hostile/retaliate/rogue/mole) + AddComponent(/datum/component/spawner/savage_orc_looter) +/datum/component/spawner/savage_orc_looter + mob_types = list(/mob/living/carbon/human/species/orc/skilled/looter) spawn_time = 0 spawn_delay = 0 max_mobs = 1 range = 11 spawn_text = "" -/* .................. Weak Skelly Spawner ................... */ -/obj/structure/idle_enemy/weak_skelly -/obj/structure/idle_enemy/weak_skelly/Initialize() +/obj/structure/idle_enemy/savage_orc_chieftain +/obj/structure/idle_enemy/savage_orc_chieftain/Initialize() . = ..() - AddComponent(/datum/component/spawner/weak_skelly) -/datum/component/spawner/weak_skelly - mob_types = list(/mob/living/simple_animal/hostile/rogue/skeleton) + AddComponent(/datum/component/spawner/savage_orc_chieftain) +/datum/component/spawner/savage_orc_chieftain + mob_types = list(/mob/living/carbon/human/species/orc/skilled/savage_chieftain) spawn_time = 0 spawn_delay = 0 max_mobs = 1 range = 11 spawn_text = "" -/* .................. Lamia Spawner ................... */ -/obj/structure/idle_enemy/lamia -/obj/structure/idle_enemy/lamia/Initialize() +/* .................. Hostile Bum Spawner ................... */ +/obj/structure/idle_enemy/hostile_bum +/obj/structure/idle_enemy/hostile_bum/Initialize() . = ..() - AddComponent(/datum/component/spawner/lamia) -/datum/component/spawner/lamia - mob_types = list(/mob/living/simple_animal/hostile/retaliate/rogue/lamia) + AddComponent(/datum/component/spawner/hostile_bum) +/datum/component/spawner/hostile_bum + mob_types = list(/mob/living/carbon/human/species/human/northern/bum/skilled/madman) spawn_time = 0 spawn_delay = 0 max_mobs = 1 - range = 10 + range = 11 spawn_text = "" -/* .................. Headless Spawner ................... */ -/obj/structure/idle_enemy/headless -/obj/structure/idle_enemy/headless/Initialize() +/* .................. Weak Skelly Spawner ................... */ +/obj/structure/idle_enemy/weak_skelly +/obj/structure/idle_enemy/weak_skelly/Initialize() . = ..() - AddComponent(/datum/component/spawner/headless) -/datum/component/spawner/headless - mob_types = list(/mob/living/simple_animal/hostile/retaliate/rogue/headless) + AddComponent(/datum/component/spawner/weak_skelly) +/datum/component/spawner/weak_skelly + mob_types = list(/mob/living/carbon/human/species/skeleton/skilled/unarmed) spawn_time = 0 spawn_delay = 0 max_mobs = 1 - range = 10 + range = 11 spawn_text = "" /* .................. Zizombie Farmer Spawner ................... */ @@ -553,82 +543,89 @@ max_mobs = 1 range = 11 spawn_text = "" -/* .................. Hairy Spider Spawner ................... */ -/obj/structure/idle_enemy/hairy_spider -/obj/structure/idle_enemy/hairy_spider/Initialize() + + +/* .................. Outlaw Spawner ................... */ +/obj/structure/idle_enemy/outlaw +/obj/structure/idle_enemy/outlaw/Initialize() . = ..() - AddComponent(/datum/component/spawner/hairy_spider) -/datum/component/spawner/hairy_spider - mob_types = list(/mob/living/simple_animal/hostile/retaliate/rogue/spider/colony) + AddComponent(/datum/component/spawner/outlaw) +/datum/component/spawner/outlaw + mob_types = list(/mob/living/carbon/human/species/human/northern/bum/skilled/outlaw ) spawn_time = 0 spawn_delay = 0 max_mobs = 1 range = 11 spawn_text = "" -/* .................. Orc Warband Spawner ................... */ -/obj/structure/idle_enemy/orc_warrior -/obj/structure/idle_enemy/orc_warrior/Initialize() + + +// *** SIMPLE ANIMALS *** +/* .................. Big Rat Spawner ................... */ +/obj/structure/idle_enemy/bigrat +/obj/structure/idle_enemy/bigrat/Initialize() . = ..() - AddComponent(/datum/component/spawner/orc_warrior) -/datum/component/spawner/orc_warrior - mob_types = list(/mob/living/simple_animal/hostile/rogue/orc/orc_marauder) + AddComponent(/datum/component/spawner/bigrat) +/datum/component/spawner/bigrat + mob_types = list(/mob/living/simple_animal/hostile/retaliate/rogue/bigrat) spawn_time = 0 spawn_delay = 0 max_mobs = 1 range = 11 spawn_text = "" -/obj/structure/idle_enemy/orc_spearman -/obj/structure/idle_enemy/orc_spearman/Initialize() +/* .................. Lesser Mole Spawner ................... */ +/obj/structure/idle_enemy/mole +/obj/structure/idle_enemy/mole/Initialize() . = ..() - AddComponent(/datum/component/spawner/orc_spearman) -/datum/component/spawner/orc_spearman - mob_types = list(/mob/living/simple_animal/hostile/rogue/orc/orc_marauder/spear) + AddComponent(/datum/component/spawner/mole) +/datum/component/spawner/mole + mob_types = list(/mob/living/simple_animal/hostile/retaliate/rogue/mole) spawn_time = 0 spawn_delay = 0 max_mobs = 1 range = 11 spawn_text = "" -/* .................. Orc Carbons Spawner ................... */ -/obj/structure/idle_enemy/orc_c_warrior -/obj/structure/idle_enemy/orc_c_warrior/Initialize() +/* .................. Lamia Spawner ................... */ +/obj/structure/idle_enemy/lamia +/obj/structure/idle_enemy/lamia/Initialize() . = ..() - AddComponent(/datum/component/spawner/orc_c_warrior) -/datum/component/spawner/orc_c_warrior - mob_types = list(/mob/living/carbon/human/species/orc/warrior) + AddComponent(/datum/component/spawner/lamia) +/datum/component/spawner/lamia + mob_types = list(/mob/living/simple_animal/hostile/retaliate/rogue/lamia) spawn_time = 0 spawn_delay = 0 max_mobs = 1 - range = 11 + range = 10 spawn_text = "" -/obj/structure/idle_enemy/orc_c_marauder -/obj/structure/idle_enemy/orc_c_marauder/Initialize() +/* .................. Headless Spawner ................... */ +/obj/structure/idle_enemy/headless +/obj/structure/idle_enemy/headless/Initialize() . = ..() - AddComponent(/datum/component/spawner/orc_c_marauder) -/datum/component/spawner/orc_c_marauder - mob_types = list(/mob/living/carbon/human/species/orc/marauder) + AddComponent(/datum/component/spawner/headless) +/datum/component/spawner/headless + mob_types = list(/mob/living/simple_animal/hostile/retaliate/rogue/headless) spawn_time = 0 spawn_delay = 0 max_mobs = 1 - range = 11 + range = 10 spawn_text = "" -/obj/structure/idle_enemy/orc_c_warlord -/obj/structure/idle_enemy/orc_c_warlord/Initialize() + +/* .................. Hairy Spider Spawner ................... */ +/obj/structure/idle_enemy/hairy_spider +/obj/structure/idle_enemy/hairy_spider/Initialize() . = ..() - AddComponent(/datum/component/spawner/orc_c_warlord) -/datum/component/spawner/orc_c_warlord - mob_types = list(/mob/living/carbon/human/species/orc/warlord) + AddComponent(/datum/component/spawner/hairy_spider) +/datum/component/spawner/hairy_spider + mob_types = list(/mob/living/simple_animal/hostile/retaliate/rogue/spider/colony) spawn_time = 0 spawn_delay = 0 max_mobs = 1 range = 11 spawn_text = "" - - /* .................. Volf Spawner ................... */ /obj/structure/idle_enemy/volf /obj/structure/idle_enemy/volf/Initialize() @@ -642,19 +639,6 @@ range = 11 spawn_text = "" -/* .................. Outlaw Spawner ................... */ -/obj/structure/idle_enemy/outlaw -/obj/structure/idle_enemy/outlaw/Initialize() - . = ..() - AddComponent(/datum/component/spawner/outlaw) -/datum/component/spawner/outlaw - mob_types = list(/mob/living/carbon/human/species/human/northern/bum/outlaw ) - spawn_time = 0 - spawn_delay = 0 - max_mobs = 1 - range = 11 - spawn_text = "" - /* .................. Cabbit Boss Spawner ................... */ /obj/structure/idle_enemy/cabbit_boss /obj/structure/idle_enemy/cabbit_boss/Initialize() diff --git a/code/modules/mob/living/carbon/human/npc/_npc.dm b/code/modules/mob/living/carbon/human/npc/_npc.dm index 3f5d9b0035..7bdbcc8ca3 100644 --- a/code/modules/mob/living/carbon/human/npc/_npc.dm +++ b/code/modules/mob/living/carbon/human/npc/_npc.dm @@ -144,7 +144,7 @@ for(var/i = 0; i < maxStepsTick; ++i) if(!IsDeadOrIncap()) if(myPath.len >= 1) - walk_to(src,myPath[1],0,update_movespeed()) + walk_to(src,turf_of_target,0,update_movespeed()) myPath -= myPath[1] return 1 else diff --git a/code/modules/mob/living/carbon/human/npc/bum.dm b/code/modules/mob/living/carbon/human/npc/bum.dm index 68e824f300..1eb63c5575 100644 --- a/code/modules/mob/living/carbon/human/npc/bum.dm +++ b/code/modules/mob/living/carbon/human/npc/bum.dm @@ -75,95 +75,3 @@ GLOBAL_LIST_INIT(outlaw_aggro, world.file2list("strings/rt/outlawaggrolines.txt" if(prob(3)) emote(pick("laugh","burp","yawn","grumble","mumble","blink_r","clap")) -/mob/living/carbon/human/species/human/northern/bum/outlaw/after_creation() - aggressive= TRUE - wander = TRUE - dodgetime = 4 SECONDS - equipOutfit(new /datum/outfit/job/roguetown/outlaw) - outlaw = TRUE // just for the right say strings - -/datum/outfit/job/roguetown/outlaw - name = "Beggar" - -/datum/outfit/job/roguetown/outlaw/pre_equip(mob/living/carbon/human/H) - ..() - H.STASTR = 9 - H.STASPD = 8 - H.STACON = 9 - H.STAEND = 9 - - shirt = /obj/item/clothing/suit/roguetown/shirt/undershirt/vagrant - if(prob(30)) - shirt = /obj/item/clothing/suit/roguetown/shirt/undershirt/vagrant/l - if(prob(30)) - shirt = /obj/item/clothing/suit/roguetown/shirt/undershirt/random - pants = /obj/item/clothing/under/roguetown/tights/random - if(prob(30)) - pants = /obj/item/clothing/under/roguetown/tights/vagrant - if(prob(30)) - pants = /obj/item/clothing/under/roguetown/tights/vagrant/l - shoes = /obj/item/clothing/shoes/roguetown/simpleshoes - if(prob(30)) - shoes = /obj/item/clothing/shoes/roguetown/boots - if(prob(30)) - belt = /obj/item/storage/belt/rogue/leather/rope - beltl = /obj/item/rogueweapon/knife/villager - if(prob(10)) - belt = /obj/item/storage/belt/rogue/leather - beltr = /obj/item/reagent_containers/powder/moondust - if(prob(10)) - cloak = /obj/item/clothing/cloak/raincloak/brown - if(prob(10)) - gloves = /obj/item/clothing/gloves/roguetown/fingerless - if(prob(10)) - wrists = /obj/item/clothing/wrists/roguetown/bracers/leather - if(prob(10)) - neck = /obj/item/storage/belt/rogue/pouch/coins/poor - - var/head = rand(1,6) - switch(head) - if(1) - head = /obj/item/clothing/head/roguetown/knitcap - mask = /obj/item/clothing/mask/rogue/shepherd - if(2) - head = /obj/item/clothing/head/roguetown/strawhat - mask = /obj/item/clothing/mask/rogue/shepherd/rag - if(3) - head = /obj/item/clothing/head/roguetown/menacing - if(4) - head = /obj/item/clothing/head/roguetown/armingcap - if(5) - head = /obj/item/clothing/head/roguetown/helmet/leather - if(6) - head = /obj/item/clothing/head/roguetown/roguehood/uncolored - - var/armor = rand(1,5) - switch(armor) - if(1) - armor = /obj/item/clothing/suit/roguetown/armor/gambeson/light - pants = /obj/item/clothing/under/roguetown/trou/leather - if(2) - armor = /obj/item/clothing/suit/roguetown/shirt/rags - pants = /obj/item/clothing/under/roguetown/trou/leather - if(3) - armor = /obj/item/clothing/suit/roguetown/armor/gambeson - if(4) - armor = /obj/item/clothing/suit/roguetown/armor/leather/vest - neck = /obj/item/clothing/neck/roguetown/coif - if(5) - armor = /obj/item/clothing/suit/roguetown/armor/leather/jacket - - var/weapon = rand(1,6) - switch(weapon) - if(1) - r_hand = /obj/item/rogueweapon/axe/iron - if(2) - r_hand = /obj/item/rogueweapon/polearm/halberd/bardiche/woodcutter/neu - if(3) - r_hand = /obj/item/rogueweapon/mace/cudgel/bludgeon - if(4) - r_hand =/obj/item/rogueweapon/pitchfork - if(5) - r_hand = /obj/item/rogueweapon/thresher - if(6) - r_hand = /obj/item/rogueweapon/sword/short/iron diff --git a/code/modules/mob/living/carbon/human/npc/stonekeep_carbons.dm b/code/modules/mob/living/carbon/human/npc/stonekeep_carbons.dm new file mode 100644 index 0000000000..4b0079e341 --- /dev/null +++ b/code/modules/mob/living/carbon/human/npc/stonekeep_carbons.dm @@ -0,0 +1,593 @@ +// =================================================================================== +// ------------------- SKELLY SKILLED CORE -------------------------- +/datum/outfit/job/roguetown/species/skeleton/skilled/pre_equip(mob/living/carbon/human/H) + ..() + H.STASTR = rand(6,8) + H.STASPD = rand(8,10) + H.STACON = rand(8,10) + H.STAEND = 12 + H.STAINT = 1 + +/mob/living/carbon/human/species/skeleton/skilled/after_creation() + ..() + configure_mind() + ADD_TRAIT(src, TRAIT_CRITICAL_WEAKNESS, TRAIT_GENERIC) + d_intent = INTENT_PARRY //these ones will parry instead of dodge, the higher the skill the more powerful this is of course + aggressive = TRUE + mode = AI_IDLE + dodgetime = 2 SECONDS + canparry = TRUE + flee_in_pain = FALSE + wander = TRUE + ambushable = FALSE + +/mob/living/carbon/human/species/skeleton/skilled/proc/configure_mind() + if(!mind) + mind = new /datum/mind(src) + + mind.adjust_skillrank(/datum/skill/combat/polearms, 2, TRUE) + mind.adjust_skillrank(/datum/skill/combat/swords, 2, TRUE) + mind.adjust_skillrank(/datum/skill/combat/wrestling, 3, TRUE) + mind.adjust_skillrank(/datum/skill/combat/unarmed, 3, TRUE) + mind.adjust_skillrank(/datum/skill/combat/knives, 2, TRUE) + mind.adjust_skillrank(/datum/skill/combat/axesmaces, 2, TRUE) + mind.adjust_skillrank(/datum/skill/combat/shields, 1, TRUE) + mind.adjust_skillrank(/datum/skill/combat/whipsflails, 2, TRUE) + +// ------------------- UNARMED SKELLY -------------------------- +/mob/living/carbon/human/species/skeleton/skilled/unarmed + name = "animated skeleton" + +/mob/living/carbon/human/species/skeleton/skilled/unarmed/after_creation() + ..() + equipOutfit(new /datum/outfit/job/roguetown/species/skeleton/skilled/unarmed) + +/datum/outfit/job/roguetown/species/skeleton/skilled/unarmed/pre_equip(mob/living/carbon/human/H) + ..() + if(prob(50)) + belt = /obj/item/storage/belt/rogue/leather/rope + if(prob(50)) + shirt = /obj/item/clothing/suit/roguetown/shirt/undershirt/vagrant + if(prob(50)) + shirt = /obj/item/clothing/suit/roguetown/shirt/undershirt/vagrant + if(prob(50)) + shirt = /obj/item/clothing/suit/roguetown/shirt/undershirt/vagrant/l + + if(prob(50)) + pants = /obj/item/clothing/under/roguetown/tights/vagrant + if(prob(50)) + pants = /obj/item/clothing/under/roguetown/tights/vagrant/l + + if(prob(20)) + r_hand = /obj/item/natural/stone + if(prob(10)) + r_hand = /obj/item/rogueweapon/knife/stone + if(prob(10)) + r_hand = /obj/item/rogueweapon/mace/woodclub + +// ------------------- FIGHTER SKELLY -------------------------- +/mob/living/carbon/human/species/skeleton/skilled/fighter + name = "animated skeleton" + +/mob/living/carbon/human/species/skeleton/skilled/fighter/after_creation() + ..() + equipOutfit(new /datum/outfit/job/roguetown/species/skeleton/skilled/fighter) + +/mob/living/carbon/human/species/skeleton/skilled/fighter/configure_mind() + if(!mind) + mind = new /datum/mind(src) + + mind.adjust_skillrank(/datum/skill/combat/polearms, 3, TRUE) + mind.adjust_skillrank(/datum/skill/combat/swords, 3, TRUE) + mind.adjust_skillrank(/datum/skill/combat/wrestling, 3, TRUE) + mind.adjust_skillrank(/datum/skill/combat/unarmed, 3, TRUE) + mind.adjust_skillrank(/datum/skill/combat/knives, 2, TRUE) + mind.adjust_skillrank(/datum/skill/combat/axesmaces, 3, TRUE) + mind.adjust_skillrank(/datum/skill/combat/shields, 3, TRUE) + mind.adjust_skillrank(/datum/skill/combat/whipsflails, 3, TRUE) + +/datum/outfit/job/roguetown/species/skeleton/skilled/fighter/pre_equip(mob/living/carbon/human/H) + ..() + H.STASTR = 10 + H.STACON = 11 + var/loadout = rand(1,3) + if(prob(50)) + belt = /obj/item/storage/belt/rogue/leather/rope + if(prob(50)) + belt = /obj/item/storage/belt/rogue/leather + + if(prob(50)) + shirt = /obj/item/clothing/suit/roguetown/shirt/undershirt/vagrant + if(prob(50)) + shirt = /obj/item/clothing/suit/roguetown/shirt/undershirt/vagrant/l + + if(prob(50)) + pants = /obj/item/clothing/under/roguetown/tights/vagrant + if(prob(50)) + pants = /obj/item/clothing/under/roguetown/tights/vagrant/l + + if(prob(50)) + wrists = /obj/item/clothing/wrists/roguetown/bracers/leather + + if(prob(30)) + armor = /obj/item/clothing/suit/roguetown/armor/chainmail/iron + + if(prob(30)) + armor = /obj/item/clothing/suit/roguetown/armor/leather + + if(prob(40)) + armor = /obj/item/clothing/suit/roguetown/armor/cuirass/iron/rust + + switch(loadout) + if(1) + r_hand = /obj/item/rogueweapon/sword/scimitar + l_hand = /obj/item/rogueweapon/shield/wood + head = /obj/item/clothing/head/roguetown/helmet/leather/conical + if(2) + r_hand = /obj/item/rogueweapon/mace + l_hand = /obj/item/rogueweapon/shield/wood + neck = /obj/item/clothing/neck/roguetown/coif + head = /obj/item/clothing/head/roguetown/helmet/skullcap + if(3) + r_hand = /obj/item/rogueweapon/flail + l_hand = /obj/item/rogueweapon/shield/wood + neck = /obj/item/clothing/neck/roguetown/chaincoif + + +// =================================================================================== +// ------------------- ORC SKILLED CORE -------------------------- +/datum/outfit/job/roguetown/species/orc/skilled/pre_equip(mob/living/carbon/human/H) + ..() + H.STASTR = 13 + H.STASPD = 9 + H.STACON = 13 + H.STAEND = 13 + H.STAINT = 6 + +/mob/living/carbon/human/species/orc/skilled/after_creation() + ..() + configure_mind() + d_intent = INTENT_PARRY //these ones will parry instead of dodge, the higher the skill the more powerful this is of course + ADD_TRAIT(src, TRAIT_NOMOOD, TRAIT_GENERIC) + ADD_TRAIT(src, TRAIT_NOHUNGER, TRAIT_GENERIC) + ADD_TRAIT(src, TRAIT_CRITICAL_WEAKNESS, TRAIT_GENERIC) + ADD_TRAIT(src, TRAIT_ZOMBIE_IMMUNE, TRAIT_GENERIC) + aggressive = TRUE + mode = AI_IDLE + dodgetime = 2 SECONDS + canparry = TRUE + flee_in_pain = FALSE + wander = TRUE + ambushable = FALSE + hair_color = "#1f1d1d" + hairstyle = "Forsaken" + +/mob/living/carbon/human/species/orc/skilled/configure_mind() + if(!mind) + mind = new /datum/mind(src) + + mind.adjust_skillrank(/datum/skill/combat/polearms, 2, TRUE) + mind.adjust_skillrank(/datum/skill/combat/swords, 2, TRUE) + mind.adjust_skillrank(/datum/skill/combat/wrestling, 4, TRUE) + mind.adjust_skillrank(/datum/skill/combat/unarmed, 4, TRUE) + mind.adjust_skillrank(/datum/skill/combat/knives, 2, TRUE) + mind.adjust_skillrank(/datum/skill/combat/axesmaces, 2, TRUE) + mind.adjust_skillrank(/datum/skill/combat/shields, 2, TRUE) + mind.adjust_skillrank(/datum/skill/combat/whipsflails, 2, TRUE) + + +/mob/living/carbon/human/species/orc/skilled/after_creation(mob/living/carbon/C) + ..() + C.remove_all_languages() + C.grant_language(/datum/language/orcish) + to_chat(C, "I can speak Orcish with ,g before my speech.") + + +// ------------------- SAVAGE ORC -------------------------- +/mob/living/carbon/human/species/orc/skilled/savage + name = "savage orc" + +/mob/living/carbon/human/species/orc/skilled/savage/after_creation() + ..() + equipOutfit(new /datum/outfit/job/roguetown/npc/orc/savage) + +/datum/outfit/job/roguetown/npc/orc/savage/pre_equip(mob/living/carbon/human/H) + ..() + if(prob(20)) + armor = /obj/item/clothing/suit/roguetown/armor/leather/hide/orc + if(prob(20)) + pants = /obj/item/clothing/under/roguetown/loincloth/brown + if(prob(20)) + cloak = /obj/item/clothing/cloak/raincloak/brown + if(prob(20)) + shoes = /obj/item/clothing/shoes/roguetown/boots/furlinedanklets + if(prob(20)) + head = /obj/item/clothing/head/roguetown/helmet/leather + + var/loadout = rand(1,5) + switch(loadout) + if(1) //Dual Axe Warrior + r_hand = /obj/item/rogueweapon/axe/stone + if(2) //Long Club Caveman + r_hand = /obj/item/rogueweapon/polearm/woodstaff + if(3) //Club Caveman + r_hand = /obj/item/rogueweapon/mace/woodclub + if(4) //dagger fighter + r_hand = /obj/item/rogueweapon/knife/stone + l_hand = /obj/item/rogueweapon/knife/stone + if(5) //Spear hunter + r_hand = /obj/item/rogueweapon/polearm/spear/stone + +// ------------------- SAVAGE ORC LOOTER -------------------------- +/mob/living/carbon/human/species/orc/skilled/looter + name = "savage orc looter" + +/mob/living/carbon/human/species/orc/skilled/looter/after_creation() + ..() + equipOutfit(new /datum/outfit/job/roguetown/npc/orc/looter) + +/datum/outfit/job/roguetown/npc/orc/looter/pre_equip(mob/living/carbon/human/H) + ..() + if(prob(20)) + pants = /obj/item/clothing/under/roguetown/loincloth/brown + if(prob(20)) + pants = /obj/item/clothing/under/roguetown/trou/leather + + if(prob(20)) + shoes = /obj/item/clothing/shoes/roguetown/boots/furlinedanklets + if(prob(20)) + head = /obj/item/clothing/head/roguetown/helmet/leather + + var/loadout = rand(1,4) + switch(loadout) + if(1) + r_hand = /obj/item/rogueweapon/pick/paxe + armor = /obj/item/clothing/suit/roguetown/armor/cuirass/iron + head = /obj/item/clothing/head/roguetown/helmet/orc + if(2) + r_hand = /obj/item/rogueweapon/flail + l_hand = /obj/item/rogueweapon/shield/wood + armor = /obj/item/clothing/suit/roguetown/armor/leather/hide/orc + head = /obj/item/clothing/head/roguetown/helmet/orc + if(3) + r_hand = /obj/item/rogueweapon/sword/scimitar/messer + armor = /obj/item/clothing/suit/roguetown/armor/chainmail/iron + head = /obj/item/clothing/head/roguetown/helmet/leather/minershelm + if(4) + r_hand = /obj/item/rogueweapon/mace/spiked + l_hand = /obj/item/rogueweapon/shield/wood + armor = /obj/item/clothing/suit/roguetown/armor/plate/orc + head = /obj/item/clothing/head/roguetown/helmet/orc + +// ------------------- SAVAGE ORC CHIEFTAIN -------------------------- +/mob/living/carbon/human/species/orc/skilled/savage_chieftain + name = "savage orc chieftain" + +/mob/living/carbon/human/species/orc/skilled/savage_chieftain/after_creation() + ..() + equipOutfit(new /datum/outfit/job/roguetown/npc/orc/savage_chieftain) + +/mob/living/carbon/human/species/orc/skilled/savage_chieftain/configure_mind() + if(!mind) + mind = new /datum/mind(src) + + mind.adjust_skillrank(/datum/skill/combat/polearms, 3, TRUE) + mind.adjust_skillrank(/datum/skill/combat/swords, 4, TRUE) + mind.adjust_skillrank(/datum/skill/combat/wrestling, 5, TRUE) + mind.adjust_skillrank(/datum/skill/combat/unarmed, 5, TRUE) + mind.adjust_skillrank(/datum/skill/combat/knives, 2, TRUE) + mind.adjust_skillrank(/datum/skill/combat/axesmaces, 4, TRUE) + mind.adjust_skillrank(/datum/skill/combat/shields, 3, TRUE) + mind.adjust_skillrank(/datum/skill/combat/whipsflails, 2, TRUE) + +/datum/outfit/job/roguetown/npc/orc/savage_chieftain/pre_equip(mob/living/carbon/human/H) + ..() + if(prob(20)) + pants = /obj/item/clothing/under/roguetown/loincloth/brown + if(prob(20)) + pants = /obj/item/clothing/under/roguetown/trou/leather + + if(prob(20)) + shoes = /obj/item/clothing/shoes/roguetown/boots/furlinedanklets + if(prob(20)) + head = /obj/item/clothing/head/roguetown/helmet/leather + + var/loadout = rand(1,5) + switch(loadout) + if(1) + r_hand = /obj/item/rogueweapon/mace/steel/morningstar + l_hand = /obj/item/rogueweapon/sword/scimitar/messer + armor = /obj/item/clothing/suit/roguetown/armor/chainmail/hauberk + head = /obj/item/clothing/head/roguetown/helmet/orc/warlord + if(2) + r_hand = /obj/item/rogueweapon/sword/scimitar/falchion + l_hand = /obj/item/rogueweapon/shield/tower + armor = /obj/item/clothing/suit/roguetown/armor/plate/orc/warlord + head = /obj/item/clothing/head/roguetown/helmet/orc/warlord + if(3) + r_hand = /obj/item/rogueweapon/flail/sflail + l_hand = /obj/item/rogueweapon/shield/wood + armor = /obj/item/clothing/suit/roguetown/armor/plate/orc/warlord + head = /obj/item/clothing/head/roguetown/helmet/orc/warlord + if(4)// WE DON'T WANNA GO TO WAR TODAY BUT THE LORD OF THE LASH SAYS "NAY NAY NAY!!" WE'RE GONNA MARCH ALL DAE, ALL DAE, ALL DAE! WHERE THERE'S A WHIP THERE'S A WAY!! + r_hand = /obj/item/rogueweapon/whip/antique + l_hand = /obj/item/rogueweapon/sword/short + armor = /obj/item/clothing/suit/roguetown/armor/plate/orc/warlord + head = /obj/item/clothing/head/roguetown/helmet/orc/warlord + + +// =================================================================================== +/* +/mob/living/carbon/human/species/human/northern/bum/skilled + race = /datum/species/human/northern/npc + +/datum/species/human/northern/npc + armor = list("melee" = 3, "bullet" = 0, "laser" = 0, "energy" = 0, "bomb" = 0, "bio" = 0, "rad" = 0, "fire" = 10, "acid" = 0) +*/ +/datum/outfit/job/roguetown/human_npc/skilled/pre_equip(mob/living/carbon/human/H) + H.STASTR = rand(8,10) + H.STASPD = rand(8,10) + H.STACON = rand(8,10) + H.STAEND = rand(8,10) + H.STAINT = 7 + +/mob/living/carbon/human/species/human/northern/bum/skilled/after_creation() + ..() + ADD_TRAIT(src, TRAIT_CRITICAL_WEAKNESS, TRAIT_GENERIC) + ADD_TRAIT(src, TRAIT_ZOMBIE_IMMUNE, TRAIT_GENERIC) + configure_mind() + d_intent = INTENT_PARRY //these ones will parry instead of dodge, the higher the skill the more powerful this is of course + aggressive = FALSE + mode = AI_IDLE + dodgetime = 4 SECONDS + canparry = TRUE + + flee_in_pain = TRUE + wander = FALSE + ambushable = FALSE + faction = list("bums", "station") + +/mob/living/carbon/human/species/human/northern/bum/skilled/proc/configure_mind() + if(!mind) + mind = new /datum/mind(src) + + mind.adjust_skillrank(/datum/skill/combat/polearms, 2, TRUE) + mind.adjust_skillrank(/datum/skill/combat/swords, 2, TRUE) + mind.adjust_skillrank(/datum/skill/combat/wrestling, 2, TRUE) + mind.adjust_skillrank(/datum/skill/combat/unarmed, 2, TRUE) + mind.adjust_skillrank(/datum/skill/combat/knives, 2, TRUE) + mind.adjust_skillrank(/datum/skill/combat/axesmaces, 2, TRUE) + mind.adjust_skillrank(/datum/skill/combat/shields, 2, TRUE) + mind.adjust_skillrank(/datum/skill/combat/whipsflails, 2, TRUE) + +// ------------------- BUM -------------------------- +/mob/living/carbon/human/species/human/northern/bum/skilled/madman/after_creation() + ..() + job = "Beggar" + aggressive= TRUE + wander = FALSE + + +// ------------------- OUTLAW -------------------------- +/mob/living/carbon/human/species/human/northern/bum/skilled/outlaw/after_creation() + ..() + job = "Beggar" + aggressive= TRUE + wander = TRUE + equipOutfit(new /datum/outfit/job/roguetown/human_npc/skilled/outlaw) + outlaw = TRUE // just for the right say strings + +/datum/outfit/job/roguetown/human_npc/skilled/outlaw + name = "Outlaw" + +/datum/outfit/job/roguetown/human_npc/skilled/outlaw/pre_equip(mob/living/carbon/human/H) + ..() + H.STASTR = 10 + H.STAEND = 10 + + shirt = /obj/item/clothing/suit/roguetown/shirt/undershirt/vagrant + if(prob(30)) + shirt = /obj/item/clothing/suit/roguetown/shirt/undershirt/vagrant/l + if(prob(30)) + shirt = /obj/item/clothing/suit/roguetown/shirt/undershirt/random + pants = /obj/item/clothing/under/roguetown/tights/random + if(prob(30)) + pants = /obj/item/clothing/under/roguetown/tights/vagrant + if(prob(30)) + pants = /obj/item/clothing/under/roguetown/tights/vagrant/l + shoes = /obj/item/clothing/shoes/roguetown/simpleshoes + if(prob(30)) + shoes = /obj/item/clothing/shoes/roguetown/boots + if(prob(30)) + belt = /obj/item/storage/belt/rogue/leather/rope + beltl = /obj/item/rogueweapon/knife/villager + if(prob(10)) + belt = /obj/item/storage/belt/rogue/leather + beltr = /obj/item/reagent_containers/powder/moondust + if(prob(10)) + cloak = /obj/item/clothing/cloak/raincloak/brown + if(prob(10)) + gloves = /obj/item/clothing/gloves/roguetown/fingerless + if(prob(10)) + wrists = /obj/item/clothing/wrists/roguetown/bracers/leather + if(prob(10)) + neck = /obj/item/storage/belt/rogue/pouch/coins/poor + + var/head = rand(1,6) + switch(head) + if(1) + head = /obj/item/clothing/head/roguetown/knitcap + mask = /obj/item/clothing/mask/rogue/shepherd + if(2) + head = /obj/item/clothing/head/roguetown/strawhat + mask = /obj/item/clothing/mask/rogue/shepherd/rag + if(3) + head = /obj/item/clothing/head/roguetown/menacing + if(4) + head = /obj/item/clothing/head/roguetown/armingcap + if(5) + head = /obj/item/clothing/head/roguetown/helmet/leather + if(6) + head = /obj/item/clothing/head/roguetown/roguehood/uncolored + + var/armor = rand(1,5) + switch(armor) + if(1) + armor = /obj/item/clothing/suit/roguetown/armor/gambeson/light + pants = /obj/item/clothing/under/roguetown/trou/leather + if(2) + armor = /obj/item/clothing/suit/roguetown/shirt/rags + pants = /obj/item/clothing/under/roguetown/trou/leather + if(3) + armor = /obj/item/clothing/suit/roguetown/armor/gambeson + if(4) + armor = /obj/item/clothing/suit/roguetown/armor/leather/vest + neck = /obj/item/clothing/neck/roguetown/coif + if(5) + armor = /obj/item/clothing/suit/roguetown/armor/leather/jacket + + var/weapon = rand(1,6) + switch(weapon) + if(1) + r_hand = /obj/item/rogueweapon/axe/iron + if(2) + r_hand = /obj/item/rogueweapon/polearm/halberd/bardiche/woodcutter/neu + if(3) + r_hand = /obj/item/rogueweapon/mace/cudgel/bludgeon + if(4) + r_hand =/obj/item/rogueweapon/pitchfork + if(5) + r_hand = /obj/item/rogueweapon/thresher/military + if(6) + r_hand = /obj/item/rogueweapon/sword/short/iron + + +// =================================================================================== +// ------------------- GOBLIN -------------------------- +/mob/living/carbon/human/species/goblin/skilled + aggressive = TRUE + mode = AI_IDLE + dodgetime = 5 SECONDS + flee_in_pain = TRUE + canparry = TRUE + wander = FALSE + ambushable = FALSE + +/mob/living/carbon/human/species/goblin/skilled/proc/configure_mind() + if(!mind) + mind = new /datum/mind(src) + + mind.adjust_skillrank(/datum/skill/combat/polearms, 2, TRUE) + mind.adjust_skillrank(/datum/skill/combat/swords, 2, TRUE) + mind.adjust_skillrank(/datum/skill/combat/wrestling, 2, TRUE) + mind.adjust_skillrank(/datum/skill/combat/unarmed, 2, TRUE) + mind.adjust_skillrank(/datum/skill/combat/knives, 2, TRUE) + mind.adjust_skillrank(/datum/skill/combat/axesmaces, 2, TRUE) + mind.adjust_skillrank(/datum/skill/combat/shields, 2, TRUE) + mind.adjust_skillrank(/datum/skill/combat/whipsflails, 2, TRUE) + +/mob/living/carbon/human/species/goblin/skilled/after_creation() + ..() + configure_mind() + d_intent = INTENT_PARRY //these ones will parry instead of dodge, the higher the skill the more powerful this is of course + ADD_TRAIT(src, TRAIT_ZOMBIE_IMMUNE, TRAIT_GENERIC) + equipOutfit(new /datum/outfit/job/roguetown/npc/goblin) + +/mob/living/carbon/human/species/goblin/skilled/moon + name = "moon goblin" + race = /datum/species/goblin/moon + + +/* Can be put into pre_equip to lessen chance of crits, bit strong despite the low value + H.skin_armor = new /obj/item/clothing/suit/roguetown/armor/skin_armor/weak(H) + +/obj/item/clothing/suit/roguetown/armor/skin_armor/weak // since NPCs using crit weakness this is a way to give them a slightly longer life by reducing chance of crits + slot_flags = null + name = "" + desc = "" + icon_state = null + body_parts_covered = FULL_BODY + armor = list("melee" = 3, "bullet" = 0, "laser" = 0,"energy" = 0, "bomb" = 0, "bio" = 0, "rad" = 0, "fire" = 0, "acid" = 0) +*/ + + +// =================================================================================== +/datum/intent/simple/trollsmash + name = "trollsmash" + icon_state = "instrike" + attack_verb = list("hammer-punches", "smashes", "headbutts", "rams") + animname = "blank22" + blade_class = BCLASS_BLUNT + hitsound = "punch_hard" + chargetime = 0 + penfactor = 13 + swingdelay = 4 SECONDS + candodge = TRUE + canparry = FALSE + +/* +/mob/living/simple_animal/hostile/retaliate/rogue/troll + base_intents = list(/datum/intent/simple/trollrip, /datum/intent/simple/trollsmash) + +/mob/living/simple_animal/hostile/retaliate/rogue/trollbog + base_intents = list(/datum/intent/simple/trollsmash, /datum/intent/simple/trollrip) + +/mob/living/simple_animal/hostile/retaliate/rogue/wolf + base_intents = list(/datum/intent/simple/critterbite) + +/mob/living/simple_animal/hostile/retaliate/rogue/bigrat + base_intents = list(/datum/intent/simple/critterbite) +*/ +/datum/intent/simple/trollrip + name = "trollrip" + icon_state = "instrike" + attack_verb = list("claws", "gnashes", "viciously bites") + animname = "blank22" + blade_class = BCLASS_CHOP + hitsound = "smallslash" + chargetime = 0 + penfactor = 20 + swingdelay = 2 SECONDS + candodge = TRUE + canparry = TRUE + +/datum/intent/simple/critterbite + name = "bite" + icon_state = "instrike" + attack_verb = list("bites") + animname = "blank22" + blade_class = BCLASS_CUT + hitsound = "smallslash" + chargetime = 0 + penfactor = 5 + swingdelay = 1.5 SECONDS + candodge = TRUE + canparry = TRUE + +/datum/intent/simple/claw_strong + name = "claw" + icon_state = "inclaw" + attack_verb = list("slashes", "claws") + animname = "blank22" + blade_class = BCLASS_CUT + hitsound = "smallslash" + chargetime = 0 + penfactor = 5 + swingdelay = 2 SECONDS + candodge = TRUE + canparry = TRUE + miss_text = "slashes the air!" + +/datum/intent/simple/claw_quick + name = "claw" + icon_state = "inclaw" + attack_verb = list("slashes", "claws") + animname = "blank22" + blade_class = BCLASS_CUT + hitsound = "smallslash" + chargetime = 0 + penfactor = 3 + swingdelay = 1 SECONDS + candodge = TRUE + canparry = TRUE + miss_text = "slashes the air!" diff --git a/code/modules/mob/living/simple_animal/rogue/creacher/bigrat.dm b/code/modules/mob/living/simple_animal/rogue/creacher/bigrat.dm index eec3d7f29d..e24e2a001c 100644 --- a/code/modules/mob/living/simple_animal/rogue/creacher/bigrat.dm +++ b/code/modules/mob/living/simple_animal/rogue/creacher/bigrat.dm @@ -29,7 +29,7 @@ /obj/item/bodypart, /obj/item/organ) - base_intents = list(/datum/intent/simple/bite) + base_intents = list(/datum/intent/simple/critterbite) attack_sound = 'sound/combat/wooshes/punch/punchwoosh (2).ogg' melee_damage_lower = 12 melee_damage_upper = 14 diff --git a/code/modules/mob/living/simple_animal/rogue/creacher/headless.dm b/code/modules/mob/living/simple_animal/rogue/creacher/headless.dm index 88e747e938..f5e8e942fe 100644 --- a/code/modules/mob/living/simple_animal/rogue/creacher/headless.dm +++ b/code/modules/mob/living/simple_animal/rogue/creacher/headless.dm @@ -40,7 +40,7 @@ del_on_deaggro = 999 SECONDS retreat_health = 0.1 food = 0 - dodgetime = 15 + dodgetime = 4 SECONDS aggressive = 1 remains_type = null body_eater = TRUE diff --git a/code/modules/mob/living/simple_animal/rogue/creacher/lamia.dm b/code/modules/mob/living/simple_animal/rogue/creacher/lamia.dm index 2c90212894..1a2d757405 100644 --- a/code/modules/mob/living/simple_animal/rogue/creacher/lamia.dm +++ b/code/modules/mob/living/simple_animal/rogue/creacher/lamia.dm @@ -11,7 +11,7 @@ speak_chance = 1 see_in_dark = 9 move_to_delay = 2 - base_intents = list(/datum/intent/simple/bite, /datum/intent/simple/claw) + base_intents = list(/datum/intent/simple/claw_quick, /datum/intent/simple/bite) butcher_results = list(/obj/item/reagent_containers/food/snacks/rogue/meat/steak = 1, /obj/item/reagent_containers/food/snacks/fat = 1, /obj/item/alch/sinew = 2, @@ -20,8 +20,8 @@ mob_biotypes = MOB_ORGANIC|MOB_BEAST|MOB_REPTILE health = 200 maxHealth = 200 - melee_damage_lower = 35 - melee_damage_upper = 50 + melee_damage_lower = 25 + melee_damage_upper = 35 vision_range = 9 aggro_vision_range = 9 environment_smash = ENVIRONMENT_SMASH_NONE @@ -39,7 +39,7 @@ del_on_deaggro = 999 SECONDS retreat_health = 0.1 food = 0 - dodgetime = 15 + dodgetime = 2 SECONDS aggressive = 1 remains_type = null body_eater = TRUE diff --git a/code/modules/mob/living/simple_animal/rogue/creacher/mole.dm b/code/modules/mob/living/simple_animal/rogue/creacher/mole.dm index 36fb12b842..ccc17e16c1 100644 --- a/code/modules/mob/living/simple_animal/rogue/creacher/mole.dm +++ b/code/modules/mob/living/simple_animal/rogue/creacher/mole.dm @@ -36,7 +36,7 @@ /obj/item/bodypart, /obj/item/organ) - base_intents = list(/datum/intent/simple/claw) + base_intents = list(/datum/intent/simple/claw_strong) attack_sound = list('sound/vo/mobs/saiga/attack (1).ogg','sound/vo/mobs/saiga/attack (2).ogg') melee_damage_lower = 20 melee_damage_upper = 40 diff --git a/code/modules/mob/living/simple_animal/rogue/creacher/troll.dm b/code/modules/mob/living/simple_animal/rogue/creacher/troll.dm index 02ce6cfdc1..c78c61203a 100644 --- a/code/modules/mob/living/simple_animal/rogue/creacher/troll.dm +++ b/code/modules/mob/living/simple_animal/rogue/creacher/troll.dm @@ -37,7 +37,7 @@ /obj/item/bodypart, /obj/item/organ) - base_intents = list(/datum/intent/unarmed/wwolf, /datum/intent/simple/bigbite) + base_intents = list(/datum/intent/simple/trollrip, /datum/intent/simple/trollsmash) attack_sound = list('sound/combat/wooshes/blunt/wooshhuge (1).ogg','sound/combat/wooshes/blunt/wooshhuge (2).ogg','sound/combat/wooshes/blunt/wooshhuge (3).ogg') melee_damage_lower = 40 melee_damage_upper = 60 diff --git a/code/modules/mob/living/simple_animal/rogue/creacher/trollbog.dm b/code/modules/mob/living/simple_animal/rogue/creacher/trollbog.dm index c7a5152d2d..bdda851e7b 100644 --- a/code/modules/mob/living/simple_animal/rogue/creacher/trollbog.dm +++ b/code/modules/mob/living/simple_animal/rogue/creacher/trollbog.dm @@ -36,7 +36,7 @@ /obj/item/bodypart, /obj/item/organ) - base_intents = list(/datum/intent/simple/headbutt, /datum/intent/simple/bigbite) + base_intents = list(/datum/intent/simple/trollsmash, /datum/intent/simple/trollrip) attack_sound = list('sound/combat/wooshes/blunt/wooshhuge (1).ogg','sound/combat/wooshes/blunt/wooshhuge (2).ogg','sound/combat/wooshes/blunt/wooshhuge (3).ogg') melee_damage_lower = 30 melee_damage_upper = 50 @@ -57,7 +57,7 @@ food_max = 250 food = 0 - dodgetime = 15 + dodgetime = 5 SECONDS aggressive = TRUE // stat_attack = UNCONSCIOUS remains_type = /obj/effect/decal/remains/troll // Placeholder until Troll remains are sprited. diff --git a/code/modules/mob/living/simple_animal/rogue/creacher/volf.dm b/code/modules/mob/living/simple_animal/rogue/creacher/volf.dm index 10a99129ac..76211864f8 100644 --- a/code/modules/mob/living/simple_animal/rogue/creacher/volf.dm +++ b/code/modules/mob/living/simple_animal/rogue/creacher/volf.dm @@ -36,7 +36,7 @@ /obj/item/bodypart, /obj/item/organ) - base_intents = list(/datum/intent/simple/bite) + base_intents = list(/datum/intent/simple/critterbite) attack_sound = list('sound/vo/mobs/vw/attack (1).ogg','sound/vo/mobs/vw/attack (2).ogg','sound/vo/mobs/vw/attack (3).ogg','sound/vo/mobs/vw/attack (4).ogg') melee_damage_lower = 15 melee_damage_upper = 20 @@ -54,7 +54,7 @@ del_on_deaggro = 999 SECONDS retreat_health = 0.4 food = 0 - dodgetime = 17 + dodgetime = 2 SECONDS aggressive = 1 // stat_attack = UNCONSCIOUS remains_type = /obj/effect/decal/remains/wolf diff --git a/code/modules/spells/spell_types/bloodcrawl.dm b/code/modules/spells/spell_types/bloodcrawl.dm index c83a93a878..955829ed5a 100644 --- a/code/modules/spells/spell_types/bloodcrawl.dm +++ b/code/modules/spells/spell_types/bloodcrawl.dm @@ -13,7 +13,7 @@ action_icon_state = "bloodcrawl" action_background_icon_state = "bg_demon" var/phased = FALSE - +/* /obj/effect/proc_holder/spell/bloodcrawl/choose_targets(mob/user = usr) for(var/obj/effect/decal/cleanable/target in range(range, get_turf(user))) if(target.can_bloodcrawl_in()) @@ -34,3 +34,4 @@ return revert_cast() to_chat(user, "I are unable to blood crawl!") +*/ diff --git a/stonekeep.dme b/stonekeep.dme index 1bb1f505b8..840982794d 100644 --- a/stonekeep.dme +++ b/stonekeep.dme @@ -440,6 +440,7 @@ #include "code\datums\ai\behaviours\run_from_target.dm" #include "code\datums\ai\behaviours\use_in_hand.dm" #include "code\datums\ai\behaviours\use_on_object.dm" +#include "code\datums\ai\behaviours\use_targeted_ability.dm" #include "code\datums\ai\behaviours\wak_to_target.dm" #include "code\datums\ai\behaviours\eat_food\eat_body.dm" #include "code\datums\ai\behaviours\hostile\attack.dm" @@ -467,6 +468,7 @@ #include "code\datums\ai\subtrees\retaliate_subtree.dm" #include "code\datums\ai\subtrees\simple_find_target.dm" #include "code\datums\ai\subtrees\simple_melee_subtree.dm" +#include "code\datums\ai\subtrees\targeted_ability_use.dm" #include "code\datums\ai\targetting_datum\simpe_targetting_datum.dm" #include "code\datums\ai\targetting_datum\simple_targetting_allow_item.dm" #include "code\datums\atmosphere\_atmosphere.dm" @@ -1986,6 +1988,7 @@ #include "code\modules\mob\living\carbon\human\npc\goblin.dm" #include "code\modules\mob\living\carbon\human\npc\orc.dm" #include "code\modules\mob\living\carbon\human\npc\skeleton.dm" +#include "code\modules\mob\living\carbon\human\npc\stonekeep_carbons.dm" #include "code\modules\mob\living\carbon\human\npc\zizombies.dm" #include "code\modules\mob\living\carbon\human\species_types\abductors.dm" #include "code\modules\mob\living\carbon\human\species_types\android.dm"