mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-08-28 23:58:07 +01:00
Guardians no longer damage other guardians that share a summoner.
This commit is contained in:
@@ -60,11 +60,11 @@ var/global/list/parasites = list() //all currently existing/living guardians
|
||||
summoner.dust()
|
||||
ghostize()
|
||||
qdel(src)
|
||||
else
|
||||
/*else
|
||||
src << "<span class='danger'>Your summoner has died!</span>"
|
||||
visible_message("<span class='danger'><B>The [src] dies along with its user!</B></span>")
|
||||
ghostize()
|
||||
qdel(src)
|
||||
qdel(src)*/
|
||||
snapback()
|
||||
|
||||
/mob/living/simple_animal/hostile/guardian/Move() //Returns to summoner if they move out of range
|
||||
@@ -232,6 +232,22 @@ var/global/list/parasites = list() //all currently existing/living guardians
|
||||
src << "<span class='notice'>You deactivate your light.</span>"
|
||||
SetLuminosity(0)
|
||||
|
||||
////////parasite tracking/finding procs
|
||||
|
||||
/mob/living/proc/hasparasites() //returns a list of guardians the mob is a summoner for
|
||||
. = 0 //return nothing by default
|
||||
var/list/guardians = list()
|
||||
for(var/P in parasites)
|
||||
var/mob/living/simple_animal/hostile/guardian/G = P
|
||||
if(G.summoner == src)
|
||||
guardians |= G
|
||||
return guardians
|
||||
|
||||
/mob/living/simple_animal/hostile/guardian/proc/hasmatchingsummoner(mob/living/simple_animal/hostile/guardian/G) //returns 1 if the summoner matches the target's summoner
|
||||
if(istype(G) && G.summoner == summoner)
|
||||
return 1
|
||||
else
|
||||
return 0
|
||||
|
||||
////////Creation
|
||||
|
||||
@@ -249,12 +265,12 @@ var/global/list/parasites = list() //all currently existing/living guardians
|
||||
var/ling_failure = "The deck refuses to respond to a souless creature such as you."
|
||||
var/list/possible_guardians = list("Chaos", "Standard", "Ranged", "Support", "Explosive", "Lightning", "Protector", "Charger", "Assassin")
|
||||
var/random = TRUE
|
||||
var/allowmultiple = 0
|
||||
|
||||
/obj/item/weapon/guardiancreator/attack_self(mob/living/user)
|
||||
for(var/mob/living/simple_animal/hostile/guardian/G in living_mob_list)
|
||||
if (G.summoner == user)
|
||||
user << "You already have a [mob_name]!"
|
||||
return
|
||||
if(user.hasparasites() && !allowmultiple)
|
||||
user << "You already have a [mob_name]!"
|
||||
return
|
||||
if(user.mind && user.mind.changeling)
|
||||
user << "[ling_failure]"
|
||||
return
|
||||
|
||||
@@ -52,6 +52,8 @@
|
||||
if(isliving(A) && A != summoner)
|
||||
var/mob/living/L = A
|
||||
var/blocked = 0
|
||||
if(hasmatchingsummoner(A)) //if the summoner matches don't hurt them
|
||||
blocked = 1
|
||||
if(ishuman(A))
|
||||
var/mob/living/carbon/human/H = A
|
||||
if(H.check_shields(90, "the [name]", src, attack_type = THROWN_PROJECTILE_ATTACK))
|
||||
|
||||
@@ -18,6 +18,8 @@
|
||||
PoolOrNew(/obj/effect/overlay/temp/guardian/phase/out, get_turf(M))
|
||||
do_teleport(M, M, 10)
|
||||
for(var/mob/living/L in range(1, M))
|
||||
if(hasmatchingsummoner(L)) //if the summoner matches don't hurt them
|
||||
continue
|
||||
if(L != src && L != summoner)
|
||||
L.apply_damage(15, BRUTE)
|
||||
PoolOrNew(/obj/effect/overlay/temp/explosion, get_turf(M))
|
||||
@@ -42,7 +44,7 @@
|
||||
name = "bomb"
|
||||
desc = "You shouldn't be seeing this!"
|
||||
var/obj/stored_obj
|
||||
var/mob/living/spawner
|
||||
var/mob/living/simple_animal/hostile/guardian/spawner
|
||||
|
||||
|
||||
/obj/item/weapon/guardian_bomb/proc/disguise(var/obj/A)
|
||||
@@ -66,7 +68,7 @@
|
||||
qdel(src)
|
||||
|
||||
/obj/item/weapon/guardian_bomb/Bump(atom/A)
|
||||
if(isliving(A))
|
||||
if(isliving(A) && !spawner.hasmatchingsummoner(A))
|
||||
detonate(A)
|
||||
else
|
||||
..()
|
||||
|
||||
@@ -20,7 +20,7 @@
|
||||
|
||||
/mob/living/simple_animal/hostile/guardian/fire/AttackingTarget()
|
||||
if(..())
|
||||
if(ishuman(target))
|
||||
if(ishuman(target) && target != summoner)
|
||||
spawn(0)
|
||||
new /obj/effect/hallucination/delusion(target.loc,target,force_kind="custom",duration=200,skip_nearby=0, custom_icon = src.icon_state, custom_icon_file = src.icon)
|
||||
|
||||
@@ -39,6 +39,6 @@
|
||||
/mob/living/simple_animal/hostile/guardian/fire/proc/collision_ignite(AM as mob|obj)
|
||||
if(istype(AM, /mob/living/))
|
||||
var/mob/living/M = AM
|
||||
if(AM != summoner && M.fire_stacks < 7)
|
||||
if(!hasmatchingsummoner(M) && M != summoner && M.fire_stacks < 7)
|
||||
M.fire_stacks = 7
|
||||
M.IgniteMob()
|
||||
|
||||
@@ -88,6 +88,8 @@
|
||||
var/turf/T = turf
|
||||
for(var/mob/living/L in T)
|
||||
if(L.stat != DEAD && L != src && L != summoner)
|
||||
if(hasmatchingsummoner(L)) //if the summoner matches don't hurt them
|
||||
continue
|
||||
if(successfulshocks > 4)
|
||||
if(iscarbon(L))
|
||||
var/mob/living/carbon/C = L
|
||||
|
||||
Reference in New Issue
Block a user