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

CRAWLING !!!! #6561

Closed
wants to merge 13 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
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
1 change: 1 addition & 0 deletions code/__DEFINES/cooldowns.dm
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
#define COOLDOWN_HIJACK_GROUND_CHECK "gamemode_ground_check"
#define COOLDOWN_ITEM_HOOD_SOUND "item_hood_sound"
#define COOLDOWN_LIGHT "cooldown_light"
#define STALKING_COOLDOWN "stalking_cooldown"

//Define for ship alt
#define COOLDOWN_ALTITUDE_CHANGE "altitude_change"
Expand Down
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
16 changes: 14 additions & 2 deletions code/game/atoms.dm
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
// The cached datum for the permanent pass flags for any given atom
var/datum/pass_flags_container/pass_flags

// Temporary lags for what an atom can pass through
// Temporary flags for what an atom can pass through
var/list/flags_pass_temp
var/list/temp_flag_counter

Expand Down Expand Up @@ -429,7 +429,19 @@ Parameters are passed from New.
return TRUE
return FALSE

// Movement
///Temporal CAN PASS FLAGGS ,
//this should be a proc for any kind of temporal flag but needs big rework (TODO)
/atom/proc/add_temp_can_pass_flags(flags_to_add)
for (var/flag in GLOB.bitflags)
if(!(flags_to_add & flag))
continue
flags_can_pass_all_temp |= flag

/atom/proc/remove_temp_can_pass_flags(flags_to_remove)
for (var/flag in GLOB.bitflags)
flags_can_pass_all_temp &= ~flag

///Temporal PASS FLAGS
/atom/proc/add_temp_pass_flags(flags_to_add)
if (isnull(temp_flag_counter))
temp_flag_counter = list()
Expand Down
36 changes: 31 additions & 5 deletions code/modules/mob/living/carbon/xenomorph/XenoProcs.dm
Original file line number Diff line number Diff line change
Expand Up @@ -216,16 +216,45 @@
armor_integrity = min(armor_integrity + value, 100)


//Strip all inherent xeno verbs from your caste. Used in evolution.
///Strip all inherent xeno verbs from your caste. Used in evolution.
/mob/living/carbon/xenomorph/proc/remove_inherent_verbs()
if(inherent_verbs)
remove_verb(src, inherent_verbs)

//Add all your inherent caste verbs and procs. Used in evolution.
///Add all your inherent caste verbs and procs. Used in evolution.
/mob/living/carbon/xenomorph/proc/add_inherent_verbs()
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, cooldown = 3 SECONDS)
if(TIMER_COOLDOWN_CHECK(src, STALKING_COOLDOWN))
to_chat(src, SPAN_XENOWARNING("We are not ready to change our stance"))
return
TIMER_COOLDOWN_START(src, STALKING_COOLDOWN, cooldown)
. = ..()
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 > 1)
return
switch(new_intent)
if(MOVE_INTENT_HUNT)
evasion_modifier = XENO_EVASION_NONE
remove_temp_pass_flags(PASS_MOB_IS_XENO|PASS_TYPE_CRAWLER|PASS_MOB_THRU_XENO)
remove_temp_can_pass_flags(PASS_MOB_IS_XENO|PASS_MOB_THRU_XENO)
layer = initial(layer)

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
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also reduce the evasion mod

add_temp_pass_flags(PASS_MOB_IS_XENO|PASS_MOB_THRU_XENO|PASS_TYPE_CRAWLER)
add_temp_can_pass_flags(PASS_MOB_IS_XENO|PASS_MOB_THRU_XENO)
layer = XENO_HIDING_LAYER

recalculate_evasion()
update_icons()

//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 +266,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
2 changes: 1 addition & 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,6 @@
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/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 @@ -904,6 +904,9 @@

current = get_step_towards(current, target_turf)

/datum/action/xeno_action/activable/tail_stab/can_use_action()
return TRUE

/datum/action/xeno_action/activable/tail_stab/use_ability(atom/targetted_atom)
var/mob/living/carbon/xenomorph/stabbing_xeno = owner

Expand All @@ -925,6 +928,9 @@
if (world.time <= stabbing_xeno.next_move)
return FALSE

if(stabbing_xeno.m_intent == MOVE_INTENT_STALK)
stabbing_xeno.set_movement_intent(MOVE_INTENT_HUNT, 10 SECONDS)

var/distance = get_dist(stabbing_xeno, targetted_atom)
if(distance > 2)
return FALSE
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 Expand Up @@ -144,6 +146,13 @@
/datum/action/xeno_action/activable

/datum/action/xeno_action/activable/can_use_action()
if(!owner)
return FALSE
var/mob/living/carbon/xenomorph/xeno = owner
if(xeno.stat == DEAD) // to prevent dead xenos from doing wacky interactions
return FALSE
if(xeno.m_intent == MOVE_INTENT_STALK && xeno.tier < 2)
return FALSE
return TRUE

// Called when the action is clicked on.
Expand Down
6 changes: 6 additions & 0 deletions code/modules/mob/living/carbon/xenomorph/attack_alien.dm
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,9 @@
if(attacking_xeno.behavior_delegate)
intent = attacking_xeno.behavior_delegate.override_intent(src)

if(attacking_xeno.m_intent == MOVE_INTENT_STALK)
attacking_xeno.set_movement_intent(MOVE_INTENT_HUNT, cooldown = 10 SECONDS)

//Reviewing the four primary intents
switch(intent)

Expand Down Expand Up @@ -229,6 +232,9 @@
if(M.fortify || HAS_TRAIT(M, TRAIT_ABILITY_BURROWED))
return XENO_NO_DELAY_ACTION

if(M.m_intent == MOVE_INTENT_STALK)
M.set_movement_intent(MOVE_INTENT_HUNT, cooldown = 10 SECONDS)

switch(M.a_intent)
if(INTENT_HELP)
M.visible_message(SPAN_NOTICE("[M] caresses [src] with its claws."), \
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
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
walk_modifier = XENO_SPEED_HELLHOUND // no penalty to crawling

This doesn't need an exception.


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
1 change: 0 additions & 1 deletion code/modules/mob/living/carbon/xenomorph/castes/Runner.dm
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,6 @@
/datum/action/xeno_action/onclick/regurgitate,
/datum/action/xeno_action/watch_xeno,
/datum/action/xeno_action/activable/tail_stab,
/datum/action/xeno_action/onclick/xenohide,
/datum/action/xeno_action/activable/pounce/runner,
/datum/action/xeno_action/activable/runner_skillshot,
/datum/action/xeno_action/onclick/toggle_long_range/runner,
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
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
walk_modifier = XENO_SPEED_HELLHOUND

This doesn't need an exception.


evolution_allowed = FALSE
can_be_revived = FALSE
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -379,7 +379,11 @@
else
fruit_sac_overlay_icon.icon_state = "Gardener Drone Knocked Down"
else
fruit_sac_overlay_icon.icon_state = "Gardener Drone Walking"
switch(bound_xeno.m_intent)
if(MOVE_INTENT_STALK)
fruit_sac_overlay_icon.icon_state = "Gardener Drone Walking"
if(MOVE_INTENT_HUNT)
fruit_sac_overlay_icon.icon_state = "Gardener Drone Running"

var/fruit_sac_color = initial(bound_xeno.selected_fruit.gardener_sac_color)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,11 @@
else
salve_applied_icon.icon_state = "Healer Drone Knocked Down"
else
salve_applied_icon.icon_state = "Healer Drone Walking"
switch(bound_xeno.m_intent)
if(MOVE_INTENT_STALK)
salve_applied_icon.icon_state = "Healer Drone Walking"
if(MOVE_INTENT_HUNT)
salve_applied_icon.icon_state = "Healer Drone Running"

bound_xeno.overlays += salve_applied_icon

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
27 changes: 20 additions & 7 deletions code/modules/mob/mob_defines.dm
Original file line number Diff line number Diff line change
Expand Up @@ -28,21 +28,34 @@
/// The list of people observing this mob.
var/list/mob/dead/observer/observers
var/zone_selected = "chest"

var/use_me = 1 //Allows all mobs to use the me verb by default, will have to manually specify they cannot
///Allows all mobs to use the me verb by default, will have to manually specify they cannot
var/use_me = 1
var/damageoverlaytemp = 0
var/computer_id = null //to track the players
///to track the players
var/computer_id = null
var/list/attack_log = list( )
var/atom/movable/interactee //the thing that the mob is currently interacting with (e.g. a computer, another mob (stripping a mob), manning a hmg)
///the thing that the mob is currently interacting with (e.g. a computer, another mob (stripping a mob), manning a hmg)
var/atom/movable/interactee
var/sdisabilities = 0 //Carbon
var/disabilities = 0 //Carbon
var/atom/movable/pulling = null
var/next_move = null
var/next_move_slowdown = 0 // Amount added during the next movement_delay(), then is reset.
var/speed = 0 //Speed that modifies the movement delay of a given mob
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
/// Amount added during the next movement_delay(), then is reset.
var/next_move_slowdown = 0
///Speed that modifies the movement delay of a given mob
var/speed = 0
/// Whether move delay needs to be recalculated, on by default so that new mobs actually get movement delay calculated upon creation
var/recalculate_move_delay = TRUE
var/crawling = FALSE
var/can_crawl = TRUE
/// Base walking speed
var/base_walk = 4
/// Base running speed
var/base_run = 2
/// speed modifier for Walk mode
var/walk_modifier = 0
/// speed modifier for Run mode
var/run_modifier = 0
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/drone_strain_overlays.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.
Loading