Commit Graph

67 Commits

Author SHA1 Message Date
kistaro c30aca1f31 Better error management.
* "Uncooperative cards" is now a warning.
* Cards and actions get "Then" invoked before the card processor considers erroring out.
* Terminal UI: Errors and warnings from actions are displayed during the response; they're not only added to the temporary messages now.
v0.5.0
2023-04-15 20:59:21 -07:00
kistaro abb00e30c3 Debug action to adjust debug level. v0.4.0 2023-04-15 20:16:54 -07:00
kistaro 65c01318f0 Fix UI urgency handling.
Only cards can block other cards or actions from being used due to urgency, so only display the `[URGENT!]` header for cards. Debug actions can't be blocked, so skip the "urgency conflict" check for those.
2023-04-15 19:43:11 -07:00
kistaro 2b788f517c Add action counter spoofer. 2023-04-15 19:36:53 -07:00
kistaro 8d1aa0141f Don't stomp on the default debugers in SmokeTest. 2023-04-15 19:17:34 -07:00
kistaro 74fac625f2 Implement standard debuggers.
These debug actions are added to all players by default.
2023-04-15 19:16:08 -07:00
kistaro 22c4718faf Include the Number in the smoke test display. 2023-04-15 17:30:08 -07:00
kistaro deb3b1c5a1 Don't charge an action point for debug drawing. 2023-04-15 17:26:02 -07:00
kistaro 4a91230376 Smoke testing for debug actions.
Just moves one of the existing actions to a debug action slot.
2023-04-15 17:21:28 -07:00
kistaro 54711b36a8 Display debug enactables.
Includes some refactoring work to pull out common code and express the idea of "wait, which panel, exactly?".
2023-04-15 17:17:51 -07:00
kistaro 6c3c936dbd Debug Actions: Another set of permanent actions.
These are only reachable in debug mode.
2023-04-15 16:06:55 -07:00
kistaro 8d9303c8bc stats manual in README 2023-04-04 12:29:36 -07:00
kistaro ad9e5764f1 Allow renaming of extracted stats via tag. v0.3.0 2023-04-04 12:14:04 -07:00
kistaro 99e372a4db Fix it
Pointer vs. value receivers are... interesting.
v0.2 v0.2.0 v0.2.1
2023-04-04 11:37:02 -07:00
kistaro 3e34e25f54 Major stats upgrade.
StatLiteral: just emit a stat in the obvious way. Plus helper functions.

Can also identify stats via struct tags, no more Stored type!

Can also identify stat methods via name (with compatible types).
2023-04-04 11:12:07 -07:00
kistaro 1464070339 Fix excess divider mess in message display. v0.1.3 2023-04-03 01:45:38 -07:00
kistaro 066ec431ff Clan up go.mod. v0.1.1 v0.1.2 2023-04-02 22:30:21 -07:00
kistaro 3455579be6 Fix module spec. 2023-04-02 22:25:12 -07:00
kistaro 5a7cb58707 Add Godoc badge 2023-04-02 22:14:11 -07:00
kistaro 74a2493ef4 Clear screen before displaying panel in stats mode. 0.1.0 v0.1.0 2023-04-02 19:37:55 -07:00
kistaro 2c2e68ff93 Fix shadowing bug in rules engine. 2023-04-02 19:36:28 -07:00
kistaro d13e04e2f4 Debug utility function and comments 2023-04-02 19:35:07 -07:00
kistaro 57348f7ebf Add a bunch of logging. 2023-04-02 19:33:44 -07:00
kistaro 9796c2e970 First round of substantial bug fixes 2023-04-02 19:25:53 -07:00
kistaro 0f21020647 More fencepost errors! 2023-04-02 19:08:26 -07:00
kistaro e96d81a7b4 Fencepost error!
Also the title is visible.
2023-04-02 19:07:05 -07:00
kistaro 3a7bf9c2fb Don't adjust twice. 2023-04-02 19:05:15 -07:00
kistaro 00ea284cbc Nil is not an error, much less a serious one. 2023-04-02 19:03:39 -07:00
kistaro 159f6b6b5f Fix type. 2023-04-02 19:02:43 -07:00
kistaro 2480a1631b Implement a very crude "game" as a test. Also updates Player. 2023-04-02 19:01:40 -07:00
kistaro 2875dc5af8 Implement review mode.
This finishes the UI.
2023-04-02 13:58:56 -07:00
kistaro 74ca51b21d actions mode, prompt cleanup
Fixes some off-by-one errors. A 1-indexed UI in a 0-indexed language is always going to be prone to those and I will no doubt find more when I have enough of a test program to experiment with...
2023-04-02 13:19:26 -07:00
kistaro 5a2158f525 Implement Stats Mode.
Also rewords some prompts. Might as well be thorough in accepting reasonable inputs.
2023-04-02 12:54:52 -07:00
kistaro 25a9eed3f0 Prompt for player choices on cards.
Also handles errors in the display/prompt logic somewhat better.
2023-04-02 12:44:29 -07:00
kistaro 592c877852 More display components. 2023-04-02 00:43:17 -07:00
kistaro e1eac9de0f displayStatsMenu 2023-04-02 00:36:12 -07:00
kistaro 7371cddab3 Add more dividers 2023-04-02 00:28:34 -07:00
kistaro aecd8683b2 Restructure loop, basic display functions 2023-04-02 00:26:34 -07:00
kistaro a62de999ea Panel display, MultiMessage. 2023-04-02 00:20:37 -07:00
kistaro 3eb087201f more terminal utility functions 2023-04-02 00:09:17 -07:00
kistaro c73545fd07 Implement screen clear. 2023-04-02 00:02:25 -07:00
kistaro 34e1f3166f Main display mode skeleton 2023-04-01 23:59:53 -07:00
kistaro af9d9a6579 Skeleton of prototypical UI. 2023-04-01 23:22:50 -07:00
kistaro 9e659ecf41 InitPlayer
InitPlayer creates very not-ready Player with its basic data structures initialized to an empty, ready-for-data state.
2023-04-01 22:19:42 -07:00
kistaro 09fdf19948 CardOption.Enable
Make it possible for a card to display an option but not actually allow it to be selected. It's up to the UI layer to decide how to display options that are not enabled. The option text should probably contiain a note on why the option cannot be selected...
2023-04-01 22:09:05 -07:00
kistaro 45e1eeebf7 Play cards. 2023-04-01 21:18:48 -07:00
kistaro 576a2dd69e Implement drawing and running a turn. 2023-04-01 20:52:46 -07:00
kistaro a6b2c92f86 Comment and reorganize Player. 2023-04-01 20:04:20 -07:00
kistaro 75de281cee Refactor Strip (already).
Stripping cards from the Hand will also be useful, so I pulled the logic of Strip out into arrayutil (more efficiently, too) and rewrote deck.Strip to use it.
2023-04-01 19:40:28 -07:00
kistaro 222d4375ee deck.Strip -- remove cards
Given a function that identifies cards to remove, remove them from the deck. This can be used to find and strip out cards that are only conditionally appropriate (and aren't appropriate anymore).
2023-04-01 19:31:50 -07:00