Skip to content

Commit

Permalink
[MIRROR] Legioned Monkeys create different mobs [MDB IGNORE] (#2846)
Browse files Browse the repository at this point in the history
* Legioned Monkeys create different mobs (#83698)

## About The Pull Request


![image](https://github.com/tgstation/tgstation/assets/7483112/e25b360a-3cb2-4150-998c-c1293e917b68)

A Monkey infested by a Legion will spawn a "Rabble" instead of a
"Legion".
This is a somewhat slow 40 HP mob which tries to melee attack nearby
people.
Its only real claim to excitement is that it can and will ventcrawl if
it has nobody to attack.

## Why It's Good For The Game

Apparently people are creating large amounts of monkeys using monkey
cubes and then using the Legion's infestation mechanic to transform them
into large groups of much more dangerous mobs.
This is funny and creative but probably shouldn't be as effective as it
is.
Replacing Legion Monkeys with this mob will still create a mob of...
mobs, but they won't self-perpetuate in the same way.

## Changelog

:cl:
add: A unique kind of mob is created when a Monkey is infested by a
Legion.
/:cl:

* Legioned Monkeys create different mobs

---------

Co-authored-by: Jacquerel <[email protected]>
Co-authored-by: NovaBot13 <[email protected]>
  • Loading branch information
3 people authored and StealsThePRs committed Jun 5, 2024
1 parent 9ddb0e1 commit 58762cf
Show file tree
Hide file tree
Showing 6 changed files with 79 additions and 5 deletions.
12 changes: 9 additions & 3 deletions code/modules/mob/living/basic/lavaland/legion/legion.dm
Original file line number Diff line number Diff line change
Expand Up @@ -35,9 +35,14 @@

/mob/living/basic/mining/legion/Initialize(mapload)
. = ..()
AddElement(/datum/element/death_drops, get_loot_list())
AddElement(/datum/element/content_barfer)
var/list/drops = get_loot_list()
if (length(drops))
AddElement(/datum/element/death_drops, string_list(drops))
assign_abilities()

/// Give the Legion its spells
/mob/living/basic/mining/legion/proc/assign_abilities()
var/datum/action/cooldown/mob_cooldown/skull_launcher/skull_launcher = new(src)
skull_launcher.Grant(src)
skull_launcher.spawn_type = brood_type
Expand All @@ -64,10 +69,11 @@
return ..()

/// Put a corpse in this guy
/mob/living/basic/mining/legion/proc/consume(mob/living/consumed)
/mob/living/basic/mining/legion/proc/consume(mob/living/carbon/human/consumed)
new /obj/effect/gibspawner/generic(consumed.loc)
gender = consumed.gender
name = consumed.real_name
if (!ismonkey(consumed) || consumed == GLOB.the_one_and_only_punpun)
name = consumed.real_name
consumed.investigate_log("has been killed by hivelord infestation.", INVESTIGATE_DEATHS)
consumed.death()
consumed.extinguish_mob()
Expand Down
8 changes: 6 additions & 2 deletions code/modules/mob/living/basic/lavaland/legion/legion_brood.dm
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@
return ..()

/// Turn the targeted mob into one of us
/mob/living/basic/legion_brood/proc/infest(mob/living/target)
/mob/living/basic/legion_brood/proc/infest(mob/living/carbon/human/target)
visible_message(span_warning("[name] burrows into the flesh of [target]!"))
var/spawn_type = get_legion_type(target)
var/mob/living/basic/mining/legion/new_legion = new spawn_type(loc)
Expand All @@ -73,7 +73,9 @@
qdel(src)

/// Returns the kind of legion we make out of the target
/mob/living/basic/legion_brood/proc/get_legion_type(mob/living/target)
/mob/living/basic/legion_brood/proc/get_legion_type(mob/living/carbon/human/target)
if (ismonkey(target))
return /mob/living/basic/mining/legion/monkey
if (HAS_TRAIT(target, TRAIT_DWARF))
return /mob/living/basic/mining/legion/dwarf
return /mob/living/basic/mining/legion
Expand Down Expand Up @@ -106,4 +108,6 @@
ADD_TRAIT(src, TRAIT_SNOWSTORM_IMMUNE, INNATE_TRAIT)

/mob/living/basic/legion_brood/snow/get_legion_type(mob/living/target)
if (ismonkey(target))
return /mob/living/basic/mining/legion/monkey/snow
return /mob/living/basic/mining/legion/snow
63 changes: 63 additions & 0 deletions code/modules/mob/living/basic/lavaland/legion/legion_monkey.dm
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
/// Weak mob spawned if a legion infests a monkey
/mob/living/basic/mining/legion/monkey
name = "rabble"
desc = "You can see what was once a monkey under the shifting mass of corruption. It doesn't have enough biomass to reproduce."
icon_state = "legion_monkey"
pass_flags = PASSTABLE
speed = 5
maxHealth = 40
health = 40
melee_damage_lower = 10
melee_damage_upper = 10
attack_verb_continuous = "mauls"
attack_verb_simple = "maul"
attack_vis_effect = ATTACK_EFFECT_BITE
attack_sound = 'sound/weapons/bite.ogg'
speak_emote = list("chimpers")
corpse_type = /obj/effect/mob_spawn/corpse/human/monkey
ai_controller = /datum/ai_controller/basic_controller/legion_monkey

/mob/living/basic/mining/legion/monkey/Initialize(mapload)
. = ..()
ADD_TRAIT(src, TRAIT_VENTCRAWLER_ALWAYS, INNATE_TRAIT)
AddComponent(/datum/component/basic_mob_attack_telegraph)
AddComponent(/datum/component/regenerator, outline_colour = COLOR_SOFT_RED)

/mob/living/basic/mining/legion/monkey/assign_abilities()
return

/mob/living/basic/mining/legion/monkey/get_loot_list()
return

/// Icebox variant
/mob/living/basic/mining/legion/monkey/snow
name = "snow rabble"
desc = "You can see what was once a monkey under the densely packed snow. It doesn't look friendly."
icon = 'icons/mob/simple/icemoon/icemoon_monsters.dmi'
icon_state = "snow_monkey"

/mob/living/basic/mining/legion/monkey/snow/Initialize(mapload)
. = ..()
AddComponent(/datum/component/appearance_on_aggro, aggro_state = "snow_monkey_alive") // Surprise! I was real!

/// Opportunistically hops in and out of vents, if it can find one and is not biting someone.
/datum/ai_controller/basic_controller/legion_monkey
blackboard = list(
BB_TARGETING_STRATEGY = /datum/targeting_strategy/basic,
BB_TARGET_MINIMUM_STAT = HARD_CRIT,
BB_VENTCRAWL_COOLDOWN = 20 SECONDS,
BB_TIME_TO_GIVE_UP_ON_VENT_PATHING = 30 SECONDS,
)

ai_traits = STOP_MOVING_WHEN_PULLED
ai_movement = /datum/ai_movement/basic_avoidance
idle_behavior = /datum/idle_behavior/idle_random_walk/less_walking

// We understand that vents are nice little hidey holes through epigenetic inheritance, so we'll use them.
planning_subtrees = list(
/datum/ai_planning_subtree/random_speech/legion,
/datum/ai_planning_subtree/simple_find_target,
/datum/ai_planning_subtree/attack_obstacle_in_path,
/datum/ai_planning_subtree/basic_melee_attack_subtree,
/datum/ai_planning_subtree/opportunistic_ventcrawler,
)
Binary file modified icons/mob/simple/icemoon/icemoon_monsters.dmi
Binary file not shown.
Binary file modified icons/mob/simple/lavaland/lavaland_monsters.dmi
Binary file not shown.
1 change: 1 addition & 0 deletions tgstation.dme
Original file line number Diff line number Diff line change
Expand Up @@ -4864,6 +4864,7 @@
#include "code\modules\mob\living\basic\lavaland\legion\legion.dm"
#include "code\modules\mob\living\basic\lavaland\legion\legion_ai.dm"
#include "code\modules\mob\living\basic\lavaland\legion\legion_brood.dm"
#include "code\modules\mob\living\basic\lavaland\legion\legion_monkey.dm"
#include "code\modules\mob\living\basic\lavaland\legion\legion_tumour.dm"
#include "code\modules\mob\living\basic\lavaland\legion\spawn_legions.dm"
#include "code\modules\mob\living\basic\lavaland\lobstrosity\lobstrosity.dm"
Expand Down

0 comments on commit 58762cf

Please sign in to comment.