mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-08-29 08:08:49 +01:00
<!-- Write **BELOW** The Headers and **ABOVE** The comments else it may not be viewable. --> <!-- You can view Contributing.MD for a detailed description of the pull request process. --> ## About The Pull Request Minor formatting for the wizard dice event file. <!-- Describe The Pull Request. Please be sure every change is documented or this can delay review and even discourage maintainers from merging your PR! --> <!-- Please make sure to actually test your PRs. If you have not tested your PR mention it. --> ## Why It's Good For The Game Formating :) <!-- Argue for the merits of your changes and how they benefit the game, especially if they are controversial and/or far reaching. If you can't actually explain WHY what you are doing will improve the game, then it probably isn't good for the game in the first place. --> ## Proof Of Testing It words good. <!-- Compile and run your code locally. Make sure it works. This is the place to show off your changes! We are not responsible for testing your features. --> ## Changelog Not player facing. <!-- If your PR modifies aspects of the game that can be concretely observed by players or admins you should add a changelog. If your change does NOT meet this description, remove this section. Be sure to properly mark your PRs to prevent unnecessary GBP loss. You can read up on GBP and its effects on PRs in the tgstation guides for contributors. Please note that maintainers freely reserve the right to remove and add tags should they deem it appropriate. You can attempt to finagle the system all you want, but it's best to shoot for clear communication right off the bat. --> <!-- Both 🆑's are required for the changelog to work! You can put your name to the right of the first 🆑 if you want to overwrite your GitHub username as author ingame. --> <!-- You can use multiple of the same prefix (they're only used for the icon ingame) and delete the unneeded ones. Despite some of the tags, changelogs should generally represent how a player might be affected by the changes rather than a summary of the PR's contents. --> <!-- By opening a pull request. You have read and understood the repository rules located on the main README.md on this project. -->
54 lines
1.9 KiB
Plaintext
54 lines
1.9 KiB
Plaintext
/// The wizard die of fate event.
|
|
/// The die gets spawned in the hands of a random crewmember, if they roll the dice and get a 1, they die. If they get a 20, they get the wizard antagonist.
|
|
/// Either way, it moves to a new crewmember and repeats 20 times.
|
|
|
|
/datum/round_event_control/wizard_dice
|
|
name = "Wizard Dice"
|
|
typepath = /datum/round_event/wizard_dice
|
|
category = EVENT_CATEGORY_INVASION
|
|
description = "A magical d20 is teleported to station. If someone lands on 20, they become a wizard. If they roll a 1, they die."
|
|
|
|
min_wizard_trigger_potency = NEVER_TRIGGERED_BY_WIZARDS
|
|
max_wizard_trigger_potency = NEVER_TRIGGERED_BY_WIZARDS
|
|
|
|
min_players = 30
|
|
max_occurrences = 1
|
|
weight = 10
|
|
earliest_start = 60 MINUTES
|
|
|
|
track = EVENT_TRACK_MODERATE
|
|
tags = list(TAG_COMMUNAL,TAG_COMBAT)
|
|
|
|
/datum/round_event/wizard_dice
|
|
announce_chance = 100
|
|
//the "when" stuff is measured in 2 second ticks, not deciseconds.
|
|
announce_when = 30 //1 minute
|
|
end_when = 300 //10 minutes
|
|
var/obj/item/dice/d20/teleporting_die_of_fate/created_dice
|
|
var/did_announce = FALSE
|
|
|
|
/datum/round_event/wizard_dice/setup()
|
|
//Create the dice and add the signal.
|
|
created_dice = new(get_safe_lucky_player_turf())
|
|
RegisterSignal(created_dice, COMSIG_QDELETING, PROC_REF(on_dice_destroy))
|
|
|
|
/datum/round_event/wizard_dice/start()
|
|
//Announce the event.
|
|
announce_to_ghosts()
|
|
|
|
/datum/round_event/wizard_dice/announce(fake)
|
|
priority_announce("A magical twenty-sided artifact was detected in the area. Please refrain from interacting with anything that cannot be explained by science.", "Magusologist Expert Warning")
|
|
did_announce = TRUE
|
|
|
|
/datum/round_event/wizard_dice/kill()
|
|
UnregisterSignal(created_dice, COMSIG_QDELETING) //Remove this signal first.
|
|
. = ..()
|
|
//Garbage day!
|
|
if(created_dice && !QDELETED(created_dice))
|
|
qdel(created_dice)
|
|
created_dice = null
|
|
|
|
/datum/round_event/wizard_dice/proc/on_dice_destroy()
|
|
processing = FALSE //Stop processing the event.
|
|
kill() //Kill the event.
|