diff --git a/code/WorkInProgress/Chemistry-Reagents.dm b/code/WorkInProgress/Chemistry-Reagents.dm index 4b645a6c123..947ef296a3a 100644 --- a/code/WorkInProgress/Chemistry-Reagents.dm +++ b/code/WorkInProgress/Chemistry-Reagents.dm @@ -411,7 +411,7 @@ datum reagent_state = GAS on_mob_life(var/mob/M) if(!M) M = holder.my_atom - M:bruteloss++ + usr.take_organ_damage(1, 0) ..() return @@ -465,7 +465,7 @@ datum on_mob_life(var/mob/M) if(!M) M = holder.my_atom M:toxloss++ - M:fireloss++ + usr.take_organ_damage(0, 1) ..() return reaction_mob(var/mob/M, var/method=TOUCH, var/volume) @@ -510,7 +510,7 @@ datum on_mob_life(var/mob/M) if(!M) M = holder.my_atom M:toxloss++ - M:fireloss++ + usr.take_organ_damage(0, 1) ..() return reaction_mob(var/mob/M, var/method=TOUCH, var/volume) @@ -843,7 +843,8 @@ datum reagent_state = LIQUID on_mob_life(var/mob/M) if(!M) M = holder.my_atom - if(prob(33)) M.bruteloss++ + if(prob(33)) + usr.take_organ_damage(1, 0) holder.remove_reagent(src.id, 0.3) ..() return @@ -1008,7 +1009,8 @@ datum if(!M) M = holder.my_atom M:radiation = max(M:radiation-3,0) if(M:toxloss) M:toxloss-- - if(prob(15)) M:bruteloss++ + if(prob(15)) + usr.take_organ_damage(1, 0) ..() return @@ -1287,7 +1289,8 @@ datum on_mob_life(var/mob/M) if(!M) M = holder.my_atom M:bodytemperature += 5 - if(prob(40)) M:fireloss++ + if(prob(40)) + usr.take_organ_damage(0, 1) ..() return @@ -1300,7 +1303,8 @@ datum on_mob_life(var/mob/M) if(!M) M = holder.my_atom M:bodytemperature -= 5 - if(prob(40)) M:fireloss++ + if(prob(40)) + usr.take_organ_damage(0, 1) ..() return diff --git a/code/datums/spells/disintegrate.dm b/code/datums/spells/disintegrate.dm index 0ca8805f785..b30cb7e1673 100644 --- a/code/datums/spells/disintegrate.dm +++ b/code/datums/spells/disintegrate.dm @@ -37,6 +37,15 @@ if("gib") M.gib() if("kill") + if (damage_amount>0) + M.take_overall_damage(abs(damage_amount),abs(damage_amount)) + M.toxloss+=abs(damage_amount) + M.oxyloss+=abs(damage_amount) + else + M.heal_overall_damage(abs(damage_amount),abs(damage_amount)) + M.toxloss+=abs(damage_amount) + M.oxyloss+=abs(damage_amount) +/* for(var/i=0,i0) M.fireloss++ else - M.fireloss-- \ No newline at end of file + M.fireloss-- +*/ \ No newline at end of file diff --git a/code/defines/mob/mob.dm b/code/defines/mob/mob.dm index da28cdd6c82..628ee6de95c 100644 --- a/code/defines/mob/mob.dm +++ b/code/defines/mob/mob.dm @@ -107,6 +107,7 @@ var/r_ch_cou = 0 var/r_Tourette = 0 var/cloneloss = 0 + var/seer = 0 //for cult var/miming = null //checks if the guy is a mime var/silent = null //Can't talk. Value goes down every life proc. diff --git a/code/game/gamemodes/changeling/changeling_powers.dm b/code/game/gamemodes/changeling/changeling_powers.dm index 3850ba5bae2..ea93fc49229 100644 --- a/code/game/gamemodes/changeling/changeling_powers.dm +++ b/code/game/gamemodes/changeling/changeling_powers.dm @@ -337,25 +337,17 @@ spawn(550) if (usr.stat != 2) - if(istype(usr, /mob/living/carbon/human)) - var/mob/living/carbon/human/H = usr - for(var/A in H.organs) - var/datum/organ/external/affecting = null - if(!H.organs[A]) continue - affecting = H.organs[A] - if(!istype(affecting, /datum/organ/external)) continue - affecting.heal_damage(1000, 1000) //fixes getting hit after ingestion, killing you when game updates organ health - H.UpdateDamageIcon() - usr.fireloss = 0 + //usr.fireloss = 0 usr.toxloss = 0 - usr.bruteloss = 0 + //usr.bruteloss = 0 usr.oxyloss = 0 usr.paralysis = 0 usr.stunned = 0 usr.weakened = 0 usr.radiation = 0 - usr.health = 100 - usr.updatehealth() + //usr.health = 100 + //usr.updatehealth() + usr.heal_overall_damage(1000, 1000) usr.reagents.clear_reagents() usr.lying = 0 usr.canmove = 1 diff --git a/code/game/gamemodes/cult/cult.dm b/code/game/gamemodes/cult/cult.dm index 01d801d55ff..e64f4b9230e 100644 --- a/code/game/gamemodes/cult/cult.dm +++ b/code/game/gamemodes/cult/cult.dm @@ -1,9 +1,16 @@ + + +/datum/game_mode + var/list/datum/mind/cult = list() + +/proc/iscultist(mob/M as mob) + return M.mind && ticker && ticker.mode && (M.mind in ticker.mode.cult) + /datum/game_mode/cult name = "cult" config_tag = "cult" var/datum/mind/sacrifice_target = null - var/list/datum/mind/cult = list() var/finished = 0 var/const/waittime_l = 600 //lower bound on time before intercept arrives (in tenths of seconds) var/const/waittime_h = 1800 //upper bound on time before intercept arrives (in tenths of seconds) @@ -105,7 +112,6 @@ else cult_mob << "You have a talisman in your backpack, one that will help you start the cult on this station. Use it well and remember - there are others." grant_runeword(cult_mob) - cultists.Add(cult_mob) /datum/game_mode/cult/proc/grant_runeword(mob/living/carbon/human/cult_mob) if(!wordtravel) @@ -175,6 +181,8 @@ world << sound('intercept.ogg') /datum/game_mode/cult/proc/add_cultist(datum/mind/cult_mind) + if (!cult_mind) + return var/list/uncons = get_unconvertables() if(!(cult_mind in cult) && !(cult_mind in uncons)) cult += cult_mind @@ -200,7 +208,7 @@ cult_mind.current << "\red You have been brainwashed! You are no longer a cultist!" cult_mind.memory = "" update_cult_icons_removed(cult_mind) - for(var/mob/living/M in view(cult_mind.current)) + for(var/mob/living/M in viewers(cult_mind.current)) M << "[cult_mind.current] looks like they just reverted to their old faith!" /datum/game_mode/cult/proc/update_all_cult_icons() diff --git a/code/game/gamemodes/objective.dm b/code/game/gamemodes/objective.dm index 587089ac7fc..cc620deff1d 100644 --- a/code/game/gamemodes/objective.dm +++ b/code/game/gamemodes/objective.dm @@ -234,8 +234,8 @@ datum var/area/shuttle/escape/centcom/C = /area/shuttle/escape/centcom for(var/turf/T in get_area_turfs(C.type)) - for(var/mob/living/carbon/human/H in T) - if(cultists.Find(H)) + for(var/mob/living/carbon/H in T) + if(iscultist(H)) cultists_escaped++ if(cultists_escaped>=5) diff --git a/code/game/magic/cultist/ritual.dm b/code/game/magic/cultist/ritual.dm index 6faaa42e0ec..ff4617a14b8 100644 --- a/code/game/magic/cultist/ritual.dm +++ b/code/game/magic/cultist/ritual.dm @@ -1,4 +1,4 @@ -var/list/cultists = list() + var/wordtravel = null var/wordself = null var/wordsee = null @@ -91,13 +91,13 @@ var/runedec = 0 // self other technology - Communication rune //was other hear blood examine() - if(!cultists.Find(usr)) + if(!iscultist(usr)) usr << "A strange collection of symbols drawn in blood." else usr << "A spell circle drawn in blood. It reads: [word1] [word2] [word3]." attackby(I as obj, user as mob) - if(istype(I, /obj/item/weapon/tome) && cultists.Find(user)) + if(istype(I, /obj/item/weapon/tome) && iscultist(user)) user << "You retrace your steps, carefully undoing the lines of the rune." del(src) return @@ -109,7 +109,7 @@ var/runedec = 0 return attack_hand(mob/user as mob) - if(!cultists.Find(user)) + if(!iscultist(user)) user << "You can't mouth the arcane scratchings without fumbling over them." return if(istype(user.wear_mask, /obj/item/clothing/mask/muzzle) || user.ear_deaf) @@ -362,11 +362,11 @@ var/runedec = 0 attack(mob/M as mob, mob/user as mob) - if(!cultists.Find(user)) + if(!iscultist(user)) return ..() - if(cultists.Find(M)) + if(iscultist(M)) return - M.fireloss += rand(5,20) //really lucky - 5 hits for a crit + M.take_organ_damage(0,rand(5,20)) //really lucky - 5 hits for a crit for(var/mob/O in viewers(M, null)) O.show_message(text("\red [] beats [] with the arcane tome!", user, M), 1) M << "\red You feel searing heat inside!" @@ -376,17 +376,17 @@ var/runedec = 0 attack_self(mob/user as mob) if(!wordtravel) runerandom() - if(cultists.Find(user)) + if(iscultist(user)) var/C = 0 for(var/obj/rune/N in world) C++ if (!istype(user.loc,/turf)) user << "\red You do not have enough space to write a proper rune." return - if (C>=26+runedec) //including the useless rune at the secret room, shouldn't count against the limit of 25 runes - Urist + if (C>=26+runedec+ticker.mode.cult.len) //including the useless rune at the secret room, shouldn't count against the limit of 25 runes - Urist switch(alert("The cloth of reality can't take that much of a strain. By creating another rune, you risk locally tearing reality apart, which would prove fatal to you. Do you still wish to scribe the rune?",,"Yes","No")) if("Yes") - if(prob(C*5-105-runedec*5)) //including the useless rune at the secret room, shouldn't count against the limit - Urist + if(prob(C*5-105-(runedec-ticker.mode.cult.len)*5)) //including the useless rune at the secret room, shouldn't count against the limit - Urist usr.emote("scream") user << "\red A tear momentarily appears in reality. Before it closes, you catch a glimpse of that which lies beyond. That proves to be too much for your mind." usr.gib(1) @@ -431,7 +431,7 @@ var/runedec = 0 examine() set src in usr - if(!cultists.Find(usr)) + if(!iscultist(usr)) usr << "An old, dusty tome with frayed edges and a sinister looking cover." else usr << "The scriptures of Nar-Sie, The One Who Sees, The Geometer of Blood. Contains the details of every ritual his followers could think of. Most of these are useless, though." @@ -440,7 +440,7 @@ var/runedec = 0 w_class = 2.0 var/cultistsonly = 1 attack_self(mob/user as mob) - if(src.cultistsonly && !cultists.Find(usr)) + if(src.cultistsonly && !iscultist(usr)) return if(!wordtravel) runerandom() @@ -624,12 +624,12 @@ var/runedec = 0 var/uses = 0 attack_self(mob/user as mob) - usr.bruteloss+=5 + usr.take_organ_damage(5, 0) switch(imbue) if("newtome") call(/obj/rune/proc/tomesummon)() if("emp") - call(/obj/rune/proc/emp)(usr.loc,5) + call(/obj/rune/proc/emp)(usr.loc,3) if("conceal") call(/obj/rune/proc/obscure)(2) if("revealrunes") @@ -650,4 +650,4 @@ var/runedec = 0 /obj/item/weapon/paper/talisman/supply imbue = "supply" - uses = 3 \ No newline at end of file + uses = 3 diff --git a/code/game/magic/cultist/rune1.dm b/code/game/magic/cultist/rune1.dm deleted file mode 100644 index 8d5eec16841..00000000000 --- a/code/game/magic/cultist/rune1.dm +++ /dev/null @@ -1,26 +0,0 @@ -/obj/rune/proc/teleport(var/key) - var/allrunesloc[] - allrunesloc = new/list() - var/index = 0 -// var/tempnum = 0 - for(var/obj/rune/R in world) - if(R == src) - continue - if(R.word1 == wordtravel && R.word2 == wordself && R.word3 == key) - index++ - allrunesloc.len = index - allrunesloc[index] = R.loc - if(allrunesloc && index != 0) - if(istype(src,/obj/rune)) - usr.say("Sas'so c'arta forbici!") - else - usr.whisper("Sas'so c'arta forbici!") - for (var/mob/V in viewers(src)) - V.show_message("\red [usr] disappears in a flash of red light!", 3, "\red You hear a sickening crunch and sloshing of viscera.", 2) - usr.loc = allrunesloc[rand(1,index)] - return - if(istype(src,/obj/rune)) - return fizzle() //Use friggin manuals, Dorf, your list was of zero length. - else - call(/obj/rune/proc/fizzle)() - return \ No newline at end of file diff --git a/code/game/magic/cultist/rune10.dm b/code/game/magic/cultist/rune10.dm deleted file mode 100644 index 28148cc9ee1..00000000000 --- a/code/game/magic/cultist/rune10.dm +++ /dev/null @@ -1,16 +0,0 @@ -/obj/rune/proc/ajourney() //some bits copypastaed from admin tools - Urist - if(usr.loc==src.loc) - var/mob/living/carbon/human/L = usr - usr.say("Fwe'sh mah erl nyag r'ya!") - usr.ghostize() - usr << "\red The shadow that is your spirit separates itself from your body. You are now in the realm beyond. While this it's a great sight, being here strains your mind and body. Hurry." - for (var/mob/V in viewers(src)) - V.show_message("\red [usr]'s eyes glow blue as \he freezes in place, absolutely motionless.", 3, "\red You hear only complete silence for a moment.", 2) - for(L.ajourn=1,L.ajourn) - sleep(10) - if(L.key) - L.ajourn=0 - return - else - L.bruteloss++ - return fizzle() \ No newline at end of file diff --git a/code/game/magic/cultist/rune11.dm b/code/game/magic/cultist/rune11.dm deleted file mode 100644 index 395617c86dd..00000000000 --- a/code/game/magic/cultist/rune11.dm +++ /dev/null @@ -1,26 +0,0 @@ -/obj/rune/proc/manifest() - if(usr.loc==src.loc) - for(var/mob/dead/observer/O in src.loc) - usr.say("Gal'h'rfikk harfrandid mud'gib!") - var/mob/living/carbon/human/dummy/D = new /mob/living/carbon/human/dummy(src.loc) - for (var/mob/V in viewers(D)) - V.show_message("\red A shape forms in the center of the rune. A shape of... a man.", 3, "", 2) - D.real_name = "Unknown" - for(var/obj/item/weapon/paper/P in src.loc) - if(length(P.info)<=24) - D.real_name = P.info - D.universal_speak = 1 - D.nodamage = 0 - D.key = O.key - del(O) - for(,usr.loc==src.loc) - sleep(30) - if(usr.health>-100) - usr.bruteloss++ - else - break - D.gib(1) - for (var/mob/V in viewers(D)) - V.show_message("\red [D] explodes in a pile of gore.", 3, "\red \b SPLORCH", 2) - return - return fizzle() \ No newline at end of file diff --git a/code/game/magic/cultist/rune12.dm b/code/game/magic/cultist/rune12.dm deleted file mode 100644 index 93413408370..00000000000 --- a/code/game/magic/cultist/rune12.dm +++ /dev/null @@ -1,76 +0,0 @@ -/obj/rune/proc/talisman()//only hide, emp, teleport and tome runes can be imbued atm - for(var/obj/rune/R in orange(1,src)) - if(R==src) - continue - if(R.word1==wordtravel && R.word2==wordself) - for(var/obj/item/weapon/paper/P in src.loc) - if(P.info) - usr << "\red The blank is tainted. It is unsuitable." - return - del(P) - var/obj/item/weapon/paper/talisman/T = new /obj/item/weapon/paper/talisman(src.loc) - T.imbue = "[R.word3]" - T.info = "[R.word3]" - for (var/mob/V in viewers(src)) - V.show_message("\red The runes turn into dust, which then forms into an arcane image on the paper.", 3) - del(R) - del(src) - usr.say("H'drak v'loso, mir'kanas verbot!") - return - if(R.word1==wordsee && R.word2==wordblood && R.word3==wordhell) - for(var/obj/item/weapon/paper/P in src.loc) - if(P.info) - usr << "\red The blank is tainted. It is unsuitable." - return - del(P) - var/obj/item/weapon/paper/talisman/T = new /obj/item/weapon/paper/talisman(src.loc) - T.imbue = "newtome" - for (var/mob/V in viewers(src)) - V.show_message("\red The runes turn into dust, which then forms into an arcane image on the paper.", 3) - del(R) - del(src) - usr.say("H'drak v'loso, mir'kanas verbot!") - return - if(R.word1==worddestr && R.word2==wordsee && R.word3==wordtech) - for(var/obj/item/weapon/paper/P in src.loc) - if(P.info) - usr << "\red The blank is tainted. It is unsuitable." - return - del(P) - var/obj/item/weapon/paper/talisman/T = new /obj/item/weapon/paper/talisman(src.loc) - T.imbue = "emp" - for (var/mob/V in viewers(src)) - V.show_message("\red The runes turn into dust, which then forms into an arcane image on the paper.", 3) - del(R) - del(src) - usr.say("H'drak v'loso, mir'kanas verbot!") - return - if(R.word1==wordblood && R.word2==wordsee && R.word3==worddestr) - for(var/obj/item/weapon/paper/P in src.loc) - if(P.info) - usr << "\red The blank is tainted. It is unsuitable." - return - del(P) - var/obj/item/weapon/paper/talisman/T = new /obj/item/weapon/paper/talisman(src.loc) - T.imbue = "conceal" - for (var/mob/V in viewers(src)) - V.show_message("\red The runes turn into dust, which then forms into an arcane image on the paper.", 3) - del(R) - del(src) - usr.say("H'drak v'loso, mir'kanas verbot!") - return - if(R.word1==worddestr && R.word2==wordsee && R.word3==wordblood) - for(var/obj/item/weapon/paper/P in src.loc) - if(P.info) - usr << "\red The blank is tainted. It is unsuitable." - return - del(P) - var/obj/item/weapon/paper/talisman/T = new /obj/item/weapon/paper/talisman(src.loc) - T.imbue = "revealrunes" - for (var/mob/V in viewers(src)) - V.show_message("\red The runes turn into dust, which then forms into an arcane image on the paper.", 3) - del(R) - del(src) - usr.say("H'drak v'loso, mir'kanas verbot!") - return - return fizzle() \ No newline at end of file diff --git a/code/game/magic/cultist/rune13.dm b/code/game/magic/cultist/rune13.dm deleted file mode 100644 index 049b7206ad8..00000000000 --- a/code/game/magic/cultist/rune13.dm +++ /dev/null @@ -1,10 +0,0 @@ -/obj/rune/proc/mend() - usr.say("Uhrast ka'hfa heldsagen ver'lot!") - usr.bruteloss+=200 - runedec+=5 - for (var/mob/V in viewers(usr)) - V.show_message("\red [usr] keels over dead, his blood glowing blue as it escapes his body and dissipates into thin air.", 3, "", 2) - for(,usr.health<-100) - sleep(600) - runedec=0 - return \ No newline at end of file diff --git a/code/game/magic/cultist/rune14.dm b/code/game/magic/cultist/rune14.dm deleted file mode 100644 index cb5595c6d71..00000000000 --- a/code/game/magic/cultist/rune14.dm +++ /dev/null @@ -1,15 +0,0 @@ -/obj/rune/proc/communicate() - if(istype(src,/obj/rune)) - usr.say("O bidai nabora se'sma!") - else - usr.whisper("O bidai nabora se'sma!") - var/input = input(usr, "Please choose a message to tell to the other acolytes.", "hssss", "") - if(!input) - return fizzle() - if(istype(src,/obj/rune)) - usr.say("[input]") - else - usr.whisper("[input]") - for(var/mob/living/carbon/human/H in cultists) - H << "\red \b [input]" - return \ No newline at end of file diff --git a/code/game/magic/cultist/rune15.dm b/code/game/magic/cultist/rune15.dm deleted file mode 100644 index aa8fb636d61..00000000000 --- a/code/game/magic/cultist/rune15.dm +++ /dev/null @@ -1,18 +0,0 @@ -var/list/sacrificed = list() - -/obj/rune/proc/sacrifice() - var/culcount = 0 - for(var/mob/living/carbon/human/C in orange(1,src)) - if(cultists.Find(C)) - culcount++ - if(culcount>=3) - for(var/mob/living/carbon/human/S in src.loc) - if(ticker.mode.name == "cult") - if(S == ticker.mode:sacrifice_target.current)//Iunno, check if it's a target - sacrificed += S.mind - S.gib(1) - usr << "\red The Geometer of Blood accepts this sacrifice." - else - usr << "\red The Geometer of Blood does not accept this sacrifice." - return - return fizzle() \ No newline at end of file diff --git a/code/game/magic/cultist/rune16.dm b/code/game/magic/cultist/rune16.dm deleted file mode 100644 index 7b67da3d8c7..00000000000 --- a/code/game/magic/cultist/rune16.dm +++ /dev/null @@ -1,41 +0,0 @@ -/obj/rune/proc/revealrunes(var/obj/W as obj) - var/go=0 - var/rad - var/S=0 - if(istype(W,/obj/rune)) - rad = 6 - go = 1 - if (istype(W,/obj/item/weapon/paper/talisman)) - rad = 4 - go = 1 - if (istype(W,/obj/item/weapon/storage/bible)) - rad = 1 - go = 1 - if(go) - for(var/obj/rune/R in orange(rad,src)) - if(R!=src) - R.visibility=15 - S=1 - if(S) - if(istype(W,/obj/item/weapon/storage/bible)) - usr << "\red Arcane markings suddenly glow from underneath a thin layer of dust!" - return - if(istype(W,/obj/rune)) - usr.say("Nikt'o barada kla'atu!") - for (var/mob/V in viewers(src)) - V.show_message("\red The rune turns into red dust, reveaing the surrounding runes.", 3) - del(src) - return - if(istype(W,/obj/item/weapon/paper/talisman)) - usr.whisper("Nikt'o barada kla'atu!") - usr << "\red Your talisman turns into red dust, revealing the surrounding runes." - for (var/mob/V in orange(1,usr.loc)) - if(V!=usr) - V.show_message("\red Red dust emanates from [usr]'s hands for a moment.", 3) - return - return - if(istype(W,/obj/rune)) - return fizzle() - if(istype(W,/obj/item/weapon/paper/talisman)) - call(/obj/rune/proc/fizzle)() - return \ No newline at end of file diff --git a/code/game/magic/cultist/rune2.dm b/code/game/magic/cultist/rune2.dm deleted file mode 100644 index b7a680d87c8..00000000000 --- a/code/game/magic/cultist/rune2.dm +++ /dev/null @@ -1,13 +0,0 @@ -/obj/rune/proc/tomesummon() - if(istype(src,/obj/rune)) - usr.say("N'ath reth sh'yro eth d'raggathnor!") - else - usr.whisper("N'ath reth sh'yro eth d'raggathnor!") - for (var/mob/V in viewers(src)) - V.show_message("\red There's a flash of red light. The rune disappears, and in its place a book lies", 3, "\red You hear a pop and smell ozone.", 2) - if(istype(src,/obj/rune)) - new /obj/item/weapon/tome(src.loc) - else - new /obj/item/weapon/tome(usr.loc) - del(src) - return \ No newline at end of file diff --git a/code/game/magic/cultist/rune3.dm b/code/game/magic/cultist/rune3.dm deleted file mode 100644 index 31b7eb6a78e..00000000000 --- a/code/game/magic/cultist/rune3.dm +++ /dev/null @@ -1,21 +0,0 @@ -/obj/rune/proc/convert() - for(var/mob/living/carbon/human/M in src.loc) - if(cultists.Find(M)) - return fizzle() - if(M.stat==2) - return fizzle() - if(ticker.mode.name == "cult") - var/list/uncons = call(/datum/game_mode/cult/proc/get_unconvertables)() - if(M.mind in uncons) - return fizzle() - ticker.mode:add_cultist(M.mind) - usr.say("Mah'weyh pleggh at e'ntrath!") - for (var/mob/V in viewers(src)) - V.show_message("\red [M] writhes in pain as the markings below him glow a bloody red.", 3, "\red You hear an anguished scream.", 2) - M << "Your blood pulses. Your head throbs. The world goes red. All at once you are aware of a horrible, horrible truth. The veil of reality has been ripped away and in the festering wound left behind something sinister takes root." - M << "Assist your new compatriots in their dark dealings. Their goal is yours, and yours is theirs. You serve the Dark One above all else. Bring It back." - if (ticker.mode.name == "cult") - ticker.mode:grant_runeword(M) - cultists.Add(M) - return - return fizzle() \ No newline at end of file diff --git a/code/game/magic/cultist/rune4.dm b/code/game/magic/cultist/rune4.dm deleted file mode 100644 index 0a5d90bd263..00000000000 --- a/code/game/magic/cultist/rune4.dm +++ /dev/null @@ -1,18 +0,0 @@ -/obj/rune/proc/tearreality() - var/cultist_count = 0 - for(var/mob/M in range(1,src)) - if(cultists.Find(M)) - M.say("Tok-lyr rqa'nap g'lt-ulotf!") - cultist_count += 1 - if(cultist_count >= 9) - var/obj/machinery/the_singularity/S = new /obj/machinery/the_singularity/(src.loc) - S.icon = 'magic_terror.dmi' - S.name = "Tear in the Fabric of Reality" - S.desc = "Your mind begins to bubble and ooze as it tries to comprehend what it sees." - S.pixel_x = -89 - S.pixel_y = -85 - if(ticker.mode.name == "cult") - ticker.mode:eldergod = 0 - return - else - return fizzle() \ No newline at end of file diff --git a/code/game/magic/cultist/rune5.dm b/code/game/magic/cultist/rune5.dm deleted file mode 100644 index cb0a792baf9..00000000000 --- a/code/game/magic/cultist/rune5.dm +++ /dev/null @@ -1,188 +0,0 @@ -/obj/rune/proc/emp(var/U,var/range_red) //range_red - var which determines by which number to reduce the default emp range, U is the source loc, needed because of talisman emps which are held in hand at the moment of using and that apparently messes things up -- Urist - if(istype(src,/obj/rune)) - usr.say("Ta'gh fara'qha fel d'amar det!") - else - usr.whisper("Ta'gh fara'qha fel d'amar det!") - playsound(U, 'Welder2.ogg', 25, 1) - var/turf/T = get_turf(U) - if(T) - T.hotspot_expose(700,125) - - var/rune = src // detaching the proc - in theory - src = null - - var/obj/overlay/pulse = new/obj/overlay ( T ) - pulse.icon = 'effects.dmi' - pulse.icon_state = "emppulse" - pulse.name = "emp pulse" - pulse.anchored = 1 - spawn(20) - del(pulse) - - for(var/obj/item/weapon/W in range(world.view-range_red, T)) - - if (istype(W, /obj/item/assembly/m_i_ptank) || istype(W, /obj/item/assembly/r_i_ptank) || istype(W, /obj/item/assembly/t_i_ptank)) - - var/fuckthis - if(istype(W:part1,/obj/item/weapon/tank/plasma)) - fuckthis = W:part1 - fuckthis:ignite() - if(istype(W:part2,/obj/item/weapon/tank/plasma)) - fuckthis = W:part2 - fuckthis:ignite() - if(istype(W:part3,/obj/item/weapon/tank/plasma)) - fuckthis = W:part3 - fuckthis:ignite() - - - for(var/mob/living/M in viewers(world.view-range_red, T)) - - if(!istype(M, /mob/living)) continue - - if (istype(M, /mob/living/silicon)) - M.fireloss += 25 - flick("noise", M:flash) - M << "\red *BZZZT*" - M << "\red Warning: Electromagnetic pulse detected." - if(istype(M, /mob/living/silicon/ai)) - if (prob(30)) - switch(pick(1,2,3)) //Add Random laws. - if(1) - M:cancel_camera() - if(2) - M:lockdown() - if(3) - M:ai_call_shuttle() - continue - - - M << "\red Your equipment malfunctions." //Yeah, i realise that this WILL - //show if theyre not carrying anything - //that is affected. lazy. - if (locate(/obj/item/weapon/cloaking_device, M)) - for(var/obj/item/weapon/cloaking_device/S in M) - S.active = 0 - S.icon_state = "shield0" - - if (locate(/obj/item/weapon/gun/energy, M)) - for(var/obj/item/weapon/gun/energy/G in M) - G.charges = 0 - G.update_icon() - - if ((istype(M, /mob/living/carbon/human)) && (istype(M:glasses, /obj/item/clothing/glasses/thermal))) - M << "\red Your thermals malfunction." - M.eye_blind = 3 - M.eye_blurry = 5 - M.disabilities |= 1 - spawn(100) - M.disabilities &= ~1 - - if (locate(/obj/item/device/radio, M)) - for(var/obj/item/device/radio/R in M) //Add something for the intercoms. - R.broadcasting = 0 - R.listening = 0 - - if (locate(/obj/item/device/flash, M)) - for(var/obj/item/device/flash/F in M) //Add something for the intercoms. - F.attack_self() - - if (locate(/obj/item/weapon/baton, M)) - for(var/obj/item/weapon/baton/B in M) //Add something for the intercoms. - B.charges = 0 - - if(locate(/obj/item/clothing/under/chameleon, M)) - for(var/obj/item/clothing/under/chameleon/C in M) //Add something for the intercoms. - M << "\red Your jumpsuit malfunctions" - C.name = "psychedelic" - C.desc = "Groovy!" - C.icon_state = "psyche" - C.color = "psyche" - spawn(200) - C.name = "Black Jumpsuit" - C.icon_state = "bl_suit" - C.color = "black" - C.desc = null - - M << "\red BZZZT" - - - for(var/obj/machinery/A in range(world.view-range_red, T)) - A.use_power(7500) - - var/obj/overlay/pulse2 = new/obj/overlay ( A.loc ) - pulse2.icon = 'effects.dmi' - pulse2.icon_state = "empdisable" - pulse2.name = "emp sparks" - pulse2.anchored = 1 - pulse2.dir = pick(cardinal) - - spawn(10) - del(pulse2) - - if(istype(A, /obj/machinery/turret)) - A:enabled = 0 - A:lasers = 0 - A:power_change() - - if(istype(A, /obj/machinery/computer) && prob(20)) - A:set_broken() - - if(istype(A, /obj/machinery/firealarm) && prob(50)) - A:alarm() - - if(istype(A, /obj/machinery/power/smes)) - A:online = 0 - A:charging = 0 - A:output = 0 - A:charge -= 1e6 - if (A:charge < 0) - A:charge = 0 - spawn(100) - A:output = initial(A:output) - A:charging = initial(A:charging) - A:online = initial(A:online) - - if(istype(A, /obj/machinery/door)) - if(prob(20) && (istype(A,/obj/machinery/door/airlock) || istype(A,/obj/machinery/door/window)) ) - A:open() - if(prob(40)) - if(A:secondsElectrified != 0) continue - A:secondsElectrified = -1 - spawn(300) - A:secondsElectrified = 0 - - if(istype(A, /obj/machinery/power/apc)) - if(A:cell) - A:cell:charge -= 1000 - if (A:cell:charge < 0) - A:cell:charge = 0 - A:lighting = 0 - A:equipment = 0 - A:environ = 0 - spawn(600) - A:equipment = 3 - A:environ = 3 - - if(istype(A, /obj/machinery/camera)) - A.icon_state = "cameraemp" - A:network = null //Not the best way but it will do. I think. - spawn(900) - A:network = initial(A:network) - A:icon_state = initial(A:icon_state) - for(var/mob/living/silicon/ai/O in world) - if (O.current == A) - O.cancel_camera() - O << "Your connection to the camera has been lost." - for(var/mob/O in world) - if (istype(O.machine, /obj/machinery/computer/security)) - var/obj/machinery/computer/security/S = O.machine - if (S.current == A) - O.machine = null - S.current = null - O.reset_view(null) - O << "The screen bursts into static." - - if(istype(A, /obj/machinery/clonepod)) - A:malfunction() - del(rune) - return \ No newline at end of file diff --git a/code/game/magic/cultist/rune6.dm b/code/game/magic/cultist/rune6.dm deleted file mode 100644 index 5a3c90e258c..00000000000 --- a/code/game/magic/cultist/rune6.dm +++ /dev/null @@ -1,27 +0,0 @@ -/obj/rune/proc/drain() - var/drain = 0 - for(var/obj/rune/R in world) - if(R.word1==wordtravel && R.word2==wordblood && R.word3==wordself) - for(var/mob/living/carbon/D in R.loc) - if(D.health>=-100) - var/bdrain = rand(1,25) - D << "\red You feel weakened." - D.bruteloss += bdrain - drain += bdrain - if(!drain) - return fizzle() - usr.say ("Yu'gular faras desdae. Havas mithum javara. Umathar uf'kal thenar!") - usr << "\red The blood starts flowing from the rune and into your frail mortal body. You feel... empowered." - for (var/mob/V in viewers(src)) - if(V!=usr) - V.show_message("\red Blood flows from the rune into [usr]!", 3, "\red You hear a liquid flowing.", 2) - if(usr.bhunger) - usr.bhunger -= 2*drain - if(drain>=50) - usr << "\red ...but it wasn't nearly enough. You crave, crave for more. The hunger consumes you from within." - usr.bhunger += drain - for (,usr.bhunger,usr.bhunger--) - sleep(50) - usr.bruteloss += 3 - usr.bruteloss -= drain - return diff --git a/code/game/magic/cultist/rune7.dm b/code/game/magic/cultist/rune7.dm deleted file mode 100644 index c5e248e1d0b..00000000000 --- a/code/game/magic/cultist/rune7.dm +++ /dev/null @@ -1,10 +0,0 @@ -/obj/rune/proc/seer() - if(usr.loc==src.loc) - usr.say("Rash'tla sektath mal'zua. Zasan therium vivira. Itonis al'ra matum!") - if(usr.see_invisible!=0 && usr.see_invisible!=15) - usr << "\red The world beyond flashes your eyes but disappears quickly, as if something is disrupting your vision." - else - usr << "\red The world beyond opens to your eyes." - usr.see_invisible = 15 - return - return fizzle() \ No newline at end of file diff --git a/code/game/magic/cultist/rune8.dm b/code/game/magic/cultist/rune8.dm deleted file mode 100644 index 7239613616e..00000000000 --- a/code/game/magic/cultist/rune8.dm +++ /dev/null @@ -1,49 +0,0 @@ -/obj/rune/proc/raise() - for(var/mob/living/carbon/human/M in src.loc) - if(M.health<=-100) - for(var/obj/rune/R in world) - if(R.word1==wordblood && R.word2==wordjoin && R.word3==wordhell) - for(var/mob/living/carbon/human/N in R.loc) - if(N.health>-100 && N.client) - for(var/mob/dead/observer/O in src.loc) - if(M.key) - usr << "\red The body still has some earthly ties. It must sever them, if only for them to grow again later." - return - if(!O.key) - continue - M.key=O.key - del(O) - - if(istype(M, /mob/living/carbon/human)) - var/mob/living/carbon/human/H = M - for(var/A in H.organs) - var/datum/organ/external/affecting = null - if(!H.organs[A]) continue - affecting = H.organs[A] - if(!istype(affecting, /datum/organ/external)) continue - affecting.heal_damage(1000, 1000) //fixes getting hit after ingestion, killing you when game updates organ health - H.UpdateDamageIcon() - M.fireloss = 0 - M.toxloss = 0 - M.bruteloss = 0 - M.oxyloss = 0 - M.paralysis = 0 - M.stunned = 0 - M.weakened = 0 - M.radiation = 0 - M.health = 100 - M.updatehealth() - M.buckled = initial(M.buckled) - M.handcuffed = initial(M.handcuffed) - if (M.stat > 1) - M.stat=0 - ..() //shamelessly stolen from rejuvenate code - Urist - - usr.say("Pasnar val'keriam usinar. Savrae ines amutan. Yam'toth remium il'tarat!") - for (var/mob/V in viewers(M)) - V.show_message("\red [M]'s eyes glow with a faint red as \he stands up, slowly starting to breathe again.", 3, "\red You hear a faint, slightly familiar whisper.", 2) - N.gib(1) - for (var/mob/V in viewers(N)) - V.show_message("\red [N] is torn apart, a black smoke swiftly dissipating from \his remains!", 3, "\red You hear a thousand voices, all crying in pain.", 2) - return - return fizzle() diff --git a/code/game/magic/cultist/rune9.dm b/code/game/magic/cultist/rune9.dm deleted file mode 100644 index 70eea718963..00000000000 --- a/code/game/magic/cultist/rune9.dm +++ /dev/null @@ -1,25 +0,0 @@ -/obj/rune/proc/obscure(var/rad) - var/S=0 - for(var/obj/rune/R in orange(rad,src)) - if(R!=src) - R.visibility=0 - S=1 - if(S) - if(istype(src,/obj/rune)) - usr.say("Kla'atu barada nikt'o!") - for (var/mob/V in viewers(src)) - V.show_message("\red The rune turns into gray dust, veiling the surrounding runes.", 3) - del(src) - else - usr.whisper("Kla'atu barada nikt'o!") - usr << "\red Your talisman turns into gray dust, veiling the surrounding runes." - for (var/mob/V in orange(1,src)) - if(V!=usr) - V.show_message("\red Dust emanates from [usr]'s hands for a moment.", 3) - - return - if(istype(src,/obj/rune)) - return fizzle() - else - call(/obj/rune/proc/fizzle)() - return \ No newline at end of file diff --git a/code/game/magic/cultist/runes.dm b/code/game/magic/cultist/runes.dm index ff03108ed56..82300e1591e 100644 --- a/code/game/magic/cultist/runes.dm +++ b/code/game/magic/cultist/runes.dm @@ -17,7 +17,7 @@ var/list/sacrificed = list() allrunesloc[index] = R.loc if(index >= 5) usr << "\red You feel pain, as rune disappears in reality shift caused by too much wear of space-time fabric" - usr.bruteloss += 5 + usr.take_overall_damage(5, 0) del(src) if(allrunesloc && index != 0) if(istype(src,/obj/rune)) @@ -52,10 +52,10 @@ var/list/sacrificed = list() runecount++ if(runecount >= 2) usr << "\red You feel pain, as rune disappears in reality shift caused by too much wear of space-time fabric" - usr.bruteloss += 5 + usr.take_overall_damage(5, 0) del(src) - for(var/mob/living/carbon/human/C in orange(1,src)) - if(cultists.Find(C)) + for(var/mob/living/carbon/C in orange(1,src)) + if(iscultist(C)) culcount++ if(culcount>=3) usr.say("Sas'so c'arta forbici tarem!") @@ -69,7 +69,7 @@ var/list/sacrificed = list() M.loc = IP.loc return - return fizzle() + return fizzle() /////////////////////////////////////////SECOND RUNE @@ -94,15 +94,15 @@ var/list/sacrificed = list() /////////////////////////////////////////THIRD RUNE convert() - for(var/mob/living/carbon/human/M in src.loc) - if(cultists.Find(M)) - return fizzle() + for(var/mob/living/carbon/M in src.loc) + if(iscultist(M)) + continue if(M.stat==2) - return fizzle() - if(ticker.mode.name == "cult") - var/list/uncons = call(/datum/game_mode/cult/proc/get_unconvertables)() + continue + if(ticker && ticker.mode && ticker.mode.name == "cult") + var/list/uncons = ticker.mode:get_unconvertables() if(M.mind in uncons) - return fizzle() + continue ticker.mode:add_cultist(M.mind) usr.say("Mah'weyh pleggh at e'ntrath!") M.visible_message("\red [M] writhes in pain as the markings below him glow a bloody red.", \ @@ -110,7 +110,6 @@ var/list/sacrificed = list() "\red You hear an anguished scream.") M << "Your blood pulses. Your head throbs. The world goes red. All at once you are aware of a horrible, horrible truth. The veil of reality has been ripped away and in the festering wound left behind something sinister takes root." M << "Assist your new compatriots in their dark dealings. Their goal is yours, and yours is theirs. You serve the Dark One above all else. Bring It back." - cultists.Add(M) return return fizzle() @@ -121,7 +120,7 @@ var/list/sacrificed = list() tearreality() var/cultist_count = 0 for(var/mob/M in range(1,src)) - if(cultists.Find(M)) + if(iscultist(M)) M.say("Tok-lyr rqa'nap g'lt-ulotf!") cultist_count += 1 if(cultist_count >= 9) @@ -135,7 +134,7 @@ var/list/sacrificed = list() ticker.mode:eldergod = 0 return else - return + return fizzle() /////////////////////////////////////////FIFTH RUNE @@ -161,10 +160,10 @@ var/list/sacrificed = list() for(var/obj/rune/R in world) if(R.word1==wordtravel && R.word2==wordblood && R.word3==wordself) for(var/mob/living/carbon/D in R.loc) - if(D.health>=-100) + if(D.stat!=2) var/bdrain = rand(1,25) D << "\red You feel weakened." - D.bruteloss += bdrain + D.take_overall_damage(bdrain, 0) drain += bdrain if(!drain) return fizzle() @@ -173,16 +172,23 @@ var/list/sacrificed = list() "\red The blood starts flowing from the rune and into your frail mortal body. You feel... empowered.", \ "\red You hear a liquid flowing.") if(usr.bhunger) - usr.bhunger -= 2*drain + usr.bhunger = max(usr.bhunger-2*drain,0) if(drain>=50) usr.visible_message("\red [usr]'s eyes give off eerie red glow!", \ "\red ...but it wasn't nearly enough. You crave, crave for more. The hunger consumes you from within.", \ "\red You hear a heartbeat.") usr.bhunger += drain - for (,usr.bhunger,usr.bhunger--) - sleep(50) - usr.bruteloss += 3 - usr.bruteloss -= drain + src = usr + spawn() + for (,usr.bhunger>0,usr.bhunger--) + sleep(50) + usr.take_overall_damage(3, 0) + return + usr.heal_organ_damage(drain%5, 0) + drain-=drain%5 + for (,drain>0,drain-=5) + sleep(2) + usr.heal_organ_damage(5, 0) return @@ -200,64 +206,104 @@ var/list/sacrificed = list() else usr << "\red The world beyond opens to your eyes." usr.see_invisible = 15 + usr.seer = 1 return return fizzle() /////////////////////////////////////////EIGHTH RUNE raise() + var/mob/living/carbon/human/corpse_to_raise + var/mob/living/carbon/human/body_to_sacrifice + var/mob/living/carbon/human/ghost + var/unsuitable_corpse_found = 0 + var/corpse_is_target = 0 for(var/mob/living/carbon/human/M in src.loc) - if(M.health<=-100) - for(var/obj/rune/R in world) - if(R.word1==wordblood && R.word2==wordjoin && R.word3==wordhell) - for(var/mob/living/carbon/human/N in R.loc) - if(N.health>-100 && N.client) - for(var/mob/dead/observer/O in src.loc) - if(M.key) - usr << "\red The body still has some earthly ties. It must sever them, if only for them to grow again later." - return - if(!O.key) - continue - M.key=O.key - del(O) + if (M.stat>=2) + if (M.key) + unsuitable_corpse_found = 1 + else if (ticker.mode.name == "cult" && M.mind == ticker.mode:sacrifice_target) + corpse_is_target = 1 + else + corpse_to_raise = M + break + if (!corpse_to_raise) + if (unsuitable_corpse_found) + usr << "\red The body still has some earthly ties. It must sever them, if only for them to grow again later." + if (corpse_is_target) + usr << "\red The Geometer of blood wants this mortal for himself." + return fizzle() + + + var/sacrifice_is_target = 0 + find_sacrifice: + for(var/obj/rune/R in world) + if(R.word1==wordblood && R.word2==wordjoin && R.word3==wordhell) + for(var/mob/living/carbon/human/N in R.loc) + if (ticker.mode.name == "cult" && N.mind && N.mind == ticker.mode:sacrifice_target) + sacrifice_is_target = 1 + else + if(N.stat<2) + body_to_sacrifice = N + break find_sacrifice + + if (!body_to_sacrifice) + if (sacrifice_is_target) + usr << "\red The Geometer of blood wants that corpse for himself." + else + usr << "\red You need a dead corpse as source of energy to put soul in new body." + return fizzle() + + for(var/mob/dead/observer/O in src.loc) + if(!O.client) + continue + ghost = O + + if (!ghost) + usr << "\red You do not feel an ethernal immaterial soul here." + return fizzle() // rejuvenatedheal(M) - - if(istype(M, /mob/living/carbon/human)) - var/mob/living/carbon/human/H = M - for(var/A in H.organs) - var/datum/organ/external/affecting = null - if(!H.organs[A]) continue - affecting = H.organs[A] - if(!istype(affecting, /datum/organ/external)) continue - affecting.heal_damage(1000, 1000) //fixes getting hit after ingestion, killing you when game updates organ health - H.UpdateDamageIcon() - M.fireloss = 0 - M.toxloss = 0 - M.bruteloss = 0 - M.oxyloss = 0 - M.paralysis = 0 - M.stunned = 0 - M.weakened = 0 - M.radiation = 0 - M.health = 100 - M.updatehealth() - M.buckled = initial(M.buckled) - M.handcuffed = initial(M.handcuffed) - if (M.stat > 1) - M.stat=0 + corpse_to_raise.mind = new//Mind initialize stuff. + corpse_to_raise.mind.current = corpse_to_raise + corpse_to_raise.mind.original = corpse_to_raise + corpse_to_raise.mind.key = ghost.key + corpse_to_raise.key = ghost.key + del(ghost) + for(var/A in corpse_to_raise.organs) + var/datum/organ/external/affecting = corpse_to_raise.organs[A] + if(!istype(affecting)) + continue + affecting.heal_damage(1000, 1000) + corpse_to_raise.toxloss = 0 + corpse_to_raise.oxyloss = 0 + corpse_to_raise.paralysis = 0 + corpse_to_raise.stunned = 0 + corpse_to_raise.weakened = 0 + corpse_to_raise.radiation = 0 + corpse_to_raise.buckled = null + if (corpse_to_raise.handcuffed) + del(corpse_to_raise.handcuffed) + corpse_to_raise.stat=0 + corpse_to_raise.updatehealth() + corpse_to_raise.UpdateDamageIcon() - usr.say("Pasnar val'keriam usinar. Savrae ines amutan. Yam'toth remium il'tarat!") - M.visible_message("\red [M]'s eyes glow with a faint red as he stands up, slowly starting to breathe again.", \ - "\red Life... I'm alive again...", \ - "\red You hear a faint, slightly familiar whisper.") - N.gib(1) - N.visible_message("\red [N] is torn apart, a black smoke swiftly dissipating from his remains!", \ - "\red You feel as your blood boils, tearing you apart.", \ - "\red You hear a thousand voices, all crying in pain.") - return - return fizzle() + usr.say("Pasnar val'keriam usinar. Savrae ines amutan. Yam'toth remium il'tarat!") + corpse_to_raise.visible_message("\red [corpse_to_raise]'s eyes glow with a faint red as he stands up, slowly starting to breathe again.", \ + "\red Life... I'm alive again...", \ + "\red You hear a faint, slightly familiar whisper.") + body_to_sacrifice.visible_message("\red [body_to_sacrifice] is torn apart, a black smoke swiftly dissipating from his remains!", \ + "\red You feel as your blood boils, tearing you apart.", \ + "\red You hear a thousand voices, all crying in pain.") + body_to_sacrifice.gib(1) + if (ticker.mode.name == "cult") + ticker.mode:add_cultist(body_to_sacrifice.mind) + else + ticker.mode.cult+=body_to_sacrifice.mind + corpse_to_raise << "Your blood pulses. Your head throbs. The world goes red. All at once you are aware of a horrible, horrible truth. The veil of reality has been ripped away and in the festering wound left behind something sinister takes root." + corpse_to_raise << "Assist your new compatriots in their dark dealings. Their goal is yours, and yours is theirs. You serve the Dark One above all else. Bring It back." + return @@ -297,17 +343,17 @@ var/list/sacrificed = list() if(usr.loc==src.loc) var/mob/living/carbon/human/L = usr usr.say("Fwe'sh mah erl nyag r'ya!") - usr.ghostize() usr.visible_message("\red [usr]'s eyes glow blue as \he freezes in place, absolutely motionless.", \ "\red The shadow that is your spirit separates itself from your body. You are now in the realm beyond. While this it's a great sight, being here strains your mind and body. Hurry.", \ "\red You hear only complete silence for a moment.") + usr.ghostize() for(L.ajourn=1,L.ajourn) sleep(10) if(L.key) L.ajourn=0 return else - L.bruteloss++ + L.take_organ_damage(1, 0) return fizzle() @@ -316,33 +362,58 @@ var/list/sacrificed = list() /////////////////////////////////////////ELEVENTH RUNE manifest() - if(usr.loc==src.loc) - for(var/mob/dead/observer/O in src.loc) - usr.say("Gal'h'rfikk harfrandid mud'gib!") - var/mob/living/carbon/human/dummy/D = new /mob/living/carbon/human/dummy(src.loc) - usr.visible_message("\red A shape forms in the center of the rune. A shape of... a man.", \ - "\red A shape forms in the center of the rune. A shape of... a man.", \ - "\red You hear liquid flowing.") - D.real_name = "Unknown" - for(var/obj/item/weapon/paper/P in src.loc) - if(length(P.info)<=24) - D.real_name = P.info - D.universal_speak = 1 - D.nodamage = 0 - D.key = O.key - del(O) - for(,usr.loc==src.loc) - sleep(30) - if(usr.health>-100) - usr.bruteloss++ - else - break - D.visible_message("\red [D] slowly dissipates into dust and bones.", \ - "\red You feel pain, as bonds formed between your soul and this homunculus break.", \ - "\red You hear faint rustle.") - D.dust(1) - return - return fizzle() + var/obj/rune/this_rune = src + src = null + if(usr.loc!=this_rune.loc) + return this_rune.fizzle() + var/mob/dead/observer/ghost + for(var/mob/dead/observer/O in this_rune.loc) + if (!O.client) + continue + ghost = O + break + if(!ghost) + return this_rune.fizzle() + + usr.say("Gal'h'rfikk harfrandid mud'gib!") + var/mob/living/carbon/human/dummy/D = new(this_rune.loc) + usr.visible_message("\red A shape forms in the center of the rune. A shape of... a man.", \ + "\red A shape forms in the center of the rune. A shape of... a man.", \ + "\red You hear liquid flowing.") + D.real_name = "Unknown" + for(var/obj/item/weapon/paper/P in this_rune.loc) +/* + if(length(P.info)<=24) + D.real_name = P.info + break +*/ + if(length(P.name)<=24) + D.real_name = P.name + break + D.universal_speak = 1 + D.nodamage = 0 + D.mind = new//Mind initialize stuff. + D.mind.current = D + D.mind.original = D + D.mind.key = ghost.key + D.key = ghost.key + ghost.invisibility = 101 + if (ticker.mode.name == "cult") + ticker.mode:add_cultist(D.mind) + else + ticker.mode.cult+=D.mind + D << "Your blood pulses. Your head throbs. The world goes red. All at once you are aware of a horrible, horrible truth. The veil of reality has been ripped away and in the festering wound left behind something sinister takes root." + D << "Assist your new compatriots in their dark dealings. Their goal is yours, and yours is theirs. You serve the Dark One above all else. Bring It back." + while(this_rune && usr && usr.stat==0 && usr.client && usr.loc==this_rune.loc) + usr.take_organ_damage(1, 0) + sleep(30) + D.visible_message("\red [D] slowly dissipates into dust and bones.", \ + "\red You feel pain, as bonds formed between your soul and this homunculus break.", \ + "\red You hear faint rustle.") + ghost.invisibility = 10 + ghost.key = D.key + D.dust(1) + return @@ -351,177 +422,128 @@ var/list/sacrificed = list() /////////////////////////////////////////TWELFTH RUNE talisman()//only hide, emp, teleport, deafen, blind and tome runes can be imbued atm + var/obj/item/weapon/paper/newtalisman + var/unsuitable_newtalisman = 0 + for(var/obj/item/weapon/paper/P in src.loc) + if(!P.info) + newtalisman = P + break + else + unsuitable_newtalisman = 1 + if (!newtalisman) + if (unsuitable_newtalisman) + usr << "\red The blank is tainted. It is unsuitable." + return fizzle() + + var/obj/rune/imbued_from + var/obj/item/weapon/paper/talisman/T for(var/obj/rune/R in orange(1,src)) if(R==src) continue if(R.word1==wordtravel && R.word2==wordself) //teleport - for(var/obj/item/weapon/paper/P in src.loc) - if(P.info) - usr << "\red The blank is tainted. It is unsuitable." - return - del(P) - var/obj/item/weapon/paper/talisman/T = new /obj/item/weapon/paper/talisman(src.loc) - T.imbue = "[R.word3]" - T.info = "[R.word3]" - for (var/mob/V in viewers(src)) - V.show_message("\red The runes turn into dust, which then forms into an arcane image on the paper.", 3) - del(R) - del(src) - usr.say("H'drak v'loso, mir'kanas verbot!") - return + T = new(src.loc) + T.imbue = "[R.word3]" + T.info = "[R.word3]" + imbued_from = R + break if(R.word1==wordsee && R.word2==wordblood && R.word3==wordhell) //tome - for(var/obj/item/weapon/paper/P in src.loc) - if(P.info) - usr << "\red The blank is tainted. It is unsuitable." - return - del(P) - var/obj/item/weapon/paper/talisman/T = new /obj/item/weapon/paper/talisman(src.loc) - T.imbue = "newtome" - for (var/mob/V in viewers(src)) - V.show_message("\red The runes turn into dust, which then forms into an arcane image on the paper.", 3) - del(R) - del(src) - usr.say("H'drak v'loso, mir'kanas verbot!") - return + T = new(src.loc) + T.imbue = "newtome" + imbued_from = R + break if(R.word1==worddestr && R.word2==wordsee && R.word3==wordtech) //emp - for(var/obj/item/weapon/paper/P in src.loc) - if(P.info) - usr << "\red The blank is tainted. It is unsuitable." - return - del(P) - var/obj/item/weapon/paper/talisman/T = new /obj/item/weapon/paper/talisman(src.loc) - T.imbue = "emp" - for (var/mob/V in viewers(src)) - V.show_message("\red The runes turn into dust, which then forms into an arcane image on the paper.", 3) - del(R) - del(src) - usr.say("H'drak v'loso, mir'kanas verbot!") - return + T = new(src.loc) + T.imbue = "emp" + imbued_from = R + break if(R.word1==wordblood && R.word2==wordsee && R.word3==worddestr) //conceal - for(var/obj/item/weapon/paper/P in src.loc) - if(P.info) - usr << "\red The blank is tainted. It is unsuitable." - return - del(P) - var/obj/item/weapon/paper/talisman/T = new /obj/item/weapon/paper/talisman(src.loc) - T.imbue = "conceal" - for (var/mob/V in viewers(src)) - V.show_message("\red The runes turn into dust, which then forms into an arcane image on the paper.", 3) - del(R) - del(src) - usr.say("H'drak v'loso, mir'kanas verbot!") - return + T = new(src.loc) + T.imbue = "conceal" + imbued_from = R + break if(R.word1==wordblood && R.word2==wordsee && R.word3==wordhide) //reveal - for(var/obj/item/weapon/paper/P in src.loc) - if(P.info) - usr << "\red The blank is tainted. It is unsuitable." - return - del(P) - var/obj/item/weapon/paper/talisman/T = new /obj/item/weapon/paper/talisman(src.loc) - T.imbue = "revealrunes" - for (var/mob/V in viewers(src)) - V.show_message("\red The runes turn into dust, which then forms into an arcane image on the paper.", 3) - del(R) - del(src) - usr.say("H'drak v'loso, mir'kanas verbot!") - return + T = new(src.loc) + T.imbue = "revealrunes" + imbued_from = R + break if(R.word1==wordhide && R.word2==wordother && R.word3==wordsee) //deafen - for(var/obj/item/weapon/paper/P in src.loc) - if(P.info) - usr << "\red The blank is tainted. It is unsuitable." - return - del(P) - var/obj/item/weapon/paper/talisman/T = new /obj/item/weapon/paper/talisman(src.loc) - T.imbue = "deafen" - for (var/mob/V in viewers(src)) - V.show_message("\red The runes turn into dust, which then forms into an arcane image on the paper.", 3) - del(R) - del(src) - usr.say("H'drak v'loso, mir'kanas verbot!") - return + T = new(src.loc) + T.imbue = "deafen" + imbued_from = R + break if(R.word1==worddestr && R.word2==wordsee && R.word3==wordother) //blind - for(var/obj/item/weapon/paper/P in src.loc) - if(P.info) - usr << "\red The blank is tainted. It is unsuitable." - return - del(P) - var/obj/item/weapon/paper/talisman/T = new /obj/item/weapon/paper/talisman(src.loc) - T.imbue = "blind" - for (var/mob/V in viewers(src)) - V.show_message("\red The runes turn into dust, which then forms into an arcane image on the paper.", 3) - del(R) - del(src) - usr.say("H'drak v'loso, mir'kanas verbot!") - return + T = new(src.loc) + T.imbue = "blind" + imbued_from = R + break if(R.word1==wordself && R.word2==wordother && R.word3==wordtech) //communicat - for(var/obj/item/weapon/paper/P in src.loc) - if(P.info) - usr << "\red The blank is tainted. It is unsuitable." - return - del(P) - var/obj/item/weapon/paper/talisman/T = new /obj/item/weapon/paper/talisman(src.loc) - T.imbue = "communicate" - for (var/mob/V in viewers(src)) - V.show_message("\red The runes turn into dust, which then forms into an arcane image on the paper.", 3) - del(R) - del(src) - usr.say("H'drak v'loso, mir'kanas verbot!") - return - return fizzle() + T = new(src.loc) + T.imbue = "communicate" + imbued_from = R + break + if (imbued_from) + for (var/mob/V in viewers(src)) + V.show_message("\red The runes turn into dust, which then forms into an arcane image on the paper.", 3) + usr.say("H'drak v'loso, mir'kanas verbot!") + del(imbued_from) + del(src) + else + return fizzle() /////////////////////////////////////////THIRTEENTH RUNE mend() + src = null usr.say("Uhrast ka'hfa heldsagen ver'lot!") - usr.bruteloss+=200 - runedec+=5 + usr.take_overall_damage(200, 0) + runedec+=10 usr.visible_message("\red [usr] keels over dead, his blood glowing blue as it escapes his body and dissipates into thin air.", \ "\red In the last moment of your humbly life, you feel as fabric of reality mends... with your blood.", \ "\red You hear faint rustle.") - for(,usr.health<-100) + for(,usr.stat==2) sleep(600) - runedec=0 + if (!usr) + return + runedec-=10 return - - /////////////////////////////////////////FOURTEETH RUNE communicate() + var/input = input(usr, "Please choose a message to tell to the other acolytes.", "Voice of Blood", "") as text|null + if(!input) + return fizzle() if(istype(src,/obj/rune)) usr.say("O bidai nabora se'sma!") else usr.whisper("O bidai nabora se'sma!") - var/input = input(usr, "Please choose a message to tell to the other acolytes.", "Voice of Blood", "") as text|null - if(!input) - return fizzle() - input = sanitize(input) + var/input_s = sanitize(input) if(istype(src,/obj/rune)) usr.say("[input]") else usr.whisper("[input]") - for(var/mob/living/carbon/human/H in cultists) - H << "\red \b [input]" + for(var/datum/mind/H in ticker.mode.cult) + if (H.current) + H.current << "\red \b [input_s]" del(src) return /////////////////////////////////////////FIFTEENTH RUNE sacrifice() - var/list/cultsinrange = list() - var/list/victims = list() + var/list/mob/living/carbon/human/cultsinrange = list() + var/list/mob/living/carbon/human/victims = list() for(var/mob/living/carbon/human/V in src.loc) - if(!cultists.Find(V)) - victims.Add(V) - for(var/mob/living/carbon/human/C in orange(1,src)) - if(cultists.Find(C)) - cultsinrange.Add(C) + if(!(iscultist(V))) + victims += V + for(var/mob/living/carbon/C in orange(1,src)) + if(iscultist(C)) + cultsinrange += C + C.say("Barhah hra zar'garis!") for(var/mob/H in victims) - for(var/mob/K in cultsinrange) - K.say("Barhah hra zar'garis!") if (ticker.mode.name == "cult") - if(H == ticker.mode:sacrifice_target.current) + if(H.mind == ticker.mode:sacrifice_target) if(cultsinrange.len >= 3) sacrificed += H.mind H.gib(1) @@ -567,22 +589,25 @@ var/list/sacrificed = list() else H.gib(1) usr << "\red The Geometer of blood accepts this sacrifice." - - return for(var/mob/living/carbon/monkey/M in src.loc) - for(var/mob/K in cultsinrange) - K.say("Barhah hra zar'garis!") - M.gib(1) if (ticker.mode.name == "cult") - if(prob(20)) - usr << "\red The Geometer of Blood accepts your meager sacrifice." - ticker.mode:grant_runeword(usr) + if(M.mind == ticker.mode:sacrifice_target) + if(cultsinrange.len >= 3) + sacrificed += M.mind + usr << "\red The Geometer of Blood accepts this sacrifice, your objective is now complete." + else + usr << "\red Your target's earthly bonds are too strong. You need more cultists to succeed in this ritual." + continue else - usr << "\red The Geometer of blood accepts this sacrifice." - usr << "\red However, a mere monkey is not enough to satisfy Him." + if(prob(20)) + usr << "\red The Geometer of Blood accepts your meager sacrifice." + ticker.mode:grant_runeword(usr) + else + usr << "\red The Geometer of blood accepts this sacrifice." + usr << "\red However, a mere monkey is not enough to satisfy Him." else usr << "\red The Geometer of Blood accepts your meager sacrifice." - return + M.gib(1) /* for(var/mob/living/carbon/alien/A) for(var/mob/K in cultsinrange) K.say("Barhah hra zar'garis!") @@ -648,7 +673,7 @@ var/list/sacrificed = list() wall() usr.say("Khari'd! Eske'te tannin!") src.density = !src.density - usr.bruteloss += 2 + usr.take_organ_damage(2, 0) if(src.density) usr << "\red Your blood flows into the rune, and you feel that the very space over the rune thickens." else @@ -658,36 +683,59 @@ var/list/sacrificed = list() /////////////////////////////////////////EIGHTTEENTH RUNE freedom() - var/culcount = 0 - for(var/mob/living/carbon/human/C in orange(1,src)) - if(cultists.Find(C)) - culcount++ - if(culcount>=3) - var/mob/cultist = input("Choose the one who you want to free", "Followers of Geometer") as null|anything in (cultists - usr) + var/list/mob/living/carbon/cultists = new + for(var/datum/mind/H in ticker.mode.cult) + if (istype(H.current,/mob/living/carbon)) + cultists+=H.current + var/list/mob/living/carbon/users = new + for(var/mob/living/carbon/C in orange(1,src)) + if(iscultist(C)) + users+=C + if(users.len>=3) + var/mob/cultist = input("Choose the one who you want to free", "Followers of Geometer") as null|anything in (cultists - users) if(!cultist) return fizzle() if (cultist == usr) //just to be sure. return - if(!cultist.buckled && !cultist.handcuffed) + if(!(cultist.buckled || \ + cultist.handcuffed || \ + istype(cultist.wear_mask, /obj/item/clothing/mask/muzzle) || \ + (istype(cultist.loc, /obj/closet)&&cultist.loc:welded) || \ + (istype(cultist.loc, /obj/secure_closet)&&cultist.loc:locked) || \ + (istype(cultist.loc, /obj/machinery/dna_scannernew)&&cultist.loc:locked) \ + )) usr << "\red The [cultist] is already free." return - cultist.buckled = initial(cultist.buckled) - cultist.handcuffed = initial(cultist.handcuffed) - for(var/mob/living/carbon/human/C in orange(1,src)) - if(cultists.Find(C)) - C.bruteloss += 15 - C.say("Khari'd! Gual'te nikka!") + cultist.buckled = null + if (cultist.handcuffed) + cultist.handcuffed.loc = cultist.loc + cultist.handcuffed = null + if (istype(cultist.wear_mask, /obj/item/clothing/mask/muzzle)) + cultist.u_equip(cultist.wear_mask) + if(istype(cultist.loc, /obj/closet)&&cultist.loc:welded) + cultist.loc:welded = 0 + if(istype(cultist.loc, /obj/secure_closet)&&cultist.loc:locked) + cultist.loc:locked = 0 + if(istype(cultist.loc, /obj/machinery/dna_scannernew)&&cultist.loc:locked) + cultist.loc:locked = 0 + for(var/mob/living/carbon/C in users) + usr.take_overall_damage(15, 0) + C.say("Khari'd! Gual'te nikka!") del(src) return fizzle() /////////////////////////////////////////NINETEENTH RUNE cultsummon() - var/culcount = 0 - for(var/mob/living/carbon/human/C in orange(1,src)) - if(cultists.Find(C)) - culcount++ - if(culcount>=3) + var/list/mob/living/carbon/cultists = new + for(var/datum/mind/H in ticker.mode.cult) + if (istype(H.current,/mob/living/carbon)) + cultists+=H.current + var/list/mob/living/carbon/users = new + for(var/mob/living/carbon/C in orange(1,src)) + if(iscultist(C)) + users+=C + if(users.len>=3) var/mob/cultist = input("Choose the one who you want to summon", "Followers of Geometer") as null|anything in (cultists - usr) if(!cultist) return fizzle() @@ -697,10 +745,12 @@ var/list/sacrificed = list() usr << "\red You cannot summon the [cultist], for him shackles of blood are strong" return fizzle() cultist.loc = src.loc + cultist.lying = 1 + cultist.update_clothing() for(var/mob/living/carbon/human/C in orange(1,src)) - if(cultists.Find(C)) + if(iscultist(C)) C.say("N'ath reth sh'yro eth d'rekkathnor!") - C.bruteloss += 25 + C.take_overall_damage(25, 0) usr.visible_message("\red Rune disappears with a flash of red light, and in it's place now a body lies.", \ "\red You are blinded by the flash of red light! After you're able to see again, you see that now instead of the rune there's a body.", \ "\red You hear a pop and smell ozone.") @@ -713,7 +763,7 @@ var/list/sacrificed = list() if(istype(src,/obj/rune)) var/affected = 0 for(var/mob/living/carbon/C in range(7,src)) - if (cultists.Find(C)) + if (iscultist(C)) continue C.ear_deaf += 50 C.show_message("\red World around you suddenly becomes quiet.", 3) @@ -727,16 +777,19 @@ var/list/sacrificed = list() else return fizzle() else - usr.whisper("Sti' kaliedir!") - usr << "\red Your talisman turns into gray dust, deafening everyone around." + var/affected = 0 for(var/mob/living/carbon/C in range(7,usr)) - if (cultists.Find(C)) + if (iscultist(C)) continue C.ear_deaf += 30 //talismans is weaker. C.show_message("\red World around you suddenly becomes quiet.", 3) + affected++ + if(affected) + usr.whisper("Sti' kaliedir!") + usr << "\red Your talisman turns into gray dust, deafening everyone around." for (var/mob/V in orange(1,src)) - if(!cultists.Find(V)) + if(!(iscultist(V))) V.show_message("\red Dust flows from [usr]'s hands for a moment, and the world suddenly becomes quiet..", 3) return @@ -744,13 +797,13 @@ var/list/sacrificed = list() if(istype(src,/obj/rune)) var/affected = 0 for(var/mob/living/carbon/C in viewers(src)) - if (cultists.Find(C)) + if (iscultist(C)) continue C.eye_blurry += 50 C.eye_blind += 20 if(prob(5)) C.disabilities |= 1 - if(prob(1)) + if(prob(10)) C.sdisabilities |= 1 C.show_message("\red Suddenly you see red flash, that blinds you.", 3) affected++ @@ -761,35 +814,43 @@ var/list/sacrificed = list() else return fizzle() else - usr.whisper("Sti' kaliesin!") - usr << "\red Your talisman turns into gray dust, blinding those who not follow the Nar-Sie." + var/affected = 0 for(var/mob/living/carbon/C in viewers(usr)) - if (cultists.Find(C)) + if (iscultist(C)) continue C.eye_blurry += 30 C.eye_blind += 10 //talismans is weaker. + affected++ C.show_message("\red You feel sharp pain in your eyes, and the world disappears into darkness..", 3) + if(affected) + usr.whisper("Sti' kaliesin!") + usr << "\red Your talisman turns into gray dust, blinding those who not follow the Nar-Sie." return bloodboil() //cultists need at least one DANGEROUS rune. Even if they're all stealthy. +/* + var/list/mob/living/carbon/cultists = new + for(var/datum/mind/H in ticker.mode.cult) + if (istype(H.current,/mob/living/carbon)) + cultists+=H.current +*/ var/culcount = 0 //also, wording for it is old wording for obscure rune, which is now hide-see-blood. - var/list/cultboil = list(cultists-usr) //and for this words are destroy-see-blood. - for(var/mob/living/carbon/human/C in orange(1,src)) - if(cultists.Find(C)) +// var/list/cultboil = list(cultists-usr) //and for this words are destroy-see-blood. + for(var/mob/living/carbon/C in orange(1,src)) + if(iscultist(C)) culcount++ - if(culcount>=2) + if(culcount>=3) for(var/mob/living/carbon/M in viewers(usr)) - if(cultboil.Find(M)) + if(iscultist(M)) continue - M.bruteloss += 51 - M.fireloss += 51 + M.take_overall_damage(51,51) M << "\red Your blood boils!" if(prob(5)) spawn(5) M.gib(1) - for(var/obj/rune/R in viewers(src)) + for(var/obj/rune/R in view(src)) if(prob(10)) explosion(R.loc, -1, 0, 1, 5) del(src) @@ -801,19 +862,26 @@ var/list/sacrificed = list() burningblood() var/culcount = 0 - for(var/mob/living/carbon/human/C in orange(1,src)) - if(cultists.Find(C)) + for(var/mob/living/carbon/C in orange(1,src)) + if(iscultist(C)) culcount++ if(culcount >= 5) for(var/obj/rune/R in world) if(R.blood_DNA == src.blood_DNA && R.blood_type == src.blood_type) for(var/mob/M in orange(2,R)) - M.fireloss += 15 - M << "\red Rune suddenly ignites, burning you!" + M.take_overall_damage(0,15) + if (R.invisibility>M.see_invisible) + M << "\red Aargh it burns!" + else + M << "\red Rune suddenly ignites, burning you!" + var/turf/T = get_turf(R) + T.hotspot_expose(700,125) for(var/obj/decal/cleanable/blood/B in world) if(B.blood_DNA == src.blood_DNA && B.blood_type == src.blood_type) for(var/mob/M in orange(1,B)) - M.fireloss += 5 + M.take_overall_damage(0,5) M << "\red Blood suddenly ignites, burning you!" + var/turf/T = get_turf(B) + T.hotspot_expose(700,125) del(B) - del(src) \ No newline at end of file + del(src) diff --git a/code/game/magic/ritual.dm b/code/game/magic/ritual.dm deleted file mode 100644 index 2f1dbcf51dc..00000000000 --- a/code/game/magic/ritual.dm +++ /dev/null @@ -1,417 +0,0 @@ -var/list/cultists = list() - - -/obj/rune - anchored = 1 - icon = 'magic.dmi' - icon_state = "1" - - - var - word1 - word2 - word3 - -// ire - travel -// ego - self -// nahlizet - see -// certum - Hell -// veri - blood -// jatkaa - join <- eh, I just used good-soounding combos. Could change that later - - -// ire ego [word] - Teleport to [rune with word destination matching] (works in pairs) -// nahlizet veri certum - Create a new tome -// jatkaa veri ego - Incorporate person over the rune into the group -// certum jatkaa ego - Summon TERROR -// nahlizet ire certum - EMP rune - - examine() - set src in usr - if(!cultists.Find(usr)) - src.desc = text("A strange collection of symbols drawn in blood.") - else - src.desc = "A spell circle drawn in blood. It reads: [word1] [word2] [word3]." - ..() - return - - attackby(I as obj, user as mob) - if(istype(I, /obj/item/weapon/tome) && cultists.Find(user)) - user << "You retrace your steps, carefully undoing the lines of the rune." - del(src) - return - else if(istype(I, /obj/item/weapon/storage/bible) && usr.mind && (usr.mind.assigned_role == "Chaplain")) - user << "\blue You banish the vile magic with the blessing of God!" - del(src) - return - return - - attack_hand(mob/user as mob) - if(!cultists.Find(user)) - user << "You can't mouth the arcane scratchings without fumbling over them." - return - if(!word1 || !word2 || !word3 || prob(usr.brainloss)) - return fizzle() - - if(word1 == "ire" && word2 == "ego") - usr.say("Sas'so c'arta forbici!") - for(var/obj/rune/R in world) - if(R == src) - continue - if(R.word3 == src.word3 && R.word1 == src.word1 && R.word2 == src.word2) - for (var/mob/V in viewers(src)) - V.show_message("\red [user] disappears in a flash of red light!", 3, "\red You hear a sickening crunch and sloshing of viscera.", 2) - user.loc = R.loc - return - return fizzle() - if(word1 == "nahlizet" && word2 == "veri" && word3 == "certum") - usr.say("N'ath reth sh'yro eth d'raggathnor!") - for (var/mob/V in viewers(src)) - V.show_message("\red There's a flash of red light. The rune disappears, and in its place a book lies", 3, "\red You hear a pop and smell ozone.", 2) - new /obj/item/weapon/tome(src.loc) - del(src) - -/* - if(word1 == "ire" && word2 == "certum" && word3 == "jatkaa") - var/list/temprunes = list() - var/list/runes = list() - for(var/obj/rune/R in world) - if(istype(R, /obj/rune)) - if(R.word1 == "ire" && R.word2 == "certum" && R.word3 == "jatkaa") - runes.Add(R) - var/atom/a = get_turf_loc(R) - temprunes.Add(a.loc) - var/chosen = input("Scry which rune?", "Scrying") in temprunes - if(!chosen) - return fizzle() - var/selection_position = temprunes.Find(chosen) - var/obj/rune/chosenrune = runes[selection_position] - user.client.eye = chosenrune - user:current = chosenrune - user.reset_view(chosenrune) -*/ - return - if(word1 == "jatkaa" && word2 == "veri" && word3 == "ego") - usr.say("Mah'weyh pleggh at e'ntrath!") - for(var/mob/living/carbon/human/M in src.loc) - if(cultists.Find(M)) - return fizzle() - else - cultists.Add(M) - for (var/mob/V in viewers(src)) - V.show_message("\red [M] writhes in pain as the markings below him glow a bloody red.", 3, "\red You hear an anguished scream.", 2) - M << "Your blood pulses. Your head throbs. The world goes red. All at once you are aware of a horrible, horrible truth. The veil of reality has been ripped away and in the festering wound left behind something sinister takes root." - M<< "Assist your new compatriots in their dark dealings. Their goal is yours, and yours is theirs. You serve the Dark One above all else. Bring It back." - return - if(word1 == "certum" && word2 == "jatkaa" && word3 == "ego") - usr.say("Tok-lyr rqa'nap g'lt-ulotf!") - var/cultist_count = 0 - for(var/mob/M in orange(1,src)) - if(cultists.Find(M)) - cultist_count += 1 - if(cultist_count >= 6) - var/obj/machinery/the_singularity/S = new /obj/machinery/the_singularity/(src.loc) - S.icon = 'magic_terror.dmi' - S.name = "Tear in the Fabric of Reality" - S.desc = "Your mind begins to bubble and ooze as it tries to comprehend what it sees." - S.pixel_x = -89 - S.pixel_y = -85 - message_admins("

[key_name_admin(usr)] has summoned a Tear in the Fabric of Reality!", 1) - log_game("[key_name_admin(usr)] has summoned a Tear in the Fabric of Reality!") - return - else - return fizzle() - if(word1 == "nahlizet" && word2 == "ire" && word3 == "certum") - usr.say("ta'gh fara'qha fel d'amar det!") - playsound(src.loc, 'Welder2.ogg', 25, 1) - var/turf/T = get_turf(src) - if(T) - T.hotspot_expose(700,125) - - var/rune = src // detaching the proc - in theory - src = null - - var/obj/overlay/pulse = new/obj/overlay ( T ) - pulse.icon = 'effects.dmi' - pulse.icon_state = "emppulse" - pulse.name = "emp pulse" - pulse.anchored = 1 - spawn(20) - del(pulse) - - for(var/obj/item/weapon/W in range(world.view-1, T)) - - if (istype(W, /obj/item/assembly/m_i_ptank) || istype(W, /obj/item/assembly/r_i_ptank) || istype(W, /obj/item/assembly/t_i_ptank)) - - var/fuckthis - if(istype(W:part1,/obj/item/weapon/tank/plasma)) - fuckthis = W:part1 - fuckthis:ignite() - if(istype(W:part2,/obj/item/weapon/tank/plasma)) - fuckthis = W:part2 - fuckthis:ignite() - if(istype(W:part3,/obj/item/weapon/tank/plasma)) - fuckthis = W:part3 - fuckthis:ignite() - - - for(var/mob/living/M in viewers(world.view-1, T)) - - if(!istype(M, /mob/living)) continue - - if (istype(M, /mob/living/silicon)) - M.fireloss += 25 - flick("noise", M:flash) - M << "\red *BZZZT*" - M << "\red Warning: Electromagnetic pulse detected." - if(istype(M, /mob/living/silicon/ai)) - if (prob(30)) - switch(pick(1,2,3)) //Add Random laws. - if(1) - M:cancel_camera() - if(2) - M:lockdown() - if(3) - M:ai_call_shuttle() - continue - - - M << "\red Your equipment malfunctions." //Yeah, i realise that this WILL - //show if theyre not carrying anything - //that is affected. lazy. - if (locate(/obj/item/weapon/cloaking_device, M)) - for(var/obj/item/weapon/cloaking_device/S in M) - S.active = 0 - S.icon_state = "shield0" - - if (locate(/obj/item/weapon/gun/energy, M)) - for(var/obj/item/weapon/gun/energy/G in M) - G.charges = 0 - G.update_icon() - - if ((istype(M, /mob/living/carbon/human)) && (istype(M:glasses, /obj/item/clothing/glasses/thermal))) - M << "\red Your thermals malfunction." - M.eye_blind = 3 - M.eye_blurry = 5 - M.disabilities |= 1 - spawn(100) - M.disabilities &= ~1 - - if (locate(/obj/item/device/radio, M)) - for(var/obj/item/device/radio/R in M) //Add something for the intercoms. - R.broadcasting = 0 - R.listening = 0 - - if (locate(/obj/item/device/flash, M)) - for(var/obj/item/device/flash/F in M) //Add something for the intercoms. - F.attack_self() - - if (locate(/obj/item/weapon/baton, M)) - for(var/obj/item/weapon/baton/B in M) //Add something for the intercoms. - B.charges = 0 - - if(locate(/obj/item/clothing/under/chameleon, M)) - for(var/obj/item/clothing/under/chameleon/C in M) //Add something for the intercoms. - M << "\red Your jumpsuit malfunctions" - C.name = "psychedelic" - C.desc = "Groovy!" - C.icon_state = "psyche" - C.color = "psyche" - spawn(200) - C.name = "Black Jumpsuit" - C.icon_state = "bl_suit" - C.color = "black" - C.desc = null - - M << "\red BZZZT" - - - for(var/obj/machinery/A in range(world.view-1, T)) - A.use_power(7500) - - var/obj/overlay/pulse2 = new/obj/overlay ( A.loc ) - pulse2.icon = 'effects.dmi' - pulse2.icon_state = "empdisable" - pulse2.name = "emp sparks" - pulse2.anchored = 1 - pulse2.dir = pick(cardinal) - - spawn(10) - del(pulse2) - - if(istype(A, /obj/machinery/turret)) - A:enabled = 0 - A:lasers = 0 - A:power_change() - - if(istype(A, /obj/machinery/computer) && prob(20)) - A:set_broken() - - if(istype(A, /obj/machinery/firealarm) && prob(50)) - A:alarm() - - if(istype(A, /obj/machinery/power/smes)) - A:online = 0 - A:charging = 0 - A:output = 0 - A:charge -= 1e6 - if (A:charge < 0) - A:charge = 0 - spawn(100) - A:output = initial(A:output) - A:charging = initial(A:charging) - A:online = initial(A:online) - - if(istype(A, /obj/machinery/door)) - if(prob(20) && (istype(A,/obj/machinery/door/airlock) || istype(A,/obj/machinery/door/window)) ) - A:open() - if(prob(40)) - if(A:secondsElectrified != 0) continue - A:secondsElectrified = -1 - spawn(300) - A:secondsElectrified = 0 - - if(istype(A, /obj/machinery/power/apc)) - if(A:cell) - A:cell:charge -= 1000 - if (A:cell:charge < 0) - A:cell:charge = 0 - A:lighting = 0 - A:equipment = 0 - A:environ = 0 - spawn(600) - A:equipment = 3 - A:environ = 3 - - if(istype(A, /obj/machinery/camera)) - A.icon_state = "cameraemp" - A:network = null //Not the best way but it will do. I think. - spawn(900) - A:network = initial(A:network) - A:icon_state = initial(A:icon_state) - for(var/mob/living/silicon/ai/O in world) - if (O.current == A) - O.cancel_camera() - O << "Your connection to the camera has been lost." - for(var/mob/O in world) - if (istype(O.machine, /obj/machinery/computer/security)) - var/obj/machinery/computer/security/S = O.machine - if (S.current == A) - O.machine = null - S.current = null - O.reset_view(null) - O << "The screen bursts into static." - - if(istype(A, /obj/machinery/clonepod)) - A:malfunction() - del(rune) - return - else - return fizzle() - - - proc - fizzle() - usr.say(pick("B'ADMINES SP'WNIN SH'T","IC'IN O'OC","RO'SHA'M I'SA GRI'FF'N ME'AI","TOX'IN'S O'NM FI'RAH","IA BL'AME TOX'IN'S","FIR'A NON'AN RE'SONA","A'OI I'RS ROUA'GE","LE'OAN JU'STA SP'A'C Z'EE SH'EF","IA PT'WOBEA'RD, IA A'DMI'NEH'LP")) - for (var/mob/V in viewers(src)) - V.show_message("\red The markings pulse with a small burst of light, then fall dark.", 3, "\red You hear a faint fizzle.", 2) - return - - check_icon() - if(word1 == "ire" && word2 == "ego") - icon_state = "2" - return - if(word1 == "jatkaa" && word2 == "veri" && word3 == "ego") - icon_state = "3" - return - if(word1 == "certum" && word2 == "jatkaa" && word3 == "ego") - icon_state = "3" - src.icon += rgb(100, 0 , 150) - return - if(word1 == "nahlizet" && word2 == "ire" && word3 == "certum") - icon_state = "2" - src.icon += rgb(0, 50 , 0) - return - icon_state = "1" - - -/obj/item/weapon/tome - name = "arcane tome" - icon_state ="tome" - throw_speed = 1 - throw_range = 5 - w_class = 3.0 - flags = FPRINT | TABLEPASS - - attack_self(mob/user as mob) - if(cultists.Find(user)) - var/C = 0 - for(var/obj/rune/N in world) - C++ - if (C>=25) - switch(alert("The cloth of reality can't take that much of a strain. By creating another rune, you risk locally tearing reality apart, which would prove fatal to you. Do you still wish to scribe the rune?",,"Yes","No")) - if("Yes") - if(prob(C*5-100)) - usr.emote("scream") - user << "\red A tear momentarily appears in reality. Before it closes, you catch a glimpse of that which lies beyond. That proves to be too much for your mind." - usr.gib(1) - return - if("No") - return - else - if(alert("Scribe a rune?",,"Yes","No")=="No") - return - var/list/words = list("ire", "ego", "nahlizet", "certum", "veri", "jatkaa") - var/w1 - var/w2 - var/w3 - if(usr) - w1 = input("Write your first rune:", "Rune Scribing") in words - if(usr) - w2 = input("Write your second rune:", "Rune Scribing") in words - if(usr) - w3 = input("Write your third rune:", "Rune Scribing") in words - for (var/mob/V in viewers(src)) - V.show_message("\red [user] slices open a finger and begins to chant and paint symbols on the floor.", 3, "\red You hear chanting.", 2) - user << "\red You slice open one of your fingers and begin drawing a rune on the floor whilst chanting the ritual that binds your life essence with the dark arcane energies flowing through the surrounding world." - user.bruteloss += 1 - if(do_after(user, 50)) - var/obj/rune/R = new /obj/rune(user.loc) - user << "\red You finish drawing the arcane markings of the Geometer." - R.word1 = w1 - R.word2 = w2 - R.word3 = w3 - R.check_icon() - return - else - user << "The book seems full of illegible scribbles. Is this a joke?" - return - - examine() - set src in usr - if(!cultists.Find(usr)) - usr << "An old, dusty tome with frayed edges and a sinister looking cover." - else - usr << "The scriptures of Nar-Sie, The One Who Sees, The Geometer of Blood. Contains the details of every ritual his followers could think of. Most of these are useless, though." - - -/obj/item/weapon/paperscrap - name = "scrap of paper" - icon_state = "scrap" - throw_speed = 1 - throw_range = 2 - w_class = 1.0 - flags = FPRINT | TABLEPASS - - var - data - - attack_self(mob/user as mob) - view_scrap(user) - - examine() - set src in usr - view_scrap(usr) - - proc/view_scrap(var/viewer) - viewer << browse(data) \ No newline at end of file diff --git a/code/game/objects/items/weapons/medical.dm b/code/game/objects/items/weapons/medical.dm index dc3a1ccf049..4395a1cb5b8 100644 --- a/code/game/objects/items/weapons/medical.dm +++ b/code/game/objects/items/weapons/medical.dm @@ -97,11 +97,10 @@ MEDICAL H.UpdateDamageIcon() else H.UpdateDamage() + M.updatehealth() else - M.bruteloss = max(0, M.bruteloss - (src.heal_brute/2)) - M.fireloss = max(0, M.fireloss - (src.heal_burn/2)) + M.heal_organ_damage((src.heal_brute/2), (src.heal_burn/2)) - M.updatehealth() src.amount-- if (src.amount <= 0) diff --git a/code/game/objects/storage/bible.dm b/code/game/objects/storage/bible.dm index d12e091541f..556b25522f7 100644 --- a/code/game/objects/storage/bible.dm +++ b/code/game/objects/storage/bible.dm @@ -44,11 +44,12 @@ // return if (M.stat !=2) - if (ticker.mode.name == "cult" && prob(10)) - if(ticker.mode:cult.Find(M.mind)) - ticker.mode:remove_cultist(M.mind) - if (cultists.Find(M) && prob(10)) - cultists -= M + if (prob(10)) + if(M.mind in ticker.mode.cult) + if (ticker.mode.name == "cult") + ticker.mode:remove_cultist(M.mind) + else + ticker.mode.cult -= M.mind if ((istype(M, /mob/living/carbon/human) && prob(60))) bless(M) for(var/mob/O in viewers(M, null)) diff --git a/code/modules/admin/admin.dm b/code/modules/admin/admin.dm index dd54e28b65c..d4a621f33cd 100644 --- a/code/modules/admin/admin.dm +++ b/code/modules/admin/admin.dm @@ -266,6 +266,8 @@ var/showadminmessages = 1 var/dat = {"What mode do you wish to play?
"} for (var/mode in config.modes) dat += {"[config.mode_names[mode]]
"} + dat += {"Secret
"} + dat += {"Random
"} dat += {"Now: [master_mode]"} usr << browse(dat, "window=c_mode") @@ -280,6 +282,7 @@ var/showadminmessages = 1 world << "\blue The mode is now: [master_mode]" world.save_mode(master_mode) + .(href, list("c_mode"=1)) if (href_list["monkeyone"]) if ((src.rank in list( "Admin Candidate", "Trial Admin", "Badmin", "Game Admin", "Game Master" ))) @@ -634,7 +637,7 @@ var/showadminmessages = 1 alert("Is a Revolutionary!") return if("cult") - if(M.mind in current_mode:cult) + if(M.mind in current_mode.cult) alert("Is a Cultist!") return if("wizard") @@ -1957,24 +1960,15 @@ var/showadminmessages = 1 alert("[M.name] is not prisoned.") /mob/proc/revive() - if(istype(src, /mob/living/carbon/human)) - var/mob/living/carbon/human/H = src - for(var/A in H.organs) - var/datum/organ/external/affecting = null - if(!H.organs[A]) continue - affecting = H.organs[A] - if(!istype(affecting, /datum/organ/external)) continue - affecting.heal_damage(1000, 1000) //fixes getting hit after ingestion, killing you when game updates organ health - H.UpdateDamageIcon() - src.fireloss = 0 + //src.fireloss = 0 src.toxloss = 0 - src.bruteloss = 0 + //src.bruteloss = 0 src.oxyloss = 0 src.paralysis = 0 src.stunned = 0 src.weakened =0 - src.health = 100 - src.updatehealth() + //src.health = 100 + src.heal_overall_damage(1000, 1000) src.buckled = initial(src.buckled) src.handcuffed = initial(src.handcuffed) if(src.stat > 1) src.stat=0 diff --git a/code/modules/admin/verbs/debug.dm b/code/modules/admin/verbs/debug.dm index d02b4f7c188..b54c58646ce 100644 --- a/code/modules/admin/verbs/debug.dm +++ b/code/modules/admin/verbs/debug.dm @@ -221,7 +221,7 @@ But you can call procs that are of type /mob/living/carbon/human/proc/ for that if(!wordtravel) runerandom() if(M) - if(cultists.Find(M)) + if(M.mind in ticker.mode.cult) return else if(alert("Spawn that person a tome?",,"Yes","No")=="Yes") @@ -247,12 +247,11 @@ But you can call procs that are of type /mob/living/carbon/human/proc/ for that M << "\red You remembered one thing from the glimpse... [wordself] is self..." if("8") M << "\red You remembered one thing from the glimpse... [wordsee] is see..." - cultists.Add(M) + if(M.mind) M.mind.special_role = "Cultist" + ticker.mode.cult += M.mind src << "Made [M] a cultist." - if(ticker.mode.name == "cult") - ticker.mode:cult += M.mind /client/proc/cmd_debug_del_all() set category = "Debug" diff --git a/code/modules/admin/verbs/randomverbs.dm b/code/modules/admin/verbs/randomverbs.dm index c4316354eae..b81b0171b52 100644 --- a/code/modules/admin/verbs/randomverbs.dm +++ b/code/modules/admin/verbs/randomverbs.dm @@ -421,26 +421,18 @@ TO DO: actually integrate random appearance and player preference save. alert("Cannot revive a ghost") return if(config.allow_admin_rev) - if(istype(M, /mob/living/carbon/human)) - var/mob/living/carbon/human/H = M - for(var/A in H.organs) - var/datum/organ/external/affecting = null - if(!H.organs[A]) continue - affecting = H.organs[A] - if(!istype(affecting, /datum/organ/external)) continue - affecting.heal_damage(1000, 1000) //fixes getting hit after ingestion, killing you when game updates organ health - H.UpdateDamageIcon() - M.fireloss = 0 + //M.fireloss = 0 M.toxloss = 0 - M.bruteloss = 0 + //M.bruteloss = 0 M.oxyloss = 0 M.paralysis = 0 M.stunned = 0 M.weakened = 0 M.radiation = 0 - M.health = 100 + //M.health = 100 M.nutrition = 400 - M.updatehealth() + M.heal_overall_damage(1000, 1000) + //M.updatehealth() M.buckled = initial(M.buckled) M.handcuffed = initial(M.handcuffed) if (M.stat > 1) diff --git a/code/modules/mob/dead/observer/observer.dm b/code/modules/mob/dead/observer/observer.dm index bd7351409d8..567e59c3126 100644 --- a/code/modules/mob/dead/observer/observer.dm +++ b/code/modules/mob/dead/observer/observer.dm @@ -16,11 +16,12 @@ set category = "Special Verbs" set name = "Ghost" set desc = "You cannot be revived as a ghost" - if(src.stat != 2) + /*if(src.stat != 2) //this check causes nothing but troubles. Commented out for Nar-Sie's sake. --rastaf0 src << "Only dead people and admins get to ghost, and admins don't use this verb to ghost while alive." - return + return*/ if(src.client) src.client.mob = new/mob/dead/observer(src) + src.verbs -= /mob/proc/ghostize return /mob/proc/adminghostize() @@ -79,7 +80,7 @@ src.client.clear_admin_verbs() src.client.holder.state = 1 src.client.update_admins(rank) - if(cultists.Find(corpse) && corpse.ajourn==1 && corpse.health>-100) //checks if it's an astral-journeying cultistm if it is and he's not on an astral journey rune, re-entering won't work + if(iscultist(corpse) && corpse.ajourn==1 && corpse.stat!=2) //checks if it's an astral-journeying cultistm if it is and he's not on an astral journey rune, re-entering won't work var/S=0 for(var/obj/rune/R in world) if(corpse.loc==R.loc && R.word1 == wordhell && R.word2 == wordtravel && R.word3 == wordself) @@ -90,6 +91,8 @@ if(corpse.ajourn) corpse.ajourn=0 src.client.mob = corpse + if (corpse.stat==2) + src.verbs += /mob/proc/ghostize del(src) /mob/dead/observer/proc/dead_tele() diff --git a/code/modules/mob/living/carbon/alien/humanoid/humanoid.dm b/code/modules/mob/living/carbon/alien/humanoid/humanoid.dm index 4907ace2e4b..e2906ffc701 100644 --- a/code/modules/mob/living/carbon/alien/humanoid/humanoid.dm +++ b/code/modules/mob/living/carbon/alien/humanoid/humanoid.dm @@ -805,4 +805,9 @@ In all, this is a lot like the monkey code. /N /mob/living/carbon/alien/heal_organ_damage(var/brute, var/burn) bruteloss = max(0, bruteloss-brute) //HACK fireloss = max(0, fireloss-burn) //HACK - src.updatehealth() \ No newline at end of file + src.updatehealth() + +/mob/living/carbon/alien/take_organ_damage(var/brute, var/burn) + bruteloss += brute //HACK + fireloss += burn //HACK + src.updatehealth() diff --git a/code/modules/mob/living/carbon/human/emote.dm b/code/modules/mob/living/carbon/human/emote.dm index afd4fe8c880..02b063b23d3 100644 --- a/code/modules/mob/living/carbon/human/emote.dm +++ b/code/modules/mob/living/carbon/human/emote.dm @@ -45,7 +45,10 @@ m_type = 1 if ("custom") - var/input = input("Choose an emote to display.") + var/input = input("Choose an emote to display.") as text|null + if (!input) + return + input = sanitize(input) var/input2 = input("Is this a visible or hearable emote?") in list("Visible","Hearable") if (input2 == "Visible") m_type = 1 diff --git a/code/modules/mob/living/carbon/human/human.dm b/code/modules/mob/living/carbon/human/human.dm index 0c344479f93..80f51f66354 100644 --- a/code/modules/mob/living/carbon/human/human.dm +++ b/code/modules/mob/living/carbon/human/human.dm @@ -2761,6 +2761,10 @@ It can still be worn/put on as normal. ..() src.UpdateDamageIcon() +/mob/living/carbon/human/take_organ_damage(var/brute, var/burn) + ..() + src.UpdateDamageIcon() + /mob/living/carbon/human/proc/isarmored(var/datum/organ/external/def_zone) if(def_zone.name == "head") if(src.head && istype(src.head,/obj/item/clothing/head/helmet)) diff --git a/code/modules/mob/living/carbon/human/life.dm b/code/modules/mob/living/carbon/human/life.dm index 283f58f04fc..98f4a0e6e2e 100644 --- a/code/modules/mob/living/carbon/human/life.dm +++ b/code/modules/mob/living/carbon/human/life.dm @@ -724,6 +724,13 @@ if(!src.druggy) src.see_invisible = 2 + else if (src.seer) + var/obj/rune/R = locate() in src.loc + if (istype(R) && R.word1 == wordsee && R.word2 == wordhell && R.word3 == wordjoin) + see_invisible = 15 + else + seer = 0 + see_invisible = 0 else if (istype(src.wear_mask, /obj/item/clothing/mask/gas/space_ninja)) switch(src.wear_mask:mode) if(1) diff --git a/code/modules/mob/living/carbon/monkey/monkey.dm b/code/modules/mob/living/carbon/monkey/monkey.dm index de9c189ae26..2764fbd29bb 100644 --- a/code/modules/mob/living/carbon/monkey/monkey.dm +++ b/code/modules/mob/living/carbon/monkey/monkey.dm @@ -709,4 +709,9 @@ /mob/living/carbon/monkey/heal_organ_damage(var/brute, var/burn) bruteloss = max(0, bruteloss-brute) //HACK fireloss = max(0, fireloss-burn) //HACK + src.updatehealth() + +/mob/living/carbon/monkey/take_organ_damage(var/brute, var/burn) + bruteloss += brute //HACK + fireloss += burn //HACK src.updatehealth() \ No newline at end of file diff --git a/code/modules/mob/living/silicon/aihologram/emote.dm b/code/modules/mob/living/silicon/aihologram/emote.dm index ee321cda0ba..d04ec9b2589 100644 --- a/code/modules/mob/living/silicon/aihologram/emote.dm +++ b/code/modules/mob/living/silicon/aihologram/emote.dm @@ -47,7 +47,10 @@ m_type = 1 if ("custom") - var/input = input("Choose an emote to display.") + var/input = input("Choose an emote to display.") as text|null + if (!input) + return + input = sanitize(input) var/input2 = input("Is this a visible or hearable emote?") in list("Visible","Hearable") if (input2 == "Visible") m_type = 1 diff --git a/code/modules/mob/living/silicon/hivebot/emote.dm b/code/modules/mob/living/silicon/hivebot/emote.dm index 844138a05da..12d71f6b7d2 100644 --- a/code/modules/mob/living/silicon/hivebot/emote.dm +++ b/code/modules/mob/living/silicon/hivebot/emote.dm @@ -56,7 +56,10 @@ m_type = 2 if ("custom") - var/input = input("Choose an emote to display.") + var/input = input("Choose an emote to display.") as text|null + if (!input) + return + input = sanitize(input) var/input2 = input("Is this a visible or hearable emote?") in list("Visible","Hearable") if (input2 == "Visible") m_type = 1 diff --git a/code/modules/mob/living/silicon/robot/emote.dm b/code/modules/mob/living/silicon/robot/emote.dm index dd5e96dfccd..8b33e6219df 100644 --- a/code/modules/mob/living/silicon/robot/emote.dm +++ b/code/modules/mob/living/silicon/robot/emote.dm @@ -56,7 +56,10 @@ m_type = 2 if ("custom") - var/input = input("Choose an emote to display.") + var/input = input("Choose an emote to display.") as text|null + if (!input) + return + input = sanitize(input) var/input2 = input("Is this a visible or hearable emote?") in list("Visible","Hearable") if (input2 == "Visible") m_type = 1 diff --git a/code/modules/mob/mob.dm b/code/modules/mob/mob.dm index 644d42bbeca..e567b6a5fe2 100644 --- a/code/modules/mob/mob.dm +++ b/code/modules/mob/mob.dm @@ -2256,16 +2256,74 @@ note dizziness decrements automatically in the mob's Life() proc. var/datum/organ/external/def_zone = ran_zone(t) return def_zone +// heal ONE external organ, organ gets randomly selected from damaged ones. /mob/proc/heal_organ_damage(var/brute, var/burn) - var/list/parts = list() - for(var/A in src.organs) - if(!src.organs[A]) continue - var/datum/organ/external/affecting = src.organs[A] - if(!istype(affecting)) continue - if((brute && affecting.brute_dam) || (burn && affecting.burn_dam)) - parts += affecting + var/list/datum/organ/external/parts = list() + for(var/organ_name in src.organs) + var/datum/organ/external/organ = src.organs[organ_name] + if((brute && organ.brute_dam) || (burn && organ.burn_dam)) + parts += organ - if(!parts.len) return + if(!parts.len) + return var/datum/organ/external/picked = pick(parts) picked.heal_damage(brute,burn) src.updatehealth() + +// damage ONE external organ, organ gets randomly selected from damaged ones. +/mob/proc/take_organ_damage(var/brute, var/burn) + var/list/datum/organ/external/parts = list() + for(var/organ_name in src.organs) + var/datum/organ/external/organ = src.organs[organ_name] + if(organ.brute_dam + organ.burn_dam < organ.max_damage) + parts += organ + + if(!parts.len) + return + var/datum/organ/external/picked = pick(parts) + picked.take_damage(brute,burn) + src.updatehealth() + +// heal MANY external organs, in random order +/mob/proc/heal_overall_damage(var/brute, var/burn) + var/list/datum/organ/external/parts = list() + for(var/organ_name in src.organs) + var/datum/organ/external/organ = src.organs[organ_name] + if((brute && organ.brute_dam) || (burn && organ.burn_dam)) + parts += organ + + while(parts.len && (brute>0 || burn>0) ) + var/datum/organ/external/picked = pick(parts) + + var/brute_was = picked.brute_dam + var/burn_was = picked.burn_dam + + picked.heal_damage(brute,burn) + + brute -= (brute_was-picked.brute_dam) + burn -= (burn_was-picked.burn_dam) + + parts -= picked + src.updatehealth() + +// damage MANY external organs, in random order +/mob/proc/take_overall_damage(var/brute, var/burn) + var/list/datum/organ/external/parts = list() + for(var/organ_name in src.organs) + var/datum/organ/external/organ = src.organs[organ_name] + if(organ.brute_dam + organ.burn_dam < organ.max_damage) + parts += organ + + while(parts.len && (brute>0 || burn>0) ) + var/datum/organ/external/picked = pick(parts) + + var/brute_was = picked.brute_dam + var/burn_was = picked.burn_dam + + picked.take_damage(brute,burn) + + brute -= (picked.brute_dam-brute_was) + burn -= (picked.burn_dam-burn_was) + + parts -= picked + src.updatehealth() diff --git a/code/modules/mob/transform_procs.dm b/code/modules/mob/transform_procs.dm index 3a75a02685b..1f47c34168a 100644 --- a/code/modules/mob/transform_procs.dm +++ b/code/modules/mob/transform_procs.dm @@ -42,6 +42,8 @@ O.virus.affected_mob = O if (src.client) src.client.mob = O + if(src.mind) + src.mind.transfer_to(O) O.a_intent = "hurt" O << "You are now a monkey." var/prev_body = src