Skip to content

Commit

Permalink
Merge pull request #3390 from OuterMostMonk/flood
Browse files Browse the repository at this point in the history
Flood fixes and buffs
  • Loading branch information
BDpuffy420 authored Feb 19, 2023
2 parents bebd0cf + 0b8ece6 commit 87d989d
Show file tree
Hide file tree
Showing 14 changed files with 279 additions and 154 deletions.
1 change: 1 addition & 0 deletions baystation12.dme
Original file line number Diff line number Diff line change
Expand Up @@ -1751,6 +1751,7 @@
#include "code\modules\halo\flood\types\achlys.dm"
#include "code\modules\halo\flood\types\carrier.dm"
#include "code\modules\halo\flood\types\combat_form.dm"
#include "code\modules\halo\flood\types\flood_shield.dm"
#include "code\modules\halo\flood\types\human.dm"
#include "code\modules\halo\flood\types\infestor.dm"
#include "code\modules\halo\flood\types\pure.dm"
Expand Down
14 changes: 7 additions & 7 deletions code/modules/halo/factions/player_factions.dm
Original file line number Diff line number Diff line change
Expand Up @@ -163,12 +163,12 @@
/mob/living/simple_animal/hostile/flood/combat_form/ODST = 3,\
/mob/living/simple_animal/hostile/flood/combat_form/guard = 3,\
/mob/living/simple_animal/hostile/flood/combat_form/oni = 3,\
/mob/living/simple_animal/hostile/flood/combat_form/minor = 3,\
/mob/living/simple_animal/hostile/flood/combat_form/minor2 = 3,\
/mob/living/simple_animal/hostile/flood/combat_form/elite/minor = 3,\
/mob/living/simple_animal/hostile/flood/combat_form/elite/minor2 = 3,\
/mob/living/simple_animal/hostile/flood/carrier = 8,\
/mob/living/simple_animal/hostile/flood/combat_form/major = 2,\
/mob/living/simple_animal/hostile/flood/combat_form/zealot = 2,\
/mob/living/simple_animal/hostile/flood/combat_form/ultra = 2,\
/mob/living/simple_animal/hostile/flood/combat_form/specops = 2,\
/mob/living/simple_animal/hostile/flood/combat_form/ranger = 2,\
/mob/living/simple_animal/hostile/flood/combat_form/elite/major = 2,\
/mob/living/simple_animal/hostile/flood/combat_form/elite/zealot = 2,\
/mob/living/simple_animal/hostile/flood/combat_form/elite/ultra = 2,\
/mob/living/simple_animal/hostile/flood/combat_form/elite/specops = 2,\
/mob/living/simple_animal/hostile/flood/combat_form/elite/ranger = 2,\
/mob/living/simple_animal/hostile/flood/combat_form/juggernaut = 1)
12 changes: 6 additions & 6 deletions code/modules/halo/flood/flood.dm
Original file line number Diff line number Diff line change
Expand Up @@ -32,12 +32,12 @@ GLOBAL_LIST_EMPTY(live_flood_simplemobs)
/datum/species/sangheili = /mob/living/simple_animal/hostile/flood/combat_form/prisoner/abomination)

#define ITEM_INFEST_TYPE_LIST list(\
/obj/item/clothing/suit/armor/special/combatharness/minor = /mob/living/simple_animal/hostile/flood/combat_form/minor2,\
/obj/item/clothing/suit/armor/special/combatharness/major = /mob/living/simple_animal/hostile/flood/combat_form/major,\
/obj/item/clothing/suit/armor/special/combatharness/zealot = /mob/living/simple_animal/hostile/flood/combat_form/zealot,\
/obj/item/clothing/suit/armor/special/combatharness/ultra = /mob/living/simple_animal/hostile/flood/combat_form/ultra,\
/obj/item/clothing/suit/armor/special/combatharness/specops = /mob/living/simple_animal/hostile/flood/combat_form/specops,\
/obj/item/clothing/suit/armor/special/combatharness/ranger = /mob/living/simple_animal/hostile/flood/combat_form/ranger,\
/obj/item/clothing/suit/armor/special/combatharness/minor = /mob/living/simple_animal/hostile/flood/combat_form/elite/minor2,\
/obj/item/clothing/suit/armor/special/combatharness/major = /mob/living/simple_animal/hostile/flood/combat_form/elite/major,\
/obj/item/clothing/suit/armor/special/combatharness/zealot = /mob/living/simple_animal/hostile/flood/combat_form/elite/zealot,\
/obj/item/clothing/suit/armor/special/combatharness/ultra = /mob/living/simple_animal/hostile/flood/combat_form/elite/ultra,\
/obj/item/clothing/suit/armor/special/combatharness/specops = /mob/living/simple_animal/hostile/flood/combat_form/elite/specops,\
/obj/item/clothing/suit/armor/special/combatharness/ranger = /mob/living/simple_animal/hostile/flood/combat_form/elite/ranger,\
/obj/item/clothing/under/unsc/odst_jumpsuit = /mob/living/simple_animal/hostile/flood/combat_form/ODST,\
/obj/item/clothing/under/unsc/marine_fatigues/oni_uniform = /mob/living/simple_animal/hostile/flood/combat_form/oni,\
/obj/item/clothing/under/color/orange = /mob/living/simple_animal/hostile/flood/combat_form/prisoner)
Expand Down
12 changes: 6 additions & 6 deletions code/modules/halo/flood/flood_spawn.dm
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,12 @@
/mob/living/simple_animal/hostile/flood/combat_form/ODST,\
/mob/living/simple_animal/hostile/flood/combat_form/guard,\
/mob/living/simple_animal/hostile/flood/combat_form/oni,\
/mob/living/simple_animal/hostile/flood/combat_form/minor,\
/mob/living/simple_animal/hostile/flood/combat_form/minor2,\
/mob/living/simple_animal/hostile/flood/combat_form/zealot,\
/mob/living/simple_animal/hostile/flood/combat_form/ultra,\
/mob/living/simple_animal/hostile/flood/combat_form/specops,
/mob/living/simple_animal/hostile/flood/combat_form/ranger)
/mob/living/simple_animal/hostile/flood/combat_form/elite/minor,\
/mob/living/simple_animal/hostile/flood/combat_form/elite/minor2,\
/mob/living/simple_animal/hostile/flood/combat_form/elite/zealot,\
/mob/living/simple_animal/hostile/flood/combat_form/elite/ultra,\
/mob/living/simple_animal/hostile/flood/combat_form/elite/specops,
/mob/living/simple_animal/hostile/flood/combat_form/elite/ranger)

/datum/flood_spawner/New(var/atom/a_owner, var/a_max_flood, var/a_respawn_delay,var/list/a_spawn_pool)
. = ..()
Expand Down
Binary file modified code/modules/halo/flood/sangheili_flood_uf.dmi
Binary file not shown.
33 changes: 29 additions & 4 deletions code/modules/halo/flood/types/combat_form.dm
Original file line number Diff line number Diff line change
Expand Up @@ -79,18 +79,24 @@
h.bloodstr.add_reagent(/datum/reagent/floodinfectiontoxin,melee_damage_lower/4)
pickup_gun(attacked)

/mob/living/simple_animal/hostile/flood/combat_form/RangedAttack(var/atom/attacked)
/mob/living/simple_animal/hostile/flood/combat_form/RangedAttack(var/atom/attacked, mob/user)
if(!our_gun)
return
var/gun_fire = our_gun.afterattack(attacked,src)
if(!ckey && !gun_fire)

our_gun.afterattack(attacked,src)

if(!ckey && our_gun.ammo_check(user) == 0) //If the gun has no ammo left we drop it
drop_gun()

/mob/living/simple_animal/hostile/flood/combat_form/proc/pickup_gun(var/obj/item/weapon/gun/G)
if(!istype(G))
return
if(our_gun)
drop_gun()

var/ammo = G.ammo_check()
if(ammo == 0 && !ckey) //If a gun has no ammo we ignore it, players can still pick up though if they want
return
visible_message("<span class = 'notice'>[name] picks up [G.name]</span>")
our_gun = G
contents += our_gun
Expand All @@ -102,6 +108,7 @@
our_gun.forceMove(loc)
contents -= our_gun
ranged = 0
our_gun = 0 //So an NPC can pick up a new gun

/mob/living/simple_animal/hostile/flood/combat_form/proc/human_in_sight()
for(var/mob/living/carbon/human/h in view(7,src))
Expand Down Expand Up @@ -131,7 +138,25 @@
var/list/viewlist = view(1,src)
if(locate(/obj/machinery/door/airlock) in viewlist)
smash_airlock()
if(!our_gun)
if(!our_gun || our_gun == 0)
for(var/obj/item/weapon/gun/G in viewlist)
pickup_gun(G)
return

/mob/living/simple_animal/hostile/flood/combat_form/MoveToTarget()
stop_automated_movement = 1
if(!target_mob || SA_attackable(target_mob))
stance = HOSTILE_STANCE_IDLE
var/list/targlist = ListTargets(7)
if(target_mob in targlist)
if(ranged || istype(loc,/obj/vehicles))
if(target_mob in targlist)
walk(src, 0)
OpenFire(target_mob)
hostilemob_walk_to(target_mob,1,move_to_delay) //Flood should chase down people even if ranged and use their arm to attack
spawn(get_dist(src,target_mob)*move_to_delay) //If the target is within range after our original move, we attack them.
AttackTarget()

else
target_mob = null
stance = HOSTILE_STANCE_IDLE
48 changes: 48 additions & 0 deletions code/modules/halo/flood/types/flood_shield.dm
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@

/mob/living/simple_animal/hostile/flood/combat_form/elite/adjustBruteLoss(damage)
last_damage = world.time
if(recharging)
overlays -= "shield_recharge"
recharging = 0

//take damage from shield first
if(shield_left > 0)
overlays |= "shield_flicker"
var/shield_absorbed = min(shield_left, damage)
shield_left -= shield_absorbed
damage -= shield_absorbed

. = ..(damage)

/mob/living/simple_animal/hostile/flood/combat_form/elite/Life()
. = ..()

//dont need to display damage any more
overlays -= "shield_flicker"

if(stat == DEAD)
overlays -= "shield_recharge"
else
//are we currently recharging?
if(recharging)
shield_left += recharge_rate

//have we just finished recharging?
if(shield_left >= shield_max)
shield_left = shield_max
overlays -= "shield_recharge"
recharging = 0

//should we start recharging?
else if(world.time >= last_damage + recharge_delay && shield_left < shield_max)
recharging = 1
overlays |= "shield_recharge"


/mob/living/simple_animal/hostile/flood/combat_form/elite
var/shield_left = 50
var/shield_max = 50
var/recharge_delay = 5 SECONDS
var/recharge_rate = 10
var/last_damage = 0
var/recharging = 0
21 changes: 20 additions & 1 deletion code/modules/halo/flood/types/infestor.dm
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@
if(is_being_infested(h))
return 0
visible_message("<span class = 'danger'>[name] leaps at [h.name], tearing at their armor and burrowing through their skin!</span>")
h.bloodstr.add_reagent(/datum/reagent/floodinfectiontoxin,15)
h.bloodstr.add_reagent(/datum/reagent/floodinfectiontoxin,60)
adjustBruteLoss(1)
return 1

Expand Down Expand Up @@ -163,3 +163,22 @@
..()
if(swarm_size > 1)
to_chat(user, "<span class='warning'>There are [swarm_size] in the swarm.</span>")

/mob/living/simple_animal/hostile/flood/infestor/apply_difficulty_setting()
. = ..()
switch(GLOB.difficulty_level)
if(DIFFICULTY_EASY)
//We dont want them to instantly die
health = 1
maxHealth = 1
if(DIFFICULTY_NORMAL)
//no change
if(DIFFICULTY_HEROIC)
//Dont want them too tanky
health = 1
maxHealth = 1

if(DIFFICULTY_LEGENDARY)
//Dont want them too tanky
health = 1
maxHealth = 1
8 changes: 4 additions & 4 deletions code/modules/halo/flood/types/pure.dm
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,15 @@
icon_living = "movement state"
icon_dead = "death state"
move_to_delay = 15
health = 300 //Combat forms need to be hardier.
maxHealth = 300
health = 500 //Combat forms need to be hardier.
maxHealth = 500
melee_damage_lower = 40
melee_damage_upper = 55
attacktext = "Whips"
mob_size = MOB_LARGE
resistance = 20
bound_width = 96
bound_height = 96
bound_width = 64 //96 original value. Size causes it to get stuck easily
bound_height = 64 //96

/mob/living/simple_animal/hostile/flood/combat_form/santa
name = "A Christmas.. Abomination"
Expand Down
Loading

0 comments on commit 87d989d

Please sign in to comment.