From 9c2fa80c9f1bf6f7aa50f0e2f7e8a4659e635c98 Mon Sep 17 00:00:00 2001 From: SkyratBot <59378654+SkyratBot@users.noreply.github.com> Date: Sun, 4 Sep 2022 14:44:22 +0200 Subject: [PATCH] [MIRROR] Improvement to monkey AI's weapon selection ability. Won't attack With zero force items. [MDB IGNORE] (#15914) * Improvement to monkey AI's weapon selection ability. Won't attack With zero force items. (#69490) Monkeys will now drop the item in their hand when selecting a weapon to attack with if it is worse than their basic bite attack, and will avoid picking up a weapon if they can't find one that's better than their basic bite attack. Because of this, you can no longer completely disable monkeys by filling their hands with zero force items. This also means you can no longer trick monkeys into using sutures and other medical items on you. * Improvement to monkey AI's weapon selection ability. Won't attack With zero force items. Co-authored-by: itseasytosee <55666666+itseasytosee@users.noreply.github.com> --- code/datums/ai/monkey/monkey_controller.dm | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/code/datums/ai/monkey/monkey_controller.dm b/code/datums/ai/monkey/monkey_controller.dm index aad1bf87497..e347b51e362 100644 --- a/code/datums/ai/monkey/monkey_controller.dm +++ b/code/datums/ai/monkey/monkey_controller.dm @@ -128,6 +128,10 @@ have ways of interacting with a specific mob and control it. for(var/obj/item/item in oview(2, living_pawn)) nearby_items += item + for(var/obj/item/item in living_pawn.held_items) // If we've got some garbage in out hands thats going to stop us from effectivly attacking, we should get rid of it. + if(item.force < 2) + living_pawn.dropItemToGround(item) + weapon = GetBestWeapon(src, nearby_items, living_pawn.held_items) var/pickpocket = FALSE @@ -138,6 +142,9 @@ have ways of interacting with a specific mob and control it. pickpocket = TRUE weapon = held_weapon + if(weapon.force < 2) // our bite does 2 damage on avarage, no point in settling for anything less + return FALSE + if(!weapon || (weapon in living_pawn.held_items)) return FALSE