Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Slightly less temporary werewolf code #602

Open
wants to merge 19 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
19 commits
Select commit Hold shift + click to select a range
62337ec
first cracks at restoration
Wollywoger Oct 19, 2024
0d1a128
Merge branch 'master' of https://www.github.com/wollywoger/maplestati…
Wollywoger Oct 19, 2024
e003968
temporarily removes a trait from werewolf liver
Wollywoger Oct 19, 2024
e1f667d
moves the organ flags on werewolf liver
Wollywoger Oct 19, 2024
68dec59
fixes the werewolf legs again, adds the spell, screenshots still need…
Wollywoger Oct 20, 2024
601afc3
rebalances, updates screenshots For Now
Wollywoger Oct 20, 2024
5da2d7f
renames werewolfform to test something
Wollywoger Oct 21, 2024
94353cd
fixes the ears and brain, breaks screenshot tests
Wollywoger Oct 28, 2024
80708e6
fixes a runtime, fixes screenshots, fixes how limbs work
Wollywoger Oct 31, 2024
35cb0f6
removes bio state changes from werewolf parts because they're likely …
Wollywoger Nov 1, 2024
16a5380
Merge branch 'master' into werewolf-content
Wollywoger Nov 1, 2024
4b0e406
Merge branch 'master' into werewolf-content
Wollywoger Nov 30, 2024
269ce46
werewolves can wear jumpsuits, adds an icon for the werewolf change, …
Wollywoger Dec 1, 2024
ad93687
Merge branch 'werewolf-content' of https://www.github.com/wollywoger/…
Wollywoger Dec 1, 2024
ca8f194
refactors the werewolf change spell, changes the sprite for werewolve…
Wollywoger Dec 1, 2024
d16bb01
Merge branch 'master' into werewolf-content
Wollywoger Dec 2, 2024
5c10572
mini refactor
Wollywoger Dec 2, 2024
1ed585c
Merge branch 'werewolf-content' of https://www.github.com/wollywoger/…
Wollywoger Dec 2, 2024
a20c470
more refactors
Wollywoger Dec 11, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
5 changes: 5 additions & 0 deletions maplestation.dme
Original file line number Diff line number Diff line change
Expand Up @@ -6424,6 +6424,7 @@
#include "maplestation_modules\code\modules\magic\story_spells\ice_blast.dm"
#include "maplestation_modules\code\modules\magic\story_spells\ice_knife.dm"
#include "maplestation_modules\code\modules\magic\story_spells\illusion.dm"
#include "maplestation_modules\code\modules\magic\story_spells\lycanthropy.dm"
#include "maplestation_modules\code\modules\magic\story_spells\mage_hand.dm"
#include "maplestation_modules\code\modules\magic\story_spells\mana_charge.dm"
#include "maplestation_modules\code\modules\magic\story_spells\mana_sense.dm"
Expand Down Expand Up @@ -6478,6 +6479,7 @@
#include "maplestation_modules\code\modules\mob\living\carbon\human\species_types\skrell.dm"
#include "maplestation_modules\code\modules\mob\living\carbon\human\species_types\species.dm"
#include "maplestation_modules\code\modules\mob\living\carbon\human\species_types\vampire.dm"
#include "maplestation_modules\code\modules\mob\living\carbon\human\species_types\werewolf.dm"
#include "maplestation_modules\code\modules\mob\living\carbon\human\species_types\synth\synth.dm"
#include "maplestation_modules\code\modules\mob\living\carbon\human\species_types\synth\synth_ion.dm"
#include "maplestation_modules\code\modules\mob\living\silicon\robot\robot_defines.dm"
Expand Down Expand Up @@ -6518,8 +6520,11 @@
#include "maplestation_modules\code\modules\surgery\organs\autosurgeon.dm"
#include "maplestation_modules\code\modules\surgery\organs\ears.dm"
#include "maplestation_modules\code\modules\surgery\organs\eyes.dm"
#include "maplestation_modules\code\modules\surgery\organs\heart.dm"
#include "maplestation_modules\code\modules\surgery\organs\liver.dm"
#include "maplestation_modules\code\modules\surgery\organs\tails.dm"
#include "maplestation_modules\code\modules\surgery\organs\tongue.dm"
#include "maplestation_modules\code\modules\surgery\organs\werewolf_parts.dm"
#include "maplestation_modules\code\modules\uplink\uplink_devices.dm"
#include "maplestation_modules\code\modules\uplink\uplink_infiltrator.dm"
#include "maplestation_modules\code\modules\uplink\uplink_items.dm"
Expand Down
1 change: 1 addition & 0 deletions maplestation_modules/code/__DEFINES/DNA.dm
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,4 @@
#define SPECIES_REPLOID "reploid"
#define SPECIES_SYNTH "synth"
#define SPECIES_ORNITHID "ornithid"
#define SPECIES_WEREWOLF "werewolf"
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
// the many spells that are used to turn into versions of a werewolf

/datum/action/cooldown/spell/shapeshift/lycanthrope // use this for the simplemob forms, like standard wolves
name = "Wolf Form"
desc = "Channel the wolf within yourself and turn into one of your possible forms. \
Be careful, for you can still die within this form."
invocation = "RAAAAAAAAWR!"
invocation_type = INVOCATION_SHOUT
spell_requirements = NONE
possible_shapes = list(
/mob/living/simple_animal/hostile/asteroid/wolf, // room to add other forms
)

/datum/action/cooldown/spell/werewolf_form
name = "Werewolf Change"
desc = "Change to and from your full werewolf form. \
You will gain the full effects of this, both negative and positive."
invocation = "ARRRROOOOO!" // i don't know man
invocation_type = INVOCATION_SHOUT
spell_requirements = SPELL_REQUIRES_HUMAN
button_icon = 'maplestation_modules/icons/mob/actions/actions_advspells.dmi'
button_icon_state = "moon"
var/datum/species/owner_base_species // what species we are other than a werewolf
var/list/base_features = list("mcolor" = "#FFFFFF")
// yes this might cause other implications, such as mass species change, or with synths (synthcode moment) but i'll look into it later down the line

/datum/action/cooldown/spell/werewolf_form/cast(atom/movable/cast_on)
. = ..()
var/mob/living/carbon/human/lycanthrope = owner
if(istype(lycanthrope.dna.species, /datum/species/werewolf))
lycanthrope.balloon_alert(cast_on, "changing back")
lycanthrope.dna.features = base_features
lycanthrope.set_species(owner_base_species)
else
owner_base_species = lycanthrope.dna.species
base_features = lycanthrope.dna.features.Copy()
lycanthrope.balloon_alert(cast_on, "turning")
lycanthrope.set_species(/datum/species/werewolf)
Original file line number Diff line number Diff line change
Expand Up @@ -52,3 +52,7 @@
outfit_copy.implants = list()
for(var/obj/item/implant/I in implants)
outfit_copy.implants |= I.type

// species mobs
/mob/living/carbon/human/species/werewolf
race = /datum/species/werewolf
Original file line number Diff line number Diff line change
@@ -0,0 +1,80 @@
/datum/species/werewolf
name = "werewolf"
id = SPECIES_WEREWOLF
inherent_traits = list(
TRAIT_USES_SKINTONES,
TRAIT_NO_UNDERWEAR,
TRAIT_NO_AUGMENTS,
TRAIT_IGNOREDAMAGESLOWDOWN,
TRAIT_PUSHIMMUNE,
TRAIT_STUNIMMUNE,
TRAIT_PRIMITIVE,
TRAIT_CAN_STRIP,
TRAIT_CHUNKYFINGERS
)
mutanttongue = /obj/item/organ/internal/tongue/werewolf
mutantears = /obj/item/organ/internal/ears/cat/werewolf
mutanteyes = /obj/item/organ/internal/eyes/werewolf
mutantbrain = /obj/item/organ/internal/brain/werewolf
mutantliver = /obj/item/organ/internal/liver/werewolf
mutantheart = /obj/item/organ/internal/heart/werewolf
external_organs = list(
/obj/item/organ/external/tail/cat = "Cat", // todo: add custom wolf tail
)
skinned_type = /obj/item/stack/sheet/animalhide/human
changesource_flags = MIRROR_BADMIN | WABBAJACK | MIRROR_MAGIC | MIRROR_PRIDE | ERT_SPAWN | RACE_SWAP | SLIME_EXTRACT
no_equip_flags = ITEM_SLOT_MASK | ITEM_SLOT_OCLOTHING | ITEM_SLOT_GLOVES | ITEM_SLOT_FEET | ITEM_SLOT_SUITSTORE

bodypart_overrides = list(
BODY_ZONE_HEAD = /obj/item/bodypart/head/werewolf,
BODY_ZONE_CHEST = /obj/item/bodypart/chest/werewolf,
BODY_ZONE_L_ARM = /obj/item/bodypart/arm/left/werewolf,
BODY_ZONE_R_ARM = /obj/item/bodypart/arm/right/werewolf,
BODY_ZONE_L_LEG = /obj/item/bodypart/leg/left/werewolf,
BODY_ZONE_R_LEG = /obj/item/bodypart/leg/right/werewolf,
)

/obj/item/organ/internal/brain/werewolf
name = "werewolf brain"
desc = "a strange mixture of a human and wolf brain"
organ_traits = list(TRAIT_ADVANCEDTOOLUSER, TRAIT_LITERATE, TRAIT_PRIMITIVE, TRAIT_CAN_STRIP) // you may be a raging monster, but you still retain traits of your normal self
// also you can just inject clever mutation and get the first two traits anyways *shrug

/obj/item/organ/internal/brain/werewolf/get_attacking_limb(mob/living/carbon/human/target)
if(target.body_position == LYING_DOWN)
return owner.get_bodypart(BODY_ZONE_HEAD) // performs a "maul" attack which does increased melee damage
return ..()

/datum/species/werewolf/prepare_human_for_preview(mob/living/carbon/human/human)
human.set_haircolor("#bb9966", update = FALSE) // brown
human.set_hairstyle("Business Hair", update = TRUE)

/* this shouldn't be a roundstart/base species players can choose, and is instead obtainable mid round
feel free to update this section if any of the three below can be accessed out of character set up. */
/datum/species/werewolf/get_species_description()
return "N/A"

/datum/species/human/get_species_lore()
return list(
"N/A",
)

/datum/species/werewolf/create_pref_unique_perks()
var/list/to_add = list()

to_add += list(
list(
SPECIES_PERK_TYPE = SPECIES_NEGATIVE_PERK,
SPECIES_PERK_ICON = "paw",
SPECIES_PERK_NAME = "Primal Primate",
SPECIES_PERK_DESC = "Werewolves are monstrous humans, and can't do most things a human can do. Computers are impossible, \
complex machines are right out, and most clothes don't fit your larger form.",
),
list(
SPECIES_PERK_TYPE = SPECIES_NEGATIVE_PERK,
SPECIES_PERK_ICON = "assistive-listening-systems",
SPECIES_PERK_NAME = "Sensitive Hearing",
SPECIES_PERK_DESC = "Werewolves are more sensitive to loud sounds, such as flashbangs.",
))

return to_add
32 changes: 32 additions & 0 deletions maplestation_modules/code/modules/surgery/organs/ears.dm
Original file line number Diff line number Diff line change
Expand Up @@ -31,3 +31,35 @@
icon_state = "catcyber"
icon = 'maplestation_modules/icons/mob/mutant_bodyparts.dmi'
locked = TRUE

/obj/item/organ/internal/ears/cat/werewolf
name = "wolf ears"
icon = 'icons/obj/clothing/head/costume.dmi'
icon_state = "kitty"
desc = "Allows the user to more easily hear whispers. The user becomes extra vulnerable to loud noises, however"
// Same sensitivity as felinid ears
damage_multiplier = 2

/obj/item/organ/internal/ears/cat/werewolf/on_mob_insert(mob/living/carbon/human/ear_owner)
. = ..()
if(istype(ear_owner))
color = ear_owner.hair_color
ear_owner.dna.features["ears"] = ear_owner.dna.species.mutant_bodyparts["ears"] = "Werewolf"
ear_owner.update_body()
ADD_TRAIT(ear_owner, TRAIT_GOOD_HEARING, ORGAN_TRAIT)

/obj/item/organ/internal/ears/cat/werewolf/on_mob_remove(mob/living/carbon/human/ear_owner)
. = ..()
if(istype(ear_owner))
ear_owner.dna.features["ears"] = "None"
ear_owner.dna.species.mutant_bodyparts -= "ears"
ear_owner.update_body()
REMOVE_TRAIT(ear_owner, TRAIT_GOOD_HEARING, ORGAN_TRAIT)

/datum/sprite_accessory/ears/werewolf
name = "Werewolf"
icon_state = "werewolf"
icon = 'maplestation_modules/icons/mob/mutant_bodyparts.dmi'
locked = TRUE
hasinner = TRUE
color_src = HAIR_COLOR
6 changes: 6 additions & 0 deletions maplestation_modules/code/modules/surgery/organs/eyes.dm
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,9 @@
/mob/living/carbon
/// Overlay file to take (missing) eye icons from
var/missing_eye_file = 'icons/mob/human/human_face.dmi'

/obj/item/organ/internal/eyes/werewolf
name = "wolf eyes"
desc = "Large and powerful eyes."
sight_flags = SEE_MOBS
color_cutoffs = list(25, 5, 42)
10 changes: 10 additions & 0 deletions maplestation_modules/code/modules/surgery/organs/heart.dm
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
/obj/item/organ/internal/heart/werewolf
name = "massive heart"
desc = "An absolutely monstrous heart."
icon_state = "heart-on"
base_icon_state = "heart"
maxHealth = 2 * STANDARD_ORGAN_THRESHOLD

/obj/item/organ/internal/heart/wolf/Initialize(mapload)
. = ..()
transform = transform.Scale(1.5)
23 changes: 23 additions & 0 deletions maplestation_modules/code/modules/surgery/organs/liver.dm
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
// Liver stuff

// werewolf liver, used for various funny traits, like handling their silver weakness chemically
/obj/item/organ/internal/liver/werewolf

name = "Beastly liver"
desc = "A large monstrous liver."
icon_state = "liver"
organ_flags = ORGAN_UNREMOVABLE
organ_traits = list(TRAIT_STABLELIVER)
// TODO: implement these
var/blood_brute_healing = 2.5
///Var for burn healing via blood
var/blood_burn_healing = 2.5

/obj/item/organ/internal/liver/werewolf/handle_chemical(mob/living/carbon/organ_owner, datum/reagent/chem, seconds_per_tick, times_fired)
. = ..()
// parent returned COMSIG_MOB_STOP_REAGENT_CHECK or we are failing
if((. & COMSIG_MOB_STOP_REAGENT_CHECK) || (organ_flags & ORGAN_FAILING))
return
if(istype(chem, /datum/reagent/silver))
organ_owner.adjustStaminaLoss(4 * REM * seconds_per_tick, updating_stamina = TRUE)
organ_owner.adjustFireLoss(2 * REM * seconds_per_tick, updating_health = TRUE)
35 changes: 35 additions & 0 deletions maplestation_modules/code/modules/surgery/organs/tongue.dm
Original file line number Diff line number Diff line change
Expand Up @@ -36,3 +36,38 @@

/obj/item/organ/internal/tongue/lizard/get_possible_languages()
return ..() + /datum/language/impdraconic

/obj/item/organ/internal/tongue/werewolf
name = "wolf tongue"
desc = "A large tongue that looks like a mix of a human's and a wolf's."
icon_state = "werewolf_tongue"
icon = 'maplestation_modules/icons/mob/mutant_bodyparts.dmi'
say_mod = "growls"
modifies_speech = TRUE
taste_sensitivity = 5
liked_foodtypes = GROSS | MEAT | RAW | GORE
disliked_foodtypes = SUGAR

/obj/item/organ/internal/tongue/werewolf/modify_speech(datum/source, list/speech_args)
var/message = speech_args[SPEECH_MESSAGE]
if(message[1] != "*")

// all occurrences of characters "eiou" (case-insensitive) are replaced with "r"
message = replacetext(message, regex(@"[eiou]", "ig"), "r")
// all characters other than "zhrgbmna .!?-" (case-insensitive) are stripped
message = replacetext(message, regex(@"[^zhrgbmna.!?-\s]", "ig"), "")
// multiple spaces are replaced with a single (whitespace is trimmed)
message = replacetext(message, regex(@"(\s+)", "g"), " ")

var/list/old_words = splittext(message, " ")
var/list/new_words = list()
for(var/word in old_words)
// lower-case "r" at the end of words replaced with "rh"
word = replacetext(word, regex(@"\lr\b"), "rh")
// an "a" or "A" by itself will be replaced with "hra"
word = replacetext(word, regex(@"\b[Aa]\b"), "hra")
new_words += word

message = new_words.Join(" ")
message = capitalize(message)
speech_args[SPEECH_MESSAGE] = message
Loading
Loading