mirror of
https://github.com/Aurorastation/Aurora.3.git
synced 2026-01-10 17:32:36 +00:00
Ports (and adjusts) Baystation12/Baystation12#12521 et al. Essentially brings our visualnet code up to the standard of three years ago, rather than five. Side effects of merging may include but are not limited to loss of AI vision, helmet camera failure, garbage collection implosion, infinite turf loops, and unintended layer shenanigans. High-level changes: Overall, visualnet/chunk procs have been renamed and refactored to be clear as to their function. Fix some layering issues related to magic numbers, these have been set to constants. Visualnets now track source movement rather than overriding individual mob/obj procs. Adds obfuscation underlay to complicate memory fudging to remove camera static. Cameras now only add themselves to the cameranet if they're on open (non-restricted) networks. Helmet cameras now use cameras themselves rather than network defines. Adds a sorted object list insertion helper. The Camera MIU (presently unused) should now function properly. Unused cultnet / cult mask deleted because refactoring that would likely kill the few brain cells I have left
126 lines
3.9 KiB
Plaintext
126 lines
3.9 KiB
Plaintext
/datum/disease/wizarditis
|
|
name = "Wizarditis"
|
|
max_stages = 4
|
|
spread = "Airborne"
|
|
cure = "The Manly Dorf"
|
|
cure_id = "manlydorf"
|
|
cure_chance = 100
|
|
agent = "Rincewindus Vulgaris"
|
|
affected_species = list("Human")
|
|
curable = 1
|
|
permeability_mod = 0.75
|
|
desc = "Some speculate, that this virus is the cause of Wizard Federation existance. Subjects affected show the signs of mental retardation, yelling obscure sentences or total gibberish. On late stages subjects sometime express the feelings of inner power, and, cite, 'the ability to control the forces of cosmos themselves!' A gulp of strong, manly spirits usually reverts them to normal, humanlike, condition."
|
|
severity = "Major"
|
|
|
|
|
|
/*
|
|
BIRUZ BENNAR
|
|
SCYAR NILA - teleport
|
|
NEC CANTIO - dis techno
|
|
EI NATH - shocking grasp
|
|
AULIE OXIN FIERA - knock
|
|
TARCOL MINTI ZHERI - forcewall
|
|
STI KALY - blind
|
|
*/
|
|
|
|
/datum/disease/wizarditis/stage_act()
|
|
..()
|
|
|
|
switch(stage)
|
|
if(2)
|
|
if(prob(1)&&prob(50))
|
|
affected_mob.say(pick("You shall not pass!", "Expeliarmus!", "By Merlins beard!", "Feel the power of the Dark Side!"))
|
|
if(prob(1)&&prob(50))
|
|
var/arrows_var3 = pick("that you don't have enough mana.", "that the winds of magic are gone.", "an urge to summon familiar.")
|
|
to_chat(affected_mob, "<span class='warning'>You feel [arrows_var3]</span>")
|
|
|
|
|
|
if(3)
|
|
if(prob(1)&&prob(50))
|
|
affected_mob.say(pick("NEC CANTIO!","AULIE OXIN FIERA!", "STI KALY!", "TARCOL MINTI ZHERI!"))
|
|
if(prob(1)&&prob(50))
|
|
var/gunbuster = pick("the magic bubbling in your veins.","that this location gives you a +1 to INT.","an urge to summon familiar.")
|
|
to_chat(affected_mob, "<span class='warning'>You feel [gunbuster]</span>")
|
|
|
|
if(4)
|
|
|
|
if(prob(1))
|
|
affected_mob.say(pick("NEC CANTIO!","AULIE OXIN FIERA!","STI KALY!","EI NATH!"))
|
|
return
|
|
if(prob(1)&&prob(50))
|
|
var/arrows_var4 = pick("the tidal wave of raw power building inside.","that this location gives you a +2 to INT and +1 to WIS.","an urge to teleport.")
|
|
to_chat(affected_mob, "<span class='warning'>You feel [arrows_var4]</span>")
|
|
spawn_wizard_clothes(50)
|
|
if(prob(1)&&prob(1))
|
|
teleport()
|
|
return
|
|
|
|
|
|
|
|
/datum/disease/wizarditis/proc/spawn_wizard_clothes(var/chance = 0)
|
|
if(istype(affected_mob, /mob/living/carbon/human))
|
|
var/mob/living/carbon/human/H = affected_mob
|
|
if(prob(chance))
|
|
if(!istype(H.head, /obj/item/clothing/head/wizard))
|
|
if(H.head)
|
|
H.drop_from_inventory(H.head)
|
|
H.head = new /obj/item/clothing/head/wizard(H)
|
|
H.head.layer = SCREEN_LAYER+0.01
|
|
return
|
|
if(prob(chance))
|
|
if(!istype(H.wear_suit, /obj/item/clothing/suit/wizrobe))
|
|
if(H.wear_suit)
|
|
H.drop_from_inventory(H.wear_suit)
|
|
H.wear_suit = new /obj/item/clothing/suit/wizrobe(H)
|
|
H.wear_suit.layer = SCREEN_LAYER+0.01
|
|
return
|
|
if(prob(chance))
|
|
if(!istype(H.shoes, /obj/item/clothing/shoes/sandal))
|
|
if(H.shoes)
|
|
H.drop_from_inventory(H.shoes)
|
|
H.shoes = new /obj/item/clothing/shoes/sandal(H)
|
|
H.shoes.layer = SCREEN_LAYER+0.01
|
|
return
|
|
else
|
|
var/mob/living/carbon/H = affected_mob
|
|
if(prob(chance))
|
|
if(!istype(H.r_hand, /obj/item/staff))
|
|
H.drop_r_hand()
|
|
H.put_in_r_hand( new /obj/item/staff(H) )
|
|
return
|
|
return
|
|
|
|
|
|
|
|
/datum/disease/wizarditis/proc/teleport()
|
|
var/list/theareas = new/list()
|
|
for(var/area/AR in orange(80, affected_mob))
|
|
if(theareas.Find(AR) || AR.name == "Space") continue
|
|
theareas += AR
|
|
|
|
if(!theareas)
|
|
return
|
|
|
|
var/area/thearea = pick(theareas)
|
|
|
|
var/list/L = list()
|
|
for(var/turf/T in get_area_turfs(thearea.type))
|
|
if(T.z != affected_mob.z) continue
|
|
if(T.name == "space") continue
|
|
if(!T.density)
|
|
var/clear = 1
|
|
for(var/obj/O in T)
|
|
if(O.density)
|
|
clear = 0
|
|
break
|
|
if(clear)
|
|
L+=T
|
|
|
|
if(!L)
|
|
return
|
|
|
|
affected_mob.say("SCYAR NILA [uppertext(thearea.name)]!")
|
|
affected_mob.forceMove(pick(L))
|
|
|
|
return
|