Files
Bubberstation/code/modules/events/wizard/imposter.dm
SkyratBot 5a33abb773 [MIRROR] Event menu rewrite [MDB IGNORE] (#15396)
* Event menu rewrite

* Update topic.dm

* Update _event.dm

* Update event_chaos_system.dm

Co-authored-by: Profakos <profakos@gmail.com>
Co-authored-by: Zonespace <41448081+Zonespace27@users.noreply.github.com>
Co-authored-by: Gandalf <9026500+Gandalf2k15@users.noreply.github.com>
2022-08-08 01:15:12 +01:00

39 lines
1.4 KiB
Plaintext

/datum/round_event_control/wizard/imposter //Mirror Mania
name = "Imposter Wizard"
weight = 1
typepath = /datum/round_event/wizard/imposter
max_occurrences = 1
earliest_start = 0 MINUTES
description = "Spawns a doppelganger of the wizard."
/datum/round_event/wizard/imposter/start()
for(var/datum/mind/M as anything in get_antag_minds(/datum/antagonist/wizard))
if(!ishuman(M.current))
continue
var/mob/living/carbon/human/W = M.current
var/list/candidates = poll_ghost_candidates("Would you like to be an imposter wizard?", ROLE_WIZARD)
if(!candidates)
return //Sad Trombone
var/mob/dead/observer/C = pick(candidates)
new /obj/effect/particle_effect/fluid/smoke(W.loc)
var/mob/living/carbon/human/I = new /mob/living/carbon/human(W.loc)
W.dna.transfer_identity(I, transfer_SE=1)
I.real_name = I.dna.real_name
I.name = I.dna.real_name
I.updateappearance(mutcolor_update=1)
I.domutcheck()
I.key = C.key
var/datum/antagonist/wizard/master = M.has_antag_datum(/datum/antagonist/wizard)
if(!master.wiz_team)
master.create_wiz_team()
var/datum/antagonist/wizard/apprentice/imposter/imposter = new()
imposter.master = M
imposter.wiz_team = master.wiz_team
master.wiz_team.add_member(imposter)
I.mind.add_antag_datum(imposter)
I.mind.special_role = "imposter"
I.log_message("is an imposter!", LOG_ATTACK, color="red") //?
SEND_SOUND(I, sound('sound/effects/magic.ogg'))