mirror of
https://github.com/PolarisSS13/Polaris.git
synced 2026-08-30 00:30:06 +01:00
Merge pull request #8910 from MistakeNot4892/drakes2
Fixes charisma deadlocks resulting in drake players all being the ace simultaneously.
This commit is contained in:
@@ -104,7 +104,6 @@ You can eat glowing tree fruit to fuel your <b>ranged spitting attack</b> and <b
|
||||
return ..()
|
||||
|
||||
/mob/living/simple_mob/animal/sif/grafadreka/Initialize()
|
||||
charisma = rand(5, 15)
|
||||
stored_sap = rand(20, 30)
|
||||
nutrition = rand(400,500)
|
||||
if (gender == NEUTER)
|
||||
@@ -114,6 +113,7 @@ You can eat glowing tree fruit to fuel your <b>ranged spitting attack</b> and <b
|
||||
create_reagents(50)
|
||||
. = ..()
|
||||
original_armor = armor
|
||||
reset_charisma()
|
||||
update_icon()
|
||||
|
||||
|
||||
@@ -126,13 +126,21 @@ You can eat glowing tree fruit to fuel your <b>ranged spitting attack</b> and <b
|
||||
|
||||
/mob/living/simple_mob/animal/sif/grafadreka/Login()
|
||||
. = ..()
|
||||
charisma = (client && !is_baby) ? INFINITY : 0
|
||||
reset_charisma()
|
||||
|
||||
|
||||
/mob/living/simple_mob/animal/sif/grafadreka/proc/reset_charisma()
|
||||
if(client)
|
||||
charisma = rand(100, 200)
|
||||
else if(is_baby)
|
||||
charisma = 0
|
||||
else
|
||||
charisma = rand(5,15)
|
||||
|
||||
|
||||
/mob/living/simple_mob/animal/sif/grafadreka/Logout()
|
||||
. = ..()
|
||||
if (!client)
|
||||
charisma = rand(5, 15)
|
||||
reset_charisma()
|
||||
|
||||
|
||||
/mob/living/simple_mob/animal/sif/grafadreka/examine(mob/living/user)
|
||||
@@ -446,7 +454,11 @@ var/global/list/wounds_being_tended_by_drakes = list()
|
||||
if (follower == src || follower.is_baby || follower.stat == DEAD || follower.faction != faction)
|
||||
continue
|
||||
pack = TRUE
|
||||
if (!leader || follower.charisma > leader.charisma)
|
||||
if (!leader)
|
||||
leader = follower
|
||||
if(follower.charisma == leader.charisma)
|
||||
follower.charisma-- // to avoid deadlocks
|
||||
if (follower.charisma > leader.charisma)
|
||||
leader = follower
|
||||
if (pack)
|
||||
return leader
|
||||
|
||||
Reference in New Issue
Block a user