Skip to content

Commit

Permalink
Feat: Clockwork Cult (#658 #946 #952)
Browse files Browse the repository at this point in the history
* Clock-rework 1

* Clock-rework 2

* Clock-Rework 3

* Clock-Rework 4

* Clock-Rework 4.1

* Clock-Rework 5

* Clock-Rework 6

* Clock-Rework 7

* Clock-Rework 8

* Vallat suggests

Co-authored-by: Vallat <vox.crit2013@gmail.com>

* Clock-Rework 9

Большое обнова предметов. Улучшение и плюшки.

* spell-wall-fix

* some dmi conflicts and mouse clockwork

* Bruh

* FUCK

* thing

* items,spellrefactor,de_shard and summonratvar

* spots fix

* REEE

* cogscarab and handies

* Gateway for ratvar e.t.c. the ritual

* ratvar can now be summoned by players

* e

* EEE

* lavaland ratvar. wat, it's not dead wtf

* robotssssssssss

* Revert "lavaland ratvar. wat, it's not dead wtf"

This reverts commit 0ce7d77.

* Lavaland

* Hand spells yeaaaa

* tgui fix and cloth fix

* loop-anim-thinges

* image-conflict

* robot change

* Roboto Refactor Icons and eyes and ratvar_act

* fu

* ratvar_act and stuff

* Vallat suggests

Co-authored-by: Vallat <vox.crit2013@gmail.com>

* suggests

* more suggests

* FINAL TOUCHES

* eee

* SHIT

* return FALSE

* balance

* balance and fixes

* more fixes

* bugs

* css

* fixs and QoLs

* fix and some punishes to unclockers

* breaking upload totally

* Vallat suggests

Co-authored-by: Vallat <vox.crit2013@gmail.com>

* fixes

* smol fix

* moar fix

* fix

* FIX

* FU-

Co-authored-by: Vallat <vox.crit2013@gmail.com>
  • Loading branch information
2 people authored and Bizzonium committed Sep 27, 2022
1 parent 1d2a7d5 commit b8ad5a9
Show file tree
Hide file tree
Showing 161 changed files with 4,781 additions and 282 deletions.
125 changes: 125 additions & 0 deletions code/__DEFINES/clockwork.dm
Original file line number Diff line number Diff line change
@@ -0,0 +1,125 @@
// Clockwork Raret (Power)
/// REMINDER: The clockwork_power(var) and clockwork_beacons(list) have been moved at _glovalvars/game_modes

//Clockwork Magic
// state for spell
#define NO_SPELL 0
#define A_SPELL 1
#define CASTING_SPELL -1

// Clockslab enchant type
#define STUN_SPELL 1
#define KNOCK_SPELL 2
#define REFORM_SPELL 3
#define TELEPORT_SPELL 4
// Ratvarian spear enchant type
#define CONFUSE_SPELL 1
#define DISABLE_SPELL 2
// Clock hammer
#define CRUSH_SPELL 1
#define KNOCKOFF_SPELL 2
// Clockwork robe
#define WEAK_REFLECT_SPELL 1
#define WEAK_ABSORB_SPELL 2
#define INVIS_SPELL 3
// armour
#define REFLECT_SPELL 1
#define FLASH_SPELL 2
#define ABSORB_SPELL 3
#define ARMOR_SPELL 4
// Clockwork gloves
#define FASTPUNCH_SPELL 1
#define STUNHAND_SPELL 2
#define FIRE_SPELL 3
//Shard
#define EMP_SPELL 1
#define TIME_SPELL 2
#define RECONSTRUCT_SPELL 3

// spell_enchant(name, type_SPELL, cost, time SECONDS(def 3), action needs)
GLOBAL_LIST_INIT(clockslab_spells, list(
new /datum/spell_enchant("Stun", STUN_SPELL, 125, 8),
new /datum/spell_enchant("Force Passage", KNOCK_SPELL, 100),
new /datum/spell_enchant("Terraform", REFORM_SPELL, 40),
new /datum/spell_enchant("Teleportation", TELEPORT_SPELL, 25) // has do_after 5 seconds
))
GLOBAL_LIST_INIT(spear_spells, list(
new /datum/spell_enchant("Confusion", CONFUSE_SPELL, 80),
new /datum/spell_enchant("Electrical touch", DISABLE_SPELL, 80)
))
GLOBAL_LIST_INIT(hammer_spells, list(
new /datum/spell_enchant("Crusher", CRUSH_SPELL, 100),
new /datum/spell_enchant("Knock off", KNOCKOFF_SPELL, 100)
))
GLOBAL_LIST_INIT(armour_spells, list(
new /datum/spell_enchant("Reflection", REFLECT_SPELL, 100, 10),
new /datum/spell_enchant("Flash", FLASH_SPELL, 25, spell_action = TRUE),
new /datum/spell_enchant("Absorb", ABSORB_SPELL, 100, 10),
new /datum/spell_enchant("Harden plates", ARMOR_SPELL, 100, 15, spell_action = TRUE)
))
GLOBAL_LIST_INIT(gloves_spell, list(
new /datum/spell_enchant("Hands of North Star", FASTPUNCH_SPELL, 75, spell_action = TRUE),
new /datum/spell_enchant("Stunning", STUNHAND_SPELL, 75),
new /datum/spell_enchant("Red Flame", FIRE_SPELL, 50, spell_action = TRUE)
))
GLOBAL_LIST_INIT(shard_spells, list(
new /datum/spell_enchant("Electromagnetic Pulse", EMP_SPELL, 500, 20),
new /datum/spell_enchant("Stop the time", TIME_SPELL, 500, 20),
new /datum/spell_enchant("Reconstruction", RECONSTRUCT_SPELL, 500, 20)
))
/// Power per crew for summoning. For example if 45 players on station, the Ratvar will demand 45*number.
#define CLOCK_POWER_PER_CREW 400
#define CLOCK_POWER_GAIN_MAXIMUM 1000
/// Power gains permanent
#define CLOCK_POWER_CONVERT 150
#define CLOCK_POWER_SACRIFICE 300
/// Power gains as time progresses. Goes in process() so it makes x power per second.
#define CLOCK_POWER_BEACON 2
#define CLOCK_POWER_GENERATOR 10
#define CLOCK_POWER_COG 1
#define COG_MAX_SIPHON_THRESHOLD 0.25 //The cog will not siphon power if the APC's cell is at this % of power
// amount of metal per brass
#define CLOCK_METAL_TO_BRASS 10

// Clockwork Status
/// At what population does it switch to highpop values
#define CLOCK_POPULATION_THRESHOLD 100
/// Percent for power to reveal (Lowpop)
#define CLOCK_POWER_REVEAL_LOW 0.5
/// Percent clockers to reveal (Lowpop)
#define CLOCK_CREW_REVEAL_LOW 0.25
/// Percent for power to reveal (Highpop)
#define CLOCK_POWER_REVEAL_HIGH 0.3
/// Percent clockers to reveal (Highpop)
#define CLOCK_CREW_REVEAL_HIGH 0.15

// Text
#define CLOCK_GREETING "<span class='clocklarge'>You catch a glimpse of the Realm of Ratvar, the Clockwork Justiciar. \
You now see how flimsy the world is, you see that it should be open to the knowledge of Ratvar.</span>"

#define CLOCK_CURSES list("A fuel technician just slit his own throat and begged for death.", \
"The shuttle's navigation programming was replaced by a file containing two words, IT COMES.", \
"The shuttle's custodian tore out his guts and began painting strange shapes on the floor.", \
"A shuttle engineer began screaming 'DEATH IS NOT THE END' and ripped out wires until an arc flash seared off her flesh.", \
"A shuttle inspector started laughing madly over the radio and then threw herself into an engine turbine.", \
"The shuttle dispatcher was found dead with bloody symbols carved into their flesh.", \
"Steve repeatedly touched a lightbulb until his hands fell off.")

// Misc
#define CLOCK_COLOR "#ffb700"
#define CLOCK_CLOTHING list(/obj/item/clothing/suit/hooded/clockrobe, /obj/item/clothing/suit/armor/clockwork, /obj/item/clothing/gloves/clockwork, /obj/item/clothing/shoes/clockwork, /obj/item/clothing/head/helmet/clockwork)

// Clockwork objective status
#define RATVAR_IS_ASLEEP 0
#define RATVAR_DEMANDS_POWER 1
#define RATVAR_NEEDS_SUMMONING 2
#define RATVAR_HAS_RISEN 3
#define RATVAR_HAS_FALLEN -1

#define RATVAR_SUMMON_POSSIBILITIES 3

//the time amount the Gateway to the Celestial Derelict gets each process tick;
#define GATEWAY_SUMMON_RATE 1
#define GATEWAY_REEBE_FOUND 60 // First stage
#define GATEWAY_RATVAR_COMING 120 // Second stage
#define GATEWAY_RATVAR_ARRIVAL 180 // Third Stage
1 change: 1 addition & 0 deletions code/__DEFINES/gamemode.dm
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@
#define SPECIAL_ROLE_BORER "Borer"
#define SPECIAL_ROLE_CHANGELING "Changeling"
#define SPECIAL_ROLE_CULTIST "Cultist"
#define SPECIAL_ROLE_CLOCKER "Clockwork cultist"
#define SPECIAL_ROLE_DEATHSQUAD "Death Commando"
#define SPECIAL_ROLE_ERT "Response Team"
#define SPECIAL_ROLE_FREE_GOLEM "Free Golem"
Expand Down
31 changes: 16 additions & 15 deletions code/__DEFINES/hud.dm
Original file line number Diff line number Diff line change
Expand Up @@ -42,21 +42,22 @@
#define DATA_HUD_DIAGNOSTIC_ADVANCED 6
#define DATA_HUD_HYDROPONIC 7
//antag HUD defines
#define ANTAG_HUD_CULT 8
#define ANTAG_HUD_REV 9
#define ANTAG_HUD_OPS 10
#define ANTAG_HUD_WIZ 11
#define ANTAG_HUD_SHADOW 12
#define ANTAG_HUD_TRAITOR 13
#define ANTAG_HUD_NINJA 14
#define ANTAG_HUD_CHANGELING 15
#define ANTAG_HUD_VAMPIRE 16
#define ANTAG_HUD_ABDUCTOR 17
#define DATA_HUD_ABDUCTOR 18
#define ANTAG_HUD_DEVIL 19
#define ANTAG_HUD_EVENTMISC 20
#define ANTAG_HUD_BLOB 21
#define TAIPAN_HUD 22
#define ANTAG_HUD_CULT 8
#define ANTAG_HUD_CLOCK 9
#define ANTAG_HUD_REV 10
#define ANTAG_HUD_OPS 11
#define ANTAG_HUD_WIZ 12
#define ANTAG_HUD_SHADOW 13
#define ANTAG_HUD_TRAITOR 14
#define ANTAG_HUD_NINJA 15
#define ANTAG_HUD_CHANGELING 16
#define ANTAG_HUD_VAMPIRE 17
#define ANTAG_HUD_ABDUCTOR 18
#define DATA_HUD_ABDUCTOR 19
#define ANTAG_HUD_DEVIL 20
#define ANTAG_HUD_EVENTMISC 21
#define ANTAG_HUD_BLOB 22
#define TAIPAN_HUD 23

// Notification action types
#define NOTIFY_JUMP "jump"
Expand Down
1 change: 1 addition & 0 deletions code/__DEFINES/mobs.dm
Original file line number Diff line number Diff line change
Expand Up @@ -227,6 +227,7 @@
#define isAI(A) (istype((A), /mob/living/silicon/ai))
#define isrobot(A) (istype((A), /mob/living/silicon/robot))
#define ispAI(A) (istype((A), /mob/living/silicon/pai))
#define iscogscarab(A) (istype((A), /mob/living/silicon/robot/cogscarab))

// For the tcomms monitor
#define ispathhuman(A) (ispath(A, /mob/living/carbon/human))
Expand Down
2 changes: 2 additions & 0 deletions code/__DEFINES/role_preferences.dm
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
#define ROLE_ALIEN "xenomorph"
#define ROLE_PAI "pAI"
#define ROLE_CULTIST "cultist"
#define ROLE_CLOCKER "clockwork cultist"
#define ROLE_BLOB "blob"
#define ROLE_NINJA "space ninja"
#define ROLE_MONKEY "monkey"
Expand Down Expand Up @@ -54,6 +55,7 @@ GLOBAL_LIST_INIT(special_roles, list(
ROLE_CHANGELING = /datum/game_mode/changeling, // Changeling
ROLE_BORER, // Cortical borer
ROLE_CULTIST = /datum/game_mode/cult, // Cultist
ROLE_CLOCKER = /datum/game_mode/clockwork, // Clockwork Cultist
ROLE_DEVIL = /datum/game_mode/devil/devil_agents, // Devil
ROLE_GSPIDER, // Giant spider
ROLE_GUARDIAN, // Guardian
Expand Down
1 change: 1 addition & 0 deletions code/__DEFINES/rolebans.dm
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ GLOBAL_LIST_INIT(antag_roles, list(
ROLE_REV,
ROLE_ALIEN,
ROLE_CULTIST,
ROLE_CLOCKER,
ROLE_BLOB,
ROLE_NINJA,
ROLE_SHADOWLING,
Expand Down
13 changes: 7 additions & 6 deletions code/__DEFINES/sound.dm
Original file line number Diff line number Diff line change
Expand Up @@ -3,16 +3,17 @@
#define CHANNEL_ADMIN 1023
#define CHANNEL_VOX 1022
#define CHANNEL_JUKEBOX 1021
#define CHANNEL_HEARTBEAT 1020 //sound channel for heartbeats
#define CHANNEL_BUZZ 1019
#define CHANNEL_AMBIENCE 1018
#define CHANNEL_SIBYL_SYSTEM 1017
#define CHANNEL_GENERAL 1016 //Sound channel for playsound(), most of the sounds
#define CHANNEL_JUSTICAR_ARK 1020
#define CHANNEL_HEARTBEAT 1019 //sound channel for heartbeats
#define CHANNEL_BUZZ 1018
#define CHANNEL_AMBIENCE 1017
#define CHANNEL_SIBYL_SYSTEM 1016
#define CHANNEL_GENERAL 1015 //Sound channel for playsound(), most of the sounds

//THIS SHOULD ALWAYS BE THE LOWEST ONE!
//KEEP IT UPDATED

#define CHANNEL_HIGHEST_AVAILABLE 1015
#define CHANNEL_HIGHEST_AVAILABLE 1014

#define MAX_INSTRUMENT_CHANNELS (128 * 6)

Expand Down
21 changes: 21 additions & 0 deletions code/__HELPERS/text.dm
Original file line number Diff line number Diff line change
Expand Up @@ -670,3 +670,24 @@

// return the split html object to the caller
return s


// Returns the rot13'ed text
/proc/rot13(text = "")
var/lentext = length(text)
var/char = ""
var/ascii = 0
. = ""
for(var/i = 1, i <= lentext, i += length(char))
char = text[i]
ascii = text2ascii(char)
switch(ascii)
if(65 to 77, 97 to 109) //A to M, a to m
ascii += 13
if(78 to 90, 110 to 122) //N to Z, n to z
ascii -= 13
if(1072 to 1084, 1040 to 1052)
ascii += 13
if(1085 to 1097, 1053 to 1065)
ascii -= 13
. += ascii2text(ascii)
2 changes: 2 additions & 0 deletions code/__HELPERS/traits.dm
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,8 @@ Remember to update _globalvars/traits.dm if you're adding/removing/renaming trai
// common trait sources
#define ROUNDSTART_TRAIT "roundstart" //cannot be removed without admin intervention
#define CULT_TRAIT "cult"
#define CLOCK_TRAIT "clockwork cult"

// unique trait sources
#define CULT_EYES "cult_eyes"
#define CLOCK_HANDS "clock_hands"
4 changes: 3 additions & 1 deletion code/__HELPERS/unsorted.dm
Original file line number Diff line number Diff line change
Expand Up @@ -289,7 +289,7 @@ Turf and target are seperate in case you want to teleport some distance from a t
var/select = null
var/list/borgs = list()
for(var/mob/living/silicon/robot/A in GLOB.player_list)
if(A.stat == 2 || A.connected_ai || A.scrambledcodes || istype(A,/mob/living/silicon/robot/drone))
if(A.stat == DEAD || A.connected_ai || A.scrambledcodes || istype(A,/mob/living/silicon/robot/drone) || iscogscarab(A) || isclocker(A))
continue
var/name = "[A.real_name] ([A.modtype] [A.braintype])"
borgs[name] = A
Expand All @@ -306,6 +306,8 @@ Turf and target are seperate in case you want to teleport some distance from a t
continue
if(A.control_disabled == 1)
continue
if(isclocker(A)) //the active ais list used for uploads. Avoiding to changing the laws even the AI is fully converted
continue
. += A
return .

Expand Down
5 changes: 5 additions & 0 deletions code/_globalvars/game_modes.dm
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,11 @@ GLOBAL_VAR_INIT(master_mode, "extended") //"extended"
GLOBAL_VAR_INIT(secret_force_mode, "secret") // if this is anything but "secret", the secret rotation will forceably choose this mode

GLOBAL_VAR_INIT(wavesecret, 0) // meteor mode, delays wave progression, terrible name
GLOBAL_VAR_INIT(clockwork_power, 0) // clockwork mode, How many watts of power are globally available to the clockwork cult.
GLOBAL_LIST_EMPTY(clockwork_beacons) // clockwork mode, Beacon list for goal check and placement check. Can't place more than 2 in same area.
GLOBAL_LIST_EMPTY(clockwork_altars) // clockwork mode, List of altars used for teleportation spell


GLOBAL_DATUM(start_state, /datum/station_state) // Used in round-end report. Dont ask why it inits as null

GLOBAL_VAR(custom_event_msg)
Expand Down
106 changes: 106 additions & 0 deletions code/_onclick/cogscarab.dm
Original file line number Diff line number Diff line change
@@ -0,0 +1,106 @@
/*
Cogscarab ClickOn()
Due to cogscarab being a SUBTYPE of cyborgs, i've had to change it's basic mechanics such as manipulating doors and machinaries.
They are clockwork not robot.
*/

/mob/living/silicon/robot/cogscarab/ClickOn(atom/A, params)
if(client.click_intercept)
client.click_intercept.InterceptClickOn(src, params, A)
return

if(next_click > world.time)
return
changeNext_click(1)

if(is_ventcrawling(src)) // To stop drones interacting with anything while ventcrawling
return
if(stat == DEAD)
return

var/list/modifiers = params2list(params)
if(modifiers["shift"] && modifiers["ctrl"])
CtrlShiftClickOn(A)
return
if(modifiers["shift"] && modifiers["alt"])
AltShiftClickOn(A)
return
if(modifiers["middle"] && modifiers["ctrl"])
CtrlMiddleClickOn(A)
return
if(modifiers["middle"])
MiddleClickOn(A)
return
if(modifiers["shift"])
ShiftClickOn(A)
return
if(modifiers["alt"]) // alt and alt-gr (rightalt)
AltClickOn(A)
return
if(modifiers["ctrl"])
CtrlClickOn(A)
return

if(incapacitated())
return

if(next_move >= world.time)
return

face_atom(A) // change direction to face what you clicked on

var/obj/item/W = get_active_hand()

if(!W && A.Adjacent(src))
if(!ismachinery(A))
A.attack_robot(src)
else
A.attack_hand(src)
return

if(W == A)
W.attack_self(src)
return

// cyborgs are prohibited from using storage items so we can I think safely remove (A.loc in contents)
if(A == loc || (A in loc) || (A in contents))
W.melee_attack_chain(src, A, params)
return

if(!isturf(loc))
return

// cyborgs are prohibited from using storage items so we can I think safely remove (A.loc && isturf(A.loc.loc))
if(isturf(A) || isturf(A.loc))
if(A.Adjacent(src)) // see adjacent.dm
W.melee_attack_chain(src, A, params)
return
else
if(W)
W.afterattack(A, src, 0, params)
else
RangedAttack(A, params)
return


/mob/living/silicon/robot/cogscarab/ShiftClickOn(atom/A)
A.ShiftClick(src)
return

/mob/living/silicon/robot/cogscarab/CtrlClickOn(atom/A)
A.CtrlClick(src)
return

/mob/living/silicon/robot/cogscarab/AltClickOn(atom/A)
A.AltClick(src)
return

/mob/living/silicon/robot/cogscarab/CtrlShiftClickOn(atom/A)
return

/mob/living/silicon/robot/cogscarab/AltShiftClickOn(atom/A)
return

/mob/living/silicon/robot/cogscarab/RangedAttack(atom/A, params)
return

0 comments on commit b8ad5a9

Please sign in to comment.