Skip to content

Commit

Permalink
TGS Test Merge (#6334)
Browse files Browse the repository at this point in the history
  • Loading branch information
cm13-github committed Aug 1, 2024
2 parents d6250fb + f69b5c5 commit b4ed9c9
Show file tree
Hide file tree
Showing 41 changed files with 1,733 additions and 44 deletions.
2 changes: 2 additions & 0 deletions code/__DEFINES/dcs/signals/atom/mob/living/signals_xeno.dm
Original file line number Diff line number Diff line change
Expand Up @@ -85,3 +85,5 @@

/// used in /datum/component/status_effect/cleanse()
#define COMSIG_XENO_DEBUFF_CLEANSE "xeno_debuff_cleanse"
/// From /mob/living/carbon/xenomorph/proc/do_evolve()
#define COMSIG_XENO_EVOLVE_TO_NEW_CASTE "xeno_evolve_to_new_caste"
9 changes: 9 additions & 0 deletions code/__DEFINES/mobs.dm
Original file line number Diff line number Diff line change
Expand Up @@ -383,3 +383,12 @@ GLOBAL_LIST_INIT(default_xeno_onmob_icons, list(
#define MOBILITY_FLAGS_LYING_CAPABLE_DEFAULT (MOBILITY_MOVE | MOBILITY_STAND | MOBILITY_LIEDOWN)
#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; \
}
13 changes: 10 additions & 3 deletions code/__DEFINES/xeno.dm
Original file line number Diff line number Diff line change
Expand Up @@ -174,7 +174,7 @@
/// The time when xenos can start taking over comm towers
#define XENO_COMM_ACQUISITION_TIME (55 MINUTES)

/// The time it takes for a pylon to give one larva while activated
/// The time it takes for a pylon to give one royal resin while activated
#define XENO_PYLON_ACTIVATION_COOLDOWN (5 MINUTES)

/// The time until you can re-corrupt a comms relay after the last pylon was destroyed
Expand Down Expand Up @@ -255,6 +255,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 @@ -434,6 +435,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 @@ -665,6 +667,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 @@ -693,13 +696,17 @@
#define XENO_CASTE_CRUSHER "Crusher"
#define XENO_CASTE_RAVAGER "Ravager"
#define XENO_T3_CASTES list(XENO_CASTE_BOILER, XENO_CASTE_PRAETORIAN, XENO_CASTE_CRUSHER, XENO_CASTE_RAVAGER)
//special

//Tier 4
#define XENO_CASTE_KING "King"
#define XENO_CASTE_QUEEN "Queen"

//special
#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
6 changes: 5 additions & 1 deletion code/_globalvars/global_lists.dm
Original file line number Diff line number Diff line change
Expand Up @@ -217,11 +217,15 @@ GLOBAL_LIST_INIT_TYPED(hive_datum, /datum/hive_status, list(
XENO_HIVE_TUTORIAL = new /datum/hive_status/tutorial()
))

GLOBAL_VAR_INIT(king_acquisition_time, 1 HOURS + 30 MINUTES + rand(0, 25) MINUTES)
GLOBAL_LIST_INIT(xeno_evolve_times, setup_xeno_evolve_times())

/proc/setup_xeno_evolve_times()
for(var/datum/caste_datum/caste as anything in subtypesof(/datum/caste_datum))
LAZYADDASSOCLIST(., num2text(initial(caste.minimum_evolve_time)), caste)
if(initial(caste.caste_type) == XENO_CASTE_KING)
LAZYADDASSOCLIST(., num2text(GLOB.king_acquisition_time), caste)
else
LAZYADDASSOCLIST(., num2text(initial(caste.minimum_evolve_time)), caste)

GLOBAL_LIST_INIT(custom_event_info_list, setup_custom_event_info())

Expand Down
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()
12 changes: 7 additions & 5 deletions code/datums/xeno_shields/xeno_shield.dm
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@
// Use the type var if you need to construct a shield with different on hit behavior, damage reduction, etc.
/mob/living/carbon/xenomorph/proc/add_xeno_shield(\
added_amount, shield_source, type = /datum/xeno_shield, \
duration = -1, decay_amount_per_second = 1, \
duration, decay_amount_per_second, \
add_shield_on = FALSE, max_shield = 200)
for (var/datum/xeno_shield/curr_shield in xeno_shields)
if (shield_source == curr_shield.shield_source)
Expand All @@ -78,12 +78,14 @@
new_shield.shield_source = shield_source
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 @@ -759,6 +759,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 @@ -769,6 +769,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
Loading

0 comments on commit b4ed9c9

Please sign in to comment.