Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adds the mining breach type #2615

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file modified ModularTegustation/Teguicons/96x48.dmi
Binary file not shown.
23 changes: 23 additions & 0 deletions ModularTegustation/tegu_items/debug_items.dm
Original file line number Diff line number Diff line change
Expand Up @@ -373,3 +373,26 @@
say("Restarting...")
SLEEP_CHECK_DEATH(10)
DeepsCheckStart()

//breach tester
/obj/item/breachtester//for testing many abnormalities very quickly
name = "Breach tester"
desc = "For testing use only, DO NOT DISTRIBUTE! Breach types can be checked under _DEFINES/abnormalities.dm"
icon = 'icons/obj/items_and_weapons.dmi'
icon_state = "nanoimplant"
var/breach_type = BREACH_NORMAL
var/list/breach_list = list(
BREACH_NORMAL, BREACH_PINK, BREACH_MINING,
)

/obj/item/breachtester/attack_self(mob/user)
breach_type = input(user, "Which breach will you test?") as null|anything in breach_list

/obj/item/breachtester/attack(mob/living/simple_animal/hostile/abnormality/target, mob/living/carbon/human/user)
if(!isabnormalitymob(target))
to_chat(user, span_warning("\"[target]\" isn't an Abnormality."))
return
target.BreachEffect(user, breach_type)
to_chat(user, span_nicegreen("You triggered a [breach_type] breach!"))


1 change: 1 addition & 0 deletions code/__DEFINES/abnormalities.dm
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
// Breach types
#define BREACH_NORMAL 0
#define BREACH_PINK 1
#define BREACH_MINING 2

// List
#define THREAT_TO_NAME list(\
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -150,9 +150,14 @@ GLOBAL_LIST_EMPTY(army)
//*--Combat Mechanics--*
/mob/living/simple_animal/hostile/abnormality/army/BreachEffect(mob/living/carbon/human/user, breach_type)
SEND_GLOBAL_SIGNAL(COMSIG_GLOB_ABNORMALITY_BREACH, src)
FearEffect()
Blackify()
SpawnAdds()//set its alpha to 0 and make it non-dense
if(breach_type == BREACH_MINING)
for(var/i = 1 to 3)
var/mob/living/simple_animal/hostile/army_enemy/E = new(get_turf(src))
RegisterSignal(E, COMSIG_PARENT_QDELETING, PROC_REF(ArmyDeath))
else
FearEffect()
Blackify()
SpawnAdds()//set its alpha to 0 and make it non-dense
for(var/mob/living/L in protected_targets)
L.remove_status_effect(STATUS_EFFECT_PROTECTION)
density = FALSE
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -138,6 +138,7 @@
. = ..()
var/turf/T = pick(GLOB.department_centers)
soundloop.start()
forceMove(T)
if(breach_type != BREACH_MINING)
forceMove(T)
BluePulse()
return
Original file line number Diff line number Diff line change
Expand Up @@ -300,6 +300,9 @@

//Breach
/mob/living/simple_animal/hostile/abnormality/distortedform/BreachEffect(mob/living/carbon/human/user, breach_type)
if(breach_type == BREACH_MINING)
qdel(src)
return
. = ..()
if(breached)
return
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,10 @@ GLOBAL_LIST_EMPTY(meat_list)
/mob/living/simple_animal/hostile/abnormality/last_shot/Move()
return FALSE

/mob/living/simple_animal/hostile/abnormality/last_shot/BreachEffect()
/mob/living/simple_animal/hostile/abnormality/last_shot/BreachEffect(mob/living/carbon/human/user, breach_type)
if(breach_type == BREACH_MINING)
..()
return
var/turf/T = pick(GLOB.department_centers)
forceMove(T)
..()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -231,7 +231,7 @@
datum_reference.qliphoth_change(-1)

/mob/living/simple_animal/hostile/abnormality/nobody_is/BreachEffect(mob/living/carbon/human/user, breach_type)
if(!(status_flags & GODMODE)) // Already breaching
if(current_stage > 1)
return
if(reflect_timer)
deltimer(reflect_timer)
Expand All @@ -240,6 +240,8 @@
return
CheckMirrorIcon() //Clear overlays
next_stage()
if(breach_type == BREACH_MINING)
return
// Teleport us somewhere where nobody will see us at first
var/list/priority_list = list()
for(var/turf/T in GLOB.xeno_spawn)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -322,8 +322,9 @@
ZeroQliphoth()
return
. = ..()
var/turf/T = pick(GLOB.department_centers)
forceMove(T)
if(breach_type != BREACH_MINING)
var/turf/T = pick(GLOB.department_centers)
forceMove(T)

//Weather controlling
/mob/living/simple_animal/hostile/abnormality/seasons/proc/CheckWeather()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -154,8 +154,9 @@

/mob/living/simple_animal/hostile/abnormality/silentorchestra/BreachEffect(mob/living/carbon/human/user, breach_type)
. = ..()
var/turf/T = pick(GLOB.department_centers)
forceMove(T)
if(breach_type != BREACH_MINING)
var/turf/T = pick(GLOB.department_centers)
forceMove(T)
DamagePulse()
return

Original file line number Diff line number Diff line change
Expand Up @@ -261,7 +261,8 @@

/mob/living/simple_animal/hostile/abnormality/space_lady/BreachEffect(mob/living/carbon/human/user, breach_type)
. = ..()
Teleport()
if(breach_type != BREACH_MINING)
Teleport()


//Bullets
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -221,6 +221,9 @@ GLOBAL_LIST_EMPTY(apostles)
return

/mob/living/simple_animal/hostile/abnormality/white_night/BreachEffect(mob/living/carbon/human/user, breach_type)
if(breach_type == BREACH_MINING)
qdel(src)
return
holy_revival_cooldown = world.time + holy_revival_cooldown_base
. = ..()
for(var/mob/M in GLOB.player_list)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -188,9 +188,10 @@
//***Breach Mechanics***//
/mob/living/simple_animal/hostile/abnormality/doomsday_calendar/BreachEffect(mob/living/carbon/human/user, breach_type)
. = ..()
var/turf/T = pick(GLOB.department_centers)
if(breach_type != BREACH_MINING)
var/turf/T = pick(GLOB.department_centers)
forceMove(T)
icon_state = "doomsday_active"
forceMove(T)
AnnounceBreach()
SpawnAdds()

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -90,8 +90,9 @@

/mob/living/simple_animal/hostile/abnormality/highway_devotee/BreachEffect(mob/living/carbon/human/user, breach_type)
. = ..()
var/turf/T = pick(GLOB.xeno_spawn)
forceMove(T)
if(breach_type != BREACH_MINING)
var/turf/T = pick(GLOB.xeno_spawn)
forceMove(T)
addtimer(CALLBACK(src, PROC_REF(KillYourself)), 3 MINUTES)
dir = pick(list(NORTH, SOUTH, WEST, EAST))
for(var/turf/open/U in range(2, src))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -193,7 +193,8 @@
. = ..()
if(!datum_reference.abno_radio)
AbnoRadio()
addtimer(CALLBACK(src, PROC_REF(TryTeleport)), 5)
if(breach_type != BREACH_MINING)
addtimer(CALLBACK(src, PROC_REF(TryTeleport)), 5)

/mob/living/simple_animal/hostile/abnormality/jangsan/proc/TryTeleport() //stolen from knight of despair
dir = 2
Expand Down
26 changes: 25 additions & 1 deletion code/modules/mob/living/simple_animal/abnormality/he/laetitia.dm
Original file line number Diff line number Diff line change
Expand Up @@ -42,14 +42,18 @@
You look lonely too, I hope my present will make you laugh as well!"

attack_action_types = list(/datum/action/cooldown/laetitia_gift, /datum/action/cooldown/laetitia_summon)
var/breaching = FALSE
var/summon_cooldown
var/summon_cooldown_time = 60 SECONDS
var/summon_list = list()

/datum/action/cooldown/laetitia_summon
name = "Call for Friends"
icon_icon = 'ModularTegustation/Teguicons/tegu_effects.dmi'
button_icon_state = "prank_gift"
check_flags = AB_CHECK_CONSCIOUS
transparent_when_unavailable = TRUE
cooldown_time = 40 SECONDS
cooldown_time = 60 SECONDS
var/delete_timer
var/delete_cooldown = 30 SECONDS
var/mob/living/simple_animal/hostile/gift/G1
Expand Down Expand Up @@ -139,6 +143,13 @@
qdel(src)
opening = FALSE

/mob/living/simple_animal/hostile/abnormality/laetitia/Life()
. = ..()
if(!breaching)
return
if((summon_cooldown < world.time) && !(status_flags & GODMODE))
SummonAdds()
return

/mob/living/simple_animal/hostile/abnormality/laetitia/NeutralEffect(mob/living/carbon/human/user, work_type, pe)
. = ..()
Expand Down Expand Up @@ -168,6 +179,19 @@
P.TriggerPrank()
return

/mob/living/simple_animal/hostile/abnormality/laetitia/BreachEffect(mob/living/carbon/human/user, breach_type)
if(breach_type == BREACH_MINING)
breaching = TRUE
return ..()

/mob/living/simple_animal/hostile/abnormality/laetitia/proc/SummonAdds()//Mining breach summon
summon_cooldown = world.time + summon_cooldown_time
if(LAZYLEN(summon_list) > 9)//this list is not subtracted when minions are killed. Limited to 10 per breach
return
var/turf/target_turf = get_turf(src)
var/mob/living/simple_animal/hostile/gift/new_mob = new(target_turf)
summon_list += new_mob

//Her friend
/mob/living/simple_animal/hostile/gift
name = "Little Witch's Friend"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@
var/teleport_cooldown_time = 5 MINUTES
var/teleport_cooldown
var/damage_taken = FALSE
var/noteleport = FALSE

//PLAYABLE ATTACKS
attack_action_types = list(/datum/action/innate/abnormality_attack/toggle/porccubus_dash_toggle)
Expand Down Expand Up @@ -132,11 +133,13 @@
//it does have a dash that makes it able to jump around, but it can't properly "roam" per say.
/mob/living/simple_animal/hostile/abnormality/porccubus/BreachEffect(mob/living/carbon/human/user, breach_type)
. = ..()
if(breach_type == BREACH_MINING)
noteleport = TRUE
playsound(src, 'sound/abnormalities/porccubus/head_explode_laugh.ogg', 50, FALSE, 4)
icon_living = "porrcubus"
icon_state = icon_living
ranged_cooldown = world.time + ranged_cooldown_time
if(!IsCombatMap())
if(!IsCombatMap() && (breach_type != BREACH_MINING))
var/turf/T = pick(GLOB.xeno_spawn)
forceMove(T)
teleport_cooldown = world.time + teleport_cooldown_time
Expand All @@ -148,7 +151,7 @@
. = ..()
if(status_flags & GODMODE)
return
if(IsCombatMap())
if(IsCombatMap() || noteleport)
return
if(teleport_cooldown < world.time) //if porccubus hasn't taken damage for 5 minutes we make him move so he doesn't stay stuck in whatever cell he got thrown in.
teleport_cooldown = world.time + teleport_cooldown_time
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -201,8 +201,6 @@

//BreachEffect and combat
/mob/living/simple_animal/hostile/abnormality/red_shoes/BreachEffect(mob/living/carbon/human/user, breach_type)
if(!(status_flags & GODMODE))
return
soundloop.stop()
for(var/mob/living/carbon/human/H in GLOB.mob_living_list)//stops possessing people, prevents runtimes. Panicked players are ghosted so use mob_living_list
UnPossess(H)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ Finally, an abnormality that DOESN'T have to do any fancy movement shit. It's a
icon_state = "singingmachine_closed_clean"
icon_living = "singingmachine_closed_clean"
portrait = "singing_machine"
maxHealth = 200
health = 200
maxHealth = 3000
health = 3000
threat_level = HE_LEVEL
start_qliphoth = 2
work_chances = list(
Expand Down Expand Up @@ -71,6 +71,12 @@ Finally, an abnormality that DOESN'T have to do any fancy movement shit. It's a
to_chat(H, span_warning("That terrible grinding noise..."))
return ..()

/mob/living/simple_animal/hostile/abnormality/singing_machine/Move()
return FALSE

/mob/living/simple_animal/hostile/abnormality/singing_machine/CanAttack(atom/the_target)
return FALSE

/mob/living/simple_animal/hostile/abnormality/singing_machine/AttemptWork(mob/living/carbon/human/user, work_type)
if(work_type == ABNORMALITY_WORK_INSTINCT)
if(datum_reference.qliphoth_meter > 0) // Sets bonus damage on instinct work.
Expand Down Expand Up @@ -148,6 +154,10 @@ Finally, an abnormality that DOESN'T have to do any fancy movement shit. It's a
playStatus = 1
return

/mob/living/simple_animal/hostile/abnormality/singing_machine/BreachEffect(mob/living/carbon/human/user, breach_type)
if(breach_type == BREACH_MINING)
ZeroQliphoth()

/mob/living/simple_animal/hostile/abnormality/singing_machine/proc/removeAddict(mob/living/carbon/human/addict)
if(addict)
musicalAddicts -= addict // Your five minutes are over, you're free.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,7 @@
faction += "pink_midnight"
//Call root code but with normal breach
. = ..(null, BREACH_NORMAL)
if(!IsCombatMap())
if(!IsCombatMap() && breach_type != BREACH_MINING)
var/turf/T = pick(GLOB.department_centers)
forceMove(T)
update_icon()
Expand Down
39 changes: 36 additions & 3 deletions code/modules/mob/living/simple_animal/abnormality/he/you_strong.dm
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,9 @@
icon_state = "you_strong_pause"
icon_living = "you_strong_pause"
portrait = "grown_strong"
maxHealth = 200
health = 200
maxHealth = 2000
health = 2000
damage_coeff = list(RED_DAMAGE = 1, WHITE_DAMAGE = 1.5, BLACK_DAMAGE = 1.5, PALE_DAMAGE = 0)
threat_level = HE_LEVEL
start_qliphoth = 3
work_chances = list(
Expand Down Expand Up @@ -61,13 +62,31 @@
var/datum/looping_sound/server/soundloop

var/operating = FALSE
var/breaching = FALSE
var/summon_cooldown
var/summon_cooldown_time = 120 SECONDS
var/summon_list = list()

/mob/living/simple_animal/hostile/abnormality/you_strong/Initialize(mapload)
. = ..()
soundloop = new(list(src), FALSE)
soundloop.volume = 75
soundloop.extra_range = 0

/mob/living/simple_animal/hostile/abnormality/you_strong/Move()
return FALSE

/mob/living/simple_animal/hostile/abnormality/you_strong/CanAttack(atom/the_target)
return FALSE

/mob/living/simple_animal/hostile/abnormality/you_strong/Life()
. = ..()
if(!breaching)
return
if((summon_cooldown < world.time) && !(status_flags & GODMODE))
SummonAdds()
return

/mob/living/simple_animal/hostile/abnormality/you_strong/WorkComplete(mob/living/carbon/human/user, work_type, pe, work_time, canceled)
. = ..()
if(work_type == ABNORMALITY_WORK_REPRESSION)
Expand Down Expand Up @@ -123,14 +142,28 @@
icon_state = "you_strong_work"
SLEEP_CHECK_DEATH(30 SECONDS)
soundloop.stop()
src.datum_reference.qliphoth_change(3)
if(datum_reference)
src.datum_reference.qliphoth_change(3)
icon_state = "you_strong_make"
SLEEP_CHECK_DEATH(6)
for(var/i = 1 to 3)
new /mob/living/simple_animal/hostile/grown_strong(get_step(src, EAST))
if(breaching)
summon_list += /mob/living/simple_animal/hostile/grown_strong
SLEEP_CHECK_DEATH(6)
icon_state = "you_strong_pause"

/mob/living/simple_animal/hostile/abnormality/you_strong/BreachEffect(mob/living/carbon/human/user, breach_type)
if(breach_type == BREACH_MINING)
breaching = TRUE
return ..()

/mob/living/simple_animal/hostile/abnormality/you_strong/proc/SummonAdds()
summon_cooldown = world.time + summon_cooldown_time
if(LAZYLEN(summon_list) > 9)//this list is not subtracted when minions are killed. Limited to 10 per breach
return
ZeroQliphoth()

/mob/living/simple_animal/hostile/abnormality/you_strong/attacked_by(obj/item/I, mob/living/user)
if(!(I.type in taken_parts))
return ..()
Expand Down
Loading
Loading