Fixes mobs that aren't able to speak being able to cast spoken spells (#52054)

* Fixes wizard speaking

* defines
This commit is contained in:
ShizCalev
2020-07-08 19:25:39 +02:00
committed by GitHub
parent d2e9139619
commit f4c54ccea4
25 changed files with 67 additions and 60 deletions
+4
View File
@@ -92,3 +92,7 @@
// Audio/Visual Flags. Used to determine what sense are required to notice a message.
#define MSG_VISUAL (1<<0)
#define MSG_AUDIBLE (1<<1)
#define INVOCATION_SHOUT "shout"
#define INVOCATION_EMOTE "emote"
#define INVOCATION_WHISPER "whisper"
+1 -1
View File
@@ -180,7 +180,7 @@
clothes_req = FALSE
charge_max = 600
invocation = "DOOOOOOOOOOOOOOOOOOOOM!!!"
invocation_type = "shout"
invocation_type = INVOCATION_SHOUT
action_icon_state = "void_magnet"
/obj/effect/proc_holder/spell/self/void/can_cast(mob/user = usr)
@@ -3,7 +3,7 @@
desc = "Low range spell allowing you to pass through a few walls."
school = "transmutation"
invocation = "ASH'N P'SSG'"
invocation_type = "whisper"
invocation_type = INVOCATION_WHISPER
charge_max = 150
range = -1
action_icon = 'icons/mob/actions/actions_ecult.dmi'
@@ -83,7 +83,7 @@
charge_max = 300 //twice as long as mansus grasp
clothes_req = FALSE
invocation = "A'GRSV SPR'D"
invocation_type = "whisper"
invocation_type = INVOCATION_WHISPER
range = 3
action_icon = 'icons/mob/actions/actions_ecult.dmi'
action_icon_state = "corrode"
@@ -111,7 +111,7 @@
charge_max = 150
clothes_req = FALSE
invocation = "FL'MS O'ET'RN'ITY"
invocation_type = "whisper"
invocation_type = INVOCATION_WHISPER
action_icon = 'icons/mob/actions/actions_ecult.dmi'
action_icon_state = "blood_siphon"
action_background_icon_state = "bg_ecult"
@@ -164,7 +164,7 @@
action_icon_state = "rust_wave"
action_background_icon_state = "bg_ecult"
invocation = "SPR'D TH' WO'D"
invocation_type = "whisper"
invocation_type = INVOCATION_WHISPER
/obj/projectile/magic/spell/rust_wave
name = "Patron's Reach"
@@ -211,7 +211,7 @@
charge_max = 350
clothes_req = FALSE
invocation = "CL'VE"
invocation_type = "whisper"
invocation_type = INVOCATION_WHISPER
range = 9
action_icon = 'icons/mob/actions/actions_ecult.dmi'
action_icon_state = "cleave"
@@ -299,7 +299,7 @@
desc = "Powerful spell that releases 5 streams of fire away from you."
school = "transmutation"
invocation = "F'RE"
invocation_type = "whisper"
invocation_type = INVOCATION_WHISPER
charge_max = 300
range = 15
clothes_req = FALSE
@@ -362,7 +362,7 @@
/obj/effect/proc_holder/spell/targeted/shapeshift/eldritch
invocation = "SH'PE"
invocation_type = "whisper"
invocation_type = INVOCATION_WHISPER
clothes_req = FALSE
action_background_icon_state = "bg_ecult"
possible_shapes = list(/mob/living/simple_animal/mouse,\
@@ -375,7 +375,7 @@
/obj/effect/proc_holder/spell/targeted/emplosion/eldritch
name = "Energetic Pulse"
invocation = "E'P"
invocation_type = "whisper"
invocation_type = INVOCATION_WHISPER
clothes_req = FALSE
action_background_icon_state = "bg_ecult"
range = -1
@@ -391,7 +391,7 @@
charge_max = 300 //twice as long as mansus grasp
clothes_req = FALSE
invocation = "C'SC'DE"
invocation_type = "whisper"
invocation_type = INVOCATION_WHISPER
range = 4
action_icon = 'icons/mob/actions/actions_ecult.dmi'
action_icon_state = "fire_ring"
@@ -415,7 +415,7 @@
/obj/effect/proc_holder/spell/targeted/telepathy/eldritch
invocation = ""
invocation_type = "whisper"
invocation_type = INVOCATION_WHISPER
clothes_req = FALSE
action_background_icon_state = "bg_ecult"
@@ -423,7 +423,7 @@
name = "Oath of Fire"
desc = "For a minute you will passively create a ring of fire around you."
invocation = "FL'MS"
invocation_type = "whisper"
invocation_type = INVOCATION_WHISPER
clothes_req = FALSE
action_background_icon_state = "bg_ecult"
range = -1
@@ -489,7 +489,7 @@
name = "Nightwatcher's Rebirth"
desc = "Drains nearby alive people that are engulfed in flames. It heals 10 of each damage type per person. If a person is in critical condition it finishes them off."
invocation = "GL'RY T' TH' N'GHT'W'TCH'ER"
invocation_type = "whisper"
invocation_type = INVOCATION_WHISPER
clothes_req = FALSE
action_background_icon_state = "bg_ecult"
range = -1
@@ -363,7 +363,7 @@
charge_max = 100
clothes_req = 0
invocation = "JE VES"
invocation_type = "whisper"
invocation_type = INVOCATION_WHISPER
range = -1
level_max = 0 //cannot be improved
cooldown_min = 100
@@ -20,7 +20,6 @@
maxHealth = 50000
health = 50000
healable = 0
harm_intent_damage = 10
obj_damage = 100
melee_damage_lower = 68
@@ -109,6 +108,9 @@
if(!can_be_seen(get_turf(loc)))
..()
/mob/living/simple_animals/hostile/statue/IsVocal() //we're a statue, of course we can't talk.
return FALSE
/mob/living/simple_animal/hostile/statue/proc/can_be_seen(turf/destination)
if(!cannot_be_seen)
return null
+9 -8
View File
@@ -181,14 +181,15 @@ GLOBAL_LIST_INIT(spells, typesof(/obj/effect/proc_holder/spell)) //needed for th
to_chat(user, "<span class='warning'>[name] cannot be cast unless you are completely manifested in the material plane!</span>")
return FALSE
var/mob/living/L = user
if(istype(L) && (invocation_type == INVOCATION_WHISPER || invocation_type == INVOCATION_SHOUT) && !L.can_speak_vocal())
to_chat(user, "<span class='warning'>You can't get the words out!</span>")
return FALSE
if(ishuman(user))
var/mob/living/carbon/human/H = user
if((invocation_type == "whisper" || invocation_type == "shout") && !H.can_speak_vocal())
to_chat(user, "<span class='warning'>You can't get the words out!</span>")
return FALSE
var/list/casting_clothes = typecacheof(list(/obj/item/clothing/suit/wizrobe,
/obj/item/clothing/suit/space/hardsuit/wizard,
/obj/item/clothing/head/wizard,
@@ -247,17 +248,17 @@ GLOBAL_LIST_INIT(spells, typesof(/obj/effect/proc_holder/spell)) //needed for th
/obj/effect/proc_holder/spell/proc/invocation(mob/user = usr) //spelling the spell out and setting it on recharge/reducing charges amount
switch(invocation_type)
if("shout")
if(INVOCATION_SHOUT)
if(prob(50))//Auto-mute? Fuck that noise
user.say(invocation, forced = "spell")
else
user.say(replacetext(invocation," ","`"), forced = "spell")
if("whisper")
if(INVOCATION_WHISPER)
if(prob(50))
user.whisper(invocation)
else
user.whisper(replacetext(invocation," ","`"))
if("emote")
if(INVOCATION_EMOTE)
user.visible_message(invocation, invocation_emote_self) //same style as in mob/living/emote.dm
/obj/effect/proc_holder/spell/proc/playMagSound()
@@ -557,7 +558,7 @@ GLOBAL_LIST_INIT(spells, typesof(/obj/effect/proc_holder/spell)) //needed for th
charge_max = 100
cooldown_min = 50
invocation = "Victus sano!"
invocation_type = "whisper"
invocation_type = INVOCATION_WHISPER
school = "restoration"
sound = 'sound/magic/staff_healing.ogg'
+3 -3
View File
@@ -95,7 +95,7 @@
charge_max = 100
clothes_req = FALSE
invocation = "P'WAH, UNLIM'TED P'WAH"
invocation_type = "shout"
invocation_type = INVOCATION_SHOUT
cooldown_min = 20
base_icon_state = "lightning"
action_icon_state = "lightning0"
@@ -113,7 +113,7 @@
charge_max = 60
clothes_req = FALSE
invocation = "ONI SOMA"
invocation_type = "shout"
invocation_type = INVOCATION_SHOUT
range = 20
cooldown_min = 20 //10 deciseconds reduction per rank
projectile_type = /obj/projectile/magic/aoe/fireball
@@ -136,7 +136,7 @@
charge_max = 50
clothes_req = FALSE
invocation = "Sigi'lu M'Fan 'Tasia"
invocation_type = "shout"
invocation_type = INVOCATION_SHOUT
range = 40
cooldown_min = 10
projectile_amount = 5
@@ -82,8 +82,8 @@
words = "[invocation]"
switch(invocation_type)
if("shout")
if(INVOCATION_SHOUT)
user.say(words, forced = "spell")
playsound(user.loc, pick('sound/misc/null.ogg','sound/misc/null.ogg'), 100, TRUE)
if("whisper")
if(INVOCATION_WHISPER)
user.whisper(words, forced = "spell")
+1 -1
View File
@@ -6,7 +6,7 @@
charge_max = 600
clothes_req = FALSE
invocation = "DIRI CEL"
invocation_type = "whisper"
invocation_type = INVOCATION_WHISPER
range = -1
cooldown_min = 400 //50 deciseconds reduction per rank
include_user = TRUE
+4 -4
View File
@@ -23,7 +23,7 @@
/obj/effect/proc_holder/spell/targeted/conjure_item/violin
item_type = /obj/item/instrument/violin/golden
desc = "A devil's instrument of choice. Use this to summon/unsummon your golden violin."
invocation_type = "whisper"
invocation_type = INVOCATION_WHISPER
invocation = "I ain't had this much fun since Georgia."
action_icon_state = "golden_violin"
name = "Summon golden violin"
@@ -33,7 +33,7 @@
/obj/effect/proc_holder/spell/targeted/summon_contract
name = "Summon infernal contract"
desc = "Skip making a contract by hand, just do it by magic."
invocation_type = "whisper"
invocation_type = INVOCATION_WHISPER
invocation = "Just sign on the dotted line."
include_user = FALSE
range = 5
@@ -81,7 +81,7 @@
charge_max = 80
clothes_req = FALSE
invocation = "Your very soul will catch fire!"
invocation_type = "shout"
invocation_type = INVOCATION_SHOUT
range = 2
projectile_type = /obj/projectile/magic/aoe/fireball/infernal
@@ -181,7 +181,7 @@
random_target_priority = TARGET_RANDOM
max_targets = 3
invocation = "TASTE SIN AND INDULGE!!"
invocation_type = "shout"
invocation_type = INVOCATION_SHOUT
/obj/effect/proc_holder/spell/targeted/sintouch/ascended
name = "Greater sin touch"
+1 -1
View File
@@ -5,7 +5,7 @@
charge_max = 100
clothes_req = FALSE
invocation = "TARCOL MINTI ZHERI"
invocation_type = "shout"
invocation_type = INVOCATION_SHOUT
sound = 'sound/magic/forcewall.ogg'
action_icon_state = "shield"
range = -1
+1 -1
View File
@@ -6,7 +6,7 @@
charge_max = 100
clothes_req = FALSE
invocation = "AULIE OXIN FIERA"
invocation_type = "whisper"
invocation_type = INVOCATION_WHISPER
range = 3
cooldown_min = 20 //20 deciseconds reduction per rank
+1 -1
View File
@@ -11,7 +11,7 @@
clothes_req = FALSE
centcom_cancast = FALSE
invocation = "NECREM IMORTIUM!"
invocation_type = "shout"
invocation_type = INVOCATION_SHOUT
range = -1
level_max = 0 //cannot be improved
cooldown_min = 10
+1 -1
View File
@@ -5,7 +5,7 @@
charge_max = 300
clothes_req = TRUE
invocation = "UN'LTD P'WAH!"
invocation_type = "shout"
invocation_type = INVOCATION_SHOUT
range = 7
cooldown_min = 30
selection_type = "view"
+5 -5
View File
@@ -4,7 +4,7 @@
school = "mime"
panel = "Mime"
summon_type = list(/obj/effect/forcefield/mime)
invocation_type = "emote"
invocation_type = INVOCATION_EMOTE
invocation_emote_self = "<span class='notice'>You form a wall in front of yourself.</span>"
summon_lifespan = 300
charge_max = 300
@@ -34,7 +34,7 @@
school = "mime"
panel = "Mime"
summon_type = list(/obj/structure/chair/mime)
invocation_type = "emote"
invocation_type = INVOCATION_EMOTE
invocation_emote_self = "<span class='notice'>You conjure an invisible chair and sit down.</span>"
summon_lifespan = 250
charge_max = 300
@@ -72,7 +72,7 @@
school = "mime"
panel = "Mime"
summon_type = list(/obj/item/storage/box/mime)
invocation_type = "emote"
invocation_type = INVOCATION_EMOTE
invocation_emote_self = "<span class='notice'>You conjure up an invisible box, large enough to store a few things.</span>"
summon_lifespan = 500
charge_max = 300
@@ -151,7 +151,7 @@
school = "mime"
panel = "Mime"
wall_type = /obj/effect/forcefield/mime/advanced
invocation_type = "emote"
invocation_type = INVOCATION_EMOTE
invocation_emote_self = "<span class='notice'>You form a blockade in front of yourself.</span>"
charge_max = 600
sound = null
@@ -182,7 +182,7 @@
charge_max = 300
clothes_req = FALSE
antimagic_allowed = TRUE
invocation_type = "emote"
invocation_type = INVOCATION_EMOTE
invocation_emote_self = "<span class='dangers'>You fire your finger gun!</span>"
range = 20
projectile_type = /obj/projectile/bullet/mime
@@ -8,7 +8,7 @@
clothes_req = FALSE
stat_allowed = FALSE
invocation = "KN'A FTAGHU, PUCK 'BTHNK!"
invocation_type = "shout"
invocation_type = INVOCATION_SHOUT
range = 7
cooldown_min = 30
ranged_mousepointer = 'icons/effects/mouse_pointers/barn_target.dmi'
@@ -5,7 +5,7 @@
charge_max = 300
clothes_req = FALSE
invocation = "STI KALY"
invocation_type = "whisper"
invocation_type = INVOCATION_WHISPER
message = "<span class='notice'>Your eyes cry out in pain!</span>"
cooldown_min = 50 //12 deciseconds reduction per rank
starting_spells = list("/obj/effect/proc_holder/spell/targeted/inflict_handler/blind", "/obj/effect/proc_holder/spell/targeted/genetic/blind")
@@ -5,7 +5,7 @@
charge_max = 600
clothes_req = FALSE
invocation = "GIN'YU CAPAN"
invocation_type = "whisper"
invocation_type = INVOCATION_WHISPER
range = 1
cooldown_min = 200 //100 deciseconds reduction per rank
ranged_mousepointer = 'icons/effects/mouse_pointers/mindswap_target.dmi'
+1 -1
View File
@@ -8,7 +8,7 @@
range = -1
include_user = TRUE
invocation = "CLANG!"
invocation_type = "shout"
invocation_type = INVOCATION_SHOUT
action_icon_state = "immrod"
/obj/effect/proc_holder/spell/targeted/rod_form/cast(list/targets,mob/user = usr)
+1 -1
View File
@@ -7,7 +7,7 @@
clothes_req = FALSE
antimagic_allowed = TRUE
invocation = "HO HO HO"
invocation_type = "shout"
invocation_type = INVOCATION_SHOUT
range = 3
cooldown_min = 50
@@ -8,7 +8,7 @@
range = -1
include_user = TRUE
invocation = "RAC'WA NO!"
invocation_type = "shout"
invocation_type = INVOCATION_SHOUT
action_icon_state = "shapeshift"
var/revert_on_death = TRUE
+1 -1
View File
@@ -10,7 +10,7 @@
school = "necromancy" //i could see why this wouldn't be necromancy but messing with souls or whatever. ectomancy?
charge_max = 10
invocation = "AT ANY COST!"
invocation_type = "shout"
invocation_type = INVOCATION_SHOUT
level_max = 0
cooldown_min = 10
@@ -5,7 +5,7 @@
charge_max = 100
clothes_req = FALSE
invocation = "GAR YOK"
invocation_type = "whisper"
invocation_type = INVOCATION_WHISPER
range = -1
level_max = 0 //cannot be improved
cooldown_min = 100
+1 -1
View File
@@ -7,7 +7,7 @@
clothes_req = TRUE
invocation = "CAVERE INSIDIAS"
invocation_type = "shout"
invocation_type = INVOCATION_SHOUT
range = 3
summon_type = list(
+9 -9
View File
@@ -6,7 +6,7 @@
charge_max = 200
clothes_req = TRUE
invocation = "FORTI GY AMA"
invocation_type = "shout"
invocation_type = INVOCATION_SHOUT
range = 7
cooldown_min = 60 //35 deciseconds reduction per rank
max_targets = 0
@@ -45,7 +45,7 @@
charge_max = 400
clothes_req = TRUE
invocation = "BIRUZ BENNAR"
invocation_type = "shout"
invocation_type = INVOCATION_SHOUT
range = -1
include_user = TRUE
@@ -99,7 +99,7 @@
charge_max = 400
clothes_req = TRUE
invocation = "NEC CANTIO"
invocation_type = "shout"
invocation_type = INVOCATION_SHOUT
range = -1
include_user = TRUE
cooldown_min = 200 //50 deciseconds reduction per rank
@@ -146,7 +146,7 @@
charge_max = 600
clothes_req = TRUE
invocation = "SCYAR NILA"
invocation_type = "shout"
invocation_type = INVOCATION_SHOUT
range = -1
include_user = TRUE
cooldown_min = 200 //100 deciseconds reduction per rank
@@ -170,7 +170,7 @@
charge_max = 500
clothes_req = TRUE
invocation = "TOKI YO TOMARE"
invocation_type = "shout"
invocation_type = INVOCATION_SHOUT
range = 0
cooldown_min = 100
action_icon_state = "time"
@@ -188,7 +188,7 @@
charge_max = 1200
clothes_req = TRUE
invocation = "NOUK FHUNMM SACP RISSKA"
invocation_type = "shout"
invocation_type = INVOCATION_SHOUT
range = 1
summon_type = list(/mob/living/simple_animal/hostile/carp)
@@ -216,7 +216,7 @@
charge_max = 1200
clothes_req = FALSE
invocation = "IA IA"
invocation_type = "shout"
invocation_type = INVOCATION_SHOUT
summon_amt = 10
range = 3
@@ -235,7 +235,7 @@
charge_max = 400
clothes_req = TRUE
invocation = "GITTAH WEIGH"
invocation_type = "shout"
invocation_type = INVOCATION_SHOUT
range = 5
cooldown_min = 150
selection_type = "view"
@@ -311,7 +311,7 @@
charge_max = 60
clothes_req = FALSE
invocation = "FI'RAN DADISKO"
invocation_type = "shout"
invocation_type = INVOCATION_SHOUT
max_targets = 0
range = 6
include_user = TRUE