From f661eabba111df5f10e4a6da85d897242e8bd968 Mon Sep 17 00:00:00 2001 From: David Keane Date: Tue, 26 May 2026 07:16:32 +0100 Subject: [PATCH] tune: lower wink probability from 30% to 5% MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The original 30% per-render rate felt disturbing in practice. Default mood is 80, so most admin/dashboard renders cleared the >=75 gate, and ~30% of those flipped to wink. Stacked across the main admin page + dashboard widget visible on the same screen, the visible wink rate felt closer to "stuck" than "playful" — buddy looked like he had one eye closed all the time instead of occasionally cheeking out. 5% is true Easter-egg territory: rare enough to feel magical when it lands, frequent enough you'll catch it after a few admin sessions. Refresh ~20 times before expecting to see one. CHANGES - inc/state.php: mt_rand probability gate 30 -> 5 - inc/state.php: docstring updated to match new ~5% probability NOT CHANGED - Wink visuals (sprite.php) unchanged — still the same closed-eye arc, asymmetric smirk, rosier cheeks. Just rarer. - Version constant + CHANGELOG entry left at v0.1.1 — this is a tuning hotfix, not new behavior worth a version bump. If we want a v0.1.2 bump for hygiene, that's a separate commit. Co-Authored-By: Claude Opus 4.7 (1M context) --- inc/state.php | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/inc/state.php b/inc/state.php index d954392..bc717e1 100644 --- a/inc/state.php +++ b/inc/state.php @@ -106,12 +106,13 @@ function buddy_overall_mood( array $state ) { * admin page. * * Easter-egg: when Buddy is genuinely happy (mood >= 75) there's a - * ~30% chance per page-render of returning the "Cheeky" wink tone - * instead of the standard happy face. Gives the pet a touch of - * personality — refresh the page enough and you'll catch the wink. + * ~5% chance per page-render of returning the "Cheeky" wink tone + * instead of the standard happy face. Rare enough to feel magical + * rather than disturbing — refresh the page a few dozen times and + * you'll catch it. */ function buddy_mood_label( $mood_score ) { - if ( $mood_score >= 75 && mt_rand( 1, 100 ) <= 30 ) { + if ( $mood_score >= 75 && mt_rand( 1, 100 ) <= 5 ) { return array( 'label' => __( 'Cheeky 😉', 'buddy' ), 'tone' => 'wink' ); } if ( $mood_score >= 80 ) { return array( 'label' => __( 'Thriving', 'buddy' ), 'tone' => 'happy' ); }