Skip to content

Commit

Permalink
CRAWLING
Browse files Browse the repository at this point in the history
  • Loading branch information
Diegoflores31 committed Jun 25, 2024
1 parent 31e1ffb commit d709fa1
Show file tree
Hide file tree
Showing 12 changed files with 37 additions and 8 deletions.
3 changes: 3 additions & 0 deletions code/__DEFINES/mobs.dm
Original file line number Diff line number Diff line change
Expand Up @@ -160,6 +160,9 @@
/* MOVE DEFINES */
#define MOVE_INTENT_WALK 1
#define MOVE_INTENT_RUN 2
// same but for xenos
#define MOVE_INTENT_STALK 1
#define MOVE_INTENT_HUNT 2

/* INTERNAL ORGAN DEFINES */
#define ORGAN_ASSISTED 1
Expand Down
21 changes: 18 additions & 3 deletions code/modules/mob/living/carbon/xenomorph/XenoProcs.dm
Original file line number Diff line number Diff line change
Expand Up @@ -226,6 +226,24 @@
if(inherent_verbs)
add_verb(src, inherent_verbs)

// activates the buffs and debuffs of Stalk mode for certain castes , This is the generic proc but each xeno can have their own set of snowflake.
/mob/living/carbon/xenomorph/set_movement_intent(new_intent)
. = ..()
if(caste)
walk_modifier = caste.walk_modifier
run_modifier = caste.run_modifier
if(!can_ventcrawl()) // for now only crawlers can get actual buffs for stalk mode
return
if(tier < 2)
return
switch(new_intent)
if(MOVE_INTENT_HUNT)
evasion_modifier = XENO_EVASION_NONE
remove_temp_pass_flags(PASS_MOB_IS_XENO|PASS_MOB_THRU_XENO)
if(MOVE_INTENT_STALK)
evasion_modifier += XENO_EVASION_MOD_ULTRA // this looks like a lot but evasion is broken and doesnt even work most of the time
add_temp_pass_flags(PASS_MOB_IS_XENO|PASS_MOB_THRU_XENO)
recalculate_evasion()

//Adds or removes a delay to movement based on your caste. If speed = 0 then it shouldn't do much.
//Runners are -2, -4 is BLINDLINGLY FAST, +2 is fat-level
Expand All @@ -237,9 +255,6 @@
if(frenzy_aura)
. -= (frenzy_aura * 0.05)

if(agility)
. += caste.agility_speed_increase

var/obj/effect/alien/weeds/W = locate(/obj/effect/alien/weeds) in loc
if (W)
if (W.linked_hive.hivenumber == hivenumber)
Expand Down
3 changes: 2 additions & 1 deletion code/modules/mob/living/carbon/xenomorph/Xenomorph.dm
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@
gender = NEUTER
icon_size = 48
black_market_value = KILL_MENDOZA
base_walk = 3 // Base stalk(walking) speed
///How much to horizontally adjust the sprites of held item onmobs by. Based on icon size. Most xenos have hands about the same height as a human's.
var/xeno_inhand_item_offset
dead_black_market_value = 50
Expand Down Expand Up @@ -95,7 +96,7 @@
var/plasma_max = 10
var/plasma_gain = 5
var/cooldown_reduction_percentage = 0 // By what % cooldown are reduced by. 1 => No cooldown. Should normally be clamped at 50%

var/can_vent_crawl = FALSE
var/death_fontsize = 3

var/small_explosives_stun = TRUE // Have to put this here, otherwise it can't be strain specific
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,8 @@
if(!owner)
return FALSE
var/mob/living/carbon/xenomorph/X = owner
if(X.m_intent == MOVE_INTENT_STALK && X.tier < 2)
return FALSE
if(X && !X.is_mob_incapacitated() && !HAS_TRAIT(X, TRAIT_DAZED) && X.body_position == STANDING_UP && !X.buckled && X.plasma_stored >= plasma_cost)
return TRUE

Expand Down
3 changes: 2 additions & 1 deletion code/modules/mob/living/carbon/xenomorph/castes/Drone.dm
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
armor_deflection = XENO_NO_ARMOR
evasion = XENO_EVASION_MEDIUM
speed = XENO_SPEED_TIER_7
walk_modifier = XENO_SPEED_HELLHOUND // no penalty to crawling

available_strains = list(
/datum/xeno_strain/gardener,
Expand Down Expand Up @@ -50,7 +51,7 @@
desc = "An alien drone"
icon = 'icons/mob/xenos/drone.dmi'
icon_size = 48
icon_state = "Drone Walking"
icon_state = "Drone Running"
plasma_types = list(PLASMA_PURPLE)
tier = 1
organ_value = 800
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@
var/evasion = XENO_EVASION_NONE

var/speed = XENO_SPEED_TIER_10
var/walk_modifier = 0
var/run_modifier = 0

var/plasma_max = 10
var/plasma_gain = 5
Expand Down Expand Up @@ -97,7 +99,7 @@
var/can_be_queen_healed = TRUE
var/can_be_revived = TRUE

var/can_vent_crawl = 1
var/can_vent_crawl = TRUE

var/caste_luminosity = 0

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
armor_deflection = XENO_NO_ARMOR
evasion = XENO_EVASION_LOW
speed = XENO_SPEED_TIER_6
walk_modifier = XENO_SPEED_HELLHOUND

evolution_allowed = FALSE
can_be_revived = FALSE
Expand Down
4 changes: 2 additions & 2 deletions code/modules/mob/mob.dm
Original file line number Diff line number Diff line change
Expand Up @@ -224,9 +224,9 @@
/mob/proc/movement_delay()
switch(m_intent)
if(MOVE_INTENT_RUN)
. = 2 + CONFIG_GET(number/run_speed)
. = base_run + CONFIG_GET(number/run_speed) + run_modifier
if(MOVE_INTENT_WALK)
. = 7 + CONFIG_GET(number/walk_speed)
. = base_walk + CONFIG_GET(number/walk_speed) + walk_modifier
. += speed
move_delay = .

Expand Down
4 changes: 4 additions & 0 deletions code/modules/mob/mob_defines.dm
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,10 @@
var/recalculate_move_delay = TRUE // Whether move delay needs to be recalculated, on by default so that new mobs actually get movement delay calculated upon creation
var/crawling = FALSE
var/can_crawl = TRUE
var/base_walk = 4 // Base walking speed
var/base_run = 2 // Base running speed
var/walk_modifier = 0 // speed modifier for Walk mode
var/run_modifier = 0 // speed modifier for Run mode
var/monkeyizing = null //Carbon
var/hand = null

Expand Down
Binary file modified icons/mob/xenos/drone.dmi
Binary file not shown.
Binary file modified icons/mob/xenos/lesser_drone.dmi
Binary file not shown.
Binary file modified icons/mob/xenos/sentinel.dmi
Binary file not shown.

0 comments on commit d709fa1

Please sign in to comment.