Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream/master'
Browse files Browse the repository at this point in the history
  • Loading branch information
definitelynotspaghetti committed Oct 17, 2024
2 parents 2990d9f + 97cb5c0 commit a89ec16
Show file tree
Hide file tree
Showing 11 changed files with 63 additions and 128 deletions.
1 change: 0 additions & 1 deletion code/__DEFINES/dcs/signals.dm
Original file line number Diff line number Diff line change
Expand Up @@ -821,7 +821,6 @@
#define COMSIG_XENOABILITY_QUEEN_GIVE_PLASMA "xenoability_queen_give_plasma"
#define COMSIG_XENOABILITY_QUEEN_HIVE_MESSAGE "xenoability_queen_hive_message"
#define COMSIG_XENOABILITY_DEEVOLVE "xenoability_deevolve"
#define COMSIG_XENOABILITY_QUEEN_BULWARK "xenoability_queen_bulwark"

#define COMSIG_XENOABILITY_LAY_HIVEMIND "xenoability_lay_hivemind"
#define COMSIG_XENOABILITY_LAY_EGG "xenoability_lay_egg"
Expand Down
2 changes: 0 additions & 2 deletions code/__DEFINES/traits.dm
Original file line number Diff line number Diff line change
Expand Up @@ -194,8 +194,6 @@
#define TRAIT_STEALTH "stealth" //mob is in stealth, it means that turrets and ai ignore it, also you can't bump it
#define TRAIT_MOB_ICON_UPDATE_BLOCKED "icon_blocked" //target should not update its icon_state
#define TRAIT_VALHALLA_XENO "valhalla_xeno"
#define TRAIT_BULWARKED_TURF "bulwarked_turf" // turf is affected by bulwark ability

//important_recursive_contents traits
/*
* Used for movables that need to be updated, via COMSIG_ENTER_AREA and COMSIG_EXIT_AREA, when transitioning areas.
Expand Down
7 changes: 0 additions & 7 deletions code/datums/keybinding/xeno.dm
Original file line number Diff line number Diff line change
Expand Up @@ -715,13 +715,6 @@
description = "Instantly displays a bolded announcement to all xenos in the hive."
keybind_signal = COMSIG_XENOABILITY_QUEEN_HIVE_MESSAGE

/datum/keybinding/xeno/queen_bulwark
name = "queen_bulwark"
full_name = "Queen: Bulwark"
description = "Forms an area around you that reduces damage taken by friendly xenomorphs."
keybind_signal = COMSIG_XENOABILITY_QUEEN_BULWARK
hotkey_keys = list("F")

/datum/keybinding/xeno/deevolve
name = "deevolve"
full_name = "Queen: Devolve Xeno"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
max_health = 250

// *** Flags *** //
caste_flags = CASTE_DO_NOT_ALERT_LOW_LIFE|CASTE_IS_A_MINION|CASTE_ACID_BLOOD
caste_flags = CASTE_DO_NOT_ALERT_LOW_LIFE|CASTE_IS_A_MINION
can_flags = CASTE_CAN_BE_QUEEN_HEALED|CASTE_CAN_BE_GIVEN_PLASMA|CASTE_CAN_RIDE_CRUSHER
caste_traits = null

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
crit_health = -25

// *** Flags *** //
caste_flags = CASTE_NOT_IN_BIOSCAN|CASTE_DO_NOT_ANNOUNCE_DEATH|CASTE_DO_NOT_ALERT_LOW_LIFE|CASTE_ACID_BLOOD
caste_flags = CASTE_NOT_IN_BIOSCAN|CASTE_DO_NOT_ANNOUNCE_DEATH|CASTE_DO_NOT_ALERT_LOW_LIFE
caste_traits = list(TRAIT_CAN_VENTCRAWL, TRAIT_SILENT_FOOTSTEPS)

// *** Defense *** //
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
max_health = 150

// *** Flags *** //
caste_flags = CASTE_DO_NOT_ALERT_LOW_LIFE|CASTE_IS_A_MINION|CASTE_ACID_BLOOD
caste_flags = CASTE_DO_NOT_ALERT_LOW_LIFE|CASTE_IS_A_MINION
can_flags = CASTE_CAN_BE_QUEEN_HEALED|CASTE_CAN_BE_GIVEN_PLASMA|CASTE_CAN_RIDE_CRUSHER
caste_traits = null

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -530,85 +530,3 @@
if (get_dist(owner, receiver) > 7)
// Out of screen transfer.
owner.balloon_alert(owner, "Transferred plasma")


#define BULWARK_LOOP_TIME 1 SECONDS
#define BULWARK_RADIUS 8 //RUTGMC EDIT
#define BULWARK_ARMOR_MULTIPLIER 0.25

/datum/action/ability/xeno_action/bulwark
name = "Royal Bulwark"
action_icon_state = "bulwark"
desc = "Creates a field of defensive energy, filling chinks in the armor of nearby sisters, making them more resilient."
ability_cost = 100
cooldown_duration = 20 SECONDS
keybinding_signals = list(
KEYBINDING_NORMAL = COMSIG_XENOABILITY_QUEEN_BULWARK,
)
/// assoc list xeno = armor_diff
var/list/armor_mod_keys = list()

/datum/action/ability/xeno_action/bulwark/action_activate()
var/list/turf/affected_turfs = RANGE_TURFS(BULWARK_RADIUS, owner)
add_cooldown()

for(var/turf/target AS in affected_turfs)
//yes I realize this adds and removes it every move but its simple
//also we use this and not aura because we want speedy updates on entering
RegisterSignal(target, COMSIG_ATOM_EXITED, PROC_REF(remove_buff))
RegisterSignal(target, COMSIG_ATOM_ENTERED, PROC_REF(apply_buff))
ADD_TRAIT(target, TRAIT_BULWARKED_TURF, XENO_TRAIT)
for(var/mob/living/carbon/xenomorph/xeno in target)
apply_buff(null, xeno)

var/obj/effect/abstract/particle_holder/aoe_particles = new(owner.loc, /particles/bulwark_aoe)
aoe_particles.particles.position = generator(GEN_SQUARE, 0, 16 + (BULWARK_RADIUS-1)*32, LINEAR_RAND)
while(do_after(owner, BULWARK_LOOP_TIME, IGNORE_HELD_ITEM, user_display = BUSY_ICON_MEDICAL, extra_checks = CALLBACK(src, TYPE_PROC_REF(/datum/action, can_use_action), FALSE, ABILITY_IGNORE_COOLDOWN|ABILITY_USE_BUSY)))
succeed_activate()

aoe_particles.particles.spawning = 0
QDEL_IN(aoe_particles, 4 SECONDS)

for(var/turf/target AS in affected_turfs)
UnregisterSignal(target, list(COMSIG_ATOM_EXITED, COMSIG_ATOM_ENTERED))
REMOVE_TRAIT(target, TRAIT_BULWARKED_TURF, XENO_TRAIT)
for(var/mob/living/carbon/xenomorph/xeno AS in armor_mod_keys)
remove_buff(null, xeno)
affected_turfs = null

///adds buff to xenos
/datum/action/ability/xeno_action/bulwark/proc/apply_buff(datum/source, mob/living/carbon/xenomorph/xeno, direction)
SIGNAL_HANDLER
if(!isxeno(xeno) || armor_mod_keys[xeno] || !owner.issamexenohive(xeno))
return
var/datum/armor/basearmor = getArmor(arglist(xeno.xeno_caste.soft_armor))
var/datum/armor/armordiff = basearmor.scaleAllRatings(BULWARK_ARMOR_MULTIPLIER)
xeno.soft_armor = xeno.soft_armor.attachArmor(armordiff)
armor_mod_keys[xeno] = armordiff

///removes the buff from xenos
/datum/action/ability/xeno_action/bulwark/proc/remove_buff(datum/source, mob/living/carbon/xenomorph/xeno, direction)
SIGNAL_HANDLER
if(direction) // triggered by moving signal, check if next turf is in bulwark
var/turf/next = get_step(source, direction)
if(HAS_TRAIT(next, TRAIT_BULWARKED_TURF))
return
if(armor_mod_keys[xeno])
xeno.soft_armor = xeno.soft_armor.detachArmor(armor_mod_keys[xeno])
armor_mod_keys -= xeno

/particles/bulwark_aoe
icon = 'icons/effects/particles/generic_particles.dmi'
icon_state = list("cross" = 1, "x" = 1, "rectangle" = 1, "up_arrow" = 1, "down_arrow" = 1, "square" = 1)
width = 500
height = 500
count = 2000
spawning = 50
gravity = list(0, 0.1)
color = LIGHT_COLOR_PURPLE
lifespan = 13
fade = 5
fadein = 5
scale = 0.8
friction = generator(GEN_NUM, 0.1, 0.15)
spin = generator(GEN_NUM, -20, 20)
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,6 @@
/datum/action/ability/activable/xeno/screech,
/datum/action/ability/activable/xeno/plasma_screech,
/datum/action/ability/activable/xeno/frenzy_screech,
/datum/action/ability/xeno_action/bulwark,
/datum/action/ability/activable/xeno/corrosive_acid/strong,
/datum/action/ability/activable/xeno/xeno_spit,
/datum/action/ability/xeno_action/create_jelly,
Expand Down Expand Up @@ -107,7 +106,6 @@
/datum/action/ability/activable/xeno/screech,
/datum/action/ability/activable/xeno/plasma_screech,
/datum/action/ability/activable/xeno/frenzy_screech,
/datum/action/ability/xeno_action/bulwark,
/datum/action/ability/activable/xeno/corrosive_acid/strong,
/datum/action/ability/activable/xeno/xeno_spit,
/datum/action/ability/xeno_action/create_jelly,
Expand Down
66 changes: 36 additions & 30 deletions code/modules/mob/living/carbon/xenomorph/damage_procs.dm
Original file line number Diff line number Diff line change
Expand Up @@ -67,10 +67,10 @@
damage = modify_by_armor(damage, blocked, penetration, def_zone)

if(!damage) //no damage
return 0
return FALSE

if(damage > 12) //Light damage won't splash.
check_blood_splash(damage, damagetype, 0, 1, sharp, edge)
check_blood_splash(damage, damagetype, 0, sharp, edge)

SEND_SIGNAL(src, COMSIG_XENOMORPH_TAKING_DAMAGE, damage)

Expand Down Expand Up @@ -154,39 +154,45 @@

#undef HANDLE_OVERHEAL

/mob/living/carbon/xenomorph/proc/check_blood_splash(damage = 0, damtype = BRUTE, chancemod = 0, radius = 1, sharp = FALSE, edge = FALSE)
///Splashes living mob in 1 tile radius with acid, spawns
/mob/living/carbon/xenomorph/proc/check_blood_splash(damage = 0, damtype = BRUTE, chancemod = 0, sharp = FALSE, edge = FALSE)
if(!damage)
return FALSE

if(damtype == BURN) //no splash from burn wounds
return FALSE

if(!(xeno_caste.caste_flags & CASTE_ACID_BLOOD))
return FALSE

if(!isturf(loc))
return FALSE

var/chance = 25 //base chance
if(damtype == BRUTE)
chance += 5
if(sharp)
chancemod += 10
if(edge) //Pierce weapons give the most bonus
chancemod += 12
chancemod += 15
if(stat == DEAD) // pressure in dead body is lower than usual
chancemod * 0.5
chance += chancemod + (damage * 0.33)
var/turf/T = loc
if(!T || !istype(T))
return
if(!prob(chance))
return FALSE

var/obj/effect/decal/cleanable/blood/xeno/decal = locate(/obj/effect/decal/cleanable/blood/xeno) in loc
if(!decal) //Let's not stack blood, it just makes lags.
add_splatter_floor(loc) //Drop some on the ground first.
else if(decal.random_icon_states) //If there's already one, just randomize it so it changes.
decal.icon_state = pick(decal.random_icon_states)

if(radius > 1 || prob(chance))

var/obj/effect/decal/cleanable/blood/xeno/decal = locate(/obj/effect/decal/cleanable/blood/xeno) in T

if(!decal) //Let's not stack blood, it just makes lagggggs.
add_splatter_floor(T) //Drop some on the ground first.
else
if(decal.random_icon_states && length(decal.random_icon_states) > 0) //If there's already one, just randomize it so it changes.
decal.icon_state = pick(decal.random_icon_states)

if(!(xeno_caste.caste_flags & CASTE_ACID_BLOOD))
return
var/splash_chance
for(var/mob/living/carbon/human/victim in range(radius,src)) //Loop through all nearby victims, including the tile.
splash_chance = (chance * 2) - (get_dist(src,victim) * 20)
if(prob(splash_chance))
victim.visible_message(span_danger("\The [victim] is scalded with hissing green blood!"), \
span_danger("You are splattered with sizzling blood! IT BURNS!"))
if(victim.stat == CONSCIOUS && !(victim.species.species_flags & NO_PAIN))
victim.emote("scream")
victim.take_overall_damage(rand(5, 15), BURN, ACID, updating_health = TRUE)
for(var/mob/living/carbon/human/victim in range(1, src)) //Loop through all nearby victims, including the tile.
if(!Adjacent(victim))
continue

if(!prob((chance * 2) - 20))
continue
victim.visible_message(span_danger("\The [victim] is scalded with hissing green blood!"), \
span_danger("You are splattered with sizzling blood! IT BURNS!"))
if(victim.stat == CONSCIOUS && !(victim.species.species_flags & NO_PAIN))
victim.emote("scream")
victim.take_overall_damage(rand(5, 15), BURN, ACID, updating_health = TRUE)
2 changes: 1 addition & 1 deletion code/modules/mob/living/carbon/xenomorph/death.dm
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@
remains.icon = effects_icon
remains.icon_state = xeno_caste.gib_anim

check_blood_splash(35, BURN, 65, 2)
check_blood_splash(50, BRUTE, 50)

return ..()

Expand Down
23 changes: 23 additions & 0 deletions html/changelogs/archive/2024-10.yml
Original file line number Diff line number Diff line change
Expand Up @@ -381,3 +381,26 @@
\u0430\u0440\u043E\u0432 \u0442\u0435\u043F\u0435\u0440\u044C \u0441\u0447\u0438\
\u0442\u0430\u0435\u0442\u0441\u044F \u043F\u043E \u0444\u043E\u0440\u043C\u0443\
\u043B\u0435 40 + 40 * rage, \u0432\u043C\u0435\u0441\u0442\u043E 100 * rage"
2024-10-16:
Helg2:
- rscdel: "\u0423\u0434\u0430\u043B\u0435\u043D Royal Bulwark \u0443 \u043A\u0432\
\u0438\u043D\u044B."
2024-10-17:
Helg2:
- balance: "\u041A\u0438\u0441\u043B\u043E\u0442\u043D\u044B\u0435 \u0431\u0440\u044B\
\u0437\u0433\u0438 \u0442\u0435\u043F\u0435\u0440\u044C \u043D\u0435 \u043F\u043E\
\u044F\u0432\u043B\u044F\u044E\u0442\u0441\u044F \u043E\u0442 \u0431\u0443\u0440\
\u043D \u0443\u0440\u043E\u043D\u0430."
- balance: "\u0428\u0430\u043D\u0441 \u043D\u0430 \u043A\u0438\u0441\u043B\u043E\
\u0442\u043D\u044B\u0435 \u0431\u0440\u044B\u0437\u0433\u0438 \u0438\u0437 \u043C\
\u0435\u0440\u0442\u0432\u044B\u0445 \u0442\u0435\u043B \u0442\u0435\u043F\u0435\
\u0440\u044C \u043D\u0438\u0436\u0435 \u0432 2 \u0440\u0430\u0437\u0430."
- balance: "\u041C\u0430\u043D\u0442\u0438\u0441\u044B, \u0431\u0438\u0442\u043B\
\u044B \u0438 \u0445\u0430\u0433\u0433\u0435\u0440\u044B \u0442\u0435\u043F\u0435\
\u0440\u044C \u043D\u0435 \u0438\u043C\u0435\u044E\u0442 \u0442\u0440\u0435\u0439\
\u0442 \u043A\u0438\u0441\u043B\u043E\u0442\u043D\u043E\u0439 \u043A\u0440\u043E\
\u0432\u0438."
- bugfix: "\u041A\u0438\u0441\u043B\u043E\u0442\u043D\u044B\u0435 \u0431\u0440\u044B\
\u0437\u0433\u0438 \u0442\u0435\u043F\u0435\u0440\u044C \u043D\u0435 \u043D\u0430\
\u043D\u043E\u0441\u044F\u0442 \u0443\u0440\u043E\u043D \u0447\u0435\u0440\u0435\
\u0437 \u0441\u0442\u0435\u043D\u044B."

0 comments on commit a89ec16

Please sign in to comment.