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

UpStream Spacebeast #472

Merged
merged 25 commits into from
Jan 22, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
25 commits
Select commit Hold shift + click to select a range
c5603fd
solider
AndroBetel Mar 19, 2024
2add234
Merge remote-tracking branch 'upstream/master' into Warrior-Test
FslashN Apr 6, 2024
6ef0e82
Soldier AI Behavior
FslashN Apr 11, 2024
a2f7b3b
Merge remote-tracking branch 'upstream/master' into Warrior-Test
FslashN Apr 11, 2024
4e17ccc
Linters Fix
FslashN Apr 11, 2024
07f5dcc
Small Cleanup
FslashN Apr 11, 2024
1d6758c
Sprite Fix + Behavior Fix?
FslashN Apr 11, 2024
ac476a4
Merge branch 'pr/1'
The32bitguy Sep 25, 2024
9726958
Let Soldiers attack unconscious U-S
The32bitguy Sep 25, 2024
3b58bff
Added Back Soldier Wound Icons
The32bitguy Sep 25, 2024
11832f8
Solider acid damages vehicle(not qdel)
The32bitguy Sep 27, 2024
eda0893
Fix indentation
The32bitguy Sep 27, 2024
f89fcdc
Make Soldiers a little worse at tackling.
The32bitguy Oct 10, 2024
d1a6c2b
Reduce Health, Normal Tackle Chance
The32bitguy Oct 15, 2024
757cbe9
fix
The32bitguy Oct 15, 2024
3e05693
Make Soldier Agress a little faster.
The32bitguy Nov 13, 2024
a4d4b38
Flares fired into air cannot be melted
The32bitguy Jan 20, 2025
3da902d
Merge remote-tracking branch 'upstream/master' into soldier-upstream
The32bitguy Jan 20, 2025
ae267e6
fix typo
The32bitguy Jan 20, 2025
867df22
Headbite+GM ambush works
The32bitguy Jan 20, 2025
ef6336b
fix
The32bitguy Jan 20, 2025
3ef6236
Reverse order of checks in headbite
The32bitguy Jan 20, 2025
2277f0b
prevent null chatlog message+melt floor
The32bitguy Jan 21, 2025
e26e5f2
Merge remote-tracking branch 'upstream/master' into soldier-upstream
The32bitguy Jan 21, 2025
feb91f6
fix stray letter
The32bitguy Jan 21, 2025
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
2 changes: 2 additions & 0 deletions code/__DEFINES/conflict.dm
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@
#define GRAB_AGGRESSIVE 1
#define GRAB_CARRY 2
#define GRAB_CHOKE 3
/// Alien-specific grab, somewhat between an aggressive and choke. Limited to AI only for the moment.
#define GRAB_XENO 4

//Ammo defines for gun/projectile related things.

Expand Down
5 changes: 5 additions & 0 deletions code/__DEFINES/pain.dm
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,11 @@
#define PAIN_REDUCTION_FULL 80 //oxycodone, neuraline

// Pain amount supplied by the action

/// How much pain is dealt continually to the mob being dragged by the AI as well as when initially grabbing.
#define PAIN_XENO_DRAG 10
/// How much additional pain is dealt when lunging/throat grabbing.
#define PAIN_XENO_GRAB 15
#define PAIN_BONE_BREAK 25
#define PAIN_BONE_BREAK_SPLINTED 15
#define PAIN_DELIMB 40
Expand Down
5 changes: 3 additions & 2 deletions code/__DEFINES/xeno.dm
Original file line number Diff line number Diff line change
Expand Up @@ -690,8 +690,9 @@
#define XENO_CASTE_HIVELORD "Hivelord"
#define XENO_CASTE_LURKER "Lurker"
#define XENO_CASTE_WARRIOR "Warrior"
#define XENO_CASTE_SOLDIER "Soldier"
#define XENO_CASTE_SPITTER "Spitter"
#define XENO_T2_CASTES list(XENO_CASTE_BURROWER, XENO_CASTE_CARRIER, XENO_CASTE_HIVELORD, XENO_CASTE_LURKER, XENO_CASTE_WARRIOR, XENO_CASTE_SPITTER)
#define XENO_T2_CASTES list(XENO_CASTE_BURROWER, XENO_CASTE_CARRIER, XENO_CASTE_HIVELORD, XENO_CASTE_LURKER, XENO_CASTE_WARRIOR, XENO_CASTE_SPITTER, XENO_CASTE_SOLDIER)
//t3
#define XENO_CASTE_BOILER "Boiler"
#define XENO_CASTE_PRAETORIAN "Praetorian"
Expand All @@ -705,7 +706,7 @@
#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, XENO_CASTE_KING)
#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_SOLDIER, XENO_CASTE_KING)

// Checks if two hives are allied to each other.
// PARAMETERS:
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 @@ -744,6 +744,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_SOLDIER)
M = /mob/living/carbon/xenomorph/soldier
if(XENO_CASTE_KING)
M = /mob/living/carbon/xenomorph/king
return M
Expand Down
32 changes: 30 additions & 2 deletions code/game/objects/effects/aliens.dm
Original file line number Diff line number Diff line change
Expand Up @@ -322,6 +322,12 @@
flare_damage = 2250
icon_state = "acid_strong"

//Similar to strong acid, just not quite as strong other than barricade damage.
/obj/effect/xenomorph/acid/spatter
acid_delay = 0.6
barricade_damage = 100
flare_damage = 1000

/obj/effect/xenomorph/acid/Initialize(mapload, atom/target)
. = ..()
acid_t = target
Expand All @@ -334,6 +340,25 @@
RegisterSignal(acid_t, COMSIG_PARENT_QDELETING, PROC_REF(cleanup))
START_PROCESSING(SSoldeffects, src)

/obj/effect/xenomorph/acid/spatter/Initialize(mapload, atom/target)
. = ..()
if(!acid_t)
var/obj/structure/barricade/B = locate() in loc
if(B && !B.unacidable) acid_t = B
else
for(var/obj/O in loc) //Find the first thing.
if(istype(O, /obj/vehicle/multitile))
var/obj/vehicle/multitile/acid_vehicle = O
acid_vehicle.take_damage_type(100 / src.acid_delay, "acid", src)
visible_message(SPAN_XENOWARNING("\the [acid_vehicle] is burnt by the strong acid blood!"))
continue //We just damaged it, to not break proc would completely melt the vehicle.
if(O.unacidable || istype(O, /obj/effect)) continue //Not unacidable things or effects. Don't want to melt xenogibs.
acid_t = O
break
if(acid_t) layer = acid_t.layer
else
acid_t = get_turf(loc)

/obj/effect/xenomorph/acid/Destroy()
acid_t = null
STOP_PROCESSING(SSoldeffects, src)
Expand Down Expand Up @@ -428,8 +453,11 @@
else
for(var/mob/mob in acid_t)
mob.forceMove(loc)
qdel(acid_t)
qdel(src)
animate(acid_t, alpha = 0, 1 SECONDS)
QDEL_IN(acid_t, 1 SECONDS)

animate(src, alpha = 0, 1 SECONDS)
QDEL_IN(src, 1 SECONDS)

/obj/effect/xenomorph/boiler_bombard
name = "???"
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_SOLDIER, XENO_CASTE_RUNNER, XENO_CASTE_LURKER, XENO_CASTE_CRUSHER, XENO_CASTE_FACEHUGGER)
#define DEFAULT_SPAWN_HIVE_STRING XENO_HIVE_NORMAL

#define DEFAULT_XENO_AMOUNT_TO_SPAWN 1
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@

#define DEFAULT_SPAWN_XENO_STRING XENO_CASTE_DRONE
#define GAME_MASTER_AMBUSH_AI_XENOS list(XENO_CASTE_DRONE, XENO_CASTE_RUNNER, XENO_CASTE_LURKER, XENO_CASTE_FACEHUGGER)
#define GAME_MASTER_AMBUSH_AI_XENOS list(XENO_CASTE_DRONE, XENO_CASTE_SOLDIER, XENO_CASTE_RUNNER, XENO_CASTE_LURKER, XENO_CASTE_FACEHUGGER)
#define DEFAULT_SPAWN_HIVE_STRING XENO_HIVE_NORMAL

#define DEFAULT_XENO_AMOUNT_TO_SPAWN 1
Expand Down
2 changes: 1 addition & 1 deletion code/modules/admin/holder2.dm
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ you will have to do something like if(client.admin_holder.rights & R_ADMIN) your
if(!other)
return FALSE
if(rights_required && other.admin_holder?.rank)
if(check_client_rights(usr.client, rights_required, show_msg))
if(check_client_rights(other, rights_required, show_msg))
return TRUE
else if(show_msg)
to_chat(usr, SPAN_WARNING("You do not have sufficient rights to do that. You require one of the following flags:[rights2text(rights_required," ")]."))
Expand Down
4 changes: 2 additions & 2 deletions code/modules/mob/living/carbon/human/human_helpers.dm
Original file line number Diff line number Diff line change
Expand Up @@ -201,7 +201,7 @@
if(istype(brain))
return TRUE
return FALSE

f
/mob/living/carbon/human/has_eyes()
var/datum/internal_organ/eyes = LAZYACCESS(internal_organs_by_name, "eyes")
if(istype(eyes) && !eyes.cut_away)
Expand All @@ -210,7 +210,7 @@


/mob/living/carbon/human/is_mob_restrained(check_grab = TRUE)
if(check_grab && pulledby && pulledby.grab_level >= GRAB_AGGRESSIVE)
if(check_grab && pulledby && pulledby.grab_level > GRAB_PASSIVE && pulledby.grab_level != GRAB_XENO)
return TRUE
if (handcuffed)
return TRUE
Expand Down
2 changes: 1 addition & 1 deletion code/modules/mob/living/carbon/human/life/handle_breath.dm
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
return
if(istype(loc, /obj/structure/machinery/cryo_cell))
return
if(species && (species.flags & NO_BREATHE || species.flags & IS_SYNTHETIC))
if(species && (species.flags & (NO_BREATHE|IS_SYNTHETIC)))
return

var/list/air_info
Expand Down
22 changes: 13 additions & 9 deletions code/modules/mob/living/carbon/human/life/handle_grabbed.dm
Original file line number Diff line number Diff line change
@@ -1,15 +1,19 @@


// Why is this proc in its own .dm file?
/mob/living/carbon/proc/handle_grabbed()
if(!pulledby)
return
if(pulledby.grab_level >= GRAB_AGGRESSIVE)
drop_held_items()

if(pulledby.grab_level >= GRAB_CHOKE)
apply_damage(3, OXY)
apply_stamina_damage(5)
/// Rewrote this to be a little different, so that the normal effects don't apply to xeno grabs.
switch(pulledby.grab_level)
if(GRAB_AGGRESSIVE to GRAB_CARRY)
drop_held_items()
if(GRAB_CHOKE)
drop_held_items()
apply_damage(3, OXY)
apply_stamina_damage(5)
if(GRAB_XENO) /// Alien grabs inflict pain when the human is not incapacitated, but not the other effects.
/// Ignoring restrained with (TRUE). The grab does *not* restrain by itself. See /mob/living/carbon/human/is_mob_restrained(check_grab = TRUE)
/// This is too allow the human a chance to fight back, with guns or melee.
return is_mob_incapacitated(TRUE) || pain.apply_pain(PAIN_XENO_DRAG)

log_attack("[key_name(pulledby)] choked [key_name(src)] at [get_area_name(src)]")
attack_log += text("\[[time_stamp()]\] <font color='orange'>was choked by [key_name(pulledby)]</font>")
pulledby.attack_log += text("\[[time_stamp()]\] <font color='red'>choked [key_name(src)]</font>")
2 changes: 2 additions & 0 deletions code/modules/mob/living/carbon/xenomorph/Xenomorph.dm
Original file line number Diff line number Diff line change
Expand Up @@ -243,6 +243,8 @@
var/evolving = FALSE // Whether the xeno is in the process of evolving
/// The damage dealt by a xeno whenever they take damage near someone
var/acid_blood_damage = 15
/// Does their blood also create an acid object to melt the environment?
var/acid_blood_spatter = FALSE
var/nocrit = FALSE
var/deselect_timer = 0 // Much like Carbon.last_special is a short tick record to prevent accidental deselects of abilities
var/got_evolution_message = FALSE
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -329,11 +329,11 @@
if(xeno.can_not_harm(target_carbon))
return

if(!(HAS_TRAIT(target_carbon, TRAIT_KNOCKEDOUT) || target_carbon.stat == UNCONSCIOUS)) //called knocked out because for some reason .stat seems to have a delay .
if(!xeno.Adjacent(target_carbon))
to_chat(xeno, SPAN_XENOHIGHDANGER("We can only headbite an unconscious, adjacent target!"))
return

if(!xeno.Adjacent(target_carbon))
if(!(HAS_TRAIT(target_carbon, TRAIT_KNOCKEDOUT) || target_carbon.stat == UNCONSCIOUS || (locate(/datum/effects/crit) in target_carbon.effects_list))) //called knocked out because for some reason .stat seems to have a delay .
to_chat(xeno, SPAN_XENOHIGHDANGER("We can only headbite an unconscious, adjacent target!"))
return

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,9 @@
var/home_locate_range = 15
var/turf/home_turf

/// Should the alien try climbing barricades and other structures, if able?
var/do_climb_structures = FALSE

/datum/xeno_ai_movement/New(mob/living/carbon/xenomorph/parent)
. = ..()
if(!parent)
Expand Down
41 changes: 13 additions & 28 deletions code/modules/mob/living/carbon/xenomorph/ai/xeno_ai.dm
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,9 @@
/// Cooldown declaration for delaying finding a new path if no path was found
COOLDOWN_DECLARE(no_path_found_cooldown)

var/ai_active_intent = INTENT_HARM
var/target_unconscious = FALSE

/mob/living/carbon/xenomorph/proc/init_movement_handler()
return new /datum/xeno_ai_movement(src)

Expand Down Expand Up @@ -63,14 +66,14 @@

var/datum/component/ai_behavior_override/behavior_override = check_overrides()

if(behavior_override?.process_override_behavior(src, delta_time))
if(is_mob_incapacitated(TRUE)) ///If they are incapacitated, the rest doesn't matter.
current_path = null
return TRUE

if(is_mob_incapacitated(TRUE))
current_path = null
if(behavior_override?.process_override_behavior(src, delta_time))
return TRUE

if(QDELETED(current_target) || !current_target.ai_check_stat() || get_dist(current_target, src) > ai_range || COOLDOWN_FINISHED(src, forced_retarget_cooldown))
if(QDELETED(current_target) || !current_target.ai_check_stat(src) || get_dist(current_target, src) > ai_range || COOLDOWN_FINISHED(src, forced_retarget_cooldown))
current_target = get_target(ai_range)
COOLDOWN_START(src, forced_retarget_cooldown, forced_retarget_time)
if(QDELETED(src))
Expand All @@ -81,7 +84,7 @@
if(prob(5))
emote("hiss")

a_intent = INTENT_HARM
a_intent = ai_active_intent

if(!current_target)
ai_move_idle(delta_time)
Expand Down Expand Up @@ -133,7 +136,7 @@
return 0
return INFINITY

/atom/proc/ai_check_stat()
/atom/proc/ai_check_stat(mob/living/carbon/xenomorph/X)
return TRUE // So we aren't trying to find a new target on attack override

// Called whenever an obstacle is encountered but xeno_ai_obstacle returned something else than infinite
Expand Down Expand Up @@ -267,28 +270,6 @@

#undef EXTRA_CHECK_DISTANCE_MULTIPLIER

/mob/living/carbon/proc/ai_can_target(mob/living/carbon/xenomorph/X)
if(!ai_check_stat(X))
return FALSE

if(X.can_not_harm(src))
return FALSE

if(alpha <= 45 && get_dist(X, src) > 2)
return FALSE

if(isfacehugger(X))
if(status_flags & XENO_HOST)
return FALSE

if(istype(wear_mask, /obj/item/clothing/mask/facehugger))
return FALSE

else if(HAS_TRAIT(src, TRAIT_NESTED))
return FALSE

return TRUE

/mob/living/carbon/xenomorph/proc/make_ai()
SHOULD_CALL_PARENT(TRUE)
create_hud()
Expand Down Expand Up @@ -343,3 +324,7 @@
if(cycled_turf.x == min_x_value)
min_x_turfs += cycled_turf
return min_x_turfs

/// Override as necessary to check for more specific triggers for an ability activation.
/mob/living/carbon/xenomorph/proc/check_additional_ai_activation()
return TRUE
2 changes: 1 addition & 1 deletion code/modules/mob/living/carbon/xenomorph/castes/Runner.dm
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@

add_temp_negative_pass_flags(PASS_FLAGS_CRAWLER)

/mob/living/carbon/xenomorph/runner/stop_pulling()
/mob/living/carbon/xenomorph/runner/stop_pulling(bumped_movement = FALSE)
. = ..()

remove_temp_negative_pass_flags(PASS_FLAGS_CRAWLER)
Expand Down
Loading
Loading