Compare commits
190 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 625a0ec5ec | |||
| 6b79ead016 | |||
| f2504649e9 | |||
| b4326d972d | |||
| 2f23974f81 | |||
| 26c4be927a | |||
| 87baa3cc79 | |||
| 189354b8e9 | |||
| 345c1c0d27 | |||
| c98ee8dbef | |||
| 6b2ab31824 | |||
| 31ad94a1ee | |||
| 33f71fa042 | |||
| 8e35b4dd35 | |||
| 47de02a172 | |||
| 256f1a99de | |||
| 1361276e1a | |||
| 54a996a989 | |||
| d13493e7fe | |||
| d1f3bd9938 | |||
| cb164a8236 | |||
| 88a9b6ce7b | |||
| 97b6d7e4cf | |||
| cf3250e11b | |||
| d1cf4fcf61 | |||
| afd99f6ec0 | |||
| fcfe75b906 | |||
| 17d955042f | |||
| 1a72165a2c | |||
| 834754b3a3 | |||
| 160bd243a6 | |||
| ba6c7353d9 | |||
| 90c1b7b5c1 | |||
| b83267d257 | |||
| c9915d2b0b | |||
| bb38735679 | |||
| 1f2ba5df16 | |||
| 04850d017f | |||
| ac04d717af | |||
| ddbb41e71a | |||
| 856e285427 | |||
| 3d0816a284 | |||
| c1d8ec0cd2 | |||
| dc817bf2b9 | |||
| 9452acb749 | |||
| c850ae3aea | |||
| 7e43f1bfbf | |||
| d0f8c7c6a9 | |||
| 1e3420aa8f | |||
| 62185ef48b | |||
| e851085b9b | |||
| 748a5ed5b5 | |||
| 4b62a06af9 | |||
| f191347e05 | |||
| a195028061 | |||
| 72ccb94cba | |||
| 53541e8e38 | |||
| 40d1691b40 | |||
| d38c685772 | |||
| b56181e59f | |||
| 8496a93690 | |||
| 3984f0197f | |||
| 73827b40c8 | |||
| 42e34087fc | |||
| 7292ac7b92 | |||
| 931236ec82 | |||
| d25a043958 | |||
| 8c2f5c109a | |||
| f2834c0079 | |||
| 487a686c9a | |||
| 5f8eb8d704 | |||
| 8ee5a039d9 | |||
| 6f62316525 | |||
| e86adb7b4a | |||
| bc139be5ac | |||
| 89606d54f1 | |||
| afaeab92a6 | |||
| e2a81e3626 | |||
| 80c519df6b | |||
| 85b70b1bef | |||
| 10c7b24130 | |||
| 725700952e | |||
| 386d664d2f | |||
| d17b905747 | |||
| f6d198b4fb | |||
| 5e81da6827 | |||
| 8c6b82564a | |||
| dd72f62e06 | |||
| 90dd579372 | |||
| c3c77d79ed | |||
| 128d69039e | |||
| 668ca4d4d5 | |||
| 33e7dc1b04 | |||
| 856b06a9d7 | |||
| 6a95b78584 | |||
| b5631470ad | |||
| 757e29b223 | |||
| 6e17b80cd2 | |||
| d9e8b3bb17 | |||
| 3889ef8d11 | |||
| 9d16ab056b | |||
| 339b665712 | |||
| 71c2f0acf9 | |||
| 6c79e7fb41 | |||
| 98220d224f | |||
| c57923f1a9 | |||
| 13beb3e0f4 | |||
| c5e612a48b | |||
| 14cd8db985 | |||
| 194c87c271 | |||
| d5478c5d26 | |||
| ffd16169a8 | |||
| 69321de26f | |||
| 2608758799 | |||
| 1d2f7bff6b | |||
| b7eb63e481 | |||
| c9efd9e07d | |||
| 2fbb555d1f | |||
| d05bb314c6 | |||
| a8202034ed | |||
| a072ef1ac8 | |||
| c779eaa368 | |||
| e252913a04 | |||
| a7a4b27974 | |||
| db309cab30 | |||
| 44eb59a505 | |||
| dedf57fac0 | |||
| e398f9bafd | |||
| 979b06b3d7 | |||
| 764717a692 | |||
| 955ddf5a68 | |||
| c11694c8f5 | |||
| 71c137cb7b | |||
| 236a8eaf2b | |||
| 11584605aa | |||
| 7ba6ddd36c | |||
| 1919ec2d1f | |||
| 4e0431a322 | |||
| 32dfe1835c | |||
| 39c70d5215 | |||
| 53f46d6cbc | |||
| cac6b77701 | |||
| 10a53e345e | |||
| 858cb2c70c | |||
| 55917f29ee | |||
| 8e298bf3c8 | |||
| 2cd7f3b231 | |||
| df8b9c496b | |||
| 26ed97b25e | |||
| 89b144fe69 | |||
| 7a090660f0 | |||
| 1b864a9a90 | |||
| f302db99fd | |||
| aa71c25eee | |||
| 8ddb42e3b7 | |||
| 3d3b660f35 | |||
| b648d80e52 | |||
| aa744bfc9d | |||
| 157c2f3ebc | |||
| 0277830d44 | |||
| 4478b07e9c | |||
| 9fbd2684e8 | |||
| ad69d1bbbe | |||
| c83d72ee59 | |||
| 079f0e3cbc | |||
| 6d26f077ca | |||
| 884582f056 | |||
| dc01a8cb0b | |||
| 843e548735 | |||
| 3f8605b480 | |||
| fb5597ecc2 | |||
| c0f9e865bd | |||
| c406d589a4 | |||
| 2ca266e1f2 | |||
| 0ed563b102 | |||
| 114c25454b | |||
| eedabd57c2 | |||
| 07b6f36115 | |||
| f87bf17412 | |||
| 877552c3a4 | |||
| 07fcf7d196 | |||
| dff69f7269 | |||
| 9654131119 | |||
| ff4619146e | |||
| 0e366475a3 | |||
| b420f16e3c | |||
| 2d50f82c1b | |||
| 7e99570f41 | |||
| 51f537e2fc | |||
| 6e566bb0dd |
+201
-19
@@ -1,34 +1,216 @@
|
||||
cataclysm
|
||||
cataclysm-tiles
|
||||
data/*.template
|
||||
save/
|
||||
obj/
|
||||
debug.log
|
||||
logg.txt
|
||||
bindist/
|
||||
cataclysmdda-*
|
||||
objwin/
|
||||
cataclysm.exe
|
||||
version.h
|
||||
Cataclysm.exe
|
||||
!src/chkjson
|
||||
*.7z
|
||||
*.a
|
||||
*.d
|
||||
*.dll
|
||||
*.exe
|
||||
*.o
|
||||
*.tmp
|
||||
*.zip
|
||||
*.apk
|
||||
/WinDepend/
|
||||
/bindist/
|
||||
/build/
|
||||
/build-start-time
|
||||
/cmake-build-debug/
|
||||
/config/
|
||||
/data/*.template
|
||||
/data/mods/user-default-mods.json
|
||||
/dep/
|
||||
/doxygen_doc/html/*
|
||||
/doxygen_doc/latex/*
|
||||
/font/
|
||||
/graveyard/
|
||||
/memorial/
|
||||
/mods/
|
||||
/obj/
|
||||
/objwin/
|
||||
/save/
|
||||
/src/version.h
|
||||
/sound/
|
||||
/templates/
|
||||
/tools/format/json_formatter.cgi
|
||||
CataclysmWin.cscope_file_list
|
||||
CataclysmWin.depend
|
||||
CataclysmWin.layout
|
||||
cata_test
|
||||
cata_test-tiles
|
||||
cataclysm
|
||||
cataclysm-tiles
|
||||
cataclysm-vcpkg
|
||||
cataclysmdda-*
|
||||
chkjson*
|
||||
debug.log
|
||||
logg.txt
|
||||
json_formatter
|
||||
|
||||
# Visual Studio files
|
||||
*.code-workspace
|
||||
*.exp
|
||||
*.ilk
|
||||
*.opensdf
|
||||
*.pdb
|
||||
*.lib
|
||||
*.sdf
|
||||
*.suo
|
||||
*.user
|
||||
Cataclysm.sdf
|
||||
Release*/
|
||||
*.vcxproj.filters
|
||||
.vs/
|
||||
.vscode/
|
||||
Debug*/
|
||||
*.opensdf
|
||||
Release*/
|
||||
|
||||
# Distribution script results
|
||||
/msvc-full-features/distribution
|
||||
|
||||
# Visual Studio 2015
|
||||
/msvc-full-features/*db
|
||||
/msvc-full-features/ipch
|
||||
lnk*.tmp
|
||||
Cataclysm.exe.lastcodeanalysissucceeded
|
||||
|
||||
#Visual Studio 2017
|
||||
/msvc-full-features/PredictedInputCache_Debug_x64.dat
|
||||
|
||||
#vcpkg
|
||||
/msvc-full-features/vcpkg_installed
|
||||
/msvc-object_creator/vcpkg_installed
|
||||
|
||||
# PVS Studio
|
||||
/msvc-full-features/*PVS-Studio*
|
||||
|
||||
# Temporary and backup files
|
||||
*~
|
||||
\#*
|
||||
*.bak
|
||||
*.cbTemp
|
||||
*.sw?
|
||||
*~
|
||||
\#*
|
||||
gmon.out
|
||||
|
||||
# System Files
|
||||
Thumbs.db
|
||||
.DS_Store
|
||||
._.DS_Store
|
||||
Thumbs.db
|
||||
cscope.*
|
||||
tags
|
||||
|
||||
# Generated translation source
|
||||
/lang/po/cataclysm-dda.pot
|
||||
/lang/po/en.po
|
||||
|
||||
# Compiled binary translations
|
||||
/lang/mo/
|
||||
|
||||
# Directory for translatable strings
|
||||
/lang/json/*
|
||||
!/lang/json/README
|
||||
|
||||
# Netbeans IDE folders
|
||||
nbproject/
|
||||
|
||||
# Python runtime files
|
||||
*.pyc
|
||||
|
||||
# vim files
|
||||
*.vim
|
||||
*.session
|
||||
.ycm_extra_conf.py
|
||||
.vimrc
|
||||
|
||||
# taskwarrior files
|
||||
*.task*
|
||||
|
||||
# GitEye files
|
||||
*.project
|
||||
|
||||
# vimdiff backup
|
||||
*.orig
|
||||
|
||||
# OSX
|
||||
Cataclysm.app
|
||||
build-data/osx/AppIcon.icns
|
||||
Cataclysm.dmg
|
||||
|
||||
# Jetbrains CLion
|
||||
.idea/
|
||||
|
||||
# test executables and generated data
|
||||
/tests/obj
|
||||
/tests/cata_test
|
||||
/tests/line_test
|
||||
/tests/map_iterator_test
|
||||
/tests/shadowcasting_test
|
||||
/tests/data/jsionized_overmap.sav
|
||||
/test_user_dir
|
||||
monfactions.txt
|
||||
|
||||
# temporary files generated by tools/reduce_tests.sh
|
||||
/list_of_tests
|
||||
/list_of_tests.ok
|
||||
/log
|
||||
/multidelta.log
|
||||
|
||||
# static library used to link the test executable
|
||||
cataclysm.a
|
||||
|
||||
# coredumps
|
||||
*.core
|
||||
|
||||
# sublime-text workspace
|
||||
*.sublime-workspace
|
||||
|
||||
# cppcheck
|
||||
*cppcheck.xml
|
||||
*.cppcheck
|
||||
|
||||
# clang tooling
|
||||
compile_commands.json
|
||||
.clangd
|
||||
|
||||
# IDA database
|
||||
Cataclysm.i64
|
||||
Cataclysm.id*
|
||||
Cataclysm.til
|
||||
Cataclysm.nam
|
||||
|
||||
# Snapcraft build directories
|
||||
prime
|
||||
snap
|
||||
stage
|
||||
|
||||
# Snapcraft build file
|
||||
*.snap
|
||||
|
||||
# Eclipse IDE
|
||||
.cproject
|
||||
.settings/
|
||||
|
||||
# Apple Xcode IDE
|
||||
Xcode/
|
||||
|
||||
# gdb
|
||||
.gdb_history
|
||||
|
||||
# Flatpak build artifacts
|
||||
/.flatpak-builder/
|
||||
/repo/
|
||||
/build-dir/
|
||||
|
||||
# precompiled headers
|
||||
/pch/pch.hpp.pch
|
||||
/pch/main-pch.hpp.gch
|
||||
/pch/main-pch.hpp.pch
|
||||
/tests/pch/pch.hpp.pch
|
||||
/tests/pch/tests-pch.hpp.gch
|
||||
/tests/pch/tests-pch.hpp.pch
|
||||
/tests/catch/catch.hpp.gch
|
||||
/tests/catch/catch.hpp.pch
|
||||
weather.output
|
||||
|
||||
# bundler local directories and files for jekyll site
|
||||
/.bundle/
|
||||
/_site/
|
||||
/vendor/
|
||||
.sass-cache
|
||||
.jekyll-metadata
|
||||
Gemfile.lock
|
||||
|
||||
-11
@@ -1,11 +0,0 @@
|
||||
language: cpp
|
||||
compiler:
|
||||
- gcc
|
||||
|
||||
script: make
|
||||
|
||||
notifications:
|
||||
irc: "irc.newnet.net#Cataclysm-DDA"
|
||||
irc: "irc.freenode.org#Cataclysm-DDA"
|
||||
use_notice: true
|
||||
skip_join: true
|
||||
@@ -0,0 +1 @@
|
||||
1e7d902c-02b7-4619-bf01-fe4b9c0ba8ca
|
||||
@@ -1,8 +0,0 @@
|
||||
Current policy is to update code to the standard style when changing a
|
||||
substantial portion of it. Blocks of code can be passed through astyle
|
||||
to ensure that their formatting is correct:
|
||||
|
||||
astyle --style=allman --indent=spaces=4 --add-brackets --align-pointer=name -p
|
||||
|
||||
For example, from vi, set marks a and b around the block, then:
|
||||
:'a,'b ! astyle --style=allman --indent=spaces=4 --add-brackets --align-pointer=name
|
||||
@@ -1,84 +0,0 @@
|
||||
Instructions for compiling on a Debian-based system. The package names here are
|
||||
valid for Ubuntu 12.10 and may or may not work on your system.
|
||||
|
||||
Building instructions, below, always assume you are running them from the
|
||||
Cataclysm:DDA source directory.
|
||||
|
||||
## Linux (native) ncurses builds ##
|
||||
Dependencies:
|
||||
* ncurses
|
||||
* build essentials
|
||||
|
||||
```
|
||||
sudo apt-get install libncurses5-dev build-essential
|
||||
```
|
||||
|
||||
### Building ###
|
||||
```
|
||||
make
|
||||
```
|
||||
|
||||
## Cross-compiling to linux 32-bit from linux 64-bit ##
|
||||
Dependencies:
|
||||
* 32-bit toolchain
|
||||
* 32-bit ncurses
|
||||
|
||||
```
|
||||
sudo apt-get install libc6-dev-i386 lib32stdc++-dev g++-multilib lib32ncurses5-dev
|
||||
```
|
||||
|
||||
### Building ###
|
||||
```
|
||||
make NATIVE=linux32
|
||||
```
|
||||
|
||||
## Cross-compile to Windows from Linux ##
|
||||
Dependencies:
|
||||
* [mxe](http://mxe.cc)
|
||||
|
||||
```
|
||||
sudo apt-get install autoconf bison flex cmake git automake intltool libtool scons yasm
|
||||
mkdir -p ~/src/mxe
|
||||
git clone -b stable https://github.com/mxe/mxe.git ~/src/mxe
|
||||
cd ~/src/mxe
|
||||
make gcc
|
||||
```
|
||||
|
||||
### Building ###
|
||||
```
|
||||
PATH="${PATH}:~/src/mxe/usr/bin"
|
||||
make CROSS=i686-pc-mingw32-
|
||||
```
|
||||
|
||||
## Linux (native) SDL builds ##
|
||||
Dependencies:
|
||||
* SDL
|
||||
* SDL_ttf
|
||||
* build essentials
|
||||
|
||||
```
|
||||
sudo apt-get install libsdl1.2-dev libsdl-ttf2.0-dev build-essential
|
||||
```
|
||||
|
||||
### Building ###
|
||||
```
|
||||
make TILES=1
|
||||
```
|
||||
|
||||
## Cross-compile to Windows SDL from Linux ##
|
||||
Dependencies:
|
||||
* [mxe](http://mxe.cc)
|
||||
|
||||
```
|
||||
sudo apt-get install autoconf bison flex cmake git automake intltool libtool scons yasm
|
||||
mkdir -p ~/src/mxe
|
||||
git clone -b stable https://github.com/mxe/mxe.git ~/src/mxe
|
||||
cd ~/src/mxe
|
||||
make sdl sdl_ttf
|
||||
```
|
||||
|
||||
### Building ###
|
||||
```
|
||||
PATH="${PATH}:~/src/mxe/usr/bin"
|
||||
make TILES=1 CROSS=i686-pc-mingw32-
|
||||
```
|
||||
@@ -1,73 +0,0 @@
|
||||
# Building Cataclysm-DDA on Mac OS X
|
||||
|
||||
Tested with OS X 10.8.4, Xcode 4.6.2.
|
||||
I haven't played it extensively but it builds and runs.
|
||||
|
||||
Not sure if it compiles with older OS/XCode versions.
|
||||
This worked for me, your mileage may vary.
|
||||
|
||||
## Requirements
|
||||
|
||||
Cataclysm-DDA uses SDL, SDL\_ttf, ncurses, and gettext.
|
||||
|
||||
SDL can be installed as frameworks or shared libraries.
|
||||
|
||||
### SDL Frameworks
|
||||
|
||||
[**SDL framework**](http://www.libsdl.org/download-1.2.php)
|
||||
http://www.libsdl.org/release/SDL-1.2.15.dmg
|
||||
|
||||
[**SDL\_image framework**](http://www.libsdl.org/projects/SDL_ttf/)
|
||||
http://www.libsdl.org/projects/SDL_ttf/release/SDL_ttf-2.0.11.dmg
|
||||
|
||||
Copy `SDL.framework` and `SDL_ttf.framework` to `/Library/Frameworks`
|
||||
or `/Users/name/Library/Frameworks`.
|
||||
|
||||
### ncurses, gettext, libsdl, lib\_ttf
|
||||
|
||||
Using a package manager:
|
||||
[Fink](http://fink.thetis.ig42.org), [Homebrew](http://mxcl.github.io/homebrew/),
|
||||
[MacPorts](http://www.macports.org), or [pkgsrc](http://www.pkgsrc.org/).
|
||||
|
||||
Install gettext and ncurses. Also install libsdl and libsdl\_ttf if you're
|
||||
not using frameworks as above.
|
||||
|
||||
Without a package manager, building from source isn't too difficult;
|
||||
follow instructions in the source archives.
|
||||
|
||||
## Build
|
||||
|
||||
From the Cataclysm-DDA source folder:
|
||||
|
||||
$ export CXXFLAGS="-I/path/to/include" LDFLAGS="-L/path/to/lib"
|
||||
|
||||
This adds search paths to find shared libraries outside of /usr and /usr/local.
|
||||
Multiple `-I/...` or `-L/...` paths can be specified.
|
||||
|
||||
$ make NATIVE=osx RELEASE=1 TILES=1 FRAMEWORK=1 OSX_MIN=10.6
|
||||
|
||||
## Run
|
||||
|
||||
$ ./cataclysm
|
||||
|
||||
or
|
||||
|
||||
$ ./cataclysm-tiles
|
||||
|
||||
### Options
|
||||
|
||||
`NATIVE=osx` builds for OS X.
|
||||
|
||||
`RELEASE=1` builds an optimized 'release' version.
|
||||
|
||||
`TILES=1` builds the SDL version; omit to build the ncurses/console version.
|
||||
|
||||
`FRAMEWORK=1` uses frameworks; omit for libsdl, libsdl\_ttf.
|
||||
|
||||
`OSX_MIN=version` sets `-mmacosx-version-min=` (mine needs to be 10.6); omit for 10.5.
|
||||
|
||||
### Archive
|
||||
|
||||
$ make bindist NATIVE=osx TILES=1
|
||||
|
||||
Create a .tar.gz archive of the build; omit `TILES=1` for the console version.
|
||||
-144
@@ -1,144 +0,0 @@
|
||||
# Contribute
|
||||
|
||||
Contributing to Cataclysm: Dark Days Ahead is easy - simply fork the repository here on GitHub, make your changes, and then send us a pull request.
|
||||
|
||||
## Guidelines
|
||||
|
||||
There are a couple of guidelines we suggest sticking to:
|
||||
|
||||
* Add this repository as an `upstream` remote.
|
||||
* Keep your `master` branch clean. This means you can easily pull changes made to this repository into yours.
|
||||
* Create a new branch for each new feature or set of related bug fixes.
|
||||
* Never merge from your local branches into your `master` branch. Only update that by pulling from `upstream/master`.
|
||||
|
||||
## Code Style
|
||||
|
||||
Current policy is to only update code to the standard style when changing a substantial portion of it, but **please** do this in a seperate commit. Blocks of code can be passed through astyle to ensure that their formatting is correct:
|
||||
|
||||
astyle --style=allman --indent=spaces=4 --add-brackets --align-pointer=name
|
||||
|
||||
For example, from vi, set marks a and b around the block, then:
|
||||
|
||||
:'a,'b ! astyle --style=allman --indent=spaces=4 --add-brackets --align-pointer=name
|
||||
|
||||
|
||||
## Example Workflow
|
||||
|
||||
#### Setup your environment
|
||||
|
||||
*(This only needs to be done once.)*
|
||||
|
||||
1. Fork this repository here on GitHub.
|
||||
|
||||
2. Clone your fork locally.
|
||||
|
||||
$ git clone https://github.com/YOUR_USERNAME/Cataclysm-DDA.git
|
||||
# Clones your fork of the repository into the current directory in terminal
|
||||
|
||||
3. Add this repository as a remote.
|
||||
|
||||
$ cd Cataclysm-DDA
|
||||
# Changes the active directory in the prompt to the newly cloned "Cataclysm-DDA" directory
|
||||
$ git remote add -f upstream https://github.com/CleverRaven/Cataclysm-DDA.git
|
||||
# Assigns the original repository to a remote called "upstream"
|
||||
|
||||
#### Update your `master` branch
|
||||
|
||||
1. Make sure you have your `master` branch checked out.
|
||||
|
||||
$ git checkout master
|
||||
|
||||
2. Pull the changes from the `upstream/master` branch.
|
||||
|
||||
$ git pull --ff-only upstream master
|
||||
# gets changes from "master" branch on the "upstream" remote
|
||||
|
||||
* Note: If this gives you an error, it means you have committed directly to your local `master` branch. [Click here for instructions on how to fix this issue](#why-does-git-pull---ff-only-result-in-an-error).
|
||||
|
||||
#### Make your changes
|
||||
|
||||
0. Update your `master` branch, if you haven't already.
|
||||
|
||||
1. For each new feature or bug fix, create a new branch.
|
||||
|
||||
$ git branch new_feature
|
||||
# Creates a new branch called "new_feature"
|
||||
$ git checkout new_feature
|
||||
# Makes "new_feature" the active branch
|
||||
|
||||
2. Once you've committed some changes locally, you need to push them to your fork here on GitHub.
|
||||
|
||||
$ git push origin new_feature
|
||||
# origin was automatically set to point to your fork when you cloned it
|
||||
|
||||
|
||||
3. Once you're finished working on your branch, and have committed and pushed all your changes, submit a pull request from your `new_feature` branch to this repository's `master` branch.
|
||||
|
||||
* Note: any new commits to the `new_feature` branch on GitHub will automatically be included in the pull request, so make sure to only commit related changes to the same branch.
|
||||
|
||||
|
||||
## Advanced Techniques
|
||||
|
||||
These guidelines aren't essential, but they can make keeping things in order much easier.
|
||||
|
||||
#### Using remote tracking branches
|
||||
|
||||
Remote tracking branches allow you to easily stay in touch with this repository's `master` branch, as they automatically know which remote branch to get changes from.
|
||||
|
||||
$ git branch -vv
|
||||
* master xxxx [origin/master] ....
|
||||
new_feature xxxx ....
|
||||
|
||||
Here you can see we have two branches; `master` which is tracking `origin/master`, and `new_feature` which isn't tracking any branch. In practice, what this means is that git won't know where to get changes from.
|
||||
|
||||
$ git checkout new_feature
|
||||
Switched to branch 'new_feature'
|
||||
$ git pull
|
||||
There is no tracking information for the current branch.
|
||||
Please specify which branch you want to merge with.
|
||||
|
||||
In order to easily pull changes from `upstream/master` into the `new_feature` branch, we can tell git which branch it should track. (You can even do this for your local master branch.)
|
||||
|
||||
$ git branch -u upstream/master new_feature
|
||||
Branch new_feature set up to track remote branch master from upstream.
|
||||
$ git pull
|
||||
Updating xxxx..xxxx
|
||||
....
|
||||
|
||||
You can also set the tracking information at the same time as creating the branch.
|
||||
|
||||
$ git branch new_feature_2 --track upstream/master
|
||||
Branch new_feature_2 set up to track remote branch master from upstream.
|
||||
|
||||
* Note: Although this makes it easier to pull from `upstream/master`, it doesn't change anything with regards to pushing. `git push` fails because you don't have permission to push to `upstream/master`.
|
||||
|
||||
$ git push
|
||||
error: The requested URL returned error: 403 while accessing https://github.com/CleverRaven/Cataclysm-DDA.git
|
||||
fatal: HTTP request failed
|
||||
$ git push origin
|
||||
....
|
||||
To https://github.com/YOUR_USERNAME/Cataclysm-DDA.git
|
||||
xxxx..xxxx new_feature -> new_feature
|
||||
|
||||
|
||||
## Frequently Asked Questions
|
||||
|
||||
####Why does `git pull --ff-only` result in an error?
|
||||
|
||||
If `git pull --ff-only` shows an error, it means that you've committed directly to your local `master` branch. To fix this, we create a new branch with these commits, find the point at which we diverged from `upstream/master`, and then reset `master` to that point.
|
||||
|
||||
$ git pull --ff-only upstream master
|
||||
From https://github.com/CleverRaven/Cataclysm-DDA
|
||||
* branch master -> FETCH_HEAD
|
||||
fatal: Not possible to fast-forward, aborting.
|
||||
$ git branch new_branch master # mark the current commit with a tmp branch
|
||||
$ git merge-base master upstream/master
|
||||
cc31d0... # the last commit before we committed directly to master
|
||||
$ git reset --hard cc31d0....
|
||||
HEAD is now at cc31d0... ...
|
||||
|
||||
Now that `master` has been cleaned up, we can easily pull from `upstream/master`, and then continue working on `new_branch`.
|
||||
|
||||
$ git pull --ff-only upstream master
|
||||
# gets changes from the "upstream" remote for the matching branch, in this case "master"
|
||||
$ git checkout new_branch
|
||||
@@ -1,229 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
|
||||
<CodeBlocks_project_file>
|
||||
<FileVersion major="1" minor="6" />
|
||||
<Project>
|
||||
<Option title="Cataclysm" />
|
||||
<Option pch_mode="2" />
|
||||
<Option compiler="gcc" />
|
||||
<Build>
|
||||
<Target title="Release">
|
||||
<Option output="Cataclysm" prefix_auto="1" extension_auto="1" />
|
||||
<Option object_output="obj/Release/" />
|
||||
<Option type="0" />
|
||||
<Option compiler="gcc" />
|
||||
<Compiler>
|
||||
<Add option="-Os" />
|
||||
</Compiler>
|
||||
<Linker>
|
||||
<Add option="-Wl,-stack,12000000,-subsystem,windows" />
|
||||
<Add option="-static -lgdi32" />
|
||||
</Linker>
|
||||
</Target>
|
||||
<Target title="Debug">
|
||||
<Option output="Cataclysm" prefix_auto="1" extension_auto="1" />
|
||||
<Option object_output="obj/Debug/" />
|
||||
<Option type="0" />
|
||||
<Option compiler="gcc" />
|
||||
<Compiler>
|
||||
<Add option="-pg" />
|
||||
<Add option="-g" />
|
||||
</Compiler>
|
||||
<Linker>
|
||||
<Add option="-pg -lgmon" />
|
||||
<Add option="-Wl,-stack,12000000,-subsystem,windows" />
|
||||
<Add option="-static -lgdi32" />
|
||||
</Linker>
|
||||
</Target>
|
||||
</Build>
|
||||
<Unit filename="action.cpp" />
|
||||
<Unit filename="action.h" />
|
||||
<Unit filename="addiction.cpp" />
|
||||
<Unit filename="addiction.h" />
|
||||
<Unit filename="artifact.cpp" />
|
||||
<Unit filename="artifact.h" />
|
||||
<Unit filename="artifactdata.h" />
|
||||
<Unit filename="auto_pickup.cpp" />
|
||||
<Unit filename="auto_pickup.h" />
|
||||
<Unit filename="basecamp.cpp" />
|
||||
<Unit filename="basecamp.h" />
|
||||
<Unit filename="bionics.cpp" />
|
||||
<Unit filename="bionics.h" />
|
||||
<Unit filename="bodypart.cpp" />
|
||||
<Unit filename="bodypart.h" />
|
||||
<Unit filename="building_generation.cpp" />
|
||||
<Unit filename="building_generation.h" />
|
||||
<Unit filename="calendar.cpp" />
|
||||
<Unit filename="calendar.h" />
|
||||
<Unit filename="catacurse.h" />
|
||||
<Unit filename="catajson.cpp" />
|
||||
<Unit filename="catajson.h" />
|
||||
<Unit filename="color.cpp" />
|
||||
<Unit filename="color.h" />
|
||||
<Unit filename="computer.cpp" />
|
||||
<Unit filename="computer.h" />
|
||||
<Unit filename="construction.cpp" />
|
||||
<Unit filename="construction.h" />
|
||||
<Unit filename="crafting.cpp" />
|
||||
<Unit filename="crafting.h" />
|
||||
<Unit filename="cursesdef.h" />
|
||||
<Unit filename="debug.cpp" />
|
||||
<Unit filename="debug.h" />
|
||||
<Unit filename="defense.cpp" />
|
||||
<Unit filename="dialogue.h" />
|
||||
<Unit filename="disease.cpp" />
|
||||
<Unit filename="disease.h" />
|
||||
<Unit filename="enums.h" />
|
||||
<Unit filename="event.cpp" />
|
||||
<Unit filename="event.h" />
|
||||
<Unit filename="facdata.h" />
|
||||
<Unit filename="faction.cpp" />
|
||||
<Unit filename="faction.h" />
|
||||
<Unit filename="field.cpp" />
|
||||
<Unit filename="game.cpp" />
|
||||
<Unit filename="game.h" />
|
||||
<Unit filename="gamemode.cpp" />
|
||||
<Unit filename="gamemode.h" />
|
||||
<Unit filename="graffiti.cpp" />
|
||||
<Unit filename="graffiti.h" />
|
||||
<Unit filename="help.cpp" />
|
||||
<Unit filename="helper.cpp" />
|
||||
<Unit filename="helper.h" />
|
||||
<Unit filename="iexamine.cpp" />
|
||||
<Unit filename="iexamine.h" />
|
||||
<Unit filename="input.cpp" />
|
||||
<Unit filename="input.h" />
|
||||
<Unit filename="inventory.cpp" />
|
||||
<Unit filename="inventory.h" />
|
||||
<Unit filename="inventory_ui.cpp" />
|
||||
<Unit filename="item.cpp" />
|
||||
<Unit filename="item.h" />
|
||||
<Unit filename="item_factory.cpp" />
|
||||
<Unit filename="item_factory.h" />
|
||||
<Unit filename="item_group.cpp" />
|
||||
<Unit filename="item_group.h" />
|
||||
<Unit filename="itype.h" />
|
||||
<Unit filename="itypedef.cpp" />
|
||||
<Unit filename="iuse.cpp" />
|
||||
<Unit filename="iuse.h" />
|
||||
<Unit filename="keypress.cpp" />
|
||||
<Unit filename="keypress.h" />
|
||||
<Unit filename="lightmap.cpp" />
|
||||
<Unit filename="lightmap.h" />
|
||||
<Unit filename="line.cpp" />
|
||||
<Unit filename="line.h" />
|
||||
<Unit filename="main.cpp" />
|
||||
<Unit filename="main_menu.cpp" />
|
||||
<Unit filename="map.cpp" />
|
||||
<Unit filename="map.h" />
|
||||
<Unit filename="mapbuffer.cpp" />
|
||||
<Unit filename="mapbuffer.h" />
|
||||
<Unit filename="mapdata.cpp" />
|
||||
<Unit filename="mapdata.h" />
|
||||
<Unit filename="mapgen.cpp" />
|
||||
<Unit filename="mapgenformat.cpp" />
|
||||
<Unit filename="mapgenformat.h" />
|
||||
<Unit filename="mapitems.h" />
|
||||
<Unit filename="mapitemsdef.cpp" />
|
||||
<Unit filename="material.cpp" />
|
||||
<Unit filename="material.h" />
|
||||
<Unit filename="melee.cpp" />
|
||||
<Unit filename="mission.cpp" />
|
||||
<Unit filename="mission.h" />
|
||||
<Unit filename="mission_end.cpp" />
|
||||
<Unit filename="mission_fail.cpp" />
|
||||
<Unit filename="mission_place.cpp" />
|
||||
<Unit filename="mission_start.cpp" />
|
||||
<Unit filename="missiondef.cpp" />
|
||||
<Unit filename="monattack.cpp" />
|
||||
<Unit filename="monattack.h" />
|
||||
<Unit filename="mondeath.cpp" />
|
||||
<Unit filename="mondeath.h" />
|
||||
<Unit filename="mongroup.h" />
|
||||
<Unit filename="mongroupdef.cpp" />
|
||||
<Unit filename="monmove.cpp" />
|
||||
<Unit filename="monster.cpp" />
|
||||
<Unit filename="monster.h" />
|
||||
<Unit filename="morale.h" />
|
||||
<Unit filename="moraledata.h" />
|
||||
<Unit filename="mtype.h" />
|
||||
<Unit filename="mtypedef.cpp" />
|
||||
<Unit filename="mutation.cpp" />
|
||||
<Unit filename="mutation.h" />
|
||||
<Unit filename="mutation_data.cpp" />
|
||||
<Unit filename="name.cpp" />
|
||||
<Unit filename="name.h" />
|
||||
<Unit filename="newcharacter.cpp" />
|
||||
<Unit filename="npc.cpp" />
|
||||
<Unit filename="npc.h" />
|
||||
<Unit filename="npcmove.cpp" />
|
||||
<Unit filename="npctalk.cpp" />
|
||||
<Unit filename="omdata.h" />
|
||||
<Unit filename="options.cpp" />
|
||||
<Unit filename="options.h" />
|
||||
<Unit filename="output.cpp" />
|
||||
<Unit filename="output.h" />
|
||||
<Unit filename="overmap.cpp" />
|
||||
<Unit filename="overmap.h" />
|
||||
<Unit filename="overmapbuffer.cpp" />
|
||||
<Unit filename="overmapbuffer.h" />
|
||||
<Unit filename="picojson.h" />
|
||||
<Unit filename="player.cpp" />
|
||||
<Unit filename="player.h" />
|
||||
<Unit filename="pldata.h" />
|
||||
<Unit filename="posix_time.cpp" />
|
||||
<Unit filename="posix_time.h" />
|
||||
<Unit filename="profession.cpp" />
|
||||
<Unit filename="profession.h" />
|
||||
<Unit filename="ranged.cpp" />
|
||||
<Unit filename="resource.rc">
|
||||
<Option compilerVar="WINDRES" />
|
||||
</Unit>
|
||||
<Unit filename="rng.cpp" />
|
||||
<Unit filename="rng.h" />
|
||||
<Unit filename="settlement.cpp" />
|
||||
<Unit filename="settlement.h" />
|
||||
<Unit filename="setvector.cpp" />
|
||||
<Unit filename="setvector.h" />
|
||||
<Unit filename="skill.cpp" />
|
||||
<Unit filename="skill.h" />
|
||||
<Unit filename="text_snippets.cpp" />
|
||||
<Unit filename="text_snippets.h" />
|
||||
<Unit filename="tileray.cpp" />
|
||||
<Unit filename="tileray.h" />
|
||||
<Unit filename="translations.h" />
|
||||
<Unit filename="trap.h" />
|
||||
<Unit filename="trapdef.cpp" />
|
||||
<Unit filename="trapfunc.cpp" />
|
||||
<Unit filename="tutorial.cpp" />
|
||||
<Unit filename="tutorial.h" />
|
||||
<Unit filename="ui.cpp" />
|
||||
<Unit filename="ui.h" />
|
||||
<Unit filename="veh_interact.cpp" />
|
||||
<Unit filename="veh_interact.h" />
|
||||
<Unit filename="veh_type.h" />
|
||||
<Unit filename="veh_typedef.cpp" />
|
||||
<Unit filename="vehicle.cpp" />
|
||||
<Unit filename="vehicle.h" />
|
||||
<Unit filename="version.cpp" />
|
||||
<Unit filename="version.h" />
|
||||
<Unit filename="weather.cpp" />
|
||||
<Unit filename="weather.h" />
|
||||
<Unit filename="weather_data.cpp" />
|
||||
<Unit filename="wincurse.cpp" />
|
||||
<Unit filename="wish.cpp" />
|
||||
<Extensions>
|
||||
<code_completion />
|
||||
<debugger />
|
||||
<envvars />
|
||||
<DoxyBlocks>
|
||||
<comment_style block="0" line="0" />
|
||||
<doxyfile_project />
|
||||
<doxyfile_build />
|
||||
<doxyfile_warnings />
|
||||
<doxyfile_output />
|
||||
<doxyfile_dot />
|
||||
<general />
|
||||
</DoxyBlocks>
|
||||
</Extensions>
|
||||
</Project>
|
||||
</CodeBlocks_project_file>
|
||||
@@ -1,163 +0,0 @@
|
||||
1.1 Adding an item
|
||||
1) Edit itype.h. Change the enum item_id and insert a unique identifier for
|
||||
your new item type. Be sure to put it among similar items.
|
||||
2) Edit itypedef.cpp. Macros are used for all item types, and they are pretty
|
||||
self-explanatory. Be ABSOLUTELY sure that you insert the macro at the same
|
||||
point in the list as you inserted the identifier in item_id!
|
||||
3) Your item type is now valid, but won't be spawned. If you want it to be
|
||||
spawned among similar items, edit mapitemsdef.cpp. Find the appropriate
|
||||
array(s), and insert the identifier for your item (e.g. itm_aspirin). Make
|
||||
sure it comes in before the NULL at the end of the list.
|
||||
5) Some items, like tools or food, also take an iuse::function reference.
|
||||
Edit iuse.h and include the function in the class declaration; then edit
|
||||
iuse.cpp and define your function. Functions may be shared among different
|
||||
item types.
|
||||
6) If you do not want NPCs to carry the item, add it to the list called
|
||||
mapitems[mi_trader_avoid] in mapitemsdef.cpp.
|
||||
|
||||
1.2 Adding a monster
|
||||
1) Edit mtype.h. Change the enum mon_id and insert a unique identifier for
|
||||
your new monster type. Be sure to put it among similar monsters.
|
||||
2) Edit montypedef.cpp. A macro is used for monsters and it is pretty
|
||||
straightforward (Any of this ring a bell?). Be ABSOLUTELY sure that you
|
||||
insert the macro at the same point in the list as your inserted the
|
||||
identifier in mon_id!
|
||||
3) Your monster type is now valid, but won't be spawned. If you want it to be
|
||||
spawned among similar monsters, edit mongroupdef.cpp. Find the appropriate
|
||||
array, and insert the identifier for your monster (e.g, mon_zombie). Make
|
||||
sure it comes in before the NULL at the end of the list.
|
||||
4) If you want your monster to drop items, edit monitemsdef.cpp. Make a new
|
||||
array for your monster type with all the map item groups it may carry, and a
|
||||
chance value for each.
|
||||
5) Your monster may have a special attack, a monattack::function reference.
|
||||
Edit monattack.h and include the function in the class definition; then
|
||||
edit monattack.cpp and define your function. Functions may be shared among
|
||||
different monster types. Be aware that the function should contain a
|
||||
statement that the monster uses to decide whether or not to use the attack,
|
||||
and if they do, should reset the monster's attack timer.
|
||||
7) Just like attacks, some monsters may have a special function called when
|
||||
they die. This works the same as attacks, but the relevent files are
|
||||
mondeath.h and mondeath.cpp.
|
||||
1.3 Adding structures to the map
|
||||
Most "regular" buildings are spawned in cities (large clusters of buildings which are located rather close to each other).
|
||||
In file omdata.h in the enum oter_id structure define names (code identifiers) for your building.
|
||||
If you want your building to be displayed at overmap in different orientations, you should add 4 identifiers for each orientation (south, east, west and north correspondingly).
|
||||
In the same file in structure const oter_t oterlist[num_ter_types]
|
||||
we should define how these buildings will be displayed, how much they obscure vision and which extras set they have. For example:
|
||||
{"mil. surplus", '^', c_white, 5, build_extras, false, false},
|
||||
{"mil. surplus", '>', c_white, 5, build_extras, false, false},
|
||||
{"mil. surplus", 'v', c_white, 5, build_extras, false, false},
|
||||
{"mil. surplus", '<', c_white, 5, build_extras, false, false}
|
||||
Comments at the beginning of this structure are rather useful.
|
||||
In the file mapgen.cpp find the subroutine called draw_map(...);
|
||||
there you should find a huge variant operator ("switch")
|
||||
where you should put your code defining the new building by adding new case-statement.
|
||||
This should be mentioned that most buildings are built on the square SEEX*2 x SEEY*2 tiles.
|
||||
If you want your building to be spawned not only in city limits
|
||||
you should refer to structures in file omdata.h
|
||||
(starting from the line #define OMSPEC_FREQ 7).
|
||||
These structures are commented in source code. Add new identifier in enum omspec_id structure before
|
||||
NUM_OMSPECS and then add a record in const overmap_special overmap_specials[NUM_OMSPECS] array. For example:
|
||||
{ot_toxic_dump, 0, 5, 15, -1, mcat_null, 0, 0, 0, 0, &omspec_place::wilderness,0}
|
||||
The comments given in source code to structure struct overmap_special explains the meaning of these constants in the example above.
|
||||
|
||||
1.4 Adding/editing armour and how armour protection is calculated
|
||||
1) Edit armor.json and add your armor item near similar types.
|
||||
2) The fields are:
|
||||
"type" : "ARMOR", // this must be ARMOR
|
||||
"id" : "socks", // the identifier used by the game. Must be one continuous word, use underscores if necessary
|
||||
"name" : "socks", // the name appearing in the examine box. Can be more than one word separated by spaces
|
||||
"weight" : 1, // weight of armour
|
||||
"color" : "blue", // ascii character colour
|
||||
"covers" : ["FEET"], // where it covers. Possible options are TORSO, HEAD, EYES, MOUTH, ARMS, HANDS, LEGS, FEET
|
||||
"to_hit" : 0, // bonus if using it as a melee weapon (whatever for?)
|
||||
"storage" : 0, // how many volume storage slots it adds
|
||||
"symbol" : "[", // ascii character
|
||||
"description" : "Socks. Put 'em on your feet.", // description of armour
|
||||
"price" : 100, // price of armour, used when bartering with NPCs
|
||||
"material" : ["COTTON", "NULL"], // material types. See materials.json for possible options
|
||||
"volume" : 1, // volume occupied
|
||||
"cutting" : 0, // cutting damage caused by using it as a melee weapon
|
||||
"warmth" : 10, // how much warmth clothing provides
|
||||
"phase" : "solid", // what phase it is
|
||||
"enviromental_protection" : 0, // how much environmental protection it affords
|
||||
"rarity" : 70, // determines how often it spawns
|
||||
"encumberance" : 0, // base encumbrance (unfitted value)
|
||||
"bashing" : -5, // bashing damage caused by using it as a melee weapon
|
||||
"flags" : ["VARSIZE"] // used to indicate clothing type which can be fitted. Leave out the flags field entirely if clothing cannot be fitted
|
||||
"coverage" : 80, // what percentage of body part
|
||||
"material_thickness" : 1 // thickness of material, in millimetre units (approximately). Generally ranges between 1 - 5, more unusual armour types go up to 10 or more
|
||||
3) When the player is hit at a specific body part, armour coverage determines whether the armour is hit, or an uncovered part of the player is hit (roll 1d100 against coverage)
|
||||
4) If the above roll fails (ie roll value is above coverage), then the armour does not absorb any damage from the blow, neither does it become damaged
|
||||
5) If the above roll succeeds, the armour is hit, possibly absorbing some damage and possibly getting damaged in the process
|
||||
6) The above steps are repeated for each layer of armour on the body part
|
||||
7) Armour protects against bash and cut damage. These are determined by multiplying the armour thickness by the material bash/cut resistance factor respectively, given in materials.json
|
||||
8) If the armour is made from 2 materials types, then it takes a weighted average of the primary material (66%) and secondary material (33%).
|
||||
9) Materials resistance factors are given relative to PAPER as a material (this probably needs some fine-tuning for balance).
|
||||
|
||||
1.5 Acid resistance
|
||||
This determines how items react to acid fields. Item acid resistances are a weighted
|
||||
average of the materials acid resistance (see item::acid_resist).
|
||||
An item acid resistance of zero means it will get corroded every turn
|
||||
An item acid resistance above zero means it has a chance of getting corroded every turn
|
||||
An item acid resistance above 9 means completely acidproof
|
||||
|
||||
Acid resistance values are in materials.json, and defined as such:
|
||||
0 - zero resistance to acid (metals)
|
||||
1 - partly resistant to acid
|
||||
2 - very resistant to acid
|
||||
3 - complete acid resistance
|
||||
|
||||
1.6 Adding a bionic
|
||||
1) Edit data/raw/bionics.json and add your bionic near similar types.
|
||||
|
||||
2) Add the required attributes
|
||||
|
||||
id : "bio_rocketlauncher" // Text string used as identifier in the code.
|
||||
name : "CBM: Rocket Launcher" // The bionic's name, as showed to the player.
|
||||
cost : 10 // How many PUs it costs to use the bionic.
|
||||
time : 0 // How long, when activated, between drawing cost. If 0, it draws power once.
|
||||
description : "It's a rocket launcher, inside your arm!!" // A brief description of the bionic, as showed to the player.
|
||||
|
||||
3) Add any otional attributes
|
||||
|
||||
flags : ["ACTIVE"] // Used to flag the bionic as a specific type.
|
||||
|
||||
Supported flags:
|
||||
|
||||
"ACTIVE" : The bionic can be manually activated and deactivated.
|
||||
"POWER" : The bionic provides a source of power.
|
||||
"FAULTY" : The bionic is an unwanted one, will typically have negative effects.
|
||||
|
||||
Flags can be combined like so: ["ACTIVE","POWER","FAULTY"] (Don't add all these at once)
|
||||
|
||||
4) If you want the bionic to be available in the gameworld as an item, add it to itypedef.cpp
|
||||
|
||||
BIO_SINGLE(id, rarity, price, color, difficulty)
|
||||
|
||||
See 1.1 for more information about adding items.
|
||||
|
||||
|
||||
FAQ
|
||||
Q: What the heck is up with the map objects?
|
||||
|
||||
A: The pertinent map objects are submap, mapbuffer, map, and overmap.
|
||||
The submap contains the actual map data, in SEEXxSEEY chunks.
|
||||
Vehicles and Spawns are stored in vectors because they're relatively sparse.
|
||||
Submaps live in the single global mapbuffer, MAPBUFFER.
|
||||
Map encapsulates the area around the player that is currently active.
|
||||
It contains an array of MAPSIZE * MAPSIZE submap pointers called grid.
|
||||
This is a 2D array, but is mapped to a 1D array for (questionable) indexing purposes.
|
||||
When the player moves from one submap to another, map::shift() is called.
|
||||
It moves the pointers in grid to keep the player centered.
|
||||
The leading edge of grid is populated by map::load()
|
||||
If the submap has been visited before, it's loaded from MAPBUFFER
|
||||
Otherwise a 2x2 chunk of submaps is generated based on the corresponding overmap square type.
|
||||
An overmap encapsulates the large-scale structure of a map
|
||||
Such as location and layout of cities, forests, rivers, roads, etc...
|
||||
There are an arbitrary number of overmaps
|
||||
Additional overmaps are generated as the player enters new areas.
|
||||
|
||||
FAQ
|
||||
Q: what is the relation of NPCS/Monsters vs maps. How are they stored, where are they stored? Are they stored?
|
||||
A: All npcs are now stored in the overmap. Active npcs only contain the currently active npcs. There is a difference between npc active npc coordinates, and overmap coordinates. So these will need to be changed when saving the npcs. Or else the npcs will be saved at the wrong location. And yes they are stored.
|
||||
@@ -0,0 +1,28 @@
|
||||
source "https://rubygems.org"
|
||||
ruby RUBY_VERSION
|
||||
|
||||
# Hello! This is where you manage which Jekyll version is used to run.
|
||||
# When you want to use a different version, change it below, save the
|
||||
# file and run `bundle install`. Run Jekyll with `bundle exec`, like so:
|
||||
#
|
||||
# bundle exec jekyll serve
|
||||
#
|
||||
# This will help ensure the proper Jekyll version is running.
|
||||
# Happy Jekylling!
|
||||
# gem "jekyll", "3.4.2"
|
||||
|
||||
# This is the default theme for new Jekyll sites. You may change this to anything you like.
|
||||
gem "minima", "~> 2.0"
|
||||
|
||||
# If you want to use GitHub Pages, remove the "gem "jekyll"" above and
|
||||
# uncomment the line below. To upgrade, run `bundle update github-pages`.
|
||||
gem "github-pages", group: :jekyll_plugins
|
||||
|
||||
# If you have any plugins, put them here!
|
||||
group :jekyll_plugins do
|
||||
gem "jekyll-feed", "~> 0.6"
|
||||
end
|
||||
|
||||
# Windows does not include zoneinfo files, so bundle the tzinfo-data gem
|
||||
gem 'tzinfo-data', platforms: [:mingw, :mswin, :x64_mingw, :jruby]
|
||||
|
||||
@@ -1 +0,0 @@
|
||||
Cataclysm is licensed under the Creative Commons Attribution-ShareAlike 3.0 Unported License. To view a copy of this license, visit http://creativecommons.org/licenses/by-sa/3.0/ or send a letter to Creative Commons, 444 Castro Street, Suite 900, Mountain View, California, 94041, USA.
|
||||
-106
@@ -1,106 +0,0 @@
|
||||
MODDING
|
||||
|
||||
Certain features of the game can be modified without rebuilding the game from
|
||||
source code; you should be able to just modify the pertinent files and run the
|
||||
game to see your changes. This attempts to document these features.
|
||||
|
||||
1.1 Adding a profession.
|
||||
|
||||
The data on professions is contained in data/raw/professions.json
|
||||
The format of the file follows:
|
||||
[
|
||||
{
|
||||
"ident" : "example", <-- This is a unique string that identifies the
|
||||
profession; it is used internally by the game as
|
||||
opposed to in the user interface.
|
||||
"name": "Example Profession", <-- This is the name that will be displayed
|
||||
on the user interface; this is
|
||||
what you actually "see" in-game.
|
||||
"description": "An example profession.", <-- This field contains the
|
||||
description of the profession
|
||||
that will be displayed in the
|
||||
character creation screen.
|
||||
|
||||
"points" : 0, <-- This value describes the point cost of the profession;
|
||||
note that negative numbers are accecptable. A positive
|
||||
value will deduct points from the players total whereas
|
||||
a negative one will give the player creation points.
|
||||
"items": ["jeans", "tshirt", "sneakers"], <-- This list contains the items
|
||||
a character will start with
|
||||
if they choose this
|
||||
profession.
|
||||
"addictions" : [ <-- This is the OPTIONAL list of starting addictions.
|
||||
{
|
||||
"type": "nicotine", <-- The identifier of the addiction.
|
||||
"intensity" : 10, <-- The intensity of the addiction.
|
||||
}
|
||||
],
|
||||
"skills" : [ <-- This list is also OPTIONAL; it contains the starting
|
||||
skills and their modified levels.
|
||||
{
|
||||
"name": "melee", <-- The identifier of the skill that will be modified.
|
||||
"level" : 1 <-- The value that the skill will be modified; note that
|
||||
this is NOT the starting level of the skill. It is
|
||||
the value that the player's starting level will be
|
||||
modified by. In other words, if the player puts 1
|
||||
point into melee to give themselves level 2 melee,
|
||||
taking this profession would add one additional level
|
||||
resulting in level 3.
|
||||
},
|
||||
{
|
||||
"name" : "dodge",
|
||||
"level" : 1
|
||||
}, <-- It is possible to list multiple skills for a single profession;
|
||||
it's an unused feature in the current game.
|
||||
|
||||
]
|
||||
|
||||
},
|
||||
]
|
||||
1.2 Example of adding a profession.
|
||||
|
||||
Let's say we want to add a survivalist profession; this profession represents a
|
||||
character who was already living off the land before the disaster struck. We'll
|
||||
say this profession starts with archery, survival, traps, beef jerky
|
||||
and a few survival items. We'll set the starting cost at 3 points since
|
||||
it modifies skills and items. We could do that with the
|
||||
following entries:
|
||||
{
|
||||
"ident" : "survivalist"
|
||||
"name": "Wilderness Survivalist",
|
||||
"description": "You live off the wild and wander the world; you've never
|
||||
had\na place to live or items other than what you can
|
||||
scavenge off the land. People called you crazy; now,
|
||||
after the disaster, you're the sane one."
|
||||
|
||||
"points" : 3,
|
||||
"items": ["pants_cargo", "boots", "beltrig", "selfbow", "jerky", "arrow_field_point"],
|
||||
|
||||
"skills" : [
|
||||
{
|
||||
"name": "archery",
|
||||
"level" : 1
|
||||
},
|
||||
{
|
||||
"name" : "survival",
|
||||
"level" : 1
|
||||
},
|
||||
{
|
||||
"name" : "traps",
|
||||
"level" : 1
|
||||
}
|
||||
]
|
||||
},
|
||||
|
||||
After adding this to the professions.json file, we should see the new profession
|
||||
show up in the character creation screen.
|
||||
|
||||
1.3 IMPORTANT NOTE on JSON FILES:
|
||||
The following characters: [ { , } ] : "
|
||||
are *very* important when adding or modifying the JSON files for technical
|
||||
reasons. This means a single missing , or [ or } can be the difference between
|
||||
a working file and a hanging game at startup. Many editors have features
|
||||
that let you track { [ and ] } to see if they're balanced (ie, have a matching
|
||||
opposite); Notepad++ is a popular, free editor on Windows that contains
|
||||
this feature. On Linux, there are a plethora of options, and you probably
|
||||
already have a preferred one :-).
|
||||
@@ -1,272 +0,0 @@
|
||||
# Platforms:
|
||||
# Linux native
|
||||
# (don't need to do anything)
|
||||
# Linux 64-bit
|
||||
# make NATIVE=linux64
|
||||
# Linux 32-bit
|
||||
# make NATIVE=linux32
|
||||
# Linux cross-compile to Win32
|
||||
# make CROSS=i686-pc-mingw32-
|
||||
# or make CROSS=i586-mingw32msvc-
|
||||
# or whichever prefix your crosscompiler uses
|
||||
# as long as its name contains mingw32
|
||||
# Win32
|
||||
# Run: make NATIVE=win32
|
||||
# OS X
|
||||
# Run: make NATIVE=osx
|
||||
|
||||
# Build types:
|
||||
# Debug (no optimizations)
|
||||
# Default
|
||||
# Release (turn on optimizations)
|
||||
# make RELEASE=1
|
||||
# Tiles (uses SDL rather than ncurses)
|
||||
# make TILES=1
|
||||
|
||||
|
||||
# comment these to toggle them as one sees fit.
|
||||
# WARNINGS will spam hundreds of warnings, mostly safe, if turned on
|
||||
# DEBUG is best turned on if you plan to debug in gdb -- please do!
|
||||
# PROFILE is for use with gprof or a similar program -- don't bother generally
|
||||
WARNINGS = -Wall -Wextra -Wno-switch -Wno-sign-compare -Wno-missing-braces -Wno-unused-parameter
|
||||
# Uncomment below to disable warnings
|
||||
#WARNINGS = -w
|
||||
DEBUG = -g
|
||||
#PROFILE = -pg
|
||||
#OTHERS = -O3
|
||||
#DEFINES = -DNDEBUG
|
||||
|
||||
# Disable debug. Comment this out to get logging.
|
||||
#DEFINES = -DENABLE_LOGGING
|
||||
|
||||
# Limit debug to level. Comment out all for all levels.
|
||||
#DEFINES += -DDEBUG_INFO
|
||||
#DEFINES += -DDEBUG_WARNING
|
||||
#DEFINES += -DDEBUG_ERROR
|
||||
#DEFINES += -DDEBUG_PEDANTIC_INFO
|
||||
|
||||
# Limit debug to section. Comment out all for all levels.
|
||||
#DEFINES += -DDEBUG_ENABLE_MAIN
|
||||
#DEFINES += -DDEBUG_ENABLE_MAP
|
||||
#DEFINES += -DDEBUG_ENABLE_MAP_GEN
|
||||
#DEFINES += -DDEBUG_ENABLE_GAME
|
||||
|
||||
VERSION = 0.7
|
||||
|
||||
|
||||
TARGET = cataclysm
|
||||
TILESTARGET = cataclysm-tiles
|
||||
W32TILESTARGET = cataclysm-tiles.exe
|
||||
W32TARGET = cataclysm.exe
|
||||
BINDIST_DIR = bindist
|
||||
BUILD_DIR = $(CURDIR)
|
||||
|
||||
# tiles object directories are because gcc gets confused
|
||||
# when preprocessor defines change, but the source doesn't
|
||||
ODIR = obj
|
||||
ODIRTILES = obj/tiles
|
||||
W32ODIR = objwin
|
||||
W32ODIRTILES = objwin/tiles
|
||||
DDIR = .deps
|
||||
|
||||
OS = $(shell uname -o)
|
||||
CXX = $(CROSS)g++
|
||||
LD = $(CROSS)g++
|
||||
|
||||
# enable optimizations. slow to build
|
||||
ifdef RELEASE
|
||||
OTHERS += -O3
|
||||
DEBUG =
|
||||
endif
|
||||
|
||||
CXXFLAGS += $(WARNINGS) $(DEBUG) $(PROFILE) $(OTHERS) -MMD
|
||||
|
||||
BINDIST_EXTRAS = README data
|
||||
BINDIST = cataclysmdda-$(VERSION).tar.gz
|
||||
W32BINDIST = cataclysmdda-$(VERSION).zip
|
||||
BINDIST_CMD = tar --transform=s@^$(BINDIST_DIR)@cataclysmdda-$(VERSION)@ -czvf $(BINDIST) $(BINDIST_DIR)
|
||||
W32BINDIST_CMD = cd $(BINDIST_DIR) && zip -r ../$(W32BINDIST) * && cd $(BUILD_DIR)
|
||||
|
||||
# is this section even being used anymore?
|
||||
# SOMEBODY PLEASE CHECK
|
||||
#ifeq ($(OS), Msys)
|
||||
# LDFLAGS = -static -lpdcurses
|
||||
#else
|
||||
# LDFLAGS += -lncurses
|
||||
#endif
|
||||
|
||||
# Check if called without a special build target
|
||||
ifeq ($(NATIVE),)
|
||||
ifeq ($(CROSS),)
|
||||
TARGETSYSTEM=LINUX
|
||||
endif
|
||||
endif
|
||||
|
||||
# Linux 64-bit
|
||||
ifeq ($(NATIVE), linux64)
|
||||
CXXFLAGS += -m64
|
||||
LDFLAGS += -m64
|
||||
TARGETSYSTEM=LINUX
|
||||
else
|
||||
# Linux 32-bit
|
||||
ifeq ($(NATIVE), linux32)
|
||||
CXXFLAGS += -m32
|
||||
LDFLAGS += -m32
|
||||
TARGETSYSTEM=LINUX
|
||||
endif
|
||||
endif
|
||||
|
||||
# OSX
|
||||
ifeq ($(NATIVE), osx)
|
||||
OSX_MIN = 10.5
|
||||
DEFINES += -DMACOSX
|
||||
CXXFLAGS += -mmacosx-version-min=$(OSX_MIN)
|
||||
LDFLAGS += -lintl
|
||||
TARGETSYSTEM=LINUX
|
||||
ifneq ($(OS), GNU/Linux)
|
||||
BINDIST_CMD = tar -s"@^$(BINDIST_DIR)@cataclysmdda-$(VERSION)@" -czvf $(BINDIST) $(BINDIST_DIR)
|
||||
endif
|
||||
endif
|
||||
|
||||
# Win32 (mingw32?)
|
||||
ifeq ($(NATIVE), win32)
|
||||
TARGETSYSTEM=WINDOWS
|
||||
endif
|
||||
|
||||
# MXE cross-compile to win32
|
||||
ifneq (,$(findstring mingw32,$(CROSS)))
|
||||
DEFINES += -DCROSS_LINUX
|
||||
TARGETSYSTEM=WINDOWS
|
||||
endif
|
||||
|
||||
# Global settings for Windows targets
|
||||
ifeq ($(TARGETSYSTEM),WINDOWS)
|
||||
TARGET = $(W32TARGET)
|
||||
BINDIST = $(W32BINDIST)
|
||||
BINDIST_CMD = $(W32BINDIST_CMD)
|
||||
ODIR = $(W32ODIR)
|
||||
LDFLAGS += -static -lgdi32 -lintl -liconv
|
||||
W32FLAGS += -Wl,-stack,12000000,-subsystem,windows
|
||||
endif
|
||||
|
||||
ifdef TILES
|
||||
ifeq ($(NATIVE),osx)
|
||||
ifdef FRAMEWORK
|
||||
DEFINES += -DOSX_SDL_FW
|
||||
OSX_INC = -F/Library/Frameworks \
|
||||
-F$(HOME)/Library/Frameworks \
|
||||
-I/Library/Frameworks/SDL.framework/Headers \
|
||||
-I$(HOME)/Library/Frameworks/SDL.framework/Headers \
|
||||
-I/Library/Frameworks/SDL_ttf.framework/Headers \
|
||||
-I$(HOME)/Library/Frameworks/SDL_ttf.framework/Headers
|
||||
LDFLAGS += -F/Library/Frameworks \
|
||||
-F$(HOME)/Library/Frameworks \
|
||||
-framework SDL -framework SDL_ttf -framework Cocoa
|
||||
CXXFLAGS += $(OSX_INC)
|
||||
else
|
||||
DEFINES += -DOSX_SDL_LIBS
|
||||
CXXFLAGS += $(shell sdl-config --cflags)
|
||||
LDFLAGS += $(shell sdl-config --libs) -lSDL_ttf
|
||||
endif
|
||||
else
|
||||
LDFLAGS += -lSDL -lSDL_ttf -lfreetype -lz
|
||||
endif
|
||||
DEFINES += -DTILES
|
||||
ifeq ($(TARGETSYSTEM),WINDOWS)
|
||||
LDFLAGS += -lgdi32 -ldxguid -lwinmm
|
||||
TARGET = $(W32TILESTARGET)
|
||||
ODIR = $(W32ODIRTILES)
|
||||
else
|
||||
TARGET = $(TILESTARGET)
|
||||
ODIR = $(ODIRTILES)
|
||||
endif
|
||||
else
|
||||
# Link to ncurses if we're using a non-tiles, Linux build
|
||||
ifeq ($(TARGETSYSTEM),LINUX)
|
||||
LDFLAGS += -lncursesw
|
||||
# Work around Cygwin not including gettext support in glibc
|
||||
ifeq ($(shell sh -c 'uname -o 2>/dev/null || echo not'),Cygwin)
|
||||
LDFLAGS += -lintl -liconv
|
||||
endif
|
||||
endif
|
||||
endif
|
||||
|
||||
ifeq ($(TARGETSYSTEM),LINUX)
|
||||
BINDIST_EXTRAS += cataclysm-launcher
|
||||
endif
|
||||
|
||||
SOURCES = $(wildcard *.cpp)
|
||||
HEADERS = $(wildcard *.h)
|
||||
_OBJS = $(SOURCES:.cpp=.o)
|
||||
OBJS = $(patsubst %,$(ODIR)/%,$(_OBJS))
|
||||
|
||||
ifdef TILES
|
||||
ifeq ($(NATIVE),osx)
|
||||
OBJS += $(ODIR)/SDLMain.o
|
||||
endif
|
||||
endif
|
||||
|
||||
all: version $(TARGET)
|
||||
@
|
||||
|
||||
$(TARGET): $(ODIR) $(DDIR) $(OBJS)
|
||||
$(LD) $(W32FLAGS) -o $(TARGET) $(DEFINES) $(CXXFLAGS) \
|
||||
$(OBJS) $(LDFLAGS)
|
||||
|
||||
.PHONY: version
|
||||
version:
|
||||
@( VERSION_STRING=$(VERSION) ; \
|
||||
[ -e ".git" ] && GITVERSION=$$( git describe --tags --always --dirty --match "[0-9]*.[0-9]*" ) && VERSION_STRING=$$GITVERSION ; \
|
||||
[ -e "version.h" ] && OLDVERSION=$$(grep VERSION version.h|cut -d '"' -f2) ; \
|
||||
if [ "x$$VERSION_STRING" != "x$$OLDVERSION" ]; then echo "#define VERSION \"$$VERSION_STRING\"" | tee version.h ; fi \
|
||||
)
|
||||
|
||||
$(ODIR):
|
||||
mkdir -p $(ODIR)
|
||||
|
||||
$(DDIR):
|
||||
@mkdir $(DDIR)
|
||||
|
||||
$(ODIR)/%.o: %.cpp
|
||||
$(CXX) $(DEFINES) $(CXXFLAGS) -c $< -o $@
|
||||
|
||||
$(ODIR)/SDLMain.o: SDLMain.m
|
||||
$(CC) -c $(OSX_INC) $< -o $@
|
||||
|
||||
version.cpp: version
|
||||
|
||||
clean: clean-tests
|
||||
rm -rf $(TARGET) $(TILESTARGET) $(W32TILESTARGET) $(W32TARGET)
|
||||
rm -rf $(ODIR) $(W32ODIR) $(W32ODIRTILES)
|
||||
rm -rf $(BINDIST) $(W32BINDIST) $(BINDIST_DIR)
|
||||
rm -f version.h
|
||||
|
||||
bindist: $(BINDIST)
|
||||
|
||||
$(BINDIST): $(TARGET) $(BINDIST_EXTRAS)
|
||||
rm -rf $(BINDIST_DIR)
|
||||
mkdir -p $(BINDIST_DIR)
|
||||
cp -R $(TARGET) $(BINDIST_EXTRAS) $(BINDIST_DIR)
|
||||
$(BINDIST_CMD)
|
||||
|
||||
export ODIR _OBJS LDFLAGS CXX W32FLAGS DEFINES CXXFLAGS
|
||||
|
||||
ctags: $(SOURCES) $(HEADERS)
|
||||
ctags $(SOURCES) $(HEADERS)
|
||||
|
||||
etags: $(SOURCES) $(HEADERS)
|
||||
etags $(SOURCES) $(HEADERS)
|
||||
|
||||
tests: $(ODIR) $(DDIR) $(OBJS)
|
||||
$(MAKE) -C tests
|
||||
|
||||
check: tests
|
||||
$(MAKE) -C tests check
|
||||
|
||||
clean-tests:
|
||||
$(MAKE) -C tests clean
|
||||
|
||||
.PHONY: tests check ctags etags clean-tests
|
||||
|
||||
-include $(SOURCES:%.cpp=$(DEPDIR)/%.P)
|
||||
-include ${OBJS:.o=.d}
|
||||
@@ -1,60 +0,0 @@
|
||||
# comment these to toggle them as one sees fit.
|
||||
# WARNINGS will spam hundreds of warnings, mostly safe, if turned on
|
||||
# DEBUG is best turned on if you plan to debug in gdb -- please do!
|
||||
# PROFILE is for use with gprof or a similar program -- don't bother generally
|
||||
#WARNINGS = -Wall -Wextra -Wno-switch -Wno-sign-compare -Wno-missing-braces -Wno-unused-parameter -Wno-char-subscripts
|
||||
DEBUG = -g
|
||||
#PROFILE = -pg
|
||||
OTHERS = -O3
|
||||
|
||||
ODIR = objwin
|
||||
DDIR = .deps
|
||||
|
||||
TARGET = cataclysm.exe
|
||||
|
||||
CXX = g++
|
||||
WNDRES = windres
|
||||
|
||||
LINKER = i486-mingw32-ld
|
||||
LINKERFLAGS = -Wl,-stack,12000000,-subsystem,windows
|
||||
|
||||
CFLAGS = $(WARNINGS) $(DEBUG) $(PROFILE) $(OTHERS)
|
||||
|
||||
LDFLAGS = -static -lgdi32
|
||||
RFLAGS = -J rc -O coff
|
||||
|
||||
#ifeq ($(OS), Msys)
|
||||
#LDFLAGS = -static -lpdcurses
|
||||
#else
|
||||
#LDFLAGS = -lncurses
|
||||
#endif
|
||||
|
||||
SOURCES = $(wildcard *.cpp)
|
||||
_OBJS = $(SOURCES:.cpp=.o)
|
||||
RSRC = $(wildcard *.rc)
|
||||
_OBJS += $(RSRC:.rc=.res)
|
||||
OBJS = $(patsubst %,$(ODIR)/%,$(_OBJS))
|
||||
|
||||
all: $(TARGET)
|
||||
@
|
||||
|
||||
$(TARGET): $(ODIR) $(DDIR) $(OBJS)
|
||||
$(CXX) $(LINKERFLAGS) -o $(TARGET) $(CFLAGS) $(OBJS) $(LDFLAGS) -DMINGW
|
||||
|
||||
$(ODIR):
|
||||
mkdir $(ODIR)
|
||||
|
||||
$(DDIR):
|
||||
@mkdir $(DDIR)
|
||||
|
||||
$(ODIR)/%.o: %.cpp
|
||||
$(CXX) $(CFLAGS) -c $< -o $@
|
||||
|
||||
$(ODIR)/%.res: %.rc
|
||||
$(WNDRES) $(RFLAGS) $< -o $@
|
||||
|
||||
clean:
|
||||
rm -f $(TARGET) $(ODIR)/*.o
|
||||
|
||||
-include $(SOURCES:%.cpp=$(DEPDIR)/%.P)
|
||||
|
||||
@@ -1,56 +0,0 @@
|
||||
Cataclysm is a post-apocalyptic roguelike, set in the countryside of New England
|
||||
after a devastating plague of monsters and zombies.
|
||||
|
||||
At present time, Cataclysm is still in early alpha, and is being developed very
|
||||
rapidly. As such, there are no formal version numbers, as a new version is
|
||||
released every day, often several a day.
|
||||
|
||||
Source is available at the github repository, http://github.com/Whales/Cataclysm
|
||||
There is also a tarball available at http://squidnet.ath.cx/cataclysm.tar.gz
|
||||
Squidnet maintains a public SSH server. If you cannot play Cataclysm locally,
|
||||
or if you prefer to play it in a world shared with others, connect to
|
||||
cataclysm@squidnet.ath.cx (there is no password).
|
||||
|
||||
Compiling Cataclysm under linux is straightforward, and only requires the
|
||||
ncurses development libraries. Under Ubuntu, these libraries can be found in
|
||||
the libncurses5-dev package ("sudo apt-get install libncurses5-dev" will install
|
||||
this package).
|
||||
|
||||
Cataclysm is very different from most roguelikes in many ways. Rather than
|
||||
being set in a vertical, linear dungeon, it is set in an unbounded, 3D world.
|
||||
This means that exploration plays a much bigger role than in most roguelikes,
|
||||
and the game is much less linear.
|
||||
Because the map is so huge, it is actually completely persistant between games.
|
||||
If you die, and start a new character, your new game will be set in the same
|
||||
game world as your last. Like in many roguelikes, you will be able to loot the
|
||||
dead bodies of previous characters; unlike most roguelikes, you will also be
|
||||
able to retrace their steps completely, and any dramatic changes made to the
|
||||
world will persist into your next game.
|
||||
While this makes for interesting depth of play, and the ability to "save" game
|
||||
progress even after death, some prefer to start each game with a freshly
|
||||
generated world. This can be achieved by erasing the contents of the save
|
||||
directory, found in the same folder as the executable. "rm save/*" will erase
|
||||
these files for you.
|
||||
|
||||
Cataclysm's gameplay also includes many unique quirks, and the learning curve is
|
||||
somewhat steep, even for those experienced with roguelikes. Included with the
|
||||
game is a tutorial which runs the player through most of the key features. The
|
||||
game also has extensive documentation via the ? command. Pressing ?1 will list
|
||||
all the key commands, which is a good place to start.
|
||||
|
||||
To submit a bug, complaint, feature request, or praise, please send them via
|
||||
email to TheDarklingWolf@gmail.com. You can also submit problem reports and
|
||||
patches at the github repository at http://github.com/Whales/Cataclysm .
|
||||
|
||||
I strive to include as many feature requests as possible, and if you submit one
|
||||
there is a good chance that it will appear in the game within a few days. Of
|
||||
course, it is inevitable that I will reject some feature requests, either
|
||||
because they do not fit my conception of the game, or because they require more
|
||||
code than I think they're worth. Feature requests supplied in the form of a
|
||||
patch stand a better chance of inclusion, of course ;) For instructions on
|
||||
making changes to item types, monster types, etc., please see the EDITING file.
|
||||
Most changes of this variety require no training in C++, or programming in
|
||||
general.
|
||||
|
||||
If you want to take Cataclysm in a new direction, please feel free to create a
|
||||
branch project--just let me know about it!
|
||||
@@ -1,42 +0,0 @@
|
||||
# Cataclysm: Dark Days Ahead
|
||||
|
||||
Cataclysm: Dark Days Ahead is a roguelike set in a post-apocalyptic world. While some have described it as a "zombie game", there's far more to Cataclysm than that. Struggle to survive in a harsh, persistant, procedurally generated world. Scavenge the remnants of a dead civilization for for food, equipment, or, if you're lucky, a vehicle with a full tank of gas to get you the hell out of Dodge. Fight to defeat or escape from a wide variety of powerful monstrosities, from zombies to giant insects to killer robots and things far stranger and deadlier, and against the others like yourself, that want what you have...
|
||||
|
||||
|
||||
## Download
|
||||
|
||||
The following binary releases are available:
|
||||
|
||||
* [Windows Executable](http://www.cataclysmdda.com/Downloads/CataDDA0.4.zip)
|
||||
* [OS X 10.6+ Executable](http://www.cataclysm.glyphgryph.com/Downloads/CataDDA0.4.tar.gz)
|
||||
|
||||
The source can either be downloaded as [an archive](https://github.com/TheDarklingWolf/Cataclysm-DDA/archive/master.zip), or you can clone it from [our GitHub repository](https://github.com/TheDarklingWolf/Cataclysm-DDA/).
|
||||
|
||||
|
||||
## Compile
|
||||
|
||||
The latest instructions on how to compile can be found on [our wiki](http://www.wiki.cataclysmdda.com/index.php?title=How_to_compile).
|
||||
|
||||
|
||||
## Contribute
|
||||
|
||||
Please see [CONTRIBUTING.md](https://github.com/CleverRaven/Cataclysm-DDA/blob/master/CONTRIBUTING.md) for details.
|
||||
|
||||
|
||||
## Frequently Asked Questions
|
||||
|
||||
#### Is there a tutorial?
|
||||
|
||||
Yes, you can find the tutorial in the **Special** menu at the main menu. You can also access documentation in-game via the **?** key.
|
||||
|
||||
#### How can I change the key bindings?
|
||||
|
||||
Press the `?` key, followed by the `1` key to see the full list of key commands. Press the `+` key to add a key binding, select which action with the corresponding letter key `a-w`, and then the key you wish to assign to that action.
|
||||
|
||||
#### How can I start a new world?
|
||||
|
||||
**Reset** on the main menu will generate a fresh world for you.
|
||||
|
||||
#### I've found a bug / I would like to make a suggestion. What should I do?
|
||||
|
||||
Please submit an issue on [our GitHub page](https://github.com/CleverRaven/Cataclysm-DDA/issues/). If you're not able to, send an email to `TheDarklingWolf@gmail.com`.
|
||||
@@ -1,16 +0,0 @@
|
||||
/* SDLMain.m - main entry point for our Cocoa-ized SDL app
|
||||
Initial Version: Darrell Walisser <dwaliss1@purdue.edu>
|
||||
Non-NIB-Code & other changes: Max Horn <max@quendi.de>
|
||||
|
||||
Feel free to customize this file to suit your needs
|
||||
*/
|
||||
|
||||
#ifndef _SDLMain_h_
|
||||
#define _SDLMain_h_
|
||||
|
||||
#import <Cocoa/Cocoa.h>
|
||||
|
||||
@interface SDLMain : NSObject
|
||||
@end
|
||||
|
||||
#endif /* _SDLMain_h_ */
|
||||
@@ -1,385 +0,0 @@
|
||||
/* SDLMain.m - main entry point for our Cocoa-ized SDL app
|
||||
Initial Version: Darrell Walisser <dwaliss1@purdue.edu>
|
||||
Non-NIB-Code & other changes: Max Horn <max@quendi.de>
|
||||
|
||||
Feel free to customize this file to suit your needs
|
||||
*/
|
||||
|
||||
#if (defined OSX_SDL_FW)
|
||||
#include "SDL.h"
|
||||
#else
|
||||
#include "SDL/SDL.h"
|
||||
#endif
|
||||
#include "SDLMain.h"
|
||||
#include <sys/param.h> /* for MAXPATHLEN */
|
||||
#include <unistd.h>
|
||||
|
||||
/* For some reaon, Apple removed setAppleMenu from the headers in 10.4,
|
||||
but the method still is there and works. To avoid warnings, we declare
|
||||
it ourselves here. */
|
||||
@interface NSApplication(SDL_Missing_Methods)
|
||||
- (void)setAppleMenu:(NSMenu *)menu;
|
||||
@end
|
||||
|
||||
/* Use this flag to determine whether we use SDLMain.nib or not */
|
||||
#define SDL_USE_NIB_FILE 0
|
||||
|
||||
/* Use this flag to determine whether we use CPS (docking) or not */
|
||||
#define SDL_USE_CPS 1
|
||||
#ifdef SDL_USE_CPS
|
||||
/* Portions of CPS.h */
|
||||
typedef struct CPSProcessSerNum
|
||||
{
|
||||
UInt32 lo;
|
||||
UInt32 hi;
|
||||
} CPSProcessSerNum;
|
||||
|
||||
extern OSErr CPSGetCurrentProcess( CPSProcessSerNum *psn);
|
||||
extern OSErr CPSEnableForegroundOperation( CPSProcessSerNum *psn, UInt32 _arg2, UInt32 _arg3, UInt32 _arg4, UInt32 _arg5);
|
||||
extern OSErr CPSSetFrontProcess( CPSProcessSerNum *psn);
|
||||
|
||||
#endif /* SDL_USE_CPS */
|
||||
|
||||
static int gArgc;
|
||||
static char **gArgv;
|
||||
static BOOL gFinderLaunch;
|
||||
static BOOL gCalledAppMainline = FALSE;
|
||||
|
||||
static NSString *getApplicationName(void)
|
||||
{
|
||||
const NSDictionary *dict;
|
||||
NSString *appName = 0;
|
||||
|
||||
/* Determine the application name */
|
||||
dict = (const NSDictionary *)CFBundleGetInfoDictionary(CFBundleGetMainBundle());
|
||||
if (dict)
|
||||
appName = [dict objectForKey: @"CFBundleName"];
|
||||
|
||||
if (![appName length])
|
||||
appName = [[NSProcessInfo processInfo] processName];
|
||||
|
||||
return appName;
|
||||
}
|
||||
|
||||
#if SDL_USE_NIB_FILE
|
||||
/* A helper category for NSString */
|
||||
@interface NSString (ReplaceSubString)
|
||||
- (NSString *)stringByReplacingRange:(NSRange)aRange with:(NSString *)aString;
|
||||
@end
|
||||
#endif
|
||||
|
||||
@interface NSApplication (SDLApplication)
|
||||
@end
|
||||
|
||||
@implementation NSApplication (SDLApplication)
|
||||
/* Invoked from the Quit menu item */
|
||||
- (void)terminate:(id)sender
|
||||
{
|
||||
/* Post a SDL_QUIT event */
|
||||
SDL_Event event;
|
||||
event.type = SDL_QUIT;
|
||||
SDL_PushEvent(&event);
|
||||
}
|
||||
@end
|
||||
|
||||
/* The main class of the application, the application's delegate */
|
||||
@implementation SDLMain
|
||||
|
||||
/* Set the working directory to the .app's parent directory */
|
||||
- (void) setupWorkingDirectory:(BOOL)shouldChdir
|
||||
{
|
||||
if (shouldChdir)
|
||||
{
|
||||
char parentdir[MAXPATHLEN];
|
||||
CFURLRef url = CFBundleCopyBundleURL(CFBundleGetMainBundle());
|
||||
CFURLRef url2 = CFURLCreateCopyDeletingLastPathComponent(0, url);
|
||||
if (CFURLGetFileSystemRepresentation(url2, 1, (UInt8 *)parentdir, MAXPATHLEN)) {
|
||||
chdir(parentdir); /* chdir to the binary app's parent */
|
||||
}
|
||||
CFRelease(url);
|
||||
CFRelease(url2);
|
||||
}
|
||||
}
|
||||
|
||||
#if SDL_USE_NIB_FILE
|
||||
|
||||
/* Fix menu to contain the real app name instead of "SDL App" */
|
||||
- (void)fixMenu:(NSMenu *)aMenu withAppName:(NSString *)appName
|
||||
{
|
||||
NSRange aRange;
|
||||
NSEnumerator *enumerator;
|
||||
NSMenuItem *menuItem;
|
||||
|
||||
aRange = [[aMenu title] rangeOfString:@"SDL App"];
|
||||
if (aRange.length != 0)
|
||||
[aMenu setTitle: [[aMenu title] stringByReplacingRange:aRange with:appName]];
|
||||
|
||||
enumerator = [[aMenu itemArray] objectEnumerator];
|
||||
while ((menuItem = [enumerator nextObject]))
|
||||
{
|
||||
aRange = [[menuItem title] rangeOfString:@"SDL App"];
|
||||
if (aRange.length != 0)
|
||||
[menuItem setTitle: [[menuItem title] stringByReplacingRange:aRange with:appName]];
|
||||
if ([menuItem hasSubmenu])
|
||||
[self fixMenu:[menuItem submenu] withAppName:appName];
|
||||
}
|
||||
}
|
||||
|
||||
#else
|
||||
|
||||
static void setApplicationMenu(void)
|
||||
{
|
||||
/* warning: this code is very odd */
|
||||
NSMenu *appleMenu;
|
||||
NSMenuItem *menuItem;
|
||||
NSString *title;
|
||||
NSString *appName;
|
||||
|
||||
appName = getApplicationName();
|
||||
appleMenu = [[NSMenu alloc] initWithTitle:@""];
|
||||
|
||||
/* Add menu items */
|
||||
title = [@"About " stringByAppendingString:appName];
|
||||
[appleMenu addItemWithTitle:title action:@selector(orderFrontStandardAboutPanel:) keyEquivalent:@""];
|
||||
|
||||
[appleMenu addItem:[NSMenuItem separatorItem]];
|
||||
|
||||
title = [@"Hide " stringByAppendingString:appName];
|
||||
[appleMenu addItemWithTitle:title action:@selector(hide:) keyEquivalent:@"h"];
|
||||
|
||||
menuItem = (NSMenuItem *)[appleMenu addItemWithTitle:@"Hide Others" action:@selector(hideOtherApplications:) keyEquivalent:@"h"];
|
||||
[menuItem setKeyEquivalentModifierMask:(NSAlternateKeyMask|NSCommandKeyMask)];
|
||||
|
||||
[appleMenu addItemWithTitle:@"Show All" action:@selector(unhideAllApplications:) keyEquivalent:@""];
|
||||
|
||||
[appleMenu addItem:[NSMenuItem separatorItem]];
|
||||
|
||||
title = [@"Quit " stringByAppendingString:appName];
|
||||
[appleMenu addItemWithTitle:title action:@selector(terminate:) keyEquivalent:@"q"];
|
||||
|
||||
|
||||
/* Put menu into the menubar */
|
||||
menuItem = [[NSMenuItem alloc] initWithTitle:@"" action:nil keyEquivalent:@""];
|
||||
[menuItem setSubmenu:appleMenu];
|
||||
[[NSApp mainMenu] addItem:menuItem];
|
||||
|
||||
/* Tell the application object that this is now the application menu */
|
||||
[NSApp setAppleMenu:appleMenu];
|
||||
|
||||
/* Finally give up our references to the objects */
|
||||
[appleMenu release];
|
||||
[menuItem release];
|
||||
}
|
||||
|
||||
/* Create a window menu */
|
||||
static void setupWindowMenu(void)
|
||||
{
|
||||
NSMenu *windowMenu;
|
||||
NSMenuItem *windowMenuItem;
|
||||
NSMenuItem *menuItem;
|
||||
|
||||
windowMenu = [[NSMenu alloc] initWithTitle:@"Window"];
|
||||
|
||||
/* "Minimize" item */
|
||||
menuItem = [[NSMenuItem alloc] initWithTitle:@"Minimize" action:@selector(performMiniaturize:) keyEquivalent:@"m"];
|
||||
[windowMenu addItem:menuItem];
|
||||
[menuItem release];
|
||||
|
||||
/* Put menu into the menubar */
|
||||
windowMenuItem = [[NSMenuItem alloc] initWithTitle:@"Window" action:nil keyEquivalent:@""];
|
||||
[windowMenuItem setSubmenu:windowMenu];
|
||||
[[NSApp mainMenu] addItem:windowMenuItem];
|
||||
|
||||
/* Tell the application object that this is now the window menu */
|
||||
[NSApp setWindowsMenu:windowMenu];
|
||||
|
||||
/* Finally give up our references to the objects */
|
||||
[windowMenu release];
|
||||
[windowMenuItem release];
|
||||
}
|
||||
|
||||
/* Replacement for NSApplicationMain */
|
||||
static void CustomApplicationMain (int argc, char **argv)
|
||||
{
|
||||
NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init];
|
||||
SDLMain *sdlMain;
|
||||
|
||||
/* Ensure the application object is initialised */
|
||||
[NSApplication sharedApplication];
|
||||
|
||||
#ifdef SDL_USE_CPS
|
||||
{
|
||||
CPSProcessSerNum PSN;
|
||||
/* Tell the dock about us */
|
||||
if (!CPSGetCurrentProcess(&PSN))
|
||||
if (!CPSEnableForegroundOperation(&PSN,0x03,0x3C,0x2C,0x1103))
|
||||
if (!CPSSetFrontProcess(&PSN))
|
||||
[NSApplication sharedApplication];
|
||||
}
|
||||
#endif /* SDL_USE_CPS */
|
||||
|
||||
/* Set up the menubar */
|
||||
[NSApp setMainMenu:[[NSMenu alloc] init]];
|
||||
setApplicationMenu();
|
||||
setupWindowMenu();
|
||||
|
||||
/* Create SDLMain and make it the app delegate */
|
||||
sdlMain = [[SDLMain alloc] init];
|
||||
[NSApp setDelegate:sdlMain];
|
||||
|
||||
/* Start the main event loop */
|
||||
[NSApp run];
|
||||
|
||||
[sdlMain release];
|
||||
[pool release];
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
/*
|
||||
* Catch document open requests...this lets us notice files when the app
|
||||
* was launched by double-clicking a document, or when a document was
|
||||
* dragged/dropped on the app's icon. You need to have a
|
||||
* CFBundleDocumentsType section in your Info.plist to get this message,
|
||||
* apparently.
|
||||
*
|
||||
* Files are added to gArgv, so to the app, they'll look like command line
|
||||
* arguments. Previously, apps launched from the finder had nothing but
|
||||
* an argv[0].
|
||||
*
|
||||
* This message may be received multiple times to open several docs on launch.
|
||||
*
|
||||
* This message is ignored once the app's mainline has been called.
|
||||
*/
|
||||
- (BOOL)application:(NSApplication *)theApplication openFile:(NSString *)filename
|
||||
{
|
||||
const char *temparg;
|
||||
size_t arglen;
|
||||
char *arg;
|
||||
char **newargv;
|
||||
|
||||
if (!gFinderLaunch) /* MacOS is passing command line args. */
|
||||
return FALSE;
|
||||
|
||||
if (gCalledAppMainline) /* app has started, ignore this document. */
|
||||
return FALSE;
|
||||
|
||||
temparg = [filename UTF8String];
|
||||
arglen = SDL_strlen(temparg) + 1;
|
||||
arg = (char *) SDL_malloc(arglen);
|
||||
if (arg == NULL)
|
||||
return FALSE;
|
||||
|
||||
newargv = (char **) realloc(gArgv, sizeof (char *) * (gArgc + 2));
|
||||
if (newargv == NULL)
|
||||
{
|
||||
SDL_free(arg);
|
||||
return FALSE;
|
||||
}
|
||||
gArgv = newargv;
|
||||
|
||||
SDL_strlcpy(arg, temparg, arglen);
|
||||
gArgv[gArgc++] = arg;
|
||||
gArgv[gArgc] = NULL;
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
|
||||
/* Called when the internal event loop has just started running */
|
||||
- (void) applicationDidFinishLaunching: (NSNotification *) note
|
||||
{
|
||||
int status;
|
||||
|
||||
/* Set the working directory to the .app's parent directory */
|
||||
[self setupWorkingDirectory:gFinderLaunch];
|
||||
|
||||
#if SDL_USE_NIB_FILE
|
||||
/* Set the main menu to contain the real app name instead of "SDL App" */
|
||||
[self fixMenu:[NSApp mainMenu] withAppName:getApplicationName()];
|
||||
#endif
|
||||
|
||||
/* Hand off to main application code */
|
||||
gCalledAppMainline = TRUE;
|
||||
status = SDL_main (gArgc, gArgv);
|
||||
|
||||
/* We're done, thank you for playing */
|
||||
exit(status);
|
||||
}
|
||||
@end
|
||||
|
||||
|
||||
@implementation NSString (ReplaceSubString)
|
||||
|
||||
- (NSString *)stringByReplacingRange:(NSRange)aRange with:(NSString *)aString
|
||||
{
|
||||
unsigned int bufferSize;
|
||||
unsigned int selfLen = [self length];
|
||||
unsigned int aStringLen = [aString length];
|
||||
unichar *buffer;
|
||||
NSRange localRange;
|
||||
NSString *result;
|
||||
|
||||
bufferSize = selfLen + aStringLen - aRange.length;
|
||||
buffer = (unichar *)NSAllocateMemoryPages(bufferSize*sizeof(unichar));
|
||||
|
||||
/* Get first part into buffer */
|
||||
localRange.location = 0;
|
||||
localRange.length = aRange.location;
|
||||
[self getCharacters:buffer range:localRange];
|
||||
|
||||
/* Get middle part into buffer */
|
||||
localRange.location = 0;
|
||||
localRange.length = aStringLen;
|
||||
[aString getCharacters:(buffer+aRange.location) range:localRange];
|
||||
|
||||
/* Get last part into buffer */
|
||||
localRange.location = aRange.location + aRange.length;
|
||||
localRange.length = selfLen - localRange.location;
|
||||
[self getCharacters:(buffer+aRange.location+aStringLen) range:localRange];
|
||||
|
||||
/* Build output string */
|
||||
result = [NSString stringWithCharacters:buffer length:bufferSize];
|
||||
|
||||
NSDeallocateMemoryPages(buffer, bufferSize);
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
@end
|
||||
|
||||
|
||||
|
||||
#ifdef main
|
||||
# undef main
|
||||
#endif
|
||||
|
||||
|
||||
/* Main entry point to executable - should *not* be SDL_main! */
|
||||
int main (int argc, char **argv)
|
||||
{
|
||||
/* Copy the arguments into a global variable */
|
||||
/* This is passed if we are launched by double-clicking */
|
||||
if ( argc >= 2 && strncmp (argv[1], "-psn", 4) == 0 ) {
|
||||
gArgv = (char **) SDL_malloc(sizeof (char *) * 2);
|
||||
gArgv[0] = argv[0];
|
||||
gArgv[1] = NULL;
|
||||
gArgc = 1;
|
||||
gFinderLaunch = YES;
|
||||
} else {
|
||||
int i;
|
||||
gArgc = argc;
|
||||
gArgv = (char **) SDL_malloc(sizeof (char *) * (argc+1));
|
||||
for (i = 0; i <= argc; i++)
|
||||
gArgv[i] = argv[i];
|
||||
gFinderLaunch = NO;
|
||||
}
|
||||
|
||||
#if SDL_USE_NIB_FILE
|
||||
NSApplicationMain (argc, argv);
|
||||
#else
|
||||
CustomApplicationMain (argc, argv);
|
||||
#endif
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -1,30 +0,0 @@
|
||||
The undersigned release all their contributions to the Cataclysm project under the Creative Commons Attribution-ShareAlike 3.0 Unported License.
|
||||
|
||||
Kevin Granade <kevin.granade@gmail.com>
|
||||
Matthew Moffatt <TheDarklingWolf@gmail.com>
|
||||
origamiwolf <origamiwolf@gmail.com>
|
||||
Frank Huard <veryinky@gmail.com>
|
||||
daftfad <daftfjord@gmail.com>
|
||||
ZwodahS <ericnjf@gmail.com>
|
||||
Williham "Wito" Totland <williham.totland@gmail.com>
|
||||
Zach Morgan <zpmorgan@gmail.com>
|
||||
Livingstone <minexal@gmail.com>
|
||||
Ethan "Soron" Kaminski <ethan.kaminski@gmail.com>
|
||||
Soyweiser <soyweiser@gmail.com>
|
||||
Jason Gilbert <0jason.gilbert@gmail.com>
|
||||
Charlie Nolan (FunnyMan3595) <funnyman3595@gmail.com>
|
||||
uzername (some_name) <ivanpost777@gmail.com>
|
||||
Christian Buskirk (i2amroy) <i2amroy@gmail.com>
|
||||
Kevin McKayven (GlyphGryph) <glyphgryph@gmail.com>
|
||||
Ozone <satori.jj@gmail.com>
|
||||
Herbert Jones <jones.herbert@gmail.com>
|
||||
Justin "MacrosBlackD" Drury <macrosblackd@gmail.com>
|
||||
AtomicDryad <fnord@fnord> / <atomicdryad@gmail.com>
|
||||
Izicata
|
||||
Voker57 <voker57@gmail.com>
|
||||
Tommy <yobbobanana@gmx.com>
|
||||
teh-sam
|
||||
Alex Casey (Tamunshin) <tamunshin@hotmail.com>
|
||||
Stevensonz <money3030@yahoo.com.>
|
||||
David Holmes <dholmes@dholmes.us>
|
||||
Sean McLaughlin <galenevil@hotmail.com> / <galenevil.eve@gmail.com>
|
||||
@@ -1,6 +0,0 @@
|
||||
There's a slowly growing test suite in tests/. To build install libtap
|
||||
from http://www.shlomifish.org/open-source/projects/libtap/ *, then build
|
||||
the "check" target. e.g. "make check". This builds and runs any tests.
|
||||
|
||||
*Unpack the tarball with "gunzip tap-1.03.tar.gz && tar xf tap-1.03.tar"
|
||||
instead of the usual tar command.
|
||||
@@ -1,92 +0,0 @@
|
||||
Info on translating Cataclysm-DDA into another language.
|
||||
|
||||
|
||||
TRANSLATORS
|
||||
===========
|
||||
|
||||
If there is already a translation available for your language,
|
||||
and you just want to update or improve it,
|
||||
you can edit the .po file for your language,
|
||||
found inside the "lang/po" subdirectory.
|
||||
|
||||
After editing this file,
|
||||
if you are running the dev version and want to test your changes,
|
||||
perform step 4 from the maintainers section below.
|
||||
|
||||
|
||||
If there is no translation yet,
|
||||
the .po file will need to be generated.
|
||||
You can do this yourself by following the instructions below,
|
||||
or ask one of the CleverRaven devs to do it for you.
|
||||
|
||||
When you are done translating,
|
||||
submit the changes back to CleverRaven for inclusion in Cataclysm-DDA.
|
||||
|
||||
|
||||
MAINTAINERS
|
||||
===========
|
||||
|
||||
|
||||
Step 1: Extract the translatable strings
|
||||
----------------------------------------
|
||||
|
||||
First we have to extract the translatable strings from the .json files.
|
||||
The python script lang/extract_json_strings.py will do this for us,
|
||||
storing them in an intermediate form in lang/json for "xgettext" to read.
|
||||
|
||||
python lang/extract_json_strings.py
|
||||
|
||||
Now we can use xgettext to collate all the translatable strings,
|
||||
and store them in the file lang/po/cataclysm-dda.pot.
|
||||
|
||||
This needs to be done every time translatable strings are added or modified.
|
||||
All of the translations depend on this file.
|
||||
|
||||
xgettext -d cataclysm-dda -s -o lang/po/cataclysm-dda.pot --keyword=_ *.cpp *.h lang/json/*.py
|
||||
|
||||
|
||||
Step 2(a): Initialize each language file
|
||||
----------------------------------------
|
||||
|
||||
If we're starting a new translation from scratch,
|
||||
we have to initialize the translation file.
|
||||
In this example the translation is into New Zealand English (en_NZ).
|
||||
For other languages change "en_NZ" to the relevant language identifier.
|
||||
|
||||
msginit -l en_NZ.utf8 -o lang/po/en_NZ.po -i lang/po/cataclysm-dda.pot
|
||||
|
||||
|
||||
Step 2(b): Update an already existing language file
|
||||
---------------------------------------------------
|
||||
|
||||
If we just want to update a translation,
|
||||
we'll want to keep all the messages that have already been translated.
|
||||
In this case we use "msgmerge" in stead of "msginit".
|
||||
|
||||
msgmerge -s -U lang/po/en_NZ.po lang/po/cataclysm-dda.pot
|
||||
|
||||
|
||||
Step 3: Translate
|
||||
-----------------
|
||||
|
||||
Now open the .po file in your favorite editor and translate!
|
||||
The lines beginning with "msgid" must be left in the english form,
|
||||
only the lines beginning with "msgstr" should be translated.
|
||||
|
||||
|
||||
Step 4: Compile the .po file
|
||||
----------------------------
|
||||
|
||||
If it is a new translation,
|
||||
you will need to create a subdirectory in lang/mo for it,
|
||||
and then a subdirectory called "LC_MESSAGES" inside that.
|
||||
For example:
|
||||
|
||||
mkdir -p lang/mo/en_NZ/LC_MESSAGES
|
||||
|
||||
Now run the "msgfmt" program to compile the translations for use in game.
|
||||
|
||||
msgfmt -c -o lang/mo/en_NZ/LC_MESSAGES/cataclysm-dda.mo lang/po/en_NZ.po
|
||||
|
||||
Hooray, that's it :).
|
||||
|
||||
+35
@@ -0,0 +1,35 @@
|
||||
# Welcome to Jekyll!
|
||||
#
|
||||
# This config file is meant for settings that affect your whole blog, values
|
||||
# which you are expected to set up once and rarely edit after that. If you find
|
||||
# yourself editing this file very often, consider using Jekyll's data files
|
||||
# feature for the data you need to update frequently.
|
||||
#
|
||||
# For technical reasons, this file is *NOT* reloaded automatically when you use
|
||||
# 'bundle exec jekyll serve'. If you change this file, please restart the server process.
|
||||
|
||||
# Site settings
|
||||
# These are used to personalize your new site. If you look in the HTML files,
|
||||
# you will see them accessed via {{ site.title }}, {{ site.email }}, and so on.
|
||||
# You can create any custom variable you would like, and they will be accessible
|
||||
# in the templates via {{ site.myvariable }}.
|
||||
title: "Cataclysm: Dark Days Ahead"
|
||||
email: kevin.granade@gmail.com
|
||||
description: > # this means to ignore newlines until "baseurl:"
|
||||
Official homepage of Cataclysm: Dark Days Ahead open source turn-based survival RPG development project.
|
||||
Hosts downloads of game and links to community sites and resources.
|
||||
baseurl: "" # the subpath of your site, e.g. /blog
|
||||
url: "https://cataclysmdda.org" # the base hostname & protocol for your site, e.g. http://example.com
|
||||
repository: CleverRaven/Cataclysm-DDA
|
||||
|
||||
# Build settings
|
||||
markdown: kramdown
|
||||
theme: minima
|
||||
plugins:
|
||||
- jekyll-feed
|
||||
exclude:
|
||||
- Gemfile
|
||||
- Gemfile.lock
|
||||
- vendor
|
||||
include:
|
||||
- .well-known
|
||||
@@ -0,0 +1,18 @@
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
|
||||
<title>{% if page.title %}{{ page.title | escape }}{% else %}{{ site.title | escape }}{% endif %}</title>
|
||||
<meta name="description" content="{{ page.excerpt | default: site.description | strip_html | normalize_whitespace | truncate: 160 | escape }}">
|
||||
|
||||
<link rel="stylesheet" href="{{ "/assets/main.css" | relative_url }}">
|
||||
<link rel="canonical" href="{{ page.url | replace:'index.html','' | absolute_url }}">
|
||||
<link rel="alternate" type="application/rss+xml" title="{{ site.title | escape }}" href="{{ "/feed.xml" | relative_url }}">
|
||||
<link rel="me" href="https://mastodon.gamedev.place/@kevingranade">
|
||||
<link rel="me" href="https://social.treehouse.systems/@itsmaya">
|
||||
|
||||
{% if jekyll.environment == 'production' and site.google_analytics %}
|
||||
{% include google-analytics.html %}
|
||||
{% endif %}
|
||||
</head>
|
||||
@@ -0,0 +1,31 @@
|
||||
<header class="site-header">
|
||||
|
||||
<div class="wrapper">
|
||||
{%- assign default_paths = site.pages | map: "path" -%}
|
||||
{%- assign page_paths = site.header_pages | default: default_paths -%}
|
||||
{%- assign titles_size = site.pages | map: 'title' | join: '' | size -%}
|
||||
<a class="site-title" rel="author" href="{{ "/" | relative_url }}">{{ site.title | escape }}</a>
|
||||
|
||||
{%- if titles_size > 0 -%}
|
||||
<nav class="site-nav">
|
||||
<input type="checkbox" id="nav-trigger" class="nav-trigger" />
|
||||
<label for="nav-trigger">
|
||||
<span class="menu-icon">
|
||||
<svg viewBox="0 0 18 15" width="18px" height="15px">
|
||||
<path d="M18,1.484c0,0.82-0.665,1.484-1.484,1.484H1.484C0.665,2.969,0,2.304,0,1.484l0,0C0,0.665,0.665,0,1.484,0 h15.032C17.335,0,18,0.665,18,1.484L18,1.484z M18,7.516C18,8.335,17.335,9,16.516,9H1.484C0.665,9,0,8.335,0,7.516l0,0 c0-0.82,0.665-1.484,1.484-1.484h15.032C17.335,6.031,18,6.696,18,7.516L18,7.516z M18,13.516C18,14.335,17.335,15,16.516,15H1.484 C0.665,15,0,14.335,0,13.516l0,0c0-0.82,0.665-1.483,1.484-1.483h15.032C17.335,12.031,18,12.695,18,13.516L18,13.516z"/>
|
||||
</svg>
|
||||
</span>
|
||||
</label>
|
||||
|
||||
<div class="trigger">
|
||||
<a class="page-link" href="/">Home</a>
|
||||
<a class="page-link" href="/releases/">Releases</a>
|
||||
<!--<a class="page-link" href="/changes/">Changes</a>-->
|
||||
<a class="page-link" href="/contributions/">Contribution Guidelines</a>
|
||||
<a class="page-link" href="/donations/">Donations</a>
|
||||
<a class="page-link" href="https://github.com/CleverRaven/Cataclysm-DDA/">GitHub</a>
|
||||
</div>
|
||||
</nav>
|
||||
{%- endif -%}
|
||||
</div>
|
||||
</header>
|
||||
-467
@@ -1,467 +0,0 @@
|
||||
#include "game.h"
|
||||
#include "keypress.h"
|
||||
#include "output.h"
|
||||
#include <istream>
|
||||
#include <sstream>
|
||||
#include <fstream>
|
||||
|
||||
void parse_keymap(std::istream &keymap_txt, std::map<char, action_id> &kmap);
|
||||
|
||||
void game::load_keyboard_settings()
|
||||
{
|
||||
// Load the default keymap
|
||||
std::istringstream sin;
|
||||
sin.str(default_keymap_txt());
|
||||
parse_keymap(sin, default_keymap);
|
||||
|
||||
// Load the player's actual keymap
|
||||
std::ifstream fin;
|
||||
fin.open("data/keymap.txt");
|
||||
if (!fin) { // It doesn't exist
|
||||
std::ofstream fout;
|
||||
fout.open("data/keymap.txt");
|
||||
fout << default_keymap_txt();
|
||||
fout.close();
|
||||
fin.open("data/keymap.txt");
|
||||
}
|
||||
if (!fin) { // Still can't open it--probably bad permissions
|
||||
debugmsg("Can't open data/keymap.txt. This may be a permissions issue.");
|
||||
keymap = default_keymap;
|
||||
return;
|
||||
} else {
|
||||
parse_keymap(fin, keymap);
|
||||
}
|
||||
|
||||
// Check for new defaults, and automatically bind them if possible
|
||||
std::map<char, action_id>::iterator d_it;
|
||||
bool found;
|
||||
for (d_it = default_keymap.begin(); d_it != default_keymap.end(); d_it++) {
|
||||
found = false;
|
||||
std::map<char, action_id>::iterator k_it;
|
||||
for (k_it = keymap.begin(); k_it != keymap.end(); k_it++) {
|
||||
if (d_it->second == k_it->second) {
|
||||
found = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (!found && !keymap.count(d_it->first)) {
|
||||
keymap[d_it->first] = d_it->second;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void parse_keymap(std::istream &keymap_txt, std::map<char, action_id> &kmap)
|
||||
{
|
||||
while (!keymap_txt.eof()) {
|
||||
std::string id;
|
||||
keymap_txt >> id;
|
||||
if (id == "")
|
||||
getline(keymap_txt, id); // Empty line, chomp it
|
||||
else if (id[0] != '#') {
|
||||
action_id act = look_up_action(id);
|
||||
if (act == ACTION_NULL)
|
||||
debugmsg("\
|
||||
Warning! data/keymap.txt contains an unknown action, \"%s\"\n\
|
||||
Fix data/keymap.txt at your next chance!", id.c_str());
|
||||
else {
|
||||
while (!keymap_txt.eof()) {
|
||||
char ch;
|
||||
keymap_txt >> std::noskipws >> ch >> std::skipws;
|
||||
if (ch == '\n') {
|
||||
break;
|
||||
} else if (ch != ' ' || keymap_txt.peek() == '\n') {
|
||||
if (kmap.find(ch) != kmap.end()) {
|
||||
debugmsg("\
|
||||
Warning! '%c' assigned twice in the keymap!\n\
|
||||
%s is being ignored.\n\
|
||||
Fix data/keymap.txt at your next chance!", ch, id.c_str());
|
||||
} else {
|
||||
kmap[ ch ] = act;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
} else {
|
||||
getline(keymap_txt, id); // Clear the whole line
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void game::save_keymap()
|
||||
{
|
||||
std::ofstream fout;
|
||||
fout.open("data/keymap.txt");
|
||||
if (!fout) { // It doesn't exist
|
||||
debugmsg("Can't open data/keymap.txt.");
|
||||
fout.close();
|
||||
return;
|
||||
}
|
||||
std::map<char, action_id>::iterator it;
|
||||
for (it = keymap.begin(); it != keymap.end(); it++)
|
||||
fout << action_ident( (*it).second ) << " " << (*it).first << std::endl;
|
||||
|
||||
fout.close();
|
||||
}
|
||||
|
||||
std::vector<char> game::keys_bound_to(action_id act)
|
||||
{
|
||||
std::vector<char> ret;
|
||||
std::map<char, action_id>::iterator it;
|
||||
for (it = keymap.begin(); it != keymap.end(); it++) {
|
||||
if ( (*it).second == act )
|
||||
ret.push_back( (*it).first );
|
||||
}
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
void game::clear_bindings(action_id act)
|
||||
{
|
||||
std::map<char, action_id>::iterator it;
|
||||
for (it = keymap.begin(); it != keymap.end(); it++) {
|
||||
if ( (*it).second == act ) {
|
||||
keymap.erase(it);
|
||||
it = keymap.begin();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
std::string action_ident(action_id act)
|
||||
{
|
||||
switch (act) {
|
||||
case ACTION_PAUSE:
|
||||
return "pause";
|
||||
case ACTION_MOVE_N:
|
||||
return "move_n";
|
||||
case ACTION_MOVE_NE:
|
||||
return "move_ne";
|
||||
case ACTION_MOVE_E:
|
||||
return "move_e";
|
||||
case ACTION_MOVE_SE:
|
||||
return "move_se";
|
||||
case ACTION_MOVE_S:
|
||||
return "move_s";
|
||||
case ACTION_MOVE_SW:
|
||||
return "move_sw";
|
||||
case ACTION_MOVE_W:
|
||||
return "move_w";
|
||||
case ACTION_MOVE_NW:
|
||||
return "move_nw";
|
||||
case ACTION_MOVE_DOWN:
|
||||
return "move_down";
|
||||
case ACTION_MOVE_UP:
|
||||
return "move_up";
|
||||
case ACTION_CENTER:
|
||||
return "center";
|
||||
case ACTION_SHIFT_N:
|
||||
return "shift_n";
|
||||
case ACTION_SHIFT_NE:
|
||||
return "shift_ne";
|
||||
case ACTION_SHIFT_E:
|
||||
return "shift_e";
|
||||
case ACTION_SHIFT_SE:
|
||||
return "shift_se";
|
||||
case ACTION_SHIFT_S:
|
||||
return "shift_s";
|
||||
case ACTION_SHIFT_SW:
|
||||
return "shift_sw";
|
||||
case ACTION_SHIFT_W:
|
||||
return "shift_w";
|
||||
case ACTION_SHIFT_NW:
|
||||
return "shift_nw";
|
||||
case ACTION_OPEN:
|
||||
return "open";
|
||||
case ACTION_CLOSE:
|
||||
return "close";
|
||||
case ACTION_SMASH:
|
||||
return "smash";
|
||||
case ACTION_EXAMINE:
|
||||
return "examine";
|
||||
case ACTION_ADVANCEDINV:
|
||||
return "advinv";
|
||||
case ACTION_PICKUP:
|
||||
return "pickup";
|
||||
case ACTION_BUTCHER:
|
||||
return "butcher";
|
||||
case ACTION_CHAT:
|
||||
return "chat";
|
||||
case ACTION_LOOK:
|
||||
return "look";
|
||||
case ACTION_PEEK:
|
||||
return "peek";
|
||||
case ACTION_LIST_ITEMS:
|
||||
return "listitems";
|
||||
case ACTION_INVENTORY:
|
||||
return "inventory";
|
||||
case ACTION_COMPARE:
|
||||
return "compare";
|
||||
case ACTION_ORGANIZE:
|
||||
return "organize";
|
||||
case ACTION_USE:
|
||||
return "apply";
|
||||
case ACTION_USE_WIELDED:
|
||||
return "apply_wielded";
|
||||
case ACTION_WEAR:
|
||||
return "wear";
|
||||
case ACTION_TAKE_OFF:
|
||||
return "take_off";
|
||||
case ACTION_EAT:
|
||||
return "eat";
|
||||
case ACTION_READ:
|
||||
return "read";
|
||||
case ACTION_WIELD:
|
||||
return "wield";
|
||||
case ACTION_PICK_STYLE:
|
||||
return "pick_style";
|
||||
case ACTION_RELOAD:
|
||||
return "reload";
|
||||
case ACTION_UNLOAD:
|
||||
return "unload";
|
||||
case ACTION_THROW:
|
||||
return "throw";
|
||||
case ACTION_FIRE:
|
||||
return "fire";
|
||||
case ACTION_FIRE_BURST:
|
||||
return "fire_burst";
|
||||
case ACTION_SELECT_FIRE_MODE:
|
||||
return "select_fire_mode";
|
||||
case ACTION_DROP:
|
||||
return "drop";
|
||||
case ACTION_DIR_DROP:
|
||||
return "drop_adj";
|
||||
case ACTION_BIONICS:
|
||||
return "bionics";
|
||||
case ACTION_SORT_ARMOR:
|
||||
return "sort_armor";
|
||||
case ACTION_WAIT:
|
||||
return "wait";
|
||||
case ACTION_CRAFT:
|
||||
return "craft";
|
||||
case ACTION_RECRAFT:
|
||||
return "recraft";
|
||||
case ACTION_LONGCRAFT:
|
||||
return "long_craft";
|
||||
case ACTION_CONSTRUCT:
|
||||
return "construct";
|
||||
case ACTION_DISASSEMBLE:
|
||||
return "disassemble";
|
||||
case ACTION_SLEEP:
|
||||
return "sleep";
|
||||
case ACTION_CONTROL_VEHICLE:
|
||||
return "control_vehicle";
|
||||
case ACTION_TOGGLE_SAFEMODE:
|
||||
return "safemode";
|
||||
case ACTION_TOGGLE_AUTOSAFE:
|
||||
return "autosafe";
|
||||
case ACTION_IGNORE_ENEMY:
|
||||
return "ignore_enemy";
|
||||
case ACTION_SAVE:
|
||||
return "save";
|
||||
case ACTION_QUICKSAVE:
|
||||
return "quicksave";
|
||||
case ACTION_QUIT:
|
||||
return "quit";
|
||||
case ACTION_PL_INFO:
|
||||
return "player_data";
|
||||
case ACTION_MAP:
|
||||
return "map";
|
||||
case ACTION_MISSIONS:
|
||||
return "missions";
|
||||
case ACTION_FACTIONS:
|
||||
return "factions";
|
||||
case ACTION_KILLS:
|
||||
return "kills";
|
||||
case ACTION_MORALE:
|
||||
return "morale";
|
||||
case ACTION_MESSAGES:
|
||||
return "messages";
|
||||
case ACTION_HELP:
|
||||
return "help";
|
||||
case ACTION_DEBUG:
|
||||
return "debug";
|
||||
case ACTION_DISPLAY_SCENT:
|
||||
return "debug_scent";
|
||||
case ACTION_TOGGLE_DEBUGMON:
|
||||
return "debug_mode";
|
||||
case ACTION_NULL:
|
||||
return "null";
|
||||
}
|
||||
return "unknown";
|
||||
}
|
||||
|
||||
action_id look_up_action(std::string ident)
|
||||
{
|
||||
for (int i = 0; i < NUM_ACTIONS; i++)
|
||||
{
|
||||
if (action_ident( action_id(i) ) == ident)
|
||||
{
|
||||
return action_id(i);
|
||||
}
|
||||
}
|
||||
return ACTION_NULL;
|
||||
}
|
||||
|
||||
std::string action_name(action_id act)
|
||||
{
|
||||
switch (act)
|
||||
{
|
||||
case ACTION_PAUSE:
|
||||
return "Pause";
|
||||
case ACTION_MOVE_N:
|
||||
return "Move North";
|
||||
case ACTION_MOVE_NE:
|
||||
return "Move Northeast";
|
||||
case ACTION_MOVE_E:
|
||||
return "Move East";
|
||||
case ACTION_MOVE_SE:
|
||||
return "Move Southeast";
|
||||
case ACTION_MOVE_S:
|
||||
return "Move South";
|
||||
case ACTION_MOVE_SW:
|
||||
return "Move Southwest";
|
||||
case ACTION_MOVE_W:
|
||||
return "Move West";
|
||||
case ACTION_MOVE_NW:
|
||||
return "Move Northwest";
|
||||
case ACTION_MOVE_DOWN:
|
||||
return "Descend Stairs";
|
||||
case ACTION_MOVE_UP:
|
||||
return "Ascend Stairs";
|
||||
case ACTION_CENTER:
|
||||
return "Center View";
|
||||
case ACTION_SHIFT_N:
|
||||
return "Move View North";
|
||||
case ACTION_SHIFT_NE:
|
||||
return "Move View Northeast";
|
||||
case ACTION_SHIFT_E:
|
||||
return "Move View East";
|
||||
case ACTION_SHIFT_SE:
|
||||
return "Move View Southeast";
|
||||
case ACTION_SHIFT_S:
|
||||
return "Move View South";
|
||||
case ACTION_SHIFT_SW:
|
||||
return "Move View Southwest";
|
||||
case ACTION_SHIFT_W:
|
||||
return "Move View West";
|
||||
case ACTION_SHIFT_NW:
|
||||
return "Move View Northwest";
|
||||
case ACTION_OPEN:
|
||||
return "Open Door";
|
||||
case ACTION_CLOSE:
|
||||
return "Close Door";
|
||||
case ACTION_SMASH:
|
||||
return "Smash Nearby Terrain";
|
||||
case ACTION_EXAMINE:
|
||||
return "Examine Nearby Terrain";
|
||||
case ACTION_PICKUP:
|
||||
return "Pick Item(s) Up";
|
||||
case ACTION_BUTCHER:
|
||||
return "Butcher";
|
||||
case ACTION_CHAT:
|
||||
return "Chat with NPC";
|
||||
case ACTION_LOOK:
|
||||
return "Look Around";
|
||||
case ACTION_PEEK:
|
||||
return "Peek Around Corners";
|
||||
case ACTION_LIST_ITEMS:
|
||||
return "List all items around the player";
|
||||
case ACTION_INVENTORY:
|
||||
return "Open Inventory";
|
||||
case ACTION_ADVANCEDINV:
|
||||
return "Advanced Inventory management";
|
||||
case ACTION_COMPARE:
|
||||
return "Compare two Items";
|
||||
case ACTION_ORGANIZE:
|
||||
return "Swap Inventory Letters";
|
||||
case ACTION_USE:
|
||||
return "Apply or Use Item";
|
||||
case ACTION_USE_WIELDED:
|
||||
return "Apply or Use Wielded Item";
|
||||
case ACTION_WEAR:
|
||||
return "Wear Item";
|
||||
case ACTION_TAKE_OFF:
|
||||
return "Take Off Worn Item";
|
||||
case ACTION_EAT:
|
||||
return "Eat";
|
||||
case ACTION_READ:
|
||||
return "Read";
|
||||
case ACTION_WIELD:
|
||||
return "Wield";
|
||||
case ACTION_PICK_STYLE:
|
||||
return "Select Unarmed Style";
|
||||
case ACTION_RELOAD:
|
||||
return "Reload Wielded Item";
|
||||
case ACTION_UNLOAD:
|
||||
return "Unload or Empty Wielded Item";
|
||||
case ACTION_THROW:
|
||||
return "Throw Item";
|
||||
case ACTION_FIRE:
|
||||
return "Fire Wielded Item";
|
||||
case ACTION_FIRE_BURST:
|
||||
return "Burst-Fire Wielded Item";
|
||||
case ACTION_SELECT_FIRE_MODE:
|
||||
return "Toggle attack mode of Wielded Item";
|
||||
case ACTION_DROP:
|
||||
return "Drop Item";
|
||||
case ACTION_DIR_DROP:
|
||||
return "Drop Item to Adjacent Tile";
|
||||
case ACTION_BIONICS:
|
||||
return "View/Activate Bionics";
|
||||
case ACTION_SORT_ARMOR:
|
||||
return "Re-layer armour/clothing";
|
||||
case ACTION_WAIT:
|
||||
return "Wait for Several Minutes";
|
||||
case ACTION_CRAFT:
|
||||
return "Craft Items";
|
||||
case ACTION_RECRAFT:
|
||||
return "Recraft last recipe";
|
||||
case ACTION_LONGCRAFT:
|
||||
return "Craft as long as possible";
|
||||
case ACTION_CONSTRUCT:
|
||||
return "Construct Terrain";
|
||||
case ACTION_DISASSEMBLE:
|
||||
return "Disassemble items";
|
||||
case ACTION_SLEEP:
|
||||
return "Sleep";
|
||||
case ACTION_CONTROL_VEHICLE:
|
||||
return "Control Vehicle";
|
||||
case ACTION_TOGGLE_SAFEMODE:
|
||||
return "Toggle Safemode";
|
||||
case ACTION_TOGGLE_AUTOSAFE:
|
||||
return "Toggle Auto-Safemode";
|
||||
case ACTION_IGNORE_ENEMY:
|
||||
return "Ignore Nearby Enemy";
|
||||
case ACTION_SAVE:
|
||||
return "Save and Quit";
|
||||
case ACTION_QUICKSAVE:
|
||||
return "Quicksave";
|
||||
case ACTION_QUIT:
|
||||
return "Commit Suicide";
|
||||
case ACTION_PL_INFO:
|
||||
return "View Player Info";
|
||||
case ACTION_MAP:
|
||||
return "View Map";
|
||||
case ACTION_MISSIONS:
|
||||
return "View Missions";
|
||||
case ACTION_FACTIONS:
|
||||
return "View Factions";
|
||||
case ACTION_KILLS:
|
||||
return "View Kills";
|
||||
case ACTION_MORALE:
|
||||
return "View Morale";
|
||||
case ACTION_MESSAGES:
|
||||
return "View Message Log";
|
||||
case ACTION_HELP:
|
||||
return "View Help";
|
||||
case ACTION_DEBUG:
|
||||
return "Debug Menu";
|
||||
case ACTION_DISPLAY_SCENT:
|
||||
return "View Scentmap";
|
||||
case ACTION_TOGGLE_DEBUGMON:
|
||||
return "Toggle Debug Messages";
|
||||
case ACTION_NULL:
|
||||
return "No Action";
|
||||
}
|
||||
return "Someone forgot to name an action.";
|
||||
}
|
||||
|
||||
@@ -1,97 +0,0 @@
|
||||
#ifndef _ACTION_H_
|
||||
#define _ACTION_H_
|
||||
|
||||
enum action_id {
|
||||
ACTION_NULL = 0,
|
||||
// Movement
|
||||
ACTION_PAUSE,
|
||||
ACTION_MOVE_N,
|
||||
ACTION_MOVE_NE,
|
||||
ACTION_MOVE_E,
|
||||
ACTION_MOVE_SE,
|
||||
ACTION_MOVE_S,
|
||||
ACTION_MOVE_SW,
|
||||
ACTION_MOVE_W,
|
||||
ACTION_MOVE_NW,
|
||||
ACTION_MOVE_DOWN,
|
||||
ACTION_MOVE_UP,
|
||||
// Shift view
|
||||
ACTION_CENTER,
|
||||
ACTION_SHIFT_N,
|
||||
ACTION_SHIFT_NE,
|
||||
ACTION_SHIFT_E,
|
||||
ACTION_SHIFT_SE,
|
||||
ACTION_SHIFT_S,
|
||||
ACTION_SHIFT_SW,
|
||||
ACTION_SHIFT_W,
|
||||
ACTION_SHIFT_NW,
|
||||
// Environment Interaction
|
||||
ACTION_OPEN,
|
||||
ACTION_CLOSE,
|
||||
ACTION_SMASH,
|
||||
ACTION_EXAMINE,
|
||||
ACTION_PICKUP,
|
||||
ACTION_BUTCHER,
|
||||
ACTION_CHAT,
|
||||
ACTION_LOOK,
|
||||
ACTION_PEEK,
|
||||
ACTION_LIST_ITEMS,
|
||||
// Inventory Interaction (including quasi-inventories like bionics)
|
||||
ACTION_INVENTORY,
|
||||
ACTION_ADVANCEDINV,
|
||||
ACTION_COMPARE,
|
||||
ACTION_ORGANIZE,
|
||||
ACTION_USE,
|
||||
ACTION_USE_WIELDED,
|
||||
ACTION_WEAR,
|
||||
ACTION_TAKE_OFF,
|
||||
ACTION_EAT,
|
||||
ACTION_READ,
|
||||
ACTION_WIELD,
|
||||
ACTION_PICK_STYLE,
|
||||
ACTION_RELOAD,
|
||||
ACTION_UNLOAD,
|
||||
ACTION_THROW,
|
||||
ACTION_FIRE,
|
||||
ACTION_FIRE_BURST,
|
||||
ACTION_SELECT_FIRE_MODE,
|
||||
ACTION_DROP,
|
||||
ACTION_DIR_DROP,
|
||||
ACTION_BIONICS,
|
||||
ACTION_SORT_ARMOR,
|
||||
// Long-term / special actions
|
||||
ACTION_WAIT,
|
||||
ACTION_CRAFT,
|
||||
ACTION_RECRAFT,
|
||||
ACTION_LONGCRAFT,
|
||||
ACTION_CONSTRUCT,
|
||||
ACTION_DISASSEMBLE,
|
||||
ACTION_SLEEP,
|
||||
ACTION_CONTROL_VEHICLE,
|
||||
ACTION_TOGGLE_SAFEMODE,
|
||||
ACTION_TOGGLE_AUTOSAFE,
|
||||
ACTION_IGNORE_ENEMY,
|
||||
ACTION_SAVE,
|
||||
ACTION_QUICKSAVE,
|
||||
ACTION_QUIT,
|
||||
// Info Screens
|
||||
ACTION_PL_INFO,
|
||||
ACTION_MAP,
|
||||
ACTION_MISSIONS,
|
||||
ACTION_KILLS,
|
||||
ACTION_FACTIONS,
|
||||
ACTION_MORALE,
|
||||
ACTION_MESSAGES,
|
||||
ACTION_HELP,
|
||||
// Debug Functions
|
||||
ACTION_DEBUG,
|
||||
ACTION_DISPLAY_SCENT,
|
||||
ACTION_TOGGLE_DEBUGMON,
|
||||
NUM_ACTIONS
|
||||
};
|
||||
|
||||
action_id look_up_action(std::string ident);
|
||||
std::string action_ident(action_id);
|
||||
std::string action_name(action_id);
|
||||
|
||||
#endif
|
||||
-241
@@ -1,241 +0,0 @@
|
||||
#include "addiction.h"
|
||||
|
||||
void addict_effect(game *g, addiction &add)
|
||||
{
|
||||
int in = add.intensity;
|
||||
|
||||
switch (add.type) {
|
||||
case ADD_CIG:
|
||||
if (in > 20 || one_in((500 - 20 * in))) {
|
||||
g->add_msg("You %s a cigarette.",
|
||||
rng(0, 6) < in ? "need" : "could use");
|
||||
g->cancel_activity_query("You have a nicotine craving.");
|
||||
g->u.add_morale(MORALE_CRAVING_NICOTINE, -15, -50);
|
||||
if (one_in(800 - 50 * in))
|
||||
g->u.fatigue++;
|
||||
if (one_in(400 - 20 * in))
|
||||
g->u.stim--;
|
||||
}
|
||||
break;
|
||||
|
||||
case ADD_CAFFEINE:
|
||||
g->u.moves -= 2;
|
||||
if (in > 20 || one_in((500 - 20 * in))) {
|
||||
g->add_msg("You want some caffeine.");
|
||||
g->cancel_activity_query("You have a caffeine craving.");
|
||||
g->u.add_morale(MORALE_CRAVING_CAFFEINE, -5, -30);
|
||||
if (rng(0, 10) < in)
|
||||
g->u.stim--;
|
||||
if (rng(8, 400) < in) {
|
||||
g->add_msg("Your hands start shaking... you need it bad!");
|
||||
g->u.add_disease("shakes", 20);
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
||||
case ADD_ALCOHOL:
|
||||
g->u.per_cur--;
|
||||
g->u.int_cur--;
|
||||
if (rng(40, 1200) <= in * 10)
|
||||
g->u.health--;
|
||||
if (one_in(20) && rng(0, 20) < in) {
|
||||
g->add_msg("You could use a drink.");
|
||||
g->cancel_activity_query("You have an alcohol craving.");
|
||||
g->u.add_morale(MORALE_CRAVING_ALCOHOL, -35, -120);
|
||||
} else if (rng(8, 300) < in) {
|
||||
g->add_msg("Your hands start shaking... you need a drink bad!");
|
||||
g->cancel_activity_query("You have an alcohol craving.");
|
||||
g->u.add_morale(MORALE_CRAVING_ALCOHOL, -35, -120);
|
||||
g->u.add_disease("shakes", 50);
|
||||
} else if (!g->u.has_disease("hallu") && rng(10, 1600) < in)
|
||||
g->u.add_disease("hallu", 3600);
|
||||
break;
|
||||
|
||||
case ADD_SLEEP:
|
||||
// No effects here--just in player::can_sleep()
|
||||
// EXCEPT! Prolong this addiction longer than usual.
|
||||
if (one_in(2) && add.sated < 0)
|
||||
add.sated++;
|
||||
break;
|
||||
|
||||
case ADD_PKILLER:
|
||||
if ((in >= 25 || int(g->turn) % (100 - in * 4) == 0) && g->u.pkill > 0)
|
||||
g->u.pkill--; // Tolerance increases!
|
||||
if (g->u.pkill >= 35) // No further effects if we're doped up.
|
||||
add.sated = 0;
|
||||
else {
|
||||
g->u.str_cur -= 1 + int(in / 7);
|
||||
g->u.per_cur--;
|
||||
g->u.dex_cur--;
|
||||
if (g->u.pain < in * 3)
|
||||
g->u.pain++;
|
||||
if (in >= 40 || one_in((1200 - 30 * in)))
|
||||
g->u.health--;
|
||||
if (one_in(20) && dice(2, 20) < in) {
|
||||
g->add_msg("Your hands start shaking... you need some painkillers.");
|
||||
g->cancel_activity_query("You have an opiate craving.");
|
||||
g->u.add_morale(MORALE_CRAVING_OPIATE, -40, -200);
|
||||
g->u.add_disease("shakes", 20 + in * 5);
|
||||
} else if (one_in(20) && dice(2, 30) < in) {
|
||||
g->add_msg("You feel anxious. You need your painkillers!");
|
||||
g->u.add_morale(MORALE_CRAVING_OPIATE, -30, -200);
|
||||
g->cancel_activity_query("You have a craving.");
|
||||
} else if (one_in(50) && dice(3, 50) < in) {
|
||||
g->add_msg("You throw up heavily!");
|
||||
g->cancel_activity_query("Throwing up.");
|
||||
g->u.vomit(g);
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
||||
case ADD_SPEED: {
|
||||
int move_pen = in * 5;
|
||||
if (move_pen > 30)
|
||||
move_pen = 30;
|
||||
g->u.moves -= move_pen;
|
||||
g->u.int_cur--;
|
||||
g->u.str_cur--;
|
||||
if (g->u.stim > -100 && (in >= 20 || int(g->turn) % (100 - in * 5) == 0))
|
||||
g->u.stim--;
|
||||
if (rng(0, 150) <= in)
|
||||
g->u.health--;
|
||||
if (dice(2, 100) < in) {
|
||||
g->add_msg("You feel depressed. Speed would help.");
|
||||
g->cancel_activity_query("You have a speed craving.");
|
||||
g->u.add_morale(MORALE_CRAVING_SPEED, -25, -200);
|
||||
} else if (one_in(10) && dice(2, 80) < in) {
|
||||
g->add_msg("Your hands start shaking... you need a pick-me-up.");
|
||||
g->cancel_activity_query("You have a speed craving.");
|
||||
g->u.add_morale(MORALE_CRAVING_SPEED, -25, -200);
|
||||
g->u.add_disease("shakes", in * 20);
|
||||
} else if (one_in(50) && dice(2, 100) < in) {
|
||||
g->add_msg("You stop suddenly, feeling bewildered.");
|
||||
g->cancel_activity();
|
||||
g->u.moves -= 300;
|
||||
} else if (!g->u.has_disease("hallu") && one_in(20) &&
|
||||
8 + dice(2, 80) < in)
|
||||
g->u.add_disease("hallu", 3600);
|
||||
} break;
|
||||
|
||||
case ADD_COKE:
|
||||
g->u.int_cur--;
|
||||
g->u.per_cur--;
|
||||
if (in >= 30 || one_in((900 - 30 * in))) {
|
||||
g->add_msg("You feel like you need a bump.");
|
||||
g->cancel_activity_query("You have a craving for cocaine.");
|
||||
g->u.add_morale(MORALE_CRAVING_COCAINE, -20, -250);
|
||||
}
|
||||
if (dice(2, 80) <= in) {
|
||||
g->add_msg("You feel like you need a bump.");
|
||||
g->cancel_activity_query("You have a craving for cocaine.");
|
||||
g->u.add_morale(MORALE_CRAVING_COCAINE, -20, -250);
|
||||
g->u.stim -= 3;
|
||||
}
|
||||
break;
|
||||
case ADD_CRACK:
|
||||
g->u.int_cur--;
|
||||
g->u.per_cur--;
|
||||
if (in >= 30 || one_in((900 - 30 * in))) {
|
||||
g->add_msg("You're shivering, you need some crack.");
|
||||
g->cancel_activity_query("You have a craving for crack.");
|
||||
g->u.add_morale(MORALE_CRAVING_CRACK, -80, -250);
|
||||
}
|
||||
if (dice(2, 80) <= in) {
|
||||
g->add_msg("You're shivering, you need some crack.");
|
||||
g->cancel_activity_query("You have a craving for crack.");
|
||||
g->u.add_morale(MORALE_CRAVING_CRACK, -80, -250);
|
||||
g->u.stim -= 3;
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
std::string addiction_name(addiction cur)
|
||||
{
|
||||
switch (cur.type) {
|
||||
case ADD_CIG: return "Nicotine Withdrawal";
|
||||
case ADD_CAFFEINE: return "Caffeine Withdrawal";
|
||||
case ADD_ALCOHOL: return "Alcohol Withdrawal";
|
||||
case ADD_SLEEP: return "Sleeping Pill Dependance";
|
||||
case ADD_PKILLER: return "Opiate Withdrawal";
|
||||
case ADD_SPEED: return "Amphetamine Withdrawal";
|
||||
case ADD_COKE: return "Cocaine Withdrawal";
|
||||
case ADD_CRACK: return "Crack Cocaine Withdrawal";
|
||||
default: return "Erroneous addiction";
|
||||
}
|
||||
}
|
||||
|
||||
morale_type addiction_craving(add_type cur)
|
||||
{
|
||||
switch (cur) {
|
||||
case ADD_CIG: return MORALE_CRAVING_NICOTINE;
|
||||
case ADD_CAFFEINE: return MORALE_CRAVING_CAFFEINE;
|
||||
case ADD_ALCOHOL: return MORALE_CRAVING_ALCOHOL;
|
||||
case ADD_PKILLER: return MORALE_CRAVING_OPIATE;
|
||||
case ADD_SPEED: return MORALE_CRAVING_SPEED;
|
||||
case ADD_COKE: return MORALE_CRAVING_COCAINE;
|
||||
case ADD_CRACK: return MORALE_CRAVING_CRACK;
|
||||
default: return MORALE_NULL;
|
||||
}
|
||||
}
|
||||
|
||||
add_type addiction_type(std::string name)
|
||||
{
|
||||
if (name == "nicotine")
|
||||
return ADD_CIG;
|
||||
else if (name == "caffeine")
|
||||
return ADD_CAFFEINE;
|
||||
else if (name == "alcohol")
|
||||
return ADD_ALCOHOL;
|
||||
else if (name == "sleeping pill")
|
||||
return ADD_SLEEP;
|
||||
else if (name == "opiate")
|
||||
return ADD_PKILLER;
|
||||
else if (name == "amphetamine")
|
||||
return ADD_SPEED;
|
||||
else if (name == "cocaine")
|
||||
return ADD_COKE;
|
||||
else if (name == "crack")
|
||||
return ADD_CRACK;
|
||||
else
|
||||
return ADD_NULL;
|
||||
}
|
||||
|
||||
std::string addiction_text(addiction cur)
|
||||
{
|
||||
std::stringstream dump;
|
||||
int strpen = 1 + int(cur.intensity / 7);
|
||||
switch (cur.type) {
|
||||
case ADD_CIG:
|
||||
return "Intelligence - 1; Occasional cravings";
|
||||
|
||||
case ADD_CAFFEINE:
|
||||
return "Strength - 1; Slight sluggishness; Occasional cravings";
|
||||
|
||||
case ADD_ALCOHOL:
|
||||
return "\
|
||||
Perception - 1; Intelligence - 1; Occasional Cravings;\n\
|
||||
Risk of delirium tremens";
|
||||
|
||||
case ADD_SLEEP:
|
||||
return "You may find it difficult to sleep without medication.";
|
||||
|
||||
case ADD_PKILLER:
|
||||
dump << "Strength -" << strpen << "; Perception - 1; Dexterity - 1;" <<
|
||||
std::endl <<
|
||||
"Depression and physical pain to some degree. Frequent cravings. Vomiting.";
|
||||
return dump.str();
|
||||
|
||||
case ADD_SPEED:
|
||||
return "Strength - 1; Intelligence - 1;\n\
|
||||
Movement rate reduction. Depression. Weak immune system. Frequent cravings.";
|
||||
|
||||
case ADD_COKE:
|
||||
return "Perception - 1; Intelligence - 1; Frequent cravings.";
|
||||
|
||||
case ADD_CRACK:
|
||||
return "Perception - 2; Intelligence - 2; Frequent cravings.";
|
||||
default:
|
||||
return "";
|
||||
}
|
||||
}
|
||||
-21
@@ -1,21 +0,0 @@
|
||||
#ifndef _ADDICTION_H_
|
||||
#define _ADDICTION_H_
|
||||
|
||||
#include "rng.h"
|
||||
#include "game.h"
|
||||
#include "morale.h"
|
||||
#include <sstream>
|
||||
|
||||
#define MIN_ADDICTION_LEVEL 3 // Minimum intensity before effects are seen
|
||||
|
||||
void addict_effect(game *g, addiction &add);
|
||||
|
||||
std::string addiction_name(addiction cur);
|
||||
|
||||
morale_type addiction_craving(add_type cur);
|
||||
|
||||
add_type addiction_type(std::string name);
|
||||
|
||||
std::string addiction_text(addiction cur);
|
||||
|
||||
#endif
|
||||
-1035
File diff suppressed because it is too large
Load Diff
-148
@@ -1,148 +0,0 @@
|
||||
#ifndef _ARTIFACT_H_
|
||||
#define _ARTIFACT_H_
|
||||
|
||||
#include <string>
|
||||
#include <vector>
|
||||
|
||||
enum art_effect_passive {
|
||||
AEP_NULL = 0,
|
||||
// Good
|
||||
AEP_STR_UP, // Strength + 4
|
||||
AEP_DEX_UP, // Dexterity + 4
|
||||
AEP_PER_UP, // Perception + 4
|
||||
AEP_INT_UP, // Intelligence + 4
|
||||
AEP_ALL_UP, // All stats + 2
|
||||
AEP_SPEED_UP, // +20 speed
|
||||
AEP_IODINE, // Reduces radiation
|
||||
AEP_SNAKES, // Summons friendly snakes when you're hit
|
||||
AEP_INVISIBLE, // Makes you invisible
|
||||
AEP_CLAIRVOYANCE, // See through walls
|
||||
AEP_SUPER_CLAIRVOYANCE, // See through walls to a great distance
|
||||
AEP_STEALTH, // Your steps are quieted
|
||||
AEP_EXTINGUISH, // May extinguish nearby flames
|
||||
AEP_GLOW, // Four-tile light source
|
||||
AEP_PSYSHIELD, // Protection from stare attacks
|
||||
AEP_RESIST_ELECTRICITY, // Protection from electricity
|
||||
AEP_CARRY_MORE, // Increases carrying capacity by 200
|
||||
AEP_SAP_LIFE, // Killing non-zombie monsters may heal you
|
||||
// Splits good from bad
|
||||
AEP_SPLIT,
|
||||
// Bad
|
||||
AEP_HUNGER, // Increases hunger
|
||||
AEP_THIRST, // Increases thirst
|
||||
AEP_SMOKE, // Emits smoke occasionally
|
||||
AEP_EVIL, // Addiction to the power
|
||||
AEP_SCHIZO, // Mimicks schizophrenia
|
||||
AEP_RADIOACTIVE, // Increases your radiation
|
||||
AEP_MUTAGENIC, // Mutates you slowly
|
||||
AEP_ATTENTION, // Draws netherworld attention slowly
|
||||
AEP_STR_DOWN, // Strength - 3
|
||||
AEP_DEX_DOWN, // Dex - 3
|
||||
AEP_PER_DOWN, // Per - 3
|
||||
AEP_INT_DOWN, // Int - 3
|
||||
AEP_ALL_DOWN, // All stats - 2
|
||||
AEP_SPEED_DOWN, // -20 speed
|
||||
AEP_FORCE_TELEPORT, // Occasionally force a teleport
|
||||
AEP_MOVEMENT_NOISE, // Makes noise when you move
|
||||
AEP_BAD_WEATHER, // More likely to experience bad weather
|
||||
AEP_SICK, // Decreases health
|
||||
|
||||
NUM_AEPS
|
||||
};
|
||||
|
||||
enum art_effect_active {
|
||||
AEA_NULL = 0,
|
||||
|
||||
AEA_STORM, // Emits shock fields
|
||||
AEA_FIREBALL, // Targeted
|
||||
AEA_ADRENALINE, // Adrenaline rush
|
||||
AEA_MAP, // Maps the area around you
|
||||
AEA_BLOOD, // Shoots blood all over
|
||||
AEA_FATIGUE, // Creates interdimensional fatigue
|
||||
AEA_ACIDBALL, // Targeted acid
|
||||
AEA_PULSE, // Destroys adjacent terrain
|
||||
AEA_HEAL, // Heals minor damage
|
||||
AEA_CONFUSED, // Confuses all monsters in view
|
||||
AEA_ENTRANCE, // Chance to make nearby monsters friendly
|
||||
AEA_BUGS, // Chance to summon friendly insects
|
||||
AEA_TELEPORT, // Teleports you
|
||||
AEA_LIGHT, // Temporary light source
|
||||
AEA_GROWTH, // Grow plants, a la triffid queen
|
||||
AEA_HURTALL, // Hurts all monsters!
|
||||
|
||||
AEA_SPLIT, // Split between good and bad
|
||||
|
||||
AEA_RADIATION, // Spew radioactive gas
|
||||
AEA_PAIN, // Increases player pain
|
||||
AEA_MUTATE, // Chance of mutation
|
||||
AEA_PARALYZE, // You lose several turns
|
||||
AEA_FIRESTORM, // Spreads minor fire all around you
|
||||
AEA_ATTENTION, // Attention from sub-prime denizens
|
||||
AEA_TELEGLOW, // Teleglow disease
|
||||
AEA_NOISE, // Loud noise
|
||||
AEA_SCREAM, // Noise & morale penalty
|
||||
AEA_DIM, // Darkens the sky slowly
|
||||
AEA_FLASH, // Flashbang
|
||||
AEA_VOMIT, // User vomits
|
||||
AEA_SHADOWS, // Summon shadow creatures
|
||||
|
||||
NUM_AEAS
|
||||
};
|
||||
|
||||
enum art_charge
|
||||
{
|
||||
ARTC_NULL, // Never recharges!
|
||||
ARTC_TIME, // Very slowly recharges with time
|
||||
ARTC_SOLAR, // Recharges in sunlight
|
||||
ARTC_PAIN, // Creates pain to recharge
|
||||
ARTC_HP, // Drains HP to recharge
|
||||
NUM_ARTCS
|
||||
};
|
||||
|
||||
enum artifact_natural_shape
|
||||
{
|
||||
ARTSHAPE_NULL,
|
||||
ARTSHAPE_SPHERE,
|
||||
ARTSHAPE_ROD,
|
||||
ARTSHAPE_TEARDROP,
|
||||
ARTSHAPE_LAMP,
|
||||
ARTSHAPE_SNAKE,
|
||||
ARTSHAPE_DISC,
|
||||
ARTSHAPE_BEADS,
|
||||
ARTSHAPE_NAPKIN,
|
||||
ARTSHAPE_URCHIN,
|
||||
ARTSHAPE_JELLY,
|
||||
ARTSHAPE_SPIRAL,
|
||||
ARTSHAPE_PIN,
|
||||
ARTSHAPE_TUBE,
|
||||
ARTSHAPE_PYRAMID,
|
||||
ARTSHAPE_CRYSTAL,
|
||||
ARTSHAPE_KNOT,
|
||||
ARTSHAPE_CRESCENT,
|
||||
ARTSHAPE_MAX
|
||||
};
|
||||
|
||||
enum artifact_natural_property
|
||||
{
|
||||
ARTPROP_NULL,
|
||||
ARTPROP_WRIGGLING, //
|
||||
ARTPROP_GLOWING, //
|
||||
ARTPROP_HUMMING, //
|
||||
ARTPROP_MOVING, //
|
||||
ARTPROP_WHISPERING, //
|
||||
ARTPROP_BREATHING, //
|
||||
ARTPROP_DEAD, //
|
||||
ARTPROP_ITCHY, //
|
||||
ARTPROP_GLITTERING, //
|
||||
ARTPROP_ELECTRIC, //
|
||||
ARTPROP_SLIMY, //
|
||||
ARTPROP_ENGRAVED, //
|
||||
ARTPROP_CRACKLING, //
|
||||
ARTPROP_WARM, //
|
||||
ARTPROP_RATTLING, //
|
||||
ARTPROP_SCALED,
|
||||
ARTPROP_FRACTAL,
|
||||
ARTPROP_MAX
|
||||
};
|
||||
|
||||
#endif
|
||||
-168
@@ -1,168 +0,0 @@
|
||||
#ifndef _ARTIFACTDATA_H_
|
||||
#define _ARTIFACTDATA_H_
|
||||
|
||||
#include <vector>
|
||||
#include "artifact.h"
|
||||
#include "itype.h"
|
||||
|
||||
extern int passive_effect_cost[NUM_AEPS];
|
||||
|
||||
extern int active_effect_cost[NUM_AEAS];
|
||||
|
||||
|
||||
struct artifact_shape_datum
|
||||
{
|
||||
std::string name;
|
||||
std::string desc;
|
||||
int volume_min, volume_max;
|
||||
int weight_min, weight_max;
|
||||
};
|
||||
|
||||
extern artifact_shape_datum artifact_shape_data[ARTSHAPE_MAX];
|
||||
|
||||
struct artifact_property_datum
|
||||
{
|
||||
std::string name;
|
||||
std::string desc;
|
||||
art_effect_passive passive_good[4];
|
||||
art_effect_passive passive_bad[4];
|
||||
art_effect_active active_good[4];
|
||||
art_effect_active active_bad[4];
|
||||
};
|
||||
|
||||
extern artifact_property_datum artifact_property_data[ARTPROP_MAX];
|
||||
|
||||
enum artifact_weapon_type
|
||||
{
|
||||
ARTWEAP_NULL,
|
||||
ARTWEAP_BULK, // A bulky item that works okay for bashing
|
||||
ARTWEAP_CLUB, // An item designed to bash
|
||||
ARTWEAP_SPEAR, // A stab-only weapon
|
||||
ARTWEAP_SWORD, // A long slasher
|
||||
ARTWEAP_KNIFE, // Short, slash and stab
|
||||
NUM_ARTWEAPS
|
||||
};
|
||||
|
||||
struct artifact_tool_form_datum
|
||||
{
|
||||
std::string name;
|
||||
char sym;
|
||||
nc_color color;
|
||||
std::string m1;
|
||||
std::string m2;
|
||||
int volume_min, volume_max;
|
||||
int weight_min, weight_max;
|
||||
artifact_weapon_type base_weapon;
|
||||
artifact_weapon_type extra_weapons[3];
|
||||
|
||||
/*
|
||||
artifact_tool_form_datum
|
||||
(std::string Name, char Sym, nc_color Color, std::string M1, std::string M2,
|
||||
int Volmin, int Volmax, int Wgtmin, int Wgtmax, artifact_weapon_type Base,
|
||||
artifact_weapon_type extra[3])
|
||||
: name (Name), sym (Sym), color (Color), m1 (M1), m2 (M2),
|
||||
volume_min (Volmin), volume_max (Volmax), weight_min (Wgtmin),
|
||||
weight_max (Wgtmax), base_weapon (Base), extra_weapons (extra) { };
|
||||
*/
|
||||
|
||||
};
|
||||
|
||||
enum artifact_tool_form
|
||||
{
|
||||
ARTTOOLFORM_NULL,
|
||||
ARTTOOLFORM_HARP,
|
||||
ARTTOOLFORM_STAFF,
|
||||
ARTTOOLFORM_SWORD,
|
||||
ARTTOOLFORM_KNIFE,
|
||||
ARTTOOLFORM_CUBE,
|
||||
NUM_ARTTOOLFORMS
|
||||
};
|
||||
|
||||
extern artifact_tool_form_datum artifact_tool_form_data[NUM_ARTTOOLFORMS];
|
||||
|
||||
struct artifact_weapon_datum
|
||||
{
|
||||
std::string adjective;
|
||||
int volume, weight; // Only applicable if this is an *extra* weapon
|
||||
int bash_min, bash_max;
|
||||
int cut_min, cut_max;
|
||||
int to_hit_min, to_hit_max;
|
||||
std::string tag;
|
||||
};
|
||||
|
||||
extern artifact_weapon_datum artifact_weapon_data[NUM_ARTWEAPS];
|
||||
|
||||
enum artifact_armor_mod
|
||||
{
|
||||
ARMORMOD_NULL,
|
||||
ARMORMOD_LIGHT,
|
||||
ARMORMOD_BULKY,
|
||||
ARMORMOD_POCKETED,
|
||||
ARMORMOD_FURRED,
|
||||
ARMORMOD_PADDED,
|
||||
ARMORMOD_PLATED,
|
||||
NUM_ARMORMODS
|
||||
};
|
||||
|
||||
struct artifact_armor_form_datum
|
||||
{
|
||||
std::string name;
|
||||
nc_color color;
|
||||
std::string m1;
|
||||
std::string m2;
|
||||
int volume, weight;
|
||||
int encumb;
|
||||
int coverage;
|
||||
int thickness;
|
||||
int env_resist;
|
||||
int warmth;
|
||||
int storage;
|
||||
int melee_bash, melee_cut, melee_hit;
|
||||
unsigned char covers;
|
||||
bool plural;
|
||||
artifact_armor_mod available_mods[5];
|
||||
|
||||
/*
|
||||
// Constructor
|
||||
artifact_armor_form_datum
|
||||
(std::string Name, nc_color Color, std::string M1, std::string M2, int Volume,
|
||||
int Weight, int Encumb, int Dmg_res, int Cut_res, int Env_res,
|
||||
int Warmth, int Storage, int Bash, int Cut, int Hit, unsigned char Covers,
|
||||
bool Plural, artifact_armor_mod Mods[5])
|
||||
: name (Name), color (Color), m1 (M1), m2 (M2), volume (Volume),
|
||||
weight (Weight), encumb (Encumb), coverage (Coverage),
|
||||
thickness (thickness), env_resist (Env_res), warmth (Warmth),
|
||||
storage (Storage), melee_bash (Bash), melee_cut (Cut), melee_hit (Hit),
|
||||
covers (Covers), plural (Plural), available_mods (Mods) { };
|
||||
|
||||
*/
|
||||
};
|
||||
|
||||
enum artifact_armor_form
|
||||
{
|
||||
ARTARMFORM_NULL,
|
||||
ARTARMFORM_ROBE,
|
||||
ARTARMFORM_COAT,
|
||||
ARTARMFORM_MASK,
|
||||
ARTARMFORM_HELM,
|
||||
ARTARMFORM_GLOVES,
|
||||
ARTARMFORM_BOOTS,
|
||||
ARTARMFORM_RING,
|
||||
NUM_ARTARMFORMS
|
||||
};
|
||||
|
||||
extern artifact_armor_form_datum artifact_armor_form_data[NUM_ARTARMFORMS];
|
||||
|
||||
/* Armor mods alter the normal values of armor.
|
||||
* If the basic armor type has "null" as its second material, and the mod has a
|
||||
* material attached, the second material will be changed.
|
||||
*/
|
||||
extern artifact_armor_form_datum artifact_armor_mod_data[NUM_ARMORMODS];
|
||||
|
||||
#define NUM_ART_ADJS 20
|
||||
extern std::string artifact_adj[NUM_ART_ADJS];
|
||||
|
||||
#define NUM_ART_NOUNS 20
|
||||
extern std::string artifact_noun[NUM_ART_NOUNS];
|
||||
|
||||
#endif
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 1.7 MiB |
-755
@@ -1,755 +0,0 @@
|
||||
#include "game.h"
|
||||
#include "auto_pickup.h"
|
||||
#include "output.h"
|
||||
#include "debug.h"
|
||||
#include "keypress.h"
|
||||
#include "item_factory.h"
|
||||
|
||||
#include <stdlib.h>
|
||||
#include <fstream>
|
||||
#include <string>
|
||||
|
||||
std::vector<cPickupRules> vAutoPickupRules[5];
|
||||
|
||||
void game::show_auto_pickup()
|
||||
{
|
||||
save_reset_changes(false);
|
||||
|
||||
const int iHeaderHeight = 4;
|
||||
const int iContentHeight = FULL_SCREEN_HEIGHT-2-iHeaderHeight;
|
||||
|
||||
const int iOffsetX = (TERMX > FULL_SCREEN_WIDTH) ? (TERMX-FULL_SCREEN_WIDTH)/2 : 0;
|
||||
const int iOffsetY = (TERMY > FULL_SCREEN_HEIGHT) ? (TERMY-FULL_SCREEN_HEIGHT)/2 : 0;
|
||||
|
||||
std::map<int, bool> mapLines;
|
||||
mapLines[3] = true;
|
||||
mapLines[50] = true;
|
||||
mapLines[54] = true;
|
||||
//mapLines[61] = true;
|
||||
//mapLines[68] = true;
|
||||
|
||||
const int iTotalCols = mapLines.size()-1;
|
||||
|
||||
WINDOW* w_auto_pickup_options = newwin(FULL_SCREEN_HEIGHT/2, FULL_SCREEN_WIDTH/2, iOffsetY + (FULL_SCREEN_HEIGHT/2)/2, iOffsetX + (FULL_SCREEN_WIDTH/2)/2);
|
||||
WINDOW* w_auto_pickup_help = newwin((FULL_SCREEN_HEIGHT/2)-2, FULL_SCREEN_WIDTH * 3/4, 8 + iOffsetY + (FULL_SCREEN_HEIGHT/2)/2, iOffsetX + 19/2);
|
||||
|
||||
WINDOW* w_auto_pickup_border = newwin(FULL_SCREEN_HEIGHT, FULL_SCREEN_WIDTH, iOffsetY, iOffsetX);
|
||||
WINDOW* w_auto_pickup_header = newwin(iHeaderHeight, FULL_SCREEN_WIDTH - 2, 1 + iOffsetY, 1 + iOffsetX);
|
||||
WINDOW* w_auto_pickup = newwin(iContentHeight, FULL_SCREEN_WIDTH - 2, iHeaderHeight + 1 + iOffsetY, 1 + iOffsetX);
|
||||
|
||||
wborder(w_auto_pickup_border, LINE_XOXO, LINE_XOXO, LINE_OXOX, LINE_OXOX, LINE_OXXO, LINE_OOXX, LINE_XXOO, LINE_XOOX);
|
||||
mvwputch(w_auto_pickup_border, 3, 0, c_ltgray, LINE_XXXO); // |-
|
||||
mvwputch(w_auto_pickup_border, 3, 79, c_ltgray, LINE_XOXX); // -|
|
||||
|
||||
for (std::map<int, bool>::iterator iter = mapLines.begin(); iter != mapLines.end(); ++iter) {
|
||||
mvwputch(w_auto_pickup_border, FULL_SCREEN_HEIGHT-1, iter->first + 1, c_ltgray, LINE_XXOX); // _|_
|
||||
}
|
||||
|
||||
mvwprintz(w_auto_pickup_border, 0, 29, c_ltred, " AUTO PICKUP MANAGER ");
|
||||
wrefresh(w_auto_pickup_border);
|
||||
|
||||
mvwprintz(w_auto_pickup_header, 0, 0, c_ltgreen, " A");
|
||||
wprintz(w_auto_pickup_header, c_white, "dd ");
|
||||
|
||||
wprintz(w_auto_pickup_header, c_ltgreen, "R");
|
||||
wprintz(w_auto_pickup_header, c_white, "emove ");
|
||||
|
||||
wprintz(w_auto_pickup_header, c_ltgreen, "C");
|
||||
wprintz(w_auto_pickup_header, c_white, "opy ");
|
||||
|
||||
wprintz(w_auto_pickup_header, c_ltgreen, "M");
|
||||
wprintz(w_auto_pickup_header, c_white, "ove ");
|
||||
|
||||
wprintz(w_auto_pickup_header, c_ltgreen, "E");
|
||||
wprintz(w_auto_pickup_header, c_white, "nable ");
|
||||
|
||||
wprintz(w_auto_pickup_header, c_ltgreen, "D");
|
||||
wprintz(w_auto_pickup_header, c_white, "isable ");
|
||||
|
||||
wprintz(w_auto_pickup_header, c_ltgreen, "T");
|
||||
wprintz(w_auto_pickup_header, c_white, "est ");
|
||||
|
||||
mvwprintz(w_auto_pickup_header, 1, 0, c_ltgreen, " +");
|
||||
wprintz(w_auto_pickup_header, c_white, "/");
|
||||
wprintz(w_auto_pickup_header, c_ltgreen, "-");
|
||||
wprintz(w_auto_pickup_header, c_white, " Move up/down ");
|
||||
|
||||
wprintz(w_auto_pickup_header, c_ltgreen, "Enter");
|
||||
wprintz(w_auto_pickup_header, c_white, "-Edit ");
|
||||
|
||||
wprintz(w_auto_pickup_header, c_ltgreen, "Tab");
|
||||
wprintz(w_auto_pickup_header, c_white, "-Switch Page ");
|
||||
|
||||
|
||||
for (int i = 0; i < 78; i++) {
|
||||
if (mapLines[i]) {
|
||||
mvwputch(w_auto_pickup_header, 2, i, c_ltgray, LINE_OXXX);
|
||||
mvwputch(w_auto_pickup_header, 3, i, c_ltgray, LINE_XOXO);
|
||||
} else {
|
||||
mvwputch(w_auto_pickup_header, 2, i, c_ltgray, LINE_OXOX); // Draw line under header
|
||||
}
|
||||
}
|
||||
|
||||
mvwprintz(w_auto_pickup_header, 3, 0, c_white, "#");
|
||||
mvwprintz(w_auto_pickup_header, 3, 7, c_white, "Rules");
|
||||
mvwprintz(w_auto_pickup_header, 3, 51, c_white, "I/E");
|
||||
//mvwprintz(w_auto_pickup_header, 3, 55, c_white, "Volume");
|
||||
//mvwprintz(w_auto_pickup_header, 3, 62, c_white, "Weight");
|
||||
|
||||
wrefresh(w_auto_pickup_header);
|
||||
|
||||
int iCurrentPage = 1;
|
||||
int iCurrentLine = 0;
|
||||
int iCurrentCol = 1;
|
||||
int iStartPos = 0;
|
||||
bool bStuffChanged = false;
|
||||
char ch = ' ';
|
||||
|
||||
std::stringstream sTemp;
|
||||
|
||||
do {
|
||||
mvwprintz(w_auto_pickup_header, 2, 17 + 0, c_white, "[");
|
||||
wprintz(w_auto_pickup_header, (iCurrentPage == 1) ? hilite(c_white) : c_white, "Global");
|
||||
wprintz(w_auto_pickup_header, c_white, "]");
|
||||
|
||||
mvwprintz(w_auto_pickup_header, 2, 17 + 9, c_white, "[");
|
||||
wprintz(w_auto_pickup_header, (iCurrentPage == 2) ? hilite(c_white) : c_white, "Character");
|
||||
wprintz(w_auto_pickup_header, c_white, "]");
|
||||
|
||||
/*
|
||||
mvwprintz(w_auto_pickup_header, 2, 12 + 21, c_white, "[");
|
||||
wprintz(w_auto_pickup_header, (iCurrentPage == 3) ? hilite(c_white) : c_white, "Options");
|
||||
wprintz(w_auto_pickup_header, c_white, "]");
|
||||
*/
|
||||
|
||||
wrefresh(w_auto_pickup_header);
|
||||
|
||||
// Clear the lines
|
||||
for (int i = 0; i < iContentHeight; i++) {
|
||||
for (int j = 0; j < 79; j++) {
|
||||
if (mapLines[j]) {
|
||||
mvwputch(w_auto_pickup, i, j, c_ltgray, LINE_XOXO);
|
||||
} else {
|
||||
mvwputch(w_auto_pickup, i, j, c_black, ' ');
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (iCurrentPage == 1 || iCurrentPage == 2) {
|
||||
if (iCurrentPage == 2 && g->u.name == "") {
|
||||
vAutoPickupRules[2].clear();
|
||||
mvwprintz(w_auto_pickup, 8, 15, c_white, "Please load a character first to use this page!");
|
||||
}
|
||||
|
||||
if (vAutoPickupRules[iCurrentPage].size() > iContentHeight) {
|
||||
iStartPos = iCurrentLine - (iContentHeight - 1) / 2;
|
||||
|
||||
if (iStartPos < 0) {
|
||||
iStartPos = 0;
|
||||
} else if (iStartPos + iContentHeight > vAutoPickupRules[iCurrentPage].size()) {
|
||||
iStartPos = vAutoPickupRules[iCurrentPage].size() - iContentHeight;
|
||||
}
|
||||
}
|
||||
|
||||
// display auto pickup
|
||||
for (int i = iStartPos; i < vAutoPickupRules[iCurrentPage].size(); i++) {
|
||||
if (i >= iStartPos && i < iStartPos + ((iContentHeight > vAutoPickupRules[iCurrentPage].size()) ? vAutoPickupRules[iCurrentPage].size() : iContentHeight)) {
|
||||
nc_color cLineColor = (vAutoPickupRules[iCurrentPage][i].bActive) ? c_white : c_ltgray;
|
||||
|
||||
sTemp.str("");
|
||||
sTemp << i + 1;
|
||||
mvwprintz(w_auto_pickup, i - iStartPos, 0, cLineColor, sTemp.str().c_str());
|
||||
mvwprintz(w_auto_pickup, i - iStartPos, 4, cLineColor, "");
|
||||
|
||||
if (iCurrentLine == i) {
|
||||
wprintz(w_auto_pickup, c_yellow, ">> ");
|
||||
} else {
|
||||
wprintz(w_auto_pickup, c_yellow, " ");
|
||||
}
|
||||
|
||||
wprintz(w_auto_pickup, (iCurrentLine == i && iCurrentCol == 1) ? hilite(cLineColor) : cLineColor, "%s", ((vAutoPickupRules[iCurrentPage][i].sRule == "") ? "<empty rule>" : vAutoPickupRules[iCurrentPage][i].sRule).c_str());
|
||||
|
||||
mvwprintz(w_auto_pickup, i - iStartPos, 52, (iCurrentLine == i && iCurrentCol == 2) ? hilite(cLineColor) : cLineColor, "%s", ((vAutoPickupRules[iCurrentPage][i].bExclude) ? "E" : "I"));
|
||||
}
|
||||
}
|
||||
|
||||
wrefresh(w_auto_pickup);
|
||||
|
||||
} else if (iCurrentPage == 3) {
|
||||
wborder(w_auto_pickup_options, LINE_XOXO, LINE_XOXO, LINE_OXOX, LINE_OXOX, LINE_OXXO, LINE_OOXX, LINE_XXOO, LINE_XOOX);
|
||||
|
||||
mvwprintz(w_auto_pickup_options, 5, 10, c_white, "Under construction!");
|
||||
|
||||
wrefresh(w_auto_pickup);
|
||||
wrefresh(w_auto_pickup_options);
|
||||
}
|
||||
|
||||
ch = input();
|
||||
|
||||
if (iCurrentPage == 3) {
|
||||
switch(ch) {
|
||||
case '\t': //Switch to next Page
|
||||
iCurrentPage++;
|
||||
if (iCurrentPage > 3) {
|
||||
iCurrentPage = 1;
|
||||
iCurrentLine = 0;
|
||||
}
|
||||
break;
|
||||
}
|
||||
} else if (iCurrentPage == 1 || iCurrentPage == 2) {
|
||||
if (iCurrentPage == 2 && g->u.name == "" && ch != '\t') {
|
||||
//Only allow loaded games to use the char sheet
|
||||
} else if (vAutoPickupRules[iCurrentPage].size() > 0 || ch == 'a' || ch == '\t') {
|
||||
switch(ch) {
|
||||
case 'j': //move down
|
||||
iCurrentLine++;
|
||||
iCurrentCol = 1;
|
||||
if (iCurrentLine >= vAutoPickupRules[iCurrentPage].size()) {
|
||||
iCurrentLine = 0;
|
||||
}
|
||||
break;
|
||||
case 'k': //move up
|
||||
iCurrentLine--;
|
||||
iCurrentCol = 1;
|
||||
if (iCurrentLine < 0) {
|
||||
iCurrentLine = vAutoPickupRules[iCurrentPage].size()-1;
|
||||
}
|
||||
break;
|
||||
case 'a': //add new rule
|
||||
case 'A':
|
||||
bStuffChanged = true;
|
||||
vAutoPickupRules[iCurrentPage].push_back(cPickupRules("", true, false));
|
||||
iCurrentLine = vAutoPickupRules[iCurrentPage].size()-1;
|
||||
break;
|
||||
case 'r': //remove rule
|
||||
case 'R':
|
||||
bStuffChanged = true;
|
||||
vAutoPickupRules[iCurrentPage].erase(vAutoPickupRules[iCurrentPage].begin() + iCurrentLine);
|
||||
if (iCurrentLine > vAutoPickupRules[iCurrentPage].size()-1) {
|
||||
iCurrentLine--;
|
||||
}
|
||||
break;
|
||||
case 'c': //copy rule
|
||||
case 'C':
|
||||
bStuffChanged = true;
|
||||
vAutoPickupRules[iCurrentPage].push_back(cPickupRules(vAutoPickupRules[iCurrentPage][iCurrentLine].sRule, vAutoPickupRules[iCurrentPage][iCurrentLine].bActive, vAutoPickupRules[iCurrentPage][iCurrentLine].bExclude));
|
||||
iCurrentLine = vAutoPickupRules[iCurrentPage].size()-1;
|
||||
break;
|
||||
case 'm': //move rule global <-> character
|
||||
case 'M':
|
||||
if ((iCurrentPage == 1 && g->u.name != "") || iCurrentPage == 2) {
|
||||
bStuffChanged = true;
|
||||
//copy over
|
||||
vAutoPickupRules[(iCurrentPage == 1) ? 2 : 1].push_back(cPickupRules(vAutoPickupRules[iCurrentPage][iCurrentLine].sRule, vAutoPickupRules[iCurrentPage][iCurrentLine].bActive, vAutoPickupRules[iCurrentPage][iCurrentLine].bExclude));
|
||||
|
||||
//remove old
|
||||
vAutoPickupRules[iCurrentPage].erase(vAutoPickupRules[iCurrentPage].begin() + iCurrentLine);
|
||||
iCurrentLine = vAutoPickupRules[(iCurrentPage == 1) ? 2 : 1].size()-1;
|
||||
iCurrentPage = (iCurrentPage == 1) ? 2 : 1;
|
||||
}
|
||||
break;
|
||||
case '\t': //Switch to next Page
|
||||
iCurrentPage++;
|
||||
if (iCurrentPage > 2) {
|
||||
iCurrentPage = 1;
|
||||
iCurrentLine = 0;
|
||||
}
|
||||
break;
|
||||
case '\n': //Edit Col in current line
|
||||
bStuffChanged = true;
|
||||
if (iCurrentCol == 1) {
|
||||
mvwprintz(w_auto_pickup_help, 1, 1, c_white, "* is used as a Wildcard. A few Examples:");
|
||||
mvwprintz(w_auto_pickup_help, 2, 1, c_white, "");
|
||||
mvwprintz(w_auto_pickup_help, 3, 1, c_white, "wood arrow matches the itemname exactly");
|
||||
mvwprintz(w_auto_pickup_help, 4, 1, c_white, "wood ar* matches items beginning with wood ar");
|
||||
mvwprintz(w_auto_pickup_help, 5, 1, c_white, "*rrow matches items ending with rrow");
|
||||
mvwprintz(w_auto_pickup_help, 6, 1, c_white, "*avy fle*fi*arrow multible * are allowed");
|
||||
mvwprintz(w_auto_pickup_help, 7, 1, c_white, "heAVY*woOD*arrOW case insesitive search");
|
||||
mvwprintz(w_auto_pickup_help, 8, 1, c_white, "");
|
||||
|
||||
wborder(w_auto_pickup_help, LINE_XOXO, LINE_XOXO, LINE_OXOX, LINE_OXOX, LINE_OXXO, LINE_OOXX, LINE_XXOO, LINE_XOOX);
|
||||
wrefresh(w_auto_pickup_help);
|
||||
vAutoPickupRules[iCurrentPage][iCurrentLine].sRule = trim_rule(string_input_popup("Pickup Rule:", 30, vAutoPickupRules[iCurrentPage][iCurrentLine].sRule));
|
||||
} else if (iCurrentCol == 2) {
|
||||
vAutoPickupRules[iCurrentPage][iCurrentLine].bExclude = !vAutoPickupRules[iCurrentPage][iCurrentLine].bExclude;
|
||||
}
|
||||
break;
|
||||
case 'e': //enable rule
|
||||
case 'E':
|
||||
bStuffChanged = true;
|
||||
vAutoPickupRules[iCurrentPage][iCurrentLine].bActive = true;
|
||||
break;
|
||||
case 'd': //disable rule
|
||||
case 'D':
|
||||
bStuffChanged = true;
|
||||
vAutoPickupRules[iCurrentPage][iCurrentLine].bActive = false;
|
||||
break;
|
||||
case 'h': //move left
|
||||
iCurrentCol--;
|
||||
if (iCurrentCol < 1) {
|
||||
iCurrentCol = iTotalCols;
|
||||
}
|
||||
break;
|
||||
case 'l': //move right
|
||||
iCurrentCol++;
|
||||
if (iCurrentCol > iTotalCols) {
|
||||
iCurrentCol = 1;
|
||||
}
|
||||
break;
|
||||
case '+': //move rule up
|
||||
bStuffChanged = true;
|
||||
if (iCurrentLine < vAutoPickupRules[iCurrentPage].size()-1) {
|
||||
std::swap(vAutoPickupRules[iCurrentPage][iCurrentLine], vAutoPickupRules[iCurrentPage][iCurrentLine+1]);
|
||||
iCurrentLine++;
|
||||
iCurrentCol = 1;
|
||||
}
|
||||
break;
|
||||
case '-': //move rule down
|
||||
bStuffChanged = true;
|
||||
if (iCurrentLine > 0) {
|
||||
std::swap(vAutoPickupRules[iCurrentPage][iCurrentLine], vAutoPickupRules[iCurrentPage][iCurrentLine-1]);
|
||||
iCurrentLine--;
|
||||
iCurrentCol = 1;
|
||||
}
|
||||
break;
|
||||
case 't': //test rule
|
||||
case 'T':
|
||||
test_pattern(iCurrentPage, iCurrentLine);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
} while(ch != 'q' && ch != 'Q' && ch != KEY_ESCAPE);
|
||||
|
||||
if (bStuffChanged) {
|
||||
if(query_yn("Save changes?")) {
|
||||
save_auto_pickup(false);
|
||||
|
||||
if (g->u.name != "") {
|
||||
save_auto_pickup(true);
|
||||
}
|
||||
} else {
|
||||
save_reset_changes(true);
|
||||
}
|
||||
}
|
||||
|
||||
werase(w_auto_pickup);
|
||||
werase(w_auto_pickup_border);
|
||||
werase(w_auto_pickup_header);
|
||||
werase(w_auto_pickup_options);
|
||||
werase(w_auto_pickup_help);
|
||||
}
|
||||
|
||||
void test_pattern(int iCurrentPage, int iCurrentLine)
|
||||
{
|
||||
std::vector<std::string> vMatchingItems;
|
||||
std::string sItemName = "";
|
||||
|
||||
if (vAutoPickupRules[iCurrentPage][iCurrentLine].sRule == "") {
|
||||
return;
|
||||
}
|
||||
|
||||
//Loop through all itemfactory items
|
||||
for (int i = 0; i < standard_itype_ids.size(); i++) {
|
||||
sItemName = item_controller->find_template(standard_itype_ids[i])->name;
|
||||
if (auto_pickup_match(sItemName, vAutoPickupRules[iCurrentPage][iCurrentLine].sRule)) {
|
||||
vMatchingItems.push_back(sItemName);
|
||||
}
|
||||
}
|
||||
|
||||
const int iOffsetX = 15 + ((TERMX > FULL_SCREEN_WIDTH) ? (TERMX-FULL_SCREEN_WIDTH)/2 : 0);
|
||||
const int iOffsetY = 5 + ((TERMY > FULL_SCREEN_HEIGHT) ? (TERMY-FULL_SCREEN_HEIGHT)/2 : 0);
|
||||
|
||||
int iStartPos = 0;
|
||||
const int iContentHeight = FULL_SCREEN_HEIGHT - 8;
|
||||
const int iContentWidth = FULL_SCREEN_WIDTH - 30;
|
||||
char ch;
|
||||
std::stringstream sTemp;
|
||||
|
||||
WINDOW* w_test_rule_border = newwin(iContentHeight + 2, iContentWidth, iOffsetY, iOffsetX);
|
||||
WINDOW* w_test_rule_content = newwin(iContentHeight, iContentWidth - 2, 1 + iOffsetY, 1 + iOffsetX);
|
||||
|
||||
wborder(w_test_rule_border, LINE_XOXO, LINE_XOXO, LINE_OXOX, LINE_OXOX, LINE_OXXO, LINE_OOXX, LINE_XXOO, LINE_XOOX);
|
||||
|
||||
sTemp << vMatchingItems.size() << " items match: " << vAutoPickupRules[iCurrentPage][iCurrentLine].sRule;
|
||||
mvwprintz(w_test_rule_border, 0, iContentWidth/2 - (sTemp.str()).length()/2, hilite(c_white), sTemp.str().c_str());
|
||||
|
||||
wrefresh(w_test_rule_border);
|
||||
|
||||
iCurrentLine = 0;
|
||||
|
||||
do {
|
||||
// Clear the lines
|
||||
for (int i = 0; i < iContentHeight; i++) {
|
||||
for (int j = 0; j < 79; j++) {
|
||||
mvwputch(w_test_rule_content, i, j, c_black, ' ');
|
||||
}
|
||||
}
|
||||
|
||||
if (vMatchingItems.size() > iContentHeight) {
|
||||
iStartPos = iCurrentLine - (iContentHeight - 1) / 2;
|
||||
|
||||
if (iStartPos < 0) {
|
||||
iStartPos = 0;
|
||||
} else if (iStartPos + iContentHeight > vMatchingItems.size()) {
|
||||
iStartPos = vMatchingItems.size() - iContentHeight;
|
||||
}
|
||||
}
|
||||
|
||||
// display auto pickup
|
||||
for (int i = iStartPos; i < vMatchingItems.size(); i++) {
|
||||
if (i >= iStartPos && i < iStartPos + ((iContentHeight > vMatchingItems.size()) ? vMatchingItems.size() : iContentHeight)) {
|
||||
nc_color cLineColor = c_white;
|
||||
|
||||
sTemp.str("");
|
||||
sTemp << i + 1;
|
||||
mvwprintz(w_test_rule_content, i - iStartPos, 0, cLineColor, sTemp.str().c_str());
|
||||
mvwprintz(w_test_rule_content, i - iStartPos, 4, cLineColor, "");
|
||||
|
||||
if (iCurrentLine == i) {
|
||||
wprintz(w_test_rule_content, c_yellow, ">> ");
|
||||
} else {
|
||||
wprintz(w_test_rule_content, c_yellow, " ");
|
||||
}
|
||||
|
||||
wprintz(w_test_rule_content, (iCurrentLine == i) ? hilite(cLineColor) : cLineColor, vMatchingItems[i].c_str());
|
||||
}
|
||||
}
|
||||
|
||||
wrefresh(w_test_rule_content);
|
||||
|
||||
ch = input();
|
||||
|
||||
switch(ch) {
|
||||
case 'j': //move down
|
||||
iCurrentLine++;
|
||||
if (iCurrentLine >= vMatchingItems.size()) {
|
||||
iCurrentLine = 0;
|
||||
}
|
||||
break;
|
||||
case 'k': //move up
|
||||
iCurrentLine--;
|
||||
if (iCurrentLine < 0) {
|
||||
iCurrentLine = vMatchingItems.size()-1;
|
||||
}
|
||||
break;
|
||||
}
|
||||
} while(ch == 'j' || ch == 'k');
|
||||
|
||||
werase(w_test_rule_border);
|
||||
werase(w_test_rule_content);
|
||||
}
|
||||
|
||||
void load_auto_pickup(bool bCharacter)
|
||||
{
|
||||
std::ifstream fin;
|
||||
std::string sFile = "data/auto_pickup.txt";
|
||||
|
||||
if (bCharacter) {
|
||||
sFile = "save/" + g->u.name + ".apu.txt";
|
||||
}
|
||||
|
||||
fin.open(sFile.c_str());
|
||||
if(!fin.is_open()) {
|
||||
fin.close();
|
||||
|
||||
create_default_auto_pickup(bCharacter);
|
||||
|
||||
fin.open(sFile.c_str());
|
||||
if(!fin.is_open()) {
|
||||
DebugLog() << "Could neither read nor create " << sFile << "\n";
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
vAutoPickupRules[(bCharacter) ? 2 : 1].clear();
|
||||
|
||||
while(!fin.eof()) {
|
||||
std::string sLine;
|
||||
fin >> sLine;
|
||||
|
||||
if(sLine == "") { // Empty line, chomp it
|
||||
getline(fin, sLine);
|
||||
|
||||
} else if(sLine[0] == '#') { // # indicates a comment
|
||||
getline(fin, sLine);
|
||||
|
||||
} else {
|
||||
int iNum = std::count(sLine.begin(), sLine.end(), ';');
|
||||
|
||||
if(iNum != 2) {
|
||||
/*int iNum = std::count(sLine.begin(), sLine.end(), ' ');
|
||||
|
||||
if(iNum == 1) { //its an option! hurray
|
||||
|
||||
} else {*/
|
||||
DebugLog() << "Bad Rule: " << sLine << "\n";
|
||||
getline(fin, sLine);
|
||||
//}
|
||||
|
||||
} else {
|
||||
std::string sRule = "";
|
||||
bool bActive = true;
|
||||
bool bExclude = false;
|
||||
|
||||
int iPos = 0;
|
||||
int iCol = 1;
|
||||
do {
|
||||
iPos = sLine.find(";");
|
||||
|
||||
std::string sTemp = (iPos == std::string::npos) ? sLine : sLine.substr(0, iPos);
|
||||
|
||||
if (iCol == 1) {
|
||||
sRule = sTemp;
|
||||
|
||||
} else if (iCol == 2) {
|
||||
bActive = (sTemp == "T" || sTemp == "True") ? true : false;
|
||||
|
||||
} else if (iCol == 3) {
|
||||
bExclude = (sTemp == "T" || sTemp == "True") ? true : false;
|
||||
}
|
||||
|
||||
iCol++;
|
||||
|
||||
if (iPos != std::string::npos) {
|
||||
sLine = sLine.substr(iPos+1, sLine.size());
|
||||
}
|
||||
|
||||
} while(iPos != std::string::npos);
|
||||
|
||||
vAutoPickupRules[(bCharacter) ? 2 : 1].push_back(cPickupRules(sRule, bActive, bExclude));
|
||||
}
|
||||
}
|
||||
|
||||
if(fin.peek() == '\n') {
|
||||
getline(fin, sLine); // Chomp
|
||||
}
|
||||
}
|
||||
|
||||
fin.close();
|
||||
|
||||
merge_vector();
|
||||
}
|
||||
|
||||
void merge_vector()
|
||||
{
|
||||
vAutoPickupRules[0].clear();
|
||||
|
||||
for (int i=1; i <= 2; i++) { //Loop through global 1 and character 2
|
||||
for (int j=0; j < vAutoPickupRules[i].size(); j++) {
|
||||
if (vAutoPickupRules[i][j].sRule != "") {
|
||||
vAutoPickupRules[0].push_back(cPickupRules(vAutoPickupRules[i][j].sRule, vAutoPickupRules[i][j].bActive, vAutoPickupRules[i][j].bExclude));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void save_reset_changes(bool bReset)
|
||||
{
|
||||
for (int i=1; i <= 2; i++) { //Loop through global 1 and character 2
|
||||
vAutoPickupRules[i + ((bReset) ? 0: 2)].clear();
|
||||
for (int j=0; j < vAutoPickupRules[i + ((bReset) ? 2: 0)].size(); j++) {
|
||||
if (vAutoPickupRules[i + ((bReset) ? 2: 0)][j].sRule != "") {
|
||||
vAutoPickupRules[i + ((bReset) ? 0: 2)].push_back(cPickupRules(vAutoPickupRules[i + ((bReset) ? 2: 0)][j].sRule, vAutoPickupRules[i + ((bReset) ? 2: 0)][j].bActive, vAutoPickupRules[i + ((bReset) ? 2: 0)][j].bExclude));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
merge_vector();
|
||||
}
|
||||
|
||||
std::string auto_pickup_header(bool bCharacter)
|
||||
{
|
||||
std::string sTemp = (bCharacter) ? "character": "global";
|
||||
return "# This is the " + sTemp + " auto pickup rules file. The format is\n\
|
||||
# <pickup rule>;<dis/enabled>;<in/exclude>\n\n\
|
||||
# <pickup rule> Simple text. No other special characters except spaces and *\n\
|
||||
# <dis/enabled> Can be T(rue) of F(alse)\n\
|
||||
# <in/exclude> Can be T(rue) of F(alse)\n\
|
||||
#\n\
|
||||
# If # is at the start of a line, it is considered a comment and is ignored.\n\
|
||||
# In-line commenting is not allowed. I think.\n\
|
||||
#\n\
|
||||
# If you want to restore the default auto pickup rules file, simply delete this file.\n\
|
||||
# A new auto_pickup.txt will be created next time you play.\
|
||||
\n\n";
|
||||
}
|
||||
|
||||
void save_auto_pickup(bool bCharacter)
|
||||
{
|
||||
std::ofstream fout;
|
||||
std::string sFile = "data/auto_pickup.txt";
|
||||
|
||||
if (bCharacter) {
|
||||
sFile = "save/" + g->u.name + ".apu.txt";
|
||||
std::ifstream fin;
|
||||
|
||||
fin.open(("save/" + g->u.name + ".sav").c_str());
|
||||
if(!fin.is_open()) {
|
||||
return;
|
||||
}
|
||||
fin.close();
|
||||
}
|
||||
|
||||
fout.open(sFile.c_str());
|
||||
|
||||
if(!fout.is_open()) {
|
||||
return;
|
||||
}
|
||||
|
||||
fout << auto_pickup_header(bCharacter) << std::endl;
|
||||
for(int i = 0; i < vAutoPickupRules[(bCharacter) ? 2 : 1].size(); i++) {
|
||||
fout << vAutoPickupRules[(bCharacter) ? 2 : 1][i].sRule << ";";
|
||||
fout << (vAutoPickupRules[(bCharacter) ? 2 : 1][i].bActive ? "T" : "F") << ";";
|
||||
fout << (vAutoPickupRules[(bCharacter) ? 2 : 1][i].bExclude ? "T" : "F");
|
||||
fout << "\n";
|
||||
}
|
||||
|
||||
if (!bCharacter) {
|
||||
merge_vector();
|
||||
}
|
||||
}
|
||||
|
||||
void create_default_auto_pickup(bool bCharacter)
|
||||
{
|
||||
std::ofstream fout;
|
||||
std::string sFile = "data/auto_pickup.txt";
|
||||
|
||||
if (bCharacter) {
|
||||
sFile = "save/" + g->u.name + ".apu.txt";
|
||||
}
|
||||
|
||||
fout.open(sFile.c_str());
|
||||
if(!fout.is_open()) {
|
||||
return;
|
||||
}
|
||||
|
||||
fout << auto_pickup_header(bCharacter);
|
||||
fout.close();
|
||||
}
|
||||
|
||||
std::string trim_rule(std::string sPattern)
|
||||
{
|
||||
size_t iPos = 0;
|
||||
|
||||
//Remove all double ** in pattern
|
||||
while((iPos = sPattern.find("**")) != std::string::npos) {
|
||||
sPattern = sPattern.substr(0, iPos) + sPattern.substr(iPos+1, sPattern.length()-iPos-1);
|
||||
}
|
||||
|
||||
return sPattern;
|
||||
}
|
||||
|
||||
bool auto_pickup_match(std::string sText, std::string sPattern)
|
||||
{
|
||||
//case insenitive search
|
||||
|
||||
/* Possible patterns
|
||||
*
|
||||
wooD
|
||||
wood*
|
||||
*wood
|
||||
Wood*aRrOW
|
||||
wood*arrow*
|
||||
*wood*arrow
|
||||
*wood*hard* *x*y*z*arrow*
|
||||
*/
|
||||
|
||||
if (sText == "") {
|
||||
return false;
|
||||
} else if (sText == "*") {
|
||||
return true;
|
||||
}
|
||||
|
||||
size_t iPos;
|
||||
std::vector<std::string> vPattern;
|
||||
|
||||
sPattern = trim_rule(sPattern);
|
||||
|
||||
split(sPattern, '*', vPattern);
|
||||
size_t iNum = vPattern.size();
|
||||
|
||||
if (iNum == 0) { //should never happen
|
||||
return false;
|
||||
} else if (iNum == 1) { // no * found
|
||||
if (sText.length() == vPattern[0].length() && ci_find_substr(sText, vPattern[0]) != -1) {
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
for (int i=0; i < vPattern.size(); i++) {
|
||||
if (i==0 && vPattern[i] != "") { //beginning: ^vPat[i]
|
||||
if (sText.length() < vPattern[i].length() || ci_find_substr(sText.substr(0, vPattern[i].length()), vPattern[i]) == -1) {
|
||||
//debugmsg(("1: sText: " + sText + " | sPattern: ^" + vPattern[i] + " | no match").c_str());
|
||||
return false;
|
||||
}
|
||||
|
||||
sText = sText.substr(vPattern[i].length(), sText.length()-vPattern[i].length());
|
||||
} else if (i==vPattern.size()-1 && vPattern[i] != "") { //linenend: vPat[i]$
|
||||
if (sText.length() < vPattern[i].length() || ci_find_substr(sText.substr(sText.length()-vPattern[i].length(), vPattern[i].length()), vPattern[i]) == -1) {
|
||||
//debugmsg(("2: sText: " + sText + " | sPattern: " + vPattern[i] + "$ | no match").c_str());
|
||||
return false;
|
||||
}
|
||||
} else { //inbetween: vPat[i]
|
||||
if ((iPos = ci_find_substr(sText, vPattern[i])) == -1) {
|
||||
//debugmsg(("3: sText: " + sText + " | sPattern: " + vPattern[i] + " | no match").c_str());
|
||||
return false;
|
||||
}
|
||||
|
||||
sText = sText.substr(iPos+vPattern[i].length(), sText.length()-iPos);
|
||||
}
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
std::vector<std::string> &split(const std::string &s, char delim, std::vector<std::string> &elems) {
|
||||
std::stringstream ss(s);
|
||||
std::string item;
|
||||
elems.clear();
|
||||
while (std::getline(ss, item, delim)) {
|
||||
elems.push_back(item);
|
||||
}
|
||||
|
||||
if ( s.substr(s.length()-1, 1) == "*") {
|
||||
elems.push_back("");
|
||||
}
|
||||
|
||||
return elems;
|
||||
}
|
||||
|
||||
/*
|
||||
// string test
|
||||
std::string str1 = "FIRST HELLO";
|
||||
std::string str2 = "hello";
|
||||
int f1 = ci_find_substr( str1, str2 );
|
||||
|
||||
// wstring test
|
||||
std::wstring wstr1 = L"ОПЯТЬ ПРИВЕТ";
|
||||
std::wstring wstr2 = L"привет";
|
||||
int f2 = ci_find_substr( wstr1, wstr2 );
|
||||
*/
|
||||
|
||||
// templated version of my_equal so it could work with both char and wchar_t
|
||||
template<typename charT>
|
||||
struct my_equal {
|
||||
public:
|
||||
my_equal( const std::locale& loc ) : loc_(loc) {}
|
||||
|
||||
bool operator()(charT ch1, charT ch2) {
|
||||
return std::toupper(ch1, loc_) == std::toupper(ch2, loc_);
|
||||
}
|
||||
private:
|
||||
const std::locale& loc_;
|
||||
};
|
||||
|
||||
// find substring (case insensitive)
|
||||
template<typename charT>
|
||||
int ci_find_substr( const charT& str1, const charT& str2, const std::locale& loc )
|
||||
{
|
||||
typename charT::const_iterator it = std::search( str1.begin(), str1.end(), str2.begin(), str2.end(), my_equal<typename charT::value_type>(loc) );
|
||||
if ( it != str1.end() ) return it - str1.begin();
|
||||
else return -1; // not found
|
||||
}
|
||||
@@ -1,46 +0,0 @@
|
||||
#ifndef _AUTO_PICKUP_H_
|
||||
#define _AUTO_PICKUP_H_
|
||||
|
||||
#include <string>
|
||||
#include <vector>
|
||||
#include <locale>
|
||||
#include <algorithm>
|
||||
|
||||
class cPickupRules {
|
||||
public:
|
||||
std::string sRule;
|
||||
bool bActive;
|
||||
bool bExclude;
|
||||
|
||||
cPickupRules() {
|
||||
this->sRule = "";
|
||||
this->bActive = false;
|
||||
this->bExclude = false;
|
||||
}
|
||||
|
||||
cPickupRules(std::string sRuleIn, bool bActiveIn, bool bExcludeIn) {
|
||||
this->sRule = sRuleIn;
|
||||
this->bActive = bActiveIn;
|
||||
this->bExclude = bExcludeIn;
|
||||
}
|
||||
|
||||
~cPickupRules() {};
|
||||
};
|
||||
|
||||
extern std::vector<cPickupRules> vAutoPickupRules[5];
|
||||
|
||||
void test_pattern(int iCurrentPage, int iCurrentLine);
|
||||
std::string trim_rule(std::string sPattern);
|
||||
void merge_vector();
|
||||
void save_reset_changes(bool bReset);
|
||||
void show_auto_pickup();
|
||||
void load_auto_pickup(bool bCharacter);
|
||||
void save_auto_pickup(bool bCharacter);
|
||||
std::string auto_pickup_header(bool bCharacter);
|
||||
void create_default_auto_pickup(bool bCharacter);
|
||||
bool auto_pickup_match(std::string sText, std::string sPattern);
|
||||
std::vector<std::string> &split(const std::string &s, char delim, std::vector<std::string> &elems);
|
||||
template<typename charT>
|
||||
int ci_find_substr( const charT& str1, const charT& str2, const std::locale& loc = std::locale() );
|
||||
|
||||
#endif
|
||||
@@ -1,45 +0,0 @@
|
||||
#include <algorithm>
|
||||
#include <sstream>
|
||||
|
||||
#include "basecamp.h"
|
||||
|
||||
basecamp::basecamp()
|
||||
: name()
|
||||
, posx(0), posy(0)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
basecamp::basecamp(std::string const& name_, int const posx_, int const posy_)
|
||||
: name(name_)
|
||||
, posx(posx_), posy(posy_)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
std::string basecamp::board_name() const
|
||||
{
|
||||
return name + " Board";
|
||||
}
|
||||
|
||||
std::string basecamp::save_data() const
|
||||
{
|
||||
std::stringstream data;
|
||||
|
||||
// TODO: This will lose underscores, is that a problem?
|
||||
// strip spaces from name
|
||||
std::string savename = name;
|
||||
replace(savename.begin(), savename.end(), ' ', '_');
|
||||
|
||||
data << savename << " " << posx << " " << posy;
|
||||
return data.str();
|
||||
}
|
||||
|
||||
void basecamp::load_data(std::string const& data)
|
||||
{
|
||||
std::stringstream stream(data);
|
||||
stream >> name >> posx >> posy;
|
||||
|
||||
// add space to name
|
||||
replace(name.begin(), name.end(), '_', ' ');
|
||||
}
|
||||
-29
@@ -1,29 +0,0 @@
|
||||
#ifndef _BASECAMP_H_
|
||||
#define _BASECAMP_H_
|
||||
|
||||
#include <string>
|
||||
|
||||
class basecamp
|
||||
{
|
||||
public:
|
||||
basecamp();
|
||||
basecamp(std::string const& name_, int const posx_, int const posy_);
|
||||
|
||||
inline bool is_valid() const { return !name.empty(); }
|
||||
inline int board_x() const { return posx; }
|
||||
inline int board_y() const { return posy; }
|
||||
inline std::string const& camp_name() const { return name; }
|
||||
|
||||
std::string board_name() const;
|
||||
|
||||
// Save/load
|
||||
std::string save_data() const;
|
||||
void load_data(std::string const& data);
|
||||
|
||||
private:
|
||||
std::string name;
|
||||
int posx, posy; // location of associated bulletin board
|
||||
};
|
||||
|
||||
|
||||
#endif
|
||||
-669
@@ -1,669 +0,0 @@
|
||||
#include "player.h"
|
||||
#include "game.h"
|
||||
#include "rng.h"
|
||||
#include "input.h"
|
||||
#include "keypress.h"
|
||||
#include "item.h"
|
||||
#include "bionics.h"
|
||||
#include "line.h"
|
||||
#include "catajson.h"
|
||||
|
||||
#define BATTERY_AMOUNT 4 // How much batteries increase your power
|
||||
|
||||
std::map<bionic_id, bionic_data*> bionics;
|
||||
std::vector<bionic_id> faulty_bionics;
|
||||
std::vector<bionic_id> power_source_bionics;
|
||||
std::vector<bionic_id> unpowered_bionics;
|
||||
|
||||
void bionics_install_failure(game *g, player *u, int success);
|
||||
|
||||
bionic_data::bionic_data(std::string new_name, bool new_power_source, bool new_activated,
|
||||
int new_power_cost, int new_charge_time, std::string new_description, bool new_faulty){
|
||||
name = new_name;
|
||||
power_source = new_power_source;
|
||||
activated = new_activated;
|
||||
power_cost = new_power_cost;
|
||||
charge_time = new_charge_time;
|
||||
description = new_description;
|
||||
faulty = new_faulty;
|
||||
}
|
||||
|
||||
bionic_id game::random_good_bionic() const
|
||||
{
|
||||
std::map<std::string,bionic_data*>::const_iterator random_bionic;
|
||||
do
|
||||
{
|
||||
random_bionic = bionics.begin();
|
||||
std::advance(random_bionic,rng(0,bionics.size()-1));
|
||||
} while (random_bionic->first == "bio_null" || random_bionic->second->faulty);
|
||||
return random_bionic->first;
|
||||
}
|
||||
|
||||
// helper function for power_bionics
|
||||
void show_power_level_in_titlebar(WINDOW* window, player* p)
|
||||
{
|
||||
mvwprintz(window, 1, 62, c_white, "Power: %d/%d", p->power_level, p->max_power_level);
|
||||
}
|
||||
|
||||
void player::power_bionics(game *g)
|
||||
{
|
||||
int HEIGHT = TERMY;
|
||||
int WIDTH = FULL_SCREEN_WIDTH;
|
||||
int START_X = (TERMX - WIDTH)/2;
|
||||
int START_Y = (TERMY - HEIGHT)/2;
|
||||
WINDOW* wBio = newwin(HEIGHT, WIDTH, START_Y, START_X);
|
||||
int DESCRIPTION_WIDTH = WIDTH - 2; // Same width as bionics window minus 2 for the borders
|
||||
int DESCRIPTION_HEIGHT = 3;
|
||||
int DESCRIPTION_START_X = getbegx(wBio) + 1; // +1 to avoid border
|
||||
int DESCRIPTION_START_Y = getmaxy(wBio) - DESCRIPTION_HEIGHT - 1; // At the bottom of the bio window, -1 to avoid border
|
||||
WINDOW* w_description = newwin(DESCRIPTION_HEIGHT, DESCRIPTION_WIDTH, DESCRIPTION_START_Y, DESCRIPTION_START_X);
|
||||
|
||||
werase(wBio);
|
||||
wborder(wBio, LINE_XOXO, LINE_XOXO, LINE_OXOX, LINE_OXOX,
|
||||
LINE_OXXO, LINE_OOXX, LINE_XXOO, LINE_XOOX );
|
||||
|
||||
std::vector <bionic> passive;
|
||||
std::vector <bionic> active;
|
||||
int HEADER_TEXT_Y = START_Y + 1;
|
||||
mvwprintz(wBio, HEADER_TEXT_Y, 1, c_blue, "BIONICS -");
|
||||
mvwprintz(wBio, HEADER_TEXT_Y, 11, c_white, "Activating. Press '!' to examine your implants.");
|
||||
show_power_level_in_titlebar(wBio, this);
|
||||
|
||||
int HEADER_LINE_Y = START_Y + 2;
|
||||
int DESCRIPTION_LINE_Y = DESCRIPTION_START_Y - 1;
|
||||
for (int i = 1; i < 79; i++) {
|
||||
mvwputch(wBio, HEADER_LINE_Y, i, c_ltgray, LINE_OXOX); // Draw line under title
|
||||
mvwputch(wBio, DESCRIPTION_LINE_Y, i, c_ltgray, LINE_OXOX); // Draw line above description
|
||||
}
|
||||
|
||||
// Draw symbols to connect additional lines to border
|
||||
mvwputch(wBio, HEADER_LINE_Y, 0, c_ltgray, LINE_XXXO); // |-
|
||||
mvwputch(wBio, HEADER_LINE_Y, 79, c_ltgray, LINE_XOXX); // -|
|
||||
|
||||
mvwputch(wBio, DESCRIPTION_LINE_Y, 0, c_ltgray, LINE_XXXO); // |-
|
||||
mvwputch(wBio, DESCRIPTION_LINE_Y, 79, c_ltgray, LINE_XOXX); // -|
|
||||
|
||||
for (int i = 0; i < my_bionics.size(); i++) {
|
||||
if (!bionics[my_bionics[i].id]->activated)
|
||||
passive.push_back(my_bionics[i]);
|
||||
else
|
||||
active.push_back(my_bionics[i]);
|
||||
}
|
||||
nc_color type;
|
||||
if (passive.size() > 0) {
|
||||
mvwprintz(wBio, 3, 1, c_ltblue, "Passive:");
|
||||
for (int i = 0; i < passive.size(); i++) {
|
||||
if (bionics[passive[i].id]->power_source)
|
||||
type = c_ltcyan;
|
||||
else
|
||||
type = c_cyan;
|
||||
mvwputch(wBio, 4 + i, 1, type, passive[i].invlet);
|
||||
mvwprintz(wBio, 4 + i, 3, type, bionics[passive[i].id]->name.c_str());
|
||||
}
|
||||
}
|
||||
if (active.size() > 0) {
|
||||
mvwprintz(wBio, 3, 33, c_ltblue, "Active:");
|
||||
for (int i = 0; i < active.size(); i++) {
|
||||
if (active[i].powered && !bionics[active[i].id]->power_source)
|
||||
type = c_red;
|
||||
else if (bionics[active[i].id]->power_source && !active[i].powered)
|
||||
type = c_ltcyan;
|
||||
else if (bionics[active[i].id]->power_source && active[i].powered)
|
||||
type = c_ltgreen;
|
||||
else
|
||||
type = c_ltred;
|
||||
|
||||
mvwputch(wBio, 4 + i, 33, type, active[i].invlet);
|
||||
mvwprintz(wBio, 4 + i, 35, type,
|
||||
(active[i].powered ? "%s - ON" : "%s - %d PU / %d trns"),
|
||||
bionics[active[i].id]->name.c_str(),
|
||||
bionics[active[i].id]->power_cost,
|
||||
bionics[active[i].id]->charge_time);
|
||||
}
|
||||
}
|
||||
wrefresh(wBio);
|
||||
char ch;
|
||||
bool activating = true;
|
||||
bionic *tmp;
|
||||
int b;
|
||||
do {
|
||||
ch = getch();
|
||||
if (ch == '!') {
|
||||
activating = !activating;
|
||||
if (activating)
|
||||
mvwprintz(wBio, 1, 11, c_white, "Activating. Press '!' to examine your implants.");
|
||||
else
|
||||
mvwprintz(wBio, 1, 11, c_white, "Examining. Press '!' to activate your implants.");
|
||||
} else if (ch == ' ')
|
||||
ch = KEY_ESCAPE;
|
||||
else if (ch != KEY_ESCAPE) {
|
||||
for (int i = 0; i < my_bionics.size(); i++) {
|
||||
if (ch == my_bionics[i].invlet) {
|
||||
tmp = &my_bionics[i];
|
||||
b = i;
|
||||
ch = KEY_ESCAPE;
|
||||
}
|
||||
}
|
||||
if (ch == KEY_ESCAPE) {
|
||||
if (activating) {
|
||||
if (bionics[tmp->id]->activated) {
|
||||
show_power_level_in_titlebar(wBio, this);
|
||||
itype_id weapon_id = weapon.type->id;
|
||||
if (tmp->powered) {
|
||||
tmp->powered = false;
|
||||
g->add_msg("%s powered off.", bionics[tmp->id]->name.c_str());
|
||||
} else if (power_level >= bionics[tmp->id]->power_cost ||
|
||||
(weapon_id == "bio_claws_weapon" && tmp->id == "bio_claws_weapon"))
|
||||
activate_bionic(b, g);
|
||||
} else
|
||||
mvwprintz(wBio, 21, 1, c_ltred, "\
|
||||
You can not activate %s! To read a description of \
|
||||
%s, press '!', then '%c'.", bionics[tmp->id]->name.c_str(),
|
||||
bionics[tmp->id]->name.c_str(), tmp->invlet);
|
||||
} else { // Describing bionics, not activating them!
|
||||
// Clear the lines first
|
||||
ch = 0;
|
||||
werase(w_description);
|
||||
mvwprintz(w_description, 0, 0, c_ltblue, bionics[tmp->id]->description.c_str());
|
||||
}
|
||||
}
|
||||
}
|
||||
wrefresh(w_description);
|
||||
wrefresh(wBio);
|
||||
} while (ch != KEY_ESCAPE);
|
||||
werase(wBio);
|
||||
wrefresh(wBio);
|
||||
delwin(wBio);
|
||||
erase();
|
||||
}
|
||||
|
||||
// Why put this in a Big Switch? Why not let bionics have pointers to
|
||||
// functions, much like monsters and items?
|
||||
//
|
||||
// Well, because like diseases, which are also in a Big Switch, bionics don't
|
||||
// share functions....
|
||||
void player::activate_bionic(int b, game *g)
|
||||
{
|
||||
bionic bio = my_bionics[b];
|
||||
int power_cost = bionics[bio.id]->power_cost;
|
||||
if (weapon.type->id == "bio_claws_weapon" && bio.id == "bio_claws_weapon")
|
||||
power_cost = 0;
|
||||
if (power_level < power_cost) {
|
||||
if (my_bionics[b].powered) {
|
||||
g->add_msg("Your %s powers down.", bionics[bio.id]->name.c_str());
|
||||
my_bionics[b].powered = false;
|
||||
} else
|
||||
g->add_msg("You cannot power your %s", bionics[bio.id]->name.c_str());
|
||||
return;
|
||||
}
|
||||
|
||||
if (my_bionics[b].powered && my_bionics[b].charge > 0) {
|
||||
// Already-on units just lose a bit of charge
|
||||
my_bionics[b].charge--;
|
||||
} else {
|
||||
// Not-on units, or those with zero charge, have to pay the power cost
|
||||
if (bionics[bio.id]->charge_time > 0) {
|
||||
my_bionics[b].powered = true;
|
||||
my_bionics[b].charge = bionics[bio.id]->charge_time;
|
||||
}
|
||||
power_level -= power_cost;
|
||||
}
|
||||
|
||||
std::string junk;
|
||||
std::vector<point> traj;
|
||||
std::vector<std::string> good;
|
||||
std::vector<std::string> bad;
|
||||
WINDOW* w;
|
||||
int dirx, diry, t, l, index;
|
||||
item tmp_item;
|
||||
|
||||
if(bio.id == "bio_painkiller"){
|
||||
pkill += 6;
|
||||
pain -= 2;
|
||||
if (pkill > pain)
|
||||
pkill = pain;
|
||||
} else if (bio.id == "bio_nanobots"){
|
||||
healall(4);
|
||||
} else if (bio.id == "bio_night"){
|
||||
if (g->turn % 5)
|
||||
g->add_msg("Artificial night generator active!");
|
||||
} else if (bio.id == "bio_resonator"){
|
||||
g->sound(posx, posy, 30, "VRRRRMP!");
|
||||
for (int i = posx - 1; i <= posx + 1; i++) {
|
||||
for (int j = posy - 1; j <= posy + 1; j++) {
|
||||
g->m.bash(i, j, 40, junk);
|
||||
g->m.bash(i, j, 40, junk); // Multibash effect, so that doors &c will fall
|
||||
g->m.bash(i, j, 40, junk);
|
||||
if (g->m.is_destructable(i, j) && rng(1, 10) >= 4)
|
||||
g->m.ter_set(i, j, t_rubble);
|
||||
}
|
||||
}
|
||||
} else if (bio.id == "bio_time_freeze"){
|
||||
moves += 100 * power_level;
|
||||
power_level = 0;
|
||||
g->add_msg("Your speed suddenly increases!");
|
||||
if (one_in(3)) {
|
||||
g->add_msg("Your muscles tear with the strain.");
|
||||
hurt(g, bp_arms, 0, rng(5, 10));
|
||||
hurt(g, bp_arms, 1, rng(5, 10));
|
||||
hurt(g, bp_legs, 0, rng(7, 12));
|
||||
hurt(g, bp_legs, 1, rng(7, 12));
|
||||
hurt(g, bp_torso, 0, rng(5, 15));
|
||||
}
|
||||
if (one_in(5))
|
||||
add_disease("teleglow", rng(50, 400));
|
||||
} else if (bio.id == "bio_teleport"){
|
||||
g->teleport();
|
||||
add_disease("teleglow", 300);
|
||||
}
|
||||
// TODO: More stuff here (and bio_blood_filter)
|
||||
else if(bio.id == "bio_blood_anal"){
|
||||
w = newwin(20, 40, 3 + ((TERMY > 25) ? (TERMY-25)/2 : 0), 10+((TERMX > 80) ? (TERMX-80)/2 : 0));
|
||||
wborder(w, LINE_XOXO, LINE_XOXO, LINE_OXOX, LINE_OXOX,
|
||||
LINE_OXXO, LINE_OOXX, LINE_XXOO, LINE_XOOX );
|
||||
if (has_disease("fungus"))
|
||||
bad.push_back("Fungal Parasite");
|
||||
if (has_disease("dermatik"))
|
||||
bad.push_back("Insect Parasite");
|
||||
if (has_disease("poison"))
|
||||
bad.push_back("Poison");
|
||||
if (radiation > 0)
|
||||
bad.push_back("Irradiated");
|
||||
if (has_disease("pkill1"))
|
||||
good.push_back("Minor Painkiller");
|
||||
if (has_disease("pkill2"))
|
||||
good.push_back("Moderate Painkiller");
|
||||
if (has_disease("pkill3"))
|
||||
good.push_back("Heavy Painkiller");
|
||||
if (has_disease("pkill_l"))
|
||||
good.push_back("Slow-Release Painkiller");
|
||||
if (has_disease("drunk"))
|
||||
good.push_back("Alcohol");
|
||||
if (has_disease("cig"))
|
||||
good.push_back("Nicotine");
|
||||
if (has_disease("meth"))
|
||||
good.push_back("Methamphetamines");
|
||||
if (has_disease("high"))
|
||||
good.push_back("Intoxicant: Other");
|
||||
if (has_disease("hallu") || has_disease("visuals"))
|
||||
bad.push_back("Magic Mushroom");
|
||||
if (has_disease("iodine"))
|
||||
good.push_back("Iodine");
|
||||
if (has_disease("took_xanax"))
|
||||
good.push_back("Xanax");
|
||||
if (has_disease("took_prozac"))
|
||||
good.push_back("Prozac");
|
||||
if (has_disease("took_flumed"))
|
||||
good.push_back("Antihistamines");
|
||||
if (has_disease("adrenaline"))
|
||||
good.push_back("Adrenaline Spike");
|
||||
if (good.size() == 0 && bad.size() == 0)
|
||||
mvwprintz(w, 1, 1, c_white, "No effects.");
|
||||
else {
|
||||
for (int line = 1; line < 39 && line <= good.size() + bad.size(); line++) {
|
||||
if (line <= bad.size())
|
||||
mvwprintz(w, line, 1, c_red, bad[line - 1].c_str());
|
||||
else
|
||||
mvwprintz(w, line, 1, c_green, good[line - 1 - bad.size()].c_str());
|
||||
}
|
||||
}
|
||||
wrefresh(w);
|
||||
refresh();
|
||||
getch();
|
||||
delwin(w);
|
||||
} else if(bio.id == "bio_blood_filter"){
|
||||
rem_disease("fungus");
|
||||
rem_disease("poison");
|
||||
rem_disease("pkill1");
|
||||
rem_disease("pkill2");
|
||||
rem_disease("pkill3");
|
||||
rem_disease("pkill_l");
|
||||
rem_disease("drunk");
|
||||
rem_disease("cig");
|
||||
rem_disease("high");
|
||||
rem_disease("hallu");
|
||||
rem_disease("visuals");
|
||||
rem_disease("iodine");
|
||||
rem_disease("took_xanax");
|
||||
rem_disease("took_prozac");
|
||||
rem_disease("took_flumed");
|
||||
rem_disease("adrenaline");
|
||||
rem_disease("meth");
|
||||
pkill = 0;
|
||||
stim = 0;
|
||||
} else if(bio.id == "bio_evap"){
|
||||
item water = item(g->itypes["water_clean"], 0);
|
||||
if (g->handle_liquid(water, true, true))
|
||||
{
|
||||
moves -= 100;
|
||||
}
|
||||
else if (query_yn("Drink from your hands?"))
|
||||
{
|
||||
inv.push_back(water);
|
||||
water = inv.item_by_type(water.typeId());
|
||||
eat(g, water.invlet);
|
||||
moves -= 350;
|
||||
}
|
||||
else
|
||||
{
|
||||
power_level += bionics["bio_evap"]->power_cost;
|
||||
}
|
||||
} else if(bio.id == "bio_lighter"){
|
||||
if(!g->choose_adjacent("Start a fire", dirx, diry) ||
|
||||
(!g->m.add_field(g, dirx, diry, fd_fire, 1))){
|
||||
g->add_msg_if_player(this,"You can't light a fire there.");
|
||||
power_level += bionics["bio_lighter"]->power_cost;
|
||||
}
|
||||
|
||||
} else if(bio.id == "bio_claws"){
|
||||
if (weapon.type->id == "bio_claws_weapon") {
|
||||
g->add_msg("You withdraw your claws.");
|
||||
weapon = get_combat_style();
|
||||
} else if(weapon.type->id != "null"){
|
||||
g->add_msg("Your claws extend, forcing you to drop your %s.",
|
||||
weapon.tname().c_str());
|
||||
g->m.add_item(posx, posy, weapon);
|
||||
weapon = item(g->itypes["bio_claws_weapon"], 0);
|
||||
weapon.invlet = '#';
|
||||
} else {
|
||||
g->add_msg("Your claws extend!");
|
||||
weapon = item(g->itypes["bio_claws_weapon"], 0);
|
||||
weapon.invlet = '#';
|
||||
}
|
||||
} else if(bio.id == "bio_blaster"){
|
||||
tmp_item = weapon;
|
||||
weapon = item(g->itypes["bio_blaster_gun"], 0);
|
||||
weapon.curammo = dynamic_cast<it_ammo*>(g->itypes["bio_fusion_ammo"]);
|
||||
weapon.charges = 1;
|
||||
g->refresh_all();
|
||||
g->plfire(false);
|
||||
weapon = tmp_item;
|
||||
} else if (bio.id == "bio_laser"){
|
||||
tmp_item = weapon;
|
||||
weapon = item(g->itypes["v29"], 0);
|
||||
weapon.curammo = dynamic_cast<it_ammo*>(g->itypes["laser_pack"]);
|
||||
weapon.charges = 1;
|
||||
g->refresh_all();
|
||||
g->plfire(false);
|
||||
weapon = tmp_item;
|
||||
} else if (bio.id == "bio_emp"){
|
||||
if(g->choose_adjacent("create an EMP", dirx, diry))
|
||||
g->emp_blast(dirx, diry);
|
||||
else{
|
||||
power_level += bionics["bio_emp"]->power_cost;
|
||||
}
|
||||
|
||||
} else if (bio.id == "bio_hydraulics"){
|
||||
g->add_msg("Your muscles hiss as hydraulic strength fills them!");
|
||||
} else if (bio.id == "bio_water_extractor"){
|
||||
bool extracted = false;
|
||||
for (int i = 0; i < g->m.i_at(posx, posy).size(); i++) {
|
||||
item tmp = g->m.i_at(posx, posy)[i];
|
||||
if (tmp.type->id == "corpse" && query_yn("Extract water from the %s",
|
||||
tmp.tname().c_str())) {
|
||||
item water = item(g->itypes["water_clean"], 0);
|
||||
if (g->handle_liquid(water, true, true))
|
||||
{
|
||||
moves -= 100;
|
||||
}
|
||||
else if (query_yn("Drink directly from the condensor?"))
|
||||
{
|
||||
inv.push_back(water);
|
||||
water = inv.item_by_type(water.typeId());
|
||||
eat(g, water.invlet);
|
||||
moves -= 350;
|
||||
}
|
||||
extracted = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (!extracted)
|
||||
power_level += bionics["bio_water_extractor"]->power_cost;
|
||||
} else if(bio.id == "bio_magnet"){
|
||||
for (int i = posx - 10; i <= posx + 10; i++) {
|
||||
for (int j = posy - 10; j <= posy + 10; j++) {
|
||||
if (g->m.i_at(i, j).size() > 0) {
|
||||
if (g->m.sees(i, j, posx, posy, -1, t))
|
||||
traj = line_to(i, j, posx, posy, t);
|
||||
else
|
||||
traj = line_to(i, j, posx, posy, 0);
|
||||
}
|
||||
traj.insert(traj.begin(), point(i, j));
|
||||
for (int k = 0; k < g->m.i_at(i, j).size(); k++) {
|
||||
if (g->m.i_at(i, j)[k].made_of("iron") || g->m.i_at(i, j)[k].made_of("steel")){
|
||||
tmp_item = g->m.i_at(i, j)[k];
|
||||
g->m.i_rem(i, j, k);
|
||||
for (l = 0; l < traj.size(); l++) {
|
||||
index = g->mon_at(traj[l].x, traj[l].y);
|
||||
if (index != -1) {
|
||||
if (g->z[index].hurt(tmp_item.weight() * 2))
|
||||
g->kill_mon(index, true);
|
||||
g->m.add_item(traj[l].x, traj[l].y, tmp_item);
|
||||
l = traj.size() + 1;
|
||||
} else if (l > 0 && g->m.move_cost(traj[l].x, traj[l].y) == 0) {
|
||||
g->m.bash(traj[l].x, traj[l].y, tmp_item.weight() * 2, junk);
|
||||
g->sound(traj[l].x, traj[l].y, 12, junk);
|
||||
if (g->m.move_cost(traj[l].x, traj[l].y) == 0) {
|
||||
g->m.add_item(traj[l - 1].x, traj[l - 1].y, tmp_item);
|
||||
l = traj.size() + 1;
|
||||
}
|
||||
}
|
||||
}
|
||||
if (l == traj.size())
|
||||
g->m.add_item(posx, posy, tmp_item);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
} else if(bio.id == "bio_lockpick"){
|
||||
if(!g->choose_adjacent("Activate your bio lockpick", dirx, diry)){
|
||||
power_level += bionics["bio_lockpick"]->power_cost;
|
||||
return;
|
||||
}
|
||||
if (g->m.ter(dirx, diry) == t_door_locked) {
|
||||
moves -= 40;
|
||||
g->add_msg_if_player(this,"You unlock the door.");
|
||||
g->m.ter_set(dirx, diry, t_door_c);
|
||||
} else
|
||||
g->add_msg_if_player(this,"You can't unlock that %s.", g->m.tername(dirx, diry).c_str());
|
||||
} else if(bio.id == "bio_flashbang") {
|
||||
g->add_msg_if_player(this,"You activate your integrated flashbang generator!");
|
||||
g->flashbang(posx, posy, true);
|
||||
} else if(bio.id == "bio_shockwave") {
|
||||
g->shockwave(posx, posy, 3, 4, 2, 8, true);
|
||||
g->add_msg_if_player(this,"You unleash a powerful shockwave!");
|
||||
} else if(bio.id == "bio_chain_lightning"){
|
||||
tmp_item = weapon;
|
||||
weapon = item(g->itypes["bio_lightning"], 0);
|
||||
weapon.curammo = dynamic_cast<it_ammo*>(g->itypes["bio_lightning_ammo"]);
|
||||
weapon.charges = 10;
|
||||
g->refresh_all();
|
||||
g->plfire(false);
|
||||
weapon = tmp_item;
|
||||
}
|
||||
}
|
||||
|
||||
bool player::install_bionics(game *g, it_bionic* type)
|
||||
{
|
||||
|
||||
if (type == NULL) {
|
||||
debugmsg("Tried to install NULL bionic");
|
||||
return false;
|
||||
}
|
||||
if (has_bionic(type->id)){
|
||||
if (!(type->id == "bio_power_storage" || type->id == "bio_power_storage_mkII")){
|
||||
popup("You have already installed this bionic.");
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
std::string bio_name = type->name.substr(5); // Strip off "CBM: "
|
||||
int pl_skill = int_cur +
|
||||
skillLevel("electronics") * 4 +
|
||||
skillLevel("firstaid") * 3 +
|
||||
skillLevel("mechanics") * 2;
|
||||
|
||||
int chance_of_success = int((100 * pl_skill) /
|
||||
(pl_skill + 4 * type->difficulty));
|
||||
if (!query_yn("WARNING: %i percent chance of genetic damage, blood loss, or damage to existing bionics! Install anyway?", 100 - chance_of_success))
|
||||
return false;
|
||||
int pow_up = 0;
|
||||
if (type->id == "bio_power_storage" || type->id == "bio_power_storage_mkII") {
|
||||
pow_up = BATTERY_AMOUNT;
|
||||
if (type->id == "bio_power_storage_mkII") {
|
||||
pow_up = 10;
|
||||
}
|
||||
}
|
||||
|
||||
practice(g->turn, "electronics", (100 - chance_of_success) * 1.5);
|
||||
practice(g->turn, "firstaid", (100 - chance_of_success) * 1.0);
|
||||
practice(g->turn, "mechanics", (100 - chance_of_success) * 0.5);
|
||||
int success = chance_of_success - rng(1, 100);
|
||||
if (success > 0) {
|
||||
if (pow_up) {
|
||||
max_power_level += pow_up;
|
||||
g->add_msg_if_player(this, "Increased storage capacity by %i", pow_up);
|
||||
} else{
|
||||
g->add_msg("Successfully installed %s.", bionics[type->id]->name.c_str());
|
||||
add_bionic(type->id);
|
||||
}
|
||||
} else
|
||||
bionics_install_failure(g, this, success);
|
||||
g->refresh_all();
|
||||
return true;
|
||||
}
|
||||
|
||||
void bionics_install_failure(game *g, player *u, int success)
|
||||
{
|
||||
success = abs(success) - rng(1, 10);
|
||||
int failure_level = 0;
|
||||
if (success <= 0) {
|
||||
g->add_msg("The installation fails without incident.");
|
||||
return;
|
||||
}
|
||||
|
||||
while (success > 0) {
|
||||
failure_level++;
|
||||
success -= rng(1, 10);
|
||||
}
|
||||
|
||||
int fail_type = rng(1, (failure_level > 5 ? 5 : failure_level));
|
||||
std::string fail_text;
|
||||
|
||||
switch (rng(1, 5)) {
|
||||
case 1: fail_text = "You flub the installation"; break;
|
||||
case 2: fail_text = "You mess up the installation"; break;
|
||||
case 3: fail_text = "The installation fails"; break;
|
||||
case 4: fail_text = "The installation is a failure"; break;
|
||||
case 5: fail_text = "You screw up the installation"; break;
|
||||
}
|
||||
|
||||
if (fail_type == 3 && u->my_bionics.size() == 0)
|
||||
fail_type = 2; // If we have no bionics, take damage instead of losing some
|
||||
|
||||
switch (fail_type) {
|
||||
|
||||
case 1:
|
||||
fail_text += ", causing great pain.";
|
||||
u->pain += rng(failure_level * 3, failure_level * 6);
|
||||
break;
|
||||
|
||||
case 2:
|
||||
fail_text += " and your body is damaged.";
|
||||
u->hurtall(rng(failure_level, failure_level * 2));
|
||||
break;
|
||||
|
||||
case 3:
|
||||
fail_text += " and ";
|
||||
fail_text += (u->my_bionics.size() <= failure_level ? "all" : "some");
|
||||
fail_text += " of your existing bionics are lost.";
|
||||
for (int i = 0; i < failure_level && u->my_bionics.size() > 0; i++) {
|
||||
int rem = rng(0, u->my_bionics.size() - 1);
|
||||
u->my_bionics.erase(u->my_bionics.begin() + rem);
|
||||
}
|
||||
break;
|
||||
|
||||
case 4:
|
||||
fail_text += " and do damage to your genetics, causing mutation.";
|
||||
g->add_msg(fail_text.c_str()); // Failure text comes BEFORE mutation text
|
||||
while (failure_level > 0) {
|
||||
u->mutate(g);
|
||||
failure_level -= rng(1, failure_level + 2);
|
||||
}
|
||||
return; // So the failure text doesn't show up twice
|
||||
break;
|
||||
|
||||
case 5:
|
||||
{
|
||||
fail_text += ", causing a faulty installation.";
|
||||
std::vector<bionic_id> valid;
|
||||
for (std::vector<std::string>::iterator it = faulty_bionics.begin() ; it != faulty_bionics.end(); ++it){
|
||||
if (!u->has_bionic(*it)){
|
||||
valid.push_back(*it);
|
||||
}
|
||||
}
|
||||
if (valid.size() == 0) { // We've got all the bad bionics!
|
||||
if (u->max_power_level > 0) {
|
||||
g->add_msg("You lose power capacity!");
|
||||
u->max_power_level = rng(0, u->max_power_level - 1);
|
||||
}
|
||||
// TODO: What if we can't lose power capacity? No penalty?
|
||||
} else {
|
||||
int index = rng(0, valid.size() - 1);
|
||||
u->add_bionic(valid[index]);
|
||||
}
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
g->add_msg(fail_text.c_str());
|
||||
|
||||
}
|
||||
|
||||
void game::init_bionics()
|
||||
{
|
||||
catajson bionics_file("data/raw/bionics.json");
|
||||
|
||||
for(bionics_file.set_begin(); bionics_file.has_curr(); bionics_file.next())
|
||||
{
|
||||
catajson bio = bionics_file.curr();
|
||||
|
||||
std::set<std::string> tags;
|
||||
|
||||
if(bio.has("flags"))
|
||||
{
|
||||
tags = bio.get("flags").as_tags();
|
||||
}
|
||||
|
||||
// set up all the bionic parameters
|
||||
std::string id = bio.get("id").as_string();
|
||||
std::string name = bio.get("name").as_string();
|
||||
int cost = bio.get("cost").as_int();
|
||||
int time = bio.get("time").as_int();
|
||||
std::string description = bio.get("description").as_string();
|
||||
bool faulty = (tags.find("FAULTY") != tags.end());
|
||||
bool powersource = (tags.find("POWER") != tags.end());
|
||||
bool active = (tags.find("ACTIVE") != tags.end());
|
||||
|
||||
bionics[id] = new bionic_data(name, powersource, active, cost, time, description, faulty);
|
||||
|
||||
// Don't add bio_null to any vectors.
|
||||
if(id != "bio_null")
|
||||
{
|
||||
if(faulty)
|
||||
{
|
||||
faulty_bionics.push_back(id);
|
||||
}
|
||||
else if(powersource)
|
||||
{
|
||||
power_source_bionics.push_back(id);
|
||||
}
|
||||
else if(!active)
|
||||
{
|
||||
unpowered_bionics.push_back(id);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,51 +0,0 @@
|
||||
#ifndef _BIONICS_H_
|
||||
#define _BIONICS_H_
|
||||
#include <string>
|
||||
#include <map>
|
||||
|
||||
/* Thought: Perhaps a HUD bionic that changes the display of the game?
|
||||
* Showing more information or something. */
|
||||
|
||||
typedef std::string bionic_id;
|
||||
|
||||
class bionic_data {
|
||||
public:
|
||||
bionic_data(std::string new_name, bool new_power_source, bool new_activated,
|
||||
int new_power_cost, int new_charge_time, std::string new_description, bool new_faulty = false);
|
||||
|
||||
std::string name;
|
||||
bool power_source;
|
||||
bool activated; // If true, then the below function only happens when
|
||||
// activated; otherwise, it happens every turn
|
||||
int power_cost;
|
||||
int charge_time; // How long, when activated, between drawing power_cost
|
||||
// If 0, it draws power once
|
||||
std::string description;
|
||||
bool faulty; // Whether or not the bionic is faulty
|
||||
};
|
||||
|
||||
struct bionic {
|
||||
bionic_id id;
|
||||
char invlet;
|
||||
bool powered;
|
||||
int charge;
|
||||
bionic() {
|
||||
id = "bio_batteries";
|
||||
invlet = 'a';
|
||||
powered = false;
|
||||
charge = 0;
|
||||
}
|
||||
bionic(bionic_id pid, char pinvlet) {
|
||||
id = pid;
|
||||
invlet = pinvlet;
|
||||
powered = false;
|
||||
charge = 0;
|
||||
};
|
||||
};
|
||||
|
||||
extern std::map<bionic_id, bionic_data*> bionics;
|
||||
extern std::vector<bionic_id> faulty_bionics;
|
||||
extern std::vector<bionic_id> power_source_bionics;
|
||||
extern std::vector<bionic_id> unpowered_bionics;
|
||||
|
||||
#endif
|
||||
@@ -1,73 +0,0 @@
|
||||
#include "bodypart.h"
|
||||
#include "rng.h"
|
||||
|
||||
std::string body_part_name (body_part bp, int side)
|
||||
{
|
||||
switch (bp) {
|
||||
case bp_head:
|
||||
return "head";
|
||||
case bp_eyes:
|
||||
return "eyes";
|
||||
case bp_mouth:
|
||||
return "mouth";
|
||||
case bp_torso:
|
||||
return "torso";
|
||||
case bp_arms:
|
||||
if (side == 0)
|
||||
return "left arm";
|
||||
if (side == 1)
|
||||
return "right arm";
|
||||
return "arms";
|
||||
case bp_hands:
|
||||
if (side == 0)
|
||||
return "left hand";
|
||||
if (side == 1)
|
||||
return "right hand";
|
||||
return "hands";
|
||||
case bp_legs:
|
||||
if (side == 0)
|
||||
return "left leg";
|
||||
if (side == 1)
|
||||
return "right leg";
|
||||
return "legs";
|
||||
case bp_feet:
|
||||
if (side == 0)
|
||||
return "left foot";
|
||||
if (side == 1)
|
||||
return "right foot";
|
||||
return "feet";
|
||||
default:
|
||||
return "appendix";
|
||||
}
|
||||
}
|
||||
|
||||
std::string encumb_text(body_part bp)
|
||||
{
|
||||
switch (bp) {
|
||||
case bp_head: return "";
|
||||
case bp_eyes: return "Ranged combat is hampered.";
|
||||
case bp_mouth: return "Running is slowed.";
|
||||
case bp_torso: return "Dodging and melee is hampered.";
|
||||
case bp_arms: return "Melee and ranged combat is hampered.";
|
||||
case bp_hands: return "Manual tasks are slowed.";
|
||||
case bp_legs: return "Running and swimming are slowed.";
|
||||
case bp_feet: return "Running is slowed.";
|
||||
default: return "It's inflammed.";
|
||||
}
|
||||
}
|
||||
|
||||
body_part random_body_part()
|
||||
{
|
||||
int rn = rng(0, 100);
|
||||
if (rn == 0)
|
||||
return bp_eyes;
|
||||
if (rn <= 1)
|
||||
return bp_mouth;
|
||||
if (rn <= 7)
|
||||
return bp_head;
|
||||
if (rn <= 28)
|
||||
return bp_legs;
|
||||
if (rn <= 50)
|
||||
return bp_arms;
|
||||
return bp_torso;
|
||||
}
|
||||
-23
@@ -1,23 +0,0 @@
|
||||
#ifndef _BODYPART_H_
|
||||
#define _BODYPART_H_
|
||||
|
||||
#include <string>
|
||||
// The order is important ; pldata.h has to be in the same order
|
||||
enum body_part {
|
||||
bp_torso = 0,
|
||||
bp_head,
|
||||
bp_eyes,
|
||||
bp_mouth,
|
||||
bp_arms,
|
||||
bp_hands,
|
||||
bp_legs,
|
||||
bp_feet,
|
||||
num_bp
|
||||
};
|
||||
|
||||
std::string body_part_name(body_part bp, int side);
|
||||
std::string encumb_text(body_part bp);
|
||||
|
||||
body_part random_body_part();
|
||||
|
||||
#endif
|
||||
@@ -1,388 +0,0 @@
|
||||
#include "building_generation.h"
|
||||
#include "output.h"
|
||||
#include "item_factory.h"
|
||||
|
||||
mapgendata::mapgendata(oter_id north, oter_id east, oter_id south, oter_id west)
|
||||
{
|
||||
t_nesw[0] = north;
|
||||
t_nesw[1] = east;
|
||||
t_nesw[2] = south;
|
||||
t_nesw[3] = west;
|
||||
n_fac = 0;
|
||||
e_fac = 0;
|
||||
s_fac = 0;
|
||||
w_fac = 0;
|
||||
}
|
||||
|
||||
void mapgendata::set_dir(int dir_in, int val)
|
||||
{
|
||||
switch (dir_in)
|
||||
{
|
||||
case 0:
|
||||
n_fac = val;
|
||||
break;
|
||||
case 1:
|
||||
e_fac = val;
|
||||
break;
|
||||
case 2:
|
||||
s_fac = val;
|
||||
break;
|
||||
case 3:
|
||||
w_fac = val;
|
||||
break;
|
||||
default:
|
||||
debugmsg("Invalid direction for mapgendata::set_dir. dir_in = %d", dir_in);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
void mapgendata::fill(int val)
|
||||
{
|
||||
n_fac = val;
|
||||
e_fac = val;
|
||||
s_fac = val;
|
||||
w_fac = val;
|
||||
}
|
||||
|
||||
int& mapgendata::dir(int dir_in)
|
||||
{
|
||||
switch (dir_in)
|
||||
{
|
||||
case 0:
|
||||
return n_fac;
|
||||
break;
|
||||
case 1:
|
||||
return e_fac;
|
||||
break;
|
||||
case 2:
|
||||
return s_fac;
|
||||
break;
|
||||
case 3:
|
||||
return w_fac;
|
||||
break;
|
||||
default:
|
||||
debugmsg("Invalid direction for mapgendata::set_dir. dir_in = %d", dir_in);
|
||||
//return something just so the compiler doesn't freak out. Not really correct, though.
|
||||
return n_fac;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
ter_id grass_or_dirt()
|
||||
{
|
||||
if (one_in(4))
|
||||
return t_grass;
|
||||
return t_dirt;
|
||||
}
|
||||
|
||||
ter_id dirt_or_pile()
|
||||
{
|
||||
if (one_in(4))
|
||||
return t_dirtmound;
|
||||
return t_dirt;
|
||||
}
|
||||
|
||||
// helper functions below
|
||||
|
||||
void mapgen_null(map *m)
|
||||
{
|
||||
debugmsg("Generating terrain for ot_null, please report this as a bug");
|
||||
for (int i = 0; i < SEEX * 2; i++)
|
||||
{
|
||||
for (int j = 0; j < SEEY * 2; j++)
|
||||
{
|
||||
m->ter_set(i, j, t_null);
|
||||
m->radiation(i, j) = 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void mapgen_crater(map *m, mapgendata dat)
|
||||
{
|
||||
for(int i = 0; i < 4; i++)
|
||||
{
|
||||
if(dat.t_nesw[i] != ot_crater)
|
||||
{
|
||||
dat.set_dir(i, 6);
|
||||
}
|
||||
}
|
||||
|
||||
for (int i = 0; i < SEEX * 2; i++)
|
||||
{
|
||||
for (int j = 0; j < SEEY * 2; j++)
|
||||
{
|
||||
if (rng(0, dat.w_fac) <= i && rng(0, dat.e_fac) <= SEEX * 2 - 1 - i &&
|
||||
rng(0, dat.n_fac) <= j && rng(0, dat.s_fac) <= SEEX * 2 - 1 - j )
|
||||
{
|
||||
m->ter_set(i, j, t_rubble);
|
||||
m->radiation(i, j) = rng(0, 4) * rng(0, 2);
|
||||
}
|
||||
else
|
||||
{
|
||||
m->ter_set(i, j, t_dirt);
|
||||
m->radiation(i, j) = rng(0, 2) * rng(0, 2) * rng(0, 2);
|
||||
}
|
||||
}
|
||||
}
|
||||
m->place_items("wreckage", 83, 0, 0, SEEX * 2 - 1, SEEY * 2 - 1, true, 0);
|
||||
}
|
||||
|
||||
void mapgen_field(map *m, int turn)
|
||||
{
|
||||
for (int i = 0; i < SEEX * 2; i++)
|
||||
{
|
||||
for (int j = 0; j < SEEY * 2; j++)
|
||||
{
|
||||
m->ter_set(i, j, grass_or_dirt());
|
||||
if (one_in(120))
|
||||
{
|
||||
if (one_in(30))
|
||||
{
|
||||
m->ter_set(i, j, t_shrub_blueberry);
|
||||
}
|
||||
else
|
||||
if (one_in(30))
|
||||
{
|
||||
m->ter_set(i, j, t_shrub_strawberry);
|
||||
}
|
||||
else
|
||||
{
|
||||
m->ter_set(i, j, t_shrub);
|
||||
}
|
||||
}
|
||||
else
|
||||
if (one_in(1000)) { m->furn_set(i,j, f_mutpoppy); }
|
||||
}
|
||||
}
|
||||
m->place_items("field", 60, 0, 0, SEEX * 2 - 1, SEEY * 2 - 1, true, turn);
|
||||
}
|
||||
|
||||
void mapgen_dirtlot(map *m, game *g)
|
||||
{
|
||||
for (int i = 0; i < SEEX * 2; i++)
|
||||
{
|
||||
for (int j = 0; j < SEEY * 2; j++)
|
||||
{
|
||||
m->ter_set(i, j, t_dirt);
|
||||
if (one_in(120))
|
||||
{
|
||||
m->ter_set(i, j, t_pit_shallow);
|
||||
}
|
||||
else if (one_in(50))
|
||||
{
|
||||
m->ter_set(i,j, t_grass);
|
||||
}
|
||||
}
|
||||
}
|
||||
if (one_in(4))
|
||||
{
|
||||
m->add_vehicle (g, veh_truck, 12, 12, 90, -1, -1);
|
||||
}
|
||||
}
|
||||
|
||||
void mapgen_forest_general(map *m, oter_id terrain_type, mapgendata dat, int turn)
|
||||
{
|
||||
switch (terrain_type)
|
||||
{
|
||||
case ot_forest_thick:
|
||||
dat.fill(8);
|
||||
break;
|
||||
case ot_forest_water:
|
||||
dat.fill(4);
|
||||
break;
|
||||
case ot_forest:
|
||||
dat.fill(0);
|
||||
break;
|
||||
}
|
||||
for (int i = 0; i < 4; i++)
|
||||
{
|
||||
if (dat.t_nesw[i] == ot_forest || dat.t_nesw[i] == ot_forest_water)
|
||||
{
|
||||
dat.dir(i) += 14;
|
||||
}
|
||||
else if (dat.t_nesw[i] == ot_forest_thick)
|
||||
{
|
||||
dat.dir(i) += 18;
|
||||
}
|
||||
}
|
||||
for (int i = 0; i < SEEX * 2; i++)
|
||||
{
|
||||
for (int j = 0; j < SEEY * 2; j++)
|
||||
{
|
||||
int forest_chance = 0, num = 0;
|
||||
if (j < dat.n_fac)
|
||||
{
|
||||
forest_chance += dat.n_fac - j;
|
||||
num++;
|
||||
}
|
||||
if (SEEX * 2 - 1 - i < dat.e_fac)
|
||||
{
|
||||
forest_chance += dat.e_fac - (SEEX * 2 - 1 - i);
|
||||
num++;
|
||||
}
|
||||
if (SEEY * 2 - 1 - j < dat.s_fac)
|
||||
{
|
||||
forest_chance += dat.s_fac - (SEEY * 2 - 1 - j);
|
||||
num++;
|
||||
}
|
||||
if (i < dat.w_fac)
|
||||
{
|
||||
forest_chance += dat.w_fac - i;
|
||||
num++;
|
||||
}
|
||||
if (num > 0)
|
||||
{
|
||||
forest_chance /= num;
|
||||
}
|
||||
int rn = rng(0, forest_chance);
|
||||
if ((forest_chance > 0 && rn > 13) || one_in(100 - forest_chance))
|
||||
{
|
||||
if (one_in(250))
|
||||
{
|
||||
m->ter_set(i, j, t_tree_apple);
|
||||
m->spawn_item(i, j, "apple", turn);
|
||||
}
|
||||
else
|
||||
{
|
||||
m->ter_set(i, j, t_tree);
|
||||
}
|
||||
}
|
||||
else if ((forest_chance > 0 && rn > 10) || one_in(100 - forest_chance))
|
||||
{
|
||||
m->ter_set(i, j, t_tree_young);
|
||||
}
|
||||
else if ((forest_chance > 0 && rn > 9) || one_in(100 - forest_chance))
|
||||
{
|
||||
if (one_in(250))
|
||||
{
|
||||
m->ter_set(i, j, t_shrub_blueberry);
|
||||
}
|
||||
else
|
||||
{
|
||||
m->ter_set(i, j, t_underbrush);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
m->ter_set(i, j, t_dirt);
|
||||
}
|
||||
}
|
||||
}
|
||||
m->place_items("forest", 60, 0, 0, SEEX * 2 - 1, SEEY * 2 - 1, true, turn);
|
||||
|
||||
if (terrain_type == ot_forest_water)
|
||||
{
|
||||
// Reset *_fac to handle where to place water
|
||||
for (int i = 0; i < 4; i++)
|
||||
{
|
||||
if (dat.t_nesw[i] == ot_forest_water)
|
||||
{
|
||||
dat.set_dir(i, 2);
|
||||
}
|
||||
else if (dat.t_nesw[i] >= ot_river_center && dat.t_nesw[i] <= ot_river_nw)
|
||||
{
|
||||
dat.set_dir(i, 3);
|
||||
}
|
||||
else if (dat.t_nesw[i] == ot_forest || dat.t_nesw[i] == ot_forest_thick)
|
||||
{
|
||||
dat.set_dir(i, 1);
|
||||
}
|
||||
else
|
||||
{
|
||||
dat.set_dir(i, 0);
|
||||
}
|
||||
}
|
||||
int x = SEEX / 2 + rng(0, SEEX), y = SEEY / 2 + rng(0, SEEY);
|
||||
for (int i = 0; i < 20; i++)
|
||||
{
|
||||
if (x >= 0 && x < SEEX * 2 && y >= 0 && y < SEEY * 2)
|
||||
{
|
||||
if (m->ter(x, y) == t_water_sh)
|
||||
{
|
||||
m->ter_set(x, y, t_water_dp);
|
||||
}
|
||||
else if (m->ter(x, y) == t_dirt || m->ter(x, y) == t_underbrush)
|
||||
{
|
||||
m->ter_set(x, y, t_water_sh);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
i = 20;
|
||||
}
|
||||
x += rng(-2, 2);
|
||||
y += rng(-2, 2);
|
||||
if (x < 0 || x >= SEEX * 2)
|
||||
{
|
||||
x = SEEX / 2 + rng(0, SEEX);
|
||||
}
|
||||
if (y < 0 || y >= SEEY * 2)
|
||||
{
|
||||
y = SEEY / 2 + rng(0, SEEY);
|
||||
}
|
||||
for (int j = 0; j < dat.n_fac; j++)
|
||||
{
|
||||
int wx = rng(0, SEEX * 2 -1), wy = rng(0, SEEY - 1);
|
||||
if (m->ter(wx, wy) == t_dirt || m->ter(wx, wy) == t_underbrush)
|
||||
{
|
||||
m->ter_set(wx, wy, t_water_sh);
|
||||
}
|
||||
}
|
||||
for (int j = 0; j < dat.e_fac; j++)
|
||||
{
|
||||
int wx = rng(SEEX, SEEX * 2 - 1), wy = rng(0, SEEY * 2 - 1);
|
||||
if (m->ter(wx, wy) == t_dirt || m->ter(wx, wy) == t_underbrush)
|
||||
{
|
||||
m->ter_set(wx, wy, t_water_sh);
|
||||
}
|
||||
}
|
||||
for (int j = 0; j < dat.s_fac; j++)
|
||||
{
|
||||
int wx = rng(0, SEEX * 2 - 1), wy = rng(SEEY, SEEY * 2 - 1);
|
||||
if (m->ter(wx, wy) == t_dirt || m->ter(wx, wy) == t_underbrush)
|
||||
{
|
||||
m->ter_set(wx, wy, t_water_sh);
|
||||
}
|
||||
}
|
||||
for (int j = 0; j < dat.w_fac; j++)
|
||||
{
|
||||
int wx = rng(0, SEEX - 1), wy = rng(0, SEEY * 2 - 1);
|
||||
if (m->ter(wx, wy) == t_dirt || m->ter(wx, wy) == t_underbrush)
|
||||
{
|
||||
m->ter_set(wx, wy, t_water_sh);
|
||||
}
|
||||
}
|
||||
}
|
||||
int rn = rng(0, 2) * rng(0, 1) * (rng(0, 1) + rng(0, 1));// Good chance of 0
|
||||
for (int i = 0; i < rn; i++)
|
||||
{
|
||||
x = rng(0, SEEX * 2 - 1);
|
||||
y = rng(0, SEEY * 2 - 1);
|
||||
m->add_trap(x, y, tr_sinkhole);
|
||||
if (m->ter(x, y) != t_water_sh)
|
||||
{
|
||||
m->ter_set(x, y, t_dirt);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (one_in(10000)) { //1-2 per overmap, very bad day for low level characters
|
||||
m->add_spawn(mon_jabberwock, 1, SEEX, SEEY);
|
||||
}
|
||||
|
||||
|
||||
if (one_in(100)) // One in 100 forests has a spider living in it :o
|
||||
{
|
||||
for (int i = 0; i < SEEX * 2; i++)
|
||||
{
|
||||
for (int j = 0; j < SEEX * 2; j++)
|
||||
{
|
||||
if ((m->ter(i, j) == t_dirt || m->ter(i, j) == t_underbrush) && !one_in(3))
|
||||
{
|
||||
m->add_field(NULL, i, j, fd_web, rng(1, 3));
|
||||
}
|
||||
}
|
||||
}
|
||||
m->add_spawn(mon_spider_web, rng(1, 2), SEEX, SEEY);
|
||||
}
|
||||
}
|
||||
@@ -1,32 +0,0 @@
|
||||
#ifndef _BUILDING_GENERATION_H_
|
||||
#define _BUILDING_GENERATION_H_
|
||||
|
||||
#include "omdata.h"
|
||||
#include "map.h"
|
||||
|
||||
struct mapgendata
|
||||
{
|
||||
public:
|
||||
oter_id t_nesw[4];
|
||||
int n_fac; // dir == 0
|
||||
int e_fac; // dir == 1
|
||||
int s_fac; // dir == 2
|
||||
int w_fac; // dir == 3
|
||||
|
||||
mapgendata(oter_id north, oter_id east, oter_id south, oter_id west);
|
||||
void set_dir(int dir_in, int val);
|
||||
void fill(int val);
|
||||
int& dir(int dir_in);
|
||||
};
|
||||
|
||||
ter_id grass_or_dirt();
|
||||
ter_id dirt_or_pile();
|
||||
|
||||
// helper functions for mapgen.cpp, so that we can avoid having a massive switch statement (sorta)
|
||||
void mapgen_null(map *m);
|
||||
void mapgen_crater(map *m, mapgendata dat);
|
||||
void mapgen_field(map *m, int turn);
|
||||
void mapgen_dirtlot(map *m, game *g);
|
||||
void mapgen_forest_general(map *m, oter_id terrain_type, mapgendata dat, int turn);
|
||||
|
||||
#endif
|
||||
-506
@@ -1,506 +0,0 @@
|
||||
#include <sstream>
|
||||
#include "calendar.h"
|
||||
#include "output.h"
|
||||
#include "options.h"
|
||||
|
||||
calendar::calendar()
|
||||
{
|
||||
second = 0;
|
||||
minute = 0;
|
||||
hour = 0;
|
||||
day = 0;
|
||||
season = SPRING;
|
||||
year = 0;
|
||||
}
|
||||
|
||||
calendar::calendar(const calendar ©)
|
||||
{
|
||||
second = copy.second;
|
||||
minute = copy.minute;
|
||||
hour = copy.hour;
|
||||
day = copy.day;
|
||||
season = copy.season;
|
||||
year = copy.year;
|
||||
}
|
||||
|
||||
calendar::calendar(int Minute, int Hour, int Day, season_type Season, int Year)
|
||||
{
|
||||
second = 0;
|
||||
minute = Minute;
|
||||
hour = Hour;
|
||||
day = Day;
|
||||
season = Season;
|
||||
year = Year;
|
||||
}
|
||||
|
||||
calendar::calendar(int turn)
|
||||
{
|
||||
int minute_param = int(turn / 10);
|
||||
int hour_param = minute_param / 60;
|
||||
int day_param = hour_param / 24;
|
||||
int season_param = day_param / OPTIONS[OPT_SEASON_LENGTH];
|
||||
second = 6 * (turn % 10);
|
||||
minute = minute_param % 60;
|
||||
hour = hour_param % 24;
|
||||
day = 1 + day_param % (int)OPTIONS[OPT_SEASON_LENGTH];
|
||||
season = season_type(season_param % 4);
|
||||
year = season_param / 4;
|
||||
}
|
||||
|
||||
int calendar::get_turn() const
|
||||
{
|
||||
int ret = second / 6;
|
||||
ret += minute * 10;
|
||||
ret += hour * 600;
|
||||
ret += day * 14400;
|
||||
ret += int(season) * 14400 * (int)OPTIONS[OPT_SEASON_LENGTH];
|
||||
ret += year * 14400 * 4 * (int)OPTIONS[OPT_SEASON_LENGTH];
|
||||
return ret;
|
||||
}
|
||||
|
||||
calendar::operator int() const
|
||||
{
|
||||
int ret = second / 6;
|
||||
ret += minute * 10;
|
||||
ret += hour * 600;
|
||||
ret += day * 14400;
|
||||
ret += int(season) * 14400 * (int)OPTIONS[OPT_SEASON_LENGTH];
|
||||
ret += year * 14400 * 4 * (int)OPTIONS[OPT_SEASON_LENGTH];
|
||||
return ret;
|
||||
}
|
||||
|
||||
calendar& calendar::operator =(calendar &rhs)
|
||||
{
|
||||
if (this == &rhs)
|
||||
return *this;
|
||||
|
||||
second = rhs.second;
|
||||
minute = rhs.minute;
|
||||
hour = rhs.hour;
|
||||
day = rhs.day;
|
||||
season = rhs.season;
|
||||
year = rhs.year;
|
||||
|
||||
return *this;
|
||||
}
|
||||
|
||||
calendar& calendar::operator =(int rhs)
|
||||
{
|
||||
int minute_param = int(rhs / 10);
|
||||
int hour_param = minute_param / 60;
|
||||
int day_param = hour_param / 24;
|
||||
int season_param = day_param / OPTIONS[OPT_SEASON_LENGTH];
|
||||
second = 6 * (rhs % 10);
|
||||
minute = minute_param % 60;
|
||||
hour = hour_param % 24;
|
||||
day = day_param % (int)OPTIONS[OPT_SEASON_LENGTH];
|
||||
season = season_type(season_param % 4);
|
||||
year = season_param / 4;
|
||||
return *this;
|
||||
}
|
||||
|
||||
calendar& calendar::operator -=(calendar &rhs)
|
||||
{
|
||||
calendar tmp(rhs);
|
||||
tmp.standardize();
|
||||
second -= tmp.second;
|
||||
minute -= tmp.minute;
|
||||
hour -= tmp.hour;
|
||||
day -= tmp.day;
|
||||
int tmpseason = int(season) - int(tmp.season);
|
||||
while (tmpseason < 0) {
|
||||
year--;
|
||||
tmpseason += 4;
|
||||
}
|
||||
season = season_type(tmpseason);
|
||||
year -= tmp.year;
|
||||
standardize();
|
||||
return *this;
|
||||
}
|
||||
|
||||
calendar& calendar::operator -=(int rhs)
|
||||
{
|
||||
calendar tmp(rhs);
|
||||
*this -= tmp;
|
||||
return *this;
|
||||
}
|
||||
|
||||
calendar& calendar::operator +=(calendar &rhs)
|
||||
{
|
||||
second += rhs.second;
|
||||
minute += rhs.minute;
|
||||
hour += rhs.hour;
|
||||
day += rhs.day;
|
||||
int tmpseason = int(season) + int(rhs.season);
|
||||
while (tmpseason >= 4) {
|
||||
year++;
|
||||
tmpseason -= 4;
|
||||
}
|
||||
season = season_type(tmpseason);
|
||||
year += rhs.year;
|
||||
standardize();
|
||||
return *this;
|
||||
}
|
||||
|
||||
calendar& calendar::operator +=(int rhs)
|
||||
{
|
||||
second += rhs * 6;
|
||||
standardize();
|
||||
return *this;
|
||||
}
|
||||
|
||||
bool calendar::operator ==(int rhs) const
|
||||
{
|
||||
return int(*this) == rhs;
|
||||
}
|
||||
bool calendar::operator ==(calendar &rhs) const
|
||||
{
|
||||
return (second == rhs.second &&
|
||||
minute == rhs.minute &&
|
||||
hour == rhs.hour &&
|
||||
day == rhs.day &&
|
||||
season == rhs.season &&
|
||||
year == rhs.year);
|
||||
}
|
||||
|
||||
/*
|
||||
calendar& calendar::operator ++()
|
||||
{
|
||||
*this += 1;
|
||||
return *this;
|
||||
}
|
||||
*/
|
||||
|
||||
calendar calendar::operator -(calendar &rhs)
|
||||
{
|
||||
return calendar(*this) -= rhs;
|
||||
}
|
||||
|
||||
calendar calendar::operator -(int rhs)
|
||||
{
|
||||
return calendar(*this) -= rhs;
|
||||
}
|
||||
|
||||
calendar calendar::operator +(calendar &rhs)
|
||||
{
|
||||
return calendar(*this) += rhs;
|
||||
}
|
||||
|
||||
calendar calendar::operator +(int rhs)
|
||||
{
|
||||
return calendar(*this) += rhs;
|
||||
}
|
||||
|
||||
void calendar::increment()
|
||||
{
|
||||
second += 6;
|
||||
if (second >= 60)
|
||||
standardize();
|
||||
}
|
||||
|
||||
int calendar::getHour()
|
||||
{
|
||||
return hour;
|
||||
}
|
||||
|
||||
void calendar::standardize()
|
||||
{
|
||||
if (second >= 60) {
|
||||
minute += second / 60;
|
||||
second %= 60;
|
||||
}
|
||||
if (minute >= 60) {
|
||||
hour += minute / 60;
|
||||
minute %= 60;
|
||||
}
|
||||
if (hour >= 24) {
|
||||
day += hour / 24;
|
||||
hour %= 24;
|
||||
}
|
||||
int tmpseason = int(season);
|
||||
if (day >= OPTIONS[OPT_SEASON_LENGTH]) {
|
||||
tmpseason += day / OPTIONS[OPT_SEASON_LENGTH];
|
||||
day %= (int)OPTIONS[OPT_SEASON_LENGTH];
|
||||
}
|
||||
if (tmpseason >= 4) {
|
||||
year += tmpseason / 4;
|
||||
tmpseason %= 4;
|
||||
}
|
||||
season = season_type(tmpseason);
|
||||
}
|
||||
|
||||
int calendar::minutes_past_midnight() const
|
||||
{
|
||||
//debugmsg("minute: %d hour: %d");
|
||||
int ret = minute + hour * 60;
|
||||
return ret;
|
||||
}
|
||||
|
||||
moon_phase calendar::moon() const
|
||||
{
|
||||
int phase = day / (OPTIONS[OPT_SEASON_LENGTH] / 4);
|
||||
//phase %= 4; Redundant?
|
||||
if (phase == 3)
|
||||
return MOON_HALF;
|
||||
else
|
||||
return moon_phase(phase);
|
||||
}
|
||||
|
||||
calendar calendar::sunrise() const
|
||||
{
|
||||
calendar ret;
|
||||
int start_hour = 0, end_hour = 0;
|
||||
switch (season) {
|
||||
case SPRING:
|
||||
start_hour = SUNRISE_SOLSTICE;
|
||||
end_hour = SUNRISE_SUMMER;
|
||||
break;
|
||||
case SUMMER:
|
||||
start_hour = SUNRISE_SUMMER;
|
||||
end_hour = SUNRISE_SOLSTICE;
|
||||
break;
|
||||
case AUTUMN:
|
||||
start_hour = SUNRISE_SOLSTICE;
|
||||
end_hour = SUNRISE_WINTER;
|
||||
break;
|
||||
case WINTER:
|
||||
start_hour = SUNRISE_WINTER;
|
||||
end_hour = SUNRISE_SOLSTICE;
|
||||
break;
|
||||
}
|
||||
double percent = double(double(day) / OPTIONS[OPT_SEASON_LENGTH]);
|
||||
double time = double(start_hour) * (1.- percent) + double(end_hour) * percent;
|
||||
|
||||
ret.hour = int(time);
|
||||
time -= int(time);
|
||||
ret.minute = int(time * 60);
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
calendar calendar::sunset() const
|
||||
{
|
||||
calendar ret;
|
||||
int start_hour = 0, end_hour = 0;
|
||||
switch (season) {
|
||||
case SPRING:
|
||||
start_hour = SUNSET_SOLSTICE;
|
||||
end_hour = SUNSET_SUMMER;
|
||||
break;
|
||||
case SUMMER:
|
||||
start_hour = SUNSET_SUMMER;
|
||||
end_hour = SUNSET_SOLSTICE;
|
||||
break;
|
||||
case AUTUMN:
|
||||
start_hour = SUNSET_SOLSTICE;
|
||||
end_hour = SUNSET_WINTER;
|
||||
break;
|
||||
case WINTER:
|
||||
start_hour = SUNSET_WINTER;
|
||||
end_hour = SUNSET_SOLSTICE;
|
||||
break;
|
||||
}
|
||||
double percent = double(double(day) / OPTIONS[OPT_SEASON_LENGTH]);
|
||||
double time = double(start_hour) * (1.- percent) + double(end_hour) * percent;
|
||||
|
||||
ret.hour = int(time);
|
||||
time -= int(time);
|
||||
ret.minute = int(time * 60);
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
bool calendar::is_night() const
|
||||
{
|
||||
calendar sunrise_time = sunrise(), sunset_time = sunset();
|
||||
|
||||
int mins = minutes_past_midnight(),
|
||||
sunrise_mins = sunrise_time.minutes_past_midnight(),
|
||||
sunset_mins = sunset_time.minutes_past_midnight();
|
||||
|
||||
return (mins > sunset_mins + TWILIGHT_MINUTES || mins < sunrise_mins);
|
||||
}
|
||||
|
||||
int calendar::sunlight() const
|
||||
{
|
||||
calendar sunrise_time = sunrise(), sunset_time = sunset();
|
||||
|
||||
int mins = 0, sunrise_mins = 0, sunset_mins = 0;
|
||||
mins = minutes_past_midnight();
|
||||
sunrise_mins = sunrise_time.minutes_past_midnight();
|
||||
sunset_mins = sunset_time.minutes_past_midnight();
|
||||
|
||||
int moonlight = 1 + int(moon()) * MOONLIGHT_LEVEL;
|
||||
|
||||
if (mins > sunset_mins + TWILIGHT_MINUTES || mins < sunrise_mins) // Night
|
||||
return moonlight;
|
||||
|
||||
else if (mins >= sunrise_mins && mins <= sunrise_mins + TWILIGHT_MINUTES) {
|
||||
|
||||
double percent = double(mins - sunrise_mins) / TWILIGHT_MINUTES;
|
||||
return int( double(moonlight) * (1. - percent) +
|
||||
double(DAYLIGHT_LEVEL) * percent );
|
||||
|
||||
} else if (mins >= sunset_mins && mins <= sunset_mins + TWILIGHT_MINUTES) {
|
||||
|
||||
double percent = double(mins - sunset_mins) / TWILIGHT_MINUTES;
|
||||
return int( double(DAYLIGHT_LEVEL) * (1. - percent) +
|
||||
double(moonlight) * percent );
|
||||
|
||||
} else
|
||||
return DAYLIGHT_LEVEL;
|
||||
}
|
||||
|
||||
|
||||
|
||||
std::string calendar::print_time(bool just_hour) const
|
||||
{
|
||||
std::stringstream time_string;
|
||||
|
||||
if (OPTIONS[OPT_24_HOUR] == 1)
|
||||
{
|
||||
int hour_param = hour % 24;
|
||||
if (hour_param < 10)
|
||||
{
|
||||
time_string << "0";
|
||||
}
|
||||
time_string << hour_param;
|
||||
}
|
||||
else if (OPTIONS[OPT_24_HOUR] == 2)
|
||||
{
|
||||
int hour_param = hour % 24;
|
||||
time_string << hour_param;
|
||||
if (!just_hour) time_string << ":";
|
||||
}
|
||||
else
|
||||
{
|
||||
int hour_param = hour % 12;
|
||||
if (hour_param == 0)
|
||||
{
|
||||
hour_param = 12;
|
||||
}
|
||||
time_string << hour_param;
|
||||
if (!just_hour) time_string << ":";
|
||||
}
|
||||
if(!just_hour)
|
||||
{
|
||||
if (minute < 10)
|
||||
{
|
||||
time_string << "0";
|
||||
}
|
||||
time_string << minute;
|
||||
}
|
||||
if (OPTIONS[OPT_24_HOUR] == 0)
|
||||
{
|
||||
if (hour < 12)
|
||||
{
|
||||
time_string << " AM";
|
||||
}
|
||||
else
|
||||
{
|
||||
time_string << " PM";
|
||||
}
|
||||
}
|
||||
|
||||
return time_string.str();
|
||||
}
|
||||
|
||||
std::string calendar::textify_period()
|
||||
{
|
||||
standardize();
|
||||
std::stringstream ret;
|
||||
int am;
|
||||
std::string tx;
|
||||
// Describe the biggest time period, as "<am> <tx>s", am = amount, tx = name
|
||||
if (year > 0) {
|
||||
am = year;
|
||||
tx = "year";
|
||||
} else if (season > 0) {
|
||||
am = season;
|
||||
tx = "season";
|
||||
} else if (day > 0) {
|
||||
am = day;
|
||||
tx = "day";
|
||||
} else if (hour > 0) {
|
||||
am = hour;
|
||||
tx = "hour";
|
||||
} else if (minute >= 5) {
|
||||
am = minute;
|
||||
tx = "minute";
|
||||
} else {
|
||||
am = second / 6 + minute * 10;
|
||||
tx = "turn";
|
||||
}
|
||||
|
||||
ret << am << " " << tx << (am > 1 ? "s" : "");
|
||||
|
||||
return ret.str();
|
||||
}
|
||||
|
||||
std::string calendar::day_of_week() const
|
||||
{
|
||||
// Design rationale
|
||||
// <kevingranade> here's a question
|
||||
// <kevingranade> what day of the week is day 0?
|
||||
// <wito> Sunday
|
||||
// <GlyphGryph> Why does it matter?
|
||||
// <GlyphGryph> For like where people are and stuff?
|
||||
// <wito> 7 is also Sunday
|
||||
// <kevingranade> NOAA weather forecasts include day of week
|
||||
// <GlyphGryph> Also by day0 do you mean the day people start day 0
|
||||
// <GlyphGryph> Or actual day 0
|
||||
// <kevingranade> good point, turn 0
|
||||
// <GlyphGryph> So day 5
|
||||
// <wito> Oh, I thought we were talking about week day numbering in general.
|
||||
// <wito> Day 5 is a thursday, I think.
|
||||
// <wito> Nah, Day 5 feels like a thursday. :P
|
||||
// <wito> Which would put the apocalpyse on a saturday?
|
||||
// <Starfyre> must be a thursday. I was never able to get the hang of those.
|
||||
// <ZChris13> wito: seems about right to me
|
||||
// <wito> kevingranade: add four for thursday. ;)
|
||||
// <kevingranade> sounds like consensus to me
|
||||
// <kevingranade> Thursday it is
|
||||
|
||||
enum weekday
|
||||
{
|
||||
THURSDAY = 0,
|
||||
FRIDAY = 1,
|
||||
SATURDAY = 2,
|
||||
SUNDAY = 3,
|
||||
MONDAY = 4,
|
||||
TUESDAY = 5,
|
||||
WEDNESDAY = 6
|
||||
};
|
||||
|
||||
// calendar::day gets mangled by season transitions, so reclaculate days since start.
|
||||
int current_day = day % 7;
|
||||
|
||||
std::string day_string;
|
||||
|
||||
switch (current_day)
|
||||
{
|
||||
case SUNDAY:
|
||||
day_string = "Sunday";
|
||||
break;
|
||||
case MONDAY:
|
||||
day_string = "Monday";
|
||||
break;
|
||||
case TUESDAY:
|
||||
day_string = "Tuesday";
|
||||
break;
|
||||
case WEDNESDAY:
|
||||
day_string = "Wendsday";
|
||||
break;
|
||||
case THURSDAY:
|
||||
day_string = "Thursday";
|
||||
break;
|
||||
case FRIDAY:
|
||||
day_string = "Friday";
|
||||
break;
|
||||
case SATURDAY:
|
||||
day_string = "Saturday";
|
||||
break;
|
||||
}
|
||||
|
||||
return day_string;
|
||||
}
|
||||
-104
@@ -1,104 +0,0 @@
|
||||
#ifndef _CALENDAR_H_
|
||||
#define _CALENDAR_H_
|
||||
|
||||
#include <string>
|
||||
|
||||
// Convert minutes, hours, days to turns
|
||||
#define MINUTES(x) ((x) * 10)
|
||||
#define HOURS(x) ((x) * 600)
|
||||
#define DAYS(x) ((x) * 14400)
|
||||
|
||||
// Times for sunrise, sunset at equinoxes
|
||||
#define SUNRISE_WINTER 7
|
||||
#define SUNRISE_SOLSTICE 6
|
||||
#define SUNRISE_SUMMER 5
|
||||
|
||||
#define SUNSET_WINTER 17
|
||||
#define SUNSET_SOLSTICE 19
|
||||
#define SUNSET_SUMMER 21
|
||||
|
||||
// How long, in minutes, does sunrise/sunset last?
|
||||
#define TWILIGHT_MINUTES 60
|
||||
|
||||
// How much light moon provides--double for full moon
|
||||
#define MOONLIGHT_LEVEL 4
|
||||
// How much light is provided in full daylight
|
||||
#define DAYLIGHT_LEVEL 60
|
||||
|
||||
enum season_type {
|
||||
SPRING = 0,
|
||||
SUMMER = 1,
|
||||
AUTUMN = 2,
|
||||
WINTER = 3
|
||||
#define FALL AUTUMN
|
||||
};
|
||||
|
||||
enum moon_phase {
|
||||
MOON_NEW = 0,
|
||||
MOON_HALF,
|
||||
MOON_FULL
|
||||
};
|
||||
|
||||
class calendar
|
||||
{
|
||||
private:
|
||||
// The basic data; note that "second" should always be a multiple of 6
|
||||
int second;
|
||||
int minute;
|
||||
int hour;
|
||||
int day;
|
||||
season_type season;
|
||||
int year;
|
||||
// End data
|
||||
|
||||
public:
|
||||
calendar();
|
||||
calendar(const calendar ©);
|
||||
calendar(int Minute, int Hour, int Day, season_type Season, int Year);
|
||||
calendar(int turn);
|
||||
int get_turn() const;
|
||||
operator int() const; // Returns get_turn() for backwards compatibility
|
||||
calendar& operator = (calendar &rhs);
|
||||
calendar& operator = (int rhs);
|
||||
calendar& operator -=(calendar &rhs);
|
||||
calendar& operator -=(int rhs);
|
||||
calendar& operator +=(calendar &rhs);
|
||||
calendar& operator +=(int rhs);
|
||||
calendar operator - (calendar &rhs);
|
||||
calendar operator - (int rhs);
|
||||
calendar operator + (calendar &rhs);
|
||||
calendar operator + (int rhs);
|
||||
bool operator ==(int rhs) const;
|
||||
bool operator ==(calendar &rhs) const;
|
||||
|
||||
void increment(); // Add one turn / 6 seconds
|
||||
|
||||
void standardize(); // Ensure minutes <= 59, hour <= 23, etc.
|
||||
|
||||
int getHour(); // return hour
|
||||
|
||||
// Sunlight and day/night calcuations
|
||||
int minutes_past_midnight() const; // Useful for sunrise/set calculations
|
||||
moon_phase moon() const; // Find phase of moon
|
||||
calendar sunrise() const; // Current time of sunrise
|
||||
calendar sunset() const; // Current time of sunset
|
||||
bool is_night() const; // After sunset + TWILIGHT_MINUTES, before sunrise
|
||||
int sunlight() const; // Current amount of sun/moonlight; uses preceding funcs
|
||||
|
||||
// Basic accessors
|
||||
int seconds() const {return second;}
|
||||
int minutes() const {return minute;}
|
||||
int hours() const {return hour;}
|
||||
int days() const {return day;}
|
||||
season_type get_season() const {return season;}
|
||||
int years() const {return year;}
|
||||
|
||||
void set_season(season_type new_season) {season = new_season;}
|
||||
|
||||
|
||||
// Print-friendly stuff
|
||||
std::string print_time(bool just_hour = false) const;
|
||||
std::string textify_period(); // "1 second" "2 hours" "two days"
|
||||
std::string day_of_week() const;
|
||||
};
|
||||
#endif // _CALENDAR_H_
|
||||
-207
@@ -1,207 +0,0 @@
|
||||
#include "catacharset.h"
|
||||
#include <string.h>
|
||||
#include "wcwidth.c"
|
||||
|
||||
//copied from SDL2_ttf code
|
||||
unsigned UTF8_getch(const char **src, int *srclen)
|
||||
{
|
||||
const unsigned char *p = *(const unsigned char**)src;
|
||||
int left = 0;
|
||||
bool overlong = false;
|
||||
bool underflow = false;
|
||||
unsigned ch = UNKNOWN_UNICODE;
|
||||
|
||||
if (*srclen == 0) {
|
||||
return UNKNOWN_UNICODE;
|
||||
}
|
||||
if (p[0] >= 0xFC) {
|
||||
if ((p[0] & 0xFE) == 0xFC) {
|
||||
if (p[0] == 0xFC && (p[1] & 0xFC) == 0x80) {
|
||||
overlong = true;
|
||||
}
|
||||
ch = (unsigned) (p[0] & 0x01);
|
||||
left = 5;
|
||||
}
|
||||
} else if (p[0] >= 0xF8) {
|
||||
if ((p[0] & 0xFC) == 0xF8) {
|
||||
if (p[0] == 0xF8 && (p[1] & 0xF8) == 0x80) {
|
||||
overlong = true;
|
||||
}
|
||||
ch = (unsigned) (p[0] & 0x03);
|
||||
left = 4;
|
||||
}
|
||||
} else if (p[0] >= 0xF0) {
|
||||
if ((p[0] & 0xF8) == 0xF0) {
|
||||
if (p[0] == 0xF0 && (p[1] & 0xF0) == 0x80) {
|
||||
overlong = true;
|
||||
}
|
||||
ch = (unsigned) (p[0] & 0x07);
|
||||
left = 3;
|
||||
}
|
||||
} else if (p[0] >= 0xE0) {
|
||||
if ((p[0] & 0xF0) == 0xE0) {
|
||||
if (p[0] == 0xE0 && (p[1] & 0xE0) == 0x80) {
|
||||
overlong = true;
|
||||
}
|
||||
ch = (unsigned) (p[0] & 0x0F);
|
||||
left = 2;
|
||||
}
|
||||
} else if (p[0] >= 0xC0) {
|
||||
if ((p[0] & 0xE0) == 0xC0) {
|
||||
if ((p[0] & 0xDE) == 0xC0) {
|
||||
overlong = true;
|
||||
}
|
||||
ch = (unsigned) (p[0] & 0x1F);
|
||||
left = 1;
|
||||
}
|
||||
} else {
|
||||
if ((p[0] & 0x80) == 0x00) {
|
||||
ch = (unsigned) p[0];
|
||||
}
|
||||
}
|
||||
++*src;
|
||||
--*srclen;
|
||||
while (left > 0 && *srclen > 0) {
|
||||
++p;
|
||||
if ((p[0] & 0xC0) != 0x80) {
|
||||
ch = UNKNOWN_UNICODE;
|
||||
break;
|
||||
}
|
||||
ch <<= 6;
|
||||
ch |= (p[0] & 0x3F);
|
||||
++*src;
|
||||
--*srclen;
|
||||
--left;
|
||||
}
|
||||
if (left > 0) {
|
||||
underflow = true;
|
||||
}
|
||||
if (overlong || underflow ||
|
||||
(ch >= 0xD800 && ch <= 0xDFFF) ||
|
||||
(ch == 0xFFFE || ch == 0xFFFF) || ch > 0x10FFFF) {
|
||||
ch = UNKNOWN_UNICODE;
|
||||
}
|
||||
return ch;
|
||||
}
|
||||
|
||||
//Calculate width of a unicode string
|
||||
//Latin characters have a width of 1
|
||||
//CJK characters have a width of 2, etc
|
||||
int utf8_width(const char* s)
|
||||
{
|
||||
int len = strlen(s);
|
||||
const char* ptr = s;
|
||||
int w = 0;
|
||||
while(len>0)
|
||||
{
|
||||
unsigned ch = UTF8_getch(&ptr, &len);
|
||||
if(ch!=UNKNOWN_UNICODE) {
|
||||
w += mk_wcwidth((wchar_t)ch);
|
||||
} else {
|
||||
continue;
|
||||
}
|
||||
}
|
||||
return w;
|
||||
}
|
||||
|
||||
//Convert cursor position to byte offset
|
||||
//returns the first character position in bytes behind the cursor position.
|
||||
//If the cursor is not on the first half of the character,
|
||||
//prevpos (which points to the first byte of the cursor located char)
|
||||
// should be a different value.
|
||||
int cursorx_to_position(const char* line, int cursorx, int* prevpos)
|
||||
{
|
||||
int dummy;
|
||||
int i=0, c=0, *p=prevpos?prevpos:&dummy;
|
||||
*p = 0;
|
||||
while(c<cursorx)
|
||||
{
|
||||
const char* utf8str = line+i;
|
||||
int len = ANY_LENGTH;
|
||||
unsigned ch = UTF8_getch(&utf8str, &len);
|
||||
int cw = mk_wcwidth((wchar_t)ch);
|
||||
len = ANY_LENGTH-len;
|
||||
if(len<=0) len=1;
|
||||
i+=len;
|
||||
if(cw<=0) cw=1;
|
||||
c+=cw;
|
||||
if(c<=cursorx) *p = i;
|
||||
}
|
||||
return i;
|
||||
}
|
||||
|
||||
//Erase character by unicode char width.
|
||||
//Fill the characters with spaces.
|
||||
//returns length modified
|
||||
int erease_utf8_by_cw( char* t, int cw, int clen, int maxlen)
|
||||
{
|
||||
static char buf[8000]; //LOL
|
||||
int c=0,i=0;
|
||||
while(c<cw)
|
||||
{
|
||||
const char* utf8str = t+i;
|
||||
int len = ANY_LENGTH;
|
||||
unsigned ch = UTF8_getch(&utf8str, &len);
|
||||
int cw = mk_wcwidth((wchar_t)ch);
|
||||
len = ANY_LENGTH-len;
|
||||
if(len<=0) len=1;
|
||||
i+=len;
|
||||
if(cw<=0) cw=1;
|
||||
c+=cw;
|
||||
}
|
||||
if(cw==c && clen==i)
|
||||
{
|
||||
memset(t, ' ', clen);
|
||||
return 0;
|
||||
}
|
||||
else
|
||||
{
|
||||
int filled = clen+c-cw;
|
||||
memcpy(buf, t+i, maxlen-i);
|
||||
memset(t, ' ', filled);
|
||||
memcpy(t+filled, buf, maxlen-filled);
|
||||
return filled-i;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
//cut ut8 string by character size
|
||||
//utf8_substr("正正正正", 1, 4) returns
|
||||
// " 正 "
|
||||
// Broken characters will be filled with space
|
||||
std::string utf8_substr(std::string s, int start, int size)
|
||||
{
|
||||
static char buf[8000];
|
||||
int len = strlen(s.c_str());
|
||||
int pos;
|
||||
strcpy(buf, s.c_str());
|
||||
int begin = cursorx_to_position(buf, start, &pos);
|
||||
if(begin!=pos)
|
||||
{
|
||||
const char* ts = buf+pos;
|
||||
int l = ANY_LENGTH;
|
||||
unsigned tc = UTF8_getch(&ts, &l);
|
||||
int tw = mk_wcwidth((wchar_t)tc);
|
||||
erease_utf8_by_cw(buf+pos, tw, tw, len-pos-1);
|
||||
begin = pos+tw-1;
|
||||
}
|
||||
|
||||
if(size>0)
|
||||
{
|
||||
int end = cursorx_to_position(buf, start+size-1, &pos);
|
||||
if(end!=pos)
|
||||
{
|
||||
const char* ts = buf+pos;
|
||||
int l = ANY_LENGTH;
|
||||
unsigned tc = UTF8_getch(&ts, &l);
|
||||
int tw = mk_wcwidth((wchar_t)tc);
|
||||
erease_utf8_by_cw(buf+pos, tw, tw, len-pos-1);
|
||||
end = pos+tw-1;
|
||||
}
|
||||
buf[end+1] = '\0';
|
||||
}
|
||||
|
||||
return std::string(buf+start);
|
||||
}
|
||||
|
||||
|
||||
@@ -1,18 +0,0 @@
|
||||
#ifndef CATACHARSET_H
|
||||
#define CATACHARSET_H
|
||||
#include <wchar.h>
|
||||
#include <string>
|
||||
#define ANY_LENGTH 5
|
||||
#define UNKNOWN_UNICODE 0xFFFD
|
||||
|
||||
// get a unicode character from a utf8 string
|
||||
unsigned UTF8_getch(const char **src, int *srclen);
|
||||
// from wcwidth.c, return "cell" width of a unicode char
|
||||
int mk_wcwidth(wchar_t ucs);
|
||||
// convert cursorx value to byte position
|
||||
int cursorx_to_position(const char* line, int cursorx, int* prevppos=NULL);
|
||||
//erease for characters insertion
|
||||
int erease_utf8_by_cw( char* t, int cw, int len, int maxlen);
|
||||
int utf8_width(const char* s);
|
||||
std::string utf8_substr(std::string s, int start, int size=-1);
|
||||
#endif
|
||||
@@ -1,3 +0,0 @@
|
||||
#!/bin/sh
|
||||
DIR=`dirname "$0"`
|
||||
cd $DIR && ./cataclysm
|
||||
-170
@@ -1,170 +0,0 @@
|
||||
#ifndef __CATACURSE__
|
||||
#define __CATACURSE__
|
||||
#if (defined _WIN32 || defined WINDOWS)
|
||||
#define _WIN32_WINNT 0x0500
|
||||
#define WIN32_LEAN_AND_MEAN
|
||||
//#define VC_EXTRALEAN
|
||||
#include "windows.h"
|
||||
#endif
|
||||
#include <stdio.h>
|
||||
typedef int chtype;
|
||||
typedef unsigned short attr_t;
|
||||
typedef unsigned int u_int32_t;
|
||||
|
||||
#define __CHARTEXT 0x000000ff /* bits for 8-bit characters */ //<---------not used
|
||||
#define __NORMAL 0x00000000 /* Added characters are normal. */ //<---------not used
|
||||
#define __STANDOUT 0x00000100 /* Added characters are standout. */ //<---------not used
|
||||
#define __UNDERSCORE 0x00000200 /* Added characters are underscored. */ //<---------not used
|
||||
#define __REVERSE 0x00000400 /* Added characters are reverse //<---------not used
|
||||
video. */
|
||||
#define __BLINK 0x00000800 /* Added characters are blinking. */
|
||||
#define __DIM 0x00001000 /* Added characters are dim. */ //<---------not used
|
||||
#define __BOLD 0x00002000 /* Added characters are bold. */
|
||||
#define __BLANK 0x00004000 /* Added characters are blanked. */ //<---------not used
|
||||
#define __PROTECT 0x00008000 /* Added characters are protected. */ //<---------not used
|
||||
#define __ALTCHARSET 0x00010000 /* Added characters are ACS */ //<---------not used
|
||||
#define __COLOR 0x03fe0000 /* Color bits */
|
||||
#define __ATTRIBUTES 0x03ffff00 /* All 8-bit attribute bits */ //<---------not used
|
||||
|
||||
//a pair of colors[] indexes, foreground and background
|
||||
typedef struct
|
||||
{
|
||||
int FG;//foreground index in colors[]
|
||||
int BG;//foreground index in colors[]
|
||||
} pairs;
|
||||
|
||||
//The curse character struct, just a char, attribute, and color pair
|
||||
//typedef struct
|
||||
//{
|
||||
// char character;//the ascii actual character
|
||||
// int attrib;//attributes, mostly for A_BLINK and A_BOLD
|
||||
// pairs color;//pair of foreground/background, indexed into colors[]
|
||||
//} cursechar;
|
||||
|
||||
//Individual lines, so that we can track changed lines
|
||||
typedef struct{
|
||||
bool touched;
|
||||
char *chars;
|
||||
int width_in_bytes;
|
||||
char *FG;
|
||||
char *BG;
|
||||
//cursechar chars [80];
|
||||
} curseline;
|
||||
//The curses window struct
|
||||
typedef struct {
|
||||
int x;//left side of window
|
||||
int y;//top side of window
|
||||
int width;//width of the curses window
|
||||
int height;//height of the curses window
|
||||
int FG;//current foreground color from attron
|
||||
int BG;//current background color from attron
|
||||
bool inuse;// Does this window actually exist?
|
||||
bool draw;//Tracks if the window text has been changed
|
||||
int cursorx;//x location of the cursor
|
||||
int cursory;//y location of the cursor
|
||||
curseline *line;
|
||||
|
||||
} WINDOW;
|
||||
|
||||
#define A_NORMAL __NORMAL
|
||||
#define A_STANDOUT __STANDOUT
|
||||
#define A_UNDERLINE __UNDERSCORE
|
||||
#define A_REVERSE __REVERSE
|
||||
#define A_BLINK __BLINK
|
||||
#define A_DIM __DIM
|
||||
#define A_BOLD __BOLD
|
||||
#define A_BLANK __BLANK
|
||||
#define A_PROTECT __PROTECT
|
||||
#define A_ALTCHARSET __ALTCHARSET
|
||||
#define A_ATTRIBUTES __ATTRIBUTES
|
||||
#define A_CHARTEXT __CHARTEXT
|
||||
#define A_COLOR __COLOR
|
||||
|
||||
#define COLOR_BLACK 0x00 //RGB{0,0,0}
|
||||
#define COLOR_RED 0x01 //RGB{196, 0, 0}
|
||||
#define COLOR_GREEN 0x02 //RGB{0,196,0}
|
||||
#define COLOR_YELLOW 0x03 //RGB{196,180,30}
|
||||
#define COLOR_BLUE 0x04 //RGB{0, 0, 196}
|
||||
#define COLOR_MAGENTA 0x05 //RGB{196, 0, 180}
|
||||
#define COLOR_CYAN 0x06 //RGB{0, 170, 200}
|
||||
#define COLOR_WHITE 0x07 //RGB{196, 196, 196}
|
||||
|
||||
#define COLOR_PAIR(n) ((((u_int32_t)n) << 17) & A_COLOR)
|
||||
//#define PAIR_NUMBER(n) ((((u_int32_t)n) & A_COLOR) >> 17)
|
||||
|
||||
#define KEY_MIN 0x101 /* minimum extended key value */ //<---------not used
|
||||
#define KEY_BREAK 0x101 /* break key */ //<---------not used
|
||||
#define KEY_DOWN 0x102 /* down arrow */
|
||||
#define KEY_UP 0x103 /* up arrow */
|
||||
#define KEY_LEFT 0x104 /* left arrow */
|
||||
#define KEY_RIGHT 0x105 /* right arrow*/
|
||||
#define KEY_HOME 0x106 /* home key */ //<---------not used
|
||||
#define KEY_BACKSPACE 0x107 /* Backspace */ //<---------not used
|
||||
#define KEY_NPAGE 0x152 /* page down */
|
||||
#define KEY_PPAGE 0x153 /* page up */
|
||||
#define KEY_ENTER 0x157 /* enter */
|
||||
|
||||
/* Curses external declarations. */
|
||||
|
||||
#define stdscr 0
|
||||
//WINDOW *stdscr; //Define this for portability, strscr will basically be window[0] anyways
|
||||
|
||||
#define getmaxyx(w, y, x) (y = getmaxy(w), x = getmaxx(w))
|
||||
|
||||
//Curses Functions
|
||||
#define ERR (-1) /* Error return. */
|
||||
#define OK (0) /* Success return. */
|
||||
WINDOW *newwin(int nlines, int ncols, int begin_y, int begin_x);
|
||||
int delwin(WINDOW *win);
|
||||
int wborder(WINDOW *win, chtype ls, chtype rs, chtype ts, chtype bs, chtype tl, chtype tr, chtype bl, chtype br);
|
||||
int wrefresh(WINDOW *win);
|
||||
int refresh(void);
|
||||
int getch(void);
|
||||
int wgetch(WINDOW* win);
|
||||
int mvgetch(int y, int x);
|
||||
int mvwgetch(WINDOW* win, int y, int x);
|
||||
int mvwprintw(WINDOW *win, int y, int x, const char *fmt, ...);
|
||||
int mvprintw(int y, int x, const char *fmt, ...);
|
||||
int werase(WINDOW *win);
|
||||
int start_color(void);
|
||||
int init_pair(short pair, short f, short b);
|
||||
int wmove(WINDOW *win, int y, int x);
|
||||
int getnstr(char *str, int size);
|
||||
int clear(void);
|
||||
int clearok(WINDOW *win);
|
||||
int erase(void);
|
||||
int endwin(void);
|
||||
int mvwaddch(WINDOW *win, int y, int x, const chtype ch);
|
||||
int wclear(WINDOW *win);
|
||||
int wprintw(WINDOW *win, const char *fmt, ...);
|
||||
WINDOW *initscr(void);
|
||||
int cbreak(void);//PORTABILITY, DUMMY FUNCTION
|
||||
int keypad(WINDOW *faux, bool bf);//PORTABILITY, DUMMY FUNCTION
|
||||
int curs_set(int visibility);//PORTABILITY, DUMMY FUNCTION
|
||||
int mvaddch(int y, int x, const chtype ch);
|
||||
int wattron(WINDOW *win, int attrs);
|
||||
int wattroff(WINDOW *win, int attrs);
|
||||
int attron(int attrs);
|
||||
int attroff(int attrs);
|
||||
int waddch(WINDOW *win, const chtype ch);
|
||||
int printw(const char *fmt,...);
|
||||
int getmaxx(WINDOW *win);
|
||||
int getmaxy(WINDOW *win);
|
||||
int getbegx(WINDOW *win);
|
||||
int getbegy(WINDOW *win);
|
||||
int move(int y, int x);
|
||||
void timeout(int delay);//PORTABILITY, DUMMY FUNCTION
|
||||
void set_escdelay(int delay);//PORTABILITY, DUMMY FUNCTION
|
||||
int echo(void);
|
||||
int noecho(void);
|
||||
//non-curses functions, Do not call these in the main game code
|
||||
extern WINDOW* mainwin;
|
||||
extern pairs *colorpairs;
|
||||
WINDOW* curses_init();
|
||||
int curses_destroy();
|
||||
void curses_drawwindow(WINDOW* win);
|
||||
void curses_delay(int delay);
|
||||
void curses_timeout(int t);
|
||||
int curses_getch(WINDOW* win);
|
||||
int curses_start_color();
|
||||
#endif
|
||||
-316
@@ -1,316 +0,0 @@
|
||||
#include "catajson.h"
|
||||
#include "output.h"
|
||||
#include <string>
|
||||
#include <iostream>
|
||||
#include <fstream>
|
||||
#include <sstream>
|
||||
|
||||
catajson::catajson()
|
||||
{
|
||||
path_msg = "";
|
||||
}
|
||||
|
||||
catajson::catajson(std::string path)
|
||||
{
|
||||
std::ifstream file;
|
||||
file.open(path.c_str());
|
||||
file >> val;
|
||||
file.close();
|
||||
|
||||
path_msg = path;
|
||||
|
||||
std::string err = picojson::get_last_error();
|
||||
if (! err.empty()) {
|
||||
debugmsg("Parse error in %s.\n\nERROR: %s\n", path.c_str(), err.c_str());
|
||||
}
|
||||
}
|
||||
|
||||
catajson::catajson(picojson::value val_in, std::string path_msg_in)
|
||||
{
|
||||
val = val_in;
|
||||
path_msg = path_msg_in;
|
||||
}
|
||||
|
||||
char catajson::as_char() const
|
||||
{
|
||||
std::string temp = as_string();
|
||||
if (temp.size() != 1)
|
||||
{
|
||||
debugmsg("JSON warning at %s: value requested as char, string length is not 1", path_msg.c_str());
|
||||
}
|
||||
return temp[0];
|
||||
}
|
||||
|
||||
std::string catajson::as_string() const
|
||||
{
|
||||
if (val.is<std::string>())
|
||||
{
|
||||
return val.get<std::string>();
|
||||
}
|
||||
else
|
||||
{
|
||||
debugmsg("JSON error at %s: value is not a string", path_msg.c_str());
|
||||
}
|
||||
return "";
|
||||
}
|
||||
|
||||
int catajson::as_int() const
|
||||
{
|
||||
double temp = as_double();
|
||||
int ret = static_cast<int>(temp);
|
||||
if (ret != temp)
|
||||
{
|
||||
debugmsg("JSON warning at %s: value was requested as int, provided as double", path_msg.c_str());
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
|
||||
bool catajson::as_bool() const
|
||||
{
|
||||
if (val.is<bool>())
|
||||
{
|
||||
return val.get<bool>();
|
||||
}
|
||||
else
|
||||
{
|
||||
debugmsg("JSON error at %s: value is not a boolean", path_msg.c_str());
|
||||
}
|
||||
return val.evaluate_as_boolean();
|
||||
}
|
||||
|
||||
double catajson::as_double() const
|
||||
{
|
||||
if (val.is<double>())
|
||||
{
|
||||
return val.get<double>();
|
||||
}
|
||||
else
|
||||
{
|
||||
debugmsg("JSON error at %s: value is not numeric", path_msg.c_str());
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
std::set<std::string> catajson::as_tags()
|
||||
{
|
||||
std::set<std::string> tags;
|
||||
if (is_array())
|
||||
{
|
||||
for (set_begin(); has_curr(); next())
|
||||
{
|
||||
tags.insert( curr().as_string() );
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
// We should have gotten a string, if not an array.
|
||||
tags.insert( as_string() );
|
||||
}
|
||||
return tags;
|
||||
}
|
||||
|
||||
catajson catajson::get(std::string key) const
|
||||
{
|
||||
if (val.is<picojson::object>())
|
||||
{
|
||||
if (has(key))
|
||||
{
|
||||
return catajson(val.get(key), path_msg + "[" + key + "]");
|
||||
}
|
||||
else
|
||||
{
|
||||
debugmsg("JSON error at %s[%s]: value does not exist", path_msg.c_str(), key.c_str());
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
debugmsg("JSON error at %s: value is not an object", path_msg.c_str());
|
||||
}
|
||||
return catajson();
|
||||
}
|
||||
|
||||
catajson catajson::get(int index) const
|
||||
{
|
||||
if (val.is<picojson::array>())
|
||||
{
|
||||
if (has(index))
|
||||
{
|
||||
std::stringstream text;
|
||||
text << path_msg << "[" << index << "]";
|
||||
return catajson(val.get(index), text.str());
|
||||
}
|
||||
else
|
||||
{
|
||||
debugmsg("JSON error at %s[%d]: value does not exist", path_msg.c_str(), index);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
debugmsg("JSON error at %s: value is not an array", path_msg.c_str());
|
||||
}
|
||||
return catajson();
|
||||
}
|
||||
|
||||
bool catajson::has(std::string key) const
|
||||
{
|
||||
if (val.is<picojson::object>())
|
||||
{
|
||||
return val.contains(key);
|
||||
}
|
||||
else
|
||||
{
|
||||
debugmsg("JSON error at %s: value is not an object", path_msg.c_str());
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
bool catajson::has(int index) const
|
||||
{
|
||||
if (val.is<picojson::array>())
|
||||
{
|
||||
return val.contains(index);
|
||||
}
|
||||
else
|
||||
{
|
||||
debugmsg("JSON error at %s: value is not an array", path_msg.c_str());
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
bool catajson::is_char() const
|
||||
{
|
||||
return is_string() && as_string().size() == 1;
|
||||
}
|
||||
|
||||
bool catajson::is_string() const
|
||||
{
|
||||
return val.is<std::string>();
|
||||
}
|
||||
|
||||
bool catajson::is_number() const
|
||||
{
|
||||
return val.is<double>();
|
||||
}
|
||||
|
||||
bool catajson::is_bool() const
|
||||
{
|
||||
return val.is<bool>();
|
||||
}
|
||||
|
||||
bool catajson::is_object() const
|
||||
{
|
||||
return val.is<picojson::object>();
|
||||
}
|
||||
|
||||
bool catajson::is_array() const
|
||||
{
|
||||
return val.is<picojson::array>();
|
||||
}
|
||||
|
||||
void catajson::set_begin()
|
||||
{
|
||||
if (val.is<picojson::array>())
|
||||
{
|
||||
ar_iter = val.get<picojson::array>().begin();
|
||||
}
|
||||
else if (val.is<picojson::object>())
|
||||
{
|
||||
obj_iter = val.get<picojson::object>().begin();
|
||||
}
|
||||
else
|
||||
{
|
||||
debugmsg("JSON error at %s: cannot call set_begin(), value is not an array or object", path_msg.c_str());
|
||||
}
|
||||
}
|
||||
|
||||
void catajson::set_end()
|
||||
{
|
||||
if (val.is<picojson::array>())
|
||||
{
|
||||
ar_iter = val.get<picojson::array>().end();
|
||||
}
|
||||
else if (val.is<picojson::object>())
|
||||
{
|
||||
obj_iter = val.get<picojson::object>().end();
|
||||
}
|
||||
else
|
||||
{
|
||||
debugmsg("JSON error at %s: cannot call set_end(), value is not an array or object", path_msg.c_str());
|
||||
}
|
||||
}
|
||||
|
||||
void catajson::next()
|
||||
{
|
||||
if (val.is<picojson::array>())
|
||||
{
|
||||
++ar_iter;
|
||||
}
|
||||
else if (val.is<picojson::object>())
|
||||
{
|
||||
++obj_iter;
|
||||
}
|
||||
else
|
||||
{
|
||||
debugmsg("JSON error at %s: tried to iterate an invalid value", path_msg.c_str());
|
||||
}
|
||||
}
|
||||
|
||||
void catajson::prev()
|
||||
{
|
||||
if (val.is<picojson::array>())
|
||||
{
|
||||
--ar_iter;
|
||||
}
|
||||
else if (val.is<picojson::object>())
|
||||
{
|
||||
--obj_iter;
|
||||
}
|
||||
else
|
||||
{
|
||||
debugmsg("JSON error at %s: tried to iterate an invalid value", path_msg.c_str());
|
||||
}
|
||||
}
|
||||
|
||||
bool catajson::has_curr() const
|
||||
{
|
||||
if (val.is<picojson::array>())
|
||||
{
|
||||
if (ar_iter >= val.get<picojson::array>().begin() && ar_iter < val.get<picojson::array>().end())
|
||||
{
|
||||
return true;
|
||||
}
|
||||
}
|
||||
else if (val.is<picojson::object>())
|
||||
{
|
||||
return has(obj_iter->first);
|
||||
}
|
||||
else
|
||||
{
|
||||
debugmsg("JSON error at %s: not an array or object", path_msg.c_str());
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
catajson catajson::curr() const
|
||||
{
|
||||
if (val.is<picojson::array>())
|
||||
{
|
||||
const int count = val.get<picojson::array>().size();
|
||||
for (int i = 0; i < count; ++i)
|
||||
{
|
||||
if (val.get(i) == *ar_iter)
|
||||
{
|
||||
return get(i);
|
||||
}
|
||||
}
|
||||
}
|
||||
else if (val.is<picojson::object>())
|
||||
{
|
||||
return get(obj_iter->first);
|
||||
}
|
||||
else
|
||||
{
|
||||
debugmsg("JSON error at %s: not an array or object", path_msg.c_str());
|
||||
}
|
||||
return catajson();
|
||||
}
|
||||
-53
@@ -1,53 +0,0 @@
|
||||
#ifndef _CATAJSON_H_
|
||||
#define _CATAJSON_H_
|
||||
|
||||
#include "picojson.h"
|
||||
#include <set>
|
||||
|
||||
class catajson
|
||||
{
|
||||
public:
|
||||
catajson();
|
||||
catajson(std::string path);
|
||||
catajson(picojson::value val, std::string path_msg);
|
||||
|
||||
// accessors for picojson values containing simple types
|
||||
char as_char() const;
|
||||
std::string as_string() const;
|
||||
int as_int() const;
|
||||
bool as_bool() const;
|
||||
double as_double() const;
|
||||
// accessor for not-so-simple type
|
||||
std::set<std::string> as_tags();
|
||||
// accessors in the case of array or object values
|
||||
catajson get(std::string key) const;
|
||||
catajson get(int index) const;
|
||||
|
||||
//these check whether a given key/index is valid
|
||||
bool has(std::string key) const;
|
||||
bool has(int index) const;
|
||||
|
||||
bool is_char() const;
|
||||
bool is_string() const;
|
||||
bool is_number() const; // double OR int
|
||||
bool is_bool() const;
|
||||
bool is_object() const; // string-value pairs
|
||||
bool is_array() const;
|
||||
|
||||
// these are intended for use in iteration
|
||||
// STL-style iterators are acceptable too, if anyone wants to add them
|
||||
void set_begin(); // start iterating from the beginning
|
||||
void set_end(); // start iterating from the end
|
||||
void next(); // caller's responsibility to init first
|
||||
void prev(); // caller's responsibility to init first
|
||||
bool has_curr() const; // would curr() be valid?
|
||||
catajson curr() const; // get the current element
|
||||
|
||||
private:
|
||||
picojson::value val;
|
||||
picojson::array::const_iterator ar_iter;
|
||||
picojson::object::const_iterator obj_iter;
|
||||
std::string path_msg; // used for error messages
|
||||
};
|
||||
|
||||
#endif
|
||||
+11
@@ -0,0 +1,11 @@
|
||||
---
|
||||
layout: page
|
||||
title: Changes
|
||||
permalink: /changes/
|
||||
---
|
||||
{% for pull in site.github.pulls %}
|
||||
{{ pull.title }}
|
||||
------------------
|
||||
|
||||
{{ pull.body }}
|
||||
{% endfor %}
|
||||
@@ -1,113 +0,0 @@
|
||||
ADDITIONS
|
||||
|
||||
1.1 Adding an item
|
||||
1) Edit itype.h. Change the enum item_id and insert a unique identifier for
|
||||
your new item type. Be sure to put it among similar items.
|
||||
2) Edit itypedef.cpp. Macros are used for all item types, and they are pretty
|
||||
self-explanatory. Be ABSOLUTELY sure that you insert the macro at the same
|
||||
point in the list as you inserted the identifier in item_id!
|
||||
3) Your item type is now valid, but won't be spawned. If you want it to be
|
||||
spawned among similar items, edit mapitemsdef.cpp. Find the appropriate
|
||||
array(s), and insert the identifier for your item (e.g. itm_aspirin). Make
|
||||
sure it comes in before the NULL at the end of the list.
|
||||
5) Some items, like tools or food, also take an iuse::function reference.
|
||||
Edit iuse.h and include the function in the class declaration; then edit
|
||||
iuse.cpp and define your function. Functions may be shared among different
|
||||
item types.
|
||||
|
||||
1.2 Adding a monster
|
||||
1) Edit mtype.h. Change the enum mon_id and insert a unique identifier for
|
||||
your new monster type. Be sure to put it among similar monsters.
|
||||
2) Edit mtypedef.cpp. A macro is used for monsters and it is pretty
|
||||
straightforward (Any of this ring a bell?). Be ABSOLUTELY sure that you
|
||||
insert the macro at the same point in the list as your inserted the
|
||||
identifier in mon_id!
|
||||
3) Your monster type is now valid, but won't be spawned. If you want it to be
|
||||
spawned among similar monsters, edit mongroupdef.cpp. Find the appropriate
|
||||
array, and insert the identifier for your monster (e.g, mon_zombie). Make
|
||||
sure it comes in before the NULL at the end of the list.
|
||||
4) If you want your monster to drop items, edit monitemsdef.cpp. Make a new
|
||||
array for your monster type with all the map item groups it may carry, and a
|
||||
chance value for each.
|
||||
5) Your monster may have a special attack, a monattack::function reference.
|
||||
Edit monattack.h and include the function in the class definition; then
|
||||
edit monattack.cpp and define your function. Functions may be shared among
|
||||
different monster types. Be aware that the function should contain a
|
||||
statement that the monster uses to decide whether or not to use the attack,
|
||||
and if they do, should reset the monster's attack timer.
|
||||
7) Just like attacks, some monsters may have a special function called when
|
||||
they die. This works the same as attacks, but the relevent files are
|
||||
mondeath.h and mondeath.cpp.
|
||||
|
||||
1.3 Adding a recipe
|
||||
1) Edit recipes.json. Add your recipe among similar recipes. Required fields
|
||||
are "result", "category", "difficulty", "time", "autolearn", "components".
|
||||
Optional fields are "reversible" (defaults to false), "tools" (defaults to
|
||||
none), "skill_pri" (primary skill, defaults to none), "skill_sec" (defaults
|
||||
to none), "id_suffix" (disambiguates recipes with the same result, must be
|
||||
unique among the set of such recipes), "decomp_learn" (the level (if any)
|
||||
when you can learn it from disassembly), "book_learn" (a list of books that
|
||||
teach the recipe, and the level they teach it at).
|
||||
|
||||
1.4 Adding/editing armour and how armour protection is calculated
|
||||
1) Edit armor.json and add your armor item near similar types.
|
||||
2) The fields are:
|
||||
"type" : "ARMOR", // this must be ARMOR
|
||||
"id" : "socks", // the identifier used by the game. Must be one continuous word, use underscores if necessary
|
||||
"name" : "socks", // the name appearing in the examine box. Can be more than one word separated by spaces
|
||||
"weight" : 1, // weight of armour
|
||||
"color" : "blue", // ascii character colour
|
||||
"covers" : ["FEET"], // where it covers. Possible options are TORSO, HEAD, EYES, MOUTH, ARMS, HANDS, LEGS, FEET
|
||||
"to_hit" : 0, // to-hit bonus if using it as a melee weapon (whatever for?)
|
||||
"storage" : 0, // how many volume storage slots it adds
|
||||
"symbol" : "[", // ascii character
|
||||
"description" : "Socks. Put 'em on your feet.", // description of armour
|
||||
"price" : 100, // price of armour, used when bartering with NPCs
|
||||
"material" : ["COTTON", "NULL"], // material types. See materials.json for possible options
|
||||
"volume" : 1, // volume occupied
|
||||
"cutting" : 0, // cutting damage caused by using it as a melee weapon
|
||||
"warmth" : 10, // how much warmth clothing provides
|
||||
"phase" : "solid", // what phase it is
|
||||
"enviromental_protection" : 0, // how much environmental protection it affords
|
||||
"rarity" : 70, // determines how often it spawns
|
||||
"encumberance" : 0, // base encumbrance (unfitted value)
|
||||
"bashing" : -5, // bashing damage caused by using it as a melee weapon
|
||||
"flags" : ["VARSIZE"] // used to indicate clothing type which can be fitted. Leave out the flags field entirely if clothing cannot be fitted
|
||||
"coverage" : 80, // what percentage of body part
|
||||
"material_thickness" : 1 // thickness of material, in millimetre units (approximately). Generally ranges between 1 - 5, more unusual armour types go up to 10 or more
|
||||
3) When the player is hit at a specific body part, armour coverage determines whether the armour is hit, or an uncovered part of the player is hit (roll 1d100 against coverage)
|
||||
4) If the above roll fails (ie roll value is above coverage), then the armour does not absorb any damage from the blow, neither does it become damaged
|
||||
5) If the above roll succeeds, the armour is hit, possibly absorbing some damage and possibly getting damaged in the process
|
||||
6) The above steps are repeated for each layer of armour on the body part
|
||||
7) Armour protects against bash and cut damage. These are determined by multiplying the armour thickness by the material bash/cut resistance factor respectively, given in materials.json
|
||||
8) If the armour is made from 2 materials types, then it takes a weighted average of the primary material (66%) and secondary material (33%).
|
||||
9) Materials resistance factors are given relative to PAPER as a material (this probably needs some fine-tuning for balance).
|
||||
|
||||
1.5 Adding a bionic
|
||||
1) Edit data/raw/bionics.json and add your bionic near similar types.
|
||||
|
||||
2) Add the required attributes
|
||||
|
||||
id : "bio_rocketlauncher" // Text string used as identifier in the code.
|
||||
name : "CBM: Rocket Launcher" // The bionic's name, as showed to the player.
|
||||
cost : 10 // How many PUs it costs to use the bionic.
|
||||
time : 0 // How long, when activated, between drawing cost. If 0, it draws power once.
|
||||
description : "It's a rocket launcher, inside your arm!!" // A brief description of the bionic, as showed to the player.
|
||||
|
||||
3) Add any otional attributes
|
||||
|
||||
flags : ["ACTIVE"] // Used to flag the bionic as a specific type.
|
||||
|
||||
Supported flags:
|
||||
|
||||
"ACTIVE" : The bionic can be manually activated and deactivated.
|
||||
"POWER" : The bionic provides a source of power.
|
||||
"FAULTY" : The bionic is an unwanted one, will typically have negative effects.
|
||||
|
||||
Flags can be combined like so: ["ACTIVE","POWER","FAULTY"] (Don't add all these at once)
|
||||
|
||||
4) If you want the bionic to be available in the gameworld as an item, add it to itypedef.cpp
|
||||
|
||||
BIO_SINGLE(id, rarity, price, color, difficulty)
|
||||
|
||||
See 1.1 for more information about adding items.
|
||||
@@ -1,84 +0,0 @@
|
||||
ENUMS
|
||||
|
||||
This is a guide to all the enumerations in the game. If you encounter a flag
|
||||
you don't understand, grep it here. Likewise if a function accepts an m_flags
|
||||
tag, grep this document for 'm_flags'. Enums are also labeled with the file in
|
||||
which they are defined.
|
||||
|
||||
Format:
|
||||
|
||||
<File with definition> : <Name of enum>
|
||||
<List of values...>
|
||||
<Related classes, files, notes...>
|
||||
|
||||
----------------------------------------
|
||||
|
||||
bionics.h : bionic_id
|
||||
bio_null, bio_batteries, bio_metabolics, bio_solar, bio_furnace, bio_ethanol,
|
||||
bio_memory, bio_ears, bio_eye_enhancer, bio_membrane, bio_targeting, bio_gills,
|
||||
bio_purifier, bio_climate, bio_storage, bio_recycler, bio_digestion, bio_tools,
|
||||
bio_shock, bio_heat_absorb, bio_carbon, bio_armor_head, bio_armor_torso,
|
||||
bio_armor_arms, bio_armor_legs, bio_flashlight, bio_night_vision, bio_infrared,
|
||||
bio_face_mask, bio_ads, bio_ods, bio_scent_mask, bio_cloak, bio_painkiller,
|
||||
bio_nanobots, bio_heatsink, bio_resonator, bio_time_freeze, bio_teleport,
|
||||
bio_blood_anal, bio_blood_filter, bio_alarm, bio_evap, bio_lighter, bio_claws,
|
||||
bio_blaster, bio_laser, bio_emp, bio_hydraulics, bio_water_extractor,
|
||||
bio_magnet, bio_fingerhack, bio_lockpick, bio_ground_sonar, max_bio_start,
|
||||
bio_banish, bio_gate_out, bio_gate_in, bio_nightfall, bio_drilldown,
|
||||
bio_heatwave, bio_lightning, bio_tremor, bio_flashflood, max_bio_good,
|
||||
bio_dis_shock, bio_dis_acid, bio_drain, bio_noise, bio_power_weakness,
|
||||
bio_stiff, max_bio
|
||||
|
||||
bodypart.h : body_part
|
||||
color.h : col_attribute
|
||||
color.h : nc_color
|
||||
crafting.h : craft_cat
|
||||
dialogue.h : talk_topic
|
||||
enums.h : material
|
||||
event.h : event_type
|
||||
faction.h : faction_goal
|
||||
faction.h : faction_job
|
||||
faction.h : faction_value
|
||||
game.h : tut_type
|
||||
itype.h : itype_id
|
||||
itype.h : item_cat
|
||||
itype.h : ammotype
|
||||
itype.h : weapon_flag
|
||||
itype.h : container_flags
|
||||
line.h : direction
|
||||
map.cpp : astar_list
|
||||
mapdata.h : t_flag
|
||||
mapdata.h : ter_id
|
||||
mapdata.h : map_extra
|
||||
mapdata.h : field_id
|
||||
mapgen.cpp : room_type
|
||||
mapitems.h : items_location
|
||||
mission.h : mission_id
|
||||
mission.h : mission_origin
|
||||
mission.h : mission_goal
|
||||
mongroup.h : moncat_id
|
||||
monster.h : monster_effect_type
|
||||
morale.h:enum morale_type
|
||||
mtype.h : mon_id
|
||||
mtype.h : m_size
|
||||
mtype.h : m_flags
|
||||
npc.h : npc_attitude
|
||||
npc.h : npc_mission
|
||||
npc.h : npc_class
|
||||
npc.h : npc_action
|
||||
npc.h : npc_need
|
||||
npc.h : npc_flag
|
||||
omdata.h : oter_id
|
||||
omdata.h:// Order MUST match enum oter_id above!
|
||||
overmap.h:#include "enums.h"
|
||||
pldata.h : character_type
|
||||
pldata.h : dis_type
|
||||
pldata.h : add_type
|
||||
pldata.h : activity_type
|
||||
pldata.h : pl_flag
|
||||
pldata.h : hp_part
|
||||
skill.h : skill
|
||||
trap.h : trap_id
|
||||
tutorial.h : tut_lesson
|
||||
weather.h : season_type
|
||||
weather.h : weather_type
|
||||
@@ -1,121 +0,0 @@
|
||||
#0 Table of Contents
|
||||
|
||||
#0 Table of Contents
|
||||
#1 Files
|
||||
#2 special_game class
|
||||
#3 Functions
|
||||
#3.0 id()
|
||||
#3.1 init()
|
||||
#3.2 per_turn()
|
||||
#3.3 pre_action()
|
||||
#3.4 post_action()
|
||||
#3.5 game_over()
|
||||
|
||||
#1 Files
|
||||
|
||||
The main file to be concerned with is gamemode.h.
|
||||
|
||||
This is where you can insert the class definition for your game mode, and any
|
||||
enums it might use.
|
||||
|
||||
gamemode.cpp is also important, if short. It contains two functions:
|
||||
special_game_name() returns the name of each special game.
|
||||
get_special_game() returns a pointer to a special game of the proper
|
||||
type.
|
||||
|
||||
Also of note are tutorial.h (houses text snippets for tutorials), and
|
||||
tutorial.cpp and defense.cpp, which house code for tutorials and defense games
|
||||
respectively.
|
||||
|
||||
If you add a new game mode, use <mode name>.cpp for its code and <mode name>.h
|
||||
for any static data associated with it.
|
||||
|
||||
|
||||
|
||||
#2 special_game class
|
||||
|
||||
Every new game mode is a child class of special_game. It may house any private
|
||||
functions and variables it needs, as well as a constructor, but otherwise the
|
||||
only public members should be the five functions described below.
|
||||
|
||||
The game class holds a pointer to a special_game. The five functions are
|
||||
called as is appropriate, and thus are cast to the proper function in a child
|
||||
class.
|
||||
|
||||
There is an enum, special_game_id, at the top of gamemode.h. There should be
|
||||
one entry for every game mode in existance. Add one for yours.
|
||||
|
||||
|
||||
|
||||
#3 Functions
|
||||
|
||||
|
||||
#3.0 id()
|
||||
|
||||
virtual special_game_id id();
|
||||
|
||||
Returns the special_game_id assigned to your game mode.
|
||||
|
||||
|
||||
#3.1 init()
|
||||
|
||||
virtual void init(game *g);
|
||||
|
||||
This is run when your game mode begins.
|
||||
|
||||
Some ideas:
|
||||
>>Change the itype and mtype definitions--remove certain monsters from
|
||||
the game, make certain items weightless, make baseballs bats uber-powerful
|
||||
>>Change the recipes. Add new ones, reduce the time crafting takes.
|
||||
>>Start the game in a special area. Edit the world to be entirely swamp.
|
||||
|
||||
|
||||
#3.2 per_turn()
|
||||
|
||||
virtual void per_turn(game *g);
|
||||
|
||||
This is run every turn, before anything else is done, including player actions.
|
||||
|
||||
Some ideas:
|
||||
>>Reset the player's thirst, hunger, or fatigue to 0, eliminating these needs
|
||||
>>Spawn some monsters every 50 turns
|
||||
>>Make fire burn off faster
|
||||
>>Add a chance for a space debris to fall
|
||||
|
||||
|
||||
#3.3 pre_action()
|
||||
|
||||
virtual void pre_action(game *g, action_id &act);
|
||||
|
||||
This is run after a keypress, but before the action is performed. The action
|
||||
is passed by reference, so you can modify it if you like.
|
||||
|
||||
Some ideas:
|
||||
>>Rewrite the functionality of actions entirely; change the long wait menu,
|
||||
for example
|
||||
>>Disallow certain actions by setting act to ACTION_NULL
|
||||
>>Add a confirmation request to certain actions
|
||||
>>Make the availability of certain actions dependant on game state
|
||||
|
||||
|
||||
#3.4 post_action()
|
||||
|
||||
virtual void post_action(game *g, action_id act);
|
||||
|
||||
This is run after an action is performed.
|
||||
|
||||
Some ideas:
|
||||
>>Make certain actions perform faster by rebating movement points
|
||||
>>Add extra effects to certain actions
|
||||
>>Display a message upon execution of certain actions
|
||||
|
||||
|
||||
#3.5 game_over()
|
||||
|
||||
virtual void game_over(game *g);
|
||||
|
||||
This is run when the game is over (player quit or died).
|
||||
|
||||
Some ideas:
|
||||
>>Add a special achievement message, e.g. number of rounds survived
|
||||
>>Delete any special files created during play
|
||||
@@ -1,32 +0,0 @@
|
||||
Stat system scaling:
|
||||
Minimum stat: 1 (should only happen due to penalties)
|
||||
Nominal stat: 8 ("average" person)
|
||||
Very high stat: ? (realistic world class human)
|
||||
Maximal stat: 20 (higher may be achievable, but we're not worried about balancing at that point.)
|
||||
|
||||
Skill system scaling:
|
||||
Minimum skill: 0 (no training)
|
||||
Maximum skill: 10 (requires regular training to maintain)
|
||||
|
||||
Monster melee skill scaling:
|
||||
Ranges from 8 to 16
|
||||
|
||||
Dodge System assumptions:
|
||||
Dodge chance is based on attacker's melee skill and target's dex stat and dodge skill.
|
||||
Successful dodges negate the attack and impose a cumulative penalty on dodges within the same turn.
|
||||
|
||||
Dodge Use Cases:
|
||||
An individual with no skill and nominal stats in ideal circumstances against a basic opponent should occasionally be able to dodge.
|
||||
|
||||
An individual with no skill and nominal stats in ideal circumstances against a skilled opponent should rarely if ever be able to dodge.
|
||||
|
||||
An individual with world-class dodging ability, in ideal circumstances against a basic opponent should have a negligible chance of failure.
|
||||
|
||||
An individual with world-class dodging ability, in ideal circumstances against a skilled opponent should have a moderate chance of failure.
|
||||
|
||||
The effect of increasing dodge skill has a growth rate with diminishing returns that accelerates sharply at the point where you move beyond the dodge a "regular" character is likely to achieve (7 and above)
|
||||
|
||||
The balance of melee versus dodge should favour dodge which, after all, isn't effective against a wide variety of other types of attacks.
|
||||
|
||||
Even a world class dodger should not be able to dodge continuously when attacked many times a turn.
|
||||
|
||||
-258
@@ -1,258 +0,0 @@
|
||||
NOTABLE BUGS:
|
||||
|
||||
Factions cannot be saved at all, or they corrupt the master save file
|
||||
|
||||
|
||||
|
||||
LONG-TERM FEATURES: Stuff I hope to finish in a year
|
||||
|
||||
Add a "list nearby items" command, which lists visible items by distance,
|
||||
name, type, etc. Make it searchable, perhaps allow the player to define
|
||||
highlighted items which are always moved to the top of the list.
|
||||
|
||||
Missions need to have save() and load() functions.
|
||||
|
||||
Save NPCs.
|
||||
|
||||
Once NPCs are working, populate settlements with them. Make sure that the
|
||||
code for placing an NPC REALLY WORKS, so that shopkeepers stay where
|
||||
they're supposed to.
|
||||
Most settlements belong to a faction; its citizens should too (mostly?)
|
||||
|
||||
Factions already get generated and placed in the world, but they have no
|
||||
effect on it. Once NPCs are working, place faction patrols in the world.
|
||||
Factions could control radio towers, spewing propaganda or using it to
|
||||
recruit or start missions
|
||||
Factions could have projects; exterminating the zombies in a given town,
|
||||
clearing a particular forest, paving a new road!
|
||||
|
||||
Replace the Skills tab in character creation with a Class tab
|
||||
Classes come with a set of items and the skills needed to use them
|
||||
e.g. a handgun, ammo, & holster, plus handgun & firearms skills
|
||||
Cap at one class? Or make it mix-and-match, purchasable with points?
|
||||
Mix-and-match has the problem of giving the player too many
|
||||
items to store, unless we start them with a backpack
|
||||
Maybe add a trait that allows a player to take 2 classes
|
||||
Classes may also have unique effects upon the game
|
||||
Priests start with robe & collar and have bonuses when
|
||||
interacting with religious NPCs
|
||||
|
||||
|
||||
Support terminals larger than 80x25, with the extra space being utilized
|
||||
Larger terminals should not be given any real advantages over smaller
|
||||
ones; this means that the visible terrain should not be a larger
|
||||
area, but rather the extra space could be used for a larger visible
|
||||
message buffer.
|
||||
|
||||
Wrap WINDOW* in a custom class. This will eliminate the possibility of
|
||||
memory leaks from undeleted temporary windows, and will make porting to
|
||||
different display libraries (e.g. tiles) much easier.
|
||||
|
||||
Eventually a tiles port would be nice. The biggest obstacle to this is the
|
||||
actual tile graphics; once those are acquired, the only things needing a
|
||||
rewrite should be output.{h,cpp} and keypress.{h,cpp}
|
||||
Though mtypedef and itypedef might need to have item glyphs replaced or
|
||||
enchanced with a link to a image file or part of an image file. Same
|
||||
with terrain data
|
||||
|
||||
Sustained high morale generates "life points" (think of a less stupid name).
|
||||
These can be spent on a permanent stat increase, crafting a "legendary" item,
|
||||
or other otherwise unobtainable goodies. This gives the player motivation to
|
||||
maintain high morale without the artificial-feeling stat bonuses.
|
||||
High morale now generates XP points, which go into increasing your
|
||||
skills without the use of books. Maybe these XP points could be used
|
||||
for the above effects?
|
||||
|
||||
GENERAL:
|
||||
|
||||
More cultural references!
|
||||
LOST: Black cloud monster, polar bear, hatches
|
||||
Resident Evil style zombies
|
||||
Kinda done with The Thing dog
|
||||
->The whole game is already a reference to Fallout, let's admit it. So
|
||||
avoid Fallout references in general, they're too easy.
|
||||
->Ditto for Half-Life, the game is saturated with HL references
|
||||
Hellraiser: High level Void monsters could be Cenobites.
|
||||
Bladerunner: "Androids And The People Who Kill Them"
|
||||
Steam powered robots (built by post-apoc factions)
|
||||
Wild Wild West, Miyazaki, Iron Giant, Neverhood, etc. etc.
|
||||
2001: Get locked in a chamber with an insane computer which you must
|
||||
disable
|
||||
What are the other great "insane computer" movies?
|
||||
Logan's Run: A faction that kills people when they reach 30
|
||||
Six-String Samurai: Like, all the bad guys. Wind People.
|
||||
Nausicaa: Radiation-purifying mushroom forests
|
||||
They Live!: Special glasses that let you see "reality" somehow
|
||||
Hidden doors? Some people are really disguised monsters?
|
||||
Indiana Jones: Archeologist class, religious artifacts
|
||||
The Warriors: Making gangs (basically small factions) with cool themes
|
||||
and costumes would be nice.
|
||||
Dr Strangelove: Mineshafts converted into bunkers; quotes
|
||||
Ghostbusters: Weapons! Maybe ghosts.
|
||||
OTHERS: Escape From New York,
|
||||
Classes (see above under LONG-TERM) could draw from pop culture heros
|
||||
Archeologist: Indiana Jones (a la nethack)
|
||||
Road Warrior: Mad Max
|
||||
|
||||
|
||||
Pushable furniture; push dressers, fridges, etc. in front of doors
|
||||
|
||||
Configurable options:
|
||||
Colors (e.g. highlight color, currently blue)
|
||||
Also ncurses options, e.g. A_BLINK support--not all terminals
|
||||
can display bright background colors, so black-on-dark-gray
|
||||
will just show up as a blank tile. We should have an option
|
||||
to turn off bright background colors.
|
||||
Run Mode behavior / Run Mode auto-on
|
||||
Auto-drop food containers (empty soda cans, etc)
|
||||
|
||||
Fix eating/fullness; right now only overeating when Full is a risk of puking,
|
||||
which comes too quickly and feels unfair. Thirst (and small amounts of
|
||||
nutrition) never causes puking, which allows players to exploit cola by
|
||||
drinking 10 at once.
|
||||
Possible solutions:
|
||||
>Two levels; "Full" and "Overfull"; Only when Overfull is puking a risk
|
||||
>Three levels, hunger, thirst, and stomach fullness
|
||||
|
||||
Make cooking a rotten item result in a rotten item
|
||||
Or, average the original item's birthday with the current turn, to allow
|
||||
for some freshening.
|
||||
|
||||
When picking items up, highlight useful ones in particular colors
|
||||
DONE Red: Ammo for a gun you have, or vice versa
|
||||
Green: Important medical (1st aid, bandages, painkiller, etc.)
|
||||
Possibly context-dependant? Painkillers if you're in pain, etc.
|
||||
Blue: Items you can craft with
|
||||
Purple: User-defined criteria
|
||||
|
||||
Food canning. We already have tin cans, add an item "canning kit"
|
||||
Or make it a craft; canning requires boiling water + equipment
|
||||
|
||||
Highlight or color-invert monsters that're fleeing; also make indifference
|
||||
visually obvious in some way (change glyph foreground color?)
|
||||
|
||||
Audit how we're using screen space in the data window
|
||||
Maybe make a special data structure for how the data section is used and
|
||||
layed out; easier to audit, player configurable
|
||||
|
||||
Make swimming more interesting
|
||||
Items at the bottoms of rivers, only discoverable by diving underwater
|
||||
Entrances to special dungeons;
|
||||
Sewage treatment plant?
|
||||
Underwater monster lair?
|
||||
Water-dwelling monsters. Probably rare, because for unskilled swimmers
|
||||
almost any monsters would be deadly
|
||||
|
||||
Automatically drop items if our volume capacity suddenly drops (e.g. from a
|
||||
torn-open backpack)
|
||||
|
||||
Add a warning in the data screen if volume carried is over capacity
|
||||
|
||||
Allow basic movement while reloading, or make it possible to resume
|
||||
interrupted reloading
|
||||
|
||||
Make computer usage more widespread and more convincing. Possibly add a
|
||||
class for computer networks; an area on the overmap, protected by a password.
|
||||
Once you hack the password, you gain access to certain commands on computers
|
||||
found inside that area.
|
||||
Make computer functions use skills other than sk_computer. For
|
||||
instance, the computers in hospitals should use sk_firstaid
|
||||
|
||||
Desires, as in The Sims 3. These could be their own class, or a special
|
||||
type of mission; added more or less randomly, they include things like "eat an
|
||||
orange," "read a novel" and other banal actions, and reward the player with a
|
||||
larger-than-usual morale boost.
|
||||
|
||||
|
||||
|
||||
ITEMS / BIONICS:
|
||||
|
||||
Book: Bible; high morale boost if you have the Religious trait
|
||||
|
||||
Canning kit (see canning under GENERAL)
|
||||
|
||||
Fire extinguisher bionic
|
||||
Make this, and real fire extinguishers, more effective
|
||||
|
||||
Road maps, found in gas stations; using it adds some map data.
|
||||
|
||||
|
||||
|
||||
MAP:
|
||||
|
||||
Hatch (see cultural references, above)
|
||||
|
||||
Terrain tiles, such as heavy doors, which require the help of an extra NPC
|
||||
or two to open (or very high strength)
|
||||
|
||||
|
||||
CHARACTER CREATION:
|
||||
|
||||
Illiterate makes read speed show up as "N/A" on stats tab
|
||||
|
||||
Glass Jaw makes Head HP show up on stats tab, alongside Base HP
|
||||
|
||||
Show skill erosion rate on stats tab (modded by Forgetful)
|
||||
|
||||
Greater transparency for skill comprehension (at level 0, 4, 8, etc.)
|
||||
|
||||
Show food consumption rate? (Modified by Light Eater)
|
||||
Should high Strength increase this rate?
|
||||
|
||||
Save our position in both Traits lists, even when changing tabs
|
||||
|
||||
Display player::miss_penalty() in Stats tab (Under Str and/or Dex)
|
||||
Modified by Dex, by Str with heavy weapons, and the Deft trait
|
||||
Show penalty under various circumstances? Unarmed, crowbar, chainsaw etc
|
||||
|
||||
Make skill levels affect values in Stats tab?
|
||||
Bottom 3 lines could be a color legend, blue=from stat, green=from skill
|
||||
|
||||
Make Drunken Master bonus appear in Stats tab?
|
||||
|
||||
Make the Description tab more interesting? Maybe hair color, etc.
|
||||
Any effect on gameplay? Probably not.
|
||||
Make the effect of gender on gameplay transparent
|
||||
|
||||
List specific effects on gameplay mechanics in the Skills tab, comparable to
|
||||
those listed in the Stats tab.
|
||||
|
||||
|
||||
|
||||
TRAITS:
|
||||
|
||||
More Schizophrenic effects
|
||||
Make auditory hallucinations more realistic/varied
|
||||
|
||||
Balance/fix/remove Jittery
|
||||
|
||||
More obvious Wool Allergy text (remind the player that they're allergic)
|
||||
Wool Allergy prevents eating wool (with Internal Furnace bionic)
|
||||
|
||||
Make Fast Learner affect skill comprehension directly
|
||||
Rewrite description
|
||||
|
||||
Android encourages start-scumming. Maybe make it a static set, or present
|
||||
the player with a few different options?
|
||||
Make Android a class instead? (see above under LONG-TERM)
|
||||
|
||||
|
||||
|
||||
CRAFTING:
|
||||
|
||||
Expand cooking; much more morale-boosting (i.e. tasty) recipes
|
||||
|
||||
Fruit drying; remove quench and some nutrition, but won't go bad
|
||||
|
||||
|
||||
|
||||
KEYBINDINGS/INPUT:
|
||||
|
||||
Configurable bindings!
|
||||
This ties into options in general.
|
||||
|
||||
Make ctrl+movement equivalent to 'e'+movement
|
||||
|
||||
"Repeat last command" command
|
||||
|
||||
Macros--are they necessary or useful at all?
|
||||
@@ -1,188 +0,0 @@
|
||||
#include "color.h"
|
||||
|
||||
#define HILIGHT COLOR_BLUE
|
||||
void init_colors()
|
||||
{
|
||||
start_color();
|
||||
|
||||
init_pair( 1, COLOR_WHITE, COLOR_BLACK );
|
||||
init_pair( 2, COLOR_RED, COLOR_BLACK );
|
||||
init_pair( 3, COLOR_GREEN, COLOR_BLACK );
|
||||
init_pair( 4, COLOR_BLUE, COLOR_BLACK );
|
||||
init_pair( 5, COLOR_CYAN, COLOR_BLACK );
|
||||
init_pair( 6, COLOR_MAGENTA, COLOR_BLACK );
|
||||
init_pair( 7, COLOR_YELLOW, COLOR_BLACK );
|
||||
|
||||
// Inverted Colors
|
||||
init_pair( 8, COLOR_BLACK, COLOR_WHITE );
|
||||
init_pair( 9, COLOR_BLACK, COLOR_RED );
|
||||
init_pair(10, COLOR_BLACK, COLOR_GREEN );
|
||||
init_pair(11, COLOR_BLACK, COLOR_BLUE );
|
||||
init_pair(12, COLOR_BLACK, COLOR_CYAN );
|
||||
init_pair(13, COLOR_BLACK, COLOR_MAGENTA);
|
||||
init_pair(14, COLOR_BLACK, COLOR_YELLOW );
|
||||
|
||||
// Highlighted - blue background
|
||||
init_pair(15, COLOR_WHITE, HILIGHT);
|
||||
init_pair(16, COLOR_RED, HILIGHT);
|
||||
init_pair(17, COLOR_GREEN, HILIGHT);
|
||||
init_pair(18, COLOR_BLUE, HILIGHT);
|
||||
init_pair(19, COLOR_CYAN, HILIGHT);
|
||||
init_pair(20, COLOR_BLACK, HILIGHT);
|
||||
init_pair(21, COLOR_MAGENTA, HILIGHT);
|
||||
init_pair(22, COLOR_YELLOW, HILIGHT);
|
||||
|
||||
// Red background - for monsters on fire
|
||||
init_pair(23, COLOR_WHITE, COLOR_RED);
|
||||
init_pair(24, COLOR_RED, COLOR_RED);
|
||||
init_pair(25, COLOR_GREEN, COLOR_RED);
|
||||
init_pair(26, COLOR_BLUE, COLOR_RED);
|
||||
init_pair(27, COLOR_CYAN, COLOR_RED);
|
||||
init_pair(28, COLOR_MAGENTA, COLOR_RED);
|
||||
init_pair(29, COLOR_YELLOW, COLOR_RED);
|
||||
|
||||
init_pair(30, COLOR_BLACK, COLOR_BLACK );
|
||||
}
|
||||
|
||||
int color_to_int(nc_color col)
|
||||
{
|
||||
switch (col) {
|
||||
case c_black : return 0;
|
||||
case c_white : return 1;
|
||||
case c_ltgray : return 2;
|
||||
case c_dkgray : return 3;
|
||||
case c_red : return 4;
|
||||
case c_green : return 5;
|
||||
case c_blue : return 6;
|
||||
case c_cyan : return 7;
|
||||
case c_magenta: return 8;
|
||||
case c_brown : return 9;
|
||||
case c_ltred : return 10;
|
||||
case c_ltgreen: return 11;
|
||||
case c_ltblue : return 12;
|
||||
case c_ltcyan : return 13;
|
||||
case c_pink : return 14;
|
||||
case c_yellow : return 15;
|
||||
|
||||
case h_black : return 16;
|
||||
case h_white : return 17;
|
||||
case h_ltgray : return 18;
|
||||
case h_dkgray : return 19;
|
||||
case h_red : return 20;
|
||||
case h_green : return 21;
|
||||
case h_cyan : return 23;
|
||||
case h_magenta: return 24;
|
||||
case h_brown : return 25;
|
||||
case h_ltred : return 26;
|
||||
case h_ltgreen: return 27;
|
||||
case h_ltblue : return 28;
|
||||
case h_ltcyan : return 29;
|
||||
case h_pink : return 30;
|
||||
case h_yellow : return 31;
|
||||
|
||||
case i_white : return 33;
|
||||
case i_ltgray : return 34;
|
||||
case i_dkgray : return 35;
|
||||
case i_red : return 36;
|
||||
case i_green : return 37;
|
||||
case i_blue : return 38;
|
||||
case i_cyan : return 39;
|
||||
case i_magenta: return 40;
|
||||
case i_brown : return 41;
|
||||
case i_ltred : return 42;
|
||||
case i_ltgreen: return 43;
|
||||
case i_ltblue : return 44;
|
||||
case i_ltcyan : return 45;
|
||||
case i_pink : return 46;
|
||||
case i_yellow : return 47;
|
||||
|
||||
case c_white_red : return 48;
|
||||
case c_ltgray_red : return 49;
|
||||
case c_green_red : return 52;
|
||||
case c_blue_red : return 53;
|
||||
case c_cyan_red : return 54;
|
||||
case c_magenta_red: return 55;
|
||||
case c_brown_red : return 56;
|
||||
case c_ltred_red : return 57;
|
||||
case c_ltgreen_red: return 58;
|
||||
case c_ltblue_red : return 59;
|
||||
case c_ltcyan_red : return 60;
|
||||
case c_pink_red : return 61;
|
||||
case c_yellow_red : return 62;
|
||||
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
nc_color int_to_color(int key)
|
||||
{
|
||||
switch (key) {
|
||||
case 0: return c_black ;
|
||||
case 1: return c_white ;
|
||||
case 2: return c_ltgray ;
|
||||
case 3: return c_dkgray ;
|
||||
case 4: return c_red ;
|
||||
case 5: return c_green ;
|
||||
case 6: return c_blue ;
|
||||
case 7: return c_cyan ;
|
||||
case 8: return c_magenta;
|
||||
case 9: return c_brown ;
|
||||
case 10: return c_ltred ;
|
||||
case 11: return c_ltgreen;
|
||||
case 12: return c_ltblue ;
|
||||
case 13: return c_ltcyan ;
|
||||
case 14: return c_pink ;
|
||||
case 15: return c_yellow ;
|
||||
|
||||
case 16: return h_black ;
|
||||
case 17: return h_white ;
|
||||
case 18: return h_ltgray ;
|
||||
case 19: return h_dkgray ;
|
||||
case 20: return h_red ;
|
||||
case 21: return h_green ;
|
||||
case 22: return h_blue ;
|
||||
case 23: return h_cyan ;
|
||||
case 24: return h_magenta;
|
||||
case 25: return h_brown ;
|
||||
case 26: return h_ltred ;
|
||||
case 27: return h_ltgreen;
|
||||
case 28: return h_ltblue ;
|
||||
case 29: return h_ltcyan ;
|
||||
case 30: return h_pink ;
|
||||
case 31: return h_yellow ;
|
||||
|
||||
case 32: return i_black ;
|
||||
case 33: return i_white ;
|
||||
case 34: return i_ltgray ;
|
||||
case 35: return i_dkgray ;
|
||||
case 36: return i_red ;
|
||||
case 37: return i_green ;
|
||||
case 38: return i_blue ;
|
||||
case 39: return i_cyan ;
|
||||
case 40: return i_magenta;
|
||||
case 41: return i_brown ;
|
||||
case 42: return i_ltred ;
|
||||
case 43: return i_ltgreen;
|
||||
case 44: return i_ltblue ;
|
||||
case 45: return i_ltcyan ;
|
||||
case 46: return i_pink ;
|
||||
case 47: return i_yellow ;
|
||||
|
||||
case 48: return c_white_red ;
|
||||
case 49: return c_ltgray_red ;
|
||||
case 50: return c_dkgray_red ;
|
||||
case 51: return c_red_red ;
|
||||
case 52: return c_green_red ;
|
||||
case 53: return c_blue_red ;
|
||||
case 54: return c_cyan_red ;
|
||||
case 55: return c_magenta_red;
|
||||
case 56: return c_brown_red ;
|
||||
case 57: return c_ltred_red ;
|
||||
case 58: return c_ltgreen_red;
|
||||
case 59: return c_ltblue_red ;
|
||||
case 60: return c_ltcyan_red ;
|
||||
case 61: return c_pink_red ;
|
||||
case 62: return c_yellow_red ;
|
||||
}
|
||||
return c_black;
|
||||
}
|
||||
@@ -1,94 +0,0 @@
|
||||
#ifndef _COLOR_H_
|
||||
#define _COLOR_H
|
||||
|
||||
#ifndef _COLOR_LIST_
|
||||
#define _COLOR_LIST_
|
||||
|
||||
#include "cursesdef.h"
|
||||
|
||||
void init_colors();
|
||||
|
||||
enum col_attribute {
|
||||
WA_NULL = 0,
|
||||
HI = 1,
|
||||
INV = 2
|
||||
};
|
||||
|
||||
enum nc_color {
|
||||
c_black = COLOR_PAIR(30),
|
||||
c_white = COLOR_PAIR(1) | A_BOLD,
|
||||
c_ltgray = COLOR_PAIR(1),
|
||||
c_dkgray = COLOR_PAIR(30) | A_BOLD,
|
||||
c_red = COLOR_PAIR(2),
|
||||
c_green = COLOR_PAIR(3),
|
||||
c_blue = COLOR_PAIR(4),
|
||||
c_cyan = COLOR_PAIR(5),
|
||||
c_magenta = COLOR_PAIR(6),
|
||||
c_brown = COLOR_PAIR(7),
|
||||
c_ltred = COLOR_PAIR(2) | A_BOLD,
|
||||
c_ltgreen = COLOR_PAIR(3) | A_BOLD,
|
||||
c_ltblue = COLOR_PAIR(4) | A_BOLD,
|
||||
c_ltcyan = COLOR_PAIR(5) | A_BOLD,
|
||||
c_pink = COLOR_PAIR(6) | A_BOLD,
|
||||
c_yellow = COLOR_PAIR(7) | A_BOLD,
|
||||
|
||||
h_black = COLOR_PAIR(20),
|
||||
h_white = COLOR_PAIR(15) | A_BOLD,
|
||||
h_ltgray = COLOR_PAIR(15),
|
||||
h_dkgray = COLOR_PAIR(20) | A_BOLD,
|
||||
h_red = COLOR_PAIR(16),
|
||||
h_green = COLOR_PAIR(17),
|
||||
h_blue = COLOR_PAIR(20),
|
||||
h_cyan = COLOR_PAIR(19),
|
||||
h_magenta = COLOR_PAIR(21),
|
||||
h_brown = COLOR_PAIR(22),
|
||||
h_ltred = COLOR_PAIR(16) | A_BOLD,
|
||||
h_ltgreen = COLOR_PAIR(17) | A_BOLD,
|
||||
h_ltblue = COLOR_PAIR(18) | A_BOLD,
|
||||
h_ltcyan = COLOR_PAIR(19) | A_BOLD,
|
||||
h_pink = COLOR_PAIR(21) | A_BOLD,
|
||||
h_yellow = COLOR_PAIR(22) | A_BOLD,
|
||||
|
||||
i_black = COLOR_PAIR(30),
|
||||
i_white = COLOR_PAIR(8) | A_BLINK,
|
||||
i_ltgray = COLOR_PAIR(8),
|
||||
i_dkgray = COLOR_PAIR(30) | A_BLINK,
|
||||
i_red = COLOR_PAIR(9),
|
||||
i_green = COLOR_PAIR(10),
|
||||
i_blue = COLOR_PAIR(11),
|
||||
i_cyan = COLOR_PAIR(12),
|
||||
i_magenta = COLOR_PAIR(13),
|
||||
i_brown = COLOR_PAIR(14),
|
||||
i_ltred = COLOR_PAIR(9) | A_BLINK,
|
||||
i_ltgreen = COLOR_PAIR(10) | A_BLINK,
|
||||
i_ltblue = COLOR_PAIR(11) | A_BLINK,
|
||||
i_ltcyan = COLOR_PAIR(12) | A_BLINK,
|
||||
i_pink = COLOR_PAIR(13) | A_BLINK,
|
||||
i_yellow = COLOR_PAIR(14) | A_BLINK,
|
||||
|
||||
c_white_red = COLOR_PAIR(23) | A_BOLD,
|
||||
c_ltgray_red = COLOR_PAIR(23),
|
||||
c_dkgray_red = COLOR_PAIR(9),
|
||||
c_red_red = COLOR_PAIR(9),
|
||||
c_green_red = COLOR_PAIR(25),
|
||||
c_blue_red = COLOR_PAIR(26),
|
||||
c_cyan_red = COLOR_PAIR(27),
|
||||
c_magenta_red = COLOR_PAIR(28),
|
||||
c_brown_red = COLOR_PAIR(29),
|
||||
c_ltred_red = COLOR_PAIR(24) | A_BOLD,
|
||||
c_ltgreen_red = COLOR_PAIR(25) | A_BOLD,
|
||||
c_ltblue_red = COLOR_PAIR(26) | A_BOLD,
|
||||
c_ltcyan_red = COLOR_PAIR(27) | A_BOLD,
|
||||
c_pink_red = COLOR_PAIR(28) | A_BOLD,
|
||||
c_yellow_red = COLOR_PAIR(29) | A_BOLD
|
||||
|
||||
};
|
||||
|
||||
int color_to_int(nc_color col);
|
||||
nc_color int_to_color(int key);
|
||||
|
||||
void setattr(nc_color &col, col_attribute attr);
|
||||
|
||||
#endif
|
||||
|
||||
#endif
|
||||
-1328
File diff suppressed because it is too large
Load Diff
-134
@@ -1,134 +0,0 @@
|
||||
#ifndef _COMPUTER_H_
|
||||
#define _COMPUTER_H_
|
||||
|
||||
#include "output.h"
|
||||
#include <vector>
|
||||
#include <string>
|
||||
|
||||
#define DEFAULT_COMPUTER_NAME ""
|
||||
|
||||
class game;
|
||||
class player;
|
||||
|
||||
enum computer_action
|
||||
{
|
||||
COMPACT_NULL = 0,
|
||||
COMPACT_OPEN,
|
||||
COMPACT_LOCK,
|
||||
COMPACT_UNLOCK,
|
||||
COMPACT_TOLL,
|
||||
COMPACT_SAMPLE,
|
||||
COMPACT_RELEASE,
|
||||
COMPACT_TERMINATE,
|
||||
COMPACT_PORTAL,
|
||||
COMPACT_CASCADE,
|
||||
COMPACT_RESEARCH,
|
||||
COMPACT_MAPS,
|
||||
COMPACT_MAP_SEWER,
|
||||
COMPACT_MISS_LAUNCH,
|
||||
COMPACT_MISS_DISARM,
|
||||
COMPACT_LIST_BIONICS,
|
||||
COMPACT_ELEVATOR_ON,
|
||||
COMPACT_AMIGARA_LOG,
|
||||
COMPACT_AMIGARA_START,
|
||||
COMPACT_DOWNLOAD_SOFTWARE,
|
||||
COMPACT_BLOOD_ANAL,
|
||||
COMPACT_DATA_ANAL,
|
||||
COMPACT_DISCONNECT,
|
||||
COMPACT_STEMCELL_TREATMENT,
|
||||
COMPACT_EMERG_MESS,
|
||||
COMPACT_TOWER_UNRESPONSIVE,
|
||||
COMPACT_SR1_MESS, //Security Reminders for Hazardous Waste Sarcophagus (SRCF)
|
||||
COMPACT_SR2_MESS,
|
||||
COMPACT_SR3_MESS,
|
||||
COMPACT_SR4_MESS,
|
||||
COMPACT_SRCF_1_MESS,
|
||||
COMPACT_SRCF_2_MESS,
|
||||
COMPACT_SRCF_3_MESS,
|
||||
COMPACT_SRCF_SEAL_ORDER,
|
||||
COMPACT_SRCF_SEAL,
|
||||
COMPACT_SRCF_ELEVATOR,
|
||||
NUM_COMPUTER_ACTIONS
|
||||
};
|
||||
|
||||
enum computer_failure
|
||||
{
|
||||
COMPFAIL_NULL = 0,
|
||||
COMPFAIL_SHUTDOWN,
|
||||
COMPFAIL_ALARM,
|
||||
COMPFAIL_MANHACKS,
|
||||
COMPFAIL_SECUBOTS,
|
||||
COMPFAIL_DAMAGE,
|
||||
COMPFAIL_PUMP_EXPLODE,
|
||||
COMPFAIL_PUMP_LEAK,
|
||||
COMPFAIL_AMIGARA,
|
||||
COMPFAIL_DESTROY_BLOOD,
|
||||
COMPFAIL_DESTROY_DATA,
|
||||
NUM_COMPUTER_FAILURES
|
||||
};
|
||||
|
||||
struct computer_option
|
||||
{
|
||||
std::string name;
|
||||
computer_action action;
|
||||
int security;
|
||||
|
||||
computer_option() { name = "Unknown", action = COMPACT_NULL, security = 0; };
|
||||
computer_option(std::string N, computer_action A, int S) :
|
||||
name (N), action (A), security (S) {};
|
||||
};
|
||||
|
||||
class computer
|
||||
{
|
||||
public:
|
||||
computer();
|
||||
computer(std::string Name, int Security);
|
||||
~computer();
|
||||
|
||||
computer & operator=(const computer &rhs);
|
||||
// Initialization
|
||||
void set_security(int Security);
|
||||
void add_option(std::string opt_name, computer_action action, int Security);
|
||||
void add_failure(computer_failure failure);
|
||||
// Basic usage
|
||||
void shutdown_terminal(); // Shutdown (free w_terminal, etc)
|
||||
void use(game *g);
|
||||
bool hack_attempt(game *g, player *p, int Security = -1);// -1 defaults to main security
|
||||
// Save/load
|
||||
std::string save_data();
|
||||
void load_data(std::string data);
|
||||
|
||||
std::string name; // "Jon's Computer", "Lab 6E77-B Terminal Omega"
|
||||
int mission_id; // Linked to a mission?
|
||||
|
||||
private:
|
||||
int security; // Difficulty of simply logging in
|
||||
std::vector<computer_option> options; // Things we can do
|
||||
std::vector<computer_failure> failures; // Things that happen if we fail a hack
|
||||
WINDOW *w_terminal; // Output window
|
||||
|
||||
// Called by use()
|
||||
void activate_function (game *g, computer_action action);
|
||||
// Generally called when we fail a hack attempt
|
||||
void activate_random_failure(game *g);
|
||||
// ...but we can also choose a specific failure.
|
||||
void activate_failure (game *g, computer_failure fail);
|
||||
|
||||
// OUTPUT/INPUT
|
||||
// Reset to a blank terminal (e.g. at start of usage loop)
|
||||
void reset_terminal();
|
||||
// Prints a line to the terminal (with printf flags)
|
||||
void print_line(const char *text, ...);
|
||||
// For now, the same as print_line but in red (TODO: change this?)
|
||||
void print_error(const char *text, ...);
|
||||
// Prints code-looking gibberish
|
||||
void print_gibberish_line();
|
||||
// Prints a line and waits for Y/N/Q
|
||||
char query_ynq(const char *text, ...);
|
||||
// Same as query_ynq, but returns true for y or Y
|
||||
bool query_bool(const char *text, ...);
|
||||
// Simply wait for any key, returns True
|
||||
bool query_any(const char *text, ...);
|
||||
};
|
||||
|
||||
#endif
|
||||
-1212
File diff suppressed because it is too large
Load Diff
@@ -1,82 +0,0 @@
|
||||
bool able_window(game *, point); // Any window tile#include <vector>
|
||||
#include <string>
|
||||
#include "crafting.h"
|
||||
|
||||
struct construct;
|
||||
|
||||
struct construction_stage
|
||||
{
|
||||
ter_id terrain;
|
||||
furn_id furniture;
|
||||
int time; // In minutes, i.e. 10 turns
|
||||
std::vector<component> tools[10];
|
||||
std::vector<component> components[10];
|
||||
|
||||
construction_stage(ter_id Terrain, int Time) :
|
||||
terrain (Terrain), furniture(f_null), time (Time) { };
|
||||
construction_stage(furn_id Furniture, int Time) :
|
||||
terrain (t_null), furniture (Furniture), time (Time) { };
|
||||
construction_stage(int Time) :
|
||||
terrain (t_null), furniture (f_null), time (Time) { };
|
||||
};
|
||||
|
||||
struct constructable
|
||||
{
|
||||
int id;
|
||||
std::string name; // Name as displayed
|
||||
int difficulty; // Carpentry skill level required
|
||||
std::vector<construction_stage> stages;
|
||||
bool (construct::*able) (game *, point);
|
||||
void (construct::*done) (game *, point);
|
||||
|
||||
constructable(int Id, std::string Name, int Diff,
|
||||
bool (construct::*Able) (game *, point),
|
||||
void (construct::*Done) (game *, point)) :
|
||||
id (Id), name (Name), difficulty (Diff), able (Able), done (Done) {};
|
||||
};
|
||||
|
||||
struct construct // Construction functions.
|
||||
{
|
||||
// Bools - able to build at the given point?
|
||||
bool able_always(game *, point) { return true; }
|
||||
bool able_never (game *, point) { return false; }
|
||||
|
||||
bool able_empty (game *, point); // Able if tile is empty
|
||||
|
||||
bool able_window(game *, point); // Any window tile
|
||||
bool able_make_window(game *, point); // Any window tile or empty
|
||||
bool able_empty_window(game *, point); // Empty window tiles
|
||||
bool able_window_pane(game *, point); // Only intact windows
|
||||
bool able_broken_window(game *, point); // Able if tile is broken window
|
||||
|
||||
bool able_door(game *, point); // Any door tile
|
||||
bool able_door_broken(game *, point); // Broken door
|
||||
|
||||
bool able_wall (game *, point); // Able if tile is wall
|
||||
bool able_wall_wood(game *g, point); // Only player-built walls
|
||||
|
||||
bool able_between_walls(game *, point); // Flood-fill contained by walls
|
||||
|
||||
bool able_dig(game *, point); // Able if diggable terrain
|
||||
bool able_chainlink(game *, point); // Able on chain link fences
|
||||
bool able_pit(game *, point); // Able only on pits
|
||||
|
||||
bool able_tree(game *, point); // Able on trees
|
||||
bool able_trunk(game *, point); // Able on tree trunks
|
||||
|
||||
bool able_move(game *, point); // Able on furniture
|
||||
|
||||
bool able_deconstruct(game *, point);
|
||||
|
||||
// Does anything special happen when we're finished?
|
||||
void done_nothing(game *, point) { }
|
||||
void done_window_pane(game *, point);
|
||||
void done_vehicle(game *, point);
|
||||
void done_tree(game *, point);
|
||||
void done_trunk_log(game *, point);
|
||||
void done_trunk_plank(game *, point);
|
||||
void done_move(game *, point);
|
||||
void done_tape(game *, point);
|
||||
void done_deconstruct(game *, point);
|
||||
|
||||
};
|
||||
@@ -0,0 +1,56 @@
|
||||
---
|
||||
layout: page
|
||||
title: "Contribution Guidelines"
|
||||
permalink: /contributions/
|
||||
---
|
||||
|
||||
# Contribute
|
||||
|
||||
**Opening a new issue?** Please read our [issue guidelines]({{ site.baseurl }}{% link pages/issues.md %}) first.
|
||||
|
||||
**Contributing code?** Check the [code contribution guidelines]({{ site.baseurl }}{% link pages/code_contributions.md %}).
|
||||
|
||||
**Investigating bugs?** These [debugging commands]({{ site.baseurl }}{% link pages/debugging.md %}) can help.
|
||||
|
||||
**Need help with git?** [git howto]({{ site.baseurl }}{% link pages/branch_management.md %}) might be what you're looking for.
|
||||
|
||||
Contributing code or data to Cataclysm: Dark Days Ahead is easy - simply fork the repository on our [GitHub](https://github.com/CleverRaven/Cataclysm-DDA/), make your changes, and then send us a pull request.
|
||||
|
||||
Cataclysm: Dark Days Ahead is released under the Creative Commons Attribution ShareAlike 3.0 license. The code and content of the game is free to use, modify, and redistribute for any purpose whatsoever. See [https://creativecommons.org/licenses/by-sa/3.0/](https://creativecommons.org/licenses/by-sa/3.0/) for details.
|
||||
This means any contribution you make to the project will also be covered by the same license, and this license is irrevocable.
|
||||
|
||||
## Guidelines
|
||||
|
||||
There are a couple of guidelines we suggest sticking to:
|
||||
|
||||
* Add the repository as an `upstream` remote.
|
||||
* Keep your `master` branch clean. This means you can easily pull changes made to this repository into yours.
|
||||
* Create a new branch for each new feature or set of related bug fixes.
|
||||
* Never merge from your local branches into your `master` branch. Only update `master` by pulling from `upstream/master`.
|
||||
|
||||
## Frequently Asked Questions
|
||||
|
||||
#### Why does `git pull --ff-only` result in an error?
|
||||
|
||||
If `git pull --ff-only` shows an error, it means that you've committed directly to your local `master` branch. To fix this, you can create a new branch with these commits, find the point at which you diverged from `upstream/master`, and then reset `master` to that point.
|
||||
|
||||
$ git pull --ff-only upstream master
|
||||
From https://github.com/CleverRaven/Cataclysm-DDA
|
||||
* branch master -> FETCH_HEAD
|
||||
fatal: Not possible to fast-forward, aborting.
|
||||
$ git branch new_branch master # mark the current commit with a tmp branch
|
||||
$ git merge-base master upstream/master
|
||||
cc31d0... # the last commit before we committed directly to master
|
||||
$ git reset --hard cc31d0....
|
||||
HEAD is now at cc31d0... ...
|
||||
|
||||
Now that `master` has been cleaned up, you can easily pull from `upstream/master`, and then continue working on `new_branch`.
|
||||
|
||||
$ git pull --ff-only upstream master
|
||||
# gets changes from the "upstream" remote for the matching branch, in this case "master"
|
||||
$ git checkout new_branch
|
||||
|
||||
#### How does the project work anyway?
|
||||
|
||||
I-am-Erk has written a guide outlining project governance.
|
||||
https://github.com/CleverRaven/Cataclysm-DDA/blob/master/doc/development_process.md
|
||||
-1638
File diff suppressed because it is too large
Load Diff
-67
@@ -1,67 +0,0 @@
|
||||
#ifndef _CRAFTING_H_
|
||||
#define _CRAFTING_H_
|
||||
|
||||
#include <string>
|
||||
#include <vector>
|
||||
#include <map>
|
||||
#include "itype.h"
|
||||
#include "skill.h"
|
||||
#include "rng.h"
|
||||
|
||||
#define MAX_DISPLAYED_RECIPES 18
|
||||
|
||||
typedef std::string craft_cat;
|
||||
|
||||
struct component
|
||||
{
|
||||
itype_id type;
|
||||
int count;
|
||||
int available; // -1 means the player doesn't have the item, 1 means they do,
|
||||
// 0 means they have item but not enough for both tool and component
|
||||
component() { type = "null"; count = 0; available = -1;}
|
||||
component(itype_id TYPE, int COUNT) : type (TYPE), count (COUNT), available(-1) {}
|
||||
};
|
||||
|
||||
struct recipe {
|
||||
std::string ident;
|
||||
int id;
|
||||
itype_id result;
|
||||
craft_cat cat;
|
||||
Skill *sk_primary;
|
||||
Skill *sk_secondary;
|
||||
int difficulty;
|
||||
int time;
|
||||
bool reversible; // can the item be disassembled?
|
||||
bool autolearn; // do we learn it just by leveling skills?
|
||||
int learn_by_disassembly; // what level (if any) do we learn it by disassembly?
|
||||
|
||||
std::vector<std::vector<component> > tools;
|
||||
std::vector<std::vector<component> > components;
|
||||
|
||||
recipe() {
|
||||
id = 0;
|
||||
result = "null";
|
||||
sk_primary = NULL;
|
||||
sk_secondary = NULL;
|
||||
difficulty = 0;
|
||||
time = 0;
|
||||
reversible = false;
|
||||
autolearn = false;
|
||||
}
|
||||
|
||||
recipe(std::string pident, int pid, itype_id pres, craft_cat pcat, std::string &p1,
|
||||
std::string &p2, int pdiff, int ptime, bool preversible, bool pautolearn,
|
||||
int plearn_dis) :
|
||||
ident (pident), id (pid), result (pres), cat(pcat), difficulty (pdiff), time (ptime),
|
||||
reversible (preversible), autolearn (pautolearn), learn_by_disassembly (plearn_dis)
|
||||
{
|
||||
sk_primary = p1.size()?Skill::skill(p1):NULL;
|
||||
sk_secondary = p2.size()?Skill::skill(p2):NULL;
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
typedef std::vector<recipe*> recipe_list;
|
||||
typedef std::map<craft_cat, recipe_list> recipe_map;
|
||||
|
||||
#endif
|
||||
-12
@@ -1,12 +0,0 @@
|
||||
#ifndef _CURSES_DEF_H_
|
||||
#define _CURSES_DEF_H_
|
||||
|
||||
#if (defined TILES || defined _WIN32 || defined WINDOWS)
|
||||
#include "catacurse.h"
|
||||
#elif (defined __CYGWIN__)
|
||||
#include "ncurses/curses.h"
|
||||
#else
|
||||
#include <curses.h>
|
||||
#endif
|
||||
|
||||
#endif // CURSES_DEF_H
|
||||
-604
@@ -1,604 +0,0 @@
|
||||
#if (defined TILES || defined _WIN32 || defined WINDOWS)
|
||||
#include "catacurse.h"
|
||||
#include "output.h"
|
||||
#include "color.h"
|
||||
#include "catacharset.h"
|
||||
|
||||
//***********************************
|
||||
//Globals *
|
||||
//***********************************
|
||||
|
||||
WINDOW *mainwin;
|
||||
pairs *colorpairs; //storage for pair'ed colored, should be dynamic, meh
|
||||
int echoOn; //1 = getnstr shows input, 0 = doesn't show. needed for echo()-ncurses compatibility.
|
||||
|
||||
//***********************************
|
||||
//Psuedo-Curses Functions *
|
||||
//***********************************
|
||||
|
||||
//Basic Init, create the font, backbuffer, etc
|
||||
WINDOW *initscr(void)
|
||||
{
|
||||
return curses_init();
|
||||
}
|
||||
|
||||
WINDOW *newwin(int nlines, int ncols, int begin_y, int begin_x)
|
||||
{
|
||||
if (begin_y < 0 || begin_x < 0) {
|
||||
return NULL; //it's the caller's problem now (since they have logging functions declared)
|
||||
}
|
||||
|
||||
// default values
|
||||
if (ncols == 0)
|
||||
{
|
||||
ncols = TERMX - begin_x;
|
||||
}
|
||||
if (nlines == 0)
|
||||
{
|
||||
nlines = TERMY - begin_y;
|
||||
}
|
||||
|
||||
int i,j;
|
||||
WINDOW *newwindow = new WINDOW;
|
||||
//newwindow=&_windows[WindowCount];
|
||||
newwindow->x=begin_x;
|
||||
newwindow->y=begin_y;
|
||||
newwindow->width=ncols;
|
||||
newwindow->height=nlines;
|
||||
newwindow->inuse=true;
|
||||
newwindow->draw=false;
|
||||
newwindow->BG=0;
|
||||
newwindow->FG=8;
|
||||
newwindow->cursorx=0;
|
||||
newwindow->cursory=0;
|
||||
newwindow->line = new curseline[nlines];
|
||||
|
||||
for (j=0; j<nlines; j++)
|
||||
{
|
||||
newwindow->line[j].chars= new char[ncols*4];
|
||||
newwindow->line[j].FG= new char[ncols];
|
||||
newwindow->line[j].BG= new char[ncols];
|
||||
newwindow->line[j].touched=true;//Touch them all !?
|
||||
newwindow->line[j].width_in_bytes = ncols;
|
||||
for (i=0; i<ncols; i++)
|
||||
{
|
||||
newwindow->line[j].chars[i]=0;
|
||||
newwindow->line[j].chars[i+1]=0;
|
||||
newwindow->line[j].chars[i+2]=0;
|
||||
newwindow->line[j].chars[i+3]=0;
|
||||
newwindow->line[j].FG[i]=0;
|
||||
newwindow->line[j].BG[i]=0;
|
||||
}
|
||||
}
|
||||
//WindowCount++;
|
||||
return newwindow;
|
||||
}
|
||||
|
||||
//Deletes the window and marks it as free. Clears it just in case.
|
||||
int delwin(WINDOW *win)
|
||||
{
|
||||
int j;
|
||||
win->inuse=false;
|
||||
win->draw=false;
|
||||
for (j=0; j<win->height; j++){
|
||||
delete win->line[j].chars;
|
||||
delete win->line[j].FG;
|
||||
delete win->line[j].BG;
|
||||
}
|
||||
delete win->line;
|
||||
delete win;
|
||||
return 1;
|
||||
}
|
||||
|
||||
inline int newline(WINDOW *win){
|
||||
if (win->cursory < win->height - 1){
|
||||
win->cursory++;
|
||||
win->cursorx=0;
|
||||
return 1;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
inline void addedchar(WINDOW *win){
|
||||
win->cursorx++;
|
||||
win->line[win->cursory].touched=true;
|
||||
if (win->cursorx > win->width)
|
||||
newline(win);
|
||||
}
|
||||
|
||||
|
||||
//Borders the window with fancy lines!
|
||||
int wborder(WINDOW *win, chtype ls, chtype rs, chtype ts, chtype bs, chtype tl, chtype tr, chtype bl, chtype br)
|
||||
{
|
||||
/*
|
||||
ncurses does not do this, and this prevents: wattron(win, c_customBordercolor); wborder(win, ...); wattroff(win, c_customBorderColor);
|
||||
wattron(win, c_white);
|
||||
*/
|
||||
int i, j;
|
||||
int oldx=win->cursorx;//methods below move the cursor, save the value!
|
||||
int oldy=win->cursory;//methods below move the cursor, save the value!
|
||||
if (ls>0)
|
||||
for (j=1; j<win->height-1; j++)
|
||||
mvwaddch(win, j, 0, LINE_XOXO);
|
||||
if (rs>0)
|
||||
for (j=1; j<win->height-1; j++)
|
||||
mvwaddch(win, j, win->width-1, LINE_XOXO);
|
||||
if (ts>0)
|
||||
for (i=1; i<win->width-1; i++)
|
||||
mvwaddch(win, 0, i, LINE_OXOX);
|
||||
if (bs>0)
|
||||
for (i=1; i<win->width-1; i++)
|
||||
mvwaddch(win, win->height-1, i, LINE_OXOX);
|
||||
if (tl>0)
|
||||
mvwaddch(win,0, 0, LINE_OXXO);
|
||||
if (tr>0)
|
||||
mvwaddch(win,0, win->width-1, LINE_OOXX);
|
||||
if (bl>0)
|
||||
mvwaddch(win,win->height-1, 0, LINE_XXOO);
|
||||
if (br>0)
|
||||
mvwaddch(win,win->height-1, win->width-1, LINE_XOOX);
|
||||
//_windows[w].cursorx=oldx;//methods above move the cursor, put it back
|
||||
//_windows[w].cursory=oldy;//methods above move the cursor, put it back
|
||||
wmove(win,oldy,oldx);
|
||||
wattroff(win, c_white);
|
||||
return 1;
|
||||
}
|
||||
|
||||
//Refreshes a window, causing it to redraw on top.
|
||||
int wrefresh(WINDOW *win)
|
||||
{
|
||||
if (win==0) win=mainwin;
|
||||
if (win->draw)
|
||||
curses_drawwindow(win);
|
||||
return 1;
|
||||
}
|
||||
|
||||
//Refreshes window 0 (stdscr), causing it to redraw on top.
|
||||
int refresh(void)
|
||||
{
|
||||
return wrefresh(mainwin);
|
||||
}
|
||||
|
||||
int getch(void)
|
||||
{
|
||||
return wgetch(mainwin);
|
||||
}
|
||||
|
||||
int wgetch(WINDOW* win)
|
||||
{
|
||||
return curses_getch(win);
|
||||
}
|
||||
|
||||
int mvgetch(int y, int x)
|
||||
{
|
||||
move(y,x);
|
||||
return getch();
|
||||
}
|
||||
|
||||
int mvwgetch(WINDOW* win, int y, int x)
|
||||
{
|
||||
move(y, x);
|
||||
return wgetch(win);
|
||||
}
|
||||
|
||||
int getnstr(char *str, int size)
|
||||
{
|
||||
int startX = mainwin->cursorx;
|
||||
int count = 0;
|
||||
char input;
|
||||
while(true)
|
||||
{
|
||||
input = getch();
|
||||
// Carriage return, Line feed and End of File terminate the input.
|
||||
if( input == '\r' || input == '\n' || input == '\x04' )
|
||||
{
|
||||
str[count] = '\x00';
|
||||
return count;
|
||||
}
|
||||
else if( input == 127 ) // Backspace, remapped from \x8 in ProcessMessages()
|
||||
{
|
||||
if( count == 0 )
|
||||
continue;
|
||||
str[count] = '\x00';
|
||||
if(echoOn == 1)
|
||||
mvaddch(mainwin->cursory, startX + count, ' ');
|
||||
--count;
|
||||
if(echoOn == 1)
|
||||
move(mainwin->cursory, startX + count);
|
||||
}
|
||||
else
|
||||
{
|
||||
if( count >= size - 1 ) // Still need space for trailing 0x00
|
||||
continue;
|
||||
str[count] = input;
|
||||
++count;
|
||||
if(echoOn == 1)
|
||||
{
|
||||
move(mainwin->cursory, startX + count);
|
||||
mvaddch(mainwin->cursory, startX + count, input);
|
||||
}
|
||||
}
|
||||
}
|
||||
return count;
|
||||
}
|
||||
|
||||
//The core printing function, prints characters to the array, and sets colors
|
||||
inline int printstring(WINDOW *win, char *fmt)
|
||||
{
|
||||
int size = strlen(fmt);
|
||||
if(size>0)
|
||||
{
|
||||
int j, i, p=win->cursorx;
|
||||
int x = (win->line[win->cursory].width_in_bytes==win->width)?win->cursorx:cursorx_to_position(win->line[win->cursory].chars, win->cursorx, &p);
|
||||
|
||||
if(p!=x)//so we start inside a wide character, erase it for good
|
||||
{
|
||||
const char* ts = win->line[win->cursory].chars+p;
|
||||
int len = ANY_LENGTH;
|
||||
unsigned tc = UTF8_getch(&ts, &len);
|
||||
int tw = mk_wcwidth((wchar_t)tc);
|
||||
erease_utf8_by_cw(win->line[win->cursory].chars+p, tw, tw, win->width*4-p-1);
|
||||
x = p+tw-1;
|
||||
}
|
||||
for (j=0; j<size; j++){
|
||||
if (!(fmt[j]==10)){//check that this isnt a newline char
|
||||
const char* utf8str = fmt+j;
|
||||
int len = ANY_LENGTH;
|
||||
unsigned ch = UTF8_getch(&utf8str, &len);
|
||||
int cw = mk_wcwidth((wchar_t)ch);
|
||||
len = ANY_LENGTH-len;
|
||||
if(cw<1) cw = 1;
|
||||
if(len<1) len = 1;
|
||||
if (win->cursorx+cw <= win->width && win->cursory <= win->height - 1) {
|
||||
win->line[win->cursory].width_in_bytes += erease_utf8_by_cw(win->line[win->cursory].chars+x, cw, len, win->width*4-x-1);
|
||||
for(i=0; i<len; i++)
|
||||
{
|
||||
win->line[win->cursory].chars[x+i]=fmt[j+i];
|
||||
}
|
||||
for(i=0; i<cw; i++)
|
||||
{
|
||||
win->line[win->cursory].FG[win->cursorx]=win->FG;
|
||||
win->line[win->cursory].BG[win->cursorx]=win->BG;
|
||||
addedchar(win);
|
||||
}
|
||||
win->line[win->cursory].touched=true;
|
||||
j += len-1;
|
||||
x+=len;
|
||||
} else if (win->cursory <= win->height - 1) {
|
||||
// don't write outside the window, but don't abort if there are still lines to write.
|
||||
//j += len-1;
|
||||
//x+=len;
|
||||
} else {
|
||||
return 0; //if we try and write anything outside the window, abort completely
|
||||
}
|
||||
} else {// if the character is a newline, make sure to move down a line
|
||||
if (newline(win)==0){
|
||||
return 0;
|
||||
}
|
||||
x = 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
win->draw=true;
|
||||
return 1;
|
||||
}
|
||||
|
||||
//Prints a formatted string to a window at the current cursor, base function
|
||||
int wprintw(WINDOW *win, const char *fmt, ...)
|
||||
{
|
||||
va_list args;
|
||||
va_start(args, fmt);
|
||||
char printbuf[2048];
|
||||
vsnprintf(printbuf, 2047, fmt, args);
|
||||
va_end(args);
|
||||
return printstring(win,printbuf);
|
||||
}
|
||||
|
||||
//Prints a formatted string to a window, moves the cursor
|
||||
int mvwprintw(WINDOW *win, int y, int x, const char *fmt, ...)
|
||||
{
|
||||
va_list args;
|
||||
va_start(args, fmt);
|
||||
char printbuf[2048];
|
||||
vsnprintf(printbuf, 2047, fmt, args);
|
||||
va_end(args);
|
||||
if (wmove(win,y,x)==0) return 0;
|
||||
return printstring(win,printbuf);
|
||||
}
|
||||
|
||||
//Prints a formatted string to window 0 (stdscr), moves the cursor
|
||||
int mvprintw(int y, int x, const char *fmt, ...)
|
||||
{
|
||||
va_list args;
|
||||
va_start(args, fmt);
|
||||
char printbuf[2048];
|
||||
vsnprintf(printbuf, 2047, fmt, args);
|
||||
va_end(args);
|
||||
if (move(y,x)==0) return 0;
|
||||
return printstring(mainwin,printbuf);
|
||||
}
|
||||
|
||||
//Prints a formatted string to window 0 (stdscr) at the current cursor
|
||||
int printw(const char *fmt, ...)
|
||||
{
|
||||
va_list args;
|
||||
va_start(args, fmt);
|
||||
char printbuf[2078];
|
||||
vsnprintf(printbuf, 2047, fmt, args);
|
||||
va_end(args);
|
||||
return printstring(mainwin,printbuf);
|
||||
}
|
||||
|
||||
//erases a window of all text and attributes
|
||||
int werase(WINDOW *win)
|
||||
{
|
||||
int j,i;
|
||||
for (j=0; j<win->height; j++)
|
||||
{
|
||||
for (i=0; i<win->width; i++) {
|
||||
win->line[j].chars[i]=0;
|
||||
win->line[j].chars[i+1]=0;
|
||||
win->line[j].chars[i+2]=0;
|
||||
win->line[j].chars[i+3]=0;
|
||||
win->line[j].FG[i]=0;
|
||||
win->line[j].BG[i]=0;
|
||||
}
|
||||
win->line[j].touched=true;
|
||||
win->line[j].width_in_bytes = win->width;
|
||||
}
|
||||
win->draw=true;
|
||||
wmove(win,0,0);
|
||||
// wrefresh(win);
|
||||
return 1;
|
||||
}
|
||||
|
||||
//erases window 0 (stdscr) of all text and attributes
|
||||
int erase(void)
|
||||
{
|
||||
return werase(mainwin);
|
||||
}
|
||||
|
||||
//pairs up a foreground and background color and puts it into the array of pairs
|
||||
int init_pair(short pair, short f, short b)
|
||||
{
|
||||
colorpairs[pair].FG=f;
|
||||
colorpairs[pair].BG=b;
|
||||
return 1;
|
||||
}
|
||||
|
||||
//moves the cursor in a window
|
||||
int wmove(WINDOW *win, int y, int x)
|
||||
{
|
||||
if (x>=win->width)
|
||||
{return 0;}//FIXES MAP CRASH -> >= vs > only
|
||||
if (y>=win->height)
|
||||
{return 0;}// > crashes?
|
||||
if (y<0)
|
||||
{return 0;}
|
||||
if (x<0)
|
||||
{return 0;}
|
||||
win->cursorx=x;
|
||||
win->cursory=y;
|
||||
return 1;
|
||||
}
|
||||
|
||||
//Clears windows 0 (stdscr) I'm not sure if its suppose to do this?
|
||||
int clear(void)
|
||||
{
|
||||
return wclear(mainwin);
|
||||
}
|
||||
|
||||
//Ends the terminal, destroy everything
|
||||
int endwin(void)
|
||||
{
|
||||
return curses_destroy();
|
||||
}
|
||||
|
||||
//adds a character to the window
|
||||
int mvwaddch(WINDOW *win, int y, int x, const chtype ch)
|
||||
{
|
||||
if (wmove(win,y,x)==0) return 0;
|
||||
return waddch(win, ch);
|
||||
}
|
||||
|
||||
//clears a window
|
||||
int wclear(WINDOW *win)
|
||||
{
|
||||
werase(win);
|
||||
clearok(win);
|
||||
return 1;
|
||||
}
|
||||
|
||||
int clearok(WINDOW *win)
|
||||
{
|
||||
for (int i=0; i<win->y; i++)
|
||||
{
|
||||
win->line[i].touched = true;
|
||||
}
|
||||
return 1;
|
||||
}
|
||||
|
||||
//gets the max x of a window (the width)
|
||||
int getmaxx(WINDOW *win)
|
||||
{
|
||||
if (win==0) return mainwin->width; //StdScr
|
||||
return win->width;
|
||||
}
|
||||
|
||||
//gets the max y of a window (the height)
|
||||
int getmaxy(WINDOW *win)
|
||||
{
|
||||
if (win==0) return mainwin->height; //StdScr
|
||||
return win->height;
|
||||
}
|
||||
|
||||
//gets the beginning x of a window (the x pos)
|
||||
int getbegx(WINDOW *win)
|
||||
{
|
||||
if (win==0) return mainwin->x; //StdScr
|
||||
return win->x;
|
||||
}
|
||||
|
||||
//gets the beginning y of a window (the y pos)
|
||||
int getbegy(WINDOW *win)
|
||||
{
|
||||
if (win==0) return mainwin->y; //StdScr
|
||||
return win->y;
|
||||
}
|
||||
|
||||
int start_color(void)
|
||||
{
|
||||
return curses_start_color();
|
||||
}
|
||||
|
||||
int keypad(WINDOW *faux, bool bf)
|
||||
{
|
||||
return 1;
|
||||
}
|
||||
|
||||
int cbreak(void)
|
||||
{
|
||||
return 1;
|
||||
}
|
||||
int keypad(int faux, bool bf)
|
||||
{
|
||||
return 1;
|
||||
}
|
||||
int curs_set(int visibility)
|
||||
{
|
||||
return 1;
|
||||
}
|
||||
|
||||
int mvaddch(int y, int x, const chtype ch)
|
||||
{
|
||||
return mvwaddch(mainwin,y,x,ch);
|
||||
}
|
||||
|
||||
int wattron(WINDOW *win, int attrs)
|
||||
{
|
||||
bool isBold = !!(attrs & A_BOLD);
|
||||
bool isBlink = !!(attrs & A_BLINK);
|
||||
int pairNumber = (attrs & A_COLOR) >> 17;
|
||||
win->FG=colorpairs[pairNumber].FG;
|
||||
win->BG=colorpairs[pairNumber].BG;
|
||||
if (isBold) win->FG += 8;
|
||||
if (isBlink) win->BG += 8;
|
||||
return 1;
|
||||
}
|
||||
int wattroff(WINDOW *win, int attrs)
|
||||
{
|
||||
win->FG=8; //reset to white
|
||||
win->BG=0; //reset to black
|
||||
return 1;
|
||||
}
|
||||
int attron(int attrs)
|
||||
{
|
||||
return wattron(mainwin, attrs);
|
||||
}
|
||||
int attroff(int attrs)
|
||||
{
|
||||
return wattroff(mainwin,attrs);
|
||||
}
|
||||
int waddch(WINDOW *win, const chtype ch)
|
||||
{
|
||||
char charcode;
|
||||
charcode=ch;
|
||||
|
||||
switch (ch){ //LINE_NESW - X for on, O for off
|
||||
case LINE_XOXO: //#define LINE_XOXO 4194424
|
||||
charcode=LINE_XOXO_C;
|
||||
break;
|
||||
case LINE_OXOX: //#define LINE_OXOX 4194417
|
||||
charcode=LINE_OXOX_C;
|
||||
break;
|
||||
case LINE_XXOO: //#define LINE_XXOO 4194413
|
||||
charcode=LINE_XXOO_C;
|
||||
break;
|
||||
case LINE_OXXO: //#define LINE_OXXO 4194412
|
||||
charcode=LINE_OXXO_C;
|
||||
break;
|
||||
case LINE_OOXX: //#define LINE_OOXX 4194411
|
||||
charcode=LINE_OOXX_C;
|
||||
break;
|
||||
case LINE_XOOX: //#define LINE_XOOX 4194410
|
||||
charcode=LINE_XOOX_C;
|
||||
break;
|
||||
case LINE_XXOX: //#define LINE_XXOX 4194422
|
||||
charcode=LINE_XXOX_C;
|
||||
break;
|
||||
case LINE_XXXO: //#define LINE_XXXO 4194420
|
||||
charcode=LINE_XXXO_C;
|
||||
break;
|
||||
case LINE_XOXX: //#define LINE_XOXX 4194421
|
||||
charcode=LINE_XOXX_C;
|
||||
break;
|
||||
case LINE_OXXX: //#define LINE_OXXX 4194423
|
||||
charcode=LINE_OXXX_C;
|
||||
break;
|
||||
case LINE_XXXX: //#define LINE_XXXX 4194414
|
||||
charcode=LINE_XXXX_C;
|
||||
break;
|
||||
default:
|
||||
charcode = (char)ch;
|
||||
break;
|
||||
}
|
||||
|
||||
|
||||
int cury=win->cursory;
|
||||
int p = win->cursorx;
|
||||
int curx=(win->line[cury].width_in_bytes==win->width)?win->cursorx:cursorx_to_position(win->line[cury].chars, win->cursorx, &p);
|
||||
|
||||
if(curx!=p)
|
||||
{
|
||||
const char* ts = win->line[cury].chars+p;
|
||||
int len = ANY_LENGTH;
|
||||
unsigned tc = UTF8_getch(&ts, &len);
|
||||
int tw = mk_wcwidth((wchar_t)tc);
|
||||
win->line[cury].width_in_bytes += erease_utf8_by_cw(win->line[cury].chars+p, tw, tw, win->width*4-p-1);
|
||||
curx = p+tw-1;
|
||||
}
|
||||
else if(win->line[cury].width_in_bytes!=win->width)
|
||||
{
|
||||
win->line[cury].width_in_bytes += erease_utf8_by_cw(win->line[cury].chars+p, 1, 1, win->width*4-p-1);
|
||||
}
|
||||
|
||||
//if (win2 > -1){
|
||||
win->line[cury].chars[curx]=charcode;
|
||||
win->line[cury].FG[win->cursorx]=win->FG;
|
||||
win->line[cury].BG[win->cursorx]=win->BG;
|
||||
|
||||
|
||||
win->draw=true;
|
||||
addedchar(win);
|
||||
return 1;
|
||||
// else{
|
||||
// win2=win2+1;
|
||||
|
||||
}
|
||||
|
||||
//Move the cursor of windows 0 (stdscr)
|
||||
int move(int y, int x)
|
||||
{
|
||||
return wmove(mainwin,y,x);
|
||||
}
|
||||
|
||||
//Set the amount of time getch waits for input
|
||||
void timeout(int delay)
|
||||
{
|
||||
curses_timeout(delay);
|
||||
}
|
||||
void set_escdelay(int delay) { } //PORTABILITY, DUMMY FUNCTION
|
||||
|
||||
|
||||
int echo()
|
||||
{
|
||||
echoOn = 1;
|
||||
return 0; // 0 = OK, -1 = ERR
|
||||
}
|
||||
|
||||
int noecho()
|
||||
{
|
||||
echoOn = 0;
|
||||
return 0;
|
||||
}
|
||||
#endif
|
||||
@@ -1,3 +0,0 @@
|
||||
# These are both generated if missing at program startup
|
||||
keymap.txt
|
||||
options.txt
|
||||
@@ -1,3 +0,0 @@
|
||||
Terminus
|
||||
8
|
||||
16
|
||||
-179
@@ -1,179 +0,0 @@
|
||||
%
|
||||
Our chemical department has made great strides in the production of a
|
||||
concentrated mutagen, derived from samples of mutated individuals. This
|
||||
substance has been denoted PE012.
|
||||
%
|
||||
Our chemical department has perfected an untargeted stem cell treatment.
|
||||
Consumption of the treatment will reverse the effects of mutation, and may
|
||||
even cure congenital defects. This substance has been denoted PE018.
|
||||
%
|
||||
Both PE012 and PE018 show great stability. A subject was exposed to both
|
||||
substances, alternating between the mutagen and the purifier. Ultimately, the
|
||||
subject returned to baseline state with no apparent side effects.
|
||||
%
|
||||
We have made a fascinating discovery; by creating a miniature portal with low
|
||||
stability and high power, one can transpose into the 4th dimension and return
|
||||
immediately, but shifted by several meters. Our subjects oscillated so
|
||||
quickly that none were even aware that they had visited lower planes.
|
||||
%
|
||||
Our research on teleportation has ground to a halt. For some reason, the
|
||||
creation of a long-range transportation device eludes us, and one can transfer
|
||||
no further than 30 meters.
|
||||
%
|
||||
I don't know how it happened, but a janitor managed to activate the portal
|
||||
while cleaning the lab, shifting in an assortment of prehistoric fauna.
|
||||
Security was called in immediately but was unable to save the janitor from
|
||||
being torn apart. By the time the confusion settled, all the fauna had been
|
||||
terminated.
|
||||
%
|
||||
Tests on the prehistoric fauna show extremely close genetic relationships with
|
||||
extant and extinct terranian animals. It might be that the portal had performed
|
||||
a transposition in time, unfortunately the portal device was destroyed when
|
||||
security put down the fauna.
|
||||
%
|
||||
An incident occurred in the teleportation lab, wherein a subject managed to
|
||||
teleport into another subject. The latter was completely destroyed from the
|
||||
inside out, while the former sustained little damage. I would like to explore
|
||||
the phenomenon further, but subjects are expensive.
|
||||
%
|
||||
Test subjects in the teleportation department are showing alarming symptoms.
|
||||
It seems prolonged rapid transposition along the 4th dimension weakens the
|
||||
forces holding one on this plane.
|
||||
%
|
||||
Catastrophe struck in our teleportation department yesterday. It seems that
|
||||
our test subjects are so detached from this plane that they create occasional
|
||||
tunnels along the 4th dimension, allowing life forms to transfer to this
|
||||
plane. All subjects with prolonged exposure have been terminated.
|
||||
%
|
||||
Our lifeform extraction program continues to produce samples of specimen
|
||||
XE037. It seems to be a kind of living, semi-sentient primordial ooze, and is
|
||||
the basis of much of the life we have found.
|
||||
%
|
||||
Specimen XE037, jokingly referred to as "the blob", has been observed entering
|
||||
a kind of dormant state, forming a depression in the floor. Hendelson stepped
|
||||
into one of these pits yesterday, and was immediately coated and attacked.
|
||||
%
|
||||
XE037 shows promise as a catalyst for both cloning and treatments that mimic
|
||||
stem cells. This is further evidence supporting Hendelson's theory of a near
|
||||
universal symbiotic relationship involving XE037.
|
||||
%
|
||||
Several of the more advanced specimens we have retrieved show stunning
|
||||
similarity to XE037. XE142 and XE157 in particular show the same amorphous,
|
||||
slime-like structure as XE037, suggesting a close genetic relationship.
|
||||
%
|
||||
Today we tested weaponry against XE142 and XE157, two amorphous subprime
|
||||
samples. Their form proved to be nearly invulnerable to projectile based
|
||||
weaponry, but they were susceptible to directed energy weapons and flagration.
|
||||
%
|
||||
Our cloning department has failed to produce results. In vats containing stem
|
||||
cell treatments, XE037, and control vats, the subjects simple disintegrated.
|
||||
This suggests that XE037, while compatible with subprime lifeforms, shows only
|
||||
destructive effects on prime plane lifeforms.
|
||||
%
|
||||
The vivisection program has shown mixed results, revealing an incredible
|
||||
degree of variation in subplane lifeforms. Certain specimens have an internal
|
||||
structure that is amazingly similar to that of mammals, while others seem to
|
||||
have no internal structure at all.
|
||||
%
|
||||
Our security department has identified several key flaws. Though our surface
|
||||
entrance is quite secure, there are several possible points of entry below
|
||||
the surface, particularly in the sewage systems.
|
||||
%
|
||||
Today we applied a very small sample of XE037, suspended in water, to subject
|
||||
TP92, prior to necessary termination. During the postmortem examination, the
|
||||
subject went through a revivification progress, but displayed next to no human
|
||||
intelligence.
|
||||
%
|
||||
Mendelson shows a dismaying lack of organization and security consciousness.
|
||||
Containment of all samples of XE037 is of critical importance, as shown by
|
||||
contamination experiments.
|
||||
%
|
||||
Mendelson has been terminated following an incident with XE037. A substantial
|
||||
mobile sample departed his lab and encountered our security forces. Before
|
||||
the sample was destroyed, it managed to kill two men. Alarmingly, their
|
||||
corpses displayed mobility and extreme aggression.
|
||||
%
|
||||
We have created a new department to investigate the effects of XE037 on the
|
||||
human body, specifically to examine the revivification effect observed on two
|
||||
prior occasions. Sadly, our human subject pool is dwindling due to the short
|
||||
lifespan of subjects in this program. More will be acquired soon.
|
||||
%
|
||||
Testing XE037 on non-human mammal subjects does not appear to display the same
|
||||
revivifying effect, oddly enough. Acquiring non-human subjects, sadly, is a
|
||||
long and costly process, and research into this area is lacking.
|
||||
%
|
||||
After our curious results with testing XE037 on non-human mammals, we decided
|
||||
to introduce the substance to some of the insects which have found their way
|
||||
into the lab. Horrifyingly, XE037 caused near-instant mutation and gigantism
|
||||
in the insects, and security intervention was required.
|
||||
%
|
||||
Program S37ZBE, investigation of XE037 on inert human bodies, is making great
|
||||
strides. Recently we found that XE037 has no effect when introduced to a
|
||||
deceased body; revivification only occurs when the subject is exposed to XE037
|
||||
prior to expiration.
|
||||
%
|
||||
S37ZBE, the special investigation into the effects of XE037 on inert human
|
||||
bodies, has made terrific discoveries. It seems that it occasionally displays
|
||||
a mutagenic property which manifests itself after termination of the subject,
|
||||
resulting in a striking variety in postmortem morphology.
|
||||
%
|
||||
S37ZBE may be put on indefinite hold shortly. Postmortem morphological
|
||||
changes have reached extreme levels; this morning one subject nearly doubled
|
||||
in size, acquiring enough strength to reduce a concrete wall to rubble. It
|
||||
required a 6 man team, heavily armed, to re-terminate the subject.
|
||||
%
|
||||
Jakobson insists that S37ZBE must continue, despite the extreme security and
|
||||
safety risks. Nearly half of our security forces have been redirected to the
|
||||
S37ZBE project, simply to deal with the occasional escape of a subject.
|
||||
%
|
||||
Jakobson was killed today by one of S37ZBE's subjects; ironic considering how
|
||||
hard he fought to keep the project active. Alarmingly, his corpse revivified
|
||||
immediately. This suggests that XE037 may have contaminated the lab at large.
|
||||
%
|
||||
Termination of a subject which was never a part of S37ZBE has confirmed my
|
||||
fears. XE037 has contaminated most, if not all of the laboratory, most
|
||||
likely via the water supply. Research has started immediately into a process
|
||||
to destroy XE037 within the human body.
|
||||
%
|
||||
Despite a wide variety of treatments, we have been completely unsuccessful in
|
||||
removing XE037 from human subjects. Every individual displayed revivification
|
||||
post termination. Interestingly, XE037 seems to be completely inert prior to
|
||||
termination.
|
||||
%
|
||||
We have finally found success in S37BEP, our emergency investigation into the
|
||||
destruction of XE037 in living subjects. 8 of 10 of the subjects showed no
|
||||
revivification, despite confirmed dosages of XE037.
|
||||
%
|
||||
PE062, our "cure" for XE037 contamination, has neared perfection. Sadly, the
|
||||
production of PE062 is a costly and time-consuming process. What is more, the
|
||||
substance shows no effect on postmortem subjects whatsoever; a substance which
|
||||
renders XE037 inert after it has activated would be immensely useful in the
|
||||
case of an outbreak.
|
||||
%
|
||||
An alarming discovery has been made. A colony of XE037 has formed nearly a
|
||||
half mile from the laboratory. It is unclear how it escaped; it is quite
|
||||
possible that it is in the ground water now.
|
||||
%
|
||||
An emergency meeting was held today to discuss the possible implications of
|
||||
widespread XE037 contamination. It was agreed that neutralization must be
|
||||
instated immediately to prevent a catastrophic event.
|
||||
%
|
||||
It has begun. The XE037 contamination has spread for miles, and those who
|
||||
have since deceased have revivified. It is my fear that extremely large
|
||||
populations will be decimated by this pandemic. We must find a way to remove
|
||||
XE037 from revivified bodies.
|
||||
%
|
||||
We have even more distressing news than the widespread XE037 contamination,
|
||||
there are reports of the XE037 mutating into various new variants. See
|
||||
data files on XE037a - XE037f. Research on the effects of these variants
|
||||
is ongoing. We do know that XE037d shows signs of PE062 immunity, and
|
||||
XE037b can revive various breeds of canines. However, revival is not
|
||||
as guaranteed as standard XE037 humanoid infection. Canine body size seems
|
||||
to influence the chances. See experiment tXE037b_c.
|
||||
%
|
||||
Today we found our solution, quite by accident. It was found that XE037 is
|
||||
completely removed from a revivified body following a series of extremely-high
|
||||
energy 4th dimensional transpositions. Unfortunately, this invariably allows
|
||||
subplane life forms to pass into the prime plan. The cure is worse than the
|
||||
disease.
|
||||
%
|
||||
-186
@@ -1,186 +0,0 @@
|
||||
Squirrels are pretty yummy, but if you shoot them with a high-powered gun you'll probably be left with no meat! Use a BB gun or maybe a .22 rifle.
|
||||
|
||||
Ever run into those big worm things? If you see trails of churned-up dirt, you can be sure they're around.
|
||||
|
||||
I got chased last week by some big digging creature. I couldn't see it, but I could tell where it was by the trail of churned-up earth.
|
||||
|
||||
Try to stay on the roads as much as you can. Giant worms can't cross them!
|
||||
|
||||
Don't relax after killing a giant worm. Little bits of them can break off and still attack!
|
||||
|
||||
If you see a big mob of zombies coming, RUN! Trying to fight them all is suicide unless you have a big tactical advantage.
|
||||
|
||||
Watch out for those zombies that shriek; they'll let other zombies know where you are, and will attract them from all over.
|
||||
|
||||
Those acid-spitting zombies are pretty nasty, but if you're smart, you can get other zombies to wade through the acid.
|
||||
|
||||
If there's a pool of acid blocking your way, trying tossing a junk item into it. Eating up items will help neutralize the acid faster.
|
||||
|
||||
There's this type of zombie that can shoot bolts of lightning! Stay away from walls and stuff when they do... the electricity can travel along solid surfaces.
|
||||
|
||||
Zombie hulks are NASTY, but they're easy to outsmart. If there's other monsters between you and them, they'll kill the monster for you!
|
||||
|
||||
If you run into a zombie hulk, it's probably a good idea to run. They're fast as hell, but pretty dumb; they'll try to smash through obstacles rather than going around, and that slows them down a lot.
|
||||
|
||||
Zombie brutes and hulks have really tough hide. Don't bother shooting at them with lower-caliber guns, the bullet will bounce right off!
|
||||
|
||||
Try not to kill a boomer if it's standing right next to you. They tend to explode when they die, and that pink goop will get all over you.
|
||||
|
||||
Skeletons are a tough target. They're so skinny and full of holes that bullets fired at them will usually just fly right past.
|
||||
|
||||
Skeletons are too delicate to smash through doors or windows. They also can't smell you, unlike zombies, so if you turn your light off at night you can sneak right past.
|
||||
|
||||
Don't try to take on a skeleton with a bladed weapon... you'll just leave scratch marks. You've got to shatter those bones with a hammer or something.
|
||||
|
||||
It's a good idea to butcher corpses if you have the time, even if you don't plan on eating them. I've seen these weird zombies bring their friends back from the dead!
|
||||
|
||||
Triffids are tough. They've got natural armor, and it takes a lot to bring them down. I don't recommend getting into a fight with them.
|
||||
|
||||
Triffids can't see! They figure out where you are by your smell, but if you mask it with smoke or something, you're as good as invisible.
|
||||
|
||||
I figured out how to take care of those triffids! Let me just say this: they're made of wood, and wood and fire don't mix.
|
||||
|
||||
Have you heard about those queen triffids? You gotta keep your distance from them, unless you like having a tree grow right through your chest.
|
||||
|
||||
I have a buddy who was sleeping in this cabin way out in the woods, when he suddenly woke up to trees and vines growing right up through the floor and walls! He said it was some kind of huge triffid making it happen...
|
||||
|
||||
Oh man, have you gone down into the old subway systems? I'd be careful... there's these things down there that're like zombies, but tougher.
|
||||
|
||||
There's snakes down in most of the old sewer systems. They're slow on land, but boy, those suckers can swim fast!
|
||||
|
||||
If you're planning on wandering around the sewers--not that you'd have a reason too--watch out for those fish. Those suckers are fast, and vicious too!
|
||||
|
||||
Have you seen those eyebots flying around? It's hard to say, but some faction's controlling them--maybe the military. All I know is, I don't want them taking my picture...
|
||||
|
||||
Ever go toe-to-toe with a manhack? Tiny little helicopters covered in knives. Best be packing a shotgun!
|
||||
|
||||
They're rare, but molebots are nasty things. They bore through the ground, then pop up to stab ya. Still, you're safe from them if you stay on pavement...
|
||||
|
||||
Don't fire your gun if you can help it--the noise attracts monsters!
|
||||
|
||||
Standing behind a window is a good tactic. It takes zombies a long time to crawl through, giving you lots of opportunities to hit them.
|
||||
|
||||
Zombies are pretty dumb... heck, most monsters are! If you can get a fire going between you and them, they'll just run straight through it.
|
||||
|
||||
I know it's tempting to just go full-auto and unload as many bullets as possible, but don't except as a last resort. It's inaccurate and wastes ammo.
|
||||
|
||||
If there's a bunch of zombies in a straight line, try unloading a burst from your gun. Be sure to aim at the zombie furthest away; you'll hit more of them that way.
|
||||
|
||||
If you shoot a zombie, but don't quite kill it, try to finish it off with a punch or something instead of wasting a bullet.
|
||||
|
||||
If you're in a corridor or something, and there's a bunch of zombies chasing you down it, try to wound the guy in front badly. He'll start moving slow and cause a serious traffic jam!
|
||||
|
||||
Here's a trick for taking care of a huge swarm of zombies chasing you: head into a liquor store, shoot out as many bottles as you can, then light the alcohol on fire. Then duck out the back door, and watch the zombies run into a burning building!
|
||||
|
||||
Sledge hammers may seem like a great weapon, but swinging them is really slow, and you won't do much damage unless you're really strong.
|
||||
|
||||
For a good melee weapon, you can't beat a machete. I've seen a guy take down a zombie brute with one! Of course, if you can find a katana, that might be even better...
|
||||
|
||||
You know, a glass bottle can make a good weapon in a pinch. If you break it over someone's head, the shattering glass will hurt them extra. Of course, it might hurt your hands, too...
|
||||
|
||||
You know what makes a nice weapon? Take a two by four, or a baseball bat or something, and stick a bunch of nails through the end!
|
||||
|
||||
BB guns may seem like a joke, but they've got their uses. They're good for hunting small game, or getting to know the basics of rifles.
|
||||
|
||||
Crossbows are a great weapon for long term use. Most of the time, you can retrieve the bolt after shooting it, so running out of ammo is less of a concern.
|
||||
|
||||
It's good to keep a pistol handy, in case your main gun runs out of ammo or something. They're also better than most guns at short range.
|
||||
|
||||
Shotguns are nice; you can take out lots of baddies with a single shot. Just remember that they're noisy as hell, and you might end up attracting more than you kill.
|
||||
|
||||
A good submachine gun can't be beat. Most of them use common ammo, they're good at short and long range, and you can burst-fire if you need to!
|
||||
|
||||
Hunting rifles are great at long range, but suck close up. Plus, most of them don't carry many rounds. Keep a pistol as a sidearm if you use a rifle.
|
||||
|
||||
You know, you don't have to go full auto with an assault rifle. Firing single shots is more accurate and efficient!
|
||||
|
||||
I've seen a couple guys running around with laser pistols. They seem like the perfect weapon... quiet, accurate, and deadly. But I've never found one, and I bet ammo is wicked scarce...
|
||||
|
||||
When it comes to footwear, you've got two basic choices as far as I see it; sneakers, for running extra fast, or boots for durability. Depends on your style, I guess.
|
||||
|
||||
You don't really need to wear gloves most of the time, but once in a while they'll really come in handy.
|
||||
|
||||
It's good to keep a filter mask or gas mask handy. You never know when you'll have to go into a smoke-filled room or something.
|
||||
|
||||
There's basically no reason not to wear safety glasses... nothing's worse than taking a hit to the eyes and getting blinded for a few seconds.
|
||||
|
||||
Ski goggles are a great choice if you're worried about getting stuff in your eyes. Perfect for dealing with boomers!
|
||||
|
||||
If you get a pair of night vision goggles, hold on to them! A flashlight will give you away, but with goggles you can be sneaky.
|
||||
|
||||
I know they look dumb, but wearing a fanny pack gives you that extra bit of storage without encumbering you.
|
||||
|
||||
Backpacks let you carry lots of stuff, but they limit your movement a lot. If you're an unarmed fighter, don't wear one!
|
||||
|
||||
Don't underestimate a good book. Not only will it keep you company on lonely nights, but you can learn a hell of a lot from some of them.
|
||||
|
||||
It's a good idea to carry around a couple of empty bottles. You can fill them up with water, gasoline, or whatever!
|
||||
|
||||
If you need a bunch of rags for making molotov cocktails, take a pair of scissors to an old t-shirt or something.
|
||||
|
||||
Carrying a lighter is something all veterans do. It takes up almost no space, and can easily save your life.
|
||||
|
||||
If you can spare the space, you might want to carry a fire extinguisher along. Nothing's worse than being trapped in a burning building!
|
||||
|
||||
Crowbars not only make a pretty good weapon, they're also useful for opening locked doors and lifting manhole covers.
|
||||
|
||||
If you're spending the night in a dangerous area, grab a shovel and dig pits all around your camp.
|
||||
|
||||
A chainsaw may seem like a great weapon, but remember that they're slow, unwieldy, and very noisy.
|
||||
|
||||
Bubblewrap is pretty harmless, but setting it up around you before going to sleep will keep you from waking up to a zombie punching you.
|
||||
|
||||
Beartraps are a nice way to cover an escape. If you place one in a doorway, the first zombie through will get stuck, and the rest won't be able to get past!
|
||||
|
||||
Smoke grenades aren't really offensive weapons, but they'll cover up your scent and hide you from view--perfect for making a quick escape.
|
||||
|
||||
Don't use molotovs indoors. Especially in a liquor store.
|
||||
|
||||
If you're going to be playing with molotov cocktails around a gas station, just make sure you're a long way from those pumps.
|
||||
|
||||
I once knew a guy who figured he'd survive a night in the subway by setting fires blocking off the tunnel in both directions and sleeping between them. He wound up asphyxiating on the smoke.
|
||||
|
||||
Don't light a molotov until you're ready to throw it. Not only can they go out, but if you accidentally drop it or something, you're in trouble.
|
||||
|
||||
If you're weak or clumsy, it might be a good idea not to mess with molotovs or grenades. Accidentally dropping them when you meant to throw them could be deadly.
|
||||
|
||||
If you're wandering in the wilderness, or following a road, keep an eye out for wild strawberries or blueberries.
|
||||
|
||||
Be careful eating wild mushrooms. Some are poisonous, and others can make you hallucinate.
|
||||
|
||||
Try to go around swamps, if you can. Some of them have sinkholes that can pull you right underground.
|
||||
|
||||
I heard about this group that raided a bee hive a while ago. Everyone got massacred but one, and he came home with this weird, magic honey stuff.
|
||||
|
||||
If you need to, you can swim across a river to escape; most monsters can't swim. Just make sure you drop as much stuff as possible first, and maybe strip naked, or you'll sink like a rock.
|
||||
|
||||
Houses can be a surprisingly good resource for all kinds of stuff; clothing, medication, food, books, and more.
|
||||
|
||||
While there's not much to loot, gas stations are a good source for gasoline, to power tools or to make molotov cocktails.
|
||||
|
||||
It's not like in the movies--shooting a gas pump won't make it explode. But it WILL make it leak all over the place, which is a definite fire hazard.
|
||||
|
||||
I know grocery stores and stuff are full of fruit, but be careful, it's probably rotten.
|
||||
|
||||
Next time you visit a grocery store, load up on canned goods. They never go bad!
|
||||
|
||||
I've found more good weapons in hardware stores than anywhere else. Except gun stores, of course.
|
||||
|
||||
Liquor stores are a great place to pick up non-alcoholic beverages, too. Not that I mind alcohol!
|
||||
|
||||
Most gun stores follow pretty similar layouts. The restricted stuff--SMGs, assault rifles, and most importantly ammo--are always behind the counter.
|
||||
|
||||
I've spent many nights in the changing rooms at the back of clothing stores. Walls on four sides, far from the store's entrance, a corridor for easy defense... it's perfect!
|
||||
|
||||
If you're getting chased by a hoard of zombies, try ducking into the subways and traveling a block or two, then coming back up.
|
||||
|
||||
Have you seen those weird science labs out in the middle of nowhere? I think you need some kind of special ID card to get in.
|
||||
|
||||
I've thought about raiding an ant hill before, but I realized it wasn't worth the risk. I doubt they have any loot beyond some scraps of food, you know?
|
||||
|
||||
This guy I know was walking through the subway when he came across a giant rift in the earth, with lava far below. Weird, huh?
|
||||
|
||||
In a lot of places, there's little hallways connecting the subways with the sewers, with heavy metal doors on both ends. It's a perfect place to sleep!
|
||||
|
||||
Be careful of drinking water from rivers and stuff, it's a good way to get sick. But if you have a water purifier, it'll make it safe.
|
||||
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 66 KiB |
@@ -1,492 +0,0 @@
|
||||
0.7
|
||||
|
||||
Highlights:
|
||||
---
|
||||
Use ncursesw and gettext for i18n support and expanded character palette.
|
||||
Configurable Autopickup feature.
|
||||
Configurable item spawning lists, now with more configurable spawn frequencies.
|
||||
New advanced bionics.
|
||||
|
||||
Features:
|
||||
---
|
||||
Use ncursesw and gettext for i18n support and expanded character palette.
|
||||
Configurable Autopickup feature.
|
||||
Configurable item spawning lists, now with more configurable spawn frequencies.
|
||||
Probability Travel Bionic (walk through walls!)
|
||||
Railgun Bionic (throw metal items at the speed of electricity!)
|
||||
Flashbang bionic.
|
||||
Shockwave Generator bionic.
|
||||
Chain Lightning bionic.
|
||||
Artificial Night bionic.
|
||||
Streamlined lumberjacking tasks.
|
||||
Splints are now craftable and (slowly!) heal broken limbs.
|
||||
Recover CBMs from butchered player corpses
|
||||
Small game arrow.
|
||||
Spoiled (rotten) items will now be removed from the map after twice the time it takes to spoil.
|
||||
Lit torches set enemies on fire.
|
||||
Toggled Metabolic Interchange bionic, active power sources.
|
||||
Changed Optimist to be more thematic and balanced.
|
||||
Morale effects have more flexible durations.
|
||||
Extensively reworked fire handling, e.g. campfires should last a more reasonable duration.
|
||||
Preserve martial art style selection across wielding/unwielding weapons.
|
||||
Simulate alt+number input for SDL version.
|
||||
Quicksave command.
|
||||
Added basic sludge crawler monster
|
||||
More crafting recipes.
|
||||
Stash knives in your boots.
|
||||
Folding bicycle you can stash in a trunk.
|
||||
New improvised guns.
|
||||
More survival-ish foods.
|
||||
Added some more heavy pistols and ammunition.
|
||||
New Improvised lockpick!
|
||||
Floatation Vest.
|
||||
Added wine and a new shirt.
|
||||
Towels.
|
||||
Fuzzy time display, and precise time with wristwatch item.
|
||||
|
||||
Bugfixes:
|
||||
---
|
||||
Multiple gates near one handle work correctly.
|
||||
Made wild Jabberwocks much more rare.
|
||||
Fix turrets shuffing around when off map.
|
||||
Prevent gibbing from low-damage sources.
|
||||
House generation fixes.
|
||||
Allow deconstruction of refrigerators.
|
||||
More consistent road placement.
|
||||
Make mongroups die propperly, even if the queen dies at a distance
|
||||
Monsters killed by wide attacks drop corpses/loot
|
||||
Fix solar panel power production on vehicles.
|
||||
Cleanup tire changing activity.
|
||||
Fix stunlock caused by counterattacks.
|
||||
Keep Jabberwocks from spawning in classic mode.
|
||||
Fix turret drops.
|
||||
Extensive text handling fixes.
|
||||
Menu beautification.
|
||||
Allow saving while in a vehicle.
|
||||
Fix div0 on bad option setting.
|
||||
|
||||
======
|
||||
|
||||
0.6
|
||||
|
||||
Highlights:
|
||||
---
|
||||
* Zombies will revive after a time, if not butchered (or otherwise dealt with).
|
||||
* The Android trait now behaves the way that the description indicates.
|
||||
* Gasoline can be siphoned from vehicles. Requires a rubber hose for now - these are easier to acquire.
|
||||
* Sewing requires materials other than thread - rags for cloth, leather patches for leather, kevlar bricks, plastic chunks.
|
||||
* Leather/Kevlar/plastic/fur repair/reinforcement actually possible!
|
||||
* Inventory management UI improvements, and a new screen to organize worn items.
|
||||
* NPCs continue to be less buggy, but are still prone to crashes.
|
||||
* Weapon firing code reworked a bit. UI improvements, and you should now be able to fire at anything within range.
|
||||
* Reworked the armor/protection code.
|
||||
* Reworked the learning system: replaced XP with Focus. See the relevant help text.
|
||||
* Added a *bunch* of new multi-stage missions, for those who play with the shelter NPC turned on.
|
||||
* Many new buildings (See full changelong list)
|
||||
* Vehicle collision physics are now based on *actual* physics! Reduces collision insanity.
|
||||
* Option to use triginometric distance instead of roguelike distance. In other words light, line of sight are circular instead of square.
|
||||
* Zombie density in towns is based on nearby buildings instead of distance from town center.
|
||||
* Higher-performance (on windows) SDL-based rendering as an optional build type.
|
||||
* Movement on and around vehicles greatly streamlined.
|
||||
* Sound indicator lets you know how much noise you're making.
|
||||
* Turn cost indicator lets you know how long actions take.
|
||||
* Overkilled monsters now spray gibs around instead of disapearing.
|
||||
* Mostly remove limits on how many items fit in a tile of ground.
|
||||
* As usual, many bugfixes.
|
||||
|
||||
Full list:
|
||||
---
|
||||
Purifier no longer removes traits available at chargen.
|
||||
Fix some calculations that wanted floating-point math, and were using integer math.
|
||||
Fix some vehicle collision craziness related to skids.
|
||||
Added zombie revival. Chance of unbutchered zombie corpses rezzing, once 6 hours have passed.
|
||||
Advanced inventory UI improvements/fixes.
|
||||
Dropping count-by-charge items (batteries, meds, etc.) into vehicles will cause restacking.
|
||||
Android trait always gives a power system bionic.
|
||||
Fix torso encumbrance display (it's smart about sign use now).
|
||||
Bitmask-based item flags no longer exist! Instead, we have string-based tags, that have no upper limit.
|
||||
Tweaked glowstick behavior - can no longer deactivate, and they have a dead state.
|
||||
Android trait should no longer give the player faulty bionics.
|
||||
Bolts moved to ammo category, like arrows.
|
||||
Added bone broth, and recipe.
|
||||
Adjust how Climate Control bionic works, make vehicles have functioning (magic!) AC.
|
||||
Added fuel siphoning using rubber hose.
|
||||
Appearance-improving mutations are now flagged as being good mutations.
|
||||
Welder charges are actually used during vehicle construction.
|
||||
Items will no longer become erroneously fitted, and item tags should not spread during map loading.
|
||||
Weather accounts for starting time properly.
|
||||
Containers can be unloaded again (they were bugged).
|
||||
Optimized scentmap updates, hopefully this speeds up certain activities.
|
||||
Pit-requiring constructions have pit digging as their first two stages, to make it more obvious what the prereqs are.
|
||||
Some menus (notably, inventory) can be navigated with arrow keys and enter.
|
||||
Allowing sewing of leather items, make sewing require rags/patches.
|
||||
Cooking rotten food does not make it magically fresh any more.
|
||||
Resolves an issue where destroying an item while tailoring would crash the game.
|
||||
New UI to sort clothing and automatically assign special characters to clothing (accessed via +)
|
||||
Footwear warmth values tweaked to be more flexible.
|
||||
Wool warmth is not reduced by rain.
|
||||
Sofas and armchairs help with sleeping.
|
||||
Temperature is less of an issue while sleeping.
|
||||
Warning messages for when the player is cold/hot while sleeping.
|
||||
Oversized clothing can be worn over anything (blankets, cloaks, etc).
|
||||
Sound interruptions can be categorically ignored while crafting, reading, etc.
|
||||
More improvements to the advanced inventory UI.
|
||||
Shrubs less difficult to smash.
|
||||
Upgraded versions of Fast Healer still give you bonuses while sleeping.
|
||||
Soldering iron recipe learnable via disassembly.
|
||||
Integrated toolset power usage normalized on a few recipes.
|
||||
Vehicle speed is now taken into account when throwing a character that exits a moving vehicle.
|
||||
Gasoline lanterns added to the game.
|
||||
Bifocal glasses added to the game.
|
||||
Tweak Windows (catacurse) colors.
|
||||
Correct window border color behavior under Windows.
|
||||
Add glass jars, make sauces spawn in them instead of in tin cans.
|
||||
Removed a couple NPC crash bugs.
|
||||
You can safely exit a vehicle moving less than 1 MPH.
|
||||
Fix a pair of drawing glitches related to the item pickup window.
|
||||
Remove the artificial delay when animating vehicle movement.
|
||||
Out-of-range enemies are still drawn when firing a weapon.
|
||||
Make it so that anything within range can be targeted with a ranged weapon.
|
||||
Disassembly recipe for vacuum sealer.
|
||||
Backspace no longer causes junk to be input during string entry.
|
||||
The overmap screen now lets you use "<" and ">" to view different z-levels.
|
||||
Reworked the armor/protection code.
|
||||
Fridges drop rubber hose instead of pipe when destroyed.
|
||||
Reworked the learning system: replaced XP with Focus. See the relevant help text.
|
||||
Autosave should save everything now, rather than a subset.
|
||||
Fix artifact saving/loading... again.
|
||||
Added new missions.
|
||||
Added cathedral to mapgen.
|
||||
Fixed flamethrowers.
|
||||
Add 40mm acid bomb shells.
|
||||
Moving furniture causes noise.
|
||||
Clothing damage descriptions now depend on the item's material.
|
||||
Gunmods now show "%" properly in the magazine size line.
|
||||
Add bicycle seats: low-mass seats that can't take a seatbelt.
|
||||
Vehicle collision physics are now based on *actual* physics! Reduces collision insanity.
|
||||
Foraging gives survival experience, even on failure.
|
||||
Disassembling ammo gives firearms experience.
|
||||
Ball bearings should hopefully drop now.
|
||||
Added headlights to a few more default vehicles.
|
||||
Lab coats can be fitted.
|
||||
Items in adjacent containers (fridges, lockers, etc.) visible with 'V' screen.
|
||||
Players can no longer examine sealed crates to see their contents.
|
||||
Funnels give acid water during acid rain :).
|
||||
Acid water (after refinement) now an alternate ingredient for acid bombs.
|
||||
Corrected a few item name typos.
|
||||
Cleaned up generation of a particular (spiral-y) underground room.
|
||||
More temperature tweaks.
|
||||
Being hot makes you MORE thirsty, not less.
|
||||
Reworked item unloading and reloading a bit to remove bugs.
|
||||
Flatbed trucks now have rear windows.
|
||||
Electric cars added as potential vehicle spawns.
|
||||
Fix some bugs related to known overmap data and leaking the state to other characters.
|
||||
Effects of current stats are shown on the '@' screen.
|
||||
Materials obtained from clothing depend on the clothing's damage level.
|
||||
Fixed some lab mapgen bugs.
|
||||
Mansions got a little love.
|
||||
Having too little intelligence for a book is more of a penalty.
|
||||
Vehicle headlight state is persistent after save-load.
|
||||
Being hot no longer increases thirst by an unreasonable amount
|
||||
Minor : temp_conv and dis.intensity are saved, fixing strange on-load inconsistencies
|
||||
Minor : Diseases that affect speed no longer overwrite eachother in the @ menu
|
||||
Clothing with pockets provides a bonus to hand warmth when not wielding a weapon.
|
||||
New large building with basement: Prison
|
||||
Basement level for hazardous waste sarcophagus.
|
||||
New building with basement: musterious cabin.
|
||||
Display recent log messages on player death.
|
||||
Radiation exposure is now more dangerous
|
||||
Mutations from radiation can be disabled.
|
||||
Mutation categories now more dominant.
|
||||
Added themed mutagens with recipes.
|
||||
New medical items.
|
||||
Bundle of plastic bags item for stowing bags.
|
||||
Rebalance chance of cutting weapons getting stuck, much less likely now.
|
||||
Smashing corpses prevents them from reviving.
|
||||
Burning corpses prevents them from reviving.
|
||||
Stopped players from leaving slime trails or webs while in a vehicle.
|
||||
Made vitamins have an effect again.
|
||||
Made multiple gasoline tanks drain properly.
|
||||
Added tiny pain effect to Acid Drizzle, raincoats now offer a bit of protection to acid rain/drizzle.
|
||||
Advanced inv: "e" pulls up inventory item menu. Help window displays feedback messages for actions taken. "?" toggles between help and msg viewer.
|
||||
Eliminate radiation dosage saturation, halving dosage rate to compensate. (radiation is slower, but more implacable)
|
||||
Fitting screen now shows storage and encumbrance in item columns.
|
||||
Added leather vest item and crafting recipe.
|
||||
avoid use of pow() in distance calculation, speeding them up an order of magnitude.
|
||||
Make blood filter remove all other drug based diseases.
|
||||
Make blood analysis detect all drugs.
|
||||
Behold, sharpie markers.
|
||||
Display actual keymapping instead of default one in most help text.
|
||||
Stopped bleeding, bites, and poison from applying when stopped by armor.
|
||||
Safely hop from slow-moving vehicles, get hurt from quick ones.
|
||||
Multidrop screen now shows a summary of what is about to be dropped.
|
||||
Sort inventory by item charges, use low-charge items first.
|
||||
Option to auto-save before sleep.
|
||||
Lava burns things and can be used for crafting.
|
||||
Multiple fixes to burst-fire targeting.
|
||||
Prevent turrets from shooting themselves.
|
||||
Prevent friendly turrets from trying to shoot through the player.
|
||||
Brasas catcher item to catch your brass for recrafting.
|
||||
More power armor variants.
|
||||
Make movement take half the cost of both the beginning and end tiles, instead of just taking the cost of the end tile.
|
||||
Made shooting interactions more realistic.
|
||||
Add radiation badge item and associated infrastructure.
|
||||
Automagically add new keybindings, so long as they don't conflict.
|
||||
Significantly reduces the number of giant worms.
|
||||
Adds strawberry bushes.
|
||||
Advanced inventory: Add [c]ategory sort.
|
||||
Large number of added archery items: Wide range of bows crossbows, and arrows, and a multitude of crafting recipes.
|
||||
Stop unnecessaraly saving adjacent overmaps every time they are potentially dirtied. (prevents periodic pauses!)
|
||||
Hard Leg Guards and Metal Leg guards.
|
||||
Picking berry bushes trains survival (at low levels).
|
||||
Added skill support into professions.
|
||||
|
||||
|
||||
======
|
||||
|
||||
0.5
|
||||
|
||||
Highlights:
|
||||
---
|
||||
* Many new details added to mapgen! New buildings, ruined vehicles on roads, and so on.
|
||||
* Much more modding-friendly: MANY bits of data have been moved into data files, rather than being hardcoded in the source.
|
||||
* A handful of recipes can be learned from sources other than just leveling your skills.
|
||||
* Artifacts should save/load properly now!
|
||||
* Assorted UI tweaks and improvements.
|
||||
* Weather radio and directional antenna.
|
||||
* Rain funnels - first step towards proper rain barrels.
|
||||
* Robust Genetics and dodging have both been significantly rebalanced, and should actually be useful.
|
||||
* Zombies wear damaged clothing.
|
||||
* Tailoring is more important, and string is easier to acquire.
|
||||
* New content all around!
|
||||
* Numerous bugfixes.
|
||||
|
||||
|
||||
Full list:
|
||||
---
|
||||
Matches usable anywhere lighters could be used previously.
|
||||
Draw lit areas outside of LOS and normal sight radius the same as unlit areas
|
||||
Tell the player when their gear is damaged in combat
|
||||
Display player feat morale boosts
|
||||
Pickling/canning
|
||||
Only rust skill if X turns have passed since practice, not every x turns.
|
||||
Halve rate of skill rust across the board.
|
||||
Push crafting recipes out to JSON - now moddable without recompiling!
|
||||
Acid rain causes pain not injury
|
||||
Changed default viewmorale key to v
|
||||
Learn crafting recipes from item disassembly or books.
|
||||
New Hardcore trait
|
||||
Other new traits: Skilled Liar, Pretty, Beautiful, Very Beautiful, Glorius (cancels truth-teller, ugly mutations)
|
||||
Set minimum move to 25
|
||||
Death by starvation or thirst
|
||||
New professions: tailor, scoundrel
|
||||
Adjusted conditions for cutting and stabbing skill practice (should be able to practice piercing now)
|
||||
Code compiles with no warnings. No user-visible change, but important stability milestone.
|
||||
Added a craftable power armor power interface CBM, solar panels.
|
||||
Continuous reading.
|
||||
New mixed drinks
|
||||
A new book; "To Serve Man"
|
||||
Glowsticks, found in sporting goods stores and bedrooms.
|
||||
Broken and Empty windows can no longer be taped up, alarmed windows can.
|
||||
Palisade walls changed to require 2 6foot ropes rather than one thirty foot one.
|
||||
Domestic Windows drop strings now (Those are the kind that can be opened)
|
||||
String can be made from sinew and plant fibre.
|
||||
Added blankets, fur blankets (craft only), emergency blankets, sleeping bags, fur sleeping bags (craft only).
|
||||
Added house coat, snuggie, cloak, fur cloak (craft only), leather cloak (craft only).
|
||||
Added fur scarf, fur gloves, fur trenchcoat, fur pants, fur boots (all craft only).
|
||||
All tailoring items that use fur require survival as secondary skill.
|
||||
Added crafting recipes for bandana, blanket, house coat, cloak.
|
||||
Weather radio
|
||||
Radios are tuneable, so you can receive from more than one station without moving.
|
||||
New item that doubles battery capacity of tools, recipe learn from certain electronics books.
|
||||
Bugfix: reduced chance of "Tried to kill monster" debug s pam.
|
||||
Bugfix: reduced chance of "Stopping out-of-map vehicle" spam.
|
||||
Bugfix: can unload liquids into items wielded in hands (e.g., steel jerrycans).
|
||||
Bionics screen shows current and maximum power.
|
||||
Escape key usable to exit out of more menus.
|
||||
Multidrop screen continually updates to show new potential weight/volume.
|
||||
Bugfix: longbow should not end up loaded while in inventory, and can be fired if it does.
|
||||
Backpacks, messenger bags, etc. can be repaired via sewing kits.
|
||||
Add fire drill as a survivalcraft firestarter (trickier and slower than lighter/matches).
|
||||
Furry mutation provides warmth, Bark mutation protects from fire.
|
||||
Removed/reduced a lot of spam messages related to being hot or cold.
|
||||
Sleeping should be easier in the cold (decreased chances of waking up).
|
||||
Being too hot can now wake you up.
|
||||
Inreased the amount fo heat generated by the player while awake.
|
||||
Tweaked hunger and fatigue's contribution to body temperature.
|
||||
More traits and mutations have body temperature effects.
|
||||
Fix artifact saving and loading.
|
||||
Multiple building additions in town and in the countryside.
|
||||
Support for 2x2 and 3x3 buildings.
|
||||
Temporary fix to decrease the number of large structures with roads running through them.
|
||||
Items can only be set on fire if it would affect them (no more burning sheets infinitely).
|
||||
Looking around at items (with "V") has a few improvements.
|
||||
Soldering irons give heating elements when disassembled, tweak numbers for hotplates and water purifiers.
|
||||
Advanced inventory management screen, default keymap "/". Lets you interact with adjacent tiles.
|
||||
Roadmap is made of paper.
|
||||
Removed RV kitchen units from some spawn locations.
|
||||
Backend: made it much easier to define pre-built locations. Responsible for a lot of the new building types.
|
||||
Increased the quench value of clean water.
|
||||
Early-game survivalist stabbing weapon is now pointy stick. Wood spear is higher level.
|
||||
You can now read using torches and other items.
|
||||
Addictions can be configured explicitly in the professions file.
|
||||
Tweak crossbow trap drops.
|
||||
Made several UI screens smarter (resize to fit screen, esc can exit, etc.).
|
||||
Show nearby map notes on the minimap.
|
||||
Some item types can be defined from data files now! So far: misc/melee, armor, guns, ammo, tools, gun mods, books
|
||||
Glasses can be worn with power armor.
|
||||
Added several new constructions.
|
||||
Power use of integrated toolset has been rebalanced.
|
||||
Armor CBMs have had drawbacks removed.
|
||||
Rain coats can be made from plastic bags.
|
||||
Fursuits.
|
||||
Work to make NPCs less buggy.
|
||||
Nuclear missile fixes.
|
||||
Tweaked steel recycler behavior.
|
||||
Autosaves take into account the passage of real-world time.
|
||||
Placable funnel that collects some water while raining.
|
||||
Characters with the Android trait no longer get unimplemented bionics.
|
||||
Added several new options.
|
||||
NPC spawning is toggled with the in-game options menu rather than a text file hack.
|
||||
Added more wildlife (coyotes, cats, etc.).
|
||||
Robust Genetics trait heavily buffed.
|
||||
Change how overmap tile data is saved, to allow for more terrain types and buildings.
|
||||
Add high-capacity power storage CBM.
|
||||
Add some new magazines and entertainment books.
|
||||
Blisters no longer lower max HP (at least until the system is more fleshed out).
|
||||
Cannibal trait has been rebalanced, as well as morale effects of eating human flesh.
|
||||
Added cookbook for Italian recipes.
|
||||
Sewing now requires an adequate source of light.
|
||||
New health display for non-Self Aware characters, accurate to 1/10th max HP rather than 1/4th.
|
||||
Targeting window (when throwing/firing weapons) has been reorganized.
|
||||
Directional antennas!
|
||||
Gas pumps have been rebalanced (less fragile when filling vehicles, more fragile when filling containers).
|
||||
Added sling, slingshot, and associated ammunition.
|
||||
Gas stations can spawn next to highways.
|
||||
Large creatures are more likely to leave a corpse when taking high damage.
|
||||
Add flavor items with variable descriptions to the game (fliers and such).
|
||||
Some guns have range modifiers independent of their ammo. Buffed coilgun range.
|
||||
Add limb torsion ratchet bionic, generates power when moving.
|
||||
Desks don't spawn outside any more.
|
||||
The option to delete your world on character death actually works now!
|
||||
Tweaked projectile/glass interaction, stopped leaping monsters from phasing through windows.
|
||||
Debug menu changes.
|
||||
Made it possible to build indoor furniture in more situations.
|
||||
Updated readme, added contributing guidelines.
|
||||
Stopped small animals from suiciding, in many cases (e.g., broken windows and landmines).
|
||||
Add a few hats. No, not TF2-style.
|
||||
Artifacts will successfully save and load now!
|
||||
Adjusted monster spawning mechanics to reduce the chance of swarms of difficult zombies.
|
||||
Stop roads from going through buildings so often.
|
||||
Pits less awkward to board over (can use nearby items).
|
||||
Tweak glass bottle weight/volume.
|
||||
Allow for reading/sewing in the dark through mutations/CBM's with a speed penalty.
|
||||
Rewrote dodge abilities to have a noticeable impact.
|
||||
Mansion pools are considered indoors now.
|
||||
Tires can be changed with a wrench and a jack.
|
||||
Add game logic to handle recipes that take the same item as a component and a tool, and add UI to alert the player.
|
||||
Improve rendering in the main Windows port - animations should display better.
|
||||
Cave-ins cause damaging rubble to fall.
|
||||
Improve fuel guage display in the vehicle examination window.
|
||||
Overmap notes blink again.
|
||||
Space and tab should be available for keymaps.
|
||||
Hitting the "pause"/"skip turn" button will let you cancel reading, crafting, and other long-term actions.
|
||||
Special road spawns should not happen on bridges.
|
||||
Ruined vehicles spawn on roads.
|
||||
Zombies wear damaged clothing.
|
||||
Nighttime lights are visible from reasonable distances now.
|
||||
|
||||
======
|
||||
|
||||
0.4
|
||||
Make the battery system bionic only consume as many batteries as necessary to fully power yourself
|
||||
Knives can also cauterize wounds now. Requires a lighter.
|
||||
Soldering irons (and hotplates, why not) can be used to cauterize wounds, causing pain and removing any bleeding or uninfected bite effects.
|
||||
Fixed crash bug in Windows when attacks hit something off-screen?
|
||||
Fixed precipitation animation with shifted viewport.
|
||||
Can now disassemble items from the examination screen.
|
||||
Added colored hinting to the item examination sidebar listing possible actions. e.g., "W" (for "wear") is grayed out if the item isn't wearable.
|
||||
Added ability to craft a recipe continuously (until out of materials, etc.).
|
||||
Reduce (maybe fully fix) wolf self-attacks.
|
||||
Power armor.
|
||||
More fitted gear, and a few more pieces made craftable.
|
||||
Vehicle-mountable water tanks and kitchen units, implied storage-battery-charging generators.
|
||||
Map tiles can now contain up to 64 items.
|
||||
Beer has been made weaker, and now appears in kegs in liquor stores and bars.
|
||||
Steel jerrycans.
|
||||
Any gun can now be used one-handed if you are strong enough.
|
||||
Hardcoded frostbite not to occur above freezing temperatures.
|
||||
Improved fire's ability to warm the player. Also, standing on fire and being on fire warm up the player.
|
||||
Fixed body temperature equalization.
|
||||
Sunny and clear weather no longer warm the player underground.
|
||||
Standing in water or sewage will increase the rate of heat loss (but not make the player colder)
|
||||
The head and torso now lose heat faster than other body parts.
|
||||
Body temperature drops as you lose HP.
|
||||
Encumberance menu's listing of warmth has been made more colorful.
|
||||
Mouth (face) now has appropriate cold and hot diseases.
|
||||
The ability to cauterize wounds to heal bites and stop bleeding. (a)ctivate a knife, requires a lighter.
|
||||
The ability to craft an item as many times as is possible. Defaults to the + key. (Linux and Mac users will need to assign a key)
|
||||
Added M72-LAW. Makes a large explosion and penetrates armour well. One shot only.
|
||||
Clothing can be made fitted by (a)pplying a sewing kit.
|
||||
Some foods can be heated, hot food grants a larger morale bonus than cold food.
|
||||
Ammunition explodes rather than burning.
|
||||
Lightstrips, function as weak light providers. Craftable.
|
||||
Bandages and First Aid kits no longer show uninjured bodyparts in the menu.
|
||||
Some basic professions, more to be added later.
|
||||
|
||||
|
||||
0.3
|
||||
Many menus stretch with an enlarged viewport.
|
||||
An action to repeat the last craft has been added, default keybinding of -
|
||||
When crafting liquid items, the game asks you for a container first, then asks if you want to dump the item.
|
||||
A large amount of survival craft has been added, allowing you to make most of the basic tools and necessities. Along with several new weapons, some storage items and a liquid container.
|
||||
Smoker Zombies, belch clouds of smoke at players, slowing them and blocking LOS.
|
||||
Robots now pull from separate drop lists when killed.
|
||||
Alcohol cost for Torches and Bandages has been increased to 7, or one third of a bottle.
|
||||
Alcohol cost for molotovs has been reduced to 14, gasoline cost increased to 400.
|
||||
Chitinous boots and gauntlets added.
|
||||
Picklock kits break when damaged 5 times.
|
||||
Zombie spawn ratios have been rebalanced for static spawning.
|
||||
Pocketknives are useable for all logical recipes.
|
||||
Child zombies have had a small pool of item drops added.
|
||||
HP Ignorant is now the player default, Self Aware can be purchased to display exact HP.
|
||||
Lawnmower blades have been replaced with generic blades, most bladed items are made using blades instead of machetes/swords now.
|
||||
Nail bat, nail board and makeshift halberd now all have weak block.
|
||||
Wild veggies function as plant marrow for most recipes.
|
||||
Meat soup added, more cooking to come.
|
||||
The player now spawns with a pocket knife and lighter.
|
||||
Sledge hammer is usable to board windows and doors up.
|
||||
Heartless trait has been removed, replaced with the Cannibal trait, which allows you to eat human meat with no morale penalty.
|
||||
Braziers are now craftable. They contain fire and can be set up indoors.
|
||||
Bulletin Boards can be built to set an area as your home base. NPCs can
|
||||
be told to wait there and will defend the area.
|
||||
Bear traps have been increased in weight and volume.
|
||||
Carboys have been renamed to Gallon jugs.
|
||||
You can now create a character without allocating all skill points.
|
||||
Winter Boots and Raincoats now correctly display the reinforced tag.
|
||||
Kills can now be accessed from in-game. Default key is ).
|
||||
'Phew it's hot warm' message has been fixed.
|
||||
The game now accepts wielded items when checking for containers.
|
||||
Sunny and Clear weather now provide warmth.
|
||||
Internal Climate Control bionic consumes power to cool or warm you.
|
||||
Crash bug caused by the screen being larger than the loaded overmap has
|
||||
been fixed.
|
||||
Crash bug when going down stairs near cities has been fixed.
|
||||
Hunger now affects body temperature.
|
||||
Added new crafting recipes: shorts, cargo shorts, balclava, long underwear,
|
||||
glove liners, socks.
|
||||
Added a digging stick. Can be used to dig shallow pits, and level construction enough to enable crafting of stone shovels.
|
||||
|
||||
Got angry at other developers for not updating changelog.
|
||||
|
||||
0.2
|
||||
Reworked spawning option which places zombies at world generation
|
||||
rather than generating them dynamically in play.
|
||||
Implementation of a context menu when examining inventory items.
|
||||
Machine added to hospitals to regrow limbs.
|
||||
|
||||
0.1
|
||||
Palisade Walls and Gates - Pretty tough to bash down, and can be fired throguh
|
||||
Log Walls - Basically the same as wood walls, different construction methods.
|
||||
The ability to disassemble tshirts and tank tops by hand. - Handy for bleeding.
|
||||
Revolver Shotgun - NotTe much to say on this.
|
||||
@@ -1,16 +0,0 @@
|
||||
# This message may be 16 lines long at maximum.
|
||||
# Max length of a line is 68 characters; the following line is for reference
|
||||
####################################################################
|
||||
Original author: Project Manager: Website/Forum:
|
||||
Whales (retired) TheDarklingWolf GlyphGryph
|
||||
|
||||
Main Developers/Github Managers:
|
||||
Kevingranade, Ozone, TheDarklingWolf, zpmorgan
|
||||
|
||||
Active Contributors:
|
||||
BurnZeZ, Oddzball, Shades, Shoes01, Tase, GalenEvil
|
||||
|
||||
Contributors:
|
||||
AkrionXxarr, Benjamg, Creidieki, Daftfad, Elricsfate, Gim,
|
||||
GlyphGryph, Gremour, HerbertJones, hovatterz, Origamiwolf,
|
||||
Soron, Uzername, Voker57, Wito, i2amroy
|
||||
Binary file not shown.
@@ -1,18 +0,0 @@
|
||||
# This message may be 16 lines long at maximum.
|
||||
# Max length of a line is 68 characters; the following line is for reference
|
||||
####################################################################
|
||||
New features v0.7 Lindqvist:
|
||||
* Preliminary i18n support.
|
||||
* More advanced bionics.
|
||||
* Autopickup
|
||||
|
||||
For latest discussions and news on Cataclysm DDA, please visit:
|
||||
Homepage: http://www.cataclysmdda.com/
|
||||
Forum: http://smf.cataclysmdda.com/
|
||||
Wiki: http://wiki.cataclysmdda.com/
|
||||
|
||||
New configurable options:
|
||||
Autosave frequency, Trigonometric (circular) distance,
|
||||
Trait points cap, radiation lethality.
|
||||
|
||||
Ingame you can access the options via the help menu (?2).
|
||||
@@ -1,543 +0,0 @@
|
||||
[
|
||||
{
|
||||
"id" : "bio_null",
|
||||
"name" : "NULL bionics",
|
||||
"cost" : 0,
|
||||
"time" : 0,
|
||||
"description": "If you're seeing this, it's a bug. (game::init_bionics)"
|
||||
},
|
||||
{
|
||||
"id" : "bio_batteries",
|
||||
"name" : "Battery System",
|
||||
"cost" : 0,
|
||||
"time" : 0,
|
||||
"flags" : ["POWER"],
|
||||
"description": "You have a battery draining attachment, and thus can make use of the energy\ncontained in normal, everyday batteries. Use 'E' to consume batteries."
|
||||
},
|
||||
{
|
||||
"id" : "bio_metabolics",
|
||||
"name" : "Metabolic Interchange",
|
||||
"cost" : 0,
|
||||
"time" : 100,
|
||||
"flags" : ["POWER", "ACTIVE"],
|
||||
"description": "Your digestive system and power supply are interconnected. Any drain on\nenergy instead increases your hunger."
|
||||
},
|
||||
{
|
||||
"id" : "bio_solar",
|
||||
"name" : "Solar Panels",
|
||||
"cost" : 0,
|
||||
"time" : 0,
|
||||
"flags" : ["POWER"],
|
||||
"description": "You have a few solar panels installed. While in direct sunlight, your power\nlevel will slowly recharge."
|
||||
},
|
||||
{
|
||||
"id" : "bio_torsionratchet",
|
||||
"name" : "Joint Torsion Ratchet",
|
||||
"cost" : 0,
|
||||
"time" : 0,
|
||||
"flags" : ["POWER"],
|
||||
"description": "Your joints have been equipped with torsion ratchets that generate power slowly\nwhen you move."
|
||||
},
|
||||
{
|
||||
"id" : "bio_furnace",
|
||||
"name" : "Internal Furnace",
|
||||
"cost" : 0,
|
||||
"time" : 0,
|
||||
"flags" : ["POWER"],
|
||||
"description": "You can burn nearly any organic material as fuel (use 'E'), recharging your\npower level. Some materials will burn better than others."
|
||||
},
|
||||
{
|
||||
"id" : "bio_ethanol",
|
||||
"name" : "Ethanol Burner",
|
||||
"cost" : 0,
|
||||
"time" : 0,
|
||||
"flags" : ["POWER"],
|
||||
"description": "You burn alcohol as fuel in an extremely efficient reaction. However, you\nwill still suffer the inebriating effects of the substance."
|
||||
},
|
||||
{
|
||||
"id" : "bio_memory",
|
||||
"name" : "Enhanced Memory Banks",
|
||||
"cost" : 1,
|
||||
"time" : 0,
|
||||
"description": "Your memory has been enhanced with small quantum storage drives. Any time\nyou start to forget a skill, you have a chance at retaining all knowledge, at\nthe cost of a small amount of poweron."
|
||||
},
|
||||
{
|
||||
"id" : "bio_ears",
|
||||
"name" : "Enhanced Hearing",
|
||||
"cost" : 0,
|
||||
"time" : 0,
|
||||
"description": "Your hearing has been drastically improved, allowing you to hear ten times\nbetter than the average person. Additionally, high-intensity sounds will be\nautomatically dampened before they can damage your hearing."
|
||||
},
|
||||
{
|
||||
"id" : "bio_eye_enhancer",
|
||||
"name" : "Diamond Cornea",
|
||||
"cost" : 0,
|
||||
"time" : 0,
|
||||
"description": "Your vision is greatly enhanced, giving you a +2 bonus to perception."
|
||||
},
|
||||
{
|
||||
"id" : "bio_membrane",
|
||||
"name" : "Nictating Membrane",
|
||||
"cost" : 0,
|
||||
"time" : 0,
|
||||
"description": "Your eyes have a thin membrane that closes over your eyes while underwater,\nnegating any vision penalties."
|
||||
},
|
||||
{
|
||||
"id" : "bio_targeting",
|
||||
"name" : "Targeting System",
|
||||
"cost" : 0,
|
||||
"time" : 0,
|
||||
"description": "Your eyes are equipped with range finders, and their movement is synced with\nthat of your arms, to a degree. Shots you fire will be much more accurate,\nparticularly at long range."
|
||||
},
|
||||
{
|
||||
"id" : "bio_gills",
|
||||
"name" : "Membrane Oxygenator",
|
||||
"cost" : 1,
|
||||
"time" : 0,
|
||||
"description": "An oxygen interchange system automatically switches on while underwater,\nslowly draining your energy reserves but providing oxygen."
|
||||
},
|
||||
{
|
||||
"id" : "bio_purifier",
|
||||
"name" : "Air Filtration System",
|
||||
"cost" : 1,
|
||||
"time" : 0,
|
||||
"description": "Implanted in your trachea is an advanced filtration system. If toxins find\ntheir way into your windpipe, the filter will attempt to remove them."
|
||||
},
|
||||
{
|
||||
"id" : "bio_climate",
|
||||
"name" : "Internal Climate Control",
|
||||
"cost" : 1,
|
||||
"time" : 30,
|
||||
"flags" : ["ACTIVE"],
|
||||
"description": "Throughout your body lies a network of thermal piping which eases the effects\nof high and low ambient temperatures."
|
||||
},
|
||||
{
|
||||
"id" : "bio_storage",
|
||||
"name" : "Internal Storage",
|
||||
"cost" : 0,
|
||||
"time" : 0,
|
||||
"description": "Space inside your chest cavity has been converted into a storage area. You\nmay carry an extra 8 units of volume."
|
||||
},
|
||||
{
|
||||
"id" : "bio_recycler",
|
||||
"name" : "Recycler Unit",
|
||||
"cost" : 0,
|
||||
"time" : 0,
|
||||
"description": "Your digestive system has been outfitted with a series of filters and\nprocessors, allowing you to reclaim waste liquid and, to a lesser degree,\nnutrients. The net effect is a greatly reduced need to eat and drink."
|
||||
},
|
||||
{
|
||||
"id" : "bio_digestion",
|
||||
"name" : "Expanded Digestive System",
|
||||
"cost" : 0,
|
||||
"time" : 0,
|
||||
"description": "You have been outfitted with three synthetic stomachs and industrial-grade\nintestines. Not only can you extract much more nutrition from food, but you\nare highly resistant to foodborne illness, and can sometimes eat rotten food."
|
||||
},
|
||||
{
|
||||
"id" : "bio_tools",
|
||||
"name" : "Integrated Toolset",
|
||||
"cost" : 0,
|
||||
"time" : 0,
|
||||
"description": "Implanted in your hands and fingers is a complete tool set - screwdriver,\nhammer, wrench, and heating elements. You can use this in place of many\ntools when crafting."
|
||||
},
|
||||
{
|
||||
"id" : "bio_shock",
|
||||
"name" : "Electroshock Unit",
|
||||
"cost" : 1,
|
||||
"time" : 0,
|
||||
"description": "While fighting unarmed, or with a weapon that conducts electricity, there is\na chance that a successful hit will shock your opponent, inflicting extra\ndamage and disabling them temporarily at the cost of some energy."
|
||||
},
|
||||
{
|
||||
"id" : "bio_heat_absorb",
|
||||
"name" : "Heat Drain",
|
||||
"cost" : 1,
|
||||
"time" : 0,
|
||||
"description": "While fighting unarmed against a warm-blooded opponent, there is a chance\nthat a successful hit will drain body heat, inflicting a small amount of\nextra damage, and increasing your power reserves slightly."
|
||||
},
|
||||
{
|
||||
"id" : "bio_carbon",
|
||||
"name" : "Subdermal Carbon Filament",
|
||||
"cost" : 0,
|
||||
"time" : 0,
|
||||
"description": "Lying just beneath your skin is a thin armor made of carbon nanotubes. This\nreduces bashing damage by 2 and cutting damage by 4."
|
||||
},
|
||||
{
|
||||
"id" : "bio_armor_head",
|
||||
"name" : "Alloy Plating - Head",
|
||||
"cost" : 0,
|
||||
"time" : 0,
|
||||
"description": "The flesh on your head has been replaced by a strong armor, protecting both\nyour head and jaw regions."
|
||||
},
|
||||
{
|
||||
"id" : "bio_armor_torso",
|
||||
"name" : "Alloy Plating - Torso",
|
||||
"cost" : 0,
|
||||
"time" : 0,
|
||||
"description": "The flesh on your torso has been replaced by a strong armor, protecting you\ngreatly."
|
||||
},
|
||||
{
|
||||
"id" : "bio_armor_arms",
|
||||
"name" : "Alloy Plating - Arms",
|
||||
"cost" : 0,
|
||||
"time" : 0,
|
||||
"description": "The flesh on your arms has been replaced by a strong armor, protecting you\ngreatly."
|
||||
},
|
||||
{
|
||||
"id" : "bio_armor_legs",
|
||||
"name" : "Alloy Plating - Legs",
|
||||
"cost" : 0,
|
||||
"time" : 0,
|
||||
"description": "The flesh on your legs has been replaced by a strong armor, protecting you\ngreatly."
|
||||
},
|
||||
{
|
||||
"id" : "bio_flashlight",
|
||||
"name" : "Cranial Flashlight",
|
||||
"cost" : 1,
|
||||
"time" : 30,
|
||||
"flags" : ["ACTIVE"],
|
||||
"description": "Mounted between your eyes is a small but powerful LED flashlight."
|
||||
},
|
||||
{
|
||||
"id" : "bio_night_vision",
|
||||
"name" : "Implanted Night Vision",
|
||||
"cost" : 1,
|
||||
"time" : 20,
|
||||
"flags" : ["ACTIVE"],
|
||||
"description": "Your eyes have been modified to amplify existing light, allowing you to see\nin the dark."
|
||||
},
|
||||
{
|
||||
"id" : "bio_infrared",
|
||||
"name" : "Infrared Vision",
|
||||
"cost" : 1,
|
||||
"time" : 4,
|
||||
"flags" : ["ACTIVE"],
|
||||
"description": "Your range of vision extends into the infrared, allowing you to see warm-\nblooded creatures in the dark, and even through walls."
|
||||
},
|
||||
{
|
||||
"id" : "bio_face_mask",
|
||||
"name" : "Facial Distortion",
|
||||
"cost" : 1,
|
||||
"time" : 10,
|
||||
"flags" : ["ACTIVE"],
|
||||
"description": "Your face is actually made of a compound which may be molded by electrical\nimpulses, making you impossible to recognize. While not powered, however,\nthe compound reverts to its default shape."
|
||||
},
|
||||
{
|
||||
"id" : "bio_ads",
|
||||
"name" : "Active Defense System",
|
||||
"cost" : 1,
|
||||
"time" : 7,
|
||||
"flags" : ["ACTIVE"],
|
||||
"description": "A thin forcefield surrounds your body, continually draining power. Anything\nattempting to penetrate this field has a chance of being deflected at the\ncost of more energy. Melee attacks will be stopped more often than bullets."
|
||||
},
|
||||
{
|
||||
"id" : "bio_ods",
|
||||
"name" : "Offensive Defense System",
|
||||
"cost" : 1,
|
||||
"time" : 6,
|
||||
"flags" : ["ACTIVE"],
|
||||
"description": "A thin forcefield surrounds your body, continually draining power. This\nfield does not deflect penetration, but rather delivers a very strong shock,\ndamaging unarmed attackers and those with a conductive weapon."
|
||||
},
|
||||
{
|
||||
"id" : "bio_scent_mask",
|
||||
"name" : "Olfactory Mask",
|
||||
"cost" : 1,
|
||||
"time" : 8,
|
||||
"flags" : ["ACTIVE"],
|
||||
"description": "While this system is powered, your body will produce very little odor, making\nit nearly impossible for creatures to track you by scent."
|
||||
},
|
||||
{
|
||||
"id" : "bio_scent_vision",
|
||||
"name" : "Scent Vision",
|
||||
"cost" : 1,
|
||||
"time" : 30,
|
||||
"flags" : ["ACTIVE"],
|
||||
"description": "While this system is powered, you're able to visually sense your own scent,\nmaking it possible for you to recognize your surroundings even if you can't\nsee it."
|
||||
},
|
||||
{
|
||||
"id" : "bio_cloak",
|
||||
"name" : "Cloaking System",
|
||||
"cost" : 2,
|
||||
"time" : 1,
|
||||
"flags" : ["ACTIVE"],
|
||||
"description": "This high-power system uses a set of cameras and LEDs to make you blend into\nyour background, rendering you fully invisible to normal vision. However,\nyou may be detected by infrared, sonar, etc."
|
||||
},
|
||||
{
|
||||
"id" : "bio_painkiller",
|
||||
"name" : "Sensory Dulling",
|
||||
"cost" : 2,
|
||||
"time" : 0,
|
||||
"flags" : ["ACTIVE"],
|
||||
"description": "Your nervous system is wired to allow you to inhibit the signals of pain,\nallowing you to dull your senses at will. However, the use of this system\nmay cause delayed reaction time and drowsiness."
|
||||
},
|
||||
{
|
||||
"id" : "bio_nanobots",
|
||||
"name" : "Repair Nanobots",
|
||||
"cost" : 5,
|
||||
"time" : 0,
|
||||
"flags" : ["ACTIVE"],
|
||||
"description": "Inside your body is a fleet of tiny dormant robots. Once charged from your\nenergy banks, they will flit about your body, repairing any damage."
|
||||
},
|
||||
{
|
||||
"id" : "bio_heatsink",
|
||||
"name" : "Thermal Dissipation",
|
||||
"cost" : 1,
|
||||
"time" : 6,
|
||||
"flags" : ["ACTIVE"],
|
||||
"description": "Powerful heatsinks supermaterials are woven into your flesh. While powered,\nthis system will prevent heat damage up to 2000 degrees fahrenheit. Note\nthat this does not affect your internal temperature."
|
||||
},
|
||||
{
|
||||
"id" : "bio_resonator",
|
||||
"name" : "Sonic Resonator",
|
||||
"cost" : 4,
|
||||
"time" : 0,
|
||||
"flags" : ["ACTIVE"],
|
||||
"description": "Your entire body may resonate at very high power, creating a short-range\nshockwave. While it will not to much damage to flexible creatures, stiff\nitems such as walls, doors, and even robots will be severely damaged."
|
||||
},
|
||||
{
|
||||
"id" : "bio_time_freeze",
|
||||
"name" : "Time Dilation",
|
||||
"cost" : 3,
|
||||
"time" : 0,
|
||||
"flags" : ["ACTIVE"],
|
||||
"description": "At an immense cost of power, you may increase your body speed and reactions\ndramatically, essentially freezing time. You are still delicate, however,\nand violent or rapid movements may damage you due to friction."
|
||||
},
|
||||
{
|
||||
"id" : "bio_teleport",
|
||||
"name" : "Teleportation Unit",
|
||||
"cost" : 10,
|
||||
"time" : 0,
|
||||
"flags" : ["ACTIVE"],
|
||||
"description": "This highly experimental unit folds space over short distances, instantly\ntransporting your body up to 25 feet at the cost of much power. Note that\nprolonged or frequent use may have dangerous side effects."
|
||||
},
|
||||
{
|
||||
"id" : "bio_blood_anal",
|
||||
"name" : "Blood Analysis",
|
||||
"cost" : 1,
|
||||
"time" : 0,
|
||||
"flags" : ["ACTIVE"],
|
||||
"description": "Small sensors have been implanted in your heart, allowing you to analyse your\nblood. This will detect many illnesses, drugs, and other conditions."
|
||||
},
|
||||
{
|
||||
"id" : "bio_blood_filter",
|
||||
"name" : "Blood Filter",
|
||||
"cost" : 3,
|
||||
"time" : 0,
|
||||
"flags" : ["ACTIVE"],
|
||||
"description": "A filtration system in your heart allows you to actively filter out chemical\nimpurities, primarily drugs. It will have limited impact on viruses. Note\nthat it is not a targeted filter; ALL drugs in your system will be affected."
|
||||
},
|
||||
{
|
||||
"id" : "bio_alarm",
|
||||
"name" : "Alarm System",
|
||||
"cost" : 1,
|
||||
"time" : 400,
|
||||
"flags" : ["ACTIVE"],
|
||||
"description": "A motion-detecting alarm system will notice almost all movement within a\nfifteen-foot radius, and will silently alert you. This is very useful during\nsleep, or if you suspect a cloaked pursuer."
|
||||
},
|
||||
{
|
||||
"id" : "bio_evap",
|
||||
"name" : "Aero-Evaporator",
|
||||
"cost" : 8,
|
||||
"time" : 0,
|
||||
"flags" : ["ACTIVE"],
|
||||
"description": "This unit draws moisture from the surrounding air, which then is poured from\na fingertip in the form of water. It may fail in very dry environments."
|
||||
},
|
||||
{
|
||||
"id" : "bio_lighter",
|
||||
"name" : "Mini-Flamethrower",
|
||||
"cost" : 3,
|
||||
"time" : 0,
|
||||
"flags" : ["ACTIVE"],
|
||||
"description": "The index fingers of both hands have powerful fire starters which extend from\nthe tip."
|
||||
},
|
||||
{
|
||||
"id" : "bio_claws",
|
||||
"name" : "Adamantium Claws",
|
||||
"cost" : 3,
|
||||
"time" : 0,
|
||||
"flags" : ["ACTIVE"],
|
||||
"description": "Your fingers can withdraw into your hands, allowing a set of vicious claws to\nextend. These do considerable cutting damage, but prevent you from holding\nanything else."
|
||||
},
|
||||
{
|
||||
"id" : "bio_blaster",
|
||||
"name" : "Fusion Blaster Arm",
|
||||
"cost" : 2,
|
||||
"time" : 0,
|
||||
"flags" : ["ACTIVE"],
|
||||
"description": "Your left arm has been replaced by a heavy-duty fusion blaster! You may use\nyour energy banks to fire a damaging heat ray; however, you are unable to use\nor carry two-handed items, and may only fire handguns."
|
||||
},
|
||||
{
|
||||
"id" : "bio_laser",
|
||||
"name" : "Finger-Mounted Laser",
|
||||
"cost" : 2,
|
||||
"time" : 0,
|
||||
"flags" : ["ACTIVE"],
|
||||
"description": "One of your fingers has a small high-powered laser embedded in it. This long\nrange weapon is not incredibly damaging, but is very accurate, and has the\npotential to start fires."
|
||||
},
|
||||
{
|
||||
"id" : "bio_emp",
|
||||
"name" : "Directional EMP",
|
||||
"cost" : 4,
|
||||
"time" : 0,
|
||||
"flags" : ["ACTIVE"],
|
||||
"description": "Mounted in the palms of your hand are small parabolic EMP field generators.\nYou may use power to fire a short-ranged blast which will disable electronics\nand robots."
|
||||
},
|
||||
{
|
||||
"id" : "bio_hydraulics",
|
||||
"name" : "Hydraulic Muscles",
|
||||
"cost" : 1,
|
||||
"time" : 3,
|
||||
"flags" : ["ACTIVE"],
|
||||
"description": "While activated, the muscles in your arms will be greatly enchanced,\nincreasing your strength by 20."
|
||||
},
|
||||
{
|
||||
"id" : "bio_water_extractor",
|
||||
"name" : "Water Extraction Unit",
|
||||
"cost" : 2,
|
||||
"time" : 0,
|
||||
"flags" : ["ACTIVE"],
|
||||
"description": "Nanotubes embedded in the palm of your hand will pump any available fluid out\nof a dead body, cleanse it of impurities and convert it into drinkable water.\nYou must, however, have a container to store the water in."
|
||||
},
|
||||
{
|
||||
"id" : "bio_magnet",
|
||||
"name" : "Electromagnetic Unit",
|
||||
"cost" : 2,
|
||||
"time" : 0,
|
||||
"flags" : ["ACTIVE"],
|
||||
"description": "Embedded in your hand is a powerful electromagnet, allowing you to pull items\nmade of iron over short distances."
|
||||
},
|
||||
{
|
||||
"id" : "bio_fingerhack",
|
||||
"name" : "Fingerhack",
|
||||
"cost" : 1,
|
||||
"time" : 0,
|
||||
"flags" : ["ACTIVE"],
|
||||
"description": "One of your fingers has an electrohack embedded in it; an all-purpose hacking\nunit used to override control panels and the like (but not computers). Skill\nin computers is important, and a failed use may damage your circuits."
|
||||
},
|
||||
{
|
||||
"id" : "bio_lockpick",
|
||||
"name" : "Fingerpick",
|
||||
"cost" : 1,
|
||||
"time" : 0,
|
||||
"flags" : ["ACTIVE"],
|
||||
"description": "One of your fingers has an electronic lockpick embedded in it. This auto-\nmatic system will quickly unlock all but the most advanced key locks without\nany skill required on the part of the user."
|
||||
},
|
||||
{
|
||||
"id" : "bio_ground_sonar",
|
||||
"name" : "Terranian Sonar",
|
||||
"cost" : 1,
|
||||
"time" : 5,
|
||||
"flags" : ["ACTIVE"],
|
||||
"description": "Your feet are equipped with precision sonar equipment, allowing you to detect\nthe movements of creatures below the ground."
|
||||
},
|
||||
{
|
||||
"id" : "bio_power_armor_interface",
|
||||
"name" : "Power Armor Interface",
|
||||
"cost" : 1,
|
||||
"time" : 10,
|
||||
"flags" : ["ACTIVE"],
|
||||
"description": "Interfaces your power system with the internal charging port on suits of power armor."
|
||||
},
|
||||
{
|
||||
"id" : "bio_power_armor_interface_mkII",
|
||||
"name" : "Power Armor Interface Mk. II",
|
||||
"cost" : 1,
|
||||
"time" : 50,
|
||||
"flags" : ["ACTIVE"],
|
||||
"description": "Interfaces your power system with the internal charging port on suits of power armor.\nThe Mk. II was designed by DoubleTech Inc., to meet the popularity of the Mk. II\npower armor series."
|
||||
},
|
||||
{
|
||||
"id" : "bio_flashbang",
|
||||
"name" : "Flashbang Generator",
|
||||
"cost" : 5,
|
||||
"time" : 0,
|
||||
"flags" : ["ACTIVE"],
|
||||
"description": "Light emitting diodes integrated into your skin can release a flash comparable\nto a flashbang grenade, blinding nearby enemies. Speakers integrated into your\nbody mimic the loud sound, deafening those nearby."
|
||||
},
|
||||
{
|
||||
"id" : "bio_railgun",
|
||||
"name" : "Railgun",
|
||||
"cost" : 1,
|
||||
"time" : 100,
|
||||
"flags" : ["ACTIVE"],
|
||||
"description": "EM field generators in your arms double the range and damage of thrown\niron and steel objects at a cost of 1 power per throw, causing them to\nleave a trail of electricity that can cause additional damage."
|
||||
},
|
||||
{
|
||||
"id" : "bio_probability_travel",
|
||||
"name" : "Probability Travel",
|
||||
"cost" : 1,
|
||||
"time" : 100,
|
||||
"flags" : ["ACTIVE"],
|
||||
"description": "Increases your body's wavelength, allowing you to quantum tunnel through\nwalls, reappearing on the other side. Power drain in standby is minimal,\nbut each tile tunneled through costs 10 bionic power."
|
||||
},
|
||||
{
|
||||
"id" : "bio_shockwave",
|
||||
"name" : "Shockwave Generator",
|
||||
"cost" : 10,
|
||||
"time" : 0,
|
||||
"flags" : ["ACTIVE"],
|
||||
"description": "You generate a powerful shockwave, knocking back all nearby creatures.\nTargets are stunned briefly, take damage and additional stun upon impact\nwith impassable terrain, and knockback any creatures they collide with."
|
||||
},
|
||||
{
|
||||
"id" : "bio_chain_lightning",
|
||||
"name" : "Chain Lightning",
|
||||
"cost" : 5,
|
||||
"time" : 0,
|
||||
"flags" : ["ACTIVE"],
|
||||
"description": "Your body is equipped with a chain lightning generator, allowing you to\n emit a blast of lightning at a target, leaving a trail of lightning in\n its wake, jumping to additional targets within 4 tiles of the previous target."
|
||||
},
|
||||
{
|
||||
"id" : "bio_night",
|
||||
"name" : "Artificial Night Generator",
|
||||
"cost" : 1,
|
||||
"time" : 2,
|
||||
"flags" : ["ACTIVE"],
|
||||
"description": "Destructive interference eliminates all light within a 15 tile radius."
|
||||
},
|
||||
{
|
||||
"id" : "bio_dis_shock",
|
||||
"name" : "Electrical Discharge",
|
||||
"cost" : 0,
|
||||
"time" : 0,
|
||||
"flags" : ["FAULTY"],
|
||||
"description": "A malfunctioning bionic which occasionally discharges electricity through\nyour body, causing pain and brief paralysis but no damage."
|
||||
},
|
||||
{
|
||||
"id" : "bio_dis_acid",
|
||||
"name" : "Acidic Discharge",
|
||||
"cost" : 0,
|
||||
"time" : 0,
|
||||
"flags" : ["FAULTY"],
|
||||
"description": "A malfunctioning bionic which occasionally discharges acid into your muscles,\ncausing sharp pain and minor damage."
|
||||
},
|
||||
{
|
||||
"id" : "bio_drain",
|
||||
"name" : "Electrical Drain",
|
||||
"cost" : 0,
|
||||
"time" : 0,
|
||||
"flags" : ["FAULTY"],
|
||||
"description": "A malfunctioning bionic. It doesn't perform any useful function, but will\noccasionally draw power from your batteries."
|
||||
},
|
||||
{
|
||||
"id" : "bio_noise",
|
||||
"name" : "Noisemaker",
|
||||
"cost" : 0,
|
||||
"time" : 0,
|
||||
"flags" : ["FAULTY"],
|
||||
"description": "A malfunctioning bionic. It will occasionally emit a loud burst of noise."
|
||||
},
|
||||
{
|
||||
"id" : "bio_power_weakness",
|
||||
"name" : "Power Overload",
|
||||
"cost" : 0,
|
||||
"time" : 0,
|
||||
"flags" : ["FAULTY"],
|
||||
"description": "Damaged power circuits cause short-circuiting inside your muscles when your\nbatteries are above 75%%%% capacity, causing greatly reduced strength. This\nhas no effect if you have no internal batteries."
|
||||
},
|
||||
{
|
||||
"id" : "bio_stiff",
|
||||
"name" : "Wire-induced Stiffness",
|
||||
"cost" : 0,
|
||||
"time" : 0,
|
||||
"flags" : ["FAULTY"],
|
||||
"description": "Improperly installed wires cause a physical stiffness in most of your body,\ncausing increased encumberance."
|
||||
}
|
||||
]
|
||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@@ -1,829 +0,0 @@
|
||||
[
|
||||
{
|
||||
"type" : "AMMO",
|
||||
"id" : "arrowhead",
|
||||
"rarity" : 0,
|
||||
"price" : 30,
|
||||
"name" : "arrowhead",
|
||||
"symbol" : "=",
|
||||
"color" : "light_gray",
|
||||
"description" : "Heads for an arrow. Placing these on an arrow will make the arrow more damaging and piercing.",
|
||||
"material" : "steel",
|
||||
"volume" : 1,
|
||||
"weight" : 1,
|
||||
"bashing" : 1,
|
||||
"cutting" : 0,
|
||||
"to_hit" : 0,
|
||||
"ammo_type" : "NULL",
|
||||
"damage" : 0,
|
||||
"pierce" : 0,
|
||||
"range" : 0,
|
||||
"dispersion" : 0,
|
||||
"recoil" : 0,
|
||||
"count" : 10
|
||||
},
|
||||
{
|
||||
"type" : "AMMO",
|
||||
"id" : "fletching",
|
||||
"rarity" : 0,
|
||||
"price" : 30,
|
||||
"name" : "fletching",
|
||||
"symbol" : "=",
|
||||
"color" : "white",
|
||||
"description" : "Also known as a flight, this item provides aerodynamic stabilization of arrows.",
|
||||
"material" : "leather",
|
||||
"volume" : 1,
|
||||
"weight" : 1,
|
||||
"bashing" : 1,
|
||||
"cutting" : 0,
|
||||
"to_hit" : 0,
|
||||
"ammo_type" : "NULL",
|
||||
"damage" : 0,
|
||||
"pierce" : 0,
|
||||
"range" : 0,
|
||||
"dispersion" : 0,
|
||||
"recoil" : 0,
|
||||
"count" : 10
|
||||
},
|
||||
{
|
||||
"type" : "AMMO",
|
||||
"id" : "shaft_wood",
|
||||
"rarity" : 0,
|
||||
"price" : 20,
|
||||
"name" : "wood arrow shaft",
|
||||
"symbol" : "=",
|
||||
"color" : "green",
|
||||
"description" : "A crude shaft made from wood. It needs arrowheads and fletching to become a functional arrow. You can, however, fire it from a bow.",
|
||||
"material" : "wood",
|
||||
"volume" : 1,
|
||||
"weight" : 12,
|
||||
"bashing" : 1,
|
||||
"cutting" : 0,
|
||||
"to_hit" : 0,
|
||||
"ammo_type" : "arrow",
|
||||
"damage" : 0,
|
||||
"pierce" : 0,
|
||||
"range" : 0,
|
||||
"dispersion" : 34,
|
||||
"recoil" : 0,
|
||||
"count" : 10
|
||||
},
|
||||
{
|
||||
"type" : "AMMO",
|
||||
"id" : "shaft_wood_heavy",
|
||||
"rarity" : 0,
|
||||
"price" : 20,
|
||||
"name" : "heavy wood arrow shaft",
|
||||
"symbol" : "=",
|
||||
"color" : "green",
|
||||
"description" : "A heavy shaft made from wood. It needs arrowheads and fletching to become a functional arrow. You can, however, fire it from a bow.",
|
||||
"material" : "wood",
|
||||
"volume" : 1,
|
||||
"weight" : 14,
|
||||
"bashing" : 2,
|
||||
"cutting" : 0,
|
||||
"to_hit" : 0,
|
||||
"ammo_type" : "arrow",
|
||||
"damage" : 2,
|
||||
"pierce" : 0,
|
||||
"range" : 1,
|
||||
"dispersion" : 29,
|
||||
"recoil" : 0,
|
||||
"count" : 10
|
||||
},
|
||||
{
|
||||
"type" : "AMMO",
|
||||
"id" : "shaft_metal",
|
||||
"rarity" : 0,
|
||||
"price" : 20,
|
||||
"name" : "metal arrow shaft",
|
||||
"symbol" : "=",
|
||||
"color" : "green",
|
||||
"description" : "A heavy shaft made from scrap metal. It needs arrowheads and fletching to become a functional arrow. You can, however, fire it from a bow.",
|
||||
"material" : "steel",
|
||||
"volume" : 1,
|
||||
"weight" : 19,
|
||||
"bashing" : 3,
|
||||
"cutting" : 0,
|
||||
"to_hit" : 0,
|
||||
"ammo_type" : "arrow",
|
||||
"damage" : 3,
|
||||
"pierce" : 0,
|
||||
"range" : 3,
|
||||
"dispersion" : 24,
|
||||
"recoil" : 0,
|
||||
"count" : 10
|
||||
},
|
||||
{
|
||||
"type" : "AMMO",
|
||||
"id" : "arrow_fire_hardened",
|
||||
"rarity" : 0,
|
||||
"price" : 25,
|
||||
"name" : "fire hardened wood arrow",
|
||||
"symbol" : "=",
|
||||
"color" : "green",
|
||||
"description" : "A simple arrow shaft that has had a point carved into it and then fire hardened.",
|
||||
"material" : "wood",
|
||||
"volume" : 1,
|
||||
"weight" : 12,
|
||||
"bashing" : 2,
|
||||
"cutting" : 0,
|
||||
"to_hit" : 0,
|
||||
"ammo_type" : "arrow",
|
||||
"damage" : 3,
|
||||
"pierce" : 0,
|
||||
"range" : 2,
|
||||
"dispersion" : 29,
|
||||
"recoil" : 0,
|
||||
"count" : 10
|
||||
},
|
||||
{
|
||||
"type" : "AMMO",
|
||||
"id" : "arrow_field_point",
|
||||
"rarity" : 0,
|
||||
"price" : 30,
|
||||
"name" : "field point wood arrow",
|
||||
"symbol" : "=",
|
||||
"color" : "green",
|
||||
"description" : "A simple arrow shaft that has a crude arrow head. Useful for hunting small woodland creatures.",
|
||||
"material" : "wood",
|
||||
"volume" : 1,
|
||||
"weight" : 13,
|
||||
"bashing" : 3,
|
||||
"cutting" : 0,
|
||||
"to_hit" : 0,
|
||||
"ammo_type" : "arrow",
|
||||
"damage" : 6,
|
||||
"pierce" : 1,
|
||||
"range" : 2,
|
||||
"dispersion" : 29,
|
||||
"recoil" : 0,
|
||||
"count" : 10
|
||||
},
|
||||
{
|
||||
"type" : "AMMO",
|
||||
"id" : "arrow_small_game",
|
||||
"rarity" : 0,
|
||||
"price" : 30,
|
||||
"name" : "small game arrow",
|
||||
"symbol" : "=",
|
||||
"color" : "green",
|
||||
"description" : "A simple arrow shaft that has a wide blunt head. Useful for hunting small woodland creatures without splattering them all over the ground.",
|
||||
"material" : "wood",
|
||||
"volume" : 1,
|
||||
"weight" : 13,
|
||||
"bashing" : 4,
|
||||
"cutting" : 0,
|
||||
"to_hit" : 0,
|
||||
"ammo_type" : "arrow",
|
||||
"damage" : 2,
|
||||
"pierce" : 0,
|
||||
"range" : 2,
|
||||
"dispersion" : 29,
|
||||
"recoil" : 0,
|
||||
"count" : 10,
|
||||
"flags" : ["NOGIB"]
|
||||
},
|
||||
{
|
||||
"type" : "AMMO",
|
||||
"id" : "arrow_fire_hardened_fletched",
|
||||
"rarity" : 0,
|
||||
"price" : 35,
|
||||
"name" : "fletched fire hardened wood arrow",
|
||||
"symbol" : "=",
|
||||
"color" : "green",
|
||||
"description" : "This simple arrow has a fire hardened point and some fletchings.",
|
||||
"material" : "wood",
|
||||
"volume" : 1,
|
||||
"weight" : 13,
|
||||
"bashing" : 3,
|
||||
"cutting" : 0,
|
||||
"to_hit" : 0,
|
||||
"ammo_type" : "arrow",
|
||||
"damage" : 4,
|
||||
"pierce" : 0,
|
||||
"range" : 6,
|
||||
"dispersion" : 14,
|
||||
"recoil" : 0,
|
||||
"count" : 10
|
||||
},
|
||||
{
|
||||
"type" : "AMMO",
|
||||
"id" : "arrow_field_point_fletched",
|
||||
"rarity" : 0,
|
||||
"price" : 40,
|
||||
"name" : "fletched field point wood arrow",
|
||||
"symbol" : "=",
|
||||
"color" : "green",
|
||||
"description" : "A simple arrow shaft that has a crude arrow head and some fletchings. Useful for hunting small woodland creatures or as a last ditch defense against zombies.",
|
||||
"material" : "wood",
|
||||
"volume" : 1,
|
||||
"weight" : 14,
|
||||
"bashing" : 3,
|
||||
"cutting" : 0,
|
||||
"to_hit" : 0,
|
||||
"ammo_type" : "arrow",
|
||||
"damage" : 7,
|
||||
"pierce" : 2,
|
||||
"range" : 6,
|
||||
"dispersion" : 14,
|
||||
"recoil" : 0,
|
||||
"count" : 10
|
||||
},
|
||||
{
|
||||
"type" : "AMMO",
|
||||
"id" : "arrow_wood",
|
||||
"rarity" : 7,
|
||||
"price" : 75,
|
||||
"name" : "wood arrow",
|
||||
"symbol" : "=",
|
||||
"color" : "green",
|
||||
"description" : "A basic wooden arrow, it has a metal arrow head and some fletchings. It's light-weight, does some damage, and is so-so on accuracy. Stands a good chance of remaining intact once fired.",
|
||||
"material" : "wood",
|
||||
"volume" : 1,
|
||||
"weight" : 15,
|
||||
"bashing" : 2,
|
||||
"cutting" : 1,
|
||||
"to_hit" : 0,
|
||||
"ammo_type" : "arrow",
|
||||
"damage" : 10,
|
||||
"pierce" : 3,
|
||||
"range" : 7,
|
||||
"dispersion" : 9,
|
||||
"recoil" : 0,
|
||||
"count" : 10
|
||||
},
|
||||
{
|
||||
"type" : "AMMO",
|
||||
"id" : "arrow_heavy_fire_hardened_fletched",
|
||||
"rarity" : 7,
|
||||
"price" : 75,
|
||||
"name" : "heavy fletched fire hardened arrow",
|
||||
"symbol" : "=",
|
||||
"color" : "green",
|
||||
"description" : "This arrow is significantly sturdier than other wooden arrows. It has a firehardened point and some fletchings.",
|
||||
"material" : "plastic",
|
||||
"volume" : 1,
|
||||
"weight" : 19,
|
||||
"bashing" : 4,
|
||||
"cutting" : 0,
|
||||
"to_hit" : 0,
|
||||
"ammo_type" : "arrow",
|
||||
"damage" : 5,
|
||||
"pierce" : 2,
|
||||
"range" : 7,
|
||||
"dispersion" : 9,
|
||||
"recoil" : 0,
|
||||
"count" : 10
|
||||
},
|
||||
{
|
||||
"type" : "AMMO",
|
||||
"id" : "arrow_heavy_field_point_fletched",
|
||||
"rarity" : 7,
|
||||
"price" : 75,
|
||||
"name" : "heavy fletched field point arrow",
|
||||
"symbol" : "=",
|
||||
"color" : "green",
|
||||
"description" : "This arrow is significantly sturdier than other wooden arrows. It has a crude field point head and some fletchings.",
|
||||
"material" : "plastic",
|
||||
"volume" : 1,
|
||||
"weight" : 20,
|
||||
"bashing" : 4,
|
||||
"cutting" : 0,
|
||||
"to_hit" : 0,
|
||||
"ammo_type" : "arrow",
|
||||
"damage" : 6,
|
||||
"pierce" : 3,
|
||||
"range" : 7,
|
||||
"dispersion" : 9,
|
||||
"recoil" : 0,
|
||||
"count" : 10
|
||||
},
|
||||
{
|
||||
"type" : "AMMO",
|
||||
"id" : "arrow_wood_heavy",
|
||||
"rarity" : 7,
|
||||
"price" : 75,
|
||||
"name" : "heavy wood arrow",
|
||||
"symbol" : "=",
|
||||
"color" : "green",
|
||||
"description" : "A heavy wooden arrow, it has a metal arrow head and some fletchings. It's much heavier than other wooden arrows, as a result it does more damage and is more stable in flight, resulting in better accuracy over a longer range. Stands a very good chance of remaining intact once fired.",
|
||||
"material" : "plastic",
|
||||
"volume" : 1,
|
||||
"weight" : 22,
|
||||
"bashing" : 6,
|
||||
"cutting" : 2,
|
||||
"to_hit" : 0,
|
||||
"ammo_type" : "arrow",
|
||||
"damage" : 12,
|
||||
"pierce" : 5,
|
||||
"range" : 8,
|
||||
"dispersion" : 4,
|
||||
"recoil" : 0,
|
||||
"count" : 10
|
||||
},
|
||||
{
|
||||
"type" : "AMMO",
|
||||
"id" : "arrow_metal_sharpened",
|
||||
"rarity" : 7,
|
||||
"price" : 50,
|
||||
"name" : "sharpened metal arrow",
|
||||
"symbol" : "=",
|
||||
"color" : "green",
|
||||
"description" : "This metal shaft has been carefully sharpened so that it has a crude point at the end.",
|
||||
"material" : "steel",
|
||||
"volume" : 1,
|
||||
"weight" : 19,
|
||||
"bashing" : 2,
|
||||
"cutting" : 0,
|
||||
"to_hit" : 0,
|
||||
"ammo_type" : "arrow",
|
||||
"damage" : 5,
|
||||
"pierce" : 3,
|
||||
"range" : 5,
|
||||
"dispersion" : 19,
|
||||
"recoil" : 0,
|
||||
"count" : 10
|
||||
},
|
||||
{
|
||||
"type" : "AMMO",
|
||||
"id" : "arrow_metal",
|
||||
"rarity" : 7,
|
||||
"price" : 100,
|
||||
"name" : "metal arrow",
|
||||
"symbol" : "=",
|
||||
"color" : "green",
|
||||
"description" : "This metal arrow has a steel arrow head and some fletchings.",
|
||||
"material" : "steel",
|
||||
"volume" : 1,
|
||||
"weight" : 21,
|
||||
"bashing" : 3,
|
||||
"cutting" : 2,
|
||||
"to_hit" : 0,
|
||||
"ammo_type" : "arrow",
|
||||
"damage" : 14,
|
||||
"pierce" : 7,
|
||||
"range" : 10,
|
||||
"dispersion" : 4,
|
||||
"recoil" : 0,
|
||||
"count" : 10
|
||||
},
|
||||
{
|
||||
"type" : "AMMO",
|
||||
"id" : "arrow_cf",
|
||||
"rarity" : 5,
|
||||
"price" : 150,
|
||||
"name" : "carbon fiber arrow",
|
||||
"symbol" : "=",
|
||||
"color" : "green",
|
||||
"description" : "High-tech carbon fiber shafts and 100 grain broadheads. Very light weight, fast, and notoriously fragile.",
|
||||
"material" : "plastic",
|
||||
"volume" : 2,
|
||||
"weight" : 15,
|
||||
"bashing" : 1,
|
||||
"cutting" : 0,
|
||||
"to_hit" : 0,
|
||||
"ammo_type" : "arrow",
|
||||
"damage" : 10,
|
||||
"pierce" : 5,
|
||||
"range" : 8,
|
||||
"dispersion" : 9,
|
||||
"recoil" : 0,
|
||||
"count" : 8
|
||||
},
|
||||
{
|
||||
"type" : "AMMO",
|
||||
"id" : "arrow_exploding",
|
||||
"rarity" : 5,
|
||||
"price" : 350,
|
||||
"name" : "exploding arrow",
|
||||
"symbol" : "=",
|
||||
"color" : "green",
|
||||
"description" : "This arrow has a small IED strapped to its tip. Horribly inaccurate, heavy, and bulky, not only does this contraption require expert hands to pull off a shot, it requires one to loose this with a small measure of confidence the shooter won't be caught in the blast radius.",
|
||||
"material" : "steel",
|
||||
"volume" : 2,
|
||||
"weight" : 40,
|
||||
"bashing" : 2,
|
||||
"cutting" : 0,
|
||||
"to_hit" : 0,
|
||||
"ammo_type" : "arrow",
|
||||
"damage" : 15,
|
||||
"pierce" : 9,
|
||||
"range" : 5,
|
||||
"dispersion" : 19,
|
||||
"recoil" : 0,
|
||||
"count" : 5,
|
||||
"effects" : ["EXPLOSIVE"]
|
||||
},
|
||||
{
|
||||
"id" : "exploding_arrow_warhead",
|
||||
"symbol" : "=",
|
||||
"color" : "green",
|
||||
"name" : "exploding arrowhead",
|
||||
"description" : "This simple IED is designed to be attached to an arrow and detonate on impact. Theoretically you could throw it but who would want to do that?",
|
||||
"rarity" : 3,
|
||||
"price" : 400,
|
||||
"material" : "iron",
|
||||
"weight" : 10,
|
||||
"volume" : 1,
|
||||
"bashing" : 10,
|
||||
"cutting" : 0,
|
||||
"to_hit" : -1,
|
||||
"count" : 5,
|
||||
"effects" : ["EXPLOSIVE"]
|
||||
},
|
||||
{
|
||||
"type" : "AMMO",
|
||||
"id" : "arrow_flamming",
|
||||
"rarity" : 5,
|
||||
"price" : 350,
|
||||
"name" : "flaming arrow",
|
||||
"symbol" : "=",
|
||||
"color" : "green",
|
||||
"description" : "This arrow has a flaming rag wrapped around the shaft near the head. You should shoot it soon before it burns your bow.",
|
||||
"material" : "steel",
|
||||
"volume" : 2,
|
||||
"weight" : 40,
|
||||
"bashing" : 2,
|
||||
"cutting" : 0,
|
||||
"to_hit" : 0,
|
||||
"ammo_type" : "arrow",
|
||||
"damage" : 15,
|
||||
"pierce" : 9,
|
||||
"range" : 5,
|
||||
"dispersion" : 19,
|
||||
"recoil" : 0,
|
||||
"count" : 5,
|
||||
"effects" : ["IGNITE"]
|
||||
},
|
||||
{
|
||||
"type" : "AMMO",
|
||||
"id" : "bolt_wood",
|
||||
"rarity" : 8,
|
||||
"price" : 100,
|
||||
"name" : "wood crossbow bolt",
|
||||
"symbol" : "=",
|
||||
"color" : "green",
|
||||
"description" : "A sharpened bolt carved from wood. It's lighter than a steel bolt, but does less damage and is less accurate. Stands a good chance of remaining intact once fired.",
|
||||
"material" : "wood",
|
||||
"volume" : 1,
|
||||
"weight" : 40,
|
||||
"bashing" : 1,
|
||||
"cutting" : 0,
|
||||
"to_hit" : 0,
|
||||
"ammo_type" : "bolt",
|
||||
"damage" : 10,
|
||||
"pierce" : 1,
|
||||
"range" : 0,
|
||||
"dispersion" : 10,
|
||||
"recoil" : 0,
|
||||
"count" : 15
|
||||
},
|
||||
{
|
||||
"type" : "AMMO",
|
||||
"id" : "bolt_steel",
|
||||
"rarity" : 7,
|
||||
"price" : 400,
|
||||
"name" : "steel crossbow bolt",
|
||||
"symbol" : "=",
|
||||
"color" : "green",
|
||||
"description" : "A sharp bolt made from steel. Deadly in skilled hands. Stands an excellent chance of remaining intact once fired.",
|
||||
"material" : "steel",
|
||||
"volume" : 1,
|
||||
"weight" : 25,
|
||||
"bashing" : 5,
|
||||
"cutting" : 0,
|
||||
"to_hit" : 0,
|
||||
"ammo_type" : "bolt",
|
||||
"damage" : 20,
|
||||
"pierce" : 10,
|
||||
"range" : 6,
|
||||
"dispersion" : 9,
|
||||
"recoil" : 0,
|
||||
"count" : 10
|
||||
},
|
||||
{
|
||||
"id" : "selfbow",
|
||||
"type" : "GUN",
|
||||
"symbol" : "(",
|
||||
"color" : "yellow",
|
||||
"name" : "self bow",
|
||||
"description" : "A bow made from a single piece of wood. It is made specifically for the person using it.",
|
||||
"rarity" : 5,
|
||||
"price" : 400,
|
||||
"material" : "wood",
|
||||
"flags" : ["ALWAYS_TWOHAND", "RELOAD_AND_SHOOT"],
|
||||
"skill" : "archery",
|
||||
"ammo" : "arrow",
|
||||
"weight" : 8,
|
||||
"volume" : 12,
|
||||
"bashing" : 6,
|
||||
"cutting" : 0,
|
||||
"to_hit" : 0,
|
||||
"ranged_damage" : 4,
|
||||
"range" : 5,
|
||||
"dispersion" : 20,
|
||||
"recoil" : 0,
|
||||
"durability" : 6,
|
||||
"burst" : 0,
|
||||
"clip_size" : 1,
|
||||
"reload" : 70
|
||||
},
|
||||
{
|
||||
"id" : "shortbow",
|
||||
"type" : "GUN",
|
||||
"symbol" : "(",
|
||||
"color" : "yellow",
|
||||
"name" : "short bow",
|
||||
"description" : "A shorter bow than the longbow, easier to draw than the longbow but sacrifices power. Arrows fired from this weapon have a good chance of remaining intact for re-use. It requires 8 strength to fire",
|
||||
"rarity" : 5,
|
||||
"price" : 800,
|
||||
"material" : "wood",
|
||||
"flags" : ["ALWAYS_TWOHAND", "STR8_DRAW", "RELOAD_AND_SHOOT"],
|
||||
"skill" : "archery",
|
||||
"ammo" : "arrow",
|
||||
"weight" : 3,
|
||||
"volume" : 6,
|
||||
"bashing" : 6,
|
||||
"cutting" : 0,
|
||||
"to_hit" : 0,
|
||||
"ranged_damage" : 3,
|
||||
"range" : 6,
|
||||
"dispersion" : 14,
|
||||
"recoil" : 0,
|
||||
"durability" : 6,
|
||||
"burst" : 0,
|
||||
"clip_size" : 1,
|
||||
"reload" : 60
|
||||
},
|
||||
{
|
||||
"id" : "compbow",
|
||||
"type" : "GUN",
|
||||
"symbol" : "(",
|
||||
"color" : "yellow",
|
||||
"name" : "compound bow",
|
||||
"description" : "A bow with cams that fires high velocity arrows. Weaker people can use compound bows more easily. Arrows fired from this weapon have a good chance of remaining intact for re-use. It requires 8 strength to fire",
|
||||
"rarity" : 1,
|
||||
"price" : 1800,
|
||||
"material" : ["steel", "plastic"],
|
||||
"flags" : ["ALWAYS_TWOHAND", "STR8_DRAW", "RELOAD_AND_SHOOT"],
|
||||
"skill" : "archery",
|
||||
"ammo" : "arrow",
|
||||
"weight" : 8,
|
||||
"volume" : 8,
|
||||
"bashing" : 8,
|
||||
"cutting" : 0,
|
||||
"to_hit" : 1,
|
||||
"ranged_damage" : 5,
|
||||
"range" : 10,
|
||||
"dispersion" : 12,
|
||||
"recoil" : 0,
|
||||
"durability" : 6,
|
||||
"burst" : 0,
|
||||
"clip_size" : 1,
|
||||
"reload" : 100
|
||||
},
|
||||
{
|
||||
"id" : "compositebow",
|
||||
"type" : "GUN",
|
||||
"symbol" : "(",
|
||||
"color" : "yellow",
|
||||
"name" : "composite bow",
|
||||
"description" : "A bow made from more than one material so it is able to store more energy. Arrows fired from this weapon have a good chance of remaining intact for re-use. It requires 10 strength to fire",
|
||||
"rarity" : 3,
|
||||
"price" : 1200,
|
||||
"material" : ["wood", "plastic"],
|
||||
"flags" : ["ALWAYS_TWOHAND", "STR10_DRAW", "RELOAD_AND_SHOOT"],
|
||||
"skill" : "archery",
|
||||
"ammo" : "arrow",
|
||||
"weight" : 6,
|
||||
"volume" : 10,
|
||||
"bashing" : 8,
|
||||
"cutting" : 0,
|
||||
"to_hit" : 0,
|
||||
"ranged_damage" : 7,
|
||||
"range" : 12,
|
||||
"dispersion" : 10,
|
||||
"recoil" : 0,
|
||||
"durability" : 6,
|
||||
"burst" : 0,
|
||||
"clip_size" : 1,
|
||||
"reload" : 110
|
||||
},
|
||||
{
|
||||
"id" : "recurbow",
|
||||
"type" : "GUN",
|
||||
"symbol" : "(",
|
||||
"color" : "yellow",
|
||||
"name" : "recurve bow",
|
||||
"description" : "A bow that curves away from the archer at the tips allowing more power to be stored in the bow. Arrows fired from this weapon have a good chance of remaining intact for re-use. It requires 10 strength to fire",
|
||||
"rarity" : 2,
|
||||
"price" : 1200,
|
||||
"material" : ["steel", "plastic"],
|
||||
"flags" : ["ALWAYS_TWOHAND", "STR10_DRAW", "RELOAD_AND_SHOOT"],
|
||||
"skill" : "archery",
|
||||
"ammo" : "arrow",
|
||||
"weight" : 6,
|
||||
"volume" : 10,
|
||||
"bashing" : 12,
|
||||
"cutting" : 0,
|
||||
"to_hit" : 0,
|
||||
"ranged_damage" : 9,
|
||||
"range" : 14,
|
||||
"dispersion" : 8,
|
||||
"recoil" : 0,
|
||||
"durability" : 6,
|
||||
"burst" : 0,
|
||||
"clip_size" : 1,
|
||||
"reload" : 100
|
||||
},
|
||||
{
|
||||
"id" : "reflexbow",
|
||||
"type" : "GUN",
|
||||
"symbol" : "(",
|
||||
"color" : "yellow",
|
||||
"name" : "reflex bow",
|
||||
"description" : "A bow that has limbs which curve away from the archer sacrificing accuracy for power. Arrows fired from this weapon have a good chance of remaining intact for re-use. It requires 10 strength to fire",
|
||||
"rarity" : 2,
|
||||
"price" : 1200,
|
||||
"material" : ["steel", "plastic"],
|
||||
"flags" : ["ALWAYS_TWOHAND", "STR10_DRAW", "RELOAD_AND_SHOOT"],
|
||||
"skill" : "archery",
|
||||
"ammo" : "arrow",
|
||||
"weight" : 6,
|
||||
"volume" : 10,
|
||||
"bashing" : 12,
|
||||
"cutting" : 0,
|
||||
"to_hit" : 0,
|
||||
"ranged_damage" : 11,
|
||||
"range" : 16,
|
||||
"dispersion" : 6,
|
||||
"recoil" : 0,
|
||||
"durability" : 6,
|
||||
"burst" : 0,
|
||||
"clip_size" : 1,
|
||||
"reload" : 100
|
||||
},
|
||||
{
|
||||
"id" : "longbow",
|
||||
"type" : "GUN",
|
||||
"symbol" : "(",
|
||||
"color" : "yellow",
|
||||
"name" : "longbow",
|
||||
"description" : "A six-foot wooden bow that fires arrows. This takes a fair amount of strength to draw. Arrows fired from this weapon have a good chance of remaining intact for re-use. It requires 10 strength to fire",
|
||||
"rarity" : 5,
|
||||
"price" : 800,
|
||||
"material" : "wood",
|
||||
"flags" : ["ALWAYS_TWOHAND", "STR10_DRAW", "RELOAD_AND_SHOOT"],
|
||||
"skill" : "archery",
|
||||
"ammo" : "arrow",
|
||||
"weight" : 4,
|
||||
"volume" : 8,
|
||||
"bashing" : 10,
|
||||
"cutting" : 0,
|
||||
"to_hit" : 0,
|
||||
"ranged_damage" : 7,
|
||||
"range" : 20,
|
||||
"dispersion" : 18,
|
||||
"recoil" : 0,
|
||||
"durability" : 6,
|
||||
"burst" : 0,
|
||||
"clip_size" : 1,
|
||||
"reload" : 80
|
||||
},
|
||||
{
|
||||
"id" : "reflexrecurvebow",
|
||||
"type" : "GUN",
|
||||
"symbol" : "(",
|
||||
"color" : "yellow",
|
||||
"name" : "reflex recurve bow",
|
||||
"description" : "A bow that combines the traits from both the reflex and the recurve bows. Both the limbs and the tips curve away from the archer. This dramatically increases the power while increasing the strength to draw the bow significantly. It requires 12 strength to fire efficiently.",
|
||||
"rarity" : 2,
|
||||
"price" : 1200,
|
||||
"material" : ["wood", "bone"],
|
||||
"flags" : ["ALWAYS_TWOHAND", "STR12_DRAW", "RELOAD_AND_SHOOT"],
|
||||
"skill" : "archery",
|
||||
"ammo" : "arrow",
|
||||
"weight" : 4,
|
||||
"volume" : 5,
|
||||
"bashing" : 12,
|
||||
"cutting" : 0,
|
||||
"to_hit" : 0,
|
||||
"ranged_damage" : 15,
|
||||
"range" : 18,
|
||||
"dispersion" : 8,
|
||||
"recoil" : 0,
|
||||
"durability" : 6,
|
||||
"burst" : 0,
|
||||
"clip_size" : 1,
|
||||
"reload" : 80
|
||||
},
|
||||
{
|
||||
"id" : "hand_crossbow",
|
||||
"type" : "GUN",
|
||||
"symbol" : "(",
|
||||
"color" : "green",
|
||||
"name" : "pistol crossbow",
|
||||
"description" : "A small concealable pistol like crossbow. It is weak due to it's small size and draw, good for hunting small game. Bolts fired from this weapon have a good chance of remaining intact for re-use.",
|
||||
"rarity" : 1,
|
||||
"price" : 1000,
|
||||
"material" : ["iron", "wood"],
|
||||
"flags" : "none",
|
||||
"skill" : "archery",
|
||||
"ammo" : "bolt",
|
||||
"weight" : 5,
|
||||
"volume" : 4,
|
||||
"bashing" : 4,
|
||||
"cutting" : 0,
|
||||
"to_hit" : -0,
|
||||
"ranged_damage" : -6,
|
||||
"range" : 6,
|
||||
"dispersion" : 12,
|
||||
"recoil" : 0,
|
||||
"durability" : 6,
|
||||
"burst" : 0,
|
||||
"clip_size" : 1,
|
||||
"reload" : 100
|
||||
},
|
||||
{
|
||||
"id" : "crossbow",
|
||||
"type" : "GUN",
|
||||
"symbol" : "(",
|
||||
"color" : "green",
|
||||
"name" : "crossbow",
|
||||
"description" : "A slow-loading hand weapon that launches bolts. Stronger people can reload it much faster. Bolts fired from this weapon have a good chance of remaining intact for re-use.",
|
||||
"rarity" : 2,
|
||||
"price" : 1000,
|
||||
"material" : ["iron", "wood"],
|
||||
"flags" : "STR_RELOAD",
|
||||
"skill" : "archery",
|
||||
"ammo" : "bolt",
|
||||
"weight" : 9,
|
||||
"volume" : 6,
|
||||
"bashing" : 11,
|
||||
"cutting" : 0,
|
||||
"to_hit" : 1,
|
||||
"ranged_damage" : 0,
|
||||
"range" : 10,
|
||||
"dispersion" : 10,
|
||||
"recoil" : 0,
|
||||
"durability" : 6,
|
||||
"burst" : 0,
|
||||
"clip_size" : 1,
|
||||
"reload" : 800
|
||||
},
|
||||
{
|
||||
"id" : "huge_crossbow",
|
||||
"type" : "GUN",
|
||||
"symbol" : "(",
|
||||
"color" : "green",
|
||||
"name" : "Ganz-Rustung",
|
||||
"description" : "A HUGE very slow-loading medieval crossbow from Germany. It's tension is so powerful that you feel it shake after firing. Un-skilled users will find it very hard to reload. Bolts fired from this weapon have a good chance of remaining intact for re-use.",
|
||||
"rarity" : 2,
|
||||
"price" : 1000,
|
||||
"material" : ["iron", "wood"],
|
||||
"flags" : ["ALWAYS_TWOHAND", "STR_RELOAD"],
|
||||
"skill" : "archery",
|
||||
"ammo" : "bolt",
|
||||
"weight" : 60,
|
||||
"volume" : 40,
|
||||
"bashing" : 20,
|
||||
"cutting" : 0,
|
||||
"to_hit" : -1,
|
||||
"ranged_damage" : 30,
|
||||
"range" : 30,
|
||||
"dispersion" : 22,
|
||||
"recoil" : 30,
|
||||
"durability" : 6,
|
||||
"burst" : 0,
|
||||
"clip_size" : 1,
|
||||
"reload" : 6000
|
||||
},
|
||||
{
|
||||
"id" : "rep_crossbow",
|
||||
"type" : "GUN",
|
||||
"symbol" : "(",
|
||||
"color" : "green",
|
||||
"name" : "repeating crossbow",
|
||||
"description" : "A custom made mechanical large crossbow, with a wooden magazine that holds 10 bolts. Single bolt reload. Bolts fired from this weapon have a good chance of remaining intact for re-use.",
|
||||
"rarity" : 1,
|
||||
"price" : 1000,
|
||||
"material" : ["iron", "wood"],
|
||||
"flags" : ["ALWAYS_TWOHAND", "RELOAD_ONE", "MODE_BURST"],
|
||||
"skill" : "archery",
|
||||
"ammo" : "bolt",
|
||||
"weight" : 16,
|
||||
"volume" : 10,
|
||||
"bashing" : 13,
|
||||
"cutting" : 0,
|
||||
"to_hit" : -1,
|
||||
"ranged_damage" : -2,
|
||||
"range" : 8,
|
||||
"dispersion" : 22,
|
||||
"recoil" : 15,
|
||||
"durability" : 6,
|
||||
"burst" : 3,
|
||||
"clip_size" : 10,
|
||||
"reload" : 100
|
||||
}
|
||||
]
|
||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@@ -1,253 +0,0 @@
|
||||
[
|
||||
{
|
||||
"id": "bag_plastic",
|
||||
"type": "CONTAINER",
|
||||
"symbol": ")",
|
||||
"color": "light_gray",
|
||||
"name": "plastic bag",
|
||||
"description": "A small, open plastic bag. Essentially trash.",
|
||||
"rarity": 90,
|
||||
"price": 1,
|
||||
"weight": 0,
|
||||
"volume": 1,
|
||||
"bashing": -4,
|
||||
"cutting": 0,
|
||||
"to_hit": -8,
|
||||
"contains": 24,
|
||||
"material": "plastic"
|
||||
},
|
||||
{
|
||||
"id": "bottle_plastic",
|
||||
"type": "CONTAINER",
|
||||
"symbol": ")",
|
||||
"color": "light_cyan",
|
||||
"name": "plastic bottle",
|
||||
"description": "A resealable plastic bottle, holds 500mls of liquid.",
|
||||
"rarity": 90,
|
||||
"price": 8,
|
||||
"weight": 0,
|
||||
"volume": 2,
|
||||
"bashing": -8,
|
||||
"cutting": 0,
|
||||
"to_hit": 1,
|
||||
"material": "plastic",
|
||||
"contains": 2,
|
||||
"flags": ["RIGID", "WATERTIGHT", "SEALS"]
|
||||
},
|
||||
{
|
||||
"id": "bottle_glass",
|
||||
"type": "CONTAINER",
|
||||
"symbol": ")",
|
||||
"color": "cyan",
|
||||
"name": "glass bottle",
|
||||
"description": "A resealable glass bottle, holds 750mls of liquid.",
|
||||
"rarity": 90,
|
||||
"price": 1,
|
||||
"weight": 2,
|
||||
"volume": 3,
|
||||
"bashing": -8,
|
||||
"cutting": 0,
|
||||
"to_hit": 1,
|
||||
"material": "glass",
|
||||
"contains": 3,
|
||||
"flags": ["RIGID", "WATERTIGHT", "SEALS"]
|
||||
},
|
||||
{
|
||||
"id": "can_drink",
|
||||
"type": "CONTAINER",
|
||||
"symbol": ")",
|
||||
"color": "light_blue",
|
||||
"name": "aluminum can",
|
||||
"description": "An aluminum can, like what soda comes in.",
|
||||
"rarity": 70,
|
||||
"price": 1,
|
||||
"weight": 0,
|
||||
"volume": 1,
|
||||
"bashing": 0,
|
||||
"cutting": 0,
|
||||
"to_hit": 0,
|
||||
"material": "steel",
|
||||
"contains": 1,
|
||||
"flags": ["RIGID", "WATERTIGHT"]
|
||||
},
|
||||
{
|
||||
"id": "can_food",
|
||||
"type": "CONTAINER",
|
||||
"symbol": ")",
|
||||
"color": "blue",
|
||||
"name": "tin can",
|
||||
"description": "A tin can, like what beans come in.",
|
||||
"rarity": 65,
|
||||
"price": 2,
|
||||
"weight": 0,
|
||||
"volume": 1,
|
||||
"bashing": -1,
|
||||
"cutting": 0,
|
||||
"to_hit": 1,
|
||||
"material": "iron",
|
||||
"contains": 1,
|
||||
"flags": ["RIGID", "WATERTIGHT"]
|
||||
},
|
||||
{
|
||||
"id": "box_small",
|
||||
"type": "CONTAINER",
|
||||
"symbol": ")",
|
||||
"color": "brown",
|
||||
"name": "sm. cardboard box",
|
||||
"description": "A small cardboard box. No bigger than a foot in dimension.",
|
||||
"rarity": 50,
|
||||
"price": 0,
|
||||
"weight": 0,
|
||||
"volume": 4,
|
||||
"bashing": -5,
|
||||
"cutting": 0,
|
||||
"to_hit": 1,
|
||||
"material": "paper",
|
||||
"contains": 4,
|
||||
"flags": ["RIGID"]
|
||||
},
|
||||
{
|
||||
"id": "canteen",
|
||||
"type": "CONTAINER",
|
||||
"symbol": ")",
|
||||
"color": "green",
|
||||
"name": "plastic canteen",
|
||||
"description": "A large military-style water canteen, with a 1.5 liter capacity and strap.",
|
||||
"rarity": 20,
|
||||
"price": 1000,
|
||||
"weight": 2,
|
||||
"volume": 6,
|
||||
"bashing": -8,
|
||||
"cutting": 0,
|
||||
"to_hit": 1,
|
||||
"material": "plastic",
|
||||
"contains": 6,
|
||||
"flags": ["RIGID", "SEALS", "WATERTIGHT"]
|
||||
},
|
||||
{
|
||||
"id": "jerrycan",
|
||||
"type": "CONTAINER",
|
||||
"symbol": ")",
|
||||
"color": "green",
|
||||
"name": "plastic jerrycan",
|
||||
"description": "A bulky plastic jerrycan, meant to carry fuel, but can carry other liquids\nin a pinch. It has a capacity of 10 liters.",
|
||||
"rarity": 10,
|
||||
"price": 2500,
|
||||
"weight": 4,
|
||||
"volume": 40,
|
||||
"bashing": -2,
|
||||
"cutting": 0,
|
||||
"to_hit": -2,
|
||||
"material": "plastic",
|
||||
"contains": 40,
|
||||
"flags": ["RIGID", "SEALS", "WATERTIGHT"]
|
||||
},
|
||||
{
|
||||
"id": "jug_plastic",
|
||||
"type": "CONTAINER",
|
||||
"symbol": ")",
|
||||
"color": "light_cyan",
|
||||
"name": "gallon jug",
|
||||
"description": "A standard plastic jug used for household cleaning chemicals.",
|
||||
"rarity": 10,
|
||||
"price": 2500,
|
||||
"weight": 2,
|
||||
"volume": 10,
|
||||
"bashing": -8,
|
||||
"cutting": 0,
|
||||
"to_hit": 1,
|
||||
"material": "plastic",
|
||||
"contains": 10,
|
||||
"flags": ["RIGID", "SEALS", "WATERTIGHT"]
|
||||
},
|
||||
{
|
||||
"id": "flask_glass",
|
||||
"type": "CONTAINER",
|
||||
"symbol": ")",
|
||||
"color": "light_cyan",
|
||||
"name": "glass flask",
|
||||
"description": "A 250 ml laboratory conical flask, with a rubber bung.",
|
||||
"rarity": 10,
|
||||
"price": 2500,
|
||||
"weight": 0,
|
||||
"volume": 1,
|
||||
"bashing": 8,
|
||||
"cutting": 0,
|
||||
"to_hit": 1,
|
||||
"material": "glass",
|
||||
"contains": 1,
|
||||
"flags": ["RIGID", "SEALS", "WATERTIGHT"]
|
||||
},
|
||||
{
|
||||
"id": "waterskin",
|
||||
"type": "CONTAINER",
|
||||
"symbol": ")",
|
||||
"color": "brown",
|
||||
"name": "waterskin",
|
||||
"description": "A watertight leather bag, can hold 1.5 liters of water.",
|
||||
"rarity": 0,
|
||||
"price": 0,
|
||||
"weight": 4,
|
||||
"volume": 6,
|
||||
"bashing": -8,
|
||||
"cutting": 0,
|
||||
"to_hit": -5,
|
||||
"material": "leather",
|
||||
"contains": 6,
|
||||
"flags": ["SEALS", "WATERTIGHT"]
|
||||
},
|
||||
{
|
||||
"id": "jerrycan_big",
|
||||
"type": "CONTAINER",
|
||||
"symbol": ")",
|
||||
"color": "green",
|
||||
"name": "steel jerrycan",
|
||||
"description": "A steel jerrycan, meant to carry fuel, but can carry other liquids\nin a pinch. It has a capacity of 25 liters.",
|
||||
"rarity": 20,
|
||||
"price": 5000,
|
||||
"weight": 7,
|
||||
"volume": 100,
|
||||
"bashing": -3,
|
||||
"cutting": 0,
|
||||
"to_hit": -3,
|
||||
"material": "steel",
|
||||
"contains": 100,
|
||||
"flags": ["RIGID", "SEALS", "WATERTIGHT"]
|
||||
},
|
||||
{
|
||||
"id": "keg",
|
||||
"type": "CONTAINER",
|
||||
"symbol": ")",
|
||||
"color": "light_cyan",
|
||||
"name": "aluminum keg",
|
||||
"description": "A reusable aluminum keg, used for shipping beer.\nIt has a capacity of 50 liters.",
|
||||
"rarity": 20,
|
||||
"price": 6000,
|
||||
"weight": 12,
|
||||
"volume": 200,
|
||||
"bashing": -4,
|
||||
"cutting": 0,
|
||||
"to_hit": -4,
|
||||
"material": "steel",
|
||||
"contains": 200,
|
||||
"flags": ["RIGID", "SEALS", "WATERTIGHT"]
|
||||
},
|
||||
{
|
||||
"id": "jar_glass",
|
||||
"type": "CONTAINER",
|
||||
"symbol": ")",
|
||||
"color": "light_cyan",
|
||||
"name": "glass jar",
|
||||
"description": "A half-litre glass jar with a metal screw top lid, used for canning.",
|
||||
"rarity": 50,
|
||||
"price": 2500,
|
||||
"weight": 1,
|
||||
"volume": 1,
|
||||
"bashing": 8,
|
||||
"cutting": 0,
|
||||
"to_hit": 1,
|
||||
"material": "glass",
|
||||
"contains": 1,
|
||||
"flags": ["RIGID", "SEALS", "WATERTIGHT"]
|
||||
}
|
||||
]
|
||||
@@ -1,33 +0,0 @@
|
||||
[
|
||||
{ "id":"GUITAR",
|
||||
"symbol": "$",
|
||||
"color": "red",
|
||||
"name":"Guitar",
|
||||
"description":"An acoustic six-string guitar. A bit out of tune, but in good shape otherwise.",
|
||||
"rarity": 60,
|
||||
"material": "wood",
|
||||
"weight": 13,
|
||||
"volume": 24,
|
||||
"damage": 14,
|
||||
"to_hit": 1,
|
||||
"use": "PLAY_GUITAR",
|
||||
"variations": [
|
||||
{ "odds" : 200,
|
||||
"name" : "Specific Variation"
|
||||
}
|
||||
]
|
||||
},
|
||||
{ "id":"DRUM",
|
||||
"symbol": "o",
|
||||
"color": "green",
|
||||
"name":"Bongo",
|
||||
"description": "A handheld drum. Suitable for making loud noises into all hours of the night.",
|
||||
"rarity": 60,
|
||||
"material": ["wood", "steel"],
|
||||
"weight": 10,
|
||||
"volume": 10,
|
||||
"damage": 11,
|
||||
"to_hit": 1,
|
||||
"use": "PLAY_DRUM"
|
||||
}
|
||||
]
|
||||
File diff suppressed because it is too large
Load Diff
@@ -1,613 +0,0 @@
|
||||
[
|
||||
{ "id":"retool_45",
|
||||
"type": "GUNMOD",
|
||||
"symbol": ":",
|
||||
"color": "green",
|
||||
"name":".45 caliber retool",
|
||||
"description":"Replacing several key parts of a 9mm, .38, .40 or .44 firearm converts it to a .45 firearm. The conversion results in reduced accuracy and increased recoil.",
|
||||
"rarity": 3,
|
||||
"price": 480,
|
||||
"material": "steel",
|
||||
"weight": 2,
|
||||
"volume": 2,
|
||||
"bashing": 3,
|
||||
"cutting": 0,
|
||||
"to_hit": -1,
|
||||
"dispersion_modifier": 2,
|
||||
"damage_modifier": 0,
|
||||
"loudness_modifier": 0,
|
||||
"ammo_modifier": "45",
|
||||
"recoil_modifier": 2,
|
||||
"burst_modifier": 0,
|
||||
"clip_size_modifier": 0,
|
||||
"mod_targets": ["pistol", "smg"],
|
||||
"acceptable_ammo": ["9mm", "38", "40", "44"]
|
||||
},
|
||||
{
|
||||
"type" : "GUNMOD",
|
||||
"id" : "suppressor",
|
||||
"name" : "suppressor",
|
||||
"clip_size_modifier" : 0,
|
||||
"dispersion_modifier" : 1,
|
||||
"damage_modifier" : -4,
|
||||
"ammo_modifier" : "NULL",
|
||||
"description" : "Using a suppressor is almost an imperative in zombie-infested regions. Gunfire is very noisy, and will attract predators. Its only drawback is a reduced muzzle velocity, resulting in less accuracy and damage.",
|
||||
"weight" : 1,
|
||||
"to_hit" : 2,
|
||||
"color" : "dark_gray",
|
||||
"symbol" : ":",
|
||||
"material" : ["steel", "plastic"],
|
||||
"mod_targets" : ["pistol", "smg", "rifle"],
|
||||
"volume" : 2,
|
||||
"bashing" : 3,
|
||||
"cutting" : 0,
|
||||
"burst_modifier" : 0,
|
||||
"recoil_modifier" : 0,
|
||||
"rarity" : 15,
|
||||
"price" : 480,
|
||||
"loudness_modifier" : -25
|
||||
},
|
||||
{
|
||||
"type" : "GUNMOD",
|
||||
"id" : "grip",
|
||||
"name" : "enhanced grip",
|
||||
"clip_size_modifier" : 0,
|
||||
"dispersion_modifier" : -2,
|
||||
"damage_modifier" : 0,
|
||||
"ammo_modifier" : "NULL",
|
||||
"description" : "A grip placed forward on the barrel allows for greater control and accuracy. Aside from increased weight, there are no drawbacks.",
|
||||
"weight" : 1,
|
||||
"to_hit" : -1,
|
||||
"color" : "brown",
|
||||
"symbol" : ":",
|
||||
"material" : ["steel", "plastic"],
|
||||
"mod_targets" : ["shotgun", "smg", "rifle"],
|
||||
"volume" : 1,
|
||||
"bashing" : 0,
|
||||
"cutting" : 0,
|
||||
"burst_modifier" : 0,
|
||||
"recoil_modifier" : -2,
|
||||
"rarity" : 12,
|
||||
"price" : 280,
|
||||
"loudness_modifier" : 0
|
||||
},
|
||||
{
|
||||
"type" : "GUNMOD",
|
||||
"id" : "barrel_big",
|
||||
"name" : "barrel extension",
|
||||
"clip_size_modifier" : 0,
|
||||
"dispersion_modifier" : -6,
|
||||
"damage_modifier" : 1,
|
||||
"ammo_modifier" : "NULL",
|
||||
"description" : "A longer barrel increases the muzzle velocity of a firearm, contributing to both accuracy and damage. However, the longer barrel tends to vibrate after firing, greatly increasing recoil.",
|
||||
"weight" : 1,
|
||||
"to_hit" : 2,
|
||||
"color" : "light_gray",
|
||||
"symbol" : ":",
|
||||
"material" : ["steel", "null"],
|
||||
"mod_targets" : ["smg", "rifle"],
|
||||
"volume" : 4,
|
||||
"bashing" : 5,
|
||||
"cutting" : 0,
|
||||
"burst_modifier" : 0,
|
||||
"recoil_modifier" : 5,
|
||||
"rarity" : 10,
|
||||
"price" : 400,
|
||||
"loudness_modifier" : 0
|
||||
},
|
||||
{
|
||||
"type" : "GUNMOD",
|
||||
"id" : "barrel_small",
|
||||
"name" : "shortened barrel",
|
||||
"clip_size_modifier" : 0,
|
||||
"dispersion_modifier" : 5,
|
||||
"damage_modifier" : 0,
|
||||
"ammo_modifier" : "NULL",
|
||||
"description" : "A shortened barrel results in markedly reduced accuracy, and a minor increase in noise, but also reduces recoil greatly as a result of the improved managability of the firearm.",
|
||||
"weight" : 1,
|
||||
"to_hit" : -1,
|
||||
"color" : "light_gray",
|
||||
"symbol" : ":",
|
||||
"material" : ["steel", "null"],
|
||||
"mod_targets" : ["smg", "rifle"],
|
||||
"volume" : 1,
|
||||
"bashing" : -2,
|
||||
"cutting" : 0,
|
||||
"burst_modifier" : 0,
|
||||
"recoil_modifier" : -6,
|
||||
"rarity" : 6,
|
||||
"price" : 320,
|
||||
"loudness_modifier" : 2
|
||||
},
|
||||
{
|
||||
"type" : "GUNMOD",
|
||||
"id" : "barrel_rifled",
|
||||
"name" : "rifled barrel",
|
||||
"clip_size_modifier" : 0,
|
||||
"dispersion_modifier" : -10,
|
||||
"damage_modifier" : -20,
|
||||
"ammo_modifier" : "NULL",
|
||||
"description" : "Rifling a shotgun barrel is mainly done in order to improve its accuracy when firing slugs. The rifling makes the gun less suitable for shot, however.",
|
||||
"weight" : 1,
|
||||
"to_hit" : 1,
|
||||
"color" : "light_gray",
|
||||
"symbol" : ":",
|
||||
"material" : ["steel", "null"],
|
||||
"mod_targets" : ["shotgun"],
|
||||
"volume" : 2,
|
||||
"bashing" : 3,
|
||||
"cutting" : 0,
|
||||
"burst_modifier" : -1,
|
||||
"recoil_modifier" : 0,
|
||||
"rarity" : 5,
|
||||
"price" : 220,
|
||||
"loudness_modifier" : 0
|
||||
},
|
||||
{
|
||||
"type" : "GUNMOD",
|
||||
"id" : "clip",
|
||||
"name" : "extended magazine",
|
||||
"clip_size_modifier" : 50,
|
||||
"dispersion_modifier" : 1,
|
||||
"damage_modifier" : 0,
|
||||
"ammo_modifier" : "NULL",
|
||||
"description" : "Increases the ammunition capacity of your firearm by 50%, but the added bulk reduces accuracy slightly.",
|
||||
"weight" : 1,
|
||||
"to_hit" : -1,
|
||||
"color" : "light_gray",
|
||||
"symbol" : ":",
|
||||
"material" : ["steel", "plastic"],
|
||||
"mod_targets" : ["pistol", "shotgun", "smg", "rifle"],
|
||||
"volume" : 1,
|
||||
"bashing" : -2,
|
||||
"cutting" : 0,
|
||||
"burst_modifier" : 0,
|
||||
"recoil_modifier" : 0,
|
||||
"rarity" : 8,
|
||||
"price" : 560,
|
||||
"loudness_modifier" : 0
|
||||
},
|
||||
{
|
||||
"type" : "GUNMOD",
|
||||
"id" : "clip2",
|
||||
"name" : "double magazine",
|
||||
"clip_size_modifier" : 100,
|
||||
"dispersion_modifier" : 2,
|
||||
"damage_modifier" : 0,
|
||||
"ammo_modifier" : "NULL",
|
||||
"description" : "Completely doubles the ammunition capacity of your firearm, but the added bulk reduces accuracy and increases recoil.",
|
||||
"weight" : 2,
|
||||
"to_hit" : 0,
|
||||
"color" : "light_gray",
|
||||
"symbol" : ":",
|
||||
"material" : ["steel", "plastic"],
|
||||
"mod_targets" : ["shotgun", "smg", "rifle"],
|
||||
"volume" : 2,
|
||||
"bashing" : 0,
|
||||
"cutting" : 0,
|
||||
"burst_modifier" : 0,
|
||||
"recoil_modifier" : 2,
|
||||
"rarity" : 4,
|
||||
"price" : 720,
|
||||
"loudness_modifier" : 0
|
||||
},
|
||||
{
|
||||
"type" : "GUNMOD",
|
||||
"id" : "spare_mag",
|
||||
"name" : "spare magazine",
|
||||
"clip_size_modifier" : 0,
|
||||
"dispersion_modifier" : 0,
|
||||
"damage_modifier" : 0,
|
||||
"ammo_modifier" : "NULL",
|
||||
"description" : "A spare magazine you can keep on hand to make reloads faster, but must itself be reloaded before it can be used again.",
|
||||
"weight" : 1,
|
||||
"to_hit" : 0,
|
||||
"color" : "light_gray",
|
||||
"symbol" : ":",
|
||||
"material" : ["steel", "plastic"],
|
||||
"mod_targets" : ["pistol", "shotgun", "smg", "rifle"],
|
||||
"volume" : 1,
|
||||
"bashing" : 0,
|
||||
"cutting" : 0,
|
||||
"burst_modifier" : 0,
|
||||
"recoil_modifier" : 0,
|
||||
"rarity" : 15,
|
||||
"price" : 200,
|
||||
"loudness_modifier" : 0
|
||||
},
|
||||
{
|
||||
"type" : "GUNMOD",
|
||||
"id" : "brass_catcher",
|
||||
"name" : "brass catcher",
|
||||
"clip_size_modifier" : 0,
|
||||
"dispersion_modifier" : 0,
|
||||
"damage_modifier" : 0,
|
||||
"ammo_modifier" : "NULL",
|
||||
"description" : "A bag that hangs off the side of your gun and catches ejected casings so you don't have to pick them up.",
|
||||
"weight" : 1,
|
||||
"to_hit" : 0,
|
||||
"color" : "light_gray",
|
||||
"symbol" : ":",
|
||||
"material" : ["cotton", "null"],
|
||||
"mod_targets" : ["shotgun", "smg", "rifle"],
|
||||
"volume" : 1,
|
||||
"bashing" : 0,
|
||||
"cutting" : 0,
|
||||
"burst_modifier" : 0,
|
||||
"recoil_modifier" : 0,
|
||||
"rarity" : 15,
|
||||
"price" : 200,
|
||||
"loudness_modifier" : 0
|
||||
},
|
||||
{
|
||||
"type" : "GUNMOD",
|
||||
"id" : "stabilizer",
|
||||
"name" : "gyroscopic stabilizer",
|
||||
"clip_size_modifier" : -10,
|
||||
"dispersion_modifier" : -2,
|
||||
"damage_modifier" : -2,
|
||||
"ammo_modifier" : "NULL",
|
||||
"description" : "An advanced unit that straps onto the side of your firearm and reduces vibration, greatly reducing recoil and increasing accuracy. However, it also takes up space in the magazine slot, reducing ammo capacity.",
|
||||
"weight" : 2,
|
||||
"to_hit" : -3,
|
||||
"color" : "blue",
|
||||
"symbol" : ":",
|
||||
"material" : ["steel", "plastic"],
|
||||
"mod_targets" : ["smg", "rifle"],
|
||||
"volume" : 3,
|
||||
"bashing" : 0,
|
||||
"cutting" : 0,
|
||||
"burst_modifier" : 0,
|
||||
"recoil_modifier" : -8,
|
||||
"rarity" : 4,
|
||||
"price" : 680,
|
||||
"loudness_modifier" : 0
|
||||
},
|
||||
{
|
||||
"type" : "GUNMOD",
|
||||
"id" : "blowback",
|
||||
"name" : "rapid blowback",
|
||||
"clip_size_modifier" : 0,
|
||||
"dispersion_modifier" : 3,
|
||||
"damage_modifier" : 0,
|
||||
"ammo_modifier" : "NULL",
|
||||
"description" : "An improved blowback mechanism makes your firearm's automatic fire faster, at the cost of reduced accuracy and increased noise.",
|
||||
"weight" : 1,
|
||||
"to_hit" : 0,
|
||||
"color" : "red",
|
||||
"symbol" : ":",
|
||||
"material" : ["steel", "plastic"],
|
||||
"mod_targets" : ["smg", "rifle"],
|
||||
"volume" : 0,
|
||||
"bashing" : 0,
|
||||
"cutting" : 0,
|
||||
"burst_modifier" : 6,
|
||||
"recoil_modifier" : 0,
|
||||
"rarity" : 3,
|
||||
"price" : 700,
|
||||
"loudness_modifier" : 4
|
||||
},
|
||||
{
|
||||
"type" : "GUNMOD",
|
||||
"id" : "autofire",
|
||||
"name" : "auto-fire mechanism",
|
||||
"weight" : 2,
|
||||
"color" : "red",
|
||||
"burst_modifier" : 3,
|
||||
"loudness_modifier" : 2,
|
||||
"to_hit" : -1,
|
||||
"dispersion_modifier" : 2,
|
||||
"price" : 650,
|
||||
"clip_size_modifier" : 0,
|
||||
"description" : "A simple mechanism that converts a pistol to a fully-automatic weapon, with a burst size of three rounds. However, it reduces accuracy, and increases noise and recoil.",
|
||||
"symbol" : ":",
|
||||
"material" : ["steel", "plastic"],
|
||||
"volume" : 1,
|
||||
"cutting" : 0,
|
||||
"recoil_modifier" : 2,
|
||||
"damage_modifier" : 0,
|
||||
"acceptable_ammo" : ["22", "9mm", "38", "40", "57", "46"],
|
||||
"mod_targets" : ["pistol"],
|
||||
"rarity" : 2,
|
||||
"bashing" : 2,
|
||||
"ammo_modifier" : "NULL"
|
||||
},
|
||||
{
|
||||
"type" : "GUNMOD",
|
||||
"id" : "retool_9mm",
|
||||
"name" : "9mm caliber retool",
|
||||
"weight" : 1,
|
||||
"color" : "green",
|
||||
"burst_modifier" : 0,
|
||||
"loudness_modifier" : 0,
|
||||
"to_hit" : -1,
|
||||
"dispersion_modifier" : 1,
|
||||
"price" : 420,
|
||||
"clip_size_modifier" : 0,
|
||||
"description" : "Replacing several key parts of a .38, .40, .44 or .45 firearm converts it to a 9mm firearm. The conversion results in a slight reduction in accuracy.",
|
||||
"symbol" : ":",
|
||||
"material" : ["steel", "null"],
|
||||
"volume" : 1,
|
||||
"cutting" : 0,
|
||||
"recoil_modifier" : 0,
|
||||
"damage_modifier" : 0,
|
||||
"acceptable_ammo" : ["38", "40", "44", "45"],
|
||||
"mod_targets" : ["pistol", "smg"],
|
||||
"rarity" : 3,
|
||||
"bashing" : 0,
|
||||
"ammo_modifier" : "9mm"
|
||||
},
|
||||
{
|
||||
"type" : "GUNMOD",
|
||||
"id" : "retool_22",
|
||||
"name" : ".22 caliber retool",
|
||||
"weight" : 1,
|
||||
"color" : "green",
|
||||
"burst_modifier" : 0,
|
||||
"loudness_modifier" : 0,
|
||||
"to_hit" : -1,
|
||||
"dispersion_modifier" : 1,
|
||||
"price" : 320,
|
||||
"clip_size_modifier" : 0,
|
||||
"description" : "Replacing several key parts of a 9mm, .38, .40, 5.7mm, 4.6mm, 7.62mm or .223 firearm converts it to a .22 firearm. The conversion results in a slight reduction in accuracy.",
|
||||
"symbol" : ":",
|
||||
"material" : ["steel", "null"],
|
||||
"volume" : 1,
|
||||
"cutting" : 0,
|
||||
"recoil_modifier" : 0,
|
||||
"damage_modifier" : 0,
|
||||
"acceptable_ammo" : ["9mm", "38", "40", "57", "46", "762", "223"],
|
||||
"mod_targets" : ["pistol", "smg", "rifle"],
|
||||
"rarity" : 2,
|
||||
"bashing" : -2,
|
||||
"ammo_modifier" : "22"
|
||||
},
|
||||
{
|
||||
"type" : "GUNMOD",
|
||||
"id" : "retool_57",
|
||||
"name" : "5.7mm caliber retool",
|
||||
"weight" : 1,
|
||||
"color" : "green",
|
||||
"burst_modifier" : 0,
|
||||
"loudness_modifier" : 0,
|
||||
"to_hit" : -1,
|
||||
"dispersion_modifier" : 1,
|
||||
"price" : 460,
|
||||
"clip_size_modifier" : 0,
|
||||
"description" : "FN Hestal sells a conversion kit, used to convert .22, 9mm, or .38 firearms to their proprietary 5.7x28mm, a round designed for accuracy and armor penetration.",
|
||||
"symbol" : ":",
|
||||
"material" : ["steel", "null"],
|
||||
"volume" : 1,
|
||||
"cutting" : 0,
|
||||
"recoil_modifier" : 0,
|
||||
"damage_modifier" : 0,
|
||||
"acceptable_ammo" : ["22", "9mm", "38"],
|
||||
"mod_targets" : ["pistol", "smg"],
|
||||
"rarity" : 1,
|
||||
"bashing" : -3,
|
||||
"ammo_modifier" : "57"
|
||||
},
|
||||
{
|
||||
"type" : "GUNMOD",
|
||||
"id" : "retool_46",
|
||||
"name" : "4.6mm caliber retool",
|
||||
"weight" : 1,
|
||||
"color" : "green",
|
||||
"burst_modifier" : 0,
|
||||
"loudness_modifier" : 0,
|
||||
"to_hit" : -1,
|
||||
"dispersion_modifier" : 1,
|
||||
"price" : 460,
|
||||
"clip_size_modifier" : 0,
|
||||
"description" : "Heckler and Koch sells a conversion kit, used to convert .22, 9mm, or .38 firearms to their proprietary 4.6x30mm, a round designed for accuracy and armor penetration.",
|
||||
"symbol" : ":",
|
||||
"material" : ["steel", "null"],
|
||||
"volume" : 1,
|
||||
"cutting" : 0,
|
||||
"recoil_modifier" : 0,
|
||||
"damage_modifier" : 0,
|
||||
"acceptable_ammo" : ["22", "9mm", "38"],
|
||||
"mod_targets" : ["pistol", "smg"],
|
||||
"rarity" : 1,
|
||||
"bashing" : -3,
|
||||
"ammo_modifier" : "46"
|
||||
},
|
||||
{
|
||||
"type" : "GUNMOD",
|
||||
"id" : "retool_308",
|
||||
"name" : ".308 caliber retool",
|
||||
"weight" : 1,
|
||||
"color" : "green",
|
||||
"burst_modifier" : 0,
|
||||
"loudness_modifier" : 0,
|
||||
"to_hit" : 1,
|
||||
"dispersion_modifier" : 2,
|
||||
"price" : 520,
|
||||
"clip_size_modifier" : -20,
|
||||
"description" : "This kit is used to convert a shotgun or 7.62mm, .223 or .30-06 rifle to the popular and powerful .308 caliber. The conversion results in reduced ammo capacity and a slight reduction in accuracy.",
|
||||
"symbol" : ":",
|
||||
"material" : ["steel", "null"],
|
||||
"volume" : 2,
|
||||
"cutting" : 0,
|
||||
"recoil_modifier" : 0,
|
||||
"damage_modifier" : 0,
|
||||
"acceptable_ammo" : ["shot", "762", "223", "3006"],
|
||||
"mod_targets" : ["shotgun", "rifle"],
|
||||
"rarity" : 2,
|
||||
"bashing" : 4,
|
||||
"ammo_modifier" : "308"
|
||||
},
|
||||
{
|
||||
"type" : "GUNMOD",
|
||||
"id" : "retool_223",
|
||||
"name" : ".223 caliber retool",
|
||||
"weight" : 1,
|
||||
"color" : "green",
|
||||
"burst_modifier" : 0,
|
||||
"loudness_modifier" : 0,
|
||||
"to_hit" : 1,
|
||||
"dispersion_modifier" : 2,
|
||||
"price" : 500,
|
||||
"clip_size_modifier" : -10,
|
||||
"description" : "This kit is used to convert a shotgun or 7.62mm, .30-06, or .308 rifle to the popular, accurate, and damaging .223 caliber. The conversion results in slight reductions in both accuracy and ammo capacity.",
|
||||
"symbol" : ":",
|
||||
"material" : ["steel", "null"],
|
||||
"volume" : 2,
|
||||
"cutting" : 0,
|
||||
"recoil_modifier" : 0,
|
||||
"damage_modifier" : 0,
|
||||
"acceptable_ammo" : ["shot", "762", "3006", "308"],
|
||||
"mod_targets" : ["shotgun", "rifle"],
|
||||
"rarity" : 2,
|
||||
"bashing" : 4,
|
||||
"ammo_modifier" : "223"
|
||||
},
|
||||
{
|
||||
"type" : "GUNMOD",
|
||||
"id" : "conversion_battle",
|
||||
"name" : "battle rifle conversion",
|
||||
"clip_size_modifier" : 20,
|
||||
"dispersion_modifier" : 6,
|
||||
"damage_modifier" : 6,
|
||||
"ammo_modifier" : "NULL",
|
||||
"description" : "This is a complete conversion kit, designed to turn a rifle into a powerful battle rifle. It reduces accuracy, and increases noise and recoil, but also increases damage, ammo capacity, and fire rate.",
|
||||
"weight" : 3,
|
||||
"to_hit" : -1,
|
||||
"color" : "magenta",
|
||||
"symbol" : ":",
|
||||
"material" : ["steel", "null"],
|
||||
"mod_targets" : ["rifle"],
|
||||
"volume" : 4,
|
||||
"bashing" : 6,
|
||||
"cutting" : 0,
|
||||
"burst_modifier" : 4,
|
||||
"recoil_modifier" : 4,
|
||||
"rarity" : 1,
|
||||
"price" : 680,
|
||||
"loudness_modifier" : 4
|
||||
},
|
||||
{
|
||||
"type" : "GUNMOD",
|
||||
"id" : "conversion_sniper",
|
||||
"name" : "sniper conversion",
|
||||
"clip_size_modifier" : -15,
|
||||
"dispersion_modifier" : -10,
|
||||
"damage_modifier" : 8,
|
||||
"ammo_modifier" : "NULL",
|
||||
"description" : "This is a complete conversion kit, designed to turn a rifle into a deadly sniper rifle. It decreases ammo capacity, and removes any automatic fire capabilities, but also increases accuracy and damage.",
|
||||
"weight" : 2,
|
||||
"to_hit" : -1,
|
||||
"color" : "green",
|
||||
"symbol" : ":",
|
||||
"material" : ["steel", "null"],
|
||||
"mod_targets" : ["rifle"],
|
||||
"volume" : 1,
|
||||
"bashing" : 0,
|
||||
"cutting" : 0,
|
||||
"burst_modifier" : -99,
|
||||
"recoil_modifier" : 0,
|
||||
"rarity" : 1,
|
||||
"price" : 660,
|
||||
"loudness_modifier" : 3
|
||||
},
|
||||
{
|
||||
"type" : "GUNMOD",
|
||||
"id" : "m203",
|
||||
"name" : "M203",
|
||||
"weight" : 1,
|
||||
"color" : "light_red",
|
||||
"burst_modifier" : 0,
|
||||
"loudness_modifier" : 0,
|
||||
"to_hit" : -1,
|
||||
"dispersion_modifier" : 2,
|
||||
"price" : 650,
|
||||
"clip_size_modifier" : 1,
|
||||
"description" : "The M203 was originally designed for use with M16 variants but today can be attached to almost any rifle. It allows a single 40mm grenade to be loaded and fired.",
|
||||
"symbol" : ":",
|
||||
"material" : ["steel", "null"],
|
||||
"volume" : 2,
|
||||
"cutting" : 0,
|
||||
"recoil_modifier" : 0,
|
||||
"damage_modifier" : 0,
|
||||
"mod_targets" : ["rifle"],
|
||||
"rarity" : 2,
|
||||
"bashing" : 2,
|
||||
"flags" : ["MODE_AUX"],
|
||||
"ammo_modifier" : "40mm"
|
||||
},
|
||||
{
|
||||
"type" : "GUNMOD",
|
||||
"id" : "bayonet",
|
||||
"name" : "bayonet",
|
||||
"weight" : 2,
|
||||
"color" : "light_cyan",
|
||||
"burst_modifier" : 0,
|
||||
"loudness_modifier" : 0,
|
||||
"to_hit" : -3,
|
||||
"dispersion_modifier" : 0,
|
||||
"price" : 400,
|
||||
"clip_size_modifier" : 0,
|
||||
"description" : "A bayonet is a stabbing weapon that can be attached to the front of a shotgun, sub-machinegun or rifle, allowing a melee attack to deal piercing damage. The added length increases recoil slightly.",
|
||||
"symbol" : ":",
|
||||
"material" : ["steel", "null"],
|
||||
"volume" : 2,
|
||||
"cutting" : 16,
|
||||
"recoil_modifier" : 3,
|
||||
"damage_modifier" : 0,
|
||||
"mod_targets" : ["shotgun", "smg", "rifle"],
|
||||
"rarity" : 6,
|
||||
"bashing" : 0,
|
||||
"flags" : ["STAB"],
|
||||
"ammo_modifier" : "NULL"
|
||||
},
|
||||
{
|
||||
"type" : "GUNMOD",
|
||||
"id" : "u_shotgun",
|
||||
"name" : "underslung shotgun",
|
||||
"weight" : 1,
|
||||
"color" : "light_red",
|
||||
"burst_modifier" : 0,
|
||||
"loudness_modifier" : 0,
|
||||
"to_hit" : -1,
|
||||
"dispersion_modifier" : 2,
|
||||
"price" : 650,
|
||||
"clip_size_modifier" : 2,
|
||||
"description" : "A miniaturized shotgun with 2 barrels, which can be mounted under the barrel of many rifles. It allows two shotgun shells to be loaded and fired.",
|
||||
"symbol" : ":",
|
||||
"material" : ["steel", "null"],
|
||||
"volume" : 2,
|
||||
"cutting" : 0,
|
||||
"recoil_modifier" : 0,
|
||||
"damage_modifier" : 0,
|
||||
"mod_targets" : ["rifle"],
|
||||
"rarity" : 2,
|
||||
"bashing" : 2,
|
||||
"flags" : ["MODE_AUX"],
|
||||
"ammo_modifier" : "shot"
|
||||
},
|
||||
{
|
||||
"type" : "GUNMOD",
|
||||
"id" : "gun_crossbow",
|
||||
"name" : "rail-mounted crossbow",
|
||||
"weight" : 1,
|
||||
"color" : "light_red",
|
||||
"burst_modifier" : 0,
|
||||
"loudness_modifier" : 0,
|
||||
"to_hit" : -1,
|
||||
"dispersion_modifier" : 0,
|
||||
"price" : 500,
|
||||
"clip_size_modifier" : 1,
|
||||
"description" : "A kit to attach a pair of crossbow arms and a firing rail to the barrel of a long firearm. It allows crossbow bolts to be fired.",
|
||||
"symbol" : ":",
|
||||
"material" : ["steel", "wood"],
|
||||
"volume" : 2,
|
||||
"cutting" : 0,
|
||||
"recoil_modifier" : 0,
|
||||
"damage_modifier" : 0,
|
||||
"mod_targets" : ["shotgun", "rifle"],
|
||||
"rarity" : 2,
|
||||
"bashing" : 2,
|
||||
"flags" : ["MODE_AUX", "STR_RELOAD"],
|
||||
"ammo_modifier" : "bolt"
|
||||
}
|
||||
]
|
||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@@ -1,262 +0,0 @@
|
||||
[
|
||||
{
|
||||
"ident" : "null",
|
||||
"name" : "Null",
|
||||
"bash_resist" : 0,
|
||||
"cut_resist" : 0,
|
||||
"bash_dmg_verb" : "damaged",
|
||||
"cut_dmg_verb" : "damaged",
|
||||
"dmg_adj" : ["lightly damaged", "damaged", "very damaged", "thoroughly damaged"],
|
||||
"acid_resist" : 0,
|
||||
"elec_resist" : 0,
|
||||
"fire_resist" : 0,
|
||||
"density" : 1
|
||||
},
|
||||
{
|
||||
"ident" : "veggy",
|
||||
"name" : "Plant Matter",
|
||||
"bash_resist" : 1,
|
||||
"cut_resist" : 1,
|
||||
"bash_dmg_verb" : "ripped",
|
||||
"cut_dmg_verb" : "cut",
|
||||
"dmg_adj" : ["lightly damaged", "damaged", "very damaged", "thoroughly damaged"],
|
||||
"acid_resist" : 1,
|
||||
"elec_resist" : 1,
|
||||
"fire_resist" : 0,
|
||||
"density" : 4
|
||||
},
|
||||
{
|
||||
"ident" : "flesh",
|
||||
"name" : "Flesh",
|
||||
"bash_resist" : 1,
|
||||
"cut_resist" : 1,
|
||||
"bash_dmg_verb" : "bruised",
|
||||
"cut_dmg_verb" : "sliced",
|
||||
"dmg_adj" : ["bruised", "mutilated", "badly mutilated", "thoroughly mutilated"],
|
||||
"acid_resist" : 1,
|
||||
"elec_resist" : 1,
|
||||
"fire_resist" : 0,
|
||||
"density" : 5
|
||||
},
|
||||
{
|
||||
"ident" : "powder",
|
||||
"name" : "Powder",
|
||||
"bash_resist" : 1,
|
||||
"cut_resist" : 1,
|
||||
"bash_dmg_verb" : "damaged",
|
||||
"cut_dmg_verb" : "damaged",
|
||||
"dmg_adj" : ["lightly damaged", "damaged", "very damaged", "thoroughly damaged"],
|
||||
"acid_resist" : 0,
|
||||
"elec_resist" : 2,
|
||||
"fire_resist" : 0,
|
||||
"density" : 1
|
||||
},
|
||||
{
|
||||
"ident" : "hflesh",
|
||||
"name" : "Human Flesh",
|
||||
"bash_resist" : 1,
|
||||
"cut_resist" : 1,
|
||||
"bash_dmg_verb" : "bruised",
|
||||
"cut_dmg_verb" : "sliced",
|
||||
"dmg_adj" : ["bruised", "mutilated", "badly mutilated", "thoroughly mutilated"],
|
||||
"acid_resist" : 1,
|
||||
"elec_resist" : 1,
|
||||
"fire_resist" : 0,
|
||||
"density" : 5
|
||||
},
|
||||
{
|
||||
"ident" : "cotton",
|
||||
"name" : "Cotton",
|
||||
"bash_resist" : 1,
|
||||
"cut_resist" : 1,
|
||||
"bash_dmg_verb" : "ripped",
|
||||
"cut_dmg_verb" : "cut",
|
||||
"dmg_adj" : ["ripped", "torn", "shredded", "tattered"],
|
||||
"acid_resist" : 1,
|
||||
"elec_resist" : 2,
|
||||
"fire_resist" : 0,
|
||||
"density" : 3
|
||||
},
|
||||
{
|
||||
"ident" : "wool",
|
||||
"name" : "Wool",
|
||||
"bash_resist" : 1,
|
||||
"cut_resist" : 1,
|
||||
"bash_dmg_verb" : "torn",
|
||||
"cut_dmg_verb" : "cut",
|
||||
"dmg_adj" : ["ripped", "torn", "shredded", "tattered"],
|
||||
"acid_resist" : 1,
|
||||
"elec_resist" : 2,
|
||||
"fire_resist" : 0,
|
||||
"density" : 9
|
||||
},
|
||||
{
|
||||
"ident" : "leather",
|
||||
"name" : "Leather",
|
||||
"bash_resist" : 2,
|
||||
"cut_resist" : 2,
|
||||
"bash_dmg_verb" : "ripped",
|
||||
"cut_dmg_verb" : "sliced",
|
||||
"dmg_adj" : ["scratched", "cut", "shredded", "tattered"],
|
||||
"acid_resist" : 1,
|
||||
"elec_resist" : 2,
|
||||
"fire_resist" : 1,
|
||||
"density" : 6
|
||||
},
|
||||
{
|
||||
"ident" : "kevlar",
|
||||
"name" : "Kevlar",
|
||||
"bash_resist" : 2,
|
||||
"cut_resist" : 4,
|
||||
"bash_dmg_verb" : "ripped",
|
||||
"cut_dmg_verb" : "cut",
|
||||
"dmg_adj" : ["marked", "dented", "scarred", "broken"],
|
||||
"acid_resist" : 2,
|
||||
"elec_resist" : 2,
|
||||
"fire_resist" : 1,
|
||||
"density" : 10
|
||||
},
|
||||
{
|
||||
"ident" : "fur",
|
||||
"name" : "Fur",
|
||||
"bash_resist" : 2,
|
||||
"cut_resist" : 2,
|
||||
"bash_dmg_verb" : "ripped",
|
||||
"cut_dmg_verb" : "sliced",
|
||||
"dmg_adj" : ["ripped", "torn", "shredded", "tattered"],
|
||||
"acid_resist" : 1,
|
||||
"elec_resist" : 2,
|
||||
"fire_resist" : 0,
|
||||
"density" : 9
|
||||
},
|
||||
{
|
||||
"ident" : "chitin",
|
||||
"name" : "Chitin",
|
||||
"bash_resist" : 3,
|
||||
"cut_resist" : 4,
|
||||
"bash_dmg_verb" : "cracked",
|
||||
"cut_dmg_verb" : "chipped",
|
||||
"dmg_adj" : ["scratched", "cut", "cracked", "shattered"],
|
||||
"acid_resist" : 1,
|
||||
"elec_resist" : 2,
|
||||
"fire_resist" : 2,
|
||||
"density" : 10
|
||||
},
|
||||
{
|
||||
"ident" : "bone",
|
||||
"name" : "Bone",
|
||||
"bash_resist" : 2,
|
||||
"cut_resist" : 3,
|
||||
"bash_dmg_verb" : "cracked",
|
||||
"cut_dmg_verb" : "chipped",
|
||||
"dmg_adj" : ["scratched", "cut", "cracked", "shattered"],
|
||||
"acid_resist" : 1,
|
||||
"elec_resist" : 2,
|
||||
"fire_resist" : 4,
|
||||
"density" : 7
|
||||
},
|
||||
{
|
||||
"ident" : "stone",
|
||||
"name" : "Stone",
|
||||
"bash_resist" : 6,
|
||||
"cut_resist" : 6,
|
||||
"bash_dmg_verb" : "cracked",
|
||||
"cut_dmg_verb" : "chipped",
|
||||
"dmg_adj" : ["scratched", "cut", "cracked", "shattered"],
|
||||
"acid_resist" : 3,
|
||||
"elec_resist" : 2,
|
||||
"fire_resist" : 2,
|
||||
"density" : 17
|
||||
},
|
||||
{
|
||||
"ident" : "paper",
|
||||
"name" : "Paper",
|
||||
"bash_resist" : 1,
|
||||
"cut_resist" : 1,
|
||||
"bash_dmg_verb" : "ripped",
|
||||
"cut_dmg_verb" : "cut",
|
||||
"dmg_adj" : ["ripped", "torn", "shredded", "tattered"],
|
||||
"acid_resist" : 1,
|
||||
"elec_resist" : 2,
|
||||
"fire_resist" : 0,
|
||||
"density" : 4
|
||||
},
|
||||
{
|
||||
"ident" : "wood",
|
||||
"name" : "Wood",
|
||||
"bash_resist" : 3,
|
||||
"cut_resist" : 2,
|
||||
"bash_dmg_verb" : "splintered",
|
||||
"cut_dmg_verb" : "gouged",
|
||||
"dmg_adj" : ["scratched", "chipped", "cracked", "splintered"],
|
||||
"acid_resist" : 2,
|
||||
"elec_resist" : 2,
|
||||
"fire_resist" : 0,
|
||||
"density" : 4
|
||||
},
|
||||
{
|
||||
"ident" : "plastic",
|
||||
"name" : "Plastic",
|
||||
"bash_resist" : 2,
|
||||
"cut_resist" : 2,
|
||||
"bash_dmg_verb" : "dented",
|
||||
"cut_dmg_verb" : "gouged",
|
||||
"dmg_adj" : ["scratched", "cut", "cracked", "shattered"],
|
||||
"acid_resist" : 2,
|
||||
"elec_resist" : 2,
|
||||
"fire_resist" : 0,
|
||||
"density" : 8
|
||||
},
|
||||
{
|
||||
"ident" : "glass",
|
||||
"name" : "Glass",
|
||||
"bash_resist" : 3,
|
||||
"cut_resist" : 4,
|
||||
"bash_dmg_verb" : "cracked",
|
||||
"cut_dmg_verb" : "scratched",
|
||||
"dmg_adj" : ["scratched", "cut", "cracked", "shattered"],
|
||||
"acid_resist" : 3,
|
||||
"elec_resist" : 2,
|
||||
"fire_resist" : 2,
|
||||
"density" : 14
|
||||
},
|
||||
{
|
||||
"ident" : "iron",
|
||||
"name" : "Iron",
|
||||
"bash_resist" : 4,
|
||||
"cut_resist" : 4,
|
||||
"bash_dmg_verb" : "dented",
|
||||
"cut_dmg_verb" : "scratched",
|
||||
"dmg_adj" : ["marked", "dented", "smashed", "shattered"],
|
||||
"acid_resist" : 0,
|
||||
"elec_resist" : 0,
|
||||
"fire_resist" : 2,
|
||||
"density" : 52
|
||||
},
|
||||
{
|
||||
"ident" : "steel",
|
||||
"name" : "Steel",
|
||||
"bash_resist" : 6,
|
||||
"cut_resist" : 6,
|
||||
"bash_dmg_verb" : "dented",
|
||||
"cut_dmg_verb" : "scratched",
|
||||
"dmg_adj" : ["marked", "dented", "smashed", "shattered"],
|
||||
"acid_resist" : 0,
|
||||
"elec_resist" : 0,
|
||||
"fire_resist" : 2,
|
||||
"density" : 52
|
||||
},
|
||||
{
|
||||
"ident" : "silver",
|
||||
"name" : "Silver",
|
||||
"bash_resist" : 2,
|
||||
"cut_resist" : 3,
|
||||
"bash_dmg_verb" : "dented",
|
||||
"cut_dmg_verb" : "scratched",
|
||||
"dmg_adj" : ["marked", "dented", "smashed", "shattered"],
|
||||
"acid_resist" : 2,
|
||||
"elec_resist" : 0,
|
||||
"fire_resist" : 2,
|
||||
"density" : 70
|
||||
}
|
||||
]
|
||||
@@ -1,289 +0,0 @@
|
||||
[
|
||||
{
|
||||
"name" : "GROUP_FOREST",
|
||||
"default" : "mon_squirrel",
|
||||
"monsters" : [
|
||||
{ "monster" : "mon_rabbit", "freq" : 150, "multiplier" : 0 },
|
||||
{ "monster" : "mon_deer", "freq" : 30, "multiplier" : 3 },
|
||||
{ "monster" : "mon_moose", "freq" : 10, "multiplier" : 3 },
|
||||
{ "monster" : "mon_wolf", "freq" : 30, "multiplier" : 5 },
|
||||
{ "monster" : "mon_coyote", "freq" : 30, "multiplier" : 5 },
|
||||
{ "monster" : "mon_bear", "freq" : 20, "multiplier" : 10 },
|
||||
{ "monster" : "mon_cougar", "freq" : 20, "multiplier" : 10 },
|
||||
{ "monster" : "mon_spider_wolf", "freq" : 30, "multiplier" : 10 },
|
||||
{ "monster" : "mon_spider_jumping", "freq" : 30, "multiplier" : 10 },
|
||||
{ "monster" : "mon_dog", "freq" : 10, "multiplier" : 0 },
|
||||
{ "monster" : "mon_cat", "freq" : 10, "multiplier" : 0 },
|
||||
{ "monster" : "mon_crow", "freq" : 30, "multiplier" : 0 }
|
||||
]
|
||||
},
|
||||
{
|
||||
"name" : "GROUP_ANT",
|
||||
"default" : "mon_ant",
|
||||
"monsters" : [
|
||||
{ "monster" : "mon_ant_larva", "freq" : 40, "multiplier" : 0 },
|
||||
{ "monster" : "mon_ant_soldier", "freq" : 90, "multiplier" : 5 },
|
||||
{ "monster" : "mon_ant_queen", "freq" : 0, "multiplier" : 0 }
|
||||
]
|
||||
},
|
||||
{
|
||||
"name" : "GROUP_BEE",
|
||||
"default" : "mon_bee",
|
||||
"monsters" : [
|
||||
]
|
||||
},
|
||||
{
|
||||
"name" : "GROUP_WORM",
|
||||
"default" : "mon_worm",
|
||||
"monsters" : [
|
||||
{ "monster" : "mon_graboid", "freq" : 30, "multiplier" : 20 },
|
||||
{ "monster" : "mon_halfworm", "freq" : 0, "multiplier" : 0 }
|
||||
]
|
||||
},
|
||||
{
|
||||
"name" : "GROUP_ZOMBIE",
|
||||
"default" : "mon_zombie",
|
||||
"monsters" : [
|
||||
{ "monster" : "mon_zombie_cop", "freq" : 20, "multiplier" : 3 },
|
||||
{ "monster" : "mon_zombie_fast", "freq" : 70, "multiplier" : 2 },
|
||||
{ "monster" : "mon_zombie_grabber", "freq" : 70, "multiplier" : 1 },
|
||||
{ "monster" : "mon_skeleton", "freq" : 30, "multiplier" : 2 },
|
||||
{ "monster" : "mon_zombie_smoker", "freq" : 30, "multiplier" : 5 },
|
||||
{ "monster" : "mon_zombie_shrieker", "freq" : 30, "multiplier" : 5 },
|
||||
{ "monster" : "mon_zombie_spitter", "freq" : 30, "multiplier" : 5 },
|
||||
{ "monster" : "mon_zombie_electric", "freq" : 30, "multiplier" : 5 },
|
||||
{ "monster" : "mon_zombie_necro", "freq" : 1, "multiplier" : 25 },
|
||||
{ "monster" : "mon_boomer", "freq" : 30, "multiplier" : 7 },
|
||||
{ "monster" : "mon_zombie_brute", "freq" : 10, "multiplier" : 15 },
|
||||
{ "monster" : "mon_zombie_hulk", "freq" : 1, "multiplier" : 50 },
|
||||
{ "monster" : "mon_zombie_master", "freq" : 1, "multiplier" : 25 },
|
||||
{ "monster" : "mon_crow", "freq" : 1, "multiplier" : 0 }
|
||||
]
|
||||
},
|
||||
{
|
||||
"name" : "GROUP_TRIFFID",
|
||||
"default" : "mon_triffid",
|
||||
"monsters" : [
|
||||
{ "monster" : "mon_triffid_young", "freq" : 300, "multiplier" : 0 },
|
||||
{ "monster" : "mon_vinebeast", "freq" : 160, "multiplier" : 10 },
|
||||
{ "monster" : "mon_triffid_queen", "freq" : 60, "multiplier" : 0 },
|
||||
{ "monster" : "mon_triffid_heart", "freq" : 0, "multiplier" : 0 }
|
||||
]
|
||||
},
|
||||
{
|
||||
"name" : "GROUP_FUNGI",
|
||||
"default" : "mon_fungaloid",
|
||||
"monsters" : [
|
||||
{ "monster" : "mon_fungaloid_dormant", "freq" : 0, "multiplier" : 0 },
|
||||
{ "monster" : "mon_ant_fungus", "freq" : 0, "multiplier" : 0 },
|
||||
{ "monster" : "mon_zombie_fungus", "freq" : 300, "multiplier" : 0 },
|
||||
{ "monster" : "mon_boomer_fungus", "freq" : 30, "multiplier" : 0 },
|
||||
{ "monster" : "mon_spore", "freq" : 0, "multiplier" : 0 },
|
||||
{ "monster" : "mon_fungal_wall", "freq" : 0, "multiplier" : 0 },
|
||||
{ "monster" : "mon_fungaloid_queen", "freq" : 0, "multiplier" : 0 }
|
||||
]
|
||||
},
|
||||
|
||||
{
|
||||
"name" : "GROUP_GOO",
|
||||
"default" : "mon_blob",
|
||||
"monsters" : [
|
||||
{ "monster" : "mon_blob_small", "freq" : 200, "multiplier" : 0 }
|
||||
]
|
||||
},
|
||||
{
|
||||
"name" : "GROUP_CHUD",
|
||||
"default" : "mon_chud",
|
||||
"monsters" : [
|
||||
{ "monster" : "mon_one_eye", "freq" : 90, "multiplier" : 0 },
|
||||
{ "monster" : "mon_crawler", "freq" : 35, "multiplier" : 0 }
|
||||
]
|
||||
},
|
||||
{
|
||||
"name" : "GROUP_SEWER",
|
||||
"default" : "mon_sewer_rat",
|
||||
"monsters" : [
|
||||
{ "monster" : "mon_sewer_fish", "freq" : 470, "multiplier" : 0 },
|
||||
{ "monster" : "mon_sewer_snake", "freq" : 240, "multiplier" : 0 }
|
||||
]
|
||||
},
|
||||
{
|
||||
"name" : "GROUP_SWAMP",
|
||||
"default" : "mon_mosquito",
|
||||
"monsters" : [
|
||||
{ "monster" : "mon_dragonfly", "freq" : 130, "multiplier" : 0 },
|
||||
{ "monster" : "mon_centipede", "freq" : 150, "multiplier" : 0 },
|
||||
{ "monster" : "mon_frog", "freq" : 100, "multiplier" : 0 },
|
||||
{ "monster" : "mon_slug", "freq" : 85, "multiplier" : 0 },
|
||||
{ "monster" : "mon_dermatik_larva", "freq" : 0, "multiplier" : 0 },
|
||||
{ "monster" : "mon_dermatik", "freq" : 65, "multiplier" : 0 }
|
||||
]
|
||||
},
|
||||
{
|
||||
"name" : "GROUP_LAB",
|
||||
"default" : "mon_zombie_scientist",
|
||||
"monsters" : [
|
||||
{ "monster" : "mon_blob_small", "freq" : 25, "multiplier" : 0 },
|
||||
{ "monster" : "mon_manhack", "freq" : 245, "multiplier" : 0 },
|
||||
{ "monster" : "mon_skitterbot", "freq" : 245, "multiplier" : 0 }
|
||||
]
|
||||
},
|
||||
{
|
||||
"name" : "GROUP_NETHER",
|
||||
"default" : "mon_blank",
|
||||
"monsters" : [
|
||||
{ "monster" : "mon_flying_polyp", "freq" : 25, "multiplier" : 0 },
|
||||
{ "monster" : "mon_hunting_horror", "freq" : 240, "multiplier" : 0 },
|
||||
{ "monster" : "mon_mi_go", "freq" : 120, "multiplier" : 0 },
|
||||
{ "monster" : "mon_yugg", "freq" : 70, "multiplier" : 0 },
|
||||
{ "monster" : "mon_gelatin", "freq" : 120, "multiplier" : 0 },
|
||||
{ "monster" : "mon_flaming_eye", "freq" : 120, "multiplier" : 0 },
|
||||
{ "monster" : "mon_kreck", "freq" : 210, "multiplier" : 0 },
|
||||
{ "monster" : "mon_gozu", "freq" : 25, "multiplier" : 0 }
|
||||
]
|
||||
},
|
||||
{
|
||||
"name" : "GROUP_SPIRAL",
|
||||
"default" : "mon_human_snail",
|
||||
"monsters" : [
|
||||
{ "monster" : "mon_twisted_body", "freq" : 180, "multiplier" : 0 },
|
||||
{ "monster" : "mon_vortex", "freq" : 80, "multiplier" : 0 }
|
||||
]
|
||||
},
|
||||
{
|
||||
"name" : "GROUP_VANILLA",
|
||||
"default" : "mon_zombie",
|
||||
"monsters" : [
|
||||
]
|
||||
},
|
||||
{
|
||||
"name" : "GROUP_SPIDER",
|
||||
"default" : "mon_spider_wolf",
|
||||
"monsters" : [
|
||||
{ "monster" : "mon_spider_web", "freq" : 200, "multiplier" : 0 },
|
||||
{ "monster" : "mon_spider_jumping", "freq" : 400, "multiplier" : 0 },
|
||||
{ "monster" : "mon_spider_widow", "freq" : 200, "multiplier" : 0 }
|
||||
]
|
||||
},
|
||||
{
|
||||
"name" : "GROUP_ROBOT",
|
||||
"default" : "mon_manhack",
|
||||
"monsters" : [
|
||||
{ "monster" : "mon_skitterbot", "freq" : 220, "multiplier" : 0 },
|
||||
{ "monster" : "mon_secubot", "freq" : 150, "multiplier" : 0 },
|
||||
{ "monster" : "mon_copbot", "freq" : 0, "multiplier" : 0 },
|
||||
{ "monster" : "mon_molebot", "freq" : 40, "multiplier" : 0 },
|
||||
{ "monster" : "mon_tripod", "freq" : 110, "multiplier" : 0 },
|
||||
{ "monster" : "mon_chickenbot", "freq" : 60, "multiplier" : 0 },
|
||||
{ "monster" : "mon_tankbot", "freq" : 20, "multiplier" : 0 }
|
||||
]
|
||||
},
|
||||
{
|
||||
"name" : "GROUP_POLICE", "_comment" : "+30% cops",
|
||||
"default" : "mon_zombie",
|
||||
"monsters" : [
|
||||
{ "monster" : "mon_zombie_cop", "freq" : 320, "multiplier" : 3 },
|
||||
{ "monster" : "mon_zombie_fast", "freq" : 70, "multiplier" : 2 },
|
||||
{ "monster" : "mon_zombie_grabber", "freq" : 70, "multiplier" : 1 },
|
||||
{ "monster" : "mon_skeleton", "freq" : 30, "multiplier" : 2 },
|
||||
{ "monster" : "mon_zombie_smoker", "freq" : 30, "multiplier" : 5 },
|
||||
{ "monster" : "mon_zombie_shrieker", "freq" : 30, "multiplier" : 5 },
|
||||
{ "monster" : "mon_zombie_spitter", "freq" : 30, "multiplier" : 5 },
|
||||
{ "monster" : "mon_zombie_electric", "freq" : 30, "multiplier" : 5 },
|
||||
{ "monster" : "mon_zombie_necro", "freq" : 1, "multiplier" : 25 },
|
||||
{ "monster" : "mon_boomer", "freq" : 30, "multiplier" : 7 },
|
||||
{ "monster" : "mon_zombie_brute", "freq" : 10, "multiplier" : 15 },
|
||||
{ "monster" : "mon_zombie_hulk", "freq" : 1, "multiplier" : 50 },
|
||||
{ "monster" : "mon_zombie_master", "freq" : 1, "multiplier" : 25 },
|
||||
{ "monster" : "mon_crow", "freq" : 1, "multiplier" : 0 }
|
||||
]
|
||||
},
|
||||
{
|
||||
"name" : "GROUP_HOUSE", "_comment" : "+15% child",
|
||||
"default" : "mon_zombie",
|
||||
"monsters" : [
|
||||
{ "monster" : "mon_zombie_child", "freq" : 150, "multiplier" : 2 },
|
||||
{ "monster" : "mon_zombie_cop", "freq" : 20, "multiplier" : 2 },
|
||||
{ "monster" : "mon_zombie_fast", "freq" : 70, "multiplier" : 2 },
|
||||
{ "monster" : "mon_zombie_grabber", "freq" : 70, "multiplier" : 1 },
|
||||
{ "monster" : "mon_skeleton", "freq" : 30, "multiplier" : 2 },
|
||||
{ "monster" : "mon_zombie_smoker", "freq" : 30, "multiplier" : 5 },
|
||||
{ "monster" : "mon_zombie_shrieker", "freq" : 30, "multiplier" : 5 },
|
||||
{ "monster" : "mon_zombie_spitter", "freq" : 30, "multiplier" : 5 },
|
||||
{ "monster" : "mon_zombie_electric", "freq" : 30, "multiplier" : 5 },
|
||||
{ "monster" : "mon_zombie_necro", "freq" : 1, "multiplier" : 25 },
|
||||
{ "monster" : "mon_boomer", "freq" : 30, "multiplier" : 7 },
|
||||
{ "monster" : "mon_zombie_brute", "freq" : 10, "multiplier" : 15 },
|
||||
{ "monster" : "mon_zombie_hulk", "freq" : 1, "multiplier" : 50 },
|
||||
{ "monster" : "mon_zombie_master", "freq" : 1, "multiplier" : 25 },
|
||||
{ "monster" : "mon_crow", "freq" : 1, "multiplier" : 0 }
|
||||
]
|
||||
},
|
||||
{
|
||||
"name" : "GROUP_PHARM", "_comment" : "+15% fast",
|
||||
"default" : "mon_zombie",
|
||||
"monsters" : [
|
||||
{ "monster" : "mon_zombie_cop", "freq" : 20, "multiplier" : 2 },
|
||||
{ "monster" : "mon_zombie_fast", "freq" : 220, "multiplier" : 2 },
|
||||
{ "monster" : "mon_zombie_grabber", "freq" : 70, "multiplier" : 1 },
|
||||
{ "monster" : "mon_skeleton", "freq" : 30, "multiplier" : 2 },
|
||||
{ "monster" : "mon_zombie_smoker", "freq" : 30, "multiplier" : 5 },
|
||||
{ "monster" : "mon_zombie_shrieker", "freq" : 30, "multiplier" : 5 },
|
||||
{ "monster" : "mon_zombie_spitter", "freq" : 30, "multiplier" : 5 },
|
||||
{ "monster" : "mon_zombie_electric", "freq" : 30, "multiplier" : 5 },
|
||||
{ "monster" : "mon_zombie_necro", "freq" : 1, "multiplier" : 25 },
|
||||
{ "monster" : "mon_boomer", "freq" : 30, "multiplier" : 7 },
|
||||
{ "monster" : "mon_zombie_brute", "freq" : 10, "multiplier" : 15 },
|
||||
{ "monster" : "mon_zombie_hulk", "freq" : 1, "multiplier" : 50 },
|
||||
{ "monster" : "mon_zombie_master", "freq" : 1, "multiplier" : 25 },
|
||||
{ "monster" : "mon_crow", "freq" : 1, "multiplier" : 0 }
|
||||
]
|
||||
},
|
||||
{
|
||||
"name" : "GROUP_ELECTRO", "_comment" : "+15% electric",
|
||||
"default" : "mon_zombie",
|
||||
"monsters" : [
|
||||
{ "monster" : "mon_zombie_cop", "freq" : 20, "multiplier" : 2 },
|
||||
{ "monster" : "mon_zombie_fast", "freq" : 70, "multiplier" : 2 },
|
||||
{ "monster" : "mon_zombie_grabber", "freq" : 70, "multiplier" : 1 },
|
||||
{ "monster" : "mon_skeleton", "freq" : 30, "multiplier" : 2 },
|
||||
{ "monster" : "mon_zombie_smoker", "freq" : 30, "multiplier" : 5 },
|
||||
{ "monster" : "mon_zombie_shrieker", "freq" : 30, "multiplier" : 5 },
|
||||
{ "monster" : "mon_zombie_spitter", "freq" : 30, "multiplier" : 5 },
|
||||
{ "monster" : "mon_zombie_electric", "freq" : 180, "multiplier" : 5 },
|
||||
{ "monster" : "mon_zombie_necro", "freq" : 1, "multiplier" : 25 },
|
||||
{ "monster" : "mon_boomer", "freq" : 30, "multiplier" : 7 },
|
||||
{ "monster" : "mon_zombie_brute", "freq" : 10, "multiplier" : 15 },
|
||||
{ "monster" : "mon_zombie_hulk", "freq" : 1, "multiplier" : 50 },
|
||||
{ "monster" : "mon_zombie_master", "freq" : 1, "multiplier" : 25 },
|
||||
{ "monster" : "mon_crow", "freq" : 1, "multiplier" : 0 }
|
||||
]
|
||||
},
|
||||
{
|
||||
"name" : "GROUP_GROCERY", "_comment" : "+15% bommers",
|
||||
"default" : "mon_zombie",
|
||||
"monsters" : [
|
||||
{ "monster" : "mon_zombie_cop", "freq" : 20, "multiplier" : 2 },
|
||||
{ "monster" : "mon_zombie_fast", "freq" : 70, "multiplier" : 2 },
|
||||
{ "monster" : "mon_zombie_grabber", "freq" : 70, "multiplier" : 1 },
|
||||
{ "monster" : "mon_skeleton", "freq" : 30, "multiplier" : 2 },
|
||||
{ "monster" : "mon_zombie_smoker", "freq" : 30, "multiplier" : 5 },
|
||||
{ "monster" : "mon_zombie_shrieker", "freq" : 30, "multiplier" : 5 },
|
||||
{ "monster" : "mon_zombie_spitter", "freq" : 30, "multiplier" : 5 },
|
||||
{ "monster" : "mon_zombie_electric", "freq" : 30, "multiplier" : 5 },
|
||||
{ "monster" : "mon_zombie_necro", "freq" : 1, "multiplier" : 25 },
|
||||
{ "monster" : "mon_boomer", "freq" : 180, "multiplier" : 7 },
|
||||
{ "monster" : "mon_zombie_brute", "freq" : 10, "multiplier" : 15 },
|
||||
{ "monster" : "mon_zombie_hulk", "freq" : 1, "multiplier" : 50 },
|
||||
{ "monster" : "mon_zombie_master", "freq" : 1, "multiplier" : 25 },
|
||||
{ "monster" : "mon_crow", "freq" : 1, "multiplier" : 0 }
|
||||
]
|
||||
},
|
||||
{
|
||||
"name" : "GROUP_MAYBE_MIL", "_comment" : "50% chance military zombie",
|
||||
"default" : "mon_null",
|
||||
"monsters" : [
|
||||
{ "monster" : "mon_zombie_soldier", "freq" : 50, "multiplier" : 0 }
|
||||
]
|
||||
}
|
||||
]
|
||||
-1456
File diff suppressed because it is too large
Load Diff
@@ -1,66 +0,0 @@
|
||||
[
|
||||
{
|
||||
"ident": "unemployed",
|
||||
"name": "Unemployed",
|
||||
"description":
|
||||
"They say you don't have any 'useful skills', but at least your clothes fit well.",
|
||||
"points": 0,
|
||||
"items": ["jeans", "tshirt", "sneakers"]
|
||||
},
|
||||
|
||||
{
|
||||
"ident": "tailor",
|
||||
"name": "Tailor",
|
||||
"description":
|
||||
"You've made and adjusted clothing for some of the biggest names in town. Now, their undead bodies are trying to eat your brains. At least you'll be able to keep your own clothing repaired.",
|
||||
"points": 1,
|
||||
"items": ["polo_shirt", "blazer", "pants", "dress_shoes", "sewing_kit", "scissors", "manual_tailor"]
|
||||
},
|
||||
|
||||
{
|
||||
"ident": "labtech",
|
||||
"name": "Lab Technician",
|
||||
"description":
|
||||
"It was your first day in the lab when the cataclysm hit. You were evacuated with all the civilians, but at least you kept your lab gear.",
|
||||
"points": 1,
|
||||
"items": ["dress_shirt", "pants", "boots", "coat_lab", "gloves_rubber", "glasses_safety"]
|
||||
},
|
||||
|
||||
{
|
||||
"ident": "mechanic",
|
||||
"name": "Wannabe Mechanic",
|
||||
"description":
|
||||
"Although you never got your driver's license, you've always loved cars. You start with a wrench, a toolbelt, and some car-related reading material.",
|
||||
"points": 2,
|
||||
"items": ["tank_top", "jeans", "boots", "beltrig", "wrench", "mag_cars", "manual_mechanics"]
|
||||
},
|
||||
|
||||
{
|
||||
"ident": "scoundrel",
|
||||
"name": "Scoundrel",
|
||||
"description":
|
||||
"Your flexible outlook on law has ensured your survival, but now what? You start with cargo pants, a hoodie, \"sundries\", and one additional level of melee.",
|
||||
"points": 2,
|
||||
"items": ["tank_top", "hoodie", "pants_cargo", "sneakers", "weed", "picklocks"],
|
||||
"skills" : [
|
||||
{
|
||||
"name" : "melee",
|
||||
"level" : 1
|
||||
}
|
||||
]
|
||||
},
|
||||
|
||||
{
|
||||
"ident": "smoker",
|
||||
"name": "Chain Smoker",
|
||||
"description": "Everyone at work knew you as the person who always had a cigarette or two in hand. now, you're down to a single pack, and you hope you find more soon. You start out with a strong nicotine addiction, and 10 cigarettes.",
|
||||
"points": -1,
|
||||
"items": ["pants", "dress_shirt", "dress_shoes", "cig"],
|
||||
"addictions": [
|
||||
{
|
||||
"type": "nicotine",
|
||||
"intensity": 10
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
File diff suppressed because it is too large
Load Diff
@@ -1,164 +0,0 @@
|
||||
[
|
||||
[
|
||||
"dodge",
|
||||
"dodge",
|
||||
"Your skill at dodging, whether it be from an attack, a trap, or a natural occurrence. It is also used when attempting to fall gracefully, or in other acrobatic feats.",
|
||||
[]
|
||||
],
|
||||
[
|
||||
"melee",
|
||||
"melee",
|
||||
"Your skill at hand-to-hand combat, both with and without a weapon. At low levels this merely increases your chance to hit, but at higher levels it also increases the damage done significantly.",
|
||||
[]
|
||||
],
|
||||
[
|
||||
"unarmed",
|
||||
"unarmed combat",
|
||||
"Your skill at combat without a weapon. While at low levels, unarmed combat is a good way to die quickly, those skilled in it can eventually use throws and crushing blows to quickly dispatch enemies.",
|
||||
[]
|
||||
],
|
||||
[
|
||||
"bashing",
|
||||
"bashing weapons",
|
||||
"Your skill at combat with weapons that club or bash your enemies. This includes everything from rocks to baseball bats, and even the butt of rifles. This increases damage, and at higher levels will improve your chance to hit.",
|
||||
[]
|
||||
],
|
||||
[
|
||||
"cutting",
|
||||
"cutting weapons",
|
||||
"Your skill at combat with weapons that cut or slice your enemies. At first this will simply slightly increase accuracy and damage; later on it will help you bypass armor and thick hides.",
|
||||
[]
|
||||
],
|
||||
[
|
||||
"stabbing",
|
||||
"piercing weapons",
|
||||
"Your skill at combat that involves piercing weapons. This includes spears, which only have a stabbing attack, and things like knives, which can cut or pierce. This increases your accuracy and chance of a deadly critical.",
|
||||
[]
|
||||
],
|
||||
[
|
||||
"throw",
|
||||
"throwing",
|
||||
"Your skill at throwing items and getting them to go where you want. Increases both accuracy and, at higher levels, range.",
|
||||
[]
|
||||
],
|
||||
[
|
||||
"gun",
|
||||
"firearms",
|
||||
"Your general skill at firearms. This increases your accuracy with any gun, but not as much as the skill associated with the gun in question.",
|
||||
[]
|
||||
],
|
||||
[
|
||||
"pistol",
|
||||
"handguns",
|
||||
"Your skill with handguns. These have poor accuracy, but generally are fired and reloaded faster than other guns, and are good in close quarters.",
|
||||
["gun_type"]
|
||||
],
|
||||
[
|
||||
"shotgun",
|
||||
"shotguns",
|
||||
"Your skill with shotguns. Shot is easy to hit with, and does massive damage, but has short range. Shotguns may also be loaded with slugs, which go further and do as much damage, but are not very accurate.",
|
||||
["gun_type"]
|
||||
],
|
||||
[
|
||||
"smg",
|
||||
"submachine guns",
|
||||
"Your skill with submachine guns and machine pistols. Halfway between a pistol and an assault rifle, these weapons fire and reload quickly, and may fire in bursts, but they are not very accurate.",
|
||||
["gun_type"]
|
||||
],
|
||||
[
|
||||
"rifle",
|
||||
"rifles",
|
||||
"Your skill with rifles, both assault rifles and semi-auto hunting rifles. These have terrific range and accuracy, but are very slow to fire and reload, and are not very good in close quarters.",
|
||||
["gun_type"]
|
||||
],
|
||||
[
|
||||
"archery",
|
||||
"archery",
|
||||
"Your skill with all kinds of bows, from crossbows to handmade long bows. These are quiet, but require some amount of strength to use, and are not terribly accurate. They can only be deadly in skilled hands.",
|
||||
[]
|
||||
],
|
||||
[
|
||||
"launcher",
|
||||
"grenade launcher",
|
||||
"Your skill with grenade launchers, whether standalone or as a rifle mod. These launchers fire a variety of 40mm grenades with different uses, but they and their rounds are hard to find.",
|
||||
[]
|
||||
],
|
||||
[
|
||||
"computer",
|
||||
"computers",
|
||||
"Your skill with computers, both in terms of legitimate use, and hacking. This will help you use complex systems, and bypass their security.",
|
||||
[]
|
||||
],
|
||||
[
|
||||
"mechanics",
|
||||
"mechanics",
|
||||
"Your skill with repairs to mechanical systems, and the crafting of many items that use complex parts, but are not electronics.",
|
||||
[]
|
||||
],
|
||||
[
|
||||
"electronics",
|
||||
"electronics",
|
||||
"Your skill with repairs to electrical systems, and the crafting of many items that use electrical parts.",
|
||||
[]
|
||||
],
|
||||
[
|
||||
"cooking",
|
||||
"cooking",
|
||||
"Your skill in combining food ingredients to make other, tastier food items. This may also be used in mixing chemicals and other more esoteric tasks.",
|
||||
[]
|
||||
],
|
||||
[
|
||||
"carpentry",
|
||||
"construction",
|
||||
"Your general knowledge in construction. This is used primarily when building terrain, via the * screen.",
|
||||
[]
|
||||
],
|
||||
[
|
||||
"survival",
|
||||
"survival",
|
||||
"Your skill in wilderness survival. This helps you butcher meat from a corpse and craft various basic survival items. Also used for skinning corpses to acquire pelts.",
|
||||
[]
|
||||
],
|
||||
[
|
||||
"traps",
|
||||
"traps",
|
||||
"Your skill at setting and disarming traps safely and effectively. Note that this does not help you detect traps, or avoid their effects if you activate them.",
|
||||
[]
|
||||
],
|
||||
[
|
||||
"tailor",
|
||||
"tailoring",
|
||||
"Your skill at repairing clothing, and at higher levels, creating clothing from basic materials. Generally a sewing kit is needed. Also applies to other methods of clothing repair and textile crafting.",
|
||||
[]
|
||||
],
|
||||
[
|
||||
"firstaid",
|
||||
"first aid",
|
||||
"Your skill at emergency medical treatment, such as that from first aid kits and bandages. High levels of this skill may help heal more HP. Some drugs may be more effective as well.",
|
||||
[]
|
||||
],
|
||||
[
|
||||
"speech",
|
||||
"speech",
|
||||
"Your skill at talking to people, convincing them of things, lying, and many others. Works best in conjunction with a high intelligence.",
|
||||
[]
|
||||
],
|
||||
[
|
||||
"barter",
|
||||
"barter",
|
||||
"Your skill at getting a good deal when trading with others. Very high levels might even see you getting freebies.",
|
||||
[]
|
||||
],
|
||||
[
|
||||
"swimming",
|
||||
"swimming",
|
||||
"Your skill at swimming. This affects speed, your ability to swim while wearing clothes or carrying weights, and in-water combat.",
|
||||
[]
|
||||
],
|
||||
[
|
||||
"driving",
|
||||
"driving",
|
||||
"Your skill at driving. This affects how well you can control a vehicle, as well as the penalty of shooting while driving.",
|
||||
[]
|
||||
]
|
||||
]
|
||||
@@ -1,77 +0,0 @@
|
||||
{
|
||||
"snippets":
|
||||
[
|
||||
{
|
||||
"category": "flier",
|
||||
"text": "This is an advertisement for the Diet Devil brand Metabolic Exchange CBM. It shows a picture of a tiny obese devil sitting on a woman's shoulder. The woman stares intently at a gigantic wedding cake covered with bacon and candybars. The caption reads: \"Burn calories! Burn!\""
|
||||
},
|
||||
{
|
||||
"category": "flier",
|
||||
"text": "This is an advertisement for the Diet Devil brand Internal Furnace CBM. It shows a picture of a tiny obese devil sitting on a man's shoulder. The man is about to bite into a frosting-covered baby. The caption reads: \"Eat What You Want! How You Want! Who You Want!\""
|
||||
},
|
||||
{
|
||||
"category": "flier",
|
||||
"text": "This is an advertisement for the Diet Devil brand Ethanol Burner CBM. It shows a picture of a teenaged boy driving a car while chugging a bottle of whiskey. A tiny obese devil sits on his shoulder and drinks a martini. The caption reads: \"Drink like there's no tomorrow!\""
|
||||
},
|
||||
{
|
||||
"category": "flier",
|
||||
"text": "This is an advertisement for the Twenty8 brand Diamond Cornea CBM. It shows a picture of the cyber-module being clutched by an eagle in flight. The captions read: \"Get the new Model 28.bx Eagle-Eye!\" and \"Twenty8. See what you've been missing.\""
|
||||
},
|
||||
{
|
||||
"category": "flier",
|
||||
"text": "This is an advertisement for the Twenty8 brand Night Vision CBM. It shows a picture of an owl swooping down on a the cyber-module. The captions read: \"Get the new Model 28.hx Night-Owl!\" and \"Twenty8. See what you've been missing.\""
|
||||
},
|
||||
{
|
||||
"category": "flier",
|
||||
"text": "This is an advertisement for the Twenty8 brand Diamond Cornea CBM. It shows a picture of a flying hawk carrying the cyber-module in its beak. The captions read: \"Get the new Model 28.xx Hawk-Eye!\" and \"Twenty8. See what you've been missing.\""
|
||||
},
|
||||
{
|
||||
"category": "flier",
|
||||
"text": "This is an advertisement for the Twenty8 brand Scent Vision CBM. It shows a picture of a vulture perched on a pile of skulls and cyber-modules. The captions read: \"Get the new Model 28.vx Vulture today!\" and \"Twenty8. See what you've been missing.\""
|
||||
},
|
||||
{
|
||||
"category": "flier",
|
||||
"text": "This is an ad for a Twenty8 brand Infrared Vision CBM. It shows a picture of a robotic phoenix covered in flames. The captions read: \"Get the new Model 28.tx Phoenix today!\" and \"Twenty8. See what you've been missing.\""
|
||||
},
|
||||
{
|
||||
"category": "flier",
|
||||
"text": "This is an advertisement for DoubleTech brand law enforcement robots. It shows a picture of copbot and an eyebot boldly emerging from a cloud of teargas and flame. The caption reads: \"DoubleTech Industries. Built to Protect. Programmed to Serve.\""
|
||||
},
|
||||
{
|
||||
"category": "flier",
|
||||
"text": "This is an advertisement for DoubleTech brand law enforcement robots. It shows a picture of an eyebot flying alongside a bald eagle and a Stealth bomber painted as an American flag. The caption reads: \"Built to Protect. Programmed to Serve.\""
|
||||
},
|
||||
{
|
||||
"category": "flier",
|
||||
"text": "This is an advertisement for DoubleTech brand law enforcement robots. It shows a picture of a dozen eyebots floating over a woman as she jogs through a park. The captions read: \"Built to Protect. Programmed to Serve.\""
|
||||
},
|
||||
{
|
||||
"category": "flier",
|
||||
"text": "This is an advertisement for DoubleTech brand law enforcement robots. It shows a picture of copbot pepper-spraying a handcuffed rioter. In the background a troop of boy scouts salutes the robot. The caption reads: \"Built to Protect. Programmed to Serve.\""
|
||||
},
|
||||
{
|
||||
"category": "flier",
|
||||
"text": "This is an advertisement for Robert's Universal Robotics brand law enforcement robots. It shows a picture of tripod robot incinerating a mob of looters and stepping over charred and smoking corpses. The caption reads: \"Built to Protect. Programmed to Serve.\""
|
||||
},
|
||||
{
|
||||
"category": "flier",
|
||||
"text": "This is an advertisement for Robert's Universal Robots brand labor-bots. It shows a picture of a robot carrying a heavy pallet of bricks. In the background a human foreman is sleeping on the job, with his hardhat pulled down over his eyes. The captions read: \"It's a tough job, so why should you have to do it?\" and \"R.U.R. Technology you can Trust.\""
|
||||
},
|
||||
{
|
||||
"category": "flier",
|
||||
"text": "This is an advertisement for Robert's Universal Robots brand labor-bots. It shows a picture of a factory floor run entirely by robots. In the background a man in a suit reads a newspaper that shows soaring stock prices. The caption reads: \"R.U.R. Technology you can Trust.\""
|
||||
},
|
||||
{
|
||||
"category": "flier",
|
||||
"text": "This is an advertisement for Sybil's Cyber Boutique. It shows a picture of several bikini-clad female doctors removing the skin from man's face. The patient is strapped to a chair but cheerfully gives two thumbs up. The caption reads: \"Free Plastic Surgery While You Wait!\""
|
||||
},
|
||||
{
|
||||
"category": "flier",
|
||||
"text": "This is an advertisement for Sybil's Cyber Boutique. It shows a picture of a nerdy looking man surrounded by a group of admiring women. In the foreground a blood-drenched doctor gives an exaggerated wink and a two thumbs up. The caption reads: \"Holiday sales! Get the package deals!\""
|
||||
},
|
||||
{
|
||||
"category": "flier",
|
||||
"text": "This is an advertisement for Sybil's Cyber Boutique. It shows a picture of a man flexing shiny cybernetic arms in front of a mirror. He is flanked by two scantily clad nurses who hold bloody chainsaws and give approving thumbs up. In the background feral dogs gnaw on the man's discarded former limbs. The caption reads: \"Spring Cleaning Sale! 20% off!\""
|
||||
}
|
||||
]
|
||||
}
|
||||
Binary file not shown.
@@ -1,217 +0,0 @@
|
||||
#include "debug.h"
|
||||
#include <time.h>
|
||||
|
||||
|
||||
#if !(defined _WIN32 || defined WINDOWS || defined __CYGWIN__)
|
||||
#include <execinfo.h>
|
||||
#include <stdlib.h>
|
||||
#endif
|
||||
|
||||
// Static defines {{{1
|
||||
// ---------------------------------------------------------------------
|
||||
|
||||
static int debugLevel = DL_ALL;
|
||||
static int debugClass = DC_ALL;
|
||||
|
||||
// Normal functions {{{1
|
||||
// ---------------------------------------------------------------------
|
||||
|
||||
void setupDebug()
|
||||
{
|
||||
int level = 0;
|
||||
|
||||
#ifdef DEBUG_INFO
|
||||
level |= D_INFO;
|
||||
#endif
|
||||
|
||||
#ifdef DEBUG_WARNING
|
||||
level |= D_WARNING;
|
||||
#endif
|
||||
|
||||
#ifdef DEBUG_ERROR
|
||||
level |= D_ERROR;
|
||||
#endif
|
||||
|
||||
#ifdef DEBUG_PEDANTIC_INFO
|
||||
level |= D_PEDANTIC_INFO;
|
||||
#endif
|
||||
|
||||
if( level != 0 )
|
||||
limitDebugLevel(level);
|
||||
|
||||
int cl = 0;
|
||||
|
||||
#ifdef DEBUG_ENABLE_MAIN
|
||||
cl |= D_MAIN;
|
||||
#endif
|
||||
|
||||
#ifdef DEBUG_ENABLE_MAP
|
||||
cl |= D_MAP;
|
||||
#endif
|
||||
|
||||
#ifdef DEBUG_ENABLE_MAP_GEN
|
||||
cl |= D_MAP_GEN;
|
||||
#endif
|
||||
|
||||
#ifdef DEBUG_ENABLE_GAME
|
||||
cl |= D_GAME;
|
||||
#endif
|
||||
|
||||
if( cl != 0 )
|
||||
limitDebugClass(cl);
|
||||
}
|
||||
|
||||
void limitDebugLevel( int i )
|
||||
{
|
||||
dout() << "Set debug level to: " << (DebugLevel)i;
|
||||
debugLevel = i;
|
||||
}
|
||||
|
||||
void limitDebugClass( int i )
|
||||
{
|
||||
dout() << "Set debug class to: " << (DebugClass)i;
|
||||
debugClass = i;
|
||||
}
|
||||
|
||||
// Debug only {{{1
|
||||
// ---------------------------------------------------------------------
|
||||
|
||||
#ifdef ENABLE_LOGGING
|
||||
|
||||
#define TRACE_SIZE 20
|
||||
|
||||
void* tracePtrs[TRACE_SIZE];
|
||||
|
||||
// Debug Includes {{{2
|
||||
// ---------------------------------------------------------------------
|
||||
|
||||
#include <fstream>
|
||||
#include <streambuf>
|
||||
|
||||
// Null OStream {{{2
|
||||
// ---------------------------------------------------------------------
|
||||
|
||||
struct NullBuf : public std::streambuf
|
||||
{
|
||||
NullBuf() {}
|
||||
int overflow(int c) { return c; }
|
||||
};
|
||||
|
||||
struct DebugFile
|
||||
{
|
||||
DebugFile();
|
||||
~DebugFile();
|
||||
|
||||
std::ofstream & currentTime();
|
||||
std::ofstream file;
|
||||
};
|
||||
|
||||
static NullBuf nullBuf;
|
||||
static std::ostream nullStream(&nullBuf);
|
||||
|
||||
// DebugFile OStream Wrapper {{{2
|
||||
// ---------------------------------------------------------------------
|
||||
|
||||
static DebugFile debugFile;
|
||||
|
||||
DebugFile::DebugFile()
|
||||
{
|
||||
file.open("data/debug.txt", std::ios::out | std::ios::app );
|
||||
file << "\n\n-----------------------------------------\n";
|
||||
currentTime() << " : Starting log.";
|
||||
}
|
||||
|
||||
DebugFile::~DebugFile()
|
||||
{
|
||||
file << "\n";
|
||||
currentTime() << " : Log shutdown.\n";
|
||||
file << "-----------------------------------------\n\n";
|
||||
file.close();
|
||||
}
|
||||
|
||||
// OStream Operators {{{2
|
||||
// ---------------------------------------------------------------------
|
||||
|
||||
std::ostream & operator<<(std::ostream & out, DebugLevel lev)
|
||||
{
|
||||
if( lev != DL_ALL )
|
||||
{
|
||||
if( lev & D_INFO )
|
||||
out << "INFO ";
|
||||
if( lev & D_WARNING )
|
||||
out << "WARNING ";
|
||||
if( lev & D_ERROR )
|
||||
out << "ERROR ";
|
||||
if( lev & D_PEDANTIC_INFO )
|
||||
out << "PEDANTIC ";
|
||||
}
|
||||
return out;
|
||||
}
|
||||
|
||||
std::ostream & operator<<(std::ostream & out, DebugClass cl)
|
||||
{
|
||||
if( cl != DC_ALL )
|
||||
{
|
||||
if( cl & D_MAIN )
|
||||
out << "MAIN ";
|
||||
if( cl & D_MAP )
|
||||
out << "MAP ";
|
||||
}
|
||||
return out;
|
||||
}
|
||||
|
||||
std::ofstream & DebugFile::currentTime()
|
||||
{
|
||||
struct tm *current;
|
||||
time_t now;
|
||||
|
||||
time(&now);
|
||||
current = localtime(&now);
|
||||
|
||||
file << current->tm_hour << ":" << current->tm_min << ":" <<
|
||||
current->tm_sec;
|
||||
return file;
|
||||
}
|
||||
|
||||
std::ostream & dout(DebugLevel lev,DebugClass cl)
|
||||
{
|
||||
if( (lev & debugLevel) && (cl & debugClass) )
|
||||
{
|
||||
debugFile.file << std::endl;
|
||||
debugFile.currentTime() << " ";
|
||||
if( lev != debugLevel )
|
||||
debugFile.file << lev;
|
||||
if( cl != debugClass )
|
||||
debugFile.file << cl;
|
||||
debugFile.file << ": ";
|
||||
|
||||
// Backtrace on error.
|
||||
#if !(defined _WIN32 || defined WINDOWS)
|
||||
if( lev == D_ERROR )
|
||||
{
|
||||
int count = backtrace( tracePtrs, TRACE_SIZE );
|
||||
char** funcNames = backtrace_symbols( tracePtrs, count );
|
||||
for(int i = 0; i < count; ++i)
|
||||
debugFile.file << "\n\t(" << funcNames[i] << "), ";
|
||||
debugFile.file << "\n\t";
|
||||
free(funcNames);
|
||||
}
|
||||
#endif
|
||||
|
||||
return debugFile.file;
|
||||
}
|
||||
return nullStream;
|
||||
}
|
||||
|
||||
// Non Debug Only {{{1
|
||||
// ---------------------------------------------------------------------
|
||||
|
||||
#else // If NOT defined ENABLE_LOGGING
|
||||
|
||||
|
||||
DebugVoid dout(DebugLevel,DebugClass)
|
||||
{ return DebugVoid(); }
|
||||
|
||||
#endif // END If NOT defined ENABLE_LOGGING
|
||||
|
||||
// vim:tw=72:sw=1:fdm=marker:fdl=0:
|
||||
@@ -1,105 +0,0 @@
|
||||
#ifndef DEBUG_H_1YCYLZSS
|
||||
#define DEBUG_H_1YCYLZSS
|
||||
|
||||
// Includes {{{1
|
||||
// ---------------------------------------------------------------------
|
||||
|
||||
#include <iostream>
|
||||
#include <vector>
|
||||
#include <fstream>
|
||||
|
||||
// Enumerations {{{1
|
||||
// ---------------------------------------------------------------------
|
||||
|
||||
enum DebugLevel
|
||||
{
|
||||
D_INFO = 1,
|
||||
D_WARNING = 1<<2,
|
||||
D_ERROR = 1<<3,
|
||||
D_PEDANTIC_INFO = 1<<4,
|
||||
|
||||
DL_ALL = (1<<5)-1
|
||||
};
|
||||
|
||||
enum DebugClass
|
||||
{
|
||||
D_MAIN = 1,
|
||||
D_MAP = 1<<2,
|
||||
D_MAP_GEN = 1<<3,
|
||||
D_GAME = 1<<4,
|
||||
D_NPC = 1<<5,
|
||||
|
||||
DC_ALL = (1<<6)-1
|
||||
};
|
||||
|
||||
void setupDebug();
|
||||
|
||||
// Function Declatations {{{1
|
||||
// ---------------------------------------------------------------------
|
||||
|
||||
void limitDebugLevel( int );
|
||||
void limitDebugClass( int );
|
||||
|
||||
// Debug Only {{{1
|
||||
// ---------------------------------------------------------------------
|
||||
|
||||
#ifdef ENABLE_LOGGING
|
||||
std::ostream & dout(DebugLevel=DL_ALL,DebugClass=DC_ALL);
|
||||
#else // if NOT defined ENABLE_LOGGING
|
||||
|
||||
// Non debug only {{{1
|
||||
// ---------------------------------------------------------------------
|
||||
|
||||
struct DebugVoid {};
|
||||
template<class T>
|
||||
DebugVoid operator<< ( const DebugVoid & dv, const T & )
|
||||
{ return dv; }
|
||||
DebugVoid dout(DebugLevel=DL_ALL,DebugClass=DC_ALL);
|
||||
|
||||
#endif // END if NOT defined ENABLE_LOGGING
|
||||
|
||||
// OStream operators {{{1
|
||||
// ---------------------------------------------------------------------
|
||||
|
||||
template<typename C, typename A>
|
||||
std::ostream & operator<<(std::ostream & out, const std::vector<C,A> & elm)
|
||||
{
|
||||
bool first = true;
|
||||
for( typename std::vector<C>::const_iterator
|
||||
it = elm.begin(),
|
||||
end = elm.end();
|
||||
it != end; ++it )
|
||||
{
|
||||
if( first )
|
||||
first = false;
|
||||
else
|
||||
out << ",";
|
||||
out << *it;
|
||||
}
|
||||
|
||||
return out;
|
||||
}
|
||||
|
||||
struct DebugLog
|
||||
{
|
||||
DebugLog() {
|
||||
fout.open("logg.txt", std::ios_base::app | std::ios_base::out);
|
||||
}
|
||||
~DebugLog() {
|
||||
fout.close();
|
||||
}
|
||||
|
||||
template <class T>
|
||||
DebugLog& operator<<(T& t) {
|
||||
fout << t;
|
||||
return *this;
|
||||
}
|
||||
|
||||
private:
|
||||
std::ofstream fout;
|
||||
};
|
||||
|
||||
|
||||
|
||||
// vim:tw=72:sw=1:fdm=marker:fdl=0:
|
||||
#endif /* end of include guard: DEBUG_H_1YCYLZSS */
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user