Skip to content

Commit

Permalink
Funny (#1559)
Browse files Browse the repository at this point in the history
* Fixes the Wizarditis Timestop joke (#81136)

I made it so Wizarditis Timestop just freezes yourself but forgot
timestop makes you immune to timestop.

So now I added some vars to timestop both to fix this and also for
admins to mess around with.

:cl: Melbert
fix: Wizarditis Timestop now has the desired effect.
admin: Admins can now VV Timestop to make the caster not immune to their
own Timestop. If they really wanted.
/:cl:

* the turn based

* I guess this works technically, might be jank

* Revert "I guess this works technically, might be jank"

This reverts commit cc85d8a.

* Revert "the turn based"

This reverts commit 628ba0e.

* logging I guess

* baton nerf

* Update baton.dm

---------

Co-authored-by: MrMelbert <51863163+MrMelbert@users.noreply.github.com>
  • Loading branch information
wraith-54321 and MrMelbert authored Apr 20, 2024
1 parent b61cbf5 commit 4403eff
Show file tree
Hide file tree
Showing 4 changed files with 25 additions and 4 deletions.
3 changes: 1 addition & 2 deletions code/game/objects/items/melee/baton.dm
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
/// Used interally, you don't want to modify
var/cooldown_check = 0
/// Default wait time until can stun again.
var/cooldown = (1.5 SECONDS)
var/cooldown = (4 SECONDS) //monkestation edit
/// The length of the knockdown applied to a struck living, non-cyborg mob.
var/knockdown_time = (1.5 SECONDS)
/// If affect_cyborg is TRUE, this is how long we stun cyborgs for on a hit.
Expand Down Expand Up @@ -314,7 +314,6 @@
bare_wound_bonus = 5
clumsy_knockdown_time = 15 SECONDS
active = FALSE
cooldown = 1.5 SECONDS //monkestation edit

/// The sound effecte played when our baton is extended.
var/on_sound = 'sound/weapons/batonextend.ogg'
Expand Down
22 changes: 20 additions & 2 deletions code/modules/spells/spell_types/self/stop_time.dm
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,14 @@
/// The duration of the time stop.
var/timestop_duration = 10 SECONDS

/// if TRUE, the owner is immune to all time stop, from anyone
var/owner_is_immune_to_all_timestop = TRUE
/// if TRUE, the owner is immune to their own timestop (but not other people's, if above is FALSE)
var/owner_is_immune_to_self_timestop = TRUE

/datum/action/cooldown/spell/timestop/Grant(mob/grant_to)
. = ..()
if(owner)
if(!isnull(owner) && owner_is_immune_to_all_timestop)
ADD_TRAIT(owner, TRAIT_TIME_STOP_IMMUNE, REF(src))

/datum/action/cooldown/spell/timestop/Remove(mob/remove_from)
Expand All @@ -27,4 +32,17 @@

/datum/action/cooldown/spell/timestop/cast(atom/cast_on)
. = ..()
new /obj/effect/timestop/magic(get_turf(cast_on), timestop_range, timestop_duration, list(cast_on))
var/list/default_immune_atoms = list()
if(owner_is_immune_to_self_timestop)
default_immune_atoms += cast_on
new /obj/effect/timestop/magic(get_turf(cast_on), timestop_range, timestop_duration, default_immune_atoms)

/datum/action/cooldown/spell/timestop/vv_edit_var(var_name, var_value)
. = ..()
if(var_name != NAMEOF(src, owner_is_immune_to_all_timestop) || isnull(owner))
return

if(var_value)
ADD_TRAIT(owner, TRAIT_TIME_STOP_IMMUNE, REF(src))
else
REMOVE_TRAIT(owner, TRAIT_TIME_STOP_IMMUNE, REF(src))
Original file line number Diff line number Diff line change
Expand Up @@ -223,6 +223,7 @@
if(prompted_picking)
var/client/picked_client = pick_n_take_weighted(weighted_candidates)
var/mob/picked_mob = picked_client.mob
log_storyteller("Prompted antag event mob: [picked_mob], special role: [picked_mob.mind?.special_role ? picked_mob.mind.special_role : "none"]")
if(picked_mob)
candidates |= SSpolling.poll_candidates(
question = "Would you like to be a [cast_control.name]?",
Expand All @@ -236,6 +237,7 @@
else
var/client/picked_client = pick_n_take_weighted(weighted_candidates)
var/mob/picked_mob = picked_client.mob
log_storyteller("Picked antag event mob: [picked_mob], special role: [picked_mob.mind?.special_role ? picked_mob.mind.special_role : "none"]")
candidates |= picked_mob

for(var/i in 1 to antag_count)
Expand All @@ -244,6 +246,7 @@
break

var/mob/candidate = pick_n_take(candidates)
log_storyteller("Antag event spawned mob: [candidate], special role: [candidate.mind?.special_role ? candidate.mind.special_role : "none"]")

candidate.client?.prefs.reset_antag_rep()

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -272,6 +272,7 @@ SUBSYSTEM_DEF(gamemode)
if(!ready_players && !isliving(candidate))
continue
if(no_antags && candidate.mind.special_role)
log_storyteller("Candidate([candidate]) removed from rolling poll due to special_role([candidate.mind.special_role])")
continue
if(restricted_roles && (candidate.mind.assigned_role.title in restricted_roles))
continue
Expand Down

0 comments on commit 4403eff

Please sign in to comment.