@umang-boss/claudemon 2.1.2 → 2.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -21,7 +21,6 @@ import {
21
21
  generateEncounter,
22
22
  shouldBonusEncounter,
23
23
  shouldDiversityBonus,
24
- getTimeOfDayBias,
25
24
  } from "../engine/encounters.js";
26
25
  import type { EncounterContext } from "../engine/encounters.js";
27
26
  import { calculateMood } from "../engine/mood.js";
@@ -138,7 +137,6 @@ const evolutionReady = checkEvolution(pokemon, state) !== null;
138
137
  // Build encounter context for the enhanced trigger system
139
138
  const encounterSpeed = state.config.encounterSpeed ?? "normal";
140
139
  const currentHour = new Date().getHours();
141
- const timeOfDayTypes = getTimeOfDayBias(currentHour);
142
140
 
143
141
  const encounterCtx: EncounterContext = {
144
142
  xpSinceLastEncounter: (state.xpSinceLastEncounter ?? 0) + xpEvent.xp,
@@ -153,7 +151,7 @@ state.xpSinceLastEncounter = encounterCtx.xpSinceLastEncounter;
153
151
  let encounterTriggered = false;
154
152
 
155
153
  if (shouldTriggerEncounter(encounterCtx) && !state.pendingEncounter) {
156
- const encounter = generateEncounter(eventType, state, timeOfDayTypes);
154
+ const encounter = generateEncounter(eventType, state);
157
155
  if (encounter) {
158
156
  state.pendingEncounter = encounter;
159
157
  state.xpSinceLastEncounter = 0;
@@ -163,7 +161,7 @@ if (shouldTriggerEncounter(encounterCtx) && !state.pendingEncounter) {
163
161
  // 10% chance for a bonus encounter after a regular one
164
162
  // (bonus replaces the pending encounter with a second roll)
165
163
  if (shouldBonusEncounter()) {
166
- const bonusEncounter = generateEncounter(eventType, state, timeOfDayTypes);
164
+ const bonusEncounter = generateEncounter(eventType, state);
167
165
  if (bonusEncounter) {
168
166
  // The bonus encounter replaces the first; first is already set as pending
169
167
  // In practice the player still sees one encounter per trigger,
@@ -177,7 +175,7 @@ if (shouldTriggerEncounter(encounterCtx) && !state.pendingEncounter) {
177
175
  // Tool diversity bonus: if 3+ unique tool types used recently and no pending encounter,
178
176
  // grant an extra encounter opportunity
179
177
  if (!encounterTriggered && !state.pendingEncounter && shouldDiversityBonus(state.recentToolTypes)) {
180
- const diversityEncounter = generateEncounter(eventType, state, timeOfDayTypes);
178
+ const diversityEncounter = generateEncounter(eventType, state);
181
179
  if (diversityEncounter) {
182
180
  state.pendingEncounter = diversityEncounter;
183
181
  state.xpSinceLastEncounter = 0;
@@ -353,7 +353,7 @@ RIGHT_PAD=$(( COLS - ART_W - RIGHT_MARGIN ))
353
353
  SPRITE_PAD=$(( COLS - ART_W - RIGHT_MARGIN - JITTER_OFFSET ))
354
354
  [ "$SPRITE_PAD" -lt 0 ] && SPRITE_PAD=0
355
355
 
356
- # Build left array — line 1: model+context, line 2: update notice (if any)
356
+ # Build left array — line 1: model+context, line 2: update notification
357
357
  LEFT_LINES=()
358
358
  LEFT_LINES+=("$LEFT_1") # line 1: model · context
359
359
  LEFT_LINES+=("$LEFT_2") # line 2: update notification (or empty)
@@ -368,19 +368,23 @@ LEFT_COUNT=${#LEFT_LINES[@]}
368
368
  FULL_SPACER=""
369
369
  for (( s=0; s<SPRITE_PAD; s++ )); do FULL_SPACER+="$B"; done
370
370
 
371
- # ── Output name line ABOVE sprite with speech before name ──
372
- SPEECH_TEXT=""
373
- SPEECH_VISIBLE_W=0
371
+ # ── Output name line — speech left-aligned, name right-aligned ──
372
+ INFO_W=${#INFO_LINE}
373
+ SPEECH_OUT=""
374
+ SPEECH_OUT_W=0
375
+ SPEECH_LEFT_PAD=50
374
376
  if [ -n "$SPEECH" ]; then
375
- SPEECH_TEXT="${SPEECH_COLOR}${SPEECH}${NC} "
376
- SPEECH_VISIBLE_W=$(( ${#SPEECH} + 2 ))
377
+ SPEECH_PREFIX=""
378
+ for (( s=0; s<SPEECH_LEFT_PAD; s++ )); do SPEECH_PREFIX+="$B"; done
379
+ SPEECH_OUT="${SPEECH_PREFIX}${SPEECH_COLOR}${SPEECH}${NC}"
380
+ SPEECH_OUT_W=$(( ${#SPEECH} + SPEECH_LEFT_PAD ))
377
381
  fi
378
382
 
379
- NAME_PAD=$(( RIGHT_PAD - SPEECH_VISIBLE_W ))
380
- [ "$NAME_PAD" -lt 0 ] && NAME_PAD=0
381
- NAME_SPACER=""
382
- for (( s=0; s<NAME_PAD; s++ )); do NAME_SPACER+="$B"; done
383
- echo "${NAME_SPACER}${SPEECH_TEXT}${INFO_LINE}"
383
+ NAME_GAP=$(( COLS - SPEECH_OUT_W - INFO_W - RIGHT_MARGIN ))
384
+ [ "$NAME_GAP" -lt 1 ] && NAME_GAP=1
385
+ NAME_GAP_STR=""
386
+ for (( s=0; s<NAME_GAP; s++ )); do NAME_GAP_STR+="$B"; done
387
+ echo "${SPEECH_OUT}${NAME_GAP_STR}${INFO_LINE}"
384
388
 
385
389
  # ── Output sprite lines (right-aligned with jitter, left content merged) ──
386
390
  for (( i=0; i<SPRITE_COUNT; i++ )); do