Skip to content

Commit

Permalink
slaughter/laughter demon roundend report consume count + you cant bod…
Browse files Browse the repository at this point in the history
…yslam yourself (#82481) (#3905)

## About The Pull Request

you cant bodyslam yourself as a slaughter/laughter demon
also
![2024-04-05 18_46_26-Space Station
13](https://github.com/tgstation/tgstation/assets/70376633/2f67747f-fbd4-471a-a8bf-b7c0df6948eb)

also moved antag datum stuff to mind init which means easier spawning


## Why It's Good For The Game

i wanted to brag in OOC about my supreme robust killcount but then i
realized theres no way to verify this
also hurting yourself is stupid

## Changelog
:cl:
qol: slaughter/laughter demons have a cooler round end report
qol: you may not bodyslam yourself as a demon
code: slaughter and laughter demons are given their antag datum when
their mind initializes
/:cl:

---------

Co-authored-by: jimmyl <[email protected]>
Co-authored-by: MrMelbert <[email protected]>
  • Loading branch information
3 people authored Oct 22, 2024
1 parent 58a41c9 commit bca1a1f
Show file tree
Hide file tree
Showing 6 changed files with 32 additions and 5 deletions.
1 change: 0 additions & 1 deletion code/modules/antagonists/_common/antag_spawner.dm
Original file line number Diff line number Diff line change
Expand Up @@ -270,7 +270,6 @@
new /obj/effect/dummy/phased_mob(T, spawned)

spawned.key = C.key
spawned.generate_antagonist_status()

/obj/item/antag_spawner/slaughter_demon/laughter
name = "vial of tickles"
Expand Down
25 changes: 25 additions & 0 deletions code/modules/antagonists/wizard/slaughter_antag.dm
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
/datum/antagonist/slaughter
name = "\improper Slaughter Demon"
roundend_category = "demons"
show_name_in_check_antagonists = TRUE
ui_name = "AntagInfoDemon"
job_rank = ROLE_ALIEN
Expand Down Expand Up @@ -38,6 +39,30 @@
data["explain_attack"] = TRUE
return data

/datum/antagonist/slaughter/roundend_report()
var/list/report = list()

if(!owner)
CRASH("Antagonist datum without owner")

report += printplayer(owner)

if(objectives.len)
report += printobjectives(objectives)

var/datum/action/cooldown/spell/jaunt/bloodcrawl/slaughter_demon/consume_ability = locate() in owner.current?.actions
if(consume_ability?.consume_count > 0)
report += span_greentext("The [name] consumed a total of [consume_ability.consume_count] bodies!")
else
report += span_redtext("The [name] did not consume anyone! Shame!!")

if(owner.current?.stat != DEAD)
report += "<span class='greentext big'>The [name] survived!</span>"
else
report += "<span class='redtext big'>The [name] was vanquished!</span>"

return report.Join("<br>")

/datum/antagonist/slaughter/laughter
name = "Laughter demon"
objective_verb = "Hug and Tickle"
Expand Down
1 change: 0 additions & 1 deletion code/modules/events/ghost_role/slaughter_event.dm
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@
new /obj/effect/dummy/phased_mob(spawn_location, spawned)

player_mind.transfer_to(spawned)
spawned.generate_antagonist_status()

message_admins("[ADMIN_LOOKUPFLW(spawned)] has been made into a slaughter demon by an event.")
spawned.log_message("was spawned as a slaughter demon by an event.", LOG_GAME)
Expand Down
5 changes: 3 additions & 2 deletions code/modules/mob/living/basic/space_fauna/demon/demon.dm
Original file line number Diff line number Diff line change
Expand Up @@ -60,8 +60,9 @@
return list()

/// Proc that just sets up the demon's antagonism status.
/mob/living/basic/demon/proc/generate_antagonist_status()
if(isnull(antag_type))
/mob/living/basic/demon/mind_initialize()
. = ..()
if(isnull(antag_type) || mind.has_antag_datum(antag_type))
return // we weren't built for this proc to run

mind.set_assigned_role(SSjob.GetJobType(/datum/job/slaughter_demon))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@

/// Performs the classic slaughter demon bodyslam on the attack_target. Yeets them a screen away.
/mob/living/basic/demon/slaughter/proc/bodyslam(atom/attack_target)
if(!isliving(attack_target))
if(!isliving(attack_target) || attack_target == src)
return

if(!Adjacent(attack_target))
Expand Down
3 changes: 3 additions & 0 deletions code/modules/spells/spell_types/jaunt/bloodcrawl.dm
Original file line number Diff line number Diff line change
Expand Up @@ -162,6 +162,8 @@
they will be consumed by you, fully healing you."
/// The sound played when someone's consumed.
var/consume_sound = 'sound/magic/demon_consume.ogg'
/// consume count (statistics and stuff)
var/consume_count = 0

/datum/action/cooldown/spell/jaunt/bloodcrawl/slaughter_demon/try_enter_jaunt(obj/effect/decal/cleanable/blood, mob/living/jaunter)
// Save this before the actual jaunt
Expand Down Expand Up @@ -228,6 +230,7 @@
victim.investigate_log("has been killed by being consumed by a slaugter demon.", INVESTIGATE_DEATHS)
victim.death()
on_victim_consumed(victim, jaunter)
consume_count++

/**
* Called when a victim starts to be consumed.
Expand Down

0 comments on commit bca1a1f

Please sign in to comment.