Polymorph belt blacklists several biotypes instead of allowing only organics (#78229)

## About The Pull Request

Title; this makes the belt able to morph into _more_ mobs, but _less
problematic/abusable_ mobs hopefully. It still only functions on
basic/simple_animals, however.

~~Headslugs get a `MOB_UNDEAD` bioflag to prevent morphing into them
completely. Though catching a sentient ling slug and morphing everyone
into it is funny, it's only funny the first 5 times someone does it.
(disclaimer: this is an approximation, i did not actually see a
polymorph belt in-game because i currently play miner and like 10 games
a week tops)
Arguably, this isn't ideal, but it's the closest we get unless we rename
`MOB_EPIC` or something into `MOB_SPECIAL` and let that one be the go-to
bioflag for mobs we don't want **fun** things happen to.~~
`MOB_EPIC` is now `MOB_SPECIAL`. Headslugs get that.
I think the alternative methow could use whatever the gold cores use to
determine what to spawn but that would shift the mobs available for the
belt even more and I can't be assed to figure out how _much_ of a shift
that would be. Dragons or slimes or lavaland mobs would be out, for
example. Don't really vibe with that.

Fixes headslug's description bit that discerns a sentient slug from an
AI one showing up on a dead slug. It can't move while it's dead, no
matter its mind/AI.

Also adds simple dmdoc comments to the defines to help discern a few of
them more easily. Non-quip text suggestions welcome.

## Why It's Good For The Game
- Resolves #77756
- Resolves #78227

More mobs available for the funny belt but less _fun_ mobs should allow
for more stable use of the damn thing. Arguably, some of the mobs that
have been found to be incompatible with the belt are simply lacking a
`MOB_ORGANIC` flag, some of them with no apparent reason. However,
blacklisting potentially problematic biotypes should be easier to design
the unwanted mobs around.
Also consistency, less all-ling stations, code clarity. Whatever.

## Changelog

🆑
balance: polymorph belt now blacklists mobs that are undead, humanoid,
robotic or spiritual (in nature, not religiously), as well as megafauna
balance: however, this means that it works with more mobs that it should
logically work with, like slimes/bugs/lightgeists etc
fix: fixed headslug shenanigans with the polymorph belt hopefully for
good this time
fix: fixed headslug description mentioning its movement despite the slug
being dead
/🆑
This commit is contained in:
Sealed101
2023-09-10 21:09:01 +02:00
committed by GitHub
parent 115b40bf94
commit 5e9e45f1b6
9 changed files with 29 additions and 16 deletions
+13 -2
View File
@@ -42,18 +42,29 @@
#define VENTCRAWLER_ALWAYS 2
//Mob bio-types flags
///The mob is organic, can can heal from medical sutures.
///The mob is organic, can heal from medical sutures.
#define MOB_ORGANIC (1 << 0)
///The mob is of a rocky make, most likely a golem. Iron within, iron without!
#define MOB_MINERAL (1 << 1)
///The mob is a synthetic lifeform, like station borgs.
#define MOB_ROBOTIC (1 << 2)
///The mob is an shambling undead corpse. Or a halloween species. Pick your poison.
#define MOB_UNDEAD (1 << 3)
///The mob is a human-sized human-like human-creature.
#define MOB_HUMANOID (1 << 4)
///The mob is a bug/insect/arachnid/some other kind of scuttly thing.
#define MOB_BUG (1 << 5)
///The mob is a wild animal. Domestication may apply.
#define MOB_BEAST (1 << 6)
#define MOB_EPIC (1 << 7) //megafauna
///The mob is some kind of a creature that should be exempt from certain **fun** interactions for balance reasons, i.e. megafauna or a headslug.
#define MOB_SPECIAL (1 << 7)
///The mob is some kind of a scaly reptile creature
#define MOB_REPTILE (1 << 8)
///The mob is a spooky phantasm or an evil ghast of such nature.
#define MOB_SPIRIT (1 << 9)
///The mob is a plant-based species, benefitting from light but suffering from darkness and plantkillers.
#define MOB_PLANT (1 << 10)
///The mob is a goopy creature, probably coming from xenobiology.
#define MOB_SLIME (1 << 11)
//Lung respiration type flags
+1 -1
View File
@@ -10,7 +10,7 @@ GLOBAL_LIST_EMPTY(all_ongoing_hallucinations)
#define HALLUCINATION_ARGLIST 3
/// Biotypes which cannot hallucinate for balance and logic reasons (not code)
#define NO_HALLUCINATION_BIOTYPES (MOB_ROBOTIC|MOB_SPIRIT|MOB_EPIC)
#define NO_HALLUCINATION_BIOTYPES (MOB_ROBOTIC|MOB_SPIRIT|MOB_SPECIAL)
// Macro wrapper for _cause_hallucination so we can cheat in named arguments, like AddComponent.
/**
+3 -3
View File
@@ -245,16 +245,16 @@ DEFINE_BITFIELD(mecha_flags, list(
DEFINE_BITFIELD(mob_biotypes, list(
"MOB_BEAST" = MOB_BEAST,
"MOB_BUG" = MOB_BUG,
"MOB_EPIC" = MOB_EPIC,
"MOB_HUMANOID" = MOB_HUMANOID,
"MOB_MINERAL" = MOB_MINERAL,
"MOB_ORGANIC" = MOB_ORGANIC,
"MOB_PLANT" = MOB_PLANT,
"MOB_REPTILE" = MOB_REPTILE,
"MOB_ROBOTIC" = MOB_ROBOTIC,
"MOB_SLIME" = MOB_SLIME,
"MOB_SPECIAL" = MOB_SPECIAL,
"MOB_SPIRIT" = MOB_SPIRIT,
"MOB_UNDEAD" = MOB_UNDEAD,
"MOB_PLANT" = MOB_PLANT,
"MOB_SLIME" = MOB_SLIME,
))
DEFINE_BITFIELD(mob_respiration_type, list(
@@ -14,7 +14,7 @@
return ..()
/datum/status_effect/eye_blur/on_apply()
if(owner.mob_biotypes & (MOB_ROBOTIC|MOB_SPIRIT|MOB_EPIC))
if(owner.mob_biotypes & (MOB_ROBOTIC|MOB_SPIRIT|MOB_SPECIAL))
return FALSE
// Refresh the blur when a client jumps into the mob, in case we get put on a clientless mob with no hud
@@ -60,8 +60,8 @@
if (!isanimal_or_basicmob(target_mob))
balloon_alert(user, "target too complex!")
return TRUE
if (!(target_mob.mob_biotypes & MOB_ORGANIC))
balloon_alert(user, "organic life only!")
if (target_mob.mob_biotypes & (MOB_HUMANOID|MOB_ROBOTIC|MOB_SPECIAL|MOB_SPIRIT|MOB_UNDEAD))
balloon_alert(user, "incompatible!")
return TRUE
if (isanimal_or_basicmob(target_mob))
if (!target_mob.compare_sentience_type(SENTIENCE_ORGANIC))
@@ -6,7 +6,7 @@
icon_living = "star_gazer"
pixel_x = -32
base_pixel_x = -32
mob_biotypes = MOB_HUMANOID | MOB_EPIC
mob_biotypes = MOB_HUMANOID | MOB_SPECIAL
response_help_continuous = "passes through"
response_help_simple = "pass through"
speed = -0.2
@@ -18,6 +18,7 @@
attack_verb_simple = "chomp"
attack_sound = 'sound/weapons/bite.ogg'
attack_vis_effect = ATTACK_EFFECT_BITE
mob_biotypes = MOB_ORGANIC|MOB_SPECIAL
faction = list(FACTION_CREATURE)
obj_damage = 0
environment_smash = ENVIRONMENT_SMASH_NONE
@@ -39,10 +40,11 @@
/mob/living/basic/headslug/examine(mob/user)
. = ..()
if(isnull(client))
. += span_notice("It appears to be moving around listlessly.")
else
. += span_warning("It's moving around intelligently!")
if(stat != DEAD)
if(isnull(client))
. += span_notice("It appears to be moving around listlessly.")
else
. += span_warning("It's moving around intelligently!")
if (egg_lain)
. += span_notice("Its reproductive equipment appears to have withered.")
@@ -145,7 +145,7 @@
mob_size = MOB_SIZE_HUGE
sentience_type = SENTIENCE_BOSS
environment_smash = ENVIRONMENT_SMASH_RWALLS
mob_biotypes = MOB_ORGANIC|MOB_EPIC
mob_biotypes = MOB_ORGANIC|MOB_SPECIAL
obj_damage = 200
ranged_cooldown_time = 5
ranged = TRUE
@@ -6,7 +6,7 @@
combat_mode = TRUE
sentience_type = SENTIENCE_BOSS
environment_smash = ENVIRONMENT_SMASH_RWALLS
mob_biotypes = MOB_ORGANIC|MOB_EPIC
mob_biotypes = MOB_ORGANIC|MOB_SPECIAL
obj_damage = 400
light_range = 3
faction = list(FACTION_MINING, FACTION_BOSS)