Skip to content

Commit

Permalink
Merge branch 'master' into conscripts-gone
Browse files Browse the repository at this point in the history
  • Loading branch information
AmoryBlaine committed Sep 9, 2024
2 parents f9e4f50 + 92944b9 commit 75de178
Show file tree
Hide file tree
Showing 35 changed files with 802 additions and 22 deletions.
8 changes: 8 additions & 0 deletions code/__DEFINES/mobs.dm
Original file line number Diff line number Diff line change
Expand Up @@ -449,3 +449,11 @@ var/list/default_xeno_onmob_icons = list(
#define MOBILITY_FLAGS_CARBON_DEFAULT (MOBILITY_MOVE | MOBILITY_STAND | MOBILITY_REST | MOBILITY_LIEDOWN)
#define MOBILITY_FLAGS_REST_CAPABLE_DEFAULT (MOBILITY_MOVE | MOBILITY_STAND | MOBILITY_REST | MOBILITY_LIEDOWN)

/// Sleeps for X and will perform return if A is qdeleted or a dead mob.
#define SLEEP_CHECK_DEATH(X, A) \
sleep(X); \
if(QDELETED(A)) return; \
if(ismob(A)) { \
var/mob/sleep_check_death_mob = A; \
if(sleep_check_death_mob.stat == DEAD) return; \
}
6 changes: 5 additions & 1 deletion code/__DEFINES/xeno.dm
Original file line number Diff line number Diff line change
Expand Up @@ -239,6 +239,7 @@
#define XENO_HEALTH_TIER_14 950 * XENO_UNIVERSAL_HPMULT
#define XENO_HEALTH_QUEEN 1000 * XENO_UNIVERSAL_HPMULT
#define XENO_HEALTH_IMMORTAL 1200 * XENO_UNIVERSAL_HPMULT
#define XENO_HEALTH_KING 1500 * XENO_UNIVERSAL_HPMULT

// Plasma bands
#define XENO_NO_PLASMA 0
Expand Down Expand Up @@ -381,6 +382,7 @@
// Armor mods. Use the above defines for some guidance
// In general, +20 armor should be a little more than +20% effective HP, however,
// the higher the Xeno's base armor, the greater the effect.
#define XENO_ARMOR_MOD_TINY 2.5
#define XENO_ARMOR_MOD_VERY_SMALL 5
#define XENO_ARMOR_MOD_SMALL 10
#define XENO_ARMOR_MOD_MED 15
Expand Down Expand Up @@ -614,6 +616,7 @@
#define XENO_SHIELD_SOURCE_GARDENER 8
#define XENO_SHIELD_SOURCE_SHIELD_PILLAR 9
#define XENO_SHIELD_SOURCE_CUMULATIVE_GENERIC 10
#define XENO_SHIELD_SOURCE_KING_BULWARKSPELL 11

//XENO CASTES
#define XENO_CASTE_LARVA "Bloody Larva"
Expand Down Expand Up @@ -643,12 +646,13 @@
#define XENO_CASTE_RAVAGER "Ravager"
#define XENO_T3_CASTES list(XENO_CASTE_BOILER, XENO_CASTE_PRAETORIAN, XENO_CASTE_CRUSHER, XENO_CASTE_RAVAGER)
//special
#define XENO_CASTE_KING "King"
#define XENO_CASTE_QUEEN "Queen"
#define XENO_CASTE_PREDALIEN "Predalien"
#define XENO_CASTE_HELLHOUND "Hellhound"
#define XENO_SPECIAL_CASTES list(XENO_CASTE_QUEEN, XENO_CASTE_PREDALIEN, XENO_CASTE_HELLHOUND)

#define ALL_XENO_CASTES list(XENO_CASTE_LARVA, XENO_CASTE_PREDALIEN_LARVA, XENO_CASTE_FACEHUGGER, XENO_CASTE_LESSER_DRONE, XENO_CASTE_DRONE, XENO_CASTE_RUNNER, XENO_CASTE_SENTINEL, XENO_CASTE_DEFENDER, XENO_CASTE_BURROWER, XENO_CASTE_CARRIER, XENO_CASTE_HIVELORD, XENO_CASTE_LURKER, XENO_CASTE_WARRIOR, XENO_CASTE_SPITTER, XENO_CASTE_BOILER, XENO_CASTE_PRAETORIAN, XENO_CASTE_CRUSHER, XENO_CASTE_RAVAGER, XENO_CASTE_QUEEN, XENO_CASTE_PREDALIEN, XENO_CASTE_HELLHOUND)
#define ALL_XENO_CASTES list(XENO_CASTE_LARVA, XENO_CASTE_PREDALIEN_LARVA, XENO_CASTE_FACEHUGGER, XENO_CASTE_LESSER_DRONE, XENO_CASTE_DRONE, XENO_CASTE_RUNNER, XENO_CASTE_SENTINEL, XENO_CASTE_DEFENDER, XENO_CASTE_BURROWER, XENO_CASTE_CARRIER, XENO_CASTE_HIVELORD, XENO_CASTE_LURKER, XENO_CASTE_WARRIOR, XENO_CASTE_SPITTER, XENO_CASTE_BOILER, XENO_CASTE_PRAETORIAN, XENO_CASTE_CRUSHER, XENO_CASTE_RAVAGER, XENO_CASTE_QUEEN, XENO_CASTE_PREDALIEN, XENO_CASTE_HELLHOUND, XENO_CASTE_KING)

// Checks if two hives are allied to each other.
// PARAMETERS:
Expand Down
2 changes: 2 additions & 0 deletions code/_globalvars/misc.dm
Original file line number Diff line number Diff line change
Expand Up @@ -55,3 +55,5 @@ GLOBAL_VAR(obfs_x)
GLOBAL_VAR(obfs_y)

GLOBAL_VAR_INIT(ai_xeno_weeding, TRUE)

GLOBAL_LIST_INIT(alldirs, list(NORTH, SOUTH, EAST, WEST, NORTHEAST, NORTHWEST, SOUTHEAST, SOUTHWEST))
1 change: 1 addition & 0 deletions code/datums/langchat/langchat.dm
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
/mob/living/carbon/xenomorph/hivelord/langchat_height = 64
/mob/living/carbon/xenomorph/defender/langchat_height = 48
/mob/living/carbon/xenomorph/warrior/langchat_height = 48
/mob/living/carbon/xenomorph/king/langchat_height = 64

#define LANGCHAT_LONGEST_TEXT 64
#define LANGCHAT_WIDTH 96
Expand Down
20 changes: 20 additions & 0 deletions code/datums/xeno_shields/shield_types/king_shield.dm
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
/// Shield can be equal to a maximum of percent_maxhealth_damagecap of the receiver's max hp
/datum/xeno_shield/king_shield
duration = 10 SECONDS
decay_amount_per_second = 100
/// The maximum damage multiplier of max health to apply in a hit
var/percent_maxhealth_damagecap = 0.1

/datum/xeno_shield/king_shield/on_hit(damage)
var/relative_damage_cap = linked_xeno.maxHealth * percent_maxhealth_damagecap

if(damage > relative_damage_cap)
damage = relative_damage_cap
return ..(damage)


/datum/xeno_shield/king_shield/on_removal()
. = ..()
if(linked_xeno)
// Remove the shield overlay early
linked_xeno.remove_suit_layer()
9 changes: 6 additions & 3 deletions code/datums/xeno_shields/xeno_shield.dm
Original file line number Diff line number Diff line change
Expand Up @@ -79,11 +79,14 @@
xeno_shields += new_shield
new_shield.last_damage_taken = world.time // So we don't insta-delete our shield.

new_shield.decay_amount_per_second = decay_amount_per_second
if(decay_amount_per_second)
new_shield.decay_amount_per_second = decay_amount_per_second
if(duration)
new_shield.duration = duration
new_shield.linked_xeno = src

if(duration > -1)
addtimer(CALLBACK(new_shield, TYPE_PROC_REF(/datum/xeno_shield, begin_decay)), duration)
if(new_shield.duration > -1)
addtimer(CALLBACK(new_shield, TYPE_PROC_REF(/datum/xeno_shield, begin_decay)), new_shield.duration)

overlay_shields()
return new_shield
Expand Down
2 changes: 2 additions & 0 deletions code/game/jobs/role_authority.dm
Original file line number Diff line number Diff line change
Expand Up @@ -796,6 +796,8 @@ I hope it's easier to tell what the heck this proc is even doing, unlike previou
M = /mob/living/carbon/xenomorph/predalien
if(XENO_CASTE_HELLHOUND)
M = /mob/living/carbon/xenomorph/hellhound
if(XENO_CASTE_KING)
M = /mob/living/carbon/xenomorph/king
return M


Expand Down
16 changes: 16 additions & 0 deletions code/game/objects/effects/effect_system/smoke.dm
Original file line number Diff line number Diff line change
Expand Up @@ -681,6 +681,22 @@

// XENO SMOKES

/obj/effect/particle_effect/smoke/king
opacity = FALSE
color = "#000000"
icon = 'icons/effects/effects.dmi'
icon_state = "sparks"
anchored = TRUE
mouse_opacity = MOUSE_OPACITY_TRANSPARENT
layer = BELOW_OBJ_LAYER
time_to_live = 5
spread_speed = 1
pixel_x = 0
pixel_y = 0

/datum/effect_system/smoke_spread/king_doom
smoke_type = /obj/effect/particle_effect/smoke/king

/datum/effect_system/smoke_spread/xeno_acid
smoke_type = /obj/effect/particle_effect/smoke/xeno_burn

Expand Down
13 changes: 13 additions & 0 deletions code/game/objects/effects/temporary_visuals.dm
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,19 @@
. = ..()
deltimer(timerid)

//-----------------------------------------
//HEAVY IMPACT
//-----------------------------------------

/obj/effect/temp_visual/heavy_impact
icon = 'icons/effects/heavyimpact.dmi'
icon_state = "heavyimpact"
duration = 1.3 SECONDS

/obj/effect/temp_visual/heavyimpact/Initialize(mapload)
. = ..()
flick("heavyimpact", src)

/obj/effect/temp_visual/dir_setting
randomdir = FALSE

Expand Down
5 changes: 5 additions & 0 deletions code/modules/admin/player_panel/actions/transform.dm
Original file line number Diff line number Diff line change
Expand Up @@ -140,6 +140,11 @@ GLOBAL_LIST_INIT(pp_transformables, list(
name = XENO_CASTE_PREDALIEN,
key = /mob/living/carbon/xenomorph/predalien,
color = "purple"
),
list(
name = XENO_CASTE_KING,
key = /mob/living/carbon/xenomorph/king,
color="purple"
)
),

Expand Down
7 changes: 4 additions & 3 deletions code/modules/clothing/suits/marine_armor.dm
Original file line number Diff line number Diff line change
Expand Up @@ -377,6 +377,7 @@
storage_slots = 2
slowdown = SLOWDOWN_ARMOR_LIGHT
flags_inventory = BLOCKSHARPOBJ|SMARTGUN_HARNESS
flags_atom = NO_NAME_OVERRIDE
allowed = list(
/obj/item/tank/emergency_oxygen,
/obj/item/device/flashlight,
Expand All @@ -394,7 +395,7 @@

/obj/item/clothing/suit/storage/marine/smartgunner/Initialize()
. = ..()
if(SSmapping.configs[GROUND_MAP].environment_traits[MAP_COLD] && name == "M56 combat harness")
if(SSmapping.configs[GROUND_MAP].environment_traits[MAP_COLD] && name == "\improper M56 combat harness" && !(flags_atom & NO_SNOW_TYPE))
name = "M56 snow combat harness"

/obj/item/clothing/suit/storage/marine/smartgunner/mob_can_equip(mob/equipping_mob, slot, disable_warning = FALSE)
Expand Down Expand Up @@ -431,10 +432,10 @@
UnregisterSignal(user, COMSIG_HUMAN_ATTEMPTING_EQUIP)

/obj/item/clothing/suit/storage/marine/smartgunner/standard
flags_atom = NO_SNOW_TYPE
flags_atom = NO_SNOW_TYPE|NO_NAME_OVERRIDE

/obj/item/clothing/suit/storage/marine/smartgunner/black
flags_atom = NO_SNOW_TYPE
flags_atom = NO_SNOW_TYPE|NO_NAME_OVERRIDE
icon_state = "8fancy"

/obj/item/clothing/suit/storage/marine/smartgunner/upp
Expand Down
10 changes: 10 additions & 0 deletions code/modules/cm_aliens/XenoStructures.dm
Original file line number Diff line number Diff line change
Expand Up @@ -919,6 +919,16 @@
E.source = initial(name)
qdel(src)

/obj/effect/alien/resin/king_cocoon
name = "alien cocoon"
desc = "A large pulsating cocoon."
icon = 'icons/obj/structures/alien/xenoKingHatchery.dmi'
icon_state = "growing" // I wanna to set hatching/hatched state on MMB game panel soon
health = 4000
pixel_x = -48
pixel_y = -64
density = TRUE
plane = FLOOR_PLANE

/datum/automata_cell/acid
neighbor_type = NEIGHBORS_NONE
Expand Down
4 changes: 3 additions & 1 deletion code/modules/mob/living/carbon/xenomorph/XenoProcs.dm
Original file line number Diff line number Diff line change
Expand Up @@ -684,8 +684,10 @@
return "Moderate"
if(3 to 3.9)
return "Strong"
if(4 to INFINITY)
if(4 to 4.9)
return "Very Strong"
if(4.9 to INFINITY)
return "Overwhelming"

/mob/living/carbon/xenomorph/proc/start_tracking_resin_mark(obj/effect/alien/resin/marker/target)
if(!target)
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,153 @@
/// 3 x 3 damage centred on the xenomorph
/datum/action/xeno_action/onclick/rend
name = "Rend"
action_icon_state = "rav_eviscerate"
ability_name = "rend"
macro_path = /datum/action_xeno_action/verb/verb_rend
xeno_cooldown = 2.5 SECONDS
plasma_cost = 25
ability_primacy = XENO_PRIMARY_ACTION_1

var/damage = 25
var/list/humans_near = list()

default_ai_action = TRUE
ai_prob_chance = 100

var/slash_sounds = list('sound/weapons/alien_claw_flesh1.ogg', 'sound/weapons/alien_claw_flesh2.ogg', 'sound/weapons/alien_claw_flesh3.ogg', 'sound/weapons/alien_claw_flesh4.ogg', 'sound/weapons/alien_claw_flesh5.ogg', 'sound/weapons/alien_claw_flesh6.ogg')

/datum/action/xeno_action/onclick/rend/process_ai(mob/living/carbon/xenomorph/X, delta_time)
for(var/mob/living/carbon/human/inrange in view(X))
var/distance_check = get_dist(X, inrange)

if(distance_check < 3)
humans_near |= inrange
continue

if(!DT_PROB(ai_prob_chance, delta_time) || length(humans_near) < 2 || get_dist(X, X.current_target) < 3 || X.action_busy)
humans_near.RemoveAll()
return

use_ability_async()
humans_near.RemoveAll()


/// Screech which puts out lights in a 7 tile radius, slows and dazes.
/datum/action/xeno_action/onclick/doom
name = "Doom"
action_icon_state = "screech"
ability_name = "doom"
macro_path = /datum/action_xeno_action/verb/verb_doom
xeno_cooldown = 45 SECONDS
plasma_cost = 50
ability_primacy = XENO_PRIMARY_ACTION_2

var/daze_length_seconds = 1
var/slow_length_seconds = 4
var/list/humans_near = list()

default_ai_action = TRUE
ai_prob_chance = 80

/datum/action/xeno_action/onclick/doom/process_ai(mob/living/carbon/xenomorph/X, delta_time)
for(var/mob/living/carbon/human/inrange in view(X))
var/distance_check = get_dist(X, inrange)

if(distance_check < 5)
humans_near |= inrange
continue

if(!DT_PROB(ai_prob_chance, delta_time) || length(humans_near) < 3 || get_dist(X, X.current_target) > 3 || X.action_busy)
humans_near.RemoveAll()
return

use_ability_async()
humans_near.RemoveAll()

/// Leap ability, crashing down dealing major damage to mobs and structures in the area.
/datum/action/xeno_action/onclick/destroy
name = "Destroy"
action_icon_state = "charge"
ability_name = "destroy"
macro_path = /datum/action/xeno_action/verb/verb_destroy
action_type = XENO_ACTION_ACTIVATE
xeno_cooldown = 15 SECONDS
plasma_cost = 0
ability_primacy = XENO_PRIMARY_ACTION_3

var/range = 7
var/leaping = FALSE

default_ai_action = TRUE
ai_prob_chance = 60

/datum/action/xeno_action/onclick/destroy/process_ai(mob/living/carbon/xenomorph/X, delta_time)
var/distance_check = get_dist(X, X.current_target)

if(distance_check > 7)
return

if(!DT_PROB(ai_prob_chance, delta_time) || get_dist(X, X.current_target) < 2 || X.action_busy)
return

use_ability_async()

/// Shield ability, limits the amount of damage from a single instance of damage to 10% of the xenomorph's max health.
/datum/action/xeno_action/onclick/king_shield
name = "Bulwark of the Hive"
action_icon_state = "soak"
ability_name = "legion_shield"
macro_path = /datum/action_xeno_action/verb/king_shield
action_type = XENO_ACTION_ACTIVATE
xeno_cooldown = 60 SECONDS
plasma_cost = 0
ability_primacy = XENO_PRIMARY_ACTION_4

default_ai_action = TRUE
ai_prob_chance = 80

var/shield_duration = 10 SECONDS
var/area_of_effect = 6
var/shield_amount = 100
var/list/xenos_near = list()

/datum/action/xeno_action/onclick/king_shield/process_ai(mob/living/carbon/xenomorph/X, delta_time)
for(var/mob/living/carbon/xenomorph/inrange in view(X))
var/distance_check = get_dist(X, inrange)

if(distance_check < 5)
xenos_near |= inrange
continue

if(!DT_PROB(ai_prob_chance, delta_time) || length(xenos_near) < 4 || X.action_busy)
xenos_near.RemoveAll()
return

use_ability_async()
xenos_near.RemoveAll()

/datum/action/xeno_action/onclick/king_frenzy
name = "King_frenzy"
action_icon_state = "charge_spit"
ability_name = "King Frenzy"
macro_path = /datum/action/xeno_action/verb/verb_charge_spit
ability_primacy = XENO_PRIMARY_ACTION_5
action_type = XENO_ACTION_ACTIVATE
plasma_cost = 50
xeno_cooldown = 6 SECONDS

// Config
var/duration = 40
var/speed_buff_amount = 1.2 // Go from shit slow to kindafast

var/buffs_active = FALSE

default_ai_action = TRUE
ai_prob_chance = 80

/datum/action/xeno_action/onclick/king_frenzy/process_ai(mob/living/carbon/xenomorph/X, delta_time)

if(!DT_PROB(ai_prob_chance, delta_time) || get_dist(X, X.current_target) < 2 || X.action_busy)
return

use_ability_async()
Loading

0 comments on commit 75de178

Please sign in to comment.