Skip to content

Commit

Permalink
[MIRROR] Adds New Changeling Ability: Hive Head (#2192)
Browse files Browse the repository at this point in the history
* Adds New Changeling Ability: Hive Head (#81502)

## About The Pull Request

This PR adds a new changeling ability to the game, entitled 'Hive Head'.
A basic description is shown below, as seen in-game.


![image](https://github.com/tgstation/tgstation/assets/47086570/4eed4f2e-3193-4522-b5ac-95b48e871346)

Hive Head is a two-point ability for Changeling which encases your head
in a bee hive. The bee hive is rather unremarkable as a defensive
utility, boasting extremely poor resistances to all damage types except
for BIO and providing flash resistance (your eyes are being covered).
Along with this, since Hive Head covers your head, you cannot use it
conjunction with chitinous armor, since it requires your head slot be
open. While this all sounds rather bad, the major reason to use this
ability is upon activation, you gain another ability which costs no
chemicals and operates on a cooldown: Release Bees.

Release Bees summons 6 bees on your location which will attack anything
that isn't you or directly allied to you for 20 seconds, which
afterwards the bees will vanish. By default, these bees are standard and
do not inject any sort of chemicals into your victims, so while they can
provide a good distraction and do some damage, they aren't really that
useful. The true value of this ability comes with the fact that the Hive
Head is also a reagent container, which stores up to 50 units of
whatever you want to put inside. While you can't get what you put into
the Hive Head out in any way, summoned bees will pull from the reagents
inside your Hive Head to inject into targets, increasing the amount of
!!FUN!! you can have with them drastically. For example, if you go into
the bar and dump a bunch of different drinks into the Hive Head, your
summoned bees will have equal chance to select any of those drinks to be
what they inject into people. Reagents inside the Hive Head will stay
there until it is dispelled, which upon re-using the ability, the Hive
Head will be empty.

Hive Head also has the additional utility that Release Bees works at any
time so long as you're still wearing it. However, only 1 bee will be
summoned whilst you are in hard crit or dead. Release Bees has a
cooldown of 30 seconds.

Additionally, if mixing chemical cocktails to have a swarm of bees
forcefully inject into people isn't to your liking, Hive Head provides
an alternate mode of use if a legion core is used on it. Using a legion
core on the Hive Head will cause it to mutate, changing its appearance
and functionality. The Legion Hive Head, as opposed to releasing 6 bees,
releases 4 legion skulls to fight for you instead. These legion skulls
do more damage than bees, but can be dispelled by any attack and only
last for 10 seconds as opposed to 20, but this also comes with the added
benefit of a shorter cooldown time of 15 seconds as opposed to 30. The
major benefit of this version of the ability is that if the skulls down
a humanoid target, the skulls will turn that person into an allied
legion, who will use their abilities to support you with healing and
additional skull summoning should they run into a target. Just as
disabling Hive Head normally removes chemicals, Hive Head will return to
normal upon deactivating and reactivating the ability, requiring another
legion core be used to access this version again.


![image](https://github.com/tgstation/tgstation/assets/47086570/d30b238c-caaa-4b45-9371-a2a1f0686378)

Additionally, this PR adds the sound of a swarm of bees for when the
ability gets activated, new sprites to facilitate implementing this
ability, and some changes to how the armor subset of changeling
abilities work internally in order to add ones that only apply a helmet
or armor as opposed to both. This PR also fixes a bug with bees having
an incorrect sprite offset (they look like they're one tile over to the
left currently).

As always, the numbers and mechanics can be changed if need be, and I'm
open to hearing others' thoughts about this.

## Why It's Good For The Game

Changeling hasn't received a new ability in a very long time, only
reworks to their existing kit, so there haven't been any new toys to
shake up the experience with. Hive Head is something new that fits
Changeling's preference for one-on-one combat (the bees pretty much
always aggro on the same target) while also playing into that weird
alien shapeshifter vibe. Along with this, being able to change what
chemicals the bees inject into people opens the door to creative ways of
using it alongside the rest of the sandbox, so it'll be interesting to
see what players come up with. The additional legion mode is just a
cherry on top, allowing people to play around with the cool legion skull
mechanics in an antagonistic setting.

## Changelog

:cl:
add: New Changeling Ability: Hive Head
fix: Fixed bees having an improper sprite offset
/:cl:

* Adds New Changeling Ability: Hive Head

* Update screenshot_antag_icons.dm

* Revert "Update screenshot_antag_icons.dm"

This reverts commit b91ccdb61ea26d1b002a9a17fd92c9e9797cc7b6.

* Maybe this will fix it

* Revert "Maybe this will fix it"

This reverts commit 0f60d2832ec0c3c38cacf2fb5747c62f8d860730.

---------

Co-authored-by: NovaBot <[email protected]>
Co-authored-by: IndieanaJones <[email protected]>
Co-authored-by: Bloop <[email protected]>
Co-authored-by: Iajret <[email protected]>
  • Loading branch information
5 people authored Mar 1, 2024
1 parent 5b15c04 commit 9bedff6
Show file tree
Hide file tree
Showing 6 changed files with 144 additions and 16 deletions.
156 changes: 144 additions & 12 deletions code/modules/antagonists/changeling/powers/mutations.dm
Original file line number Diff line number Diff line change
Expand Up @@ -90,8 +90,8 @@
chemical_cost = 1000
dna_cost = CHANGELING_POWER_UNOBTAINABLE

var/helmet_type = /obj/item
var/suit_type = /obj/item
var/helmet_type = null
var/suit_type = null
var/suit_name_simple = " "
var/helmet_name_simple = " "
var/recharge_slowdown = 0
Expand Down Expand Up @@ -125,10 +125,14 @@
if(!ishuman(user) || !changeling)
return 1
var/mob/living/carbon/human/H = user

if(istype(H.wear_suit, suit_type) || istype(H.head, helmet_type))
H.visible_message(span_warning("[H] casts off [H.p_their()] [suit_name_simple]!"), span_warning("We cast off our [suit_name_simple]."), span_hear("You hear the organic matter ripping and tearing!"))
H.temporarilyRemoveItemFromInventory(H.head, TRUE) //The qdel on dropped() takes care of it
H.temporarilyRemoveItemFromInventory(H.wear_suit, TRUE)
var/name_to_use = (isnull(suit_type) ? helmet_name_simple : suit_name_simple)
H.visible_message(span_warning("[H] casts off [H.p_their()] [name_to_use]!"), span_warning("We cast off our [name_to_use]."), span_hear("You hear the organic matter ripping and tearing!"))
if(!isnull(helmet_type))
H.temporarilyRemoveItemFromInventory(H.head, TRUE) //The qdel on dropped() takes care of it
if(!isnull(suit_type))
H.temporarilyRemoveItemFromInventory(H.wear_suit, TRUE)
H.update_worn_oversuit()
H.update_worn_head()
H.update_body_parts()
Expand All @@ -141,18 +145,19 @@
return 1

/datum/action/changeling/suit/sting_action(mob/living/carbon/human/user)
if(!user.canUnEquip(user.wear_suit))
if(!user.canUnEquip(user.wear_suit) && !isnull(suit_type))
user.balloon_alert(user, "body occupied!")
return
if(!user.canUnEquip(user.head))
if(!user.canUnEquip(user.head) && !isnull(helmet_type))
user.balloon_alert(user, "head occupied!")
return
..()
user.dropItemToGround(user.head)
user.dropItemToGround(user.wear_suit)

user.equip_to_slot_if_possible(new suit_type(user), ITEM_SLOT_OCLOTHING, 1, 1, 1)
user.equip_to_slot_if_possible(new helmet_type(user), ITEM_SLOT_HEAD, 1, 1, 1)
if(!isnull(suit_type))
user.dropItemToGround(user.wear_suit)
user.equip_to_slot_if_possible(new suit_type(user), ITEM_SLOT_OCLOTHING, 1, 1, 1)
if(!isnull(helmet_type))
user.dropItemToGround(user.head)
user.equip_to_slot_if_possible(new helmet_type(user), ITEM_SLOT_HEAD, 1, 1, 1)

var/datum/antagonist/changeling/changeling = IS_CHANGELING(user)
changeling.chem_recharge_slowdown += recharge_slowdown
Expand Down Expand Up @@ -582,3 +587,130 @@
/obj/item/clothing/head/helmet/changeling/Initialize(mapload)
. = ..()
ADD_TRAIT(src, TRAIT_NODROP, CHANGELING_TRAIT)

/datum/action/changeling/suit/hive_head
name = "Hive Head"
desc = "We coat our head in a waxy outing coating similar to a bee hive which can be used to manufacture bees to attack our enemies. Costs 15 chemicals."
helptext = "While the hive head does not provide much in the ways of armor, it does allow the user to send bees out to attack targets. Reagents can poured inside the hive to cause all bees released to inject said reagents."
button_icon_state = "hive_head"
chemical_cost = 15
dna_cost = 2
req_human = FALSE
blood_on_castoff = TRUE

helmet_type = /obj/item/clothing/head/helmet/changeling_hivehead
helmet_name_simple = "hive head"

/obj/item/clothing/head/helmet/changeling_hivehead
name = "hive head"
desc = "A strange, waxy outer coating covering your head. Gives you tinnitus."
icon_state = "hivehead"
inhand_icon_state = null
flash_protect = FLASH_PROTECTION_FLASH
item_flags = DROPDEL
armor_type = /datum/armor/changeling_hivehead
flags_inv = HIDEEARS|HIDEHAIR|HIDEEYES|HIDEFACIALHAIR|HIDEFACE|HIDESNOUT
actions_types = list(/datum/action/cooldown/hivehead_spawn_minions)
///Does this hive head hold reagents?
var/holds_reagents = TRUE

/obj/item/clothing/head/helmet/changeling_hivehead/Initialize(mapload)
. = ..()
if(holds_reagents)
create_reagents(50, REFILLABLE)

/datum/armor/changeling_hivehead
melee = 10
bullet = 10
laser = 10
energy = 10
bio = 50

/obj/item/clothing/head/helmet/changeling_hivehead/Initialize(mapload)
. = ..()
ADD_TRAIT(src, TRAIT_NODROP, CHANGELING_TRAIT)

/obj/item/clothing/head/helmet/changeling_hivehead/attackby(obj/item/attacking_item, mob/user, params)
. = ..()
if(!istype(attacking_item, /obj/item/organ/internal/monster_core/regenerative_core/legion) || !holds_reagents)
return
visible_message(span_boldwarning("As [user] shoves [attacking_item] into [src], [src] begins to mutate."))
var/mob/living/carbon/wearer = loc
playsound(wearer, 'sound/effects/attackblob.ogg', 60, TRUE)
wearer.temporarilyRemoveItemFromInventory(wearer.head, TRUE)
wearer.equip_to_slot_if_possible(new /obj/item/clothing/head/helmet/changeling_hivehead/legion(wearer), ITEM_SLOT_HEAD, 1, 1, 1)
qdel(attacking_item)


/datum/action/cooldown/hivehead_spawn_minions
name = "Release Bees"
desc = "Release a group of bees to attack all other lifeforms."
background_icon_state = "bg_demon"
overlay_icon_state = "bg_demon_border"
button_icon = 'icons/mob/simple/bees.dmi'
button_icon_state = "queen_item"
cooldown_time = 30 SECONDS
///The mob we're going to spawn
var/spawn_type = /mob/living/basic/bee
///How many are we going to spawn
var/spawn_count = 6
///How long our summoned mobs last for
var/spawn_lifespan = 25 SECONDS

/datum/action/cooldown/hivehead_spawn_minions/PreActivate(atom/target)
if(owner.movement_type & VENTCRAWLING)
owner.balloon_alert(owner, "unavailable here")
return
. = ..()

/datum/action/cooldown/hivehead_spawn_minions/Activate(atom/target)
. = ..()
do_tell()
var/spawns = spawn_count
if(owner.stat >= HARD_CRIT)
spawns = 1
for(var/i in 1 to spawns)
var/mob/living/basic/summoned_minion = new spawn_type(get_turf(owner))
summoned_minion.faction = list("[REF(owner)]")
if(spawn_lifespan != 0 SECONDS)
QDEL_IN(summoned_minion, spawn_lifespan)
minion_additional_changes(summoned_minion)

///Our tell that we're using this ability. Usually a sound and a visible message.area
/datum/action/cooldown/hivehead_spawn_minions/proc/do_tell()
owner.visible_message(span_warning("[owner]'s head begins to buzz as bees begin to pour out!"), span_warning("We release the bees."), span_hear("You hear a loud buzzing sound!"))
playsound(owner, 'sound/creatures/bee_swarm.ogg', 60, TRUE)

///Stuff we want to do to our minions. This is in its own proc so subtypes can override this behaviour.
/datum/action/cooldown/hivehead_spawn_minions/proc/minion_additional_changes(mob/living/basic/minion)
var/mob/living/basic/bee/summoned_bee = minion
var/mob/living/carbon/wearer = owner
if(istype(summoned_bee) && length(wearer.head.reagents.reagent_list))
summoned_bee.assign_reagent(pick(wearer.head.reagents.reagent_list))

/obj/item/clothing/head/helmet/changeling_hivehead/legion
name = "legion hive head"
desc = "A strange, boney coating covering your head with a fleshy inside. Surprisingly comfortable."
icon_state = "hivehead_legion"
actions_types = list(/datum/action/cooldown/hivehead_spawn_minions/legion)
holds_reagents = FALSE

/datum/action/cooldown/hivehead_spawn_minions/legion
name = "Release Legion"
desc = "Release a group of legion to attack all other lifeforms."
button_icon = 'icons/mob/simple/lavaland/lavaland_monsters.dmi'
button_icon_state = "legion_head"
cooldown_time = 15 SECONDS
spawn_type = /mob/living/basic/legion_brood
spawn_count = 4
//Legion heads go away by themselves, we don't have to handle that
spawn_lifespan = 0 SECONDS

/datum/action/cooldown/hivehead_spawn_minions/legion/do_tell()
owner.visible_message(span_warning("[owner]'s head begins to shake as legion begin to pour out!"), span_warning("We release the legion."), span_hear("You hear a loud squishing sound!"))
playsound(owner, 'sound/effects/attackblob.ogg', 60, TRUE)

/datum/action/cooldown/hivehead_spawn_minions/legion/minion_additional_changes(mob/living/basic/minion)
var/mob/living/basic/legion_brood/brood = minion
if (istype(brood))
brood.assign_creator(owner, FALSE)
4 changes: 0 additions & 4 deletions code/modules/mob/living/basic/farm_animals/bee/_bee.dm
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,6 @@
response_harm_continuous = "squashes"
response_harm_simple = "squash"

mob_size = MOB_SIZE_LARGE
pixel_x = -16
base_pixel_x = -16

speed = 1
maxHealth = 10
health = 10
Expand Down
Binary file modified icons/mob/actions/actions_changeling.dmi
Binary file not shown.
Binary file modified icons/mob/clothing/head/helmet.dmi
Binary file not shown.
Binary file modified icons/obj/clothing/head/helmet.dmi
Binary file not shown.
Binary file added sound/creatures/bee_swarm.ogg
Binary file not shown.

0 comments on commit 9bedff6

Please sign in to comment.