From ec9b3f1bc49793707b9d0aa2815f14ac6c600fd2 Mon Sep 17 00:00:00 2001 From: Ignose Date: Sat, 14 Dec 2024 16:14:07 -0500 Subject: [PATCH] Peace Turkey Initial --- .../src/familiar/constantValueFamiliars.ts | 24 ++++++++++++++++++- 1 file changed, 23 insertions(+), 1 deletion(-) diff --git a/packages/garbo/src/familiar/constantValueFamiliars.ts b/packages/garbo/src/familiar/constantValueFamiliars.ts index fa7c7c6d4..dc989a1b2 100644 --- a/packages/garbo/src/familiar/constantValueFamiliars.ts +++ b/packages/garbo/src/familiar/constantValueFamiliars.ts @@ -1,4 +1,10 @@ -import { Familiar, holiday, myAdventures } from "kolmafia"; +import { + Familiar, + familiarWeight, + holiday, + myAdventures, + squareRoot, +} from "kolmafia"; import { $effect, $familiar, @@ -6,6 +12,7 @@ import { $items, clamp, findLeprechaunMultiplier, + get, getActiveEffects, getModifier, have, @@ -117,8 +124,23 @@ const standardFamiliars: ConstantValueFamiliar[] = [ familiar: $familiar`quantum entangler`, value: () => garboValue($item`quantized familiar experience`) / 11, }, + { + familiar: $familiar`Peace Turkey`, + value: () => + get("peaceTurkeyIndex") === 0 || get("peaceTurkeyIndex") === 3 + ? garboValue($item`whirled peas`) * peaceTurkeyDropChance() + : get("peaceTurkeyIndex") === 4 + ? garboValue($item`piece of cake`) * peaceTurkeyDropChance() + : get("peaceTurkeyIndex") === 6 + ? garboValue($item`peace shooter`) * peaceTurkeyDropChance() + : 0, + }, ]; +function peaceTurkeyDropChance(): number { + return 0.24 + squareRoot(familiarWeight($familiar`Peace Turkey`)); +} + export default function getConstantValueFamiliars( mode: "barf" | "free" | "target", ): GeneralFamiliar[] {