Commit Graph

11 Commits

Author SHA1 Message Date
marcos 67a2cbb37d Document mail, death history, achievements, weekly rankings, spontaneous AI and BlueMap markers
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_016pEyCmrAYHBFgpYjwFxKxh
2026-08-08 01:05:53 +00:00
marcos c11085e95e Document the notes module
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_016pEyCmrAYHBFgpYjwFxKxh
2026-08-07 23:49:12 +00:00
marcos 5653836262 Document the AI personality, chat/world context and preflight harness
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_016pEyCmrAYHBFgpYjwFxKxh
2026-08-07 22:50:30 +00:00
marcos b77a38b394 Make zoacao match rule editable in-game: mode + pattern + message list
Zoacao now matches a configurable pattern under a configurable mode
(igual/contem/comeca/termina/regex) instead of only a bare 'f'. The mode,
the trigger pattern, and the gag message list are all editable live via
/canalhandia zoacao <listar|modo|padrao|adicionar|remover|limpar>; every
change writes through to config.yml immediately. config.yml gains
zoacao.correspondencia + zoacao.padrao (default igual + 'f').

Zoacao.replace/ matches gained a Mode + pattern signature; ZoacaoTest
covers all five modes (incl. invalid-regex guard) and the byKey parser.
136 tests green.

Co-Authored-By: Claude <noreply@anthropic.com>
2026-08-06 22:27:42 +00:00
marcos 72840c9770 Document zoacao module in README
Co-Authored-By: Claude <noreply@anthropic.com>
2026-08-06 22:23:25 +00:00
marcos 95520831da Remove reaction boss bar; fix death coords; F-tribute head
- Reactions: drop the purple boss bar that sat on screen for the whole
  reaction window (curiosidades, adivinha, luto [F], /ia answers). Live
  counts still ride on the reactor's action bar and the closing tally line.
- mortes: death coordinates were sent during PlayerDeathEvent and the Java
  death screen swallowed them. Capture at death, deliver on PlayerRespawnEvent
  (1 tick later) so the player actually receives them. Respects keepInventory.
- luto: pressing F to pay respects now drops the dead player's head into the
  mourner's inventory — once per mourner per death, never to the dead player.
  First gameplay-touching feature; toggle with luto.cabeca (default on).
- Fix the /f typed twin: it fell through to help because "f" is not a
  configured reaction (the mourning set is hardcoded). Route it to reactLatest
  so Bedrock players can pay respects too.
- README + config updated. 117 tests green.

Co-Authored-By: Claude <noreply@anthropic.com>
2026-08-06 13:59:28 +00:00
marcos 68db3a7079 feat: feed asker stats to the IA + comic death messages
Two features requested after the IA grounding deploy.

IA player-stats grounding: the IA could not answer "quantos blocos eu
minerei?" because its context carried only generic server facts, never the
asker's own numbers. OfflineStats now reads one player's headline stats
(blocks mined, time played, distance, deaths, mob kills) from their vanilla
stats JSON and Ai.compose() injects them as a system turn, gated by
ia.estatisticas-jogador (default true). ~30 tokens per question; always on
so it never misses a stat question. Pure formatSummary extracted for tests.

Comic deaths (mortes module): replaces the vanilla death message with a
cause-based pt-BR comic line plus a death counter ("Fulano foi achatado
como panqueca (47ª morte)") and sends the death coordinates privately to
the dead player (Java click-to-copy, Bedrock plain text) so they can run
back to their dropped items. No storage, no command — a PlayerDeathEvent
side effect gated by modulos.mortes. DeathFlavor is a pure cause->phrase
map, unit-tested. Coexists with the luto [F] handler.

DEATHS stat timing: assumes Paper fires PlayerDeathEvent before awarding
minecraft:deaths, so the counter shows +1 to include the current death; a
log line confirms the raw stat on the first real death so the +1 can be
dropped if the server increments first.

117 tests green (101 + 13 DeathFlavor + 3 OfflineStatsSummary).

Co-Authored-By: Claude <noreply@anthropic.com>
2026-08-06 05:06:45 +00:00
marcos c1a6b9730f docs: document the IA module
README: add ia to the modules table, the four ia permissions, and a full
IA section covering commands, profile switching, operator corrections,
memory/context, and the key + rate-limit model. Notes the safety boundary
(no tools, reply never executed, leading slashes stripped) and which config
values are baked vs live.

Co-Authored-By: Claude <noreply@anthropic.com>
2026-08-06 03:56:58 +00:00
marcos be6d34f456 feat: show who reacted, and stop curiosities flooding chat
Reactions only ever showed counts, so with several reactors nobody could
tell who had reacted. Naming everyone on its own line does not scale, so
names now appear in three progressively larger places: a hover tooltip per
button (Java only), a one-line closing summary naming the first
resumo-nomes (3) and collapsing the rest to "+N", and /reacoes for the full
breakdown sent privately.

Reactors' names are captured at react time so the summary survives them
logging off.

Two separate causes of chat flooding:
- every join fired its own curiosity, so a wave of joins produced one each.
  Automatic triggers are now rate-limited by intervalo-minimo-segundos
  (120); a typed /curiosidade still bypasses it.
- a curiosity cost two messages. The button row is now appended to the
  headline instead of being broadcast separately.

Also fixes "1 horas" — CuriosityFactory had its own duration formatting
that missed the earlier plural fix; it now uses Msg.duration.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01ActvLGJApdxEAd2yfKPwqv
2026-08-04 21:38:28 +00:00
marcos 987ee13d74 feat: Bedrock support — typed commands and ASCII labels
Geyser cannot deliver a chat clickEvent to Bedrock, and most emoji render
as tofu boxes there, so Bedrock players could see the reaction row but
neither read nor use it.

Messages carrying buttons are now built twice and sent per player rather
than via Bukkit.broadcast. Each reaction gains a per-platform label plus a
typed shortcut:

    uau: { java: "[😮]", texto: "[UAU]", comando: "wow" }

Typed fallbacks for every clickable interaction: /reagir, /legal, /wow,
/top, /f, /palpite and /votar, all acting on the most recent message so no
message id is needed.

Bedrock detection uses Floodgate's UUID scheme (high 64 bits zero) rather
than the Floodgate API, keeping it an optional runtime dependency.
/canalhandia plataformas lists who is online and on which platform.

Reaction config moves from a flat key->label map to a section per
reaction; the old flat form is still accepted and gets an ASCII fallback
derived from the key.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01ActvLGJApdxEAd2yfKPwqv
2026-08-04 21:31:24 +00:00
marcos 801b43610f feat!: rename to Canalhandia and add four chat games
Renames the plugin from Curiosidades to Canalhandia (the server name) now
that it covers more than curiosities, and adds:

- adivinha: the curiosity with the name hidden and clickable player names,
  revealing who guessed right. Curiosity sentences never contained the
  subject's name, so the same generator feeds both with no redaction step.
- luto: a clickable [F] under death messages with a closing count.
- enquete: polls with clickable options and a live boss-bar tally.
- ranking + marcos: leaderboards covering offline players, and one-time
  milestone announcements persisted to marcos.yml.

Fixes the reaction counter being invisible. Chat cannot be edited after
sending, so the button counts are necessarily frozen; previously the only
live surface was the boss bar and the buttons showed no number at all.
Counts now appear in the buttons at send time, on the boss bar, on the
reactor's action bar, and as a final tally line when the window closes.

Late clicks used to be dropped silently once the 90s window passed. The
last 8 reaction sets now stay live for reacao-validade-minutos (15).

Rankings read the stats JSON directly because Bukkit only exposes
statistics for online players.

Adds README.md documenting the design constraints that are easy to
mistake for bugs.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01ActvLGJApdxEAd2yfKPwqv
2026-08-04 20:46:42 +00:00