3
0
mirror of https://github.com/pragma-/pbot.git synced 2024-11-17 01:19:31 +01:00

Plugin/Spinach: massive refactor

Refactored ridiculous large per-round/per-question state transitions and
subroutines into a much more manageable and simpler state machine.

Now can easily and trivially adjust maximum rounds and maximum questions
by editing $self->{game} hashtable entries. TODO: make this configurable
via `spinach set`.

Replaced "/msg me" with "/msg $botnick" throughout.

Adjusted lie validation:

  * If all words of lie are found within solution and word-count of lie is
    less than word-count of solution, then game will say "So-and-so has found
    part of the truth!"

  * If lie is 20%-or-less different to the solution, then game will say
    "So-and-so has misspelled the truth!"
This commit is contained in:
Pragmatic Software 2024-11-08 23:29:52 -08:00
parent 84117d83c7
commit 22771fabf6
No known key found for this signature in database
GPG Key ID: CC916B6E3C84ECCE
2 changed files with 687 additions and 1435 deletions

File diff suppressed because it is too large Load Diff

View File

@ -25,8 +25,8 @@ use PBot::Imports;
# These are set by the /misc/update_version script # These are set by the /misc/update_version script
use constant { use constant {
BUILD_NAME => "PBot", BUILD_NAME => "PBot",
BUILD_REVISION => 4844, BUILD_REVISION => 4846,
BUILD_DATE => "2024-11-07", BUILD_DATE => "2024-11-08",
}; };
sub initialize {} sub initialize {}