Skip to content

Commit

Permalink
Initial
Browse files Browse the repository at this point in the history
  • Loading branch information
morrowwolf committed Oct 4, 2023
1 parent c1cd602 commit c1f1451
Show file tree
Hide file tree
Showing 6 changed files with 32 additions and 4 deletions.
6 changes: 6 additions & 0 deletions code/datums/xeno_shields/shield_types/hedgehog_shield.dm
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,14 @@
create_shrapnel(get_turf(owner), shrapnel_amount, null, null, ammo_type, create_cause_data(initial(owner.caste_type), owner), TRUE)
owner.visible_message(SPAN_XENODANGER("Damaging the shield of [owner] sprays bone quills everywhere!"))

/datum/xeno_shield/hedgehog_shield/on_addition()
. = ..()
if(owner)
owner.small_explosives_stun = FALSE

/datum/xeno_shield/hedgehog_shield/on_removal()
. = ..()
if(owner)
// Remove the shield overlay early
owner.remove_suit_layer()
owner.small_explosives_stun = TRUE
6 changes: 6 additions & 0 deletions code/datums/xeno_shields/xeno_shield.dm
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,10 @@
amount -= damage
return

/// Anything we do when the xeno shield is added
/datum/xeno_shield/proc/on_addition()
return

// Anything special to do on removal
/datum/xeno_shield/proc/on_removal()
return
Expand Down Expand Up @@ -82,6 +86,8 @@
new_shield.decay_amount_per_second = decay_amount_per_second
new_shield.linked_xeno = src

new_shield.on_addition()

if(duration > -1)
addtimer(CALLBACK(new_shield, TYPE_PROC_REF(/datum/xeno_shield, begin_decay)), duration)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -108,3 +108,7 @@
/// Used to do something when a xeno collides with a movable atom
/datum/behavior_delegate/proc/on_collide(atom/movable/movable_atom)
return

/// Used to pass along any extra icon state information specific to a strain or caste
/datum/behavior_delegate/proc/get_special_icon()
return
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/datum/xeno_mutator/hedgehog
name = "STRAIN: Ravager - Hedgehog"
description = "You lose your empower, charge, scissor cut and some slash damage, for a bit more explosive resistance, immunity to small explosions, and you gain several new abilities that allow you to become a spiky tank. You build up shards internally over time and also when taking damage that increase your armor's resilience. You can use these shards to power three new abilities: Spike Shield, which gives you a temporary shield that spits bone shards around you when damaged, Fire Spikes, which launches spikes at your target that slows them and does extra damage if they move, and finally, Spike Shed, which launches spikes all around yourself and gives you a temporary speed boost as an escape plan at the cost of all your stored shards and being unable to gain shards for thirty seconds."
description = "You lose your empower, charge, scissor cut, some speed, and a slight amount of slash damage, for a bit more explosive resistance, immunity to small explosion stuns when above 150 shards, and you gain several new abilities that allow you to become a spiky tank. You build up shards internally over time and also when taking damage that increase your armor's resilience. You can use these shards to power three new abilities: Spike Shield, which gives you a temporary shield that spits bone shards around you when damaged, Fire Spikes, which launches spikes at your target that slows them and does extra damage if they move, and finally, Spike Shed, which launches spikes all around yourself and gives you a temporary speed boost as an escape plan at the cost of all your stored shards and being unable to gain shards for thirty seconds."
flavor_description = "They will be of iron will and steely muscle. In great armor shall they be clad, and with the mightiest spikes will they be armed."
cost = MUTATOR_COST_EXPENSIVE
individual_only = TRUE
Expand All @@ -27,9 +27,9 @@

ravager.mutation_type = RAVAGER_HEDGEHOG
ravager.plasma_max = 0
ravager.small_explosives_stun = FALSE
ravager.explosivearmor_modifier += XENO_EXPOSIVEARMOR_MOD_SMALL
ravager.damage_modifier -= XENO_DAMAGE_MOD_SMALL
ravager.damage_modifier -= XENO_DAMAGE_MOD_VERY_SMALL
ravager.speed_modifier += XENO_SPEED_SLOWMOD_TIER_5

apply_behavior_holder(ravager)

Expand Down Expand Up @@ -71,6 +71,7 @@

bound_xeno.speed_modifier -= shard_lock_speed_mod
bound_xeno.recalculate_speed()
bound_xeno.small_explosives_stun = FALSE

shards = 0
shards_locked = TRUE
Expand Down Expand Up @@ -116,8 +117,19 @@
var/percentage_shards = round((shards / max_shards) * 100, 10)
if(percentage_shards)
holder.overlays += image('icons/mob/hud/hud.dmi', "xenoenergy[percentage_shards]")

if(percentage_shards >= 50)
bound_xeno.small_explosives_stun = FALSE
return

if((locate(/datum/xeno_shield/hedgehog_shield) in bound_xeno.xeno_shields) || shards_locked)
return

bound_xeno.small_explosives_stun = TRUE
return

/datum/behavior_delegate/ravager_hedgehog/get_special_icon()
return bound_xeno.small_explosives_stun ? "" : " Explosive Resist"

/datum/behavior_delegate/ravager_hedgehog/handle_death(mob/M)
var/image/holder = bound_xeno.hud_list[PLASMA_HUD]
Expand Down
2 changes: 1 addition & 1 deletion code/modules/mob/living/carbon/xenomorph/update_icons.dm
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,7 @@
if(!(icon_state in icon_states(icon_xeno)))
icon_state = "Normal [caste.caste_type] [movement_state]"

icon_state += behavior_delegate?.get_special_icon()

/mob/living/carbon/xenomorph/regenerate_icons()
..()
Expand Down Expand Up @@ -288,7 +289,6 @@
else
wound_icon_carrier.icon_state = handle_special_wound_states(health_threshold)


///Used to display the xeno wounds/backpacks without rapidly switching overlays
/atom/movable/vis_obj
vis_flags = VIS_INHERIT_ID|VIS_INHERIT_DIR
Expand Down
Binary file modified icons/mob/xenos/ravager.dmi
Binary file not shown.

0 comments on commit c1f1451

Please sign in to comment.