Skip to content

Commit

Permalink
Грубый порт
Browse files Browse the repository at this point in the history
  • Loading branch information
Noname995 committed Aug 15, 2024
1 parent 2aa5288 commit 2ecd571
Show file tree
Hide file tree
Showing 34 changed files with 654 additions and 15 deletions.
3 changes: 3 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 @@ -73,3 +73,6 @@

/// From /mob/living/carbon/xenomorph/proc/handle_ai_shot()
#define COMSIG_XENO_HANDLE_AI_SHOT "xeno_handle_ai_shot"

/// From /mob/living/carbon/xenomorph/proc/do_evolve()
#define COMSIG_XENO_EVOLVE_TO_NEW_CASTE "xeno_evolve_to_new_caste"
8 changes: 8 additions & 0 deletions code/__DEFINES/mobs.dm
Original file line number Diff line number Diff line change
Expand Up @@ -450,3 +450,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 @@ -782,6 +782,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
2 changes: 1 addition & 1 deletion code/modules/admin/game_master/game_master.dm
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ GLOBAL_VAR_INIT(radio_communication_clarity, 100)

// Spawn stuff
#define DEFAULT_SPAWN_XENO_STRING XENO_CASTE_DRONE
#define GAME_MASTER_AI_XENOS list(XENO_CASTE_DRONE, XENO_CASTE_RUNNER, XENO_CASTE_LURKER, XENO_CASTE_CRUSHER, XENO_CASTE_FACEHUGGER)
#define GAME_MASTER_AI_XENOS list(XENO_CASTE_DRONE, XENO_CASTE_RUNNER, XENO_CASTE_LURKER, XENO_CASTE_CRUSHER, XENO_CASTE_FACEHUGGER, XENO_CASTE_KING)
#define DEFAULT_SPAWN_HIVE_STRING XENO_HIVE_NORMAL

#define DEFAULT_XENO_AMOUNT_TO_SPAWN 1
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
23 changes: 17 additions & 6 deletions code/modules/cm_aliens/structures/special/pylon_core.dm
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,13 @@

plane = FLOOR_PLANE

/obj/effect/alien/resin/special/pylon/endgame/update_icon()
if(protection_level == TURF_PROTECTION_OB)
icon_state = "pylon_active"
return

icon_state = "pylon"

/obj/effect/alien/resin/special/pylon/Initialize(mapload, hive_ref)
. = ..()

Expand Down Expand Up @@ -139,42 +146,46 @@

/obj/effect/alien/resin/special/pylon/endgame
cover_range = WEED_RANGE_CORE
protection_level = TURF_PROTECTION_CAS
var/activated = FALSE

/obj/effect/alien/resin/special/pylon/endgame/Initialize(mapload, mob/builder)
. = ..()

/obj/effect/alien/resin/special/pylon/endgame/Destroy()
if(activated)
activated = FALSE

if(hijack_delete)
return ..()

marine_announcement("ALERT.\n\nEnergy build up around communication relay at [get_area(src)] halted.", "[MAIN_AI_SYSTEM] Biological Scanner")
marine_announcement("ALERT.\n\nEnergy build up around communication relay at [get_area_name(src)] halted.", "[MAIN_AI_SYSTEM] Biological Scanner")

for(var/hivenumber in GLOB.hive_datum)
var/datum/hive_status/checked_hive = GLOB.hive_datum[hivenumber]
if(!length(checked_hive.totalXenos))
continue

if(checked_hive == linked_hive)
xeno_announcement(SPAN_XENOANNOUNCE("We have lost our control of the tall's communication relay at [get_area(src)]."), hivenumber, XENO_GENERAL_ANNOUNCE)
xeno_announcement(SPAN_XENOANNOUNCE("We have lost our control of the tall's communication relay at [get_area_name(src)]."), hivenumber, XENO_GENERAL_ANNOUNCE)
else
xeno_announcement(SPAN_XENOANNOUNCE("Another hive has lost control of the tall's communication relay at [get_area(src)]."), hivenumber, XENO_GENERAL_ANNOUNCE)
xeno_announcement(SPAN_XENOANNOUNCE("Another hive has lost control of the tall's communication relay at [get_area_name(src)]."), hivenumber, XENO_GENERAL_ANNOUNCE)

return ..()

/// Checks if all comms towers are connected and then starts end game content on all pylons if they are
/obj/effect/alien/resin/special/pylon/endgame/proc/comms_relay_connection()
marine_announcement("ALERT.\n\nIrregular build up of energy around communication relays at [get_area(src)], biological hazard detected.\n\nDANGER: Hazard is generating new xenomorph entities, advise urgent termination of hazard by ground forces.", "[MAIN_AI_SYSTEM] Biological Scanner")
marine_announcement("ALERT.\n\nIrregular build up of energy around communication relays at [get_area_name(src)], biological hazard detected.\n\nDANGER: Hazard is generating new xenomorph entities, advise urgent termination of hazard by ground forces.", "[MAIN_AI_SYSTEM] Biological Scanner")

for(var/hivenumber in GLOB.hive_datum)
var/datum/hive_status/checked_hive = GLOB.hive_datum[hivenumber]
if(!length(checked_hive.totalXenos))
continue

if(checked_hive == linked_hive)
xeno_announcement(SPAN_XENOANNOUNCE("We have harnessed the tall's communication relay at [get_area(src)].\n\nWe will now grow more of our number from this pylon. Hold it!"), hivenumber, XENO_GENERAL_ANNOUNCE)
xeno_announcement(SPAN_XENOANNOUNCE("We have harnessed the tall's communication relay at [get_area_name(src)].\n\nWe will now grow more of our number from this pylon. Hold it!"), hivenumber, XENO_GENERAL_ANNOUNCE)
else
xeno_announcement(SPAN_XENOANNOUNCE("Another hive has harnessed the tall's communication relay at [get_area(src)].[linked_hive.faction_is_ally(checked_hive.name) ? "" : " Stop them!"]"), hivenumber, XENO_GENERAL_ANNOUNCE)
xeno_announcement(SPAN_XENOANNOUNCE("Another hive has harnessed the tall's communication relay at [get_area_name(src)].[linked_hive.faction_is_ally(checked_hive.name) ? "" : " Stop them!"]"), hivenumber, XENO_GENERAL_ANNOUNCE)

activated = TRUE
addtimer(CALLBACK(src, PROC_REF(give_larva)), XENO_PYLON_ACTIVATION_COOLDOWN, TIMER_UNIQUE|TIMER_OVERRIDE|TIMER_LOOP|TIMER_DELETE_ME)
Expand Down
2 changes: 2 additions & 0 deletions code/modules/mob/living/carbon/xenomorph/Evolution.dm
Original file line number Diff line number Diff line change
Expand Up @@ -186,6 +186,8 @@
round_statistics.track_new_participant(new_xeno.faction, -1) //so an evolved xeno doesn't count as two.
SSround_recording.recorder.track_player(new_xeno)

SEND_SIGNAL(src, COMSIG_XENO_EVOLVE_TO_NEW_CASTE, new_xeno)

/mob/living/carbon/xenomorph/proc/evolve_checks()
if(!check_state(TRUE))
return FALSE
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 @@ -688,8 +688,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,56 @@

/// 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 = 50
ability_primacy = XENO_PRIMARY_ACTION_1

var/damage = 25

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')

/// Screech which puts out lights in a 7 tile radius, slows and dazes.
/datum/action/xeno_action/activable/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

/// Leap ability, crashing down dealing major damage to mobs and structures in the area.
/datum/action/xeno_action/activable/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 = 60 SECONDS
plasma_cost = 0
ability_primacy = XENO_PRIMARY_ACTION_3

var/range = 7
var/leaping = FALSE

/// 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

var/shield_duration = 10 SECONDS
var/area_of_effect = 6
var/shield_amount = 200
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
/datum/action_xeno_action/verb/verb_rend()
set category = "Alien"
set name = "Rend"
set hidden = TRUE
var/action_name = "Rend"
handle_xeno_macro(src, action_name)

/datum/action/xeno_action/verb/verb_destroy()
set category = "Alien"
set name = "Destroy"
set hidden = TRUE
var/action_name = "Destroy"
handle_xeno_macro(src, action_name)

/datum/action_xeno_action/verb/verb_doom()
set category = "Alien"
set name = "Doom"
set hidden = TRUE
var/action_name = "Doom"
handle_xeno_macro(src, action_name)

/datum/action_xeno_action/verb/king_shield()
set category = "Alien"
set name = "Bulwark"
set hidden = TRUE
var/action_name = "Bulwark"
handle_xeno_macro(src, action_name)
Loading

0 comments on commit 2ecd571

Please sign in to comment.