Compare commits

..

190 Commits

Author SHA1 Message Date
kuutekitty 625a0ec5ec add kuutekitty to donations.md (#89712) 2026-11-22 12:57:25 -08:00
Maya Granade 6b79ead016 JSON linter gh-pages file update (#87466)
Co-authored-by: harakka <2456481+harakka@users.noreply.github.com>
2026-08-06 10:55:40 -07:00
ergolyam f2504649e9 [+] add flathub download link (#87667) 2026-06-20 09:20:34 -07:00
Maya Granade b4326d972d Update head.html 2026-06-03 12:51:48 -07:00
gettingusedto 2f23974f81 Update donations.md (#83821) 2025-11-19 18:31:05 -08:00
SittingDucken 26c4be927a Initial twison build. (#81587) 2025-07-28 21:58:31 -07:00
Kevin Granade 87baa3cc79 Add link to reactivated subreddit 2025-07-16 15:35:37 -07:00
Kevin Granade 189354b8e9 Remove release enumeration from releases page
This was exceeding the GitHub "list releases" API limit of 10,000 release entries and causing the page rebuild to fail.
2025-04-03 10:14:11 -07:00
Kevin Granade 345c1c0d27 Remove enumeration of releases from experimental releases page
This was exceeding the "list releases" API limit of 10,000 release entries and failing to build the page.
2025-04-03 10:00:33 -07:00
Kevin Granade c98ee8dbef Remove outdated comment about msvc builds 2025-03-17 10:46:45 -07:00
Kevin Granade 6b2ab31824 JSON linter gh-pages file update (#78086)
Co-authored-by: kevingranade <kevingranade@users.noreply.github.com>
2024-12-19 08:43:58 -08:00
Kevin Granade 31ad94a1ee add crosslink to project organization doc 2024-11-23 00:44:18 -08:00
Kevin Granade 33f71fa042 Update org.flathub.VerifiedApps.txt 2024-11-04 18:45:11 -08:00
Kevin Granade 8e35b4dd35 include the .well-known folder
For flathub verification
2024-11-04 18:18:19 -08:00
Kevin Granade 47de02a172 Create org.flathub.VerifiedApps.txt for app verification 2024-11-04 14:18:01 -08:00
Kevin Granade 256f1a99de JSON linter gh-pages file update (#71354)
Co-authored-by: Maleclypse <Maleclypse@users.noreply.github.com>
2024-03-14 15:18:48 -07:00
Antti Riikonen 1361276e1a Remove mention of lemmy (#72097)
Remove Lemmy mention
2024-03-04 11:03:01 -08:00
Kevin Granade 54a996a989 JSON linter gh-pages file update (#68707)
Co-authored-by: Maleclypse <Maleclypse@users.noreply.github.com>
2023-11-04 14:29:37 -07:00
Zhilkin Serg d13493e7fe Privacy policy update (#69039)
* Privay policy update

* add header

---------

Co-authored-by: I-am-Erk <45136638+I-am-Erk@users.noreply.github.com>
2023-10-31 12:08:03 -07:00
Kevin Granade d1f3bd9938 JSON linter gh-pages file update (#67630)
Co-authored-by: Maleclypse <Maleclypse@users.noreply.github.com>
2023-08-27 18:26:06 -07:00
Dillon Matchett cb164a8236 Added Community Discord To Website (#67428)
* Added Community Discord

* fixed steam link
2023-08-03 23:07:33 -07:00
Dillon Matchett 88a9b6ce7b Updated index removed all developer facing pages (#66475) 2023-06-27 08:12:54 -07:00
Antti Riikonen 97b6d7e4cf Update hhg url (#64549) 2023-05-06 09:53:13 -07:00
taatu cf3250e11b fix broken anchor references (#64814) 2023-04-05 17:51:41 -07:00
I-am-Erk d1cf4fcf61 Create steam_faq.md (#64439)
* Create steam_faq.md

* Update steam_faq.md

* Update steam_faq.md

* Update index.md

* Update index.md

* Update steam_faq.md

Co-authored-by: andrei <68240139+andrei8l@users.noreply.github.com>

* Update steam_faq.md

---------

Co-authored-by: andrei <68240139+andrei8l@users.noreply.github.com>
2023-03-21 13:13:17 -07:00
Antti Riikonen afd99f6ec0 Remove Bountysource and Chezzo links, move hhg up (#64020) 2023-03-06 23:27:49 -08:00
Kevin Granade fcfe75b906 Merge pull request #63703 from John-Candlebury/gh-pages-donationlink
Add my Patreon to the donations page
2023-02-22 10:49:38 -08:00
John Candlebury 17d955042f Add my info to the donations page 2023-02-20 17:40:40 -06:00
NetSysFire 1a72165a2c Hint about other files on the lore page (#60899) 2023-01-12 07:14:46 -08:00
Kevin Granade 834754b3a3 Merge pull request #62080 from irwiss/explain-msvc
Provide hint for msvc build tag on downloads page
2022-12-23 21:01:47 -08:00
Alexey Kim 160bd243a6 Provide hint for msvc build tag 2022-11-04 20:26:18 +02:00
NetSysFire ba6c7353d9 Some typo and grammar fixes (#57880) 2022-07-03 19:03:44 -07:00
Kevin Granade 90c1b7b5c1 Prune the defunct game launcher from the front page 2022-04-03 15:49:14 -07:00
NetSysFire b83267d257 Update IRC stuff (#55439) 2022-03-08 09:52:47 -08:00
I-am-Erk c9915d2b0b Design doc updates (#54074)
* in progress changes to lore docs

* adjust gameplay doc a bit

* touch up background document
2022-01-05 16:42:02 -08:00
I-am-Erk bb38735679 split up the design doc 2022-01-05 10:19:36 -08:00
Kevin Granade 1f2ba5df16 tpyo 2022-01-04 11:32:52 -08:00
Zhilkin Serg 04850d017f Create privacy.md (#52607) 2021-11-02 14:34:22 -07:00
I-am-Erk ac04d717af Update lore-factions.md 2021-10-28 11:26:23 -07:00
I-am-Erk ddbb41e71a Update lore-factions.md 2021-10-28 11:24:32 -07:00
I-am-Erk 856e285427 Update technology.md 2021-10-28 11:14:19 -07:00
I-am-Erk 3d0816a284 Update technology.md 2021-10-28 10:17:53 -07:00
I-am-Erk c1d8ec0cd2 Update design-doc.md 2021-10-28 10:05:29 -07:00
I-am-Erk dc817bf2b9 format fixes 2021-10-28 09:54:49 -07:00
I-am-Erk 9452acb749 Update lore-factions.md 2021-10-28 09:51:05 -07:00
I-am-Erk c850ae3aea Update lore-factions.md 2021-10-28 09:49:13 -07:00
I-am-Erk 7e43f1bfbf Update lore-factions.md 2021-10-28 09:45:56 -07:00
I-am-Erk d0f8c7c6a9 Update lore-factions.md 2021-10-28 09:19:40 -07:00
I-am-Erk 1e3420aa8f Update lore-factions.md 2021-10-28 09:08:13 -07:00
I-am-Erk 62185ef48b Update lore-factions.md 2021-10-28 09:06:25 -07:00
Kevin Granade e851085b9b correcting some misleading phrasing 2021-10-28 08:55:44 -07:00
I-am-Erk 748a5ed5b5 Update design-balance.md 2021-10-27 15:17:26 -07:00
I-am-Erk 4b62a06af9 Update design-balance.md 2021-10-27 15:16:31 -07:00
I-am-Erk f191347e05 Update design-balance.md 2021-10-27 15:10:54 -07:00
I-am-Erk a195028061 Update design-balance.md 2021-10-27 15:01:57 -07:00
I-am-Erk 72ccb94cba Update design-balance.md 2021-10-27 14:47:28 -07:00
I-am-Erk 53541e8e38 Update design-balance.md 2021-10-27 13:54:23 -07:00
I-am-Erk 40d1691b40 Update design-balance.md 2021-10-27 12:31:26 -07:00
I-am-Erk d38c685772 add design-balance
based on kevingranade balance draft, expanded
2021-10-27 12:29:29 -07:00
I-am-Erk b56181e59f Update lore-factions.md 2021-10-27 11:36:51 -07:00
I-am-Erk 8496a93690 Update lore-factions.md 2021-10-27 10:55:37 -07:00
I-am-Erk 3984f0197f Update design-doc.md 2021-10-27 10:30:34 -07:00
I-am-Erk 73827b40c8 Update lore-factions.md 2021-10-27 10:25:55 -07:00
I-am-Erk 42e34087fc Update lore-factions.md 2021-10-26 15:58:42 -07:00
I-am-Erk 7292ac7b92 Update lore-factions.md 2021-10-26 13:09:15 -07:00
I-am-Erk 931236ec82 Update lore-factions.md 2021-10-26 13:03:07 -07:00
I-am-Erk d25a043958 Update lore-factions.md 2021-10-26 13:02:47 -07:00
I-am-Erk 8c2f5c109a add lore-factions.md
Not too much new info here yet.
2021-10-26 12:53:14 -07:00
I-am-Erk f2834c0079 remove factions from design doc main 2021-10-26 12:52:45 -07:00
Kevin Granade 487a686c9a Remove lore note we haven't been following 2021-09-24 10:32:33 -07:00
Alexey Mostovoy 5f8eb8d704 Small tweaks to gh-pages service files (#51469)
* Update .gitignore

Include the directory and file name used to serve the site locally

* Update _config.yml

Deprecated `gems`: `plugins` config key is a replacement for `gems`

* Update .gitignore and sync with master
2021-09-13 15:49:59 -07:00
Alexey Mostovoy 8ee5a039d9 Add showcase image (Ultica tileset) (#51468)
Add showcase image to home page
https://github.com/I-am-Erk/CDDA-Tilesets
2021-09-13 15:49:23 -07:00
I-am-Erk 6f62316525 Update design-doc.md
wip
2021-09-10 12:42:00 -07:00
I-am-Erk e86adb7b4a Update technology.md 2021-09-10 12:41:37 -07:00
casswedson bc139be5ac Fix typos in design-doc.md (#49554)
* fix typos
Co-authored-by: actual-nh <74678550+actual-nh@users.noreply.github.com>
2021-07-06 16:54:59 -07:00
halosammy 89606d54f1 Update lore-background.md (#49553)
Capitalization
2021-07-06 11:21:45 -07:00
Zhilkin Serg afaeab92a6 Just wanna rebuild releases page (#49505) 2021-07-01 08:53:34 -07:00
Kevin Granade e2a81e3626 Enhance distinction between first party and third party resources
Also added HHGTTC, and removed reddit as I no longer consider it productive to send users there.
2021-05-28 11:37:56 -07:00
Kevin Granade 80c519df6b Update IRC channel reference to point to Libera 2021-05-26 12:20:00 -07:00
Zhilkin Serg 85b70b1bef Fix missing line break (#48439)
... and also bring OMG release down
2021-04-08 23:23:26 -07:00
Kevin Granade 10c7b24130 Create CNAME 2021-03-21 15:29:35 -07:00
Kevin Granade 725700952e Delete CNAME 2021-03-21 15:29:26 -07:00
Kevin Granade 386d664d2f Update index.md 2020-11-09 13:41:58 -08:00
Kevin Granade d17b905747 Update code style blurb 2020-10-14 19:38:27 -07:00
Kevin Granade f6d198b4fb Clarify build availablility. 2020-10-14 19:33:47 -07:00
gemsys 5e81da6827 Improve grammar and fix typos in the website 2020-10-15 02:27:53 +00:00
I-am-Erk 8c6b82564a Update technology.md 2020-06-01 12:12:12 -07:00
I-am-Erk dd72f62e06 Update technology.md 2020-06-01 12:02:16 -07:00
I-am-Erk 90dd579372 Update technology.md 2020-06-01 11:54:18 -07:00
I-am-Erk c3c77d79ed Update technology.md 2020-06-01 11:53:33 -07:00
I-am-Erk 128d69039e Update technology.md 2020-06-01 11:41:26 -07:00
I-am-Erk 668ca4d4d5 Update lore-background.md 2020-06-01 11:35:46 -07:00
I-am-Erk 33e7dc1b04 Update lore-background.md 2020-06-01 11:22:44 -07:00
I-am-Erk 856b06a9d7 Update lore-background.md 2020-06-01 11:20:12 -07:00
I-am-Erk 6a95b78584 Update lore-background.md 2020-06-01 10:46:47 -07:00
I-am-Erk b5631470ad Remove CBMs, tighten up timeline, add spoiler. 2020-06-01 10:46:37 -07:00
I-am-Erk 757e29b223 Update technology.md 2020-06-01 10:28:58 -07:00
I-am-Erk 6e17b80cd2 Update technology.md 2020-06-01 10:28:45 -07:00
I-am-Erk d9e8b3bb17 add spoiler alerts. 2020-06-01 10:20:34 -07:00
ZhilkinSerg 3889ef8d11 Update CDDA description on homepage (#40945) 2020-05-31 07:10:42 +00:00
I-am-Erk 9d16ab056b Update technology.md 2020-05-29 10:38:03 -07:00
Kevin Granade 339b665712 Remove dead links
The target pages are unfortunately gone now, so no reason to keep them around.
2020-05-21 14:56:36 -07:00
snipercup 71c2f0acf9 Remove snipercup from donations page 2020-05-21 14:48:55 -07:00
Isaac Freund 6c79e7fb41 Trigger rebuild 2020-05-20 16:18:15 +02:00
Isaac Freund 98220d224f Trigger rebuild to remove 0.C download links 2020-05-08 13:49:52 +02:00
Isaac Freund c57923f1a9 Trigger one more rebuild 2020-04-01 14:51:01 +02:00
Isaac Freund 13beb3e0f4 Trigger rebuild 2020-04-01 14:34:46 +02:00
Isaac Freund c5e612a48b Add script for simple local testing with docker 2020-02-21 06:50:23 +00:00
Isaac Freund 14cd8db985 Create packaging status page on website (#37855)
This information was quite hidden at the bottom of the releases page.
2020-02-09 07:58:18 -08:00
Isaac Freund 194c87c271 Merge pull request #37834 from reinerh/gh-pages
Add Debian/Ubuntu install instructions to releases page
2020-02-09 12:02:43 +01:00
Reiner Herrmann d5478c5d26 Add Debian/Ubuntu install instructions to releases page 2020-02-08 14:46:06 +01:00
I-am-Erk ffd16169a8 Update lore-background.md 2020-01-30 17:33:05 -08:00
I-am-Erk 69321de26f Update lore-background.md 2020-01-30 17:27:10 -08:00
snipercup 2608758799 Explain the difference between tiles and curses on release page (#37433)
* Explain the difference between tiles and curses

* Revert "Explain the difference between tiles and curses"

This reverts commit 6f83dcb738.

* Explain the difference between tiles and curses

* Update releases.md

Co-Authored-By: Alexey Mostovoy <1931904+AMurkin@users.noreply.github.com>

* Update releases.md

Co-authored-by: Alexey Mostovoy <1931904+AMurkin@users.noreply.github.com>
2020-01-29 21:39:04 -08:00
Kevin Granade 1d2f7bff6b Fix a typo 2020-01-23 12:32:44 -08:00
Artem Polishchuk b7eb63e481 Add packaging status to Release page (#36143) 2019-12-16 19:20:18 +00:00
I-am-Erk c9efd9e07d Update design-doc.md 2019-11-29 18:11:15 -08:00
I-am-Erk 2fbb555d1f Add a section on mi-go 2019-11-27 22:06:41 -08:00
I-am-Erk d05bb314c6 Add info about mutations 2019-11-15 18:27:54 -08:00
snipercup a8202034ed Add contributor to donations page (#35317) 2019-11-04 18:25:42 -08:00
Curtis Merrill a072ef1ac8 add Donations tab and add extra return (#35149) 2019-10-29 17:36:52 -07:00
Curtis Merrill c779eaa368 Create initial donations page (#35036) 2019-10-27 12:03:25 -07:00
Kevin Granade e252913a04 Add link to discord server 2019-07-13 12:10:45 -07:00
I-am-Erk a7a4b27974 Update technology.md 2019-07-08 14:31:54 -07:00
I-am-Erk db309cab30 Update technology.md 2019-07-08 14:11:05 -07:00
I-am-Erk 44eb59a505 prosthetics 2019-07-08 14:07:14 -07:00
I-am-Erk dedf57fac0 Update technology.md 2019-07-08 13:44:05 -07:00
I-am-Erk e398f9bafd Comment on dimensions 2019-07-08 13:33:40 -07:00
I-am-Erk 979b06b3d7 Update technology.md 2019-07-08 13:18:52 -07:00
I-am-Erk 764717a692 add links to technology doc that were missed. 2019-07-08 13:16:56 -07:00
Kevin Granade 955ddf5a68 Remove a link to a compromised page 2019-07-07 15:10:40 -07:00
I-am-Erk c11694c8f5 Continue technology.md 2019-05-22 11:38:22 -07:00
I-am-Erk 71c137cb7b Create technology.md 2019-05-22 11:18:00 -07:00
I-am-Erk 236a8eaf2b Alien fuel cells, not alien robots 2019-05-22 09:21:00 -07:00
I-am-Erk 11584605aa More power cell stuff 2019-05-22 08:47:12 -07:00
I-am-Erk 7ba6ddd36c Update lore-background.md 2019-05-22 08:34:23 -07:00
Kevin Granade 1919ec2d1f More mutation notes 2019-05-14 20:18:59 -07:00
Kevin Granade 4e0431a322 Notes about clothes bionics and mutagen 2019-05-14 18:13:18 -07:00
I-am-Erk 32dfe1835c hyperlink 2019-05-14 16:01:17 -07:00
I-am-Erk 39c70d5215 Update design-doc.md 2019-05-14 13:59:59 -07:00
I-am-Erk 53f46d6cbc Expand timeline of Year 0 2019-05-11 22:35:10 -07:00
I-am-Erk cac6b77701 Create a file for the timeline and background info
It's too crowded in the main design doc.
2019-05-11 13:06:46 -07:00
I-am-Erk 10a53e345e Remove timeline from master design doc
It's crowded in there.
2019-05-11 13:06:20 -07:00
Isaac Freund 858cb2c70c Merge pull request #30407 from AMurkin/patch-1
Design Document - minor style change
2019-05-11 12:54:08 +02:00
Alexey Mostovoy 55917f29ee Update design-doc.md 2019-05-11 14:11:39 +04:00
Isaac Freund 8e298bf3c8 Fix build list on experimental page
Trying to display all releases seems to cause issues with only ~15 loading, so make a counter
and only display the most recent 10 releases for which at least one artifact was generated
2019-05-10 11:21:45 +02:00
Isaac Freund 2cd7f3b231 Add experimental builds page
- Edit build descriptions and links on Home and Releases pages
 - Only list experimental builds that were successful (have artifacts)
2019-05-02 15:21:48 -07:00
Isaac Freund df8b9c496b Hide changes page in header
- The changes page currently is blank, as the github-metadat api doesn't seem to give us access
   to the pull requests or commits and I haven't found a way around this yet.
2019-05-02 23:15:38 +02:00
Isaac Freund 26ed97b25e Remove prerelease builds from releases page 2019-05-02 23:09:51 +02:00
Isaac Freund 89b144fe69 Fix typo 2019-05-02 22:53:25 +02:00
Kevin Granade 7a090660f0 Added note about factions. 2019-05-01 21:04:25 -07:00
Kevin Granade 1b864a9a90 Moved overview sections to top 2019-05-01 20:31:45 -07:00
Kevin Granade f302db99fd Added more notes about vehicles 2019-05-01 20:09:19 -07:00
Kevin Granade aa71c25eee Add note about structures 2019-05-01 19:20:52 -07:00
Kevin Granade 8ddb42e3b7 add some notes about scavenging and crafting 2019-05-01 17:45:35 -07:00
Isaac Freund 3d3b660f35 Add download links to release list
- tweak formatting
 - add version tags
2019-04-21 18:53:40 +02:00
Isaac Freund b648d80e52 Merge pull request #29795 from KorGgenT/gh-pages-update
Gh pages update
2019-04-21 18:19:38 +02:00
Isaac Freund aa744bfc9d Use github-metadata api for links and release name 2019-04-21 18:17:24 +02:00
KorGgenT 157c2f3ebc update releases page
before it recommended experimental, which we do not necessarily want to encourage.
2019-04-21 11:20:56 -04:00
KorGgenT 0277830d44 Update .gitignore
add the .gitignore from master to this gitignore
2019-04-21 11:12:33 -04:00
Isaac Freund 4478b07e9c Add GitHub link to header
- correct github reference on contributions page
2019-04-18 02:12:14 +02:00
Isaac Freund 9fbd2684e8 Fix table of contents formatting 2019-04-18 01:35:51 +02:00
Isaac Freund ad69d1bbbe Clean up header
- Hardcode and reword links in header
 - Standardize urls
 - Fix minor formatting erro on contributions page
2019-04-18 01:28:51 +02:00
I-am-Erk c83d72ee59 Add Timeline (incomplete) 2019-04-04 21:34:06 -07:00
Isaac Freund 079f0e3cbc Standardize spelling and fix minor formatting errors 2019-04-05 05:02:26 +02:00
Kevin Granade 6d26f077ca Update header 2019-04-04 18:22:25 -07:00
Kevin Granade 884582f056 Drop the design doc draft 2019-04-04 18:19:20 -07:00
Kevin Granade dc01a8cb0b Added link to Android build. 2019-03-22 06:56:06 +00:00
Kevin Granade 843e548735 update wiki link
Fixes #28848
2019-03-20 21:53:17 -07:00
Kevin Granade 3f8605b480 rebuild pages 2019-03-08 08:00:43 +00:00
Kevin Granade fb5597ecc2 remove adsense stub. 2019-01-01 11:53:22 -06:00
Kevin Granade c0f9e865bd Add addsense resources 2018-12-29 20:49:36 -06:00
Kevin Granade c406d589a4 Revert head.html version to minima 2.0 2018-12-29 20:47:40 -06:00
Kevin Granade 2ca266e1f2 Import head.html from minima to override it 2018-12-29 20:38:32 -06:00
Kevin Granade 0ed563b102 Remove discord link.
Removing due to poor moderation practices.
2018-11-12 11:27:23 -08:00
Kevin Granade 114c25454b De-emphisize the sentence transitioning to releases. 2018-05-24 10:32:31 -07:00
Kevin Granade eedabd57c2 Add download links for latest builds to releases page.
This seems like a point of confusion, and encourages people to seek out 0.C instead of playing the latest experimental, which is a tragedy.
2018-05-24 10:30:43 -07:00
Kevin Granade 07b6f36115 Update links to use https where possible, including migrating urls to discourse site. (#23053) 2018-02-25 11:49:15 -08:00
Leland Clemmons f87bf17412 Move Linux downloads links to 64bit versions
We're not building 32 bit ones anymore
2018-01-31 20:07:47 -08:00
Kevin Granade 877552c3a4 Add FAQ entry for bountysource.
Addresses #22385
2018-01-03 11:58:19 -06:00
Kevin Granade 07fcf7d196 Point forums link at new discourse site. 2017-11-15 13:26:30 -08:00
Kevin Granade dff69f7269 Moved community resources higher on page. 2017-09-28 02:46:15 +00:00
Kevin Granade 9654131119 Create CNAME 2017-09-24 18:03:23 +00:00
Kevin Granade ff4619146e Add changes page. 2017-06-08 06:44:29 +00:00
Miguel Melon Otero 0e366475a3 Corriged typo (#20979) 2017-05-09 11:55:06 -07:00
Kevin Granade b420f16e3c Added link to game launcher. 2017-05-02 10:11:23 -07:00
Kevin Granade 2d50f82c1b Several minor changes to site main page.
Expanded System Requirements section.
Corrected outdated link text.
Added link to issue guidelines page.
2017-05-01 18:02:22 -07:00
Kevin Granade 7e99570f41 Import contribution guide from game source tree. 2017-04-28 06:11:33 +00:00
Kevin Granade 51f537e2fc First draft of GitHub Pages site for Ctaclysm: Dark Days Ahead. 2017-03-22 04:32:21 +00:00
Kevin Granade 6e566bb0dd Remove game content from pages branch. 2017-03-22 04:31:25 +00:00
378 changed files with 1520 additions and 1145458 deletions
+199 -25
View File
@@ -1,42 +1,216 @@
cataclysm
cataclysm-tiles
data/*.template
save/
graveyard/
memorial/
obj/
debug.log
logg.txt
bindist/
cataclysmdda-*
objwin/
version.h
!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
*.exe
*.dll
cata_test
cata_test-tiles
cataclysm
cataclysm-tiles
cataclysm-vcpkg
cataclysmdda-*
chkjson*
debug.log
logg.txt
json_formatter
# Visual Studio files
*.suo
*.sdf
*.pdb
*.code-workspace
*.exp
*.ilk
Release*/
Debug*/
*.opensdf
*.pdb
*.lib
*.sdf
*.suo
*.user
*.vcxproj.filters
.vs/
.vscode/
Debug*/
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
core
tags
._.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
View File
@@ -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
+1
View File
@@ -0,0 +1 @@
1e7d902c-02b7-4619-bf01-fe4b9c0ba8ca
-89
View File
@@ -1,89 +0,0 @@
# WARNING: Only linux is currently supported by this cmake build file.
# This file is used to build cataclysm with CMake.
#
# To use it, install cmake, then:
#
# cd cataclysm
# mkdir build
# cd build
# cmake -G "Unix Makefiles" -DLOCALIZE=ON -DSDL=OFF ..
# make
#
# This will build and install cataclysm into the build directory.
#
# "Unix Makefiles" is a generator, you can get a list of supported generators
# on your system by running "cmake" without any arguments.
#
# -DOPTION_NAME=ON/OFF enables/disables OPTION_NAME
CMAKE_MINIMUM_REQUIRED(VERSION 2.8.8)
PROJECT(CataclysmDDA)
OPTION(LOCALIZE "Toggle gettext localization/translation." ON)
OPTION(SDL "Use SDL curses emulation instead of terminal support." OFF)
OPTION(TILES "Enable tileset support." OFF)
# Note: The CMake documentation says it's better to list the actual source
# files here, as otherwise cmake won't know to rerun when a new file
# is added. However, currently the Makefile also just scans for source
# files, so this approach should be "good enough".
FILE(GLOB CataclysmDDA_SRCS *.cpp)
FILE(GLOB CataclysmDDA_HDRS *.h)
ADD_EXECUTABLE(cataclysm ${CataclysmDDA_SRCS} ${CataclysmDDA_HDRS})
# Custom command that will be executed whenever the "cataclysm" target is built.
# Copy all the relevant game data into the build directory.
ADD_CUSTOM_COMMAND(
TARGET cataclysm PRE_BUILD
COMMAND ${CMAKE_COMMAND} -E copy_directory ${CMAKE_SOURCE_DIR}/data $<TARGET_FILE_DIR:cataclysm>/data
COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_SOURCE_DIR}/LICENSE.txt $<TARGET_FILE_DIR:cataclysm> # Don't forget the license :)
)
IF(MINGW)
add_definitions("-D_WINDOWS -D_MINGW -D_WIN32 -DWIN32 -D__MINGW__")
ENDIF()
IF(LOCALIZE)
add_definitions(-DLOCALIZE)
#TARGET_LINK_LIBRARIES(cataclysm
# intl
#)
ENDIF()
# TODO: windows rc stuff
IF(SDL OR TILES)
# CMake ships with a few helpful include's to find common libraries
# like SDL
Include(FindSDL)
Include(FindSDL_ttf)
Find_Package(SDL REQUIRED)
Find_Package(SDL_ttf REQUIRED)
TARGET_LINK_LIBRARIES(cataclysm ${SDL_LIBRARY} ${SDLTTF_LIBRARY})
IF(TILES)
# Install GFX directory
ADD_CUSTOM_COMMAND(
TARGET cataclysm PRE_BUILD
COMMAND ${CMAKE_COMMAND} -E copy_directory ${CMAKE_SOURCE_DIR}/gfx $<TARGET_FILE_DIR:cataclysm>/gfx
)
Include(FindSDL_image)
TARGET_LINK_LIBRARIES(cataclysm ${SDLIMAGE_LIBRARY})
ADD_DEFINITIONS(-DSDLTILES -DTILES)
ELSE()
ADD_DEFINITIONS(-DTILES)
ENDIF()
ELSEIF(MSVC OR MINGW)
# On windows our default isn't curses, but rather GDI
TARGET_LINK_LIBRARIES(cataclysm gdi32 intl iconv winmm)
add_definitions(-Wl,-stack,12000000,-subsystem,windows)
ELSE()
TARGET_LINK_LIBRARIES(cataclysm curses)
ENDIF()
+1
View File
@@ -0,0 +1 @@
cataclysmdda.org
-84
View File
@@ -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 glib
```
### 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-
```
-83
View File
@@ -1,83 +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.
### SDL
SDL, SDL\_image, and SDL\_ttf are needed for the tiles build.
[**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_image/)
http://www.libsdl.org/projects/SDL_image/release/SDL_image-1.2.12.dmg
[**SDL\_ttf 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`, `SDL_image.framework`, and `SDL_ttf.framework`
to `/Library/Frameworks` or `/Users/name/Library/Frameworks`.
Alternately, shared libraries (libsdl, libsdl\_image, libsdl\_ttf) can be used
instead of frameworks. Install with a package manager (Fink, MacPorts,
Homebrew, pkgsrc) or build and install from source.
### ncurses, gettext
ncurses and gettext are needed for localization.
Install with a package manager, or build from source and install.
* ncurses needs wide character support enabled.
## Build
From the Cataclysm-DDA source folder:
The easiest way to try it out is the console version without localization:
$ make NATIVE=osx LOCALIZED=0 OSX_MIN=10.6
For localization support and/or to use libsdl (not frameworks):
$ export CXXFLAGS="-I/path/to/include" LDFLAGS="-L/path/to/lib"
This adds paths to find shared libraries outside of /usr and /usr/local.
Multiple `-I/...` or `-L/...` paths can be specified.
### Example builds:
Build a release version with SDL graphical tiles:
$ make FRAMEWORK=1 NATIVE=osx OSX_MIN=10.6 RELEASE=1 TILES=1 LOCALIZE=0
Build a debug version with SDL ASCII:
$ make FRAMEWORK=1 NATIVE=osx OSX_MIN=10.6 SDL=1 LOCALIZE=0
## Run
$ ./cataclysm
or
$ ./cataclysm-tiles
### Make Options
`FRAMEWORK=1` use frameworks; omit to use libsdl, libsdl\_image, libsdl\_ttf.
`LOCALIZED=0` disable localization; enabled by default (requires gettext and ncurses with wide character support).
`NATIVE=osx` build for OS X.
`OSX_MIN=version` set `-mmacosx-version-min=` (for OS X > 10.5 set it to 10.6 or higher); omit for 10.5.
`RELEASE=1` build an optimized 'release' version.
`SDL=1` build the SDL version with ASCII characters.
`TILES=1` build the SDL version with graphical tiles.
-197
View File
@@ -1,197 +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=1tbs --indent=spaces=4 --align-pointer=name --max-code-length=100 --break-after-logical --indent-classes --indent-switches --indent-preprocessor --indent-col1-comments --min-conditional-indent=0 --pad-oper --add-brackets --convert-tabs
For example, from vi, set marks a and b around the block, then:
:'a,'b ! astyle --style=1tbs --indent-spaces=4 --align-pointer=name --max-code-length=100 --break-after-logical --indent-classes --indent-switches --indent-preprocessor --indent-col1-comments --min-conditional-indent=0 --pad-oper --add-brackets --convert-tabs
## Doxygen Comments
Extensive documentation of classes and class members will make the code more readable to new contributors. New doxygen comments for existing classes are a welcomed contribution.
Use the following template for commenting classes:
```c++
/**
* Brief description
*
* Lengthy description with many words. (optional)
*/
class foo {
```
Use the following template for commenting functions:
```c++
/**
* Brief description
*
* Lengthy description with many words. (optional)
* @param param1 Description of param1 (optional)
* @return Description of return (optional)
*/
int foo(int param1);
```
Use the following template for commenting member variables:
```c++
/** Brief description **/
int foo;
```
Helpful pages:
http://www.stack.nl/~dimitri/doxygen/manual/commands.html
http://www.stack.nl/~dimitri/doxygen/manual/markdown.html#markdown_std
http://www.stack.nl/~dimitri/doxygen/manual/faq.html
### Guidelines for adding documentation
* Doxygen comments should describe behavior towards the outside, not implementation, but since many classes in Cataclysm are intertwined, it's often necessary to describe implementation.
* Describe things that aren't obvious to newcomers just from the name.
* Don't describe redundantly, `/** Map **/; map* map;` is not a helpful comment.
* When documenting X, describe how X interacts with other components, not just what X itself does.
### Building the documentation for viewing it locally
* Install doxygen
* `doxygen doxygen_doc/doxygen_conf.txt `
* `firefox doxygen_doc/html/index.html` (replace firefox with your browser of choice)
## 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.
## Pull Request Notes
* Mark pull requests that are still being worked on with [WIP] at the end of the title
* When a pull request is ready to be reviewed remove the [WIP]
* Mark pull requests that need commenting/testing by others with [CR]
## 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
-418
View File
@@ -1,418 +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" />
<Add option="-O2" />
<Add option="-DRELEASE=1" />
</Compiler>
</Target>
<Target title="Release - Localized">
<Option output="Cataclysm" prefix_auto="1" extension_auto="1" />
<Option object_output="obj\Release\" />
<Option type="0" />
<Option compiler="gcc" />
<Compiler>
<Add option="-Os" />
<Add option="-O2" />
<Add option="-DLOCALIZE" />
<Add option="-DRELEASE=1" />
</Compiler>
<Linker>
<Add library="intl" />
<Add library="iconv" />
</Linker>
</Target>
<Target title="Release -SDL">
<Option output="Cataclysm" prefix_auto="1" extension_auto="1" />
<Option object_output="obj\Release\" />
<Option type="0" />
<Option compiler="gcc" />
<Compiler>
<Add option="-Os" />
<Add option="-O2" />
<Add option="-DTILES" />
<Add option="-DRELEASE=1" />
<Add directory="WinDepend\SDLttf\SDL_ttf-2.0.11\include" />
<Add directory="WinDepend\SDL-1.2.15\include\SDL" />
<Add directory="WinDepend\SDLImg_binVC\SDL_image-1.2.12\include" />
</Compiler>
<Linker>
<Add library="libSDL.dll" />
<Add library="SDL_ttf" />
<Add library="WinDepend\SDLttf\SDL_ttf-2.0.11\lib\x86\SDL_ttf.lib" />
<Add library="WinDepend\SDL-1.2.15\lib\libSDL.dll.a" />
<Add library="WinDepend\SDL-1.2.15\lib\libSDLmain.a" />
<Add library="WinDepend\SDLImg_binVC\SDL_image-1.2.12\lib\x86\SDL_image.lib" />
<Add directory="WinDepend\SDL-1.2.15\lib" />
<Add directory="WinDepend\SDLttf\SDL_ttf-2.0.11\lib\x86" />
<Add directory="WinDepend\libiconv\lib" />
<Add directory="WinDepend\SDLImg_binVC\SDL_image-1.2.12\lib\x86" />
</Linker>
</Target>
<Target title="Release -SDL -Localized">
<Option output="Cataclysm" prefix_auto="1" extension_auto="1" />
<Option object_output="obj\Release\" />
<Option type="0" />
<Option compiler="gcc" />
<Compiler>
<Add option="-Os" />
<Add option="-O2" />
<Add option="-DLOCALIZE" />
<Add option="-DTILES" />
<Add option="-DSDLTILES" />
<Add option="-DRELEASE=1" />
<Add directory="WinDepend\SDLttf\SDL_ttf-2.0.11\include" />
<Add directory="WinDepend\SDL-1.2.15\include\SDL" />
<Add directory="WinDepend\SDLImg_binVC\SDL_image-1.2.12\include" />
</Compiler>
<Linker>
<Add library="intl" />
<Add library="iconv" />
<Add library="WinDepend\SDLttf\SDL_ttf-2.0.11\lib\x86\SDL_ttf.lib" />
<Add library="WinDepend\SDL-1.2.15\lib\libSDL.dll.a" />
<Add library="WinDepend\SDL-1.2.15\lib\libSDLmain.a" />
<Add library="WinDepend\SDLImg_binVC\SDL_image-1.2.12\lib\x86\SDL_image.lib" />
<Add directory="WinDepend\SDL-1.2.15\lib" />
<Add directory="WinDepend\SDLttf\SDL_ttf-2.0.11\lib\x86" />
<Add directory="WinDepend\libiconv\lib" />
<Add directory="WinDepend\SDLImg_binVC\SDL_image-1.2.12\lib\x86" />
</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" />
</Linker>
</Target>
<Target title="Debug - Localized">
<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" />
<Add option="-DLOCALIZE" />
</Compiler>
<Linker>
<Add option="-pg -lgmon" />
<Add library="intl" />
<Add library="iconv" />
</Linker>
</Target>
<Target title="Release - Tile Support">
<Option output="Cataclysm-Tiles" prefix_auto="1" extension_auto="1" />
<Option object_output="obj\TilesRelease\" />
<Option type="0" />
<Option compiler="gcc" />
<Compiler>
<Add option="-Os" />
<Add option="-O2" />
<Add option="-pg" />
<Add option="-DSDLTILES" />
<Add option="-DTILES" />
<Add directory="3rdparty/include/SDL" />
</Compiler>
<Linker>
<Add option="-pg -lgmon" />
<Add library="3rdparty\lib\libSDL.dll.a" />
<Add library="3rdparty\lib\libSDLmain.a" />
<Add library="3rdparty\lib\x86\SDL_image.lib" />
<Add library="3rdparty\lib\x86\SDL_ttf.lib" />
<Add directory="3rdparty\lib" />
<Add directory="3rdparty\lib\x86" />
</Linker>
</Target>
<Target title="Debug - Tile Support">
<Option output="Cataclysm-Tiles" prefix_auto="1" extension_auto="1" />
<Option object_output="obj\TilesRelease\" />
<Option type="0" />
<Option compiler="gcc" />
<Compiler>
<Add option="-Os" />
<Add option="-O2" />
<Add option="-pg" />
<Add option="-g" />
<Add option="-DSDLTILES" />
<Add option="-DTILES" />
<Add directory="3rdparty/include/SDL" />
</Compiler>
<Linker>
<Add option="-pg -lgmon" />
<Add library="3rdparty\lib\libSDL.dll.a" />
<Add library="3rdparty\lib\libSDLmain.a" />
<Add library="3rdparty\lib\x86\SDL_image.lib" />
<Add library="3rdparty\lib\x86\SDL_ttf.lib" />
<Add directory="3rdparty\lib" />
<Add directory="3rdparty\lib\x86" />
</Linker>
</Target>
</Build>
<Compiler>
<Add option="-Wextra" />
<Add option="-Wall" />
<Add option="-Wno-switch -Wno-sign-compare -Wno-missing-braces -Wno-unused-parameter" />
</Compiler>
<Linker>
<Add option="-Wl,-stack,12000000,-subsystem,windows" />
<Add option="-static" />
<Add library="gdi32" />
<Add library="winmm" />
</Linker>
<Unit filename="SDLMain.h" />
<Unit filename="action.cpp" />
<Unit filename="action.h" />
<Unit filename="addiction.cpp" />
<Unit filename="addiction.h" />
<Unit filename="advanced_inv.cpp" />
<Unit filename="advanced_inv.h" />
<Unit filename="animation_curses.cpp" />
<Unit filename="animation_tiles.cpp" />
<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="cata_tiles.cpp" />
<Unit filename="cata_tiles.h" />
<Unit filename="catacharset.cpp" />
<Unit filename="catacharset.h" />
<Unit filename="catacurse.h" />
<Unit filename="char_validity_check.cpp" />
<Unit filename="char_validity_check.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="coordinates.h" />
<Unit filename="crafting.cpp" />
<Unit filename="crafting.h" />
<Unit filename="cursesdef.h" />
<Unit filename="cursesport.cpp" />
<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="editmap.cpp" />
<Unit filename="editmap.h" />
<Unit filename="enums.h" />
<Unit filename="event.cpp" />
<Unit filename="event.h" />
<Unit filename="faction.cpp" />
<Unit filename="faction.h" />
<Unit filename="field.cpp" />
<Unit filename="field.h" />
<Unit filename="file_finder.cpp" />
<Unit filename="file_finder.h" />
<Unit filename="game.cpp" />
<Unit filename="game.h" />
<Unit filename="gamemode.cpp" />
<Unit filename="gamemode.h" />
<Unit filename="gamesave.cpp" />
<Unit filename="get_version.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="init.cpp" />
<Unit filename="init.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="iuse_software.cpp" />
<Unit filename="iuse_software.h" />
<Unit filename="iuse_software_kitten.cpp" />
<Unit filename="iuse_software_kitten.h" />
<Unit filename="iuse_software_snake.cpp" />
<Unit filename="iuse_software_snake.h" />
<Unit filename="iuse_software_sokoban.cpp" />
<Unit filename="iuse_software_sokoban.h" />
<Unit filename="json.cpp" />
<Unit filename="json.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="martialarts.cpp" />
<Unit filename="martialarts.h" />
<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="mod_factory.h" />
<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="monitemsdef.cpp" />
<Unit filename="monmove.cpp" />
<Unit filename="monster.cpp" />
<Unit filename="monster.h" />
<Unit filename="monstergenerator.cpp" />
<Unit filename="monstergenerator.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="picofunc.cpp" />
<Unit filename="picofunc.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="savegame_json.cpp" />
<Unit filename="savegame_legacy.cpp" />
<Unit filename="sdltiles.cpp" />
<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="tile_id_data.h" />
<Unit filename="tileray.cpp" />
<Unit filename="tileray.h" />
<Unit filename="translations.cpp" />
<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="uistate.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="wcwidth.c">
<Option compilerVar="CC" />
</Unit>
<Unit filename="wdirent.h" />
<Unit filename="weather.cpp" />
<Unit filename="weather.h" />
<Unit filename="weather_data.cpp" />
<Unit filename="wincurse.cpp" />
<Unit filename="wish.cpp" />
<Unit filename="worldfactory.cpp" />
<Unit filename="worldfactory.h" />
<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>
+28
View File
@@ -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
View File
@@ -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.
-348
View File
@@ -1,348 +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
# Disable gettext, on some platforms the dependencies are hard to wrangle.
# make LOCALIZE=0
# Compile localization files for specified languages
# make LANGUAGES="<lang_id_1>[ lang_id_2][ ...]"
# (for example: make LANGUAGES="zh_CN zh_TW" for Chinese)
# comment these to toggle them as one sees fit.
# 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 = -Werror -Wall -Wextra -Wno-switch -Wno-sign-compare -Wno-missing-braces -Wno-unused-parameter -Wno-narrowing -Wno-maybe-uninitialized
# 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.9
TARGET = cataclysm
TILESTARGET = cataclysm-tiles
W32TILESTARGET = cataclysm-tiles.exe
W32TARGET = cataclysm.exe
BINDIST_DIR = bindist
BUILD_DIR = $(CURDIR)
LOCALIZE = 1
# 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++
RC = $(CROSS)windres
# enable optimizations. slow to build
ifdef RELEASE
OTHERS += -O3
DEBUG =
endif
ifdef CLANG
CXX = $(CROSS)clang++
LD = $(CROSS)clang++
OTHERS = --std=c++98 --analyze -fixit
WARNINGS = -Wall -Wextra -Wno-switch -Wno-sign-compare -Wno-missing-braces -Wno-unused-parameter -Wno-type-limits -Wno-narrowing
endif
CXXFLAGS += $(WARNINGS) $(DEBUG) $(PROFILE) $(OTHERS) -MMD
BINDIST_EXTRAS = README.md 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)
WARNINGS = -Werror -Wall -Wextra -Wno-switch -Wno-sign-compare -Wno-missing-braces -Wno-unused-parameter
ifeq ($(LOCALIZE), 1)
LDFLAGS += -lintl
endif
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 -lwinmm
ifeq ($(LOCALIZE), 1)
LDFLAGS += -lintl -liconv
endif
W32FLAGS += -Wl,-stack,12000000,-subsystem,windows
RFLAGS = -J rc -O coff
endif
ifdef TILES
SDL = 1
BINDIST_EXTRAS += gfx
endif
ifdef SDL
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_image.framework/Headers \
-I$(HOME)/Library/Frameworks/SDL_image.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_image -framework SDL_ttf -framework Cocoa
CXXFLAGS += $(OSX_INC)
else # libsdl build
DEFINES += -DOSX_SDL_LIBS
# handle #include "SDL/SDL.h" and "SDL.h"
CXXFLAGS += $(shell sdl-config --cflags) \
-I$(shell dirname $(shell sdl-config --cflags | sed 's/-I\(.[^ ]*\) .*/\1/'))
LDFLAGS += $(shell sdl-config --libs) -lSDL_ttf
ifdef TILES
LDFLAGS += -lSDL_image
endif
endif
else # not osx
LDFLAGS += -lSDL -lSDL_ttf -lfreetype -lz
ifdef TILES
LDFLAGS += -lSDL_image
endif
endif
ifdef TILES
DEFINES += -DSDLTILES
endif
DEFINES += -DTILES
ifeq ($(TARGETSYSTEM),WINDOWS)
LDFLAGS += -lgdi32 -ldxguid -lwinmm -ljpeg -lpng
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)
ifeq ($(LOCALIZE),1)
ifeq ($(shell sh -c 'uname -o 2>/dev/null || echo not'),Darwin)
LDFLAGS += -lncurses
else
ifeq ($(NATIVE), osx)
LDFLAGS += -lncurses
else
LDFLAGS += -lncursesw
endif
endif
# 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
else
LDFLAGS += -lncurses
endif
endif
endif
ifeq ($(LOCALIZE),1)
DEFINES += -DLOCALIZE
endif
ifeq ($(TARGETSYSTEM),LINUX)
BINDIST_EXTRAS += cataclysm-launcher
endif
SOURCES = $(wildcard *.cpp)
HEADERS = $(wildcard *.h)
_OBJS = $(SOURCES:.cpp=.o)
ifeq ($(TARGETSYSTEM),WINDOWS)
RSRC = $(wildcard *.rc)
_OBJS += $(RSRC:.rc=.o)
endif
OBJS = $(patsubst %,$(ODIR)/%,$(_OBJS))
ifdef SDL
ifeq ($(NATIVE),osx)
OBJS += $(ODIR)/SDLMain.o
endif
endif
ifdef LANGUAGES
L10N = localization
BINDIST_EXTRAS += lang/mo
endif
all: version $(TARGET) $(L10N)
@
$(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)/%.o: %.rc
$(RC) $(RFLAGS) $< -o $@
$(ODIR)/SDLMain.o: SDLMain.m
$(CC) -c $(OSX_INC) $< -o $@
version.cpp: version
localization:
lang/compile_mo.sh $(LANGUAGES)
clean: clean-tests
rm -rf $(TARGET) $(TILESTARGET) $(W32TILESTARGET) $(W32TARGET)
rm -rf $(ODIR) $(W32ODIR) $(W32ODIRTILES)
rm -rf $(BINDIST) $(W32BINDIST) $(BINDIST_DIR)
rm -f version.h
distclean:
rm -rf $(BINDIST_DIR)
rm -rf save
rm -rf lang/mo
rm -f data/options.txt
rm -f data/keymap.txt
rm -f data/auto_pickup.txt
rm -f data/fontlist.txt
bindist: $(BINDIST)
$(BINDIST): distclean $(TARGET) $(L10N) $(BINDIST_EXTRAS)
mkdir -p $(BINDIST_DIR)
cp -R --parents $(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}
-39
View File
@@ -1,39 +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, persistent, 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
Visit [our website](http://en.cataclysmdda.com/) for download links to all stable and experimental releases
The source can either be downloaded as [an archive](https://github.com/CleverRaven/Cataclysm-DDA/archive/master.zip), or you can clone it from [our GitHub repository](https://github.com/CleverRaven/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 `kevin.granade@gmail.com`.
-35
View File
@@ -1,35 +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, persistent,
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
Visit http://en.cataclysmdda.com/ for download links to all stable and experimental releases
Compile
The latest instructions on how to compile can be found on our wiki at http://www.wiki.cataclysmdda.com/index.php?title=How_to_compile.
Contribute
Please see CONTRIBUTING.md for details.
Contributing is much easier with an advanced text editor, for windows a good program is Notepad++, available at http://notepad-plus-plus.org/.
Frequently Asked Questions
1)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.
2)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.
3)How can I start a new world?
Reset on the main menu will generate a fresh world for you.
4)I've found a bug / I would like to make a suggestion. What should I do?
Please submit an issue on our GitHub page at https://github.com/CleverRaven/Cataclysm-DDA/issues/.
If you're not able to, send an email to `kevin.granade@gmail.com`.
-16
View File
@@ -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_ */
-385
View File
@@ -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;
}
-36
View File
@@ -1,36 +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>
Robert Sørlie (1942rob) <1942rob@gmail.com>
Angela Graves <Rivet.the.Zombie@gmail.com>
Ian Strachan <ian_e_strachan@hotmail.com>
Greg McNew <gmcnew@gmail.com>
NaturesWitness <natureswitness@gmail.com>
CodeHero <codehero@nerdpol.ch>
+35
View File
@@ -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
+18
View File
@@ -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>
+31
View File
@@ -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>
-760
View File
@@ -1,760 +0,0 @@
#include "action.h"
#include "keypress.h"
#include "output.h"
#include <istream>
#include <sstream>
#include <fstream>
std::map<char, action_id> keymap;
std::map<char, action_id> default_keymap;
void parse_keymap(std::istream &keymap_txt, std::map<char, action_id> &kmap);
void 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;
for (d_it = default_keymap.begin(); d_it != default_keymap.end(); ++d_it) {
bool 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 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> 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 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_GRAB:
return "grab";
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";
default:
return "unkown";
}
}
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_GRAB:
return _("Grab a nearby vehicle");
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");
default:
return "Someone forgot to name an action.";
}
}
void get_direction(int &x, int &y, char ch)
{
x = 0;
y = 0;
action_id act;
if (keymap.find(ch) == keymap.end()) {
act = ACTION_NULL;
} else {
act = keymap[ch];
}
switch (act) {
case ACTION_MOVE_NW:
x = -1;
y = -1;
return;
case ACTION_MOVE_NE:
x = 1;
y = -1;
return;
case ACTION_MOVE_W:
x = -1;
return;
case ACTION_MOVE_S:
y = 1;
return;
case ACTION_MOVE_N:
y = -1;
return;
case ACTION_MOVE_E:
x = 1;
return;
case ACTION_MOVE_SW:
x = -1;
y = 1;
return;
case ACTION_MOVE_SE:
x = 1;
y = 1;
return;
case ACTION_PAUSE:
case ACTION_PICKUP:
x = 0;
y = 0;
return;
default:
x = -2;
y = -2;
}
}
std::string default_keymap_txt()
{
return "\
# This is the keymapping for Cataclysm.\n\
# You can start a line with # to make it a comment--it will be ignored.\n\
# Blank lines are ignored too.\n\
# Extra whitespace, including tab, is ignored, so format things how you like.\n\
# If you wish to restore defaults, simply remove this file.\n\
\n\
# The format for each line is an action identifier, followed by several\n\
# keys. Any action may have an unlimited number of keys bound to it.\n\
# If you bind the same key to multiple actions, the second and subsequent\n\
# bindings will be ignored--and you'll get a warning when the game starts.\n\
# Keys are case-sensitive, of course; c and C are different.\n\
\n\
# WARNING: If you skip an action identifier, there will be no key bound to\n\
# that action! You will be NOT be warned of this when the game starts.\n\
# If you're going to mess with stuff, maybe you should back this file up?\n\
\n\
# It is okay to split commands across lines.\n\
# pause . 5 is equivalent to:\n\
# pause .\n\
# pause 5\n\
\n\
# Note that movement keybindings ONLY apply to movement (for now).\n\
# That is, binding w to move_n will let you use w to move north, but you\n\
# cannot use w to smash north, examine to the north, etc.\n\
# For now, you must use vikeys, the numpad, or arrow keys for those actions.\n\
# This is planned to change in the future.\n\
\n\
# Finally, there is no support for special keys, like spacebar, Home, and\n\
# so on. This is not a planned feature, but if it's important to you, please\n\
# let me know.\n\
\n\
# MOVEMENT:\n\
pause . 5\n\
move_n k 8\n\
move_ne u 9\n\
move_e l 6\n\
move_se n 3\n\
move_s j 2\n\
move_sw b 1\n\
move_w h 4\n\
move_nw y 7\n\
move_down >\n\
move_up <\n\
\n\
# MOVEMENT:\n\
center :\n\
shift_n K\n\
shift_e L\n\
shift_s J\n\
shift_w H\n\
\n\
# ENVIRONMENT INTERACTION\n\
open o\n\
close c\n\
smash s\n\
examine e\n\
advinv /\n\
pickup , g\n\
grab G\n\
butcher B\n\
chat C\n\
look ; x\n\
peek X\n\
listitems V\n\
\n\
# INVENTORY & QUASI-INVENTORY INTERACTION\n\
inventory i\n\
compare I\n\
organize =\n\
apply a\n\
apply_wielded A\n\
wear W\n\
take_off T\n\
eat E\n\
read R\n\
wield w\n\
pick_style _\n\
reload r\n\
unload U\n\
throw t\n\
fire f\n\
#fire_burst F\n\
select_fire_mode F\n\
drop d\n\
drop_adj D\n\
bionics p\n\
sort_armor +\n\
\n\
# LONG TERM & SPECIAL ACTIONS\n\
wait |\n\
craft &\n\
recraft -\n\
construct *\n\
disassemble (\n\
sleep $\n\
control_vehicle ^\n\
safemode !\n\
autosafe \"\n\
ignore_enemy '\n\
save S\n\
quit Q\n\
\n\
# INFO SCREENS\n\
player_data @\n\
map m\n\
missions M\n\
factions #\n\
kills )\n\
morale v\n\
messages P\n\
help ?\n\
\n\
# DEBUG FUNCTIONS\n\
debug_mode ~\n\
# debug Z\n\
# debug_scent -\n\
";
}
// (Press X (or Y)|Try) to Z
std::string press_x(action_id act)
{
return press_x(act,_("Press "),"",_("Try"));
}
std::string press_x(action_id act, std::string key_bound, std::string key_unbound)
{
return press_x(act,key_bound,"",key_unbound);
}
std::string press_x(action_id act, std::string key_bound_pre, std::string key_bound_suf, std::string key_unbound)
{
std::vector<char> keys = keys_bound_to( action_id(act) );
if (keys.empty()) {
return key_unbound;
} else {
std::string keyed = key_bound_pre.append("");
for (int j = 0; j < keys.size(); j++) {
if (keys[j] == '\'' || keys[j] == '"'){
if (j < keys.size() - 1) {
keyed += keys[j]; keyed += _(" or ");
} else {
keyed += keys[j];
}
} else {
if (j < keys.size() - 1) {
keyed += "'"; keyed += keys[j]; keyed += _("' or ");
} else {
if (keys[j] == '_') {
keyed += _("'_' (underscore)");
} else {
keyed += "'"; keyed += keys[j]; keyed += "'";
}
}
}
}
return keyed.append(key_bound_suf.c_str());
}
}
// ('Z'ing|zing) (\(X( or Y))\))
std::string press_x(action_id act, std::string act_desc)
{
bool key_after=false;
bool z_ing=false;
char zing = tolower(act_desc.at(0));
std::vector<char> keys = keys_bound_to( action_id(act) );
if (keys.empty()) {
return act_desc;
} else {
std::string keyed = ("");
for (int j = 0; j < keys.size(); j++) {
if (tolower(keys[j])==zing) {
if (z_ing) {
keyed.replace(1,1,1,act_desc.at(0));
if (key_after) {
keyed += _(" or '");
keyed += (islower(act_desc.at(0)) ? toupper(act_desc.at(0))
: tolower(act_desc.at(0)));
keyed += "'";
} else {
keyed +=" ('";
keyed += (islower(act_desc.at(0)) ? toupper(act_desc.at(0))
: tolower(act_desc.at(0)));
keyed += "'";
key_after=true;
}
} else {
std::string uhh="";
if (keys[j] == '\'' || keys[j] == '"'){
uhh+="("; uhh+=keys[j]; uhh+=")";
} else {
uhh+="'"; uhh+=keys[j]; uhh+="'";
}
if(act_desc.length()>1) {
uhh+=act_desc.substr(1);
}
if (keys[j] == '_') {
uhh += _(" (underscore)");
}
keyed.insert(0,uhh);
z_ing=true;
}
} else {
if (key_after) {
if (keys[j] == '\'' || keys[j] == '"'){
keyed += _(" or "); keyed += keys[j];
} else if (keys[j] == '_') {
keyed += _("or '_' (underscore)");
} else {
keyed+=_(" or '"); keyed+=keys[j]; keyed+="'";
}
} else {
if (keys[j] == '\'' || keys[j] == '"'){
keyed += " ("; keyed += keys[j];
} else if (keys[j] == '_') {
keyed += _(" ('_' (underscore)");
} else {
keyed += " ('"; keyed+=keys[j]; keyed+="'";
}
key_after=true;
}
}
}
if (!z_ing) {
keyed.insert(0,act_desc);
}
if (key_after) {
keyed+=")";
}
return keyed;
}
}
-124
View File
@@ -1,124 +0,0 @@
#ifndef _ACTION_H_
#define _ACTION_H_
#include <vector>
#include <map>
#include <string>
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_GRAB,
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
};
extern std::map<char, action_id> keymap;
// Load keybindings from disk
void load_keyboard_settings();
std::string default_keymap_txt();
// Save keybindings to disk
void save_keymap();
// All keys bound to act
std::vector<char> keys_bound_to(action_id act);
// Delete all keys bound to act
void clear_bindings(action_id act);
action_id look_up_action(std::string ident);
std::string action_ident(action_id);
std::string action_name(action_id);
// Use the keymap to figure out direction properly
void get_direction(int &x, int &y, char ch);
// (Press X (or Y)|Try) to Z
std::string press_x(action_id act);
std::string press_x(action_id act, std::string key_bound,
std::string key_unbound);
std::string press_x(action_id act, std::string key_bound_pre,
std::string key_bound_suf, std::string key_unbound);
// ('Z'ing|zing) (X( or Y)))
std::string press_x(action_id act, std::string act_desc);
#endif
-264
View File
@@ -1,264 +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(rng(0, 6) < in ? _("You need a cigarette.") : _("You could use a cigarette."));
g->u.add_morale(MORALE_CRAVING_NICOTINE, -15, -50);
if (one_in(800 - 50 * in)) {
g->u.fatigue++;
}
if (g->u.stim > -50 && 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->u.add_morale(MORALE_CRAVING_CAFFEINE, -5, -30);
if (g->u.stim > -150 && 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 > -100) {
g->u.health--;
}
if (one_in(20) && rng(0, 20) < in) {
g->add_msg(_("You could use a drink."));
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->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 > -100) {
g->u.health--;
}
if (one_in(20) && dice(2, 20) < in) {
g->add_msg(_("Your hands start shaking... you need some painkillers."));
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);
} 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 > -100) {
g->u.health--;
}
if (dice(2, 100) < in) {
g->add_msg(_("You feel depressed. Speed would help."));
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->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->u.add_morale(MORALE_CRAVING_COCAINE, -20, -250);
}
if (dice(2, 80) <= in) {
g->add_msg(_("You feel like you need a bump."));
g->u.add_morale(MORALE_CRAVING_COCAINE, -20, -250);
if (g->u.stim > -150) {
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->u.add_morale(MORALE_CRAVING_CRACK, -80, -250);
}
if (dice(2, 80) <= in) {
g->add_msg(_("You're shivering, you need some crack."));
g->u.add_morale(MORALE_CRAVING_CRACK, -80, -250);
if (g->u.stim > -150) {
g->u.stim -= 3;
}
}
break;
}
}
/**
* Returns the name of an addiction. It should be able to finish the sentence
* "Became addicted to ______".
*/
std::string addiction_type_name(add_type cur)
{
switch(cur) {
case ADD_CIG: return _("nicotine");
case ADD_CAFFEINE: return _("caffeine");
case ADD_ALCOHOL: return _("alcohol");
case ADD_SLEEP: return _("sleeping pills");
case ADD_PKILLER: return _("opiates");
case ADD_SPEED: return _("amphetamine");
case ADD_COKE: return _("cocaine");
case ADD_CRACK: return _("crack cocaine");
default: return "bugs in addiction.cpp";
}
}
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)
{
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:
{
return string_format(_(
"Strength - %d; Perception - 1; Dexterity - 1;\n"
"Depression and physical pain to some degree. Frequent cravings. Vomiting."), strpen);
}
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 "";
}
}
-23
View File
@@ -1,23 +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_type_name(add_type cur);
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
-1307
View File
File diff suppressed because it is too large Load Diff
-124
View File
@@ -1,124 +0,0 @@
#ifndef _ADVANCED_INV_H_
#define _ADVANCED_INV_H_
#include "output.h"
#include "game.h"
#include <string>
struct advanced_inv_area {
int id;
int hscreenx;
int hscreeny;
int offx;
int offy;
int x;
int y;
std::string name;
std::string shortname;
bool canputitems;
vehicle *veh;
int vstor;
int size;
std::string desc;
int volume, weight;
int max_size, max_volume;
};
// for printing items in environment
struct advanced_inv_listitem {
int idx;
int area;
item *it;
std::string name;
bool autopickup;
int stacks;
int volume;
int weight;
int cat;
};
class advanced_inventory_pane {
public:
int pos;
int area, offx, offy, size, vstor; // quick lookup later
int index, max_page, max_index, page;
std::string area_string;
int sortby;
int issrc;
vehicle *veh;
WINDOW *window;
std::vector<advanced_inv_listitem> items;
int numcats;
std::string filter;
bool recalc;
bool redraw;
std::map<std::string, bool> filtercache;
advanced_inventory_pane() {
offx = 0; offy = 0; size = 0; vstor = -1;
index = 0; max_page = 0; max_index = 0; page = 0;
area_string = _("Initializing...");
sortby = 1; issrc = 0; veh = NULL; window = NULL;
items.clear();
numcats = 0; filter="";
filtercache.clear();
}
};
class advanced_inventory
{
public:
game * g;
player * p;
const int head_height;
const int min_w_height;
const int min_w_width;
const int max_w_width;
const int left;
const int right;
const int isinventory;
const int isall;
bool checkshowmsg;
bool showmsg;
int itemsPerPage;
int w_height;
int w_width;
int headstart;
int colstart;
// itemsPerPage=getmaxy(left_window)-ADVINVOFS;
// todo: awaiting ui::menu // last_tmpdest=-1;
bool exit;// = false;
bool redraw;// = true;
bool recalc;// = true;
int lastCh;// = 0;
int src;// = left; // the active screen , 0 for left , 1 for right.
int dest;// = right;
int max_inv;// = inv_chars.size() - u.worn.size() - ( u.is_armed() ? 1 : 0 );
bool examineScroll;// = false;
bool filter_edit;
advanced_inventory_pane panes[2];
advanced_inv_area squares[11];
advanced_inventory() :
head_height(5),
min_w_height(10),
min_w_width(FULL_SCREEN_WIDTH),
max_w_width(120),
left(0),
right(1),
isinventory(0),
isall(10) {
}
void display(game *gp, player *pp);
void print_items(advanced_inventory_pane &pane, bool active);
void recalc_pane(int i);
void redraw_pane(int i);
void init(game *gp, player *pp);
private:
};
#endif
-142
View File
@@ -1,142 +0,0 @@
#if (!defined SDLTILES)
#include "game.h"
/* Explosion Animation */
void game::draw_explosion(int x, int y, int radius, nc_color col)
{
timespec ts; // Timespec for the animation of the explosion
ts.tv_sec = 0;
ts.tv_nsec = EXPLOSION_SPEED;
const int ypos = POSY + (y - (u.posy + u.view_offset_y));
const int xpos = POSX + (x - (u.posx + u.view_offset_x));
for (int i = 1; i <= radius; i++) {
mvwputch(w_terrain, ypos - i, xpos - i, col, '/');
mvwputch(w_terrain, ypos - i, xpos + i, col,'\\');
mvwputch(w_terrain, ypos + i, xpos - i, col,'\\');
mvwputch(w_terrain, ypos + i, xpos + i, col, '/');
for (int j = 1 - i; j < 0 + i; j++) {
mvwputch(w_terrain, ypos - i, xpos + j, col,'-');
mvwputch(w_terrain, ypos + i, xpos + j, col,'-');
mvwputch(w_terrain, ypos + j, xpos - i, col,'|');
mvwputch(w_terrain, ypos + j, xpos + i, col,'|');
}
wrefresh(w_terrain);
nanosleep(&ts, NULL);
}
}
/* Bullet Animation */
void game::draw_bullet(player &p, int tx, int ty, int i, std::vector<point> trajectory, char bullet, timespec &ts)
{
if (u_see(tx, ty)) {
if (i > 0)
{
m.drawsq(w_terrain, u, trajectory[i-1].x, trajectory[i-1].y, false,
true, u.posx + u.view_offset_x, u.posy + u.view_offset_y);
}
/*
char bullet = '*';
if (is_aflame)
bullet = '#';
*/
mvwputch(w_terrain, POSY + (ty - (u.posy + u.view_offset_y)),
POSX + (tx - (u.posx + u.view_offset_x)), c_red, bullet);
wrefresh(w_terrain);
if (&p == &u)
nanosleep(&ts, NULL);
}
}
/* Monster hit animation */
void game::draw_hit_mon(int x, int y, monster m, bool dead)
{
nc_color cMonColor = m.type->color;
char sMonSym = m.symbol();
hit_animation(POSX + (x - (u.posx + u.view_offset_x)),
POSY + (y - (u.posy + u.view_offset_y)),
red_background(cMonColor), dead?'%':sMonSym);
}
/* Player hit animation */
void game::draw_hit_player(player *p, bool dead)
{
hit_animation(POSX + (p->posx - (u.posx + u.view_offset_x)),
POSY + (p->posy - (u.posy + u.view_offset_y)),
red_background(p->color()), '@');
}
/* Line drawing code, not really an animation but should be separated anyway */
void game::draw_line(const int x, const int y, const point center_point, std::vector<point> ret)
{
if (u_see( x, y))
{
for (int i = 0; i < ret.size(); i++)
{
int mondex = mon_at(ret[i].x, ret[i].y),
npcdex = npc_at(ret[i].x, ret[i].y);
// NPCs and monsters get drawn with inverted colors
if (mondex != -1 && u_see(&(_active_monsters[mondex])))
{
_active_monsters[mondex].draw(w_terrain, center_point.x, center_point.y, true);
}
else if (npcdex != -1)
{
active_npc[npcdex]->draw(w_terrain, center_point.x, center_point.y, true);
}
else
{
m.drawsq(w_terrain, u, ret[i].x, ret[i].y, true,true,center_point.x, center_point.y);
}
}
}
}
void game::draw_line(const int x, const int y, std::vector<point> vPoint)
{
for (int i = 1; i < vPoint.size(); i++)
{
m.drawsq(w_terrain, u, vPoint[i-1].x, vPoint[i-1].y, true, true);
}
mvwputch(w_terrain, POSY + (vPoint[vPoint.size()-1].y - (u.posy + u.view_offset_y)),
POSX + (vPoint[vPoint.size()-1].x - (u.posx + u.view_offset_x)), c_white, 'X');
}
//*/
void game::draw_weather(weather_printable wPrint)
{
for (std::vector<std::pair<int, int> >::iterator weather_iterator = wPrint.vdrops.begin();
weather_iterator != wPrint.vdrops.end();
++weather_iterator)
{
mvwputch(w_terrain, weather_iterator->second, weather_iterator->first, wPrint.colGlyph, wPrint.cGlyph);
}
}
// draws footsteps that have been created by monsters moving about
void game::draw_footsteps()
{
for (int i = 0; i < footsteps.size(); i++) {
if (!u_see(footsteps_source[i]->posx(),footsteps_source[i]->posy())) {
std::vector<point> unseen_points;
for (int j = 0; j < footsteps[i].size(); j++) {
if (!u_see(footsteps[i][j].x,footsteps[i][j].y)) {
unseen_points.push_back(point(footsteps[i][j].x,
footsteps[i][j].y));
}
}
if (unseen_points.size() > 0) {
point selected = unseen_points[ rng(0, unseen_points.size() - 1) ];
mvwputch(w_terrain,
POSY + (selected.y - (u.posy + u.view_offset_y)),
POSX + (selected.x - (u.posx + u.view_offset_x)),
c_yellow, '?');
}
}
}
footsteps.clear();
footsteps_source.clear();
wrefresh(w_terrain);
return;
}
#endif
-254
View File
@@ -1,254 +0,0 @@
#if (defined SDLTILES)
#include "game.h"
#include "debug.h"
#include "cata_tiles.h" // all animation functions will be pushed out to a cata_tiles function in some manner
extern cata_tiles *tilecontext; // obtained from sdltiles.cpp
extern int fontheight;
extern int fontwidth;
/* Tiles version of Explosion Animation */
void game::draw_explosion(int x, int y, int radius, nc_color col)
{
timespec ts; // Timespec for the animation of the explosion
ts.tv_sec = 0;
ts.tv_nsec = EXPLOSION_SPEED;
// added offset values to keep from calculating the same value over and over again.
const int ypos = POSY + (y - (u.posy + u.view_offset_y));
const int xpos = POSX + (x - (u.posx + u.view_offset_x));
for (int i = 1; i <= radius; i++) {
mvwputch(w_terrain, ypos - i, xpos - i, col, '/');
mvwputch(w_terrain, ypos - i, xpos + i, col,'\\');
mvwputch(w_terrain, ypos + i, xpos - i, col,'\\');
mvwputch(w_terrain, ypos + i, xpos + i, col, '/');
for (int j = 1 - i; j < 0 + i; j++) {
mvwputch(w_terrain, ypos - i, xpos + j, col,'-');
mvwputch(w_terrain, ypos + i, xpos + j, col,'-');
mvwputch(w_terrain, ypos + j, xpos - i, col,'|');
mvwputch(w_terrain, ypos + j, xpos + i, col,'|');
}
tilecontext->init_explosion(x, y, i);
//tilecontext->draw_explosion_frame(x, y, radius, offset_x, offset_y);
wrefresh(w_terrain);
nanosleep(&ts, NULL);
}
tilecontext->void_explosion();
}
/* Bullet Animation -- Maybe change this to animate the ammo itself flying through the air?*/
// need to have a version where there is no player defined, possibly. That way shrapnel works as intended
void game::draw_bullet(player &p, int tx, int ty, int i, std::vector<point> trajectory, char bullet_char, timespec &ts)
{
if (u_see(tx, ty)) {
std::string bullet;// = "animation_bullet_normal";
switch(bullet_char)
{
case '*': bullet = "animation_bullet_normal"; break;
case '#': bullet = "animation_bullet_flame"; break;
case '`': bullet = "animation_bullet_shrapnel"; break;
}
mvwputch(w_terrain, POSY + (ty - (u.posy + u.view_offset_y)),
POSX + (tx - (u.posx + u.view_offset_x)), c_red, bullet_char);
// pass to tilecontext
tilecontext->init_draw_bullet(tx, ty, bullet);
wrefresh(w_terrain);
if (&p == &u)
nanosleep(&ts, NULL);
tilecontext->void_bullet();
}
}
/* Monster hit animation */
void game::draw_hit_mon(int x, int y, monster m, bool dead)
{
if (use_tiles)
{
//int iTimeout = 0;
tilecontext->init_draw_hit(x, y, m.type->id);
wrefresh(w_terrain);
timespec tspec;
tspec.tv_sec = 0;
tspec.tv_nsec = BULLET_SPEED;
nanosleep(&tspec, NULL);
mvwputch(w_terrain,
POSX + (x - (u.posx + u.view_offset_x)),
POSY + (y - (u.posy + u.view_offset_y)),
c_white, ' ');
wrefresh(w_terrain);
}
else
{
nc_color cMonColor = m.type->color;
char sMonSym = m.symbol();
hit_animation(POSX + (x - (u.posx + u.view_offset_x)),
POSY + (y - (u.posy + u.view_offset_y)),
red_background(cMonColor), dead ? '%' : sMonSym);
}
}
/* Player hit animation */
void game::draw_hit_player(player *p, bool dead)
{
if (use_tiles)
{
// get base name of player id
std::string pname = (p->is_npc()?"npc_":"player_");
// get sex of player
pname += (p->male?"male":"female");
tilecontext->init_draw_hit(p->posx, p->posy, pname);
wrefresh(w_terrain);
timespec tspec;
tspec.tv_sec = 0;
tspec.tv_nsec = BULLET_SPEED;
nanosleep(&tspec, NULL);
mvwputch(w_terrain,
POSX + (p->posx - (u.posx + u.view_offset_x)),
POSY + (p->posy - (u.posy + u.view_offset_y)),
c_white, ' ');
wrefresh(w_terrain);
}
else
{
hit_animation(POSX + (p->posx - (u.posx + u.view_offset_x)),
POSY + (p->posy - (u.posy + u.view_offset_y)),
red_background(p->color()), '@');
}
}
/* Line drawing code, not really an animation but should be separated anyway */
void game::draw_line(const int x, const int y, const point center_point, std::vector<point> ret)
{
if (u_see( x, y))
{
for (int i = 0; i < ret.size(); i++)
{
int mondex = mon_at(ret[i].x, ret[i].y),
npcdex = npc_at(ret[i].x, ret[i].y);
// NPCs and monsters get drawn with inverted colors
if (mondex != -1 && u_see(&(_active_monsters[mondex])))
{
_active_monsters[mondex].draw(w_terrain, center_point.x, center_point.y, true);
}
else if (npcdex != -1)
{
active_npc[npcdex]->draw(w_terrain, center_point.x, center_point.y, true);
}
else
{
m.drawsq(w_terrain, u, ret[i].x, ret[i].y, true,true,center_point.x, center_point.y);
}
}
}
tilecontext->init_draw_line(x,y,ret,"line_target", true);
}
void game::draw_line(const int x, const int y, std::vector<point> vPoint)
{
for (int i = 1; i < vPoint.size(); i++)
{
m.drawsq(w_terrain, u, vPoint[i-1].x, vPoint[i-1].y, true, true);
}
mvwputch(w_terrain, POSY + (vPoint[vPoint.size()-1].y - (u.posy + u.view_offset_y)),
POSX + (vPoint[vPoint.size()-1].x - (u.posx + u.view_offset_x)), c_white, 'X');
tilecontext->init_draw_line(x,y,vPoint,"line_trail", false);
}
//*/
void game::draw_weather(weather_printable wPrint)
{
if (use_tiles)
{
std::string weather_name;
/*
WEATHER_ACID_DRIZZLE | WEATHER_ACID_RAIN = "weather_acid_drop"
WEATHER_DRIZZLE | WEATHER_RAINY | WEATHER_THUNDER | WEATHER_LIGHTNING = "weather_rain_drop"
WEATHER_SNOW | WEATHER_SNOWSTORM = "weather_snowflake"
*/
switch(wPrint.wtype)
{
// Acid weathers, uses acid droplet tile, fallthrough intended
case WEATHER_ACID_DRIZZLE:
case WEATHER_ACID_RAIN: weather_name = "weather_acid_drop"; break;
// Normal rainy weathers, uses normal raindrop tile, fallthrough intended
case WEATHER_DRIZZLE:
case WEATHER_RAINY:
case WEATHER_THUNDER:
case WEATHER_LIGHTNING: weather_name = "weather_rain_drop"; break;
// Snowy weathers, uses snowflake tile, fallthrough intended
case WEATHER_SNOW:
case WEATHER_SNOWSTORM: weather_name = "weather_snowflake"; break;
}
/*
// may have been the culprit of slowdown. Seems to be the same speed now for both weathered and non-weathered display
for (std::vector<std::pair<int, int> >::iterator weather_iterator = wPrint.vdrops.begin();
weather_iterator != wPrint.vdrops.end();
++weather_iterator)
{
mvwputch(w_terrain, weather_iterator->second, weather_iterator->first, wPrint.colGlyph, wPrint.cGlyph);
}
*/
tilecontext->init_draw_weather(wPrint, weather_name);
}
else
{
for (std::vector<std::pair<int, int> >::iterator weather_iterator = wPrint.vdrops.begin();
weather_iterator != wPrint.vdrops.end();
++weather_iterator)
{
mvwputch(w_terrain, weather_iterator->second, weather_iterator->first, wPrint.colGlyph, wPrint.cGlyph);
}
}
}
// draws footsteps that have been created by monsters moving about
void game::draw_footsteps()
{
std::queue<point> step_tiles;
for (int i = 0; i < footsteps.size(); i++) {
if (!u_see(footsteps_source[i]->posx(),footsteps_source[i]->posy())){
std::vector<point> unseen_points;
for (int j = 0; j < footsteps[i].size(); j++){
if (!u_see(footsteps[i][j].x,footsteps[i][j].y)){
unseen_points.push_back(point(footsteps[i][j].x,
footsteps[i][j].y));
}
}
if (use_tiles){
if (unseen_points.size() > 0){
step_tiles.push(unseen_points[rng(0, unseen_points.size()-1)]);
}
}else{
if (unseen_points.size() > 0){
point selected = unseen_points[rng(0,unseen_points.size() - 1)];
mvwputch(w_terrain,
POSY + (selected.y - (u.posy + u.view_offset_y)),
POSX + (selected.x - (u.posx + u.view_offset_x)),
c_yellow, '?');
}
}
}
}
if (use_tiles){
tilecontext->init_draw_footsteps(step_tiles);
}
footsteps.clear();
footsteps_source.clear();
wrefresh(w_terrain);
return;
}
#endif
-1043
View File
File diff suppressed because it is too large Load Diff
-148
View File
@@ -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
-142
View File
@@ -1,142 +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];
};
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];
};
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

-788
View File
@@ -1,788 +0,0 @@
#include "game.h"
#include "auto_pickup.h"
#include "output.h"
#include "debug.h"
#include "keypress.h"
#include "item_factory.h"
#include "catacharset.h"
#include "translations.h"
#include <stdlib.h>
#include <fstream>
#include <string>
#include <locale>
std::map<std::string, std::string> mapAutoPickupItems;
std::vector<cPickupRules> vAutoPickupRules[5];
void 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;
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);
int tmpx = 0;
tmpx += shortcut_print(w_auto_pickup_header, 0, tmpx, c_white, c_ltgreen, _("<A>dd"))+2;
tmpx += shortcut_print(w_auto_pickup_header, 0, tmpx, c_white, c_ltgreen, _("<R>emove"))+2;
tmpx += shortcut_print(w_auto_pickup_header, 0, tmpx, c_white, c_ltgreen, _("<C>opy"))+2;
tmpx += shortcut_print(w_auto_pickup_header, 0, tmpx, c_white, c_ltgreen, _("<M>ove"))+2;
tmpx += shortcut_print(w_auto_pickup_header, 0, tmpx, c_white, c_ltgreen, _("<E>nable"))+2;
tmpx += shortcut_print(w_auto_pickup_header, 0, tmpx, c_white, c_ltgreen, _("<D>isable"))+2;
shortcut_print(w_auto_pickup_header, 0, tmpx, c_white, c_ltgreen, _("<T>est"));
tmpx = 0;
tmpx += shortcut_print(w_auto_pickup_header, 1, tmpx, c_white, c_ltgreen, _("<+-> Move up/down"))+2;
tmpx += shortcut_print(w_auto_pickup_header, 1, tmpx, c_white, c_ltgreen, _("<Enter>-Edit"))+2;
shortcut_print(w_auto_pickup_header, 1, tmpx, c_white, c_ltgreen, _("<Tab>-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"));
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 {
int locx = 17;
locx += shortcut_print(w_auto_pickup_header, 2, locx, c_white, (iCurrentPage == 1) ? hilite(c_white) : c_white, _("[<Global>]"))+1;
shortcut_print(w_auto_pickup_header, 2, locx, c_white, (iCurrentPage == 2) ? hilite(c_white) : c_white, _("[<Character>]"));
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!"));
}
//Draw Scrollbar
draw_scrollbar(w_auto_pickup_border, iCurrentLine, iContentHeight, vAutoPickupRules[iCurrentPage].size(), 5);
calcStartPos(iStartPos, iCurrentLine, iContentHeight, vAutoPickupRules[iCurrentPage].size());
// 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) ? rm_prefix(_("<Exclude>E")).c_str() : rm_prefix(_("<Include>I")).c_str()));
}
}
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 = (char)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) {
fold_and_print(w_auto_pickup_help, 1, 1, 999, c_white,
_(
"* is used as a Wildcard. A few Examples:\n"
"\n"
"wood arrow matches the itemname exactly\n"
"wood ar* matches items beginning with wood ar\n"
"*rrow matches items ending with rrow\n"
"*avy fle*fi*arrow multible * are allowed\n"
"heAVY*woOD*arrOW case insesitive search\n"
"")
);
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
//TODO: somehow generate damaged, fitting or container items
for (int i = 0; i < standard_itype_ids.size(); i++) {
sItemName = item_controller->find_template(standard_itype_ids[i])->name;
if (vAutoPickupRules[iCurrentPage][iCurrentLine].bActive && 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);
int nmatch = vMatchingItems.size();
std::string buf = string_format(ngettext("%1$d item matches: %2$s", "%1$d items match: %2$s", nmatch), nmatch, vAutoPickupRules[iCurrentPage][iCurrentLine].sRule.c_str());
mvwprintz(w_test_rule_border, 0, iContentWidth/2 - utf8_width(buf.c_str())/2, hilite(c_white), buf.c_str());
mvwprintz(w_test_rule_border, iContentHeight + 1, 1, red_background(c_white), _("Won't display damaged, fits and can/bottle items"));
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, ' ');
}
}
calcStartPos(iStartPos, iCurrentLine, iContentHeight, vMatchingItems.size());
// 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 = (char)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 = world_generator->active_world->world_path + "/" + base64_encode(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();
std::string sLine;
while(!fin.eof()) {
getline(fin, sLine);
if(sLine != "" && sLine[0] != '#') {
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";
//}
} else {
std::string sRule = "";
bool bActive = true;
bool bExclude = false;
size_t 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));
}
}
}
fin.close();
merge_vector();
createPickupRules();
}
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));
}
}
}
}
bool hasPickupRule(std::string sRule)
{
for (int i = 0; i < vAutoPickupRules[2].size(); i++) {
if (sRule.length() == (vAutoPickupRules[2][i].sRule).length() && ci_find_substr(sRule, vAutoPickupRules[2][i].sRule) != -1) {
return true;
}
}
return false;
}
void addPickupRule(std::string sRule)
{
vAutoPickupRules[2].push_back(cPickupRules(sRule, true, false));
merge_vector();
createPickupRules();
}
void removePickupRule(std::string sRule)
{
for (int i = 0; i < vAutoPickupRules[2].size(); i++) {
if (sRule.length() == (vAutoPickupRules[2][i].sRule).length() && ci_find_substr(sRule, vAutoPickupRules[2][i].sRule) != -1) {
vAutoPickupRules[2].erase(vAutoPickupRules[2].begin() + i);
merge_vector();
createPickupRules();
break;
}
}
}
void createPickupRules(const std::string sItemNameIn)
{
if (sItemNameIn == "") {
mapAutoPickupItems.clear();
}
std::string sItemName = "";
for (int iPattern = 0; iPattern < vAutoPickupRules[0].size(); iPattern++) { //Includes only
if (!vAutoPickupRules[0][iPattern].bExclude) {
if (sItemNameIn != "") {
if (vAutoPickupRules[0][iPattern].bActive && auto_pickup_match(sItemNameIn, vAutoPickupRules[0][iPattern].sRule)) {
mapAutoPickupItems[sItemNameIn] = "true";
break;
}
} else {
//Check include paterns against all itemfactory items
for (int i = 0; i < standard_itype_ids.size(); i++) {
sItemName = item_controller->find_template(standard_itype_ids[i])->name;
if (vAutoPickupRules[0][iPattern].bActive && auto_pickup_match(sItemName, vAutoPickupRules[0][iPattern].sRule)) {
mapAutoPickupItems[sItemName] = "true";
}
}
}
}
}
for (int iPattern = 0; iPattern < vAutoPickupRules[0].size(); iPattern++) { //Excludes only
if (vAutoPickupRules[0][iPattern].bExclude) {
if (sItemNameIn != "") {
if (vAutoPickupRules[0][iPattern].bActive && auto_pickup_match(sItemNameIn, vAutoPickupRules[0][iPattern].sRule)) {
mapAutoPickupItems[sItemNameIn] = "false";
return;
}
} else {
//Check exclude paterns against all included items
for (std::map<std::string, std::string>::iterator iter = mapAutoPickupItems.begin(); iter != mapAutoPickupItems.end(); ++iter) {
if (vAutoPickupRules[0][iPattern].bActive && auto_pickup_match(iter->first, vAutoPickupRules[0][iPattern].sRule)) {
mapAutoPickupItems[iter->first] = "false";
}
}
}
}
}
}
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 = world_generator->active_world->world_path + "/" + base64_encode(g->u.name) + ".apu.txt";
std::ifstream fin;
fin.open((world_generator->active_world->world_path + "/" + base64_encode(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();
createPickupRules();
}
}
void create_default_auto_pickup(bool bCharacter)
{
std::ofstream fout;
std::string sFile = "data/auto_pickup.txt";
if (bCharacter) {
sFile = world_generator->active_world->world_path + "/" + base64_encode(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 (vPattern[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
}
-52
View File
@@ -1,52 +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::map<std::string, std::string> mapAutoPickupItems;
extern std::vector<cPickupRules> vAutoPickupRules[5];
void test_pattern(int iCurrentPage, int iCurrentLine);
std::string trim_rule(std::string sPattern);
void merge_vector();
bool hasPickupRule(std::string sRule);
void addPickupRule(std::string sRule);
void removePickupRule(std::string sRule);
void createPickupRules(const std::string sItemNameIn = "");
void save_reset_changes(bool bReset);
void show_auto_pickup();
void load_auto_pickup(bool bCharacter);
void save_auto_pickup(bool bCharacter);
void show_auto_pickup();
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
-41
View File
@@ -1,41 +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
View File
@@ -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
-675
View File
@@ -1,675 +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 "json.h"
#include <math.h> //sqrt
#include <algorithm> //std::min
#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, it_bionic* type, 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) : description(new_description){
name = new_name;
power_source = new_power_source;
activated = new_activated;
power_cost = new_power_cost;
charge_time = new_charge_time;
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);
// TODO: remove bio_null
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.empty()) {
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.empty()) {
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 = NULL;
int b = 0;
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);
fold_and_print(w_description, 0, 0, 78, 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 - 1;
}
power_level -= power_cost;
}
std::string junk;
std::vector<point> traj;
std::vector<std::string> good;
std::vector<std::string> bad;
int dirx, diry;
item tmp_item;
if(bio.id == "bio_painkiller"){
pkill += 6;
pain -= 2;
if (pkill > pain)
pkill = pain;
} else if (bio.id == "bio_nanobots"){
rem_disease("bleed");
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, -1, 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"){
WINDOW* 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("weed_high"))
good.push_back(_("THC Intoxication"));
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.empty() && bad.empty())
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());
consume(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 where?"), 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 = ret_null;
} 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_or_charges(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["generic_no_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["bio_laser_gun"], 0);
weapon.curammo = dynamic_cast<it_ammo*>(g->itypes["generic_no_ammo"]);
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 where?"), 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" ) {
int avail=0;
if ( tmp.item_vars.find("remaining_water") != tmp.item_vars.end() ) {
avail = atoi ( tmp.item_vars["remaining_water"].c_str() );
} else {
avail = tmp.volume() / 2;
}
if(avail > 0 && 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());
consume(g, water.invlet);
moves -= 350;
}
extracted = true;
avail--;
tmp.item_vars["remaining_water"] = string_format("%d",avail);
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) {
int t; //not sure why map:sees really needs this, but w/e
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")){
int l = 0;
tmp_item = g->m.i_at(i, j)[k];
g->m.i_rem(i, j, k);
for (l = 0; l < traj.size(); l++) {
int index = g->mon_at(traj[l].x, traj[l].y);
if (index != -1) {
if (g->zombie(index).hurt(tmp_item.weight() / 225))
g->kill_mon(index, true);
g->m.add_item_or_charges(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() / 225, 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_or_charges(traj[l - 1].x, traj[l - 1].y, tmp_item);
l = traj.size() + 1;
}
}
}
if (l == traj.size())
g->m.add_item_or_charges(posx, posy, tmp_item);
}
}
}
}
} else if(bio.id == "bio_lockpick"){
if(!g->choose_adjacent(_("Activate your bio lockpick where?"), 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["generic_no_ammo"]);
weapon.charges = 1;
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;
}
}
int pl_skill = int_cur * 4 +
skillLevel("electronics") * 4 +
skillLevel("firstaid") * 3 +
skillLevel("mechanics") * 1;
// for chance_of_success calculation, shift skill down to a float between ~0.4 - 30
float adjusted_skill = float (pl_skill) - std::min( float (40), float (pl_skill) - float (pl_skill) / float (10.0));
// we will base chance_of_success on a ratio of skill and difficulty
// when skill=difficulty, this gives us 1. skill < difficulty gives a fraction.
float skill_difficulty_parameter = float(adjusted_skill / (4.0 * type->difficulty));
// when skill == difficulty, chance_of_success is 50%. Chance of success drops quickly below that
// to reserve bionics for characters with the appropriate skill. For more difficult bionics, the
// curve flattens out just above 80%
int chance_of_success = int((100 * skill_difficulty_parameter) /
(skill_difficulty_parameter + sqrt( 1 / skill_difficulty_parameter)));
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", int((100 - chance_of_success) * 1.5));
practice(g->turn, "firstaid", int((100 - chance_of_success) * 1.0));
practice(g->turn, "mechanics", int((100 - chance_of_success) * 0.5));
int success = chance_of_success - rng(1, 100);
if (success > 0) {
g->u.add_memorial_log(_("Installed bionic: %s."), bionics[type->id]->name.c_str());
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 {
g->u.add_memorial_log(_("Failed to install bionic: %s."), bionics[type->id]->name.c_str());
bionics_install_failure(g, this, type, success);
}
g->refresh_all();
return true;
}
void bionics_install_failure(game *g, player *u, it_bionic* type, int success)
{
// "success" should be passed in as a negative integer representing how far off we
// were for a successful install. We use this to determine consequences for failing.
success = abs(success);
// it would be better for code reuse just to pass in skill as an argument from install_bionic
// pl_skill should be calculated the same as in install_bionics
int pl_skill = u->int_cur * 4 +
u->skillLevel("electronics") * 4 +
u->skillLevel("firstaid") * 3 +
u->skillLevel("mechanics") * 1;
// for failure_level calculation, shift skill down to a float between ~0.4 - 30
float adjusted_skill = float (pl_skill) - std::min( float (40), float (pl_skill) - float (pl_skill) / float (10.0));
// failure level is decided by how far off the character was from a successful install, and
// this is scaled up or down by the ratio of difficulty/skill. At high skill levels (or low
// difficulties), only minor consequences occur. At low skill levels, severe consequences
// are more likely.
int failure_level = int(sqrt(success * 4.0 * type->difficulty / float (adjusted_skill)));
int fail_type = (failure_level > 5 ? 5 : failure_level);
if (fail_type <= 0) {
g->add_msg(_("The installation fails without incident."));
return;
}
switch (rng(1, 5)) {
case 1: g->add_msg(_("You flub the installation.")); break;
case 2: g->add_msg(_("You mess up the installation.")); break;
case 3: g->add_msg(_("The installation fails.")); break;
case 4: g->add_msg(_("The installation is a failure.")); break;
case 5: g->add_msg(_("You screw up the installation.")); break;
}
if (fail_type == 3 && u->num_bionics() == 0)
fail_type = 2; // If we have no bionics, take damage instead of losing some
switch (fail_type) {
case 1:
g->add_msg(_("It really hurts!"));
u->pain += rng(failure_level * 3, failure_level * 6);
break;
case 2:
g->add_msg(_("Your body is damaged!"));
u->hurtall(rng(failure_level, failure_level * 2));
break;
case 3:
if (u->num_bionics() <= failure_level) {
g->add_msg(_("All of your existing bionics are lost!"));
} else {
g->add_msg(_("Some of your existing bionics are lost!"));
}
for (int i = 0; i < failure_level && u->remove_random_bionic(); i++) ;
break;
case 4:
g->add_msg(_("You do damage to your genetics, causing mutation!"));
while (failure_level > 0) {
u->mutate(g);
failure_level -= rng(1, failure_level + 2);
}
break;
case 5:
{
g->add_msg(_("The installation is faulty!"));
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.empty()) { // We've got all the bad bionics!
if (u->max_power_level > 0) {
int old_power = u->max_power_level;
g->add_msg(_("You lose power capacity!"));
u->max_power_level = rng(0, u->max_power_level - 1);
g->u.add_memorial_log(_("Lost %d units of power capacity."), old_power - u->max_power_level);
}
// TODO: What if we can't lose power capacity? No penalty?
} else {
int index = rng(0, valid.size() - 1);
u->add_bionic(valid[index]);
g->u.add_memorial_log(_("Installed bad bionic: %s."), bionics[valid[index]]->name.c_str());
}
}
break;
}
}
void load_bionic(JsonObject &jsobj)
{
std::string id = jsobj.get_string("id");
std::string name = _(jsobj.get_string("name").c_str());
std::string description = _(jsobj.get_string("description").c_str());
int cost = jsobj.get_int("cost", 0);
int time = jsobj.get_int("time", 0);
bool faulty = jsobj.get_bool("faulty", false);
bool power_source = jsobj.get_bool("power_source", false);
bool active = jsobj.get_bool("active", false);
if (faulty) { faulty_bionics.push_back(id); }
if (power_source) { power_source_bionics.push_back(id); }
if (!active && id != "bio_null") { unpowered_bionics.push_back(id); }
bionics[id] = new bionic_data(name, power_source, active, cost, time, description, faulty);
//dout(D_INFO) << "Loaded bionic: " << name << "\n";
}
-53
View File
@@ -1,53 +0,0 @@
#ifndef _BIONICS_H_
#define _BIONICS_H_
#include "json.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) {
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;
void load_bionic(JsonObject &jsobj); // load a bionic from JSON
#endif
-106
View File
@@ -1,106 +0,0 @@
#include "bodypart.h"
#include "translations.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(bool main_parts_only)
{
int rn = rng(0, 100);
if (!main_parts_only) {
if (rn == 0)
return bp_eyes;
if (rn <= 1)
return bp_mouth;
if (rn <= 7)
return bp_head;
if (rn <= 24)
return bp_legs;
if (rn <= 30)
return bp_feet;
if (rn <= 47)
return bp_arms;
if (rn <= 53)
return bp_hands;
return bp_torso;
} else {
if (rn <= 7)
return bp_head;
if (rn <= 30)
return bp_legs;
if (rn <= 53)
return bp_arms;
return bp_torso;
}
}
int random_side(body_part bp)
{
switch (bp) {
case bp_torso:
case bp_head:
case bp_eyes:
case bp_mouth:
return -1;
case bp_arms:
case bp_hands:
case bp_legs:
case bp_feet:
return rng(0, 1);
default:
return rng(0, 1);
}
}
-24
View File
@@ -1,24 +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(bool main_parts_only = false);
int random_side(body_part);
#endif
File diff suppressed because it is too large Load Diff
-54
View File
@@ -1,54 +0,0 @@
#ifndef _BUILDING_GENERATION_H_
#define _BUILDING_GENERATION_H_
#include "omdata.h"
#include "map.h"
struct mapgendata
{
public:
oter_id t_nesw[8];
int n_fac; // dir == 0
int e_fac; // dir == 1
int s_fac; // dir == 2
int w_fac; // dir == 3
int ne_fac; // dir == 4
int se_fac; // dir == 5
int nw_fac; // dir == 6
int sw_fac; // dir == 7
mapgendata(oter_id t_north, oter_id t_east, oter_id t_south, oter_id t_west, oter_id t_neast,
oter_id t_seast, oter_id t_nwest, oter_id t_swest);
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);
void mapgen_forest_general(map *m, oter_id terrain_type, mapgendata dat, int turn);
void mapgen_hive(map *m, mapgendata dat, int turn);
void mapgen_spider_pit(map *m, mapgendata dat, int turn);
void mapgen_fungal_bloom(map *m);
void mapgen_road_straight(map *m, oter_id terrain_type, mapgendata dat, int turn, float density);
void mapgen_road_curved(map *m, oter_id terrain_type, mapgendata dat, int turn, float density);
void mapgen_road_tee(map *m, oter_id terrain_type, mapgendata dat, int turn, float density);
void mapgen_road_four_way(map *m, oter_id terrain_type, mapgendata dat, int turn, float density);
void mapgen_field(map *m, int turn);
void mapgen_bridge(map *m, oter_id terrain_type, int turn);
void mapgen_highway(map *m, oter_id terrain_type, int turn);
void mapgen_river_curved_not(map *m, oter_id terrain_type);
void mapgen_river_straight(map *m, oter_id terrain_type);
void mapgen_river_curved(map *m, oter_id terrain_type);
void mapgen_parking_lot(map *m, oter_id terrain_type, mapgendata dat, int turn);
void mapgen_pool(map *m);
void mapgen_park(map *m);
void mapgen_gas_station(map *m, oter_id terrain_type, int turn, float density);
#endif
-487
View File
@@ -1,487 +0,0 @@
#include <sstream>
#include "calendar.h"
#include "output.h"
#include "options.h"
#include "translations.h"
calendar::calendar()
{
second = 0;
minute = 0;
hour = 0;
day = 0;
season = SPRING;
year = 0;
}
calendar::calendar(const calendar &copy)
{
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 = int(day_param / OPTIONS["SEASON_LENGTH"]);
second = 6 * (turn % 10);
minute = minute_param % 60;
hour = hour_param % 24;
day = 1 + day_param % (int)OPTIONS["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["SEASON_LENGTH"];
ret += year * 14400 * 4 * (int)OPTIONS["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["SEASON_LENGTH"];
ret += year * 14400 * 4 * (int)OPTIONS["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 = int(day_param / OPTIONS["SEASON_LENGTH"]);
second = 6 * (rhs % 10);
minute = minute_param % 60;
hour = hour_param % 24;
day = day_param % (int)OPTIONS["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["SEASON_LENGTH"]) {
tmpseason += int(day / OPTIONS["SEASON_LENGTH"]);
day %= (int)OPTIONS["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 = int(day / (OPTIONS["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["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["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;
int hour_param;
if (OPTIONS["24_HOUR"] == "military") {
hour_param = hour % 24;
time_string << string_format("%02d%02d", hour_param, minute);
} else if (OPTIONS["24_HOUR"] == "24h") {
hour_param = hour % 24;
if (just_hour) {
time_string << hour_param;
} else {
//~ hour:minute (24hr time display)
time_string << string_format(_("%02d:%02d"), hour_param, minute);
}
} else {
hour_param = hour % 12;
if (hour_param == 0) {
hour_param = 12;
}
if (just_hour && hour < 12) {
time_string << string_format(_("%d AM"), hour_param);
} else if (just_hour) {
time_string << string_format(_("%d PM"), hour_param);
} else if (hour < 12) {
time_string << string_format(_("%d:%02d AM"), hour_param, minute);
} else {
time_string << string_format(_("%d:%02d PM"), hour_param, minute);
}
}
return time_string.str();
}
std::string calendar::textify_period()
{
standardize();
int am;
const char* tx;
// Describe the biggest time period, as "<am> <tx>s", am = amount, tx = name
if (year > 0) {
am = year;
tx = ngettext("%d year", "%d years", am);
} else if (season > 0) {
am = season;
tx = ngettext("%d season", "%d seasons", am);
} else if (day > 0) {
am = day;
tx = ngettext("%d day", "%d days", am);
} else if (hour > 0) {
am = hour;
tx = ngettext("%d hour", "%d hours", am);
} else if (minute >= 5) {
am = minute;
tx = ngettext("%d minute", "%d minutes", am);
} else {
am = second / 6 + minute * 10;
tx = ngettext("%d turn", "%d turns", am);
}
return string_format(tx, am);
}
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
View File
@@ -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 &copy);
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_
-1450
View File
File diff suppressed because it is too large Load Diff
-297
View File
@@ -1,297 +0,0 @@
#ifndef CATA_TILES_H
#define CATA_TILES_H
// make sure that SDL systems are included: Until testing is available for other systems, keep Windows specific
#if (defined _WIN32 || defined WINDOWS)
//#include <windows.h>
#include "SDL.h"
#include "SDL_ttf.h"
#else
#include <wordexp.h>
#if (defined OSX_SDL_FW)
#include "SDL.h"
#include "SDL_ttf/SDL_ttf.h"
#else
#include "SDL/SDL.h"
#include "SDL/SDL_ttf.h"
#endif
#endif
#include "game.h"
#include "options.h"
#include "mapdata.h"
#include "tile_id_data.h"
#include "enums.h"
#include "file_finder.h"
/** Structures */
struct tile_type
{
int fg, bg;
bool multitile, rotates;
std::vector<std::string> available_subtiles;
tile_type()
{
fg = bg = 0;
multitile = rotates = false;
available_subtiles.clear();
}
};
struct tile
{
/** Screen coordinates as tile number */
int sx, sy;
/** World coordinates */
int wx, wy;
tile()
{
sx = wx = wy = 0;
}
tile(int x, int y, int x2, int y2)
{
sx = x;
sy = y;
wx = x2;
wy = y2;
}
};
/* Enums */
enum LIGHTING
{
HIDDEN = -1,
CLEAR = 0,
LIGHT_NORMAL = 1,
LIGHT_DARK = 2,
BOOMER_NORMAL = 3,
BOOMER_DARK = 4
};
enum MULTITILE_TYPE
{
center,
corner,
edge,
t_connection,
end_piece,
unconnected,
open_,
broken,
num_multitile_types
};
/** Typedefs */
typedef std::map<int, SDL_Rect*> tile_map;
typedef std::map<std::string, tile_type*> tile_id_map;
typedef tile_map::iterator tile_iterator;
typedef tile_id_map::iterator tile_id_iterator;
// Cache of a single tile, used to avoid redrawing what didn't change.
struct tile_drawing_cache {
tile_drawing_cache() { };
// Sprite indices drawn on this tile.
// The same indices in a different order need to be drawn differently!
std::vector<tile_type*> sprites;
std::vector<int> rotations;
bool operator==(const tile_drawing_cache& other) const {
if(sprites.size() != other.sprites.size()) {
return false;
} else {
for(int i=0; i<sprites.size(); i++) {
if(sprites[i] != other.sprites[i] || rotations[i] != other.rotations[i]) {
return false;
}
}
}
return true;
}
bool operator!=(const tile_drawing_cache& other) const {
return !(this->operator==(other));
}
void operator=(const tile_drawing_cache& other) {
this->sprites = other.sprites;
this->rotations = other.rotations;
}
};
class cata_tiles
{
public:
/** Default constructor */
cata_tiles();
/** Default destructor */
~cata_tiles();
/** Load tileset */
void load_tileset(std::string path);
/** Load tileset config file */
void load_tilejson(std::string path);
void load_tilejson_from_file(std::ifstream *f);
/* After loading tileset, create additional cache for rotating each tile assuming it is used for rotations */
void create_rotation_cache();
/** Draw to screen */
void draw(); /* Deprecated */
void draw(int destx, int desty, int centerx, int centery, int width, int height);
/** How many rows and columns of tiles fit into given dimensions **/
void get_window_tile_counts(const int width, const int height, int &columns, int &rows) const;
int get_tile_width() const;
bool draw_from_id_string(std::string id, int x, int y, int subtile, int rota, bool is_at_screen_position = false);
bool draw_tile_at(tile_type *tile, int x, int y, int rota);
/**
* Redraws all the tiles that have changed since the last frame.
*/
void apply_changes();
/** Surface/Sprite rotation specifics */
SDL_Surface *rotate_tile(SDL_Surface *src, SDL_Rect *rect, int rota);
void put_pixel(SDL_Surface *surface, int x, int y, Uint32 pixel);
Uint32 get_pixel(SDL_Surface *surface, int x, int y);
/* Tile Picking */
void get_tile_values(const int t, const int *tn, int &subtile, int &rotation);
void get_wall_values(const int x, const int y, const long vertical_wall_symbol, const long horizontal_wall_symbol, int &subtile, int &rotation);
void get_terrain_orientation(int x, int y, int &rota, int &subtype);
void get_rotation_and_subtile(const char val, const int num_connects, int &rota, int &subtype);
/** Drawing Layers */
bool draw_lighting(int x, int y, LIGHTING l);
bool draw_terrain(int x, int y);
bool draw_furniture(int x, int y);
bool draw_trap(int x, int y);
bool draw_field_or_item(int x, int y);
bool draw_item(int x, int y);
bool draw_vpart(int x, int y);
bool draw_entity(int x, int y);
bool draw_item_highlight(int x, int y);
// Animation layers
bool draw_hit(int x, int y);
void init_explosion(int x, int y, int radius);
void draw_explosion_frame(int destx, int desty, int centerx, int centery, int width, int height);
void void_explosion();
void init_draw_bullet(int x, int y, std::string name);
void draw_bullet_frame(int destx, int desty, int centerx, int centery, int width, int height);
void void_bullet();
void init_draw_hit(int x, int y, std::string name);
void draw_hit_frame(int destx, int desty, int centerx, int centery, int width, int height);
void void_hit();
void init_draw_footsteps(std::queue<point> steps);
void draw_footsteps_frame(int destx, int desty, int centerx, int centery, int width, int height);
void void_footsteps();
// pseudo-animated layer, not really though.
void init_draw_line(int x, int y, std::vector<point> trajectory, std::string line_end_name, bool target_line);
void draw_line(int destx, int desty, int centerx, int centery, int width, int height);
void void_line();
void init_draw_weather(weather_printable weather, std::string name);
void draw_weather_frame(int destx, int desty, int centerx, int centery, int width, int height);
void void_weather();
/** Overmap Layer : Not used for now, do later*/
bool draw_omap();
/**
* Scroll the map widget by (x, y)
*
* scroll(1, 1) would move the view one to the right and one down.
*
* Useful for keeping part of the previous "frame" and redrawing
* only what changed.
*/
void scroll(int x, int y);
/** Used to properly initialize everything for display */
void init(SDL_Surface *screen, std::string json_path, std::string tileset_path);
/* initialize from an outside file */
void init(SDL_Surface *screen, std::string load_file_path);
/* Reinitializes the tile context using the original screen information */
void reinit(std::string load_file_path);
void get_tile_information(std::string dir_path, std::string &json_path, std::string &tileset_path);
/** Lighting */
void init_light();
LIGHTING light_at(int x, int y);
/** Variables */
SDL_Surface *buffer, *tile_atlas, *display_screen;
tile_map *tile_values;
tile_id_map *tile_ids;
std::map<int, std::vector<SDL_Surface*> > rotation_cache;
int tile_height, tile_width;
int screentile_width, screentile_height;
tile *screen_tiles;
int num_tiles;
bool in_animation;
bool do_draw_explosion;
bool do_draw_bullet;
bool do_draw_hit;
bool do_draw_line;
bool do_draw_weather;
bool do_draw_footsteps;
int exp_pos_x, exp_pos_y, exp_rad;
int bul_pos_x, bul_pos_y;
std::string bul_id;
int hit_pos_x, hit_pos_y;
std::string hit_entity_id;
int line_pos_x, line_pos_y;
bool is_target_line;
std::vector<point> line_trajectory;
std::string line_endpoint_id;
weather_printable anim_weather;
std::string weather_name;
std::queue<point> footsteps;
std::map<point, tile_drawing_cache> cache;
std::map<point, tile_drawing_cache> tiles_to_draw_this_frame;
// offset values
int o_x, o_y;
protected:
private:
int
sightrange_natural,
sightrange_light,
sightrange_lowlight,
sightrange_max;
int
u_clairvoyance,
g_lightlevel;
bool
boomered,
sight_impaired,
bionight_bionic_active;
int last_pos_x, last_pos_y;
};
#endif // CATA_TILES_H
-359
View File
@@ -1,359 +0,0 @@
#include "catacharset.h"
#include <string.h>
#include "debug.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;
}
std::string utf32_to_utf8(unsigned ch) {
char out[5];
char* buf = out;
static const unsigned char utf8FirstByte[7] = { 0x00, 0x00, 0xC0, 0xE0, 0xF0, 0xF8, 0xFC };
int utf8Bytes;
if (ch < 0x80) {
utf8Bytes = 1;
} else if (ch < 0x800) {
utf8Bytes = 2;
} else if (ch < 0x10000) {
utf8Bytes = 3;
} else if (ch <= 0x10FFFF) {
utf8Bytes = 4;
} else {
utf8Bytes = 3;
ch = UNKNOWN_UNICODE;
}
buf += utf8Bytes;
switch (utf8Bytes) {
case 4:
*--buf = (ch|0x80)&0xBF;
ch >>= 6;
case 3:
*--buf = (ch|0x80)&0xBF;
ch >>= 6;
case 2:
*--buf = (ch|0x80)&0xBF;
ch >>= 6;
case 1:
*--buf = ch|utf8FirstByte[utf8Bytes];
}
out[utf8Bytes] = '\0';
return out;
}
//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(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(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(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(tc);
erease_utf8_by_cw(buf+pos, tw, tw, len-pos-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(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);
}
static const char base64_encoding_table[] =
{'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H',
'I', 'J', 'K', 'L', 'M', 'N', 'O', 'P',
'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X',
'Y', 'Z', 'a', 'b', 'c', 'd', 'e', 'f',
'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n',
'o', 'p', 'q', 'r', 's', 't', 'u', 'v',
'w', 'x', 'y', 'z', '0', '1', '2', '3',
'4', '5', '6', '7', '8', '9', '+', '-'};
static char base64_decoding_table[256];
static const int mod_table[] = {0, 2, 1};
static void build_base64_decoding_table() {
static bool built = false;
if(!built) {
for (int i = 0; i < 64; i++) {
base64_decoding_table[(unsigned char) base64_encoding_table[i]] = i;
}
built = true;
}
}
std::string base64_encode(std::string str) {
//assume it is already encoded
if(str.length()>0 && str[0]=='#') {
return str;
}
int input_length = str.length();
int output_length = 4 * ((input_length + 2) / 3);
char *encoded_data = new char[output_length+1];
const unsigned char* data = (const unsigned char*)str.c_str();
for (int i = 0, j = 0; i < input_length;) {
unsigned octet_a = i < input_length ? data[i++] : 0;
unsigned octet_b = i < input_length ? data[i++] : 0;
unsigned octet_c = i < input_length ? data[i++] : 0;
unsigned triple = (octet_a << 0x10) + (octet_b << 0x08) + octet_c;
encoded_data[j++] = base64_encoding_table[(triple >> 3 * 6) & 0x3F];
encoded_data[j++] = base64_encoding_table[(triple >> 2 * 6) & 0x3F];
encoded_data[j++] = base64_encoding_table[(triple >> 1 * 6) & 0x3F];
encoded_data[j++] = base64_encoding_table[(triple >> 0 * 6) & 0x3F];
}
for (int i = 0; i < mod_table[input_length % 3]; i++)
encoded_data[output_length - 1 - i] = '=';
encoded_data[output_length] = '\0';
std::string ret = "#";
ret += encoded_data;
delete[] encoded_data;
//DebugLog()<<"base64 encoded: \n"<<str<<"\n"<<ret<<"\n";
return ret;
}
std::string base64_decode(std::string str) {
// do not decode if it is not base64
if(str.length()==0 || str[0]!='#') {
return str;
}
build_base64_decoding_table();
std::string instr = str.substr(1);
int input_length = instr.length();
if (input_length % 4 != 0) {
return str;
}
int output_length = input_length / 4 * 3;
const char* data = (const char*)instr.c_str();
if (data[input_length - 1] == '=') output_length--;
if (data[input_length - 2] == '=') output_length--;
unsigned char *decoded_data = new unsigned char[output_length+1];
for (int i = 0, j = 0; i < input_length;) {
unsigned sextet_a = data[i] == '=' ? 0 & i++ : base64_decoding_table[(unsigned char)data[i++]];
unsigned sextet_b = data[i] == '=' ? 0 & i++ : base64_decoding_table[(unsigned char)data[i++]];
unsigned sextet_c = data[i] == '=' ? 0 & i++ : base64_decoding_table[(unsigned char)data[i++]];
unsigned sextet_d = data[i] == '=' ? 0 & i++ : base64_decoding_table[(unsigned char)data[i++]];
unsigned triple = (sextet_a << 3 * 6)
+ (sextet_b << 2 * 6)
+ (sextet_c << 1 * 6)
+ (sextet_d << 0 * 6);
if (j < output_length) decoded_data[j++] = (triple >> 2 * 8) & 0xFF;
if (j < output_length) decoded_data[j++] = (triple >> 1 * 8) & 0xFF;
if (j < output_length) decoded_data[j++] = (triple >> 0 * 8) & 0xFF;
}
decoded_data[output_length] = 0;
std::string ret = (char*)decoded_data;
delete[] decoded_data;
//DebugLog()<<"base64 decoded: \n"<<str<<"\n"<<ret<<"\n";
return ret;
}
-22
View File
@@ -1,22 +0,0 @@
#ifndef CATACHARSET_H
#define CATACHARSET_H
#include <stdint.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(uint32_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);
std::string utf32_to_utf8(unsigned ch);
std::string base64_encode(std::string str);
std::string base64_decode(std::string str);
#endif
-3
View File
@@ -1,3 +0,0 @@
#!/bin/sh
DIR=`dirname "$0"`
cd $DIR && ./cataclysm
-199
View File
@@ -1,199 +0,0 @@
#ifndef __CATACURSE__
#define __CATACURSE__
#if (defined _WIN32 || defined WINDOWS)
#define _WIN32_WINNT 0x0500
#define WIN32_LEAN_AND_MEAN
#ifndef NOMINMAX
#define NOMINMAX
#endif
//#define VC_EXTRALEAN
#include "windows.h"
#include "mmsystem.h"
#endif
#include <stdio.h>
#include <map>
#include <vector>
#include "json.h"
#include "input_defs.h"
typedef int chtype;
typedef unsigned short attr_t;
typedef unsigned int u_int32_t;
// TODO: remove unused stuff
#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_F(n) (0x108+n) /* F1, F2, etc*/
#define KEY_NPAGE 0x152 /* page down */
#define KEY_PPAGE 0x153 /* page up */
#define KEY_ENTER 0x157 /* enter */
/* Curses external declarations. */
extern WINDOW *stdscr;
#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 hline(chtype ch, int n);
int vline(chtype ch, int n);
int whline(WINDOW *win, chtype ch, int n);
int wvline(WINDOW *win, chtype ch, int n);
int mvhline(int y, int x, chtype ch, int n);
int mvvline(int y, int x, chtype ch, int n);
int mvwhline(WINDOW *win, int y, int x, chtype ch, int n);
int mvwvline(WINDOW *win, int y, int x, chtype ch, int n);
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 getcurx(WINDOW *win);
int getcury(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;
extern std::map< std::string,std::vector<int> > consolecolors;
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);
input_event getch_kyb_mouse(WINDOW* capture_win = NULL);
int curses_start_color();
#ifdef SDLTILES
void init_tiles();
#endif
#endif
+11
View File
@@ -0,0 +1,11 @@
---
layout: page
title: Changes
permalink: /changes/
---
{% for pull in site.github.pulls %}
{{ pull.title }}
------------------
{{ pull.body }}
{% endfor %}
-23
View File
@@ -1,23 +0,0 @@
#include "char_validity_check.h"
/**
* Returns whether or not the given (ASCII) character is usable.
* Called to check player name validity and world name validity.
* Only printable symbols not reserved by the filesystem are
* permitted.
* @param ch The char to check.
* @return true if the char is allowed in a name, false if not.
*/
bool is_char_allowed(char ch) {
//Allow everything EXCEPT the following reserved characters:
return (ch > 31 //0-31 are control characters
&& ch < 127 //DEL character
&& ch != '/' && ch != '\\' //Path separators
&& ch != '?' && ch != '*' && ch != '%' //Wildcards
&& ch != ':' //Mount point/drive marker
&& ch != '|' //Output pipe
&& ch != '"' //Filename (with spaces) marker
&& ch != '>' && ch != '<'); //Input/output redirection
}
-6
View File
@@ -1,6 +0,0 @@
#ifndef _CHAR_VALIDITY_CHECK_H
#define _CHAR_VALIDITY_CHECK_H
bool is_char_allowed(char ch);
#endif // _CHAR_VALIDITY_CHECK_H
-8
View File
@@ -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=1tbs --indent=spaces=4 --align-pointer=name --max-code-length=100 --break-after-logical --indent-classes --indent-switches --indent-preprocessor --indent-col1-comments --min-conditional-indent=0 --pad-oper --add-brackets --convert-tabs
For example, from vi, set marks a and b around the block, then:
:'a,'b ! astyle --style=1tbs --indent-spaces=4 --align-pointer=name --max-code-length=100 --break-after-logical --indent-classes --indent-switches --indent-preprocessor --indent-col1-comments --min-conditional-indent=0 --pad-oper --add-brackets --convert-tabs
-103
View File
@@ -1,103 +0,0 @@
#ADDING STUFF
##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.
6. 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.
##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:
```C++
{"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(...);`
where you should find a huge variant operator ("switch"). This is where you should
put your code defining the new building by adding new case-statement.
It 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 also 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:
```C++
{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` explain the meaning of these constants in the example above.
##Adding a bionic
1. Edit data/raw/bionics.json and add your bionic near similar types. See JSON_INFO for a more in-depth review of the individual fields.
2. If you want the bionic to be available in the gameworld as an item, add it to item_groups.json
3. Manually code in effects into the appropriate files
##How armour protection is calculated
1. 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)
2. 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
3. If the above roll succeeds, the armour is hit, possibly absorbing some damage and possibly getting damaged in the process
4. The above steps are repeated for each layer of armour on the body part
5. 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
6. If the armour is made from 2 materials types, then it takes a weighted average of the primary material (66%) and secondary material (33%).
7. Materials resistance factors are given relative to PAPER as a material (this probably needs some fine-tuning for balance).
##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
#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.
**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.
-94
View File
@@ -1,94 +0,0 @@
#ENUMS
Format: File with definition : Name of enum
* action.h : action_id
* artifact.h : art_effect_passive
* artifact.h : art_effect_active
* artifact.h : art_charge
* artifact.h : artifact_natural_shape
* artifact.h : artifact_natural_property
* artifactdata.h : artifact_weapon_type
* artifactdata.h : artifact_tool_form
* artifactdata.h : artifact_armor_mod
* artifactdata.h : artifact_armor_form
* bodypart.h : body_part
* calendar.cpp : weekday
* calendar.h : season_type
* calendar.h : moon_phase
* color.h : col_attribute
* color.h : nc_color
* computer.h : computer_action
* computer.h : computer_failure
* debug.h : DebugLevel
* debug.h : DebugClass
* dialogue.h : talk_trial
* disease.cpp : dis_type_enum
* enums.h : phase_id
* enums.h : damage_type
* event.h : event_type
* faction.h : faction_goal
* faction.h : faction_job
* faction.h : faction_value
* field.h : field_id
* game.cpp : ter_id v_wall_type
* game.cpp : ter_id h_wall_type
* game.cpp : ter_id door_type
* game.cpp : ter_id floor_type
* game.h : tut_type
* game.h : input_ret
* game.h : quit_status
* gamemode.h : special_game_id
* gamemode.h : tut_lesson
* gamemode.h : defense_style
* gamemode.h : defense_location
* gamemode.h : caravan_category
* input.h : InputEvent
* item.h : hint_rating
* itype.h : item_cat
* itype.h : software_type
* itype.h : technique_id
* itype.h : bigness_property_aspect
* lightmap.h : lit_level
* line.h : direction
* map.cpp : astar_list
* mapdata.h : ter_id
* mapdata.h : furn_id
* mapdata.h : map_extra
* mapgen.cpp : room_type
* mission.h : talk_topic
* mission.h : mission_id
* mission.h : mission_origin
* mission.h : mission_goal
* monster.h : monster_effect_type
* monster.h : monster_attitude
* morale.h : morale_type
* mtype.h : monster_species
* mtype.h : mon_id
* mtype.h : m_size
* mtype.h : monster_trigger
* mtype.h : m_flag
* mtype.h : m_category
* npc.h : npc_attitude
* npc.h : npc_mission
* npc.h : npc_class
* npc.h : npc_action
* npc.h : npc_need
* npc.h : npc_flag
* npc.h : npc_favor_type
* npc.h : combat_engagement
* npc.h : talk_topic
* omdata.h : oter_id
* omdata.h : omspec_flag
* omdata.h : omspec_id
* omdata.h : overmap_zone
* overmpa.h : radio_type
* pldata.h : character_type
* pldata.h : add_type
* pldata.h : activity_type
* pldata.h : pl_flag
* pldata.h : hp_part
* trap.h : trap_id
* veh_interact.h : sel_types
* vehicle.cpp : vehicle_controls
* vehicle.h : veh_coll_type
* weather.h : weather_type
-108
View File
@@ -1,108 +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
-34
View File
@@ -1,34 +0,0 @@
Stat system scaling:
Minimum stat: 0 (should only happen due to penalties, instant failure in most scenarios)
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, "professional" level)
Monster melee skill scaling:
Minimum skill: 0 (no combat potential)
Nominal skill: 8 (average Zed)
Very high stat: 16 (skilled in combat)
Maximal stat: 20 (highest for balance purposes)
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.
-465
View File
@@ -1,465 +0,0 @@
# JSON file contents
##raw
* bionics.json - bionics, does NOT include bionic effects
* dreams.json - dream text and linked mutation categories
* item_groups.json - item spawn groups
* materials.json - material types
* monstergroups.json - monster spawn groups
* names.json - names used for NPC/player name generation
* professions.json - profession definitions
* recipes.json - crafting/disassembly recipes
* skills.json - skill descriptions and ID's
* snippets.json - flier/poster descriptions
* mutations.json - traits/mutations
* vehicle_parts.json - vehicle parts, does NOT affect flag effects
* vehicles.json - vehicle definitions
##raw/items
* archery.json - bows and arrows
* ranged.json - guns
* tools.json - tools and items that can be (a)ctivated
* ammo.json - ammo
* books.json - books
* comestibles.json - food/drinks
* containers.json - containers
* instruments.json - instruments
* melee.json - anything that doesn't go in the other item jsons, melee weapons
* mods.json - gunmods
##json
* furniture.json - furniture, and features treated like furniture
* terrain.json - terrain types and definitions
#raw jsons
###BIONICS
```C++
"id" : "bio_batteries", // Unique ID. Must be one continuous word,
// use underscores if necessary.
"name" : "Battery System", // In-game name displayed
"active" : false, // Whether the bionic is active or passive (default: passive)
"power_source" : false, // Whether the bionic provides power (default: false)
"faulty" : false, // Whether it is a faulty type (default: false)
"cost" : 0, // How many PUs it costs to use the bionic. (default: 0)
"time" : 0, // How long, when activated, between drawing cost.
// If 0, it draws power once. (default: 0)
"description" : "You have a battery draining attachment, and thus can make use of the energy contained in normal, everyday batteries. Use 'E' to consume batteries." // In-game description
```
###DREAMS
```C++
"messages" : [ // List of potential dreams
"You have a strange dream about birds.",
"Your dreams give you a strange feathered feeling."
],
"category" : "MUTCAT_BIRD", // Mutation category needed to dream
"strength" : 1 // Mutation category strength required
1 = 20 - 34
2 = 35 - 49
3 = 50+
```
###ITEM GROUPS
```C++
"id":"forest", // Unique ID. Must be one continuous word, use underscores if necessary
"items":[ // List of potential item ID's. Chance of an item spawning is x/T, where
["rock", 40], // X is the value linked to the specific item and T is the total of all
["stick", 95], // item values in a group
["mushroom", 4],
["mushroom_poison", 3],
["mushroom_magic", 1],
["blueberries", 3]
],
"groups":[] // ?
```
###MATERIALS
```C++
"ident" : "hflesh", // Unique ID. Must be one continuous word, use underscores if necessary
"name" : "Human Flesh", // In-game name displayed
"bash_resist" : 1, // How well a material resists bashing damage
"cut_resist" : 1, // How well a material resists cutting damage
"bash_dmg_verb" : "bruised", // Verb used when material takes bashing damage
"cut_dmg_verb" : "sliced", // Verb used when material takes cutting damage
"dmg_adj" : ["bruised", "mutilated", "badly mutilated", "thoroughly mutilated"], // Description added to damaged item in ascending severity
"acid_resist" : 1, // Ability of a material to resist acid
"elec_resist" : 1, // Ability of a material to resist electricity
"fire_resist" : 0, // Ability of a material to resist fire
"density" : 5 // Density of a material
```
###MONSTER GROUPS
```C++
"name" : "GROUP_ANT", // Unique ID. Must be one continuous word, use underscores if necessary
"default" : "mon_ant", // Default monster, automatically fills in any remaining spawn chances
"monsters" : [ // To choose monster spawned game creates 1000 entries and picks one.
{ "monster" : "mon_ant_larva", "freq" : 40, "multiplier" : 0 }, // Each monster will have a number of entries equal to it's "freq" and
{ "monster" : "mon_ant_soldier", "freq" : 90, "multiplier" : 5 }, // the default monster will fill in the remaining. "multiplier" increases
{ "monster" : "mon_ant_queen", "freq" : 0, "multiplier" : 0 } // how much each monster counts for in a spawn group (i.e. will spawn 5 larva or 1 soldier)
{ "monster" : "mon_thing", // Monsters id
"freq" : 100, // Chance of occurence, out of a thousand
"multiplier" : 0, // How many monsters each monster in this definition should count as, if spawning a limited number of monsters
"pack_size" : [3,5], // The minimum and maximum number of monsters in this group that should spawn together. Optional, defaults [1,1]
"conditions" : ["TWILIGHT","SUMMER"] // Conditions limiting when monsters spawn. Valid options: SUMMER, WINTER, AUTUMN, SPRING, DAY, NIGHT, DUSK, DAWN, TWILIGHT
}
```
###NAMES
```C++
{ "name" : "Aaliyah", "gender" : "female", "usage" : "given" }, // Name, gender, "given"/"family"/"city" (first/last/city name).
// NOTE: Please refrain from adding name PR's in order to maintain kickstarter exclusivity
```
###PROFESSIONS
```C++
"description":"Ever since you were a child you loved hunting, and you loved the challenge of hunting with a bow even more. You start with a level in archery and survival.", // In-game description
"ident":"hunter", // Unique ID. Must be one continuous word, use underscores if necessary
"items":[ // ID's of items player starts with when selecting this profession
"army_top",
"boots_steel",
"jeans"
],
"name":"Bow Hunter", // In-game name displayed
"points":2, // Point cost of profession. Positive values cost points and negative values grant points
"addictions" : [ // Optional list of starting addictions.
{
"type": "nicotine", // ID of addiction
"intensity" : 10, // Intensity of starting addiction
}
"skills":[ // Skills that the player starts with when selecting this profession, stacks with purchased skills
{
"level":1, // Skill level granted
"name":"archery" // ID of granted skill
},
{
"level":1,
"name":"survival"
}
]
```
###RECIPES
```C++
"result": "javelin", // ID of resulting item
"category": "CC_WEAPON", // Category of crafting recipe. CC_NONCRAFT used for disassembly recipes
"skill_used": "fabrication", // Skill trained and used for success checks
"requires_skills": [["survival", 1], ["throw", 2]], // Skills required to unlock recipe
"difficulty": 3, // Difficulty of success check
"time": 5000, // Time to perform recipe
"reversible": false, // Can be disassembled.
"autolearn": true, // Automatically learned upon gaining required skills
"tools": [ // Tools needed to craft
[ // Equivalent tools are surrounded by a single set of brackets []
[ "hatchet", -1 ], // Charges consumed when tool is used, -1 means no charges are consumed
[ "knife_steak", -1 ],
[ "knife_combat", -1 ],
[ "knife_butcher", -1 ],
[ "pockknife", -1 ],
[ "scalpel", -1 ],
[ "machete", -1 ],
[ "broadsword", -1 ],
[ "toolset", -1 ]
],
[
[ "fire", -1 ]
]],
"components": [ // Equivalent components are surrounded by a single set of brackets
[
[ "spear_wood", 1 ], // Number of charges/items required
[ "pointy_stick", 1 ]
],
[
[ "rag", 1 ],
[ "leather", 1 ],
[ "fur", 1 ]
],
[
[ "plant_fibre", 20 ],
[ "sinew", 20 ],
[ "thread", 20 ],
[ "duct_tape", 20 ]
]
]
```
###SKILLS
```C++
"ident" : "smg", // Unique ID. Must be one continuous word, use underscores if necessary
"name" : "submachine guns", // In-game name displayed
"description" : "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.", // In-game description
"tags" : ["gun_type"] // Special flags (default: none)
```
###SNIPPETS
```C++
"category": "flier", // Category used
"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!\"" // In-game description
```
###TRAITS/MUTATIONS
```C++
"id": "LIGHTEATER", // Unique ID
"name": "Optimist", // In-game name displayed
"points": 2, // Point cost of the trait. Positive values cost points and negative values give points
"visibility": 0, // Visibility of the trait for purposes of NPC interaction (default: 0)
"ugliness": 0, // Ugliness of the trait for purposes of NPC interaction (default: 0)
"description": "Nothing gets you down!" // In-game description
"starting_trait": true, // Can be selected at character creation (default: false)
"valid": false, // Can be mutated ingame (default: true)
"category": ["MUTCAT_BIRD", "MUTCAT_INSECT"], // Categories containing this mutation
"prereqs": ["SKIN_ROUGH"], // Needs these mutations before you can mutate toward this mutation
"cancels": ["ROT1", "ROT2", "ROT3"], // Cancels these mutations when mutating
"changes_to": ["FASTHEALER2"], // Can change into these mutations when mutating further
"leads_to": [], // Mutations that add to this one
"wet_protection":[{ "part": "HEAD", // Wet Protection on specific bodyparts
"good": 1 } ] // "neutral/good/ignored" // Good increases pos and cancels neg, neut cancels neg, ignored cancels both
```
###VEHICLE PARTS
```C++
"id": "wheel", // Unique identifier
"name": "wheel", // Displayed name
"symbol": "0", // ASCII character displayed when part is working
"color": "dark_gray", // Color used when part is working
"broken_symbol": "x", // ASCII character displayed when part is broken
"broken_color": "light_gray", // Color used when part is broken
"damage_modifier": 50, // (Optional, default = 100) Dealt damage multiplier when this part hits something, as a percentage. Higher = more damage to creature struck
"durability": 200, // How much damage the part can take before breaking
"wheel_width": 9, /* (Optional, default = 0)
* SPECIAL: A part may have at most ONE of the following fields:
* wheel_width = base wheel width in inches
* size = trunk/box storage volume capacity
* power = base engine power (in liters)
* bonus = bonus granted; muffler = noise reduction%, seatbelt = bonus to not being thrown from vehicle
* par1 = generic value used for unique bonuses, like the headlight's light intensity */
"fuel_type": "NULL", // (Optional, default = "NULL") Type of fuel/ammo the part consumes, as an item id
"item": "wheel", // The item used to install this part, and the item obtained when removing this part
"difficulty": 4, // Your mechanics skill must be at least this level to install this part
"flags": [ // Flags associated with the part
"EXTERNAL", "MOUNT_OVER", "WHEEL", "MOUNT_POINT", "VARIABLE_SIZE"
]
```
###VEHICLES
```C++
"id": "shopping_cart", // Internally-used name.
"name": "Shopping Cart", // Display name, subject to i18n.
"blueprint": "#", // Preview of vehicle - ignored by the code, so use only as documentation
"parts": [ // Parts list
{"x": 0, "y": 0, "part": "box"}, // Part definition, positive x direction is to the left, positive y is to the right
{"x": 0, "y": 0, "part": "casters"} // See vehicle_parts.json for part ids
]
/* Important! Vehicle parts must be defined in the same order you would install
* them in the game (ie, frames and mount points first).
* You also cannot break the normal rules of installation
* (you can't stack non-stackable part flags). */
```
#raw/items jsons
###AMMO
```C++
"type" : "AMMO", // Defines this as ammo
"id" : "shot_bird", // Unique ID. Must be one continuous word, use underscores if necessary
"price" : 500, // Used when bartering with NPC's
"name" : "birdshot", // In-game name displayed
"symbol" : "=", // ASCII character used in-game
"color" : "red", // ASCII character colour
"description" : "Weak shotgun ammunition. Designed for hunting birds and other small game, its applications in combat are very limited.", // In-game description
"material" : "plastic", // Material types. See materials.json for possible options
"volume" : 2, // Volume, measured in 1/4 liters
"weight" : 34, // Weight, measuted in grams
"bashing" : 1, // Bashing damage caused by using it as a melee weapon
"cutting" : 0, // Cutting damage caused by using it as a melee weapon
"to_hit" : 0, // To-hit bonus if using it as a melee weapon
"ammo_type" : "shot", // Determines what it can be loaded in
"damage" : 18, // Ranged damage when fired
"pierce" : 0, // Armor piercing ability when fired
"range" : 5, // Range when fired
"dispersion" : 0, // Inaccuracy of ammo, measured in quarter-degrees
"recoil" : 18, // Recoil caused when firing
"count" : 25, // Number of rounds that spawn together
"stack_size" : 50, // (Optional) How many rounds are in the above-defined volume. If omitted, is the same as 'count'
"effects" : ["COOKOFF", "SHOT"] // Special effects
```
###ARMOR
```C++
"type" : "ARMOR", // Defines this as armor
"id" : "socks", // Unique ID. 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" : 350, // Weight of armour in grams
"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 used in-game
"description" : "Socks. Put 'em on your feet.", // Description of armour
"price" : 100, // Used when bartering with NPCs
"material" : ["COTTON", "NULL"], // Material types. See materials.json for possible options
"volume" : 1, // Volume, measured in 1/4 liters
"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
"encumberance" : 0, // Base encumbrance (unfitted value)
"bashing" : -5, // Bashing damage caused by using it as a melee weapon
"flags" : ["VARSIZE"] // Indicates special effects
"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
```
###BOOKS
```C++
"type" : "BOOK", // Defines this as a BOOK
"id" : "textbook_computers", // Unique ID. Must be one continuous word, use underscores if necessary
"name" : "Computer Science 301", // In-game name displayed
"max_level" : 5, // Maximum skill level this book will train to
"description" : "A college textbook on computer science.", // In-game description
"weight" : 1587, // Weight, measured in grams
"to_hit" : 1, // To-hit bonus if using it as a melee weapon
"color" : "blue", // ASCII character colour
"intelligence" : 11, // Intelligence required to read this book without penalty
"symbol" : "?", // ASCII character used in-game
"material" : ["paper", "null"], // Material types. See materials.json for possible options
"volume" : 7, // Volume, measured in 1/4 liters
"bashing" : 5, // Bashing damage caused by using it as a melee weapon
"cutting" : 0, // Cutting damage caused by using it as a melee weapon
"time" : 35, // Time (in minutes) a single read session takes
"fun" : -2, // Morale bonus/penalty for reading
"skill" : "computer", // Skill raised
"price" : 500, // Used when bartering with NPCs
"required_level" : 2 // Minimum skill level required to learn
```
###COMESTIBLES
```C++
"type" : "COMESTIBLE", // Defines this as a COMESTIBLE
"id" : "crack", // Unique ID. Must be one continuous word, use underscores if necessary
"name" : "crack", // In-game name displayed
"weight" : 1, // Weight, measured in grams
"color" : "white", // ASCII character colour
"addiction_type" : "crack", // Addiction type
"spoils_in" : 0, // How long a comestible is good for. 0 = no spoilage
"use_action" : "CRACK", // What effects a comestible has when used
"stim" : 40, // Stimulant effect
"container" : "null", // What container stores this
"to_hit" : 0, // To-hit bonus if using it as a melee weapon
"comestible_type" : "MED", // Comestible type, used for inventory sorting
"symbol" : "!", // ASCII character used in-game
"quench" : 0, // Thirst quenched
"heal" : -2, // Health effects (used for sickness chances)
"addiction_potential" : 80, // Ability to cause addictions
"nutrition" : 0, // Hunger satisfied
"description" : "Refined cocaine, incredibly addictive.", // In-game description
"price" : 420, // Used when bartering with NPCs
"material" : "powder", // Material types. See materials.json for possible options
"tool" : "apparatus", // Tool required to be eaten/drank
"volume" : 1, // Volume, measured in 1/4 liters
"cutting" : 0, // Cutting damage caused by using it as a melee weapon
"phase" : "solid", // What phase it is
"charges" : 4, // Number of uses when spawned
"stack_size" : 8, // (Optional) How many uses are in the above-defined volume. If omitted, is the same as 'charges'
"bashing" : 0, // Bashing damage caused by using it as a melee weapon
"fun" : 50 // Morale effects when used
```
###CONTAINERS
```C++
"id": "keg", // Unique ID. Must be one continuous word, use underscores if necessary
"type": "CONTAINER", // Defines this as a CONTAINER
"symbol": ")", // ASCII character used in-game
"color": "light_cyan", // ASCII character colour
"name": "aluminum keg", // In-game name displayed
"description": "A reusable aluminum keg, used for shipping beer.\nIt has a capacity of 50 liters.", // In-game description
"price": 6000, // Used when bartering with NPCs
"weight": 13500, // Weight, measured in grams
"volume": 200, // Volume, measured in 1/4 liters
"bashing": -4, // Bashing damage caused by using it as a melee weapon
"cutting": 0, // Cutting damage caused by using it as a melee weapon
"to_hit": -4, // To-hit bonus if using it as a melee weapon
"material": "steel", // Material types. See materials.json for possible options
"contains": 200, // How much volume this container can hold
"flags": ["RIGID", "SEALS", "WATERTIGHT"] // Indicates special effects
```
###MELEE
```C++
"id": "hatchet", // Unique ID. Must be one continuous word, use underscores if necessary
"symbol": ";", // ASCII character used in-game
"color": "light_gray", // ASCII character colour
"name": "hatchet", // In-game name displayed
"description": "A one-handed hatchet. Makes a great melee weapon, and is useful both for cutting wood, and for use as a hammer.", // In-game description
"price": 95, // Used when bartering with NPCs
"material": ["iron", "wood"], // Material types. See materials.json for possible options
"weight": 907, // Weight, measured in grams
"volume": 6, // Volume, measured in 1/4 liters
"bashing": 12, // Bashing damage caused by using it as a melee weapon
"cutting": 12, // Cutting damage caused by using it as a melee weapon
"flags" : ["CHOP"], // Indicates special effects
"to_hit": 1 // To-hit bonus if using it as a melee weapon
```
###GUN
```C++
"id": "nailgun", // Unique ID. Must be one continuous word, use underscores if necessary
"type": "GUN", // Defines this as a GUN
"symbol": "(", // ASCII character used in-game
"color": "light_blue", // ASCII character colour
"name": "nail gun", // In-game name displayed
"description": "A tool used to drive nails into wood or other material. It could also be used as a ad-hoc weapon, or to practice your handgun skill up to level 1.", // In-game description
"price": 100, // Used when bartering with NPCs
"material": "iron", // Material types. See materials.json for possible options
"flags": "MODE_BURST", // Indicates special effects
"skill": "pistol", // Skill used for firing
"ammo": "nail", // Ammo type accepted for reloading
"weight": 2404, // Weight, measured in grams
"volume": 4, // Volume, measured in 1/4 liters
"bashing": 12, // Bashing damage caused by using it as a melee weapon
"cutting": 0, // Cutting damage caused by using it as a melee weapon
"to_hit": 1, // To-hit bonus if using it as a melee weapon
"ranged_damage": 0, // Ranged damage when fired
"range": 0, // Range when fired
"dispersion": 32, // Inaccuracy of gun, measured in quarter-degrees
"recoil": 0, // Recoil caused when firing
"durability": 8, // Resistance to damage/rusting, also determines misfire chance
"burst": 5, // Number of shots fired in burst mode
"clip_size": 100, // Maximum amount of ammo that can be loaded
"reload": 450 // Amount of time to reload, 100 = 6 seconds = 1 "turn"
```
###TOOLS
```C++
"id": "torch_lit", // Unique ID. Must be one continuous word, use underscores if necessary
"type": "TOOL", // Defines this as a TOOL
"symbol": "/", // ASCII character used in-game
"color": "brown", // ASCII character colour
"name": "torch (lit)", // In-game name displayed
"description": "A large stick, wrapped in gasoline soaked rags. This is burning, producing plenty of light", // In-game description
"price": 0, // Used when bartering with NPCs
"material": "wood", // Material types. See materials.json for possible options
"techniques": "FLAMING", // Combat techniques used by this tool
"flags": "FIRE", // Indicates special effects
"weight": 831, // Weight, measured in grams
"volume": 6, // Volume, measured in 1/4 liters
"bashing": 12, // Bashing damage caused by using it as a melee weapon
"cutting": 0, // Cutting damage caused by using it as a melee weapon
"to_hit": 3, // To-hit bonus if using it as a melee weapon
"max_charges": 75, // Maximum charges tool can hold
"initial_charges": 75, // Charges when spawned
"charges_per_use": 1, // Charges consumed per tool use
"turns_per_charge": 20, // Charges consumed over time
"ammo": "NULL", // Ammo type used for reloading
"revert_to": "torch_done", // Transforms into item when charges are expended
"use_action": "TORCH_LIT" // Action performed when tool is used
```
#json jsons
###FURNITURE
```C++
"type": "furniture", //Must always be 'furniture'
"name": "toilet", //Displayed name of the furniture
"symbol": "&", //Symbol displayed
"color": "white", //Glyph color. Alternately use 'bgcolor' to use a solid background color.
//You must use EXACTLY ONE of 'color' or 'bgcolor'.
"move_cost_mod": 2, //Movement cost modifier (-10 = impassable, 0 = no change)
"required_str": 18, //Strength required to move past the terrain easily
"flags": ["TRANSPARENT", "BASHABLE", "FLAMMABLE_HARD"], //Furniture flags
"examine_action": "toilet" //(OPTIONAL) Function called when examined, see iexamine.cpp.
//If omitted, defaults to iexamine::none.
```
###TERRAIN
```C++
"type": "terrain", //Must always be 'terrain'
"name": "spiked pit", //Displayed name of the terrain
"symbol": "0", //Symbol used
"color": "ltred", //Color of the symbol
"move_cost": 10, //Move cost to move through. 2 = normal speed, 0 = impassable
"trap": "spike_pit", //(OPTIONAL) trap_id minus the tr_ prefix of the trap type.
//If omitted, defaults to tr_null.
"flags": ["TRANSPARENT", "DIGGABLE"], //Terrain flags
"examine_action": "pit" //(OPTIONAL) Function called when examined, see iexamine.cpp.
//If omitted, defaults to iexamine::none.
```
-60
View File
@@ -1,60 +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.
An in-depth review of all json files and their appropriate fields is avaliable in
JSON_INFO.txt.
1) 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.
2) Adding an item
1) Open the appropriate json in data/raw/items and add your item near similar types.
1b) See JSON_INFO for a more in-depth review of each individual item .json file/flags
2) Add the item to item_groups.json to have it spawn in in-game locations
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 :-).
-154
View File
@@ -1,154 +0,0 @@
NOTE: ONLY SAVED FOR POSTERITY, PLEASE USE GIT FOR ALL NEW SUGGESTIONS/DISCUSSION
LONG-TERM FEATURES: Stuff I hope to finish in a year
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
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.
GENERAL:
More cultural references!
LOST: Black cloud monster, polar bear, hatches
Resident Evil style zombies
->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)
Configurable options:
Colors (e.g. highlight color, currently blue)
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
When picking items up, highlight useful ones in particular colors
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
Highlight or color-invert monsters that're fleeing; also make indifference
visually obvious in some way (change glyph foreground color?)
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
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
ITEMS / BIONICS:
Fire extinguisher bionic
Make this, and real fire extinguishers, more effective
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
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)
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:
Fruit drying; remove quench and some nutrition, but won't go bad
KEYBINDINGS/INPUT:
Make ctrl+movement equivalent to 'e'+movement
"Repeat last command" command
Macros--are they necessary or useful at all?
-9
View File
@@ -1,9 +0,0 @@
Come up with a release name at the absolute last second.
Update VERSION in Makefile and version.cpp for MSVC and C::B builds.
Bring changelog up to date if necessary.
Update MOTD.
Tag release.
Commit above (to trigger jenkins builds).
Sanity test jenkins builds.
Upload builds to github release page.
Post release thread in forum.
-6
View File
@@ -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.
-87
View File
@@ -1,87 +0,0 @@
Info on translating Cataclysm-DDA into another language.
TRANSLATORS
===========
The current official location for translating Cataclysm-DDA is at
[Launchpad Translations](https://translations.launchpad.net/cdda).
For the moment, there are separate locations for translating
[Chinese](https://translations.launchpad.net/cataclysm)
and [Russian](https://translations.launchpad.net/cataclysm-dda).
We will be merging these once translations have stabalized.
Using Launchpad Translations anyone can help translate.
All you need to do is set up a Launchpad account,
and tell it your preferred language.
After that, your language should show up for translation,
even if you are starting a new translation from scratch.
If you have any questions or comments about translation,
feel free to post in the "Translations Team Discussion" subforum of
[the Cataclysm-DDA forums](http://smf.cataclysmdda.com/).
There are some issues specific to Cataclysm-DDA,
(and some specific to translating computer programs in general,)
which translators should be aware of,
such as the use of terms like `%s` and `%3$d` (leave them as they are),
and the use of tags like `<name>` (don't translate the tags).
Information about these,
and any other issues specific to individual languages,
can be found in Cataclysm-DDA's `lang/notes/` folder.
General notes for all translators are in
`lang/notes/README_all_translators.txt`,
and notes specific to a language may be stored as `<lang_id>.txt`,
for example `lang/notes/de.txt` for German.
Cataclysm-DDA has more than 10,000 translatable strings,
but don't be discouraged.
The more translators there are,
the easier it becomes :).
MAINTAINERS
===========
Several steps need to be done in the correct order,
to correctly merge and maintain the translation files.
There are scripts available for these,
so usually the process will be as follows:
1. Download the translations in .po format from Launchpad.
2. Put them in `lang/incoming/`,
ensuring they are named consistently with the files in `lang/po/`.
3. Run `lang/update_pot.sh` to update `lang/po/cataclysm-dda.pot`.
4. Run `lang/merge_po.sh` to update `lang/po/*.po`.
This will also merge the translations from `lang/incoming/`.
These steps should be enough to keep the translation files up-to-date.
To compile the .po files into .mo files for use,
run `lang/compile_mo.sh`.
It will create a directory in `lang/mo/` for each language found.
Also note that both `lang/merge_po.sh` and `lang/compile_mo.sh`
accept arguments specifying which languages to merge or compile.
So to compile only the translation for, say, Traditional Chinese (zh_TW),
one would run `lang/compile_mo.sh zh_TW`.
After compiling the appropriate .mo file,
if your system is using that language,
the translations will be automatically used when you run cataclysm.
If your system locale is different from the one you want to test,
the easiest way to do so is to find out your locale identifier,
compile the translation you want to test,
then rename the directory in `lang/mo/` to your locale identifier.
So for example if your local language is New Zealand English (en_NZ),
and you want to test the Russian (ru) translation,
the steps would be `lang/compile_mo.sh ru`,
`mv lang/mo/ru lang/mo/en_NZ`,
`./cataclysm`.
-767
View File
@@ -1,767 +0,0 @@
#include "color.h"
#include "cursesdef.h"
#include "options.h"
#include "rng.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);
init_pair(31, COLOR_WHITE, COLOR_BLACK);
init_pair(32, COLOR_BLACK, COLOR_WHITE);
init_pair(33, COLOR_WHITE, COLOR_WHITE);
init_pair(34, COLOR_RED, COLOR_WHITE);
init_pair(35, COLOR_GREEN, COLOR_WHITE);
init_pair(36, COLOR_YELLOW, COLOR_WHITE);
init_pair(37, COLOR_BLUE, COLOR_WHITE);
init_pair(38, COLOR_MAGENTA, COLOR_WHITE);
init_pair(39, COLOR_CYAN, COLOR_WHITE);
init_pair(40, COLOR_BLACK, COLOR_GREEN);
init_pair(41, COLOR_WHITE, COLOR_GREEN);
init_pair(42, COLOR_RED, COLOR_GREEN);
init_pair(43, COLOR_GREEN, COLOR_GREEN);
init_pair(44, COLOR_YELLOW, COLOR_GREEN);
init_pair(45, COLOR_BLUE, COLOR_GREEN);
init_pair(46, COLOR_MAGENTA, COLOR_GREEN);
init_pair(47, COLOR_CYAN, COLOR_GREEN);
init_pair(48, COLOR_BLACK, COLOR_YELLOW);
init_pair(49, COLOR_WHITE, COLOR_YELLOW);
init_pair(50, COLOR_RED, COLOR_YELLOW);
init_pair(51, COLOR_GREEN, COLOR_YELLOW);
init_pair(52, COLOR_YELLOW, COLOR_YELLOW);
init_pair(53, COLOR_BLUE, COLOR_YELLOW);
init_pair(54, COLOR_MAGENTA, COLOR_YELLOW);
init_pair(55, COLOR_CYAN, COLOR_YELLOW);
init_pair(56, COLOR_BLACK, COLOR_MAGENTA);
init_pair(57, COLOR_WHITE, COLOR_MAGENTA);
init_pair(58, COLOR_RED, COLOR_MAGENTA);
init_pair(59, COLOR_GREEN, COLOR_MAGENTA);
init_pair(60, COLOR_YELLOW, COLOR_MAGENTA);
init_pair(61, COLOR_BLUE, COLOR_MAGENTA);
init_pair(62, COLOR_MAGENTA, COLOR_MAGENTA);
init_pair(63, COLOR_CYAN, COLOR_MAGENTA);
init_pair(64, COLOR_BLACK, COLOR_CYAN);
init_pair(65, COLOR_WHITE, COLOR_CYAN);
init_pair(66, COLOR_RED, COLOR_CYAN);
init_pair(67, COLOR_GREEN, COLOR_CYAN);
init_pair(68, COLOR_YELLOW, COLOR_CYAN);
init_pair(69, COLOR_BLUE, COLOR_CYAN);
init_pair(70, COLOR_MAGENTA, COLOR_CYAN);
init_pair(71, COLOR_CYAN, COLOR_CYAN);
}
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;
case c_unset : return 63;
case c_black_white : return 64;
case c_dkgray_white : return 65;
case c_ltgray_white : return 66;
case c_white_white : return 67;
case c_red_white : return 68;
case c_ltred_white : return 69;
case c_green_white : return 70;
case c_ltgreen_white : return 71;
case c_brown_white : return 72;
case c_yellow_white : return 73;
case c_blue_white : return 74;
case c_ltblue_white : return 75;
case c_magenta_white : return 76;
case c_pink_white : return 77;
case c_cyan_white : return 78;
case c_ltcyan_white : return 79;
case c_black_green : return 80;
case c_dkgray_green : return 81;
case c_ltgray_green : return 82;
case c_white_green : return 83;
case c_red_green : return 84;
case c_ltred_green : return 85;
case c_green_green : return 86;
case c_ltgreen_green : return 87;
case c_brown_green : return 88;
case c_yellow_green : return 89;
case c_blue_green : return 90;
case c_ltblue_green : return 91;
case c_magenta_green : return 92;
case c_pink_green : return 93;
case c_cyan_green : return 94;
case c_ltcyan_green : return 95;
case c_black_yellow : return 96;
case c_dkgray_yellow : return 97;
case c_ltgray_yellow : return 98;
case c_white_yellow : return 99;
case c_red_yellow : return 100;
case c_ltred_yellow : return 101;
case c_green_yellow : return 102;
case c_ltgreen_yellow : return 103;
case c_brown_yellow : return 104;
case c_yellow_yellow : return 105;
case c_blue_yellow : return 106;
case c_ltblue_yellow : return 107;
case c_magenta_yellow : return 108;
case c_pink_yellow : return 109;
case c_cyan_yellow : return 110;
case c_ltcyan_yellow : return 111;
case c_black_magenta : return 112;
case c_dkgray_magenta : return 113;
case c_ltgray_magenta : return 114;
case c_white_magenta : return 115;
case c_red_magenta : return 116;
case c_ltred_magenta : return 117;
case c_green_magenta : return 118;
case c_ltgreen_magenta : return 119;
case c_brown_magenta : return 120;
case c_yellow_magenta : return 121;
case c_blue_magenta : return 122;
case c_ltblue_magenta : return 123;
case c_magenta_magenta : return 124;
case c_pink_magenta : return 125;
case c_cyan_magenta : return 126;
case c_ltcyan_magenta : return 127;
case c_black_cyan : return 128;
case c_dkgray_cyan : return 129;
case c_ltgray_cyan : return 130;
case c_white_cyan : return 131;
case c_red_cyan : return 132;
case c_ltred_cyan : return 133;
case c_green_cyan : return 134;
case c_ltgreen_cyan : return 135;
case c_brown_cyan : return 136;
case c_yellow_cyan : return 137;
case c_blue_cyan : return 138;
case c_ltblue_cyan : return 139;
case c_magenta_cyan : return 140;
case c_pink_cyan : return 141;
case c_cyan_cyan : return 142;
case c_ltcyan_cyan : return 143;
}
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 ;
case 63: return c_unset;
case 64: return c_black_white;
case 65: return c_dkgray_white;
case 66: return c_ltgray_white;
case 67: return c_white_white;
case 68: return c_red_white;
case 69: return c_ltred_white;
case 70: return c_green_white;
case 71: return c_ltgreen_white;
case 72: return c_brown_white;
case 73: return c_yellow_white;
case 74: return c_blue_white;
case 75: return c_ltblue_white;
case 76: return c_magenta_white;
case 77: return c_pink_white;
case 78: return c_cyan_white;
case 79: return c_ltcyan_white;
case 80: return c_black_green;
case 81: return c_dkgray_green;
case 82: return c_ltgray_green;
case 83: return c_white_green;
case 84: return c_red_green;
case 85: return c_ltred_green;
case 86: return c_green_green;
case 87: return c_ltgreen_green;
case 88: return c_brown_green;
case 89: return c_yellow_green;
case 90: return c_blue_green;
case 91: return c_ltblue_green;
case 92: return c_magenta_green;
case 93: return c_pink_green;
case 94: return c_cyan_green;
case 95: return c_ltcyan_green;
case 96: return c_black_yellow;
case 97: return c_dkgray_yellow;
case 98: return c_ltgray_yellow;
case 99: return c_white_yellow;
case 100: return c_red_yellow;
case 101: return c_ltred_yellow;
case 102: return c_green_yellow;
case 103: return c_ltgreen_yellow;
case 104: return c_brown_yellow;
case 105: return c_yellow_yellow;
case 106: return c_blue_yellow;
case 107: return c_ltblue_yellow;
case 108: return c_magenta_yellow;
case 109: return c_pink_yellow;
case 110: return c_cyan_yellow;
case 111: return c_ltcyan_yellow;
case 112: return c_black_magenta;
case 113: return c_dkgray_magenta;
case 114: return c_ltgray_magenta;
case 115: return c_white_magenta;
case 116: return c_red_magenta;
case 117: return c_ltred_magenta;
case 118: return c_green_magenta;
case 119: return c_ltgreen_magenta;
case 120: return c_brown_magenta;
case 121: return c_yellow_magenta;
case 122: return c_blue_magenta;
case 123: return c_ltblue_magenta;
case 124: return c_magenta_magenta;
case 125: return c_pink_magenta;
case 126: return c_cyan_magenta;
case 127: return c_ltcyan_magenta;
case 128: return c_black_cyan;
case 129: return c_dkgray_cyan;
case 130: return c_ltgray_cyan;
case 131: return c_white_cyan;
case 132: return c_red_cyan;
case 133: return c_ltred_cyan;
case 134: return c_green_cyan;
case 135: return c_ltgreen_cyan;
case 136: return c_brown_cyan;
case 137: return c_yellow_cyan;
case 138: return c_blue_cyan;
case 139: return c_ltblue_cyan;
case 140: return c_magenta_cyan;
case 141: return c_pink_cyan;
case 142: return c_cyan_cyan;
case 143: return c_ltcyan_cyan;
}
return c_black;
}
nc_color hilite(nc_color c)
{
switch (c) {
case c_white: return h_white;
case c_ltgray: return h_ltgray;
case c_dkgray: return h_dkgray;
case c_red: return h_red;
case c_green: return h_green;
case c_blue: return h_blue;
case c_cyan: return h_cyan;
case c_magenta: return h_magenta;
case c_brown: return h_brown;
case c_ltred: return h_ltred;
case c_ltgreen: return h_ltgreen;
case c_ltblue: return h_ltblue;
case c_ltcyan: return h_ltcyan;
case c_pink: return h_pink;
case c_yellow: return h_yellow;
}
return h_white;
}
nc_color invert_color(nc_color c)
{
if (OPTIONS["NO_BRIGHT_BACKGROUNDS"]) {
switch (c) {
case c_white:
case c_ltgray:
case c_dkgray: return i_ltgray;
case c_red:
case c_ltred: return i_red;
case c_green:
case c_ltgreen: return i_green;
case c_blue:
case c_ltblue: return i_blue;
case c_cyan:
case c_ltcyan: return i_cyan;
case c_magenta:
case c_pink: return i_magenta;
case c_brown:
case c_yellow: return i_brown;
}
}
switch (c) {
case c_white: return i_white;
case c_ltgray: return i_ltgray;
case c_dkgray: return i_dkgray;
case c_red: return i_red;
case c_green: return i_green;
case c_blue: return i_blue;
case c_cyan: return i_cyan;
case c_magenta: return i_magenta;
case c_brown: return i_brown;
case c_yellow: return i_yellow;
case c_ltred: return i_ltred;
case c_ltgreen: return i_ltgreen;
case c_ltblue: return i_ltblue;
case c_ltcyan: return i_ltcyan;
case c_pink: return i_pink;
}
return c_pink;
}
nc_color red_background(nc_color c)
{
switch (c) {
case c_white: return c_white_red;
case c_ltgray: return c_ltgray_red;
case c_dkgray: return c_dkgray_red;
case c_red: return c_red_red;
case c_green: return c_green_red;
case c_blue: return c_blue_red;
case c_cyan: return c_cyan_red;
case c_magenta: return c_magenta_red;
case c_brown: return c_brown_red;
case c_ltred: return c_ltred_red;
case c_ltgreen: return c_ltgreen_red;
case c_ltblue: return c_ltblue_red;
case c_ltcyan: return c_ltcyan_red;
case c_pink: return c_pink_red;
case c_yellow: return c_yellow_red;
}
return c_white_red;
}
/// colors need to be totally redone, really..
nc_color white_background(nc_color c)
{
switch (c) {
case c_black: return c_black_white;
case c_dkgray: return c_dkgray_white;
case c_ltgray: return c_ltgray_white;
case c_white: return c_white_white;
case c_red: return c_red_white;
case c_ltred: return c_ltred_white;
case c_green: return c_green_white;
case c_ltgreen: return c_ltgreen_white;
case c_brown: return c_brown_white;
case c_yellow: return c_yellow_white;
case c_blue: return c_blue_white;
case c_ltblue: return c_ltblue_white;
case c_magenta: return c_magenta_white;
case c_pink: return c_pink_white;
case c_cyan: return c_cyan_white;
case c_ltcyan: return c_ltcyan_white;
default: return c_black_white;
}
}
nc_color green_background(nc_color c)
{
switch (c) {
case c_black: return c_black_green;
case c_dkgray: return c_dkgray_green;
case c_ltgray: return c_ltgray_green;
case c_white: return c_white_green;
case c_red: return c_red_green;
case c_ltred: return c_ltred_green;
case c_green: return c_green_green;
case c_ltgreen: return c_ltgreen_green;
case c_brown: return c_brown_green;
case c_yellow: return c_yellow_green;
case c_blue: return c_blue_green;
case c_ltblue: return c_ltblue_green;
case c_magenta: return c_magenta_green;
case c_pink: return c_pink_green;
case c_cyan: return c_cyan_green;
case c_ltcyan: return c_ltcyan_green;
default: return c_black_green;
}
}
nc_color yellow_background(nc_color c)
{
switch (c) {
case c_black: return c_black_yellow;
case c_dkgray: return c_dkgray_yellow;
case c_ltgray: return c_ltgray_yellow;
case c_white: return c_white_yellow;
case c_red: return c_red_yellow;
case c_ltred: return c_ltred_yellow;
case c_green: return c_green_yellow;
case c_ltgreen: return c_ltgreen_yellow;
case c_brown: return c_brown_yellow;
case c_yellow: return c_yellow_yellow;
case c_blue: return c_blue_yellow;
case c_ltblue: return c_ltblue_yellow;
case c_magenta: return c_magenta_yellow;
case c_pink: return c_pink_yellow;
case c_cyan: return c_cyan_yellow;
case c_ltcyan: return c_ltcyan_yellow;
default: return c_black_yellow;
}
}
nc_color magenta_background(nc_color c)
{
switch (c) {
case c_black: return c_black_magenta;
case c_dkgray: return c_dkgray_magenta;
case c_ltgray: return c_ltgray_magenta;
case c_white: return c_white_magenta;
case c_red: return c_red_magenta;
case c_ltred: return c_ltred_magenta;
case c_green: return c_green_magenta;
case c_ltgreen: return c_ltgreen_magenta;
case c_brown: return c_brown_magenta;
case c_yellow: return c_yellow_magenta;
case c_blue: return c_blue_magenta;
case c_ltblue: return c_ltblue_magenta;
case c_magenta: return c_magenta_magenta;
case c_pink: return c_pink_magenta;
case c_cyan: return c_cyan_magenta;
case c_ltcyan: return c_ltcyan_magenta;
default: return c_black_magenta;
}
}
nc_color cyan_background(nc_color c)
{
switch (c) {
case c_black: return c_black_cyan;
case c_dkgray: return c_dkgray_cyan;
case c_ltgray: return c_ltgray_cyan;
case c_white: return c_white_cyan;
case c_red: return c_red_cyan;
case c_ltred: return c_ltred_cyan;
case c_green: return c_green_cyan;
case c_ltgreen: return c_ltgreen_cyan;
case c_brown: return c_brown_cyan;
case c_yellow: return c_yellow_cyan;
case c_blue: return c_blue_cyan;
case c_ltblue: return c_ltblue_cyan;
case c_magenta: return c_magenta_cyan;
case c_pink: return c_pink_cyan;
case c_cyan: return c_cyan_cyan;
case c_ltcyan: return c_ltcyan_cyan;
default: return c_black_cyan;
}
}
nc_color rand_color()
{
switch (rng(0, 9)) {
case 0: return c_white;
case 1: return c_ltgray;
case 2: return c_green;
case 3: return c_red;
case 4: return c_yellow;
case 5: return c_blue;
case 6: return c_ltblue;
case 7: return c_pink;
case 8: return c_magenta;
case 9: return c_brown;
}
return c_dkgray;
}
/**
* Given the name of a color, returns the nc_color constant that matches. If
* no match is found, c_white is returned.
* @param new_color The color to get, as a std::string.
* @return The nc_color constant that matches the input.
*/
nc_color color_from_string(std::string new_color){
if("red"==new_color){
return c_red;
} else if("blue"==new_color){
return c_blue;
} else if("green"==new_color){
return c_green;
} else if("light_cyan"==new_color || "ltcyan"==new_color){
return c_ltcyan;
} else if("brown"==new_color){
return c_brown;
} else if("light_red"==new_color || "ltred"==new_color){
return c_ltred;
} else if("white"==new_color){
return c_white;
} else if("black"==new_color){
return c_black;
} else if("light_blue"==new_color || "ltblue"==new_color){
return c_ltblue;
} else if("yellow"==new_color){
return c_yellow;
} else if("magenta"==new_color){
return c_magenta;
} else if("cyan"==new_color){
return c_cyan;
} else if("light_gray"==new_color || "ltgray"==new_color){
return c_ltgray;
} else if("dark_gray"==new_color || "dkgray"==new_color){
return c_dkgray;
} else if("light_green"==new_color || "ltgreen"==new_color){
return c_ltgreen;
} else if("pink"==new_color){
return c_pink;
} else if("white_red"==new_color){
return c_white_red;
} else if("ltgray_red"==new_color || "light_gray_red"==new_color){
return c_ltgray_red;
} else if("dkgray_red"==new_color || "dark_gray_red"==new_color){
return c_dkgray_red;
} else if("red_red"==new_color){
return c_red_red;
} else if("green_red"==new_color){
return c_green_red;
} else if("blue_red"==new_color){
return c_blue_red;
} else if("cyan_red"==new_color){
return c_cyan_red;
} else if("magenta_red"==new_color){
return c_magenta_red;
} else if("brown_red"==new_color){
return c_brown_red;
} else if("ltred_red"==new_color || "light_red_red"==new_color){
return c_ltred_red;
} else if("ltgreen_red"==new_color || "light_green_red"==new_color){
return c_ltgreen_red;
} else if("ltblue_red"==new_color || "light_blue_red"==new_color){
return c_ltblue_red;
} else if("ltcyan_red"==new_color || "light_cyan_red"==new_color){
return c_ltcyan_red;
} else if("pink_red"==new_color){
return c_pink_red;
} else if("yellow_red"==new_color){
return c_yellow_red;
} else {
return c_white;
}
}
/**
* Given the name of a background color (that is, one of the i_xxxxx colors),
* returns the nc_color constant that matches. If no match is found, i_white is
* returned.
* @param new_color The color to get, as a std::string.
* @return The nc_color constant that matches the input.
*/
nc_color bgcolor_from_string(std::string new_color) {
if("black" == new_color) {
return i_black;
} else if("white" == new_color) {
return i_white;
} else if("light_gray" == new_color || "ltgray" == new_color) {
return i_ltgray;
} else if("dark_gray" == new_color || "dkgray" == new_color) {
return i_dkgray;
} else if("red" == new_color) {
return i_red;
} else if("green" == new_color) {
return i_green;
} else if("blue" == new_color) {
return i_blue;
} else if("cyan" == new_color) {
return i_cyan;
} else if("magenta" == new_color) {
return i_magenta;
} else if("brown" == new_color) {
return i_brown;
} else if("light_red" == new_color || "ltred" == new_color) {
return i_ltred;
} else if("light_blue" == new_color || "ltblue" == new_color) {
return i_ltblue;
} else if("light_cyan" == new_color || "ltcyan" == new_color) {
return i_ltcyan;
} else if("pink" == new_color) {
return i_pink;
} else if("yellow" == new_color) {
return i_yellow;
} else {
return i_white;
}
}
nc_color get_color_from_tag(const std::string &s, const nc_color base_color)
{
if (s.empty() || s[0] != '<' || s.substr(0,8) == "</color>") {
return base_color;
}
if (s.substr(0,7) != "<color_") {
return base_color;
}
size_t tag_close = s.find('>');
if (tag_close == std::string::npos) {
return base_color;
}
std::string color_name = s.substr(7,tag_close-7);
return color_from_string(color_name);
}
-194
View File
@@ -1,194 +0,0 @@
#ifndef _COLOR_H_
#define _COLOR_H_
#ifndef _COLOR_LIST_
#define _COLOR_LIST_
#include "json.h"
#include "cursesdef.h"
#include <string>
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,
c_unset = COLOR_PAIR(31),
c_black_white = COLOR_PAIR(32),
c_dkgray_white = COLOR_PAIR(32) | A_BOLD,
c_ltgray_white = COLOR_PAIR(33),
c_white_white = COLOR_PAIR(33) | A_BOLD,
c_red_white = COLOR_PAIR(34),
c_ltred_white = COLOR_PAIR(34) | A_BOLD,
c_green_white = COLOR_PAIR(35),
c_ltgreen_white = COLOR_PAIR(35) | A_BOLD,
c_brown_white = COLOR_PAIR(36),
c_yellow_white = COLOR_PAIR(36) | A_BOLD,
c_blue_white = COLOR_PAIR(37),
c_ltblue_white = COLOR_PAIR(37) | A_BOLD,
c_magenta_white = COLOR_PAIR(38),
c_pink_white = COLOR_PAIR(38) | A_BOLD,
c_cyan_white = COLOR_PAIR(39),
c_ltcyan_white = COLOR_PAIR(39) | A_BOLD,
c_black_green = COLOR_PAIR(40),
c_dkgray_green = COLOR_PAIR(40) | A_BOLD,
c_ltgray_green = COLOR_PAIR(41),
c_white_green = COLOR_PAIR(41) | A_BOLD,
c_red_green = COLOR_PAIR(42),
c_ltred_green = COLOR_PAIR(42) | A_BOLD,
c_green_green = COLOR_PAIR(43),
c_ltgreen_green = COLOR_PAIR(43) | A_BOLD,
c_brown_green = COLOR_PAIR(44),
c_yellow_green = COLOR_PAIR(44) | A_BOLD,
c_blue_green = COLOR_PAIR(45),
c_ltblue_green = COLOR_PAIR(45) | A_BOLD,
c_magenta_green = COLOR_PAIR(46),
c_pink_green = COLOR_PAIR(46) | A_BOLD,
c_cyan_green = COLOR_PAIR(47),
c_ltcyan_green = COLOR_PAIR(47) | A_BOLD,
c_black_yellow = COLOR_PAIR(48),
c_dkgray_yellow = COLOR_PAIR(48) | A_BOLD,
c_ltgray_yellow = COLOR_PAIR(49),
c_white_yellow = COLOR_PAIR(49) | A_BOLD,
c_red_yellow = COLOR_PAIR(50),
c_ltred_yellow = COLOR_PAIR(50) | A_BOLD,
c_green_yellow = COLOR_PAIR(51),
c_ltgreen_yellow = COLOR_PAIR(51) | A_BOLD,
c_brown_yellow = COLOR_PAIR(52),
c_yellow_yellow = COLOR_PAIR(52) | A_BOLD,
c_blue_yellow = COLOR_PAIR(53),
c_ltblue_yellow = COLOR_PAIR(53) | A_BOLD,
c_magenta_yellow = COLOR_PAIR(54),
c_pink_yellow = COLOR_PAIR(54) | A_BOLD,
c_cyan_yellow = COLOR_PAIR(55),
c_ltcyan_yellow = COLOR_PAIR(55) | A_BOLD,
c_black_magenta = COLOR_PAIR(56),
c_dkgray_magenta = COLOR_PAIR(56) | A_BOLD,
c_ltgray_magenta = COLOR_PAIR(57),
c_white_magenta = COLOR_PAIR(57) | A_BOLD,
c_red_magenta = COLOR_PAIR(58),
c_ltred_magenta = COLOR_PAIR(58) | A_BOLD,
c_green_magenta = COLOR_PAIR(59),
c_ltgreen_magenta = COLOR_PAIR(59) | A_BOLD,
c_brown_magenta = COLOR_PAIR(60),
c_yellow_magenta = COLOR_PAIR(60) | A_BOLD,
c_blue_magenta = COLOR_PAIR(61),
c_ltblue_magenta = COLOR_PAIR(61) | A_BOLD,
c_magenta_magenta = COLOR_PAIR(62),
c_pink_magenta = COLOR_PAIR(62) | A_BOLD,
c_cyan_magenta = COLOR_PAIR(63),
c_ltcyan_magenta = COLOR_PAIR(63) | A_BOLD,
c_black_cyan = COLOR_PAIR(64),
c_dkgray_cyan = COLOR_PAIR(64) | A_BOLD,
c_ltgray_cyan = COLOR_PAIR(65),
c_white_cyan = COLOR_PAIR(65) | A_BOLD,
c_red_cyan = COLOR_PAIR(66),
c_ltred_cyan = COLOR_PAIR(66) | A_BOLD,
c_green_cyan = COLOR_PAIR(67),
c_ltgreen_cyan = COLOR_PAIR(67) | A_BOLD,
c_brown_cyan = COLOR_PAIR(68),
c_yellow_cyan = COLOR_PAIR(68) | A_BOLD,
c_blue_cyan = COLOR_PAIR(69),
c_ltblue_cyan = COLOR_PAIR(69) | A_BOLD,
c_magenta_cyan = COLOR_PAIR(70),
c_pink_cyan = COLOR_PAIR(70) | A_BOLD,
c_cyan_cyan = COLOR_PAIR(71),
c_ltcyan_cyan = COLOR_PAIR(71) | A_BOLD
};
int color_to_int(nc_color col);
nc_color int_to_color(int key);
nc_color hilite(nc_color c);
nc_color invert_color(nc_color c);
nc_color red_background(nc_color c);
nc_color white_background(nc_color c);
nc_color green_background(nc_color c);
nc_color yellow_background(nc_color c);
nc_color magenta_background(nc_color c);
nc_color cyan_background(nc_color c);
nc_color rand_color();
nc_color color_from_string(std::string color);
nc_color bgcolor_from_string(std::string color);
nc_color get_color_from_tag(const std::string &s, const nc_color base_color);
void setattr(nc_color &col, col_attribute attr);
void load_colors(JsonObject &jo);
#endif
#endif
-1617
View File
File diff suppressed because it is too large Load Diff
-153
View File
@@ -1,153 +0,0 @@
#ifndef _COMPUTER_H_
#define _COMPUTER_H_
#include "output.h"
#include "json.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?
static void load_lab_note(JsonObject &jsobj);
private:
// Difficulty of simply logging in
int security;
// Things we can do
std::vector<computer_option> options;
// Things that happen if we fail a hack
std::vector<computer_failure> failures;
// Output window
WINDOW *w_terminal;
// Pretty border
WINDOW *w_border;
// Misc research notes from json
static std::vector<std::string> lab_notes;
// 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, ...);
// Wraps and prints a block of text with a 1-space indent
void print_text(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, ...);
// Move the cursor to the beginning of the next line
void print_newline();
};
#endif
-1210
View File
File diff suppressed because it is too large Load Diff
-84
View File
@@ -1,84 +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_t Furniture, int Time) :
terrain (t_null), furniture (Furniture.loadid), 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
bool loopstages;
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),
bool LoopStages = false) :
id (Id), name (Name), difficulty (Diff), loopstages (LoopStages), 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_cart(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);
};
+56
View File
@@ -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
-100
View File
@@ -1,100 +0,0 @@
#ifndef _COORDINATES_H_
#define _COORDINATES_H_
#include <stdlib.h>
#include <vector>
#include <string>
#include <set>
#include <map>
#include "mapdata.h"
#include "overmap.h"
/* find appropriate subdivided coordinates for absolute tile coordinate.
* This is less obvious than one might think, for negative coordinates, so this
* was created to give a definitive answer.
*
* 'absolute' is defined as the -actual- submap x,y * 12 + position in submap, and
* can be obtained from map.getabs(x, y);
* usage:
* real_coords rc( g->m.getabs(g->u.posx, g->u.posy ) );
*/
struct real_coords {
static const int tiles_in_sub = SEEX;
static const int tiles_in_sub_n = tiles_in_sub - 1;
static const int subs_in_om = OMAPX * 2;
static const int subs_in_om_n = subs_in_om - 1;
point abs_pos; // 1 per tile, starting from tile 0,0 of submap 0,0 of overmap 0,0
point abs_sub; // submap: 12 tiles.
point abs_om; // overmap: 360 submaps.
point sub_pos; // coordinate (0-11) in submap / abs_pos constrained to % 12.
point om_pos; // overmap tile: 2x2 submaps.
point om_sub; // submap (0-359) in overmap / abs_sub constrained to % 360. equivalent to g->levx
real_coords() {
}
real_coords(point ap) {
fromabs( ap.x, ap.y );
}
void fromabs(const int absx, const int absy) {
const int normx = abs(absx);
const int normy = abs(absy);
abs_pos = point(absx, absy);
if ( absx < 0 ) {
abs_sub.x = (absx-11)/12;
sub_pos.x = 11-((normx-1) % 12);
abs_om.x = (abs_sub.x-subs_in_om_n)/subs_in_om;
om_sub.x = subs_in_om_n-(((normx-1)/12) % subs_in_om);
} else {
abs_sub.x = normx/12;
sub_pos.x = absx % 12;
abs_om.x = abs_sub.x/subs_in_om;
om_sub.x = abs_sub.x % subs_in_om;
}
om_pos.x = om_sub.x / 2;
if ( absy < 0 ) {
abs_sub.y = (absy-11)/12;
sub_pos.y = 11-((normy-1) % 12);
abs_om.y = (abs_sub.y-subs_in_om_n)/subs_in_om;
om_sub.y = subs_in_om_n-(((normy-1)/12) % subs_in_om);
} else {
abs_sub.y = normy/12;
sub_pos.y = absy % 12;
abs_om.y = abs_sub.y/subs_in_om;
om_sub.y = abs_sub.y % subs_in_om;
}
om_pos.y = om_sub.y / 2;
}
void fromabs(point absolute) {
fromabs(absolute.x, absolute.y);
}
// specifically for the subjective position returned by overmap::draw
void fromomap( int rel_omx, int rel_omy, int rel_om_posx, int rel_om_posy ) {
int ax=(rel_omx*OMAPX) + rel_om_posx;
int ay=(rel_omy*OMAPY) + rel_om_posy;
fromabs(ax*24, ay*24);
}
// helper functions to return abs_pos of submap/overmap tile/overmap's start
point begin_sub() {
return point( abs_sub.x * tiles_in_sub, abs_sub.y * tiles_in_sub );
}
point begin_om_pos() {
return point( (abs_om.x * subs_in_om * tiles_in_sub) + ( om_pos.x * 2 * tiles_in_sub ),
(abs_om.y * subs_in_om * tiles_in_sub) + ( om_pos.y * 2 * tiles_in_sub ) );
}
point begin_om() {
return point( abs_om.x * subs_in_om * tiles_in_sub, abs_om.y * subs_in_om * tiles_in_sub);
}
};
#endif
-1693
View File
File diff suppressed because it is too large Load Diff
-122
View File
@@ -1,122 +0,0 @@
#ifndef _CRAFTING_H_
#define _CRAFTING_H_
#include <string>
#include <vector>
#include <map>
#include "itype.h"
#include "skill.h"
#include "rng.h"
#include "json.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 quality_requirement
{
std::string id;
int count;
bool available;
int level;
quality_requirement() { id = "UNKNOWN"; count = 0; available = false; level = 0;}
quality_requirement(std::string new_id, int new_count, int new_level){
id = new_id;
count = new_count;
level = new_level;
available = false;
}
};
struct quality
{
std::string id;
std::string name;
};
struct recipe {
std::string ident;
int id;
itype_id result;
craft_cat cat;
Skill *skill_used;
std::map<Skill*,int> required_skills;
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<quality_requirement> qualities;
std::vector<std::vector<component> > components;
//Create a string list to describe the skill requirements fir this recipe
// Format: skill_name(amount), skill_name(amount)
std::string required_skills_string(){
std::ostringstream skills_as_stream;
if(!required_skills.empty()){
for(std::map<Skill*,int>::iterator iter=required_skills.begin(); iter!=required_skills.end();){
skills_as_stream << iter->first->name() << "(" << iter->second << ")";
++iter;
if(iter != required_skills.end()){
skills_as_stream << ", ";
}
}
}
else{
skills_as_stream << "N/A";
}
return skills_as_stream.str();
}
recipe() {
id = 0;
result = "null";
skill_used = NULL;
difficulty = 0;
time = 0;
reversible = false;
autolearn = false;
learn_by_disassembly = -1;
}
recipe(std::string pident, int pid, itype_id pres, craft_cat pcat, std::string &to_use,
std::map<std::string,int> &to_require, 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) {
skill_used = to_use.size()?Skill::skill(to_use):NULL;
if(!to_require.empty()){
for(std::map<std::string,int>::iterator iter=to_require.begin(); iter!=to_require.end(); ++iter){
required_skills[Skill::skill(iter->first)] = iter->second;
}
}
}
};
typedef std::vector<recipe*> recipe_list;
typedef std::map<craft_cat, recipe_list> recipe_map;
void load_recipe_category(JsonObject &jsobj);
void load_recipe(JsonObject &jsobj);
recipe* recipe_by_name(std::string name);
void finalize_recipes();
extern recipe_map recipes; // The list of valid recipes
void load_quality(JsonObject &jo);
extern std::map<std::string,quality> qualities;
#endif
-14
View File
@@ -1,14 +0,0 @@
#ifndef _CURSES_DEF_H_
#define _CURSES_DEF_H_
#if (defined TILES || defined SDLTILES || defined _WIN32 || defined WINDOWS)
#include "catacurse.h"
#elif (defined __CYGWIN__)
#include "input_defs.h"
#include "ncurses/curses.h"
#else
#include "input_defs.h"
#include <curses.h>
#endif
#endif // CURSES_DEF_H
-721
View File
@@ -1,721 +0,0 @@
#if (defined TILES || defined _WIN32 || defined WINDOWS)
#include "catacurse.h"
#include "output.h"
#include "color.h"
#include "catacharset.h"
//***********************************
//Globals *
//***********************************
WINDOW *mainwin;
WINDOW *stdscr;
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.
//***********************************
//Pseudo-Curses Functions *
//***********************************
//Basic Init, create the font, backbuffer, etc
WINDOW *initscr(void)
{
stdscr = curses_init();
return stdscr;
}
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->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;
}
}
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) {
for (j = 1; j < win->height - 1; j++) {
mvwaddch(win, j, 0, ls);
}
} else {
for (j = 1; j < win->height - 1; j++) {
mvwaddch(win, j, 0, LINE_XOXO);
}
}
if (rs) {
for (j = 1; j < win->height - 1; j++) {
mvwaddch(win, j, win->width - 1, rs);
}
} else {
for (j = 1; j < win->height - 1; j++) {
mvwaddch(win, j, win->width - 1, LINE_XOXO);
}
}
if (ts) {
for (i = 1; i < win->width - 1; i++) {
mvwaddch(win, 0, i, ts);
}
} else {
for (i = 1; i < win->width - 1; i++) {
mvwaddch(win, 0, i, LINE_OXOX);
}
}
if (bs) {
for (i = 1; i < win->width - 1; i++) {
mvwaddch(win, win->height - 1, i, bs);
}
} else {
for (i = 1; i < win->width - 1; i++) {
mvwaddch(win, win->height - 1, i, LINE_OXOX);
}
}
if (tl) {
mvwaddch(win, 0, 0, tl);
} else {
mvwaddch(win, 0, 0, LINE_OXXO);
}
if (tr) {
mvwaddch(win, 0, win->width - 1, tr);
} else {
mvwaddch(win, 0, win->width - 1, LINE_OOXX);
}
if (bl) {
mvwaddch(win, win->height - 1, 0, bl);
} else {
mvwaddch(win, win->height - 1, 0, LINE_XXOO);
}
if (br) {
mvwaddch(win, win->height - 1, win->width - 1, br);
} else {
mvwaddch(win, win->height - 1, win->width - 1, LINE_XOOX);
}
//methods above move the cursor, put it back
wmove(win, oldy, oldx);
wattroff(win, c_white);
return 1;
}
int hline(chtype ch, int n)
{
return whline(mainwin, ch, n);
}
int vline(chtype ch, int n)
{
return wvline(mainwin, ch, n);
}
int whline(WINDOW *win, chtype ch, int n)
{
return mvwvline(mainwin, win->cursory, win->cursorx, ch, n);
}
int wvline(WINDOW *win, chtype ch, int n)
{
return mvwvline(mainwin, win->cursory, win->cursorx, ch, n);
}
int mvhline(int y, int x, chtype ch, int n)
{
return mvwhline(mainwin, y, x, ch, n);
}
int mvvline(int y, int x, chtype ch, int n)
{
return mvwvline(mainwin, y, x, ch, n);
}
int mvwhline(WINDOW *win, int y, int x, chtype ch, int n)
{
if (ch) {
for (int i = 0; i < n; i++) {
mvwaddch(win, y, x + i, ch);
}
} else {
for (int i = 0; i < n; i++) {
mvwaddch(win, y, x + i, LINE_OXOX);
}
}
return 0;
}
int mvwvline(WINDOW *win, int y, int x, chtype ch, int n)
{
if (ch) {
for (int j = 0; j < n; j++) {
mvwaddch(win, y + j, x, ch);
}
} else {
for (int j = 0; j < n; j++) {
mvwaddch(win, y + j, x, LINE_XOXO);
}
}
return 0;
}
//Refreshes a window, causing it to redraw on top.
int wrefresh(WINDOW *win)
{
if (win->draw) {
curses_drawwindow(win);
}
return 1;
}
//Refreshes the main window, 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(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(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.
} 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 the main window, 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 the main window 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 the main window 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 the main window 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)
{
return win->width;
}
//gets the max y of a window (the height)
int getmaxy(WINDOW *win)
{
return win->height;
}
//gets the beginning x of a window (the x pos)
int getbegx(WINDOW *win)
{
return win->x;
}
//gets the beginning y of a window (the y pos)
int getbegy(WINDOW *win)
{
return win->y;
}
//gets the current cursor x position in a window
int getcurx(WINDOW *win)
{
return win->cursorx;
}
//gets the current cursor y position in a window
int getcury(WINDOW *win)
{
return win->cursory;
}
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(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);
}
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;
}
//Move the cursor of the main window
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
-5
View File
@@ -1,5 +0,0 @@
# These are all generated if missing at program startup
keymap.txt
options.txt
auto_pickup.txt
fontlist.txt
-3
View File
@@ -1,3 +0,0 @@
Terminus
8
16
BIN
View File
Binary file not shown.

Before

Width:  |  Height:  |  Size: 66 KiB

-698
View File
@@ -1,698 +0,0 @@
0.9
Highlights:
---
World Factory: Multiple worlds managed at once.
New mutation categories.
TsuTiles.
Basic mouse support in SDL builds.
Vehicle constructon system rework.
Backward compatability with 0.8 saves.
Unbielievable amount of new content.
Features:
---
New mutation categories.
Blob drops are semi-useful.
World Factory: Multiple worlds managed at once.
Single keypress pulping.
Better Basements.
Dynamically swap between text and tiles, and amoung tilesets.
Funnels catch water when the player is far away.
TsuTiles.
Curvy roads.
Zombears.
V menu now lists monsters too.
Emergency vehicles.
Shia's back.
Doors tougher, but zombies can pile on when trying to bash through them.
Spawning monsters in packs.
Shopping carts are driveable.
Basic mouse support in SDL builds.
Food dehydrator.
Some clothes have hoods that are used automaticlly if there's no hat in the way.
Only prompt to confirm butchering if there are hostiles nearby.
Books have chapters.
Better furniture dragging interface with 'G'rab.
More cart types, hot dog, welding, luggage; swivel chairs.
Track more stuff for memorial file.
Basic tool quality support for more streamlined crafting recipes.
Fungaloid rework.
Vehicle workbench like components act like tools.
Huge pile o books.
Furniture and terrain definitions moved to json.
Survivor armor.
Large numbers of wild animals.
Power system for vehicles and battery components.
Reinforced vehicle components.
Vehicle constructon system rework.
Multi-square vehicle doors.
Make vehicles more resilient to damage and better able to smash through obstacles.
Vehicle spawns have personality added in various ways.
Removed action interruption from drug cravings.
Ludricrous numbers of new foods.
Vehicle horns.
Backward compatability with 0.8 saves.
Stylish trait.
Pickup partial stacks.
Flaming weapons.
Too many new professions to list.
Diseases can now be bodypart specific (bleeding, bites).
Reworked martial arts framework. Arts are no longer pseudo-items, and can be mostly defined in json.
RPG-7.
Reworked and streamlined bionics failure chance and install UI.
Streamlined continuous reading.
Bugfixes:
---
Monsters that don't take damage no longer leave blood trails.
Broken gas tanks act broken.
Highlighting lines in tiles mode.
Show all sounds made by player.
Dissasemble items with charges properly.
Supress smoke warning when you have a gas mask.
Stims work again.
Menu cleanups all over.
Better in-city detection for roads.
Funnel filling.
Step on visible trap warning.
Vomiting lethality nerfed.
Better ignore monster for now feature.
Massive audit of item values by Rivet.
Prevent input overbuffering when it's raining.
Eating related bugs.
Hallucination fixes.
Vehicle mounted turrets.
Crafting conuming containers with contents.
Prevents many actions from passing through walls.
Weird handling of cancelled item use.
Gunmods with firing modes.
Stabilized monster coordinates.
Many fixes in defense mode.
Charge rifle charging.
0.8
Highlights:
---
Releasing with Russian, Chinese, and bla translations.
Draggable vhicles, e.g. shopping carts.
Memorial file listing player history.
Tiles!
Basic farming support.
Support for save backwards compatability.
Option to adjust city size, make a whole map metropolis!
Option to adjust monster density, walls of zombies!
Features:
---
Intelligence dependent skill rust option.
Uncanny Dodge CBM
Weight management rework, weight now in grams.
If the player is overloaded, the strain causes pain.
Display option for metric vs imperial vehicle speed.
Beanbag rounds for shotguns and grenade launchers.
Added headlights that can be aimed at installation time.
Active bionics.
Throw single items from stacks instead of whole stack.
Updated many menus to updated menu system that provides acrolling, filtering and more unified hotkeys.
Crafting overhaul, crafting no longer trains combat skills and vice versa.
Reworked rain protection, items now have waterproof flags.
Crafting recipes you can actually perform bubble to the top of the list.
New laser weapons.
Pneumatic weapons.
Narrow sidebar option.
Support unicode character names.
Aim-related gunmods.
Automatically adjust aim path if the default path is blocked by something.
Play Now game start for one-click game initiation.
Rework encumbrance to remove nonsensical negative encumbrance.
Loosen strictness of encumbrance in general.
Heated melee weapons.
Plastic item crafting.
Option overhaul with new tabbed menu.
Swimming now makes you wet.
Wetness can be a good thing when it's hot and you're properly attired.
Wetness effects asjusted by some mutations.
Portable Game system now usable, has playable games snake, sokoban, and robotfindskitten.
Vehicle components, vehicles, mutations and traits are moddable in json.
fruit bushes spawn in groups.
Significant rebalance of fire, emits less smoke, and small fires should burn longer.
Basic farming support.
Welding rig vehicle component.
When in a square with clothes and bedding, sleeping players will use them for warmth.
Corpse-filled pits cause less or no damage.
Adrenaline shot item.
Nerfed Adrenaline rush effect, no more bullettime.
Small vehicles are draggable and pushable. Added shopping carts.
Funnel now directs rain into container in the same square during rain.
Mutation dreams.
Siphon water out of vehicles with water tanks.
Ice labs.
Vehicle collisions based on SCIENCE!
Streamlined selecting same ammo over and over again.
Blacksmithing.
Pickling and other food preservation techniques.
Re-enabled mouth encumbrance.
Caseless ammunition and guns.
New heavy weapons.
More features spawning in houses.
Significantly reduced map save size.
Lots of professions.
Many many items and crafting recipes.
Energy weapon special effects.
Scrollbars in many list menus.
Vehicles can spawn smashed into each other.
Bugfixes:
---
Mouse cursor hiding.
Terminal text display fixes.
Very significant performance improvements.
Removed input delay.
Allow exiting from long-term activities like wait.
All titlebars should use the correct version number.
Remove busywaitin WinGDI build. (caused 100% CPU usage)
No more "nothing" map tiles.
Hand out letters to bionics so more than a few are usable.
Monsters no longer attack themselves.
Fatal hunger/thirst/fatigue detected correctly.
Major monster handling performance improvements to make 50x zombies work.
Nerfed smoke inhalation.
Major performance increase in mapgen to make huge cities generate before the heat death of the universe.
Rain and acid rain doesn't bother you when underwater.
Batched raycasting optimization.
Fixed old inventory letter overlapping bug.
Use shadowcasting algorithm for fast and accurate fov calculation.
Vehicles no longer spawn floating above water.
Loaded ammo, such as nails in a nailgun can be used for crafting.
Light from items more consistent.
======
0.7.1 (bugfix point release)
Vehicle bed sleepiness fix.
Made coughing from smoke wake you up.
Update version for MSVC project builds.
Remove coverage property from wristwatch to prevent ensumberance.
Supress pickup from vehicle when doing autopickup.
Fix typo in spawn list.
Don't draw item glyphs on top of furniture glyphs.
Strip out references to a removed ammunition in spawn lists.
Change in how Vehicle Examination window is displayed so it works in 12x12 View Screens
Fix for weapon mods with no ammo types.
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.
-17
View File
@@ -1,17 +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) KevinGranade GlyphGryph
Current Main Developers/Github Managers:
KevinGranade, GalenEvil, i2amroy, AtomicDryad, Ianestrachan
Special thanks to:
TheDarklingWolf - For creating Cataclysm:DDA as we know it
Narc - For setting up the automatic Jenkins build-bot
yobbobanana - For working as liason between translators and github
Angela 'Rivet' Graves, Constant Creator of Cataclysmic Content
For a full list of contributors please see:
https://github.com/CleverRaven/Cataclysm-DDA/contributors
Binary file not shown.
Binary file not shown.
-588
View File
@@ -1,588 +0,0 @@
[
{
"type" : "bionic",
"id" : "bio_null",
"name" : "NULL bionics",
"description": "If you're seeing this, it's a bug. (game::init_bionics)"
},
{
"type" : "bionic",
"id" : "bio_power_storage",
"name" : "Power Storage",
"description": "Compact Bionics Module that upgrades your power capacity by 4 units. Having at least one of these is a prerequisite to using powered bionics. You will also need a power supply, found in another CBM."
},
{
"type" : "bionic",
"id" : "bio_power_storage_mkII",
"name" : "Power Storage Mk. II",
"description": "Compact Bionics Module developed at DoubleTech Industries as a replacement for the highly successful CBM: Power Storage. Increases your power capacity by 10 units."
},
{
"type" : "bionic",
"id" : "bio_batteries",
"name" : "Battery System",
"power_source" : true,
"description": "You have a battery draining attachment, and thus can make use of the energy contained in normal, everyday batteries. Use 'E' to consume batteries."
},
{
"type" : "bionic",
"id" : "bio_metabolics",
"name" : "Metabolic Interchange",
"power_source" : true,
"active" : true,
"time" : 100,
"description": "Your digestive system and power supply are interconnected. Any drain on energy instead increases your hunger."
},
{
"type" : "bionic",
"id" : "bio_solar",
"name" : "Solar Panels",
"power_source" : true,
"description": "You have a few solar panels installed. While in direct sunlight, your power level will slowly recharge."
},
{
"type" : "bionic",
"id" : "bio_torsionratchet",
"name" : "Joint Torsion Ratchet",
"power_source" : true,
"description": "Your joints have been equipped with torsion ratchets that generate power slowly when you move."
},
{
"type" : "bionic",
"id" : "bio_furnace",
"name" : "Internal Furnace",
"power_source" : true,
"description": "You can burn nearly any organic material as fuel (use 'E'), recharging your power level. Some materials will burn better than others."
},
{
"type" : "bionic",
"id" : "bio_ethanol",
"name" : "Ethanol Burner",
"power_source" : true,
"description": "You burn alcohol as fuel in an extremely efficient reaction. However, you will still suffer the inebriating effects of the substance."
},
{
"type" : "bionic",
"id" : "bio_memory",
"name" : "Enhanced Memory Banks",
"cost" : 1,
"description": "Your memory has been enhanced with small quantum storage drives. Any time you start to forget a skill, you have a chance at retaining all knowledge, at the cost of a small amount of power."
},
{
"type" : "bionic",
"id" : "bio_ears",
"name" : "Enhanced Hearing",
"description": "Your hearing has been drastically improved, allowing you to hear ten times better than the average person. Additionally, high-intensity sounds will be automatically dampened before they can damage your hearing."
},
{
"type" : "bionic",
"id" : "bio_eye_enhancer",
"name" : "Diamond Cornea",
"description": "Your vision is greatly enhanced, giving you a +2 bonus to perception."
},
{
"type" : "bionic",
"id" : "bio_dex_enhancer",
"name" : "Wired Reflexes",
"description": "Your reaction time has been greatly enhanced with bionic nerve stimulators, giving you a +2 bonus to dexterity."
},
{
"type" : "bionic",
"id" : "bio_str_enhancer",
"name" : "Muscle Augmentation",
"description": "Your muscular system has been enhanced with myomer fibers, giving you a +2 bonus to strength."
},
{
"type" : "bionic",
"id" : "bio_int_enhancer",
"name" : "Cerebral Booster",
"description": "Your brain has been enhanced with bionic coprocessors, giving you a +2 bonus to intelligence."
},
{
"type" : "bionic",
"id" : "bio_membrane",
"name" : "Nictating Membrane",
"description": "Your eyes have a thin membrane that closes over your eyes while underwater, negating any vision penalties."
},
{
"type" : "bionic",
"id" : "bio_sunglasses",
"name" : "Transition lenses",
"cost" : 0,
"time" : 0,
"description": "Your eyes have quick-reacting transition lenses installed over them, negating any glare penalties and partially protecting you from bright flashes."
},
{
"type" : "bionic",
"id" : "bio_targeting",
"name" : "Targeting System",
"description": "Your eyes are equipped with range finders, and their movement is synced with that of your arms, to a degree. Shots you fire will be much more accurate, particularly at long range."
},
{
"type" : "bionic",
"id" : "bio_gills",
"name" : "Membrane Oxygenator",
"cost" : 1,
"description": "An oxygen interchange system automatically switches on while underwater, slowly draining your energy reserves but providing oxygen."
},
{
"type" : "bionic",
"id" : "bio_purifier",
"name" : "Air Filtration System",
"cost" : 0,
"time" : 0,
"description": "Implanted in your trachea is an advanced filtration system. If toxins find their way into your windpipe, the filter will attempt to remove them."
},
{
"type" : "bionic",
"id" : "bio_climate",
"name" : "Internal Climate Control",
"active" : true,
"cost" : 1,
"time" : 30,
"description": "Throughout your body lies a network of thermal piping which eases the effects of high and low ambient temperatures."
},
{
"type" : "bionic",
"id" : "bio_storage",
"name" : "Internal Storage",
"description": "Space inside your chest cavity has been converted into a storage area. You may carry an extra 8 units of volume."
},
{
"type" : "bionic",
"id" : "bio_recycler",
"name" : "Recycler Unit",
"description": "Your digestive system has been outfitted with a series of filters and processors, allowing you to reclaim waste liquid and, to a lesser degree, nutrients. The net effect is a greatly reduced need to eat and drink."
},
{
"type" : "bionic",
"id" : "bio_digestion",
"name" : "Expanded Digestive System",
"description": "You have been outfitted with three synthetic stomachs and industrial-grade intestines. Not only can you extract much more nutrition from food, but you are highly resistant to foodborne illness, and can sometimes eat rotten food."
},
{
"type" : "bionic",
"id" : "bio_tools",
"name" : "Integrated Toolset",
"description": "Implanted in your hands and fingers is a complete tool set - screwdriver, hammer, wrench, and heating elements. You can use this in place of many tools when crafting."
},
{
"type" : "bionic",
"id" : "bio_shock",
"name" : "Electroshock Unit",
"active" : true,
"time" : 1,
"description": "While fighting unarmed, or with a weapon that conducts electricity, there is a chance that a successful hit will shock your opponent, inflicting extra damage and disabling them temporarily at the cost of some energy."
},
{
"type" : "bionic",
"id" : "bio_heat_absorb",
"name" : "Heat Drain",
"active" : true,
"time" : 1,
"description": "While fighting unarmed against a warm-blooded opponent, there is a chance that a successful hit will drain body heat, inflicting a small amount of extra damage, and increasing your power reserves slightly."
},
{
"type" : "bionic",
"id" : "bio_carbon",
"name" : "Subdermal Carbon Filament",
"description": "Lying just beneath your skin is a thin armor made of carbon nanotubes. This reduces bashing damage by 2 and cutting damage by 4."
},
{
"type" : "bionic",
"id" : "bio_armor_head",
"name" : "Alloy Plating - Head",
"description": "The flesh on your head has been replaced by a strong armor, protecting both your head and jaw regions."
},
{
"type" : "bionic",
"id" : "bio_armor_torso",
"name" : "Alloy Plating - Torso",
"description": "The flesh on your torso has been replaced by a strong armor, protecting you greatly."
},
{
"type" : "bionic",
"id" : "bio_armor_arms",
"name" : "Alloy Plating - Arms",
"description": "The flesh on your arms has been replaced by a strong armor, protecting you greatly."
},
{
"type" : "bionic",
"id" : "bio_armor_legs",
"name" : "Alloy Plating - Legs",
"description": "The flesh on your legs has been replaced by a strong armor, protecting you greatly."
},
{
"type" : "bionic",
"id" : "bio_flashlight",
"name" : "Cranial Flashlight",
"active" : true,
"cost" : 1,
"time" : 30,
"description": "Mounted between your eyes is a small but powerful LED flashlight."
},
{
"type" : "bionic",
"id" : "bio_night_vision",
"name" : "Implanted Night Vision",
"active" : true,
"cost" : 1,
"time" : 20,
"description": "Your eyes have been modified to amplify existing light, allowing you to see in the dark."
},
{
"type" : "bionic",
"id" : "bio_infrared",
"name" : "Infrared Vision",
"active" : true,
"cost" : 1,
"time" : 4,
"description": "Your range of vision extends into the infrared, allowing you to see warm-blooded creatures in the dark, and even through walls."
},
{
"type" : "bionic",
"id" : "bio_face_mask",
"name" : "Facial Distortion",
"active" : true,
"cost" : 1,
"time" : 10,
"description": "Your face is actually made of a compound which may be molded by electrical impulses, making you impossible to recognize. While not powered, however, the compound reverts to its default shape."
},
{
"type" : "bionic",
"id" : "bio_ads",
"name" : "Active Defense System",
"active" : true,
"cost" : 1,
"time" : 7,
"description": "A thin forcefield surrounds your body, continually draining power. Anything attempting to penetrate this field has a chance of being deflected at the cost of more energy. Melee attacks will be stopped more often than bullets."
},
{
"type" : "bionic",
"id" : "bio_ods",
"name" : "Offensive Defense System",
"active" : true,
"cost" : 1,
"time" : 6,
"description": "A thin forcefield surrounds your body, continually draining power. This field does not deflect penetration, but rather delivers a very strong shock, damaging unarmed attackers and those with a conductive weapon."
},
{
"type" : "bionic",
"id" : "bio_scent_mask",
"name" : "Olfactory Mask",
"active" : true,
"cost" : 1,
"time" : 8,
"description": "While this system is powered, your body will produce very little odor, making it nearly impossible for creatures to track you by scent."
},
{
"type" : "bionic",
"id" : "bio_scent_vision",
"name" : "Scent Vision",
"active" : true,
"cost" : 1,
"time" : 30,
"description": "While this system is powered, you're able to visually sense your own scent, making it possible for you to recognize your surroundings even if you can't see it."
},
{
"type" : "bionic",
"id" : "bio_cloak",
"name" : "Cloaking System",
"active" : true,
"cost" : 2,
"time" : 1,
"description": "This high-power system uses a set of cameras and LEDs to make you blend into your background, rendering you fully invisible to normal vision. However, you may be detected by infrared, sonar, etc."
},
{
"type" : "bionic",
"id" : "bio_painkiller",
"name" : "Sensory Dulling",
"active" : true,
"cost" : 2,
"description": "Your nervous system is wired to allow you to inhibit the signals of pain, allowing you to dull your senses at will. However, the use of this system may cause delayed reaction time and drowsiness."
},
{
"type" : "bionic",
"id" : "bio_nanobots",
"name" : "Repair Nanobots",
"active" : true,
"cost" : 5,
"description": "Inside your body is a fleet of tiny dormant robots. Once charged from your energy banks, they will flit about your body, repairing damage and stopping bleeding."
},
{
"type" : "bionic",
"id" : "bio_heatsink",
"name" : "Thermal Dissipation",
"active" : true,
"cost" : 1,
"time" : 6,
"description": "Powerful heatsinks and supermaterials are woven into your flesh. While powered, this system will prevent heat damage up to 2000 degrees fahrenheit. Note that this does not affect your internal temperature."
},
{
"type" : "bionic",
"id" : "bio_resonator",
"name" : "Sonic Resonator",
"active" : true,
"cost" : 4,
"description": "Your entire body may resonate at very high power, creating a short-range shockwave. While it will not do much damage to flexible creatures, stiff items such as walls, doors, and even robots will be severely damaged."
},
{
"type" : "bionic",
"id" : "bio_time_freeze",
"name" : "Time Dilation",
"active" : true,
"cost" : 3,
"description": "At an immense cost of power, you may increase your body speed and reactions dramatically, essentially freezing time. You are still delicate, however, and violent or rapid movements may damage you due to friction."
},
{
"type" : "bionic",
"id" : "bio_teleport",
"name" : "Teleportation Unit",
"active" : true,
"cost" : 10,
"description": "This highly experimental unit folds space over short distances, instantly transporting your body up to 25 feet at the cost of much power. Note that prolonged or frequent use may have dangerous side effects."
},
{
"type" : "bionic",
"id" : "bio_blood_anal",
"name" : "Blood Analysis",
"active" : true,
"cost" : 1,
"description": "Small sensors have been implanted in your heart, allowing you to analyse your blood. This will detect many illnesses, drugs, and other conditions."
},
{
"type" : "bionic",
"id" : "bio_blood_filter",
"name" : "Blood Filter",
"active" : true,
"cost" : 3,
"description": "A filtration system in your heart allows you to actively filter out chemical impurities, primarily drugs. It will have limited impact on viruses. Note that it is not a targeted filter; ALL drugs in your system will be affected."
},
{
"type" : "bionic",
"id" : "bio_alarm",
"name" : "Alarm System",
"active" : true,
"cost" : 1,
"time" : 400,
"description": "A motion-detecting alarm system will notice almost all movement within a fifteen-foot radius, and will silently alert you. This is very useful during sleep, or if you suspect a cloaked pursuer."
},
{
"type" : "bionic",
"id" : "bio_evap",
"name" : "Aero-Evaporator",
"active" : true,
"cost" : 8,
"description": "This unit draws moisture from the surrounding air, which then is poured from a fingertip in the form of water. It may fail in very dry environments."
},
{
"type" : "bionic",
"id" : "bio_lighter",
"name" : "Mini-Flamethrower",
"active" : true,
"cost" : 3,
"description": "The index fingers of both hands have powerful fire starters which extend from the tip."
},
{
"type" : "bionic",
"id" : "bio_claws",
"name" : "Adamantium Claws",
"active" : true,
"cost" : 3,
"description": "Your fingers can withdraw into your hands, allowing a set of vicious claws to extend. These do considerable cutting damage, but prevent you from holding anything else."
},
{
"type" : "bionic",
"id" : "bio_blaster",
"name" : "Fusion Blaster Arm",
"active" : true,
"cost" : 2,
"description": "Your left arm has been replaced by a heavy-duty fusion blaster! You may use your energy banks to fire a damaging heat ray; however, you are unable to use or carry two-handed items, and may only fire handguns."
},
{
"type" : "bionic",
"id" : "bio_laser",
"name" : "Finger-Mounted Laser",
"active" : true,
"cost" : 2,
"description": "One of your fingers has a small high-powered laser embedded in it. This long range weapon is not incredibly damaging, but is very accurate, and has the potential to start fires."
},
{
"type" : "bionic",
"id" : "bio_emp",
"name" : "Directional EMP",
"active" : true,
"cost" : 4,
"description": "Mounted in the palms of your hand are small parabolic EMP field generators. You may use power to fire a short-ranged blast which will disable electronics and robots."
},
{
"type" : "bionic",
"id" : "bio_hydraulics",
"name" : "Hydraulic Muscles",
"active" : true,
"cost" : 1,
"time" : 3,
"description": "While activated, the muscles in your arms will be greatly enhanced, increasing your strength by 20."
},
{
"type" : "bionic",
"id" : "bio_water_extractor",
"name" : "Water Extraction Unit",
"active" : true,
"cost" : 2,
"description": "Nanotubes embedded in the palm of your hand will pump any available fluid out of a dead body, cleanse it of impurities and convert it into drinkable water. You must, however, have a container to store the water in."
},
{
"type" : "bionic",
"id" : "bio_magnet",
"name" : "Electromagnetic Unit",
"active" : true,
"cost" : 2,
"description": "Embedded in your hand is a powerful electromagnet, allowing you to pull items made of iron over short distances."
},
{
"type" : "bionic",
"id" : "bio_fingerhack",
"name" : "Fingerhack",
"active" : true,
"cost" : 1,
"description": "One of your fingers has an electrohack embedded in it; an all-purpose hacking unit used to override control panels and the like (but not computers). Skill in computers is important, and a failed use may damage your circuits."
},
{
"type" : "bionic",
"id" : "bio_lockpick",
"name" : "Fingerpick",
"active" : true,
"cost" : 1,
"description": "One of your fingers has an electronic lockpick embedded in it. This automatic system will quickly unlock all but the most advanced key locks without any skill required on the part of the user."
},
{
"type" : "bionic",
"id" : "bio_ground_sonar",
"name" : "Terranian Sonar",
"active" : true,
"cost" : 1,
"time" : 5,
"description": "Your feet are equipped with precision sonar equipment, allowing you to detect the movements of creatures below the ground."
},
{
"type" : "bionic",
"id" : "bio_power_armor_interface",
"name" : "Power Armor Interface",
"active" : true,
"cost" : 1,
"time" : 10,
"description": "Interfaces your power system with the internal charging port on suits of power armor."
},
{
"type" : "bionic",
"id" : "bio_power_armor_interface_mkII",
"name" : "Power Armor Interface Mk. II",
"active" : true,
"cost" : 1,
"time" : 50,
"description": "Interfaces your power system with the internal charging port on suits of power armor. The Mk. II was designed by DoubleTech Inc., to meet the popularity of the Mk. II power armor series."
},
{
"type" : "bionic",
"id" : "bio_flashbang",
"name" : "Flashbang Generator",
"active" : true,
"cost" : 5,
"description": "Light emitting diodes integrated into your skin can release a flash comparable to a flashbang grenade, blinding nearby enemies. Speakers integrated into your body mimic the loud sound, deafening those nearby."
},
{
"type" : "bionic",
"id" : "bio_railgun",
"name" : "Railgun",
"active" : true,
"cost" : 1,
"time" : 100,
"description": "EM field generators in your arms double the range and damage of thrown iron and steel objects at a cost of 1 power per throw, causing them to leave a trail of electricity that can cause additional damage."
},
{
"type" : "bionic",
"id" : "bio_probability_travel",
"name" : "Probability Travel",
"active" : true,
"cost" : 1,
"time" : 100,
"description": "Increases your body's wavelength, allowing you to quantum tunnel through walls, reappearing on the other side. Power drain in standby is minimal, but each tile tunneled through costs 10 bionic power."
},
{
"type" : "bionic",
"id" : "bio_shockwave",
"name" : "Shockwave Generator",
"active" : true,
"cost" : 10,
"description": "You generate a powerful shockwave, knocking back all nearby creatures. Targets are stunned briefly, take damage and additional stun upon impact with impassable terrain, and knockback any creatures they collide with."
},
{
"type" : "bionic",
"id" : "bio_chain_lightning",
"name" : "Chain Lightning",
"active" : true,
"cost" : 5,
"description": "Your body is equipped with a chain lightning generator, allowing you to emit a blast of lightning at a target, leaving a trail of lightning in its wake, jumping to additional targets within 4 tiles of the previous target."
},
{
"type" : "bionic",
"id" : "bio_night",
"name" : "Artificial Night Generator",
"active" : true,
"cost" : 1,
"time" : 2,
"description": "Destructive interference eliminates all light within a 15 tile radius."
},
{
"type" : "bionic",
"id" : "bio_uncanny_dodge",
"name" : "Uncanny Dodge",
"active" : true,
"cost" : 1,
"time" : 10,
"description": "Your nervous system has been augmented with bionic processors, allowing you to dodge attacks beyond normal human capability, including bullets."
},
{
"type" : "bionic",
"id" : "bio_dis_shock",
"name" : "Electrical Discharge",
"faulty" : true,
"description": "A malfunctioning bionic which occasionally discharges electricity through your body, causing pain and brief paralysis but no damage."
},
{
"type" : "bionic",
"id" : "bio_dis_acid",
"name" : "Acidic Discharge",
"faulty" : true,
"description": "A malfunctioning bionic which occasionally discharges acid into your muscles, causing sharp pain and minor damage."
},
{
"type" : "bionic",
"id" : "bio_drain",
"name" : "Electrical Drain",
"faulty" : true,
"description": "A malfunctioning bionic. It doesn't perform any useful function, but will occasionally draw power from your batteries."
},
{
"type" : "bionic",
"id" : "bio_noise",
"name" : "Noisemaker",
"faulty" : true,
"description": "A malfunctioning bionic. It will occasionally emit a loud burst of noise."
},
{
"type" : "bionic",
"id" : "bio_power_weakness",
"name" : "Power Overload",
"faulty" : true,
"description": "Damaged power circuits cause short-circuiting inside your muscles when your batteries are above 75%%%% capacity, causing greatly reduced strength. This has no effect if you have no internal batteries."
},
{
"type" : "bionic",
"id" : "bio_stiff",
"name" : "Wire-induced Stiffness",
"faulty" : true,
"description": "Improperly installed wires cause a physical stiffness in most of your body, causing increased encumbrance."
}
]
-21
View File
@@ -1,21 +0,0 @@
[
{
"type" : "colordef",
"BLACK" : [0,0,0],
"RED" : [255,0,0],
"GREEN" : [0,110,0],
"BROWN" : [92,51,23],
"BLUE" : [0,0,200],
"MAGENTA" : [139,58,98],
"CYAN" : [0,150,180],
"GRAY" : [150,150,150],
"DGRAY" : [99,99,99],
"LRED" : [255,150,150],
"LGREEN" : [0,255,0],
"YELLOW" : [255,255,0],
"LBLUE" : [100,100,255],
"LMAGENTA" : [255,0,255],
"LCYAN" : [0,240,255],
"WHITE" : [255,255,255]
}
]
-363
View File
@@ -1,363 +0,0 @@
[
{
"type" : "dream",
"messages" : [
"You have a strange dream about lizards.",
"Your dreams give you a strange scaly feeling."
],
"category" : "MUTCAT_LIZARD",
"strength" : 1
},{
"type" : "dream",
"messages" : [
"You have a strange dream about being a patient in a frightening hospital.",
"Your dreams give you an oddly medicated feeling."
],
"category" : "MUTCAT_MEDICAL",
"strength" : 1
},{
"type" : "dream",
"messages" : [
"You have a strange dream about birds.",
"Your dreams give you a strange feathered feeling."
],
"category" : "MUTCAT_BIRD",
"strength" : 1
},{
"type" : "dream",
"messages" : [
"You have a strange dream about fish.",
"Your dreams give you a strange wet, scaly feeling."
],
"category" : "MUTCAT_FISH",
"strength" : 1
},{
"type" : "dream",
"messages" : [
"You have a strange dream about animals.",
"Your dreams give you a strange furry feeling."
],
"category" : "MUTCAT_BEAST",
"strength" : 1
},{
"type" : "dream",
"messages" : [
"You have a strange dream about cattle.",
"Your dreams give you a strange content, furry feeling."
],
"category" : "MUTCAT_CATTLE",
"strength" : 1
},{
"type" : "dream",
"messages" : [
"You have a strange dream about insects.",
"Your dreams give you a strange chitinous feeling."
],
"category" : "MUTCAT_INSECT",
"strength" : 1
},{
"type" : "dream",
"messages" : [
"You have a strange dream about plants.",
"Your dreams give you a strange plantlike feeling."
],
"category" : "MUTCAT_PLANT",
"strength" : 1
},{
"type" : "dream",
"messages" : [
"You have a strange dream about slime.",
"Your dreams give you a strange slimy feeling."
],
"category" : "MUTCAT_SLIME",
"strength" : 1
},{
"type" : "dream",
"messages" : [
"You have a strange dream about living in a cave.",
"Your dreams give a strange reclusive feeling."
],
"category" : "MUTCAT_TROGLO",
"strength" : 1
},{
"type" : "dream",
"messages" : [
"You have a strange dream about sea creatures.",
"Your dreams give you a strange wet feeling."
],
"category" : "MUTCAT_CEPHALOPOD",
"strength" : 1
},{
"type" : "dream",
"messages" : [
"You have a strange dream about spiders.",
"Your dreams give you a strange webbed feeling."
],
"category" : "MUTCAT_SPIDER",
"strength" : 1
},{
"type" : "dream",
"messages" : [
"You have a strange dream about rats.",
"Your dreams give you a strange fuzzy feeling."
],
"category" : "MUTCAT_RAT",
"strength" : 1
},{
"type" : "dream",
"messages" : [
"You have a strange dream.",
"You feel...OK."
],
"category" : "MUTCAT_ALPHA",
"strength" : 1
},{
"type" : "dream",
"messages" : [
"You dream about the zoo, for some reason.",
"Your dreams...are complex and multifaceted."
],
"category" : "MUTCAT_CHIMERA",
"strength" : 1
},{
"type" : "dream",
"messages" : [
"You have a disturbing dream of bathing in the sun on a rock.",
"While dreaming, you see a distinctively lizard-like reflection of yourself."
],
"category" : "MUTCAT_LIZARD",
"strength" : 2
},{
"type" : "dream",
"messages" : [
"You have a disturbing dream of undergoing strange medical procedures.",
"While dreaming, you see yourself dressed in a hospital gown, receiving treatment."
],
"category" : "MUTCAT_MEDICAL",
"strength" : 2
},{
"type" : "dream",
"messages" : [
"You have strange dreams of soaring through the sky.",
"In a dream, you see a curiously birdlike reflection of yourself."
],
"category" : "MUTCAT_BIRD",
"strength" : 2
},{
"type" : "dream",
"messages" : [
"You dream of swimming in the open ocean",
"In your dream, you see a strangely fishlike image of yourself."
],
"category" : "MUTCAT_FISH",
"strength" : 2
},{
"type" : "dream",
"messages" : [
"You have a vivid dream of hunting in the woods.",
"Whilst dreaming, you see a disturbingly bestial version of yourself."
],
"category" : "MUTCAT_BEAST",
"strength" : 2
},{
"type" : "dream",
"messages" : [
"You dream of grazing in an open field.",
"In a dream you catch a glimpse of a strangely cattle-like image of yourself."
],
"category" : "MUTCAT_CATTLE",
"strength" : 2
},{
"type" : "dream",
"messages" : [
"You have a dream of working in a hive.",
"While dreaming you look into a mirror and see a frighteningly insectoid reflection."
],
"category" : "MUTCAT_INSECT",
"strength" : 2
},{
"type" : "dream",
"messages" : [
"You have a confusing dream of growing in a garden.",
"You are confused by a plantlike image of yourself in a dream."
],
"category" : "MUTCAT_PLANT",
"strength" : 2
},{
"type" : "dream",
"messages" : [
"You have a strange dream of living in sludge.",
"In your dream you see an odd, slimy reflection of yourself."
],
"category" : "MUTCAT_SLIME",
"strength" : 2
},{
"type" : "dream",
"messages" : [
"You dream of living deep inside a dark cave.",
"You dream of being a primitive cave dweller."
],
"category" : "MUTCAT_TROGLO",
"strength" : 2
},{
"type" : "dream",
"messages" : [
"You dream of living on the ocean floor.",
"While dreaming, a reflection of yourself appears almost like an octopus."
],
"category" : "MUTCAT_CEPHALOPOD",
"strength" : 2
},{
"type" : "dream",
"messages" : [
"You have a strange dream of spinning webs",
"In your dream you see a very spiderlike version of yourself."
],
"category" : "MUTCAT_SPIDER",
"strength" : 2
},{
"type" : "dream",
"messages" : [
"You vividly dream of living in the sewers.",
"In your dream you see a group of rats that look almost like yourself."
],
"category" : "MUTCAT_RAT",
"strength" : 2
},{
"type" : "dream",
"messages" : [
"You dream of having that success you knew you deserved, back before all this.",
"Your dream-self looks competent and in control."
],
"category" : "MUTCAT_ALPHA",
"strength" : 2
},{
"type" : "dream",
"messages" : [
"You can't quite work out what the dream is about...it just keeps changing.",
"Your dream is filled with creatures, and yet all seem like you."
],
"category" : "MUTCAT_CHIMERA",
"strength" : 2
},{
"type" : "dream",
"messages" : [
"You are terrified by a dream of becoming a lizard hybrid.",
"You have a disturbingly lifelike dream of living as a lizard."
],
"category" : "MUTCAT_LIZARD",
"strength" : 3
},{
"type" : "dream",
"messages" : [
"You have a dream of doctors and nurses doing unnatural things to your body, which brings you perverse pleasure.",
"You have a vivid dream of being a medical anomaly, as your heartbeat syncs with the steady drip of an IV line."
],
"category" : "MUTCAT_MEDICAL",
"strength" : 3
},{
"type" : "dream",
"messages" : [
"You have a realistic dream of flying south with your flock for the winter.",
"You are disturbed when your birdlike dreams are more lifelike than reality."
],
"category" : "MUTCAT_BIRD",
"strength" : 3
},{
"type" : "dream",
"messages" : [
"You have a disturbing dream of swimming with a school of fish.",
"When you wake up you panic about drowning from being out of water."
],
"category" : "MUTCAT_FISH",
"strength" : 3
},{
"type" : "dream",
"messages" : [
"You vividly dream of running with your pack, hunting a wild animal.",
"A terrifyingly real dream has you killing game with your bare teeth."
],
"category" : "MUTCAT_BEAST",
"strength" : 3
},{
"type" : "dream",
"messages" : [
"You terrifyingly dream of being led to a slaughterhouse by a farmer.",
"You find it hard to wake from a vivid dream of grazing on a farm."
],
"category" : "MUTCAT_CATTLE",
"strength" : 3
},{
"type" : "dream",
"messages" : [
"You are terrified by a dream of serving the hive queen mindlessly.",
"Your disturbingly lifelike dream has you pollinating plants."
],
"category" : "MUTCAT_INSECT",
"strength" : 3
},{
"type" : "dream",
"messages" : [
"You have a confusing and scary dream of becoming a plant.",
"The transition from your lifelike dreams of living as a plant to reality shocks you."
],
"category" : "MUTCAT_PLANT",
"strength" : 3
},{
"type" : "dream",
"messages" : [
"Your vivid dream of living as a slime blob frightens you.",
"You find it hard to control your limbs after dreaming of amorphous blob life."
],
"category" : "MUTCAT_SLIME",
"strength" : 3
},{
"type" : "dream",
"messages" : [
"Your dream of living in the dark for years is almost real.",
"You are frightened of the outside after your vivid dream of cave life."
],
"category" : "MUTCAT_TROGLO",
"strength" : 3
},{
"type" : "dream",
"messages" : [
"Your dreams of living on the ocean floor seem more lifelike than reality.",
"You dream of living as a terrifying octopus mutant."
],
"category" : "MUTCAT_CEPHALOPOD",
"strength" : 3
},{
"type" : "dream",
"messages" : [
"You vividly dream of living in a web and consuming insects.",
"Your dreams of fully turning into a spider frighten you."
],
"category" : "MUTCAT_SPIDER",
"strength" : 3
},{
"type" : "dream",
"messages" : [
"You scream in fear while you dream of being chased by a cat",
"Your lifelike dreams have you scavenging food with a pack of rats."
],
"category" : "MUTCAT_RAT",
"strength" : 3
},{
"type" : "dream",
"messages" : [
"You see yourself, five years from now, as the leader of a successful city.",
"Your success in restoring civilization was only a dream. For now."
],
"category" : "MUTCAT_ALPHA",
"strength" : 3
},{
"type" : "dream",
"messages" : [
"You are many animals, and yet one.",
"Hoof. Talon. Tooth. Fight. Feed. Forward."
],
"category" : "MUTCAT_CHIMERA",
"strength" : 3
}
]
-769
View File
@@ -1,769 +0,0 @@
[
{
"type": "furniture",
"id": "f_null",
"name": "nothing",
"symbol": " ",
"color": "white",
"move_cost_mod": 0,
"required_str": -1,
"flags": ["TRANSPARENT"]
},
{
"type": "furniture",
"id": "f_hay",
"name": "hay",
"symbol": "#",
"bgcolor": "brown",
"move_cost_mod": 3,
"required_str": 6,
"flags": ["TRANSPARENT", "CONTAINER", "FLAMMABLE_ASH", "ORGANIC"]
},
{
"type": "furniture",
"id": "f_bulletin",
"name": "bulletin board",
"symbol": "6",
"color": "blue",
"move_cost_mod": -1,
"required_str": -1,
"flags": ["BASHABLE", "FLAMMABLE", "NOITEM", "DECONSTRUCT", "ORGANIC"],
"examine_action": "bulletin_board",
"bash": {
"str_min": 3, "str_max": 45,
"sound": "smash!",
"sound_fail": "whump.",
"items": [
{ "item": "2x4", "amount": 6, "minamount": 2},
{ "item": "nail", "amount": 12, "minamount": 4},
{ "item": "splinter", "amount": 1 }
]
}
},
{
"type": "furniture",
"id": "f_indoor_plant",
"name": "indoor plant",
"symbol": "^",
"color": "green",
"move_cost_mod": 2,
"required_str": 5,
"flags": ["CONTAINER", "BASHABLE", "PLACE_ITEM", "ORGANIC"]
},
{
"type": "furniture",
"id": "f_bed",
"name": "bed",
"symbol": "#",
"color": "magenta",
"move_cost_mod": 3,
"required_str": -1,
"flags": ["TRANSPARENT", "CONTAINER", "FLAMMABLE_ASH", "DECONSTRUCT", "PLACE_ITEM", "ORGANIC"]
},
{
"type": "furniture",
"id": "f_toilet",
"name": "toilet",
"symbol": "&",
"color": "white",
"move_cost_mod": 2,
"required_str": 18,
"flags": ["TRANSPARENT", "BASHABLE", "FLAMMABLE_HARD"],
"examine_action": "toilet",
"bash": {
"str_min": 2, "str_max": 30,
"comment": "originally result = dice(8, 4) - 8;",
"sound": "porcelain breaking!",
"sound_fail": "whunk!",
"items": [
{ "item": "cu_pipe", "amount": 1, "minamount": 0 }
]
}
},
{
"type": "furniture",
"id": "f_makeshift_bed",
"name": "makeshift bed",
"symbol": "#",
"color": "magenta",
"move_cost_mod": 3,
"required_str": 12,
"flags": ["TRANSPARENT", "BASHABLE", "FLAMMABLE_ASH", "DECONSTRUCT", "ORGANIC"]
},
{
"type": "furniture",
"id": "f_sink",
"name": "sink",
"symbol": "&",
"color": "white",
"move_cost_mod": 2,
"required_str": 18,
"flags": ["TRANSPARENT", "BASHABLE", "FLAMMABLE_HARD", "CONTAINER", "PLACE_ITEM"],
"bash": {
"str_min": 2, "str_max": 30,
"comment": "originally result = dice(8, 4) - 8;",
"sound": "porcelain breaking!",
"sound_fail": "whunk!",
"items": [
{ "item": "cu_pipe", "amount": 1, "minamount": 0 }
]
}
},
{
"type": "furniture",
"id": "f_oven",
"name": "oven",
"symbol": "#",
"color": "dkgray",
"move_cost_mod": 2,
"required_str": 10,
"flags": ["BASHABLE", "DECONSTRUCT", "PLACE_ITEM", "TRANSPARENT", "FIRE_CONTAINER", "CONTAINER", "BLOCKSDOOR"],
"bash": {
"str_min": 2, "str_max": 30,
"sound": "metal screeching!",
"sound_fail": "clang!",
"items": [
{ "item": "scrap", "amount": 6, "minamount": 0},
{ "item": "steel_chunk", "amount": 3, "minamount": 0},
{ "item": "element", "amount": 3, "minamount": 1},
{ "item": "sheet_metal", "amount": 6, "minamount": 2},
{ "item": "cable", "amount": 3, "minamount": 1},
{ "item": "pilot_light", "amount": 1 }
]
}
},
{
"type": "furniture",
"id": "f_woodstove",
"name": "wood stove",
"symbol": "#",
"bgcolor": "red",
"move_cost_mod": 2,
"required_str": 10,
"flags": ["TRANSPARENT", "CONTAINER", "FIRE_CONTAINER", "SUPPRESS_SMOKE", "PLACE_ITEM"]
},
{
"type": "furniture",
"id": "f_fireplace",
"name": "fireplace",
"symbol": "#",
"bgcolor": "white",
"move_cost_mod": 2,
"required_str": -1,
"flags": ["TRANSPARENT", "CONTAINER", "FIRE_CONTAINER", "SUPPRESS_SMOKE", "PLACE_ITEM"]
},
{
"type": "furniture",
"id": "f_bathtub",
"name": "bathtub",
"symbol": "~",
"color": "white",
"move_cost_mod": 2,
"required_str": 10,
"flags": ["TRANSPARENT", "BASHABLE", "FLAMMABLE_HARD", "CONTAINER", "PLACE_ITEM", "BLOCKSDOOR"],
"bash": {
"str_min": 2, "str_max": 30,
"comment": "originally result = dice(8, 4) - 8;",
"sound": "porcelain breaking!",
"sound_fail": "whunk!",
"items": [
{ "item": "cu_pipe", "amount": 1, "minamount": 0 }
]
}
},
{
"type": "furniture",
"id": "f_chair",
"name": "chair",
"symbol": "#",
"color": "brown",
"move_cost_mod": 1,
"required_str": 6,
"flags": ["TRANSPARENT", "FLAMMABLE_ASH", "DECONSTRUCT", "ORGANIC"],
"bash": {
"str_min": 2, "str_max": 30,
"sound": "smash!",
"sound_fail": "whump.",
"items": [
{ "item": "2x4", "amount": 3, "minamount": 1},
{ "item": "nail", "amount": 6, "minamount": 2},
{ "item": "splinter", "amount": 1 }
]
}
},
{
"type": "furniture",
"id": "f_armchair",
"name": "arm chair",
"symbol": "H",
"color": "green",
"move_cost_mod": 1,
"required_str": 7,
"flags": ["TRANSPARENT", "FLAMMABLE_ASH", "DECONSTRUCT", "ORGANIC"]
},
{
"type": "furniture",
"id": "f_sofa",
"name": "sofa",
"symbol": "H",
"bgcolor": "red",
"move_cost_mod": 1,
"required_str": 10,
"flags": ["TRANSPARENT", "FLAMMABLE_ASH", "DECONSTRUCT", "ORGANIC", "BLOCKSDOOR"]
},
{
"type": "furniture",
"id": "f_cupboard",
"name": "cupboard",
"symbol": "#",
"color": "blue",
"move_cost_mod": 1,
"required_str": 8,
"flags": ["TRANSPARENT", "FLAMMABLE_ASH", "DECONSTRUCT", "CONTAINER", "PLACE_ITEM", "ORGANIC"],
"bash": {
"str_min": 2, "str_max": 30,
"sound": "smash!",
"sound_fail": "whump.",
"items": [
{ "item": "2x4", "amount": 3, "minamount": 1},
{ "item": "nail", "amount": 6, "minamount": 2},
{ "item": "splinter", "amount": 1 }
]
}
},
{
"type": "furniture",
"id": "f_trashcan",
"name": "trash can",
"symbol": "&",
"color": "ltcyan",
"move_cost_mod": 1,
"required_str": 5,
"flags": ["TRANSPARENT", "FLAMMABLE_ASH", "CONTAINER", "PLACE_ITEM"]
},
{
"type": "furniture",
"id": "f_desk",
"name": "desk",
"symbol": "#",
"color": "ltred",
"move_cost_mod": 1,
"required_str": 8,
"flags": ["TRANSPARENT", "FLAMMABLE_ASH", "DECONSTRUCT", "CONTAINER", "PLACE_ITEM", "ORGANIC"],
"bash": {
"str_min": 2, "str_max": 30,
"sound": "smash!",
"sound_fail": "whump.",
"items": [
{ "item": "2x4", "amount": 3, "minamount": 1},
{ "item": "nail", "amount": 6, "minamount": 2},
{ "item": "splinter", "amount": 1 }
]
}
},
{
"type": "furniture",
"id": "f_exercise",
"name": "exercise machine",
"symbol": "T",
"color": "dkgray",
"move_cost_mod": 1,
"required_str": 8,
"flags": ["TRANSPARENT", "DECONSTRUCT"]
},
{
"type": "furniture",
"id": "f_bench",
"name": "bench",
"symbol": "#",
"color": "brown",
"move_cost_mod": 1,
"required_str": 8,
"flags": ["TRANSPARENT", "FLAMMABLE_ASH", "DECONSTRUCT", "ORGANIC"],
"bash": {
"str_min": 2, "str_max": 30,
"sound": "smash!",
"sound_fail": "whump.",
"items": [
{ "item": "2x4", "amount": 3, "minamount": 1},
{ "item": "nail", "amount": 6, "minamount": 2},
{ "item": "splinter", "amount": 1 }
]
}
},
{
"type": "furniture",
"id": "f_table",
"name": "table",
"symbol": "#",
"color": "red",
"move_cost_mod": 2,
"required_str": 9,
"flags": ["TRANSPARENT", "FLAMMABLE", "DECONSTRUCT", "ORGANIC"],
"bash": {
"str_min": 3, "str_max": 45,
"sound": "smash!",
"sound_fail": "whump.",
"items": [
{ "item": "2x4", "amount": 6, "minamount": 2},
{ "item": "nail", "amount": 12, "minamount": 4},
{ "item": "splinter", "amount": 1 }
]
}
},
{
"type": "furniture",
"id": "f_pool_table",
"name": "pool table",
"symbol": "#",
"color": "green",
"move_cost_mod": 2,
"required_str": -1,
"flags": ["TRANSPARENT", "FLAMMABLE", "DECONSTRUCT", "ORGANIC"],
"bash": {
"str_min": 3, "str_max": 45,
"sound": "smash!",
"sound_fail": "whump.",
"items": [
{ "item": "2x4", "amount": 6, "minamount": 2},
{ "item": "nail", "amount": 12, "minamount": 4},
{ "item": "splinter", "amount": 1 }
]
}
},
{
"type": "furniture",
"id": "f_counter",
"name": "counter",
"symbol": "#",
"color": "blue",
"move_cost_mod": 2,
"required_str": 10,
"flags": ["TRANSPARENT", "FLAMMABLE", "DECONSTRUCT", "ORGANIC"],
"bash": {
"str_min": 3, "str_max": 45,
"sound": "smash!",
"sound_fail": "whump.",
"items": [
{ "item": "2x4", "amount": 6, "minamount": 2},
{ "item": "nail", "amount": 12, "minamount": 4},
{ "item": "splinter", "amount": 1 }
]
}
},
{
"type": "furniture",
"id": "f_fridge",
"name": "refrigerator",
"symbol": "{",
"color": "ltcyan",
"move_cost_mod": -1,
"required_str": 10,
"flags": ["CONTAINER", "BASHABLE", "DECONSTRUCT", "PLACE_ITEM", "BLOCKSDOOR"],
"bash": {
"str_min": 2, "str_max": 30,
"sound": "metal screeching!",
"sound_fail": "clang!",
"items": [
{ "item": "scrap", "amount": 8, "minamount": 2},
{ "item": "steel_chunk", "amount": 3, "minamount": 0},
{ "item": "hose", "amount": 1},
{ "item": "cu_pipe", "amount": 5, "minamount": 2 }
]
}
},
{
"type": "furniture",
"id": "f_glass_fridge",
"name": "glass door fridge",
"symbol": "{",
"color": "ltcyan",
"move_cost_mod": -1,
"required_str": 10,
"flags": ["BASHABLE", "DECONSTRUCT", "PLACE_ITEM", "BLOCKSDOOR"],
"bash": {
"str_min": 2, "str_max": 30,
"sound": "metal screeching!",
"sound_fail": "clang!",
"items": [
{ "item": "scrap", "amount": 8, "minamount": 2},
{ "item": "steel_chunk", "amount": 3, "minamount": 0},
{ "item": "hose", "amount": 1},
{ "item": "cu_pipe", "amount": 5, "minamount": 2 }
]
}
},
{
"type": "furniture",
"id": "f_dresser",
"name": "dresser",
"symbol": "{",
"color": "brown",
"move_cost_mod": -1,
"required_str": 8,
"flags": ["TRANSPARENT", "CONTAINER", "FLAMMABLE", "BASHABLE", "DECONSTRUCT", "PLACE_ITEM", "ORGANIC", "BLOCKSDOOR"],
"bash": {
"str_min": 3, "str_max": 45,
"sound": "smash!",
"sound_fail": "whump.",
"items": [
{ "item": "2x4", "amount": 6, "minamount": 2},
{ "item": "nail", "amount": 12, "minamount": 4},
{ "item": "splinter", "amount": 1 }
]
}
},
{
"type": "furniture",
"id": "f_locker",
"name": "locker",
"symbol": "{",
"color": "ltgray",
"move_cost_mod": -1,
"required_str": 9,
"flags": ["CONTAINER", "BASHABLE", "PLACE_ITEM", "DECONSTRUCT", "BLOCKSDOOR"],
"bash": {
"str_min": 2, "str_max": 30,
"sound": "metal screeching!",
"sound_fail": "clang!",
"items": [
{ "item": "scrap", "amount": 8, "minamount": 2},
{ "item": "steel_chunk", "amount": 3, "minamount": 0},
{ "item": "pipe", "amount": 1 }
]
}
},
{
"type": "furniture",
"id": "f_rack",
"name": "display rack",
"symbol": "{",
"color": "ltgray",
"move_cost_mod": -1,
"required_str": 8,
"flags": ["TRANSPARENT", "FLAMMABLE_HARD", "BASHABLE", "PLACE_ITEM", "DECONSTRUCT", "BLOCKSDOOR"],
"bash": {
"str_min": 2, "str_max": 30,
"sound": "metal screeching!",
"sound_fail": "clang!",
"items": [
{ "item": "scrap", "amount": 8, "minamount": 2},
{ "item": "steel_chunk", "amount": 3, "minamount": 0},
{ "item": "pipe", "amount": 1 }
]
}
},
{
"type": "furniture",
"id": "f_bookcase",
"name": "book case",
"symbol": "{",
"color": "brown",
"move_cost_mod": -1,
"required_str": 9,
"flags": ["FLAMMABLE", "BASHABLE", "DECONSTRUCT", "PLACE_ITEM", "ORGANIC", "BLOCKSDOR"],
"bash": {
"str_min": 3, "str_max": 45,
"sound": "smash!",
"sound_fail": "whump.",
"items": [
{ "item": "2x4", "amount": 6, "minamount": 2},
{ "item": "nail", "amount": 12, "minamount": 4},
{ "item": "splinter", "amount": 1 }
]
}
},
{
"type": "furniture",
"id": "f_washer",
"name": "washing machine",
"symbol": "{",
"bgcolor": "white",
"move_cost_mod": -1,
"required_str": 16,
"flags": ["CONTAINER", "BASHABLE", "PLACE_ITEM", "BLOCKSDOOR"]
},
{
"type": "furniture",
"id": "f_dryer",
"name": "dryer",
"symbol": "{",
"bgcolor": "white",
"move_cost_mod": -1,
"required_str": 16,
"flags": ["CONTAINER", "BASHABLE", "PLACE_ITEM", "BLOCKSDOOR"]
},
{
"type": "furniture",
"id": "f_dumpster",
"name": "dumpster",
"symbol": "{",
"color": "green",
"move_cost_mod": -1,
"required_str": 16,
"flags": ["CONTAINER", "BASHABLE", "PLACE_ITEM", "BLOCKSDOOR"]
},
{
"type": "furniture",
"id": "f_dive_block",
"name": "diving block",
"symbol": "O",
"color": "ltgray",
"move_cost_mod": -1,
"required_str": 16,
"flags": ["TRANSPARENT"]
},
{
"type": "furniture",
"id": "f_crate_c",
"name": "crate",
"symbol": "X",
"bgcolor": "brown",
"move_cost_mod": -1,
"required_str": 14,
"flags": ["TRANSPARENT", "BASHABLE", "CONTAINER", "SEALED", "FLAMMABLE", "DECONSTRUCT", "PLACE_ITEM", "ORGANIC"],
"bash": {
"str_min": 1, "str_max": 20,
"sound": "smash!",
"sound_fail": "wham!",
"items": [
{ "item": "2x4", "amount": 5, "minamount": 1},
{ "item": "nail", "amount": 10, "minamount": 2 }
]
}
},
{
"type": "furniture",
"id": "f_crate_o",
"name": "open crate",
"symbol": "O",
"bgcolor": "brown",
"move_cost_mod": -1,
"required_str": 12,
"flags": ["TRANSPARENT", "BASHABLE", "CONTAINER", "FLAMMABLE", "PLACE_ITEM", "ORGANIC"],
"bash": {
"str_min": 1, "str_max": 20,
"sound": "smash!",
"sound_fail": "wham!",
"items": [
{ "item": "2x4", "amount": 5, "minamount": 1},
{ "item": "nail", "amount": 10, "minamount": 2 }
]
}
},
{
"type": "furniture",
"id": "f_canvas_wall",
"name": "canvas wall",
"symbol": "#",
"color": "blue",
"move_cost_mod": -1,
"required_str": -1,
"flags": ["FLAMMABLE_HARD", "BASHABLE", "NOITEM"]
},
{
"type": "furniture",
"id": "f_canvas_door",
"name": "canvas flap",
"symbol": "+",
"color": "blue",
"move_cost_mod": -1,
"required_str": -1,
"flags": ["FLAMMABLE_HARD", "BASHABLE", "NOITEM"],
"open": "f_canvas_door_o"
},
{
"type": "furniture",
"id": "f_canvas_door_o",
"name": "open canvas flap",
"symbol": ".",
"color": "blue",
"move_cost_mod": 0,
"required_str": -1,
"flags": ["TRANSPARENT"],
"close": "f_canvas_door"
},
{
"type": "furniture",
"id": "f_groundsheet",
"name": "groundsheet",
"symbol": ";",
"color": "green",
"move_cost_mod": 0,
"required_str": -1,
"flags": ["TRANSPARENT", "INDOORS"],
"examine_action": "tent"
},
{
"type": "furniture",
"id": "f_fema_groundsheet",
"name": "groundsheet",
"symbol": ";",
"color": "green",
"move_cost_mod": 0,
"required_str": -1,
"flags": ["TRANSPARENT", "INDOORS", "ORGANIC"]
},
{
"type": "furniture",
"id": "f_skin_wall",
"name": "animalskin wall",
"symbol": "#",
"color": "brown",
"move_cost_mod": -1,
"required_str": -1,
"flags": ["FLAMMABLE_HARD", "BASHABLE", "NOITEM"]
},
{
"type": "furniture",
"id": "f_skin_door",
"name": "animalskin flap",
"symbol": "+",
"color": "white",
"move_cost_mod": -1,
"required_str": -1,
"flags": ["FLAMMABLE_HARD", "BASHABLE", "NOITEM"],
"open": "f_skin_door_o"
},
{
"type": "furniture",
"id": "f_skin_door_o",
"name": "open animalskin flap",
"symbol": ".",
"color": "white",
"move_cost_mod": 0,
"required_str": -1,
"flags": ["TRANSPARENT"],
"close": "f_skin_door"
},
{
"type": "furniture",
"id": "f_skin_groundsheet",
"name": "animalskin floor",
"symbol": ";",
"color": "brown",
"move_cost_mod": 0,
"required_str": -1,
"flags": ["TRANSPARENT", "INDOORS"],
"examine_action": "shelter"
},
{
"type": "furniture",
"id": "f_mutpoppy",
"name": "mutated poppy flower",
"symbol": "f",
"color": "red",
"move_cost_mod": 1,
"required_str": -1,
"flags": ["TRANSPARENT"],
"examine_action": "flower_poppy"
},
{
"type": "furniture",
"id": "f_flower_fungal",
"name": "fungal flower",
"symbol": "f",
"color": "dkgray",
"move_cost_mod": 1,
"required_str": -1,
"flags": ["TRANSPARENT", "FLOWER", "FUNGUS"],
"examine_action": "fungus"
},
{
"type": "furniture",
"id": "f_fungal_mass",
"name": "fungal mass",
"symbol": "O",
"bgcolor": "dkgray",
"move_cost_mod": -10,
"required_str": -1,
"flags": ["BASHABLE", "CONTAINER", "SEALED", "FLAMMABLE_ASH", "FUNGUS"]
},
{
"type": "furniture",
"id": "f_fungal_clump",
"name": "fungal clump",
"symbol": "#",
"bgcolor": "ltgray",
"move_cost_mod": 3,
"required_str": -1,
"flags": ["TRANSPARENT", "BASHABLE", "CONTAINER", "SEALED", "FLAMMABLE_ASH", "FUNGUS"]
},
{
"type": "furniture",
"id": "f_safe_c",
"name": "safe",
"symbol": "X",
"color": "ltgray",
"move_cost_mod": -1,
"required_str": 14,
"flags": ["TRANSPARENT", "BASHABLE", "CONTAINER", "SEALED", "PLACE_ITEM"],
"open": "f_safe"
},
{
"type": "furniture",
"id": "f_safe_l",
"name": "safe",
"symbol": "X",
"color": "ltgray",
"move_cost_mod": -1,
"required_str": 14,
"flags": ["TRANSPARENT", "BASHABLE", "CONTAINER", "SEALED", "PLACE_ITEM"],
"examine_action": "safe"
},
{
"type": "furniture",
"id": "f_safe_o",
"name": "open safe",
"symbol": "O",
"color": "ltgray",
"move_cost_mod": -1,
"required_str": 14,
"flags": ["TRANSPARENT", "BASHABLE", "CONTAINER", "PLACE_ITEM"],
"close": "f_safe"
},
{
"type": "furniture",
"id": "f_plant_seed",
"name": "seed",
"symbol": "^",
"color": "brown",
"move_cost_mod": 0,
"required_str": -1,
"flags": ["PLANT", "SEALED", "TRANSPARENT", "CONTAINER", "NOITEM"],
"examine_action": "aggie_plant"
},
{
"type": "furniture",
"id": "f_plant_seedling",
"name": "seedling",
"symbol": "^",
"color": "green",
"move_cost_mod": 0,
"required_str": -1,
"flags": ["PLANT", "SEALED", "TRANSPARENT", "CONTAINER", "NOITEM"],
"examine_action": "aggie_plant"
},
{
"type": "furniture",
"id": "f_plant_mature",
"name": "mature plant",
"symbol": "#",
"color": "green",
"move_cost_mod": 0,
"required_str": -1,
"flags": ["PLANT", "SEALED", "TRANSPARENT", "CONTAINER", "NOITEM"],
"examine_action": "aggie_plant"
},
{
"type": "furniture",
"id": "f_plant_harvest",
"name": "harvestable plant",
"symbol": "#",
"color": "ltgreen",
"move_cost_mod": 0,
"required_str": -1,
"flags": ["PLANT", "SEALED", "TRANSPARENT", "CONTAINER", "NOITEM"],
"examine_action": "aggie_plant"
}
]
-478
View File
@@ -1,478 +0,0 @@
[
{
"type": "profession",
"description": "You are the bringer of nightmares, terror to children and adults everywhere.",
"ident": "nightmare",
"items": [
"haunted_sweater",
"haunted_pants",
"knife_gloves",
"boots_steel"
],
"name": "Dream Stalker",
"points": 0,
"skills": [
{
"level": 8,
"name": "melee"
},
{
"level": 8,
"name": "dodge"
}
]
},
{
"type" : "profession",
"ident": "agent",
"name": "Agent",
"description": "You look entirely too put together for the situation, with a spotless suit and sunglasses.",
"items":[
"dress_shoes",
"rm99_pistol",
"8mm_inc",
"8mm_inc",
"8mm_inc",
"advanced_suit",
"sunglasses"
],
"CBMs":[
"bio_torsionratchet",
"bio_furnace",
"bio_ears",
"bio_eye_enhancer",
"bio_dex_enhancer",
"bio_str_enhancer",
"bio_int_enhancer",
"bio_probability_travel",
"bio_ethanol",
"bio_power_storage_mkII",
"bio_power_storage_mkII"
],
"points": 0,
"skills": [
{
"level": 8,
"name": "gun"
},
{
"level": 8,
"name": "dodge"
}
]
},
{
"type" : "profession",
"ident": "terminator",
"name": "Terminator",
"description": "YOUR MISSION IS TO FIND AND PROTECT <ERROR: DATA EXPUNGED>.",
"items":[
"rm51_assault_rifle",
"8mm_inc",
"8mm_inc",
"8mm_inc"
],
"CBMs":[
"bio_torsionratchet",
"bio_furnace",
"bio_flashbang",
"bio_ods",
"bio_armor_legs",
"bio_armor_arms",
"bio_armor_torso",
"bio_armor_head",
"bio_carbon",
"bio_chain_lightning",
"bio_hydraulics",
"bio_nanobots",
"bio_eye_enhancer",
"bio_dex_enhancer",
"bio_str_enhancer",
"bio_power_storage_mkII",
"bio_power_storage_mkII",
"bio_power_storage_mkII",
"bio_power_storage_mkII"
],
"points": 0,
"skills": [
{
"level": 4,
"name": "gun"
},
{
"level": 12,
"name": "melee"
}
]
},
{
"type": "profession",
"ident": "killer_clown",
"name": "Killer Clown",
"description": "THEY FLOAT, THEY ALL FLOAT.",
"points": 0,
"items": [
"clown_suit",
"clownshoes",
"lethal_balloon"
],
"skills": [
{
"level": 4,
"name": "dodge"
},
{
"level": 5,
"name": "melee"
}
]
},
{
"type": "profession",
"ident": "ghost",
"name": "Ghost",
"description": "You are a spooky ghost. The spookiest.",
"points": 0,
"items": [
"ghost_sheet"
],
"skills": [
{
"level": 30,
"name": "dodge"
}
]
},
{
"type" : "ARMOR",
"id" : "haunted_sweater",
"name" : "haunted sweater",
"weight" : 1450,
"color" : "dark_gray",
"covers" : ["TORSO", "ARMS"],
"to_hit" : 1,
"storage" : 8,
"symbol" : "[",
"description" : "A simple striped sweater, it awakens disturbing feelings deep within you.",
"price" : 150,
"material" : ["leather", "null"],
"volume" : 18,
"cutting" : 0,
"warmth" : 30,
"phase" : "solid",
"enviromental_protection" : 2,
"encumbrance" : 1,
"bashing" : -2,
"flags" : ["VARSIZE"],
"coverage" : 100,
"material_thickness" : 8
},
{
"type" : "ARMOR",
"id" : "haunted_pants",
"name" : "haunted leather pants",
"weight" : 980,
"color" : "dark_gray",
"covers" : ["LEGS"],
"to_hit" : 1,
"storage" : 4,
"symbol" : "[",
"description" : "A pair of black leather pants, they remind you of traumas you experienced as a child.",
"price" : 210,
"material" : ["leather", "null"],
"volume" : 10,
"cutting" : 0,
"warmth" : 25,
"phase" : "solid",
"enviromental_protection" : 0,
"encumbrance" : 1,
"bashing" : -2,
"flags" : ["VARSIZE"],
"coverage" : 95,
"material_thickness" : 8
},
{
"type" : "ARMOR",
"id" : "advanced_suit",
"name" : "agency suit",
"weight" : 1587,
"color" : "light_gray",
"covers" : ["LEGS", "TORSO", "ARMS"],
"to_hit" : -5,
"storage" : 20,
"symbol" : "[",
"description" : "A professional outfit, for a professional man.",
"price" : 180,
"material" : ["cotton", "null"],
"volume" : 19,
"cutting" : 0,
"warmth" : 25,
"phase" : "solid",
"enviromental_protection" : 1,
"encumbrance" : 1,
"bashing" : -5,
"flags" : ["VARSIZE", "FANCY", "POCKETS"],
"coverage" : 95,
"material_thickness" : 4
},
{
"type" : "ARMOR",
"id" : "ghost_sheet",
"name" : "ghost sheet",
"weight" : 1587,
"color" : "light_gray",
"covers" : ["TORSO", "ARMS"],
"to_hit" : -5,
"storage" : 20,
"symbol" : "[",
"description" : "A normal white sheet with three eyeholes cut out of it. It can be worn over your head to make you look like a ghost. Spooky!",
"price" : 180,
"material" : ["cotton", "null"],
"volume" : 19,
"cutting" : 0,
"warmth" : 25,
"phase" : "solid",
"enviromental_protection" : 0,
"encumbrance" : 2,
"bashing" : -5,
"coverage" : 100,
"material_thickness" : 1
},
{
"type":"GENERIC",
"id" : "lethal_balloon",
"name" : "lead balloon",
"description" : "Despite being solid, heavy, and filled with a terrifying energy, this balloon still floats.",
"weight" : 168,
"to_hit" : 2,
"color" : "red",
"symbol" : "O",
"material" : ["plastic", "null"],
"volume" : 8,
"bashing" : 50,
"cutting" : 0,
"price" : 0
},
{
"id": "haunted_machete",
"type": "TOOL",
"symbol": "/",
"color": "blue",
"name": "machete",
"description": "This weapon whispers sweet compliments into your ear, mixed with encouraging you to kill and murder lest it, in it's unsated bloodlust, decide to kill and murder you instead.",
"price": 280,
"material": "iron",
"techniques": ["RAPID", "WBLOCK_2"],
"weight": 538,
"volume": 8,
"bashing": 16,
"cutting": 56,
"flags" : ["CHOP"],
"to_hit": 8,
"max_charges": 0,
"initial_charges": 0,
"charges_per_use": 0,
"turns_per_charge": 0,
"ammo": "NULL",
"revert_to": "null",
"use_action": "KNIFE",
"qualities": [["CUT", 1]]
},
{
"id": "knife_gloves",
"type": "TOOL",
"symbol": "/",
"color": "blue",
"name": "knife gloves",
"description": "With these strapped to your hands, you're sure you could take on the entire world, images and memories of burning and flames be damned.",
"price": 280,
"material": "iron",
"techniques": "RAPID",
"weight": 200,
"volume": 3,
"bashing": 10,
"cutting": 30,
"flags" : ["CHOP"],
"to_hit": 10,
"max_charges": 0,
"initial_charges": 0,
"charges_per_use": 0,
"turns_per_charge": 0,
"ammo": "NULL",
"revert_to": "null",
"use_action": "KNIFE",
"qualities": [["CUT", 1]]
},
{
"type":"MONSTER",
"id":"mon_werewolf",
"name": "Werewolf",
"species":"mammal",
"symbol":"W",
"color":"brown",
"size":"MEDIUM",
"material":"flesh",
"diff":15,
"aggression":70,
"morale":100,
"speed":130,
"melee_skill":10,
"melee_dice":2,
"melee_dice_sides":6,
"melee_cut":7,
"dodge":7,
"armor_bash":7,
"armor_cut":10,
"item_chance":0,
"luminance":0,
"hp":60,
"death_function":"NORMAL",
"description": "Shaggy fur, sharp teeth, hunched posture and broad shoulders. Not a wolf, no longer a man, and now very, very dangerous.",
"flags":["SEES", "HEARS", "WARM", "BASHES", "BLEED", "REGENERATES_10", "NO_BREATHE", "VIS50"],
"anger_triggers":["STALK", "PLAYER_WEAK", "HURT"],
"fear_triggers":["FIRE"]
},
{
"type":"MONSTER",
"id":"mon_vampire",
"name": "Vampire",
"species":"ZOMBIE",
"symbol":"V",
"color":"dkgray",
"size":"MEDIUM",
"material":"flesh",
"diff":3,
"aggression":50,
"morale":100,
"speed":110,
"melee_skill":11,
"melee_dice":1,
"melee_dice_sides":6,
"melee_cut":4,
"dodge":8,
"armor_bash":5,
"armor_cut":0,
"item_chance":0,
"luminance":0,
"hp":80,
"death_function":"NORMAL",
"description":"With pale skin, a penetrating gaze, an an unnatural aura, this graceful hunter of the night will not be easy to kill.",
"flags":["SEES", "HEARS", "WARM", "BASHES", "REGENERATES_10", "NO_BREATHE", "VIS30"],
"anger_triggers":["PLAYER_CLOSE", "PLAYER_WEAK", "HURT"],
"fear_triggers":["FIRE"]
},
{
"type":"MONSTER",
"id":"mon_doll",
"name": "Possessed Doll",
"species":"ZOMBIE",
"symbol":"|",
"color":"white",
"size":"SMALL",
"material":"plastic",
"diff":3,
"aggression":100,
"morale":100,
"speed":150,
"melee_skill":12,
"melee_dice":3,
"melee_dice_sides":4,
"melee_cut":4,
"dodge":10,
"armor_bash":5,
"armor_cut":25,
"item_chance":0,
"luminance":0,
"hp":90,
"death_function":"NORMAL",
"description":"It's cracked plastic face locked into a devilish grin, it wouldn't be nearly so bad if it wasn't carrying a knife half the size of it's body.",
"flags":["SEES", "HEARS", "WARM", "BASHES", "NO_BREATHE", "VIS30"]
},
{
"type":"MONSTER",
"id":"mon_frankenstein",
"name": "Frankenstein",
"species":"ZOMBIE",
"symbol":"Z",
"color":"black",
"size":"LARGE",
"material":"flesh",
"diff":3,
"aggression":0,
"morale":100,
"speed":50,
"melee_skill":4,
"melee_dice":3,
"melee_dice_sides":15,
"melee_cut":0,
"dodge":0,
"armor_bash":10,
"armor_cut":10,
"item_chance":0,
"luminance":0,
"hp":460,
"death_function":"NORMAL",
"description":"A product of the most advanced sort of mad science, this patchwork product of dozens of worked over corpses is truly a sight to behold. Far stronger and more durable than it appears at first glance.",
"flags":["SEES", "HEARS", "WARM", "BASHES", "NO_BREATHE", "VIS30", "DESTROYS"],
"anger_triggers":["PLAYER_CLOSE", "PLAYER_WEAK", "HURT"],
"fear_triggers":["FIRE"]
},
{
"type":"MONSTER",
"id":"mon_terminator",
"name": "Terminator",
"species":"ROBOT",
"symbol":"T",
"color":"ltgray",
"size":"LARGE",
"material":"steel",
"diff":15,
"aggression":100,
"morale":100,
"speed":100,
"melee_skill":10,
"melee_dice":1,
"melee_dice_sides":20,
"melee_cut":0,
"dodge":0,
"armor_bash":10,
"armor_cut":10,
"item_chance":0,
"luminance":0,
"hp":120,
"death_function":"NORMAL",
"description":"A metallic human skeleton, blades for hands, and bright red eyes, there is no humanity behind the eyes of this vaguely human form - just orders to kill.",
"flags":["SEES", "HEARS", "ELECTRONIC", "BASHES", "NO_BREATHE", "VIS50", "REGENERATES_10", "DESTROYS"],
"anger_triggers":["PLAYER_CLOSE", "PLAYER_WEAK", "HURT"],
"fear_triggers":["FIRE"]
},
{
"type":"MONSTER",
"id":"mon_gremlin",
"name": "Gremlin",
"species":"UNKNOWN",
"symbol":"g",
"color":"green",
"size":"TINY",
"material":"flesh",
"diff":3,
"aggression":100,
"morale":80,
"speed":120,
"melee_skill":4,
"melee_dice":1,
"melee_dice_sides":4,
"melee_cut":3,
"dodge":5,
"armor_bash":2,
"armor_cut":0,
"item_chance":0,
"luminance":0,
"hp":20,
"death_function":"NORMAL",
"description":"Big ears, big eyes, big mouth, big sharp teeth, and a small body. These gibbering creatures, often adorned in stolen human scraps, find the idea of tearing you to pieces absolutely gleeful.",
"flags":["SEES", "HEARS", "WARM", "BASHES", "VIS50"],
"anger_triggers":["STALK", "PLAYER_WEAK"],
"fear_triggers":["HURT", "FRIEND_DIED"]
}
]
-279
View File
@@ -1,279 +0,0 @@
[
{
"type" : "hint",
"text" : "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."
},{
"type" : "hint",
"text" : "Ever run into those big worm things? If you see trails of churned-up dirt, you can be sure they're around."
},{
"type" : "hint",
"text" : "Try to stay on the roads as much as you can. Giant worms can't cross them!"
},{
"type" : "hint",
"text" : "Don't relax after killing a giant worm. Little bits of them can break off and still attack!"
},{
"type" : "hint",
"text" : "If you see a big mob of zombies coming, RUN! Trying to fight them all is suicide unless you have a big tactical advantage."
},{
"type" : "hint",
"text" : "Watch out for those zombies that shriek; they'll let other zombies know where you are, and will attract them from all over."
},{
"type" : "hint",
"text" : "Those acid-spitting zombies are pretty nasty, but if you're smart, you can get other zombies to wade through the acid."
},{
"type" : "hint",
"text" : "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."
},{
"type" : "hint",
"text" : "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."
},{
"type" : "hint",
"text" : "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!"
},{
"type" : "hint",
"text" : "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."
},{
"type" : "hint",
"text" : "Zombie brutes and hulks have really tough hide. Don't bother shooting at them with lower-caliber guns, the bullet will bounce right off!"
},{
"type" : "hint",
"text" : "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."
},{
"type" : "hint",
"text" : "Skeletons are a tough target. They're so skinny and full of holes that bullets fired at them will usually just fly right past."
},{
"type" : "hint",
"text" : "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."
},{
"type" : "hint",
"text" : "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."
},{
"type" : "hint",
"text" : "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!"
},{
"type" : "hint",
"text" : "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."
},{
"type" : "hint",
"text" : "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."
},{
"type" : "hint",
"text" : "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."
},{
"type" : "hint",
"text" : "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."
},{
"type" : "hint",
"text" : "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..."
},{
"type" : "hint",
"text" : "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."
},{
"type" : "hint",
"text" : "There's snakes down in most of the old sewer systems. They're slow on land, but boy, those suckers can swim fast!"
},{
"type" : "hint",
"text" : "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!"
},{
"type" : "hint",
"text" : "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..."
},{
"type" : "hint",
"text" : "Ever go toe-to-toe with a manhack? Tiny little helicopters covered in knives. Best be packing a shotgun!"
},{
"type" : "hint",
"text" : "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..."
},{
"type" : "hint",
"text" : "Don't fire your gun if you can help it--the noise attracts monsters!"
},{
"type" : "hint",
"text" : "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."
},{
"type" : "hint",
"text" : "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."
},{
"type" : "hint",
"text" : "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."
},{
"type" : "hint",
"text" : "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."
},{
"type" : "hint",
"text" : "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."
},{
"type" : "hint",
"text" : "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!"
},{
"type" : "hint",
"text" : "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!"
},{
"type" : "hint",
"text" : "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."
},{
"type" : "hint",
"text" : "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..."
},{
"type" : "hint",
"text" : "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..."
},{
"type" : "hint",
"text" : "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!"
},{
"type" : "hint",
"text" : "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."
},{
"type" : "hint",
"text" : "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."
},{
"type" : "hint",
"text" : "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."
},{
"type" : "hint",
"text" : "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."
},{
"type" : "hint",
"text" : "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!"
},{
"type" : "hint",
"text" : "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."
},{
"type" : "hint",
"text" : "You know, you don't have to go full auto with an assault rifle. Firing single shots is more accurate and efficient!"
},{
"type" : "hint",
"text" : "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..."
},{
"type" : "hint",
"text" : "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."
},{
"type" : "hint",
"text" : "You don't really need to wear gloves most of the time, but once in a while they'll really come in handy."
},{
"type" : "hint",
"text" : "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."
},{
"type" : "hint",
"text" : "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."
},{
"type" : "hint",
"text" : "Ski goggles are a great choice if you're worried about getting stuff in your eyes. Perfect for dealing with boomers!"
},{
"type" : "hint",
"text" : "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."
},{
"type" : "hint",
"text" : "I know they look dumb, but wearing a fanny pack gives you that extra bit of storage without encumbering you."
},{
"type" : "hint",
"text" : "Backpacks let you carry lots of stuff, but they limit your movement a lot. If you're an unarmed fighter, don't wear one!"
},{
"type" : "hint",
"text" : "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."
},{
"type" : "hint",
"text" : "It's a good idea to carry around a couple of empty bottles. You can fill them up with water, gasoline, or whatever!"
},{
"type" : "hint",
"text" : "If you need a bunch of rags for making molotov cocktails, take a pair of scissors to an old t-shirt or something."
},{
"type" : "hint",
"text" : "Carrying a lighter is something all veterans do. It takes up almost no space, and can easily save your life."
},{
"type" : "hint",
"text" : "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!"
},{
"type" : "hint",
"text" : "Crowbars not only make a pretty good weapon, they're also useful for opening locked doors and lifting manhole covers."
},{
"type" : "hint",
"text" : "If you're spending the night in a dangerous area, grab a shovel and dig pits all around your camp."
},{
"type" : "hint",
"text" : "A chainsaw may seem like a great weapon, but remember that they're slow, unwieldy, and very noisy."
},{
"type" : "hint",
"text" : "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."
},{
"type" : "hint",
"text" : "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!"
},{
"type" : "hint",
"text" : "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."
},{
"type" : "hint",
"text" : "Don't use molotovs indoors. Especially in a liquor store."
},{
"type" : "hint",
"text" : "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."
},{
"type" : "hint",
"text" : "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."
},{
"type" : "hint",
"text" : "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."
},{
"type" : "hint",
"text" : "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."
},{
"type" : "hint",
"text" : "If you're wandering in the wilderness, or following a road, keep an eye out for wild strawberries or blueberries."
},{
"type" : "hint",
"text" : "Be careful eating wild mushrooms. Some are poisonous, and others can make you hallucinate."
},{
"type" : "hint",
"text" : "Try to go around swamps, if you can. Some of them have sinkholes that can pull you right underground."
},{
"type" : "hint",
"text" : "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."
},{
"type" : "hint",
"text" : "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."
},{
"type" : "hint",
"text" : "Houses can be a surprisingly good resource for all kinds of stuff; clothing, medication, food, books, and more."
},{
"type" : "hint",
"text" : "While there's not much to loot, gas stations are a good source for gasoline, to power tools or to make molotov cocktails."
},{
"type" : "hint",
"text" : "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."
},{
"type" : "hint",
"text" : "I know grocery stores and stuff are full of fruit, but be careful, it's probably rotten."
},{
"type" : "hint",
"text" : "Next time you visit a grocery store, load up on canned goods. They never go bad!"
},{
"type" : "hint",
"text" : "I've found more good weapons in hardware stores than anywhere else. Except gun stores, of course."
},{
"type" : "hint",
"text" : "Liquor stores are a great place to pick up non-alcoholic beverages, too. Not that I mind alcohol!"
},{
"type" : "hint",
"text" : "Most gun stores follow pretty similar layouts. The restricted stuff--SMGs, assault rifles, and most importantly ammo--are always behind the counter."
},{
"type" : "hint",
"text" : "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!"
},{
"type" : "hint",
"text" : "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."
},{
"type" : "hint",
"text" : "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."
},{
"type" : "hint",
"text" : "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?"
},{
"type" : "hint",
"text" : "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?"
},{
"type" : "hint",
"text" : "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!"
},{
"type" : "hint",
"text" : "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."
}
]
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
-980
View File
@@ -1,980 +0,0 @@
[
{
"type" : "AMMO",
"id" : "arrowhead",
"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" : 8,
"bashing" : 1,
"cutting" : 0,
"to_hit" : 0,
"ammo_type" : "components",
"casing" : "NULL",
"damage" : 0,
"pierce" : 0,
"range" : 0,
"dispersion" : 0,
"recoil" : 0,
"count" : 10,
"stack_size" : 20
},
{
"type" : "AMMO",
"id" : "fletching",
"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" : "components",
"casing" : "NULL",
"damage" : 0,
"pierce" : 0,
"range" : 0,
"dispersion" : 0,
"recoil" : 0,
"count" : 10,
"stack_size" : 100
},
{
"type" : "AMMO",
"id" : "shaft_wood",
"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" : 42,
"bashing" : 1,
"cutting" : 0,
"to_hit" : 0,
"ammo_type" : "arrow",
"casing" : "NULL",
"damage" : 0,
"pierce" : 0,
"range" : 0,
"dispersion" : 34,
"recoil" : 0,
"count" : 10
},
{
"type" : "AMMO",
"id" : "shaft_wood_heavy",
"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" : 48,
"bashing" : 2,
"cutting" : 0,
"to_hit" : 0,
"ammo_type" : "arrow",
"casing" : "NULL",
"damage" : 2,
"pierce" : 0,
"range" : 1,
"dispersion" : 29,
"recoil" : 0,
"count" : 10
},
{
"type" : "AMMO",
"id" : "shaft_metal",
"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" : 54,
"bashing" : 3,
"cutting" : 0,
"to_hit" : 0,
"ammo_type" : "arrow",
"casing" : "NULL",
"damage" : 3,
"pierce" : 0,
"range" : 3,
"dispersion" : 24,
"recoil" : 0,
"count" : 10
},
{
"type" : "AMMO",
"id" : "arrow_fire_hardened",
"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" : 42,
"bashing" : 2,
"cutting" : 0,
"to_hit" : 0,
"ammo_type" : "arrow",
"casing" : "NULL",
"damage" : 3,
"pierce" : 0,
"range" : 2,
"dispersion" : 29,
"recoil" : 0,
"count" : 10
},
{
"type" : "AMMO",
"id" : "arrow_field_point",
"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" : 44,
"bashing" : 3,
"cutting" : 0,
"to_hit" : 0,
"ammo_type" : "arrow",
"casing" : "NULL",
"damage" : 6,
"pierce" : 1,
"range" : 2,
"dispersion" : 29,
"recoil" : 0,
"count" : 10
},
{
"type" : "AMMO",
"id" : "arrow_small_game",
"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" : 44,
"bashing" : 4,
"cutting" : 0,
"to_hit" : 0,
"ammo_type" : "arrow",
"casing" : "NULL",
"damage" : 2,
"pierce" : 0,
"range" : 2,
"dispersion" : 29,
"recoil" : 0,
"count" : 10,
"flags" : ["NOGIB"]
},
{
"type" : "AMMO",
"id" : "arrow_fire_hardened_fletched",
"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" : 43,
"bashing" : 3,
"cutting" : 0,
"to_hit" : 0,
"ammo_type" : "arrow",
"casing" : "NULL",
"damage" : 4,
"pierce" : 0,
"range" : 6,
"dispersion" : 14,
"recoil" : 0,
"count" : 10
},
{
"type" : "AMMO",
"id" : "arrow_field_point_fletched",
"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" : 46,
"bashing" : 3,
"cutting" : 0,
"to_hit" : 0,
"ammo_type" : "arrow",
"casing" : "NULL",
"damage" : 7,
"pierce" : 2,
"range" : 6,
"dispersion" : 14,
"recoil" : 0,
"count" : 10
},
{
"type" : "AMMO",
"id" : "arrow_wood",
"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" : 51,
"bashing" : 2,
"cutting" : 1,
"to_hit" : 0,
"ammo_type" : "arrow",
"casing" : "NULL",
"damage" : 10,
"pierce" : 3,
"range" : 7,
"dispersion" : 9,
"recoil" : 0,
"count" : 10
},
{
"type" : "AMMO",
"id" : "arrow_heavy_fire_hardened_fletched",
"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" : 64,
"bashing" : 4,
"cutting" : 0,
"to_hit" : 0,
"ammo_type" : "arrow",
"casing" : "NULL",
"damage" : 5,
"pierce" : 2,
"range" : 7,
"dispersion" : 9,
"recoil" : 0,
"count" : 10
},
{
"type" : "AMMO",
"id" : "arrow_heavy_field_point_fletched",
"price" : 70,
"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" : 67,
"bashing" : 4,
"cutting" : 0,
"to_hit" : 0,
"ammo_type" : "arrow",
"casing" : "NULL",
"damage" : 6,
"pierce" : 3,
"range" : 7,
"dispersion" : 9,
"recoil" : 0,
"count" : 10
},
{
"type" : "AMMO",
"id" : "arrow_wood_heavy",
"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" : 71,
"bashing" : 6,
"cutting" : 2,
"to_hit" : 0,
"ammo_type" : "arrow",
"casing" : "NULL",
"damage" : 12,
"pierce" : 5,
"range" : 8,
"dispersion" : 4,
"recoil" : 0,
"count" : 10
},
{
"type" : "AMMO",
"id" : "arrow_metal_sharpened",
"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" : 441,
"bashing" : 2,
"cutting" : 0,
"to_hit" : 0,
"ammo_type" : "arrow",
"casing" : "NULL",
"damage" : 5,
"pierce" : 3,
"range" : 5,
"dispersion" : 19,
"recoil" : 0,
"count" : 10
},
{
"type" : "AMMO",
"id" : "arrow_metal",
"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" : 442,
"bashing" : 3,
"cutting" : 2,
"to_hit" : 0,
"ammo_type" : "arrow",
"casing" : "NULL",
"damage" : 14,
"pierce" : 7,
"range" : 10,
"dispersion" : 4,
"recoil" : 0,
"count" : 10
},
{
"type" : "AMMO",
"id" : "arrow_cf",
"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" : 8,
"bashing" : 1,
"cutting" : 0,
"to_hit" : 0,
"ammo_type" : "arrow",
"casing" : "NULL",
"damage" : 10,
"pierce" : 5,
"range" : 8,
"dispersion" : 9,
"recoil" : 0,
"count" : 8,
"stack_size" : 10
},
{
"type" : "AMMO",
"id" : "arrow_exploding",
"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" : 633,
"bashing" : 2,
"cutting" : 0,
"to_hit" : 0,
"ammo_type" : "arrow",
"casing" : "NULL",
"damage" : 15,
"pierce" : 9,
"range" : 5,
"dispersion" : 19,
"recoil" : 0,
"count" : 5,
"effects" : ["EXPLOSIVE"]
},
{
"type":"GENERIC",
"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?",
"price" : 400,
"material" : "iron",
"weight" : 562,
"volume" : 1,
"bashing" : 10,
"cutting" : 0,
"to_hit" : -1,
"count" : 5,
"effects" : ["EXPLOSIVE"]
},
{
"type" : "AMMO",
"id" : "arrow_flamming",
"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" : 150,
"bashing" : 2,
"cutting" : 0,
"to_hit" : 0,
"ammo_type" : "arrow",
"casing" : "NULL",
"damage" : 15,
"pierce" : 9,
"range" : 5,
"dispersion" : 19,
"recoil" : 0,
"count" : 5,
"effects" : ["IGNITE"]
},
{
"type" : "AMMO",
"id" : "bolt_wood",
"price" : 100,
"name" : "wood crossbow bolt",
"symbol" : "=",
"color" : "green",
"description" : "A sharpened bolt carved from wood. It's very light, but doesn't do much damage and isn't particularly accurate. Stands a good chance of remaining intact once fired.",
"material" : "wood",
"volume" : 1,
"weight" : 31,
"bashing" : 1,
"cutting" : 0,
"to_hit" : 0,
"ammo_type" : "bolt",
"casing" : "NULL",
"damage" : 10,
"pierce" : 1,
"range" : 0,
"dispersion" : 10,
"recoil" : 0,
"count" : 15
},
{
"type" : "AMMO",
"id" : "bolt_metal",
"rarity" : 7,
"price" : 130,
"name" : "metal crossbow bolt",
"symbol" : "=",
"color" : "green",
"description" : "A sharpened bolt made from metal of some kind. It's heavy and unwieldy, providing moderate damage and accuracy. Stands a good chance of remaining intact once fired.",
"material" : "iron",
"volume" : 1,
"weight" : 250,
"bashing" : 1,
"cutting" : 0,
"to_hit" : 0,
"ammo_type" : "bolt",
"casing" : "NULL",
"damage" : 15,
"pierce" : 5,
"range" : 3,
"dispersion" : 9,
"recoil" : 0,
"count" : 10
},
{
"type" : "AMMO",
"id" : "bolt_steel",
"price" : 160,
"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" : 217,
"bashing" : 5,
"cutting" : 0,
"to_hit" : 0,
"ammo_type" : "bolt",
"casing" : "NULL",
"damage" : 20,
"pierce" : 10,
"range" : 6,
"dispersion" : 8,
"recoil" : 0,
"count" : 10
},
{
"type" : "AMMO",
"id" : "bolt_explosive",
"rarity" : 7,
"price" : 200,
"name" : "explosive crossbow bolt",
"symbol" : "=",
"color" : "green",
"description" : "A sharpened bolt made from metal of some kind. It's light but unwieldy, providing moderate accuracy, because it's been filled with explosives and fitted with an impact trigger.",
"material" : "iron",
"volume" : 1,
"weight" : 620,
"bashing" : 1,
"cutting" : 0,
"to_hit" : 0,
"ammo_type" : "bolt",
"casing" : "NULL",
"damage" : 12,
"pierce" : 2,
"range" : 8,
"dispersion" : 9,
"recoil" : 0,
"count" : 1,
"stack_size" : 10,
"effects" : ["COOKOFF", "EXPLOSIVE"]
},
{
"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.",
"price" : 400,
"material" : "wood",
"flags" : ["ALWAYS_TWOHAND", "RELOAD_AND_SHOOT"],
"skill" : "archery",
"ammo" : "arrow",
"weight" : 1360,
"volume" : 10,
"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",
"price" : 800,
"material" : "wood",
"flags" : ["ALWAYS_TWOHAND", "STR8_DRAW", "RELOAD_AND_SHOOT"],
"skill" : "archery",
"ammo" : "arrow",
"weight" : 340,
"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",
"price" : 700,
"material" : ["steel", "plastic"],
"flags" : ["ALWAYS_TWOHAND", "STR8_DRAW", "RELOAD_AND_SHOOT"],
"skill" : "archery",
"ammo" : "arrow",
"weight" : 907,
"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",
"price" : 1200,
"material" : ["wood", "plastic"],
"flags" : ["ALWAYS_TWOHAND", "STR10_DRAW", "RELOAD_AND_SHOOT"],
"skill" : "archery",
"ammo" : "arrow",
"weight" : 540,
"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",
"price" : 1200,
"material" : ["steel", "plastic"],
"flags" : ["ALWAYS_TWOHAND", "STR10_DRAW", "RELOAD_AND_SHOOT"],
"skill" : "archery",
"ammo" : "arrow",
"weight" : 540,
"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",
"price" : 1200,
"material" : ["steel", "plastic"],
"flags" : ["ALWAYS_TWOHAND", "STR10_DRAW", "RELOAD_AND_SHOOT"],
"skill" : "archery",
"ammo" : "arrow",
"weight" : 540,
"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",
"price" : 800,
"material" : "wood",
"flags" : ["ALWAYS_TWOHAND", "STR10_DRAW", "RELOAD_AND_SHOOT"],
"skill" : "archery",
"ammo" : "arrow",
"weight" : 680,
"volume" : 14,
"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.",
"price" : 1200,
"material" : ["wood", "bone"],
"flags" : ["ALWAYS_TWOHAND", "STR12_DRAW", "RELOAD_AND_SHOOT"],
"skill" : "archery",
"ammo" : "arrow",
"weight" : 540,
"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.",
"price" : 1000,
"material" : ["iron", "wood"],
"flags" : "none",
"skill" : "archery",
"ammo" : "bolt",
"weight" : 900,
"volume" : 2,
"bashing" : 4,
"cutting" : 0,
"to_hit" : -0,
"ranged_damage" : 7,
"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.",
"price" : 1000,
"material" : ["iron", "wood"],
"flags" : "STR_RELOAD",
"skill" : "archery",
"ammo" : "bolt",
"weight" : 2728,
"volume" : 6,
"bashing" : 11,
"cutting" : 0,
"to_hit" : 1,
"ranged_damage" : 13,
"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.",
"price" : 1000,
"material" : ["iron", "wood"],
"flags" : ["ALWAYS_TWOHAND", "STR_RELOAD"],
"skill" : "archery",
"ammo" : "bolt",
"weight" : 6803,
"volume" : 20,
"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.",
"price" : 1000,
"material" : ["iron", "wood"],
"flags" : ["ALWAYS_TWOHAND", "RELOAD_ONE", "MODE_BURST"],
"skill" : "archery",
"ammo" : "bolt",
"weight" : 3628,
"volume" : 10,
"bashing" : 13,
"cutting" : 0,
"to_hit" : -1,
"ranged_damage" : 10,
"range" : 8,
"dispersion" : 22,
"recoil" : 15,
"durability" : 6,
"burst" : 3,
"clip_size" : 10,
"reload" : 100
},
{
"id":"shaft_plastic",
"type":"AMMO",
"symbol":"=",
"color":"green",
"name":"plastic shaft",
"description":"A crude shaft made from plastic. It needs arrowheads and fletching to become a functional arrow. You can, however, fire it from a bow.",
"to_hit":0,
"price":0,
"material":"plastic",
"bashing":1,
"cutting":0,
"weight":6,
"volume":1,
"ammo_type":"arrow",
"range":0,
"pierce":0,
"damage":0,
"recoil":0,
"dispersion":40,
"count":10
},
{
"id":"arrowhead_plastic",
"type":"AMMO",
"color":"green",
"symbol":"=",
"name":"plastic arrowhead",
"description":"Plastic heads for an arrow. Placing these on an arrow will make the arrow more damaging and piercing.",
"price":0,
"material":"plastic",
"to_hit":0,
"cutting":0,
"bashing":1,
"weight":1,
"volume":1,
"ammo_type":"components",
"range":0,
"pierce":0,
"damage":0,
"recoil":0,
"dispersion":0,
"count":10
},
{ "type" : "AMMO",
"id" : "throwing_knife",
"price" : 100,
"name" : "throwing knife",
"symbol" : ";",
"color" : "light_gray",
"description" : "A thin and flat knife made for throwing. Its ineffective cutting edge and odd shape makes it unsuitable for use as a tool.",
"material" : "steel",
"volume" : 1,
"weight" : 268,
"bashing" : 1,
"cutting" : 12,
"to_hit" : 0,
"ammo_type" : "NULL",
"casing" : "NULL",
"damage" : 0,
"pierce" : 0,
"range" : 0,
"dispersion" : 0,
"recoil" : 0,
"count" : 5
},
{ "type" : "AMMO",
"id" : "throwing_axe",
"price" : 110,
"name" : "throwing axe",
"symbol" : ";",
"color" : "light_gray",
"description" : "A lightweight hatchet made for throwing. Its ineffective cutting edge and light weight makes it unsuitable for use as a tool.",
"material" : ["iron", "wood"],
"volume" : 3,
"weight" : 792,
"bashing" : 6,
"cutting" : 16,
"to_hit" : 0,
"ammo_type" : "NULL",
"casing" : "NULL",
"damage" : 0,
"pierce" : 0,
"range" : 0,
"dispersion" : 0,
"recoil" : 0,
"count" : 3
},
{
"id":"arrow_plastic",
"type":"AMMO",
"symbol":"=",
"color":"green",
"name":"plastic arrow",
"description":"This plastic arrow has a plastic arrow head and some fletchings.",
"price":20,
"material":"plastic",
"volume":1,
"weight":8,
"bashing":2,
"cutting":1,
"to_hit":0,
"ammo_type":"arrow",
"damage":8,
"pierce":1,
"range":12,
"dispersion":15,
"recoil":0,
"count":10
}
]
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
-307
View File
@@ -1,307 +0,0 @@
[
{
"id": "bag_plastic",
"type": "CONTAINER",
"symbol": ")",
"color": "light_gray",
"name": "plastic bag",
"description": "A small, open plastic bag. Essentially trash.",
"price": 1,
"weight": 2,
"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 500 ml of liquid.",
"price": 8,
"weight": 13,
"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 750 ml of liquid.",
"price": 1,
"weight": 200,
"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.",
"price": 1,
"weight": 13,
"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.",
"price": 2,
"weight": 400,
"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.",
"price": 0,
"weight": 151,
"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.",
"price": 1000,
"weight": 155,
"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.",
"price": 2500,
"weight": 1587,
"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.",
"price": 2500,
"weight": 190,
"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.",
"price": 2500,
"weight": 48,
"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.",
"price": 0,
"weight": 453,
"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.",
"price": 5000,
"weight": 4815,
"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.",
"price": 6000,
"weight": 13500,
"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.",
"price": 2500,
"weight": 264,
"volume": 2,
"bashing": 8,
"cutting": 0,
"to_hit": 1,
"material": "glass",
"contains": 2,
"flags": ["RIGID", "SEALS", "WATERTIGHT"]
},
{
"id": "jar_3l_glass",
"type": "CONTAINER",
"symbol": ")",
"color": "light_cyan",
"name": "3l glass jar",
"description": "A three-litre glass jar with a metal screw top lid, used for canning.",
"price": 3000,
"weight": 365,
"volume": 12,
"bashing": 10,
"cutting": 0,
"to_hit": 1,
"material": "glass",
"contains": 12,
"flags": ["RIGID", "SEALS", "WATERTIGHT"]
},
{
"id": "flask_hip",
"type": "CONTAINER",
"symbol": ")",
"color": "light_gray",
"name": "hip flask",
"description": "A 250 ml metal flask with a hinged screw-on lid, commonly used to discreetly transport alcohol.",
"price": 2500,
"weight": 120,
"volume": 1,
"bashing": 8,
"cutting": 0,
"to_hit": 1,
"material": "steel",
"contains": 1,
"flags": ["RIGID", "SEALS", "WATERTIGHT"]
},
{
"id":"bowl_plastic",
"type":"CONTAINER",
"color":"light_cyan",
"symbol":")","to_hit":1,
"name":"plastic bowl",
"description":"A plastic bowl. Can be used as a container or as a tool. Holds 250 ml of liquid.",
"cutting":0,
"price":1,
"weight":0,
"volume":1,
"bashing":2,
"cutting":0,
"to_hit":1,
"material":"plastic",
"contains":1,
"flags":[ "RIGID" ]
},
{
"id": "wrapper",
"type": "CONTAINER",
"symbol": ",",
"color": "light_gray",
"name": "paper wrapper",
"description": "Just a piece of butcher's paper. Good for starting fires.",
"price": 1,
"weight": 3,
"volume": 1,
"bashing": -8,
"cutting": 0,
"to_hit": -2,
"contains": 10,
"material": "paper"
}
]
-33
View File
@@ -1,33 +0,0 @@
[
{ "type":"INSTRUMENT",
"id":"GUITAR",
"symbol": "$",
"color": "red",
"name":"Guitar",
"description":"An acoustic six-string guitar. A bit out of tune, but in good shape otherwise.",
"material": "wood",
"weight": 2766,
"volume": 24,
"damage": 14,
"to_hit": 1,
"use": "PLAY_GUITAR",
"variations": [
{ "odds" : 200,
"name" : "Specific Variation"
}
]
},
{ "type":"INSTRUMENT",
"id":"DRUM",
"symbol": "o",
"color": "green",
"name":"Bongo",
"description": "A handheld drum. Suitable for making loud noises into all hours of the night.",
"material": ["wood", "steel"],
"weight": 400,
"volume": 10,
"damage": 11,
"to_hit": 1,
"use": "PLAY_DRUM"
}
]
File diff suppressed because it is too large Load Diff
-914
View File
@@ -1,914 +0,0 @@
[
{ "id":"retool_45",
"type": "GUNMOD",
"symbol": ":",
"color": "green",
"name":".45 caliber conversion kit",
"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.",
"price": 480,
"material": "steel",
"weight": 226,
"volume": 1,
"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" : 510,
"to_hit" : 1,
"color" : "dark_gray",
"symbol" : ":",
"material" : ["steel", "plastic"],
"mod_targets" : ["pistol", "smg", "rifle"],
"volume" : 2,
"bashing" : 3,
"cutting" : 0,
"burst_modifier" : 0,
"recoil_modifier" : 0,
"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" : 113,
"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,
"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" : 226,
"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,
"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 manageability of the firearm.",
"weight" : 113,
"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,
"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" : 226,
"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,
"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" : 495,
"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,
"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" : 660,
"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,
"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" : 330,
"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,
"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" : 114,
"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,
"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" : 286,
"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,
"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" : 114,
"to_hit" : 0,
"color" : "red",
"symbol" : ":",
"material" : ["steel", "plastic"],
"mod_targets" : ["smg", "rifle"],
"volume" : 1,
"bashing" : 0,
"cutting" : 0,
"burst_modifier" : 6,
"recoil_modifier" : 0,
"price" : 700,
"loudness_modifier" : 4
},
{
"type" : "GUNMOD",
"id" : "autofire",
"name" : "auto-fire mechanism",
"weight" : 226,
"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"],
"bashing" : 2,
"ammo_modifier" : "NULL"
},
{
"type" : "GUNMOD",
"id" : "retool_9mm",
"name" : "9mm caliber conversion kit",
"weight" : 114,
"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"],
"bashing" : 0,
"ammo_modifier" : "9mm"
},
{
"type" : "GUNMOD",
"id" : "retool_22",
"name" : ".22 caliber conversion kit",
"weight" : 114,
"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"],
"bashing" : -2,
"ammo_modifier" : "22"
},
{
"type" : "GUNMOD",
"id" : "retool_57",
"name" : "5.7mm caliber conversion kit",
"weight" : 114,
"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"],
"bashing" : -3,
"ammo_modifier" : "57"
},
{
"type" : "GUNMOD",
"id" : "retool_46",
"name" : "4.6mm caliber conversion kit",
"weight" : 114,
"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"],
"bashing" : -3,
"ammo_modifier" : "46"
},
{
"type" : "GUNMOD",
"id" : "retool_308",
"name" : ".308 caliber conversion kit",
"weight" : 114,
"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"],
"bashing" : 4,
"ammo_modifier" : "308"
},
{
"type" : "GUNMOD",
"id" : "retool_223",
"name" : ".223 caliber conversion kit",
"weight" : 114,
"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"],
"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" : 589,
"to_hit" : -1,
"color" : "magenta",
"symbol" : ":",
"material" : ["steel", "null"],
"mod_targets" : ["rifle"],
"volume" : 2,
"bashing" : 6,
"cutting" : 0,
"burst_modifier" : 4,
"recoil_modifier" : 4,
"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" : 589,
"to_hit" : -1,
"color" : "green",
"symbol" : ":",
"material" : ["steel", "null"],
"mod_targets" : ["rifle"],
"volume" : 2,
"bashing" : 0,
"cutting" : 0,
"burst_modifier" : -99,
"recoil_modifier" : 0,
"price" : 660,
"loudness_modifier" : 3
},
{
"type" : "GUNMOD",
"id" : "m203",
"name" : "M203",
"weight" : 1360,
"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"],
"bashing" : 2,
"flags" : ["MODE_AUX"],
"ammo_modifier" : "40mm"
},
{
"type" : "GUNMOD",
"id" : "pipe_launcher40mm",
"name" : "40mm pipe launcher",
"weight" : 2080,
"color" : "light_gray",
"burst_modifier" : 0,
"loudness_modifier" : 0,
"to_hit" : -1,
"dispersion_modifier" : 4,
"price" : 250,
"clip_size_modifier" : 1,
"description" : "This is a home built launcher tube that can be attached to almost any rifle. It allows a single 40mm grenade to be loaded and fired.",
"symbol" : ":",
"material" : ["steel", "plastic"],
"volume" : 3,
"cutting" : 0,
"recoil_modifier" : 0,
"damage_modifier" : 0,
"mod_targets" : ["rifle"],
"bashing" : 4,
"flags" : ["MODE_AUX"],
"ammo_modifier" : "40mm"
},
{
"type" : "GUNMOD",
"id" : "bayonet",
"name" : "bayonet",
"weight" : 387,
"color" : "light_gray",
"burst_modifier" : 0,
"loudness_modifier" : 0,
"to_hit" : -1,
"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" : 12,
"flags" : ["NON_STUCK", "SPEAR"],
"recoil_modifier" : 3,
"damage_modifier" : 0,
"mod_targets" : ["shotgun", "smg", "rifle"],
"bashing" : 0,
"ammo_modifier" : "NULL"
},
{
"type" : "GUNMOD",
"id" : "sword_bayonet",
"name" : "sword bayonet",
"weight" : 923,
"color" : "dark_gray",
"burst_modifier" : 0,
"loudness_modifier" : 0,
"to_hit" : 0,
"dispersion_modifier" : 0,
"price" : 500,
"clip_size_modifier" : 0,
"description" : "A sword bayonet is a large slashing weapon that can be attached to the front of a shotgun or rifle, allowing a melee attack to deal cutting damage. The added length increases recoil substantially.",
"symbol" : ":",
"material" : ["steel", "null"],
"volume" : 3,
"cutting" : 18,
"flags" : ["NON_STUCK", "CHOP"],
"recoil_modifier" : 7,
"damage_modifier" : 0,
"mod_targets" : ["shotgun", "rifle"],
"bashing" : 0,
"ammo_modifier" : "NULL"
},
{
"type" : "GUNMOD",
"id" : "pistol_bayonet",
"name" : "pistol bayonet",
"weight" : 122,
"color" : "light_gray",
"burst_modifier" : 0,
"loudness_modifier" : 0,
"to_hit" : -4,
"dispersion_modifier" : 1,
"price" : 400,
"clip_size_modifier" : 0,
"description" : "A pistol bayonet is a stabbing weapon that can be attached to the front of a handgun, allowing a melee attack to deal piercing damage. The added length reduces the gun's overall handling somewhat.",
"symbol" : ":",
"material" : ["steel", "null"],
"volume" : 1,
"cutting" : 6,
"recoil_modifier" : 3,
"damage_modifier" : 0,
"mod_targets" : ["pistol"],
"bashing" : 0,
"flags" : ["STAB"],
"ammo_modifier" : "NULL"
},
{
"type" : "GUNMOD",
"id" : "u_shotgun",
"name" : "underslung shotgun",
"weight" : 1500,
"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" : 3,
"cutting" : 0,
"recoil_modifier" : 0,
"damage_modifier" : 0,
"mod_targets" : ["rifle"],
"bashing" : 2,
"flags" : ["MODE_AUX"],
"ammo_modifier" : "shot"
},
{
"type" : "GUNMOD",
"id" : "masterkey",
"name" : "masterkey shotgun",
"weight" : 2600,
"color" : "light_red",
"burst_modifier" : 0,
"loudness_modifier" : 0,
"to_hit" : -1,
"dispersion_modifier" : 1,
"price" : 950,
"clip_size_modifier" : 4,
"description" : "A minimalist pump action shotgun, which can be mounted under the barrel of many rifles. It allows a total of four shotgun shells to be loaded and fired.",
"symbol" : ":",
"material" : ["steel", "null"],
"volume" : 2,
"cutting" : 0,
"recoil_modifier" : 0,
"damage_modifier" : 0,
"mod_targets" : ["rifle"],
"bashing" : 2,
"flags" : ["MODE_AUX"],
"ammo_modifier" : "shot"
},
{
"type" : "GUNMOD",
"id" : "gun_crossbow",
"name" : "rail-mounted crossbow",
"weight" : 1450,
"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"],
"bashing" : 2,
"flags" : ["MODE_AUX", "STR_RELOAD"],
"ammo_modifier" : "bolt"
},
{
"type" : "GUNMOD",
"id" : "laser_sight",
"name" : "laser sight",
"clip_size_modifier" : 0,
"dispersion_modifier" : -4,
"damage_modifier" : 0,
"ammo_modifier" : "NULL",
"description" : "A small visible-light laser that mounts on a firearm to enhance ease and speed of target acquisition. Aside from increased weight, there are no drawbacks.",
"weight" : 100,
"to_hit" : -1,
"color" : "dark_gray",
"symbol" : ":",
"material" : ["plastic", "steel"],
"mod_targets" : ["smg", "rifle", "pistol", "shotgun"],
"volume" : 1,
"bashing" : 0,
"cutting" : 0,
"burst_modifier" : 0,
"recoil_modifier" : 0,
"price" : 680,
"loudness_modifier" : 0
},
{
"type" : "GUNMOD",
"id" : "improve_sights",
"name" : "improved iron sights",
"clip_size_modifier" : 0,
"dispersion_modifier" : -2,
"damage_modifier" : 0,
"ammo_modifier" : "NULL",
"description" : "Improves the weapon's ironsights, increasing accuracy. No drawbacks.",
"weight" : 60,
"to_hit" : -1,
"color" : "dark_gray",
"symbol" : ":",
"material" : ["plastic", "steel"],
"mod_targets" : ["smg", "rifle", "pistol", "shotgun"],
"volume" : 0,
"bashing" : 0,
"cutting" : 0,
"burst_modifier" : 0,
"recoil_modifier" : 0,
"price" : 720,
"loudness_modifier" : 0
},
{
"type" : "GUNMOD",
"id" : "red_dot_sight",
"name" : "red dot sight",
"clip_size_modifier" : 0,
"dispersion_modifier" : -5,
"damage_modifier" : 0,
"ammo_modifier" : "NULL",
"description" : "Adds a red dot optic to the top of your gun, replacing the iron sights. Increases accuracy and weight.",
"weight" : 300,
"to_hit" : -1,
"color" : "dark_gray",
"symbol" : ":",
"material" : ["plastic", "steel"],
"mod_targets" : ["smg", "rifle", "shotgun"],
"volume" : 1,
"bashing" : 0,
"cutting" : 0,
"burst_modifier" : 0,
"recoil_modifier" : 0,
"price" : 680,
"loudness_modifier" : 0
},
{
"type" : "GUNMOD",
"id" : "holo_sight",
"name" : "holographic sight",
"clip_size_modifier" : 0,
"dispersion_modifier" : -6,
"damage_modifier" : 0,
"ammo_modifier" : "NULL",
"description" : "Adds a holographic sight. Used extensively by military forces, it increases accuracy and weight but is a step up from a red dot sight.",
"weight" : 400,
"to_hit" : -2,
"color" : "dark_gray",
"symbol" : ":",
"material" : ["plastic", "steel"],
"mod_targets" : ["smg", "rifle","shotgun"],
"volume" : 1,
"bashing" : 0,
"cutting" : 0,
"burst_modifier" : 0,
"recoil_modifier" : 0,
"price" : 680,
"loudness_modifier" : 0
},
{
"type" : "GUNMOD",
"id" : "rifle_scope",
"name" : "rifle scope",
"clip_size_modifier" : 0,
"dispersion_modifier" : -8,
"damage_modifier" : 0,
"ammo_modifier" : "NULL",
"description" : "A long ranged rifle scope used by civilians and military alike, increases weight but improves accuracy greatly.",
"weight" : 450,
"to_hit" : -3,
"color" : "dark_gray",
"symbol" : ":",
"material" : ["plastic", "steel"],
"mod_targets" : ["rifle"],
"volume" : 2,
"bashing" : 0,
"cutting" : 0,
"burst_modifier" : 0,
"recoil_modifier" : 0,
"price" : 680,
"loudness_modifier" : 0
},
{
"type" : "GUNMOD",
"id" : "barrel_ported",
"name" : "ported barrel",
"clip_size_modifier" : 0,
"dispersion_modifier" : 1,
"damage_modifier" : 0,
"ammo_modifier" : "NULL",
"description" : "A ported barrel redirects exhaust gases to compensate for muzzle climb, improves recoil but increases noise and reduces accuracy slightly.",
"weight" : 225,
"to_hit" : -1,
"color" : "light_gray",
"symbol" : ":",
"material" : ["steel", "null"],
"mod_targets" : ["smg", "rifle", "pistol", "shotgun"],
"volume" : 0,
"bashing" : 0,
"cutting" : 0,
"burst_modifier" : 0,
"recoil_modifier" : -4,
"price" : 720,
"loudness_modifier" : 8
},
{
"type" : "GUNMOD",
"id" : "pistol_grip",
"name" : "ergonomic grip",
"clip_size_modifier" : 0,
"dispersion_modifier" : -2,
"damage_modifier" : 0,
"ammo_modifier" : "NULL",
"description" : "A set of ergonomic replacement furniture for a pistol, improves recoil and accuracy. Aside from increased weight, there are no drawbacks.",
"weight" : 125,
"to_hit" : -3,
"color" : "dark_gray",
"symbol" : ":",
"material" : ["steel", "null"],
"mod_targets" : ["pistol"],
"volume" : 1,
"bashing" : 0,
"cutting" : 0,
"burst_modifier" : 0,
"recoil_modifier" : -2,
"price" : 380,
"loudness_modifier" : 0
},
{
"type" : "GUNMOD",
"id" : "adjustable_stock",
"name" : "adjustable stock",
"clip_size_modifier" : 0,
"dispersion_modifier" : -2,
"damage_modifier" : 0,
"ammo_modifier" : "NULL",
"description" : "An adjustable replacement stock, improves recoil and accuracy. Aside from increased weight, there are no drawbacks.",
"weight" : 350,
"to_hit" : -3,
"color" : "dark_gray",
"symbol" : ":",
"material" : ["plastic", "steel"],
"mod_targets" : ["smg", "rifle", "shotgun"],
"volume" : 2,
"bashing" : 0,
"cutting" : 0,
"burst_modifier" : 0,
"recoil_modifier" : -2,
"price" : 380,
"loudness_modifier" : 0
},
{
"type" : "GUNMOD",
"id" : "pistol_stock",
"name" : "pistol stock",
"clip_size_modifier" : 0,
"dispersion_modifier" : -1,
"damage_modifier" : 0,
"ammo_modifier" : "NULL",
"description" : "An add on stock for handguns, improves recoil and accuracy. Aside from increased weight, there are no drawbacks.",
"weight" : 350,
"to_hit" : -3,
"color" : "dark_gray",
"symbol" : ":",
"material" : ["plastic", "steel"],
"mod_targets" : ["pistol"],
"volume" : 2,
"bashing" : 0,
"cutting" : 0,
"burst_modifier" : 0,
"recoil_modifier" : -5,
"price" : 380,
"loudness_modifier" : 0
},
{
"type" : "GUNMOD",
"id" : "bipod",
"name" : "bipod",
"clip_size_modifier" : 0,
"damage_modifier" : 0,
"ammo_modifier" : "NULL",
"description" : "Bipods are commonly used on rifles and machine guns to provide a forward rest and reduce motion. Aside from increased weight, there are no drawbacks.",
"weight" : 400,
"to_hit" : -1,
"color" : "brown",
"symbol" : ":",
"material" : "steel",
"mod_targets" : "rifle",
"volume" : 2,
"bashing" : 10,
"cutting" : 0,
"burst_modifier" : 0,
"recoil_modifier" : -1,
"dispersion_modifier" : -3,
"price" : 680,
"loudness_modifier" : 0
}
]
File diff suppressed because it is too large Load Diff

Some files were not shown because too many files have changed in this diff Show More