about summary refs log tree commit diff
path: root/users/grfn/xanthous/test/Xanthous/Game (follow)
AgeCommit message (Collapse)AuthorFilesLines
2021-11-25 r/3097 feat(gs/xanthous): Allow generating creatures with itemsGriffin Smith1-3/+4
Add an `equippedItems` field to the CreatureType raw, which provides a chance for generating that creature with an item equipped, which goes into a new `inventory` field on the creature entity itself. Currently the creature doesn't actually *use* this equipped item, but it's a step. This commit also adds a broken-dagger equipped 90% of the time to the "husk" creature. Change-Id: I6416c0678ba7bc1b002c5ce6119f7dc97dd86437
2021-06-23 r/2682 fix(xanthous): Only use alphabetic chars for menu itemsGriffin Smith1-0/+19
Previously, we were using `smallestNotIn` for selecting new characters for menu items with duplicate chatacters - this uses the 'Bounded' instance for the type, which for Char meant the first character we would always select was \NUL - making it look like the menu item had no character, and making it impossible to actually select the menu item. This introduces an AlphaChar newtype, which is a wrapper around Char whose Bounded and Enum instances only use alphabetic characters (a-ZA-Z) and uses that for menu characters instead. Change-Id: If34ed9e9ce84f2bcb1cb87432cc6273f40b69f72 Reviewed-on: https://cl.tvl.fyi/c/depot/+/3229 Reviewed-by: grfn <grfn@gws.fyi> Tested-by: BuildkiteCI
2021-06-23 r/2679 feat(xanthous) Generate random volume+density for itemsGriffin Smith1-6/+10
Generate random volumes and densities for items based on the ranges for those two quantities in the raw when building instances of items. Since this is the first time creating an item is impure, this also lifts entity generation into a (random) monadic context Change-Id: I2de4880e8144f7ff9e1304eb32806ed1d7affa18 Reviewed-on: https://cl.tvl.fyi/c/depot/+/3226 Reviewed-by: grfn <grfn@gws.fyi> Tested-by: BuildkiteCI
2021-06-14 r/2660 feat(xanthous): Add a method to get the name for a type of entityGriffin Smith1-0/+25
I didn't end up using this directly for the thing I was doing, but it still seems generally useful enough that I'm keeping it around for now Change-Id: I05c8902d75845f2230ec2373a9677d61cfaafafd Reviewed-on: https://cl.tvl.fyi/c/depot/+/3206 Reviewed-by: grfn <grfn@gws.fyi> Tested-by: BuildkiteCI