Skip to content

Commit

Permalink
psi monsters + blueprint exploit fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
Trilbyspaceclone committed Mar 6, 2024
1 parent 973b79e commit 28b04f6
Show file tree
Hide file tree
Showing 5 changed files with 32 additions and 0 deletions.
1 change: 1 addition & 0 deletions code/game/objects/items/blueprints.dm
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,7 @@ move an amendment</a> to the drawing.</p>
if(istype(A, /area/space))
return AREA_SPACE
var/list/SPECIALS = list(
/area/deepmaint,
/area/shuttle,
/area/admin,
/area/arrival,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,33 @@
spawn(3) if(src) animate(src, alpha = 55, time = 2)
spawn(3) if(src) animate(src, alpha = chameleon_skill, time = 2)

//Deepmaints mobs **can not** survive outside deepmaints, this just codeifies it
if(!can_leave)
var/area/my_area = get_area(src.loc)
if(!my_area || my_area.name != "Deep Maintenance")
//We nest this to save on proccessing useless data
var/turf/simulated/floor/target //this is where we are teleporting
var/list/validtargets = list() //list of valid tiles to teleport to

for(var/area/A in world) //Clumbsy, but less intensive than iterating every tile
if(istype(A, /area/deepmaint)) //First find our deepmaint areas
for(var/turf/simulated/floor/T in A) //Pull a list of valid floor tiles from deepmaint
validtargets += T //Add them to the list

target = pick(validtargets) //Now we pick a target


//If we cant get a target then were in a test server or something critical wrong has happen!
if(!target)
message_admins("[src.name] was unable to find a target and was forcefuly moved outside of deepmaints! Was in [my_area.name]")
log_game("[src.name] was unable to find a target and was forcefuly moved outside of deepmaints! Was in [my_area.name]")
psionic_respawn = FALSE
death() //Your honour, League of Legends
return
visible_message("<span class='alert'>[src.name] becomes unstable and droops down before suddenly sinks into the floor howling in pain.</span>")
forceMove(target) //Moves the caster


/mob/living/carbon/superior_animal/psi_monster/dreaming_king/Life()
. = ..()
if(health <= (maxHealth * 0.66) && first_teleport == FALSE)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,8 @@
var/steal_amount = 1
var/mob/living/Victim = null

var/can_leave = FALSE


/mob/living/carbon/superior_animal/psi_monster/New()
..()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@
size_pixel_offset_x = 0

var/transform_ed = FALSE
can_leave = TRUE

// BUMP!
/mob/living/carbon/superior_animal/psi_monster/ploge/UnarmedAttack(atom/A, proximity)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@

drop_items = list(/obj/item/tool/sword/cult/deepmaints)

can_leave = TRUE //freedom

//Same armor that they are warning
armor = list(melee = 35, bullet = 35, energy = 35, bomb = 30, bio = 100, rad = 50)
Expand Down

0 comments on commit 28b04f6

Please sign in to comment.