Skip to content

Commit

Permalink
palatine drone stuff
Browse files Browse the repository at this point in the history
  • Loading branch information
realforest2001 committed May 10, 2024
1 parent 6dd2415 commit de2a400
Show file tree
Hide file tree
Showing 4 changed files with 138 additions and 0 deletions.
58 changes: 58 additions & 0 deletions code/game/turfs/walls/wall_types.dm
Original file line number Diff line number Diff line change
Expand Up @@ -1149,6 +1149,64 @@ INITIALIZE_IMMEDIATE(/turf/closed/wall/indestructible/splashscreen)
icon_state = "thickmembrane"
wall_type = "thickmembrane"

/obj/structure/alien/movable_wall/reflective
name = "shifting resin reflective wall"
desc = "Weird hardened slime solidified into a fine, smooth wall."
icon = 'icons/turf/walls/prison/bone_resin.dmi'
icon_state = "resin"
wall_type = WALL_BONE_RESIN
health = HEALTH_WALL_XENO_MEMBRANE_THICK

// 75% chance of reflecting projectiles
var/chance_to_reflect = 75
var/reflect_range = 10

var/brute_multiplier = 0.3
var/explosive_multiplier = 0.3
var/reflection_multiplier = 0.5

/obj/structure/alien/movable_wall/reflective/bullet_act(obj/projectile/P)
if(src in P.permutated)
return

//Ineffective if someone is sitting on the wall
if(locate(/mob) in contents)
return ..()

if(!prob(chance_to_reflect))
if(P.ammo.damage_type == BRUTE)
P.damage *= brute_multiplier
return ..()
if(P.runtime_iff_group || P.ammo.flags_ammo_behavior & AMMO_NO_DEFLECT)
// Bullet gets absorbed if it has IFF or can't be reflected.
return

var/obj/projectile/new_proj = new(src, create_cause_data(initial(name)))
new_proj.generate_bullet(P.ammo)
new_proj.damage = P.damage * reflection_multiplier // don't make it too punishing
new_proj.accuracy = HIT_ACCURACY_TIER_7 // 35% chance to hit something

// Move back to who fired you.
RegisterSignal(new_proj, COMSIG_BULLET_PRE_HANDLE_OBJ, PROC_REF(bullet_ignore_turf))
new_proj.permutated |= src

var/angle = Get_Angle(src, P.firer) + rand(30, -30)
var/atom/target = get_angle_target_turf(src, angle, get_dist(src, P.firer))
new_proj.projectile_flags |= PROJECTILE_SHRAPNEL
new_proj.fire_at(target, P.firer, src, reflect_range, speed = P.ammo.shell_speed)

return TRUE

/obj/structure/alien/movable_wall/reflective/proc/bullet_ignore_turf(obj/projectile/P, turf/T)
SIGNAL_HANDLER
if(T == src)
return COMPONENT_BULLET_PASS_THROUGH

/obj/structure/alien/movable_wall/reflective/ex_act(severity, explosion_direction, source, mob/source_mob)
return ..(severity * explosive_multiplier, explosion_direction, source, source_mob)

//############## END MOVABLES

/turf/closed/wall/resin/reflective
name = "resin reflective wall"
desc = "Weird hardened slime solidified into a fine, smooth wall."
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,70 @@
GLOBAL_LIST_INIT(resin_build_order_palatine, list(
/datum/resin_construction/resin_turf/wall/thick,
/datum/resin_construction/resin_turf/wall/reflective/royal,
/datum/resin_construction/resin_turf/membrane/thick,
/datum/resin_construction/resin_obj/door/thick,
/datum/resin_construction/resin_obj/acid_pillar/palatine,
/datum/resin_construction/resin_obj/sticky_resin,
/datum/resin_construction/resin_obj/resin_spike,
/datum/resin_construction/resin_obj/movable/thick_wall,
/datum/resin_construction/resin_obj/movable/thick_membrane
// /datum/resin_construction/resin_obj/movable/reflective_royal
))

/datum/resin_construction/resin_obj/acid_pillar/palatine
name = "Royal Acid Pillar"
desc = "A tall, green pillar that is capable of firing at multiple targets at once. Fires strong acid."
construction_name = "acid pillar"

build_overlay_icon = /obj/effect/warning/alien

build_path = /obj/effect/alien/resin/acid_pillar/palatine
build_time = 6 SECONDS

/obj/effect/alien/resin/acid_pillar/palatine
name = "royal acid pillar"
desc = "An enhanced resin pillar that is oozing with acid."

health = (HEALTH_RESIN_XENO_ACID_PILLAR * 2)
should_track_build = TRUE
anchored = TRUE

acid_type = /obj/effect/xenomorph/spray/strong/no_stun
range = 6

/obj/effect/alien/resin/acid_pillar/palatine/Initialize(mapload, hive)
. = ..()
add_filter("royal_glow", priority = 1, params = list("type" = "outline", "color" = BLOOD_COLOR_XENO_ROYAL, "size" = 1))

/datum/resin_construction/resin_turf/wall/reflective/royal
name = "Royal Reflective Resin Wall"
desc = "A reflective resin wall, able to reflect any and all projectiles back to the shooter."
construction_name = "reflective resin wall"
cost = XENO_RESIN_WALL_REFLECT_COST
max_per_xeno = 10

build_path = /turf/closed/wall/resin/reflective/royal

/turf/closed/wall/resin/reflective/royal
name = "royal reflective membrane"
damage_cap = HEALTH_WALL_XENO_MEMBRANE_THICK

/datum/action/xeno_action/onclick/plant_weeds/palatine
ability_primacy = XENO_NOT_PRIMARY_ACTION

/datum/action/xeno_action/onclick/choose_resin/palatine
ability_primacy = XENO_NOT_PRIMARY_ACTION

/datum/action/xeno_action/activable/secrete_resin/palatine
name = "Secrete Royal Resin"
ability_primacy = XENO_NOT_PRIMARY_ACTION
thick = TRUE




///##############################################

/datum/action/xeno_action/onclick/palatine_roar
name = "Roar"
icon_file = 'icons/mob/hud/actions_palatine.dmi'
Expand Down
7 changes: 7 additions & 0 deletions code/modules/mob/living/carbon/xenomorph/castes/Palatine.dm
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@
tier = 3
counts_for_slots = FALSE
claw_type = CLAW_TYPE_VERY_SHARP
extra_build_dist = 4

base_actions = list(
/datum/action/xeno_action/onclick/xeno_resting,
Expand All @@ -61,6 +62,10 @@
/datum/action/xeno_action/activable/warden_heal,//Mac4
/datum/action/xeno_action/onclick/prae_switch_heal_type,//Mac5
/datum/action/xeno_action/onclick/emit_pheromones,
/datum/action/xeno_action/onclick/plant_weeds/palatine,
/datum/action/xeno_action/onclick/choose_resin/palatine,
/datum/action/xeno_action/activable/secrete_resin/palatine,
/datum/action/xeno_action/onclick/tacmap,
)

icon_xeno = 'icons/mob/xenos/palatine.dmi'
Expand All @@ -73,6 +78,8 @@
notify_ghosts(header = "New Palatine", message = "A new Palatine has risen.", source = src, action = NOTIFY_ORBIT)

AddComponent(/datum/component/footstep, 2 , 35, 11, 4, "alien_footstep_large")
resin_build_order = GLOB.resin_build_order_palatine


/datum/behavior_delegate/palatine_base
name = "Base Palatine Behavior Delegate"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -341,6 +341,12 @@ GLOBAL_VAR_INIT(resin_lz_allowed, FALSE)
construction_name = "thick resin membrane"
build_path = /obj/structure/alien/movable_wall/membrane/thick

/datum/resin_construction/resin_obj/movable/reflective_royal
name = "Movable Royal Reflective Wall"
desc = "A thick resin membrane that can be moved onto any adjacent tile, as long as there are weeds. Reflects incoming projectiles."
construction_name = "reflective resin wall"
build_path = /obj/structure/alien/movable_wall/reflective

// Remote Weed Nodes for originally coded for Resin Whisperers
/datum/resin_construction/resin_obj/resin_node
name = "Weed Node"
Expand Down

0 comments on commit de2a400

Please sign in to comment.