Compare commits

..

723 Commits

Author SHA1 Message Date
Kevin Granade cf80a547ce Add description for stemcell treatment condition. Thanks to Slax for reporting. 2013-06-21 21:30:18 -05:00
Kevin Granade eb831f79c1 Nerf nailgun accuracy. 2013-06-20 22:04:46 -05:00
Kevin Granade 52cd8a9821 Correct description of static spawn option. 2013-06-20 21:57:08 -05:00
Kevin Granade 2ae4511c0c Update changelog for 0.6. 2013-06-20 21:28:56 -05:00
Kevin Granade 8954fa0d16 Don't target monsters we can't see when burst firing. 2013-06-20 20:22:00 -05:00
Kevin Granade 2a3a171ca3 Misc fixes. 2013-06-20 19:52:24 -05:00
Christian Buskirk 1fc6fc205b Merge PR #1647 - Fix drop query
Conflicts:
	player.cpp
	player.h
2013-06-20 17:43:45 -07:00
Kevin Granade 9f74a26b1f Make auto-drop in takeoff and wield always succeed regardless of volume. 2013-06-20 17:32:50 -05:00
fnord dbda99eb07 turret saftey: increase angle when player is close to compensate for increased fuzziness 2013-06-20 17:13:32 -05:00
Vollch f82e3df79f Fixes #1072 2013-06-21 01:59:22 +04:00
Stevensonz b514501496 Sign Off 2013-06-21 05:43:01 +08:00
Christian Buskirk cdc092218f Small grammar fix to innate trait message 2013-06-20 12:16:00 -07:00
Christian Buskirk e2d52fe785 Merge PR #1657 - Mutation/Purifier Fixes 2013-06-20 11:50:20 -07:00
Christian Buskirk a8a3fca9a0 Typo fix merge 2013-06-20 11:48:21 -07:00
Christian Buskirk 113dd51ea3 Merge PR #1648 - Filter hit notifications 2013-06-20 11:01:44 -07:00
fnord 4443556d2e turn off debug && cleanup 2013-06-20 07:16:08 -05:00
fnord ec0b4e53be Localized missed-so-lets-shoot-randomly x,y variables, which were resetting
burst
2013-06-20 07:15:58 -05:00
fnord f5fa8cbc5c ranged burst: did not properly aquire new target as it iterated from
shooter position, and limited range to 2+gun skill
2013-06-20 07:15:51 -05:00
fnord 1e5e0ca303 Add debug output to player::fire's burst retargeting code. Provves burst retargeting is completely broken 2013-06-20 07:15:10 -05:00
Alex Casey d802fc9458 Fixed bug with traits cancelled by mutation 2013-06-20 15:14:37 +10:00
Kevin Granade 500539f9c8 Merge pull request #1642 from Stevensonz/Bow-Balance+Fixes
Bow Rebalances
2013-06-19 19:15:29 -07:00
Kevin Granade eba91edabb Streamline serialization of burnt item member since it's an int now. 2013-06-19 19:51:43 -05:00
Kevin Granade 7c274113eb Octomerge. 2013-06-19 19:29:50 -05:00
Fergus Dall 939d18d323 Make item::burnt int insread of char to prevent overflow
Fixes #1662
2013-06-20 08:07:46 +09:30
Alex Casey b5c8fc8be2 Reworked the trait/mutation system a bit more and fixed some bugs 2013-06-19 22:56:06 +10:00
Fergus Dall abd3c0174f Make lava count as a fire for crafting purposes
Fixes #801
2013-06-19 22:24:47 +09:30
Fergus Dall 67597003cf Highlight container tiles when the cursor is placed on them 2013-06-19 21:36:07 +09:30
fnord 826e865708 When deactivating a turret, add_item using x,y, not the z[mondex].x/y of the .erased() mob. 2013-06-19 07:04:15 -05:00
Fergus Dall bc48353cc5 Make cursor appear of player initially 2013-06-19 21:32:04 +09:30
Fergus Dall c9cc125a73 Draw player properly when cursor is ontop of them 2013-06-19 21:27:55 +09:30
Fergus Dall 6c59ecddd6 Stop player from building roofs ontop on impassable tiles 2013-06-19 19:17:22 +09:30
Alex Casey ea83616dde Fixes to mutation system, separates base traits and mutations 2013-06-19 19:33:44 +10:00
Fergus Dall b0ce537eb6 Replace "char" with "signed char" in several places to fix warnings on ARM
Fixes #156
2013-06-19 18:54:03 +09:30
Fergus Dall 48866df182 Suppress warning about va_list mangling in gcc 4.4
Fixes #188
2013-06-19 18:36:36 +09:30
Fergus Dall 2b0dadc3fb Stop giant ants and goo pit monsters from spawning hundreds of tiles away
Fixes #861
2013-06-19 18:24:02 +09:30
Julian Snitow 646b69e35e Two-by-fours no longer evaporate when unboarding doors and windows. 2013-06-19 01:21:33 -07:00
Kevin Granade 2ac080cb19 Supress melee messages when you can't see the target. 2013-06-18 23:16:07 -05:00
Kevin Granade 3956f65bd0 Clean up some commented out code. 2013-06-18 23:16:00 -05:00
Kevin Granade b1ea7ab8d7 Supress melee messages when you can't see the target. 2013-06-18 23:15:49 -05:00
Kevin Granade 50b3f2e38f Expand autodrop fix to include dropping weapon. 2013-06-18 22:00:25 -05:00
Stevensonz 92237f7634 Merge branch 'Bow-Balance+Fixes' of https://github.com/Stevensonz/Cataclysm-DDA into Bow-Balance+Fixes 2013-06-19 10:18:08 +08:00
Stevensonz b06c682cd5 Flaming and Explosive Arrow Fix
Fixes re-usability issue of arrows with special effects
2013-06-19 10:18:01 +08:00
Stevensonz bf52e6f7a9 Flaming and Explosive Ammo Fix
Fixes issue about being re-usable and not applying 1 shot use of special
effects
2013-06-19 10:17:04 +08:00
Kevin Granade caa0fa6e20 Fix name of recurve reflex bow, pointed out by Dunker. 2013-06-18 21:15:22 -05:00
Kevin Granade 4b91513410 Merge some menu enhancements 2013-06-18 21:00:42 -05:00
fnord 426fe81e54 updated uimenu: additional constructors, text word wrap, additional width options 2013-06-18 20:36:00 -05:00
Stevensonz cce7d4f63e No to Wolverine wannabe NPC's
Fixes Issue #1644
2013-06-18 20:10:25 -05:00
Christian Buskirk e76f73eb52 Merge PR #1563 - Vehicle spawning fix 2013-06-18 17:44:04 -07:00
Kevin Granade 17dd9f2e51 Remove only-used-once intermediate variables and const some stuff. 2013-06-18 19:37:57 -05:00
Kevin Granade 543381ffd7 Introduce intermediate variables for tile-local coordinates, leaving original x and y alone to correct collision calculation. 2013-06-18 19:35:00 -05:00
Christian Buskirk c5816a06c2 Merge PR #1626 - Profession skill support 2013-06-18 14:25:58 -07:00
Stevensonz c3743345ee New Ammo Effect Ignite!
Now you can set that monster on fire (normal burnable monsters that is)
and not have everything burn :)
2013-06-19 05:21:14 +08:00
Stevensonz 5b2530d6b2 Removed typo 2013-06-19 01:58:39 +08:00
Stevensonz 32bb1fada6 Bow Rebalances
Dmg Reduction on new arrows with Flaming and Explosion, Slight recipe
cost increase, moved Flammable arrow to Tools with new function that
will produce flaming arrows.
2013-06-19 01:49:35 +08:00
Leonid Vasilev 1df574a033 Fix newcharacter traits list
Both part of traits list (advantages, and disadvantages) scrolling
separatly
2013-06-18 16:59:57 +04:00
Leonid Vasilev a6191c6047 Fix inv and adv_inv UI text 2013-06-18 15:06:37 +04:00
fnord f3c582131f vehicle menu: more intuitive hotkeys, "let go" hilighted by default 2013-06-18 05:30:44 -05:00
Kevin Granade 92daf7bd16 Identifier typo and whitespace cleanup. 2013-06-17 23:32:18 -05:00
Kevin Granade 93c1bf4aee Fix a typo, reported by Dunker. 2013-06-17 23:31:43 -05:00
Kevin Granade 9a0d253c2c Complete merging archery additions. 2013-06-17 23:25:57 -05:00
fnord 95db5af92c what it says on the tin 2013-06-17 22:38:21 -05:00
Kevin Granade 081e3858cd Merge NPC recruit mission.
Conflicts:
	mission.h
	mission_start.cpp
2013-06-17 20:33:29 -05:00
Kevin Granade 50e7c00cac Merge fur and plastic repair enhancement.
Conflicts:
	iuse.cpp
2013-06-17 19:44:11 -05:00
Kevin Granade 3220c75c4e Merge archery items, crafting segfault fix, martial art trait rename, vaccine, and advanced inventory fix. 2013-06-17 19:09:36 -05:00
MacrosBlackD c5727c8437 More balancing on arrows, fixed some descriptions 2013-06-17 18:21:59 -05:00
fnord f05d52ccb1 Allow advanced_inv usage in vehicle 2013-06-17 15:33:00 -05:00
Stevensonz d24a6213a6 Vaccine Shots!
Long duration Health Booster
2013-06-18 04:25:51 +08:00
NaturesWitness 14e1163651 Martial Arts Traits Text Fix
Renamed specialized combat instruction to self-defense classes to fix
text overflow. Also cleaned up wording and grammer on other martial arts
traits.
2013-06-17 13:27:44 -04:00
Tommy 4c6b0aa0c8 Fix segfault when crafting uses up all of the first itemstack it checks. 2013-06-17 18:54:38 +12:00
Kevin Granade 04921b9b8f Merge foraging practice and vitamin balance fixes. 2013-06-16 21:14:21 -05:00
MacrosBlackD ee269b9ad5 Fixed merge fubar and moved crossbow items to archery.json. added *.opensdf to ingore
Fixed the arrowhead recipe cost, 1 steel_lump added up to 12 scrap. This has been changed to 1 steel_chunk which is equivalent to 3 scrap.
changed feathers to fletching and fixed the name of the exploding arrowhead.
Added 2 new bows and rebalanced a couple of stats.
Added Fletching item recipe and Fletching item
Merging and balancing archery mods from Flare and Isylwin
Broke out most archery related items into the archery.json file
Added a STR12_Draw flag for the new top tier bow.
2013-06-16 20:53:01 -05:00
acidia 359aca85de Added recruit NPC success dialogue 2013-06-16 19:46:34 -05:00
Hourousha 76f8f95769 Added skill support into professions; this moves professions toward being a class. 2013-06-16 16:49:31 -05:00
Flare 99e7891705 Added arrows from Flare's Archery mod 2013-06-16 12:14:27 -05:00
acidia acbc71f94b Removed testing values from new missions 2013-06-16 12:49:50 -04:00
acidia c683b3567a Added Recruit Tracker Mission, UPDATE NPC GENERATION 2013-06-16 11:47:14 -05:00
Christian Buskirk 010049efd4 Removed remnant of old vitamin code 2013-06-16 08:32:29 -07:00
Tommy 83fd08ec5d Picking underbrush trains, but has a 50% chance of destroying the bush. 2013-06-17 01:31:28 +12:00
Tommy 9b668a85e9 Picking underbrush only trains survival if you find something. 2013-06-17 00:12:17 +12:00
Tommy 07277e7107 Picking berry bushes trains survival (at low levels). 2013-06-17 00:07:21 +12:00
Kevin Granade 9d8fdc485e Stop shooting yourselves turrets. Remove spurrious prompt when simultaneously disrobing and dropping clothes. 2013-06-16 02:31:44 -05:00
Fergus Dall fab0754115 Suppress pop-up when dropping worn items
Fixes #1616
2013-06-16 16:35:55 +09:30
Kevin Granade 35b13f9927 New missions, leg guards, recalculate HP, and increase item stacking limits.
Conflicts:
	game.cpp
2013-06-16 01:48:40 -05:00
fnord 807bfc889d burst: eliminate redundant checks and suicidal turrets 2013-06-16 01:33:12 -05:00
acidia 9449806628 Fixed Small Typo 2013-06-15 21:45:55 -05:00
acidia 87af2671eb Added Basic Support for Recruit Missions 2013-06-15 21:29:18 -05:00
PiCroft 946bc3e75d sewing/repairing fixes 2013-06-16 03:28:37 +01:00
acidia 1f52a16ef1 Added Recruit Tracker Mission 2013-06-15 21:26:10 -05:00
acidia 444c73d6a5 Added Recruit Tracker Mission 2013-06-15 22:21:57 -04:00
PiCroft 899979491b metal and plural fix 2013-06-16 03:21:36 +01:00
acidia ed5088f49a Added Recruit Tracker Mission 2013-06-15 21:20:03 -05:00
acidia 0a1f8af4e0 Added Recruit Tracker Mission Dialogue 2013-06-15 21:17:55 -05:00
acidia cf2d0681a9 Added Recruit Tracker Mission Dialogue 2013-06-15 21:16:04 -05:00
Fergus Dall ec5d9bc7ef Make tough, glass jaw and hardcore traits trigger a recalculation of HP 2013-06-16 11:35:13 +09:30
Fergus Dall 2fabab8822 Update max and current HP when max strength changes 2013-06-16 11:28:53 +09:30
PiCroft 41409252da changed plastic/kevlar to soldering iron, added fur repair
general improvement of sewing to take into account secondary materials
2013-06-16 02:52:10 +01:00
origamiwolf c35132b2a9 remove item damage from gibbing 2013-06-16 08:10:35 +08:00
NaturesWitness 91810fd9ef Plastic/Kevlar Repair Fix
Fixed missing underscore preventing plastic chunks and kevlar plates
from being usable to repair or reinforce items.
2013-06-15 18:13:14 -04:00
Stevensonz e6ffa8171d Leg Guard Addition
Featuring Hard Leg Guards and Metal Leg guards (Metal Leg Guard recipe
Included)
2013-06-16 04:42:11 +08:00
fnord cfde4c9e52 Use 'add_item_or_charges' in drop, drop_in_direction, pickup ("drop
weapon?" prompt, unload (inventory full), and handle_liquid
2013-06-15 15:26:42 -05:00
fnord 736fd2a200 pickup: support huge item lists in legacy letter-selection via
extended 2 letter sequences for 64th item and beyond ( ie, `gY )
2013-06-15 14:41:08 -05:00
fnord a4a5a954e7 advanced_inv: support volume limitations in map tiles and vstorage,
refactor item movement, add safeguards against item loss, support
stupidly large numbers for headers and weight/volume columns.
2013-06-15 14:35:31 -05:00
fnord 1329d43de0 map::add_item_or_charges returns bool, checks maximum volume, handles
spillover if 4th arg is set.
add_item has optional max items argument (still defaults to 64)
add max_volume, free_volume, stored_volume, and is_full functions
2013-06-15 14:24:57 -05:00
fnord 7166f291b7 vehicle: add max_volume, free_volume, stored_volume, and is_full functions 2013-06-15 14:22:26 -05:00
acidia 7d5c4275c2 Added Martyr Mission 3 & 4 2013-06-15 13:31:38 -05:00
acidia 2f902d7390 Added Martyr Mission 3 & 4 2013-06-15 13:27:26 -05:00
acidia 6283dd2635 Added Martyr Mission 3 & 4 2013-06-15 13:25:52 -05:00
acidia 69be6a3f07 Added dialogue for Martyr Mission 3 & 4 2013-06-15 13:24:43 -05:00
acidia beb0c5ef09 Added 'Visions in Solitude' for martyr mission 2013-06-15 13:22:09 -05:00
acidia 7fa9422485 Added etched human skull for martyr mission 2013-06-15 13:21:07 -05:00
acidia 262ca3a99b Added Cult Monsters 2013-06-15 13:19:24 -05:00
acidia ee4d81fdea Added Cult Monsters 2013-06-15 13:16:15 -05:00
acidia 569dc15f4f Added cabin spawn 2013-06-15 13:08:29 -05:00
acidia a0500ee0d4 Added Cabin basement 2013-06-15 13:03:13 -05:00
acidia 10b39e1301 Added cabin and update to prison 2013-06-15 13:54:06 -04:00
Kevin Granade d69d9de4c6 Merge streamlining of save on sleep and power armor handling fix. 2013-06-15 10:34:43 -05:00
Kevin Granade d6c94ed314 Merge the tail end of pull request 1591. 2013-06-15 10:31:47 -05:00
Kevin Granade b7f3fb5deb Merge remote-tracking branches 'dda/pr/1591', 'dda/pr/1592', 'dda/pr/1597' and 'dda/pr/1581' into dda-master
Conflicts:
	mapitemsdef.cpp
2013-06-15 09:51:50 -05:00
Tommy 8c58dd00b5 Fix item factory to correctly store item birthdays. 2013-06-15 21:25:19 +12:00
Fergus Dall 12b145050f Make dropping armor go through player::takeoff first 2013-06-15 15:48:07 +09:30
Fergus Dall 34a44cefc4 Prevent player::takeoff from removing power armor when other components are worn 2013-06-15 14:43:04 +09:30
Tommy 8ff6ce2ff2 Spawn the correct number of sheets when smashing windows. 2013-06-15 14:28:08 +12:00
D Lue Choy dfdf8322d2 Save /on/ sleep
Unintentional easy saving was breaking my emmersion in the game, and may encourage savescumming.
Changed to make sleeping manditory, with saving optional.
Adjusted vehicle controlls message.
2013-06-14 21:21:25 -04:00
PiCroft 01e041efd6 kevlar and plastic items are now repairable. Use a knife to cut plastic
from plastic objects and ditto for kevlar and use a sewing kit/bone needle
to repair items
2013-06-15 00:58:31 +01:00
Stevensonz 1cbec25e35 Recipe missing ] fix
Recipes now working
2013-06-15 02:19:47 +08:00
Stevensonz e38daf8467 Recipe missing , fix 2013-06-15 02:17:21 +08:00
Stevensonz 40ff084785 was missing ,
sorry editing so late here
2013-06-15 01:57:17 +08:00
Stevensonz af83dee486 Removed typo again 2013-06-15 01:53:57 +08:00
Stevensonz 2081d3b18c some type fixing 2013-06-15 01:48:15 +08:00
Stevensonz 443b3fff0d Remove repeating crossbow spawn 2013-06-15 01:43:47 +08:00
Stevensonz ab3a2e704b Buffed Huge Crossbow
Okay everything should be set.
2013-06-15 01:17:07 +08:00
Tommy 590de892e6 Use new spawn_item() for feathers. 2013-06-15 02:44:38 +12:00
Tommy 06ece44d22 Merge branch 'master' into counter_disassembly 2013-06-15 02:41:15 +12:00
Tommy 224a3e35f2 Ensure PF_FLEET helps even if your legs are damaged. 2013-06-15 02:13:34 +12:00
Tommy 2013d93521 Fix diagonal movement cost for PF_FLEET and/or PF_PARKOUR. 2013-06-15 01:48:35 +12:00
Stevensonz d6083f3017 Merge branch 'Crossbow-Additions' of https://github.com/Stevensonz/Cataclysm-DDA into Crossbow-Additions 2013-06-14 21:43:37 +08:00
Stevensonz df86abf313 Crossbow Recipes!
Last Step for crossbows
2013-06-14 21:43:25 +08:00
Tommy 22a0e38fbb Fix run_cost() for diagonal moves. 2013-06-15 01:34:15 +12:00
fnord b183d5f141 vehicle::add_item limits volume per MAX_VOLUME_IN_VEHICLE_STORAGE (500),
items per MAX_VOLUME_IN_VEHICLE_STORAGE (1024)
2013-06-14 06:54:26 -05:00
Tommy 87a0cafd24 Spawn the correct number of items when deconstructing etc. Fixes #909. 2013-06-14 21:29:55 +12:00
fnord a6c20a66ed Change MAX_ITEMS_PER_TILE from 64 to 1024 2013-06-14 04:24:08 -05:00
Tommy edbb25441f Remove deprecated map::spawn_item(). 2013-06-14 20:52:11 +12:00
Kevin Granade 38922b9860 Power armor bugfix and new types of archery items.
Conflicts:
	game.cpp
2013-06-14 01:53:01 -05:00
Fergus Dall e5a5302284 Only stop the player from putting on power armor if it covers the same slot as other gear
Fixes #1588
2013-06-14 15:07:21 +09:30
Stevensonz b9dc7f9b81 Huge crossbow fix 2013-06-14 12:57:46 +08:00
Stevensonz 204aa7b154 Removed rep crossbow spawn 2013-06-14 12:16:08 +08:00
Kevin Granade 36b52dc240 Compilation fix. 2013-06-13 20:52:47 -05:00
Kevin Granade e3530fb537 Merge remote-tracking branch 'dda/master' into dda-master 2013-06-13 20:51:11 -05:00
Kevin Granade cbbcb0ebdd Merge pull request #1586 from acidia/difficulty-pat
Small tweaks to prison monsters
2013-06-13 18:50:09 -07:00
Kevin Granade e8789745aa Merge remote-tracking branch 'dda/pr/1570' into dda-master 2013-06-13 19:13:30 -05:00
Kevin Granade bd15789c4c Neat-o enhancements. 2013-06-13 18:53:34 -05:00
Kevin Granade 003b7670cb Merge remote-tracking branch 'dda/pr/1560' into dda-master 2013-06-13 18:41:08 -05:00
NaturesWitness 7d2efa2aa0 More Flamethrower Spawns
Added flamethrowers to military spawn list.  Cause, you know it seems
kind of silly that spider lairs are the only place they show up.
2013-06-13 18:06:33 -04:00
fnord ed58320403 rl_dist(point, point) - used once - calls rl_dist(int, int, int, int). 2013-06-13 14:23:26 -05:00
Stevensonz 0e983a2b62 changed huge crossbow weight and volume 2013-06-14 01:34:10 +09:00
utunnels 28c0732fd4 Limit sdl screen update rate if DrawWindow is called multiple times without a break. 2013-06-13 21:43:09 +08:00
Stevensonz 6170c8c5c6 Spawn for New Crossbows 2013-06-13 18:43:17 +08:00
Stevensonz ef4ef8a8b6 Crossbow- Additions
Featuring Pistol crossbow, Huge Crossbow and Repeating Crossbow
2013-06-13 17:28:29 +08:00
utunnels 2734a17368 Calculate font baseline offset manually. This should fix most font bugs. 2013-06-13 16:31:50 +08:00
Fergus Dall e5b892f37a Fix warning in output.cpp
Fixes #1579
2013-06-13 17:36:28 +09:30
utunnels 64e37e180a Merge branch 'master' of github.com:CleverRaven/Cataclysm-DDA into sdl-font-fix 2013-06-13 13:15:26 +08:00
Kevin Granade 2993a9d7c8 Merge remote-tracking branch 'dda/pr/1570' into dda-master 2013-06-12 21:12:47 -05:00
acidia 05dbf9a83f increase difficulty of prison, typo fix 2013-06-12 20:30:13 -05:00
acidia bfda82c6f9 increase difficulty of prison 2013-06-12 20:24:13 -05:00
Kevin Granade f70437892a Print message about vehicle menu when boarding a vehicle. 2013-06-12 20:08:34 -05:00
acidia 036f8f2cf3 added rare jabberwock spawn to various forest types 2013-06-12 21:02:59 -04:00
Kevin Granade 98b146394f Display actual keybinding instead of the default. 2013-06-12 19:38:22 -05:00
Kevin Granade 549a46ffcc Death to trailing whitespace\! 2013-06-12 19:34:10 -05:00
Kevin Granade bb133844e4 Merge batch of the day.
Conflicts:
	game.cpp
2013-06-12 19:21:58 -05:00
origamiwolf 679398ab2a Missed out corpse drop check for non fles or veggy critters 2013-06-13 07:55:20 +08:00
Isylwin 5a1fc5d5ad ammo.json line 276, 298, 320
Made the weights of arrows and sorts more like real-life.
2013-06-13 01:28:10 +02:00
NaturesWitness 106bd6e1c3 Expanded Martial Arts Traits
Traits to make all martial arts styles selectable in-game.
Stopgap until NPCs are fixed.
2013-06-12 17:12:31 -04:00
NaturesWitness df72c2ccd4 Revert "Expanded Martial Arts Traits"
This reverts commit eb57f41857.
2013-06-12 17:02:16 -04:00
NaturesWitness eb57f41857 Expanded Martial Arts Traits
traits to make all martial arts usable in-game.
temporary fix until NPCs are working.
2013-06-12 17:01:18 -04:00
Isylwin 739af21685 Recipes.json line 1350-1352
Made the recipe for wooden arrows less harsh for you softcore people :P
2013-06-12 22:08:05 +02:00
Isylwin 739b802d0f Game.cpp line 8737 change
Made the amount of feather lost smaller.
2013-06-12 21:09:10 +02:00
Octav Sandulescu 19a60bcf7c Fix the 'Whoa.' text in ncurses.
Now it actually prints the first time around, instead of waiting until
you press a key or whatnot.
2013-06-12 17:57:25 +01:00
Isylwin 391df20a46 Bug fix ranged.json line 262
I'm stooopid
2013-06-12 18:48:02 +02:00
Isylwin f25f315639 Bug fix game.cpp line 8737
I'm stooopid
2013-06-12 18:35:26 +02:00
Isylwin 1c2e5d7d39 Additions of Fletching
Adds:
Arrowheads
Wooden Shafts
Feathers

Changes:
Crows now drop feathers
Wooden arrows have to be made from feathers, arrowheads and shafts

This has NOT been tested i.e compiled to see if the changes work.
2013-06-12 18:05:01 +02:00
utunnels 12c83f4a6f Try to fix a sdl font offset bug. Also update DrawWindow. 2013-06-12 23:31:23 +08:00
origamiwolf 17a2dd8e7a Added new fields for gibs, and only tiny and small critters are completely gibbed at high damage 2013-06-12 22:15:11 +08:00
Isylwin d8ecbb828f Test commit for myself
Just checking something
2013-06-12 14:45:42 +02:00
Isylwin de1c12786b Merge remote-tracking branch 'origin/master' into Archery 2013-06-12 14:29:08 +02:00
Octav Sandulescu e863e14093 Fucking underscore. 2013-06-12 13:02:53 +01:00
Octav Sandulescu dedb21de65 Okay, I basically rewrote the whole thing. May it be useful. 2013-06-12 12:53:21 +01:00
Octav Sandulescu 7fd77130b5 Fix the rest of the instructions, while I'm at it. 2013-06-12 09:56:15 +01:00
Octav Sandulescu 19ed69e870 Slight correction to cross-compiling instructions.
From the git-clone(1) manpage: "The 'humanish' part of the source
repository is used **if no directory is explicitly given**[...]". Since
we are explicitly giving it a directory, we need to give it the humanish
part, too.
2013-06-12 09:51:51 +01:00
Tommy 3729c5bb3f Make sure player is properly boarded when debug-spawning vehicles. 2013-06-12 20:45:10 +12:00
Tommy 9bceba1d9d Fix car doors magically closing behind the player. 2013-06-12 20:45:10 +12:00
Tommy b45a2a532a Automatically board and unboard vehicles.
* Separates the idea of vehicle control from being inside.
* No more "Board Y/N" prompt.
* Players can clamber around inside moving vehicles if they want.
* Boardable parts include seats, beds, boxes, aisles and doors.
  If the player is on any of these, they will be carried with the vehicle.
* Player can dismount by walking out of the vehicle.
* Suicidally moving onto moving frames etc is disallowed.
2013-06-12 20:45:10 +12:00
fnord 7c125f2aa8 fix fixes lost in hdd holocaust 2013-06-11 22:55:28 -05:00
Kevin Granade 8b9a842521 end 2013-06-11 22:46:42 -05:00
Kevin Granade f376787c57 Prisons\! 2013-06-11 21:46:12 -05:00
acidia 39e0e173bf Added Jail Bar Door Logic 2013-06-11 21:19:29 -05:00
Kevin Granade 319f13bf92 Another day, another huge batch of bugfixes from awesome people. 2013-06-11 21:16:13 -05:00
D Lue Choy 9132f5b057 from_sentance_case
I do not fully understand source of "17fe mode disabled".
cleaner method of changing case.
2013-06-11 20:13:23 -04:00
Kevin Granade 78b1dd3f88 Fix coordinate handling when avoiding spawning vehicles on top of each other. 2013-06-11 17:57:03 -05:00
D Lue Choy 285bcb5d5c ...
I don't know why this one file was not commited with the other. I built with it /before/ committing.
2013-06-11 18:15:36 -04:00
D Lue Choy b662d9ae12 ('Z'ing|zing) (\(X( or Y)\))
Additional press_x variant to handle 'w'ords that are words.
2013-06-11 17:55:23 -04:00
fnord fdc7b2c193 Burst fire will never populate new_targets[] with monsters at shooter coordinates 2013-06-11 16:30:56 -05:00
fnord 19b739e614 turrets no longer load 9mm_blanks 2013-06-11 15:35:07 -05:00
fnord 1bc5708920 Instead of helpfully shooting their owners in the face, friendly
turrets will hold their fire if player is within a 30 degree cone
of potential friendly fire 'mistakes'.
2013-06-11 15:19:07 -05:00
Shoes01 99703bfc7d Update changelog 2013-06-11 16:31:18 -03:00
Shoes01 1cf6a385a0 Merge branch 'master' into bug-fixes 2013-06-11 16:29:19 -03:00
D Lue Choy 6461427870 Merge branch 'upstream/master' 2013-06-11 14:44:51 -04:00
Isylwin 96b5ed86e8 Merge remote-tracking branch 'origin/master' into Archery 2013-06-11 16:37:03 +02:00
Shoes01 45025d7b5f Diseases no longer pile onto eachothers speed bonuses in the @ menu 2013-06-11 11:17:38 -03:00
Shoes01 cb7cd8ec71 Merge branch 'load-temp-fix' into bug-fixes 2013-06-11 10:42:52 -03:00
Shoes01 2a8688d39c Merge branch 'blister-fix' into bug-fixes 2013-06-11 10:42:44 -03:00
Shoes01 d014321afd Merge branch 'thirst-fix' into bug-fixes 2013-06-11 10:42:33 -03:00
Shoes01 f3e0581ac5 Save/load disease intensity, fixed blisters bug and breaks save 2013-06-11 09:44:05 -03:00
Shoes01 8db49bd998 temp_conv now saved to avoid strange behaviours on load 2013-06-11 09:14:54 -03:00
Fergus Dall 02df95256e Ensure that the player is always considered to be able to see themselves 2013-06-11 21:03:27 +09:30
Fergus Dall 25f9c3884a Add sound indicator
See #1543
2013-06-11 18:35:30 +09:30
Fergus Dall 8d5e6edd84 Make several types of light source respect OPT_CIRCLEDIST, including player held lightsources. 2013-06-11 17:50:04 +09:30
Williham Totland de0969d1de Brings back the code styling of building_generation.cpp. 2013-06-11 06:02:06 +02:00
Christian Buskirk 26879c46fc Added reasoning comments 2013-06-10 20:11:35 -07:00
Kevin Granade 2916482f8c Merge pull request #1548 from KA101/Mutation-proofreading
Effect-proofreading (You Feel X)
2013-06-10 19:51:36 -07:00
Kevin Granade f8a79ab175 Smaller enhancements make the project go round. 2013-06-10 21:46:16 -05:00
KA101 885ed7b51d Effect-proofreading
Mostly the new Mutagen flavors, but one or two other things cropped up.
Changed the Troglodyte message entirely.
2013-06-10 22:42:28 -04:00
acidia fa42b57dd3 Added Jail Bar Door Logic 2013-06-10 20:33:00 -05:00
acidia 064328b92e Added Jail Bar Door Logic 2013-06-10 20:27:50 -05:00
acidia d64370541e Added Jail Bar Door Logic 2013-06-10 20:25:00 -05:00
Kevin Granade f96d802182 Stop unnecessaraly saving adjacent overmaps every time they are potentially dirtied. 2013-06-10 20:24:53 -05:00
acidia fefa233d9c Added Prison Spawn 2013-06-10 20:18:33 -05:00
acidia 6fea0b6683 Added Prison Spawn 2013-06-10 20:15:46 -05:00
acidia 5290c2fc09 Added Prison 2013-06-10 20:09:05 -05:00
Kevin Granade 653190fa6e Merge Magnificent Mission Modifications. 2013-06-10 19:57:20 -05:00
Ethan "Soron" Kaminski fb089b9a71 Merge PR #1522 - category sorting in advanced inventory 2013-06-11 12:31:23 +12:00
Ethan "Soron" Kaminski 522960a2c0 Merge PR #1518 - coalesce some UI code 2013-06-11 12:30:02 +12:00
Ethan "Soron" Kaminski 705c202ba9 Merge PR #1524 - olfactory mask is no longer a scent sink 2013-06-11 12:26:29 +12:00
Ethan "Soron" Kaminski ef358767e0 Merge PR #1532 - neutral trait coloring 2013-06-11 12:15:47 +12:00
Quietust 9771340ba2 Add missing bits 2013-06-10 18:46:07 -05:00
Ethan "Soron" Kaminski d6b2f156ff Merge PR #1513 - radiation badges 2013-06-11 11:43:38 +12:00
teh-sam 1ce228614d Signoff 2013-06-10 17:53:04 -05:00
fnord c4ec82ecc6 Stop mutation from removing starting traits (such as optimist, robust
genetics, android)
2013-06-10 17:39:08 -05:00
Ethan "Soron" Kaminski f51c5f698f Merge PR #1526 - minor lightmap optimization 2013-06-11 10:01:35 +12:00
Ethan "Soron" Kaminski c9fed93159 Merge PR #1531 - obsolete function decl. cleanup 2013-06-11 09:59:28 +12:00
fnord e24c4655c7 fix silly enum assumptions 2013-06-10 16:46:47 -05:00
fnord a783d1b713 More descriptive name 2013-06-10 15:37:36 -05:00
fnord 46063018fe Cleanup 2013-06-10 15:35:02 -05:00
fnord d52baca0cb Merge remote branch 'origin/master' into map_editor 2013-06-10 15:31:23 -05:00
Quietust f3cfe0e2ab Display neutral traits in yellow instead of red 2013-06-10 13:39:49 -05:00
Quietust 909fce3119 Cleanup from mutation refactor 2013-06-10 12:15:13 -05:00
origamiwolf b0b0b5e839 Gibs 2013-06-10 22:16:14 +08:00
Isylwin 77028f2c29 Isy's Archery Addition
I've posted this earlier today on the forums but Williham pointed out to
me that I should be using github. I have no idea if I'm missing
something, so if you are reading this I'm probably a retard and should
ask first do later.
2013-06-10 15:53:16 +02:00
Quietust f6c6db2597 Minor optimization to lightmap generation 2013-06-10 08:36:34 -05:00
Quietust f697e55a95 Add ui.cpp/ui.h to MSVC build project files 2013-06-10 07:48:25 -05:00
D Lue Choy b6be7ae1ae Minor spelling changes. 2013-06-10 03:42:51 -04:00
Fergus Dall 12377e8f9e Stop olfactory mask from removing scent
Fixes #1512
2013-06-10 17:03:54 +09:30
Fergus Dall d816ee2b5d Fix seg-fault in mutation wish menu 2013-06-10 16:39:49 +09:30
Fergus Dall 16194ce2c3 Before removing a mutation, remove its dependencies
Fixes #1509
2013-06-10 16:39:02 +09:30
fnord 6a99d5629d ui.* now conforms to cataclysmic indentation and spacing convention 2013-06-10 02:00:18 -05:00
fnord dd8b9592e0 game.h: Remove #include "ui.h" as it piggybacks output.h 2013-06-10 01:59:19 -05:00
fnord 7526a3b16c Advanced inventory: Add [c]ategory sort 2013-06-10 01:57:41 -05:00
Fergus Dall 9da3a9a7cb Guarantee at least 5 bionics in lab finale
Fixes #1510
2013-06-10 16:01:55 +09:30
D Lue Choy 49dc280805 help texts now use current key config.
help text not updated to reflect new action options.
some help text reflowed.
helper function for unsentance casing.
helper function 'press_x' returns a string for message building.
2013-06-10 02:23:32 -04:00
fnord 16d8d18c0d Merge remote branch 'origin/master' into better_menu 2013-06-10 01:20:42 -05:00
Williham Totland 18eee8f2f9 Adds strawberry bushes. 2013-06-10 08:08:10 +02:00
fnord dfeea3184e Replace menu and menu_vec with calls to uimenu equivalents 2013-06-10 01:00:34 -05:00
Williham Totland f182b22b76 Significantly reduces the number of giant worms. 2013-06-10 07:34:07 +02:00
fnord 5f1e3b467e Leave KEY_LEFT unused for now 2013-06-10 00:25:38 -05:00
Williham Totland b41d35f05b Adds some new, useful entries to .gitignore 2013-06-10 07:21:26 +02:00
Ethan "Soron" Kaminski b69c583d22 Fix catacurse.h compilation with the new ui.cpp 2013-06-10 17:08:29 +12:00
Williham Totland bb99ae7e03 Resolves an issue where game::game_quit was hilariously redundant. 2013-06-10 07:07:29 +02:00
Williham Totland a126213ed5 Resolved an issue where mattack::bite would give the wrong message 2013-06-10 07:04:17 +02:00
Ethan "Soron" Kaminski d13ab0b992 Merge PR #1497 - monster save/load bugfix 2013-06-10 16:41:16 +12:00
Ethan "Soron" Kaminski f0d205b9f6 Merge PR #1504 - mutagen refactor 2013-06-10 16:34:45 +12:00
Tommy 0659912848 Automagically add new keybindings, so long as they don't conflict. 2013-06-10 16:33:57 +12:00
Ethan "Soron" Kaminski 5e7d36ab98 Merge PR #1488 - AtomicDryad's new UI menu 2013-06-10 16:22:55 +12:00
Kevin Granade e3b9b707e5 Add some consistency to JSON syntax of new mutagen types. 2013-06-09 21:28:40 -05:00
Kevin Granade c79768b2e0 Add radiation badge item and associated infrastructure. 2013-06-09 20:59:40 -05:00
Christian Buskirk 8dbec5230f Throwing bug-fix
Style updated as part of the bug-solving process.
2013-06-09 18:58:37 -07:00
Kevin Granade 51281e1850 Return pointers to items in player:inv_dump() and inventory::dump() instead of copies of items. 2013-06-09 19:57:59 -05:00
fnord 9f11df4d30 100% compatibility with menu() and menu_vec() 2013-06-09 17:15:28 -05:00
Christian Buskirk b102f5e622 Fixed copy/paste mishap 2013-06-09 15:03:26 -07:00
Christian Buskirk cbcd451dbd Made smashing sounds trigger on smash location instead of player's 2013-06-09 14:55:30 -07:00
Christian Buskirk f2f8474495 Made shooting interactions more realistic
Added some missing cases
Alarms sound at terrain location instead of players
Destroying things by shooting/throwing makes sound
Extremely high damage weapons can go through/destroy reinforced glass
Throwing no longer always breaks windows - Fixes issue #1122
Windows now drop items - Fixes issue #1240
2013-06-09 14:38:20 -07:00
Christian Buskirk 1588e8128d Fixed a few missing semicolons 2013-06-09 12:39:34 -07:00
Christian Buskirk 2222b28fdd Reduced number of item value checks in steel recycler function 2013-06-09 12:22:17 -07:00
Kevin Granade eb859cb53c Merge Misc aMendments. 2013-06-09 11:53:13 -05:00
Kevin Granade 4231e1bba5 Description tweak. 2013-06-09 11:17:46 -05:00
Kevin Granade 6ee6bc05b0 Streamline special mutagen type handling by routing them theough a single iuse function. 2013-06-09 11:09:08 -05:00
Kevin Granade 25666a1895 Clean plans member of monster object when loading from file.
Prevents pathological corner-case where
save -> exit -> start -> load -> repeat, with no intervening
player actions causes geometric growth of <player name>.sav
and the resulting monster array size.
2013-06-09 10:32:15 -05:00
origamiwolf c24e5b5cc3 Bugfix for incorrect item spawn location in mansion bedrooms 2013-06-09 21:35:11 +08:00
Fergus Dall 4fb09287b6 Changed M72 LAW description to be more accurate
Closes #1499
Closes #800
2013-06-09 19:58:17 +09:30
Tommy f6986c1bac Convert some more stuff to using choose_adjacent(). 2013-06-09 21:16:17 +12:00
Christian Buskirk 0e86cf801b Made gasoline pumps only break when used
Fixes issue #1427
2013-06-09 00:28:36 -07:00
Christian Buskirk 8355f3d3b4 Made high strength characters on meth not break the disease duration 2013-06-09 00:22:00 -07:00
Kevin Granade 8c4f5dbfd8 Don't despawn monsters when exiting the game, they're already saved elsewhere. 2013-06-09 01:58:27 -05:00
fnord c1b1055c1b Comment typo fixes 2013-06-09 00:19:06 -05:00
fnord 9a892424d3 Merge branch 'better_menu' into advanced_inv_better_popups 2013-06-09 00:17:32 -05:00
fnord 244aa81d1a Warning for (startx,width,starty,title,ents) constructor removed: tested ok. -1024 changed to UIMENU_INVALID in init(); 2013-06-09 00:16:39 -05:00
Kevin Granade 539afb5773 Merge enhancements to mutation system. 2013-06-08 23:16:36 -05:00
Kevin Granade 90c17258c2 Merge remote-tracking branch 'dda/master' into dda-master 2013-06-08 23:15:44 -05:00
Kevin Granade 2909795958 Merge pull request #1495 from yobbobanana/movecost_update
Oops.
2013-06-08 21:10:20 -07:00
Kevin Granade 87517c8247 Merge MK II power armor. 2013-06-08 23:05:02 -05:00
Tommy 015dd91cd8 Fix silly mistake. 2013-06-09 16:03:32 +12:00
Tommy 01d6fdacc0 Use calc_movecost() for path length estimation. 2013-06-09 15:59:11 +12:00
Tommy 2e62753e4d Move monster movecost calculation to its own function for consistency. 2013-06-09 15:19:19 +12:00
Tommy 962ed6ebf8 Also use combined_movecost() for NPC moves, and path length calculation. 2013-06-09 15:19:19 +12:00
Tommy 8641bee38a Make movement take half the cost of both the beginning and end tiles,
in stead of just taking the cost of the end tile.
2013-06-09 15:19:19 +12:00
acidia c9e5aad704 Re-Added Zombie Spawn to Sarcophagus Basement 2013-06-08 21:14:25 -04:00
Ethan "Soron" Kaminski d4cc36fbe8 Merge PR #1491 - brass catcher (collects spent ammo shells)
Conflicts:
	mapitemsdef.cpp
2013-06-09 12:47:23 +12:00
Ethan "Soron" Kaminski 42a38ba8d0 Merge PR #1486 - CBM crafting/disassembly 2013-06-09 12:34:05 +12:00
Ethan "Soron" Kaminski 483a1c3277 Merge PR #1492 - stop crashing with human flesh, couple other things 2013-06-09 12:32:43 +12:00
Ethan "Soron" Kaminski b132383344 Merge PR #1421 - elevators made more sane 2013-06-09 12:12:27 +12:00
Williham Totland 480ba538fa Only checks for radiation gear if the ground is irradiated 2013-06-09 01:36:24 +02:00
Ethan "Soron" Kaminski 896ebeccd0 Const a few more (required) item methods 2013-06-09 11:29:21 +12:00
Williham Totland 90b4a261f6 Brings disassembly in line with crafts 2013-06-09 01:16:51 +02:00
Ethan "Soron" Kaminski 23e05440cd Merge PRs #1474, #1470, #1467 - drawing efficiency boosts 2013-06-09 11:11:23 +12:00
Williham Totland 104c85ab84 Fixed minor spelling error, thanks to kevingranade 2013-06-09 01:05:15 +02:00
Williham Totland 1eeaf4e881 Adds Mk. II power armor to spawn lists 2013-06-09 00:36:24 +02:00
Williham Totland 63ec2d48c6 Adds power armor Mk. II; makes power armor impervious to radiation 2013-06-09 00:27:53 +02:00
Williham Totland fcbb998d72 Updates poppy picking to properly ponder infection resistance (see note in comments) 2013-06-09 00:24:53 +02:00
Williham Totland 24b674f99d Updates name of "canned cad" to "soylent slices" to properly fit the theme of To Serve Man 2013-06-09 00:24:00 +02:00
Williham Totland 22a1cbbf7e Resolves an issue where interacting with human flesh would crash the game 2013-06-09 00:23:01 +02:00
Williham Totland 1ba2641b5b Slight rebalancing, adds Power Armor Interface Mk. II 2013-06-09 00:18:03 +02:00
Kevin Granade 561f372e20 Merge remote-tracking branch 'CR/pr/1480' into dda-master 2013-06-08 15:57:22 -05:00
Kevin Granade 8fe7a5408c Duodecimerge\! 2013-06-08 15:18:07 -05:00
Kevin Granade 0c30276a39 Replace some of the melee weapons in gun nut basement with gun extras. 2013-06-08 14:43:54 -05:00
Kevin Granade e614dba6ba Add brass catcher item, functionality, craft recipe, and spawn locations. 2013-06-08 14:43:25 -05:00
Williham Totland c8ecb7b7c7 Blood Filter disassembly added 2013-06-08 19:35:02 +02:00
Tommy f58c769ce2 Fix some mindless copy-paste. 2013-06-09 05:15:00 +12:00
Tommy cbc4f65a43 Allow players to board the vehicle they are standing in/on with '^'. 2013-06-09 05:05:43 +12:00
fnord 0a12c9f43b Now using 'uimenu' class to query for sorting, or destination when moving
to an 'a'll area. Depends on pull 1487
2013-06-08 10:34:59 -05:00
fnord 98100189ec Add ui.cpp and ui.h to windows .cbp thingie 2013-06-08 10:23:48 -05:00
acidia 93120acbcf Commented out zombies for Sarcophagus basement till elevator bug fixed 2013-06-08 10:17:59 -05:00
fnord 244dfaf245 New uimenu class with options for colors, size, positioning, behavior, preselection, and per entry definitions for hotkey, disabling, etc.
Also supports quick and dirty invokation like menu();
2013-06-08 10:15:55 -05:00
Williham Totland 25b77cbf2a Assembly and disassembly recipes for a number of CBMs 2013-06-08 15:47:45 +02:00
Fergus Dall d6e359b460 Refund move points when aborting firing a bow 2013-06-08 22:51:24 +09:30
Fergus Dall 80e396ba67 Stop player from shooting themselves
Fixes #1482
2013-06-08 22:38:16 +09:30
Fergus Dall b6738b9e15 Replace OPTIONS[OPT_CIRCLEDIST] with trigdist 2013-06-08 22:26:54 +09:30
Fergus Dall fdddeb2e33 Use rl_dist to limit range on burst fired weapons 2013-06-08 22:23:09 +09:30
Fergus Dall 94953e6ce1 Merge remote-tracking branch 'atomicdryad/correcting_headlight_mangling' into headlight 2013-06-08 22:01:16 +09:30
fnord e3c3f7e2ad Fixed trig light arc ends 2013-06-08 07:22:38 -05:00
Fergus Dall ea842fdcd4 Stop burst-fire weapons from targeting things out of range
Fixes #1464
2013-06-08 21:39:33 +09:30
Fergus Dall 6bd2be6c19 Stop inverting lightrays in the wrong places in map::apply_light_arc 2013-06-08 21:23:14 +09:30
Fergus Dall 7ee5220010 Use sqrt instead of trig_dist, as trig_dist returns int 2013-06-08 21:01:20 +09:30
Fergus Dall e5188abc04 Re-write map::apply_light_arc to respond to circleLOS option
Fixes #1476
2013-06-08 20:50:07 +09:30
fnord 7db953b341 multidrop: only pad to screen width 2013-06-08 06:02:41 -05:00
fnord 29d91ec83b fix missing declartion 2013-06-08 06:01:41 -05:00
Octav Sandulescu e8af406e8c Return to the build dir after making win32 bindist. 2013-06-08 10:27:01 +01:00
Octav Sandulescu 66f85fd665 Clean up the bindist. 2013-06-08 10:22:23 +01:00
fnord b14e56e7ed trap and field editing 2013-06-08 03:56:29 -05:00
fnord 11917efbb1 Merge remote branch 'origin/master' into map_editor 2013-06-08 03:49:25 -05:00
Tommy c8a51d5272 Properly draw bullets when firing with a shifted viewport. 2013-06-08 19:42:05 +12:00
Kevin Granade 9d02380e5d Merge limiter to ranged targeting in trig distance mode. 2013-06-07 23:54:17 -05:00
Kevin Granade 346d3fc13c Add invalidation hook to player that is called every action. 2013-06-07 23:42:06 -05:00
Kevin Granade 6bda614fce Use new accessor to test for presence of nightvision tech. 2013-06-07 22:50:52 -05:00
Kevin Granade cbb79103d9 Add a caching accessor for whether the player has active night vision. 2013-06-07 22:45:50 -05:00
Fergus Dall 049e2dad48 Disable spawning and crafting of two-way radios
Fixes #1430
2013-06-08 12:18:11 +09:30
Fergus Dall 0c20b9e0e0 Make lava destroy any items placed on it
Fixes #1154
2013-06-08 11:55:23 +09:30
Tommy f4ec56896c Sign SIGNOFF. 2013-06-08 14:19:43 +12:00
Kevin Granade 7bb826d024 Marshall info about the current square at the start of drawsq() instead of calling the same methods multiple times. 2013-06-07 21:11:39 -05:00
Tommy c20a6d656b Display the number of movement points the player's last action used. 2013-06-08 13:51:27 +12:00
Fergus Dall 03a1ddb767 Don't clear the npc list while saving
Fixes #1336
2013-06-08 11:06:44 +09:30
Kevin Granade 3ff2841600 Nest trig_dist() in rl_dist() instead of replicating the implementation. 2013-06-07 20:06:03 -05:00
Kevin Granade a61050d0b7 Batch of bugfixes.
Conflicts:
	SIGNOFF
2013-06-07 19:07:59 -05:00
Kevin Granade 273cb19123 Despawn monsters when we change z-levels, and handle sticking them in the stair queue properly. 2013-06-07 18:57:20 -05:00
D Lue Choy 78598fc848 Save on sleep?
Option to save game before sleeping.
Sets values for autosave.
options.cpp styled using current ruleset.

Signed-off-by: D Lue Choy <dluechoy@>
2013-06-07 19:16:11 -04:00
Voker57 f5d43cbefd Signed off. 2013-06-08 02:32:24 +04:00
Ethan "Soron" Kaminski bdc508ca30 Merge PR #1455 - view centering while aiming 2013-06-08 10:11:38 +12:00
Christian Buskirk 6c7c5c92cd Merge PR #1456 - Cooking with Javelins 2013-06-07 14:21:00 -07:00
fnord cba216eea6 Add missing semicolon 2013-06-07 15:14:20 -05:00
fnord 9efd9c6cb1 ranged.cpp: target: Players can no longer aim horizontally beyond
the weapon's range if circular geometry is enabled.
2013-06-07 15:00:28 -05:00
Izicata db05859538 Changed trig_dist to rl_dist for range calculations
This should ensure both circular distances and roguelike distances use proper range calculations.
2013-06-07 16:50:06 -03:00
Izicata ec32cf4399 Use absolute-value based range calculation when circular distances is turned off.
If circular distances is on, use the old trig-based range calculation. 

If circular distances is off, use either the distance along the x axis or the distance along the y axis as the range value (whichever is bigger), because that's how non-Euclidean square-tile based systems work.
2013-06-07 16:39:37 -03:00
Christian Buskirk 569017d4b5 Merge pull request #1459 from fergus-dall/flamethrower 2013-06-07 11:23:03 -07:00
Shoes01 578b776f50 Thirst now occurs less frequently when hot 2013-06-07 14:29:45 -03:00
Fergus Dall 5bd3dd5389 Check AMMO_FLAME correctly in game::fire
Fixes #1457
2013-06-07 23:14:57 +09:30
Stevensonz c29f251e0c Cooking with Javelins Issue #1438 FIX
Add Javelins again which was lost due to oversight.
(Re--added Javelin to Cooked Meat ,Cooked Human Meat and Cooked Veggy
Recipe)
2013-06-07 20:47:29 +08:00
Tommy 7486b13eef Don't snap the view to the player when targeting. Fixes #90. 2013-06-08 00:10:50 +12:00
Ethan "Soron" Kaminski 7dca418f8f Remove the unused (and unlikely to be used) OutputText function 2013-06-07 23:52:15 +12:00
Ethan "Soron" Kaminski 43edb6e28e Use an explicitly unsigned char variable for array access 2013-06-07 23:50:57 +12:00
Ethan "Soron" Kaminski c87a4eb985 Use the prescribed method for converting from a string literal to a char* 2013-06-07 23:46:10 +12:00
utunnels f3bec68606 Wrap contents of case statements in braces. 2013-06-07 19:32:34 +08:00
utunnels d778c96f24 Merge branch 'master' of github.com:CleverRaven/Cataclysm-DDA into sdl-window-fix 2013-06-07 19:31:26 +08:00
utunnels 5238680f4e Try to fix cross initialization issue which certain compilers complain about. 2013-06-07 19:27:46 +08:00
Fergus Dall c582ec1f00 Change X-Acto knife description
Closes #1451
2013-06-07 18:48:14 +09:30
utunnels d403dee27f Code/comment clean up. 2013-06-07 17:13:49 +08:00
utunnels 033c674821 sdl version now reads fontsize from FONTDATA instead of using fontheight directly. The default value is fontheight-1, if it is not provided. 2013-06-07 16:18:00 +08:00
Tommy 6b47b3ed04 Replace pl_choose_vehicle() with generic choose_adjacent(). 2013-06-07 19:53:48 +12:00
Tommy 20448bbb9f Move all the which-direction queries into a single function. 2013-06-07 19:32:08 +12:00
utunnels 99be2add0d Alt+F4 support for sdl version (old sdl version doesn't support that directly). Also center the window when start up. 2013-06-07 14:58:46 +08:00
Ethan "Soron" Kaminski 329879b152 Merge PR #1441 - more vehicle controls tweaks 2013-06-07 16:27:25 +12:00
Ethan "Soron" Kaminski 567a0cf048 Fix font paths 2013-06-07 16:14:42 +12:00
Ethan "Soron" Kaminski 241666ab45 Merge PR #1445 - updates to SDL font stuff 2013-06-07 16:06:23 +12:00
Izicata eb51a46b07 Signed off.
I am not going to include my email address, because reasons.
2013-06-06 23:56:53 -04:00
Kevin Granade 60bc5c0d01 Merge signoff from AtomicDryad.
Conflicts:
	SIGNOFF
2013-06-06 22:49:18 -05:00
utunnels 82c369f341 Merge branch 'master' of github.com:CleverRaven/Cataclysm-DDA into sdl-font-fix 2013-06-07 11:43:44 +08:00
Kevin Granade f237dfbc7c Merge damaging radiation and optional mutations from rads. 2013-06-06 22:42:36 -05:00
utunnels fe5cd58192 Remove unnecessary fontpath from sdlcurse code. 2013-06-07 11:42:33 +08:00
Ethan "Soron" Kaminski 62dc4a0d3e Merge PR #1442 - lightmap fixes 2013-06-07 15:32:09 +12:00
utunnels 04c6035e79 Merge branch 'master' of github.com:CleverRaven/Cataclysm-DDA into sdl-font-fix 2013-06-07 11:14:45 +08:00
Kevin Granade 70be4e63a9 Stupid error is stupid. 2013-06-06 22:14:42 -05:00
utunnels 12bfcf4363 Re-commit unsaved file last time. 2013-06-07 11:13:27 +08:00
utunnels b0a2691a9b Make sdl FONDATA compatible with its gdi counterpart. Cache glyph data for sdl font to speed up DrawWindow. Filter shift, alt and ctrl keys. 2013-06-07 11:03:43 +08:00
Kevin Granade 7b043b8aad Batch of small fixes. 2013-06-06 21:38:53 -05:00
Kevin Granade 23fb52737b Apply transparency effects on horizontal-dominant rays as well. 2013-06-06 21:36:23 -05:00
Kevin Granade c1e849a701 Sanity check for map::apply_light_ray() to avoid lightmap hangs. 2013-06-06 21:36:12 -05:00
Kevin Granade 75bc1c5015 Merge pull request #1424 from ethankaminski/acid-resist-returnval
Actually return the ret value in item::acid_resist
2013-06-06 19:16:48 -07:00
Tommy 8a975d9829 Merge external vehicle control with new '^' key. Fixes #1395. 2013-06-07 14:05:15 +12:00
Ethan "Soron" Kaminski c26fb969c3 Merge PR #1432 - multidrop UI shows list of dropped items 2013-06-07 13:49:17 +12:00
Ethan "Soron" Kaminski 4544c029bf Merge PR #1411 - make max traits optional 2013-06-07 13:40:02 +12:00
Ethan "Soron" Kaminski af7eac439c Merge PR #1380 - Windows makefile gives the app an icon 2013-06-07 13:39:32 +12:00
Ethan "Soron" Kaminski 76bb7b8a60 Merge PR #1394 - catacurse wclear change 2013-06-07 13:12:44 +12:00
Ethan "Soron" Kaminski 8c1b90ac2a Catch a lingering reference to the old skill data structure
Should fix #1436.
2013-06-07 12:43:20 +12:00
Ethan "Soron" Kaminski 2242dc0558 Merge PR #1416 - unusing liquids (disinfectant) 2013-06-07 12:31:21 +12:00
Ethan "Soron" Kaminski efc9851ece Merge PR #1412 - fix blade trap disarming 2013-06-07 12:28:20 +12:00
Ethan "Soron" Kaminski d8da557343 Merge PR #1400 - vehicle updates 2013-06-07 12:15:20 +12:00
Ethan "Soron" Kaminski ca566baee7 Sort inventory by item charges, use low-charge items first
FINALLY got it so that low-charge items will consistently be used in favor of high-charge items.

Doesn't do anything for matches vs. lighter use, though (since it also sorts by item ID).
2013-06-07 12:01:10 +12:00
MacrosBlackD 6cfe4927ee Fixed loading of max trait points from options 2013-06-06 16:36:31 -05:00
Quietust 2f86ddf54d don't do pow(int, 2.0) - (int * int) is all but guaranteed to be faster 2013-06-06 13:59:36 -05:00
D Lue Choy 4efd4a1fbd Multidrop screen now shows a summary of what is about to be dropped
Wielded items highlighted in lightblue, and worn items are highlighted in cyan.
Partial quantities are shown with { } braces.
Redraw not optimized; does not interfere with 80 column display on Windows.

Signed-off-by: D Lue Choy <dluechoy@>
2013-06-06 14:37:11 -04:00
MacrosBlackD bfa463f427 Removed int& from set_traits 2013-06-06 08:57:07 -05:00
MacrosBlackD c36e1390eb Added max trait points to the options menu. Addresses issue #1410 2013-06-06 08:57:06 -05:00
Ethan "Soron" Kaminski d1bd12b0e2 Actually return the ret value in item::acid_resist 2013-06-06 19:02:40 +12:00
Ethan "Soron" Kaminski 9d9fec4c62 Merge PR #1422 - update .gitignore 2013-06-06 18:48:28 +12:00
Ethan "Soron" Kaminski dbc0eea563 Remove an extraneous close brace 2013-06-06 18:47:01 +12:00
Izicata 97d8766dc6 Dropped items no longer dissappear.
The directional drop code was substantively different from the regular drop code; directional drops do not duplicate items when dropping into full vehicle trunks, even on builds pre-#1401. Since the directional drop code actually works, I copy-pasted the relevant parts over the regular drop code, changed dirx/diry to u.posx/u.posy, and the result doesn't duplicate items and actually drops dropped items.

Hopefully I haven't horribly broken anything this time.
2013-06-06 02:07:20 -03:00
MacrosBlackD 0d95cb99fd Updated .gitignore to exlude user settings and artifacts from the visual studio build 2013-06-05 23:33:38 -05:00
Kevin Granade 06ebe00ed3 Call game::vertical_move() from iexamine::elevator() instead of trying to shift levels manually. 2013-06-05 23:19:38 -05:00
Kevin Granade a5eddf5e9a Add support for elevators to game::nertical_move(). 2013-06-05 23:18:45 -05:00
Ethan "Soron" Kaminski 5e8a75e6f4 Make SDL play nice with CPU usage while listening for events 2013-06-06 15:09:40 +12:00
Ethan "Soron" Kaminski 3061d2a15f Stop hiding the mouse cursor with SDL 2013-06-06 15:07:46 +12:00
Ethan "Soron" Kaminski a6359ab812 Merge PR #1417 - more SDL adjustments for MSVC 2013-06-06 15:01:12 +12:00
Quietust b767b19a22 Get SDL compile actually working this time - helps to include the libs 2013-06-05 21:56:16 -05:00
Tommy 9e7160f4e0 Roll backwards when exiting a reversing vehicle. 2013-06-06 14:38:14 +12:00
Kevin Granade 90b1454d3f Hackishly special case liquid un-use handling in iuse.cpp. 2013-06-05 21:28:51 -05:00
Tommy 0247a68bb2 Don't roll player if diving from a vehicle into water. 2013-06-06 14:16:42 +12:00
Tommy 55c5c9fb3d Safely hop from slow-moving vehicles, get hurt from quick ones. 2013-06-06 14:12:16 +12:00
Ethan "Soron" Kaminski 6791b36b20 Made font paths work for both SDL and wincurse.cpp 2013-06-06 13:32:24 +12:00
Kevin Granade a78d4ab6a5 Fix disarming blade trap as per issue #1403. 2013-06-05 19:29:32 -05:00
MacrosBlackD 8561b882d6 signed-off ;) 2013-06-05 19:27:47 -05:00
Kevin Granade 34ce78ca92 Merge fix to vehicle trunk duplication bug. 2013-06-05 18:55:50 -05:00
Kevin Granade bf96a523bf Merge blood analysis and filtering extensions. 2013-06-05 18:52:45 -05:00
Kevin Granade ea6fc565da Merge trig based distance option.
Conflicts:
	game.h
	lightmap.cpp
	map.h
2013-06-05 18:36:52 -05:00
Kevin Granade 0626768b17 Misc mergeomainia. 2013-06-05 18:07:17 -05:00
Ethan "Soron" Kaminski aebb05a22d Merge PR #1402 - fix cataclysm-launcher script 2013-06-06 10:48:19 +12:00
MacrosBlackD b4f69b80a6 Replaced electric motor on the chainsaw recipe with the 1 cylinder engine. This addresses issue 1405. 2013-06-05 17:34:45 -05:00
Ethan "Soron" Kaminski 1a28044b91 Merge PR #1396 - no more single-tile highways 2013-06-06 10:33:20 +12:00
Ethan "Soron" Kaminski ed9b4fd905 Merge PR #1393 - assorted fixes 2013-06-06 10:32:07 +12:00
Ethan "Soron" Kaminski b067ca460f Merge PR #1408 - make nights dark again 2013-06-06 10:29:38 +12:00
Ethan "Soron" Kaminski e3b897ced2 Merge PR #1407 - WinMain for MSVC builds 2013-06-06 10:26:56 +12:00
Ethan "Soron" Kaminski 6b59ed084a Merge PR #1397 - human meat fixes 2013-06-06 10:26:35 +12:00
MacrosBlackD 398dd3c5d4 Fix issue 1381; readded if check on light level return value 2013-06-05 17:11:31 -05:00
Quietust 64dd8e0466 Add USE_WINMAIN define for MSVC so it can run without creating a console window 2013-06-05 16:30:25 -05:00
Christian Buskirk fc497729fd Stopped bleeding and poison from applying when stopped by armor 2013-06-05 11:42:36 -07:00
Octav Sandulescu b2d5e59da0 Make the 'launcher' do things without spawning _two_ subshells. 2013-06-05 19:14:34 +01:00
Izicata 1d8aed0c37 Fixed #1088
When dropping vehicle trunk overflow items to ground, don't start dropping all of the items again. Only drop items that haven't already been dropped to the trunk.

Somebody please look this over to make sure I haven't broken anything.
2013-06-05 13:27:25 -03:00
Tommy 41f080ea36 Missed a return statement. 2013-06-06 03:18:20 +12:00
fnord 9ae0c84205 Graffiti written on the current ground square will now display below
the status line (on displays supporting 27 lines or more).
2013-06-05 09:58:54 -05:00
origamiwolf f2002aa178 Used materials acid resistance to determine how items react to acid fields 2013-06-05 22:26:58 +08:00
Tommy 62a497b1a3 Properly fling player when exiting a moving vehicle. 2013-06-06 02:14:28 +12:00
Tommy dd9ae34c02 * Split vehicle disembarking out of game::examine().
* Split vehicle control out of ACTION_SLEEP.
* Add new default keybinding for vehicle control: '^'.
* Allow vehicle disembark from vehicle control menu.
* Only query for disembarking moving vehicles.
2013-06-06 01:51:54 +12:00
origamiwolf b16960015e Fixed typo in mapitemsdef that prevented human cookbook from spawning 2013-06-05 21:29:39 +08:00
origamiwolf d7bbf9d357 Fixed order of material checks in complete_butcher 2013-06-05 21:28:21 +08:00
Fergus Dall 8f086dcd8a Don't attempt to make a highway if start and end points are the same
Fixes #1119
2013-06-05 21:08:57 +09:30
Fergus Dall 688e0c7506 Remove unnecessary check in SkillLevel::rust 2013-06-05 20:32:06 +09:30
Fergus Dall b34d1e275c Change wclear to call clearok instead of wrefresh
Fixes #1149
2013-06-05 20:28:17 +09:30
fnord 43036fb7fe Make sharpie markers write and spraycans spray 2013-06-05 05:57:32 -05:00
fnord 09eb756bc6 Behold, sharpie markers 2013-06-05 05:54:10 -05:00
Fergus Dall 570bc23f02 Make quench and nutrition of cooked foods more inline with their components.
See #1181
2013-06-05 20:19:20 +09:30
Fergus Dall 832e230cd8 Stop partially trained skills from rusting down a level when OPT_SKILL_RUST = 1
Fixes #1224
2013-06-05 19:51:39 +09:30
Fergus Dall 80ef38459c Make blood analysis detect all drugs 2013-06-05 19:32:21 +09:30
Fergus Dall a0ecb15c19 Make blood filter remove all other drug based diseases 2013-06-05 19:27:20 +09:30
Fergus Dall 02f1626fb8 Make blood analysis detect meth, and blood filter remove "High on meth" effect 2013-06-05 19:23:54 +09:30
Fergus Dall 5800c1d74d Make blood filter remove painkiller and stimulatnt totals 2013-06-05 19:23:22 +09:30
Christian Buskirk b95ed0f2dd Fixed cloak materials
Addresses issue #1359
2013-06-05 02:22:51 -07:00
Christian Buskirk 1293a4a327 Made bites no longer infect when canceled by armor
Also made bite infection chance based on damage dealt.
2013-06-05 02:14:00 -07:00
Christian Buskirk 18fc805a0f Made Gradual night light on by default
We have a fancy realistic light effect, lets use it (I'm not even sure
why this is even an option, the false version is horribly unrealistic).
2013-06-05 00:54:51 -07:00
Christian Buskirk 540a19cfaa Increased Auto Safe Mode max duration to 100 2013-06-05 00:30:08 -07:00
Quietust 218bfd1323 Add custom build step for MSVC to generate version.h 2013-06-04 23:12:42 -05:00
Quietust ca482d88d2 Add MSVC build targets for SDL version 2013-06-04 23:11:33 -05:00
fnord b50433ca19 avoid use of pow() in distance calculation, speeding them up an order of magnitude (thanks quietus!) 2013-06-04 22:06:49 -05:00
Ethan "Soron" Kaminski 2314c2c63f Blood splatter from pulping is possible with *any* non-zero damage level 2013-06-05 15:04:15 +12:00
Ethan "Soron" Kaminski 3de1a7f2c2 Merge PR #1382 - corpse smashing splatter 2013-06-05 14:37:23 +12:00
Ethan "Soron" Kaminski a6fad03602 Merge PR #1383 - GlyphGryph's signoff 2013-06-05 14:37:09 +12:00
GlyphGryph 5e8bce8c51 Merge branch 'master' of https://github.com/TheDarklingWolf/Cataclysm-DDA
Conflicts:
	SIGNOFF
2013-06-04 21:15:23 -04:00
GlyphGryph 85733dfa3c Signed off. 2013-06-04 21:09:24 -04:00
Kevin Granade c062c0f857 Splatter blood around when pulping corpses. Thanks to Wrath for the idea. 2013-06-04 19:44:00 -05:00
Kevin Granade 190cdee153 Fix some crazy indention. 2013-06-04 19:25:38 -05:00
RJ Costanzo 7107433dcd Chunk of steel recipe
See issue #1170

Conflicts:

	data/raw/recipes.json
2013-06-04 19:22:13 -05:00
Kevin Granade d1c9b8dbbe Today's small fixes and enhancements. 2013-06-04 18:57:26 -05:00
Justice- ed26c90816 Updated to attach resources to executable 2013-06-04 17:47:47 -05:00
Kevin Granade 0960f63f03 Merge SDL text support. 2013-06-04 17:24:29 -05:00
Justice- 2f3e4fc8c2 Added leather vest item and crafting recipe 2013-06-04 16:17:36 -05:00
Quietust c27e89a85c Don't recalculate sight range for every tile 2013-06-04 15:36:21 -05:00
Quietust 8f0077396e Don't decrement iterators pointing at the end of an empty list 2013-06-04 15:28:27 -05:00
fnord 35250f7334 +signoff 2013-06-04 02:20:32 -05:00
Ethan "Soron" Kaminski 2f4a211065 Merge PR #1363 - adv. inv. examining 2013-06-04 19:18:26 +12:00
fnord 2ae1f65705 Fitting screen now shows storage and encumbrance in item columns 2013-06-04 02:17:59 -05:00
Ethan "Soron" Kaminski 79654065b4 Merge PR #1367 - minor radiation tweak 2013-06-04 19:16:03 +12:00
Ethan "Soron" Kaminski 6a672affcd Bows are not ever one-handable.
Closes #665.
2013-06-04 18:52:57 +12:00
fnord 6094e56112 Performance enhanced 253% via #ifdef and comment cleanup =^.^= 2013-06-04 01:40:30 -05:00
Ethan "Soron" Kaminski fa4a3bf606 Fix swimming encumbrance penalty sign, displayed formula
Closes #1369
2013-06-04 18:31:40 +12:00
Ethan "Soron" Kaminski 7202b9da7a Make indents match surrounding code 2013-06-04 18:20:49 +12:00
Ethan "Soron" Kaminski 3bcd65bcb5 Remove obsolete/inactive "map legend" stuff 2013-06-04 18:19:22 +12:00
Ethan "Soron" Kaminski 39581a1d09 Remove another unused enum from game.h 2013-06-04 17:47:08 +12:00
Ethan "Soron" Kaminski 8627293874 Remove an unused tutorial-related enum 2013-06-04 17:34:53 +12:00
Ethan "Soron" Kaminski 82b6211c50 Make the windows in the tutorial room curtained 2013-06-04 17:26:23 +12:00
Ethan "Soron" Kaminski eac93274e6 Merge PR #1344 - apply circular lighting globally 2013-06-04 15:31:58 +12:00
Ethan "Soron" Kaminski 1345baa885 Fix a segfault with the material rewrite
Need to use <= instead of < on that bounds check
2013-06-04 15:19:00 +12:00
Kevin Granade b8f66b69e1 Eliminate radiation dosage saturation, halving dosage rate to compensate. 2013-06-03 21:25:22 -05:00
Quietust 4be8d6647d Tweak sqrt() usage to make MSVC be quiet (since it replaces <math.h> with <cmath> when compiling C++) 2013-06-03 20:43:39 -05:00
Ethan "Soron" Kaminski 9428f23d63 Use standard "!" for negation, not gcc "not" extension 2013-06-04 13:39:25 +12:00
Kevin Granade 38e261b283 Scale stuck cost based on a weapon's ratio of cutting to bashing damage. 2013-06-03 19:51:19 -05:00
Ethan "Soron" Kaminski c0fbf32c8f Update a few new items to the new lowercase materials 2013-06-04 12:40:07 +12:00
Ethan "Soron" Kaminski 1d5d5666fb Merge PR #1315 - material refactor (pushed to data files)
Conflicts:
	data/raw/items/tools.json
	game.cpp
	item.cpp
	mtypedef.cpp
2013-06-04 12:31:16 +12:00
Kevin Granade 16b9a17adc Merge corpse pulping. 2013-06-03 18:53:05 -05:00
Ethan "Soron" Kaminski 69f869ca16 Merge PR #1351 - sort skill list by level 2013-06-04 11:30:20 +12:00
Ethan "Soron" Kaminski eb8ff64592 Change how pulping works with damaged corpses and multiple corpses 2013-06-04 11:24:50 +12:00
Ethan "Soron" Kaminski 63afbe6d05 Make smash time depend on the player's weapon 2013-06-04 11:12:50 +12:00
Ethan "Soron" Kaminski 7db767b36c Merge PR #1358 - correct invlet displayed after crafting 2013-06-04 10:35:35 +12:00
Ethan "Soron" Kaminski 34ba91f8df Merge small fixes - PRs #1353, #1354, #1357, #1362 2013-06-04 09:56:02 +12:00
fnord 2849eb539c remove silly #ifdef that broke "e" for non-inv items 2013-06-03 16:47:59 -05:00
fnord 62db60c36f no unused has. Indeed. 2013-06-03 16:30:49 -05:00
fnord 9c343b5b58 Inventory: remembers last highlighted item 2013-06-03 16:15:55 -05:00
fnord 0e075582c6 Advanced inv: "e" pulls up inventory item menu. Help window displays feedback messages for actions taken. "?" toggles between help and msg viewer. 2013-06-03 16:12:30 -05:00
Quietust 6557b37f44 Fix hang in 64-bit builds when filtering [V] item list 2013-06-03 14:49:41 -05:00
fnord 4b30bb41a3 fix build error 2013-06-03 13:12:19 -05:00
fnord a59e0f6a84 Nuked #debug-ifs. Restored lightarc shape. Make lightsource downgrade less cpu intensive squares within huge-assed lava fields 2013-06-03 12:35:06 -05:00
fnord c7f727d974 Merge remote branch 'origin/master' into opt_circledist-wip 2013-06-03 10:23:22 -05:00
Tommy 77fefd9123 Display the correct inventory letter when crafting adds to a stack. 2013-06-04 02:04:27 +12:00
Quietust e65588ab65 South is "S", not "W" 2013-06-03 08:43:42 -05:00
origamiwolf 5d024eb583 Added density field, for use in vortex attacks 2013-06-03 21:24:23 +08:00
Christian Buskirk 10e323f80b Small typo fix for my updated FAQ. 2013-06-03 04:02:20 -07:00
Christian Buskirk 41a432a88a Fixed hacksaw name (was "hack saw", should be "hacksaw"). 2013-06-03 03:39:34 -07:00
Christian Buskirk e116197137 Added tiny pain effect to Acid Drizzle, raincoats now offer a bit of protection to acid rain/drizzle.
Raincoats give a 1/3rd chance of canceling the drizzle effect and a
1/10th for the rain one.
Also updated raincoat description.

This addresses issue #1161.
2013-06-03 03:25:13 -07:00
Christian Buskirk 89b769ec11 Fixed old mutation effect removal when upgrading mutations
Also fixes the permanent stat gain part of issue #1259.
2013-06-03 02:54:21 -07:00
Octav Sandulescu 9bcd254e1f Catch the other copy/paste, too 2013-06-03 10:49:34 +01:00
Octav Sandulescu 6e02f37876 Bugfixes 'cannot put %s over your tentacles' 2013-06-03 10:45:40 +01:00
Christian Buskirk 17064f496c Made multiple gasoline tanks drain properly.
Fixes issue #1084
2013-06-03 02:02:14 -07:00
Christian Buskirk 0b2a39755f Made vitamins have an effect again
Optimal dose is approximately twice a day (~13.8 hours per dose).
Also fixes issue #1136
2013-06-03 01:43:29 -07:00
Christian Buskirk c12bab5ede Remove old TODO comment 2013-06-02 23:51:14 -07:00
Ethan "Soron" Kaminski a90f8beca3 Make key handling work for non-ASCII characters 2013-06-03 18:40:36 +12:00
Christian Buskirk 417c2235f3 Updated FAQ 2013-06-02 23:27:02 -07:00
Ethan "Soron" Kaminski a6b43ca28e Make it possible to apply multiple damage levels to a corpse in one attempt
Can't believe I didn't code it this way to begin with >_>.
2013-06-03 18:24:02 +12:00
Ethan "Soron" Kaminski 252c3977f5 Move the corpse damage descriptors to the default case
Because for implementation reasons, corpses are made_of(FLESH) even though type->m1 == MNULL.
2013-06-03 18:09:07 +12:00
Ethan "Soron" Kaminski 583e94f8ca Don't drain mental focus if the amount to train is 0 2013-06-03 18:01:15 +12:00
Ethan "Soron" Kaminski a16b870c3c Don't bother targeting pulped corpses 2013-06-03 18:00:36 +12:00
Ethan "Soron" Kaminski 48f09cbda3 Apply a time penalty for smashing corpses 2013-06-03 18:00:10 +12:00
Ethan "Soron" Kaminski ccdbae085d Re-indent game::smash() 2013-06-03 17:59:13 +12:00
Tommy 1fa4cab410 Consistently display rusting skills. 2013-06-03 17:54:57 +12:00
Ethan "Soron" Kaminski 32a5b96f89 Smashing a corpse-containing tile now targets the corpse first 2013-06-03 17:53:14 +12:00
Tommy f5ccf0d0ef Sort the skills list by skill level. 2013-06-03 17:38:16 +12:00
Christian Buskirk c22cc8dd4a Stopped players from leaving slime trails or webs while in a vehicle. 2013-06-02 22:34:54 -07:00
Ethan "Soron" Kaminski 6dcd020977 Clean up a little of the smash code 2013-06-03 16:49:40 +12:00
Ethan "Soron" Kaminski 40cd3dec1a Make corpse damage impair revivification 2013-06-03 16:37:04 +12:00
Ethan "Soron" Kaminski ef5981e752 Add more damage descriptors for corpses 2013-06-03 16:31:14 +12:00
Kevin Granade 67c99cdff5 Merge medical item integration and small fixes. 2013-06-02 22:35:28 -05:00
Ethan "Soron" Kaminski e44c295ad8 Update the Windows project files to point to the new wincurse.cpp 2013-06-03 15:22:04 +12:00
Ethan "Soron" Kaminski edca8f0f33 Tweak how the makefile treats the obj directories 2013-06-03 15:10:50 +12:00
Ethan "Soron" Kaminski 7e5960c637 Merge remote-tracking branch 'origin/pr/3' into sdlcurses 2013-06-03 15:04:17 +12:00
Ethan "Soron" Kaminski 65ef0ffe81 Fix font sizing 2013-06-03 15:03:48 +12:00
Ethan "Soron" Kaminski 92758ac2aa Merge PR #1300 - remove an NPC deletion outside of the desiginated cleanup function 2013-06-03 14:48:33 +12:00
Kevin Granade 651d8779a8 Remove call to remove_npc() from npc::die().
It should only be called from cleanup_dead().
npc::die() merely marks the NPC as dead.
2013-06-02 21:45:44 -05:00
Ethan "Soron" Kaminski 5e80ca8573 Merge PR #1348 - ranged perception mod tweak 2013-06-03 14:43:32 +12:00
Kevin Granade 623a331ef5 Slight nerf to perception skill's effect on ranged accuracy. 2013-06-02 21:29:08 -05:00
Ethan "Soron" Kaminski 23b449951a Merge PR #1337 - weapon sticking rework 2013-06-03 14:24:56 +12:00
Ethan "Soron" Kaminski e638e812e2 Show driving skill again in the '@' screen
Closes #1343.
2013-06-03 14:14:40 +12:00
Ethan "Soron" Kaminski d113871810 Fix misfire message for turrets (turrets now considered "NPC"s, rather than "player"s) 2013-06-03 13:57:09 +12:00
Kevin Granade df4f271a7f Merge Herbert Jones' signoff.
Conflicts:
	SIGNOFF
2013-06-02 20:54:44 -05:00
Kevin Granade 0873d4ab8d A little cleanup of debug and prototype code I missed when merging the lighting rework. 2013-06-02 20:41:09 -05:00
Kevin Granade 28b1bb51ec Remove globally setting light level based on items the player is holding. 2013-06-02 20:38:21 -05:00
Kevin Granade 910215c7a2 Make circular lighting pattern the way lighting works. 2013-06-02 20:37:47 -05:00
Ethan "Soron" Kaminski 045fb50ac6 Add an iuse for disinfectant 2013-06-03 12:59:16 +12:00
Ethan "Soron" Kaminski 02d5cd9023 Only print new HP totals if the body part is damaged 2013-06-03 12:36:18 +12:00
Ethan "Soron" Kaminski 7a03540af7 There's code to print the new HP totals? Well, let's use it! 2013-06-03 12:35:28 +12:00
Ethan "Soron" Kaminski 6d2bc37c82 Clean up medical iuse, extract common bandage/first aid logic 2013-06-03 12:21:11 +12:00
Kevin Granade 662a977f2a Merge lightmap refactor to use trig functions instead of iterative methods. 2013-06-02 19:01:20 -05:00
Ethan "Soron" Kaminski 8e81ad1091 Add new medical items to spawn lists, fix some typos in descriptions 2013-06-03 11:46:41 +12:00
Ethan "Soron" Kaminski fb709da465 Merge PR #1339 - no misfires from muscle-powered firearms 2013-06-03 11:33:13 +12:00
Kevin Granade 8b2e421f59 Exempt archery and throwing-based weapons from misfire chance. 2013-06-02 18:24:36 -05:00
Ethan "Soron" Kaminski c40a5b413c Merge PR #1326 - Nickboom's medical items 2013-06-03 11:20:55 +12:00
Kevin Granade 1d89346337 Batch o fixes and enhancements. 2013-06-02 18:03:34 -05:00
Ethan "Soron" Kaminski abd5432247 Make the misfire message smart about player vs. non-player 2013-06-03 10:54:31 +12:00
Kevin Granade 6d60d22ee1 Rework how stuck chances is caclculated.
It's now based on weapon attack speed, weapon attack type, and player skill.
2013-06-02 17:50:36 -05:00
Kevin Granade fb4cbb0cd2 Remove redundant code penalizing cutting weapons for getting stuck. 2013-06-02 17:49:36 -05:00
Kevin Granade 01e4ab3c1c Serialize monster inventories so they don't evaporate across a save/load.
They still disappear when the monster goes off-map since it's saved as a spawn point, which doesn't contain the monster instance.
2013-06-02 17:49:07 -05:00
Kevin Granade b60b6933c6 Annotate various cuting weapons with their default attack mode. 2013-06-02 17:48:20 -05:00
Kevin Granade 971d5b79c5 Random cleanup of indentation in monster save method. 2013-06-02 16:36:09 -05:00
fnord a55c42808d Option documented 2013-06-02 16:31:54 -05:00
fnord a554eb6b75 advanced inventory: display graffiti label, misc ui shuffling 2013-06-02 16:16:34 -05:00
Quietust 9705ca763e Make zombie hulks a bit more visually distinctive 2013-06-02 13:56:35 -05:00
Philipp Grosenick 4790d40f22 Fixed typo. 2013-06-02 20:22:57 +02:00
fnord 5499eb30af Add 'bundle of 10 plastic bags' + recipe: 6 inches of string and (obviously) 10 bags. 2013-06-02 12:49:48 -05:00
fnord 342bebfd40 look debug menu look derivative: hit g to change a tiles ter_id 2013-06-02 12:40:56 -05:00
RJ Costanzo a643b5a0bf Medical items updated
This is the medical items updated to have some more uses gauzes act like
rags when used, disinfectant is now basically first aid (made a little
rarer).
2013-06-02 13:39:36 -04:00
fnord ab44abd652 advanced inventory secondary sorts by name, so the item list doesn't jump around when moving stuff 2013-06-02 12:36:02 -05:00
fnord ae20a06ce9 Merge branch 'mo_betta_headlights' into opt_circledist-wip 2013-06-02 12:28:45 -05:00
fnord b29e9f6dfc Option added 2013-06-02 11:31:39 -05:00
fnord ea288e8f9a circularize light sources, apply diagonal cost adjustment to npc movement 2013-06-02 08:25:42 -05:00
Philipp Grosenick da975c6b42 Added option to allow/disallow mutation by radiation.
Also some rebalancing and formatting.
2013-06-02 14:37:50 +02:00
Philipp Grosenick f711f996ef Added the remaining specific mutagens.
For now they use very general recipies.
2013-06-02 13:07:42 +02:00
RJ Costanzo ff69111bd2 New medical items
These are a few new medical items. A few Issues, I ment for medical tape
and gauzes to serve as a replacement for duct tape and rags
respectively. Disinfectant currently heals like bandages and doesnt
remove infection. None of these items have spawning thingys for them
yet, if any one could solve these problems I would really be thankful.
2013-06-02 03:02:26 -04:00
Ethan "Soron" Kaminski 155095b32a Fix viewport sizing with SDL-based Linux builds 2013-06-02 17:41:21 +12:00
acidia 989b9f37b6 Added a place holder for HWS basement mission 2013-06-02 00:14:52 -05:00
Ethan "Soron" Kaminski e1512a8825 Filter shift, etc., from getch() in sdlcurse.cpp 2013-06-02 17:05:33 +12:00
acidia 0f44c4ae13 Fixed Basement Level for HWS 2013-06-01 23:52:59 -05:00
acidia 2152f08eae Added Command to Activate Elevator in HWS 2013-06-01 23:51:08 -05:00
acidia 6874ae57b9 Added Command to Activate Elevator in HWS 2013-06-02 00:49:13 -04:00
acidia f8884ef1d2 Added HWS Basement Core 2013-06-01 23:47:43 -05:00
Ethan "Soron" Kaminski e1444d40da Update a few tutorial messages 2013-06-02 16:42:17 +12:00
fnord 45e8e6c391 circular distance pt1: plmove & monmove & rl_dist 2013-06-01 21:48:04 -05:00
acidia 716ec49d32 Added core chamber for Hazardous Waste Sarcophagus basement 2013-06-01 22:41:15 -04:00
acidia f4af0c831f Added hazardous waste sarcophagus basement 2013-06-01 21:38:13 -05:00
acidia 720317931e Added Patriot Mission 4, "Follow Sarcophagus Team" 2013-06-01 21:30:34 -05:00
acidia 323872c503 Added Patriot Mission 4, "Follow Sarcophagus Team" 2013-06-01 22:27:55 -04:00
acidia bdc66f1f7a Added open_sarcophagus for Patriot Mission 4, "Follow Sarcophagus Team" 2013-06-01 22:25:46 -04:00
acidia 0819b2cc67 Added dialogue for Patriot Mission 4, "Follow Sarcophagus Team" 2013-06-01 21:23:04 -05:00
acidia ddf15c3e67 Added sarcophagus_access_code for Patriot 4, "Follow Sarcophagus Team" 2013-06-01 21:19:31 -05:00
Kevin Granade cbed9f4de0 Today's batch of bugfixes and improvements. 2013-06-01 19:33:30 -05:00
Philipp Grosenick e650629cb6 Mutagens that cause mutation only in specific categories.
There are still a lot missing.
2013-06-02 01:25:32 +02:00
RJ Costanzo fd6f5e24ea Arm and Leg Splints
More or less a place holder for when Medical Treatment is expanded.
2013-06-01 17:09:57 -04:00
fnord 0858c1c06a apply_light_ray: trig_brightcalc argument (optional, default false)
apply_light_arc: use light rays with the above option = true
2013-06-01 14:04:01 -05:00
Philipp Grosenick 84b716bb81 Fixed Issue #999, wearing anything over Arm or Leg tentacles. 2013-06-01 20:51:16 +02:00
Octav Sandulescu b4c2a2240c First aid actually is not an antibiotic. 2013-06-01 19:09:26 +01:00
fnord 0d0c1f0303 Remove old code, set defaults to original "best looking" 2013-06-01 12:56:00 -05:00
fnord 382f779114 Merge remote branch 'origin/master' into mo_betta_headlights 2013-06-01 12:55:08 -05:00
Philipp Grosenick 336fd7ff39 Added more severe consequences of radioactivity.
A very high amount of radioactivity can actually kill you.
2013-06-01 19:13:25 +02:00
Philipp Grosenick cdc6107715 Made mutation categories actually matter.
The primary mutation category now has significant influence. Traits from
other categories have a high chance of being removed. It is now very
difficult to end up with every single trait in the entire game.
2013-06-01 17:57:10 +02:00
Octav Sandulescu e4b1dba228 Make the awesome version string work on Windows (when cross-compiling) 2013-06-01 14:03:18 +01:00
origamiwolf dbc97fb205 Materials refactoring 2013-06-01 20:44:17 +08:00
fnord 5eaebe59d2 Fixed erronious "destination area full" 2013-06-01 07:17:21 -05:00
Octav Sandulescu 8abd247968 These were needed for cross-compile.
It's possible they'd also be needed for a native compile, but someone else will have to test that.
2013-06-01 12:59:38 +01:00
Fergus Dall b8b9b1d8e2 Set known_down on ot_slimepit_down, and unset it on ot_slimepit 2013-06-01 20:26:04 +09:30
Fergus Dall 0df23b1b25 Stop ot_slimepit_down from appearing on the lowest z-level 2013-06-01 20:24:07 +09:30
Fergus Dall 089cb1582f Make surface slime pits ot_slimepit_down, as was presumably intended originally 2013-06-01 20:23:06 +09:30
Ethan "Soron" Kaminski 1259f07dbb Let the player see recent messages on death
Closes #1303.
2013-06-01 17:35:04 +12:00
acidia cb2a8e250d Added reference for kill_count 2013-06-01 00:26:50 -05:00
acidia 3f928b8be6 Added functions needed to reference kill counts for missions 2013-06-01 00:24:37 -05:00
acidia 690a76bcde Added Deputy Badge Spawn 2013-06-01 00:16:07 -05:00
acidia 691954f517 Added Vigilante Mission 3, "Find Deputy Badge" 2013-06-01 00:03:56 -05:00
acidia 0a9a69eb92 Added Vigilante Mission 3, "Find Deputy Badge" 2013-06-01 00:59:56 -04:00
Ethan "Soron" Kaminski d1cfc04f51 Fix components for fur blanket and fur sleeping bag
Closes #1271.
2013-06-01 16:59:42 +12:00
acidia 553acf35ca Added deposit_box for Vigilante Mission 2, "Retrieve Deposit Box" 2013-05-31 23:57:08 -05:00
acidia 41ba156fe4 Added Vigilante Mission 3, "Find Deputy Badge" 2013-05-31 23:55:58 -05:00
acidia 8283f207dc Added badge_deputy 2013-06-01 00:10:47 -04:00
acidia b7bacb74f7 Added place_deposit_box for Vigilante Mission 2, "Retrieve Deposit Box" 2013-05-31 22:58:09 -05:00
acidia 9628eb5902 Fixing Typos 2013-05-31 22:53:19 -05:00
acidia 7f758eb8c7 Added Vigilante Mission 2, "Retrieve Deposit Box" 2013-05-31 23:17:40 -04:00
acidia 9ab367b32d Added dialogue for Vigilante Mission 2, "Retrieve Safe Box" 2013-05-31 22:12:23 -05:00
acidia cb498936a1 Adding Safe Deposit Box for Vigilante Mission 2, "Retrieve Deposit Box" 2013-05-31 21:55:45 -05:00
acidia b26f0c3b53 Added place_priest_diary for Martyr Mission 2, "Recover Priest's Diary" 2013-05-31 22:24:21 -04:00
acidia 8bedbd1406 Fixed Small Typo 2013-05-31 22:15:56 -04:00
acidia a5ef4ff627 Fixed Small Typo 2013-05-31 21:14:58 -05:00
acidia 397deb2b2a Added Priest's Diary for Martyr Mission 2, "Recover Priest's Diary" 2013-05-31 20:48:48 -05:00
acidia ff35d368b3 Added Martyr Mission 2, "Recover Priest's Diary" 2013-05-31 20:44:00 -05:00
acidia e0a4cfd0a5 Added Martyr Mission 2, "Recover Priest's Diary" Dialogue 2013-05-31 20:41:03 -05:00
acidia c1c44af54d Added Martyr Mission 2, "Recover Priest's Diary" 2013-05-31 20:39:06 -05:00
Ethan "Soron" Kaminski f4166a796c Fix Windows cross-compilation from Linux 2013-06-01 13:35:00 +12:00
acidia c178b7f81e Added Kill Horde Master Mission Dialogue 2013-05-31 21:27:29 -04:00
acidia 6496b6b417 Added Kill Horde Master Mission 2013-05-31 20:23:58 -05:00
acidia 5d3067c98f Added Kill Horde Master Mission Start 2013-05-31 21:22:09 -04:00
acidia 50fe2024ec Added Kill Horde Master Mission 2013-05-31 20:19:05 -05:00
Ethan "Soron" Kaminski c84b0fcba7 Make the SDL version compatible with Linux, etc. 2013-06-01 12:23:28 +12:00
acidia 2c096cff92 Added the values needed to make "kill x of monster y" missions 2013-05-31 19:55:24 -04:00
acidia 540419ac5f adding demon slayer mission 2 def 2013-05-31 19:48:30 -04:00
acidia 42f7f3863e Added Zombie Sweep Mission Start Command 2013-05-31 18:45:07 -05:00
acidia 922c242c00 Added demon slayer mission 2 dialogue and numerous fixes 2013-05-31 18:43:07 -05:00
Ethan "Soron" Kaminski 6846b798ba SDL-based ASCII/pseudo-curses version by utunnels (forum user) 2013-06-01 11:27:12 +12:00
Ethan "Soron" Kaminski 36e02742b1 Copy catacurse.cpp to sdlcurse.cpp for history purposes 2013-06-01 11:24:17 +12:00
Kevin Granade e47e711cfa Merge string handling bugfixes. 2013-05-31 17:10:31 -05:00
Kevin Granade b57def4763 Merge notification that contents of containers aren't visible. 2013-05-31 17:05:55 -05:00
Kevin Granade e7d2913f33 Merge pull request #1302 from ethankaminski/delwin-adding-1
Stop some newwin memory leaks by adding delwin calls
2013-05-31 14:54:39 -07:00
Quietust f20118fed9 Fix recipe parsing - in MSVC, catajson.as_string().c_str() becomes invalid too soon 2013-05-31 10:37:38 -05:00
fnord 4bbf660067 Remove deprecated debugging vars, luminance multiplier 4=>3 2013-05-31 06:12:32 -05:00
atomicdryad ce5a1b4521 Merge pull request #3 from kevingranade/light_artifacts
Remove possibly premature optimization that is causing artifacts in light raytracing.
2013-05-31 04:08:01 -07:00
Fergus Dall afede12c04 Show a message when looking at container tiles 2013-05-31 19:13:04 +09:30
Ethan "Soron" Kaminski b03dff09b4 Stop some newwin memory leaks by adding delwin calls 2013-05-31 19:27:27 +12:00
Ethan "Soron" Kaminski 49217b652e Fix a chatbin save bug that got introduced 2013-05-31 19:01:34 +12:00
Ethan "Soron" Kaminski b0afac60ad Fix saving of null strings in player_activity 2013-05-31 18:41:24 +12:00
Ethan "Soron" Kaminski bee9f9c7c2 Add a debugmsg about null itypes in a constructor 2013-05-31 18:24:40 +12:00
Ethan "Soron" Kaminski 171f312097 Remove the old method of handling skills 2013-05-31 18:16:46 +12:00
Kevin Granade 9944213436 Remove turn cost for adjusting cruise control speed. 2013-05-30 22:01:12 -05:00
Kevin Granade 919b0c316c Remove possibly premature optimization that is causing artifacts in light raytracing. 2013-05-30 21:35:45 -05:00
Kevin Granade 1d1c1311a7 Merge mission and mapgen enhancements. 2013-05-30 20:02:44 -05:00
Kevin Granade fd30c6b272 Merge conforming monster density to nearby building type. 2013-05-30 19:59:46 -05:00
acidia 5ddceb2116 Fix PT. 2 2013-05-30 19:27:11 -05:00
acidia 27c494d808 MGOAL_GO_TO_TYPE Fix PT. 1 2013-05-30 19:23:21 -05:00
Kevin Granade 7d771106a1 Merge hands in pockets warmth boost. 2013-05-30 19:16:43 -05:00
Shoes01 3a2a94f637 Moved power_armor into in_climate_control for warmth control, also formatted stuff 2013-05-30 19:02:58 -07:00
Shoes01 2589f6b642 Merge branch 'master' of github.com:Shoes01/Cataclysm-DDA into pockets 2013-05-30 18:20:08 -07:00
Fergus Dall 6489762fa6 Move monster spawn radius to a #define 2013-05-31 08:52:18 +09:30
Kevin Granade 569c17eb59 Merge a ridiculously huge pile of bugfixes. 2013-05-30 18:12:07 -05:00
fnord b47167bffa Remove redundant redundancy. 2013-05-30 16:16:24 -05:00
fnord 117eb69d00 Advanced inv remembers areas and scroll position (until player moves).
Move trivial UI specific data to uistate struct.
2013-05-30 16:08:58 -05:00
fnord ca83dfed82 Segv fix 2013-05-30 15:56:53 -05:00
Quietust 90e6bdb34e Fix advanced_inv in MSVC - store item pointers instead of copying them 2013-05-30 13:18:19 -05:00
Quietust 9895370291 Add snprintf wrapper to game.cpp as well; also properly handle error condition 2013-05-30 11:27:26 -05:00
Julian Snitow b28ea74582 Fix advanced inventory 'East' square.
An error in commit 2eb0ad444e transposed
the x,y coordinates on the 'East' square in the advanced inventory
interface, making it a second 'South' square instead.
2013-05-30 07:11:18 -07:00
Fergus Dall e3f9ce548d Make burnt zombie corpses take longer, and be less likely, to revive
See #1144
2013-05-30 21:57:54 +09:30
Fergus Dall 93c6927326 Stop warning the player about monsters that are no longer in LOS
Fixes #664
2013-05-30 21:32:31 +09:30
Fergus Dall 41f0d9e2d7 Fixed unused variable warning 2013-05-30 21:05:25 +09:30
Fergus Dall f179a72a10 Make monster density depend on nearby buildings 2013-05-30 21:04:28 +09:30
Fergus Dall 6442e69bb5 Add options to controll autosave frequency
Closes #677
2013-05-30 20:14:03 +09:30
fnord b0769ed94b Car headlights cumulative. apply_light_arc: Optional 4th beam-width argument, cleanup, more experiments 2013-05-30 05:32:50 -05:00
Fergus Dall 0e7d333f88 Make cooked food's rotteness an average of the rotteness of the components
Fixes #1229
2013-05-30 19:29:14 +09:30
Ethan "Soron" Kaminski a7499b4002 Moving vehicle code also applies for reversing vehicles 2013-05-30 19:24:18 +12:00
D Lue Choy 3de8d970af Examine vehicle controls without boarding.
Allows 'vehicles' to be used as lighting and turret platforms without a
seat.
Also in the future could be used with cruise control to add
car-missiles?

Signed-off-by: D Lue Choy <dluechoy@>
2013-05-30 02:21:49 -04:00
Shoes01 4e65569bb0 Added description to items with POCKETS flag 2013-05-29 22:25:32 -07:00
Shoes01 be94cf3714 Warmth values in @ menu looks at warmth function, not encumb function 2013-05-29 22:25:32 -07:00
Shoes01 87c33c7616 Pockets can now be used, and power armor warmth calculated in warmth function 2013-05-29 22:25:32 -07:00
Shoes01 a449ab6310 Added POCKETS flags to certain items 2013-05-29 22:25:32 -07:00
Tommy 492054b243 Display the correct inventory letter when picking up stacking items. 2013-05-30 16:20:43 +12:00
Herbert Jones 040ff92099 Signing off on my patches to the code.
This covers all my patches to the Cataclysm/Cataclysm-DDA codebase.

Signed-off-by: Herbert Jones <jones.herbert@gmail.com>
2013-05-29 20:56:17 -05:00
fnord 6557b4e7f5 apply_light_arc: now using fancy math(tm) && adjustable beam width. Also, visual artifacts (this is a feature>.>) 2013-05-29 18:29:12 -05:00
acidia 445b576a58 Added t_gates_control_concrete 2013-05-28 21:26:44 -04:00
acidia 1ab05985ed Added t_gates_control_concrete 2013-05-28 21:24:46 -04:00
acidia c170f7bc6a Added Concrete Gate Control to fix bug in utility room for labs 2013-05-28 20:22:58 -05:00
acidia 56c820fb49 Removed testing values from new missions 2013-05-27 21:34:44 -05:00
acidia 66999b48f5 Rewrite Farms to allow for easier manipulate to turn into base 2013-05-27 19:46:36 -05:00
acidia c892792209 Added support for MGOAL_GO_TO_TYPE 2013-05-27 19:40:05 -05:00
acidia 2d70b5c477 Added support for DESTINATION, MGOAL_GO_TO_TYPE 2013-05-27 19:38:29 -05:00
acidia f7af08ba42 Added support for DESTINATION and filling in humanitarian 2 and 3 2013-05-27 19:35:35 -05:00
acidia 6da3697f9f Added humanitarian missions 2 and 3 and DESTINATION() 2013-05-27 19:29:42 -05:00
acidia 0e93b1b696 Added dialogue for humanitarian missions 2 and 3 2013-05-27 20:26:53 -04:00
acidia dd444125ab Added JOIN for NPC's joining your party for the mission 2013-05-27 19:24:55 -05:00
acidia 5d5a1d0960 Added NPC leaving at the end of mission 2013-05-27 19:22:43 -05:00
Herbert Jones e066f83cda Added license. 2013-05-14 09:13:47 -05:00
124 changed files with 16523 additions and 5716 deletions
+16
View File
@@ -12,3 +12,19 @@ version.h
Cataclysm.exe
CataclysmWin.depend
CataclysmWin.layout
# Visual Studio files
*.suo
*.user
Cataclysm.sdf
Release*/
*.opensdf
# Temporary and backup files
*~
\#*
*.bak
# System Files
Thumbs.db
.DS_Store
-20
View File
@@ -1,20 +0,0 @@
Instructions for compiling on a Debian-based system. The package names here are for Ubuntu 12.10
Dependencies: libncurses
# Native build on current platform
sudo apt-get install libncurses5-dev
make
# Cross-compile to linux 32-bit from linux 64-bit
sudo apt-get install libc6-dev-i386 lib32ncurses5-dev lib32stdc++-dev g++-multilib
make NATIVE=linux32
# Cross-compile for Windows
sudo apt-get install autoconf bison flex cmake git automake intltool libtool scons yasm
mkdir -p ~/src
git clone -b stable https://github.com/mxe/mxe.git ~/src
cd ~/src/mxe
make gcc
PATH=${PATH}:~/src/mxe/usr/bin
make CROSS=win32
+84
View File
@@ -0,0 +1,84 @@
Instructions for compiling on a Debian-based system. The package names here are
valid for Ubuntu 12.10 and may or may not work on your system.
Building instructions, below, always assume you are running them from the
Cataclysm:DDA source directory.
## Linux (native) ncurses builds ##
Dependencies:
* ncurses
* build essentials
```
sudo apt-get install libncurses5-dev build-essential
```
### Building ###
```
make
```
## Cross-compiling to linux 32-bit from linux 64-bit ##
Dependencies:
* 32-bit toolchain
* 32-bit ncurses
```
sudo apt-get install libc6-dev-i386 lib32stdc++-dev g++-multilib lib32ncurses5-dev
```
### Building ###
```
make NATIVE=linux32
```
## Cross-compile to Windows from Linux ##
Dependencies:
* [mxe](http://mxe.cc)
```
sudo apt-get install autoconf bison flex cmake git automake intltool libtool scons yasm
mkdir -p ~/src/mxe
git clone -b stable https://github.com/mxe/mxe.git ~/src/mxe
cd ~/src/mxe
make gcc
```
### Building ###
```
PATH="${PATH}:~/src/mxe/usr/bin"
make CROSS=i686-pc-mingw32-
```
## Linux (native) SDL builds ##
Dependencies:
* SDL
* SDL_ttf
* build essentials
```
sudo apt-get install libsdl1.2-dev libsdl-ttf2.0-dev build-essential
```
### Building ###
```
make TILES=1
```
## Cross-compile to Windows SDL from Linux ##
Dependencies:
* [mxe](http://mxe.cc)
```
sudo apt-get install autoconf bison flex cmake git automake intltool libtool scons yasm
mkdir -p ~/src/mxe
git clone -b stable https://github.com/mxe/mxe.git ~/src/mxe
cd ~/src/mxe
make sdl sdl_ttf
```
### Building ###
```
PATH="${PATH}:~/src/mxe/usr/bin"
make TILES=1 CROSS=i686-pc-mingw32-
```
+19 -2
View File
@@ -19,6 +19,21 @@
<Add option="-static -lgdi32" />
</Linker>
</Target>
<Target title="Debug">
<Option output="Cataclysm" prefix_auto="1" extension_auto="1" />
<Option object_output="obj/Debug/" />
<Option type="0" />
<Option compiler="gcc" />
<Compiler>
<Add option="-pg" />
<Add option="-g" />
</Compiler>
<Linker>
<Add option="-pg -lgmon" />
<Add option="-Wl,-stack,12000000,-subsystem,windows" />
<Add option="-static -lgdi32" />
</Linker>
</Target>
</Build>
<Unit filename="action.cpp" />
<Unit filename="action.h" />
@@ -37,7 +52,6 @@
<Unit filename="building_generation.h" />
<Unit filename="calendar.cpp" />
<Unit filename="calendar.h" />
<Unit filename="catacurse.cpp" />
<Unit filename="catacurse.h" />
<Unit filename="catajson.cpp" />
<Unit filename="catajson.h" />
@@ -108,8 +122,8 @@
<Unit filename="mapgenformat.h" />
<Unit filename="mapitems.h" />
<Unit filename="mapitemsdef.cpp" />
<Unit filename="material.h" />
<Unit filename="material.cpp" />
<Unit filename="material.h" />
<Unit filename="melee.cpp" />
<Unit filename="mission.cpp" />
<Unit filename="mission.h" />
@@ -180,6 +194,8 @@
<Unit filename="trapfunc.cpp" />
<Unit filename="tutorial.cpp" />
<Unit filename="tutorial.h" />
<Unit filename="ui.cpp" />
<Unit filename="ui.h" />
<Unit filename="veh_interact.cpp" />
<Unit filename="veh_interact.h" />
<Unit filename="veh_type.h" />
@@ -191,6 +207,7 @@
<Unit filename="weather.cpp" />
<Unit filename="weather.h" />
<Unit filename="weather_data.cpp" />
<Unit filename="wincurse.cpp" />
<Unit filename="wish.cpp" />
<Extensions>
<code_completion />
+13
View File
@@ -95,6 +95,19 @@
8) If the armour is made from 2 materials types, then it takes a weighted average of the primary material (66%) and secondary material (33%).
9) Materials resistance factors are given relative to PAPER as a material (this probably needs some fine-tuning for balance).
1.5 Acid resistance
This determines how items react to acid fields. Item acid resistances are a weighted
average of the materials acid resistance (see item::acid_resist).
An item acid resistance of zero means it will get corroded every turn
An item acid resistance above zero means it has a chance of getting corroded every turn
An item acid resistance above 9 means completely acidproof
Acid resistance values are in materials.json, and defined as such:
0 - zero resistance to acid (metals)
1 - partly resistant to acid
2 - very resistant to acid
3 - complete acid resistance
FAQ
Q: What the heck is up with the map objects?
+38 -11
View File
@@ -20,13 +20,15 @@
# Default
# Release (turn on optimizations)
# make RELEASE=1
# Tiles (uses SDL rather than ncurses)
# make TILES=1
# comment these to toggle them as one sees fit.
# WARNINGS will spam hundreds of warnings, mostly safe, if turned on
# DEBUG is best turned on if you plan to debug in gdb -- please do!
# PROFILE is for use with gprof or a similar program -- don't bother generally
WARNINGS = -Wall -Wextra -Wno-switch -Wno-sign-compare -Wno-missing-braces -Wno-unused-parameter
WARNINGS = -Wall -Wextra -Wno-switch -Wno-sign-compare -Wno-missing-braces -Wno-unused-parameter -Wno-psabi
# Uncomment below to disable warnings
#WARNINGS = -w
DEBUG = -g
@@ -54,11 +56,18 @@ VERSION = 0.5
TARGET = cataclysm
TILESTARGET = cataclysm-tiles
W32TILESTARGET = cataclysm-tiles.exe
W32TARGET = cataclysm.exe
BINDIST_DIR = bindist
BUILD_DIR = $(CURDIR)
# tiles object directories are because gcc gets confused
# when preprocessor defines change, but the source doesn't
ODIR = obj
ODIRTILES = obj/tiles
W32ODIR = objwin
W32ODIRTILES = objwin/tiles
DDIR = .deps
OS = $(shell uname -o)
@@ -73,11 +82,11 @@ endif
CXXFLAGS += $(WARNINGS) $(DEBUG) $(PROFILE) $(OTHERS) -MMD
BINDIST_EXTRAS = README data cataclysm-launcher
BINDIST_EXTRAS = README data
BINDIST = cataclysmdda-$(VERSION).tar.gz
W32BINDIST = cataclysmdda-$(VERSION).zip
BINDIST_CMD = tar -czvf $(BINDIST) $(BINDIST_DIR)
W32BINDIST_CMD = zip -r $(W32BINDIST) $(BINDIST_DIR)
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
@@ -119,14 +128,10 @@ endif
# MXE cross-compile to win32
ifneq (,$(findstring mingw32,$(CROSS)))
DEFINES += -DCROSS_LINUX
TARGETSYSTEM=WINDOWS
endif
# Global settings for Linux targets
ifeq ($(TARGETSYSTEM),LINUX)
LDFLAGS += -lncurses
endif
# Global settings for Windows targets
ifeq ($(TARGETSYSTEM),WINDOWS)
TARGET = $(W32TARGET)
@@ -137,6 +142,28 @@ ifeq ($(TARGETSYSTEM),WINDOWS)
W32FLAGS += -Wl,-stack,12000000,-subsystem,windows
endif
ifdef TILES
LDFLAGS += -lSDL -lSDL_ttf -lfreetype -lz
DEFINES += -DTILES
ifeq ($(TARGETSYSTEM),WINDOWS)
LDFLAGS += -lgdi32 -ldxguid -lwinmm
TARGET = $(W32TILESTARGET)
ODIR = $(W32ODIRTILES)
else
TARGET = $(TILESTARGET)
ODIR = $(ODIRTILES)
endif
else
# Link to ncurses if we're using a non-tiles, Linux build
ifeq ($(TARGETSYSTEM),LINUX)
LDFLAGS += -lncurses
endif
endif
ifeq ($(TARGETSYSTEM),LINUX)
BINDIST_EXTRAS += cataclysm-launcher
endif
SOURCES = $(wildcard *.cpp)
HEADERS = $(wildcard *.h)
_OBJS = $(SOURCES:.cpp=.o)
@@ -158,7 +185,7 @@ version:
)
$(ODIR):
mkdir $(ODIR)
mkdir -p $(ODIR)
$(DDIR):
@mkdir $(DDIR)
@@ -169,7 +196,7 @@ $(ODIR)/%.o: %.cpp
version.cpp: version
clean: clean-tests
rm -f $(TARGET) $(W32TARGET) $(ODIR)/*.o $(ODIR)/*.d $(W32ODIR)/*.o $(W32BINDIST) \
rm -rf $(TARGET) $(W32TARGET) $(ODIR) $(W32ODIR) $(W32BINDIST) \
$(BINDIST)
rm -rf $(BINDIST_DIR)
rm -f version.h
+8
View File
@@ -13,6 +13,7 @@ DDIR = .deps
TARGET = cataclysm.exe
CXX = g++
WNDRES = windres
LINKER = i486-mingw32-ld
LINKERFLAGS = -Wl,-stack,12000000,-subsystem,windows
@@ -20,6 +21,7 @@ LINKERFLAGS = -Wl,-stack,12000000,-subsystem,windows
CFLAGS = $(WARNINGS) $(DEBUG) $(PROFILE) $(OTHERS)
LDFLAGS = -static -lgdi32
RFLAGS = -J rc -O coff
#ifeq ($(OS), Msys)
#LDFLAGS = -static -lpdcurses
@@ -29,6 +31,8 @@ LDFLAGS = -static -lgdi32
SOURCES = $(wildcard *.cpp)
_OBJS = $(SOURCES:.cpp=.o)
RSRC = $(wildcard *.rc)
_OBJS += $(RSRC:.rc=.res)
OBJS = $(patsubst %,$(ODIR)/%,$(_OBJS))
all: $(TARGET)
@@ -46,7 +50,11 @@ $(DDIR):
$(ODIR)/%.o: %.cpp
$(CXX) $(CFLAGS) -c $< -o $@
$(ODIR)/%.res: %.rc
$(WNDRES) $(RFLAGS) $< -o $@
clean:
rm -f $(TARGET) $(ODIR)/*.o
-include $(SOURCES:%.cpp=$(DEPDIR)/%.P)
+10
View File
@@ -15,4 +15,14 @@ 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.>
+51 -11
View File
@@ -1,9 +1,20 @@
#include "game.h"
#include "keypress.h"
#include "output.h"
#include <istream>
#include <sstream>
#include <fstream>
void parse_keymap(std::istream &keymap_txt, std::map<char, action_id> &kmap);
void game::load_keyboard_settings()
{
// Load the default keymap
std::istringstream sin;
sin.str(default_keymap_txt());
parse_keymap(sin, default_keymap);
// Load the player's actual keymap
std::ifstream fin;
fin.open("data/keymap.txt");
if (!fin) { // It doesn't exist
@@ -15,13 +26,37 @@ void game::load_keyboard_settings()
}
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);
}
while (!fin.eof()) {
// Check for new defaults, and automatically bind them if possible
std::map<char, action_id>::iterator d_it;
bool found;
for (d_it = default_keymap.begin(); d_it != default_keymap.end(); d_it++) {
found = false;
std::map<char, action_id>::iterator k_it;
for (k_it = keymap.begin(); k_it != keymap.end(); k_it++) {
if (d_it->second == k_it->second) {
found = true;
break;
}
}
if (!found && !keymap.count(d_it->first)) {
keymap[d_it->first] = d_it->second;
}
}
}
void parse_keymap(std::istream &keymap_txt, std::map<char, action_id> &kmap)
{
while (!keymap_txt.eof()) {
std::string id;
fin >> id;
keymap_txt >> id;
if (id == "")
getline(fin, id); // Empty line, chomp it
getline(keymap_txt, id); // Empty line, chomp it
else if (id[0] != '#') {
action_id act = look_up_action(id);
if (act == ACTION_NULL)
@@ -29,25 +64,25 @@ void game::load_keyboard_settings()
Warning! data/keymap.txt contains an unknown action, \"%s\"\n\
Fix data/keymap.txt at your next chance!", id.c_str());
else {
while (!fin.eof()) {
while (!keymap_txt.eof()) {
char ch;
fin >> std::noskipws >> ch >> std::skipws;
keymap_txt >> std::noskipws >> ch >> std::skipws;
if (ch == '\n') {
break;
} else if (ch != ' ' || fin.peek() == '\n') {
if (keymap.find(ch) != keymap.end()) {
} 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 {
keymap[ ch ] = act;
kmap[ ch ] = act;
}
}
}
}
} else {
getline(fin, id); // Clear the whole line
getline(keymap_txt, id); // Clear the whole line
}
}
}
@@ -197,7 +232,7 @@ std::string action_ident(action_id act)
case ACTION_BIONICS:
return "bionics";
case ACTION_SORT_ARMOR:
return "sort_armor";
return "sort_armor";
case ACTION_WAIT:
return "wait";
case ACTION_CRAFT:
@@ -212,6 +247,8 @@ std::string action_ident(action_id act)
return "disassemble";
case ACTION_SLEEP:
return "sleep";
case ACTION_CONTROL_VEHICLE:
return "control_vehicle";
case ACTION_TOGGLE_SAFEMODE:
return "safemode";
case ACTION_TOGGLE_AUTOSAFE:
@@ -369,7 +406,7 @@ std::string action_name(action_id act)
case ACTION_BIONICS:
return "View/Activate Bionics";
case ACTION_SORT_ARMOR:
return "Re-layer armour/clothing";
return "Re-layer armour/clothing";
case ACTION_WAIT:
return "Wait for Several Minutes";
case ACTION_CRAFT:
@@ -384,6 +421,8 @@ std::string action_name(action_id act)
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:
@@ -421,3 +460,4 @@ std::string action_name(action_id act)
}
return "Someone forgot to name an action.";
}
+1
View File
@@ -67,6 +67,7 @@ ACTION_LONGCRAFT,
ACTION_CONSTRUCT,
ACTION_DISASSEMBLE,
ACTION_SLEEP,
ACTION_CONTROL_VEHICLE,
ACTION_TOGGLE_SAFEMODE,
ACTION_TOGGLE_AUTOSAFE,
ACTION_IGNORE_ENEMY,
+31 -27
View File
@@ -225,22 +225,22 @@ artifact_property_datum artifact_property_data[ARTPROP_MAX] = {
};
artifact_tool_form_datum artifact_tool_form_data[NUM_ARTTOOLFORMS] = {
{"", '*', c_white, MNULL, MNULL, 0, 0, 0, 0, ARTWEAP_BULK,
{"", '*', c_white, "null", "null", 0, 0, 0, 0, ARTWEAP_BULK,
{ARTWEAP_NULL, ARTWEAP_NULL, ARTWEAP_NULL}},
{"Harp", ';', c_yellow, WOOD, MNULL, 20, 30, 10, 18, ARTWEAP_BULK,
{"Harp", ';', c_yellow, "wood", "null", 20, 30, 10, 18, ARTWEAP_BULK,
{ARTWEAP_SPEAR, ARTWEAP_SWORD, ARTWEAP_KNIFE}},
{"Staff", '/', c_brown, WOOD, MNULL, 6, 12, 4, 10, ARTWEAP_CLUB,
{"Staff", '/', c_brown, "wood", "null", 6, 12, 4, 10, ARTWEAP_CLUB,
{ARTWEAP_BULK, ARTWEAP_SPEAR, ARTWEAP_KNIFE}},
{"Sword", '/', c_ltblue, STEEL, MNULL, 8, 14, 8, 28, ARTWEAP_SWORD,
{"Sword", '/', c_ltblue, "steel", "null", 8, 14, 8, 28, ARTWEAP_SWORD,
{ARTWEAP_BULK, ARTWEAP_NULL, ARTWEAP_NULL}},
{"Dagger", ';', c_ltblue, STEEL, MNULL, 1, 4, 1, 6, ARTWEAP_KNIFE,
{"Dagger", ';', c_ltblue, "steel", "null", 1, 4, 1, 6, ARTWEAP_KNIFE,
{ARTWEAP_NULL, ARTWEAP_NULL, ARTWEAP_NULL}},
{"Cube", '*', c_white, STEEL, MNULL, 1, 3, 1, 20, ARTWEAP_BULK,
{"Cube", '*', c_white, "steel", "null", 1, 3, 1, 20, ARTWEAP_BULK,
{ARTWEAP_SPEAR, ARTWEAP_NULL, ARTWEAP_NULL}}
};
@@ -260,43 +260,43 @@ artifact_weapon_datum artifact_weapon_data[NUM_ARTWEAPS] = {
};
artifact_armor_form_datum artifact_armor_form_data[NUM_ARTARMFORMS] = {
{"", c_white, MNULL, MNULL, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
{"", c_white, "null", "null", 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, false,
{ARMORMOD_NULL, ARMORMOD_NULL, ARMORMOD_NULL, ARMORMOD_NULL, ARMORMOD_NULL}},
// Name color Materials Vol Wgt Enc Cov Thk Env Wrm Sto Bsh Cut Hit
{"Robe", c_red, WOOL, MNULL, 6, 6, 1, 3, 3, 0, 2, 0, -8, 0, -3,
{"Robe", c_red, "wool", "null", 6, 6, 1, 3, 3, 0, 2, 0, -8, 0, -3,
mfb(bp_torso)|mfb(bp_legs), false,
{ARMORMOD_LIGHT, ARMORMOD_BULKY, ARMORMOD_POCKETED, ARMORMOD_FURRED,
ARMORMOD_PADDED}},
{"Coat", c_brown,LEATHER,MNULL, 14, 14, 2, 3, 2, 1, 4, 4, -6, 0, -3,
{"Coat", c_brown,"leather","null", 14, 14, 2, 3, 2, 1, 4, 4, -6, 0, -3,
mfb(bp_torso), false,
{ARMORMOD_LIGHT, ARMORMOD_POCKETED, ARMORMOD_FURRED, ARMORMOD_PADDED,
ARMORMOD_PLATED}},
{"Mask", c_white, WOOD, MNULL, 4, 1, 2, 2, 2, 1, 2, 0, 2, 0, -2,
{"Mask", c_white, "wood", "null", 4, 1, 2, 2, 2, 1, 2, 0, 2, 0, -2,
mfb(bp_eyes)|mfb(bp_mouth), false,
{ARMORMOD_FURRED, ARMORMOD_FURRED, ARMORMOD_NULL, ARMORMOD_NULL,
ARMORMOD_NULL}},
// Name color Materials Vol Wgt Enc Cov Thk Env Wrm Sto Bsh Cut Hit
{"Helm", c_dkgray,SILVER, MNULL, 6, 6, 2, 3, 3, 0, 1, 0, 8, 0, -2,
{"Helm", c_dkgray, "silver", "null", 6, 6, 2, 3, 3, 0, 1, 0, 8, 0, -2,
mfb(bp_head), false,
{ARMORMOD_BULKY, ARMORMOD_FURRED, ARMORMOD_PADDED, ARMORMOD_PLATED,
ARMORMOD_NULL}},
{"Gloves", c_ltblue,LEATHER,MNULL, 2, 1, 1, 3, 3, 1, 2, 0, -4, 0, -2,
{"Gloves", c_ltblue,"leather","null", 2, 1, 1, 3, 3, 1, 2, 0, -4, 0, -2,
mfb(bp_hands), true,
{ARMORMOD_BULKY, ARMORMOD_FURRED, ARMORMOD_PADDED, ARMORMOD_PLATED,
ARMORMOD_NULL}},
// Name color Materials Vol Wgt Enc Cov Thk Env Wrm Sto Bsh Cut Hit
{"Boots", c_blue, LEATHER, MNULL, 6, 2, 1, 3, 3, 1, 3, 0, 4, 0, -1,
{"Boots", c_blue, "leather", "null", 6, 2, 1, 3, 3, 1, 3, 0, 4, 0, -1,
mfb(bp_feet), true,
{ARMORMOD_LIGHT, ARMORMOD_BULKY, ARMORMOD_PADDED, ARMORMOD_PLATED,
ARMORMOD_NULL}},
{"Ring", c_ltgreen, SILVER, MNULL, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
{"Ring", c_ltgreen, "silver", "null", 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, true,
{ARMORMOD_NULL, ARMORMOD_NULL, ARMORMOD_NULL, ARMORMOD_NULL, ARMORMOD_NULL}}
@@ -304,32 +304,32 @@ artifact_armor_form_datum artifact_armor_form_data[NUM_ARTARMFORMS] = {
artifact_armor_form_datum artifact_armor_mod_data[NUM_ARMORMODS] = {
{"", c_white, MNULL, MNULL, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, false,
{"", c_white, "null", "null", 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, false,
{ARMORMOD_NULL, ARMORMOD_NULL, ARMORMOD_NULL, ARMORMOD_NULL, ARMORMOD_NULL}},
// Description; "It is ..." or "They are ..."
{"very thin and light.", c_white, MNULL, MNULL,
{"very thin and light.", c_white, "null", "null",
// Vol Wgt Enc Cov Thk Env Wrm Sto
-4, -8, -2, -1, -1, -1, -1, 0, 0, 0, 0, 0, false,
{ARMORMOD_NULL, ARMORMOD_NULL, ARMORMOD_NULL, ARMORMOD_NULL, ARMORMOD_NULL}},
{"extremely bulky.", c_white, MNULL, MNULL,
{"extremely bulky.", c_white, "null", "null",
8, 10, 2, 1, 1, 0, 1, 0, 0, 0, 0, 0, false,
{ARMORMOD_NULL, ARMORMOD_NULL, ARMORMOD_NULL, ARMORMOD_NULL, ARMORMOD_NULL}},
{"covered in pockets.", c_white, MNULL, MNULL,
{"covered in pockets.", c_white, "null", "null",
1, 1, 1, 0, 0, 0, 0, 16, 0, 0, 0, 0, false,
{ARMORMOD_NULL, ARMORMOD_NULL, ARMORMOD_NULL, ARMORMOD_NULL, ARMORMOD_NULL}},
{"disgustingly furry.", c_white, WOOL, MNULL,
{"disgustingly furry.", c_white, "wool", "null",
// Vol Wgt Enc Dmg Cut Env Wrm Sto
4, 2, 1, 1, 1, 1, 3, 0, 0, 0, 0, 0, false,
{ARMORMOD_NULL, ARMORMOD_NULL, ARMORMOD_NULL, ARMORMOD_NULL, ARMORMOD_NULL}},
{"leather-padded.", c_white, LEATHER, MNULL,
{"leather-padded.", c_white, "leather", "null",
4, 4, 1, 1, 1, 0, 1, -3, 0, 0, 0, 0, false,
{ARMORMOD_NULL, ARMORMOD_NULL, ARMORMOD_NULL, ARMORMOD_NULL, ARMORMOD_NULL}},
{"plated in iron.", c_white, IRON, MNULL,
{"plated in iron.", c_white, "iron", "null",
4, 12, 3, 2, 2, 0, 1, -4, 0, 0, 0, 0, false,
{ARMORMOD_NULL, ARMORMOD_NULL, ARMORMOD_NULL, ARMORMOD_NULL, ARMORMOD_NULL}},
@@ -590,8 +590,10 @@ It may have unknown powers; use 'a' to activate them.";
art->effects_worn.push_back(passive_tmp);
}
art->id = itypes.size();
itypes[art->id]=art;
std::stringstream artid;
artid << "artifact" << artifact_itype_ids.size();
art->id = artid.str();
itypes[art->id] = art;
artifact_itype_ids.push_back(art->id);
return art;
}
@@ -612,8 +614,8 @@ itype* game::new_natural_artifact(artifact_natural_property prop)
art->sym = ':';
art->color = c_yellow;
art->m1 = STONE;
art->m2 = MNULL;
art->m1 = "stone";
art->m2 = "null";
art->volume = rng(shape_data->volume_min, shape_data->volume_max);
art->weight = rng(shape_data->weight_min, shape_data->weight_max);
art->melee_dam = 0;
@@ -704,9 +706,11 @@ itype* game::new_natural_artifact(artifact_natural_property prop)
art->charge_type = art_charge( rng(ARTC_NULL + 1, NUM_ARTCS - 1) );
}
art->id = itypes.size();
std::stringstream artid;
artid << "artifact" << artifact_itype_ids.size();
art->id = artid.str();
artifact_itype_ids.push_back(art->id);
itypes[art->id]=art;
itypes[art->id] = art;
return art;
}
+7 -7
View File
@@ -48,8 +48,8 @@ struct artifact_tool_form_datum
std::string name;
char sym;
nc_color color;
material m1;
material m2;
std::string m1;
std::string m2;
int volume_min, volume_max;
int weight_min, weight_max;
artifact_weapon_type base_weapon;
@@ -57,7 +57,7 @@ struct artifact_tool_form_datum
/*
artifact_tool_form_datum
(std::string Name, char Sym, nc_color Color, material M1, material M2,
(std::string Name, char Sym, nc_color Color, std::string M1, std::string M2,
int Volmin, int Volmax, int Wgtmin, int Wgtmax, artifact_weapon_type Base,
artifact_weapon_type extra[3])
: name (Name), sym (Sym), color (Color), m1 (M1), m2 (M2),
@@ -108,8 +108,8 @@ struct artifact_armor_form_datum
{
std::string name;
nc_color color;
material m1;
material m2;
std::string m1;
std::string m2;
int volume, weight;
int encumb;
int coverage;
@@ -125,7 +125,7 @@ struct artifact_armor_form_datum
/*
// Constructor
artifact_armor_form_datum
(std::string Name, nc_color Color, material M1, material M2, int Volume,
(std::string Name, nc_color Color, std::string M1, std::string M2, int Volume,
int Weight, int Encumb, int Dmg_res, int Cut_res, int Env_res,
int Warmth, int Storage, int Bash, int Cut, int Hit, unsigned char Covers,
bool Plural, artifact_armor_mod Mods[5])
@@ -154,7 +154,7 @@ enum artifact_armor_form
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 MNULL as its second material, and the mod has a
* 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];
+21 -1
View File
@@ -274,8 +274,16 @@ void player::activate_bionic(int b, game *g)
good.push_back("Alcohol");
if (has_disease(DI_CIG))
good.push_back("Nicotine");
if (has_disease(DI_METH))
good.push_back("Methamphetamines");
if (has_disease(DI_HIGH))
good.push_back("Intoxicant: Other");
if (has_disease(DI_HALLU) || has_disease(DI_VISUALS))
bad.push_back("Magic Mushroom");
if (has_disease(DI_IODINE))
good.push_back("Iodine");
if (has_disease(DI_TOOK_XANAX))
good.push_back("Xanax");
if (has_disease(DI_TOOK_PROZAC))
good.push_back("Prozac");
if (has_disease(DI_TOOK_FLUMED))
@@ -306,9 +314,16 @@ void player::activate_bionic(int b, game *g)
rem_disease(DI_DRUNK);
rem_disease(DI_CIG);
rem_disease(DI_HIGH);
rem_disease(DI_HALLU);
rem_disease(DI_VISUALS);
rem_disease(DI_IODINE);
rem_disease(DI_TOOK_XANAX);
rem_disease(DI_TOOK_PROZAC);
rem_disease(DI_TOOK_FLUMED);
rem_disease(DI_ADRENALINE);
rem_disease(DI_METH);
pkill = 0;
stim = 0;
} else if(bio.id == "bio_evap"){
if (query_yn("Drink directly? Otherwise you will need a container.")) {
tmp_item = item(g->itypes["water_clean"], 0);
@@ -440,7 +455,7 @@ void player::activate_bionic(int b, game *g)
}
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)){
if (g->m.i_at(i, j)[k].made_of("iron") || g->m.i_at(i, j)[k].made_of("steel")){
tmp_item = g->m.i_at(i, j)[k];
g->m.i_rem(i, j, k);
for (l = 0; l < traj.size(); l++) {
@@ -987,6 +1002,11 @@ the movements of creatures below the ground.");
bionics["bio_power_armor_interface"] = new bionic_data("Power Armor Interface", false, true, 1, 10, "\
Interfaces your power system with the internal charging port on suits of power armor.");
bionics["bio_power_armor_interface_mkII"] = new bionic_data("Power Armor Interface Mk. II", false, true, 1, 50, "\
Interfaces your power system with the internal charging port on suits of power armor.\n\
The Mk. II was designed by DoubleTech Inc., to meet the popularity of the Mk. II\n\
power armor series.");
//Fault Bionics from here on out.
bionics["bio_dis_shock"] = new bionic_data("Electrical Discharge", false, false, 0, 0, "\
A malfunctioning bionic which occasionally discharges electricity through\n\
+11 -3
View File
@@ -134,7 +134,6 @@ void mapgen_field(map *m, int turn)
for (int j = 0; j < SEEY * 2; j++)
{
m->ter_set(i, j, grass_or_dirt());
//------Jovan's-----
if (one_in(120))
{
if (one_in(30))
@@ -142,13 +141,17 @@ void mapgen_field(map *m, int turn)
m->ter_set(i, j, t_shrub_blueberry);
}
else
if (one_in(30))
{
m->ter_set(i, j, t_shrub_strawberry);
}
else
{
m->ter_set(i, j, t_shrub);
}
}
else
if (one_in(1000)) { m->ter_set(i,j, t_mutpoppy); }
//------------------
}
}
m->place_items(mi_field, 60, 0, 0, SEEX * 2 - 1, SEEY * 2 - 1, true, turn);
@@ -237,7 +240,7 @@ void mapgen_forest_general(map *m, oter_id terrain_type, mapgendata dat, int tur
if (one_in(250))
{
m->ter_set(i, j, t_tree_apple);
m->spawn_item(i, j, item_controller->find_template("apple"), turn);
m->spawn_item(i, j, "apple", turn);
}
else
{
@@ -363,6 +366,11 @@ void mapgen_forest_general(map *m, oter_id terrain_type, mapgendata dat, int tur
}
}
if (one_in(300)) { //rare, very bad day for low level characters
m->add_spawn(mon_jabberwock, 1, SEEX, SEEY);
}
if (one_in(100)) // One in 100 forests has a spider living in it :o
{
for (int i = 0; i < SEEX * 2; i++)
+2 -2
View File
@@ -1,3 +1,3 @@
#!/usr/bin/env sh
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
#!/bin/sh
DIR=`dirname "$0"`
cd $DIR && ./cataclysm
+6 -3
View File
@@ -1,9 +1,11 @@
#ifndef __CATACURSE__
#define __CATACURSE__
#if (defined _WIN32 || defined WINDOWS)
#define _WIN32_WINNT 0x0500
#define WIN32_LEAN_AND_MEAN
//#define VC_EXTRALEAN
#include <windows.h>
#include "windows.h"
#endif
#include <stdio.h>
typedef int chtype;
typedef unsigned short attr_t;
@@ -99,6 +101,7 @@ typedef struct {
#define KEY_BACKSPACE 0x107 /* Backspace */ //<---------not used
#define KEY_NPAGE 0x152 /* page down */
#define KEY_PPAGE 0x153 /* page up */
#define KEY_ENTER 0x157 /* enter */
/* Curses external declarations. */
@@ -127,6 +130,7 @@ 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);
@@ -152,10 +156,9 @@ void timeout(int delay);//PORTABILITY, DUMMY FUNCTION
void set_escdelay(int delay);//PORTABILITY, DUMMY FUNCTION
int echo(void);
int noecho(void);
//Window Functions, Do not call these outside of catacurse.cpp
//non-curses functions, Do not call these in the main game code
void WinDestroy();
bool WinCreate(bool initgl);
void CheckMessages();
int FindWin(WINDOW *wnd);
LRESULT CALLBACK ProcessMessages(HWND__ *hWnd,u_int32_t Msg,WPARAM wParam, LPARAM lParam);
#endif
+20
View File
@@ -987,6 +987,26 @@ SHORTLY. TO ENSURE YOUR SAFETY PLEASE FOLLOW THE BELOW STEPS. \n\
}
}
break;
case COMPACT_SRCF_ELEVATOR:
if (!g->u.has_amount("sarcophagus_access_code", 1)){
print_error("Access code required!");
query_any("Press any key to continue...");}
else{
g->u.use_amount("sarcophagus_access_code", 1);
reset_terminal();
print_line("\nPower: Backup Only\nRadion Level: Very Dangerous\nOperational: Overrided\n\n");
query_any("Press any key to continue...");
for (int x = 0; x < SEEX * MAPSIZE; x++) {
for (int y = 0; y < SEEY * MAPSIZE; y++) {
if (g->m.ter(x, y) == t_elevator_control_off) {
g->m.ter_set(x, y, t_elevator_control);
}
}
}
}
break;
} // switch (action)
}
+1
View File
@@ -47,6 +47,7 @@ enum computer_action
COMPACT_SRCF_3_MESS,
COMPACT_SRCF_SEAL_ORDER,
COMPACT_SRCF_SEAL,
COMPACT_SRCF_ELEVATOR,
NUM_COMPUTER_ACTIONS
};
+38 -43
View File
@@ -767,15 +767,9 @@ void game::place_construction(constructable *con)
}
}
}
mvprintz(0, 0, c_red, "Pick a direction in which to construct:");
int dirx, diry;
get_direction(this, dirx, diry, input());
if (dirx == -2) {
add_msg("Invalid direction.");
if (!choose_adjacent("Contruct", dirx, diry))
return;
}
dirx += u.posx;
diry += u.posy;
bool point_is_okay = false;
for (int i = 0; i < valid.size() && !point_is_okay; i++) {
if (valid[i].x == dirx && valid[i].y == diry)
@@ -963,7 +957,8 @@ bool construct::able_between_walls(game *g, point p)
(g->m.has_flag(supports_roof, p.x -1, p.y) && g->m.has_flag(supports_roof, p.x, p.y -1)) ||
(g->m.has_flag(supports_roof, p.x +1, p.y) && g->m.has_flag(supports_roof, p.x, p.y +1)) ||
(g->m.has_flag(supports_roof, p.x +1, p.y) && g->m.has_flag(supports_roof, p.x, p.y -1)) ||
(g->m.has_flag(supports_roof, p.x, p.y -1) && g->m.has_flag(supports_roof, p.x, p.y +1)));
(g->m.has_flag(supports_roof, p.x, p.y -1) && g->m.has_flag(supports_roof, p.x, p.y +1))) &&
(g->m.move_cost(p.x, p.y) != 0);
}
bool construct::able_deconstruct(game *g, point p)
@@ -973,7 +968,7 @@ bool construct::able_deconstruct(game *g, point p)
void construct::done_window_pane(game *g, point p)
{
g->m.spawn_item(g->u.posx, g->u.posy, item_controller->find_template("glass_sheet"), 0);
g->m.spawn_item(g->u.posx, g->u.posy, "glass_sheet", 0);
}
void construct::done_furniture(game *g, point p)
@@ -1026,7 +1021,7 @@ void construct::done_tree(game *g, point p)
void construct::done_log(game *g, point p)
{
g->m.spawn_item(p.x, p.y, item_controller->find_template("log"), int(g->turn), rng(5, 15));
g->m.spawn_item(p.x, p.y, "log", int(g->turn), rng(5, 15));
}
@@ -1068,35 +1063,35 @@ void construct::done_deconstruct(game *g, point p)
case t_makeshift_bed:
case t_bed:
case t_armchair:
g->m.spawn_item(p.x, p.y, item_controller->find_template("2x4"), 0, 9);
g->m.spawn_item(p.x, p.y, item_controller->find_template("rag"), 0, 9);
g->m.spawn_item(p.x, p.y, item_controller->find_template("nail"), 0, 0, rng(6,8));
g->m.spawn_item(p.x, p.y, "2x4", 0, 10);
g->m.spawn_item(p.x, p.y, "rag", 0, rng(10,15));
g->m.spawn_item(p.x, p.y, "nail", 0, 0, rng(6,8));
g->m.ter_set(p.x, p.y, t_floor);
break;
case t_door_c:
case t_door_o:
g->m.spawn_item(p.x, p.y, item_controller->find_template("2x4"), 0, 3);
g->m.spawn_item(p.x, p.y, item_controller->find_template("nail"), 0, 0, rng(6,12));
g->m.spawn_item(p.x, p.y, "2x4", 0, 4);
g->m.spawn_item(p.x, p.y, "nail", 0, 0, rng(6,12));
g->m.ter_set(p.x, p.y, t_door_frame);
break;
case t_window_domestic:
g->m.spawn_item(p.x, p.y, item_controller->find_template("stick"), 0);
g->m.spawn_item(p.x, p.y, item_controller->find_template("sheet"), 0, 1);
g->m.spawn_item(p.x, p.y, item_controller->find_template("glass_sheet"), 0);
g->m.spawn_item(p.x, p.y, item_controller->find_template("nail"), 0, 0, 3);
g->m.spawn_item(p.x, p.y, item_controller->find_template("string_36"), 0, 0, 1);
g->m.spawn_item(p.x, p.y, "stick", 0);
g->m.spawn_item(p.x, p.y, "sheet", 0, 2);
g->m.spawn_item(p.x, p.y, "glass_sheet", 0);
g->m.spawn_item(p.x, p.y, "nail", 0, 0, rng(3,4));
g->m.spawn_item(p.x, p.y, "string_36", 0, 0, 1);
g->m.ter_set(p.x, p.y, t_window_empty);
break;
case t_window:
g->m.spawn_item(p.x, p.y, item_controller->find_template("glass_sheet"), 0);
g->m.spawn_item(p.x, p.y, "glass_sheet", 0);
g->m.ter_set(p.x, p.y, t_window_empty);
break;
case t_backboard:
g->m.spawn_item(p.x, p.y, item_controller->find_template("2x4"), 0, 4);
g->m.spawn_item(p.x, p.y, item_controller->find_template("nail"), 0, 0, rng(6,10));
g->m.spawn_item(p.x, p.y, "2x4", 0, 4);
g->m.spawn_item(p.x, p.y, "nail", 0, 0, rng(6,10));
g->m.ter_set(p.x, p.y, t_pavement);
break;
@@ -1104,8 +1099,8 @@ void construct::done_deconstruct(game *g, point p)
case t_bench:
case t_crate_o:
case t_crate_c:
g->m.spawn_item(p.x, p.y, item_controller->find_template("2x4"), 0, 4);
g->m.spawn_item(p.x, p.y, item_controller->find_template("nail"), 0, 0, rng(6,10));
g->m.spawn_item(p.x, p.y, "2x4", 0, 4);
g->m.spawn_item(p.x, p.y, "nail", 0, 0, rng(6,10));
g->m.ter_set(p.x, p.y, t_floor);
break;
@@ -1113,58 +1108,58 @@ void construct::done_deconstruct(game *g, point p)
case t_cupboard:
case t_desk:
case t_bulletin:
g->m.spawn_item(p.x, p.y, item_controller->find_template("2x4"), 0, 4);
g->m.spawn_item(p.x, p.y, item_controller->find_template("nail"), 0, 0, rng(6,10));
g->m.spawn_item(p.x, p.y, "2x4", 0, 4);
g->m.spawn_item(p.x, p.y, "nail", 0, 0, rng(6,10));
g->m.ter_set(p.x, p.y, t_floor);
break;
case t_slide:
g->m.spawn_item(p.x, p.y, item_controller->find_template("sheet_metal"), 0);
g->m.spawn_item(p.x, p.y, item_controller->find_template("pipe"), 0, rng(4,8));
g->m.spawn_item(p.x, p.y, "sheet_metal", 0);
g->m.spawn_item(p.x, p.y, "pipe", 0, rng(4,8));
g->m.ter_set(p.x, p.y, t_grass);
break;
case t_locker:
g->m.spawn_item(p.x, p.y, item_controller->find_template("sheet_metal"), 0);
g->m.spawn_item(p.x, p.y, item_controller->find_template("pipe"), 0, rng(4,8));
g->m.spawn_item(p.x, p.y, "sheet_metal", 0, rng(1,2));
g->m.spawn_item(p.x, p.y, "pipe", 0, rng(4,8));
g->m.ter_set(p.x, p.y, t_floor);
break;
case t_rack:
g->m.spawn_item(p.x, p.y, item_controller->find_template("pipe"), 0, rng(6,12));
g->m.spawn_item(p.x, p.y, "pipe", 0, rng(6,12));
g->m.ter_set(p.x, p.y, t_floor);
break;
case t_monkey_bars:
g->m.spawn_item(p.x, p.y, item_controller->find_template("pipe"), 0, rng(6,12));
g->m.spawn_item(p.x, p.y, "pipe", 0, rng(6,12));
g->m.ter_set(p.x, p.y, t_grass);
break;
case t_fridge:
g->m.spawn_item(p.x, p.y, item_controller->find_template("scrap"), 0, rng(2,6));
g->m.spawn_item(p.x, p.y, item_controller->find_template("steel_chunk"), 0, rng(2,3));
g->m.spawn_item(p.x, p.y, item_controller->find_template("hose"), 0, 1);
g->m.spawn_item(p.x, p.y, "scrap", 0, rng(2,6));
g->m.spawn_item(p.x, p.y, "steel_chunk", 0, rng(2,3));
g->m.spawn_item(p.x, p.y, "hose", 0, 1);
g->m.ter_set(p.x, p.y, t_floor);
break;
case t_counter:
case t_dresser:
case t_table:
g->m.spawn_item(p.x, p.y, item_controller->find_template("2x4"), 0, 6);
g->m.spawn_item(p.x, p.y, item_controller->find_template("nail"), 0, 0, rng(6,8));
g->m.spawn_item(p.x, p.y, "2x4", 0, 6);
g->m.spawn_item(p.x, p.y, "nail", 0, 0, rng(6,8));
g->m.ter_set(p.x, p.y, t_floor);
break;
case t_pool_table:
g->m.spawn_item(p.x, p.y, item_controller->find_template("2x4"), 0, 4);
g->m.spawn_item(p.x, p.y, item_controller->find_template("rag"), 0, 4);
g->m.spawn_item(p.x, p.y, item_controller->find_template("nail"), 0, 0, rng(6,10));
g->m.spawn_item(p.x, p.y, "2x4", 0, 4);
g->m.spawn_item(p.x, p.y, "rag", 0, 4);
g->m.spawn_item(p.x, p.y, "nail", 0, 0, rng(6,10));
g->m.ter_set(p.x, p.y, t_floor);
break;
case t_bookcase:
g->m.spawn_item(p.x, p.y, item_controller->find_template("2x4"), 0, 12);
g->m.spawn_item(p.x, p.y, item_controller->find_template("nail"), 0, 0, rng(12,16));
g->m.spawn_item(p.x, p.y, "2x4", 0, 12);
g->m.spawn_item(p.x, p.y, "nail", 0, 0, rng(12,16));
g->m.ter_set(p.x, p.y, t_floor);
break;
}
+13 -12
View File
@@ -44,8 +44,8 @@ void game::init_recipes()
bool autolearn = curr.get("autolearn").as_bool();
// optional fields
bool reversible = curr.has("reversible") ? curr.get("reversible").as_bool() : false;
const char *skill1 = curr.has("skill_pri") ? curr.get("skill_pri").as_string().c_str() : NULL;
const char *skill2 = curr.has("skill_sec") ? curr.get("skill_sec").as_string().c_str() : NULL;
std::string skill1 = curr.has("skill_pri") ? curr.get("skill_pri").as_string() : "";
std::string skill2 = curr.has("skill_sec") ? curr.get("skill_sec").as_string() : "";
std::string id_suffix = curr.has("id_suffix") ? curr.get("id_suffix").as_string() : "";
int learn_by_disassembly = curr.has("decomp_learn") ? curr.get("decomp_learn").as_int() : -1;
@@ -1079,20 +1079,21 @@ void game::complete_craft()
{
newit.item_tags.insert("FIT");
}
int used_bday_tally = 0;
int used_bday_count = 0;
float used_age_tally = 0;
int used_age_count = 0;
for (std::list<item>::iterator iter = used.begin(); iter != used.end(); ++iter)
{
if (iter->goes_bad())
{
used_bday_tally += iter->bday;
++used_bday_count;
used_age_tally += ((int)turn - iter->bday)/
(float)(dynamic_cast<it_comest*>(iter->type)->spoils);
++used_age_count;
}
}
if (used_bday_count > 0)
if (used_age_count > 0 && newit.goes_bad())
{
const int average_used_bday = used_bday_tally / used_bday_count;
newit.bday = (average_used_bday + newit.bday) / 2;
const int average_used_age = (used_age_tally / used_age_count) * dynamic_cast<it_comest*>(newit.type)->spoils;
newit.bday = newit.bday - average_used_age;
}
// for food items
if (newit.is_food())
@@ -1127,7 +1128,7 @@ void game::complete_craft()
newit.tname().c_str());
m.add_item(u.posx, u.posy, newit);
} else {
u.i_add(newit);
newit = u.i_add(newit);
add_msg("%c - %s", newit.invlet, newit.tname().c_str());
}
}
@@ -1448,7 +1449,7 @@ void game::disassemble(char ch)
int req = cur_recipe->tools[j][0].count;
if (cur_recipe->tools[j][0].type == "welder")
{
add_msg("You need a hack saw to disassemble this.");
add_msg("You need a hacksaw to disassemble this.");
}
else
{
@@ -1564,7 +1565,7 @@ void game::complete_disassemble()
if (newit.count_by_charges())
{
if (dis->difficulty == 0 || comp_success)
m.spawn_item(u.posx, u.posy, item_controller->find_template(dis->components[j][0].type), 0, 0, compcount);
m.spawn_item(u.posx, u.posy, dis->components[j][0].type, 0, 0, compcount);
else
add_msg("You fail to recover a component.");
compcount = 0;
+4 -4
View File
@@ -49,14 +49,14 @@ struct recipe {
autolearn = false;
}
recipe(std::string pident, int pid, itype_id pres, craft_cat pcat, const char *p1,
const char *p2, int pdiff, int ptime, bool preversible, bool pautolearn,
recipe(std::string pident, int pid, itype_id pres, craft_cat pcat, std::string &p1,
std::string &p2, int pdiff, int ptime, bool preversible, bool pautolearn,
int plearn_dis) :
ident (pident), id (pid), result (pres), cat(pcat), difficulty (pdiff), time (ptime),
reversible (preversible), autolearn (pautolearn), learn_by_disassembly (plearn_dis)
{
sk_primary = p1?Skill::skill(p1):NULL;
sk_secondary = p2?Skill::skill(p2):NULL;
sk_primary = p1.size()?Skill::skill(p1):NULL;
sk_secondary = p2.size()?Skill::skill(p2):NULL;
}
};
+1 -1
View File
@@ -1,7 +1,7 @@
#ifndef _CURSES_DEF_H_
#define _CURSES_DEF_H_
#if (defined _WIN32 || defined WINDOWS)
#if (defined TILES || defined _WIN32 || defined WINDOWS)
#include "catacurse.h"
#elif (defined __CYGWIN__)
#include "ncurses/curses.h"
+3 -3
View File
@@ -1,3 +1,3 @@
Terminus
8
16
fixedsys
8
16
+66 -5
View File
@@ -4,19 +4,27 @@ Changelog will be a little light for the early entries due to me being really ba
Highlights:
---
* Some work to make vehicle collisions sane.
* 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.
* Leather repair/reinforcement actually possible!
* 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 missions, for those who play with the shelter NPC turned on.
* 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:
@@ -45,7 +53,7 @@ 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 (but it does make it slightly less rotten).
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.
@@ -112,6 +120,59 @@ 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.
======
Binary file not shown.
+116 -160
View File
@@ -7,7 +7,7 @@
"symbol" : "=",
"color" : "magenta",
"description" : "A set of universal batteries. Used to charge almost any electronic device.",
"material" : "IRON",
"material" : "iron",
"volume" : 1,
"weight" : 1,
"bashing" : 1,
@@ -29,7 +29,7 @@
"symbol" : "=",
"color" : "magenta",
"description" : "A small quantity of thread that could be used to refill a sewing kit.",
"material" : "COTTON",
"material" : "cotton",
"volume" : 1,
"weight" : 1,
"bashing" : 1,
@@ -51,7 +51,7 @@
"symbol" : "=",
"color" : "red",
"description" : "A tough sinew cut from a corpse, useable as thread.",
"material" : "FLESH",
"material" : "flesh",
"volume" : 1,
"weight" : 1,
"bashing" : 1,
@@ -73,7 +73,7 @@
"symbol" : "=",
"color" : "green",
"description" : "Tough thin fibres, taken from a plant. Can be used as thread.",
"material" : "VEGGY",
"material" : "veggy",
"volume" : 1,
"weight" : 1,
"bashing" : 1,
@@ -95,7 +95,7 @@
"symbol" : "=",
"color" : "light_gray",
"description" : "A roll of incredibly strong tape. Its uses are innumerable.",
"material" : "PLASTIC",
"material" : "plastic",
"volume" : 2,
"weight" : 2,
"bashing" : 1,
@@ -117,7 +117,7 @@
"symbol" : "=",
"color" : "light_gray",
"description" : "Plastic jacketed copper cable of the type used in small electronics.",
"material" : "PLASTIC",
"material" : "plastic",
"volume" : 2,
"weight" : 2,
"bashing" : 1,
@@ -139,7 +139,7 @@
"symbol" : "=",
"color" : "light_green",
"description" : "A nuclear-powered battery. Used to charge advanced and rare electronics.",
"material" : "STEEL",
"material" : "steel",
"volume" : 1,
"weight" : 1,
"bashing" : 1,
@@ -161,7 +161,7 @@
"symbol" : "=",
"color" : "cyan",
"description" : "A box of nails, mainly useful with a hammer.",
"material" : "IRON",
"material" : "iron",
"volume" : 1,
"weight" : 8,
"bashing" : 1,
@@ -183,7 +183,7 @@
"symbol" : "=",
"color" : "light_gray",
"description" : "A handful of pebbles, useful as ammunition for slings.",
"material" : "STONE",
"material" : "stone",
"volume" : 1,
"weight" : 1,
"bashing" : 1,
@@ -205,7 +205,7 @@
"symbol" : "=",
"color" : "light_gray",
"description" : "A box of ball bearings, useful as ammunition for slings.",
"material" : "STONE",
"material" : "stone",
"volume" : 1,
"weight" : 2,
"bashing" : 1,
@@ -227,7 +227,7 @@
"symbol" : "=",
"color" : "pink",
"description" : "A box of small steel balls. They deal virtually no damage.",
"material" : "STEEL",
"material" : "steel",
"volume" : 1,
"weight" : 6,
"bashing" : 1,
@@ -241,93 +241,27 @@
"recoil" : 0,
"count" : 200
},
{ "type" : "AMMO",
"id" : "arrow_wood",
"rarity" : 7,
"price" : 100,
"name" : "wood arrow",
{ "type" : "AMMO",
"id" : "feather",
"rarity" : 50,
"price" : 30,
"name" : "feather",
"symbol" : "=",
"color" : "green",
"description" : "A sharpened arrow carved from wood. It's light-weight, does little damage, and is so-so on accuracy. Stands a good chance of remaining intact once fired.",
"material" : "WOOD",
"volume" : 2,
"weight" : 60,
"bashing" : 1,
"cutting" : 0,
"to_hit" : 0,
"ammo_type" : "arrow",
"damage" : 8,
"pierce" : 1,
"range" : 0,
"accuracy" : 18,
"recoil" : 0,
"count" : 10
},
{ "type" : "AMMO",
"id" : "arrow_cf",
"rarity" : 5,
"price" : 300,
"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" : 30,
"bashing" : 1,
"cutting" : 0,
"to_hit" : 0,
"ammo_type" : "arrow",
"damage" : 12,
"pierce" : 2,
"range" : 5,
"accuracy" : 14,
"recoil" : 0,
"count" : 8
},
{ "type" : "AMMO",
"id" : "bolt_wood",
"rarity" : 8,
"price" : 100,
"name" : "wood crossbow bolt",
"symbol" : "=",
"color" : "green",
"description" : "A sharpened bolt carved from wood. It's lighter than a steel bolt, but does less damage and is less accurate. Stands a good chance of remaining intact once fired.",
"material" : "WOOD",
"color" : "white",
"description" : "Feathers from a bird. Useful for fletching arrows",
"material" : "cotton",
"volume" : 1,
"weight" : 40,
"bashing" : 1,
"weight" : 0,
"bashing" : 0,
"cutting" : 0,
"to_hit" : 0,
"ammo_type" : "bolt",
"damage" : 10,
"pierce" : 1,
"ammo_type" : "none",
"damage" : 0,
"pierce" : 0,
"range" : 0,
"accuracy" : 16,
"accuracy" : 0,
"recoil" : 0,
"count" : 15
},
{ "type" : "AMMO",
"id" : "bolt_steel",
"rarity" : 7,
"price" : 400,
"name" : "steel crossbow bolt",
"symbol" : "=",
"color" : "green",
"description" : "A sharp bolt made from steel. Deadly in skilled hands. Stands an excellent chance of remaining intact once fired.",
"material" : "STEEL",
"volume" : 1,
"weight" : 90,
"bashing" : 1,
"cutting" : 0,
"to_hit" : 0,
"ammo_type" : "bolt",
"damage" : 20,
"pierce" : 3,
"range" : 4,
"accuracy" : 12,
"recoil" : 0,
"count" : 10
"count" : 20
},
{ "type" : "AMMO",
"id" : "shot_bird",
@@ -337,7 +271,7 @@
"symbol" : "=",
"color" : "red",
"description" : "Weak shotgun ammunition. Designed for hunting birds and other small game, its applications in combat are very limited.",
"material" : "PLASTIC",
"material" : "plastic",
"volume" : 2,
"weight" : 25,
"bashing" : 1,
@@ -360,7 +294,7 @@
"symbol" : "=",
"color" : "red",
"description" : "A shell filled with iron pellets. Extremely damaging, plus the spread makes it very accurate at short range. Favored by SWAT forces.",
"material" : "PLASTIC",
"material" : "plastic",
"volume" : 2,
"weight" : 28,
"bashing" : 1,
@@ -383,7 +317,7 @@
"symbol" : "=",
"color" : "red",
"description" : "A heavy metal slug used with shotguns to give them the range capabilities of a rifle. Extremely damaging but rather innaccurate. Works best in a shotgun with a rifled barrel.",
"material" : "PLASTIC",
"material" : "plastic",
"volume" : 2,
"weight" : 34,
"bashing" : 1,
@@ -406,7 +340,7 @@
"symbol" : "=",
"color" : "red",
"description" : "A shotgun slug loaded with concussive explosives. While the slug itself will not do much damage to its target, it will explode on contact.",
"material" : "PLASTIC",
"material" : "plastic",
"volume" : 2,
"weight" : 30,
"bashing" : 1,
@@ -429,7 +363,7 @@
"symbol" : "=",
"color" : "light_blue",
"description" : "One of the smallest calibers available, the .22 Long Rifle cartridge has maintained popularity for nearly two centuries. Its minimal recoil, low cost and low noise are offset by its paltry damage.",
"material" : "STEEL",
"material" : "steel",
"volume" : 2,
"weight" : 2,
"bashing" : 1,
@@ -452,7 +386,7 @@
"symbol" : "=",
"color" : "light_blue",
"description" : "Conical Ball .22 is a variety of .22 ammunition with a very small propellant charge, generally with no gunpowder, resulting in a subsonic round. It is nearly silent, but is so weak as to be nearly useless.",
"material" : "STEEL",
"material" : "steel",
"volume" : 2,
"weight" : 2,
"bashing" : 1,
@@ -475,7 +409,7 @@
"symbol" : "=",
"color" : "light_blue",
"description" : "Rat-shot is extremely weak ammunition, designed for killing rats, snakes, or other small vermin while being unable to damage walls. It has an extremely short range and is unable to injure all but the smallest creatures.",
"material" : "STEEL",
"material" : "steel",
"volume" : 2,
"weight" : 2,
"bashing" : 1,
@@ -498,7 +432,7 @@
"symbol" : "=",
"color" : "light_blue",
"description" : "9 millimeter parabellum is generally regarded as the most popular handgun cartridge, used by the majority of US police forces. It is also a very popular round in sub-machine guns.",
"material" : "STEEL",
"material" : "steel",
"volume" : 2,
"weight" : 7,
"bashing" : 1,
@@ -521,7 +455,7 @@
"symbol" : "=",
"color" : "light_blue",
"description" : "Attempts to improve the ballistics of 9mm ammunition lead to high-pressure rounds. Increased velocity resullts in superior accuracy and damage.",
"material" : "STEEL",
"material" : "steel",
"volume" : 1,
"weight" : 7,
"bashing" : 1,
@@ -544,7 +478,7 @@
"symbol" : "=",
"color" : "light_blue",
"description" : "A step beyond the high-pressure 9mm +P round, the +P+ has an even higher internal pressure that offers a degree of armor-penetrating ability.",
"material" : "STEEL",
"material" : "steel",
"volume" : 1,
"weight" : 7,
"bashing" : 1,
@@ -567,7 +501,7 @@
"symbol" : "=",
"color" : "light_blue",
"description" : "This small caliber pistol round offers quite good armor penetration at the cost of slightly less damage. It is rarely used outside of the Chinese army.",
"material" : "STEEL",
"material" : "steel",
"volume" : 2,
"weight" : 7,
"bashing" : 1,
@@ -590,7 +524,7 @@
"symbol" : "=",
"color" : "light_blue",
"description" : "The .38 Smith & Wesson Special enjoyed popularity among US police forces throughout the 20th century. It is most commonly used in revolvers.",
"material" : "STEEL",
"material" : "steel",
"volume" : 2,
"weight" : 10,
"bashing" : 1,
@@ -613,7 +547,7 @@
"symbol" : "=",
"color" : "light_blue",
"description" : "The .38 Super is a high-pressure load of the .38 Special caliber. It is a popular choice in pistol competions for its high accuracy, while its stopping power keeps it popular for self-defense.",
"material" : "STEEL",
"material" : "steel",
"volume" : 1,
"weight" : 9,
"bashing" : 1,
@@ -636,7 +570,7 @@
"symbol" : "=",
"color" : "blue",
"description" : "Originally used by the FBI, the organization eventually abandoned the round due to its high recoil. Although respected for its versatility and power, it has largely been supplanted by the downgraded .40 S&W.",
"material" : "STEEL",
"material" : "steel",
"volume" : 2,
"weight" : 9,
"bashing" : 1,
@@ -659,7 +593,7 @@
"symbol" : "=",
"color" : "blue",
"description" : "The .40 Smith & Wesson round was developed as an alternative to 10mm Auto for the FBI after they complained of high recoil. It is as accurate as 9mm, but has greater stopping power, leading to widespread use in law enforcement.",
"material" : "STEEL",
"material" : "steel",
"volume" : 2,
"weight" : 9,
"bashing" : 1,
@@ -682,7 +616,7 @@
"symbol" : "=",
"color" : "blue",
"description" : "Described (in 1971) by Dirty Harry as \"the most powerful handgun in the world,\" the .44 Magnum gained widespead popularity due to its depictions in the media. In reality, its intense recoil makes it unsuitable in most cases.",
"material" : "STEEL",
"material" : "steel",
"volume" : 2,
"weight" : 15,
"bashing" : 1,
@@ -705,7 +639,7 @@
"symbol" : "=",
"color" : "blue",
"description" : "The .45 round was one of the most popular and powerful handgun rounds through the 20th century. It features very good accuracy and stopping power, but suffers from moderate recoil and poor armor penetration.",
"material" : "STEEL",
"material" : "steel",
"volume" : 2,
"weight" : 10,
"bashing" : 1,
@@ -728,7 +662,7 @@
"symbol" : "=",
"color" : "blue",
"description" : "Full Metal Jacket .45 rounds are designed to overcome the poor armor penetration of the standard ACP round. However, they are less likely to expand upon impact, resulting in reduced damage overall.",
"material" : "STEEL",
"material" : "steel",
"volume" : 1,
"weight" : 13,
"bashing" : 1,
@@ -751,7 +685,7 @@
"symbol" : "=",
"color" : "blue",
"description" : "The .45 Super round is an updated variant of .45 ACP. It is overloaded, resulting in a great increase in muzzle velocity. This translates to higher accuracy and range, a minor armor piercing capability, and greater recoil.",
"material" : "STEEL",
"material" : "steel",
"volume" : 1,
"weight" : 11,
"bashing" : 1,
@@ -774,7 +708,7 @@
"symbol" : "=",
"color" : "dark_gray",
"description" : "The 5.7x28mm round is a proprietary round developed by FN Hestal for use in their P90 SMG. While it is a very small round, comparable in power to .22, it features incredible armor-piercing capabilities and very low recoil.",
"material" : "STEEL",
"material" : "steel",
"volume" : 3,
"weight" : 2,
"bashing" : 1,
@@ -797,7 +731,7 @@
"symbol" : "=",
"color" : "dark_gray",
"description" : "Designed by Heckler & Koch to compete with the 5.7x28mm round, 4.6x30mm is, like the 5.7, designed to minimize weight and recoil while increasing penetration of body armor. Its low recoil makes it ideal for automatic fire.",
"material" : "STEEL",
"material" : "steel",
"volume" : 3,
"weight" : 1,
"bashing" : 1,
@@ -820,7 +754,7 @@
"symbol" : "=",
"color" : "dark_gray",
"description" : "Designed during World War II by the Soviet Union, the popularity of the AK-47 and the SKS contributed to the widespread adaption of the 7.62x39mm rifle round. However, due to its lack of yaw, this round deals less damage than most.",
"material" : "STEEL",
"material" : "steel",
"volume" : 3,
"weight" : 7,
"bashing" : 1,
@@ -843,7 +777,7 @@
"symbol" : "=",
"color" : "dark_gray",
"description" : "The M67 variant of the popular 7.62x39mm rifle round was designed to improve yaw. This causes the round to tumble inside a target, causing significantly more damage. It is still outdone by shattering rounds.",
"material" : "STEEL",
"material" : "steel",
"volume" : 3,
"weight" : 8,
"bashing" : 1,
@@ -866,7 +800,7 @@
"symbol" : "=",
"color" : "dark_gray",
"description" : "The .223 rifle round is a civilian variant of the 5.56 NATO round. It is designed to tumble or fragment inside a target, dealing devastating damage. The lower pressure of the .223 compared to the 5.56 results in lower accuracy.",
"material" : "STEEL",
"material" : "steel",
"volume" : 2,
"weight" : 2,
"bashing" : 1,
@@ -889,7 +823,7 @@
"symbol" : "=",
"color" : "dark_gray",
"description" : "This rifle round has enjoyed widespread use in NATO countries, thanks to its very light weight and high damage. It is designed to shatter inside a target, inflicting massive damage.",
"material" : "STEEL",
"material" : "steel",
"volume" : 2,
"weight" : 4,
"bashing" : 1,
@@ -912,7 +846,7 @@
"symbol" : "=",
"color" : "dark_gray",
"description" : "A variant of the widely-used 5.56 NATO round, incendiary rounds are designed to burn hotly upon impact, piercing armor and igniting flammable substances.",
"material" : "STEEL",
"material" : "steel",
"volume" : 2,
"weight" : 4,
"bashing" : 1,
@@ -935,7 +869,7 @@
"symbol" : "=",
"color" : "dark_gray",
"description" : "Based off the military .30-03 round, the .270 rifle round is compatible with most guns that fire .30-06 rounds. However, it is designed for hunting, and is less powerful than the military rounds, with nearly no armor penetration.",
"material" : "STEEL",
"material" : "steel",
"volume" : 1,
"weight" : 7,
"bashing" : 1,
@@ -958,7 +892,7 @@
"symbol" : "=",
"color" : "dark_gray",
"description" : "The .30-06 is a very powerful rifle round designed for long-range use. Its stupendous accuracy and armor piercing capabilities make it one of the most deadly rounds available, offset only by its drastic recoil and noise.",
"material" : "STEEL",
"material" : "steel",
"volume" : 1,
"weight" : 12,
"bashing" : 1,
@@ -981,7 +915,7 @@
"symbol" : "=",
"color" : "dark_gray",
"description" : "A variant of the powerful .30-06 sniper round, incendiary rounds are designed to burn hotly upon impact, piercing armor and igniting flammable substances.",
"material" : "STEEL",
"material" : "steel",
"volume" : 1,
"weight" : 12,
"bashing" : 1,
@@ -1004,7 +938,7 @@
"symbol" : "=",
"color" : "dark_gray",
"description" : "The .308 Winchester is a rifle round, the commercial equivalent of the military 7.62x51mm round. Its high accuracy and phenominal damage have made it the most poplar hunting round in the world.",
"material" : "STEEL",
"material" : "steel",
"volume" : 1,
"weight" : 9,
"bashing" : 1,
@@ -1027,7 +961,7 @@
"symbol" : "=",
"color" : "dark_gray",
"description" : "The 7.62x51mm largely replaced the .30-06 round as the standard military rifle round. It is lighter, but offers similar velocities, resulting in greater accuracy and reduced recoil.",
"material" : "STEEL",
"material" : "steel",
"volume" : 1,
"weight" : 9,
"bashing" : 1,
@@ -1050,7 +984,7 @@
"symbol" : "=",
"color" : "dark_gray",
"description" : "A variant of the powerful 7.62x51mm round, incendiary rounds are designed to burn hotly upon impact, piercing armor and igniting flammable substances.",
"material" : "STEEL",
"material" : "steel",
"volume" : 1,
"weight" : 9,
"bashing" : 1,
@@ -1073,7 +1007,7 @@
"symbol" : "=",
"color" : "light_green",
"description" : "In the middle of the 21st Century, military powers began to look towards energy based weapons. The result was the standard fusion pack, capable of delivering bolts of superheated gas at near light speed with no recoil.",
"material" : "PLASTIC",
"material" : "plastic",
"volume" : 1,
"weight" : 2,
"bashing" : 1,
@@ -1096,7 +1030,7 @@
"symbol" : "=",
"color" : "light_red",
"description" : "A 40mm grenade with a concussive explosion.",
"material" : "STEEL",
"material" : "steel",
"volume" : 1,
"weight" : 200,
"bashing" : 1,
@@ -1119,7 +1053,7 @@
"symbol" : "=",
"color" : "light_red",
"description" : "A 40mm grenade with a small explosion and a high number of damaging fragments.",
"material" : "STEEL",
"material" : "steel",
"volume" : 1,
"weight" : 220,
"bashing" : 1,
@@ -1142,7 +1076,7 @@
"symbol" : "=",
"color" : "light_red",
"description" : "A 40mm grenade with a small napalm load, designed to create a burst of flame.",
"material" : "STEEL",
"material" : "steel",
"volume" : 1,
"weight" : 200,
"bashing" : 1,
@@ -1165,7 +1099,7 @@
"symbol" : "=",
"color" : "light_red",
"description" : "A 40mm grenade with a teargas load. It will burst in a cloud of highly incapacitating gas.",
"material" : "STEEL",
"material" : "steel",
"volume" : 1,
"weight" : 210,
"bashing" : 1,
@@ -1188,7 +1122,7 @@
"symbol" : "=",
"color" : "light_red",
"description" : "A 40mm grenade with a smoke load. It will burst in a cloud of harmless gas, and will also leave a streak of smoke cover in its wake.",
"material" : "STEEL",
"material" : "steel",
"volume" : 1,
"weight" : 210,
"bashing" : 1,
@@ -1211,7 +1145,7 @@
"symbol" : "=",
"color" : "light_red",
"description" : "A 40mm grenade with a flashbang load. It will detonate with a blast of light and sound, designed to blind, deafen, and disorient anyone nearby.",
"material" : "STEEL",
"material" : "steel",
"volume" : 1,
"weight" : 210,
"bashing" : 1,
@@ -1234,7 +1168,7 @@
"symbol" : "=",
"color" : "light_red",
"description" : "A 40mm grenade with an acid bomb load.",
"material" : "STEEL",
"material" : "steel",
"volume" : 1,
"weight" : 200,
"bashing" : 1,
@@ -1257,7 +1191,7 @@
"symbol" : "=",
"color" : "red",
"description" : "A 60mm High Explosive Anti Tank round. They can blow through up to two feet of concrete.",
"material" : "STEEL",
"material" : "steel",
"volume" : 1,
"weight" : 1,
"bashing" : 1,
@@ -1280,7 +1214,7 @@
"symbol" : "=",
"color" : "red",
"description" : "The Heckler & Koch 12mm projectiles are used in H&K railguns. It's made of a ferromagnetic metal, probably cobalt.",
"material" : "STEEL",
"material" : "steel",
"volume" : 1,
"weight" : 10,
"bashing" : 1,
@@ -1303,7 +1237,7 @@
"symbol" : "=",
"color" : "green",
"description" : "A canister of hydrogen. With proper equipment, it could be heated to plasma.",
"material" : "STEEL",
"material" : "steel",
"volume" : 10,
"weight" : 25,
"bashing" : 1,
@@ -1326,7 +1260,7 @@
"symbol" : "=",
"color" : "red",
"description" : "A weak plasma charge.",
"material" : "NULL",
"material" : "null",
"volume" : 0,
"weight" : 0,
"bashing" : 1,
@@ -1348,7 +1282,7 @@
"symbol" : "=",
"color" : "red",
"description" : "An empty hull from a shotgun round.",
"material" : "PLASTIC",
"material" : "plastic",
"volume" : 0,
"weight" : 0,
"bashing" : 1,
@@ -1370,7 +1304,7 @@
"symbol" : "=",
"color" : "light_blue",
"description" : "An empty casing from a 9mm round.",
"material" : "STEEL",
"material" : "steel",
"volume" : 0,
"weight" : 0,
"bashing" : 1,
@@ -1392,7 +1326,7 @@
"symbol" : "=",
"color" : "light_blue",
"description" : "An empty casing from a .22 round.",
"material" : "STEEL",
"material" : "steel",
"volume" : 0,
"weight" : 0,
"bashing" : 1,
@@ -1414,7 +1348,7 @@
"symbol" : "=",
"color" : "light_blue",
"description" : "An empty casing from a .38 round.",
"material" : "STEEL",
"material" : "steel",
"volume" : 0,
"weight" : 0,
"bashing" : 1,
@@ -1436,7 +1370,7 @@
"symbol" : "=",
"color" : "blue",
"description" : "An empty casing from a .40 round.",
"material" : "STEEL",
"material" : "steel",
"volume" : 0,
"weight" : 0,
"bashing" : 1,
@@ -1458,7 +1392,7 @@
"symbol" : "=",
"color" : "blue",
"description" : "An empty casing from a .44 round.",
"material" : "STEEL",
"material" : "steel",
"volume" : 0,
"weight" : 0,
"bashing" : 1,
@@ -1480,7 +1414,7 @@
"symbol" : "=",
"color" : "blue",
"description" : "An empty casing from a .45 round.",
"material" : "STEEL",
"material" : "steel",
"volume" : 0,
"weight" : 0,
"bashing" : 1,
@@ -1502,7 +1436,7 @@
"symbol" : "=",
"color" : "dark_gray",
"description" : "An empty casing from a 5.7x28mm round.",
"material" : "STEEL",
"material" : "steel",
"volume" : 0,
"weight" : 0,
"bashing" : 1,
@@ -1524,7 +1458,7 @@
"symbol" : "=",
"color" : "dark_gray",
"description" : "An empty casing from a 4.6x30mm round.",
"material" : "STEEL",
"material" : "steel",
"volume" : 0,
"weight" : 0,
"bashing" : 1,
@@ -1546,7 +1480,7 @@
"symbol" : "=",
"color" : "dark_gray",
"description" : "An empty casing from a 7.62x39mm round.",
"material" : "STEEL",
"material" : "steel",
"volume" : 0,
"weight" : 0,
"bashing" : 1,
@@ -1568,7 +1502,7 @@
"symbol" : "=",
"color" : "dark_gray",
"description" : "An empty casing from a .223 round.",
"material" : "STEEL",
"material" : "steel",
"volume" : 0,
"weight" : 0,
"bashing" : 1,
@@ -1590,7 +1524,7 @@
"symbol" : "=",
"color" : "dark_gray",
"description" : "An empty casing from a .30-06 round.",
"material" : "STEEL",
"material" : "steel",
"volume" : 0,
"weight" : 0,
"bashing" : 1,
@@ -1612,7 +1546,7 @@
"symbol" : "=",
"color" : "dark_gray",
"description" : "An empty casing from a .308 round.",
"material" : "STEEL",
"material" : "steel",
"volume" : 0,
"weight" : 0,
"bashing" : 1,
@@ -1634,7 +1568,7 @@
"symbol" : "=",
"color" : "dark_gray",
"description" : "A large canister from a spent 40mm grenade.",
"material" : "STEEL",
"material" : "steel",
"volume" : 0,
"weight" : 0,
"bashing" : 1,
@@ -1656,7 +1590,7 @@
"symbol" : "=",
"color" : "dark_gray",
"description" : "Firearm quality gunpowder.",
"material" : "POWDER",
"material" : "powder",
"volume" : 0,
"weight" : 0,
"bashing" : 1,
@@ -1679,7 +1613,7 @@
"symbol" : "=",
"color" : "dark_gray",
"description" : "Primer from a shotgun round.",
"material" : "STEEL",
"material" : "steel",
"volume" : 0,
"weight" : 0,
"bashing" : 1,
@@ -1702,7 +1636,7 @@
"symbol" : "=",
"color" : "dark_gray",
"description" : "Primer from a small caliber round.",
"material" : "STEEL",
"material" : "steel",
"volume" : 0,
"weight" : 0,
"bashing" : 1,
@@ -1725,7 +1659,7 @@
"symbol" : "=",
"color" : "dark_gray",
"description" : "Primer from a large caliber pistol round.",
"material" : "STEEL",
"material" : "steel",
"volume" : 0,
"weight" : 0,
"bashing" : 1,
@@ -1748,7 +1682,7 @@
"symbol" : "=",
"color" : "dark_gray",
"description" : "Primer from a small caliber rifle round.",
"material" : "STEEL",
"material" : "steel",
"volume" : 0,
"weight" : 0,
"bashing" : 1,
@@ -1771,7 +1705,7 @@
"symbol" : "=",
"color" : "dark_gray",
"description" : "Primer from a large caliber rifle round.",
"material" : "STEEL",
"material" : "steel",
"volume" : 0,
"weight" : 0,
"bashing" : 1,
@@ -1794,7 +1728,7 @@
"symbol" : "=",
"color" : "dark_gray",
"description" : "Assorted bullet materials, useful in constructing a variety of ammunition.",
"material" : "STEEL",
"material" : "steel",
"volume" : 0,
"weight" : 0,
"bashing" : 1,
@@ -1816,7 +1750,7 @@
"symbol" : "=",
"color" : "dark_gray",
"description" : "Material from an incendiary round, useful in constructing incendiary ammunition.",
"material" : "STEEL",
"material" : "steel",
"volume" : 0,
"weight" : 0,
"bashing" : 1,
@@ -1839,7 +1773,7 @@
"symbol" : "=",
"color" : "light_red",
"description" : "Gasoline is a highly flammable liquid. When under pressure, it has the potential for violent explosion.",
"material" : "STEEL",
"material" : "steel",
"volume" : 0,
"weight" : 0,
"phase" : "liquid",
@@ -1855,5 +1789,27 @@
"count" : 200,
"effects" : ["FLAME","STREAM"],
"phase": "liquid"
}
},
{ "type" : "AMMO",
"id" : "medical_tape",
"rarity" : 45,
"price" : 20,
"name" : "medical tape",
"symbol" : "=",
"color" : "white",
"description" : "A roll of medical tape, similar to duct tape.",
"material" : "plastic",
"volume" : 0,
"weight" : 0,
"bashing" : 0,
"cutting" : 0,
"to_hit" : 0,
"ammo_type" : "none",
"damage" : 0,
"pierce" : 0,
"range" : 0,
"accuracy" : 0,
"recoil" : 0,
"count" : 35
}
]
+805
View File
@@ -0,0 +1,805 @@
[
{
"type" : "AMMO",
"id" : "arrowhead",
"rarity" : 0,
"price" : 30,
"name" : "arrowhead",
"symbol" : "=",
"color" : "light_gray",
"description" : "Heads for an arrow. Placing these on an arrow will make the arrow more damaging and piercing.",
"material" : "steel",
"volume" : 1,
"weight" : 1,
"bashing" : 1,
"cutting" : 0,
"to_hit" : 0,
"ammo_type" : "none",
"damage" : 0,
"pierce" : 0,
"range" : 0,
"accuracy" : 0,
"recoil" : 0,
"count" : 10
},
{
"type" : "AMMO",
"id" : "fletching",
"rarity" : 0,
"price" : 30,
"name" : "fletching",
"symbol" : "=",
"color" : "white",
"description" : "Also known as a flight, this item provides aerodynamic stabilization of arrows.",
"material" : "leather",
"volume" : 1,
"weight" : 1,
"bashing" : 1,
"cutting" : 0,
"to_hit" : 0,
"ammo_type" : "none",
"damage" : 0,
"pierce" : 0,
"range" : 0,
"accuracy" : 0,
"recoil" : 0,
"count" : 10
},
{
"type" : "AMMO",
"id" : "shaft_wood",
"rarity" : 0,
"price" : 20,
"name" : "wood arrow shaft",
"symbol" : "=",
"color" : "green",
"description" : "A crude shaft made from wood. It needs arrowheads and fletching to become a functional arrow. You can, however, fire it from a bow.",
"material" : "wood",
"volume" : 1,
"weight" : 12,
"bashing" : 1,
"cutting" : 0,
"to_hit" : 0,
"ammo_type" : "arrow",
"damage" : 0,
"pierce" : 0,
"range" : 0,
"accuracy" : 40,
"recoil" : 0,
"count" : 10
},
{
"type" : "AMMO",
"id" : "shaft_wood_heavy",
"rarity" : 0,
"price" : 20,
"name" : "heavy wood arrow shaft",
"symbol" : "=",
"color" : "green",
"description" : "A heavy shaft made from wood. It needs arrowheads and fletching to become a functional arrow. You can, however, fire it from a bow.",
"material" : "wood",
"volume" : 1,
"weight" : 14,
"bashing" : 2,
"cutting" : 0,
"to_hit" : 0,
"ammo_type" : "arrow",
"damage" : 2,
"pierce" : 0,
"range" : 1,
"accuracy" : 35,
"recoil" : 0,
"count" : 10
},
{
"type" : "AMMO",
"id" : "shaft_metal",
"rarity" : 0,
"price" : 20,
"name" : "metal arrow shaft",
"symbol" : "=",
"color" : "green",
"description" : "A heavy shaft made from scrap metal. It needs arrowheads and fletching to become a functional arrow. You can, however, fire it from a bow.",
"material" : "steel",
"volume" : 1,
"weight" : 19,
"bashing" : 3,
"cutting" : 0,
"to_hit" : 0,
"ammo_type" : "arrow",
"damage" : 3,
"pierce" : 0,
"range" : 3,
"accuracy" : 30,
"recoil" : 0,
"count" : 10
},
{
"type" : "AMMO",
"id" : "arrow_fire_hardened",
"rarity" : 0,
"price" : 25,
"name" : "fire hardened wood arrow",
"symbol" : "=",
"color" : "green",
"description" : "A simple arrow shaft that has had a point carved into it and then fire hardened.",
"material" : "wood",
"volume" : 1,
"weight" : 12,
"bashing" : 2,
"cutting" : 0,
"to_hit" : 0,
"ammo_type" : "arrow",
"damage" : 3,
"pierce" : 0,
"range" : 2,
"accuracy" : 35,
"recoil" : 0,
"count" : 10
},
{
"type" : "AMMO",
"id" : "arrow_field_point",
"rarity" : 0,
"price" : 30,
"name" : "field point wood arrow",
"symbol" : "=",
"color" : "green",
"description" : "A simple arrow shaft that has a crude arrow head. Useful for hunting small woodland creatures.",
"material" : "wood",
"volume" : 1,
"weight" : 13,
"bashing" : 3,
"cutting" : 0,
"to_hit" : 0,
"ammo_type" : "arrow",
"damage" : 6,
"pierce" : 1,
"range" : 2,
"accuracy" : 35,
"recoil" : 0,
"count" : 10
},
{
"type" : "AMMO",
"id" : "arrow_fire_hardened_fletched",
"rarity" : 0,
"price" : 35,
"name" : "fletched fire hardened wood arrow",
"symbol" : "=",
"color" : "green",
"description" : "This simple arrow has a fire hardened point and some fletchings.",
"material" : "wood",
"volume" : 1,
"weight" : 13,
"bashing" : 3,
"cutting" : 0,
"to_hit" : 0,
"ammo_type" : "arrow",
"damage" : 4,
"pierce" : 0,
"range" : 6,
"accuracy" : 20,
"recoil" : 0,
"count" : 10
},
{
"type" : "AMMO",
"id" : "arrow_field_point_fletched",
"rarity" : 0,
"price" : 40,
"name" : "fletched field point wood arrow",
"symbol" : "=",
"color" : "green",
"description" : "A simple arrow shaft that has a crude arrow head and some fletchings. Useful for hunting small woodland creatures or as a last ditch defense against zombies.",
"material" : "wood",
"volume" : 1,
"weight" : 14,
"bashing" : 3,
"cutting" : 0,
"to_hit" : 0,
"ammo_type" : "arrow",
"damage" : 7,
"pierce" : 2,
"range" : 6,
"accuracy" : 20,
"recoil" : 0,
"count" : 10
},
{
"type" : "AMMO",
"id" : "arrow_wood",
"rarity" : 7,
"price" : 75,
"name" : "wood arrow",
"symbol" : "=",
"color" : "green",
"description" : "A basic wooden arrow, it has a metal arrow head and some fletchings. It's light-weight, does some damage, and is so-so on accuracy. Stands a good chance of remaining intact once fired.",
"material" : "wood",
"volume" : 1,
"weight" : 15,
"bashing" : 2,
"cutting" : 1,
"to_hit" : 0,
"ammo_type" : "arrow",
"damage" : 10,
"pierce" : 3,
"range" : 7,
"accuracy" : 15,
"recoil" : 0,
"count" : 10
},
{
"type" : "AMMO",
"id" : "arrow_heavy_fire_hardened_fletched",
"rarity" : 7,
"price" : 75,
"name" : "heavy fletched fire hardened arrow",
"symbol" : "=",
"color" : "green",
"description" : "This arrow is significantly sturdier than other wooden arrows. It has a firehardened point and some fletchings.",
"material" : "plastic",
"volume" : 1,
"weight" : 19,
"bashing" : 4,
"cutting" : 0,
"to_hit" : 0,
"ammo_type" : "arrow",
"damage" : 5,
"pierce" : 2,
"range" : 7,
"accuracy" : 15,
"recoil" : 0,
"count" : 10
},
{
"type" : "AMMO",
"id" : "arrow_heavy_field_point_fletched",
"rarity" : 7,
"price" : 75,
"name" : "heavy fletched field point arrow",
"symbol" : "=",
"color" : "green",
"description" : "This arrow is significantly sturdier than other wooden arrows. It has a crude field point head and some fletchings.",
"material" : "plastic",
"volume" : 1,
"weight" : 20,
"bashing" : 4,
"cutting" : 0,
"to_hit" : 0,
"ammo_type" : "arrow",
"damage" : 6,
"pierce" : 3,
"range" : 7,
"accuracy" : 15,
"recoil" : 0,
"count" : 10
},
{
"type" : "AMMO",
"id" : "arrow_wood_heavy",
"rarity" : 7,
"price" : 75,
"name" : "heavy wood arrow",
"symbol" : "=",
"color" : "green",
"description" : "A heavy wooden arrow, it has a metal arrow head and some fletchings. It's much heavier than other wooden arrows, as a result it does more damage and is more stable in flight, resulting in better accuracy over a longer range. Stands a very good chance of remaining intact once fired.",
"material" : "plastic",
"volume" : 1,
"weight" : 22,
"bashing" : 6,
"cutting" : 2,
"to_hit" : 0,
"ammo_type" : "arrow",
"damage" : 12,
"pierce" : 5,
"range" : 8,
"accuracy" : 10,
"recoil" : 0,
"count" : 10
},
{
"type" : "AMMO",
"id" : "arrow_metal_sharpened",
"rarity" : 7,
"price" : 50,
"name" : "sharpened metal arrow",
"symbol" : "=",
"color" : "green",
"description" : "This metal shaft has been carefully sharpened so that it has a crude point at the end.",
"material" : "steel",
"volume" : 1,
"weight" : 19,
"bashing" : 2,
"cutting" : 0,
"to_hit" : 0,
"ammo_type" : "arrow",
"damage" : 5,
"pierce" : 3,
"range" : 5,
"accuracy" : 25,
"recoil" : 0,
"count" : 10
},
{
"type" : "AMMO",
"id" : "arrow_metal",
"rarity" : 7,
"price" : 100,
"name" : "metal arrow",
"symbol" : "=",
"color" : "green",
"description" : "This metal arrow has a steel arrow head and some fletchings.",
"material" : "steel",
"volume" : 1,
"weight" : 21,
"bashing" : 3,
"cutting" : 2,
"to_hit" : 0,
"ammo_type" : "arrow",
"damage" : 14,
"pierce" : 7,
"range" : 10,
"accuracy" : 10,
"recoil" : 0,
"count" : 10
},
{
"type" : "AMMO",
"id" : "arrow_cf",
"rarity" : 5,
"price" : 150,
"name" : "carbon fiber arrow",
"symbol" : "=",
"color" : "green",
"description" : "High-tech carbon fiber shafts and 100 grain broadheads. Very light weight, fast, and notoriously fragile.",
"material" : "plastic",
"volume" : 2,
"weight" : 15,
"bashing" : 1,
"cutting" : 0,
"to_hit" : 0,
"ammo_type" : "arrow",
"damage" : 10,
"pierce" : 5,
"range" : 8,
"accuracy" : 15,
"recoil" : 0,
"count" : 8
},
{
"type" : "AMMO",
"id" : "arrow_exploding",
"rarity" : 5,
"price" : 350,
"name" : "exploding arrow",
"symbol" : "=",
"color" : "green",
"description" : "This arrow has a small IED strapped to its tip. Horribly inaccurate, heavy, and bulky, not only does this contraption require expert hands to pull off a shot, it requires one to loose this with a small measure of confidence the shooter won't be caught in the blast radius.",
"material" : "steel",
"volume" : 2,
"weight" : 40,
"bashing" : 2,
"cutting" : 0,
"to_hit" : 0,
"ammo_type" : "arrow",
"damage" : 15,
"pierce" : 9,
"range" : 5,
"accuracy" : 25,
"recoil" : 0,
"count" : 5,
"effects" : ["EXPLOSIVE"]
},
{
"id" : "exploding_arrow_warhead",
"symbol" : "=",
"color" : "green",
"name" : "exploding arrowhead",
"description" : "This simple IED is designed to be attached to an arrow and detonate on impact. Theoretically you could throw it but who would want to do that?",
"rarity" : 3,
"price" : 400,
"material" : "iron",
"weight" : 10,
"volume" : 1,
"bashing" : 10,
"cutting" : 0,
"to_hit" : -1,
"count" : 5,
"effects" : ["EXPLOSIVE"]
},
{
"type" : "AMMO",
"id" : "arrow_flamming",
"rarity" : 5,
"price" : 350,
"name" : "flaming arrow",
"symbol" : "=",
"color" : "green",
"description" : "This arrow has a flaming rag wrapped around the shaft near the head. You should shoot it soon before it burns your bow.",
"material" : "steel",
"volume" : 2,
"weight" : 40,
"bashing" : 2,
"cutting" : 0,
"to_hit" : 0,
"ammo_type" : "arrow",
"damage" : 15,
"pierce" : 9,
"range" : 5,
"accuracy" : 25,
"recoil" : 0,
"count" : 5,
"effects" : ["IGNITE"]
},
{
"type" : "AMMO",
"id" : "bolt_wood",
"rarity" : 8,
"price" : 100,
"name" : "wood crossbow bolt",
"symbol" : "=",
"color" : "green",
"description" : "A sharpened bolt carved from wood. It's lighter than a steel bolt, but does less damage and is less accurate. Stands a good chance of remaining intact once fired.",
"material" : "wood",
"volume" : 1,
"weight" : 40,
"bashing" : 1,
"cutting" : 0,
"to_hit" : 0,
"ammo_type" : "bolt",
"damage" : 10,
"pierce" : 1,
"range" : 0,
"accuracy" : 16,
"recoil" : 0,
"count" : 15
},
{
"type" : "AMMO",
"id" : "bolt_steel",
"rarity" : 7,
"price" : 400,
"name" : "steel crossbow bolt",
"symbol" : "=",
"color" : "green",
"description" : "A sharp bolt made from steel. Deadly in skilled hands. Stands an excellent chance of remaining intact once fired.",
"material" : "steel",
"volume" : 1,
"weight" : 25,
"bashing" : 5,
"cutting" : 0,
"to_hit" : 0,
"ammo_type" : "bolt",
"damage" : 20,
"pierce" : 10,
"range" : 6,
"accuracy" : 15,
"recoil" : 0,
"count" : 10
},
{
"id" : "selfbow",
"type" : "GUN",
"symbol" : "(",
"color" : "yellow",
"name" : "self bow",
"description" : "A bow made from a single piece of wood. It is made specifically for the person using it.",
"rarity" : 5,
"price" : 400,
"material" : "wood",
"flags" : ["ALWAYS_TWOHAND", "RELOAD_AND_SHOOT"],
"skill" : "archery",
"ammo" : "arrow",
"weight" : 8,
"volume" : 12,
"bashing" : 6,
"cutting" : 0,
"to_hit" : 0,
"ranged_damage" : 4,
"range" : 5,
"accuracy" : 28,
"recoil" : 0,
"durability" : 6,
"burst" : 0,
"clip_size" : 1,
"reload" : 70
},
{
"id" : "shortbow",
"type" : "GUN",
"symbol" : "(",
"color" : "yellow",
"name" : "short bow",
"description" : "A shorter bow than the longbow, easier to draw than the longbow but sacrifices power. Arrows fired from this weapon have a good chance of remaining intact for re-use. It requires 8 strength to fire",
"rarity" : 5,
"price" : 800,
"material" : "wood",
"flags" : ["ALWAYS_TWOHAND", "STR8_DRAW", "RELOAD_AND_SHOOT"],
"skill" : "archery",
"ammo" : "arrow",
"weight" : 3,
"volume" : 6,
"bashing" : 6,
"cutting" : 0,
"to_hit" : 0,
"ranged_damage" : 3,
"range" : 6,
"accuracy" : 22,
"recoil" : 0,
"durability" : 6,
"burst" : 0,
"clip_size" : 1,
"reload" : 60
},
{
"id" : "compbow",
"type" : "GUN",
"symbol" : "(",
"color" : "yellow",
"name" : "compound bow",
"description" : "A bow with cams that fires high velocity arrows. Weaker people can use compound bows more easily. Arrows fired from this weapon have a good chance of remaining intact for re-use. It requires 8 strength to fire",
"rarity" : 1,
"price" : 1800,
"material" : ["steel", "plastic"],
"flags" : ["ALWAYS_TWOHAND", "STR8_DRAW", "RELOAD_AND_SHOOT"],
"skill" : "archery",
"ammo" : "arrow",
"weight" : 8,
"volume" : 8,
"bashing" : 8,
"cutting" : 0,
"to_hit" : 1,
"ranged_damage" : 5,
"range" : 10,
"accuracy" : 20,
"recoil" : 0,
"durability" : 6,
"burst" : 0,
"clip_size" : 1,
"reload" : 100
},
{
"id" : "compositebow",
"type" : "GUN",
"symbol" : "(",
"color" : "yellow",
"name" : "composite bow",
"description" : "A bow made from more than one material so it is able to store more energy. Arrows fired from this weapon have a good chance of remaining intact for re-use. It requires 10 strength to fire",
"rarity" : 3,
"price" : 1200,
"material" : ["wood", "plastic"],
"flags" : ["ALWAYS_TWOHAND", "STR10_DRAW", "RELOAD_AND_SHOOT"],
"skill" : "archery",
"ammo" : "arrow",
"weight" : 6,
"volume" : 10,
"bashing" : 8,
"cutting" : 0,
"to_hit" : 0,
"ranged_damage" : 7,
"range" : 12,
"accuracy" : 18,
"recoil" : 0,
"durability" : 6,
"burst" : 0,
"clip_size" : 1,
"reload" : 110
},
{
"id" : "recurbow",
"type" : "GUN",
"symbol" : "(",
"color" : "yellow",
"name" : "recurve bow",
"description" : "A bow that curves away from the archer at the tips allowing more power to be stored in the bow. Arrows fired from this weapon have a good chance of remaining intact for re-use. It requires 10 strength to fire",
"rarity" : 2,
"price" : 1200,
"material" : ["steel", "plastic"],
"flags" : ["ALWAYS_TWOHAND", "STR10_DRAW", "RELOAD_AND_SHOOT"],
"skill" : "archery",
"ammo" : "arrow",
"weight" : 6,
"volume" : 10,
"bashing" : 12,
"cutting" : 0,
"to_hit" : 0,
"ranged_damage" : 9,
"range" : 14,
"accuracy" : 16,
"recoil" : 0,
"durability" : 6,
"burst" : 0,
"clip_size" : 1,
"reload" : 100
},
{
"id" : "reflexbow",
"type" : "GUN",
"symbol" : "(",
"color" : "yellow",
"name" : "reflex bow",
"description" : "A bow that has limbs which curve away from the archer sacrificing accuracy for power. Arrows fired from this weapon have a good chance of remaining intact for re-use. It requires 10 strength to fire",
"rarity" : 2,
"price" : 1200,
"material" : ["steel", "plastic"],
"flags" : ["ALWAYS_TWOHAND", "STR10_DRAW", "RELOAD_AND_SHOOT"],
"skill" : "archery",
"ammo" : "arrow",
"weight" : 6,
"volume" : 10,
"bashing" : 12,
"cutting" : 0,
"to_hit" : 0,
"ranged_damage" : 11,
"range" : 16,
"accuracy" : 14,
"recoil" : 0,
"durability" : 6,
"burst" : 0,
"clip_size" : 1,
"reload" : 100
},
{
"id" : "longbow",
"type" : "GUN",
"symbol" : "(",
"color" : "yellow",
"name" : "longbow",
"description" : "A six-foot wooden bow that fires arrows. This takes a fair amount of strength to draw. Arrows fired from this weapon have a good chance of remaining intact for re-use. It requires 10 strength to fire",
"rarity" : 5,
"price" : 800,
"material" : "wood",
"flags" : ["ALWAYS_TWOHAND", "STR10_DRAW", "RELOAD_AND_SHOOT"],
"skill" : "archery",
"ammo" : "arrow",
"weight" : 4,
"volume" : 8,
"bashing" : 10,
"cutting" : 0,
"to_hit" : 0,
"ranged_damage" : 7,
"range" : 20,
"accuracy" : 26,
"recoil" : 0,
"durability" : 6,
"burst" : 0,
"clip_size" : 1,
"reload" : 80
},
{
"id" : "reflexrecurvebow",
"type" : "GUN",
"symbol" : "(",
"color" : "yellow",
"name" : "reflex recurve bow",
"description" : "A bow that combines the traits from both the reflex and the recurve bows. Both the limbs and the tips curve away from the archer. This dramatically increases the power while increasing the strength to draw the bow significantly. It requires 12 strength to fire efficiently.",
"rarity" : 2,
"price" : 1200,
"material" : ["wood", "bone"],
"flags" : ["ALWAYS_TWOHAND", "STR12_DRAW", "RELOAD_AND_SHOOT"],
"skill" : "archery",
"ammo" : "arrow",
"weight" : 4,
"volume" : 5,
"bashing" : 12,
"cutting" : 0,
"to_hit" : 0,
"ranged_damage" : 15,
"range" : 18,
"accuracy" : 16,
"recoil" : 0,
"durability" : 6,
"burst" : 0,
"clip_size" : 1,
"reload" : 80
},
{
"id" : "hand_crossbow",
"type" : "GUN",
"symbol" : "(",
"color" : "green",
"name" : "pistol crossbow",
"description" : "A small concealable pistol like crossbow. It is weak due to it's small size and draw, good for hunting small game. Bolts fired from this weapon have a good chance of remaining intact for re-use.",
"rarity" : 1,
"price" : 1000,
"material" : ["iron", "wood"],
"flags" : "none",
"skill" : "archery",
"ammo" : "bolt",
"weight" : 5,
"volume" : 4,
"bashing" : 4,
"cutting" : 0,
"to_hit" : -0,
"ranged_damage" : -6,
"range" : 6,
"accuracy" : 20,
"recoil" : 0,
"durability" : 6,
"burst" : 0,
"clip_size" : 1,
"reload" : 100
},
{
"id" : "crossbow",
"type" : "GUN",
"symbol" : "(",
"color" : "green",
"name" : "crossbow",
"description" : "A slow-loading hand weapon that launches bolts. Stronger people can reload it much faster. Bolts fired from this weapon have a good chance of remaining intact for re-use.",
"rarity" : 2,
"price" : 1000,
"material" : ["iron", "wood"],
"flags" : "STR_RELOAD",
"skill" : "archery",
"ammo" : "bolt",
"weight" : 9,
"volume" : 6,
"bashing" : 11,
"cutting" : 0,
"to_hit" : 1,
"ranged_damage" : 0,
"range" : 10,
"accuracy" : 18,
"recoil" : 0,
"durability" : 6,
"burst" : 0,
"clip_size" : 1,
"reload" : 800
},
{
"id" : "huge_crossbow",
"type" : "GUN",
"symbol" : "(",
"color" : "green",
"name" : "Ganz-Rustung",
"description" : "A HUGE very slow-loading medieval crossbow from Germany. It's tension is so powerful that you feel it shake after firing. Un-skilled users will find it very hard to reload. Bolts fired from this weapon have a good chance of remaining intact for re-use.",
"rarity" : 2,
"price" : 1000,
"material" : ["iron", "wood"],
"flags" : ["ALWAYS_TWOHAND", "STR_RELOAD"],
"skill" : "archery",
"ammo" : "bolt",
"weight" : 60,
"volume" : 40,
"bashing" : 20,
"cutting" : 0,
"to_hit" : -1,
"ranged_damage" : 30,
"range" : 30,
"accuracy" : 30,
"recoil" : 30,
"durability" : 6,
"burst" : 0,
"clip_size" : 1,
"reload" : 6000
},
{
"id" : "rep_crossbow",
"type" : "GUN",
"symbol" : "(",
"color" : "green",
"name" : "repeating crossbow",
"description" : "A custom made mechanical large crossbow, with a wooden magazine that holds 10 bolts. Single bolt reload. Bolts fired from this weapon have a good chance of remaining intact for re-use.",
"rarity" : 1,
"price" : 1000,
"material" : ["iron", "wood"],
"flags" : ["ALWAYS_TWOHAND", "RELOAD_ONE", "MODE_BURST"],
"skill" : "archery",
"ammo" : "bolt",
"weight" : 16,
"volume" : 10,
"bashing" : 13,
"cutting" : 0,
"to_hit" : -1,
"ranged_damage" : -2,
"range" : 8,
"accuracy" : 30,
"recoil" : 15,
"durability" : 6,
"burst" : 3,
"clip_size" : 10,
"reload" : 100
}
]
+436 -144
View File
File diff suppressed because it is too large Load Diff
+92 -48
View File
@@ -10,7 +10,7 @@
"color" : "pink",
"intelligence" : 0,
"symbol" : "?",
"material" : ["PAPER", "NULL"],
"material" : ["paper", "null"],
"volume" : 1,
"bashing" : -3,
"cutting" : 0,
@@ -32,7 +32,7 @@
"color" : "pink",
"intelligence" : 3,
"symbol" : "?",
"material" : ["PAPER", "NULL"],
"material" : ["paper", "null"],
"volume" : 1,
"bashing" : -3,
"cutting" : 0,
@@ -54,7 +54,7 @@
"color" : "pink",
"intelligence" : 7,
"symbol" : "?",
"material" : ["PAPER", "NULL"],
"material" : ["paper", "null"],
"volume" : 1,
"bashing" : -3,
"cutting" : 0,
@@ -76,7 +76,7 @@
"color" : "pink",
"intelligence" : 2,
"symbol" : "?",
"material" : ["PAPER", "NULL"],
"material" : ["paper", "null"],
"volume" : 1,
"bashing" : -3,
"cutting" : 0,
@@ -98,7 +98,7 @@
"color" : "pink",
"intelligence" : 5,
"symbol" : "?",
"material" : ["PAPER", "NULL"],
"material" : ["paper", "null"],
"volume" : 1,
"bashing" : -3,
"cutting" : 0,
@@ -120,7 +120,7 @@
"color" : "pink",
"intelligence" : 5,
"symbol" : "?",
"material" : ["PAPER", "NULL"],
"material" : ["paper", "null"],
"volume" : 1,
"bashing" : -3,
"cutting" : 0,
@@ -142,7 +142,7 @@
"color" : "pink",
"intelligence" : 2,
"symbol" : "?",
"material" : ["PAPER", "NULL"],
"material" : ["paper", "null"],
"volume" : 1,
"bashing" : -3,
"cutting" : 0,
@@ -164,7 +164,7 @@
"color" : "pink",
"intelligence" : 2,
"symbol" : "?",
"material" : ["PAPER", "NULL"],
"material" : ["paper", "null"],
"volume" : 1,
"bashing" : -3,
"cutting" : 0,
@@ -186,7 +186,7 @@
"color" : "pink",
"intelligence" : 7,
"symbol" : "?",
"material" : ["PAPER", "NULL"],
"material" : ["paper", "null"],
"volume" : 1,
"bashing" : -3,
"cutting" : 0,
@@ -208,7 +208,7 @@
"color" : "pink",
"intelligence" : 0,
"symbol" : "?",
"material" : ["PAPER", "NULL"],
"material" : ["paper", "null"],
"volume" : 1,
"bashing" : -3,
"cutting" : 0,
@@ -230,7 +230,7 @@
"color" : "pink",
"intelligence" : 1,
"symbol" : "?",
"material" : ["PAPER", "NULL"],
"material" : ["paper", "null"],
"volume" : 1,
"bashing" : -3,
"cutting" : 0,
@@ -252,7 +252,7 @@
"color" : "pink",
"intelligence" : 2,
"symbol" : "?",
"material" : ["PAPER", "NULL"],
"material" : ["paper", "null"],
"volume" : 1,
"bashing" : -3,
"cutting" : 0,
@@ -274,7 +274,7 @@
"color" : "pink",
"intelligence" : 1,
"symbol" : "?",
"material" : ["PAPER", "NULL"],
"material" : ["paper", "null"],
"volume" : 1,
"bashing" : -3,
"cutting" : 0,
@@ -296,7 +296,7 @@
"color" : "pink",
"intelligence" : 1,
"symbol" : "?",
"material" : ["PAPER", "NULL"],
"material" : ["paper", "null"],
"volume" : 1,
"bashing" : -3,
"cutting" : 0,
@@ -318,7 +318,7 @@
"color" : "light_blue",
"intelligence" : 4,
"symbol" : "?",
"material" : ["PAPER", "NULL"],
"material" : ["paper", "null"],
"volume" : 4,
"bashing" : -2,
"cutting" : 0,
@@ -340,7 +340,7 @@
"color" : "light_blue",
"intelligence" : 5,
"symbol" : "?",
"material" : ["PAPER", "NULL"],
"material" : ["paper", "null"],
"volume" : 4,
"bashing" : -2,
"cutting" : 0,
@@ -362,7 +362,7 @@
"color" : "light_blue",
"intelligence" : 6,
"symbol" : "?",
"material" : ["PAPER", "NULL"],
"material" : ["paper", "null"],
"volume" : 3,
"bashing" : -3,
"cutting" : 0,
@@ -384,7 +384,7 @@
"color" : "light_blue",
"intelligence" : 7,
"symbol" : "?",
"material" : ["PAPER", "NULL"],
"material" : ["paper", "null"],
"volume" : 4,
"bashing" : -2,
"cutting" : 0,
@@ -406,7 +406,7 @@
"color" : "light_blue",
"intelligence" : 7,
"symbol" : "?",
"material" : ["PAPER", "NULL"],
"material" : ["paper", "null"],
"volume" : 4,
"bashing" : -2,
"cutting" : 0,
@@ -428,7 +428,7 @@
"color" : "light_blue",
"intelligence" : 7,
"symbol" : "?",
"material" : ["PAPER", "NULL"],
"material" : ["paper", "null"],
"volume" : 4,
"bashing" : -2,
"cutting" : 0,
@@ -450,7 +450,7 @@
"color" : "light_blue",
"intelligence" : 7,
"symbol" : "?",
"material" : ["PAPER", "NULL"],
"material" : ["paper", "null"],
"volume" : 4,
"bashing" : -2,
"cutting" : 0,
@@ -472,7 +472,7 @@
"color" : "green",
"intelligence" : 3,
"symbol" : "?",
"material" : ["PAPER", "NULL"],
"material" : ["paper", "null"],
"volume" : 2,
"bashing" : -4,
"cutting" : 0,
@@ -494,7 +494,7 @@
"color" : "green",
"intelligence" : 4,
"symbol" : "?",
"material" : ["PAPER", "NULL"],
"material" : ["paper", "null"],
"volume" : 1,
"bashing" : -5,
"cutting" : 0,
@@ -516,7 +516,7 @@
"color" : "green",
"intelligence" : 5,
"symbol" : "?",
"material" : ["PAPER", "NULL"],
"material" : ["paper", "null"],
"volume" : 3,
"bashing" : -3,
"cutting" : 0,
@@ -538,7 +538,7 @@
"color" : "green",
"intelligence" : 4,
"symbol" : "?",
"material" : ["PAPER", "NULL"],
"material" : ["paper", "null"],
"volume" : 3,
"bashing" : -3,
"cutting" : 0,
@@ -560,7 +560,7 @@
"color" : "green",
"intelligence" : 5,
"symbol" : "?",
"material" : ["PAPER", "NULL"],
"material" : ["paper", "null"],
"volume" : 3,
"bashing" : -3,
"cutting" : 0,
@@ -582,7 +582,7 @@
"color" : "green",
"intelligence" : 6,
"symbol" : "?",
"material" : ["PAPER", "NULL"],
"material" : ["paper", "null"],
"volume" : 3,
"bashing" : -3,
"cutting" : 0,
@@ -604,7 +604,7 @@
"color" : "green",
"intelligence" : 7,
"symbol" : "?",
"material" : ["PAPER", "NULL"],
"material" : ["paper", "null"],
"volume" : 5,
"bashing" : -2,
"cutting" : 0,
@@ -626,7 +626,7 @@
"color" : "green",
"intelligence" : 5,
"symbol" : "?",
"material" : ["PAPER", "NULL"],
"material" : ["paper", "null"],
"volume" : 3,
"bashing" : -3,
"cutting" : 0,
@@ -648,7 +648,7 @@
"color" : "green",
"intelligence" : 4,
"symbol" : "?",
"material" : ["PAPER", "NULL"],
"material" : ["paper", "null"],
"volume" : 4,
"bashing" : -2,
"cutting" : 0,
@@ -670,7 +670,7 @@
"color" : "green",
"intelligence" : 4,
"symbol" : "?",
"material" : ["PAPER", "NULL"],
"material" : ["paper", "null"],
"volume" : 4,
"bashing" : -2,
"cutting" : 0,
@@ -692,7 +692,7 @@
"color" : "green",
"intelligence" : 6,
"symbol" : "?",
"material" : ["PAPER", "NULL"],
"material" : ["paper", "null"],
"volume" : 4,
"bashing" : -2,
"cutting" : 0,
@@ -714,7 +714,7 @@
"color" : "green",
"intelligence" : 7,
"symbol" : "?",
"material" : ["PAPER", "NULL"],
"material" : ["paper", "null"],
"volume" : 3,
"bashing" : -3,
"cutting" : 0,
@@ -736,7 +736,7 @@
"color" : "green",
"intelligence" : 4,
"symbol" : "?",
"material" : ["PAPER", "NULL"],
"material" : ["paper", "null"],
"volume" : 3,
"bashing" : -3,
"cutting" : 0,
@@ -758,7 +758,7 @@
"color" : "green",
"intelligence" : 4,
"symbol" : "?",
"material" : ["PAPER", "NULL"],
"material" : ["paper", "null"],
"volume" : 2,
"bashing" : -3,
"cutting" : 0,
@@ -780,7 +780,7 @@
"color" : "green",
"intelligence" : 5,
"symbol" : "?",
"material" : ["PAPER", "NULL"],
"material" : ["paper", "null"],
"volume" : 2,
"bashing" : -3,
"cutting" : 0,
@@ -802,7 +802,7 @@
"color" : "blue",
"intelligence" : 11,
"symbol" : "?",
"material" : ["PAPER", "NULL"],
"material" : ["paper", "null"],
"volume" : 7,
"bashing" : 5,
"cutting" : 0,
@@ -824,7 +824,7 @@
"color" : "blue",
"intelligence" : 11,
"symbol" : "?",
"material" : ["PAPER", "NULL"],
"material" : ["paper", "null"],
"volume" : 7,
"bashing" : 5,
"cutting" : 0,
@@ -846,7 +846,7 @@
"color" : "blue",
"intelligence" : 9,
"symbol" : "?",
"material" : ["PAPER", "NULL"],
"material" : ["paper", "null"],
"volume" : 7,
"bashing" : 5,
"cutting" : 0,
@@ -868,7 +868,7 @@
"color" : "blue",
"intelligence" : 6,
"symbol" : "?",
"material" : ["PAPER", "NULL"],
"material" : ["paper", "null"],
"volume" : 6,
"bashing" : 4,
"cutting" : 0,
@@ -890,7 +890,7 @@
"color" : "blue",
"intelligence" : 12,
"symbol" : "?",
"material" : ["PAPER", "NULL"],
"material" : ["paper", "null"],
"volume" : 8,
"bashing" : 5,
"cutting" : 0,
@@ -912,7 +912,7 @@
"color" : "blue",
"intelligence" : 8,
"symbol" : "?",
"material" : ["PAPER", "NULL"],
"material" : ["paper", "null"],
"volume" : 6,
"bashing" : 4,
"cutting" : 0,
@@ -934,7 +934,7 @@
"color" : "blue",
"intelligence" : 13,
"symbol" : "?",
"material" : ["PAPER", "NULL"],
"material" : ["paper", "null"],
"volume" : 6,
"bashing" : 6,
"cutting" : 0,
@@ -956,7 +956,7 @@
"color" : "blue",
"intelligence" : 14,
"symbol" : "?",
"material" : ["PAPER", "NULL"],
"material" : ["paper", "null"],
"volume" : 8,
"bashing" : 8,
"cutting" : 0,
@@ -978,7 +978,7 @@
"color" : "blue",
"intelligence" : 0,
"symbol" : "?",
"material" : ["PAPER", "NULL"],
"material" : ["paper", "null"],
"volume" : 7,
"bashing" : 7,
"cutting" : 0,
@@ -1000,7 +1000,7 @@
"color" : "blue",
"intelligence" : 0,
"symbol" : "?",
"material" : ["PAPER", "NULL"],
"material" : ["paper", "null"],
"volume" : 6,
"bashing" : 6,
"cutting" : 0,
@@ -1022,7 +1022,7 @@
"color" : "blue",
"intelligence" : 0,
"symbol" : "?",
"material" : ["PAPER", "NULL"],
"material" : ["paper", "null"],
"volume" : 5,
"bashing" : 5,
"cutting" : 0,
@@ -1044,7 +1044,7 @@
"color" : "blue",
"intelligence" : 0,
"symbol" : "?",
"material" : ["PAPER", "NULL"],
"material" : ["paper", "null"],
"volume" : 5,
"bashing" : 5,
"cutting" : 0,
@@ -1054,5 +1054,49 @@
"rarity" : 0,
"price" : 500,
"required_level" : 0
},
{
"type" : "BOOK",
"id" : "priest_diary",
"name" : "Priest's Diary",
"max_level" : 0,
"description" : "A small book filled with journal entries in Latin.",
"weight" : 3,
"to_hit" : 1,
"color" : "blue",
"intelligence" : 0,
"symbol" : "?",
"material" : ["PAPER", "NULL"],
"volume" : 3,
"bashing" : 3,
"cutting" : 0,
"time" : 30,
"fun" : -1,
"skill" : "none",
"rarity" : 0,
"price" : 500,
"required_level" : 0
},
{
"type" : "BOOK",
"id" : "visions_solitude",
"name" : "Visions in Solitude",
"max_level" : 0,
"description" : "A small book detailing 'visions' a prisoner had on death row.",
"weight" : 1,
"to_hit" : 1,
"color" : "blue",
"intelligence" : 0,
"symbol" : "?",
"material" : ["PAPER", "NULL"],
"volume" : 3,
"bashing" : 3,
"cutting" : 0,
"time" : 30,
"fun" : 2,
"skill" : "none",
"rarity" : 0,
"price" : 900,
"required_level" : 0
}
]
File diff suppressed because it is too large Load Diff
+2 -2
View File
@@ -5,7 +5,7 @@
"name":"Guitar",
"description":"An acoustic six-string guitar. A bit out of tune, but in good shape otherwise.",
"rarity": 60,
"material": "WOOD",
"material": "wood",
"weight": 13,
"volume": 24,
"damage": 14,
@@ -23,7 +23,7 @@
"name":"Bongo",
"description": "A handheld drum. Suitable for making loud noises into all hours of the night.",
"rarity": 60,
"material": ["WOOD", "STEEL"],
"material": ["wood", "steel"],
"weight": 10,
"volume": 10,
"damage": 11,
+175 -123
View File
File diff suppressed because it is too large Load Diff
+48 -24
View File
@@ -7,7 +7,7 @@
"description":"Replacing several key parts of a 9mm, .38, .40 or .44 firearm converts it to a .45 firearm. The conversion results in reduced accuracy and increased recoil.",
"rarity": 3,
"price": 480,
"material": "STEEL",
"material": "steel",
"weight": 2,
"volume": 2,
"bashing": 3,
@@ -36,7 +36,7 @@
"to_hit" : 2,
"color" : "dark_gray",
"symbol" : ":",
"material" : ["STEEL", "PLASTIC"],
"material" : ["steel", "plastic"],
"mod_targets" : ["pistol", "smg", "rifle"],
"volume" : 2,
"bashing" : 3,
@@ -60,7 +60,7 @@
"to_hit" : -1,
"color" : "brown",
"symbol" : ":",
"material" : ["STEEL", "PLASTIC"],
"material" : ["steel", "plastic"],
"mod_targets" : ["shotgun", "smg", "rifle"],
"volume" : 1,
"bashing" : 0,
@@ -84,7 +84,7 @@
"to_hit" : 2,
"color" : "light_gray",
"symbol" : ":",
"material" : ["STEEL", "NULL"],
"material" : ["steel", "null"],
"mod_targets" : ["smg", "rifle"],
"volume" : 4,
"bashing" : 5,
@@ -108,7 +108,7 @@
"to_hit" : -1,
"color" : "light_gray",
"symbol" : ":",
"material" : ["STEEL", "NULL"],
"material" : ["steel", "null"],
"mod_targets" : ["smg", "rifle"],
"volume" : 1,
"bashing" : -2,
@@ -132,7 +132,7 @@
"to_hit" : 1,
"color" : "light_gray",
"symbol" : ":",
"material" : ["STEEL", "NULL"],
"material" : ["steel", "null"],
"mod_targets" : ["shotgun"],
"volume" : 2,
"bashing" : 3,
@@ -156,7 +156,7 @@
"to_hit" : -1,
"color" : "light_gray",
"symbol" : ":",
"material" : ["STEEL", "PLASTIC"],
"material" : ["steel", "plastic"],
"mod_targets" : ["pistol", "shotgun", "smg", "rifle"],
"volume" : 1,
"bashing" : -2,
@@ -180,7 +180,7 @@
"to_hit" : 0,
"color" : "light_gray",
"symbol" : ":",
"material" : ["STEEL", "PLASTIC"],
"material" : ["steel", "plastic"],
"mod_targets" : ["shotgun", "smg", "rifle"],
"volume" : 2,
"bashing" : 0,
@@ -204,7 +204,7 @@
"to_hit" : 0,
"color" : "light_gray",
"symbol" : ":",
"material" : ["STEEL", "PLASTIC"],
"material" : ["steel", "plastic"],
"mod_targets" : ["pistol", "shotgun", "smg", "rifle"],
"volume" : 1,
"bashing" : 0,
@@ -215,6 +215,30 @@
"price" : 200,
"loudness_modifier" : 0
},
{
"type" : "GUNMOD",
"id" : "brass_catcher",
"name" : "brass catcher",
"clip_size_modifier" : 0,
"accuracy_modifier" : 0,
"damage_modifier" : 0,
"ammo_modifier" : "none",
"description" : "A bag that hangs off the side of your gun and catches ejected casings so you don't have to pick them up.",
"weight" : 1,
"to_hit" : 0,
"color" : "light_gray",
"symbol" : ":",
"material" : ["cotton", "null"],
"mod_targets" : ["shotgun", "smg", "rifle"],
"volume" : 1,
"bashing" : 0,
"cutting" : 0,
"burst_modifier" : 0,
"recoil_modifier" : 0,
"rarity" : 15,
"price" : 200,
"loudness_modifier" : 0
},
{
"type" : "GUNMOD",
"id" : "stabilizer",
@@ -228,7 +252,7 @@
"to_hit" : -3,
"color" : "blue",
"symbol" : ":",
"material" : ["STEEL", "PLASTIC"],
"material" : ["steel", "plastic"],
"mod_targets" : ["smg", "rifle"],
"volume" : 3,
"bashing" : 0,
@@ -252,7 +276,7 @@
"to_hit" : 0,
"color" : "red",
"symbol" : ":",
"material" : ["STEEL", "PLASTIC"],
"material" : ["steel", "plastic"],
"mod_targets" : ["smg", "rifle"],
"volume" : 0,
"bashing" : 0,
@@ -277,7 +301,7 @@
"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"],
"material" : ["steel", "plastic"],
"volume" : 1,
"cutting" : 0,
"recoil_modifier" : 2,
@@ -302,7 +326,7 @@
"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"],
"material" : ["steel", "null"],
"volume" : 1,
"cutting" : 0,
"recoil_modifier" : 0,
@@ -327,7 +351,7 @@
"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"],
"material" : ["steel", "null"],
"volume" : 1,
"cutting" : 0,
"recoil_modifier" : 0,
@@ -352,7 +376,7 @@
"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"],
"material" : ["steel", "null"],
"volume" : 1,
"cutting" : 0,
"recoil_modifier" : 0,
@@ -377,7 +401,7 @@
"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"],
"material" : ["steel", "null"],
"volume" : 1,
"cutting" : 0,
"recoil_modifier" : 0,
@@ -402,7 +426,7 @@
"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"],
"material" : ["steel", "null"],
"volume" : 2,
"cutting" : 0,
"recoil_modifier" : 0,
@@ -427,7 +451,7 @@
"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"],
"material" : ["steel", "null"],
"volume" : 2,
"cutting" : 0,
"recoil_modifier" : 0,
@@ -451,7 +475,7 @@
"to_hit" : -1,
"color" : "magenta",
"symbol" : ":",
"material" : ["STEEL", "NULL"],
"material" : ["steel", "null"],
"mod_targets" : ["rifle"],
"volume" : 4,
"bashing" : 6,
@@ -475,7 +499,7 @@
"to_hit" : -1,
"color" : "green",
"symbol" : ":",
"material" : ["STEEL", "NULL"],
"material" : ["steel", "null"],
"mod_targets" : ["rifle"],
"volume" : 1,
"bashing" : 0,
@@ -500,7 +524,7 @@
"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"],
"material" : ["steel", "null"],
"volume" : 2,
"cutting" : 0,
"recoil_modifier" : 0,
@@ -525,7 +549,7 @@
"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"],
"material" : ["steel", "null"],
"volume" : 2,
"cutting" : 16,
"recoil_modifier" : 3,
@@ -550,7 +574,7 @@
"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"],
"material" : ["steel", "null"],
"volume" : 2,
"cutting" : 0,
"recoil_modifier" : 0,
@@ -575,7 +599,7 @@
"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"],
"material" : ["steel", "wood"],
"volume" : 2,
"cutting" : 0,
"recoil_modifier" : 0,
+75 -158
View File
@@ -8,7 +8,7 @@
"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.",
"rarity": 12,
"price": 100,
"material": "IRON",
"material": "iron",
"flags": "MODE_BURST",
"skill": "pistol",
"ammo": "nail",
@@ -19,7 +19,7 @@
"to_hit": 1,
"ranged_damage": 0,
"range": 0,
"accuracy": 20,
"accuracy": 40,
"recoil": 0,
"durability": 8,
"burst": 5,
@@ -36,7 +36,7 @@
"description": "Popular among children. It's fairly accurate, but BBs deal nearly no damage. It could be used to practice your rifle skill up to level 1.",
"rarity": 10,
"price": 100,
"material": ["IRON", "WOOD"],
"material": ["iron", "wood"],
"skill": "rifle",
"ammo": "BB",
"weight": 16,
@@ -63,7 +63,7 @@
"description": "A leather sling, it is easy to use and accurate, but pebbles do little damage. Pebbles are used as ammunition.",
"rarity": 5,
"price": 50,
"material": "LEATHER",
"material": "leather",
"flags": "RELOAD_AND_SHOOT",
"skill": "throw",
"ammo": "pebble",
@@ -91,7 +91,7 @@
"description": "A wooden slingshot, it is easy to use and accurate, but pebbles do little damage. Pebbles are used as ammunition.",
"rarity": 5,
"price": 50,
"material": "WOOD",
"material": "wood",
"flags": "RELOAD_AND_SHOOT",
"skill": "archery",
"ammo": "pebble",
@@ -110,89 +110,6 @@
"reload": 100
},
{
"id": "crossbow",
"type": "GUN",
"symbol": "(",
"color": "green",
"name": "crossbow",
"description": "A slow-loading hand weapon that launches bolts. Stronger people can reload it much faster. Bolts fired from this weapon have a good chance of remaining intact for re-use.",
"rarity": 2,
"price": 1000,
"material": ["IRON", "WOOD"],
"flags": "STR_RELOAD",
"skill": "archery",
"ammo": "bolt",
"weight": 9,
"volume": 6,
"bashing": 11,
"cutting": 0,
"to_hit": 1,
"ranged_damage": 0,
"range": 10,
"accuracy": 18,
"recoil": 0,
"durability": 6,
"burst": 0,
"clip_size": 1,
"reload": 800
},
{
"id": "compbow",
"type": "GUN",
"symbol": "(",
"color": "yellow",
"name": "compound bow",
"description": "A bow with wheels that fires high velocity arrows. Weaker people can use compound bows more easily. Arrows fired from this weapon have a good chance of remaining intact for re-use. It requires 8 strength to fire",
"rarity": 2,
"price": 1400,
"material": ["STEEL", "PLASTIC"],
"flags": ["STR8_DRAW", "RELOAD_AND_SHOOT"],
"skill": "archery",
"ammo": "arrow",
"weight": 8,
"volume": 12,
"bashing": 8,
"cutting": 0,
"to_hit": 1,
"ranged_damage": 0,
"range": 10,
"accuracy": 20,
"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 feathered arrows. This takes a fair amount of strength to draw. Arrows fired from this weapon have a good chance of remaining intact for re-use. It requires 10 strength to fire",
"rarity": 5,
"price": 800,
"material": "WOOD",
"flags": ["STR10_DRAW", "RELOAD_AND_SHOOT"],
"skill": "archery",
"ammo": "arrow",
"weight": 4,
"volume": 8,
"bashing": 10,
"cutting": 0,
"to_hit": 0,
"ranged_damage": 0,
"range": 10,
"accuracy": 12,
"recoil": 0,
"durability": 6,
"burst": 0,
"clip_size": 1,
"reload": 80
},
{
"id": "rifle_22",
@@ -203,7 +120,7 @@
"description": "A home-made rifle. It is simply a pipe attached to a stock, with a hammer to strike the single round it holds.",
"rarity": 0,
"price": 800,
"material": ["IRON", "WOOD"],
"material": ["iron", "wood"],
"skill": "rifle",
"ammo": ".22",
"weight": 13,
@@ -230,7 +147,7 @@
"description": "A home-made rifle. It is simply a pipe attached to a stock, with a hammer to strike the single round it holds.",
"rarity": 0,
"price": 900,
"material": ["IRON", "WOOD"],
"material": ["iron", "wood"],
"skill": "rifle",
"ammo": "9mm",
"weight": 16,
@@ -257,7 +174,7 @@
"description": "A home-made machine pistol. It features a rudimentary blowback system, which allows for small bursts.",
"rarity": 0,
"price": 1050,
"material": ["IRON", "WOOD"],
"material": ["iron", "wood"],
"flags": "MODE_BURST",
"skill": "smg",
"ammo": "9mm",
@@ -285,7 +202,7 @@
"description": "A home-made machine pistol. It features a rudimentary blowback system, which allows for small bursts.",
"rarity": 0,
"price": 1150,
"material": ["IRON", "WOOD"],
"material": ["iron", "wood"],
"flags": "MODE_BURST",
"skill": "smg",
"ammo": ".45",
@@ -313,7 +230,7 @@
"description": "A popular, very small .22 pistol. \"Ergonomically designed to give the best shooting experience.\" --SIG Sauer official website",
"rarity": 5,
"price": 1200,
"material": ["STEEL", "PLASTIC"],
"material": ["steel", "plastic"],
"skill": "pistol",
"ammo": ".22",
"weight": 6,
@@ -340,7 +257,7 @@
"description": "A popular .22 pistol. \"Ideal for competitive target shooting or recreational shooting.\" --Smith & Wesson official website",
"rarity": 5,
"price": 1250,
"material": ["STEEL", "PLASTIC"],
"material": ["steel", "plastic"],
"skill": "pistol",
"ammo": ".22",
"weight": 10,
@@ -367,7 +284,7 @@
"description": "Possibly the most popular pistol in existance. The Glock 19 is often derided for its plastic contruction, but it is easy to shoot.",
"rarity": 7,
"price": 1400,
"material": ["STEEL", "PLASTIC"],
"material": ["steel", "plastic"],
"skill": "pistol",
"ammo": "9mm",
"weight": 5,
@@ -394,7 +311,7 @@
"description": "A popular 9mm pistol, widely used among law enforcement. Extensively tested for durability, it has been found to stay accurate even after subjected to extreme abuse.",
"rarity": 6,
"price": 1450,
"material": ["STEEL", "PLASTIC"],
"material": ["steel", "plastic"],
"skill": "pistol",
"ammo": "9mm",
"weight": 6,
@@ -421,7 +338,7 @@
"description": "A seven-round .38 revolver sold by Smith & Wesson. It features a fixed rear sight and a reinforced frame.",
"rarity": 4,
"price": 1450,
"material": ["STEEL", "PLASTIC"],
"material": ["steel", "plastic"],
"flags": "RELOAD_ONE",
"skill": "pistol",
"ammo": ".38",
@@ -449,7 +366,7 @@
"description": "A popular .38 pistol. Designed with numerous safety features and built from high-quality, durable materials.",
"rarity": 4,
"price": 1500,
"material": ["STEEL", "PLASTIC"],
"material": ["steel", "plastic"],
"skill": "pistol",
"ammo": ".38",
"weight": 6,
@@ -476,7 +393,7 @@
"description": "Originally marketed as a lightweight and compact alternative to older SIG handguns, the Pro .40 is popular among European police forces.",
"rarity": 4,
"price": 1500,
"material": ["STEEL", "PLASTIC"],
"material": ["steel", "plastic"],
"skill": "pistol",
"ammo": ".40",
"weight": 6,
@@ -503,7 +420,7 @@
"description": "The Smith and Wesson 610 is a classic six-shooter revolver chambered for 10mm rounds, or for S&W's own .40 round.",
"rarity": 2,
"price": 1460,
"material": ["STEEL", "WOOD"],
"material": ["steel", "wood"],
"flags": "RELOAD_ONE",
"skill": "pistol",
"ammo": ".40",
@@ -531,7 +448,7 @@
"description": "One of the most powerful handguns in the world when it was released in 1979, the Redhawk offers very sturdy contruction, with an appearance that is reminiscent of \"Wild West\" revolvers.",
"rarity": 3,
"price": 1560,
"material": ["STEEL", "WOOD"],
"material": ["steel", "wood"],
"flags": "RELOAD_ONE",
"skill": "pistol",
"ammo": ".44",
@@ -559,7 +476,7 @@
"description": "One of the most recognizable handguns due to its popularity in movies, the \"Deagle\" is better known for its menacing appearance than its performace. It's highly innaccurate, but its heavy weight reduces recoil.",
"rarity": 2,
"price": 1750,
"material": ["STEEL", "PLASTIC"],
"material": ["steel", "plastic"],
"skill": "pistol",
"ammo": ".44",
"weight": 17,
@@ -586,7 +503,7 @@
"description": "A popular .45 pistol, widely used among law enforcement. Extensively tested for durability, it has been found to stay accurate even after subjected to extreme abuse.",
"rarity": 6,
"price": 1600,
"material": ["STEEL", "PLASTIC"],
"material": ["steel", "plastic"],
"skill": "pistol",
"ammo": ".45",
"weight": 7,
@@ -613,7 +530,7 @@
"description": "The M1911 was the standard-issue sidearm from the US Military for most of the 20th Century. It remains one of the most popular .45 pistols today.",
"rarity": 5,
"price": 1680,
"material": ["STEEL", "PLASTIC"],
"material": ["steel", "plastic"],
"skill": "pistol",
"ammo": ".45",
"weight": 10,
@@ -640,7 +557,7 @@
"description": "Designed to work with FN's proprietary 5.7x28mm round, the Five-Seven is a lightweight pistol with a very high capacity, best used against armored opponents.",
"rarity": 2,
"price": 1550,
"material": ["STEEL", "PLASTIC"],
"material": ["steel", "plastic"],
"skill": "pistol",
"ammo": "5.7mm",
"weight": 5,
@@ -667,7 +584,7 @@
"description": "Designed to work with H&K's proprietary 4.6x30mm round, the UCP is a small pistol with a very high capacity, best used against armored opponents.",
"rarity": 2,
"price": 1500,
"material": ["STEEL", "PLASTIC"],
"material": ["steel", "plastic"],
"skill": "pistol",
"ammo": "4.6mm",
"weight": 5,
@@ -694,7 +611,7 @@
"description": "The Norinco manufactured Tokarev TT-30 is the standard sidearm of the Chinese military, it does not see extensive use outside of China.",
"rarity": 7,
"price": 1400,
"material": ["STEEL", "PLASTIC"],
"material": ["steel", "plastic"],
"skill": "pistol",
"ammo": "7.62x25mm",
"weight": 12,
@@ -721,7 +638,7 @@
"description": "The barrels of shotguns are often sawed in half to make it more maneuverable and concealable. This has the added effect of reducing accuracy greatly.",
"rarity": 1,
"price": 700,
"material": ["IRON", "WOOD"],
"material": ["iron", "wood"],
"flags": "RELOAD_ONE",
"skill": "shotgun",
"ammo": "shot",
@@ -749,7 +666,7 @@
"description": "The Saiga-12 shotgun is designed on the same Kalishnikov pattern as the AK47 rifle. It reloads with a magazine, rather than one shell at a time like most shotguns. This one has had the barrel cut short, vastly reducing accuracy but making it more portable",
"rarity": 1,
"price": 700,
"material": ["IRON", "WOOD"],
"material": ["iron", "wood"],
"flags": "MODE_BURST",
"skill": "shotgun",
"ammo": "shot",
@@ -777,7 +694,7 @@
"description": "An old shotgun, possibly antique. It is little more than a barrel, a wood stock, and a hammer to strike the cartridge. Its simple design keeps it both light and accurate.",
"rarity": 1,
"price": 600,
"material": ["IRON", "WOOD"],
"material": ["iron", "wood"],
"skill": "shotgun",
"ammo": "shot",
"weight": 20,
@@ -804,7 +721,7 @@
"description": "An old shotgun, possibly antique. It is little more than a pair of barrels, a wood stock, and a hammer to strike the cartridges.",
"rarity": 2,
"price": 1050,
"material": ["IRON", "WOOD"],
"material": ["iron", "wood"],
"flags": ["RELOAD_ONE", "MODE_BURST"],
"skill": "shotgun",
"ammo": "shot",
@@ -832,7 +749,7 @@
"description": "One of the most popular shotguns on the market, the Remington 870 is used by hunters and law enforcement agencies alike thanks to its high accuracy and muzzle velocity.",
"rarity": 9,
"price": 2200,
"material": ["STEEL", "PLASTIC"],
"material": ["steel", "plastic"],
"flags": ["RELOAD_ONE", "MODE_BURST"],
"skill": "shotgun",
"ammo": "shot",
@@ -860,7 +777,7 @@
"description": "The Mossberg 500 is a popular series of pump-action shotguns, often acquired for military use. It is noted for its high durability and low recoil.",
"rarity": 5,
"price": 2250,
"material": ["STEEL", "PLASTIC"],
"material": ["steel", "plastic"],
"flags": ["RELOAD_ONE", "MODE_BURST"],
"skill": "shotgun",
"ammo": "shot",
@@ -888,7 +805,7 @@
"description": "The Saiga-12 shotgun is designed on the same Kalishnikov pattern as the AK47 rifle. It reloads with a magazine, rather than one shell at a time like most shotguns.",
"rarity": 3,
"price": 2300,
"material": ["STEEL", "PLASTIC"],
"material": ["steel", "plastic"],
"flags": "MODE_BURST",
"skill": "shotgun",
"ammo": "shot",
@@ -916,7 +833,7 @@
"description": "The American-180 is a submachine gun developed in the 1960's that fires .22 LR, unusual for an SMG. Though the round is low-powered, the high rate of fire and large magazine makes the 180 a formidable weapon.",
"rarity": 2,
"price": 1600,
"material": "STEEL",
"material": "steel",
"flags": "MODE_BURST",
"skill": "smg",
"ammo": ".22",
@@ -944,7 +861,7 @@
"description": "The Uzi 9mm has enjoyed immense popularity, selling more units than any other submachine gun. It is widely used as a personal defense weapon, or as a primary weapon by elite frontline forces.",
"rarity": 8,
"price": 2080,
"material": "STEEL",
"material": "steel",
"flags": "MODE_BURST",
"skill": "smg",
"ammo": "9mm",
@@ -972,7 +889,7 @@
"description": "The TEC-9 is a machine pistol made of cheap polymers and machine stamped parts. Its rise in popularity among criminals is largely due to its intimidating looks and low price.",
"rarity": 10,
"price": 1750,
"material": "STEEL",
"material": "steel",
"flags": "MODE_BURST",
"skill": "smg",
"ammo": "9mm",
@@ -1000,7 +917,7 @@
"description": "The Calico M960 is an automatic carbine with a unique circular magazine that allows for high capacities and reduced recoil.",
"rarity": 6,
"price": 2400,
"material": "STEEL",
"material": "steel",
"flags": "MODE_BURST",
"skill": "smg",
"ammo": "9mm",
@@ -1028,7 +945,7 @@
"description": "The Heckler & Koch MP5 is one of the most widely-used submachine guns in the world, and has been adopted by special police forces and militaries alike. Its high degree of accuracy and low recoil are universally praised.",
"rarity": 12,
"price": 2800,
"material": ["STEEL", "PLASTIC"],
"material": ["steel", "plastic"],
"flags": "MODE_BURST",
"skill": "smg",
"ammo": "9mm",
@@ -1056,7 +973,7 @@
"description": "The MAC-10 is a popular machine pistol originally designed for military use. For many years they were the most inexpensive automatic weapon in the US, and enjoyed great popularity among criminals less concerned with quality firearms.",
"rarity": 14,
"price": 1800,
"material": "STEEL",
"material": "steel",
"flags": "MODE_BURST",
"skill": "smg",
"ammo": ".45",
@@ -1084,7 +1001,7 @@
"description": "Developed as a successor to the MP5 submachine gun, the UMP45 retains the earlier model's supreme accuracy and low recoil, but in the higher .45 caliber.",
"rarity": 12,
"price": 3000,
"material": ["STEEL", "PLASTIC"],
"material": ["steel", "plastic"],
"flags": "MODE_BURST",
"skill": "smg",
"ammo": ".45",
@@ -1112,7 +1029,7 @@
"description": "The TDI Vector is a submachine gun with a unique, in-line design that makes recoil very managable, even in the powerful .45 caliber.",
"rarity": 4,
"price": 4200,
"material": ["STEEL", "PLASTIC"],
"material": ["steel", "plastic"],
"flags": "MODE_BURST",
"skill": "smg",
"ammo": ".45",
@@ -1140,7 +1057,7 @@
"description": "The first in a new genre of guns, termed \"personal defense weapons.\" FN designed the P90 to use their proprietary 5.7x28mm ammunition. It is made for firing bursts manageably.",
"rarity": 7,
"price": 4000,
"material": ["STEEL", "PLASTIC"],
"material": ["steel", "plastic"],
"flags": "MODE_BURST",
"skill": "smg",
"ammo": "5.7mm",
@@ -1168,7 +1085,7 @@
"description": "Designed by Heckler & Koch as a competitor to the FN P90, as well as a successor to the extremely popular H&K MP5. Using H&K's proprietary 4.6x30mm ammunition, it is designed for burst fire.",
"rarity": 5,
"price": 3400,
"material": ["STEEL", "PLASTIC"],
"material": ["steel", "plastic"],
"flags": "MODE_BURST",
"skill": "smg",
"ammo": "4.6mm",
@@ -1196,7 +1113,7 @@
"description": "The Soviet made PPSh-41, chambered in 7.62 Tokarev provides a relatively large ammunition capacity, coupled with low recoil and decent accuracy.",
"rarity": 12,
"price": 2800,
"material": ["STEEL", "WOOD"],
"material": ["steel", "wood"],
"flags": "MODE_BURST",
"skill": "smg",
"ammo": "7.62x25mm",
@@ -1224,7 +1141,7 @@
"description": "The oldest and longest-produced shoulder firearm in the world. Though it fires the weak .22 round, it is highly accurate and damaging, and has essentially no recoil.",
"rarity": 14,
"price": 1600,
"material": ["IRON", "WOOD"],
"material": ["iron", "wood"],
"flags": "RELOAD_ONE",
"skill": "rifle",
"ammo": ".22",
@@ -1252,7 +1169,7 @@
"description": "A popular and highly accurate .22 rifle. At the time of its introduction in 1964, it was one of the first modern .22 rifles designed for quality, and not as a gun for children.",
"rarity": 12,
"price": 1650,
"material": ["IRON", "WOOD"],
"material": ["iron", "wood"],
"skill": "rifle",
"ammo": ".22",
"weight": 23,
@@ -1279,7 +1196,7 @@
"description": "A very popular rifle for hunting and sniping. Its low ammo capacity is offset by the very powerful .30-06 round it fires.",
"rarity": 8,
"price": 3500,
"material": ["IRON", "WOOD"],
"material": ["iron", "wood"],
"flags": "RELOAD_ONE",
"skill": "rifle",
"ammo": ".30-06",
@@ -1307,7 +1224,7 @@
"description": "A very popular and durable hunting or sniping rifle. Popular among SWAT and US Marine snipers. Highly damaging, but perhaps not as accurate as the competing Browning BLR.",
"rarity": 14,
"price": 3200,
"material": ["IRON", "WOOD"],
"material": ["iron", "wood"],
"flags": "RELOAD_ONE",
"skill": "rifle",
"ammo": ".30-06",
@@ -1335,7 +1252,7 @@
"description": "Developed by the Soviets in 1945, this rifle was quickly replaced by the full-auto AK47. However, due to its superb accuracy and low recoil, this gun maintains immense popularity.",
"rarity": 12,
"price": 3000,
"material": ["IRON", "WOOD"],
"material": ["iron", "wood"],
"skill": "rifle",
"ammo": "7.62x39mm",
"weight": 34,
@@ -1362,7 +1279,7 @@
"description": "A small, lightweight semi-auto carbine designed for military use. Its superb accuracy and low recoil makes it more suitable than full-auto rifles for some situations.",
"rarity": 12,
"price": 3200,
"material": ["IRON", "WOOD"],
"material": ["iron", "wood"],
"skill": "rifle",
"ammo": ".223",
"weight": 26,
@@ -1389,7 +1306,7 @@
"description": "A very accurate rifle chambered for the powerful .308 round. Its very low ammo capacity is offset by its accuracy and near-complete lack of recoil.",
"rarity": 10,
"price": 3280,
"material": ["STEEL", "PLASTIC"],
"material": ["steel", "plastic"],
"flags": "RELOAD_ONE",
"skill": "rifle",
"ammo": ".308",
@@ -1417,7 +1334,7 @@
"description": "An early battle rifle developed after the end of WWII. The G3 is designed to unload large amounts of deadly ammunition, but it is less suitable over long ranges.",
"rarity": 15,
"price": 5050,
"material": ["IRON", "WOOD"],
"material": ["iron", "wood"],
"flags": "MODE_BURST",
"skill": "rifle",
"ammo": ".308",
@@ -1445,7 +1362,7 @@
"description": "Designed as a replacement for the early H&K G3 battle rifle, the G36 is more accurate, and uses the much-lighter .223 round, allowing for a higher ammo capacity.",
"rarity": 17,
"price": 5100,
"material": ["IRON", "PLASTIC"],
"material": ["iron", "plastic"],
"flags": "MODE_BURST",
"skill": "rifle",
"ammo": ".223",
@@ -1473,7 +1390,7 @@
"description": "One of the most recognizable assault rifles ever made, the AK-47 is renowned for its durability even under the worst conditions.",
"rarity": 16,
"price": 4000,
"material": ["IRON", "WOOD"],
"material": ["iron", "wood"],
"flags": "MODE_BURST",
"skill": "rifle",
"ammo": "7.62x39mm",
@@ -1501,7 +1418,7 @@
"description": "A Belgian-designed battle rifle, the FN FAL is not very accurate for a rifle, but its high fire rate and powerful .308 ammunition have made it one of the most widely-used battle rifles in the world.",
"rarity": 16,
"price": 4500,
"material": ["IRON", "WOOD"],
"material": ["iron", "wood"],
"flags": "MODE_BURST",
"skill": "rifle",
"ammo": ".308",
@@ -1529,7 +1446,7 @@
"description": "This carbine was developed for military use in the early 21st century. It is damaging and accurate, though its rate of fire is a bit slower than competing .223 carbines.",
"rarity": 4,
"price": 4200,
"material": ["STEEL", "PLASTIC"],
"material": ["steel", "plastic"],
"flags": "MODE_BURST",
"skill": "rifle",
"ammo": ".223",
@@ -1557,7 +1474,7 @@
"description": "A widely used assault rifle and the father of popular rifles such as the M16. It is light and accurate, but not very durable.",
"rarity": 9,
"price": 4000,
"material": ["STEEL", "PLASTIC"],
"material": ["steel", "plastic"],
"flags": "MODE_BURST",
"skill": "rifle",
"ammo": ".223",
@@ -1585,7 +1502,7 @@
"description": "A popular carbine, long used by the US military. Though accurate, small, and lightweight, it is infamous for its fragility, particularly in less-than- ideal terrain.",
"rarity": 7,
"price": 4400,
"material": ["STEEL", "PLASTIC"],
"material": ["steel", "plastic"],
"flags": "MODE_BURST",
"skill": "rifle",
"ammo": ".223",
@@ -1613,7 +1530,7 @@
"description": "A modular assault rifle designed for use by US Special Ops units. The 'L' in its name stands for light, as it uses the lightweight .223 round. It is very accurate and low on recoil.",
"rarity": 6,
"price": 4800,
"material": ["STEEL", "PLASTIC"],
"material": ["steel", "plastic"],
"flags": "MODE_BURST",
"skill": "rifle",
"ammo": ".223",
@@ -1641,7 +1558,7 @@
"description": "A modular assault rifle designed for use by US Special Ops units. The 'H' in its name stands for heavy, as it uses the powerful .308 round. It is fairly accurate and low on recoil.",
"rarity": 5,
"price": 4950,
"material": ["STEEL", "PLASTIC"],
"material": ["steel", "plastic"],
"flags": "MODE_BURST",
"skill": "rifle",
"ammo": ".308",
@@ -1669,7 +1586,7 @@
"description": "The Steyr AUG is an Austrian assault rifle that uses a bullpup design. It is used in the armed forces and police forces of many nations, and enjoys low recoil and high accuracy.",
"rarity": 6,
"price": 4900,
"material": ["STEEL", "PLASTIC"],
"material": ["steel", "plastic"],
"flags": "MODE_BURST",
"skill": "rifle",
"ammo": ".223",
@@ -1697,7 +1614,7 @@
"description": "The M249 is a mountable machine gun used by the US military and SWAT teams. Quite innaccurate and difficult to control, the M249 is designed to fire many rounds very quickly.",
"rarity": 1,
"price": 7500,
"material": ["STEEL", "PLASTIC"],
"material": ["steel", "plastic"],
"flags": "MODE_BURST",
"skill": "rifle",
"ammo": ".223",
@@ -1725,7 +1642,7 @@
"description": "The V29 laser pistol was designed in the mid-21st century, and was one of the first firearms to use fusion as its ammunition. It is larger than most traditional handguns, but displays no recoil whatsoever.",
"rarity": 1,
"price": 7200,
"material": ["STEEL", "PLASTIC"],
"material": ["steel", "plastic"],
"skill": "pistol",
"ammo": "fusion",
"weight": 6,
@@ -1752,7 +1669,7 @@
"description": "A very powerful fusion rifle developed shortly before the influx of monsters. It can only hold two rounds at a time, but a special superheating unit causes its bolts to be extremely deadly.",
"rarity": 1,
"price": 9800,
"material": ["STEEL", "PLASTIC"],
"material": ["steel", "plastic"],
"skill": "rifle",
"ammo": "fusion",
"weight": 20,
@@ -1779,7 +1696,7 @@
"description": "A multi-purpose rifle, designed for use in conjunction with a unified power supply, or UPS. It does not reload normally; instead, press fire once to start charging it from your UPS, then again to unload the charge.",
"rarity": 1,
"price": 12000,
"material": ["STEEL", "PLASTIC"],
"material": ["steel", "plastic"],
"flags": ["CHARGE", "NO_UNLOAD"],
"skill": "rifle",
"ammo": "none",
@@ -1807,7 +1724,7 @@
"description": "A simple, home-made flamethrower. While its capacity is not superb, it is more than capable of igniting terrain and monsters alike.",
"rarity": 1,
"price": 1600,
"material": ["STEEL", "PLASTIC"],
"material": ["steel", "plastic"],
"flags": "FIRE_100",
"skill": "shotgun",
"ammo": "gasoline",
@@ -1835,7 +1752,7 @@
"description": "A large flamethrower with substantial gas reserves. Very menacing and deadly.",
"rarity": 1,
"price": 3800,
"material": "STEEL",
"material": "steel",
"flags": "FIRE_100",
"skill": "shotgun",
"ammo": "gasoline",
@@ -1863,7 +1780,7 @@
"description": "A simple, home-made grenade launcher. Basically a tube with a pin firing mechanism to activate the grenade.",
"rarity": 0,
"price": 400,
"material": ["STEEL", "WOOD"],
"material": ["steel", "wood"],
"skill": "launcher",
"ammo": "40mm",
"weight": 20,
@@ -1890,7 +1807,7 @@
"description": "A widely-used grenade launcher that first saw use by American forces in the Vietnam war. Though mostly replaced by more modern launchers, the M79 still sees use with many units worldwide.",
"rarity": 5,
"price": 4000,
"material": ["STEEL", "WOOD"],
"material": ["steel", "wood"],
"skill": "launcher",
"ammo": "40mm",
"weight": 24,
@@ -1917,7 +1834,7 @@
"description": "Developed by Heckler & Koch, the M320 grenade launcher has the functionality of larger launchers in a very small package. However, its smaller size contributes to a lack of accuracy.",
"rarity": 10,
"price": 8500,
"material": "STEEL",
"material": "steel",
"skill": "launcher",
"ammo": "40mm",
"weight": 13,
@@ -1944,7 +1861,7 @@
"description": "The Milkor Multi-Grenade Launcher is designed to compensate for the drawback of single-shot grenade launchers by allowing sustained heavy firepower. However, it is still slow to reload and must be used with careful planning.",
"rarity": 6,
"price": 10400,
"material": "STEEL",
"material": "steel",
"flags": ["RELOAD_ONE", "MODE_BURST"],
"skill": "launcher",
"ammo": "40mm",
@@ -1969,10 +1886,10 @@
"symbol": "(",
"color": "light_red",
"name": "M72 LAW",
"description": "A single use rocket launcher, developed during WW2 as a countermeasure to the increasing prevalance of tanks. Once fired, it cannot be reloaded and must be disposed of.",
"description": "A disposable light anti-tank rocket launcher. Once fired, it cannot be reloaded and must be disposed of.",
"rarity": 200,
"price": 8500,
"material": "STEEL",
"material": "steel",
"flags": ["NO_UNLOAD", "BACKBLAST"],
"skill": "launcher",
"ammo": "66mm",
@@ -2000,7 +1917,7 @@
"description": "A homemade gun, using electromagnets to accelerate a ferromagnetic projectile to high velocity. Powered by UPS.",
"rarity": 1,
"price": 200,
"material": "IRON",
"material": "iron",
"flags": "USE_UPS",
"skill": "pistol",
"ammo": "nail",
@@ -2028,7 +1945,7 @@
"description": "Developed by Heckler & Koch in 2033, the railgun magnetically propels a ferromagnetic projectile using an alternating current. This makes it silent while still deadly. Powered by UPS.",
"rarity": 2,
"price": 9200,
"material": "STEEL",
"material": "steel",
"flags": "USE_UPS",
"skill": "rifle",
"ammo": "12mm",
@@ -2056,7 +1973,7 @@
"description": "Boeing developed the focused plasma weaponry together with DARPA. It heats hydrogen to create plasma and envelops it with polymers to reduce blooming. While powerful, it suffers from short range. Powered by UPS.",
"rarity": 1,
"price": 13000,
"material": "STEEL",
"material": "steel",
"flags": ["USE_UPS", "MODE_BURST"],
"skill": "rifle",
"ammo": "plasma",
@@ -2084,7 +2001,7 @@
"description": "A shotgun modified to use a revolver cylinder mechanism, it can hold 6 cartridges.",
"rarity": 1,
"price": 600,
"material": ["IRON", "WOOD"],
"material": ["iron", "wood"],
"flags": "RELOAD_ONE",
"skill": "shotgun",
"ammo": "shot",
+359 -164
View File
File diff suppressed because it is too large Load Diff
+73 -35
View File
@@ -6,9 +6,11 @@
"cut_resist" : 0,
"bash_dmg_verb" : "damaged",
"cut_dmg_verb" : "damaged",
"dmg_adj" : ["lightly damaged", "damaged", "very damaged", "thoroughly damaged"],
"acid_resist" : 0,
"elec_resist" : 0,
"fire_resist" : 0
"fire_resist" : 0,
"density" : 1
},
{
"ident" : "veggy",
@@ -17,9 +19,11 @@
"cut_resist" : 1,
"bash_dmg_verb" : "ripped",
"cut_dmg_verb" : "cut",
"acid_resist" : 0,
"dmg_adj" : ["lightly damaged", "damaged", "very damaged", "thoroughly damaged"],
"acid_resist" : 1,
"elec_resist" : 1,
"fire_resist" : 0
"fire_resist" : 0,
"density" : 4
},
{
"ident" : "flesh",
@@ -28,9 +32,11 @@
"cut_resist" : 1,
"bash_dmg_verb" : "bruised",
"cut_dmg_verb" : "sliced",
"acid_resist" : 0,
"dmg_adj" : ["bruised", "mutilated", "badly mutilated", "thoroughly mutilated"],
"acid_resist" : 1,
"elec_resist" : 1,
"fire_resist" : 0
"fire_resist" : 0,
"density" : 5
},
{
"ident" : "powder",
@@ -39,9 +45,11 @@
"cut_resist" : 1,
"bash_dmg_verb" : "damaged",
"cut_dmg_verb" : "damaged",
"dmg_adj" : ["lightly damaged", "damaged", "very damaged", "thoroughly damaged"],
"acid_resist" : 0,
"elec_resist" : 2,
"fire_resist" : 0
"fire_resist" : 0,
"density" : 1
},
{
"ident" : "hflesh",
@@ -50,9 +58,11 @@
"cut_resist" : 1,
"bash_dmg_verb" : "bruised",
"cut_dmg_verb" : "sliced",
"acid_resist" : 0,
"dmg_adj" : ["bruised", "mutilated", "badly mutilated", "thoroughly mutilated"],
"acid_resist" : 1,
"elec_resist" : 1,
"fire_resist" : 0
"fire_resist" : 0,
"density" : 5
},
{
"ident" : "cotton",
@@ -61,9 +71,11 @@
"cut_resist" : 1,
"bash_dmg_verb" : "ripped",
"cut_dmg_verb" : "cut",
"acid_resist" : 0,
"dmg_adj" : ["ripped", "torn", "shredded", "tattered"],
"acid_resist" : 1,
"elec_resist" : 2,
"fire_resist" : 0
"fire_resist" : 0,
"density" : 3
},
{
"ident" : "wool",
@@ -72,9 +84,11 @@
"cut_resist" : 1,
"bash_dmg_verb" : "torn",
"cut_dmg_verb" : "cut",
"acid_resist" : 0,
"dmg_adj" : ["ripped", "torn", "shredded", "tattered"],
"acid_resist" : 1,
"elec_resist" : 2,
"fire_resist" : 0
"fire_resist" : 0,
"density" : 9
},
{
"ident" : "leather",
@@ -83,9 +97,11 @@
"cut_resist" : 2,
"bash_dmg_verb" : "ripped",
"cut_dmg_verb" : "sliced",
"acid_resist" : 0,
"dmg_adj" : ["scratched", "cut", "shredded", "tattered"],
"acid_resist" : 1,
"elec_resist" : 2,
"fire_resist" : 1
"fire_resist" : 1,
"density" : 6
},
{
"ident" : "kevlar",
@@ -94,9 +110,11 @@
"cut_resist" : 4,
"bash_dmg_verb" : "ripped",
"cut_dmg_verb" : "cut",
"acid_resist" : 0,
"dmg_adj" : ["marked", "dented", "scarred", "broken"],
"acid_resist" : 2,
"elec_resist" : 2,
"fire_resist" : 1
"fire_resist" : 1,
"density" : 10
},
{
"ident" : "fur",
@@ -105,9 +123,11 @@
"cut_resist" : 2,
"bash_dmg_verb" : "ripped",
"cut_dmg_verb" : "sliced",
"acid_resist" : 0,
"dmg_adj" : ["ripped", "torn", "shredded", "tattered"],
"acid_resist" : 1,
"elec_resist" : 2,
"fire_resist" : 0
"fire_resist" : 0,
"density" : 9
},
{
"ident" : "chitin",
@@ -116,9 +136,11 @@
"cut_resist" : 4,
"bash_dmg_verb" : "cracked",
"cut_dmg_verb" : "chipped",
"acid_resist" : 0,
"dmg_adj" : ["scratched", "cut", "cracked", "shattered"],
"acid_resist" : 1,
"elec_resist" : 2,
"fire_resist" : 2
"fire_resist" : 2,
"density" : 10
},
{
"ident" : "stone",
@@ -127,9 +149,11 @@
"cut_resist" : 6,
"bash_dmg_verb" : "cracked",
"cut_dmg_verb" : "chipped",
"acid_resist" : 2,
"dmg_adj" : ["scratched", "cut", "cracked", "shattered"],
"acid_resist" : 3,
"elec_resist" : 2,
"fire_resist" : 2
"fire_resist" : 2,
"density" : 17
},
{
"ident" : "paper",
@@ -138,9 +162,11 @@
"cut_resist" : 1,
"bash_dmg_verb" : "ripped",
"cut_dmg_verb" : "cut",
"acid_resist" : 0,
"dmg_adj" : ["ripped", "torn", "shredded", "tattered"],
"acid_resist" : 1,
"elec_resist" : 2,
"fire_resist" : 0
"fire_resist" : 0,
"density" : 4
},
{
"ident" : "wood",
@@ -149,9 +175,11 @@
"cut_resist" : 2,
"bash_dmg_verb" : "splintered",
"cut_dmg_verb" : "gouged",
"acid_resist" : 1,
"dmg_adj" : ["scratched", "chipped", "cracked", "splintered"],
"acid_resist" : 2,
"elec_resist" : 2,
"fire_resist" : 0
"fire_resist" : 0,
"density" : 4
},
{
"ident" : "plastic",
@@ -160,20 +188,24 @@
"cut_resist" : 2,
"bash_dmg_verb" : "dented",
"cut_dmg_verb" : "gouged",
"acid_resist" : 1,
"dmg_adj" : ["scratched", "cut", "cracked", "shattered"],
"acid_resist" : 2,
"elec_resist" : 2,
"fire_resist" : 0
"fire_resist" : 0,
"density" : 8
},
{
"ident" : "glass",
"name" : "Glass",
"bash_resist" : 1,
"bash_resist" : 3,
"cut_resist" : 4,
"bash_dmg_verb" : "cracked",
"cut_dmg_verb" : "scratched",
"acid_resist" : 2,
"dmg_adj" : ["scratched", "cut", "cracked", "shattered"],
"acid_resist" : 3,
"elec_resist" : 2,
"fire_resist" : 2
"fire_resist" : 2,
"density" : 14
},
{
"ident" : "iron",
@@ -182,9 +214,11 @@
"cut_resist" : 4,
"bash_dmg_verb" : "dented",
"cut_dmg_verb" : "scratched",
"dmg_adj" : ["marked", "dented", "smashed", "shattered"],
"acid_resist" : 0,
"elec_resist" : 0,
"fire_resist" : 2
"fire_resist" : 2,
"density" : 52
},
{
"ident" : "steel",
@@ -193,9 +227,11 @@
"cut_resist" : 6,
"bash_dmg_verb" : "dented",
"cut_dmg_verb" : "scratched",
"dmg_adj" : ["marked", "dented", "smashed", "shattered"],
"acid_resist" : 0,
"elec_resist" : 0,
"fire_resist" : 2
"fire_resist" : 2,
"density" : 52
},
{
"ident" : "silver",
@@ -204,8 +240,10 @@
"cut_resist" : 3,
"bash_dmg_verb" : "dented",
"cut_dmg_verb" : "scratched",
"acid_resist" : 0,
"dmg_adj" : ["marked", "dented", "smashed", "shattered"],
"acid_resist" : 2,
"elec_resist" : 0,
"fire_resist" : 2
"fire_resist" : 2,
"density" : 70
}
]
+8 -2
View File
@@ -39,9 +39,15 @@
"ident": "scoundrel",
"name": "Scoundrel",
"description":
"Your flexible outlook on law has ensured your survival, but now what?\nYou start with cargo pants, a hoodie, and \"sundries\".",
"Your flexible outlook on law has ensured your survival, but now what?\nYou start with cargo pants, a hoodie, \"sundries\", and one additional level of melee.",
"points": 2,
"items": ["tank_top", "hoodie", "pants_cargo", "sneakers", "weed", "picklocks"]
"items": ["tank_top", "hoodie", "pants_cargo", "sneakers", "weed", "picklocks"],
"skills" : [
{
"name" : "melee",
"level" : 1
}
]
},
{
+1935 -73
View File
File diff suppressed because it is too large Load Diff
+54 -27
View File
@@ -2,136 +2,163 @@
[
"dodge",
"dodge",
"Your skill at dodging, whether it be from an attack, a trap, or a natural\noccurrence. It is also used when attempting to fall gracefully, or in other\nacrobatic feats."
"Your skill at dodging, whether it be from an attack, a trap, or a natural\noccurrence. It is also used when attempting to fall gracefully, or in other\nacrobatic feats.",
[]
],
[
"melee",
"melee",
"Your skill at hand-to-hand combat, both with and without a weapon. At low\nlevels this merely increases your chance to hit, but at higher levels it also\nincreases the damage done significantly."
"Your skill at hand-to-hand combat, both with and without a weapon. At low\nlevels this merely increases your chance to hit, but at higher levels it also\nincreases the damage done significantly.",
[]
],
[
"unarmed",
"unarmed combat",
"Your skill at combat without a weapon. While at low levels, unarmed combat is\na good way to die quickly, those skilled in it can eventually use throws and\ncrushing blows to quickly dispatch enemies."
"Your skill at combat without a weapon. While at low levels, unarmed combat is\na good way to die quickly, those skilled in it can eventually use throws and\ncrushing blows to quickly dispatch enemies.",
[]
],
[
"bashing",
"bashing weapons",
"Your skill at combat with weapons that club or bash your enemies. This\nincludes everything from rocks to baseball bats, and even the butt of rifles.\nThis increases damage, and at higher levels will improve your chance to hit."
"Your skill at combat with weapons that club or bash your enemies. This\nincludes everything from rocks to baseball bats, and even the butt of rifles.\nThis increases damage, and at higher levels will improve your chance to hit.",
[]
],
[
"cutting",
"cutting weapons",
"Your skill at combat with weapons that cut or slice your enemies. At first\nthis will simply slightly increase accuracy and damage; later on it will\nhelp you bypass armor and thick hides."
"Your skill at combat with weapons that cut or slice your enemies. At first\nthis will simply slightly increase accuracy and damage; later on it will\nhelp you bypass armor and thick hides.",
[]
],
[
"stabbing",
"piercing weapons",
"Your skill at combat that involves piercing weapons. This includes spears,\nwhich only have a stabbing attack, and things like knives, which can cut or\npierce. This increases your accuracy and chance of a deadly critical."
"Your skill at combat that involves piercing weapons. This includes spears,\nwhich only have a stabbing attack, and things like knives, which can cut or\npierce. This increases your accuracy and chance of a deadly critical.",
[]
],
[
"throw",
"throwing",
"Your skill at throwing items and getting them to go where you want. Increases\nboth accuracy and, at higher levels, range."
"Your skill at throwing items and getting them to go where you want. Increases\nboth accuracy and, at higher levels, range.",
[]
],
[
"gun",
"firearms",
"Your general skill at firearms. This increases your accuracy with any gun,\nbut not as much as the skill associated with the gun in question."
"Your general skill at firearms. This increases your accuracy with any gun,\nbut not as much as the skill associated with the gun in question.",
[]
],
[
"pistol",
"handguns",
"Your skill with handguns. These have poor accuracy, but generally are fired\nand reloaded faster than other guns, and are good in close quarters."
"Your skill with handguns. These have poor accuracy, but generally are fired\nand reloaded faster than other guns, and are good in close quarters.",
["gun_type"]
],
[
"shotgun",
"shotguns",
"Your skill with shotguns. Shot is easy to hit with, and does massive damage,\nbut has short range. Shotguns may also be loaded with slugs, which go further\nand do as much damage, but are not very accurate."
"Your skill with shotguns. Shot is easy to hit with, and does massive damage,\nbut has short range. Shotguns may also be loaded with slugs, which go further\nand do as much damage, but are not very accurate.",
["gun_type"]
],
[
"smg",
"submachine guns",
"Your skill with submachine guns and machine pistols. Halfway between a pistol\nand an assault rifle, these weapons fire and reload quickly, and may fire in\nbursts, but they are not very accurate."
"Your skill with submachine guns and machine pistols. Halfway between a pistol\nand an assault rifle, these weapons fire and reload quickly, and may fire in\nbursts, but they are not very accurate.",
["gun_type"]
],
[
"rifle",
"rifles",
"Your skill with rifles, both assault rifles and semi-auto hunting rifles.\nThese have terrific range and accuracy, but are very slow to fire and reload,\nand are not very good in close quarters."
"Your skill with rifles, both assault rifles and semi-auto hunting rifles.\nThese have terrific range and accuracy, but are very slow to fire and reload,\nand are not very good in close quarters.",
["gun_type"]
],
[
"archery",
"archery",
"Your skill with all kinds of bows, from crossbows to handmade long bows.\nThese are quiet, but require some amount of strength to use, and are not\nterribly accurate. They can only be deadly in skilled hands."
"Your skill with all kinds of bows, from crossbows to handmade long bows.\nThese are quiet, but require some amount of strength to use, and are not\nterribly accurate. They can only be deadly in skilled hands.",
[]
],
[
"launcher",
"grenade launcher",
"Your skill with grenade launchers, whether standalone or as a rifle mod.\nThese launchers fire a variety of 40mm grenades with different uses,\nbut they and their rounds are hard to find."
"Your skill with grenade launchers, whether standalone or as a rifle mod.\nThese launchers fire a variety of 40mm grenades with different uses,\nbut they and their rounds are hard to find.",
[]
],
[
"computer",
"computers",
"Your skill with computers, both in terms of legitimate use, and hacking. This\nwill help you use complex systems, and bypass their security."
"Your skill with computers, both in terms of legitimate use, and hacking. This\nwill help you use complex systems, and bypass their security.",
[]
],
[
"mechanics",
"mechanics",
"Your skill with repairs to mechanical systems, and the crafting of many items\nthat use complex parts, but are not electronics."
"Your skill with repairs to mechanical systems, and the crafting of many items\nthat use complex parts, but are not electronics.",
[]
],
[
"electronics",
"electronics",
"Your skill with repairs to electrical systems, and the crafting of many items\nthat use electrical parts."
"Your skill with repairs to electrical systems, and the crafting of many items\nthat use electrical parts.",
[]
],
[
"cooking",
"cooking",
"Your skill in combining food ingredients to make other, tastier food items.\nThis may also be used in mixing chemicals and other more esoteric tasks."
"Your skill in combining food ingredients to make other, tastier food items.\nThis may also be used in mixing chemicals and other more esoteric tasks.",
[]
],
[
"carpentry",
"construction",
"Your general knowledge in construction. This is used primarily when building\nterrain, via the * screen."
"Your general knowledge in construction. This is used primarily when building\nterrain, via the * screen.",
[]
],
[
"survival",
"survival",
"Your skill in wilderness survival. This helps you butcher meat from a corpse\nand craft various basic survival items. High levels may allow you to remove\npoison from tainted meat. Also used for skinning corpses to acquire pelts."
"Your skill in wilderness survival. This helps you butcher meat from a corpse\nand craft various basic survival items. High levels may allow you to remove\npoison from tainted meat. Also used for skinning corpses to acquire pelts.",
[]
],
[
"traps",
"traps",
"Your skill at setting and disarming traps safely and effectively. Note that\nthis does not help you detect traps, or avoid their effects if you activate\nthem."
"Your skill at setting and disarming traps safely and effectively. Note that\nthis does not help you detect traps, or avoid their effects if you activate\nthem.",
[]
],
[
"tailor",
"tailoring",
"Your skill at repairing clothing, and at higher levels, creating clothing\nfrom basic materials. Generally a sewing kit is needed. Also applies to\nother methods of clothing repair and textile crafting."
"Your skill at repairing clothing, and at higher levels, creating clothing\nfrom basic materials. Generally a sewing kit is needed. Also applies to\nother methods of clothing repair and textile crafting.",
[]
],
[
"firstaid",
"first aid",
"Your skill at emergency medical treatment, such as that from first aid kits\nand bandages. High levels of this skill may help heal more HP. Some drugs\nmay be more effective as well."
"Your skill at emergency medical treatment, such as that from first aid kits\nand bandages. High levels of this skill may help heal more HP. Some drugs\nmay be more effective as well.",
[]
],
[
"speech",
"speech",
"Your skill at talking to people, convincing them of things, lying, and many\nothers. Works best in conjunction with a high intelligence."
"Your skill at talking to people, convincing them of things, lying, and many\nothers. Works best in conjunction with a high intelligence.",
[]
],
[
"barter",
"barter",
"Your skill at getting a good deal when trading with others. Very high levels\nmight even see you getting freebies."
"Your skill at getting a good deal when trading with others. Very high levels\nmight even see you getting freebies.",
[]
],
[
"swimming",
"swimming",
"Your skill at swimming. This affects speed, your ability to swim while\nwearing clothes or carrying weights, and in-water combat."
"Your skill at swimming. This affects speed, your ability to swim while\nwearing clothes or carrying weights, and in-water combat.",
[]
],
[
"driving",
"driving",
"Your skill at driving. This affects how well you can control a vehicle,\nas well as the penalty of shooting while driving."
"Your skill at driving. This affects how well you can control a vehicle,\nas well as the penalty of shooting while driving.",
[]
]
]
+3
View File
@@ -89,6 +89,7 @@ struct talk_response
int mission_index;
mission_id miss; // If it generates a new mission
int tempvalue; // Used for various stuff
Skill* skill;
npc_opinion opinion_success;
npc_opinion opinion_failure;
void (talk_function::*effect_success)(game *, npc *);
@@ -104,6 +105,7 @@ struct talk_response
mission_index = -1;
miss = MISSION_NULL;
tempvalue = -1;
skill = NULL;
effect_success = &talk_function::nothing;
effect_failure = &talk_function::nothing;
opinion_success = npc_opinion();
@@ -120,6 +122,7 @@ struct talk_response
mission_index = rhs.mission_index;
miss = rhs.miss;
tempvalue = rhs.tempvalue;
skill = rhs.skill;
effect_success = rhs.effect_success;
effect_failure = rhs.effect_failure;
opinion_success = rhs.opinion_success;
+22 -13
View File
@@ -220,12 +220,14 @@ void dis_effect(game *g, player &p, disease &dis)
case DI_HOT_HEAD:
switch (dis.intensity) {
case 3 :
p.thirst++;
if (int(g->turn) % 150 == 0)
p.thirst++;
if (p.pain < 40) p.pain++;
if (!p.has_disease(DI_SLEEP) && one_in(400)) g->add_msg("Your head is pounding from the heat.");
// Speed -20
case 2 :
p.thirst++;
if (int(g->turn) % 300 == 0)
p.thirst++;
// Hallucinations handled in game.cpp
if (one_in(std::min(14500,15000-p.temp_cur[bp_head]))) p.vomit(g);
if (p.pain < 20) p.pain++;
@@ -237,21 +239,21 @@ void dis_effect(game *g, player &p, disease &dis)
case DI_HOT_MOUTH:
switch (dis.intensity) {
case 3 : p.thirst++;
case 3 : if (int(g->turn) % 150 == 0) p.thirst++;
if (p.pain < 30) p.pain++;
case 2 : p.thirst++;
case 2 : if (int(g->turn) % 300 == 0) p.thirst++;
}
break;
case DI_HOT_TORSO:
switch (dis.intensity) {
case 3 :
p.thirst++;
if (int(g->turn) % 150 == 0) p.thirst++;
p.str_cur--;
if (!p.has_disease(DI_SLEEP) && one_in(400)) g->add_msg("You are sweating profusely.");
// Speed -20
case 2 :
p.thirst++;
if (int(g->turn) % 300 == 0) p.thirst++;
p.str_cur--;
// Speed -5
// case 1 : Speed -2
@@ -260,9 +262,10 @@ void dis_effect(game *g, player &p, disease &dis)
case DI_HOT_ARMS:
switch (dis.intensity) {
case 3 : p.thirst++;
case 3 :
if (int(g->turn) % 150 == 0) p.thirst++;
if (p.pain < 30) p.pain++;
case 2 : p.thirst++;
case 2 : if (int(g->turn) % 300 == 0) p.thirst++;
}
break;
@@ -275,10 +278,11 @@ void dis_effect(game *g, player &p, disease &dis)
case DI_HOT_LEGS:
switch (dis.intensity) {
case 3 : p.thirst++;
case 3 :
if (int(g->turn) % 150 == 0) p.thirst++;
if (p.pain < 30) p.pain++;
if (one_in(400)) g->add_msg("Your legs are cramping up.");
case 2 : p.thirst++;
case 2 : if (int(g->turn) % 300 == 0) p.thirst++;
}
break;
@@ -371,17 +375,19 @@ void dis_effect(game *g, player &p, disease &dis)
}
break;
// MATERIALS-TODO: this should be determined by materials properties
case DI_ONFIRE:
p.hurtall(3);
for (int i = 0; i < p.worn.size(); i++) {
if (p.worn[i].made_of(VEGGY) || p.worn[i].made_of(PAPER)) {
if (p.worn[i].made_of("veggy") || p.worn[i].made_of("paper")) {
p.worn.erase(p.worn.begin() + i);
i--;
} else if ((p.worn[i].made_of(COTTON) || p.worn[i].made_of(WOOL)) &&
} else if ((p.worn[i].made_of("cotton") || p.worn[i].made_of("wool")) &&
one_in(10)) {
p.worn.erase(p.worn.begin() + i);
i--;
} else if (p.worn[i].made_of(PLASTIC) && one_in(50)) {
} else if (p.worn[i].made_of("plastic") && one_in(50)) {
p.worn.erase(p.worn.begin() + i);
i--;
}
@@ -1574,6 +1580,9 @@ Dexterity - 5; Speed -30%\
You are being slowed by climbing over a mountain of rubble";
}
case DI_STEMCELL_TREATMENT: return "\
Your insides are shifting in strange ways as the treatment takes effect.";
case DI_BOOMERED: return "\
Perception - 5\n\
Range of Sight: 1; All sight is tinted magenta";
-11
View File
@@ -5,17 +5,6 @@
#define sgn(x) (((x) < 0) ? -1 : 1)
#endif
enum material {
MNULL = 0,
//Food Materials
VEGGY, FLESH, POWDER, HFLESH, //Human Flesh.
//Clothing
COTTON, WOOL, LEATHER, KEVLAR, FUR, CHITIN,
//Other
STONE, PAPER, WOOD, PLASTIC, GLASS, IRON, STEEL, SILVER,
NUM_MAT_TYPES
};
enum phase_id {
PNULL, SOLID, LIQUID, GAS, PLASMA
};
+58 -46
View File
@@ -48,6 +48,8 @@ bool map::process_fields_in_submap(game *g, int gridn)
case fd_blood:
case fd_bile:
case fd_gibs_flesh:
case fd_gibs_veggy:
if (has_flag(swimmable, x, y)) // Dissipate faster in water
cur->age += 250;
break;
@@ -57,29 +59,36 @@ bool map::process_fields_in_submap(game *g, int gridn)
cur->age += 20;
for (int i = 0; i < i_at(x, y).size(); i++) {
item *melting = &(i_at(x, y)[i]);
if (melting->made_of(LIQUID) || melting->made_of(VEGGY) ||
melting->made_of(FLESH) || melting->made_of(POWDER) ||
melting->made_of(HFLESH) ||
melting->made_of(COTTON) || melting->made_of(WOOL) ||
melting->made_of(PAPER) || melting->made_of(PLASTIC) ||
(melting->made_of(GLASS) && !one_in(3)) || one_in(4)) {
// Acid destructable objects here
melting->damage++;
if (melting->damage >= 5 ||
(melting->made_of(PAPER) && melting->damage >= 3)) {
cur->age += melting->volume();
for (int m = 0; m < i_at(x, y)[i].contents.size(); m++)
i_at(x, y).push_back( i_at(x, y)[i].contents[m] );
i_at(x, y).erase(i_at(x, y).begin() + i);
i--;
// see DEVELOPER_FAQ.txt for how acid resistance is calculated
int chance = melting->acid_resist();
if (chance == 0)
{
melting->damage++;
}
else if (chance > 0 && chance < 9)
{
if (one_in(chance))
{
melting->damage++;
}
}
if (melting->damage >= 5)
{
cur->age += melting->volume();
for (int m = 0; m < i_at(x, y)[i].contents.size(); m++)
i_at(x, y).push_back( i_at(x, y)[i].contents[m] );
i_at(x, y).erase(i_at(x, y).begin() + i);
i--;
}
}
}
break;
case fd_sap:
break; // It doesn't do anything.
// TODO-MATERIALS: use fire resistance
case fd_fire: {
// Consume items as fuel to help us grow/last longer.
bool destroyed = false;
@@ -115,7 +124,7 @@ bool map::process_fields_in_submap(game *g, int gridn)
}
it->charges -= rounds_exploded;
if(it->charges == 0) destroyed = true;
} else if (it->made_of(PAPER)) {
} else if (it->made_of("paper")) {
destroyed = it->burn(cur->density * 3);
consumed++;
if (cur->density == 1)
@@ -123,7 +132,7 @@ bool map::process_fields_in_submap(game *g, int gridn)
if (vol >= 4)
smoke++;
} else if ((it->made_of(WOOD) || it->made_of(VEGGY))) {
} else if ((it->made_of("wood") || it->made_of("veggy"))) {
if (vol <= cur->density * 10 || cur->density == 3) {
cur->age -= 4;
destroyed = it->burn(cur->density);
@@ -134,7 +143,7 @@ bool map::process_fields_in_submap(game *g, int gridn)
smoke++;
}
} else if ((it->made_of(COTTON) || it->made_of(WOOL))) {
} else if ((it->made_of("cotton") || it->made_of("wool"))) {
if (vol <= cur->density * 5 || cur->density == 3) {
cur->age--;
destroyed = it->burn(cur->density);
@@ -145,7 +154,7 @@ bool map::process_fields_in_submap(game *g, int gridn)
smoke++;
}
} else if ((it->made_of(FLESH))||(it->made_of(HFLESH))) {
} else if ((it->made_of("flesh"))||(it->made_of("hflesh"))) {
if (vol <= cur->density * 5 || (cur->density == 3 && one_in(vol / 20))) {
cur->age--;
destroyed = it->burn(cur->density);
@@ -167,12 +176,12 @@ bool map::process_fields_in_submap(game *g, int gridn)
}
destroyed = true;
consumed++;
} else if (it->made_of(POWDER)) {
} else if (it->made_of("powder")) {
cur->age -= vol;
destroyed = true;
smoke += 2;
} else if (it->made_of(PLASTIC)) {
} else if (it->made_of("plastic")) {
smoke += 3;
if (it->burnt <= cur->density * 2 || (cur->density == 3 && one_in(vol))) {
destroyed = it->burn(cur->density);
@@ -193,7 +202,7 @@ bool map::process_fields_in_submap(game *g, int gridn)
if (veh)
veh->damage (part, cur->density * 10, false);
// If the flames are in a brazier, they're fully contained, so skip consuming terrain
if((tr_brazier != tr_at(x, y))&&(has_flag(fire_container, x, y) != TRUE )) {
if((tr_brazier != tr_at(x, y))&&(has_flag(fire_container, x, y) != true )) {
// Consume the terrain we're on
if (has_flag(explodes, x, y)) {
ter_set(x, y, ter_id(int(ter(x, y)) + 1));
@@ -233,7 +242,7 @@ bool map::process_fields_in_submap(game *g, int gridn)
bool in_pit = (ter(x, y) == t_pit);
// If the flames are REALLY big, they contribute to adjacent flames
if (cur->density == 3 && cur->age < 0 && tr_brazier != tr_at(x, y)
&& (has_flag(fire_container, x, y) != TRUE ) ){
&& (has_flag(fire_container, x, y) != true ) ){
// Randomly offset our x/y shifts by 0-2, to randomly pick a square to spread to
int starti = rng(0, 2);
int startj = rng(0, 2);
@@ -261,12 +270,12 @@ bool map::process_fields_in_submap(game *g, int gridn)
if (field_at(fx, fy).type == fd_web)
spread_chance = 50 + spread_chance / 2;
if (has_flag(explodes, fx, fy) && one_in(8 - cur->density) &&
tr_brazier != tr_at(x, y) && (has_flag(fire_container, x, y) != TRUE ) ) {
tr_brazier != tr_at(x, y) && (has_flag(fire_container, x, y) != true ) ) {
ter_set(fx, fy, ter_id(int(ter(fx, fy)) + 1));
g->explosion(fx, fy, 40, 0, true);
} else if ((i != 0 || j != 0) && rng(1, 100) < spread_chance &&
tr_brazier != tr_at(x, y) &&
(has_flag(fire_container, x, y) != TRUE )&&
(has_flag(fire_container, x, y) != true )&&
(in_pit == (ter(fx, fy) == t_pit)) &&
((cur->density == 3 &&
(has_flag(flammable, fx, fy) || one_in(20))) ||
@@ -294,7 +303,7 @@ bool map::process_fields_in_submap(game *g, int gridn)
if (move_cost(fx, fy) > 0 &&
(!one_in(smoke) || (nosmoke && one_in(40))) &&
rng(3, 35) < cur->density * 10 && cur->age < 1000 &&
(has_flag(suppress_smoke, x, y) != TRUE )) {
(has_flag(suppress_smoke, x, y) != true )) {
smoke--;
add_field(g, fx, fy, fd_smoke, rng(1, cur->density));
}
@@ -865,6 +874,7 @@ void map::mon_in_field(int x, int y, game *g, monster *z)
}
break;
// TODO: Use acid resistance
case fd_acid:
if (!z->has_flag(MF_DIGS) && !z->has_flag(MF_FLIES) &&
!z->has_flag(MF_ACIDPROOF)) {
@@ -883,15 +893,16 @@ void map::mon_in_field(int x, int y, game *g, monster *z)
cur->density--;
break;
// MATERIALS-TODO: Use fire resistance
case fd_fire:
if ( z->made_of(FLESH) || z->made_of(HFLESH) )
if ( z->made_of("flesh") || z->made_of("hflesh") )
dam = 3;
if (z->made_of(VEGGY))
if (z->made_of("veggy"))
dam = 12;
if (z->made_of(PAPER) || z->made_of(LIQUID) || z->made_of(POWDER) ||
z->made_of(WOOD) || z->made_of(COTTON) || z->made_of(WOOL))
if (z->made_of("paper") || z->made_of(LIQUID) || z->made_of("powder") ||
z->made_of("wood") || z->made_of("cotton") || z->made_of("wool"))
dam = 20;
if (z->made_of(STONE) || z->made_of(KEVLAR) || z->made_of(STEEL))
if (z->made_of("stone") || z->made_of("kevlar") || z->made_of("steel"))
dam = -20;
if (z->has_flag(MF_FLIES))
dam -= 15;
@@ -902,16 +913,16 @@ void map::mon_in_field(int x, int y, game *g, monster *z)
dam += rng(6, 12);
if (!z->has_flag(MF_FLIES)) {
z->moves -= 20;
if (!z->made_of(LIQUID) && !z->made_of(STONE) && !z->made_of(KEVLAR) &&
!z->made_of(STEEL) && !z->has_flag(MF_FIREY))
if (!z->made_of(LIQUID) && !z->made_of("stone") && !z->made_of("kevlar") &&
!z->made_of("steel") && !z->has_flag(MF_FIREY))
z->add_effect(ME_ONFIRE, rng(3, 8));
}
} else if (cur->density == 3) {
dam += rng(10, 20);
if (!z->has_flag(MF_FLIES) || one_in(3)) {
z->moves -= 40;
if (!z->made_of(LIQUID) && !z->made_of(STONE) && !z->made_of(KEVLAR) &&
!z->made_of(STEEL) && !z->has_flag(MF_FIREY))
if (!z->made_of(LIQUID) && !z->made_of("stone") && !z->made_of("kevlar") &&
!z->made_of("steel") && !z->has_flag(MF_FIREY))
z->add_effect(ME_ONFIRE, rng(8, 12));
}
}
@@ -926,13 +937,13 @@ void map::mon_in_field(int x, int y, game *g, monster *z)
if (!z->has_flag(MF_NO_BREATHE)){
if (cur->density == 3)
z->moves -= rng(10, 20);
if (z->made_of(VEGGY)) // Plants suffer from smoke even worse
if (z->made_of("veggy")) // Plants suffer from smoke even worse
z->moves -= rng(1, cur->density * 12);
}
break;
case fd_tear_gas:
if ((z->made_of(FLESH) || z->made_of(HFLESH) || z->made_of(VEGGY)) &&
if ((z->made_of("flesh") || z->made_of("hflesh") || z->made_of("veggy")) &&
!z->has_flag(MF_NO_BREATHE)) {
z->add_effect(ME_BLIND, cur->density * 8);
if (cur->density == 3) {
@@ -943,7 +954,7 @@ void map::mon_in_field(int x, int y, game *g, monster *z)
dam = rng(2, 5);
} else
z->add_effect(ME_STUNNED, rng(1, 5));
if (z->made_of(VEGGY)) {
if (z->made_of("veggy")) {
z->moves -= rng(cur->density * 5, cur->density * 12);
dam += cur->density * rng(8, 14);
}
@@ -969,22 +980,23 @@ void map::mon_in_field(int x, int y, game *g, monster *z)
z->moves -= rng(0, 15);
dam = rng(0, 12);
}
if (z->made_of(VEGGY)) {
if (z->made_of("veggy")) {
z->moves -= rng(cur->density * 5, cur->density * 12);
dam *= cur->density;
}
}
break;
// MATERIALS-TODO: Use fire resistance
case fd_flame_burst:
if (z->made_of(FLESH) || z->made_of(HFLESH))
if (z->made_of("flesh") || z->made_of("hflesh"))
dam = 3;
if (z->made_of(VEGGY))
if (z->made_of("veggy"))
dam = 12;
if (z->made_of(PAPER) || z->made_of(LIQUID) || z->made_of(POWDER) ||
z->made_of(WOOD) || z->made_of(COTTON) || z->made_of(WOOL))
if (z->made_of("paper") || z->made_of(LIQUID) || z->made_of("powder") ||
z->made_of("wood") || z->made_of("cotton") || z->made_of("wool"))
dam = 50;
if (z->made_of(STONE) || z->made_of(KEVLAR) || z->made_of(STEEL))
if (z->made_of("stone") || z->made_of("kevlar") || z->made_of("steel"))
dam = -25;
dam += rng(0, 8);
z->moves -= 20;
+1860 -804
View File
File diff suppressed because it is too large Load Diff
+23 -8
View File
@@ -47,8 +47,13 @@
#define BULLET_SPEED 10000000
#define EXPLOSION_SPEED 70000000
#define PICKUP_RANGE 2
#define MAX_ITEM_IN_SQUARE 1024 // really just a sanity check for functions not tested beyond this. in theory 4096 works (`InvletInvlet)
#define MAX_VOLUME_IN_SQUARE 1000 // 6.25 dead bears is enough for everybody!
#define MAX_ITEM_IN_VEHICLE_STORAGE MAX_ITEM_IN_SQUARE // no reason to differ
#define MAX_VOLUME_IN_VEHICLE_STORAGE 500 // todo: variation. semi trailer square could hold more. the real limit would be weight
#define PICKUP_RANGE 2
extern bool trigdist;
enum tut_type {
TUT_NULL,
TUT_BASIC, TUT_COMBAT,
@@ -113,6 +118,12 @@ class game
void vadd_msg(const char* msg, va_list ap );
void add_msg(const char* msg, ...);
void add_msg_if_player(player *p, const char* msg, ...);
std::string press_x(action_id act); // (Press X (or Y)|Try) to Z
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);
std::string press_x(action_id act, std::string act_desc); // ('Z'ing|zing) (X( or Y)))
void add_event(event_type type, int on_turn, int faction_id = -1,
int x = -1, int y = -1);
bool event_queued(event_type type);
@@ -158,6 +169,9 @@ class game
void cancel_activity();
void cancel_activity_query(const char* message, ...);
bool cancel_activity_or_ignore_query(const char* reason, ...);
void moving_vehicle_dismount(int tox, int toy);
// Get input from the player to choose an adjacent tile (for examine() etc)
bool choose_adjacent(std::string verb, int &x, int&y);
int assign_mission_id(); // Just returns the next available one
void give_mission(mission_id type); // Create the mission and assign it
@@ -169,6 +183,7 @@ class game
int reserve_random_mission(mission_origin origin, point p = point(-1, -1),
int npc_id = -1);
npc* find_npc(int id);
int kill_count(mon_id mon); // Return the number of kills of a given mon_id
mission* find_mission(int id); // Mission with UID=id; NULL if non-existant
mission_type* find_mission_type(int id); // Same, but returns its type
bool mission_complete(int id, int npc_id); // True if we made it
@@ -181,7 +196,7 @@ class game
void teleport(player *p = NULL);
void plswim(int x, int y); // Called by plmove. Handles swimming
// when player is thrown (by impact or something)
void fling_player_or_monster(player *p, monster *zz, const int& dir, float flvel);
void fling_player_or_monster(player *p, monster *zz, const int& dir, float flvel, bool controlled = false);
void nuke(int x, int y);
std::vector<faction *> factions_at(int x, int y);
@@ -210,6 +225,7 @@ class game
void add_artifact_messages(std::vector<art_effect_passive> effects);
void peek();
point look_debug(point point=point(-256,-256));
point look_around();// Look at nearby terrain ';'
void list_items(); //List all items around the player
bool list_items_match(std::string sText, std::string sPattern);
@@ -225,6 +241,7 @@ class game
std::string list_item_downvote;
char inv(std::string title = "Inventory:");
char inv_type(std::string title = "Inventory:", item_cat inv_item_type = IC_NULL);
int inventory_item_menu(char chItem, int startx = 0, int width = 50);
std::vector<item> multidrop();
faction* list_factions(std::string title = "FACTIONS:");
point find_item(item *it);
@@ -249,6 +266,7 @@ class game
std::vector <mission_type> mission_types; // The list of mission templates
mutation_branch mutation_data[PF_MAX2]; // Mutation data
std::map<char, action_id> keymap;
std::map<char, action_id> default_keymap;
calendar turn;
signed char temperature; // The air temperature
@@ -275,6 +293,7 @@ class game
std::map<int, std::map<int, bool> > mapRain;
int w_void_lines;
WINDOW *w_terrain;
WINDOW *w_minimap;
WINDOW *w_HP;
@@ -373,12 +392,12 @@ class game
void construction_menu(); // See construction.cpp
bool player_can_build(player &p, inventory inv, constructable* con,
const int level = -1, bool cont = false,
bool exact_level=false);
bool exact_level=false);
void place_construction(constructable *con); // See construction.cpp
void complete_construction(); // See construction.cpp
bool pl_choose_vehicle (int &x, int &y);
bool vehicle_near ();
void handbrake ();
void control_vehicle(); // Use vehicle controls '^'
void examine();// Examine nearby terrain 'e'
void advanced_inv();
// open vehicle interaction screen
@@ -482,10 +501,6 @@ class game
std::vector<event> events; // Game events to be processed
int kills[num_monsters]; // Player's kill count
std::string last_action; // The keypresses of last turn
int last_inv_start, last_inv_sel; // workaround until inventory_ui.cpp is rewritten
int advanced_inv_leftsort, advanced_inv_rightsort;
int moves_since_last_save;
int item_exchanges_since_save;
time_t last_save_timestamp;
+233 -153
View File
@@ -22,10 +22,12 @@ void game::help()
WINDOW* w_help = newwin(23, 78, 1 + (int)((TERMY > 25) ? (TERMY-25)/2 : 0), 1 + (int)((TERMX > 80) ? (TERMX-80)/2 : 0));
char ch;
action_id movearray[] = {ACTION_MOVE_NW,ACTION_MOVE_N,ACTION_MOVE_NE,
ACTION_MOVE_W, ACTION_PAUSE, ACTION_MOVE_E,
ACTION_MOVE_SW,ACTION_MOVE_S,ACTION_MOVE_SE};
do {
wborder(w_help_border, LINE_XOXO, LINE_XOXO, LINE_OXOX, LINE_OXOX,
LINE_OXXO, LINE_OOXX, LINE_XXOO, LINE_XOOX);
LINE_OXXO, LINE_OOXX, LINE_XXOO, LINE_XOOX);
mvwprintz(w_help_border, 0, 38, c_ltred, " HELP ");
wrefresh(w_help_border);
werase(w_help);
@@ -82,21 +84,38 @@ tools are all available to help you survive.");
mvwprintz(w_help, 0, 0, c_white, "\
Movement is performed using the numpad, or vikeys. Each step will take 100\n\
movement points (or more, depending on the terrain); you\n\
y k u 7 8 9 will then replenish a variable amount of movement points,\n\
\\ | / \\ | / depending on many factors (press '@' to see the exact\n\
will then replenish a variable amount of movement points,\n\
\\ | / \\ | / depending on many factors (%s to see the exact\n\
\\|/ \\|/ amount). To attempt to hit a monster with your weapon,\n\
h--.--l 4--5--6 simply move into it. You may find doors, ('+'); these may\n\
/|\\ /|\\ be opened with 'o' or closed with 'c'. Some doors are\n\
-- -- -- -- simply move into it. You may find doors, ('+'); these may\n\
/|\\ /|\\ be opened %s or closed %s. Some doors are\n\
/ | \\ / | \\ locked. Locked doors, windows, and some other obstacles\n\
b j n 1 2 3 can be destroyed by smashing them ('s', then choose a\n\
can be destroyed by smashing them (%sthen choose a\n\
direction). Smashing down obstacles is much easier with a\n\
good weapon or a strong character.\n\
\n\
There may be times when you want to move more quickly by holding down a\n\
movement key. However, fast movement in this fashion may lead to the player\n\
getting into a dangerous situation or even killed before they have a chance\n\
to react. Pressing '!' will toggle \"Run Mode.\" While this is on, any\n\
movement will be ignored if new monsters enter the player's view.");
to react. %s will toggle \"Run Mode.\" While this is on, any\n\
movement will be ignored if new monsters enter the player's view.",
press_x(ACTION_PL_INFO, "press ", "'View Player Info'").c_str(),
press_x(ACTION_OPEN, "with ", "").c_str(),
press_x(ACTION_CLOSE, "with ", "").c_str(),
press_x(ACTION_SMASH, "", ", ", "").c_str(),
press_x(ACTION_TOGGLE_SAFEMODE, "Pressing ", "'Toggle Safemode'" ).c_str());
for(int acty = 0; acty < 3; acty++) {
for(int actx = 0; actx < 3; actx++) {
std::vector<char> keys = keys_bound_to( movearray[acty*3+actx] );
if (keys.empty()) {
} else {
mvwputch(w_help, (acty * 3 + 2), (actx * 3), c_ltblue, keys[0]);
if (keys.size() >0) {
mvwputch(w_help, (acty * 3 + 2), (actx * 3 + 10), c_ltblue, keys[1]);
}
}
}
}
wrefresh(w_help);
refresh();
getch();
@@ -107,12 +126,14 @@ movement will be ignored if new monsters enter the player's view.");
werase(w_help);
mvwprintz(w_help, 0, 0, c_white, "\
The player can often see more than can be displayed on the screen at a time.\n\
Pressing ';' or 'x' enters look around mode, which allows you to scoll around\n\
using the movement keys and view irems on the map. Pressing 'V' provides a\n\
list of nearby visible items, though items shut away in crates, cubpoards,\n\
%s allows you to scroll around\n\
using the movement keys and view items on the map. %s provides a\n\
list of nearby visible items, though items shut away in crates, cupboards,\n\
refrigerators and the like will not be displayed. Pressing Shift+vikeys\n\
will scroll the view persistently, allowing you to keep an eye on things\n\
as you move around.");
as you move around.",
press_x(ACTION_LOOK, "Pressing ", " enters look around mode, which", "'Look Around' mode").c_str(),
press_x(ACTION_LIST_ITEMS, "Pressing ", "'List all items around the player'").c_str());
wrefresh(w_help);
refresh();
getch();
@@ -126,20 +147,23 @@ As time passes, you will begin to feel hunger and thirst. A status warning\n\
at the bottom of the screen will appear. As hunger and thirst reach critical\n\
levels, you will begin to suffer movement penalties. Thirst is more dangerous\n\
than hunger. Finding food in a city is usually easy; outside of a city, you\n\
may have to hunt an animal, then stand over its corpse and 'B'utcher it into\n\
may have to hunt an animal, then stand over its corpse and %s it into\n\
small chunks of meat. Likewise, outside of a city you may have to drink water\n\
from a river or other natural source; stand in shallow water and press 'g' or\n\
',' to pick it up. You'll need a watertight container. Be forewarned that\n\
some sources of water aren't trustworthy and may produce diseased water. To\n\
be sure it's healthy, run all water you collect through a water filter before\n\
drinking.\n\
from a river or other natural source; stand in shallow water and \n\
%s to pick it up. You'll need a watertight container. \n\
Be forewarned that some sources of water aren't trustworthy \n\
and may produce diseased water. To be sure it's healthy, \n\
run all water you collect through a water filter before drinking.\n\
\n\
Every 14 to 20 hours, you'll find yourself growing sleepy. If you do not\n\
sleep by pressing '$', you'll start suffering stat and movement penalties.\n\
sleep%s you'll start suffering stat and movement penalties.\n\
You may not always fall asleep right away. Sleeping indoors, especially on a\n\
bed, will help; or you can always use sleeping pills. While sleeping, you'll\n\
slowly replenish lost hit points. You'll also be vulnerable to attack, so\n\
try to find a safe place, or set traps for unwary intruders.");
try to find a safe place, or set traps for unwary intruders.",
press_x(ACTION_BUTCHER, "butcher").c_str(),
from_sentence_case(press_x(ACTION_PICKUP)).c_str(),
press_x(ACTION_SLEEP, " by pressing ", ",", "").c_str());
wrefresh(w_help);
refresh();
getch();
@@ -224,8 +248,8 @@ Press any key for more...");
Morale is also responsible for ensuring you can learn effectively, via a\n\
mechanic referred to as 'focus'. Your focus level is a measure of how\n\
effectively you can learn. The natural level is 100, which indicates normal\n\
learning potential. Higher or lower focus levels make it easier or harder to\n\
learn from practical experience.\n\
learning potential. Higher or lower focus levels make it easier or harder\n\
to learn from practical experience.\n\
\n\
Your focus level has a natural set point that it converges towards. When your\n\
focus is much lower - or higher - than this set point, it will change faster\n\
@@ -248,7 +272,7 @@ point of your focus.");
case 'H':
werase(w_help);
mvwprintz(w_help, 0, 0, c_white, "\
Though it is relatively rare, certain areas of the world may be contamiated\n\
Though it is relatively rare, certain areas of the world may be contaminated\n\
with radiation. It will gradually accumulate in your body, weakening you\n\
more and more. While in radiation-free areas, your radiation level will\n\
slowly decrease. Taking iodine tablets will help speed the process.\n\
@@ -295,24 +319,27 @@ Many important items can be very hard to find, or will cost a great deal of\n\
money to trade for. Fortunately, it is possible to craft a wide variety of\n\
goods with the proper tools, materials, and training.\n\
\n\
Some recipes require a set of tools. These are not used up when crafting, so\n\
you can keep your tool set. All recipes require one or more ingredients.\n\
Some recipes require a set of tools. These are not used up when crafting,\n\
so you can keep your tool set. All recipes require one or more ingredients.\n\
These ARE used up in crafting.\n\
\n\
To craft items, press '&'. There are five categories; Weapons, Food,\n\
Electronics, Armor, and Miscellaneous. While a few items require no skill to\n\
create, the majority require you to have some knowledge:\n\
%sThere are five categories; Weapons, Food, \n\
Electronics, Armor, and Miscellaneous. While a few items require\n\
no skill to create, the majority require you to have some knowledge:\n\
\n\
->Mechanic skill is used for weapons, traps, and a few tools.\n\
->Cooking skill, at low levels, is used for making tasty recipes; at higher\n\
levels, you have an understanding of chemistry and can make chemical weapons\n\
and beneficial elixirs.\n\
->Cooking skill, at low levels, is used for making tasty recipes; \n\
at higher levels, you have an understanding of chemistry and can make\n\
chemical weapons and beneficial elixirs.\n\
->Electronics skill lets you make a wide variety of tools with intricate uses.\n\
->Tailoring skill is used to create basic clothing, and later tough armor.\n\
\n\
In addition to the primary crafting skills, other skills may be necessary to\n\
create certain items. Traps skill, Firearms skill, and First Aid skill are\n\
all required for certain items.");
In addition to the primary crafting skills, other skills may be necessary\n\
to create certain items. Traps skill, Firearms skill, and First Aid skill\n\
are all required for certain items.",
press_x(ACTION_CRAFT, "To craft items, press ", ". ", "").c_str()/*,
press_x(ACTION_RECRAFT).c_str(),
press_x(ACTION_LONGCRAFT).c_str()*/);
wrefresh(w_help);
refresh();
getch();
@@ -329,19 +356,22 @@ to wake you up) and bear traps (which make noise AND damage and trap anything\n\
that steps on them). Others need to be crafted; this requires the Traps skill\n\
and possibly Mechanics.\n\
\n\
To set a trap, simply use the item ('a') and choose a direction; the trap\n\
To set a trap, simply use the item%s and choose a direction; the trap\n\
will be placed on an adjacent tile. Some traps may require additional tools,\n\
like a shovel, to be set. Once set, a trap will remain in place until\n\
stepped on or disarmed.\n\
\n\
To disarm a trap, examine ('e') the space it is on. Your success depends\n\
To disarm a trap, examine%s the space it is on. Your success depends\n\
upon your Traps skill and Dexterity. If you succeed, the trap is removed\n\
and replaced by some or all of its constituent parts; however, if you fail,\n\
there is a chance that you will set off the trap, suffering the consequences.\n\
\n\
Many traps are fully or partially hidden. Your ability to detect traps is\n\
entirely dependent upon your Perception. Should you stumble into a trap, you\n\
may have a chance to avoid it, depending on your Dodge skill.");
may have a chance to avoid it, depending on your Dodge skill.",
press_x(ACTION_USE, " (", ")", "").c_str(),
press_x(ACTION_EXAMINE, " (", ")", "").c_str()/*,
press_x(ACTION_USE_WIELDED).c_str()*/);
wrefresh(w_help);
refresh();
getch();
@@ -352,39 +382,51 @@ may have a chance to avoid it, depending on your Dodge skill.");
werase(w_help);
mvwprintz(w_help, 0, 0, c_white, "\
There are a wide variety of items available for your use. You may find them\n\
lying on the ground; if so, simply press ',' or 'g' to pick up items on the\n\
lying on the ground; if so, simply %s to pick up items on the\n\
same square. Some items are found inside a container, drawn as a { with a\n\
blue background. Pressing 'e', then a direction, will allow you to examine\n\
blue background. %s, then a direction, will allow you to examine\n\
these containers and loot their contents.\n\
\n\
Pressing 'I' opens a comparison menu, where you can see two items\n\
%s opens a comparison menu, where you can see two items\n\
side-by-side with their attributes highlighted to indicate which is superior.\n\
You can also access the item comparison menu by pressing 'C' when the 'V'iew\n\
You can also access the item comparison menu by pressing 'C' when the %s\n\
nearby items menu is open and an item is selected.\n\
\n\
All items may be used as a melee weapon, though some are better than others.\n\
You can check the melee attributes of an item you're carrying by hitting 'i'\n\
You can check the melee attributes of an item you're carrying by %s\n\
to enter your inventory, then pressing the letter of the item. There are 3\n\
melee values, bashing, cutting, and to-hit bonus (or penalty).\n\
Bashing damage is universally effective, but is capped by low strength.\n\
Cutting damage is a guaranteed increase in damage, but it may be reduced by\n\
a monster's natural armor.\n\
\n\
Press any key for more...");
Press any key for more...",
from_sentence_case(press_x(ACTION_PICKUP)).c_str(),
press_x(ACTION_EXAMINE, "Pressing ", "'Examine Nearby Terrain'").c_str(),
press_x(ACTION_COMPARE, "Pressing ", "'Compare two Items'").c_str(),
press_x(ACTION_LIST_ITEMS, "view").c_str(),
press_x(ACTION_INVENTORY, "hitting ", "trying").c_str()/*,
press_x(ACTION_ADVANCEDINV).c_str(), //'Advanced Inventory management'"
press_x(ACTION_ORGANIZE).c_str()*/); //'Swap Inventory Letters'
wrefresh(w_help);
refresh();
getch();
werase(w_help);
mvwprintz(w_help, 0, 0, c_white, "\
To wield an item as a weapon, press 'w' then the proper letter. Pressing '-'\n\
To wield an item as a weapon, %s then the proper letter. Pressing '-'\n\
in lieu of a letter will make you wield nothing. A wielded weapon will not\n\
contribute to your volume carried, so holding a large item in your hands may\n\
be a good option for travel. When unwielding your weapon, it will go back in\n\
your inventory, or will be dropped on the ground if there is no space.\n\
\n\
To wear a piece of clothing, press 'W' then the proper letter. Armor reduces\n\
damage and helps you resist things like smoke. To take off an item, press\n\
'T' then the proper letter.");
To wear a piece of clothing, %s then the proper letter. Armor reduces\n\
damage and helps you resist things like smoke. To take off an item, %s\n\
then the proper letter.",
from_sentence_case(press_x(ACTION_WIELD)).c_str(),
from_sentence_case(press_x(ACTION_WEAR)).c_str(),
from_sentence_case(press_x(ACTION_TAKE_OFF)).c_str()/*,
press_x(ACTION_SORT_ARMOR).c_str(),
press_x(ACTION_PICK_STYLE).c_str()*/);
wrefresh(w_help);
refresh();
getch();
@@ -398,27 +440,37 @@ After 30 minutes of warmup time, monsters will begin to appear. They are\n\
represented by letters on your screen; a list of monster names, and their\n\
positions relative to you, is displayed on the right side of the screen.\n\
\n\
To attack a monster with a melee weapon, simply move into them. The time it\n\
takes to attack depends on the size and weight of your weapon. Small, light\n\
weapons are the fastest; unarmed attacks increase in speed with your Unarmed\n\
Combat skill, and will eventually be VERY fast. A successful hit with a\n\
bashing weapon may stun the monster temporarily, while cutting weapons may get\n\
stuck, possibly pulling the weapon from your hands--but a monster with a weapon\n\
stuck in it will move much more slowly. A miss may make you stumble and lose\n\
movement points. If a monster hits you, your clothing may absorb some damage,\n\
but you will absorb the excess.\n\
To attack a monster with a melee weapon, simply move into them. The time\n\
it takes to attack depends on the size and weight of your weapon. Small,\n\
light weapons are the fastest; unarmed attacks increase in speed with\n\
your Unarmed Combat skill, and will eventually be VERY fast. A successful\n\
hit with a bashing weapon may stun the monster temporarily, while cutting\n\
weapons may get stuck, possibly pulling the weapon from your hands-- but\n\
a monster with a weapon stuck in it will move much more slowly. A miss\n\
may make you stumble and lose movement points. If a monster hits you,\n\
your clothing may absorb some damage, but you will absorb the excess.\n\
\n\
Swarms of monsters may call for firearms. If you find one, wield it first,\n\
then reload by pressing 'r'. If you wish to change ammo, you must unload the\n\
weapon by pressing 'U', then reload again. To fire, press 'f', move the\n\
then reload%s. If you wish to change ammo, you must unload the\n\
weapon%s, then reload again. To fire%s, move the\n\
cursor to the relevant space, then hit '.' or 'f'. Some guns have alternate\n\
firing modes, such as burst fire; to cycle modes, press 'F'. Firing\n\
continuously, especially in bursts, will severely reduce accuracy.\n\
\n\
firing modes, such as burst fire; to cycle modes%s.\n\
Firing continuously, especially in bursts, will severely reduce accuracy.\n\
Press any key for more...",
press_x(ACTION_RELOAD, " by pressing ", "").c_str(),
press_x(ACTION_UNLOAD, " by pressing ", "").c_str(),
press_x(ACTION_FIRE, ", press ", "").c_str(),
press_x(ACTION_SELECT_FIRE_MODE, ", press ", " 'Toggle attack mode of Wielded Item'").c_str());
wrefresh(w_help);
refresh();
getch();
werase(w_help);
mvwprintz(w_help, 0, 0, c_white, "\
Unlike most roguelikes, fleeing will often be your best option, especially\n\
when overwhelmed by a swarm of zombies. Try to avoid getting cornered inside\n\
a building. Ducking down into the subways or sewers is often an excellent\n\
escape tactic.");
when overwhelmed by a swarm of zombies. Try to avoid getting cornered\n\
inside a building. Ducking down into the subways or sewers is often\n\
an excellent escape tactic."/*,
press_x(ACTION_USE_WIELDED).c_str()*/);
wrefresh(w_help);
refresh();
getch();
@@ -433,19 +485,23 @@ start with your choice of a single, commonly-taught style by starting with\n\
the Martial Arts Training trait. Many, many more can be taught by wandering\n\
masters.\n\
\n\
To select a fighting style, press _ (underscore). If you are already unarmed\n\
To select a fighting style%s. If you are already unarmed\n\
this will make you start using the style. Otherwise, it will be locked in as\n\
your default unarmed style; to start using it, press w-.\n\
your default unarmed style; to start using it, %s '-'.\n\
\n\
Most styles have a variety of special moves associated with them. Most have\n\
a skill requirement, and will be unavailable until you reach a level of\n\
unarmed skill. You can check the moves by examining your style via the\n\
inventory screen (i key).\n\
inventory screen%s.\n\
\n\
Many styles also have special effects unlocked under certain conditions.\n\
These are varied and unique to each style, and range from special combo moves\n\
to bonuses depending on the situation you are in. You can check these by\n\
examining your style.");
examining your style.",
press_x(ACTION_PICK_STYLE, ", press ", "").c_str(),
press_x(ACTION_WIELD, "press ", " then", "'Select Wielded Item' then press").c_str(),
press_x(ACTION_INVENTORY, " (", " key)", "").c_str()/*,
press_x(ACTION_THROW).c_str()*/);
wrefresh(w_help);
refresh();
getch();
@@ -465,8 +521,8 @@ as possible and load up on more than one type.\n\
It's also important to carry a few medications; painkillers are a must-have,\n\
and drugs such as cigarettes will make life easier (but beware addiction).\n\
Leave cities as soon as you have a good stockpile of equipment. Their high\n\
concentration of zombies makes them a deathtrap--but a necessary resource for\n\
food and ammunition.\n\
concentration of zombies makes them a deathtrap--but a necessary resource\n\
for food and ammunition.\n\
\n\
Combat is much easier if you can fight just one monster at once. Use doorways\n\
as a choke point, or stand behind a window and strike as the zombies slowly\n\
@@ -482,12 +538,12 @@ Press any key for more...");
getch();
werase(w_help);
mvwprintz(w_help, 0, 0, c_white, "\
Try to keep your inventory as full as possible without being overloaded. You\n\
never know when you might need an item, most are good to sell, and you can\n\
easily drop unwanted items on the floor.\n\
Try to keep your inventory as full as possible without being overloaded.\n\
You never know when you might need an item, most are good to sell, and\n\
you can easily drop unwanted items on the floor.\n\
\n\
Keep an eye on the weather. At night, sleeping might be difficult if you\n\
don't have a warm place to rest your head. Be sure to protect your\n\
Keep an eye on the weather. At night, sleeping might be difficult if\n\
you don't have a warm place to rest your head. Be sure to protect your\n\
extremities from frostbite and to keep your distance from large fires.");
wrefresh(w_help);
refresh();
@@ -587,7 +643,7 @@ ITEM TYPES:\n\
~ Liquid\n\
%%%% Food\n\
! Medication\n\
These are all consumed by using 'E'. They provide a certain amount of\n\
These are all consumed by %s. They provide a certain amount of\n\
nutrition, quench your thirst, may be a stimulant or a depressant, and may\n\
provide morale. There may also be more subtle effects.\n\
\n\
@@ -596,13 +652,17 @@ ITEM TYPES:\n\
, Tiny item\n\
These are all generic items, useful only to be wielded as a weapon.\n\
However, some have special uses; they will show up under the TOOLS section\n\
in your inventory. Press 'a' to use these.\n\
in your inventory. %s to use these.\n\
\n\
) Container\n\
These items may hold other items. Someare passable weapons. Many will be\n\
listed with their contents, e.g. \"plastic bottle of water\". Those containing\n\
comestibles may be eaten with 'E'; this may leave you with an empty container.\n\
Press any key to continue...");
These items may hold other items. Some are passable weapons.\n\
Many will be listed with their contents, e.g. \"plastic bottle of water\".\n\
Those containing comestibles may be eaten%s;\n\
this may leave an empty container.\n\
Press any key to continue...",
press_x(ACTION_EAT, "using ", "eating").c_str(),
press_x(ACTION_USE).c_str(),
press_x(ACTION_EAT, " with ", "").c_str());
wrefresh(w_help);
refresh();
getch();
@@ -610,7 +670,7 @@ Press any key to continue...");
mvwprintz(w_help, 0, 0, c_white, "\
ITEM TYPES:\n\
[ Clothing\n\
This may be worn with the 'W' key or removed with the 'T' key. It may\n\
This may be worn%s or removed%s. It may\n\
cover one or more body parts; you can wear multiple articles of clothing on\n\
any given body part, but this will encumber you severely. Each article of\n\
clothing may provide storage space, warmth, an encumberment, and a resistance\n\
@@ -618,19 +678,27 @@ ITEM TYPES:\n\
effects.\n\
\n\
( Firearm\n\
This weapon may be loaded with ammunition with 'r', unloaded with 'U', and\n\
fired with 'f'. Some have automatic fire, which may be used with 'F' at a\n\
penalty to accuracy. The color refers to the type; handguns are gray, shotguns\n\
are red, submachine guns are cyan, rifles are brown, assault rifles are blue,\n\
and heavy machine guns are light red. Each has an accuracy rating, a bonus to\n\
damage, a rate of fire, and a maximum load. Note that most firearms load\n\
fully in one action, while shotguns must be loaded one shell at a time.\n\
This weapon may be loaded with ammunition%s, unloaded%s, and\n\
fired%s. Some have automatic fire, which may be used%s at a\n\
penalty to accuracy. The color refers to the type; handguns are gray,\n\
shotguns are red, submachine guns are cyan, rifles are brown, assault rifles\n\
are blue, and heavy machine guns are light red. Each has an accuracy rating,\n\
a bonus to damage, a rate of fire, and a maximum load. Note that most\n\
firearms load fully in one action, while shotguns must be loaded one\n\
shell at a time.\n\
\n\
= Ammunition\n\
Ammunition is worthless without a gun to load it into. Generally, there\n\
are several variants for any particular calibre. Ammunition has a damage\n\
rating, an accuracy, a range, and an armor-piercing quality.\n\
Press any key to continue...");
Ammunition is worthless without a gun to load it into. Generally,\n\
there are several variants for any particular calibre. Ammunition has\n\
a damage rating, an accuracy, a range, and an armor-piercing quality.\n\
Press any key to continue...",
press_x(ACTION_WEAR, " with the ", " key","").c_str(),
press_x(ACTION_TAKE_OFF, " with the "," key","").c_str(),
press_x(ACTION_RELOAD, " with ", "").c_str(),
press_x(ACTION_UNLOAD, " with ", "").c_str(),
press_x(ACTION_FIRE, " with ", "").c_str(),
press_x(ACTION_SELECT_FIRE_MODE, " with ", "").c_str()/*,
press_x(ACTION_FIRE_BURST).c_str()*/);
wrefresh(w_help);
refresh();
getch();
@@ -640,12 +708,15 @@ ITEM TYPES:\n\
\n\
* Thrown weapon; simple projectile or grenade\n\
These items are suited for throwing, and many are only useful when\n\
thrown, such as grenades, molotov cocktails, or tear gas.\n\
thrown, such as grenades, molotov cocktails, or tear gas. Once activated\n\
be certain to throw these items%s.\n\
\n\
? Book or magazine\n\
This can be read for training or entertainment by pressing 'R'. Most\n\
This can be read for training or entertainment%s. Most\n\
require a basic level of intelligence; some require some base knowledge in\n\
the relevant subject.");
the relevant subject.",
press_x(ACTION_THROW, " by pressing ",", then the letter of the item to throw.",".").c_str(),
press_x(ACTION_READ, " by pressing ", "").c_str());
wrefresh(w_help);
refresh();
getch();
@@ -658,17 +729,17 @@ ITEM TYPES:\n\
. Field - Empty grassland, occasional wild fruit.");
mvwprintz(w_help, 2, 0, c_green, "\
F Forest - May be dense or sparse. Slow moving; foragable food.");
mvputch(3, 0, c_dkgray, LINE_XOXO);
mvputch(3, 1, c_dkgray, LINE_OXOX);
mvputch(3, 2, c_dkgray, LINE_XXOO);
mvputch(3, 3, c_dkgray, LINE_OXXO);
mvputch(3, 4, c_dkgray, LINE_OOXX);
mvputch(3, 5, c_dkgray, LINE_XOOX);
mvputch(3, 6, c_dkgray, LINE_XXXO);
mvputch(3, 7, c_dkgray, LINE_XXOX);
mvputch(3, 8, c_dkgray, LINE_XOXX);
mvputch(3, 9, c_dkgray, LINE_OXXX);
mvputch(3, 10, c_dkgray, LINE_XXXX);
mvwputch(w_help, 3, 0, c_dkgray, LINE_XOXO);
mvwputch(w_help, 3, 1, c_dkgray, LINE_OXOX);
mvwputch(w_help, 3, 2, c_dkgray, LINE_XXOO);
mvwputch(w_help, 3, 3, c_dkgray, LINE_OXXO);
mvwputch(w_help, 3, 4, c_dkgray, LINE_OOXX);
mvwputch(w_help, 3, 5, c_dkgray, LINE_XOOX);
mvwputch(w_help, 3, 6, c_dkgray, LINE_XXXO);
mvwputch(w_help, 3, 7, c_dkgray, LINE_XXOX);
mvwputch(w_help, 3, 8, c_dkgray, LINE_XOXX);
mvwputch(w_help, 3, 9, c_dkgray, LINE_OXXX);
mvwputch(w_help, 3, 10, c_dkgray, LINE_XXXX);
mvwprintz(w_help, 3, 12, c_dkgray, "\
Road - Safe from burrowing animals.");
@@ -724,15 +795,16 @@ several loaded handguns, switching from one to the next once their ammo is\n\
spent.");
mvwprintz(w_help, 12, 0, c_green, "( Crossbows");
mvwprintz(w_help, 13, 0, c_white, "\
The best feature of crossbows is their silence. The bolts they fire are only\n\
rarely destroyed; if you pick up the bolts after firing them, your ammunition\n\
will last much longer. Crossbows suffer from a short range and a very long\n\
reload time (modified by your strength); plus, most only hold a single round.\n\
The best feature of crossbows is their silence. The bolts they fire are\n\
only rarely destroyed; if you pick up the bolts after firing them, your \n\
ammunition will last much longer. Crossbows suffer from a short range and\n\
a very long reload time (modified by your strength); plus, most only hold\n\
a single round.\n\
For this reason, it is advisable to carry a few loaded crossbows.\n\
Crossbows can be very difficult to find; however, it is possible to craft one\n\
given enough Mechanics skill. Likewise, it is possible to make wooden bolts\n\
from any number of wooden objects, though these are much less effective than\n\
steel bolts.\n\
Crossbows can be very difficult to find; however, it is possible to craft\n\
one given enough Mechanics skill. Likewise, it is possible to make\n\
wooden bolts from any number of wooden objects, though these are much\n\
less effective than steel bolts.\n\
Crossbows use the handgun skill.");
mvwprintz(w_help, 24, 0, c_white, "Press any key to continue...");
@@ -747,8 +819,8 @@ Shotguns are one of the most powerful weapons in the game, capable of taking\n\
out almost any enemy with a single hit. Birdshot and 00 shot spread, making\n\
it very easy to hit nearby monsters. However, they are very ineffective\n\
against armor, and some armored monsters might shrug off 00 shot completely.\n\
Shotgun slugs are the answer to this problem; they also offer much better\n\
range than shot.\n\
Shotgun slugs are the answer to this problem; they also offer much\n\
better range than shot.\n\
The biggest drawback to shotguns is their noisiness. They are very loud,\n\
and impossible to silence. A shot that kills one zombie might attract three\n\
more! Because of this, shotguns are best reserved for emergencies.");
@@ -774,8 +846,8 @@ more, their scopes or sights make shots fired at targets more than 10 tiles\n\
away as accurate as those with a shorter range. However, they are very poor\n\
at hitting targets 4 squares or less from the player.\n\
Unlike assault rifles, hunting rifles have no automatic fire. They are also\n\
slow to reload and fire, so when facing a large group of nearby enemies, they\n\
are not the best pick.");
slow to reload and fire, so when facing a large group of nearby enemies,\n\
they are not the best pick.");
mvwprintz(w_help, 11, 0, c_blue, "( Assault Rifles");
mvwprintz(w_help, 12, 0, c_white, "\
Assault rifles are similar to hunting rifles in many ways; they are also\n\
@@ -805,12 +877,12 @@ making them very good at clearing out large numbers of enemies.");
mvwprintz(w_help, 11, 0, c_white, "\
Energy weapons is an umbrella term used to describe a variety of rifles and\n\
handguns which fire lasers, plasma, or energy attacks. They started to\n\
appear in military use just prior to the start of the apocalypse, and as such\n\
are very difficult to find.\n\
appear in military use just prior to the start of the apocalypse, and\n\
as such are very difficult to find.\n\
Energy weapons have no recoil at all; they are nearly silent, have a long\n\
range, and are fairly damaging. The biggest drawback to energy weapons is\n\
scarcity of ammunition; it is wise to reserve the precious ammo for when you\n\
really need it.");
scarcity of ammunition; it is wise to reserve the precious ammo for when\n\
you really need it.");
mvwprintz(w_help, 24, 0, c_white, "Press any key to continue...");
wrefresh(w_help);
@@ -819,31 +891,30 @@ really need it.");
break;
case '6':
werase(w_help);
mvwprintz(w_help, 0, 0, c_white, "\
Q: What is Run Mode, and why does it prevent me from moving?\n\
A: Run Mode is a way to guarantee that you won't die by holding a movement\n\
Q: What is Safe Mode, and why does it prevent me from moving?\n\
A: Safe Mode is a way to guarantee that you won't die by holding a movement\n\
key down. When a monster comes into view, your movement will be ignored\n\
until Run Mode is turned off with the ! key. This ensures that the\n\
sudden appearence of a monster won't catch you off guard.\n\
until Safe Mode is turned off with the ! key. This ensures that\n\
the sudden appearence of a monster won't catch you off guard.\n\
\n\
Q: It seems like everything I eat makes me sick! What's wrong?\n\
A: Lots of the food found in towns is perishable, and will only last a few\n\
days after the start of a new game (July 12). Fruit, milk, and others are\n\
the first to go. After the first couple of days, you should switch to\n\
canned food, jerky, and hunting.\n\
days after the start of a new game (July 12). Fruit, milk, and others\n\
are the first to go. After the first couple of days, you should switch\n\
to canned food, jerky, and hunting.\n\
\n\
Q: Why doesn't reading a book seem to give me any training?\n\
A: Your skills will not be displayed in the @ screen until they reach level\n\
one. Generally it will take several reads of the same book to gain a\n\
single level in a skill.\n\
Q: How can I remove boards from boarded-up windows and doors?\n\
A: Use a hammer and choose the direction of the boarded-up window or\n\
door to remove the boards.\n\
\n\
Q: How can I board up windows and doors?\n\
A: You'll need a hammer, nails, and two by fours. Use the hammer and choose\n\
the direction in which the terrain you wish to barricade lies.\n\
Q: The game just told me to quit, and other weird stuff is happening.\n\
A: You have the Schizophrenic trait, which might make the game seem buggy.\n\
\n\
Q: How can I prevent monsters from attacking while I sleep?\n\
A: Find a safe place to sleep, in a building far from the front door. Set\n\
traps if you have them, or build a fire.");
A: Find a safe place to sleep, in a building far from the front door.\n\
Set traps if you have them, or build a fire.");
wrefresh(w_help);
refresh();
@@ -853,40 +924,49 @@ A: Find a safe place to sleep, in a building far from the front door. Set\n\
Q: Why do I always sink when I try to swim?\n\
A: Your swimming ability is reduced greatly by the weight you are carrying,\n\
and is also adversely affected by the clothing you wear. Until you reach\n\
a high level in the swimming skill, you'll need to drop your equipment and\n\
remove your clothing to swim, making it a last-ditch escape plan.\n\
a high level in the swimming skill, you'll need to drop your equipment \n\
and remove your clothing to swim, making it a last-ditch escape plan.\n\
\n\
Q: How can I cure a fungal infection?\n\
A: At present time, there is only one cure, royal jelly. You can find royal\n\
jelly in the bee hives which dot forests.\n\
\n\
Q: How do I get into science labs?\n\
A: You can enter the front door if you have an ID card by 'e'xamining the\n\
A: You can enter the front door if you have an ID card by %s the\n\
keypad. If you are skilled in computers and have an electrohack, it is\n\
possible to hack the keypad. An EMP blast has a chance to force the doors\n\
open, but it's more likely to break them. You can also sneak in through\n\
the sewers sometimes, or try to smash through the walls with explosions.\n\
\n\
Q: Why does my crafting fail so often?\n\
A: Check the difficulty of the recipe, and the primary skill used; your skill\n\
level should be around one and a half times the difficulty to be confident\n\
that it will succeed.");
A: Check the difficulty of the recipe, and the primary skill used; your\n\
skill level should be around one and a half times the difficulty to\n\
be confident that it will succeed.",
press_x(ACTION_EXAMINE, "examining").c_str());
wrefresh(w_help);
refresh();
getch();
werase(w_help);
mvwprintz(w_help, 0, 0, c_white, "\
Q: Shotguns bring in more zombies than they kill! What's the point?\n\
A: Shotguns are intended for emergency use. If you are cornered, use your\n\
shotgun to escape, then just run from the zombies it attracts.\n\
Q: Why can't I carry anything?\n\
A: At the start of the game you only have the space in your pockets.\n\
A good first goal of many survivors is to find a backpack or pouch to\n\
store things in. (The shelter basement is a good place to check first!)\n\
\n\
Q: The game just told me to quit, and other weird stuff is happening.\n\
A: You have the Schizophrenic trait, which might make the game seem buggy.\n\
Q: Shotguns bring in more zombies than they kill! What's the point?\n\
A: Shotguns are intended for emergency use. If you are cornered, use\n\
your shotgun to escape, then just run from the zombies it attracts.\n\
\n\
Q: Help! I started a fire and now my house is burning down!\n\
A: Fires will spread to nearby flammable tiles if they are able. Lighting a\n\
stop fire in a set-up brazier, wood stove, stone fireplace, or pit will\n\
it from spreading. Fire extinguishers can put out fires that get out\n\
of control.\n\
\n\
Q: I have a question that's not addressed here. How can I get an answer?\n\
A: Email your question to TheDarklingWolf@Gmail.com. I'll answer it for you,\n\
and possibly include it on this list.");
A: Ask the helpful people on the forum at smf.cataclysmdda.com or email\n\
your question to TheDarklingWolf@Gmail.com.");
wrefresh(w_help);
refresh();
+81 -73
View File
@@ -25,15 +25,17 @@ void iexamine::gaspump(game *g, player *p, map *m, int examx, int examy) {
none(g, p, m, examx, examy);
return;
}
bool use_pump = false;
item gas(g->itypes["gasoline"], g->turn);
if (one_in(10 + p->dex_cur)) {
g->add_msg("You accidentally spill the gasoline.");
m->add_item(p->posx, p->posy, gas);
use_pump = true;
} else {
p->moves -= 300;
g->handle_liquid(gas, false, true);
use_pump = g->handle_liquid(gas, false, true);
}
if (one_in(10)) {
if (use_pump && one_in(10)) {
g->add_msg("With a clang and a shudder, the gas pump goes silent.");
m->ter_set(examx, examy, t_gas_pump_empty);
}
@@ -42,18 +44,7 @@ void iexamine::gaspump(game *g, player *p, map *m, int examx, int examy) {
void iexamine::elevator(game *g, player *p, map *m, int examx, int examy){
if (!query_yn("Use the %s?",m->tername(examx, examy).c_str())) return;
int movez = (g->levz < 0 ? 2 : -2);
g->levz += movez;
m->load(g, g->levx, g->levy, g->levz);
g->update_map(p->posx, p->posy);
for (int x = 0; x < SEEX * MAPSIZE; x++) {
for (int y = 0; y < SEEY * MAPSIZE; y++) {
if (m->ter(x, y) == t_elevator) {
p->posx = x;
p->posy = y;
}
}
}
g->refresh_all();
g->vertical_move( movez, false );
}
void iexamine::controls_gate(game *g, player *p, map *m, int examx, int examy) {
@@ -530,52 +521,64 @@ void iexamine::fswitch(game *g, player *p, map *m, int examx, int examy) {
}
void iexamine::flower_poppy(game *g, player *p, map *m, int examx, int examy) {
if(!query_yn("Pick %s?",m->tername(examx, examy).c_str())) {
none(g, p, m, examx, examy);
return;
}
if(!query_yn("Pick %s?",m->tername(examx, examy).c_str())) {
none(g, p, m, examx, examy);
return;
}
g->add_msg("This flower has a heady aroma");
if (!(p->is_wearing("mask_filter")||p->is_wearing("mask_gas") ||
one_in(3))) {
g->add_msg("You fall asleep...");
p->add_disease(DI_SLEEP, 1200, g);
g->add_msg("Your legs are covered by flower's roots!");
p->hurt(g,bp_legs, 0, 4);
p->moves-=50;
}
m->ter_set(examx, examy, t_dirt);
m->spawn_item(examx, examy, g->itypes["poppy_flower"],0);
m->spawn_item(examx, examy, g->itypes["poppy_bud"],0);
int resist = p->resist(bp_mouth);
if (resist < 10) {
// Can't smell the flowers with a gas mask on!
g->add_msg("This flower has a heady aroma");
}
if (one_in(3) && resist < 5) {
// Should user player::infect, but can't!
// player::infect needs to be restructured to return a bool indicating success.
g->add_msg("You fall asleep...");
p->add_disease(DI_SLEEP, 1200, g);
g->add_msg("Your legs are covered by flower's roots!");
p->hurt(g,bp_legs, 0, 4);
p->moves-=50;
}
m->ter_set(examx, examy, t_dirt);
m->spawn_item(examx, examy, "poppy_flower", 0);
m->spawn_item(examx, examy, "poppy_bud", 0);
}
void iexamine::pick_plant(game *g, player *p, map *m, int examx, int examy, std::string itemType, int new_ter) {
if (!query_yn("Pick %s?", m->tername(examx, examy).c_str())) {
none(g, p, m, examx, examy);
return;
}
SkillLevel& survival = p->skillLevel("survival");
if (survival < 1)
p->practice(g->turn, "survival", rng(5, 12));
else if (survival < 6)
p->practice(g->turn, "survival", rng(1, 12 / survival));
int num_fruits = rng(1, survival);
if (num_fruits > 12)
num_fruits = 12;
m->spawn_item(examx, examy, itemType, g->turn, num_fruits);
m->ter_set(examx, examy, (ter_id)new_ter);
}
void iexamine::tree_apple(game *g, player *p, map *m, int examx, int examy) {
if(!query_yn("Pick %s?",m->tername(examx, examy).c_str())) return;
int num_apples = rng(1, p->skillLevel("survival"));
if (num_apples >= 12)
num_apples = 12;
for (int i = 0; i < num_apples; i++)
m->spawn_item(examx, examy, g->itypes["apple"], g->turn, 0);
m->ter_set(examx, examy, t_tree);
pick_plant(g, p, m, examx, examy, "apple", t_tree);
}
void iexamine::shrub_blueberry(game *g, player *p, map *m, int examx, int examy) {
if(!query_yn("Pick %s?",m->tername(examx, examy).c_str())) {
none(g, p, m, examx, examy);
return;
}
pick_plant(g, p, m, examx, examy, "blueberries", t_shrub);
}
int num_blueberries = rng(1, p->skillLevel("survival"));
if (num_blueberries >= 12)
num_blueberries = 12;
for (int i = 0; i < num_blueberries; i++)
m->spawn_item(examx, examy, g->itypes["blueberries"], g->turn, 0);
m->ter_set(examx, examy, t_shrub);
void iexamine::shrub_strawberry(game *g, player *p, map *m, int examx, int examy) {
pick_plant(g, p, m, examx, examy, "strawberries", t_shrub);
}
void iexamine::shrub_wildveggies(game *g, player *p, map *m, int examx, int examy) {
@@ -615,7 +618,7 @@ void iexamine::recycler(game *g, player *p, map *m, int examx, int examy) {
for (int i = 0; i < m->i_at(examx, examy).size(); i++)
{
item *it = &(m->i_at(examx, examy)[i]);
if (it->made_of(STEEL))
if (it->made_of("steel"))
steel_weight += it->weight();
m->i_at(examx, examy).erase(m->i_at(examx, examy).begin() + i);
i--;
@@ -633,16 +636,21 @@ void iexamine::recycler(game *g, player *p, map *m, int examx, int examy) {
g->sound(examx, examy, 80, "Ka-klunk!");
int lump_weight = item_controller->find_template("steel_lump")->weight;
int sheet_weight = item_controller->find_template("sheet_metal")->weight;
int chunk_weight = item_controller->find_template("steel_chunk")->weight;
int scrap_weight = item_controller->find_template("scrap")->weight;
switch(ch)
{
case 1: // 1 steel lump = weight 80
num_lumps = steel_weight / (item_controller->find_template("steel_lump")->weight);
steel_weight -= num_lumps * (item_controller->find_template("steel_lump")->weight);
num_sheets = steel_weight / (item_controller->find_template("sheet_metal")->weight);
steel_weight -= num_sheets * (item_controller->find_template("sheet_metal")->weight);
num_chunks = steel_weight / (item_controller->find_template("steel_chunk")->weight);
steel_weight -= num_chunks * (item_controller->find_template("steel_chunk")->weight);
num_scraps = steel_weight / (item_controller->find_template("scrap")->weight);
num_lumps = steel_weight / (lump_weight);
steel_weight -= num_lumps * (lump_weight);
num_sheets = steel_weight / (sheet_weight);
steel_weight -= num_sheets * (sheet_weight);
num_chunks = steel_weight / (chunk_weight);
steel_weight -= num_chunks * (chunk_weight);
num_scraps = steel_weight / (scrap_weight);
if (num_lumps == 0)
{
g->add_msg("The recycler beeps: \"Insufficient steel!\"");
@@ -651,11 +659,11 @@ void iexamine::recycler(game *g, player *p, map *m, int examx, int examy) {
break;
case 2: // 1 metal sheet = weight 20
num_sheets = steel_weight / (item_controller->find_template("sheet_metal")->weight);
steel_weight -= num_sheets * (item_controller->find_template("sheet_metal")->weight);
num_chunks = steel_weight / (item_controller->find_template("steel_chunk")->weight);
steel_weight -= num_chunks * (item_controller->find_template("sheet_chunk")->weight);
num_scraps = steel_weight / (item_controller->find_template("scrap")->weight);
num_sheets = steel_weight / (sheet_weight);
steel_weight -= num_sheets * (sheet_weight);
num_chunks = steel_weight / (chunk_weight);
steel_weight -= num_chunks * (chunk_weight);
num_scraps = steel_weight / (scrap_weight);
if (num_sheets == 0)
{
g->add_msg("The recycler beeps: \"Insufficient steel!\"");
@@ -664,9 +672,9 @@ void iexamine::recycler(game *g, player *p, map *m, int examx, int examy) {
break;
case 3: // 1 steel chunk = weight 6
num_chunks = steel_weight / (item_controller->find_template("steel_chunk")->weight);
steel_weight -= num_chunks * (item_controller->find_template("steel_chunk")->weight);
num_scraps = steel_weight / (item_controller->find_template("scrap")->weight);
num_chunks = steel_weight / (chunk_weight);
steel_weight -= num_chunks * (chunk_weight);
num_scraps = steel_weight / (scrap_weight);
if (num_chunks == 0)
{
g->add_msg("The recycler beeps: \"Insufficient steel!\"");
@@ -675,28 +683,28 @@ void iexamine::recycler(game *g, player *p, map *m, int examx, int examy) {
break;
case 4: // 1 metal scrap = weight 1
num_scraps = steel_weight / (item_controller->find_template("scrap")->weight);
num_scraps = steel_weight / (scrap_weight);
break;
}
for (int i = 0; i < num_lumps; i++)
{
m->spawn_item(p->posx, p->posy, item_controller->find_template("steel_lump"), 0);
m->spawn_item(p->posx, p->posy, "steel_lump", 0);
}
for (int i = 0; i < num_sheets; i++)
{
m->spawn_item(p->posx, p->posy, item_controller->find_template("sheet_metal"), 0);
m->spawn_item(p->posx, p->posy, "sheet_metal", 0);
}
for (int i = 0; i < num_chunks; i++)
{
m->spawn_item(p->posx, p->posy, item_controller->find_template("steel_chunk"), 0);
m->spawn_item(p->posx, p->posy, "steel_chunk", 0);
}
for (int i = 0; i < num_scraps; i++)
{
m->spawn_item(p->posx, p->posy, item_controller->find_template("scrap"), 0);
m->spawn_item(p->posx, p->posy, "scrap", 0);
}
}
+2
View File
@@ -42,8 +42,10 @@ public:
void pedestal_temple (game *g, player *p, map *m, int examx, int examy);
void fswitch (game *g, player *p, map *m, int examx, int examy);
void flower_poppy (game *g, player *p, map *m, int examx, int examy);
void pick_plant(game *g, player *p, map *m, int examx, int examy, std::string itemType, int new_ter);
void tree_apple (game *g, player *p, map *m, int examx, int examy);
void shrub_blueberry (game *g, player *p, map *m, int examx, int examy);
void shrub_strawberry (game *g, player *p, map *m, int examx, int examy);
void shrub_wildveggies (game *g, player *p, map *m, int examx, int examy);
void recycler (game *g, player *p, map *m, int examx, int examy);
void trap(game *g, player *p, map *m, int examx, int examy);
+23 -12
View File
@@ -452,12 +452,12 @@ void inventory::form_from_map(game *g, point origin, int range)
if (!g->m.i_at(x, y)[i].made_of(LIQUID))
add_item(g->m.i_at(x, y)[i]);
// Kludges for now!
if (g->m.field_at(x, y).type == fd_fire) {
ter_id terrain_id = g->m.ter(x, y);
if ((g->m.field_at(x, y).type == fd_fire) || (terrain_id == t_lava)) {
item fire(g->itypes["fire"], 0);
fire.charges = 1;
add_item(fire);
}
ter_id terrain_id = g->m.ter(x, y);
if (terrain_id == t_toilet || terrain_id == t_water_sh || terrain_id == t_water_dp){
item water(g->itypes["water"], 0);
water.charges = 50;
@@ -650,14 +650,14 @@ std::vector<item> inventory::remove_mission_items(int mission_id)
return ret;
}
void inventory::dump(std::vector<item>& dest) const
void inventory::dump(std::vector<item *>& dest)
{
for (invstack::const_iterator iter = items.begin(); iter != items.end(); ++iter)
for (invstack::iterator iter = items.begin(); iter != items.end(); ++iter)
{
for (std::list<item>::const_iterator stack_iter = iter->begin();
for (std::list<item>::iterator stack_iter = iter->begin();
stack_iter != iter->end(); ++stack_iter)
{
dest.push_back(*stack_iter);
dest.push_back(&(*stack_iter));
}
}
}
@@ -832,6 +832,7 @@ int inventory::charges_of(itype_id it) const
std::list<item> inventory::use_amount(itype_id it, int quantity, bool use_container)
{
sort();
std::list<item> ret;
for (invstack::iterator iter = items.begin(); iter != items.end() && quantity > 0; ++iter)
{
@@ -856,12 +857,15 @@ std::list<item> inventory::use_amount(itype_id it, int quantity, bool use_contai
if (use_container && used_item_contents)
{
stack_iter = iter->erase(stack_iter);
--stack_iter;
if (iter->empty())
{
iter = items.erase(iter);
--iter;
stack_iter = iter->begin();
break;
}
else
{
--stack_iter;
}
}
else if (stack_iter->type->id == it && quantity > 0)
@@ -869,12 +873,15 @@ std::list<item> inventory::use_amount(itype_id it, int quantity, bool use_contai
ret.push_back(*stack_iter);
quantity--;
stack_iter = iter->erase(stack_iter);
--stack_iter;
if (iter->empty())
{
iter = items.erase(iter);
--iter;
stack_iter = iter->begin();
break;
}
else
{
--stack_iter;
}
}
}
@@ -884,6 +891,7 @@ std::list<item> inventory::use_amount(itype_id it, int quantity, bool use_contai
std::list<item> inventory::use_charges(itype_id it, int quantity)
{
sort();
std::list<item> ret;
for (invstack::iterator iter = items.begin(); iter != items.end() && quantity > 0; ++iter)
{
@@ -931,13 +939,16 @@ std::list<item> inventory::use_charges(itype_id it, int quantity)
if (stack_iter->destroyed_at_zero_charges())
{
stack_iter = iter->erase(stack_iter);
--stack_iter;
if (iter->empty())
{
iter = items.erase(iter);
--iter;
break;
}
else
{
--stack_iter;
}
}
else
{
@@ -1260,7 +1271,7 @@ void inventory::rust_iron_items()
stack_iter != iter->end();
++stack_iter)
{
if (stack_iter->type->m1 == IRON && stack_iter->damage < 5 && one_in(8))
if (stack_iter->type->m1 == "iron" && stack_iter->damage < 5 && one_in(8))
{
stack_iter->damage++;
}
+1 -1
View File
@@ -104,7 +104,7 @@ class inventory
int volume() const;
int max_active_item_charges(itype_id id) const;
void dump(std::vector<item>& dest) const; // dumps contents into dest (does not delete contents)
void dump(std::vector<item*>& dest); // dumps contents into dest (does not delete contents)
// vector rather than list because it's NOT an item stack
std::vector<item*> active_items();
+72 -7
View File
@@ -1,5 +1,6 @@
#include "game.h"
#include "output.h"
#include "uistate.h"
#include "keypress.h"
#include <string>
#include <vector>
@@ -153,8 +154,8 @@ char game::inv(std::string title)
int selected=-1;
int selected_char=(int)' ';
if( last_inv_start >= 0 ) start = last_inv_start;
if( last_inv_sel >= 0 ) selected = last_inv_sel;
if( uistate.last_inv_start >= 0 ) start = uistate.last_inv_start;
if( uistate.last_inv_sel >= 0 ) selected = uistate.last_inv_sel;
do {
selected_char=(int)' ';
if (( ch == '<' || ch == KEY_PPAGE ) && start > 0) { // Clear lines and shift
@@ -238,10 +239,10 @@ char game::inv(std::string title)
}
}
} else if ( ch == '\n' || ch == KEY_RIGHT ) {
if ( last_inv_start > -2 && last_inv_sel > -2 ) {
last_inv_start=start;
last_inv_sel=selected;
}
// if ( uistate.last_inv_start > -2 && uistate.last_inv_sel > -2 ) {
uistate.last_inv_start=start;
uistate.last_inv_sel=selected;
// }
ch = selected_char;
}
} while (ch == '<' || ch == '>' || ch == KEY_NPAGE || ch == KEY_PPAGE || ch == KEY_UP || ch == KEY_DOWN );
@@ -376,6 +377,8 @@ std::vector<item> game::multidrop()
u.inv.sort();
u.inv.restack(&u);
WINDOW* w_inv = newwin(((VIEWY < 12) ? 25 : VIEWY*2+1), ((VIEWX < 12) ? 80 : VIEWX*2+56), VIEW_OFFSET_Y, VIEW_OFFSET_X);
int drp_line_width=getmaxx(w_inv)-90;
const std::string drp_line_padding = ( drp_line_width > 1 ? std::string(drp_line_width, ' ') : " ");
const int maxitems = (VIEWY < 12) ? 20 : VIEWY*2-4; // Number of items to show at one time.
std::map<char, int> dropping; // Count of how many we'll drop from each stack
int count = 0; // The current count
@@ -401,9 +404,47 @@ std::vector<item> game::multidrop()
print_inv_weight_vol(this, w_inv, new_weight, new_volume);
int cur_line = 2;
max_it = 0;
int drp_line = 1;
// Print weapon to be dropped, the first position is reserved for high visibility
mvwprintw(w_inv, 0, 90, "%s", drp_line_padding.c_str());
bool dropping_w = false;
for (int k = 0; k < weapon_and_armor.size() && !dropping_w; k++) {
if (weapon_and_armor[k] == u.weapon.invlet) {
dropping_w = true;
}
if (dropping_w && u.is_armed()) {
mvwprintz(w_inv, 0, 90, c_ltblue, "%c + %s", u.weapon.invlet, u.weapname().c_str());
}
}
// Print worn items to be dropped
if(dropping_w) {
mvwprintw(w_inv, drp_line, 90, "%s", drp_line_padding.c_str());
drp_line++;
}
bool dropping_a = false;
if (u.worn.size() > 0){
for (int k = 0; k < u.worn.size(); k++) {
bool dropping_w = false;
for (int j = 0; j < weapon_and_armor.size() && !dropping_w; j++) {
if (weapon_and_armor[j] == u.worn[k].invlet) {
dropping_w = true;
dropping_a = true;
mvwprintw(w_inv, drp_line, 90, "%s", drp_line_padding.c_str());
mvwprintz(w_inv, drp_line, 90, c_cyan, "%c + %s", u.worn[k].invlet, u.worn[k].tname(this).c_str());
drp_line++;
}
}
}
}
if(dropping_a) {
mvwprintw(w_inv, drp_line, 90, "%s", drp_line_padding.c_str());
drp_line++;
}
for (cur_it = start; cur_it < start + maxitems && cur_line < maxitems+3; cur_it++) {
// Clear the current line;
mvwprintw(w_inv, cur_line, 0, " ");
mvwprintw(w_inv, drp_line, 90, "%s", drp_line_padding.c_str());
mvwprintw(w_inv, drp_line + 1, 90, "%s", drp_line_padding.c_str());
// Print category header
for (int i = 1; i < iCategorieNum; i++) {
if (cur_it == firsts[i-1]) {
@@ -433,6 +474,19 @@ std::vector<item> game::multidrop()
else if (it.contents.size() == 1 &&
it.contents[0].charges > 0)
wprintw(w_inv, " (%d)", it.contents[0].charges);
if (icon=='+'||icon=='#') {
mvwprintz(w_inv, drp_line, 90, col, "%c %c %s", it.invlet, icon, it.tname(this).c_str());
if (icon=='+'){
if (stacks[cur_it]->size() > 1)
wprintz(w_inv, col, " [%d]", stacks[cur_it]->size());
if (it.charges > 0)
wprintz(w_inv, col, " (%d)", it.charges);
}
if (icon=='#') {
wprintz(w_inv, col, " {%d}", dropping[it.invlet]);
}
drp_line++;
}
}
cur_line++;
max_it=cur_it;
@@ -584,7 +638,18 @@ std::vector<item> game::multidrop()
}
for (int i = 0; i < weapon_and_armor.size(); i++)
ret.push_back(u.i_rem(weapon_and_armor[i]));
{
if (!u.takeoff(this, weapon_and_armor[i], true))
{
continue;
}
// Item could have been dropped after taking it off
if (&u.inv.item_by_letter(weapon_and_armor[i]) != &u.inv.nullitem)
{
ret.push_back(u.i_rem(weapon_and_armor[i]));
}
}
return ret;
}
+200 -133
View File
@@ -15,8 +15,6 @@
#define mfb(n) long(1 << (n))
#endif
bool is_flammable(material m);
std::string default_technique_name(technique_id tech);
item::item()
@@ -99,10 +97,12 @@ item::item(itype* it, unsigned int turn)
item::item(itype *it, unsigned int turn, char let)
{
if(!it)
if(!it) {
type = nullitem();
else
debugmsg("Instantiating an item from itype, with NULL itype!");
} else {
type = it;
}
bday = turn;
name = "";
damage = 0;
@@ -307,7 +307,7 @@ std::string item::save_info() const
dump << *it << " ";
}
dump << int(burnt) << " " << poison << " " << ammotmp <<
dump << burnt << " " << poison << " " << ammotmp <<
" " << owned << " " << int(bday) << " " << mode;
if (active)
dump << " 1";
@@ -334,7 +334,7 @@ void item::load_info(std::string data, game *g)
std::stringstream dump;
dump << data;
std::string idtmp, ammotmp, item_tag;
int lettmp, damtmp, burntmp, acttmp, corp, tag_count;
int lettmp, damtmp, acttmp, corp, tag_count;
dump >> lettmp >> idtmp >> charges >> damtmp >> tag_count;
for( int i = 0; i < tag_count; ++i )
@@ -343,7 +343,7 @@ void item::load_info(std::string data, game *g)
item_tags.insert( item_tag );
}
dump >> burntmp >> poison >> ammotmp >> owned >> bday >>
dump >> burnt >> poison >> ammotmp >> owned >> bday >>
mode >> acttmp >> corp >> mission_id >> player_id;
if (corp != -1)
corpse = g->mtypes[corp];
@@ -363,7 +363,6 @@ void item::load_info(std::string data, game *g)
make(g->itypes[idtmp]);
invlet = char(lettmp);
damage = damtmp;
burnt = burntmp;
active = false;
if (acttmp == 1)
active = true;
@@ -634,6 +633,25 @@ std::string item::info(bool showtext, std::vector<iteminfo> *dump)
dump->push_back(iteminfo("DESCRIPTION", "\n\n"));
dump->push_back(iteminfo("DESCRIPTION", "This piece of clothing fits you perfectly."));
}
if (is_armor() && has_flag("POCKETS"))
{
dump->push_back(iteminfo("DESCRIPTION", "\n\n"));
dump->push_back(iteminfo("DESCRIPTION", "This piece of clothing has pockets to warm your hands."));
}
if (is_armor() && type->id == "rad_badge")
{
int i;
for( i = 0; i < sizeof(rad_dosage_thresholds)/sizeof(rad_dosage_thresholds[0]); i++ )
{
if( irridation < rad_dosage_thresholds[i] )
{
break;
}
}
dump->push_back(iteminfo("DESCRIPTION", "\n\n"));
dump->push_back(iteminfo("DESCRIPTION", "The film strip on the badge is " +
rad_threshold_colors[i - 1] + "."));
}
if (is_tool() && has_flag("DOUBLE_AMMO"))
{
dump->push_back(iteminfo("DESCRIPTION", "\n\n"));
@@ -667,14 +685,14 @@ std::string item::info(bool showtext, std::vector<iteminfo> *dump)
return temp1.str();
}
char item::symbol()
char item::symbol() const
{
if( is_null() )
return ' ';
return type->sym;
}
nc_color item::color(player *u)
nc_color item::color(player *u) const
{
nc_color ret = c_ltgray;
@@ -718,66 +736,22 @@ std::string item::tname(game *g)
{
std::stringstream ret;
// MATERIALS-TODO: put this in json
if (damage != 0 && !is_null()) {
std::string damtext;
switch (type->m1) {
case VEGGY:
case HFLESH:
case FLESH:
damtext = "partially eaten ";
break;
case COTTON:
case WOOL:
if (damage == -1) damtext = "reinforced ";
if (damage == 1) damtext = "ripped ";
if (damage == 2) damtext = "torn ";
if (damage == 3) damtext = "shredded ";
if (damage == 4) damtext = "tattered ";
break;
case LEATHER:
if (damage == -1) damtext = "reinforced ";
if (damage == 1) damtext = "scratched ";
if (damage == 2) damtext = "cut ";
if (damage == 3) damtext = "torn ";
if (damage == 4) damtext = "tattered ";
break;
case KEVLAR:
if (damage == -1) damtext = "reinforced ";
if (damage == 1) damtext = "marked ";
if (damage == 2) damtext = "dented ";
if (damage == 3) damtext = "scarred ";
if (damage == 4) damtext = "broken ";
break;
case PAPER:
if (damage == 1) damtext = "torn ";
if (damage >= 2) damtext = "shredded ";
break;
case WOOD:
if (damage == 1) damtext = "scratched ";
if (damage == 2) damtext = "chipped ";
if (damage == 3) damtext = "cracked ";
if (damage == 4) damtext = "splintered ";
break;
case PLASTIC:
case GLASS:
if (damage == 1) damtext = "scratched ";
if (damage == 2) damtext = "cut ";
if (damage == 3) damtext = "cracked ";
if (damage == 4) damtext = "shattered ";
break;
case IRON:
if (damage == 1) damtext = "lightly rusted ";
if (damage == 2) damtext = "rusted ";
if (damage == 3) damtext = "very rusty ";
if (damage == 4) damtext = "thoroughly rusted ";
break;
default:
if (damage == 1) damtext = "lightly damaged ";
if (damage == 2) damtext = "damaged ";
if (damage == 3) damtext = "very damaged ";
if (damage == 4) damtext = "thoroughly damaged ";
if (damage == -1) {
damtext = "reinforced";
} else {
if (type->id == "corpse") {
if (damage == 1) damtext = "bruised";
if (damage == 2) damtext = "damaged";
if (damage == 3) damtext = "mangled";
if (damage == 4) damtext = "pulped";
} else {
damtext = type->dmg_adj(damage);
}
}
ret << damtext;
ret << damtext << " ";
}
if (is_var_veh_part()){
@@ -845,7 +819,7 @@ std::string item::tname(game *g)
return ret.str();
}
nc_color item::color()
nc_color item::color() const
{
if (typeId() == "corpse")
return corpse->color;
@@ -865,6 +839,7 @@ int item::price() const
return ret;
}
// MATERIALS-TODO: add a density field to materials.json
int item::weight() const
{
if (typeId() == "corpse") {
@@ -876,9 +851,9 @@ int item::weight() const
case MS_LARGE: ret = 2000; break;
case MS_HUGE: ret = 4000; break;
}
if (made_of(VEGGY))
if (made_of("veggy"))
ret /= 10;
else if (made_of(IRON) || made_of(STEEL) || made_of(STONE))
else if (made_of("iron") || made_of("steel") || made_of("stone"))
ret *= 5;
return ret;
}
@@ -1054,11 +1029,16 @@ bool item::rotten(game *g)
bool item::ready_to_revive(game *g)
{
if (type->id != "corpse" || corpse->species != species_zombie)
if (type->id != "corpse" || corpse->species != species_zombie || damage >= 4)
{
return false;
}
int age_in_hours = (int(g->turn) - bday) / (10 * 60);
age_in_hours -= ((float)burnt/volume()) * 24;
if (damage > 0)
{
age_in_hours /= (damage + 1);
}
int rez_factor = 48 - age_in_hours;
if (age_in_hours > 6 && (rez_factor <= 0 || one_in(rez_factor)))
{
@@ -1125,18 +1105,18 @@ int item::weapon_value(player *p) const
gun_value += int(gun->burst / 2);
gun_value += int(gun->clip / 3);
gun_value -= int(gun->accuracy / 5);
gun_value *= (.5 + (.3 * p->skillLevel(sk_gun)));
gun_value *= (.3 + (.7 * p->skillLevel(gun->skill_used->id()))); /// TODO: FIXME
gun_value *= (.5 + (.3 * p->skillLevel("gun")));
gun_value *= (.3 + (.7 * p->skillLevel(gun->skill_used)));
my_value += gun_value;
}
my_value += int(type->melee_dam * (1 + .3 * p->skillLevel(sk_bashing) +
.1 * p->skillLevel(sk_melee) ));
my_value += int(type->melee_dam * (1 + .3 * p->skillLevel("bashing") +
.1 * p->skillLevel("melee") ));
my_value += int(type->melee_cut * (1 + .4 * p->skillLevel(sk_cutting) +
.1 * p->skillLevel(sk_melee) ));
my_value += int(type->melee_cut * (1 + .4 * p->skillLevel("cutting") +
.1 * p->skillLevel("melee") ));
my_value += int(type->m_to_hit * (1.2 + .3 * p->skillLevel(sk_melee)));
my_value += int(type->m_to_hit * (1.2 + .3 * p->skillLevel("melee")));
return my_value;
}
@@ -1147,16 +1127,16 @@ int item::melee_value(player *p)
return 0;
int my_value = 0;
my_value += int(type->melee_dam * (1 + .3 * p->skillLevel(sk_bashing) +
.1 * p->skillLevel(sk_melee) ));
my_value += int(type->melee_dam * (1 + .3 * p->skillLevel("bashing") +
.1 * p->skillLevel("melee") ));
my_value += int(type->melee_cut * (1 + .4 * p->skillLevel(sk_cutting) +
.1 * p->skillLevel(sk_melee) ));
my_value += int(type->melee_cut * (1 + .4 * p->skillLevel("cutting") +
.1 * p->skillLevel("melee") ));
my_value += int(type->m_to_hit * (1.2 + .3 * p->skillLevel(sk_melee)));
my_value += int(type->m_to_hit * (1.2 + .3 * p->skillLevel("melee")));
if (is_style())
my_value += 15 * p->skillLevel(sk_unarmed) + 8 * p->skillLevel(sk_melee);
my_value += 15 * p->skillLevel("unarmed") + 8 * p->skillLevel("melee");
return my_value;
}
@@ -1164,54 +1144,107 @@ int item::melee_value(player *p)
int item::bash_resist() const
{
int ret = 0;
if (is_null())
return 0;
// base resistance
it_armor* tmp = dynamic_cast<it_armor*>(type);
material_type* cur_mat1 = material_type::find_material_from_tag(tmp->m1);
material_type* cur_mat2 = material_type::find_material_from_tag(tmp->m2);
int eff_thickness = ((tmp->thickness - damage <= 0) ? 1 : (tmp->thickness - damage));
if (is_armor())
{
// base resistance
it_armor* tmp = dynamic_cast<it_armor*>(type);
material_type* cur_mat1 = material_type::find_material(tmp->m1);
material_type* cur_mat2 = material_type::find_material(tmp->m2);
int eff_thickness = ((tmp->thickness - damage <= 0) ? 1 : (tmp->thickness - damage));
// assumes weighted sum of materials for items with 2 materials, 66% material 1 and 33% material 2
if (cur_mat2->is_null())
{
ret = eff_thickness * (3 * cur_mat1->bash_resist());
}
else
{
ret = eff_thickness * (cur_mat1->bash_resist() + cur_mat1->bash_resist() + cur_mat2->bash_resist());
// assumes weighted sum of materials for items with 2 materials, 66% material 1 and 33% material 2
if (cur_mat2->is_null())
{
ret = eff_thickness * (3 * cur_mat1->bash_resist());
}
else
{
ret = eff_thickness * (cur_mat1->bash_resist() + cur_mat1->bash_resist() + cur_mat2->bash_resist());
}
}
return ret;
else // for non-armor, just bash_resist
{
material_type* cur_mat1 = material_type::find_material(type->m1);
material_type* cur_mat2 = material_type::find_material(type->m2);
if (cur_mat2->is_null())
{
ret = 3 * cur_mat1->bash_resist();
}
else
{
ret = cur_mat1->bash_resist() + cur_mat1->bash_resist() + cur_mat2->bash_resist();
}
}
return ret;
}
int item::cut_resist() const
{
int ret = 0;
if (is_null())
return 0;
it_armor* tmp = dynamic_cast<it_armor*>(type);
material_type* cur_mat1 = material_type::find_material_from_tag(tmp->m1);
material_type* cur_mat2 = material_type::find_material_from_tag(tmp->m2);
int eff_thickness = ((tmp->thickness - damage <= 0) ? 1 : (tmp->thickness - damage));
// assumes weighted sum of materials for items with 2 materials, 66% material 1 and 33% material 2
if (is_armor())
{
it_armor* tmp = dynamic_cast<it_armor*>(type);
material_type* cur_mat1 = material_type::find_material(tmp->m1);
material_type* cur_mat2 = material_type::find_material(tmp->m2);
int eff_thickness = ((tmp->thickness - damage <= 0) ? 1 : (tmp->thickness - damage));
// assumes weighted sum of materials for items with 2 materials, 66% material 1 and 33% material 2
if (cur_mat2->is_null())
{
ret = eff_thickness * (3 * cur_mat1->cut_resist());
}
else
{
ret = eff_thickness * (cur_mat1->cut_resist() + cur_mat1->cut_resist() + cur_mat2->cut_resist());
}
}
else // for non-armor
{
material_type* cur_mat1 = material_type::find_material(type->m1);
material_type* cur_mat2 = material_type::find_material(type->m2);
if (cur_mat2->is_null())
{
ret = 3 * cur_mat1->cut_resist();
}
else
{
ret = cur_mat1->cut_resist() + cur_mat1->cut_resist() + cur_mat2->cut_resist();
}
}
return ret;
}
int item::acid_resist() const
{
int ret = 0;
if (is_null())
return 0;
// similar weighted sum of acid resistances
material_type* cur_mat1 = material_type::find_material(type->m1);
material_type* cur_mat2 = material_type::find_material(type->m2);
if (cur_mat2->is_null())
{
ret = eff_thickness * (3 * cur_mat1->cut_resist());
}
ret = 3 * cur_mat1->acid_resist();
}
else
{
ret = eff_thickness * (cur_mat1->cut_resist() + cur_mat1->cut_resist() + cur_mat2->cut_resist());
ret = cur_mat1->acid_resist() + cur_mat1->acid_resist() + cur_mat2->acid_resist();
}
return ret;
return ret;
}
style_move item::style_data(technique_id tech)
@@ -1233,18 +1266,30 @@ style_move item::style_data(technique_id tech)
bool item::is_two_handed(player *u)
{
return (weight() > u->str_cur * 4);
if (has_flag("ALWAYS_TWOHAND"))
{
return true;
}
return (weight() > u->str_cur * 4);
}
bool item::made_of(material mat) const
bool item::made_of(std::string mat_ident) const
{
if( is_null() )
return false;
if (typeId() == "corpse")
return (corpse->mat == mat);
return (corpse->mat == mat_ident);
return (type->m1 == mat || type->m2 == mat);
return (type->m1 == mat_ident || type->m2 == mat_ident);
}
std::string item::get_material(int m) const
{
if (typeId() == "corpse")
return corpse->mat;
return (m==2)?type->m2:type->m1;
}
bool item::made_of(phase_id phase) const
@@ -1255,19 +1300,15 @@ bool item::made_of(phase_id phase) const
return (type->phase == phase);
}
bool item::conductive()
bool item::conductive() const
{
if( is_null() )
return false;
if ((type->m1 == IRON || type->m1 == STEEL || type->m1 == SILVER ||
type->m1 == MNULL) &&
(type->m2 == IRON || type->m2 == STEEL || type->m2 == SILVER ||
type->m2 == MNULL))
return true;
if (type->m1 == MNULL && type->m2 == MNULL)
return true;
return false;
material_type* cur_mat1 = material_type::find_material(type->m1);
material_type* cur_mat2 = material_type::find_material(type->m2);
return (cur_mat1->elec_resist() <= 0 || cur_mat2->elec_resist() <= 0);
}
bool item::destroyed_at_zero_charges()
@@ -1343,8 +1384,7 @@ bool item::is_food(player const*u) const
if (u->has_bionic("bio_batteries") && is_ammo() &&
(dynamic_cast<it_ammo*>(type))->type == AT_BATT)
return true;
if (u->has_bionic("bio_furnace") && is_flammable(type->m1) &&
is_flammable(type->m2) && typeId() != "corpse")
if (u->has_bionic("bio_furnace") && flammable() && typeId() != "corpse")
return true;
return false;
}
@@ -1545,7 +1585,26 @@ int item::sort_rank() const
bool item::operator<(const item& other) const
{
return sort_rank() < other.sort_rank();
int my_rank = sort_rank();
int other_rank = other.sort_rank();
if (my_rank == other_rank)
{
const item *me = is_container() && contents.size() > 0 ? &contents[0] : this;
const item *rhs = other.is_container() && other.contents.size() > 0 ? &other.contents[0] : &other;
if (me->type->id == rhs->type->id)
{
return me->charges < rhs->charges;
}
else
{
return me->type->id < rhs->type->id;
}
}
else
{
return sort_rank() < other.sort_rank();
}
}
int item::reload_time(player &u)
@@ -1811,6 +1870,11 @@ int item::range(player *p)
return 0;
else if (p->str_cur < 10)
ret -= 2 * (10 - p->str_cur);
} else if (has_flag("STR12_DRAW") && p) {
if (p->str_cur < 6)
return 0;
if (p->str_cur < 12)
ret -= 2 * (12 - p->str_cur);
}
return ret;
@@ -2061,9 +2125,12 @@ bool item::burn(int amount)
return (burnt >= volume() * 3);
}
bool is_flammable(material m)
bool item::flammable() const
{
return (m == COTTON || m == WOOL || m == PAPER || m == WOOD || m == MNULL);
material_type* cur_mat1 = material_type::find_material(type->m1);
material_type* cur_mat2 = material_type::find_material(type->m2);
return ((cur_mat1->fire_resist() + cur_mat2->elec_resist()) <= 0);
}
std::string default_technique_name(technique_id tech)
+18 -8
View File
@@ -10,6 +10,10 @@
class player;
class npc;
// Thresholds for radiation dosage for the radiation film badge.
const int rad_dosage_thresholds[] = { 0, 30, 60, 120, 240, 500};
const std::string rad_threshold_colors[] = { "green", "blue", "yellow", "orange", "red", "black"};
struct iteminfo{
public:
std::string sType; //Itemtype
@@ -46,7 +50,7 @@ public:
// returns the default container of this item, with this item in it
item in_its_container(std::map<std::string, itype*> *itypes);
nc_color color(player *u);
nc_color color(player *u) const;
nc_color color_in_inventory(player *u);
std::string tname(game *g = NULL); // g needed for rotten-test
void use(player &u);
@@ -71,8 +75,8 @@ public:
//std::string info(bool showtext = false); // Formatted for human viewing
std::string info(bool showtext = false);
std::string info(bool showtext, std::vector<iteminfo> *dump);
char symbol();
nc_color color();
char symbol() const;
nc_color color() const;
int price() const;
bool invlet_is_okay();
@@ -102,15 +106,20 @@ public:
int weapon_value(player *p) const;
// As above, but discounts its use as a ranged weapon
int melee_value (player *p);
// how resistant armour is to bashing and cutting damage
// how resistant item is to bashing and cutting damage
int bash_resist() const;
int cut_resist() const;
// elemental resistances
int acid_resist() const;
// Returns the data associated with tech, if we are an it_style
style_move style_data(technique_id tech);
bool is_two_handed(player *u);
bool made_of(material mat) const;
bool made_of(std::string mat_ident) const;
std::string get_material(int m) const;
bool made_of(phase_id phase) const;
bool conductive(); // Electricity
bool conductive() const; // Electricity
bool flammable() const;
bool destroyed_at_zero_charges();
// Most of the is_whatever() functions call the same function in our itype
bool is_null() const; // True if type is NULL, or points to the null item (id == 0)
@@ -139,7 +148,7 @@ public:
bool is_other() const; // Doesn't belong in other categories
bool is_var_veh_part() const;
bool is_artifact() const;
bool operator<(const item& other) const;
itype_id typeId() const;
@@ -154,7 +163,7 @@ public:
int charges;
bool active; // If true, it has active effects to be processed
signed char damage; // How much damage it's sustained; generally, max is 5
char burnt; // How badly we're burnt
int burnt; // How badly we're burnt
unsigned int bday; // The turn on which it was created
int owned; // UID of NPC owner; 0 = player, -1 = unowned
union{
@@ -162,6 +171,7 @@ public:
int bigness; // engine power, wheel size
int frequency; // Radio frequency
int note; // Associated dynamic text snippet.
int irridation; // Tracks radiation dosage.
};
std::string mode; // Mode of operation, can be changed by the player.
std::set<std::string> item_tags; // generic item specific flags
+15 -59
View File
@@ -34,6 +34,7 @@ void Item_factory::init(){
iuse_function_list["ROYAL_JELLY"] = &iuse::royal_jelly;
iuse_function_list["BANDAGE"] = &iuse::bandage;
iuse_function_list["FIRSTAID"] = &iuse::firstaid;
iuse_function_list["DISINFECTANT"] = &iuse::disinfectant;
iuse_function_list["CAFF"] = &iuse::caff;
iuse_function_list["ALCOHOL"] = &iuse::alcohol;
iuse_function_list["ALCOHOL_WEAK"] = &iuse::alcohol_weak;
@@ -50,6 +51,8 @@ void Item_factory::init(){
iuse_function_list["CRACK"] = &iuse::crack;
iuse_function_list["GRACK"] = &iuse::grack;
iuse_function_list["METH"] = &iuse::meth;
iuse_function_list["VITAMINS"] = &iuse::vitamins;
iuse_function_list["VACCINE"] = &iuse::vaccine;
iuse_function_list["POISON"] = &iuse::poison;
iuse_function_list["HALLU"] = &iuse::hallu;
iuse_function_list["THORAZINE"] = &iuse::thorazine;
@@ -61,7 +64,6 @@ void Item_factory::init(){
iuse_function_list["INHALER"] = &iuse::inhaler;
iuse_function_list["BLECH"] = &iuse::blech;
iuse_function_list["MUTAGEN"] = &iuse::mutagen;
iuse_function_list["MUTAGEN_3"] = &iuse::mutagen_3;
iuse_function_list["PURIFIER"] = &iuse::purifier;
iuse_function_list["MARLOSS"] = &iuse::marloss;
iuse_function_list["DOGFOOD"] = &iuse::dogfood;
@@ -85,6 +87,7 @@ void Item_factory::init(){
iuse_function_list["DIRECTIONAL_ANTENNA"] = &iuse::directional_antenna;
iuse_function_list["DEVAC"] = &iuse::devac;
iuse_function_list["CAUTERIZE_ELEC"] = &iuse::cauterize_elec;
iuse_function_list["SOLDER_WELD"] = &iuse::solder_weld;
iuse_function_list["WATER_PURIFIER"] = &iuse::water_purifier;
iuse_function_list["TWO_WAY_RADIO"] = &iuse::two_way_radio;
iuse_function_list["RADIO_OFF"] = &iuse::radio_off;
@@ -127,6 +130,7 @@ void Item_factory::init(){
iuse_function_list["SMOKEBOMB_ACT"] = &iuse::smokebomb_act;
iuse_function_list["ACIDBOMB"] = &iuse::acidbomb;
iuse_function_list["ACIDBOMB_ACT"] = &iuse::acidbomb_act;
iuse_function_list["ARROW_FLAMABLE"] = &iuse::arrow_flamable;
iuse_function_list["MOLOTOV"] = &iuse::molotov;
iuse_function_list["MOLOTOV_LIT"] = &iuse::molotov_lit;
iuse_function_list["DYNAMITE"] = &iuse::dynamite;
@@ -168,6 +172,7 @@ void Item_factory::init(){
iuse_function_list["LAW"] = &iuse::LAW;
iuse_function_list["HEATPACK"] = &iuse::heatpack;
iuse_function_list["DEJAR"] = &iuse::dejar;
iuse_function_list["RAD_BADGE"] = &iuse::rad_badge;
// MACGUFFINS
iuse_function_list["MCG_NOTE"] = &iuse::mcg_note;
// ARTIFACTS
@@ -232,6 +237,7 @@ void Item_factory::init(){
ammo_effects_list["FLAME"] = mfb(AMMO_FLAME);
ammo_effects_list["INCENDIARY"] = mfb(AMMO_INCENDIARY);
ammo_effects_list["IGNITE"] = mfb(AMMO_IGNITE);
ammo_effects_list["EXPLOSIVE"] = mfb(AMMO_EXPLOSIVE);
ammo_effects_list["FRAG"] = mfb(AMMO_FRAG);
ammo_effects_list["NAPALM"] = mfb(AMMO_NAPALM);
@@ -309,7 +315,7 @@ const Item_tag Item_factory::id_from(const Item_tag group_tag){
item Item_factory::create(Item_tag id, int created_at){
return item(find_template(id),0);
return item(find_template(id), created_at);
}
Item_list Item_factory::create(Item_tag id, int created_at, int quantity){
Item_list new_items;
@@ -350,6 +356,7 @@ void Item_factory::load_item_templates(){
load_item_templates_from("data/raw/items/comestibles.json");
load_item_templates_from("data/raw/items/armor.json");
load_item_templates_from("data/raw/items/books.json");
load_item_templates_from("data/raw/items/archery.json");
load_item_groups_from("data/raw/item_groups.json");
}
@@ -521,8 +528,8 @@ void Item_factory::load_item_templates_from(const std::string file_name){
if(entry.has("material")){
set_material_from_json(new_id, entry.get("material"));
} else {
new_item_template->m1 = MNULL;
new_item_template->m2 = MNULL;
new_item_template->m1 = "null";
new_item_template->m2 = "null";
}
Item_tag new_phase = "solid";
if(entry.has("phase")){
@@ -852,7 +859,7 @@ bool Item_factory::is_mod_target(catajson targets, std::string weapon){
void Item_factory::set_material_from_json(Item_tag new_id, catajson mat_list){
//If the value isn't found, just return a group of null materials
material material_list[2] = {MNULL, MNULL};
std::string material_list[2] = {"null", "null"};
if (mat_list.is_array())
{
@@ -860,12 +867,12 @@ void Item_factory::set_material_from_json(Item_tag new_id, catajson mat_list){
{
debugmsg("Too many materials provided for item %s", new_id.c_str());
}
material_list[0] = material_from_tag(new_id, mat_list.get(0).as_string());
material_list[1] = material_from_tag(new_id, mat_list.get(1).as_string());
material_list[0] = mat_list.get(0).as_string();
material_list[1] = mat_list.get(1).as_string();
}
else
{
material_list[0] = material_from_tag(new_id, mat_list.as_string());
material_list[0] = mat_list.as_string();
}
itype* temp = find_template(new_id);
@@ -887,54 +894,3 @@ phase_id Item_factory::phase_from_tag(Item_tag name){
return PNULL;
}
};
// TODO: depreciate once materials rewrite is up and running
material Item_factory::material_from_tag(Item_tag new_id, Item_tag name){
// Map the valid input tags to a valid material
// This should clearly be some sort of map, stored somewhere
// ...unless it can get replaced entirely, which would be nice.
// For now, though, that isn't the problem I'm solving.
if(name == "VEGGY"){
return VEGGY;
} else if(name == "FLESH"){
return FLESH;
} else if(name == "POWDER"){
return POWDER;
} else if(name == "HFLESH"){
return HFLESH;
} else if(name == "COTTON"){
return COTTON;
} else if(name == "WOOL"){
return WOOL;
} else if(name == "LEATHER"){
return LEATHER;
} else if(name == "KEVLAR"){
return KEVLAR;
} else if(name == "FUR"){
return FUR;
} else if(name == "CHITIN"){
return CHITIN;
} else if(name == "STONE"){
return STONE;
} else if(name == "PAPER"){
return PAPER;
} else if(name == "WOOD"){
return WOOD;
} else if(name == "PLASTIC"){
return PLASTIC;
} else if(name == "GLASS"){
return GLASS;
} else if(name == "IRON"){
return IRON;
} else if(name == "STEEL"){
return STEEL;
} else if(name == "SILVER"){
return SILVER;
} else if(name == "NULL"){
return MNULL;
} else {
return MNULL;
}
}
-1
View File
@@ -59,7 +59,6 @@ private:
unsigned flags_from_json(catajson flags, std::string flag_type="");
void set_material_from_json(Item_tag new_id, catajson mats);
bool is_mod_target(catajson targets, std::string weapon);
material material_from_tag(Item_tag new_id, Item_tag index);
phase_id phase_from_tag(Item_tag name);
ammotype ammo_from_string(std::string ammo);
+34 -31
View File
@@ -77,6 +77,7 @@ NUM_SOFTWARE_TYPES
enum ammo_effect {
AMMO_FLAME, // Sets fire to terrain and monsters
AMMO_INCENDIARY, // Sparks explosive terrain
AMMO_IGNITE, // Sets fire to some monsters
AMMO_EXPLOSIVE, // Small explosion
AMMO_FRAG, // Frag explosion
AMMO_NAPALM, // Firey explosion
@@ -162,8 +163,8 @@ struct itype
char sym; // Symbol on the map
nc_color color; // Color on the map (color.h)
material m1; // Main material
material m2; // Secondary material -- MNULL if made of just 1 thing
std::string m1; // Main material
std::string m2; // Secondary material -- "null" if made of just 1 thing
phase_id phase; //e.g. solid, liquid, gas
@@ -200,6 +201,8 @@ struct itype
virtual bool count_by_charges() { return false; }
virtual picojson::value save_data() { return picojson::value(); }
std::string dmg_adj(int dam) { return material_type::find_material(m1)->dmg_adj(dam); }
void (iuse::*use)(game *, player *, item *, bool);// Special effects of use
itype() {
@@ -208,8 +211,8 @@ struct itype
name = "none";
sym = '#';
color = c_white;
m1 = MNULL;
m2 = MNULL;
m1 = "null";
m2 = "null";
phase = SOLID;
volume = 0;
weight = 0;
@@ -221,7 +224,7 @@ struct itype
itype(std::string pid, unsigned char prarity, unsigned int pprice,
std::string pname, std::string pdes,
char psym, nc_color pcolor, material pm1, material pm2, phase_id pphase,
char psym, nc_color pcolor, std::string pm1, std::string pm2, phase_id pphase,
unsigned short pvolume, unsigned short pweight,
signed char pmelee_dam, signed char pmelee_cut, signed char pm_to_hit,
unsigned ptechniques = 0) {
@@ -278,7 +281,7 @@ struct it_comest : public itype
it_comest(std::string pid, unsigned char prarity, unsigned int pprice,
std::string pname, std::string pdes,
char psym, nc_color pcolor, material pm1, phase_id pphase,
char psym, nc_color pcolor, std::string pm1, phase_id pphase,
unsigned short pvolume, unsigned short pweight,
signed char pmelee_dam, signed char pmelee_cut,
signed char pm_to_hit,
@@ -288,7 +291,7 @@ struct it_comest : public itype
unsigned char pcharges, signed char pfun, itype_id pcontainer,
itype_id ptool, void (iuse::*puse)(game *, player *, item *, bool),
add_type padd, std::string pcomesttype)
:itype(pid, prarity, pprice, pname, pdes, psym, pcolor, pm1, MNULL, pphase,
:itype(pid, prarity, pprice, pname, pdes, psym, pcolor, pm1, "null", pphase,
pvolume, pweight, pmelee_dam, pmelee_cut, pm_to_hit)
{
quench = pquench;
@@ -318,7 +321,7 @@ struct it_var_veh_part: public itype
it_var_veh_part(std::string pid, unsigned char prarity, unsigned int pprice,
std::string pname, std::string pdes,
char psym, nc_color pcolor, material pm1, material pm2,
char psym, nc_color pcolor, std::string pm1, std::string pm2,
unsigned short pvolume, unsigned short pweight,
signed char pmelee_dam, signed char pmelee_cut, signed char pm_to_hit,
unsigned effects,
@@ -372,7 +375,7 @@ struct it_ammo : public itype
it_ammo(std::string pid, unsigned char prarity, unsigned int pprice,
std::string pname, std::string pdes,
char psym, nc_color pcolor, material pm1, phase_id pphase,
char psym, nc_color pcolor, std::string pm1, phase_id pphase,
unsigned short pvolume, unsigned short pweight,
signed char pmelee_dam, signed char pmelee_cut, signed char pm_to_hit,
unsigned effects,
@@ -380,7 +383,7 @@ struct it_ammo : public itype
ammotype ptype, unsigned char pdamage, unsigned char ppierce,
signed char paccuracy, unsigned char precoil, unsigned char prange,
unsigned char pcount)
:itype(pid, prarity, pprice, pname, pdes, psym, pcolor, pm1, MNULL, pphase,
:itype(pid, prarity, pprice, pname, pdes, psym, pcolor, pm1, "null", pphase,
pvolume, pweight, pmelee_dam, pmelee_cut, pm_to_hit, 0) {
type = ptype;
damage = pdamage;
@@ -410,7 +413,7 @@ struct it_gun : public itype
it_gun(std::string pid, unsigned char prarity, unsigned int pprice,
std::string pname, std::string pdes,
char psym, nc_color pcolor, material pm1, material pm2,
char psym, nc_color pcolor, std::string pm1, std::string pm2,
unsigned short pvolume, unsigned short pweight,
signed char pmelee_dam, signed char pmelee_cut, signed char pm_to_hit,
@@ -448,7 +451,7 @@ struct it_gunmod : public itype
it_gunmod(std::string pid, unsigned char prarity, unsigned int pprice,
std::string pname, std::string pdes,
char psym, nc_color pcolor, material pm1, material pm2,
char psym, nc_color pcolor, std::string pm1, std::string pm2,
unsigned short pvolume, unsigned short pweight,
signed char pmelee_dam, signed char pmelee_cut,
signed char pm_to_hit,
@@ -493,13 +496,13 @@ struct it_armor : public itype
virtual bool is_power_armor() { return power_armor; }
virtual bool is_artifact() { return false; }
virtual picojson::value save_data() { return picojson::value(); }
std::string bash_dmg_verb() { return m2 == MNULL || !one_in(3) ?
material_type::find_material_from_tag(m1)->bash_dmg_verb() :
material_type::find_material_from_tag(m2)->bash_dmg_verb();
std::string bash_dmg_verb() { return m2 == "null" || !one_in(3) ?
material_type::find_material(m1)->bash_dmg_verb() :
material_type::find_material(m2)->bash_dmg_verb();
}
std::string cut_dmg_verb() { return m2 == MNULL || !one_in(3) ?
material_type::find_material_from_tag(m1)->cut_dmg_verb() :
material_type::find_material_from_tag(m2)->cut_dmg_verb();
std::string cut_dmg_verb() { return m2 == "null" || !one_in(3) ?
material_type::find_material(m1)->cut_dmg_verb() :
material_type::find_material(m2)->cut_dmg_verb();
}
it_armor() : itype()
@@ -516,7 +519,7 @@ struct it_armor : public itype
it_armor(itype_id pid, unsigned char prarity, unsigned int pprice,
std::string pname, std::string pdes,
char psym, nc_color pcolor, material pm1, material pm2,
char psym, nc_color pcolor, std::string pm1, std::string pm2,
unsigned short pvolume, unsigned short pweight,
signed char pmelee_dam, signed char pmelee_cut, signed char pm_to_hit,
@@ -553,7 +556,7 @@ struct it_book : public itype
it_book() {}
it_book(std::string pid, unsigned char prarity, unsigned int pprice,
std::string pname, std::string pdes,
char psym, nc_color pcolor, material pm1, material pm2,
char psym, nc_color pcolor, std::string pm1, std::string pm2,
unsigned short pvolume, unsigned short pweight,
signed char pmelee_dam, signed char pmelee_cut, signed char pm_to_hit,
@@ -584,7 +587,7 @@ struct it_container : public itype
virtual bool is_container() { return true; }
it_container(std::string pid, unsigned char prarity, unsigned int pprice,
std::string pname, std::string pdes,
char psym, nc_color pcolor, material pm1, material pm2,
char psym, nc_color pcolor, std::string pm1, std::string pm2,
unsigned short pvolume, unsigned short pweight,
signed char pmelee_dam, signed char pmelee_cut,
signed char pm_to_hit,
@@ -623,7 +626,7 @@ struct it_tool : public itype
it_tool(std::string pid, unsigned char prarity, unsigned int pprice,
std::string pname, std::string pdes,
char psym, nc_color pcolor, material pm1, material pm2, phase_id pphase,
char psym, nc_color pcolor, std::string pm1, std::string pm2, phase_id pphase,
unsigned short pvolume, unsigned short pweight,
signed char pmelee_dam, signed char pmelee_cut, signed char pm_to_hit,
@@ -652,7 +655,7 @@ struct it_bionic : public itype
it_bionic(std::string pid, unsigned char prarity, unsigned int pprice,
std::string pname, std::string pdes,
char psym, nc_color pcolor, material pm1, material pm2,
char psym, nc_color pcolor, std::string pm1, std::string pm2,
unsigned short pvolume, unsigned short pweight,
signed char pmelee_dam, signed char pmelee_cut,
signed char pm_to_hit,
@@ -673,7 +676,7 @@ struct it_macguffin : public itype
it_macguffin(std::string pid, unsigned char prarity, unsigned int pprice,
std::string pname, std::string pdes,
char psym, nc_color pcolor, material pm1, material pm2,
char psym, nc_color pcolor, std::string pm1, std::string pm2,
unsigned short pvolume, unsigned short pweight,
signed char pmelee_dam, signed char pmelee_cut,
signed char pm_to_hit,
@@ -696,7 +699,7 @@ struct it_software : public itype
it_software(std::string pid, unsigned char prarity, unsigned int pprice,
std::string pname, std::string pdes,
char psym, nc_color pcolor, material pm1, material pm2,
char psym, nc_color pcolor, std::string pm1, std::string pm2,
unsigned short pvolume, unsigned short pweight,
signed char pmelee_dam, signed char pmelee_cut,
signed char pm_to_hit,
@@ -717,7 +720,7 @@ struct it_style : public itype
it_style(std::string pid, unsigned char prarity, unsigned int pprice,
std::string pname, std::string pdes,
char psym, nc_color pcolor, material pm1, material pm2,
char psym, nc_color pcolor, std::string pm1, std::string pm2,
unsigned char pvolume, unsigned char pweight,
signed char pmelee_dam, signed char pmelee_cut,
signed char pm_to_hit)
@@ -734,7 +737,7 @@ struct it_stationary : public itype
it_stationary(std::string pid, unsigned char prarity, unsigned int pprice,
std::string pname, std::string pdes,
char psym, nc_color pcolor, material pm1, material pm2,
char psym, nc_color pcolor, std::string pm1, std::string pm2,
unsigned char pvolume, unsigned char pweight,
signed char pmelee_dam, signed char pmelee_cut,
signed char pm_to_hit,
@@ -840,8 +843,8 @@ struct it_artifact_tool : public it_tool
};
it_artifact_tool(std::string pid, unsigned int pprice, std::string pname,
std::string pdes, char psym, nc_color pcolor, material pm1,
material pm2, unsigned short pvolume, unsigned short pweight,
std::string pdes, char psym, nc_color pcolor, std::string pm1,
std::string pm2, unsigned short pvolume, unsigned short pweight,
signed char pmelee_dam, signed char pmelee_cut,
signed char pm_to_hit, std::set<std::string> pitem_tags,
@@ -927,8 +930,8 @@ struct it_artifact_armor : public it_armor
};
it_artifact_armor(std::string pid, unsigned int pprice, std::string pname,
std::string pdes, char psym, nc_color pcolor, material pm1,
material pm2, unsigned short pvolume, unsigned short pweight,
std::string pdes, char psym, nc_color pcolor, std::string pm1,
std::string pm2, unsigned short pvolume, unsigned short pweight,
signed char pmelee_dam, signed char pmelee_cut,
signed char pm_to_hit, std::set<std::string> pitem_tags,
+39 -38
View File
@@ -34,26 +34,26 @@ void game::init_itypes ()
{
// First, the null object. NOT REALLY AN OBJECT AT ALL. More of a concept.
itypes["null"]=
new itype("null", 0, 0, "none", "", '#', c_white, MNULL, MNULL, PNULL, 0, 0, 0, 0, 0, 0);
new itype("null", 0, 0, "none", "", '#', c_white, "null", "null", PNULL, 0, 0, 0, 0, 0, 0);
// Corpse - a special item
itypes["corpse"]=
new itype("corpse", 0, 0, "corpse", "A dead body.", '%', c_white, MNULL, MNULL, PNULL, 0, 0,
new itype("corpse", 0, 0, "corpse", "A dead body.", '%', c_white, "null", "null", PNULL, 0, 0,
0, 0, 1, 0);
// Fire - only appears in crafting recipes
itypes["fire"]=
new itype("fire", 0, 0, "nearby fire",
"Some fire - if you are reading this it's a bug! (itypdef:fire)",
'$', c_red, MNULL, MNULL, PNULL, 0, 0, 0, 0, 0, 0);
'$', c_red, "null", "null", PNULL, 0, 0, 0, 0, 0, 0);
// Integrated toolset - ditto
itypes["toolset"]=
new itype("toolset", 0, 0, "integrated toolset",
"A fake item. If you are reading this it's a bug! (itypdef:toolset)",
'$', c_red, MNULL, MNULL, PNULL, 0, 0, 0, 0, 0, 0);
'$', c_red, "null", "null", PNULL, 0, 0, 0, 0, 0, 0);
// For smoking crack or meth
itypes["apparatus"]=
new itype("apparatus", 0, 0, "something to smoke that from, and a lighter",
"A fake item. If you are reading this it's a bug! (itypdef:apparatus)",
'$', c_red, MNULL, MNULL, PNULL, 0, 0, 0, 0, 0, 0);
'$', c_red, "null", "null", PNULL, 0, 0, 0, 0, 0, 0);
#define VAR_VEH_PART(id, name,rarity,price,sym,color,mat1,mat2,volume,wgt,dam,cut,to_hit,\
flags, bigmin, bigmax, bigaspect, des)\
@@ -62,65 +62,65 @@ color,mat1,mat2,volume,wgt,dam,cut,to_hit,flags, bigmin, bigmax, bigaspect)
//"wheel", "wheel_wide", "wheel_bicycle", "wheel_motorbike", "wheel_small",
// NAME RAR PRC SYM COLOR MAT1 MAT2
VAR_VEH_PART("wheel", "wheel", 10, 100, ']', c_dkgray, STEEL, PLASTIC,
VAR_VEH_PART("wheel", "wheel", 10, 100, ']', c_dkgray, "steel", "plastic",
// VOL WGT DAM CUT HIT FLAGS BIGNESS_MIN BIGNESS_MAX BIGNESS_ASPECT
40, 140, 12, 0, -1, 0, 13, 20, BIGNESS_WHEEL_DIAMETER, "\
A car wheel");
// NAME RAR PRC SYM COLOR MAT1 MAT2
VAR_VEH_PART("wheel_wide", "wide wheel", 4, 340, ']', c_dkgray, STEEL, PLASTIC,
VAR_VEH_PART("wheel_wide", "wide wheel", 4, 340, ']', c_dkgray, "steel", "plastic",
// VOL WGT DAM CUT HIT FLAGS BIGNESS_MIN BIGNESS_MAX ASPECT
70, 260, 17, 0, -1, 0, 17, 36, BIGNESS_WHEEL_DIAMETER, "\
A wide wheel. \\o/ This wide.");
// NAME RAR PRC SYM COLOR MAT1 MAT2
VAR_VEH_PART("wheel_bicycle", "bicycle wheel", 18, 40, ']', c_dkgray, STEEL, PLASTIC,
VAR_VEH_PART("wheel_bicycle", "bicycle wheel", 18, 40, ']', c_dkgray, "steel", "plastic",
// VOL WGT DAM CUT HIT FLAGS BIGNESS_MIN BIGNESS_MAX ASPECT
28, 45, 8, 0, -1, 0, 9, 18, BIGNESS_WHEEL_DIAMETER, "\
A bicycle wheel");
// NAME RAR PRC SYM COLOR MAT1 MAT2
VAR_VEH_PART("wheel_motorbike", "motorbike wheel", 13, 140, ']', c_dkgray, STEEL, PLASTIC,
VAR_VEH_PART("wheel_motorbike", "motorbike wheel", 13, 140, ']', c_dkgray, "steel", "plastic",
// VOL WGT DAM CUT HIT FLAGS BIGNESS_MIN BIGNESS_MAX ASPECT
33, 85, 10, 0, -1, 0, 9, 14, BIGNESS_WHEEL_DIAMETER, "\
A motorbike wheel");
// NAME RAR PRC SYM COLOR MAT1 MAT2
VAR_VEH_PART("wheel_small", "small wheel", 5, 140, ']', c_dkgray, STEEL, PLASTIC,
VAR_VEH_PART("wheel_small", "small wheel", 5, 140, ']', c_dkgray, "steel", "plastic",
// VOL WGT DAM CUT HIT FLAGS BIGNESS_MIN BIGNESS_MAX ASPECT
9, 42, 10, 0, -1, 0, 6, 14, BIGNESS_WHEEL_DIAMETER, "\
A pretty small wheel. Probably from one of those segway things.\
It is not very menacing.");
// NAME RAR PRC SYM COLOR MAT1 MAT2
VAR_VEH_PART("1cyl_combustion", "1-cylinder engine", 3, 100, ':', c_ltcyan, IRON, MNULL,
VAR_VEH_PART("1cyl_combustion", "1-cylinder engine", 3, 100, ':', c_ltcyan, "iron", "null",
// VOL WGT DAM CUT HIT FLAGS 0BIGNESS_MIN BIGNESS_MAX ASPECT
6, 70, 4, 0, -1, 0, 28, 75, BIGNESS_ENGINE_DISPLACEMENT, "\
A single-cylinder 4-stroke combustion engine.");
// NAME RAR PRC SYM COLOR MAT1 MAT2
VAR_VEH_PART("v2_combustion", "V-twin engine", 2, 100, ':', c_ltcyan, IRON, MNULL,
VAR_VEH_PART("v2_combustion", "V-twin engine", 2, 100, ':', c_ltcyan, "iron", "null",
// VOL WGT DAM CUT HIT FLAGS BIGNESS_MIN BIGNESS_MAX ASPECT
6, 70, 4, 0, -1, 0, 65, 260, BIGNESS_ENGINE_DISPLACEMENT, "\
A 2-cylinder 4-stroke combustion engine.");
// NAME RAR PRC SYM COLOR MAT1 MAT2
VAR_VEH_PART("i4_combustion", "Inline-4 engine", 6, 150, ':', c_ltcyan, IRON, MNULL,
VAR_VEH_PART("i4_combustion", "Inline-4 engine", 6, 150, ':', c_ltcyan, "iron", "null",
// VOL WGT DAM CUT HIT FLAGS BIGNESS_MIN BIGNESS_MAX ASPECT
6, 160, 8, 0, -2, 0, 220, 350, BIGNESS_ENGINE_DISPLACEMENT, "\
A small, yet powerful 4-cylinder combustion engine.");
// NAME RAR PRC SYM COLOR MAT1 MAT2
VAR_VEH_PART("v6_combustion", "V6 engine", 3, 180, ':', c_ltcyan, IRON, MNULL,
VAR_VEH_PART("v6_combustion", "V6 engine", 3, 180, ':', c_ltcyan, "iron", "null",
// VOL WGT DAM CUT HIT FLAGS BIGNESS_MIN BIGNESS_MAX ASPECT
14, 400, 12, 0, -3, 0, 250, 520, BIGNESS_ENGINE_DISPLACEMENT, "\
A powerful 6-cylinder combustion engine.");
// NAME RAR PRC SYM COLOR MAT1 MAT2
VAR_VEH_PART("v8_combustion", "V8 engine", 2, 250, ':', c_ltcyan, IRON, MNULL,
VAR_VEH_PART("v8_combustion", "V8 engine", 2, 250, ':', c_ltcyan, "iron", "null",
// VOL WGT DAM CUT HIT FLAGS BIGNESS_MIN BIGNESS_MAX ASPECT
25, 600, 15, 0, -5, 0, 380, 700, BIGNESS_ENGINE_DISPLACEMENT, "\
A large and very powerful 8-cylinder combustion engine.");
// AMMUNITION
// Material should be the wrapper--even though shot is made of iron, because
// it can survive a dip in water and be okay, its material here is PLASTIC.
// it can survive a dip in water and be okay, its material here is "plastic".
// dmg is damage done, in an average hit. Note that the average human has
// 80 health. Headshots do 8x damage; vital hits do 2x-4x; glances do 0x-1x.
// Weight and price is per 100 rounds.
@@ -188,68 +188,68 @@ itypes[id]=new it_tool(id,rarity,price,name,des,sym,\
color,mat1,mat2,SOLID,volume,wgt,melee_dam,melee_cut,to_hit,max_charge,\
def_charge,charge_per_use,charge_per_sec,fuel,revert,func)
CONT("bag_plastic", "plastic bag", 50, 1, c_ltgray, PLASTIC,MNULL,
CONT("bag_plastic", "plastic bag", 50, 1, c_ltgray, "plastic","null",
// VOL WGT DAM HIT VOL FLAGS
1, 0, -8, -4, 24, 0, "\
A small, open plastic bag. Essentially trash.");
CONT("bottle_plastic", "plastic bottle", 70, 8, c_ltcyan, PLASTIC,MNULL,
CONT("bottle_plastic", "plastic bottle", 70, 8, c_ltcyan, "plastic","null",
2, 0, -8, 1, 2, mfb(con_rigid)|mfb(con_wtight)|mfb(con_seals),"\
A resealable plastic bottle, holds 500mls of liquid.");
CONT("bottle_glass", "glass bottle", 70, 12, c_cyan, GLASS, MNULL,
CONT("bottle_glass", "glass bottle", 70, 12, c_cyan, "glass", "null",
3, 2, 8, 1, 3, mfb(con_rigid)|mfb(con_wtight)|mfb(con_seals),"\
A resealable glass bottle, holds 750mls of liquid.");
CONT("can_drink", "aluminum can", 70, 1, c_ltblue, STEEL, MNULL,
CONT("can_drink", "aluminum can", 70, 1, c_ltblue, "steel", "null",
1, 0, 0, 0, 1, mfb(con_rigid)|mfb(con_wtight), "\
An aluminum can, like what soda comes in.");
CONT("can_food", "tin can", 65, 2, c_blue, IRON, MNULL,
CONT("can_food", "tin can", 65, 2, c_blue, "iron", "null",
1, 0, -1, 1, 1, mfb(con_rigid)|mfb(con_wtight), "\
A tin can, like what beans come in.");
CONT("box_small", "sm. cardboard box",50, 0, c_brown, PAPER, MNULL,
CONT("box_small", "sm. cardboard box",50, 0, c_brown, "paper", "null",
4, 0, -5, 1, 4, mfb(con_rigid), "\
A small cardboard box. No bigger than a foot in any dimension.");
CONT("canteen", "plastic canteen", 20, 1000, c_green, PLASTIC,MNULL,
CONT("canteen", "plastic canteen", 20, 1000, c_green, "plastic","null",
6, 2, -8, 1, 6, mfb(con_rigid)|mfb(con_wtight)|mfb(con_seals),"\
A large military-style water canteen, with a 1.5 liter capacity and strap.");
CONT("jerrycan", "plastic jerrycan", 10, 2500, c_green, PLASTIC,MNULL,
CONT("jerrycan", "plastic jerrycan", 10, 2500, c_green, "plastic","null",
40, 4, -2, -2, 40, mfb(con_rigid)|mfb(con_wtight)|mfb(con_seals),"\
A bulky plastic jerrycan, meant to carry fuel, but can carry other liquids\n\
in a pinch. It has a capacity of 10 liters.");
CONT("jug_plastic", "gallon jug", 10, 2500, c_ltcyan, PLASTIC,MNULL,
CONT("jug_plastic", "gallon jug", 10, 2500, c_ltcyan, "plastic","null",
10, 2, -8, 1, 10, mfb(con_rigid)|mfb(con_wtight)|mfb(con_seals),"\
A standard plastic jug used for household cleaning chemicals.");
CONT("flask_glass", "glass flask", 10, 2500, c_ltcyan, GLASS,MNULL,
CONT("flask_glass", "glass flask", 10, 2500, c_ltcyan, "glass","null",
1, 0, 8, 1, 1, mfb(con_rigid)|mfb(con_wtight)|mfb(con_seals),"\
A 250 ml laboratory conical flask, with a rubber bung.");
CONT("waterskin", "waterskin", 0, 0, c_brown, LEATHER, MNULL,
CONT("waterskin", "waterskin", 0, 0, c_brown, "leather", "null",
// VOL WGT DAM HIT VOL FLAGS
6, 4, -8, -5, 6, mfb(con_wtight)|mfb(con_seals), "\
A watertight leather bag, can hold 1.5 liters of water.");
CONT("jerrycan_big", "steel jerrycan", 20, 5000, c_green, STEEL, MNULL,
CONT("jerrycan_big", "steel jerrycan", 20, 5000, c_green, "steel", "null",
100, 7, -3, -3, 100, mfb(con_rigid)|mfb(con_wtight)|mfb(con_seals),"\
A steel jerrycan, meant to carry fuel, but can carry other liquds\n\
in a pinch. It has a capacity of 25 liters.");
CONT("keg", "aluminum keg", 20, 6000, c_ltcyan, STEEL, MNULL,
CONT("keg", "aluminum keg", 20, 6000, c_ltcyan, "steel", "null",
200, 12, -4, -4, 200, mfb(con_rigid)|mfb(con_wtight)|mfb(con_seals),"\
A reusable aluminum keg, used for shipping beer.\n\
It has a capcity of 50 liters.");
CONT("jar_glass", "glass jar", 50, 2500, c_ltcyan, GLASS,MNULL,
CONT("jar_glass", "glass jar", 50, 2500, c_ltcyan, "glass","null",
1, 1, 8, 1, 1, mfb(con_rigid)|mfb(con_wtight)|mfb(con_seals),"\
A half-litre glass jar with a metal screw top lid, used for canning.");
TOOL("jack", "jack", 30, 86, ';', c_ltgray, IRON, MNULL,
TOOL("jack", "jack", 30, 86, ';', c_ltgray, "iron", "null",
// VOL WGT DAM CUT HIT FLAGS
5, 10, 11, 0, 2, 0, 0, 0, 0, AT_NULL, "null", &iuse::none, "\
A common hydraulic jack, used when changing tires.");
@@ -260,7 +260,7 @@ A common hydraulic jack, used when changing tires.");
// list of options.
#define BIO(id, name, rarity, price, color, difficulty, des) \
itypes[id]=new it_bionic(id, rarity,price,name,des,':',\
color, STEEL, PLASTIC, 10, 18, 8, 0, 0, difficulty)
color, "steel", "plastic", 10, 18, 8, 0, 0, difficulty)
#define BIO_SINGLE(id,rarity,price,color,difficulty) \
BIO(id, std::string("CBM: ")+bionics[id]->name, rarity,price,color,difficulty, \
@@ -280,7 +280,7 @@ by 10 units."); // This is another special case, increases power capacity by 10
// SOFTWARE
#define SOFTWARE(id, name, price, swtype, power, description) \
itypes[id]=new it_software(id, 0, price, name, description,\
' ', c_white, MNULL, MNULL, 0, 0, 0, 0, 0, swtype, power)
' ', c_white, "null", "null", 0, 0, 0, 0, 0, swtype, power)
//Macguffins
#define MACGUFFIN(id, name, price, sym, color, mat1, mat2, volume, wgt, dam, cut,\
@@ -367,6 +367,7 @@ BIO_SINGLE("bio_laser", 2, 7200, c_red, 5);
BIO_SINGLE("bio_emp", 2, 7200, c_red, 5);
// power armor
BIO_SINGLE("bio_power_armor_interface", 20, 1200, c_yellow, 1);
BIO_SINGLE("bio_power_armor_interface_mkII", 8, 10000, c_yellow, 8);
SOFTWARE("software_useless", "misc software", 300, SW_USELESS, 0, "\
A miscellaneous piece of hobby software. Probably useless.");
@@ -383,13 +384,13 @@ A piece of mathematical software.");
SOFTWARE("software_blood_data", "infection data", 200, SW_DATA, 5, "\
Medical data on zombie blood.");
MACGUFFIN("note", "note", 0, '?', c_white, PAPER, MNULL, 1, 0, 0, 0, 0,
MACGUFFIN("note", "note", 0, '?', c_white, "paper", "null", 1, 0, 0, 0, 0,
true, &iuse::mcg_note, "\
A hand-written paper note.");
#define STATIONARY(id, name, rarity, price, category, description) \
itypes[id] = new it_stationary(id, rarity, price, name, description,\
',', c_white, PAPER, MNULL, 0, 0, 0, 0, 0, category)
',', c_white, "paper", "null", 0, 0, 0, 0, 0, category)
STATIONARY("flyer", "flyer", 5, 1, "flier", "A scrap of paper.");
@@ -403,12 +404,12 @@ for(std::map<std::string,itype*>::iterator iter = itypes.begin(); iter != itypes
}
// NAME RARE TYPE COLOR MAT
AMMO("bio_fusion_ammo", "Fusion blast", 0,0, AT_FUSION,c_dkgray, MNULL,
AMMO("bio_fusion_ammo", "Fusion blast", 0,0, AT_FUSION,c_dkgray, "null",
// VOL WGT DMG AP RNG ACC REC COUNT
0, 0, 40, 0, 10, 1, 0, 5, "", mfb(AMMO_INCENDIARY));
// NAME RARE COLOR MAT1 MAT2
GUN("bio_blaster_gun", "fusion blaster", 0,0,c_magenta, STEEL, PLASTIC,
GUN("bio_blaster_gun", "fusion blaster", 0,0,c_magenta, "steel", "plastic",
// SKILL AMMO VOL WGT MDG HIT DMG RNG ACC REC DUR BST CLIP REL
"rifle", AT_FUSION, 12, 0, 0, 0, 0, 0, 4, 0, 10, 0, 1, 500,
"");
@@ -421,7 +422,7 @@ GUN("bio_blaster_gun", "fusion blaster", 0,0,c_magenta, STEEL, PLASTIC,
// Unarmed Styles
#define STYLE(id, name, dam, description, ...) \
itypes[id]=new it_style(id, 0, 0, name, description, '$', \
c_white, MNULL, MNULL, 0, 0, dam, 0, 0); \
c_white, "null", "null", 0, 0, dam, 0, 0); \
setvector(&((static_cast<it_style*>(itypes[id])))->moves, __VA_ARGS__, NULL); \
itypes[id]->item_tags.insert("UNARMED_WEAPON"); \
martial_arts_itype_ids.push_back(id)
+650 -328
View File
File diff suppressed because it is too large Load Diff
+6 -2
View File
@@ -18,6 +18,7 @@ class iuse
void royal_jelly (game *g, player *p, item *it, bool t);
void bandage (game *g, player *p, item *it, bool t);
void firstaid (game *g, player *p, item *it, bool t);
void disinfectant (game *g, player *p, item *it, bool t);
void caff (game *g, player *p, item *it, bool t);
void alcohol (game *g, player *p, item *it, bool t);
void alcohol_weak (game *g, player *p, item *it, bool t);
@@ -34,6 +35,8 @@ class iuse
void crack (game *g, player *p, item *it, bool t);
void grack (game *g, player *p, item *it, bool t);
void meth (game *g, player *p, item *it, bool t);
void vitamins (game *g, player *p, item *it, bool t);
void vaccine (game *g, player *p, item *it, bool t);
void poison (game *g, player *p, item *it, bool t);
void hallu (game *g, player *p, item *it, bool t);
void thorazine (game *g, player *p, item *it, bool t);
@@ -45,7 +48,6 @@ class iuse
void inhaler (game *g, player *p, item *it, bool t);
void blech (game *g, player *p, item *it, bool t);
void mutagen (game *g, player *p, item *it, bool t);
void mutagen_3 (game *g, player *p, item *it, bool t);
void purifier (game *g, player *p, item *it, bool t);
void marloss (game *g, player *p, item *it, bool t);
void dogfood (game *g, player *p, item *it, bool t);
@@ -67,6 +69,7 @@ class iuse
void glowstick (game *g, player *p, item *it, bool t);
void glowstick_active(game *g, player *p, item *it, bool t);
void cauterize_elec (game *g, player *p, item *it, bool t);
void solder_weld (game *g, player *p, item *it, bool t);
void water_purifier (game *g, player *p, item *it, bool t);
void two_way_radio (game *g, player *p, item *it, bool t);
void directional_antenna (game *g, player *p, item *it, bool t);
@@ -108,6 +111,7 @@ class iuse
void smokebomb (game *g, player *p, item *it, bool t);
void smokebomb_act (game *g, player *p, item *it, bool t);
void acidbomb (game *g, player *p, item *it, bool t);
void arrow_flamable (game *g, player *p, item *it, bool t);
void acidbomb_act (game *g, player *p, item *it, bool t);
void molotov (game *g, player *p, item *it, bool t);
void molotov_lit (game *g, player *p, item *it, bool t);
@@ -151,7 +155,7 @@ class iuse
void heatpack (game *g, player *p, item *it, bool t);
void dejar (game *g, player *p, item *it, bool t);
void devac (game *g, player *p, item *it, bool t);
void rad_badge (game *g, player *p, item *it, bool t);
// MACGUFFINS
void mcg_note (game *g, player *p, item *it, bool t);
// ARTIFACTS
+4 -2
View File
@@ -8,8 +8,8 @@ long input(long ch)
ch = getch();
}
// Needs a totally seperate implementation for windows
#if !(defined _WIN32 || defined WINDOWS)
// Our current tiles and Windows code doesn't have ungetch()
#if !(defined TILES || defined _WIN32 || defined WINDOWS)
int newch;
// Clear the buffer of characters that match the one we're going to act on.
@@ -25,6 +25,7 @@ long input(long ch)
}
#endif
switch (ch) {
case KEY_UP: return 'k';
case KEY_LEFT: return 'h';
@@ -228,6 +229,7 @@ recraft -\n\
construct *\n\
disassemble (\n\
sleep $\n\
control_vehicle ^\n\
safemode !\n\
autosafe \"\n\
ignore_enemy '\n\
+143 -83
View File
@@ -2,6 +2,7 @@
#include "map.h"
#include "game.h"
#include "lightmap.h"
#include "options.h"
#define INBOUNDS(x, y) \
(x >= 0 && x < SEEX * MAPSIZE && y >= 0 && y < SEEY * MAPSIZE)
@@ -44,13 +45,13 @@ void map::generate_lightmap(game* g)
// Apply player light sources
if (held_luminance > LIGHT_AMBIENT_LOW)
apply_light_source(g->u.posx, g->u.posy, held_luminance);
apply_light_source(g->u.posx, g->u.posy, held_luminance, trigdist);
int flood_basalt_check = 0; // does excessive lava need high quality lighting? Nope nope nope nope
for(int sx = 0; sx < LIGHTMAP_CACHE_X; ++sx) {
for(int sy = 0; sy < LIGHTMAP_CACHE_Y; ++sy) {
const ter_id terrain = g->m.ter(sx, sy);
const std::vector<item> items = g->m.i_at(sx, sy);
const field current_field = g->m.field_at(sx, sy);
const std::vector<item> &items = g->m.i_at(sx, sy);
const field &current_field = g->m.field_at(sx, sy);
// When underground natural_light is 0, if this changes we need to revisit
if (natural_light > LIGHT_AMBIENT_LOW) {
if (!g->m.is_outside(sx, sy)) {
@@ -70,42 +71,44 @@ void map::generate_lightmap(game* g)
for( std::vector<item>::const_iterator itm = items.begin(); itm != items.end(); ++itm )
{
if ( itm->has_flag("LIGHT_20")) { apply_light_source(sx, sy, 20); }
if ( itm->has_flag("LIGHT_1")) { apply_light_source(sx, sy, 1); }
if ( itm->has_flag("LIGHT_4")) { apply_light_source(sx, sy, 4); }
if ( itm->has_flag("LIGHT_8")) { apply_light_source(sx, sy, 8); }
if ( itm->has_flag("LIGHT_20")) { apply_light_source(sx, sy, 20, trigdist); }
if ( itm->has_flag("LIGHT_1")) { apply_light_source(sx, sy, 1, trigdist); }
if ( itm->has_flag("LIGHT_4")) { apply_light_source(sx, sy, 4, trigdist); }
if ( itm->has_flag("LIGHT_8")) { apply_light_source(sx, sy, 8, trigdist); }
}
if(terrain == t_lava)
apply_light_source(sx, sy, 50);
if(terrain == t_lava) {
flood_basalt_check++;
apply_light_source(sx, sy, 50, trigdist && flood_basalt_check < 512 ); // todo: optimize better
}
if(terrain == t_console)
apply_light_source(sx, sy, 3);
apply_light_source(sx, sy, 3, false); // 3^2 circle is just silly
if(terrain == t_emergency_light)
apply_light_source(sx, sy, 3);
apply_light_source(sx, sy, 3, false);
// TODO: [lightmap] Attach light brightness to fields
switch(current_field.type) {
case fd_fire:
if (3 == current_field.density)
apply_light_source(sx, sy, 160);
apply_light_source(sx, sy, 160, trigdist);
else if (2 == current_field.density)
apply_light_source(sx, sy, 60);
apply_light_source(sx, sy, 60, trigdist);
else
apply_light_source(sx, sy, 16);
apply_light_source(sx, sy, 16, trigdist);
break;
case fd_fire_vent:
case fd_flame_burst:
apply_light_source(sx, sy, 8);
apply_light_source(sx, sy, 8, trigdist);
break;
case fd_electricity:
if (3 == current_field.density)
apply_light_source(sx, sy, 8);
apply_light_source(sx, sy, 8, trigdist);
else if (2 == current_field.density)
apply_light_source(sx, sy, 1);
apply_light_source(sx, sy, 1, trigdist);
else
apply_light_source(sx, sy, LIGHT_SOURCE_LOCAL); // kinda a hack as the square will still get marked
apply_light_source(sx, sy, LIGHT_SOURCE_LOCAL, trigdist); // kinda a hack as the square will still get marked
break;
}
}
@@ -116,23 +119,23 @@ void map::generate_lightmap(game* g)
int my = g->z[i].posy;
if (INBOUNDS(mx, my)) {
if (g->z[i].has_effect(ME_ONFIRE)) {
apply_light_source(mx, my, 3);
apply_light_source(mx, my, 3, trigdist);
}
// TODO: [lightmap] Attach natural light brightness to creatures
// TODO: [lightmap] Allow creatures to have light attacks (ie: eyebot)
// TODO: [lightmap] Allow creatures to have facing and arc lights
switch (g->z[i].type->id) {
case mon_zombie_electric:
apply_light_source(mx, my, 1);
apply_light_source(mx, my, 1, trigdist);
break;
case mon_turret:
apply_light_source(mx, my, 2);
apply_light_source(mx, my, 2, trigdist);
break;
case mon_flaming_eye:
apply_light_source(mx, my, LIGHT_SOURCE_BRIGHT);
apply_light_source(mx, my, LIGHT_SOURCE_BRIGHT, trigdist);
break;
case mon_manhack:
apply_light_source(mx, my, LIGHT_SOURCE_LOCAL);
apply_light_source(mx, my, LIGHT_SOURCE_LOCAL, trigdist);
break;
}
}
@@ -141,23 +144,33 @@ void map::generate_lightmap(game* g)
// Apply any vehicle light sources
VehicleList vehs = g->m.get_vehicles();
for(int v = 0; v < vehs.size(); ++v) {
if(vehs[v].v->lights_on) {
int dir = vehs[v].v->face.dir();
for (std::vector<int>::iterator part = vehs[v].v->external_parts.begin();
part != vehs[v].v->external_parts.end(); ++part) {
int px = vehs[v].x + vehs[v].v->parts[*part].precalc_dx[0];
int py = vehs[v].y + vehs[v].v->parts[*part].precalc_dy[0];
if(INBOUNDS(px, py)) {
int dpart = vehs[v].v->part_with_feature(*part , vpf_light);
if (dpart >= 0) {
float veh_luminance = vehs[v].v->part_info(dpart).power;
if (veh_luminance > LL_LIT) {
apply_light_arc(px, py, dir, veh_luminance);
}
if(vehs[v].v->lights_on) {
int dir = vehs[v].v->face.dir();
float veh_luminance=0.0;
float iteration=1.0;
for (std::vector<int>::iterator part = vehs[v].v->external_parts.begin();
part != vehs[v].v->external_parts.end(); ++part) {
int dpart = vehs[v].v->part_with_feature(*part , vpf_light);
if (dpart >= 0) {
veh_luminance += ( vehs[v].v->part_info(dpart).power / iteration );
iteration=iteration * 1.1;
}
}
if (veh_luminance > LL_LIT) {
for (std::vector<int>::iterator part = vehs[v].v->external_parts.begin();
part != vehs[v].v->external_parts.end(); ++part) {
int px = vehs[v].x + vehs[v].v->parts[*part].precalc_dx[0];
int py = vehs[v].y + vehs[v].v->parts[*part].precalc_dy[0];
if(INBOUNDS(px, py)) {
int dpart = vehs[v].v->part_with_feature(*part , vpf_light);
if (dpart >= 0) {
apply_light_arc(px, py, dir, veh_luminance, 45);
}
}
}
}
}
}
}
}
}
@@ -200,6 +213,8 @@ void map::cache_seen(int fx, int fy, int tx, int ty, int max_range)
{
if (!INBOUNDS(fx, fy) || !INBOUNDS(tx, ty)) return;
seen_cache[fx][fy] = true;
const int ax = abs(tx - fx) << 1;
const int ay = abs(ty - fy) << 1;
const int dx = (fx < tx) ? 1 : -1;
@@ -249,7 +264,7 @@ void map::cache_seen(int fx, int fy, int tx, int ty, int max_range)
}
}
void map::apply_light_source(int x, int y, float luminance)
void map::apply_light_source(int x, int y, float luminance, bool trig_brightcalc )
{
bool lit[LIGHTMAP_CACHE_X][LIGHTMAP_CACHE_Y];
memset(lit, 0, sizeof(lit));
@@ -266,19 +281,20 @@ void map::apply_light_source(int x, int y, float luminance)
int sy = y - range; int ey = y + range;
for(int off = sx; off <= ex; ++off) {
apply_light_ray(lit, x, y, off, sy, luminance);
apply_light_ray(lit, x, y, off, ey, luminance);
apply_light_ray(lit, x, y, off, sy, luminance, trig_brightcalc);
apply_light_ray(lit, x, y, off, ey, luminance, trig_brightcalc);
}
// Skip corners with + 1 and < as they were done
for(int off = sy + 1; off < ey; ++off) {
apply_light_ray(lit, x, y, sx, off, luminance);
apply_light_ray(lit, x, y, ex, off, luminance);
apply_light_ray(lit, x, y, sx, off, luminance, trig_brightcalc);
apply_light_ray(lit, x, y, ex, off, luminance, trig_brightcalc);
}
}
}
void map::apply_light_arc(int x, int y, int angle, float luminance)
void map::apply_light_arc(int x, int y, int angle, float luminance, int wideangle )
{
if (luminance <= LIGHT_SOURCE_LOCAL)
return;
@@ -286,55 +302,84 @@ void map::apply_light_arc(int x, int y, int angle, float luminance)
bool lit[LIGHTMAP_CACHE_X][LIGHTMAP_CACHE_Y];
memset(lit, 0, sizeof(lit));
#define lum_mult 3.0
luminance=luminance*lum_mult;
int range = LIGHT_RANGE(luminance);
apply_light_source(x, y, LIGHT_SOURCE_LOCAL);
apply_light_source(x, y, LIGHT_SOURCE_LOCAL, trigdist);
// Normalise (should work with negative values too)
angle = angle % 360;
// East side
if (angle < 90 || angle > 270) {
int sy = y - ((angle < 90) ? range * (( 45 - angle) / 45.0f) : range);
int ey = y + ((angle > 270) ? range * ((angle - 315) / 45.0f) : range);
const double PI = 3.14159265358979f;
const double HALFPI = 1.570796326794895f;
const double wangle=wideangle/2.0;
int ox = x + range;
for(int oy = sy; oy <= ey; ++oy)
apply_light_ray(lit, x, y, ox, oy, luminance);
}
int nangle = angle % 360;
// South side
if (angle < 180) {
int sx = x - ((angle < 90) ? range * (( angle - 45) / 45.0f) : range);
int ex = x + ((angle > 90) ? range * ((135 - angle) / 45.0f) : range);
int endx, endy;
double rad = PI * (double)nangle / 180;
calc_ray_end(nangle, range, x, y, &endx, &endy);
apply_light_ray(lit, x, y, endx, endy , luminance, trigdist);
int oy = y + range;
for(int ox = sx; ox <= ex; ++ox)
apply_light_ray(lit, x, y, ox, oy, luminance);
}
int testx, testy;
calc_ray_end(wangle + nangle, range, x, y, &testx, &testy);
// West side
if (angle > 90 && angle < 270) {
int sy = y - ((angle < 180) ? range * ((angle - 135) / 45.0f) : range);
int ey = y + ((angle > 180) ? range * ((225 - angle) / 45.0f) : range);
double wdist=sqrt(double((endx - testx) * (endx - testx) + (endy - testy) * (endy - testy)));
if(wdist > 0.5) {
double wstep = ( wangle / ( wdist * 1.42 ) ); // attempt to determine beam density required to cover all squares
int ox = x - range;
for(int oy = sy; oy <= ey; ++oy)
apply_light_ray(lit, x, y, ox, oy, luminance);
}
for (double ao=wstep; ao <= wangle; ao+=wstep) {
if ( trigdist ) {
double fdist=(ao * HALFPI) / wangle;
double orad = ( PI * ao / 180.0 );
endx = int( x + ( (double)range - fdist * 2.0) * cos(rad+orad) );
endy = int( y + ( (double)range - fdist * 2.0) * sin(rad+orad) );
apply_light_ray(lit, x, y, endx, endy , luminance, true);
// North side
if (angle > 180) {
int sx = x - ((angle > 270) ? range * ((315 - angle) / 45.0f) : range);
int ex = x + ((angle < 270) ? range * ((angle - 225) / 45.0f) : range);
int oy = y - range;
for(int ox = sx; ox <= ex; ++ox)
apply_light_ray(lit, x, y, ox, oy, luminance);
endx = int( x + ( (double)range - fdist * 2.0) * cos(rad-orad) );
endy = int( y + ( (double)range - fdist * 2.0) * sin(rad-orad) );
apply_light_ray(lit, x, y, endx, endy , luminance, true);
} else {
calc_ray_end(nangle + ao, range, x, y, &endx, &endy);
apply_light_ray(lit, x, y, endx, endy , luminance, false);
calc_ray_end(nangle - ao, range, x, y, &endx, &endy);
apply_light_ray(lit, x, y, endx, endy , luminance, false);
}
}
}
}
void map::calc_ray_end(int angle, int range, int x, int y, int* outx, int* outy)
{
const double PI = 3.14159265358979f;
double rad = (PI * angle) / 180;
if (trigdist)
{
*outx = x + range * cos(rad);
*outy = y + range * sin(rad);
} else {
int mult = 0;
if (angle >= 135 && angle <= 315)
{
mult = -1;
} else {
mult = 1;
}
if (angle <= 45 || (135 <= angle && angle <= 215) || 315 < angle)
{
*outx = x + range * mult;
*outy = y + range * tan(rad) * mult;
} else {
*outx = x + range * 1/tan(rad) * mult;
*outy = y + range * mult;
}
}
}
void map::apply_light_ray(bool lit[LIGHTMAP_CACHE_X][LIGHTMAP_CACHE_Y],
int sx, int sy, int ex, int ey, float luminance)
int sx, int sy, int ex, int ey, float luminance, bool trig_brightcalc)
{
int ax = abs(ex - sx) << 1;
int ay = abs(ey - sy) << 1;
@@ -343,6 +388,9 @@ void map::apply_light_ray(bool lit[LIGHTMAP_CACHE_X][LIGHTMAP_CACHE_Y],
int x = sx;
int y = sy;
if( sx == ex && sy == ey ) { return; }
float transparency = LIGHT_TRANSPARENCY_CLEAR;
// TODO: [lightmap] Pull out the common code here rather than duplication
@@ -362,7 +410,13 @@ void map::apply_light_ray(bool lit[LIGHTMAP_CACHE_X][LIGHTMAP_CACHE_Y],
lit[x][y] = true;
// We know x is the longest angle here and squares can ignore the abs calculation
float light = luminance / ((sx - x) * (sx - x));
float light=0.0;
if ( trig_brightcalc ) {
int td = trig_dist(sx, sy, x, y);
light = luminance / ( td * td );
} else {
light = luminance / ((sx - x) * (sx - x));
}
lm[x][y] += light * transparency;
}
@@ -389,8 +443,14 @@ void map::apply_light_ray(bool lit[LIGHTMAP_CACHE_X][LIGHTMAP_CACHE_Y],
lit[x][y] = true;
// We know y is the longest angle here and squares can ignore the abs calculation
float light = luminance / ((sy - y) * (sy - y));
lm[x][y] += light;
float light=0.0;
if ( trig_brightcalc ) {
int td = trig_dist(sx, sy, x, y);
light = luminance / ( td * td );
} else {
light = luminance / ((sy - y) * (sy - y));
}
lm[x][y] += light * transparency;
}
if (INBOUNDS(x, y))
+7 -6
View File
@@ -1,4 +1,5 @@
#include "line.h"
#include "game.h"
#include <stdlib.h>
#define SGN(a) (((a)<0) ? -1 : 1)
@@ -61,11 +62,14 @@ std::vector <point> line_to(int x1, int y1, int x2, int y2, int t)
int trig_dist(int x1, int y1, int x2, int y2)
{
return int(sqrt(double(pow(x1 - x2, 2.0) + pow(y1 - y2, 2.0))));
return int( sqrt( double( (x1-x2)*(x1-x2) + (y1-y2)*(y1-y2) ) ) );
}
int rl_dist(int x1, int y1, int x2, int y2)
{
if(trigdist) {
return trig_dist( x1, y1, x2, y2 );
}
int dx = abs(x1 - x2), dy = abs(y1 - y2);
if (dx > dy)
return dx;
@@ -74,10 +78,7 @@ int rl_dist(int x1, int y1, int x2, int y2)
int rl_dist(point a, point b)
{
int dx = abs(a.x - b.x), dy = abs(a.y - b.y);
if (dx > dy)
return dx;
return dy;
return rl_dist(a.x, a.y, b.x, b.y);
}
double slope_of(std::vector<point> line)
@@ -165,7 +166,7 @@ std::string direction_name_short(direction dir)
case NORTHEAST: return "NE";
case EAST: return "E ";
case SOUTHEAST: return "SE";
case SOUTH: return "W ";
case SOUTH: return "S ";
case SOUTHWEST: return "SW";
case WEST: return "W ";
case NORTHWEST: return "NW";
+7
View File
@@ -17,8 +17,15 @@
void exit_handler(int s);
#ifdef USE_WINMAIN
int APIENTRY WinMain (HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine, int nCmdShow)
{
int argc = __argc;
char **argv = __argv;
#else
int main(int argc, char *argv[])
{
#endif
#ifdef ENABLE_LOGGING
setupDebug();
#endif
+531 -314
View File
File diff suppressed because it is too large Load Diff
+19 -9
View File
@@ -65,8 +65,13 @@ class map
void clear_traps();
// Movement and LOS
int move_cost(const int x, const int y); // Cost to move through; 0 = impassible
int move_cost_ter_only(const int x, const int y); // same as above, but don't take vehicles into account
// Cost to move through; 0 = impassible, 1 = 50 moves, 2 = 100 etc
int move_cost(const int x, const int y);
// Same as above, but don't take vehicles into account
int move_cost_ter_only(const int x, const int y);
// Cost to move out of one tile and into the next,
// returns player/monster moves (50, 75, 100, etc), unlike move_cost
int combined_movecost(const int x1, const int y1, const int x2, const int y2);
bool trans(const int x, const int y); // Transparent?
// (Fx, Fy) sees (Tx, Ty), within a range of (range)?
// tc indicates the Bresenham line used to connect the two points, and may
@@ -144,10 +149,14 @@ class map
void i_clear(const int x, const int y);
void i_rem(const int x, const int y, const int index);
point find_item(const item *it);
void spawn_item(const int x, const int y, itype* type, int birthday, int quantity = 0, int charges = 0, int damlevel = 0);
void spawn_artifact(const int x, const int y, itype* type, int bday);
void spawn_item(const int x, const int y, std::string itype_id, int birthday, int quantity = 0, int charges = 0, int damlevel = 0);
void add_item_or_charges(const int x, const int y, item new_item);
void add_item(const int x, const int y, item new_item);
int max_volume(const int x, const int y);
int free_volume(const int x, const int y);
int stored_volume(const int x, const int y);
bool is_full(const int x, const int y, const int addvolume = -1, const int addnumber = -1 );
bool add_item_or_charges(const int x, const int y, item new_item, int overflow_radius = 0, bool skip_checks = false );
void add_item(const int x, const int y, item new_item, int maxitems = 64); // Do we want mapgen and explosions piling up to MAX_ITEM_IN_SQUARE (1024)? NYET!
void process_active_items(game *g);
void process_active_items_in_submap(game *g, const int nonant);
void process_vehicles(game *g);
@@ -188,7 +197,7 @@ class map
void post_process(game *g, unsigned zones);
void place_spawns(game *g, std::string group, const int chance,
const int x1, const int y1, const int x2, const int y2, const float density);
void place_items(items_location loc, const int chance, const int x1, const int y1,
int place_items(items_location loc, const int chance, const int x1, const int y1,
const int x2, const int y2, bool ongrass, const int turn);
// put_items_from puts exactly num items, based on chances
void put_items_from(items_location loc, const int num, const int x, const int y, const int turn = 0, const int quantity = 0, const int charges = 0, const int damlevel = 0);
@@ -249,10 +258,11 @@ protected:
private:
long determine_wall_corner(const int x, const int y, const long orig_sym);
void cache_seen(const int fx, const int fy, const int tx, const int ty, const int max_range);
void apply_light_source(int x, int y, float luminance);
void apply_light_arc(int x, int y, int angle, float luminance);
void apply_light_source(int x, int y, float luminance, bool trig_brightcalc);
void apply_light_arc(int x, int y, int angle, float luminance, int wideangle = 30 );
void apply_light_ray(bool lit[MAPSIZE*SEEX][MAPSIZE*SEEY],
int sx, int sy, int ex, int ey, float luminance);
int sx, int sy, int ex, int ey, float luminance, bool trig_brightcalc = true);
void calc_ray_end(int angle, int range, int x, int y, int* outx, int* outy);
float lm[MAPSIZE*SEEX][MAPSIZE*SEEY];
float sm[MAPSIZE*SEEX][MAPSIZE*SEEY];
+24 -3
View File
@@ -50,6 +50,7 @@ enum t_flag {
rough, // May hurt the player's feet
sealed, // Can't 'e' to retrieve items here
noitem, // Items "fall off" this space
destroy_item, // Items are destroyed by this tile
goes_down, // Can '>' to go down a level
goes_up, // Can '<' to go up a level
console, // Used as a computer
@@ -111,6 +112,7 @@ t_bars,
t_door_c, t_door_b, t_door_o, t_door_locked_interior, t_door_locked, t_door_locked_alarm, t_door_frame,
t_chaingate_l, t_fencegate_c, t_fencegate_o, t_chaingate_c, t_chaingate_o, t_door_boarded,
t_door_metal_c, t_door_metal_o, t_door_metal_locked,
t_door_bar_c, t_door_bar_o, t_door_bar_locked,
t_door_glass_c, t_door_glass_o,
t_bulletin,
t_portcullis,
@@ -120,7 +122,7 @@ t_window_stained_green, t_window_stained_red, t_window_stained_blue,
t_rock, t_fault,
t_paper,
// Tree
t_tree, t_tree_young, t_tree_apple, t_underbrush, t_shrub, t_indoor_plant, t_shrub_blueberry, t_log,
t_tree, t_tree_young, t_tree_apple, t_underbrush, t_shrub, t_indoor_plant, t_shrub_blueberry, t_shrub_strawberry, t_log,
t_root_wall,
t_wax, t_floor_wax,
t_fence_v, t_fence_h, t_chainfence_v, t_chainfence_h, t_chainfence_posts,
@@ -142,7 +144,7 @@ t_generator_broken,
t_missile, t_missile_exploded,
t_counter,
t_radio_tower, t_radio_controls,
t_console_broken, t_console, t_gates_mech_control, t_barndoor, t_palisade_pulley,
t_console_broken, t_console, t_gates_mech_control, t_gates_control_concrete, t_barndoor, t_palisade_pulley,
t_sewage_pipe, t_sewage_pump,
t_centrifuge,
t_column,
@@ -338,6 +340,12 @@ const ter_t terlist[num_terrain_types] = { // MUST match enum ter_id above!
mfb(transparent)|mfb(supports_roof), &iexamine::none},
{"closed metal door",'+', c_cyan, 0, -1, tr_null, // Actually locked
mfb(noitem)|mfb(supports_roof), &iexamine::none},
{"closed bar door",'+', c_cyan, 0, -1, tr_null,// unlocked, only created at map gen
mfb(transparent)|mfb(noitem)|mfb(supports_roof), &iexamine::none},
{"open bar door", '\'', c_cyan, 2, -1, tr_null,
mfb(transparent)|mfb(supports_roof), &iexamine::none},
{"closed bar door",'+', c_cyan, 0, -1, tr_null, // locked
mfb(transparent)|mfb(noitem)|mfb(supports_roof), &iexamine::none},
{"closed glass door",'+', c_ltcyan, 0, -1, tr_null,
mfb(transparent)|mfb(bashable)|mfb(door)|mfb(noitem)|mfb(supports_roof), &iexamine::none},
{"open glass door", '\'', c_ltcyan, 2, -1, tr_null,
@@ -406,6 +414,9 @@ const ter_t terlist[num_terrain_types] = { // MUST match enum ter_id above!
{"blueberry bush", '#', c_ltgreen, 8, -1, tr_null,
mfb(transparent)|mfb(bashable)|mfb(container)|mfb(flammable2)|mfb(thin_obstacle),
&iexamine::shrub_blueberry},
{"strawberry bush", '#', c_ltgreen, 8, -1, tr_null,
mfb(transparent)|mfb(bashable)|mfb(container)|mfb(flammable2)|mfb(thin_obstacle),
&iexamine::shrub_strawberry},
{"tree trunk", '1', c_brown, 4, -1, tr_null,
mfb(transparent)|mfb(flammable2)|mfb(diggable), &iexamine::none},
{"root wall", '#', c_brown, 0, -1, tr_null,
@@ -454,7 +465,7 @@ const ter_t terlist[num_terrain_types] = { // MUST match enum ter_id above!
{"sewage", '~', c_ltgreen, 6, -1, tr_null,
mfb(transparent)|mfb(swimmable), &iexamine::water_source},
{"lava", '~', c_red, 4, -1, tr_lava,
mfb(transparent)|mfb(liquid), &iexamine::none},
mfb(transparent)|mfb(liquid)|mfb(destroy_item), &iexamine::none},
{"bed", '#', c_magenta, 5, -1, tr_null,
mfb(transparent)|mfb(container)|mfb(flammable2)|mfb(collapses)|
mfb(deconstruct)|mfb(place_item)|mfb(indoors), &iexamine::none},
@@ -533,6 +544,8 @@ const ter_t terlist[num_terrain_types] = { // MUST match enum ter_id above!
mfb(transparent)|mfb(console)|mfb(noitem)|mfb(collapses)|mfb(indoors), &iexamine::none},
{"mechanical winch", '6', c_cyan_red, 0, -1, tr_null,
mfb(transparent)|mfb(noitem)|mfb(collapses), &iexamine::controls_gate},
{"mechanical winch", '6', c_cyan_red, 0, -1, tr_null,
mfb(transparent)|mfb(noitem)|mfb(collapses), &iexamine::controls_gate},
{"rope and pulley", '|', c_brown, 0, -1, tr_null,
mfb(transparent)|mfb(noitem)|mfb(collapses), &iexamine::controls_gate},
{"rope and pulley", '|', c_brown, 0, -1, tr_null,
@@ -723,6 +736,8 @@ enum field_id {
fd_null = 0,
fd_blood,
fd_bile,
fd_gibs_flesh,
fd_gibs_veggy,
fd_web,
fd_slime,
fd_acid,
@@ -754,6 +769,12 @@ const field_t fieldlist[] = {
{{"bile splatter", "bile stain", "puddle of bile"}, '%',
{c_pink, c_pink, c_pink}, {true, true, true}, {false, false, false},2500},
{{"scraps of flesh", "bloody meat chunks", "heap of gore"}, '~',
{c_brown, c_ltred, c_red}, {true, true, true}, {false, false, false}, 2500},
{{"shredded leaves and twigs", "shattered branches and leaves", "broken vegetation tangle"}, '~',
{c_ltgreen, c_ltgreen, c_green}, {true, true, true}, {false, false, false}, 2500},
{{"cobwebs","webs", "thick webs"}, '}',
{c_white, c_white, c_white}, {true, true, false},{false, false, false}, 0},
+1651 -217
View File
File diff suppressed because it is too large Load Diff
+59 -54
View File
@@ -39,7 +39,7 @@ void game::init_mapitems()
"coke", "meth", "sneakers", "boots", "boots_winter",
"flip_flops", "dress_shoes", "heels", "coat_rain", "poncho",
"gloves_light", "mittens",
"armguard_soft", "armguard_hard",
"armguard_soft", "armguard_hard", "legguard_hard",
"gloves_wool", "gloves_winter", "gloves_liner", "gloves_leather",
"gloves_fingerless", "bandana", "scarf", "hat_cotton",
"hat_knit", "hat_fur", "helmet_bike", "helmet_motor",
@@ -101,7 +101,7 @@ void game::init_mapitems()
"sw_610", "ruger_redhawk", "deagle_44", "usp_45", "m1911",
"fn57", "mac_10", "shotgun_sawn", "suppressor", "grip",
"clip", "spare_mag", "grenade", "EMPbomb", "gasbomb", "tazer",
"longbow", "compbow", "arrow_wood", "arrow_cf", "u_shotgun", "shot_hull",
"longbow", "compbow", "compositebow", "shortbow", "recurbow", "reflexbow", "arrow_wood", "arrow_cf", "u_shotgun", "shot_hull",
"9mm_casing", "38_casing", "40_casing", "44_casing", "45_casing",
"57mm_casing", "46mm_casing", "762_casing", "223_casing",
"3006_casing", "308_casing", "gunpowder",
@@ -163,7 +163,7 @@ void game::init_mapitems()
setvector(
&mapitems[mi_softdrugs],
"bandages", "1st_aid", "vitamins", "aspirin", "caffeine",
"pills_sleep", "iodine", "dayquil", "nyquil", NULL);
"pills_sleep", "iodine", "dayquil", "nyquil", "disinfectant", "vaccine_shot", NULL);
setvector(
&mapitems[mi_harddrugs],
@@ -199,7 +199,7 @@ void game::init_mapitems()
"superglue", "chain", "rope_6", "rope_30", "glass_sheet",
"pipe", "nail", "hose", "string_36", "frame", "metal_tank",
"wire", "wire_barbed", "duct_tape", "jerrycan", "lawnmower",
"foot_crank", "spray_can", "ax", "jerrycan_big", "funnel", "bearing", "jack",
"foot_crank", "spray_can", "ax", "jerrycan_big", "funnel", "bearing", "jack", "permanent_marker",
NULL);
setvector(
@@ -216,7 +216,7 @@ void game::init_mapitems()
setvector(
&mapitems[mi_mischw],
"2x4", "machete", "boots_steel", "hat_hard", "mask_filter",
"glasses_safety", "bb", "bbgun", "beartrap", "two_way_radio",
"glasses_safety", "bb", "bbgun", "beartrap",
"radio", "hotplate", "extinguisher", "nailgun",
"manual_mechanics", "manual_carpentry", "mag_carpentry",
"duct_tape", "lawnmower", "boltcutters",
@@ -227,13 +227,13 @@ void game::init_mapitems()
"amplifier", "antenna", "battery", "soldering_iron", "solar_cell",
"screwdriver", "processor", "RAM", "mp3", "flashlight",
"radio", "hotplate", "receiver", "transponder", "tazer",
"two_way_radio", "usb_drive", "manual_electronics", "cable",
"usb_drive", "manual_electronics", "cable",
"vac_sealer", NULL);
setvector(
&mapitems[mi_sports],
"bandages", "aspirin", "bat", "bat_metal", "sneakers", "socks", "tshirt",
"tank_top", "gloves_fingerless", "glasses_safety", "armguard_soft", "armguard_hard",
"tank_top", "gloves_fingerless", "glasses_safety", "armguard_soft", "armguard_hard", "legguard_hard",
"goggles_swim", "goggles_ski", "hat_ball", "helmet_bike",
"helmet_ball", "manual_brawl", "foot_crank", "glowstick", NULL);
@@ -244,24 +244,24 @@ void game::init_mapitems()
"bb", "bolt_steel", "bbgun", "crossbow", "manual_knives","manual_survival",
"manual_first_aid", "manual_traps", "lighter", "matches", "sewing_kit", "thread",
"hammer", "flashlight", "water_purifier", "radio", "beartrap",
"UPS_off", "string_36", "longbow", "compbow", "arrow_wood",
"arrow_cf", "wire", "rollmat", "tent_kit", "canteen", "ax",
"UPS_off", "string_36", "longbow", "compbow", "compositebow", "shortbow", "recurbow", "reflexbow",
"hand_crossbow", "arrow_wood", "arrow_cf", "wire", "rollmat", "tent_kit", "canteen", "ax",
"heatpack", "glowstick", "emer_blanket", "cloak", "sleeping_bag", "gasoline_lantern", NULL);
setvector(
&mapitems[mi_allsporting],
"aspirin", "bat", "bat_metal", "sneakers", "socks", "tshirt", "tank_top",
"gloves_fingerless", "glasses_safety", "goggles_swim",
"armguard_soft", "armguard_hard", "mag_firstaid", "mag_throwing", "mag_swimming",
"armguard_soft", "armguard_hard", "legguard_hard", "mag_firstaid", "mag_throwing", "mag_swimming",
"goggles_ski", "hat_ball", "helmet_bike", "helmet_ball",
"manual_brawl", "rope_30", "hatchet", "pot", "pan",
"binoculars", "hotplate", "knife_combat", "machete", "vest",
"backpack", "bb", "bolt_steel", "bbgun", "crossbow",
"backpack", "bb", "bolt_steel", "bbgun", "crossbow", "hand_crossbow",
"manual_knives", "manual_first_aid", "manual_traps", "lighter", "matches",
"sewing_kit", "thread", "hammer", "flashlight", "water_purifier",
"radio", "beartrap", "extinguisher", "string_36", "longbow",
"compbow", "arrow_wood", "arrow_cf", "rollmat", "tent_kit",
"compbow", "compositebow", "shortbow", "recurbow", "reflexbow",
"arrow_wood", "arrow_cf", "rollmat", "tent_kit",
"foot_crank", "mag_archery", "heatpack", "glowstick", NULL);
setvector(
@@ -335,7 +335,7 @@ void game::init_mapitems()
"barrel_big", "barrel_small", "barrel_rifled", "clip", "spare_mag",
"clip2", "stabilizer", "blowback", "autofire", "retool_45",
"retool_9mm", "retool_22", "retool_57", "retool_46",
"retool_308", "retool_223", "tazer","shot_hull",
"retool_308", "retool_223", "brass_catcher", "tazer","shot_hull",
"9mm_casing", "38_casing", "40_casing", "44_casing", "45_casing",
"57mm_casing", "46mm_casing", "762_casing", "223_casing",
"3006_casing", "308_casing", "gunpowder",
@@ -389,7 +389,7 @@ void game::init_mapitems()
setvector(
&mapitems[mi_novels],
"novel_romance", "novel_spy", "novel_scifi", "novel_drama",
"cookbok_human", "novel_mystery", "novel_fantasy", "novel_horror",
"cookbook_human", "novel_mystery", "novel_fantasy", "novel_horror",
NULL);
setvector(
@@ -412,7 +412,7 @@ void game::init_mapitems()
setvector(
&mapitems[mi_cop_torso],
"dress_shirt", "under_armor", "jacket_light",
"dress_shirt", "under_armor", "jacket_light",
NULL);
setvector(
@@ -423,8 +423,8 @@ void game::init_mapitems()
&mapitems[mi_cop_weapons],
"baton", "kevlar", "vest", "gloves_leather", "mask_gas",
"goggles_nv", "helmet_riot", "holster", "bootstrap",
"armguard_hard",
"shot_00", "9mm", "usp_9mm", "remington_870", "two_way_radio",
"armguard_hard", "legguard_hard",
"shot_00", "9mm", "usp_9mm", "remington_870",
"UPS_off", "tazer", NULL);
setvector(
@@ -436,23 +436,24 @@ void game::init_mapitems()
&mapitems[mi_lab_shoes],
"sneakers", "boots", "boots_steel", "dress_shoes", NULL);
// increase chances of generating lab coat
// increase chances of generating lab coat
setvector(
&mapitems[mi_lab_torso],
"coat_lab", "coat_lab", "coat_lab", "coat_lab",
"tshirt", "polo_shirt", "dress_shirt", "dress",
"sweatshirt", "sweater", "hoodie", "jumpsuit",
"hazmat_suit", NULL);
"coat_lab", "coat_lab", "coat_lab", "coat_lab",
"tshirt", "polo_shirt", "dress_shirt", "dress",
"sweatshirt", "sweater", "hoodie", "jumpsuit",
"hazmat_suit", NULL);
setvector(
&mapitems[mi_lab_pants],
"jeans", "pants", "pants_cargo", "skirt", NULL);
"jeans", "pants", "pants_cargo", "skirt", NULL);
setvector(
&mapitems[mi_hospital_lab],
"blood", "iodine", "bleach", "bandages", "syringe",
"canister_empty", "coat_lab", "gloves_medical", "mask_dust",
"glasses_safety", "vacutainer", "usb_drive", NULL);
"glasses_safety", "vacutainer", "usb_drive", "disinfectant",
"gauze", "medical_tape", "wrapped_rad_badge", NULL);
setvector(
&mapitems[mi_hospital_samples],
@@ -461,7 +462,8 @@ void game::init_mapitems()
setvector(
&mapitems[mi_surgery],
"blood", "iodine", "bandages", "scalpel", "syringe",
"gloves_medical", "mask_dust", "vacutainer", "rag_bloody", NULL);
"gloves_medical", "mask_dust", "vacutainer", "rag_bloody", "disinfectant",
"gauze", "medical_tape", NULL);
setvector(
&mapitems[mi_office],
@@ -478,7 +480,7 @@ void game::init_mapitems()
"textbook_business", "manual_computers", "textbook_computers", "lighter", "matches", "extinguisher", "flashlight",
"radio", "bubblewrap", "coffee_raw", "usb_drive","rootbeer", "cig", "coat_rain", "poncho",
"mag_tv", "mag_news", "lighter", "matches", "extinguisher", "mp3", NULL);
setvector(
&mapitems[mi_school],
"glasses_reading", "purse", "mbag", "battery", "mag_news", "manual_computers",
@@ -487,7 +489,7 @@ void game::init_mapitems()
"manual_tailor", "manual_carpentry", "novel_romance", "novel_spy", "novel_scifi", "novel_drama",
"novel_mystery", "novel_fantasy", "novel_horror", "chocolate", "candy", "backpack", "pockknife", "mag_comic",
NULL);
setvector(
&mapitems[mi_church],
"glasses_eye", "sunglasses", "glasses_reading", "glasses_bifocal", "lighter", "matches", "coat_rain", "cane", "candlestick",
@@ -497,14 +499,15 @@ void game::init_mapitems()
&mapitems[mi_vault],
"purifier", "plut_cell", "ftk93", "nx17", "canister_goo",
"UPS_off", "gold", "plasma_engine",
"bio_time_freeze", "bio_teleport",
"power_armor_basic",
"bio_time_freeze", "bio_teleport",
"power_armor_basic",
"power_armor_light", "power_armor_heavy",
"minireactor", "alloy_plate", NULL);
setvector(
&mapitems[mi_medieval],
"katana", "mace", "morningstar", "rapier", "broadsword",
"pike", "helmet_plate", "armor_plate", NULL);
"pike", "helmet_plate", "armor_plate", "huge_crossbow", NULL);
setvector(
&mapitems[mi_art],
@@ -531,14 +534,14 @@ void game::init_mapitems()
"broadsword", "morningstar", "helmet_plate", "cot", "rollmat", "tent_kit",
"bat_metal", "lawnmower", "pickelhaube",
"makeshift_machete", "picklocks", "rucksack", "puller", "press",
"vac_sealer", "gasoline_lantern", NULL);
"vac_sealer", "gasoline_lantern", "huge_crossbow", NULL);
setvector(
&mapitems[mi_mil_surplus], // NOT food or armor!
"knife_combat", "binoculars", "bolt_steel", "crossbow",
"mag_guns", "manual_brawl", "manual_knives", "cot",
"manual_mechanics", "manual_first_aid", "manual_traps",
"flashlight", "water_purifier", "two_way_radio", "radio",
"flashlight", "water_purifier", "radio",
"geiger_off", "usb_drive", "canteen", "jerrycan", "rucksack",
"heatpack", "sleeping_bag", "emer_blanket", "flyer", NULL);
@@ -553,7 +556,7 @@ void game::init_mapitems()
"manual_first_aid", "manual_tailor", "manual_carpentry",
"lighter", "matches", "sewing_kit", "thread", "hammer", "extinguisher",
"flashlight", "hotplate", "water_purifier", "radio", "rollmat",
"tent_kit", "canteen", "spray_can", "ax", "heatpack", "blanket", "emer_blanket", "flyer", "gasoline_lantern", NULL);
"tent_kit", "canteen", "spray_can", "ax", "heatpack", "blanket", "emer_blanket", "flyer", "gasoline_lantern", "vaccine_shot", NULL);
setvector(
&mapitems[mi_mechanics],
@@ -573,7 +576,7 @@ void game::init_mapitems()
setvector(
&mapitems[mi_teleport],
"screwdriver", "wrench", "jumpsuit", "mask_dust",
"screwdriver", "wrench", "jumpsuit", "mask_dust", "wrapped_rad_badge",
"glasses_safety", "goggles_welding", "teleporter", "usb_drive",
NULL);
@@ -659,7 +662,7 @@ void game::init_mapitems()
&mapitems[mi_mil_rifles],
"556", "556_incendiary", "762_51", "762_51_incendiary",
"laser_pack", "12mm", "plasma", "m4a1", "scar_l", "scar_h",
"m249", "ftk93", "nx17", "hk_g80", "plasma_rifle",
"m249", "ftk93", "nx17", "hk_g80", "plasma_rifle", "brass_catcher",
"suppressor", "clip", "spare_mag", "m203", "UPS_off", "u_shotgun",
NULL);
@@ -672,13 +675,13 @@ void game::init_mapitems()
&mapitems[mi_mil_armor],
"pants_army", "kevlar", "vest", "mask_gas", "goggles_nv",
"helmet_army", "backpack", "UPS_off", "beltrig", "under_armor",
"boots", "armguard_hard", "power_armor_basic", "power_armor_frame",
"boots", "armguard_hard", "legguard_hard", "power_armor_basic", "power_armor_frame",
"helmet_army", "backpack", "UPS_off", "beltrig", "beret", NULL);
setvector(
&mapitems[mi_mil_accessories],
"mask_gas", "goggles_nv", "backpack", "UPS_off",
"armguard_hard", "power_armor_frame",
"mask_gas", "goggles_nv", "backpack", "UPS_off",
"armguard_hard", "legguard_hard", "power_armor_frame",
NULL);
setvector(
@@ -733,14 +736,14 @@ void game::init_mapitems()
"boots_steel", "pants_cargo", "shorts_cargo", "pants_army", "jumpsuit",
"jacket_leather", "kevlar", "vest", "gloves_fingerless",
"mask_filter", "mask_gas", "goggles_ski", "helmet_skid",
"armguard_hard", "under_armor", "long_underpants",
"armguard_hard", "legguard_hard", "under_armor", "long_underpants",
"helmet_ball", "helmet_riot", "helmet_motor", "holster",
"bootstrap", "UPS_off", "beltrig", "rucksack",
"emer_blanket", "cloak", NULL);
setvector(
&mapitems[mi_survival_tools],
"bandages", "1st_aid", "caffeine", "iodine", "electrohack",
"bandages", "1st_aid", "disinfectant", "caffeine", "iodine", "electrohack",
"string_36", "rope_30", "chain", "binoculars",
"bottle_plastic", "lighter", "matches", "sewing_kit", "thread", "extinguisher",
"flashlight", "crowbar", "chainsaw_off", "beartrap",
@@ -752,7 +755,7 @@ void game::init_mapitems()
"1st_aid", "motor", "hose", "screwdriver", "wrench", "pipe",
"boots", "jumpsuit", "coat_lab", "gloves_rubber",
"mask_filter", "glasses_safety", "hat_hard", "extinguisher",
"flashlight", "water_purifier", "two_way_radio",
"flashlight", "water_purifier",
"bio_tools", "bio_storage", "bio_flashlight",
"bio_lighter", "bio_magnet", "flyer",
"bio_purifier", "bio_climate", "bio_heatsink", "bio_blood_filter", NULL);
@@ -761,7 +764,7 @@ void game::init_mapitems()
&mapitems[mi_construction_worker],
"boots", "boots_steel", "jumpsuit", "gloves_rubber","gloves_leather",
"mask_filter", "glasses_safety", "hat_hard", "battery",
"flashlight", "two_way_radio", NULL);
"flashlight", NULL);
setvector(
&mapitems[mi_mine_storage],
@@ -772,7 +775,7 @@ void game::init_mapitems()
"water_clean", "1st_aid", "rope_30", "chain", "boots_steel",
"jumpsuit", "gloves_leather", "mask_filter", "mask_gas",
"glasses_safety", "goggles_welding", "goggles_nv", "hat_hard",
"backpack", "battery", "flashlight", "two_way_radio",
"backpack", "battery", "flashlight",
"jackhammer", "jacqueshammer", "dynamite", "UPS_off",
"bio_tools", "bio_flashlight", "bio_lighter", "bio_magnet",
"bio_resonator", "bio_hydraulics",
@@ -788,12 +791,12 @@ void game::init_mapitems()
"cola", "caffeine", "cig", "weed", "amplifier",
"transponder", "receiver", "antenna", "screwdriver",
"battery", "mag_porn", "mag_tv", "manual_electronics",
"lighter", "flashlight", "two_way_radio", "radio", "mp3",
"lighter", "flashlight", "radio", "mp3",
"solar_cell", "flyer", "usb_drive", NULL);
setvector(
&mapitems[mi_toxic_dump_equipment],
"1st_aid", "iodine", "canister_empty", "boots_steel",
"1st_aid", "iodine", "canister_empty", "boots_steel", "wrapped_rad_badge",
"hazmat_suit", "mask_gas", "hat_hard", "textbook_carpentry",
"extinguisher", "radio", "geiger_off", "UPS_off", "flyer",
"bio_purifier", "bio_climate", "bio_heatsink", "bio_blood_filter", NULL);
@@ -912,7 +915,7 @@ void game::init_mapitems()
"hard_plate", "motor", "motor_large", "hose", "pants_army",
"jumpsuit", "kevlar", "mask_gas", "helmet_army", "battery",
"plut_cell", "m249", "v8_combustion", "extinguisher",
"two_way_radio", "radio", "UPS_off", "beltrig",
"radio", "UPS_off", "beltrig",
"rucksack", "LAW_Packed", NULL);
// TODO: Replace kevlar with the ceramic plate armor
@@ -922,16 +925,16 @@ void game::init_mapitems()
"iodine", "codeine", "cig", "knife_combat", "boots_steel",
"pants_army", "kevlar", "vest", "gloves_fingerless",
"mask_gas", "glasses_safety", "goggles_nv", "hat_boonie",
"armguard_hard",
"armguard_hard", "legguard_hard",
"helmet_army", "backpack", "holster", "bootstrap", "9mm",
"45_acp", "556", "556_incendiary", "762_51",
"762_51_incendiary", "laser_pack", "40mm_concussive",
"40mm_frag", "40mm_incendiary", "40mm_teargas", "40mm_smoke",
"40mm_flashbang", "usp_9mm", "usp_45", "m4a1", "scar_l",
"scar_h", "m249", "ftk93", "nx17", "m320", "mgl",
"suppressor", "clip", "lighter", "flashlight", "two_way_radio",
"suppressor", "clip", "brass_catcher", "lighter", "flashlight",
"landmine", "grenade", "flashbang", "EMPbomb", "gasbomb",
"smokebomb", "UPS_off", "tazer", "c4", "hk_g80", "12mm",
"smokebomb", "UPS_off", "tazer", "c4", "hk_g80", "12mm", "flamethrower",
"binoculars", "u_shotgun", "beltrig", "power_armor_basic",
"power_armor_helmet_basic", "power_armor_frame", "spare_mag",
"canteen", "jerrycan", "rucksack", "heatpack", "LAW_Packed", NULL);
@@ -946,7 +949,7 @@ void game::init_mapitems()
"textbook_chemistry", "SICP", "textbook_robots",
"soldering_iron", "geiger_off", "teleporter", "canister_goo",
"EMPbomb", "pheromone", "portal", "bot_manhack", "UPS_off",
"tazer", "plasma", "usb_drive",
"tazer", "plasma", "usb_drive", "wrapped_rad_badge",
"bio_purifier", "bio_climate", "bio_heatsink", "bio_blood_filter",
"software_useless", "canteen", NULL);
@@ -957,7 +960,9 @@ void game::init_mapitems()
"plut_cell", "laser_pack", "m249", "v29", "ftk93", "nx17",
"conversion_battle", "conversion_sniper", "canister_goo",
"mininuke", "portal", "c4", "12mm", "hk_g80",
"power_armor_basic", "power_armor_helmet_basic", "power_armor_frame",
"power_armor_basic", "power_armor_helmet_basic", "power_armor_frame",
"power_armor_light", "power_armor_helmet_light",
"power_armor_heavy", "power_armor_helmet_heavy",
"plasma", "plasma_rifle", NULL);
setvector(
@@ -987,7 +992,7 @@ void game::init_mapitems()
"heroin", "syringe", "electrohack", "hatchet", "nailboard",
"knife_combat", "bat", "machete", "katana", "pants_cargo", "shorts_cargo",
"hoodie", "gloves_fingerless", "backpack", "holster",
"armguard_soft", "armguard_hard",
"armguard_soft", "armguard_hard", "legguard_hard",
"shot_00", "9mm", "45_acp", "glock_19", "shotgun_sawn",
"uzi", "tec9", "mac_10", "suppressor", "clip2", "autofire",
"mag_porn", "lighter", "matches", "crowbar", "pipebomb", "grenade",
@@ -1017,5 +1022,5 @@ void game::init_mapitems()
"dynamite_act", "firecracker_pack_act", "firecracker_act",
"mininuke_act", "UPS_on", "mp3_on", "c4armed", "apparatus",
"brazier", "rag_bloody", "candle_lit", "torch_lit",
"acidbomb_act", NULL);
"acidbomb_act", "huge_crossbow", "rep_crossbow", "vaccine_shot", "bio_claws_weapon", NULL);
}
+41 -42
View File
@@ -16,15 +16,21 @@ material_type::material_type()
_cut_resist = 0;
_bash_dmg_verb = "damages";
_cut_dmg_verb = "damages";
_dmg_adj[0] = "lightly damaged";
_dmg_adj[1] = "damaged";
_dmg_adj[2] = "very damaged";
_dmg_adj[3] = "thoroughly damaged";
_acid_resist = 0;
_elec_resist = 0;
_fire_resist = 0;
_density = 1;
}
material_type::material_type(unsigned int id, std::string ident, std::string name,
int bash_resist, int cut_resist,
std::string bash_dmg_verb, std::string cut_dmg_verb,
int acid_resist, int elec_resist, int fire_resist)
std::string dmg_adj[], int acid_resist, int elec_resist, int fire_resist,
int density)
{
_id = id;
_ident = ident;
@@ -33,9 +39,14 @@ material_type::material_type(unsigned int id, std::string ident, std::string nam
_cut_resist = cut_resist;
_bash_dmg_verb = bash_dmg_verb;
_cut_dmg_verb = bash_dmg_verb;
_dmg_adj[0] = dmg_adj[0];
_dmg_adj[1] = dmg_adj[1];
_dmg_adj[2] = dmg_adj[2];
_dmg_adj[3] = dmg_adj[3];
_acid_resist = acid_resist;
_elec_resist = elec_resist;
_fire_resist = fire_resist;
_density = density;
}
material_type::material_type(std::string ident)
@@ -47,9 +58,14 @@ material_type::material_type(std::string ident)
_cut_resist = mat_type->cut_resist();
_bash_dmg_verb = mat_type->bash_dmg_verb();
_cut_dmg_verb = mat_type->bash_dmg_verb();
_dmg_adj[0] = mat_type->dmg_adj(1);
_dmg_adj[1] = mat_type->dmg_adj(2);
_dmg_adj[2] = mat_type->dmg_adj(3);
_dmg_adj[3] = mat_type->dmg_adj(4);
_acid_resist = mat_type->acid_resist();
_elec_resist = mat_type->elec_resist();
_fire_resist = mat_type->fire_resist();
_density = mat_type->density();
}
material_map material_type::_all_materials(material_type::load_materials());
@@ -74,9 +90,17 @@ material_map material_type::load_materials()
int acid_resist = currMaterial.get("acid_resist").as_int();
int elec_resist = currMaterial.get("elec_resist").as_int();
int fire_resist = currMaterial.get("fire_resist").as_int();
int density = currMaterial.get("density").as_int();
catajson adjList = currMaterial.get("dmg_adj");
std::string dmg_adj[4];
dmg_adj[0] = adjList.get(0).as_string();
dmg_adj[1] = adjList.get(1).as_string();
dmg_adj[2] = adjList.get(2).as_string();
dmg_adj[3] = adjList.get(3).as_string();
material_type newMaterial(id, ident, name, bash_resist, cut_resist, bash_dmg_verb,
cut_dmg_verb, acid_resist, elec_resist, fire_resist);
cut_dmg_verb, dmg_adj, acid_resist, elec_resist, fire_resist, density);
allMaterials[ident] = newMaterial;
}
@@ -96,46 +120,6 @@ material_type* material_type::find_material(std::string ident)
}
}
// stopgap function for now
material_type* material_type::find_material_from_tag(material mat)
{
std::string ident;
switch(mat)
{
case MNULL: ident = "null"; break;
case VEGGY: ident = "veggy"; break;
case FLESH: ident = "flesh"; break;
case POWDER: ident = "powder"; break;
case HFLESH: ident = "hflesh"; break;
case COTTON: ident = "cotton"; break;
case WOOL: ident = "wool"; break;
case LEATHER: ident = "leather"; break;
case KEVLAR: ident = "kevlar"; break;
case FUR: ident = "fur"; break;
case CHITIN: ident = "chitin"; break;
case STONE: ident = "stone"; break;
case PAPER: ident = "paper"; break;
case WOOD: ident = "wood"; break;
case PLASTIC: ident = "plastic"; break;
case GLASS: ident = "glass"; break;
case IRON: ident = "iron"; break;
case STEEL: ident = "steel"; break;
case SILVER: ident = "silver"; break;
default: ident = "null"; break;
}
material_map::iterator found = _all_materials.find(ident);
if(found != _all_materials.end()){
return &(found->second);
}
else
{
debugmsg("Tried to get invalid material: %s", ident.c_str());
return NULL;
}
}
material_type* material_type::base_material()
{
return material_type::find_material("null");
@@ -206,6 +190,16 @@ std::string material_type::cut_dmg_verb() const
return _cut_dmg_verb;
}
std::string material_type::dmg_adj(int dam) const
{
int tmpdam = dam - 1;
// bounds check
if (tmpdam < 0 || tmpdam >= 4)
return "";
return _dmg_adj[tmpdam];
}
int material_type::acid_resist() const
{
return _acid_resist;
@@ -220,3 +214,8 @@ int material_type::fire_resist() const
{
return _fire_resist;
}
int material_type::density() const
{
return _density;
}
+7 -2
View File
@@ -20,23 +20,26 @@ private:
int _cut_resist;
std::string _bash_dmg_verb;
std::string _cut_dmg_verb;
std::string _dmg_adj[4];
int _acid_resist;
int _elec_resist;
int _fire_resist;
int _density; // relative to "powder", which is 1
public:
material_type();
material_type(unsigned int id, std::string ident, std::string name,
int bash_resist, int cut_resist,
std::string bash_dmg_verb, std::string cut_dmg_verb,
int acid_resist, int elec_resist, int fire_resist);
std::string dmg_adj[], int acid_resist, int elec_resist, int fire_resist,
int density);
material_type(std::string ident);
static material_map _all_materials;
static material_map load_materials();
// functions
static material_type* find_material(std::string ident);
static material_type* find_material_from_tag(material mat);
// static material_type* find_material_from_tag(material mat);
static material_type* base_material(); // null material
int dam_resist(damage_type damtype) const;
@@ -49,9 +52,11 @@ public:
int cut_resist() const;
std::string bash_dmg_verb() const;
std::string cut_dmg_verb() const;
std::string dmg_adj(int dam) const;
int acid_resist() const;
int elec_resist() const;
int fire_resist() const;
int density() const;
};
+62 -26
View File
@@ -171,12 +171,6 @@ int player::hit_mon(game *g, monster *z, bool allow_grab) // defaults to true
int pain = 0; // Boost to pain; required for perform_technique
// Moves lost to getting your weapon stuck
int stuck_penalty = roll_stuck_penalty(z, (stab_dam >= cut_dam));
if (weapon.is_style())
stuck_penalty = 0;
moves -= stuck_penalty;
// Pick one or more special attacks
technique_id technique = pick_technique(g, z, NULL, critical_hit, allow_grab);
@@ -198,7 +192,9 @@ int player::hit_mon(game *g, monster *z, bool allow_grab) // defaults to true
int dam = bash_dam + (cut_dam > stab_dam ? cut_dam : stab_dam);
hit_message(g, You.c_str(), verb.c_str(), target.c_str(), dam, critical_hit);
if( g->u_see( z ) ) {
hit_message(g, You.c_str(), verb.c_str(), target.c_str(), dam, critical_hit);
}
bool bashing = (bash_dam >= 10 && !unarmed_attack());
bool cutting = (cut_dam >= 10);
@@ -299,12 +295,6 @@ void player::hit_player(game *g, player &p, bool allow_grab)
int pain = 0; // Boost to pain; required for perform_technique
// Moves lost to getting your weapon stuck
int stuck_penalty = roll_stuck_penalty(NULL, (stab_dam >= cut_dam));
if (weapon.is_style())
stuck_penalty = 0;
moves -= stuck_penalty;
// Pick one or more special attacks
technique_id technique = pick_technique(g, NULL, &p, critical_hit, allow_grab);
@@ -664,21 +654,67 @@ int player::roll_stab_damage(monster *z, bool crit)
return ret;
}
// Chance of a weapon sticking is based on weapon attack type.
// Only an issue for cutting and piercing weapons.
// Attack modes are "CHOP", "STAB", and "SLICE".
// "SPEAR" is synonymous with "STAB".
// Weapons can have a "low_stick" flag indicating they
// Have a feature to prevent sticking, such as a spear with a crossbar,
// Or a stabbing blade designed to resist sticking.
int player::roll_stuck_penalty(monster *z, bool stabbing)
{
int ret = 0;
int basharm = (z == NULL ? 6 : z->armor_bash()),
cutarm = (z == NULL ? 6 : z->armor_cut());
if (stabbing)
ret = weapon.damage_cut() * 3 + basharm * 3 + cutarm * 3 -
dice(skillLevel("stabbing"), 10);
else
ret = weapon.damage_cut() * 4 + basharm * 5 + cutarm * 4 -
dice(skillLevel("cutting"), 10);
// The cost of the weapon getting stuck, in units of move points.
const int weapon_speed = attack_speed( *this, false );
int stuck_cost = weapon_speed;
const int attack_skill = stabbing ? skillLevel("stabbing") : skillLevel("cutting");
const float cut_damage = weapon.damage_cut();
const float bash_damage = weapon.damage_bash();
float cut_bash_ratio = 0.0;
if (ret >= weapon.damage_cut() * 10)
return weapon.damage_cut() * 10;
return (ret < 0 ? 0 : ret);
// Scale cost along with the ratio between cutting and bashing damage of the weapon.
if( cut_damage > 0.0 || bash_damage > 0.0 )
{
cut_bash_ratio = cut_damage / ( cut_damage + bash_damage );
}
stuck_cost *= cut_bash_ratio;
if( weapon.has_flag("SLICE") )
{
// Slicing weapons assumed to have a very low chance of sticking.
stuck_cost *= 0.25;
}
else if( weapon.has_flag("STAB") || weapon.has_flag("SPEAR") )
{
// Stabbing has a moderate change of sticking.
stuck_cost *= 0.50;
}
else if( weapon.has_flag("CHOP") )
{
// Chopping has a high chance of sticking.
stuck_cost *= 1.00;
}
else
{
// Items with no attack type are assumed to be improvised weapons,
// and get a very high stick cost.
stuck_cost *= 2.00;
}
if( weapon.has_flag("NON_STUCK") )
{
// Greatly reduce sticking frequency/severity if the weapon has an anti-sticking feature.
stuck_cost /= 4;
}
// Reduce cost based on player skill, by 10.5 move/level on average.
stuck_cost -= dice( attack_skill, 20 );
// Make sure cost doesn't go negative.
stuck_cost = std::max( stuck_cost, 0 );
// Cap stuck penalty at 2x weapon speed.
stuck_cost = std::min( stuck_cost, 2*weapon_speed );
return stuck_cost;
}
technique_id player::pick_technique(game *g, monster *z, player *p,
@@ -1188,7 +1224,7 @@ void player::melee_special_effects(game *g, monster *z, player *p, bool crit,
}
// Glass weapons shatter sometimes
if (weapon.made_of(GLASS) &&
if (weapon.made_of("glass") &&
rng(0, weapon.volume() + 8) < weapon.volume() + str_cur) {
if (can_see)
g->add_msg("%s %s shatters!", Your.c_str(), weapon.tname(g).c_str());
+381 -8
View File
@@ -245,7 +245,7 @@ Hell ya! Find me one of those big ol' American flags.";
case TALK_MISSION_SUCCESS_LIE:
return "What?! You liar!";
case TALK_MISSION_FAILURE:
return "You give up? This country fell apart becuase no one could find a\
return "You give up? This country fell apart because no one could find a\
good man to rely on... might as well give up, I guess.";
}
break;
@@ -314,13 +314,46 @@ Fuck ya, America!";
}
break;
//patriot mission 4
case MISSION_EXPLORE_SARCOPHAGUS:
switch (state) {
case TALK_MISSION_DESCRIBE:
return "You wouldn't believe what I found...";
case TALK_MISSION_OFFER:
return "Holy hell, the crash you recovered the black box from wasn't as old as I thought. \
Check this out, it was on its approach to pick up a team sent to secure and destroy something called a \
'Hazardous Waste Sarcophagus' in the middle of nowhere. If the bird never picked up the team then we \
may still have a chance to meet up with them. It includes an access code for the elevator and an encoded \
message for the team leader, I guess. If we want to join up with what remains of the government then now \
may be our only chance.";
case TALK_MISSION_ACCEPTED:
return "\
Fuck ya, America!";
case TALK_MISSION_REJECTED:
return "Are you going to forfeit your duty when the country needs you the most?";
case TALK_MISSION_ADVICE:
return "If there is a military team down there then we better go in prepared if we want to \
impress them. Carry as much ammo as you can and prepare to ditch this place if they have a second \
bird coming to pick them up.";
case TALK_MISSION_INQUIRE:
return "Having any trouble following the map?";
case TALK_MISSION_SUCCESS:
return "We got this shit!";
case TALK_MISSION_SUCCESS_LIE:
return "What?! I out'ta whip your ass.";
case TALK_MISSION_FAILURE:
return "Damn, we were so close.";
}
break;
//martyr mission 1
case MISSION_GET_RELIC:
switch (state) {
case TALK_MISSION_DESCRIBE:
return "St. Michael the archangel defend me in battle...";
case TALK_MISSION_OFFER:
return "As the world seems to abandon the reality that we once knew, it \
becomes plausable that the old superstitions that were cast aside may \
becomes plausible that the old superstitions that were cast aside may \
have had some truth to them. Please go and find me a religious relic...\
I doubt it will be of much use but I've got to hope in something.";
case TALK_MISSION_ACCEPTED:
@@ -333,7 +366,110 @@ I wish you the best of luck, may whatever god you please guide your path.";
case TALK_MISSION_INQUIRE:
return "Any luck?";
case TALK_MISSION_SUCCESS:
return "Thankyou, I need some time alone now...";
return "Thank you, I need some time alone now...";
case TALK_MISSION_SUCCESS_LIE:
return "What good does this do us?";
case TALK_MISSION_FAILURE:
return "It was a lost cause anyways...";
}
break;
//martyr mission 2
case MISSION_RECOVER_PRIEST_DIARY:
switch (state) {
case TALK_MISSION_DESCRIBE:
return "St. Michael the archangel defend me in battle...";
case TALK_MISSION_OFFER:
return "From what I understand, the creatures you encountered \
surrounding this relic were unlike anything I've heard of. It is \
laughable that I now consider the living dead to be part of our \
ordinary reality. Never-the-less, the church must have some explanation \
for these events. I have located the residence of a local clergy man, \
could you go to this address and recover any items that may reveal what \
the church's stance is on these events?";
case TALK_MISSION_ACCEPTED:
return "\
I wish you the best of luck, may whatever god you please guide your path.";
case TALK_MISSION_REJECTED:
return "Ya, I guess the stress may just be getting to me...";
case TALK_MISSION_ADVICE:
return "If the information is confidential the priest must have it hidden \
within his own home.";
case TALK_MISSION_INQUIRE:
return "Any luck?";
case TALK_MISSION_SUCCESS:
return "Thank you, a diary is exactly what I was looking for.";
case TALK_MISSION_SUCCESS_LIE:
return "What good does this do us?";
case TALK_MISSION_FAILURE:
return "It was a lost cause anyways...";
}
break;
//martyr mission 3
case MISSION_INVESTIGATE_CULT:
switch (state) {
case TALK_MISSION_DESCRIBE:
return "St. Michael the archangel defend me in battle...";
case TALK_MISSION_OFFER:
return "You have no idea how interesting this diary is. I have two \
very promising leads... First things first, the Catholic Church has been \
performing its own investigations into global cult phenomenon and it appears \
to have become very interested in a local cult as of recently. Could you investigate \
a location for me? I'm not sure what was going on here but the priest seemed \
fairly worried about it.";
case TALK_MISSION_ACCEPTED:
return "\
I wish you the best of luck, may whatever god you please guide your path... You may need it \
this time more than the past excursions you have gone on. There is a note about potential human \
sacrifice in the days immediately before and after the outbreak. The name of the cult is believed \
to be the Church of Starry Wisdom but it is noted that accounts differ.";
case TALK_MISSION_REJECTED:
return "Ya, I guess the stress may just be getting to me...";
case TALK_MISSION_ADVICE:
return "I doubt the site is still occupied but I'd carry a firearm at least... I'm not sure what \
you might be looking for but I'm positive you'll find something out of the ordinary if you look long \
enough.";
case TALK_MISSION_INQUIRE:
return "I'm positive there is something there... there has to be, any luck?";
case TALK_MISSION_SUCCESS:
return "Thank you, your account of these... demonic creations proves the fears the churches \
had were well founded. Our priority should be routing out any survivors of this cult... I don't \
known if they are responsible for the outbreak but they certainly know more about it than I do.";
case TALK_MISSION_SUCCESS_LIE:
return "What good does this do us?";
case TALK_MISSION_FAILURE:
return "It was a lost cause anyways...";
}
break;
//martyr mission 4
case MISSION_INVESTIGATE_PRISON_VISIONARY:
switch (state) {
case TALK_MISSION_DESCRIBE:
return "St. Michael the archangel defend me in battle...";
case TALK_MISSION_OFFER:
return "I have another task if you are feeling up to it. There is a prisoner that \
the priest made special mention of. I was wondering if you could see \
what may have happened to him or if he left anything in his cell. The priest admits the individual is rather \
unstable, to put it lightly, but the priest personally believed the man was some kind of repentant visionary. I'm \
not in a position to cast out the account just yet... it seems the man has prophesied events accurately before \
concerning the Church of Starry Wisdom.";
case TALK_MISSION_ACCEPTED:
return "\
I wish you the best of luck, may whatever god you please guide your path... I can only imagine that the prison \
will be a little slice of hell. I'm not sure what they would have decided to do with the inmates when they knew \
death was almost certain. ";
case TALK_MISSION_REJECTED:
return "Ya, I guess the stress may just be getting to me...";
case TALK_MISSION_ADVICE:
return "The worst case scenario will probably be that the prisoners have escaped their cells and turned the \
building into their own little fortress. Best case, the building went into lock-down and secured the prisoners in \
their cells. Either way, navigating the building will pose its own difficulties.";
case TALK_MISSION_INQUIRE:
return "Any luck?";
case TALK_MISSION_SUCCESS:
return "Thank you, I'm not sure what to make of this but I'll ponder your account.";
case TALK_MISSION_SUCCESS_LIE:
return "What good does this do us?";
case TALK_MISSION_FAILURE:
@@ -350,7 +486,7 @@ I wish you the best of luck, may whatever god you please guide your path.";
is causing this it must be airborne to have infected everyone. I believe that \
if that is the case then there should be regions that were not downwind from \
where-ever the disease was released. We need to find a record of all the \
weather paterns leading up to the outbreak.";
weather patterns leading up to the outbreak.";
case TALK_MISSION_ACCEPTED:
return "\
Thanks so much, you may save both of us yet.";
@@ -379,7 +515,7 @@ Thanks so much, you may save both of us yet.";
regional hospital or doctor's office. I just want to know who might still be out there.";
case TALK_MISSION_ACCEPTED:
return "\
Thankyou, I suppose it wont change what has already happened but it will bring me closure.";
Thank you, I suppose it wont change what has already happened but it will bring me closure.";
case TALK_MISSION_REJECTED:
return "Please, I just want to know what happened to everyone.";
case TALK_MISSION_ADVICE:
@@ -395,12 +531,71 @@ Thankyou, I suppose it wont change what has already happened but it will bring m
}
break;
//humanitarian mission 2
case MISSION_REACH_FEMA_CAMP:
switch (state) {
case TALK_MISSION_DESCRIBE:
return "Maybe they escaped to one of the camps...";
case TALK_MISSION_OFFER:
return "I can't thank you enough for bringing me the patient records but I do have \
another request. You seem to know your way around... could you take me to one of the \
FEMA camps? I know some were overrun but I don't want to believe all of them could have \
fallen.";
case TALK_MISSION_ACCEPTED:
return "\
Thank you, just bring me to the camp... I just want to see.";
case TALK_MISSION_REJECTED:
return "Please, I don't know what else to do.";
case TALK_MISSION_ADVICE:
return "We should go at night, if it is overrun then we can quickly make our escape.";
case TALK_MISSION_INQUIRE:
return "Any leads on where a camp might be?";
case TALK_MISSION_SUCCESS:
return "I guess this wasn't as bright an idea as I thought.";
case TALK_MISSION_SUCCESS_LIE:
return "Thanks for trying... I guess.";
case TALK_MISSION_FAILURE:
return "I bet some of them are still out there...";
}
break;
//humanitarian mission 3
case MISSION_REACH_FARM_HOUSE:
switch (state) {
case TALK_MISSION_DESCRIBE:
return "I just need a place to start over...";
case TALK_MISSION_OFFER:
return "I've accepted that everyone I used to know is dead... one way or another. I \
really wish I could have done something to save my brother but he was one of the first to go. \
I'd like to start over, just rebuild at one of the farms in the countryside. Can you help me \
secure one?";
case TALK_MISSION_ACCEPTED:
return "\
Thank you, let's find a remote one so we don't have to worry about many zombies.";
case TALK_MISSION_REJECTED:
return "Please, I just don't know what to do otherwise.";
case TALK_MISSION_ADVICE:
return "Traveling the backroads would be a good way to search for one.";
case TALK_MISSION_INQUIRE:
return "Shall we keep looking for a farm house?";
case TALK_MISSION_SUCCESS:
return "Well, my adventuring days are over. I can't thank you enough. Trying to make \
this place self sustaining will take some work but the future is looking brighter. At least it \
ought to be safe for now. You'll always be welcome here.";
case TALK_MISSION_SUCCESS_LIE:
return "Thanks for trying... I guess.";
case TALK_MISSION_FAILURE:
return "I guess it was just a pipe dream.";
}
break;
//vigilante mission 1
case MISSION_GET_RECORD_ACCOUNTING:
switch (state) {
case TALK_MISSION_DESCRIBE:
return "Those twisted snakes...";
case TALK_MISSION_OFFER:
return "Our world fell apart because our leaders were as crooked as the conmen that \
return "Our world fell apart because our leaders were as crooked as the con-men that \
paid for their elections. Just find me one of those corporate accounting books and I'll \
show you and the rest of the world just who is at fault.";
case TALK_MISSION_ACCEPTED:
@@ -419,14 +614,71 @@ will prove their guilt if we get an expert to examine it.";
case TALK_MISSION_SUCCESS_LIE:
return "Thanks for trying... I guess.";
case TALK_MISSION_FAILURE:
return "The day of reconing will come for the corporations if it hasn't already.";
return "The day of reckoning will come for the corporations if it hasn't already.";
}
break;
//vigilante mission 2
case MISSION_GET_SAFE_BOX:
switch (state) {
case TALK_MISSION_DESCRIBE:
return "Those twisted snakes...";
case TALK_MISSION_OFFER:
return "Now I don't mean to upset you but I'm not sure what I can do with the accounting ledger at the \
moment. We do have a new lead though, the ledger has a safe deposit box under the regional manager's name. \
Guess what, dumb sucker wrote down his combination. Come with me to retrieve the box and you can keep any \
of the goodies in it that I can't use to press charges against these bastards.";
case TALK_MISSION_ACCEPTED:
return "\
You may make a tidy profit from this.";
case TALK_MISSION_REJECTED:
return "I know it isn't pressing but the world is going to be just as corrupt when we start rebuilding unless \
we take measure to stop those who seek to rule over us.";
case TALK_MISSION_ADVICE:
return "This shouldn't be hard unless we run into a horde.";
case TALK_MISSION_INQUIRE:
return "Any luck?";
case TALK_MISSION_SUCCESS:
return "Great, anything I can't use to prosecute the bastards is yours, as promised.";
case TALK_MISSION_SUCCESS_LIE:
return "Thanks for trying... I guess.";
case TALK_MISSION_FAILURE:
return "The day of reckoning will come for the corporations if it hasn't already.";
}
break;
//vigilante mission 3
case MISSION_GET_DEPUTY_BADGE:
switch (state) {
case TALK_MISSION_DESCRIBE:
return "Those twisted snakes...";
case TALK_MISSION_OFFER:
return "I hope you will find use from what you got out of the deposit box but I also have another job for you \
that might lead you to an opportunity to deal out justice for those who cannot. First things first, we can't just \
look like ruffians. Find us a deputy badge, easy enough?";
case TALK_MISSION_ACCEPTED:
return "\
I'd check the police station.";
case TALK_MISSION_REJECTED:
return "We're also official... just hang in there and I'll show you what we can really do.";
case TALK_MISSION_ADVICE:
return "They shouldn't be that hard to find... should they?";
case TALK_MISSION_INQUIRE:
return "Any luck?";
case TALK_MISSION_SUCCESS:
return "Great work, Deputy. We're in business.";
case TALK_MISSION_SUCCESS_LIE:
return "Thanks for trying... I guess.";
case TALK_MISSION_FAILURE:
return "The day of reckoning will come for the criminals if it hasn't already.";
}
break;
//demon slayer mission 1
case MISSION_KILL_JABBERWOCK:
switch (state) {
case TALK_MISSION_DESCRIBE:
return "The eater of the dead... something was ripping zombies to shreads and only leaving a few scattered limbs...";
return "The eater of the dead... something was ripping zombies to shreds and only leaving a few scattered limbs...";
case TALK_MISSION_OFFER:
return "A few days ago another survivor and I were trying to avoid the cities by staying in the woods \
during the day and foraging for gear at night. It worked well against the normal zed's but one night something \
@@ -450,6 +702,127 @@ Thanks, make sure you're ready for whatever the beast is.";
}
break;
//demon slayer mission 2
case MISSION_KILL_100_Z:
switch (state) {
case TALK_MISSION_DESCRIBE:
return "You seem to know this new world better than most...";
case TALK_MISSION_OFFER:
return "You're kitted out better than most... would you be interested in making this world a \
little better for the rest of us? The towns have enough supplies for us survivors to \
start securing a foothold but we don't have anyone with the skills and equipment to thin the masses \
of undead. I'll lend you a hand to the best of my ability but you really \
showed promise taking out that other beast. You, I, and a 100 regular zombies laid to rest, what do you say?";
case TALK_MISSION_ACCEPTED:
return "\
Hell ya, we may get ourselves killed but we'll be among the first legends of the apocalypse.";
case TALK_MISSION_REJECTED:
return "Hey, I know I wouldn't volunteer for it either... but then I remember that most of us survivors \
won't make it unless someone decides to take the initiative.";
case TALK_MISSION_ADVICE:
return "I'd secure an ammo cache and try to sweep a town in multiple passes.";
case TALK_MISSION_INQUIRE:
return "Got this knocked out?";
case TALK_MISSION_SUCCESS:
return "Man... you're a goddamn machine. It was a pleasure working with you. You know, you may just change \
our little neck of the world if you keep this up.";
case TALK_MISSION_SUCCESS_LIE:
return "I don't think that was quite a hundred dead zeds.";
case TALK_MISSION_FAILURE:
return "Quitting already?";
}
break;
//demon slayer mission 3
case MISSION_KILL_HORDE_MASTER:
switch (state) {
case TALK_MISSION_DESCRIBE:
return "I've heard some bad rumors so I hope you are up for another challenge...";
case TALK_MISSION_OFFER:
return "Apparently one of the other survivors picked up on an unusually dense horde of undead \
moving into the area. At the center of this throng there was a 'leader' of some sort. The short of it is, \
kill the son of a bitch. We don't know what it is capable of or why it is surrounded by other zombies but \
this thing reeks of trouble. Do whatever it takes but we can't risk it getting away.";
case TALK_MISSION_ACCEPTED:
return "\
I'll lend you a hand but I'd try and recruit another gunslinger if you can.";
case TALK_MISSION_REJECTED:
return "What's the use of walking away, they'll track you down eventually.";
case TALK_MISSION_ADVICE:
return "Don't risk torching the building it may be hiding in if it has a basement. The sucker may still be \
alive under the rubble and ash.";
case TALK_MISSION_INQUIRE:
return "Got this knocked out?";
case TALK_MISSION_SUCCESS:
return "May that bastard never get up again.";
case TALK_MISSION_SUCCESS_LIE:
return "I don't think we got it yet.";
case TALK_MISSION_FAILURE:
return "Quitting already?";
}
break;
//demon slayer mission 4
case MISSION_RECRUIT_TRACKER:
switch (state) {
case TALK_MISSION_DESCRIBE:
return "You seem to know this new world better than most...";
case TALK_MISSION_OFFER:
return "We've got another problem to deal with but I don't think we can handle \
it on our own. So, I sent word out and found us a volunteer... of sorts. He's vain \
as hell but has a little skill with firearms. He was supposed to collect whatever he \
had of value and is going to meet us at a cabin in the woods. Wasn't sure how long \
we were going to be so I told him to just camp there until we picked him up.";
case TALK_MISSION_ACCEPTED:
return "\
Rodger, if he's a no-show then any other gunslinger will do... but I doubt he'll quit \
before we even begin.";
case TALK_MISSION_REJECTED:
return "Hey, I know I wouldn't volunteer for it either... but then I remember that most of us survivors \
won't make it unless someone decides to take the initiative.";
case TALK_MISSION_ADVICE:
return "I hope the bastard is packing heat... else we'll need to grab him a gun before we hit our next \
target.";
case TALK_MISSION_INQUIRE:
return "Found a gunslinger?";
case TALK_MISSION_SUCCESS:
return "Great, just let me know when you are ready to wade knee-deep in an ocean of blood.";
case TALK_MISSION_SUCCESS_LIE:
return "I don't think so...";
case TALK_MISSION_FAILURE:
return "Quitting already?";
}
break;
//demon slayer mission 4b
case MISSION_JOIN_TRACKER:
switch (state) {
case TALK_MISSION_DESCRIBE:
return "Well damn, you must be the guys here to pick me up...";
case TALK_MISSION_OFFER:
return "I got the brief so I know what I'm getting into. Let me be upfront, \
treat me like shit and I'm going to cover my own hide. Without a strong band a man doesn't \
stand a chance in this world. You ready to take charge boss?";
case TALK_MISSION_ACCEPTED:
return "\
Before we get into a major fight just make sure we have the gear we need, boss.";
case TALK_MISSION_REJECTED:
return "I don't think you're going to find many other survivors who haven't taken up a faction yet.";
case TALK_MISSION_ADVICE:
return "I'm a pretty good shot with a rifle or pistol.";
case TALK_MISSION_INQUIRE:
return "Any problems boss?";
case TALK_MISSION_SUCCESS:
return "Wait... are you really making me a deputy?";
case TALK_MISSION_SUCCESS_LIE:
return "I don't think so...";
case TALK_MISSION_FAILURE:
return "Quitting already?";
}
break;
default:
switch (state) {
case TALK_MISSION_DESCRIBE:
+56 -8
View File
@@ -4,6 +4,7 @@
#include <vector>
#include <string>
#include <sstream>
#include "omdata.h"
#include "itype.h"
#include "npc.h"
@@ -19,14 +20,26 @@ enum mission_id {
MISSION_RESCUE_DOG,
MISSION_KILL_ZOMBIE_MOM,
MISSION_REACH_SAFETY,
MISSION_GET_FLAG,//patriot mission 1
MISSION_GET_BLACK_BOX,//patriot mission 2
MISSION_GET_BLACK_BOX_TRANSCRIPT,//patriot mission 3
MISSION_GET_RELIC,
MISSION_GET_RECORD_WEATHER,
MISSION_GET_RECORD_PATIENT,
MISSION_GET_RECORD_ACCOUNTING,
MISSION_KILL_JABBERWOCK,
MISSION_GET_FLAG, //patriot 1
MISSION_GET_BLACK_BOX, //patriot 2
MISSION_GET_BLACK_BOX_TRANSCRIPT, //patriot 3
MISSION_EXPLORE_SARCOPHAGUS, //patriot 4
MISSION_GET_RELIC, //martyr 1
MISSION_RECOVER_PRIEST_DIARY, //martyr 2
MISSION_INVESTIGATE_CULT, //martyr 3
MISSION_INVESTIGATE_PRISON_VISIONARY, //martyr 4
MISSION_GET_RECORD_WEATHER, //scientist 1
MISSION_GET_RECORD_PATIENT, //humanitarian 1
MISSION_REACH_FEMA_CAMP, //humanitarian 2
MISSION_REACH_FARM_HOUSE, //humanitarian 3
MISSION_GET_RECORD_ACCOUNTING, //vigilante 1
MISSION_GET_SAFE_BOX, //vigilante 2
MISSION_GET_DEPUTY_BADGE, //vigilante 3
MISSION_KILL_JABBERWOCK, //demon slayer 1
MISSION_KILL_100_Z, //demon slayer 2
MISSION_KILL_HORDE_MASTER, //demon slayer 3
MISSION_RECRUIT_TRACKER, //demon slayer 4
MISSION_JOIN_TRACKER, //demon slayer 4b
NUM_MISSION_IDS
};
@@ -44,12 +57,16 @@ enum mission_origin {
enum mission_goal {
MGOAL_NULL = 0,
MGOAL_GO_TO, // Reach a certain overmap tile
MGOAL_GO_TO_TYPE, // Instead of a point, go to an oter_id map tile like ot_hospital_entrance
MGOAL_FIND_ITEM, // Find an item of a given type
MGOAL_FIND_ANY_ITEM, // Find an item tagged with this mission
MGOAL_FIND_MONSTER, // Find and retrieve a friendly monster
MGOAL_FIND_NPC, // Find a given NPC
MGOAL_ASSASSINATE, // Kill a given NPC
MGOAL_KILL_MONSTER, // Kill a particular hostile monster
MGOAL_KILL_MONSTER_TYPE, // Kill a number of a given monster type
MGOAL_RECRUIT_NPC, // Recruit a given NPC
MGOAL_RECRUIT_NPC_CLASS, // Recruit an NPC class
NUM_MGOAL
};
@@ -68,19 +85,30 @@ struct mission_place { // Return true if [posx,posy] is valid in overmap
*/
struct mission_start {
void standard (game *, mission *); // Standard for its goal type
void join (game *, mission *); // NPC giving mission joins your party
void infect_npc (game *, mission *); // DI_INFECTION, remove antibiotics
void place_dog (game *, mission *); // Put a dog in a house!
void place_zombie_mom (game *, mission *); // Put a zombie mom in a house!
void place_jabberwock (game *, mission *); // Put a jabberwok in the woods nearby
void kill_100_z (game *, mission *); // Kill 100 more regular zombies
void kill_horde_master (game *, mission *);// Kill the master zombie at the center of the horde
void place_npc_software(game *, mission *); // Put NPC-type-dependent software
void place_priest_diary (game *, mission *); // Hides the priest's diary in a local house
void place_deposit_box (game *, mission *); // Place a safe deposit box in a nearby bank
void reveal_lab_black_box (game *, mission *); // Reveal the nearest lab and give black box
void oepn_sarcophagus (game *, mission *); // Reveal the sarcophagus and give access code acidia v
void reveal_hospital (game *, mission *); // Reveal the nearest hospital
void find_safety (game *, mission *); // Goal is set to non-spawn area
void point_prison (game *, mission *); // Point to prison entrance
void point_cabin_strange (game *, mission *); // Point to strange cabin location
void recruit_tracker (game *, mission *); // Recruit a tracker to help you
void place_book (game *, mission *); // Place a book to retrieve
};
struct mission_end { // These functions are run when a mission ends
void standard (game *, mission *){}; // Nothing special happens
void leave (game *, mission *); // NPC leaves after the mission is complete
void deposit_box (game *, mission *); // random valuable reward
void heal_infection (game *, mission *);
};
@@ -101,6 +129,11 @@ struct mission_type {
std::vector<mission_origin> origins; // Points of origin
itype_id item_id;
npc_class recruit_class; // The type of NPC you are to recruit
int recruit_npc_id;
mon_id monster_type;
int monster_kill_goal;
oter_id target_id;
mission_id follow_up;
bool (mission_place::*place)(game *g, int x, int y);
@@ -120,6 +153,11 @@ struct mission_type {
deadline_low = 0;
deadline_high = 0;
item_id = "null";
target_id = ot_null;
recruit_class = NC_NONE;
recruit_npc_id = -1;
monster_type = mon_null;
monster_kill_goal = -1;
follow_up = MISSION_NULL;
};
@@ -135,6 +173,11 @@ struct mission {
int uid; // Unique ID number, used for referencing elsewhere
point target; // Marked on the player's map. (-1,-1) for none
itype_id item_id; // Item that needs to be found (or whatever)
oter_id target_id; // Destination type to be reached
npc_class recruit_class; // The type of NPC you are to recruit acidia
int recruit_npc_id; // The ID of a specific NPC to recruit
mon_id monster_type; // Monster ID that are to be killed
int monster_kill_goal; // the kill count you wish to reach
int count; // How many of that item
int deadline; // Turn number
int npc_id; // ID of a related npc
@@ -155,6 +198,11 @@ struct mission {
uid = -1;
target = point(-1, -1);
item_id = "null";
target_id = ot_null;
recruit_class = NC_NONE;
recruit_npc_id = -1;
monster_type = mon_null;
monster_kill_goal = -1;
count = 0;
deadline = 0;
npc_id = -1;
+17
View File
@@ -11,3 +11,20 @@ void mission_end::heal_infection(game *g, mission *miss)
}
}
}
void mission_end::leave(game *g, mission *miss)
{
npc *p = g->find_npc(miss->npc_id);
p->attitude = NPCATT_NULL;
}
void mission_end::deposit_box(game *g, mission *miss)
{
npc *p = g->find_npc(miss->npc_id);
p->attitude = NPCATT_NULL;//npc leaves your party
std::string itemName = "deagle_44";
if (one_in(4)) itemName = "katana";
else if (one_in(3)) itemName = "m4a1";
g->u.i_add( item(g->itypes[itemName], 0) );
g->add_msg("%s gave you an item from the deposit box.", p->name.c_str());
}
+202
View File
@@ -12,6 +12,12 @@ void mission_start::standard(game *g, mission *miss)
{
}
void mission_start::join(game *g, mission *miss)
{
npc *p = g->find_npc(miss->npc_id);
p->attitude = NPCATT_FOLLOW;
}
void mission_start::infect_npc(game *g, mission *miss)
{
npc *p = g->find_npc(miss->npc_id);
@@ -83,6 +89,51 @@ void mission_start::place_jabberwock(game *g, mission *miss)
grove.save(g->cur_om, int(g->turn), site.x * 2, site.y * 2, 0);
}
void mission_start::kill_100_z(game *g, mission *miss)
{
npc *p = g->find_npc(miss->npc_id);
p->attitude = NPCATT_FOLLOW;//npc joins you
miss->monster_type = mon_zombie;
int killed = 0;
killed += g->kill_count(mon_zombie);
miss->monster_kill_goal = 100+killed;//your kill score must increase by 100
}
void mission_start::kill_horde_master(game *g, mission *miss)
{
npc *p = g->find_npc(miss->npc_id);
p->attitude = NPCATT_FOLLOW;//npc joins you
int dist = 0;//pick one of the below locations for the horde to haunt
point site = g->cur_om->find_closest(g->om_location(), ot_office_tower_1, 1, dist, false);
if (site.x == -1 && site.y == -1 )
site = g->cur_om->find_closest(g->om_location(), ot_hotel_tower_1_8, 1, dist, false);
if (site.x == -1 && site.y == -1)
site = g->cur_om->find_closest(g->om_location(), ot_school_5, 1, dist, false);
if (site.x == -1 && site.y == -1)
site = g->cur_om->find_closest(g->om_location(), ot_forest_thick, 1, dist, false);
miss->target = site;
// Make it seen on our map
for (int x = site.x - 6; x <= site.x + 6; x++) {
for (int y = site.y - 6; y <= site.y + 6; y++)
g->cur_om->seen(x, y, 0) = true;
}
tinymap tile(&(g->itypes), &(g->mapitems), &(g->traps));
tile.load(g, site.x * 2, site.y * 2, 0, false);
tile.add_spawn(mon_zombie_master, 1, SEEX, SEEY, false, -1, miss->uid, "Demonic Soul");
tile.add_spawn(mon_zombie_brute,3,SEEX,SEEY);
tile.add_spawn(mon_zombie_fast,3,SEEX,SEEY);
if (SEEX > 1 && SEEX < OMAPX && SEEY > 1 && SEEY < OMAPY){
for (int x = SEEX - 1; x <= SEEX + 1; x++) {
for (int y = SEEY - 1; y <= SEEY + 1; y++)
tile.add_spawn(mon_zombie,rng(3,10),x,y);
tile.add_spawn(mon_zombie_fast,rng(0,2),SEEX,SEEY);
}
}
tile.add_spawn(mon_zombie_necro,2,SEEX,SEEY);
tile.add_spawn(mon_zombie_hulk,1,SEEX,SEEY);
tile.save(g->cur_om, int(g->turn), site.x * 2, site.y * 2, 0);
}
void mission_start::place_npc_software(game *g, mission *miss)
{
npc* dev = g->find_npc(miss->npc_id);
@@ -211,6 +262,82 @@ void mission_start::place_npc_software(game *g, mission *miss)
compmap.save(g->cur_om, int(g->turn), place.x * 2, place.y * 2, 0);
}
void mission_start::place_priest_diary(game *g, mission *miss)
{
point place;
int city_id = g->cur_om->closest_city( g->om_location() );
place = g->cur_om->random_house_in_city(city_id);
miss->target = place;
for (int x = place.x - 2; x <= place.x + 2; x++) {
for (int y = place.y - 2; y <= place.y + 2; y++)
g->cur_om->seen(x, y, 0) = true;
}
tinymap compmap(&(g->itypes), &(g->mapitems), &(g->traps));
compmap.load(g, place.x * 2, place.y * 2, 0, false);
point comppoint;
std::vector<point> valid;
for (int x = 0; x < SEEX * 2; x++) {
for (int y = 0; y < SEEY * 2; y++) {
if (compmap.ter(x, y) == t_bed || compmap.ter(x, y) == t_dresser || compmap.ter(x, y) == t_indoor_plant || compmap.ter(x, y) == t_cupboard) {
valid.push_back( point(x, y) );
}
}
}
if (valid.empty())
comppoint = point( rng(6, SEEX * 2 - 7), rng(6, SEEY * 2 - 7) );
else
comppoint = valid[rng(0, valid.size() - 1)];
compmap.spawn_item(comppoint.x, comppoint.y, "priest_diary", 0);
compmap.save(g->cur_om, int(g->turn), place.x * 2, place.y * 2, 0);
}
void mission_start::place_deposit_box(game *g, mission *miss)
{
npc *p = g->find_npc(miss->npc_id);
p->attitude = NPCATT_FOLLOW;//npc joins you
int dist = 0;
point site = g->cur_om->find_closest(g->om_location(), ot_bank_north, 1, dist, false);
if (site.x == -1 && site.y == -1 )
site = g->cur_om->find_closest(g->om_location(), ot_bank_south, 1, dist, false);
if (site.x == -1 && site.y == -1)
site = g->cur_om->find_closest(g->om_location(), ot_bank_east, 1, dist, false);
if (site.x == -1 && site.y == -1)
site = g->cur_om->find_closest(g->om_location(), ot_bank_west, 1, dist, false);
if (site.x == -1 && site.y == -1)
site = g->cur_om->find_closest(g->om_location(), ot_office_tower_1, 1, dist, false);
miss->target = site;
for (int x = site.x - 2; x <= site.x + 2; x++) {
for (int y = site.y - 2; y <= site.y + 2; y++)
g->cur_om->seen(x, y, 0) = true;
}
tinymap compmap(&(g->itypes), &(g->mapitems), &(g->traps));
compmap.load(g, site.x * 2, site.y * 2, 0, false);
point comppoint;
std::vector<point> valid;
for (int x = 0; x < SEEX * 2; x++) {
for (int y = 0; y < SEEY * 2; y++) {
if (compmap.ter(x, y) == t_floor) {
bool okay = false;
for (int x2 = x - 1; x2 <= x + 1 && !okay; x2++) {
for (int y2 = y - 1; y2 <= y + 1 && !okay; y2++) {
if (compmap.ter(x2, y2) == t_wall_metal_h|| compmap.ter(x2, y2) == t_wall_metal_v) {
okay = true;
valid.push_back( point(x, y) );
}
}
}
}
}
}
if (valid.empty())
comppoint = point( rng(6, SEEX * 2 - 7), rng(6, SEEY * 2 - 7) );
else
comppoint = valid[rng(0, valid.size() - 1)];
compmap.spawn_item(comppoint.x, comppoint.y, "safe_box", 0);
compmap.save(g->cur_om, int(g->turn), site.x * 2, site.y * 2, 0);
}
void mission_start::reveal_lab_black_box(game *g, mission *miss)
{
npc* dev = g->find_npc(miss->npc_id);
@@ -228,6 +355,24 @@ void mission_start::reveal_lab_black_box(game *g, mission *miss)
miss->target = place;
}
void mission_start::oepn_sarcophagus(game *g, mission *miss)
{
npc *p = g->find_npc(miss->npc_id);
p->attitude = NPCATT_FOLLOW;
if (p != NULL) {
g->u.i_add( item(g->itypes["sarcophagus_access_code"], 0) );
g->add_msg("%s gave you sarcophagus access code.", p->name.c_str());
}
int dist = 0;
point place = g->cur_om->find_closest(g->om_location(), ot_haz_sar_entrance, 1, dist,
false);
for (int x = place.x - 3; x <= place.x + 3; x++) {
for (int y = place.y - 3; y <= place.y + 3; y++)
g->cur_om->seen(x, y, 0) = true;
}
miss->target = place;
}
void mission_start::reveal_hospital(game *g, mission *miss)
{
npc* dev = g->find_npc(miss->npc_id);
@@ -277,6 +422,63 @@ void mission_start::find_safety(game *g, mission *miss)
}
}
void mission_start::point_prison(game *g, mission *miss)
{
int dist = 0;
point place = g->cur_om->find_closest(g->om_location(), ot_prison_5, 1, dist,
false);
for (int x = place.x - 3; x <= place.x + 3; x++) {
for (int y = place.y - 3; y <= place.y + 3; y++)
g->cur_om->seen(x, y, 0) = true;
}
miss->target = place;
}
void mission_start::point_cabin_strange(game *g, mission *miss)
{
int dist = 0;
point place = g->cur_om->find_closest(g->om_location(), ot_cabin_strange, 1, dist,
false);
for (int x = place.x - 3; x <= place.x + 3; x++) {
for (int y = place.y - 3; y <= place.y + 3; y++)
g->cur_om->seen(x, y, 0) = true;
}
miss->target = place;
}
void mission_start::recruit_tracker(game *g, mission *miss)
{
npc *p = g->find_npc(miss->npc_id);
p->attitude = NPCATT_FOLLOW;//npc joins you
int dist = 0;
point site = g->cur_om->find_closest(g->om_location(), ot_cabin, 1, dist, false);
miss->target = site;
miss->recruit_class = NC_COWBOY;
// Make it seen on our map
for (int x = site.x - 2; x <= site.x + 2; x++) {
for (int y = site.y - 2; y <= site.y + 2; y++)
g->cur_om->seen(x, y, 0) = true;
}
npc * temp = new npc();
temp->normalize(g);
temp->randomize(g, NC_COWBOY);
temp->omx = site.x*2;
temp->omy = site.y*2;
temp->mapx = site.x*2;
temp->mapy = site.y*2;
temp->posx = 11;
temp->posy = 11;
temp->attitude = NPCATT_TALK;
temp->mission = NPC_MISSION_SHOPKEEP;
temp->personality.aggression -= 1;
temp->op_of_u.owed = 10; int mission_index = g->reserve_mission(MISSION_JOIN_TRACKER, temp->getID());
if (mission_index != -1)
temp->chatbin.missions.push_back(mission_index);
g->cur_om->npcs.push_back(temp);
}
void mission_start::place_book(game *g, mission *miss)
{
}
+100 -3
View File
@@ -10,6 +10,7 @@ mission_type(id, name, goal, diff, val, urgent, place, start, end, fail) )
#define ORIGINS(...) setvector(&mission_types[id].origins, __VA_ARGS__, NULL)
#define ITEM(itid) mission_types[id].item_id = itid
#define DESTINATION(dest) mission_types[id].target_id = dest
#define FOLLOWUP(next_up) mission_types[id].follow_up = next_up
// DEADLINE defines the low and high end time limits, in hours
// Omitting DEADLINE means the mission never times out
@@ -79,36 +80,132 @@ MISSION("Find Flag", MGOAL_FIND_ITEM, 2, 1000, false,
&mission_place::always, &mission_start::reveal_lab_black_box,
&mission_end::standard, &mission_fail::standard);
ORIGINS(ORIGIN_SECONDARY);
FOLLOWUP(MISSION_EXPLORE_SARCOPHAGUS);
ITEM("black_box_transcript");
//patriot mission 4
MISSION("Follow Sarcophagus Team", MGOAL_GO_TO_TYPE, 2, 500, false,
&mission_place::always, &mission_start::oepn_sarcophagus,
&mission_end::standard, &mission_fail::standard);
ORIGINS(ORIGIN_SECONDARY);
DESTINATION(ot_haz_sar_b1);
//martyr mission 1
MISSION("Find Relic", MGOAL_FIND_ITEM, 2, 1000, false,
&mission_place::always, &mission_start::standard,
&mission_end::standard, &mission_fail::standard);
ORIGINS(ORIGIN_ANY_NPC);
ORIGINS(ORIGIN_OPENER_NPC, ORIGIN_ANY_NPC);
FOLLOWUP(MISSION_RECOVER_PRIEST_DIARY);
ITEM("small_relic");
//martyr mission 2
MISSION("Recover Priest's Diary", MGOAL_FIND_ITEM, 2, 700, false,
&mission_place::always, &mission_start::place_priest_diary,
&mission_end::standard, &mission_fail::standard);
ORIGINS(ORIGIN_SECONDARY);
FOLLOWUP(MISSION_INVESTIGATE_CULT);
ITEM("priest_diary");
//martyr mission 3
MISSION("Investigate Cult", MGOAL_FIND_ITEM, 2, 1500, false,
&mission_place::always, &mission_start::point_cabin_strange,
&mission_end::standard, &mission_fail::standard);
ORIGINS(ORIGIN_SECONDARY);
FOLLOWUP(MISSION_INVESTIGATE_PRISON_VISIONARY);
ITEM("etched_skull");
//martyr mission 4
MISSION("Prison Visionary", MGOAL_FIND_ITEM, 2, 1500, false,
&mission_place::always, &mission_start::point_prison,
&mission_end::standard, &mission_fail::standard);
ORIGINS(ORIGIN_SECONDARY);
ITEM("visions_solitude");
MISSION("Find Weather Log", MGOAL_FIND_ITEM, 2, 500, false,
&mission_place::always, &mission_start::standard,
&mission_end::standard, &mission_fail::standard);
ORIGINS(ORIGIN_OPENER_NPC, ORIGIN_ANY_NPC);
ITEM("record_weather");
MISSION("Find Patient Records", MGOAL_FIND_ITEM, 2, 1000, false,
//humanitarian mission 1
MISSION("Find Patient Records", MGOAL_FIND_ITEM, 2, 600, false,
&mission_place::always, &mission_start::standard,
&mission_end::standard, &mission_fail::standard);
ORIGINS(ORIGIN_OPENER_NPC, ORIGIN_ANY_NPC);
FOLLOWUP(MISSION_REACH_FEMA_CAMP);
ITEM("record_patient");
//humanitarian mission 2
MISSION("Reach FEMA Camp", MGOAL_GO_TO_TYPE, 2, 600, false,
&mission_place::always, &mission_start::join,
&mission_end::standard, &mission_fail::standard);
ORIGINS(ORIGIN_SECONDARY);
DESTINATION(ot_fema);
FOLLOWUP(MISSION_REACH_FARM_HOUSE);
//humanitarian mission 3
MISSION("Reach Farm House", MGOAL_GO_TO_TYPE, 2, 600, false,
&mission_place::always, &mission_start::join,
&mission_end::leave, &mission_fail::standard);
ORIGINS(ORIGIN_SECONDARY);
DESTINATION(ot_farm);
//vigilante mission 1
MISSION("Find Corporate Accounts", MGOAL_FIND_ITEM, 2, 1400, false,
&mission_place::always, &mission_start::standard,
&mission_end::standard, &mission_fail::standard);
ORIGINS(ORIGIN_OPENER_NPC, ORIGIN_ANY_NPC);
FOLLOWUP(MISSION_GET_SAFE_BOX);
ITEM("record_accounting");
//vigilante mission 2
MISSION("Retrieve Deposit Box", MGOAL_FIND_ITEM, 2, 300, false,
&mission_place::always, &mission_start::place_deposit_box,
&mission_end::deposit_box, &mission_fail::standard);
ORIGINS(ORIGIN_SECONDARY);
FOLLOWUP(MISSION_GET_DEPUTY_BADGE);
ITEM("safe_box");
//vigilante mission 3
MISSION("Find Deputy Badge", MGOAL_FIND_ITEM, 2, 1500, false,
&mission_place::always, &mission_start::standard,
&mission_end::standard, &mission_fail::standard);
ORIGINS(ORIGIN_SECONDARY);
ITEM("badge_deputy");
MISSION("Kill Jabberwock", MGOAL_KILL_MONSTER, 5, 2500, true,
//demon slayer mission 1
MISSION("Kill Jabberwock", MGOAL_KILL_MONSTER, 5, 2000, true,
&mission_place::always, &mission_start::place_jabberwock,
&mission_end::standard, &mission_fail::standard);
ORIGINS(ORIGIN_OPENER_NPC, ORIGIN_ANY_NPC);
FOLLOWUP(MISSION_KILL_100_Z);
//demon slayer mission 2
MISSION("Kill 100 Zombies", MGOAL_KILL_MONSTER_TYPE, 5, 2500, false,
&mission_place::always, &mission_start::kill_100_z,
&mission_end::leave, &mission_fail::standard);
ORIGINS(ORIGIN_SECONDARY);
FOLLOWUP(MISSION_KILL_HORDE_MASTER);
//demon slayer mission 3
MISSION("Kill Horde Master",MGOAL_KILL_MONSTER, 5, 2500, true,
&mission_place::always, &mission_start::kill_horde_master,
&mission_end::leave, &mission_fail::standard);
ORIGINS(ORIGIN_SECONDARY);
FOLLOWUP(MISSION_RECRUIT_TRACKER);
//demon slayer mission 4
MISSION("Recruit Tracker",MGOAL_RECRUIT_NPC_CLASS, 5, 700, false,
&mission_place::always, &mission_start::recruit_tracker,
&mission_end::standard, &mission_fail::standard);
ORIGINS(ORIGIN_SECONDARY);
//demon slayer mission 4b
MISSION("Tracker", MGOAL_FIND_ITEM, 5, 0, true,
&mission_place::always, &mission_start::join,
&mission_end::standard, &mission_fail::standard);
ORIGINS(ORIGIN_SECONDARY);
ITEM("badge_deputy");
MISSION("Find a Book", MGOAL_FIND_ANY_ITEM, 2, 800, false,
&mission_place::always, &mission_start::place_book,
+103 -61
View File
@@ -4,6 +4,7 @@
#include "rng.h"
#include "line.h"
#include "bodypart.h"
#include "material.h"
//Used for e^(x) functions
#include <stdio.h>
@@ -45,7 +46,7 @@ void mattack::antqueen(game *g, monster *z)
} else if (egg_points.size() == 0) { // There's no eggs nearby--lay one.
if (g->u_see(z->posx, z->posy))
g->add_msg("The %s lays an egg!", z->name().c_str());
g->m.spawn_item(z->posx, z->posy, g->itypes["ant_egg"], g->turn);
g->m.spawn_item(z->posx, z->posy, "ant_egg", g->turn);
} else { // There are eggs nearby. Let's hatch some.
z->moves -= 20 * egg_points.size(); // It takes a while
if (g->u_see(z->posx, z->posy))
@@ -823,7 +824,7 @@ void mattack::formblob(game *g, monster *z)
g->z[thatmon].speed += 5;
if (g->z[thatmon].speed >= 60)
g->z[thatmon].poly(g->mtypes[mon_blob]);
} else if ((g->z[thatmon].made_of(FLESH) || g->z[thatmon].made_of(VEGGY)) &&
} else if ((g->z[thatmon].made_of("flesh") || g->z[thatmon].made_of("veggy")) &&
rng(0, z->hp) > rng(0, g->z[thatmon].hp)) { // Blobify!
didit = true;
g->z[thatmon].poly(g->mtypes[mon_blob]);
@@ -956,7 +957,7 @@ void mattack::vortex(game *g, monster *z)
}
// TODO: Hit NPCs
if (dam == 0 || i == traj.size() - 1) {
if (thrown.made_of(GLASS)) {
if (thrown.made_of("glass")) {
if (g->u_see(traj[i].x, traj[i].y))
g->add_msg("The %s shatters!", thrown.tname().c_str());
for (int n = 0; n < thrown.contents.size(); n++)
@@ -974,30 +975,19 @@ void mattack::vortex(game *g, monster *z)
int distance = 0, damage = 0;
monster *thrown = &(g->z[mondex]);
switch (thrown->type->size) {
case MS_TINY: distance = 5; break;
case MS_SMALL: distance = 3; break;
case MS_MEDIUM: distance = 2; break;
case MS_LARGE: distance = 1; break;
case MS_TINY: distance = 10; break;
case MS_SMALL: distance = 6; break;
case MS_MEDIUM: distance = 4; break;
case MS_LARGE: distance = 2; break;
case MS_HUGE: distance = 0; break;
}
damage = distance * 4;
switch (thrown->type->mat) {
case LIQUID: distance += 3; damage -= 10; break;
case VEGGY: distance += 1; damage -= 5; break;
case POWDER: distance += 4; damage -= 30; break;
case COTTON:
case WOOL: distance += 5; damage -= 40; break;
case LEATHER: distance -= 1; damage += 5; break;
case KEVLAR: distance -= 3; damage -= 20; break;
case STONE: distance -= 3; damage += 5; break;
case PAPER: distance += 6; damage -= 10; break;
case WOOD: distance += 1; damage += 5; break;
case PLASTIC: distance += 1; damage += 5; break;
case GLASS: distance += 2; damage += 20; break;
case IRON: distance -= 1; // fall through
case STEEL:
case SILVER: distance -= 3; damage -= 10; break;
}
damage = distance * 3;
// subtract 1 unit of distance for every 10 units of density
// subtract 5 units of damage for every 10 units of density
material_type* mon_mat = material_type::find_material(thrown->type->mat);
distance -= mon_mat->density() / 10;
damage -= mon_mat->density() / 5;
if (distance > 0) {
if (g->u_see(thrown))
g->add_msg("The %s is thrown by winds!", thrown->name().c_str());
@@ -1154,28 +1144,75 @@ void mattack::tazer(game *g, monster *z)
g->u.moves -= shock * 20;
}
int coord2angle ( const int x, const int y, const int tgtx, const int tgty ) {
const double DBLRAD2DEG = 57.2957795130823f;
//const double PI = 3.14159265358979f;
const double DBLPI = 6.28318530717958f;
double rad = atan2 ( tgty - y, tgtx - x );
if ( rad < 0 ) rad = DBLPI - (0 - rad);
return int( rad * DBLRAD2DEG );
}
void mattack::smg(game *g, monster *z)
{
int t, fire_t;
if (z->friendly != 0) { // Attacking monsters, not the player!
if (z->friendly != 0) { // Attacking monsters, not the player!
monster* target = NULL;
const int iff_dist=24; // iff check triggers at this distance
int iff_hangle=15; // iff safety margin (degrees). less accuracy, more paranoia
int closest = 19;
int c=0;
int u_angle = 0; // player angle relative to turret
int boo_hoo = 0; // how many targets were passed due to IFF. Tragically.
bool iff_trig = false; // player seen and within range of stray shots
int pldist=rl_dist(z->posx, z->posy, g->u.posx, g->u.posy);
if ( pldist < iff_dist &&
g->sees_u(z->posx, z->posy, t) ) {
iff_trig = true;
if ( pldist < 3 ) iff_hangle=( pldist == 2 ? 30 : 60 ); // granularity increases with proximity
u_angle = coord2angle (z->posx, z->posy, g->u.posx, g->u.posy );
}
for (int i = 0; i < g->z.size(); i++) {
int dist = rl_dist(z->posx, z->posy, g->z[i].posx, g->z[i].posy);
if (g->z[i].friendly == 0 && dist < closest &&
g->m.sees(z->posx, z->posy, g->z[i].posx, g->z[i].posy, 18, t)) {
target = &(g->z[i]);
closest = dist;
fire_t = t;
}
if ( g->m.sees(z->posx, z->posy, g->z[i].posx, g->z[i].posy, 18, t) ) {
int dist = rl_dist(z->posx, z->posy, g->z[i].posx, g->z[i].posy);
if (g->z[i].friendly == 0 ) {
bool safe_target=true;
if ( iff_trig ) {
int tangle = coord2angle (z->posx, z->posy, g->z[i].posx, g->z[i].posy );
int diff = abs ( u_angle - tangle );
if ( diff + iff_hangle > 360 || diff < iff_hangle ) {
safe_target=false;
boo_hoo++;
}
//mvprintw(c,VIEWX * 2 + 8,"tgt? %d <=> %d : %d",tangle, u_angle, diff);
}
if (dist < closest && safe_target ) {
target = &(g->z[i]);
closest = dist;
fire_t = t;
}
} // else if ( advanced_software_upgrade ) {
// todo; make friendly && unfriendly lists, then select closest non-friendly fire target
}
c++;
}
z->sp_timeout = z->type->sp_freq; // Reset timer
if (target == NULL) // Couldn't find any targets!
return;
if (target == NULL) {// Couldn't find any targets!
if(boo_hoo > 0 && g->u_see(z->posx, z->posy) ) { // because that stupid oaf was in the way!
if(boo_hoo > 1) {
g->add_msg("Pointed in your direction, the %s emits %d annoyed sounding beeps.",
z->name().c_str(),boo_hoo);
} else {
g->add_msg("Pointed in your direction, the %s emits an IFF warning beep.",
z->name().c_str());
}
}
return;
}
z->moves = -150; // It takes a while
if (g->u_see(z->posx, z->posy))
g->add_msg("The %s fires its smg!", z->name().c_str());
player tmp;
npc tmp;
tmp.name = "The " + z->name();
tmp.skillLevel("smg").level(1);
@@ -1214,7 +1251,7 @@ void mattack::smg(game *g, monster *z)
if (g->u_see(z->posx, z->posy))
g->add_msg("The %s fires its smg!", z->name().c_str());
// Set up a temporary player to fire this gun
player tmp;
npc tmp;
tmp.name = "The " + z->name();
tmp.skillLevel("smg").level(1);
@@ -1408,33 +1445,38 @@ void mattack::breathe(game *g, monster *z)
}
}
void mattack::bite(game *g, monster *z)
{
if (rl_dist(z->posx, z->posy, g->u.posx, g->u.posy) > 1)
{
return;
}
z->sp_timeout = z->type->sp_freq; // Reset timer
g->add_msg("The %s lunges forward attempting to bite you!", z->name().c_str());
z->moves -= 100;
void mattack::bite(game *g, monster *z) {
if (rl_dist(z->posx, z->posy, g->u.posx, g->u.posy) > 1) {
return;
}
// Can we dodge the attack? Uses player dodge function % chance (melee.cpp)
int dodge_check = std::max(g->u.dodge(g) - rng(0, z->type->melee_skill), 0L);
if (rng(0, 10000) < 10000 / (1 + (99 * exp(-.6 * dodge_check))))
{
g->add_msg("You dodge it!");
g->u.practice(g->turn, "dodge", z->type->melee_skill*2);
return;
}
body_part hit = random_body_part();
int dam = rng(5, 10), side = rng(0, 1);
z->sp_timeout = z->type->sp_freq; // Reset timer
g->add_msg("The %s lunges forward attempting to bite you!", z->name().c_str());
z->moves -= 100;
// Can we dodge the attack? Uses player dodge function % chance (melee.cpp)
int dodge_check = std::max(g->u.dodge(g) - rng(0, z->type->melee_skill), 0L);
if (rng(0, 10000) < 10000 / (1 + (99 * exp(-.6 * dodge_check)))) {
g->add_msg("You dodge it!");
g->u.practice(g->turn, "dodge", z->type->melee_skill*2);
return;
}
body_part hit = random_body_part();
int dam = rng(5, 10), side = rng(0, 1);
dam = g->u.hit(g, hit, side, dam, 0);
if (dam > 0) {
g->add_msg("Your %s is bitten!", body_part_name(hit, side).c_str());
g->u.hit(g, hit, side, dam, 0);
if(one_in(10))
{
g->u.add_disease(DI_BITE, 3600, g);
if(one_in(14 - dam)) {
g->u.add_disease(DI_BITE, 3600, g);
}
g->u.practice(g->turn, "dodge", z->type->melee_skill);
} else {
g->add_msg("Your %s is bitten, but your armor protects you.", body_part_name(hit, side).c_str());
}
g->u.practice(g->turn, "dodge", z->type->melee_skill);
}
void mattack::flesh_golem(game *g, monster *z)
+90 -14
View File
@@ -10,21 +10,97 @@ void mdeath::normal(game *g, monster *z)
{
if (g->u_see(z))
g->add_msg("The %s dies!", z->name().c_str());
if (z->made_of(FLESH) && z->has_flag(MF_WARM)) {
if (z->made_of("flesh") && z->has_flag(MF_WARM)) {
if (g->m.field_at(z->posx, z->posy).type == fd_blood &&
g->m.field_at(z->posx, z->posy).density < 3)
g->m.field_at(z->posx, z->posy).density++;
else
g->m.add_field(g, z->posx, z->posy, fd_blood, 1);
}
// Drop a dang ol' corpse
// If their hp is less than -50, we destroyed them so badly no corpse was left
if ((z->hp >= -50 || z->hp >= 0 - 2 * z->type->hp) &&
(z->made_of(FLESH) || z->made_of(VEGGY))) {
item tmp;
tmp.make_corpse(g->itypes["corpse"], z->type, g->turn);
g->m.add_item(z->posx, z->posy, tmp);
}
int gib_amount = 0;
bool leave_corpse = false;
int corpse_damage = 0;
// determine how much of a mess is left, for flesh and veggy creatures
if (z->made_of("flesh") || z->made_of("veggy") || z->made_of("hflesh"))
{
if (z->hp >= 0 - 2 * z->type->hp) // less than 2x monster hp overkill, leave corpse
{
leave_corpse = true;
corpse_damage = 0;
}
if (z->hp >= 0 - 2 * z->type->hp - 20 && z->hp < 0 - 2 * z->type->hp) // corpse with damage 1
{
leave_corpse = true;
corpse_damage = 1;
gib_amount = rng(1,3);
}
if (z->hp >= 0 - 2 * z->type->hp - 40 && z->hp < 0 - 2 * z->type->hp - 20) // corpse with damage 2
{
leave_corpse = true;
corpse_damage = 2;
gib_amount = rng(2,5);
}
if (z->hp >= 0 - 2 * z->type->hp - 60 && z->hp < 0 - 2 * z->type->hp - 40) // corpse with damage 3
{
leave_corpse = true;
corpse_damage = 3;
gib_amount = rng(3,9);
}
if (z->hp >= 0 - 2 * z->type->hp - 80 && z->hp < 0 - 2 * z->type->hp - 60) // corpse with damage 4
{
leave_corpse = true;
corpse_damage = 4;
gib_amount = rng(4,12);
}
if (z->hp <= 0 - 2 * z->type->hp - 80) // no corpse if MS_TINY or MS_SMALL, gib_amount fields only
{
if (z->type->size == MS_MEDIUM || z->type->size == MS_LARGE || z->type->size == MS_HUGE)
{
leave_corpse = true;
corpse_damage = 4;
}
else
{
leave_corpse = false;
}
gib_amount = rng(5,15);
}
}
// leave a corpse, if any
if (leave_corpse)
{
item tmp;
tmp.make_corpse(g->itypes["corpse"], z->type, g->turn);
tmp.damage = corpse_damage;
g->m.add_item(z->posx, z->posy, tmp);
}
// leave gibs
for (int i = 0; i < gib_amount; i++)
{
int rand_posx = z->posx + rng(1,5) - 3;
int rand_posy = z->posx + rng(1,5) - 3;
if (((g->m.field_at(rand_posx, rand_posy).type == fd_gibs_flesh) ||
(g->m.field_at(rand_posx, rand_posy).type == fd_gibs_veggy)) &&
(g->m.field_at(rand_posx, rand_posy).density < 3))
{
g->m.field_at(rand_posx, rand_posy).density++;
}
else if (g->m.field_at(rand_posx, rand_posy).is_null())
{
if (z->made_of("flesh") || z->made_of("hflesh"))
{
g->m.add_field(g, z->posx + rng(1,5) - 3, z->posy + rng(1,5) - 3, fd_gibs_flesh, rng(1,3));
}
else if (z->made_of("veggy"))
{
g->m.add_field(g, z->posx + rng(1,5) - 3, z->posy + rng(1,5) - 3, fd_gibs_veggy, rng(1,3));
}
}
}
}
void mdeath::acid(game *g, monster *z)
@@ -313,7 +389,7 @@ void mdeath::smokeburst(game *g, monster *z)
}
}
// this function generates clothing for zombies
// this function generates clothing for zombies
void mdeath::zombie(game *g, monster *z)
{
// normal death function first
@@ -324,7 +400,7 @@ void mdeath::zombie(game *g, monster *z)
{
return;
}
// now generate appropriate clothing
switch(z->type->id)
{
@@ -349,12 +425,12 @@ void mdeath::zombie(game *g, monster *z)
g->m.put_items_from(mi_mil_armor_helmet, 1, z->posx, z->posy, g->turn, 0, 0, rng(1,4));
}
break;
case mon_zombie_hulk:
g->m.spawn_item(z->posx, z->posy, item_controller->find_template("rag"), g->turn, 0, 0, rng(5,10));
g->m.spawn_item(z->posx, z->posy, "rag", g->turn, 0, 0, rng(5,10));
g->m.put_items_from(mi_pants, 1, z->posx, z->posy, g->turn, 0, 0, rng(1,4));
break;
default:
g->m.put_items_from(mi_pants, 1, z->posx, z->posy, g->turn, 0, 0, rng(1,4));
g->m.put_items_from(mi_shirts, 1, z->posx, z->posy, g->turn, 0, 0, rng(1,4));
+59 -21
View File
@@ -230,7 +230,6 @@ void monster::move(game *g)
return;
}
moves -= 100;
bool moved = false;
point next;
int mondex = (plans.size() > 0 ? g->mon_at(plans[0].x, plans[0].y) : -1);
@@ -253,6 +252,7 @@ void monster::move(game *g)
if (current_attitude == MATT_IGNORE ||
(current_attitude == MATT_FOLLOW && plans.size() <= MONSTER_FOLLOW_DIST)) {
moves -= 100;
stumble(g, false);
return;
}
@@ -289,10 +289,11 @@ void monster::move(game *g)
int npcdex = g->npc_at(next.x, next.y);
if (next.x == g->u.posx && next.y == g->u.posy && type->melee_dice > 0)
hit_player(g, g->u);
else if (mondex != -1 && g->z[mondex].type->species == species_hallu)
else if (mondex != -1 && g->z[mondex].type->species == species_hallu) {
g->kill_mon(mondex);
else if (mondex != -1 && type->melee_dice > 0 && this != &(g->z[mondex]) &&
(g->z[mondex].friendly != 0 || has_flag(MF_ATTACKMON)))
moves -= 100;
} else if (mondex != -1 && type->melee_dice > 0 && this != &(g->z[mondex]) &&
(g->z[mondex].friendly != 0 || has_flag(MF_ATTACKMON)))
hit_monster(g, mondex);
else if (npcdex != -1 && type->melee_dice > 0)
hit_player(g, *g->active_npc[npcdex]);
@@ -302,6 +303,7 @@ void monster::move(game *g)
int bashskill = int(type->melee_dice * type->melee_sides);
g->m.bash(next.x, next.y, bashskill, bashsound);
g->sound(next.x, next.y, 18, bashsound);
moves -= 100;
} else if (g->m.move_cost(next.x, next.y) == 0 && has_flag(MF_DESTROYS)) {
g->m.destroy(g, next.x, next.y, true);
moves -= 250;
@@ -309,7 +311,8 @@ void monster::move(game *g)
move_to(g, next.x, next.y);
else
moves -= 100;
}
} else
moves -= 100;
// If we're close to our target, we get focused and don't stumble
if ((has_flag(MF_STUMBLES) && (plans.size() > 3 || plans.size() == 0)) ||
@@ -354,15 +357,16 @@ void monster::friendly_move(game *g)
{
point next;
bool moved = false;
moves -= 100;
if (plans.size() > 0 && (plans[0].x != g->u.posx || plans[0].y != g->u.posy) &&
(can_move_to(g, plans[0].x, plans[0].y) ||
(g->m.has_flag(bashable, plans[0].x, plans[0].y) && has_flag(MF_BASHES)))){
next = plans[0];
plans.erase(plans.begin());
moved = true;
} else
} else {
moves -= 100;
stumble(g, moved);
}
if (moved) {
int mondex = g->mon_at(next.x, next.y);
int npcdex = g->npc_at(next.x, next.y);
@@ -378,6 +382,7 @@ void monster::friendly_move(game *g)
int bashskill = int(type->melee_dice * type->melee_sides);
g->m.bash(next.x, next.y, bashskill, bashsound);
g->sound(next.x, next.y, 18, bashsound);
moves -= 100;
} else if (g->m.move_cost(next.x, next.y) == 0 && has_flag(MF_DESTROYS)) {
g->m.destroy(g, next.x, next.y, true);
moves -= 250;
@@ -495,6 +500,8 @@ point monster::sound_move(game *g)
void monster::hit_player(game *g, player &p, bool can_grab)
{
moves -= 100;
if (type->melee_dice == 0) // We don't attack, so just return
{
return;
@@ -590,10 +597,10 @@ void monster::hit_player(game *g, player &p, bool can_grab)
}
//Hurt the player
p.hit(g, bphit, side, dam, cut);
dam = p.hit(g, bphit, side, dam, cut);
//Monster effects
if (has_flag(MF_VENOM))
if (dam > 0 && has_flag(MF_VENOM))
{
if (!is_npc)
{
@@ -601,7 +608,7 @@ void monster::hit_player(game *g, player &p, bool can_grab)
}
p.add_disease(DI_POISON, 30, g);
}
else if (has_flag(MF_BADVENOM))
else if (dam > 0 && has_flag(MF_BADVENOM))
{
if (!is_npc)
{
@@ -695,6 +702,33 @@ void monster::hit_player(game *g, player &p, bool can_grab)
}
}
int monster::calc_movecost(game *g, int x1, int y1, int x2, int y2)
{
int movecost = 0;
int diag_mult = (trigdist && x1 != x2 && y1 != y2) ? 1.41 : 1;
// Digging and flying monsters ignore terrain cost
if (has_flag(MF_DIGS) || has_flag(MF_FLIES)) {
movecost = 100 * diag_mult;
// Swimming monsters move super fast in water
} else if (has_flag(MF_SWIMS)) {
if (g->m.has_flag(swimmable, x1, y1))
movecost += 25;
else
movecost += 50 * g->m.move_cost(x1, y1);
if (g->m.has_flag(swimmable, x2, y2))
movecost += 25;
else
movecost += 50 * g->m.move_cost(x2, y2);
movecost *= diag_mult;
// All others use the same calculation as the player
} else {
movecost = (g->m.combined_movecost(x1, y1, x2, y2));
}
return movecost;
}
void monster::move_to(game *g, int x, int y)
{
int mondex = g->mon_at(x, y);
@@ -703,13 +737,12 @@ void monster::move_to(game *g, int x, int y)
moves = 0;
return;
}
if (plans.size() > 0)
plans.erase(plans.begin());
if (has_flag(MF_SWIMS) && g->m.has_flag(swimmable, x, y))
moves += 50;
if (!has_flag(MF_DIGS) && !has_flag(MF_FLIES) &&
(!has_flag(MF_SWIMS) || !g->m.has_flag(swimmable, x, y)))
moves -= (g->m.move_cost(x, y) - 2) * 50;
moves -= calc_movecost(g, posx, posy, x, y);
posx = x;
posy = y;
footsteps(g, x, y);
@@ -720,7 +753,7 @@ void monster::move_to(game *g, int x, int y)
if (!has_flag(MF_DIGS) && !has_flag(MF_FLIES) &&
g->m.tr_at(posx, posy) != tr_null) { // Monster stepped on a trap!
trap* tr = g->traps[g->m.tr_at(posx, posy)];
if (dice(3, sk_dodge + 1) < dice(3, tr->avoidance)) {
if (dice(3, type->sk_dodge + 1) < dice(3, tr->avoidance)) {
trapfuncm f;
(f.*(tr->actm))(g, this, posx, posy);
}
@@ -767,10 +800,13 @@ void monster::stumble(game *g, bool moved)
}
int choice = rng(0, valid_stumbles.size() - 1);
posx = valid_stumbles[choice].x;
posy = valid_stumbles[choice].y;
if (!has_flag(MF_DIGS) || !has_flag(MF_FLIES))
moves -= (g->m.move_cost(posx, posy) - 2) * 50;
int cx = valid_stumbles[choice].x;
int cy = valid_stumbles[choice].y;
moves -= calc_movecost(g, posx, posy, cx, cy);
posx = cx;
posy = cy;
// Here we have to fix our plans[] list,
// acquiring a new path to the previous target.
// target == either end of current plan, or the player.
@@ -911,8 +947,10 @@ int monster::turns_to_reach(game *g, int x, int y)
for (int i = 0; i < path.size(); i++) {
if (g->m.move_cost(path[i].x, path[i].y) == 0) // We have to bash through
turns += 5;
else if (i == 0)
turns += double(calc_movecost(g, posx, posy, path[i].x, path[i].y)) / speed;
else
turns += double(50 * g->m.move_cost(path[i].x, path[i].y)) / speed;
turns += double(calc_movecost(g, path[i-1].x, path[i-1].y, path[i].x, path[i].y)) / speed;
}
return int(turns + .9); // Round up
}
+27 -22
View File
@@ -125,18 +125,19 @@ std::string monster::name()
return type->name;
}
// MATERIALS-TODO: put description in materials.json?
std::string monster::name_with_armor()
{
std::string ret = type->name;
if (type->species == species_insect)
ret += "'s carapace";
else {
switch (type->mat) {
case VEGGY: ret += "'s thick bark"; break;
case FLESH: ret += "'s thick hide"; break;
case IRON:
case STEEL: ret += "'s armor plating"; break;
}
if (type->mat == "veggy")
ret += "'s thick bark";
else if (type->mat == "flesh" || type->mat == "hflesh")
ret += "'s thick hide";
else if (type->mat == "iron" || type->mat == "steel")
ret += "'s armor plating";
}
return ret;
}
@@ -261,7 +262,7 @@ bool monster::can_hear()
return has_flag(MF_HEARS) && !has_effect(ME_DEAF);
}
bool monster::made_of(material m)
bool monster::made_of(std::string m)
{
if (type->mat == m)
return true;
@@ -285,6 +286,7 @@ void monster::load_info(std::string data, std::vector <mtype*> *mtypes)
no_extra_death_drops >> dead >> anger >> morale;
type = (*mtypes)[idtmp];
point ptmp;
plans.clear();
for (int i = 0; i < plansize; i++) {
dump >> ptmp.x >> ptmp.y;
plans.push_back(ptmp);
@@ -293,16 +295,17 @@ void monster::load_info(std::string data, std::vector <mtype*> *mtypes)
std::string monster::save_info()
{
std::stringstream pack;
pack << int(type->id) << " " << posx << " " << posy << " " << wandx << " " <<
wandy << " " << wandf << " " << moves << " " << speed << " " << hp <<
" " << sp_timeout << " " << plans.size() << " " << friendly << " " <<
faction_id << " " << mission_id << " " << no_extra_death_drops << " " << dead << " " << anger <<
" " << morale;
for (int i = 0; i < plans.size(); i++) {
pack << " " << plans[i].x << " " << plans[i].y;
}
return pack.str();
std::stringstream pack;
pack << int(type->id) << " " << posx << " " << posy << " " << wandx << " " <<
wandy << " " << wandf << " " << moves << " " << speed << " " << hp <<
" " << sp_timeout << " " << plans.size() << " " << friendly << " " <<
faction_id << " " << mission_id << " " << no_extra_death_drops << " " <<
dead << " " << anger << " " << morale;
for (int i = 0; i < plans.size(); i++) {
pack << " " << plans[i].x << " " << plans[i].y;
}
return pack.str();
}
void monster::debug(player &u)
@@ -532,6 +535,7 @@ int monster::hit(game *g, player &p, body_part &bp_hit) {
void monster::hit_monster(game *g, int i)
{
monster* target = &(g->z[i]);
moves -= 100;
if (this == target) {
debugmsg("stopped monster from hitting itself");
@@ -720,7 +724,7 @@ void monster::drop_items_on_death(game *g)
selected_item++;
cur_chance -= g->itypes[mapit[selected_item]]->rarity;
}
g->m.spawn_item(posx, posy, g->itypes[mapit[selected_item]], 0);
g->m.spawn_item(posx, posy, mapit[selected_item], 0);
if (type->item_chance < 0)
{
animal_done = true; // Only drop ONE item.
@@ -767,13 +771,14 @@ void monster::process_effects(game *g)
hurt(rng(1, 3));
break;
// MATERIALS-TODO: use fire resistance
case ME_ONFIRE:
if (made_of(FLESH))
if (made_of("flesh"))
hurt(rng(3, 8));
if (made_of(VEGGY))
if (made_of("veggy"))
hurt(rng(10, 20));
if (made_of(PAPER) || made_of(POWDER) || made_of(WOOD) || made_of(COTTON) ||
made_of(WOOL))
if (made_of("paper") || made_of("powder") || made_of("wood") || made_of("cotton") ||
made_of("wool"))
hurt(rng(15, 40));
break;
+2 -1
View File
@@ -65,7 +65,7 @@ class monster {
bool has_flag(m_flag f); // Returns true if f is set (see mtype.h)
bool can_see(); // MF_SEES and no ME_BLIND
bool can_hear(); // MF_HEARS and no ME_DEAF
bool made_of(material m); // Returns true if it's made of m
bool made_of(std::string m); // Returns true if it's made of m
bool made_of(phase_id p); // Returns true if its phase is p
void load_info(std::string data, std::vector<mtype*> *mtypes);
@@ -93,6 +93,7 @@ class monster {
point scent_move(game *g);
point sound_move(game *g);
void hit_player(game *g, player &p, bool can_grab = true);
int calc_movecost(game *g, int x1, int y1, int x2, int y2);
void move_to(game *g, int x, int y);
void stumble(game *g, bool moved);
void knock_back_from(game *g, int posx, int posy);
+12
View File
@@ -7,18 +7,30 @@ Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Win32 = Debug|Win32
Debug|x64 = Debug|x64
Debug SDL|Win32 = Debug SDL|Win32
Debug SDL|x64 = Debug SDL|x64
Release|Win32 = Release|Win32
Release|x64 = Release|x64
Release SDL|Win32 = Release SDL|Win32
Release SDL|x64 = Release SDL|x64
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{FE1372AC-5F90-447E-BBCA-1B253836EB77}.Debug|Win32.ActiveCfg = Debug|Win32
{FE1372AC-5F90-447E-BBCA-1B253836EB77}.Debug|Win32.Build.0 = Debug|Win32
{FE1372AC-5F90-447E-BBCA-1B253836EB77}.Debug|x64.ActiveCfg = Debug|x64
{FE1372AC-5F90-447E-BBCA-1B253836EB77}.Debug|x64.Build.0 = Debug|x64
{FE1372AC-5F90-447E-BBCA-1B253836EB77}.Debug SDL|Win32.ActiveCfg = Debug SDL|Win32
{FE1372AC-5F90-447E-BBCA-1B253836EB77}.Debug SDL|Win32.Build.0 = Debug SDL|Win32
{FE1372AC-5F90-447E-BBCA-1B253836EB77}.Debug SDL|x64.ActiveCfg = Debug SDL|x64
{FE1372AC-5F90-447E-BBCA-1B253836EB77}.Debug SDL|x64.Build.0 = Debug SDL|x64
{FE1372AC-5F90-447E-BBCA-1B253836EB77}.Release|Win32.ActiveCfg = Release|Win32
{FE1372AC-5F90-447E-BBCA-1B253836EB77}.Release|Win32.Build.0 = Release|Win32
{FE1372AC-5F90-447E-BBCA-1B253836EB77}.Release|x64.ActiveCfg = Release|x64
{FE1372AC-5F90-447E-BBCA-1B253836EB77}.Release|x64.Build.0 = Release|x64
{FE1372AC-5F90-447E-BBCA-1B253836EB77}.Release SDL|Win32.ActiveCfg = Release SDL|Win32
{FE1372AC-5F90-447E-BBCA-1B253836EB77}.Release SDL|Win32.Build.0 = Release SDL|Win32
{FE1372AC-5F90-447E-BBCA-1B253836EB77}.Release SDL|x64.ActiveCfg = Release SDL|x64
{FE1372AC-5F90-447E-BBCA-1B253836EB77}.Release SDL|x64.Build.0 = Release SDL|x64
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
+47 -9
View File
@@ -1,4 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup Label="ProjectConfigurations">
<ProjectConfiguration Include="Debug|Win32">
@@ -9,6 +9,14 @@
<Configuration>Debug</Configuration>
<Platform>x64</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Debug SDL|Win32">
<Configuration>Debug SDL</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Debug SDL|x64">
<Configuration>Debug SDL</Configuration>
<Platform>x64</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Release|Win32">
<Configuration>Release</Configuration>
<Platform>Win32</Platform>
@@ -17,18 +25,26 @@
<Configuration>Release</Configuration>
<Platform>x64</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Release SDL|Win32">
<Configuration>Release SDL</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Release SDL|x64">
<Configuration>Release SDL</Configuration>
<Platform>x64</Platform>
</ProjectConfiguration>
</ItemGroup>
<PropertyGroup Label="Globals">
<ProjectGuid>{FE1372AC-5F90-447E-BBCA-1B253836EB77}</ProjectGuid>
<RootNamespace>Cataclysm</RootNamespace>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<PropertyGroup Condition="'$(Configuration)'=='Debug'" Label="Configuration">
<PropertyGroup Condition="'$(Configuration)'=='Debug' or '$(Configuration)'=='Debug SDL'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<UseDebugLibraries>true</UseDebugLibraries>
<CharacterSet>MultiByte</CharacterSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)'=='Release'" Label="Configuration">
<PropertyGroup Condition="'$(Configuration)'=='Release' or '$(Configuration)'=='Release SDL'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries>
<CharacterSet>MultiByte</CharacterSet>
@@ -43,15 +59,14 @@
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<PropertyGroup Label="UserMacros" />
<PropertyGroup />
<ItemDefinitionGroup>
<ClCompile>
<WarningLevel>Level4</WarningLevel>
<PreprocessorDefinitions>_MBCS;NOMINMAX;_USE_MATH_DEFINES;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<PreprocessorDefinitions>_MBCS;NOMINMAX;_USE_MATH_DEFINES;USE_WINMAIN;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<DisableSpecificWarnings>4100;4127;4996</DisableSpecificWarnings>
</ClCompile>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)'=='Debug'">
<ItemDefinitionGroup Condition="'$(Configuration)'=='Debug' or '$(Configuration)'=='Debug SDL'">
<ClCompile>
<Optimization>Disabled</Optimization>
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
@@ -60,11 +75,30 @@
<GenerateDebugInformation>true</GenerateDebugInformation>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)'=='Release'">
<ItemDefinitionGroup Condition="'$(Configuration)'=='Release' or '$(Configuration)'=='Release SDL'">
<Link>
<OptimizeReferences>true</OptimizeReferences>
<GenerateDebugInformation>true</GenerateDebugInformation>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)'=='Debug SDL' or '$(Configuration)'=='Release SDL'">
<ClCompile>
<PreprocessorDefinitions>TILES;%(PreprocessorDefinitions)</PreprocessorDefinitions>
</ClCompile>
<Link>
<AdditionalDependencies>SDL.lib;SDL_ttf.lib;%(AdditionalDependencies)</AdditionalDependencies>
</Link>
</ItemDefinitionGroup>
<PropertyGroup>
<CustomBuildBeforeTargets>ClCompile</CustomBuildBeforeTargets>
</PropertyGroup>
<ItemDefinitionGroup>
<CustomBuildStep>
<Command>getversion.cmd</Command>
<Message>Generationg version.h</Message>
<Outputs>version.h</Outputs>
</CustomBuildStep>
</ItemDefinitionGroup>
<ItemGroup>
<ClCompile Include="..\action.cpp" />
<ClCompile Include="..\addiction.cpp" />
@@ -74,7 +108,6 @@
<ClCompile Include="..\bodypart.cpp" />
<ClCompile Include="..\building_generation.cpp" />
<ClCompile Include="..\calendar.cpp" />
<ClCompile Include="..\catacurse.cpp" />
<ClCompile Include="..\catajson.cpp" />
<ClCompile Include="..\color.cpp" />
<ClCompile Include="..\computer.cpp" />
@@ -142,6 +175,7 @@
<ClCompile Include="..\profession.cpp" />
<ClCompile Include="..\ranged.cpp" />
<ClCompile Include="..\rng.cpp" />
<ClCompile Include="..\sdlcurse.cpp" />
<ClCompile Include="..\settlement.cpp" />
<ClCompile Include="..\setvector.cpp" />
<ClCompile Include="..\skill.cpp" />
@@ -150,12 +184,14 @@
<ClCompile Include="..\trapdef.cpp" />
<ClCompile Include="..\trapfunc.cpp" />
<ClCompile Include="..\tutorial.cpp" />
<ClCompile Include="..\ui.cpp" />
<ClCompile Include="..\vehicle.cpp" />
<ClCompile Include="..\veh_interact.cpp" />
<ClCompile Include="..\veh_typedef.cpp" />
<ClCompile Include="..\version.cpp" />
<ClCompile Include="..\weather.cpp" />
<ClCompile Include="..\weather_data.cpp" />
<ClCompile Include="..\wincurse.cpp" />
<ClCompile Include="..\wish.cpp" />
</ItemGroup>
<ItemGroup>
@@ -232,9 +268,11 @@
<ClInclude Include="..\tileray.h" />
<ClInclude Include="..\trap.h" />
<ClInclude Include="..\tutorial.h" />
<ClInclude Include="..\ui.h" />
<ClInclude Include="..\vehicle.h" />
<ClInclude Include="..\veh_interact.h" />
<ClInclude Include="..\veh_type.h" />
<ClInclude Include="..\version.h" />
<ClInclude Include="..\wdirent.h" />
<ClInclude Include="..\weather.h" />
</ItemGroup>
@@ -247,4 +285,4 @@
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets">
</ImportGroup>
</Project>
</Project>
+15 -3
View File
@@ -39,9 +39,6 @@
<ClCompile Include="..\calendar.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\catacurse.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\catajson.cpp">
<Filter>Source Files</Filter>
</ClCompile>
@@ -243,6 +240,9 @@
<ClCompile Include="..\rng.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\sdlcurse.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\settlement.cpp">
<Filter>Source Files</Filter>
</ClCompile>
@@ -267,6 +267,9 @@
<ClCompile Include="..\tutorial.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\ui.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\veh_interact.cpp">
<Filter>Source Files</Filter>
</ClCompile>
@@ -285,6 +288,9 @@
<ClCompile Include="..\weather_data.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\wincurse.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\wish.cpp">
<Filter>Source Files</Filter>
</ClCompile>
@@ -509,6 +515,9 @@
<ClInclude Include="..\tutorial.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="..\ui.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="..\veh_interact.h">
<Filter>Header Files</Filter>
</ClInclude>
@@ -524,6 +533,9 @@
<ClInclude Include="..\weather.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="..\version.h">
<Filter>Header Files</Filter>
</ClInclude>
</ItemGroup>
<ItemGroup>
<ResourceCompile Include="..\resource.rc">
+4
View File
@@ -0,0 +1,4 @@
@echo off
SETLOCAL
for /F "tokens=*" %%i in ('git describe --tags --always --dirty --match "[0-9]*.[0-9]*"') do set VERSION=%%i
>..\version.h echo #define VERSION "%VERSION%"
+8 -4
View File
@@ -8,6 +8,7 @@
#include <math.h>
#include "mondeath.h"
#include "monattack.h"
#include "material.h"
#include "enums.h"
#include "color.h"
@@ -75,6 +76,8 @@ mon_human_snail, mon_twisted_body, mon_vortex,
mon_flying_polyp, mon_hunting_horror, mon_mi_go, mon_yugg, mon_gelatin,
mon_flaming_eye, mon_kreck, mon_gracke, mon_blank, mon_gozu, mon_shadow, mon_breather_hub,
mon_breather, mon_shadow_snake,
// Cult, lobotomized creatures that are human/undead hybrids
mon_dementia, mon_homunculus, mon_blood_sacrifice, mon_flesh_angel,
// Robots
mon_eyebot, mon_manhack, mon_skitterbot, mon_secubot, mon_hazmatbot, mon_copbot, mon_molebot,
mon_tripod, mon_chickenbot, mon_tankbot, mon_turret, mon_exploder,
@@ -158,8 +161,9 @@ MF_ACIDTRAIL, // Leaves a trail of acid
MF_FIREY, // Burns stuff and is immune to fire
MF_QUEEN, // When it dies, local populations start to die off too
MF_ELECTRONIC, // e.g. a robot; affected by emp blasts, and other stuff
MF_FUR, // May produce fur when butchered.
MF_FUR, // May produce fur when butchered
MF_LEATHER, // May produce leather when butchered
MF_FEATHER, // May produce feather when butchered
MF_CBM, // May produce a cbm or two when butchered
MF_BONES, // May produce bones and sinews when butchered
MF_IMMOBILE, // Doesn't move (e.g. turrets)
@@ -187,7 +191,7 @@ struct mtype {
nc_color color;// Color of symbol (see color.h)
m_size size;
material mat; // See enums.h for material list. Generally, flesh; veggy?
std::string mat; // See materials.json for material list. Generally, flesh; veggy?
phase_id phase;
std::vector<m_flag> flags;
std::vector<m_category> categories;
@@ -224,7 +228,7 @@ struct mtype {
sym = ' ';
color = c_white;
size = MS_MEDIUM;
mat = FLESH;
mat = "hflesh";
phase = SOLID;
difficulty = 0;
agro = 0;
@@ -246,7 +250,7 @@ struct mtype {
}
// Non-default (messy)
mtype (int pid, std::string pname, monster_species pspecies, char psym,
nc_color pcolor, m_size psize, material pmat,
nc_color pcolor, m_size psize, std::string pmat,
unsigned int pdiff, signed char pagro,
signed char pmorale, unsigned int pspeed, unsigned char pml_skill,
unsigned char pml_dice, unsigned char pml_sides, unsigned char pml_cut,
+162 -118
View File
@@ -38,7 +38,7 @@ desc))
// PLEASE NOTE: The description is AT MAX 4 lines of 46 characters each.
// FOREST ANIMALS
mon("squirrel", species_mammal, 'r', c_ltgray, MS_TINY, FLESH,
mon("squirrel", species_mammal, 'r', c_ltgray, MS_TINY, "flesh",
// dif agr mor spd msk mdi m## cut dge bsh cut itm HP special freq
0,-99, -8,140, 0, 1, 1, 0, 4, 0, 0, 0, 1, 0,
&mdeath::normal, &mattack::none, "\
@@ -47,7 +47,7 @@ A small woodland animal."
FLAGS(MF_SEES, MF_HEARS, MF_SMELLS, MF_ANIMAL, MF_WARM, MF_FUR, MF_BONES);
CATEGORIES(MC_WILDLIFE);
mon("rabbit", species_mammal, 'r', c_white, MS_TINY, FLESH,
mon("rabbit", species_mammal, 'r', c_white, MS_TINY, "flesh",
// dif agr mor spd msk mdi m## cut dge bsh cut itm HP special freq
0,-99, -7,180, 0, 0, 0, 0, 6, 0, 0, 0, 4, 0,
&mdeath::normal, &mattack::none, "\
@@ -57,7 +57,7 @@ delicious flesh."
FLAGS(MF_SEES, MF_HEARS, MF_SMELLS, MF_ANIMAL, MF_WARM, MF_FUR, MF_BONES);
CATEGORIES(MC_WILDLIFE);
mon("deer", species_mammal, 'd', c_brown, MS_LARGE, FLESH,
mon("deer", species_mammal, 'd', c_brown, MS_LARGE, "flesh",
// dif agr mor spd msk mdi m## cut dge bsh cut itm HP special freq
1,-99, -5,300, 4, 3, 3, 0, 3, 0, 0, 0, 80, 0,
&mdeath::normal, &mattack::none, "\
@@ -66,7 +66,7 @@ A large buck, fast-moving and strong."
FLAGS(MF_SEES, MF_HEARS, MF_SMELLS, MF_ANIMAL, MF_WARM, MF_FUR, MF_BONES);
CATEGORIES(MC_WILDLIFE);
mon("moose", species_mammal, 'M', c_brown, MS_LARGE, FLESH,
mon("moose", species_mammal, 'M', c_brown, MS_LARGE, "flesh",
// dif agr mor spd msk mdi m## cut dge bsh cut itm HP special freq
1,-50, -5,200, 10, 3, 4, 0, 1, 3, 1, 0, 100, 0,
&mdeath::normal, &mattack::none, "\
@@ -75,7 +75,7 @@ A buck of the largest deer species."
FLAGS(MF_SEES, MF_HEARS, MF_SMELLS, MF_ANIMAL, MF_WARM, MF_FUR, MF_BONES);
CATEGORIES(MC_WILDLIFE);
mon("wolf", species_mammal, 'w', c_ltgray, MS_MEDIUM, FLESH,
mon("wolf", species_mammal, 'w', c_ltgray, MS_MEDIUM, "flesh",
// dif agr mor spd msk mdi m## cut dge bsh cut itm HP special freq
12, 0, 20,165, 14, 2, 3, 4, 4, 1, 0, 0, 28, 0,
&mdeath::normal, &mattack::none, "\
@@ -87,7 +87,7 @@ PLACATE(MTRIG_MEAT);
FEARS(MTRIG_FIRE, MTRIG_FRIEND_DIED);
CATEGORIES(MC_WILDLIFE);
mon("coyote", species_mammal, 'w', c_brown, MS_MEDIUM, FLESH,
mon("coyote", species_mammal, 'w', c_brown, MS_MEDIUM, "flesh",
// dif agr mor spd msk mdi m## cut dge bsh cut itm HP special freq
10, 0, 20,155, 12, 2, 3, 2, 3, 1, 0, 0, 22, 0,
&mdeath::normal, &mattack::none, "\
@@ -99,7 +99,7 @@ PLACATE(MTRIG_MEAT);
FEARS(MTRIG_FIRE, MTRIG_FRIEND_DIED);
CATEGORIES(MC_WILDLIFE);
mon("bear", species_mammal, 'B', c_dkgray, MS_LARGE, FLESH,
mon("bear", species_mammal, 'B', c_dkgray, MS_LARGE, "flesh",
// dif agr mor spd msk mdi m## cut dge bsh cut itm HP special freq
10,-10, 40,140, 10, 3, 4, 6, 3, 2, 0, 0, 90, 0,
&mdeath::normal, &mattack::none, "\
@@ -111,7 +111,7 @@ PLACATE(MTRIG_MEAT);
FEARS(MTRIG_FIRE);
CATEGORIES(MC_WILDLIFE);
mon("cougar", species_mammal, 'C', c_brown, MS_MEDIUM, FLESH,
mon("cougar", species_mammal, 'C', c_brown, MS_MEDIUM, "flesh",
// dif agr mor spd msk mdi m## cut dge bsh cut itm HP special freq
12, 0, 20,180, 14, 2, 3, 4, 4, 1, 0, 0, 15, 5,
&mdeath::normal, &mattack::leap, "\
@@ -123,17 +123,17 @@ PLACATE(MTRIG_MEAT);
FEARS(MTRIG_FIRE, MTRIG_FRIEND_DIED);
CATEGORIES(MC_WILDLIFE);
mon("crow", species_mammal, 'v', c_dkgray, MS_TINY, FLESH,
mon("crow", species_mammal, 'v', c_dkgray, MS_TINY, "flesh",
// dif agr mor spd msk mdi m## cut dge bsh cut itm HP special freq
10,-99, -8,140, 0, 1, 1, 0, 4, 0, 0, 0, 1, 0,
&mdeath::normal, &mattack::none, "\
A small woodland animal."
);
FLAGS(MF_SEES, MF_HEARS, MF_SMELLS, MF_ANIMAL, MF_WARM, MF_FLIES, MF_VIS40, MF_BONES);
FLAGS(MF_SEES, MF_HEARS, MF_SMELLS, MF_ANIMAL, MF_WARM, MF_FLIES, MF_VIS40, MF_BONES, MF_FEATHER);
CATEGORIES(MC_WILDLIFE);
// DOMESICATED ANIMALS
mon("dog", species_mammal, 'd', c_white, MS_SMALL, FLESH,
mon("dog", species_mammal, 'd', c_white, MS_SMALL, "flesh",
// dif agr mor spd msk mdi m## cut dge bsh cut itm HP special freq
5, 2, 15,150, 12, 2, 3, 3, 3, 0, 0, 0, 25, 0,
&mdeath::normal, &mattack::none, "\
@@ -145,7 +145,7 @@ PLACATE(MTRIG_MEAT);
FEARS(MTRIG_FIRE);
CATEGORIES(MC_WILDLIFE);
mon("cat", species_mammal, 'c', c_white, MS_TINY, FLESH,
mon("cat", species_mammal, 'c', c_white, MS_TINY, "flesh",
// dif agr mor spd msk mdi m## cut dge bsh cut itm HP special freq
0, -40, 15,150, 12, 1, 3, 2, 4, 0, 0, 0, 10, 0,
&mdeath::normal, &mattack::none, "\
@@ -158,7 +158,7 @@ FEARS(MTRIG_FIRE, MTRIG_SOUND);
CATEGORIES(MC_WILDLIFE);
// INSECTOIDS
mon("ant larva",species_insect, 'a', c_white, MS_SMALL, FLESH,
mon("ant larva",species_insect, 'a', c_white, MS_SMALL, "flesh",
// dif agr mor spd msk mdi m## cut dge bsh cut itm HP special freq
0, -1, 10, 65, 4, 1, 3, 0, 0, 0, 0, 0, 10, 0,
&mdeath::normal, &mattack::none, "\
@@ -167,7 +167,7 @@ of glistening white flesh turns your stomach."
);
FLAGS(MF_SMELLS, MF_POISON);
mon("giant ant",species_insect, 'a', c_brown, MS_MEDIUM, FLESH,
mon("giant ant",species_insect, 'a', c_brown, MS_MEDIUM, "flesh",
// dif agr mor spd msk mdi m## cut dge bsh cut itm HP special freq
7, 15, 60,100, 9, 1, 6, 4, 2, 4, 8,-40, 40, 0,
&mdeath::normal, &mattack::none, "\
@@ -177,7 +177,7 @@ vicious mandibles."
);
FLAGS(MF_SMELLS);
mon("soldier ant",species_insect, 'a', c_blue, MS_MEDIUM, FLESH,
mon("soldier ant",species_insect, 'a', c_blue, MS_MEDIUM, "flesh",
// dif agr mor spd msk mdi m## cut dge bsh cut itm HP special freq
16, 25,100,115, 12, 2, 4, 6, 2, 5, 10,-50, 80, 0,
&mdeath::normal, &mattack::none, "\
@@ -187,7 +187,7 @@ mandibles."
);
FLAGS(MF_SMELLS);
mon("queen ant",species_insect, 'a', c_ltred, MS_LARGE, FLESH,
mon("queen ant",species_insect, 'a', c_ltred, MS_LARGE, "flesh",
// dif agr mor spd msk mdi m## cut dge bsh cut itm HP special freq
13, 0,100, 60, 6, 3, 4, 4, 1, 6, 14,-40,180, 1,
&mdeath::normal, &mattack::antqueen, "\
@@ -198,7 +198,7 @@ still more."
);
FLAGS(MF_SMELLS, MF_QUEEN);
mon("fungal insect",species_fungus, 'a',c_ltgray, MS_MEDIUM, VEGGY,
mon("fungal insect",species_fungus, 'a',c_ltgray, MS_MEDIUM, "veggy",
// dif agr mor spd msk mdi m## cut dge bsh cut itm HP special freq
5, 80,100, 75, 5, 1, 5, 3, 1, 1, 1, 0, 30, 60,
&mdeath::normal, &mattack::fungus, "\
@@ -208,7 +208,7 @@ from every joint on its body."
);
FLAGS(MF_SMELLS, MF_POISON);
mon("giant fly",species_insect, 'a', c_ltgray, MS_SMALL, FLESH,
mon("giant fly",species_insect, 'a', c_ltgray, MS_SMALL, "flesh",
// dif agr mor spd msk mdi m## cut dge bsh cut itm HP special freq
8, 50, 30,120, 3, 1, 3, 0, 5, 0, 0, 0, 25, 0,
&mdeath::normal, &mattack::none, "\
@@ -217,7 +217,7 @@ It buzzes around incessantly."
);
FLAGS(MF_SMELLS, MF_FLIES, MF_STUMBLES, MF_HIT_AND_RUN);
mon("giant bee",species_insect, 'a', c_yellow, MS_SMALL, FLESH,
mon("giant bee",species_insect, 'a', c_yellow, MS_SMALL, "flesh",
// dif agr mor spd msk mdi m## cut dge bsh cut itm HP special freq
15,-10, 50,140, 4, 1, 1, 5, 6, 0, 5,-50, 20, 0,
&mdeath::normal, &mattack::none, "\
@@ -228,7 +228,7 @@ sized sting pointed forward."
FLAGS(MF_SMELLS, MF_VENOM, MF_FLIES, MF_STUMBLES, MF_HIT_AND_RUN);
ANGER(MTRIG_HURT, MTRIG_FRIEND_DIED, MTRIG_PLAYER_CLOSE);
mon("giant wasp",species_insect, 'a', c_red, MS_MEDIUM, FLESH,
mon("giant wasp",species_insect, 'a', c_red, MS_MEDIUM, "flesh",
// dif agr mor spd msk mdi m## cut dge bsh cut itm HP special freq
22, 5, 60,150, 6, 1, 3, 7, 7, 0, 7,-40, 35, 0,
&mdeath::normal, &mattack::none, "\
@@ -240,7 +240,7 @@ ANGER(MTRIG_HURT, MTRIG_FRIEND_DIED, MTRIG_PLAYER_CLOSE, MTRIG_SOUND);
// GIANT WORMS
mon("graboid", species_worm, 'S', c_red, MS_HUGE, FLESH,
mon("graboid", species_worm, 'S', c_red, MS_HUGE, "flesh",
// dif agr mor spd msk mdi m## cut dge bsh cut itm HP special freq
17, 30,120,180, 11, 3, 8, 4, 0, 5, 5, 0,180, 0,
&mdeath::worm, &mattack::none, "\
@@ -251,7 +251,7 @@ enormous body is hidden underground."
);
FLAGS(MF_DIGS, MF_HEARS, MF_GOODHEARING, MF_DESTROYS, MF_WARM, MF_LEATHER);
mon("giant worm",species_worm, 'S', c_pink, MS_LARGE, FLESH,
mon("giant worm",species_worm, 'S', c_pink, MS_LARGE, "flesh",
// dif agr mor spd msk mdi m## cut dge bsh cut itm HP special freq
10, 30,100, 85, 9, 4, 5, 2, 0, 2, 0, 0, 50, 0,
&mdeath::worm, &mattack::none, "\
@@ -262,7 +262,7 @@ large, fanged mouth."
);
FLAGS(MF_DIGS, MF_HEARS, MF_GOODHEARING, MF_WARM, MF_LEATHER);
mon("half worm",species_worm, 's', c_pink, MS_MEDIUM, FLESH,
mon("half worm",species_worm, 's', c_pink, MS_MEDIUM, "flesh",
// dif agr mor spd msk mdi m## cut dge bsh cut itm HP special freq
2, 10, 40, 80, 5, 3, 5, 0, 0, 0, 0, 0, 20, 0,
&mdeath::normal, &mattack::none, "\
@@ -271,7 +271,7 @@ A portion of a giant worm that is still alive."
FLAGS(MF_DIGS, MF_HEARS, MF_GOODHEARING, MF_WARM, MF_LEATHER);
// ZOMBIES
mon("zombie", species_zombie, 'Z', c_ltgreen, MS_MEDIUM, FLESH,
mon("zombie", species_zombie, 'Z', c_ltgreen, MS_MEDIUM, "flesh",
// dif agr mor spd msk mdi m## cut dge bsh cut itm HP special freq
3,100,100, 70, 8, 1, 5, 2, 1, 0, 0, 40, 50, 5,
&mdeath::zombie, &mattack::bite, "\
@@ -282,7 +282,7 @@ rage."
FLAGS(MF_SEES, MF_HEARS, MF_SMELLS, MF_STUMBLES, MF_WARM, MF_BASHES, MF_POISON, MF_BLEED, MF_NO_BREATHE, MF_VIS40);
CATEGORIES(MC_CLASSIC);
mon("zombie cop", species_zombie, 'Z', c_blue, MS_MEDIUM, FLESH,
mon("zombie cop", species_zombie, 'Z', c_blue, MS_MEDIUM, "flesh",
// dif agr mor spd msk mdi m## cut dge bsh cut itm HP special freq
3,100,100, 70, 8, 1, 5, 0, 1, 0, 0, 40, 50, 5,
&mdeath::zombie, &mattack::bite, "\
@@ -293,7 +293,7 @@ up to fight the infection."
FLAGS(MF_SEES, MF_HEARS, MF_SMELLS, MF_STUMBLES, MF_WARM, MF_BASHES, MF_POISON, MF_BLEED, MF_NO_BREATHE, MF_VIS30);
CATEGORIES(MC_CLASSIC);
mon("shrieker zombie",species_zombie, 'Z',c_magenta, MS_MEDIUM, FLESH,
mon("shrieker zombie",species_zombie, 'Z',c_magenta, MS_MEDIUM, "flesh",
// dif agr mor spd msk mdi m## cut dge bsh cut itm HP special freq
10,100,100, 95, 9, 1, 2, 0, 4, 0, 0, 45, 50, 10,
&mdeath::zombie, &mattack::shriek, "\
@@ -302,7 +302,7 @@ a gaping hole from mid-neck up."
);
FLAGS(MF_SEES, MF_HEARS, MF_SMELLS, MF_STUMBLES, MF_WARM, MF_BASHES, MF_POISON, MF_NO_BREATHE, MF_VIS50);
mon("spitter zombie",species_zombie, 'Z',c_yellow, MS_MEDIUM, FLESH,
mon("spitter zombie",species_zombie, 'Z',c_yellow, MS_MEDIUM, "flesh",
// dif agr mor spd msk mdi m## cut dge bsh cut itm HP special freq
9,100,100,105, 8, 1, 5, 0, 4, 0, 0, 30, 60, 20,
&mdeath::acid, &mattack::acid, "\
@@ -313,7 +313,7 @@ yellow fluid."
FLAGS(MF_SEES, MF_HEARS, MF_SMELLS, MF_STUMBLES, MF_WARM, MF_BASHES, MF_POISON,
MF_ACIDPROOF, MF_NO_BREATHE, MF_VIS40);
mon("shocker zombie",species_zombie,'Z',c_ltcyan, MS_MEDIUM, FLESH,
mon("shocker zombie",species_zombie,'Z',c_ltcyan, MS_MEDIUM, "flesh",
// dif agr mor spd msk mdi m## cut dge bsh cut itm HP special freq
10,100,100,110, 8, 1, 6, 0, 4, 0, 0, 40, 65, 25,
&mdeath::zombie, &mattack::shockstorm, "\
@@ -324,7 +324,7 @@ lightning."
FLAGS(MF_SEES, MF_HEARS, MF_SMELLS, MF_STUMBLES, MF_WARM, MF_BASHES, MF_POISON,
MF_ELECTRIC, MF_CBM, MF_NO_BREATHE, MF_VIS40);
mon("smoker zombie",species_zombie,'Z',c_ltgray, MS_MEDIUM, FLESH,
mon("smoker zombie",species_zombie,'Z',c_ltgray, MS_MEDIUM, "flesh",
// dif agr mor spd msk mdi m## cut dge bsh cut itm HP special freq
10,100,100,110, 8, 1, 6, 0, 4, 0, 0, 0, 65, 1,
&mdeath::smokeburst, &mattack::smokecloud, "\
@@ -334,7 +334,7 @@ thick, obfuscating smoke."
FLAGS(MF_SEES, MF_HEARS, MF_SMELLS, MF_STUMBLES, MF_WARM, MF_BASHES, MF_POISON,
MF_HARDTOSHOOT, MF_FRIENDLY_SPECIAL, MF_NO_BREATHE, MF_VIS40);
mon("zombie dog",species_zombie, 'd', c_ltgreen, MS_MEDIUM, FLESH,
mon("zombie dog",species_zombie, 'd', c_ltgreen, MS_MEDIUM, "flesh",
// dif agr mor spd msk mdi m## cut dge bsh cut itm HP special freq
12,100,100,150, 10, 1, 4, 3, 4, 0, 0, 0, 40, 5,
&mdeath::normal, &mattack::bite, "\
@@ -346,7 +346,7 @@ FLAGS(MF_SEES, MF_HEARS, MF_SMELLS, MF_STUMBLES, MF_WARM, MF_BASHES, MF_POISON,
MF_HIT_AND_RUN, MF_NO_BREATHE, MF_VIS50);
CATEGORIES(MC_CLASSIC);
mon("zombie brute",species_zombie, 'Z', c_red, MS_MEDIUM, FLESH,
mon("zombie brute",species_zombie, 'Z', c_red, MS_MEDIUM, "flesh",
// dif agr mor spd msk mdi m## cut dge bsh cut itm HP special freq
25,100,100,115, 9, 4, 4, 2, 0, 6, 3, 60, 80, 5,
&mdeath::zombie, &mattack::bite, "\
@@ -355,7 +355,7 @@ distended muscles on both arms and legs."
);
FLAGS(MF_SEES, MF_HEARS, MF_SMELLS, MF_STUMBLES, MF_WARM, MF_BASHES, MF_POISON, MF_NO_BREATHE, MF_VIS40);
mon("zombie hulk",species_zombie, 'Z', c_blue, MS_HUGE, FLESH,
mon("zombie hulk",species_zombie, 'Z', c_ltred, MS_HUGE, "flesh",
// dif agr mor spd msk mdi m## cut dge bsh cut itm HP special freq
50,100,100,130, 9, 4, 8, 0, 0, 12, 8, 80,260, 0,
&mdeath::zombie, &mattack::none, "\
@@ -365,7 +365,7 @@ A zombie that has somehow grown to the size of\n\
FLAGS(MF_SEES, MF_HEARS, MF_SMELLS, MF_STUMBLES, MF_WARM, MF_BASHES,
MF_DESTROYS, MF_POISON, MF_ATTACKMON, MF_LEATHER, MF_NO_BREATHE, MF_VIS50);
mon("fungal zombie",species_fungus, 'Z',c_ltgray, MS_MEDIUM, FLESH,
mon("fungal zombie",species_fungus, 'Z',c_ltgray, MS_MEDIUM, "flesh",
// dif agr mor spd msk mdi m## cut dge bsh cut itm HP special freq
6,100,100, 45, 6, 1, 6, 0, 0, 0, 0, 20, 40, 50,
&mdeath::zombie, &mattack::fungus, "\
@@ -375,7 +375,7 @@ over its translucent flesh."
);
FLAGS(MF_SEES, MF_HEARS, MF_SMELLS, MF_STUMBLES, MF_WARM, MF_BASHES, MF_POISON, MF_NO_BREATHE, MF_VIS30);
mon("boomer", species_zombie, 'Z', c_pink, MS_LARGE, FLESH,
mon("boomer", species_zombie, 'Z', c_pink, MS_LARGE, "flesh",
// dif agr mor spd msk mdi m## cut dge bsh cut itm HP special freq
5,100,100, 55, 7, 2, 4, 0, 1, 3, 0, 35, 40, 20,
&mdeath::boomer, &mattack::boomer, "\
@@ -385,7 +385,7 @@ from its mouth."
);
FLAGS(MF_SEES, MF_HEARS, MF_SMELLS, MF_STUMBLES, MF_WARM, MF_BASHES, MF_POISON, MF_NO_BREATHE, MF_VIS40);
mon("fungal boomer",species_fungus, 'B',c_ltgray, MS_LARGE, FLESH,
mon("fungal boomer",species_fungus, 'B',c_ltgray, MS_LARGE, "flesh",
// dif agr mor spd msk mdi m## cut dge bsh cut itm HP special freq
7,100,100, 40, 5, 2, 6, 0, 0, 3, 0, 20, 20, 30,
&mdeath::fungus, &mattack::fungus, "\
@@ -395,7 +395,7 @@ and it dribbles a gray sludge from its mouth."
);
FLAGS(MF_SEES, MF_HEARS, MF_SMELLS, MF_STUMBLES, MF_WARM, MF_BASHES, MF_POISON, MF_NO_BREATHE, MF_VIS30);
mon("skeleton", species_zombie, 'Z', c_white, MS_MEDIUM, STONE,
mon("skeleton", species_zombie, 'Z', c_white, MS_MEDIUM, "stone",
// dif agr mor spd msk mdi m## cut dge bsh cut itm HP special freq
8,100,100, 90, 10, 1, 5, 3, 2, 0, 15, 0, 40, 5,
&mdeath::zombie, &mattack::bite, "\
@@ -405,7 +405,7 @@ motion."
);
FLAGS(MF_SEES, MF_HEARS, MF_BLEED, MF_HARDTOSHOOT, MF_NO_BREATHE, MF_VIS30);
mon("zombie necromancer",species_zombie, 'Z',c_dkgray, MS_MEDIUM, FLESH,
mon("zombie necromancer",species_zombie, 'Z',c_dkgray, MS_MEDIUM, "flesh",
// dif agr mor spd msk mdi m## cut dge bsh cut itm HP special freq
13, 0,100,100, 4, 2, 3, 0, 4, 0, 0, 50,140, 4,
&mdeath::zombie, &mattack::resurrect, "\
@@ -416,7 +416,7 @@ feeling of dread and terror."
FLAGS(MF_SEES, MF_HEARS, MF_SMELLS, MF_STUMBLES, MF_WARM, MF_BASHES, MF_POISON, MF_NO_BREATHE, MF_NO_BREATHE, MF_VIS50);
ANGER(MTRIG_HURT, MTRIG_PLAYER_WEAK);
mon("zombie scientist",species_zombie, 'Z',c_ltgray, MS_MEDIUM, FLESH,
mon("zombie scientist",species_zombie, 'Z',c_ltgray, MS_MEDIUM, "flesh",
// dif agr mor spd msk mdi m## cut dge bsh cut itm HP special freq
3,100,100, 75, 7, 1, 3, 0, 1, 0, 0, 50, 35, 20,
&mdeath::zombie, &mattack::science, "\
@@ -427,7 +427,7 @@ than most zombies, but more resourceful too."
FLAGS(MF_SEES, MF_HEARS, MF_SMELLS, MF_STUMBLES, MF_WARM, MF_BASHES, MF_POISON, MF_BLEED,
MF_ACIDPROOF, MF_NO_BREATHE, MF_VIS50);
mon("zombie soldier", species_zombie, 'Z',c_ltblue, MS_MEDIUM, FLESH,
mon("zombie soldier", species_zombie, 'Z',c_ltblue, MS_MEDIUM, "flesh",
// dif agr mor spd msk mdi m## cut dge bsh cut itm HP special freq
20,100,100, 80, 12, 2, 4, 0, 0, 8, 16, 60,100, 5,
&mdeath::zombie, &mattack::bite, "\
@@ -439,7 +439,7 @@ most zombies."
FLAGS(MF_SEES, MF_HEARS, MF_SMELLS, MF_WARM, MF_BASHES, MF_POISON, MF_BLEED, MF_NO_BREATHE, MF_VIS30);
CATEGORIES(MC_CLASSIC);
mon("grabber zombie", species_zombie, 'Z',c_green, MS_MEDIUM, FLESH,
mon("grabber zombie", species_zombie, 'Z',c_green, MS_MEDIUM, "flesh",
// dif agr mor spd msk mdi m## cut dge bsh cut itm HP special freq
8,100,100, 70, 10, 1, 2, 0, 4, 0, 0, 40, 65, 0,
&mdeath::zombie, &mattack::none, "\
@@ -450,7 +450,7 @@ at its surroundings as it moves."
FLAGS(MF_SEES, MF_HEARS, MF_SMELLS, MF_STUMBLES, MF_WARM, MF_BASHES, MF_POISON, MF_BLEED,
MF_GRABS, MF_NO_BREATHE, MF_VIS30);
mon("master zombie", species_zombie, 'M',c_yellow, MS_MEDIUM, FLESH,
mon("master zombie", species_zombie, 'M',c_yellow, MS_MEDIUM, "flesh",
// dif agr mor spd msk mdi m## cut dge bsh cut itm HP special freq
16, 5,100, 90, 4, 1, 3, 0, 4, 0, 0, 60,120, 3,
&mdeath::zombie, &mattack::upgrade, "\
@@ -461,7 +461,7 @@ a better grasp of movement than most..."
FLAGS(MF_SEES, MF_HEARS, MF_SMELLS, MF_WARM, MF_BASHES, MF_POISON, MF_NO_BREATHE, MF_VIS50);
ANGER(MTRIG_HURT, MTRIG_PLAYER_WEAK);
mon("scarred zombie", species_zombie, 'Z', c_yellow, MS_MEDIUM, FLESH,
mon("scarred zombie", species_zombie, 'Z', c_yellow, MS_MEDIUM, "flesh",
// dif agr mor spd msk mdi m## cut dge bsh cut itm HP special freq
3,100,100, 40, 8, 1, 5, 0, 1, 12, 8, 20, 25, 0,
&mdeath::zombie, &mattack::none, "\
@@ -472,7 +472,7 @@ but moves a bit slower"
);
FLAGS(MF_SEES, MF_HEARS, MF_SMELLS, MF_STUMBLES, MF_WARM, MF_BASHES, MF_POISON, MF_NO_BREATHE, MF_VIS30);
mon("child zombie",species_zombie, 'z', c_ltgreen, MS_SMALL, FLESH,
mon("child zombie",species_zombie, 'z', c_ltgreen, MS_SMALL, "flesh",
// dif agr mor spd msk mdi m## cut dge bsh cut itm HP special freq
2, 65,100, 70, 8, 1, 3, 2, 2, 0, 0, 20, 25, 0,
&mdeath::zombie, &mattack::none, "\
@@ -484,7 +484,7 @@ FLAGS(MF_SEES, MF_HEARS, MF_SMELLS, MF_STUMBLES, MF_WARM, MF_BASHES, MF_BLEED,
CATEGORIES(MC_CLASSIC);
//Somewhere between a zombie and a blob creature
mon("jabberwock", species_none, 'J', c_dkgray_red, MS_HUGE, FLESH,
mon("jabberwock", species_none, 'J', c_dkgray_red, MS_HUGE, "flesh",
// dif agr mor spd msk mdi m## cut dge bsh cut itm HP special freq
50,100,100,140, 9, 4, 8, 3, 3, 12, 8, 0,400, 0,
&mdeath::normal, &mattack::flesh_golem, "\
@@ -497,7 +497,7 @@ FLAGS(MF_SEES, MF_HEARS, MF_SMELLS, MF_STUMBLES, MF_WARM, MF_BASHES,
MF_DESTROYS, MF_ATTACKMON, MF_LEATHER, MF_BONES, MF_VIS50);
// PLANTS & FUNGI
mon("triffid", species_plant, 'F', c_ltgreen, MS_MEDIUM, VEGGY,
mon("triffid", species_plant, 'F', c_ltgreen, MS_MEDIUM, "veggy",
// dif agr mor spd msk mdi m## cut dge bsh cut itm HP special freq
16, 20,100, 75, 9, 2, 4, 5, 0, 10, 2, 0, 80, 0,
&mdeath::normal, &mattack::none, "\
@@ -508,7 +508,7 @@ sting within."
);
FLAGS(MF_HEARS, MF_SMELLS, MF_BASHES, MF_NOHEAD);
mon("young triffid",species_plant, 'f', c_ltgreen, MS_SMALL, VEGGY,
mon("young triffid",species_plant, 'f', c_ltgreen, MS_SMALL, "veggy",
// dif agr mor spd msk mdi m## cut dge bsh cut itm HP special freq
2, 0, 10, 65, 7, 1, 4, 3, 0, 0, 0, 0, 40, 0,
&mdeath::normal, &mattack::none, "\
@@ -518,7 +518,7 @@ is still sharp and deadly."
);
FLAGS(MF_HEARS, MF_SMELLS, MF_NOHEAD);
mon("queen triffid",species_plant, 'F', c_red, MS_LARGE, VEGGY,
mon("queen triffid",species_plant, 'F', c_red, MS_LARGE, "veggy",
// dif agr mor spd msk mdi m## cut dge bsh cut itm HP special freq
28,100,200, 85, 14, 2, 7, 8, 0, 10, 4, 0,280, 2,
&mdeath::normal, &mattack::growplants, "\
@@ -529,7 +529,7 @@ and immediately takes root."
);
FLAGS(MF_HEARS, MF_SMELLS, MF_BASHES, MF_NOHEAD);
mon("creeper hub",species_plant, 'V', c_dkgray, MS_MEDIUM, VEGGY,
mon("creeper hub",species_plant, 'V', c_dkgray, MS_MEDIUM, "veggy",
// dif agr mor spd msk mdi m## cut dge bsh cut itm HP special freq
16,100,100,100, 0, 0, 0, 0, 0, 8, 0, 0,100, 2,
&mdeath::kill_vines, &mattack::grow_vine, "\
@@ -539,7 +539,7 @@ directions."
);
FLAGS(MF_NOHEAD, MF_IMMOBILE);
mon("creeping vine",species_plant, 'v', c_green, MS_TINY, VEGGY,
mon("creeping vine",species_plant, 'v', c_green, MS_TINY, "veggy",
// dif agr mor spd msk mdi m## cut dge bsh cut itm HP special freq
4,100,100, 75, 0, 0, 0, 0, 0, 2, 0, 0, 2, 2,
&mdeath::vine_cut, &mattack::vine, "\
@@ -548,7 +548,7 @@ it grows, spreading rapidly."
);
FLAGS(MF_NOHEAD, MF_HARDTOSHOOT, MF_PLASTIC, MF_IMMOBILE);
mon("biollante",species_plant, 'F', c_magenta, MS_LARGE, VEGGY,
mon("biollante",species_plant, 'F', c_magenta, MS_LARGE, "veggy",
// dif agr mor spd msk mdi m## cut dge bsh cut itm HP special freq
20,100,100,100, 0, 0, 0, 0, 0, 0, 0,-80,120, 2,
&mdeath::normal, &mattack::spit_sap, "\
@@ -558,7 +558,7 @@ and pulsate ominously."
);
FLAGS(MF_NOHEAD, MF_IMMOBILE);
mon("vinebeast",species_plant, 'V', c_red, MS_LARGE, VEGGY,
mon("vinebeast",species_plant, 'V', c_red, MS_LARGE, "veggy",
// dif agr mor spd msk mdi m## cut dge bsh cut itm HP special freq
14, 60, 40, 75, 15, 2, 4, 2, 4, 10, 0, 0,100, 0,
&mdeath::normal, &mattack::none, "\
@@ -570,7 +570,7 @@ the middle."
FLAGS(MF_HEARS, MF_GOODHEARING, MF_NOHEAD, MF_HARDTOSHOOT, MF_GRABS,
MF_SWIMS, MF_PLASTIC);
mon("triffid heart",species_plant, 'T', c_red, MS_HUGE, VEGGY,
mon("triffid heart",species_plant, 'T', c_red, MS_HUGE, "veggy",
// dif agr mor spd msk mdi m## cut dge bsh cut itm HP special freq
45,100,100,100, 0, 0, 0, 0, 0, 14, 4, 0,300, 5,
&mdeath::triffid_heart, &mattack::triffid_heartbeat, "\
@@ -580,7 +580,7 @@ the root walls around it."
);
FLAGS(MF_NOHEAD, MF_IMMOBILE, MF_QUEEN);
mon("fungaloid",species_fungus, 'F', c_ltgray, MS_MEDIUM, VEGGY,
mon("fungaloid",species_fungus, 'F', c_ltgray, MS_MEDIUM, "veggy",
// dif agr mor spd msk mdi m## cut dge bsh cut itm HP special freq
12, 0,100, 45, 8, 3, 3, 0, 0, 4, 0, 0, 80, 200,
&mdeath::fungus, &mattack::fungus, "\
@@ -593,7 +593,7 @@ ANGER(MTRIG_PLAYER_CLOSE, MTRIG_PLAYER_WEAK);
FLAGS(MF_HEARS, MF_SMELLS, MF_POISON, MF_NO_BREATHE, MF_NOHEAD);
// This is a "dormant" fungaloid that doesn't waste CPU cycles ;)
mon("fungaloid",species_fungus, 'F', c_ltgray, MS_MEDIUM, VEGGY,
mon("fungaloid",species_fungus, 'F', c_ltgray, MS_MEDIUM, "veggy",
// dif agr mor spd msk mdi m## cut dge bsh cut itm HP special freq
0, 0,100, 1, 8, 2, 4, 0, 0, 4, 0, 0, 1, 0,
&mdeath::fungusawake, &mattack::none, "\
@@ -604,7 +604,7 @@ mobility and a weak attack."
);
FLAGS(MF_HEARS, MF_SMELLS, MF_POISON, MF_NO_BREATHE, MF_NOHEAD);
mon("young fungaloid",species_fungus, 'f',c_ltgray, MS_SMALL, VEGGY,
mon("young fungaloid",species_fungus, 'f',c_ltgray, MS_SMALL, "veggy",
// dif agr mor spd msk mdi m## cut dge bsh cut itm HP special freq
6,100,100, 65, 8, 1, 4, 6, 0, 4, 4, 0, 70, 0,
&mdeath::normal, &mattack::none, "\
@@ -615,7 +615,7 @@ full-grown fungaloids."
);
FLAGS(MF_HEARS, MF_SMELLS, MF_POISON, MF_NO_BREATHE, MF_NOHEAD);
mon("spore", species_fungus, 'o', c_ltgray, MS_TINY, VEGGY,
mon("spore", species_fungus, 'o', c_ltgray, MS_TINY, "veggy",
// dif agr mor spd msk mdi m## cut dge bsh cut itm HP special freq
1,-50,100,100, 0, 0, 0, 0, 6, 0, 0, 0, 5, 50,
&mdeath::disintegrate, &mattack::plant, "\
@@ -624,7 +624,7 @@ wafting on the breeze."
);
FLAGS(MF_STUMBLES, MF_FLIES, MF_POISON, MF_NO_BREATHE, MF_NOHEAD);
mon("fungal spire",species_fungus, 'T', c_ltgray, MS_HUGE, STONE,
mon("fungal spire",species_fungus, 'T', c_ltgray, MS_HUGE, "stone",
// dif agr mor spd msk mdi m## cut dge bsh cut itm HP special freq
40,100,100,100, 0, 0, 0, 0, 0, 10, 10, 0,300, 5,
&mdeath::fungus, &mattack::fungus_sprout, "\
@@ -634,7 +634,7 @@ continuously growing new defenses."
);
FLAGS(MF_NOHEAD, MF_POISON, MF_IMMOBILE, MF_NO_BREATHE, MF_QUEEN);
mon("fungal wall",species_fungus, 'F', c_dkgray, MS_HUGE, VEGGY,
mon("fungal wall",species_fungus, 'F', c_dkgray, MS_HUGE, "veggy",
// dif agr mor spd msk mdi m## cut dge bsh cut itm HP special freq
5,100,100,100, 0, 0, 0, 0, 0, 10, 10, 0, 10, 8,
&mdeath::disintegrate, &mattack::fungus, "\
@@ -646,7 +646,7 @@ alarming rate."
FLAGS(MF_NOHEAD, MF_POISON, MF_NO_BREATHE, MF_IMMOBILE);
// BLOBS & SLIMES &c
mon("blob", species_nether, 'O', c_dkgray, MS_MEDIUM, MNULL,
mon("blob", species_nether, 'O', c_dkgray, MS_MEDIUM, "null",
// dif agr mor spd msk mdi m## cut dge bsh cut itm HP special freq
19,100,100, 85, 9, 2, 4, 0, 0, 6, 0, 0, 85, 30,
&mdeath::blobsplit, &mattack::formblob, "\
@@ -657,7 +657,7 @@ oil."
FLAGS(MF_SMELLS, MF_HEARS, MF_GOODHEARING, MF_NOHEAD, MF_POISON, MF_NO_BREATHE, MF_ACIDPROOF);
mtypes[mon_blob]->phase = LIQUID;
mon("small blob",species_nether, 'o', c_dkgray, MS_SMALL, MNULL,
mon("small blob",species_nether, 'o', c_dkgray, MS_SMALL, "null",
// dif agr mor spd msk mdi m## cut dge bsh cut itm HP special freq
2,100,100, 50, 6, 1, 4, 0, 0, 2, 0, 0, 50, 0,
&mdeath::blobsplit, &mattack::none, "\
@@ -669,7 +669,7 @@ FLAGS(MF_SMELLS, MF_HEARS, MF_GOODHEARING, MF_NOHEAD, MF_POISON, MF_NO_BREATHE,
mtypes[mon_blob_small]->phase = LIQUID;
// CHUDS & SUBWAY DWELLERS
mon("C.H.U.D.", species_none, 'S', c_ltgray, MS_MEDIUM, FLESH,
mon("C.H.U.D.", species_none, 'S', c_ltgray, MS_MEDIUM, "flesh",
// dif agr mor spd msk mdi m## cut dge bsh cut itm HP special freq
8, 30, 30,110, 10, 1, 5, 0, 3, 0, 0, 25, 60, 0,
&mdeath::normal, &mattack::none, "\
@@ -680,7 +680,7 @@ the subways."
FLAGS(MF_SEES, MF_HEARS, MF_WARM, MF_BASHES, MF_HUMAN, MF_VIS40, MF_BONES);
FEARS(MTRIG_HURT, MTRIG_FIRE);
mon("one-eyed mutant",species_none, 'S',c_ltred, MS_MEDIUM, FLESH,
mon("one-eyed mutant",species_none, 'S',c_ltred, MS_MEDIUM, "flesh",
// dif agr mor spd msk mdi m## cut dge bsh cut itm HP special freq
18, 30, 30,130, 20, 2, 4, 0, 5, 0, 0, 40, 80, 0,
&mdeath::normal, &mattack::none, "\
@@ -690,7 +690,7 @@ hair and a grapefruit-sized bloodshot eye."
FLAGS(MF_SEES, MF_HEARS, MF_WARM, MF_BASHES, MF_HUMAN, MF_BONES);
FEARS(MTRIG_HURT, MTRIG_FIRE);
mon("crawler mutant",species_none, 'S', c_red, MS_LARGE, FLESH,
mon("crawler mutant",species_none, 'S', c_red, MS_LARGE, "flesh",
// dif agr mor spd msk mdi m## cut dge bsh cut itm HP special freq
16, 40, 40, 80, 10, 2, 6, 0, 1, 8, 0, 0,180, 0,
&mdeath::normal, &mattack::none, "\
@@ -701,7 +701,7 @@ body across the ground."
FLAGS(MF_SEES, MF_HEARS, MF_SMELLS, MF_WARM, MF_BASHES, MF_POISON, MF_HUMAN, MF_VIS40, MF_BONES);
FEARS(MTRIG_HURT, MTRIG_FIRE);
mon("sewer fish",species_none, 's', c_ltgreen, MS_SMALL, FLESH,
mon("sewer fish",species_none, 's', c_ltgreen, MS_SMALL, "flesh",
// dif agr mor spd msk mdi m## cut dge bsh cut itm HP special freq
13,100,100,120, 17, 1, 3, 3, 6, 0, 0, 0, 20, 0,
&mdeath::normal, &mattack::none, "\
@@ -711,7 +711,7 @@ three rows of razor-sharp teeth."
FLAGS(MF_SEES, MF_SMELLS, MF_WARM, MF_AQUATIC, MF_VIS30, MF_BONES);
FEARS(MTRIG_HURT);
mon("sewer snake",species_none, 's', c_yellow, MS_SMALL, FLESH,
mon("sewer snake",species_none, 's', c_yellow, MS_SMALL, "flesh",
// dif agr mor spd msk mdi m## cut dge bsh cut itm HP special freq
2, 20, 40, 60, 12, 1, 2, 5, 1, 0, 0, 0, 10, 0,
&mdeath::normal, &mattack::none, "\
@@ -721,7 +721,7 @@ underground life."
FLAGS(MF_SEES, MF_SMELLS, MF_WARM, MF_VENOM, MF_SWIMS, MF_LEATHER, MF_VIS30, MF_BONES);
FEARS(MTRIG_HURT);
mon("sewer rat",species_mammal, 's', c_dkgray, MS_SMALL, FLESH,
mon("sewer rat",species_mammal, 's', c_dkgray, MS_SMALL, "flesh",
// dif agr mor spd msk mdi m## cut dge bsh cut itm HP special freq
3, 20, 40,105, 10, 1, 2, 1, 2, 0, 0, 0, 10, 0,
&mdeath::normal, &mattack::none, "\
@@ -731,7 +731,7 @@ hungrily."
);
FLAGS(MF_SEES, MF_SMELLS, MF_HEARS, MF_WARM, MF_SWIMS, MF_ANIMAL, MF_FUR, MF_VIS40, MF_BONES);
mon("rat king",species_mammal, 'S', c_dkgray, MS_MEDIUM, FLESH,
mon("rat king",species_mammal, 'S', c_dkgray, MS_MEDIUM, "flesh",
// dif agr mor spd msk mdi m## cut dge bsh cut itm HP special freq
18, 10,100, 40, 4, 1, 3, 1, 0, 0, 0, 0,220, 3,
&mdeath::ratking, &mattack::ratking, "\
@@ -741,7 +741,7 @@ of nausea washes over you in its presence."
);
// SWAMP CREATURES
mon("giant mosquito",species_insect, 'y',c_ltgray, MS_SMALL, FLESH,
mon("giant mosquito",species_insect, 'y',c_ltgray, MS_SMALL, "flesh",
// dif agr mor spd msk mdi m## cut dge bsh cut itm HP special freq
12, 20, 20,120, 8, 1, 1, 1, 5, 0, 0, 0, 20, 0,
&mdeath::normal, &mattack::none, "\
@@ -751,7 +751,7 @@ proboscis."
);
FLAGS(MF_SMELLS, MF_HEARS, MF_STUMBLES, MF_VENOM, MF_FLIES, MF_HIT_AND_RUN);
mon("giant dragonfly",species_insect, 'y',c_ltgreen, MS_SMALL, FLESH,
mon("giant dragonfly",species_insect, 'y',c_ltgreen, MS_SMALL, "flesh",
// dif agr mor spd msk mdi m## cut dge bsh cut itm HP special freq
13, 20,100,155, 12, 1, 3, 6, 5, 0, 6,-20, 70, 0,
&mdeath::normal, &mattack::none, "\
@@ -760,7 +760,7 @@ through the air, its mouth a cluster of fangs."
);
FLAGS(MF_SEES, MF_SMELLS, MF_FLIES, MF_HIT_AND_RUN, MF_VIS40);
mon("giant centipede",species_insect, 'a',c_ltgreen, MS_MEDIUM, FLESH,
mon("giant centipede",species_insect, 'a',c_ltgreen, MS_MEDIUM, "flesh",
// dif agr mor spd msk mdi m## cut dge bsh cut itm HP special freq
9, 20,100,120, 10, 1, 3, 5, 2, 0, 8,-30, 60, 0,
&mdeath::normal, &mattack::none, "\
@@ -770,7 +770,7 @@ pincers attached to its head."
);
FLAGS(MF_SMELLS, MF_HEARS, MF_POISON, MF_VENOM);
mon("giant frog",species_none, 'F', c_green, MS_LARGE, FLESH,
mon("giant frog",species_none, 'F', c_green, MS_LARGE, "flesh",
// dif agr mor spd msk mdi m## cut dge bsh cut itm HP special freq
10, 10,100, 90, 8, 2, 3, 0, 2, 4, 0, 0, 70, 5,
&mdeath::normal, &mattack::leap, "\
@@ -780,7 +780,7 @@ much as you imagine it might eye an insect."
FLAGS(MF_SEES, MF_SMELLS, MF_HEARS, MF_SWIMS, MF_LEATHER, MF_VIS40, MF_BONES);
FEARS(MTRIG_HURT);
mon("giant slug",species_none, 'S', c_yellow, MS_HUGE, FLESH,
mon("giant slug",species_none, 'S', c_yellow, MS_HUGE, "flesh",
// dif agr mor spd msk mdi m## cut dge bsh cut itm HP special freq
16, 20,100, 60, 7, 1, 5, 1, 0, 8, 2, 0,190, 10,
&mdeath::normal, &mattack::acid, "\
@@ -791,7 +791,7 @@ its fang-lined mouth."
FLAGS(MF_SEES, MF_SMELLS, MF_BASHES, MF_ACIDPROOF, MF_ACIDTRAIL, MF_VIS30);
FEARS(MTRIG_HURT, MTRIG_PLAYER_CLOSE);
mon("dermatik larva",species_insect, 'i',c_white, MS_TINY, FLESH,
mon("dermatik larva",species_insect, 'i',c_white, MS_TINY, "flesh",
// dif agr mor spd msk mdi m## cut dge bsh cut itm HP special freq
4,-20,-20, 20, 1, 1, 2, 2, 1, 0, 0, 0, 10, 0,
&mdeath::normal, &mattack::none, "\
@@ -801,7 +801,7 @@ digging than fighting."
);
FLAGS(MF_HEARS, MF_SMELLS, MF_POISON, MF_DIGS);
mon("dermatik", species_insect, 'i', c_red, MS_TINY, FLESH,
mon("dermatik", species_insect, 'i', c_red, MS_TINY, "flesh",
// dif agr mor spd msk mdi m## cut dge bsh cut itm HP special freq
18, 30, 30,100, 5, 1, 1, 6, 7, 0, 6, 0, 60, 50,
&mdeath::normal, &mattack::dermatik, "\
@@ -813,7 +813,7 @@ place of a sting."
FLAGS(MF_HEARS, MF_SMELLS, MF_STUMBLES, MF_POISON, MF_FLIES);
// SPIDERS
mon("wolf spider",species_insect, 's', c_brown, MS_MEDIUM, FLESH,
mon("wolf spider",species_insect, 's', c_brown, MS_MEDIUM, "flesh",
// dif agr mor spd msk mdi m## cut dge bsh cut itm HP special freq
20, 20,100,110, 7, 1, 1, 8, 6, 2, 8,-70, 40, 0,
&mdeath::normal, &mattack::none, "\
@@ -822,7 +822,7 @@ and aggresively."
);
FLAGS(MF_SMELLS, MF_HEARS, MF_VENOM);
mon("web spider",species_insect, 's', c_yellow, MS_SMALL, FLESH,
mon("web spider",species_insect, 's', c_yellow, MS_SMALL, "flesh",
// dif agr mor spd msk mdi m## cut dge bsh cut itm HP special freq
16, 30, 80,120, 5, 1, 1, 7, 5, 2, 7,-70, 35, 0,
&mdeath::normal, &mattack::none, "\
@@ -832,7 +832,7 @@ entangled before pouncing and biting."
);
FLAGS(MF_SMELLS, MF_HEARS, MF_VENOM, MF_WEBWALK);
mon("jumping spider",species_insect, 's',c_white, MS_SMALL, FLESH,
mon("jumping spider",species_insect, 's',c_white, MS_SMALL, "flesh",
// dif agr mor spd msk mdi m## cut dge bsh cut itm HP special freq
14, 40, 80,100, 7, 1, 1, 4, 8, 0, 3,-60, 30, 2,
&mdeath::normal, &mattack::leap, "\
@@ -843,7 +843,7 @@ another."
);
FLAGS(MF_SMELLS, MF_HEARS, MF_VENOM, MF_HIT_AND_RUN);
mon("trap door spider",species_insect, 's',c_blue, MS_MEDIUM, FLESH,
mon("trap door spider",species_insect, 's',c_blue, MS_MEDIUM, "flesh",
// dif agr mor spd msk mdi m## cut dge bsh cut itm HP special freq
20, 60,100,110, 5, 1, 2, 7, 3, 2, 8,-80, 70, 0,
&mdeath::normal, &mattack::none, "\
@@ -854,7 +854,7 @@ in its webs."
);
FLAGS(MF_SMELLS, MF_HEARS, MF_VENOM, MF_WEBWALK);
mon("black widow",species_insect, 's', c_dkgray, MS_SMALL, FLESH,
mon("black widow",species_insect, 's', c_dkgray, MS_SMALL, "flesh",
// dif agr mor spd msk mdi m## cut dge bsh cut itm HP special freq
20,-10,100, 90, 6, 1, 1, 6, 3, 0, 3,-50, 40, 0,
&mdeath::normal, &mattack::none, "\
@@ -866,7 +866,7 @@ FLAGS(MF_SMELLS, MF_HEARS, MF_BADVENOM, MF_WEBWALK);
ANGER(MTRIG_PLAYER_WEAK, MTRIG_PLAYER_CLOSE, MTRIG_HURT);
// UNEARTHED HORRORS
mon("dark wyrm",species_none, 'S', c_blue, MS_LARGE, FLESH,
mon("dark wyrm",species_none, 'S', c_blue, MS_LARGE, "flesh",
// dif agr mor spd msk mdi m## cut dge bsh cut itm HP special freq
20,100,100,100, 8, 2, 6, 4, 4, 6, 0, 0,120, 0,
&mdeath::normal, &mattack::none, "\
@@ -877,7 +877,7 @@ round mouth lined with dagger-like teeth."
FLAGS(MF_SMELLS, MF_HEARS, MF_GOODHEARING, MF_DESTROYS, MF_POISON, MF_SUNDEATH,
MF_ACIDPROOF, MF_ACIDTRAIL);
mon("Amigara horror",species_none, 'H', c_white, MS_LARGE, FLESH,
mon("Amigara horror",species_none, 'H', c_white, MS_LARGE, "flesh",
// dif agr mor spd msk mdi m## cut dge bsh cut itm HP special freq
30,100,100, 70, 10, 2, 4, 0, 2, 0, 0, 0,250, 0,
&mdeath::amigara, &mattack::fear_paralyze, "\
@@ -889,7 +889,7 @@ distorted to the point of being tentacles."
FLAGS(MF_SMELLS, MF_HEARS, MF_SEES, MF_STUMBLES, MF_HARDTOSHOOT);
// This "dog" is, in fact, a disguised Thing
mon("dog", species_nether, 'd', c_white, MS_SMALL, FLESH,
mon("dog", species_nether, 'd', c_white, MS_SMALL, "flesh",
// dif agr mor spd msk mdi m## cut dge bsh cut itm HP special freq
5,100,100,150, 12, 2, 3, 3, 3, 0, 0, 0, 25, 40,
&mdeath::thing, &mattack::dogthing, "\
@@ -898,7 +898,7 @@ A medium-sized domesticated dog, gone feral."
FLAGS(MF_SEES, MF_SMELLS, MF_HEARS, MF_ANIMAL, MF_WARM, MF_FUR,
MF_FRIENDLY_SPECIAL);
mon("tentacle dog",species_nether, 'd', c_dkgray, MS_MEDIUM, FLESH,
mon("tentacle dog",species_nether, 'd', c_dkgray, MS_MEDIUM, "flesh",
// dif agr mor spd msk mdi m## cut dge bsh cut itm HP special freq
14,100,100,120, 12, 2, 4, 0, 3, 0, 0, 0,120, 5,
&mdeath::thing, &mattack::tentacle, "\
@@ -907,7 +907,7 @@ tentacles extending from its head."
);
FLAGS(MF_SEES, MF_SMELLS, MF_HEARS, MF_BASHES);
mon("Thing", species_nether, 'H', c_dkgray, MS_LARGE, FLESH,
mon("Thing", species_nether, 'H', c_dkgray, MS_LARGE, "flesh",
// dif agr mor spd msk mdi m## cut dge bsh cut itm HP special freq
25,100,100,135, 14, 2, 4, 0, 5, 8, 0, 0,160, 5,
&mdeath::melt, &mattack::tentacle, "\
@@ -917,7 +917,7 @@ sprout tentacles rapidly."
FLAGS(MF_SMELLS, MF_HEARS, MF_NOHEAD, MF_BASHES, MF_SWIMS, MF_ATTACKMON,
MF_PLASTIC, MF_ACIDPROOF);
mon("human snail",species_none, 'h', c_green, MS_LARGE, FLESH,
mon("human snail",species_none, 'h', c_green, MS_LARGE, "flesh",
// dif agr mor spd msk mdi m## cut dge bsh cut itm HP special freq
10, 0, 30, 50, 4, 1, 5, 0, 0, 6, 12, 0, 50, 15,
&mdeath::normal, &mattack::acid, "\
@@ -927,7 +927,7 @@ FLAGS(MF_SMELLS, MF_HEARS, MF_POISON, MF_ACIDPROOF, MF_ACIDTRAIL);
ANGER(MTRIG_PLAYER_WEAK, MTRIG_FRIEND_DIED);
FEARS(MTRIG_PLAYER_CLOSE, MTRIG_HURT);
mon("twisted body",species_none, 'h', c_pink, MS_MEDIUM, FLESH,
mon("twisted body",species_none, 'h', c_pink, MS_MEDIUM, "flesh",
// dif agr mor spd msk mdi m## cut dge bsh cut itm HP special freq
12,100,100, 90, 5, 2, 4, 0, 6, 0, 0, 0, 65, 0,
&mdeath::normal, &mattack::none, "\
@@ -936,7 +936,7 @@ hair impossibly twisted."
);
FLAGS(MF_SEES, MF_HEARS, MF_GOODHEARING, MF_POISON, MF_HUMAN, MF_VIS40);
mon("vortex", species_none, 'v', c_white, MS_SMALL, POWDER,
mon("vortex", species_none, 'v', c_white, MS_SMALL, "powder",
// dif agr mor spd msk mdi m## cut dge bsh cut itm HP special freq
30,100,100,120, 0, 0, 0, 0, 0, 0, 0, 0, 20, 6,
&mdeath::melt, &mattack::vortex, "\
@@ -947,7 +947,7 @@ FLAGS(MF_HEARS, MF_GOODHEARING, MF_STUMBLES, MF_NOHEAD, MF_HARDTOSHOOT,
MF_FLIES, MF_PLASTIC, MF_NO_BREATHE, MF_FRIENDLY_SPECIAL);
// NETHER WORLD INHABITANTS
mon("flying polyp",species_nether, 'H', c_dkgray, MS_HUGE, FLESH,
mon("flying polyp",species_nether, 'H', c_dkgray, MS_HUGE, "flesh",
// dif agr mor spd msk mdi m## cut dge bsh cut itm HP special freq
42,100,100,280, 16, 3, 8, 6, 7, 8, 0, 0,350, 0,
&mdeath::melt, &mattack::none, "\
@@ -957,7 +957,7 @@ that flies through the air swiftly."
FLAGS(MF_SMELLS, MF_HEARS, MF_GOODHEARING, MF_NOHEAD, MF_BASHES, MF_FLIES,
MF_ATTACKMON, MF_PLASTIC, MF_NO_BREATHE, MF_HIT_AND_RUN);
mon("hunting horror",species_nether, 'h',c_dkgray, MS_SMALL, MNULL,
mon("hunting horror",species_nether, 'h',c_dkgray, MS_SMALL, "null",
// dif agr mor spd msk mdi m## cut dge bsh cut itm HP special freq
28,100,100,180, 15, 3, 4, 0, 6, 0, 0, 0, 80, 0,
&mdeath::melt, &mattack::none, "\
@@ -969,7 +969,7 @@ writhing."
FLAGS(MF_SEES, MF_SMELLS, MF_HEARS, MF_NOHEAD, MF_HARDTOSHOOT, MF_FLIES,
MF_PLASTIC, MF_SUNDEATH, MF_NO_BREATHE, MF_HIT_AND_RUN);
mon("Mi-go", species_nether, 'H', c_pink, MS_MEDIUM, FLESH,
mon("Mi-go", species_nether, 'H', c_pink, MS_MEDIUM, "flesh",
// dif agr mor spd msk mdi m## cut dge bsh cut itm HP special freq
26, 20, 30,120, 14, 5, 3, 10, 7, 4, 12, 0,110, 0,
&mdeath::normal, &mattack::parrot, "\
@@ -980,7 +980,7 @@ antennae."
);
FLAGS(MF_SEES, MF_SMELLS, MF_HEARS, MF_WARM, MF_BASHES, MF_POISON, MF_NO_BREATHE, MF_VIS50);
mon("yugg", species_nether, 'H', c_white, MS_HUGE, FLESH,
mon("yugg", species_nether, 'H', c_white, MS_HUGE, "flesh",
// dif agr mor spd msk mdi m## cut dge bsh cut itm HP special freq
32,100,100, 80, 12, 3, 5, 8, 1, 6, 0, 0,320, 20,
&mdeath::normal, &mattack::gene_sting, "\
@@ -992,7 +992,7 @@ pink mouth, lined with rows of fangs."
FLAGS(MF_SEES, MF_SMELLS, MF_HEARS, MF_BASHES, MF_DESTROYS, MF_POISON, MF_VENOM, MF_NO_BREATHE,
MF_DIGS, MF_VIS40);
mon("gelatinous blob",species_nether, 'O',c_ltgray, MS_LARGE, MNULL,
mon("gelatinous blob",species_nether, 'O',c_ltgray, MS_LARGE, "null",
// dif agr mor spd msk mdi m## cut dge bsh cut itm HP special freq
20, 0,100, 40, 8, 2, 3, 0, 0, 10, 0, 0,200, 4,
&mdeath::melt, &mattack::formblob, "\
@@ -1003,7 +1003,7 @@ chunks falling off of its sides."
FLAGS(MF_SMELLS, MF_HEARS, MF_PLASTIC, MF_NO_BREATHE, MF_NOHEAD);
mtypes[mon_gelatin]->phase = LIQUID;
mon("flaming eye",species_nether, 'E', c_red, MS_MEDIUM, FLESH,
mon("flaming eye",species_nether, 'E', c_red, MS_MEDIUM, "flesh",
// dif agr mor spd msk mdi m## cut dge bsh cut itm HP special freq
27, 0,100, 90, 0, 0, 0, 0, 1, 3, 0, 0,300, 12,
&mdeath::normal, &mattack::stare, "\
@@ -1013,7 +1013,7 @@ through the air."
);
FLAGS(MF_SEES, MF_WARM, MF_FLIES, MF_FIREY, MF_NO_BREATHE, MF_NOHEAD);
mon("kreck", species_nether, 'h', c_ltred, MS_SMALL, FLESH,
mon("kreck", species_nether, 'h', c_ltred, MS_SMALL, "flesh",
// dif agr mor spd msk mdi m## cut dge bsh cut itm HP special freq
6,100,100,105, 6, 1, 3, 1, 5, 0, 5, 0, 35, 0,
&mdeath::melt, &mattack::none, "\
@@ -1024,7 +1024,7 @@ grunting."
);
FLAGS(MF_SEES, MF_SMELLS, MF_HEARS, MF_WARM, MF_BASHES, MF_HIT_AND_RUN, MF_NO_BREATHE, MF_VIS50, MF_BONES);
mon("gracken",species_nether, 'G', c_white, MS_MEDIUM, FLESH,
mon("gracken",species_nether, 'G', c_white, MS_MEDIUM, "flesh",
// dif agr mor spd msk mdi m## cut dge bsh cut itm HP special freq
5, 0,100, 180, 9, 1, 4, 0, 1, 0, 0, 0,100, 10,
&mdeath::normal, &mattack::none, "\
@@ -1036,7 +1036,7 @@ blurs."
FLAGS(MF_SMELLS, MF_HEARS, MF_WARM, MF_NO_BREATHE, MF_ANIMAL);
mon("blank body",species_nether, 'h', c_white, MS_MEDIUM, FLESH,
mon("blank body",species_nether, 'h', c_white, MS_MEDIUM, "flesh",
// dif agr mor spd msk mdi m## cut dge bsh cut itm HP special freq
5, 0,100, 80, 9, 1, 4, 0, 1, 0, 0, 0,100, 10,
&mdeath::normal, &mattack::shriek, "\
@@ -1047,7 +1047,7 @@ mouth."
);
FLAGS(MF_SMELLS, MF_HEARS, MF_WARM, MF_ANIMAL, MF_SUNDEATH, MF_NO_BREATHE, MF_HUMAN, MF_BONES);
mon("Gozu", species_nether, 'G', c_white, MS_MEDIUM, FLESH,
mon("Gozu", species_nether, 'G', c_white, MS_MEDIUM, "flesh",
// dif agr mor spd msk mdi m## cut dge bsh cut itm HP special freq
20, 10,100, 80, 12, 2, 5, 0, 5, 0, 0, 0,400, 20,
&mdeath::normal, &mattack::fear_paralyze, "\
@@ -1058,7 +1058,7 @@ wearing only a pair of white underwear."
);
FLAGS(MF_SEES, MF_SMELLS, MF_HEARS, MF_WARM, MF_BASHES, MF_ANIMAL, MF_FUR, MF_NO_BREATHE, MF_VIS30, MF_BONES);
mon("shadow", species_nether,'S', c_dkgray, MS_TINY, MNULL,
mon("shadow", species_nether,'S', c_dkgray, MS_TINY, "null",
// dif agr mor spd msk mdi m## cut dge bsh cut itm HP special freq
14,100,100, 90, 6, 1, 2, 0, 4, 0, 0, 0, 60, 20,
&mdeath::melt, &mattack::disappear, "\
@@ -1070,7 +1070,7 @@ FLAGS(MF_SEES, MF_HEARS, MF_GOODHEARING, MF_SMELLS, MF_NOHEAD, MF_HARDTOSHOOT,
MF_ACIDPROOF, MF_HIT_AND_RUN, MF_NO_BREATHE, MF_VIS50);
// The hub
mon("breather", species_nether,'O', c_pink, MS_MEDIUM, MNULL,
mon("breather", species_nether,'O', c_pink, MS_MEDIUM, "null",
// dif agr mor spd msk mdi m## cut dge bsh cut itm HP special freq
2, 0, 0,100, 0, 0, 0, 0, 0, 0, 0, 0,100, 6,
&mdeath::kill_breathers,&mattack::breathe, "\
@@ -1080,7 +1080,7 @@ be breathing slowly."
FLAGS(MF_IMMOBILE);
// The branches
mon("breather", species_nether,'o', c_pink, MS_MEDIUM, MNULL,
mon("breather", species_nether,'o', c_pink, MS_MEDIUM, "null",
// dif agr mor spd msk mdi m## cut dge bsh cut itm HP special freq
2, 0, 0,100, 0, 0, 0, 0, 0, 0, 0, 0,100, 6,
&mdeath::melt, &mattack::breathe, "\
@@ -1089,7 +1089,7 @@ be breathing slowly."
);
FLAGS(MF_IMMOBILE);
mon("shadow snake",species_none, 's', c_dkgray, MS_SMALL, FLESH,
mon("shadow snake",species_none, 's', c_dkgray, MS_SMALL, "flesh",
// dif agr mor spd msk mdi m## cut dge bsh cut itm HP special freq
6,100,100, 90, 12, 1, 4, 5, 1, 0, 0, 0, 40, 20,
&mdeath::melt, &mattack::disappear, "\
@@ -1097,8 +1097,52 @@ A large snake, translucent black.");
FLAGS(MF_SEES, MF_SMELLS, MF_WARM, MF_SWIMS, MF_LEATHER, MF_PLASTIC,
MF_SUNDEATH);
// CULT
mon("dementia", species_zombie, 'd', c_red, MS_MEDIUM, "flesh",
// dif agr mor spd msk mdi m## cut dge bsh cut itm HP special freq
3,100,100, 105, 5, 1, 5, 2, 1, 0, 0, 0, 80, 0,
&mdeath::zombie, &mattack::none, "\
An insane individual with many bloody holes\n\
on the sides of their shaved head. Some form\n\
of lobotomy has left it with a partially re-\n\
animated brain."
);
FLAGS(MF_SEES, MF_HEARS, MF_SMELLS, MF_WARM, MF_BASHES, MF_BLEED, MF_HUMAN, MF_POISON);
mon("homunculus", species_zombie, 'h', c_white, MS_MEDIUM, "flesh",
// dif agr mor spd msk mdi m## cut dge bsh cut itm HP special freq
3,100,100, 110, 8, 1, 5, 2, 4, 3, 3, 0, 110, 0,
&mdeath::zombie, &mattack::none, "\
A pale white man with a physically flawless athletic\n\
body and shaved head. His eyes are completely black\n\
as bloody tears pour forth from them."
);
FLAGS(MF_SEES, MF_HEARS, MF_SMELLS, MF_WARM, MF_BASHES, MF_BLEED, MF_HUMAN);
mon("blood sacrifice", species_zombie, 'S', c_red, MS_MEDIUM, "flesh",
// dif agr mor spd msk mdi m## cut dge bsh cut itm HP special freq
0,100,100, 200, 0, 1, 5, 2, 0, 0, 0, 0, 40, 0,
&mdeath::zombie, &mattack::fear_paralyze, "\
This poor victim was sliced open and bled to\n\
death long ago. Yet, chained down it thrashes\n\
in eternal misery from its tortures."
);
FLAGS(MF_SEES, MF_HEARS, MF_SMELLS, MF_WARM, MF_BLEED, MF_IMMOBILE, MF_GUILT, MF_POISON);
mon("flesh angel", species_zombie, 'A', c_red, MS_LARGE, "flesh",
// dif agr mor spd msk mdi m## cut dge bsh cut itm HP special freq
20,100,100, 120, 10, 3, 4, 0, 2, 0, 0, 0, 200, 0,
&mdeath::zombie, &mattack::fear_paralyze, "\
Slender and terrifying, this gigantic man lacks\n\
any skin yet moves swiftly and gracefully without\n\
it. Wings of flesh protrude uselessly from his\n\
back and a third eye dominates his forehead."
);
FLAGS(MF_SEES, MF_HEARS, MF_SMELLS, MF_WARM, MF_BLEED, MF_HARDTOSHOOT, MF_HUMAN, MF_POISON);
// ROBOTS
mon("eyebot", species_robot, 'r', c_ltblue, MS_SMALL, STEEL,
mon("eyebot", species_robot, 'r', c_ltblue, MS_SMALL, "steel",
// dif agr mor spd msk mdi m## cut dge bsh cut itm HP special freq
2, 0,100,120, 0, 0, 0, 0, 3, 10, 10, 70, 20, 30,
&mdeath::normal, &mattack::photograph, "\
@@ -1109,7 +1153,7 @@ Frequently used for reconaissance."
);
FLAGS(MF_SEES, MF_FLIES, MF_ELECTRONIC, MF_NO_BREATHE, MF_NOHEAD);
mon("manhack", species_robot, 'r', c_green, MS_TINY, STEEL,
mon("manhack", species_robot, 'r', c_green, MS_TINY, "steel",
// dif agr mor spd msk mdi m## cut dge bsh cut itm HP special freq
7,100,100,130, 12, 1, 1, 8, 4, 0, 6, 10, 15, 0,
&mdeath::normal, &mattack::none, "\
@@ -1119,7 +1163,7 @@ and has one small, glowing red eye."
);
FLAGS(MF_SEES, MF_FLIES, MF_NOHEAD, MF_ELECTRONIC, MF_HIT_AND_RUN, MF_NO_BREATHE, MF_VIS40);
mon("skitterbot",species_robot, 'r', c_ltred, MS_SMALL, STEEL,
mon("skitterbot",species_robot, 'r', c_ltred, MS_SMALL, "steel",
// dif agr mor spd msk mdi m## cut dge bsh cut itm HP special freq
13,100,100,105, 0, 0, 0, 0, 0, 12, 12, 60, 40, 5,
&mdeath::normal, &mattack::tazer, "\
@@ -1130,7 +1174,7 @@ prods at the ready."
);
FLAGS(MF_SEES, MF_HEARS, MF_GOODHEARING, MF_ELECTRONIC, MF_NO_BREATHE, MF_VIS50);
mon("secubot", species_robot, 'R', c_dkgray, MS_SMALL, STEEL,
mon("secubot", species_robot, 'R', c_dkgray, MS_SMALL, "steel",
// dif agr mor spd msk mdi m## cut dge bsh cut itm HP special freq
19,100,100, 70, 0, 0, 0, 0, 0, 14, 14, 80, 80, 2,
&mdeath::explode, &mattack::smg, "\
@@ -1141,7 +1185,7 @@ heavily armored."
);
FLAGS(MF_SEES, MF_HEARS, MF_BASHES, MF_ATTACKMON, MF_ELECTRONIC, MF_NO_BREATHE, MF_VIS50);
mon("hazmatbot", species_robot, 'R', c_ltgray, MS_MEDIUM, STEEL,
mon("hazmatbot", species_robot, 'R', c_ltgray, MS_MEDIUM, "steel",
// dif agr mor spd msk mdi m## cut dge bsh cut itm HP special freq
12,100, 40, 70, 8, 3, 2, 8, 3, 12, 10, 0, 120, 3,
&mdeath::explode, &mattack::none, "\
@@ -1152,7 +1196,7 @@ multiple legs."
);
FLAGS(MF_SEES, MF_HEARS, MF_BASHES, MF_ATTACKMON, MF_ELECTRONIC, MF_NO_BREATHE, MF_VIS50);
mon("copbot", species_robot, 'R', c_ltblue, MS_MEDIUM, STEEL,
mon("copbot", species_robot, 'R', c_ltblue, MS_MEDIUM, "steel",
// dif agr mor spd msk mdi m## cut dge bsh cut itm HP special freq
12,100, 40,100, 4, 3, 2, 0, 8, 12, 8, 80, 80, 3,
&mdeath::normal, &mattack::copbot, "\
@@ -1162,7 +1206,7 @@ readied, and appears to be well-armored."
);
FLAGS(MF_SEES, MF_HEARS, MF_BASHES, MF_ATTACKMON, MF_ELECTRONIC, MF_NO_BREATHE, MF_VIS50);
mon("molebot", species_robot, 'R', c_brown, MS_MEDIUM, STEEL,
mon("molebot", species_robot, 'R', c_brown, MS_MEDIUM, "steel",
// dif agr mor spd msk mdi m## cut dge bsh cut itm HP special freq
17,100,100, 40, 13, 1, 4, 10, 0, 14, 14, 82, 80, 0,
&mdeath::normal, &mattack::none, "\
@@ -1173,7 +1217,7 @@ covered head."
);
FLAGS(MF_HEARS, MF_GOODHEARING, MF_DIGS, MF_NO_BREATHE, MF_ELECTRONIC);
mon("tripod robot",species_robot, 'R', c_white, MS_LARGE, STEEL,
mon("tripod robot",species_robot, 'R', c_white, MS_LARGE, "steel",
// dif agr mor spd msk mdi m## cut dge bsh cut itm HP special freq
26,100,100, 90, 15, 2, 4, 7, 0, 12, 8, 82, 80, 10,
&mdeath::normal, &mattack::flamethrower, "\
@@ -1183,7 +1227,7 @@ well as a flamethrower mounted on its head."
);
FLAGS(MF_SEES, MF_HEARS, MF_GOODHEARING, MF_BASHES, MF_NO_BREATHE, MF_ELECTRONIC);
mon("chicken walker",species_robot, 'R',c_red, MS_LARGE, STEEL,
mon("chicken walker",species_robot, 'R',c_red, MS_LARGE, "steel",
// dif agr mor spd msk mdi m## cut dge bsh cut itm HP special freq
32,100,100,115, 0, 0, 0, 0, 0, 18, 14, 85, 90, 5,
&mdeath::explode, &mattack::smg, "\
@@ -1194,7 +1238,7 @@ nasty-looking machine gun."
);
FLAGS(MF_SEES, MF_HEARS, MF_BASHES, MF_NO_BREATHE, MF_ELECTRONIC);
mon("tankbot", species_robot, 'R', c_blue, MS_HUGE, STEEL,
mon("tankbot", species_robot, 'R', c_blue, MS_HUGE, "steel",
// dif agr mor spd msk mdi m## cut dge bsh cut itm HP special freq
52,100,100,100, 0, 0, 0, 0, 0, 22, 20, 92,240, 4,
&mdeath::normal, &mattack::multi_robot, "\
@@ -1206,7 +1250,7 @@ deadly weapons."
FLAGS(MF_SEES, MF_HEARS, MF_GOODHEARING, MF_NOHEAD, MF_BASHES, MF_DESTROYS,
MF_ATTACKMON, MF_NO_BREATHE, MF_ELECTRONIC);
mon("turret", species_robot, 't', c_ltgray, MS_SMALL, STEEL,
mon("turret", species_robot, 't', c_ltgray, MS_SMALL, "steel",
// dif agr mor spd msk mdi m## cut dge bsh cut itm HP special freq
14,100,100,100, 0, 0, 0, 0, 0, 14, 16, 88, 30, 1,
&mdeath::explode, &mattack::smg, "\
@@ -1216,7 +1260,7 @@ degrees."
);
FLAGS(MF_SEES, MF_NOHEAD, MF_ELECTRONIC, MF_IMMOBILE, MF_NO_BREATHE, MF_FRIENDLY_SPECIAL);
mon("exploder", species_robot, 'm', c_ltgray, MS_LARGE, STEEL,
mon("exploder", species_robot, 'm', c_ltgray, MS_LARGE, "steel",
// dif agr mor spd msk mdi m## cut dge bsh cut itm HP special freq
14,100,100,100, 0, 0, 0, 0, 0, 0, 0, 88, 1, 1,
&mdeath::explode, &mattack::none, "\
@@ -1228,7 +1272,7 @@ FLAGS(MF_IMMOBILE, MF_NO_BREATHE);
// HALLUCINATIONS
mon("zombie", species_hallu, 'Z', c_ltgreen, MS_MEDIUM, FLESH,
mon("zombie", species_hallu, 'Z', c_ltgreen, MS_MEDIUM, "flesh",
// dif agr mor spd msk mdi m## cut dge bsh cut itm HP special freq
0,100,100, 65, 3, 0, 0, 0, 0, 0, 0, 0, 1, 20,
&mdeath::disappear, &mattack::disappear, "\
@@ -1238,7 +1282,7 @@ unstoppable rage."
);
FLAGS(MF_SEES, MF_HEARS, MF_SMELLS, MF_STUMBLES, MF_NO_BREATHE, MF_VIS40);
mon("giant bee",species_hallu, 'a', c_yellow, MS_MEDIUM, FLESH,
mon("giant bee",species_hallu, 'a', c_yellow, MS_MEDIUM, "flesh",
// dif agr mor spd msk mdi m## cut dge bsh cut itm HP special freq
0,100,100,180, 2, 0, 0, 0, 0, 0, 0, 0, 1, 20,
&mdeath::disappear, &mattack::disappear, "\
@@ -1248,7 +1292,7 @@ sized sting pointed forward."
);
FLAGS(MF_SMELLS, MF_NO_BREATHE, MF_FLIES);
mon("giant ant",species_hallu, 'a', c_brown, MS_MEDIUM, FLESH,
mon("giant ant",species_hallu, 'a', c_brown, MS_MEDIUM, "flesh",
// dif agr mor spd msk mdi m## cut dge bsh cut itm HP special freq
0,100,100,100, 3, 0, 0, 0, 0, 0, 0, 0, 1, 20,
&mdeath::disappear, &mattack::disappear, "\
@@ -1258,7 +1302,7 @@ pair of vicious mandibles."
);
FLAGS(MF_SMELLS, MF_NO_BREATHE);
mon("your mother",species_hallu, '@', c_white, MS_MEDIUM, FLESH,
mon("your mother",species_hallu, '@', c_white, MS_MEDIUM, "flesh",
// dif agr mor spd msk mdi m## cut dge bsh cut itm HP special freq
0,100,100,100, 3, 0, 0, 0, 0, 0, 0, 0, 5, 20,
&mdeath::disappear, &mattack::disappear, "\
@@ -1266,7 +1310,7 @@ Mom?"
);
FLAGS(MF_SEES, MF_HEARS, MF_NO_BREATHE, MF_SMELLS, MF_GUILT);
mon("generator", species_none, 'G', c_white, MS_LARGE, STEEL,
mon("generator", species_none, 'G', c_white, MS_LARGE, "steel",
// dif agr mor spd msk mdi m## cut dge bsh cut itm HP special freq
0, 0, 0,100, 0, 0, 0, 0, 0, 2, 2, 0,500, 1,
&mdeath::gameover, &mattack::generator, "\
+211 -68
View File
@@ -42,8 +42,26 @@ void player::mutate(game *g)
force_good = true;
}
// First, see if we should ugrade/extend an existing mutation
// Determine the mutation categorie
mutation_category cat = MUTCAT_NULL;
// Count up the players number of mutations in categories and find
// the category with the highest single count.
int total = 0, highest = 0;
for (int i = 0; i < NUM_MUTATION_CATEGORIES; i++)
{
total += mutation_category_level[i];
if (mutation_category_level[i] > highest)
{
cat = mutation_category(i);
highest = mutation_category_level[i];
}
}
// See if we should ugrade/extend an existing mutation...
std::vector<pl_flag> upgrades;
// ... or remove one that is not in our highest category
std::vector<pl_flag> downgrades;
// For each mutation...
for (int base_mutation_index = 1; base_mutation_index < PF_MAX2; base_mutation_index++)
{
@@ -73,43 +91,50 @@ void player::mutate(game *g)
upgrades.push_back(mutation);
}
}
// ...consider whether its in our highest category
if( has_trait(base_mutation) && !has_base_trait(base_mutation) ){ // Starting traits don't count toward categories
std::vector<pl_flag> group = mutations_from_category(cat);
bool in_cat = false;
for (int j = 0; j < group.size(); j++)
{
if (group[j] == base_mutation)
{
in_cat = true;
break;
}
}
// mark for removal
if(!in_cat) downgrades.push_back(base_mutation);
}
}
}
// If we have upgrades, we prefer them.
if (upgrades.size() > 0)
{
// (upgrade count) chances to pick an upgrade, 4 chances to pick something else.
int roll = rng(0, upgrades.size() + 4);
if (roll < upgrades.size())
{
// We got a valid upgrade index, so use it and return.
mutate_towards(g, upgrades[roll]);
return;
}
// Preliminary round to either upgrade or remove existing mutations
if(one_in(2)){
if (upgrades.size() > 0)
{
// (upgrade count) chances to pick an upgrade, 4 chances to pick something else.
int roll = rng(0, upgrades.size() + 4);
if (roll < upgrades.size())
{
// We got a valid upgrade index, so use it and return.
mutate_towards(g, upgrades[roll]);
return;
}
}
}
// Next, see if we should mutate within a given category
mutation_category cat = MUTCAT_NULL;
// Count up the number of mutations in categories and find
// the category with the highest single count.
int total = 0, highest = 0;
for (int i = 0; i < NUM_MUTATION_CATEGORIES; i++)
{
total += mutation_category_level[i];
if (mutation_category_level[i] > highest)
{
cat = mutation_category(i);
highest = mutation_category_level[i];
}
}
// Pick one of the mutations out of a hat. If it's in the highest-count
// category, we pick from that category. If not, we mutate randomly.
if (rng(0, total) > highest)
{
cat = MUTCAT_NULL;
else {
// Remove existing mutations that don't fit into our category
if (downgrades.size() > 0 && cat != MUTCAT_NULL)
{
int roll = rng(0, downgrades.size() + 4);
if (roll < downgrades.size())
{
remove_mutation(g, downgrades[roll]);
return;
}
}
}
std::vector<pl_flag> valid; // Valid mutations
@@ -173,6 +198,42 @@ void player::mutate(game *g)
mutate_towards(g, selection);
}
void player::mutate_category(game *g, mutation_category cat)
{
bool force_bad = one_in(3);
bool force_good = false;
if (has_trait(PF_ROBUST) && force_bad)
{
// Robust Genetics gives you a 33% chance for a good mutation,
// instead of the 33% chance of a bad one.
force_bad = false;
force_good = true;
}
// Pull the category's list for valid mutations
std::vector<pl_flag> valid;
valid = mutations_from_category(cat);
// Remove anything we already have, that we have a child of, or that
// goes against our intention of a good/bad mutation
for (int i = 0; i < valid.size(); i++)
{
if (!mutation_ok(g, valid[i], force_good, force_bad))
{
valid.erase(valid.begin() + i);
i--;
}
}
// if we can't mutate in the category do nothing
if (valid.empty()) return;
pl_flag selection = valid[ rng(0, valid.size() - 1) ]; // Pick one!
mutate_towards(g, selection);
return;
}
void player::mutate_towards(game *g, pl_flag mut)
{
if (has_child_flag(g, mut)) {
@@ -180,6 +241,7 @@ void player::mutate_towards(game *g, pl_flag mut)
return;
}
bool has_prereqs = false;
pl_flag canceltrait = PF_NULL;
std::vector<pl_flag> prereq = g->mutation_data[mut].prereqs;
std::vector<pl_flag> cancel = g->mutation_data[mut].cancels;
@@ -187,7 +249,15 @@ void player::mutate_towards(game *g, pl_flag mut)
if (!has_trait( cancel[i] )) {
cancel.erase(cancel.begin() + i);
i--;
} else {
//If we have the trait, but it's a base trait, don't allow it to be removed normally
if (has_base_trait( cancel[i] )) {
canceltrait = cancel[i];
cancel.erase(cancel.begin() + i);
i--;
}
}
}
if (!cancel.empty()) {
@@ -220,14 +290,30 @@ void player::mutate_towards(game *g, pl_flag mut)
}
}
toggle_trait(mut);
if (replacing != PF_NULL) {
g->add_msg("Your %s mutation turns into %s!", traits[replacing].name.c_str(),
traits[mut].name.c_str());
toggle_trait(replacing);
} else
g->add_msg("You gain a mutation called %s!", traits[mut].name.c_str());
mutation_effect(g, *this, mut);
toggle_mutation(mut);
if (replacing != PF_NULL)
{
g->add_msg("Your %s mutation turns into %s!", traits[replacing].name.c_str(),
traits[mut].name.c_str());
toggle_mutation(replacing);
mutation_loss_effect(g, *this, replacing);
mutation_effect(g, *this, mut);
}
else
// If this new mutation cancels a base trait, remove it and add the mutation at the same time
if (canceltrait != PF_NULL)
{
g->add_msg("Your innate %s trait turns into %s!", traits[canceltrait].name.c_str(),
traits[mut].name.c_str());
toggle_mutation(canceltrait);
mutation_loss_effect(g, *this, canceltrait);
mutation_effect(g, *this, mut);
}
else
{
g->add_msg("You gain a mutation called %s!", traits[mut].name.c_str());
mutation_effect(g, *this, mut);
}
// Weight us towards any categories that include this mutation
for (int i = 0; i < NUM_MUTATION_CATEGORIES; i++) {
@@ -248,6 +334,26 @@ void player::mutate_towards(game *g, pl_flag mut)
void player::remove_mutation(game *g, pl_flag mut)
{
// Check for dependant mutations first
std::vector<pl_flag> dependant;
for (int i = 0; i < PF_MAX2; i++)
{
for (std::vector<pl_flag>::iterator it = g->mutation_data[i].prereqs.begin();
it != g->mutation_data[i].prereqs.end(); it++)
{
if (*it == i)
{
dependant.push_back((pl_flag)i);
break;
}
}
}
if (dependant.size() != 0)
{
remove_mutation(g,dependant[rng(0,dependant.size())]);
return;
}
// Check if there's a prereq we should shrink back into
pl_flag replacing = PF_NULL;
std::vector<pl_flag> originals = g->mutation_data[mut].prereqs;
@@ -259,12 +365,33 @@ void player::remove_mutation(game *g, pl_flag mut)
replacing = pre;
}
}
toggle_trait(mut);
// See if this mutation is cancelled by a base trait
//Only if there's no prereq to shrink to, thus we're at the bottom of the trait line
if (replacing == PF_NULL) {
//Check each mutation until we reach the end or find a trait to revert to
for (int i = 1; replacing == PF_NULL && i < PF_MAX2; i++) {
//See if it's in our list of base traits but not active
if (has_base_trait(i) && !has_trait(i)) {
//See if that base trait cancels the mutation we are using
std::vector<pl_flag> traitcheck = g->mutation_data[i].cancels;
if (!traitcheck.empty()) {
for (int j = 0; replacing == PF_NULL && j < traitcheck.size(); j++) {
if (g->mutation_data[i].cancels[j] == mut)
replacing = ((pl_flag)i);
}
}
}
}
}
// This should revert back to a removed base trait rather than simply removing the mutation
toggle_mutation(mut);
if (replacing != PF_NULL) {
g->add_msg("Your %s mutation turns into %s.", traits[mut].name.c_str(),
traits[replacing].name.c_str());
toggle_trait(replacing);
toggle_mutation(replacing);
mutation_loss_effect(g, *this, mut);
mutation_effect(g, *this, replacing);
} else {
@@ -305,6 +432,10 @@ void mutation_effect(game *g, player &p, pl_flag mut)
std::vector<body_part> bps;
switch (mut) {
case PF_TOUGH:
case PF_GLASSJAW:
case PF_HARDCORE:
p.recalc_hp();
// Push off gloves
case PF_WEBBED:
case PF_ARM_TENTACLES:
@@ -347,54 +478,58 @@ void mutation_effect(game *g, player &p, pl_flag mut)
case PF_STR_UP:
p.str_max ++;
p.recalc_hp();
break;
case PF_STR_UP_2:
p.str_max ++;
p.str_max += 2;
p.recalc_hp();
break;
case PF_STR_UP_3:
p.str_max += 2;
p.str_max += 4;
p.recalc_hp();
break;
case PF_STR_UP_4:
p.str_max += 3;
p.str_max += 7;
p.recalc_hp();
break;
case PF_DEX_UP:
p.dex_max ++;
break;
case PF_DEX_UP_2:
p.dex_max ++;
break;
case PF_DEX_UP_3:
p.dex_max += 2;
break;
case PF_DEX_UP_3:
p.dex_max += 4;
break;
case PF_DEX_UP_4:
p.dex_max += 3 ;
p.dex_max += 7;
break;
case PF_INT_UP:
p.int_max ++;
break;
case PF_INT_UP_2:
p.int_max ++;
break;
case PF_INT_UP_3:
p.int_max += 2;
break;
case PF_INT_UP_3:
p.int_max += 4;
break;
case PF_INT_UP_4:
p.int_max += 3;
p.int_max += 7;
break;
case PF_PER_UP:
p.per_max ++;
break;
case PF_PER_UP_2:
p.per_max ++;
break;
case PF_PER_UP_3:
p.per_max += 2;
break;
case PF_PER_UP_3:
p.per_max += 4;
break;
case PF_PER_UP_4:
p.per_max += 3;
p.per_max += 7;
break;
}
@@ -419,17 +554,25 @@ void mutation_effect(game *g, player &p, pl_flag mut)
void mutation_loss_effect(game *g, player &p, pl_flag mut)
{
switch (mut) {
case PF_TOUGH:
case PF_GLASSJAW:
case PF_HARDCORE:
p.recalc_hp();
case PF_STR_UP:
p.str_max--;
p.recalc_hp();
break;
case PF_STR_UP_2:
p.str_max -= 2;
p.recalc_hp();
break;
case PF_STR_UP_3:
p.str_max -= 3;
p.str_max -= 4;
p.recalc_hp();
break;
case PF_STR_UP_4:
p.str_max -= 4;
p.str_max -= 7;
p.recalc_hp();
break;
case PF_DEX_UP:
@@ -439,10 +582,10 @@ void mutation_loss_effect(game *g, player &p, pl_flag mut)
p.dex_max -= 2;
break;
case PF_DEX_UP_3:
p.dex_max -= 3;
p.dex_max -= 4;
break;
case PF_DEX_UP_4:
p.dex_max -= 4;
p.dex_max -= 7;
break;
case PF_INT_UP:
@@ -452,10 +595,10 @@ void mutation_loss_effect(game *g, player &p, pl_flag mut)
p.int_max -= 2;
break;
case PF_INT_UP_3:
p.int_max -= 3;
p.int_max -= 4;
break;
case PF_INT_UP_4:
p.int_max -= 4;
p.int_max -= 7;
break;
case PF_PER_UP:
@@ -465,10 +608,10 @@ void mutation_loss_effect(game *g, player &p, pl_flag mut)
p.per_max -= 2;
break;
case PF_PER_UP_3:
p.per_max -= 3;
p.per_max -= 4;
break;
case PF_PER_UP_4:
p.per_max -= 4;
p.per_max -= 7;
break;
}
}
+1
View File
@@ -145,6 +145,7 @@ void game::init_mutations()
PREREQS (PF_LIGHTFUR);
MUTATION(PF_CHITIN);
PREREQS (PF_SKIN_ROUGH);
CANCELS (PF_SCALES, PF_FEATHERS, PF_LIGHTFUR, PF_PLANTSKIN);
CHANGES_TO (PF_CHITIN2);
+160 -71
View File
@@ -12,38 +12,28 @@
#include <fstream>
#include <sstream>
// ncurses has not yet been initialized, so we need to define our line chars
#define LINE_XOXO 4194424
#define LINE_OXOX 4194417
#define LINE_XXOO 4194413
#define LINE_OXXO 4194412
#define LINE_OOXX 4194411
#define LINE_XOOX 4194410
#define LINE_XXXO 4194420
#define LINE_XXOX 4194422
#define LINE_XOXX 4194421
#define LINE_OXXX 4194423
#define LINE_XXXX 4194414
// Colors used in this file: (Most else defaults to c_ltgray)
#define COL_STAT_ACT c_ltred // Selected stat
#define COL_TR_GOOD c_green // Good trait descriptive text
#define COL_TR_GOOD_OFF c_ltgray // A toggled-off good trait
#define COL_TR_GOOD_ON c_green // A toggled-on good trait
#define COL_TR_GOOD_OFF_ACT c_ltgray // A toggled-off good trait
#define COL_TR_GOOD_ON_ACT c_ltgreen // A toggled-on good trait
#define COL_TR_GOOD_OFF_PAS c_dkgray // A toggled-off good trait
#define COL_TR_GOOD_ON_PAS c_green // A toggled-on good trait
#define COL_TR_BAD c_red // Bad trait descriptive text
#define COL_TR_BAD_OFF c_ltgray // A toggled-off bad trait
#define COL_TR_BAD_ON c_red // A toggled-on bad trait
#define COL_TR_BAD_OFF_ACT c_ltgray // A toggled-off bad trait
#define COL_TR_BAD_ON_ACT c_red // A toggled-on bad trait
#define COL_TR_BAD_OFF_PAS c_dkgray // A toggled-off bad trait
#define COL_TR_BAD_ON_PAS c_ltred // A toggled-on bad trait
#define COL_SKILL_USED c_green // A skill with at least one point
#define HIGH_STAT 14 // The point after which stats cost double
#define MAX_TRAIT_POINTS 12 // How many points from traits
#define NEWCHAR_TAB_MAX 4 // The ID of the rightmost tab
void draw_tabs(WINDOW* w, std::string sTab);
int set_stats(WINDOW* w, game* g, player *u, int &points);
int set_traits(WINDOW* w, game* g, player *u, int &points);
int set_traits(WINDOW* w, game* g, player *u, int &points, int max_trait_points);
int set_profession(WINDOW* w, game* g, player *u, int &points);
int set_skills(WINDOW* w, game* g, player *u, int &points);
int set_description(WINDOW* w, game* g, player *u, int &points);
@@ -62,7 +52,7 @@ bool player::create(game *g, character_type type, std::string tempname)
WINDOW* w = newwin(25, 80, (TERMY > 25) ? (TERMY-25)/2 : 0, (TERMX > 80) ? (TERMX-80)/2 : 0);
int tab = 0, points = 38;
int tab = 0, points = 38, max_trait_points = 12;
if (type != PLTYPE_CUSTOM) {
switch (type) {
case PLTYPE_RANDOM: {
@@ -82,13 +72,13 @@ bool player::create(game *g, character_type type, std::string tempname)
int num_gtraits = 0, num_btraits = 0, rn, tries;
while (points < 0 || rng(-3, 20) > points) {
if (num_btraits < MAX_TRAIT_POINTS && one_in(3)) {
if (num_btraits < max_trait_points && one_in(3)) {
tries = 0;
do {
rn = random_bad_trait();
tries++;
} while ((has_trait(rn) ||
num_btraits - traits[rn].points > MAX_TRAIT_POINTS) && tries < 5);
num_btraits - traits[rn].points > max_trait_points) && tries < 5);
if (tries < 5) {
toggle_trait(rn);
points -= traits[rn].points;
@@ -104,14 +94,14 @@ bool player::create(game *g, character_type type, std::string tempname)
}
}
while (points > 0) {
switch (rng((num_gtraits < MAX_TRAIT_POINTS ? 1 : 5), 9)) {
switch (rng((num_gtraits < max_trait_points ? 1 : 5), 9)) {
case 1:
case 2:
case 3:
case 4:
rn = random_good_trait();
if (!has_trait(rn) && points >= traits[rn].points &&
num_gtraits + traits[rn].points <= MAX_TRAIT_POINTS) {
num_gtraits + traits[rn].points <= max_trait_points) {
toggle_trait(rn);
points -= traits[rn].points;
num_gtraits += traits[rn].points;
@@ -160,13 +150,14 @@ bool player::create(game *g, character_type type, std::string tempname)
tab = NEWCHAR_TAB_MAX;
} else
points = OPTIONS[OPT_INITIAL_POINTS];
max_trait_points = OPTIONS[OPT_MAX_TRAIT_POINTS];
do {
werase(w);
wrefresh(w);
switch (tab) {
case 0: tab += set_stats (w, g, this, points); break;
case 1: tab += set_traits (w, g, this, points); break;
case 1: tab += set_traits (w, g, this, points, max_trait_points); break;
case 2: tab += set_profession (w, g, this, points); break;
case 3: tab += set_skills (w, g, this, points); break;
case 4: tab += set_description(w, g, this, points); break;
@@ -224,6 +215,67 @@ bool player::create(game *g, character_type type, std::string tempname)
} while (!query_yn("Use this style?"));
styles.push_back(ma_type);
}
if (has_trait(PF_MARTIAL_ARTS2)) {
itype_id ma_type;
do {
int choice = menu(false, "Pick your style:",
"Capoeira", "Krav Maga", "Muay Thai", "Ninjutsu", "Zui Quan", NULL);
if (choice == 1)
ma_type = "style_capoeira";
if (choice == 2)
ma_type = "style_krav_maga";
if (choice == 3)
ma_type = "style_muay_thai";
if (choice == 4)
ma_type = "style_ninjutsu";
if (choice == 5)
ma_type = "style_zui_quan";
item tmpitem = item(g->itypes[ma_type], 0);
full_screen_popup(tmpitem.info(true).c_str());
} while (!query_yn("Use this style?"));
styles.push_back(ma_type);
}
if (has_trait(PF_MARTIAL_ARTS3)) {
itype_id ma_type;
do {
int choice = menu(false, "Pick your style:",
"Tiger", "Crane", "Leopard", "Snake", "Dragon", NULL);
if (choice == 1)
ma_type = "style_tiger";
if (choice == 2)
ma_type = "style_crane";
if (choice == 3)
ma_type = "style_leopard";
if (choice == 4)
ma_type = "style_snake";
if (choice == 5)
ma_type = "style_dragon";
item tmpitem = item(g->itypes[ma_type], 0);
full_screen_popup(tmpitem.info(true).c_str());
} while (!query_yn("Use this style?"));
styles.push_back(ma_type);
}
if (has_trait(PF_MARTIAL_ARTS4)) {
itype_id ma_type;
do {
int choice = menu(false, "Pick your style:",
"Centipede", "Viper", "Scorpion", "Lizard", "Toad", NULL);
if (choice == 1)
ma_type = "style_centipede";
if (choice == 2)
ma_type = "style_venom_snake";
if (choice == 3)
ma_type = "style_scorpion";
if (choice == 4)
ma_type = "style_lizard";
if (choice == 5)
ma_type = "style_toad";
item tmpitem = item(g->itypes[ma_type], 0);
full_screen_popup(tmpitem.info(true).c_str());
} while (!query_yn("Use this style?"));
styles.push_back(ma_type);
}
ret_null = item(g->itypes["null"], 0);
if (!styles.empty())
weapon = item(g->itypes[ styles[0] ], 0, ':');
@@ -250,6 +302,18 @@ bool player::create(game *g, character_type type, std::string tempname)
g->u.addictions.push_back(*iter);
}
// Grab the skills from the profession, if there are any
profession::StartingSkillList prof_skills = g->u.prof->skills();
for (profession::StartingSkillList::const_iterator iter = prof_skills.begin();
iter != prof_skills.end(); ++iter)
{
assert(Skill::skill(iter->first));
if (Skill::skill(iter->first))
{
g->u.boost_skill_level(iter->first, iter->second);
}
}
// The near-sighted get to start with glasses.
if (has_trait(PF_MYOPIC) && !has_trait(PF_HYPEROPIC)) {
tmp = item(g->itypes["glasses_eye"], 0, 'a' + worn.size());
@@ -279,7 +343,8 @@ bool player::create(game *g, character_type type, std::string tempname)
inv.push_back(tmp);
// make sure we have no mutations
for (int i = 0; i < PF_MAX2; i++)
my_mutations[i] = false;
if (!has_base_trait(i))
my_mutations[i] = false;
return true;
}
@@ -482,7 +547,7 @@ int set_stats(WINDOW* w, game* g, player *u, int &points)
} while (true);
}
int set_traits(WINDOW* w, game* g, player *u, int &points)
int set_traits(WINDOW* w, game* g, player *u, int &points, int max_trait_points)
{
draw_tabs(w, "TRAITS");
@@ -498,10 +563,13 @@ int set_traits(WINDOW* w, game* g, player *u, int &points)
num_bad += abs(traits[i].points);
}
for (int i = 0; i < 16; i++) {
for (int i = 0; i < 16; i++) {//preparation: draw disadvantages list
mvwprintz(w, 5 + i, 40, c_dkgray, "\
");
mvwprintz(w, 5 + i, 40, c_dkgray, traits[PF_SPLIT + 1 + i].name.c_str());
");
if (u->has_trait(PF_SPLIT + 1 + i))//highlight disadvantages
mvwprintz(w, 5 + i, 40, COL_TR_BAD_ON_PAS, traits[PF_SPLIT + 1 + i].name.c_str());
else
mvwprintz(w, 5 + i, 40, COL_TR_BAD_OFF_PAS, traits[PF_SPLIT + 1 + i].name.c_str());
}
mvwprintz(w,11,32, c_ltgray, "h l");
mvwprintz(w,12,32, c_ltgray, "< >");
@@ -510,49 +578,53 @@ int set_traits(WINDOW* w, game* g, player *u, int &points)
mvwprintz(w,16,31, c_ltgray,"Toggles");
int cur_adv = 1, cur_dis = PF_SPLIT + 1, cur_trait, traitmin, traitmax, xoff;
nc_color col_on, col_off, hi_on, hi_off;
nc_color col_on_act, col_off_act, col_on_pas, col_off_pas, hi_on, hi_off;
bool using_adv = true; // True if we're selecting advantages, false if we're
// selecting disadvantages
do {
mvwprintz(w, 3, 2, c_ltgray, "Points left: %d ", points);
mvwprintz(w, 3,20, c_ltgreen, "%s%d/%d", (num_good < 10 ? " " : ""),
num_good, MAX_TRAIT_POINTS);
mvwprintz(w, 3,33, c_ltred, "%s%d/%d", (num_bad < 10 ? " " : ""),
num_bad, MAX_TRAIT_POINTS);
mvwprintz(w, 3,18, c_ltgreen, "%s%d/%d", (num_good < 10 ? " " : ""),
num_good, max_trait_points);
mvwprintz(w, 3,25, c_ltred, "%s%d/%d", (num_bad < 10 ? " " : ""),
num_bad, max_trait_points);
// Clear the bottom of the screen.
mvwprintz(w_description, 0, 0, c_ltgray, " ");
mvwprintz(w_description, 1, 0, c_ltgray, " ");
mvwprintz(w_description, 2, 0, c_ltgray, " ");
if (using_adv) {
col_on = COL_TR_GOOD_ON;
col_off = COL_TR_GOOD_OFF;
hi_on = hilite(col_on);
hi_off = hilite(col_off);
if (using_adv) {//Traits costs note and traits description
col_on_act = COL_TR_GOOD_ON_ACT;
col_off_act = COL_TR_GOOD_OFF_ACT;
col_on_pas = COL_TR_GOOD_ON_PAS;
col_off_pas = COL_TR_GOOD_OFF_PAS;
hi_on = hilite(col_on_act);
hi_off = hilite(col_off_act);
xoff = 2;
cur_trait = cur_adv;
traitmin = 1;
traitmax = PF_SPLIT;
mvwprintz(w, 3, 40, c_ltgray, " ");
mvwprintz(w, 3, 40, COL_TR_GOOD, "%s costs %d points",
mvwprintz(w, 3, 33, c_ltgray, " ");
mvwprintz(w, 3, 33, COL_TR_GOOD, "%s costs %d points",
traits[cur_adv].name.c_str(), traits[cur_adv].points);
mvwprintz(w_description, 0, 0, COL_TR_GOOD, "%s", traits[cur_adv].description.c_str());
} else {
col_on = COL_TR_BAD_ON;
col_off = COL_TR_BAD_OFF;
hi_on = hilite(col_on);
hi_off = hilite(col_off);
col_on_act = COL_TR_BAD_ON_ACT;
col_off_act = COL_TR_BAD_OFF_ACT;
col_on_pas = COL_TR_BAD_ON_PAS;
col_off_pas = COL_TR_BAD_OFF_PAS;
hi_on = hilite(col_on_act);
hi_off = hilite(col_off_act);
xoff = 40;
cur_trait = cur_dis;
traitmin = PF_SPLIT + 1;
traitmax = PF_MAX;
mvwprintz(w, 3, 40, c_ltgray, " ");
mvwprintz(w, 3, 40, COL_TR_BAD, "%s earns %d points",
mvwprintz(w, 3, 33, c_ltgray, " ");
mvwprintz(w, 3, 33, COL_TR_BAD, "%s earns %d points",
traits[cur_dis].name.c_str(), traits[cur_dis].points * -1);
mvwprintz(w_description, 0, 0, COL_TR_BAD, "%s", traits[cur_dis].description.c_str());
}
if (cur_trait <= traitmin + 7) {
if (cur_trait <= traitmin + 7) {//draw list
for (int i = traitmin; i < traitmin + 16; i++) {
mvwprintz(w, 5 + i - traitmin, xoff, c_ltgray, "\
"); // Clear the line
@@ -563,9 +635,9 @@ int set_traits(WINDOW* w, game* g, player *u, int &points)
mvwprintz(w, 5 + i - traitmin, xoff, hi_off, traits[i].name.c_str());
} else {
if (u->has_trait(i))
mvwprintz(w, 5 + i - traitmin, xoff, col_on, traits[i].name.c_str());
mvwprintz(w, 5 + i - traitmin, xoff, col_on_act, traits[i].name.c_str());
else
mvwprintz(w, 5 + i - traitmin, xoff, col_off, traits[i].name.c_str());
mvwprintz(w, 5 + i - traitmin, xoff, col_off_act, traits[i].name.c_str());
}
}
} else if (cur_trait >= traitmax - 9) {
@@ -579,9 +651,9 @@ int set_traits(WINDOW* w, game* g, player *u, int &points)
mvwprintz(w, 21 + i - traitmax, xoff, hi_off, traits[i].name.c_str());
} else {
if (u->has_trait(i))
mvwprintz(w, 21 + i - traitmax, xoff, col_on, traits[i].name.c_str());
mvwprintz(w, 21 + i - traitmax, xoff, col_on_act, traits[i].name.c_str());
else
mvwprintz(w, 21 + i - traitmax, xoff, col_off, traits[i].name.c_str());
mvwprintz(w, 21 + i - traitmax, xoff, col_off_act, traits[i].name.c_str());
}
}
} else {
@@ -595,9 +667,9 @@ int set_traits(WINDOW* w, game* g, player *u, int &points)
mvwprintz(w, 12 + i - cur_trait, xoff, hi_off, traits[i].name.c_str());
} else {
if (u->has_trait(i))
mvwprintz(w, 12 + i - cur_trait, xoff, col_on, traits[i].name.c_str());
mvwprintz(w, 12 + i - cur_trait, xoff, col_on_act, traits[i].name.c_str());
else
mvwprintz(w, 12 + i - cur_trait, xoff, col_off, traits[i].name.c_str());
mvwprintz(w, 12 + i - cur_trait, xoff, col_off_act, traits[i].name.c_str());
}
}
}
@@ -608,17 +680,32 @@ int set_traits(WINDOW* w, game* g, player *u, int &points)
case 'h':
case 'l':
case '\t':
if (!using_adv) {
for (int i = 0; i < 16; i++) {
mvwprintz(w, 5 + i, 40, c_dkgray, "\
");
mvwprintz(w, 5 + i, 40, c_dkgray, traits[PF_SPLIT + 1 + i].name.c_str());
if (cur_trait <= traitmin + 7) {//draw list
for (int i = traitmin; i < traitmin + 16; i++) {
mvwprintz(w, 5 + i - traitmin, xoff, c_ltgray, "\
"); // Clear the line
if (u->has_trait(i))
mvwprintz(w, 5 + i - traitmin, xoff, col_on_pas, traits[i].name.c_str());
else
mvwprintz(w, 5 + i - traitmin, xoff, col_off_pas, traits[i].name.c_str());
}
} else if (cur_trait >= traitmax - 9) {
for (int i = traitmax - 16; i < traitmax; i++) {
mvwprintz(w, 21 + i - traitmax, xoff, c_ltgray, "\
"); // Clear the line
if (u->has_trait(i))
mvwprintz(w, 21 + i - traitmax, xoff, col_on_pas, traits[i].name.c_str());
else
mvwprintz(w, 21 + i - traitmax, xoff, col_off_pas, traits[i].name.c_str());
}
} else {
for (int i = 0; i < 16; i++) {
mvwprintz(w, 5 + i, 2, c_dkgray, "\
");
mvwprintz(w, 5 + i, 2, c_dkgray, traits[i + 1].name.c_str());
for (int i = cur_trait - 7; i < cur_trait + 9; i++) {
mvwprintz(w, 12 + i - cur_trait, xoff, c_ltgray, "\
"); // Clear the line
if (u->has_trait(i))
mvwprintz(w, 12 + i - cur_trait, xoff, col_on_pas, traits[i].name.c_str());
else
mvwprintz(w, 12 + i - cur_trait, xoff, col_off_pas, traits[i].name.c_str());
}
}
using_adv = !using_adv;
@@ -655,13 +742,13 @@ int set_traits(WINDOW* w, game* g, player *u, int &points)
} else
mvwprintz(w, 3, 2, c_red, "Points left: %d ", points);
} else if (using_adv && num_good + traits[cur_trait].points >
MAX_TRAIT_POINTS)
max_trait_points)
popup("Sorry, but you can only take %d points of advantages.",
MAX_TRAIT_POINTS);
max_trait_points);
else if (!using_adv && num_bad - traits[cur_trait].points >
MAX_TRAIT_POINTS)
max_trait_points)
popup("Sorry, but you can only take %d points of disadvantages.",
MAX_TRAIT_POINTS);
max_trait_points);
else if (points >= traits[cur_trait].points) {
u->toggle_trait(cur_trait);
points -= traits[cur_trait].points;
@@ -814,10 +901,10 @@ int set_skills(WINDOW* w, game* g, player *u, int &points)
mvwprintz(w, 3, 40, c_ltgray, " ");
if (points >= u->skillLevel(currentSkill) + 1)
mvwprintz(w, 3, 30, COL_SKILL_USED, "Upgrading %s costs %d points",
skill_name(cur_sk).c_str(), u->skillLevel(currentSkill) + 1);
currentSkill->name().c_str(), u->skillLevel(currentSkill) + 1);
else
mvwprintz(w, 3, 30, c_ltred, "Upgrading %s costs %d points",
skill_name(cur_sk).c_str(), u->skillLevel(currentSkill) + 1);
currentSkill->name().c_str(), u->skillLevel(currentSkill) + 1);
mvwprintz(w_description, 0, 0, COL_SKILL_USED, currentSkill->description().c_str());
if (cur_sk <= 7) {
@@ -832,7 +919,7 @@ int set_skills(WINDOW* w, game* g, player *u, int &points)
} else {
mvwprintz(w, 5 + i, 2,
(i == cur_sk ? hilite(COL_SKILL_USED) : COL_SKILL_USED),
"%s ", skill_name(i).c_str());
"%s ", thisSkill->name().c_str());
for (int j = 0; j < u->skillLevel(thisSkill); j++)
wprintz(w, (i == cur_sk ? hilite(COL_SKILL_USED) : COL_SKILL_USED), "*");
}
@@ -1043,3 +1130,5 @@ void save_template(player *u)
fout.open(playerfile.str().c_str());
fout << u->save_info();
}
// vim:tw=80:sw=4:ts=4:et:fdm=marker:fdl=0:
+123 -109
View File
@@ -9,6 +9,7 @@
#include "skill.h"
#include "output.h"
#include "line.h"
#include "item_factory.h"
std::vector<item> starting_clothes(npc_class type, bool male, game *g);
std::list<item> starting_inv(npc *me, npc_class type, game *g);
@@ -353,8 +354,8 @@ void npc::randomize(game *g, npc_class type)
}
set_skill_level(*aSkill, level);
}
boost_skill_level(sk_electronics, rng(1, 4));
boost_skill_level(sk_computer, rng(3, 6));
boost_skill_level("electronics", rng(1, 4));
boost_skill_level("computer", rng(3, 6));
str_max -= rng(0, 4);
dex_max -= rng(0, 2);
int_max += rng(1, 5);
@@ -372,7 +373,7 @@ void npc::randomize(game *g, npc_class type)
}
set_skill_level(*aSkill, level);
}
boost_skill_level(sk_firstaid, rng(2, 6));
boost_skill_level("firstaid", rng(2, 6));
str_max -= rng(0, 2);
int_max += rng(0, 2);
per_max += rng(0, 1) * rng(0, 1);
@@ -391,10 +392,10 @@ void npc::randomize(game *g, npc_class type)
}
set_skill_level(*aSkill, level);
}
boost_skill_level(sk_mechanics, rng(0, 2));
boost_skill_level(sk_electronics, rng(0, 2));
boost_skill_level(sk_speech, rng(0, 3));
boost_skill_level(sk_barter, rng(2, 5));
boost_skill_level("mechanics", rng(0, 2));
boost_skill_level("electronics", rng(0, 2));
boost_skill_level("speech", rng(0, 3));
boost_skill_level("barter", rng(2, 5));
int_max += rng(0, 1) * rng(0, 1);
per_max += rng(0, 1) * rng(0, 1);
personality.collector += rng(1, 5);
@@ -410,10 +411,10 @@ void npc::randomize(game *g, npc_class type)
}
set_skill_level(*aSkill, level);
}
boost_skill_level(sk_dodge, rng(2, 4));
boost_skill_level(sk_melee, rng(1, 4));
boost_skill_level(sk_unarmed, rng(4, 6));
boost_skill_level(sk_throw, rng(0, 2));
boost_skill_level("dodge", rng(2, 4));
boost_skill_level("melee", rng(1, 4));
boost_skill_level("unarmed", rng(4, 6));
boost_skill_level("throw", rng(0, 2));
str_max -= rng(0, 1);
dex_max += rng(0, 2);
per_max += rng(0, 2);
@@ -433,9 +434,9 @@ void npc::randomize(game *g, npc_class type)
}
set_skill_level(*aSkill, level);
}
boost_skill_level(sk_gun, rng(1, 3));
boost_skill_level(sk_pistol, rng(1, 3));
boost_skill_level(sk_rifle, rng(0, 2));
boost_skill_level("gun", rng(1, 3));
boost_skill_level("pistol", rng(1, 3));
boost_skill_level("rifle", rng(0, 2));
int_max -= rng(0, 2);
str_max += rng(0, 1);
per_max += rng(0, 2);
@@ -452,13 +453,13 @@ void npc::randomize(game *g, npc_class type)
}
set_skill_level(*aSkill, level);
}
boost_skill_level(sk_computer, rng(0, 3));
boost_skill_level(sk_electronics, rng(0, 3));
boost_skill_level(sk_firstaid, rng(0, 1));
boost_skill_level("computer", rng(0, 3));
boost_skill_level("electronics", rng(0, 3));
boost_skill_level("firstaid", rng(0, 1));
switch (rng(1, 3)) { // pick a specialty
case 1: boost_skill_level(sk_computer, rng(2, 6)); break;
case 2: boost_skill_level(sk_electronics, rng(2, 6)); break;
case 3: boost_skill_level(sk_firstaid, rng(2, 6)); break;
case 1: boost_skill_level("computer", rng(2, 6)); break;
case 2: boost_skill_level("electronics", rng(2, 6)); break;
case 3: boost_skill_level("firstaid", rng(2, 6)); break;
}
if (one_in(4))
flags |= mfb(NF_TECHNOPHILE);
@@ -481,8 +482,8 @@ void npc::randomize(game *g, npc_class type)
}
set_skill_level(*aSkill, level);
}
boost_skill_level(sk_gun, rng(2, 4));
boost_skill_level(rng(sk_pistol, sk_rifle), rng(3, 5));
boost_skill_level("gun", rng(2, 4));
boost_skill_level(Skill::random_skill_with_tag("gun"), rng(3, 5));
personality.aggression += rng(1, 6);
personality.bravery += rng(0, 5);
break;
@@ -627,7 +628,7 @@ void npc::randomize_from_faction(game *g, faction *fac)
personality.altruism += rng(0, 4);
int_max += rng(2, 4);
per_max += rng(0, 2);
boost_skill_level(sk_firstaid, rng(1, 5));
boost_skill_level("firstaid", rng(1, 5));
}
if (fac->has_job(FACJOB_FARMERS)) {
personality.aggression -= rng(2, 4);
@@ -643,10 +644,10 @@ void npc::randomize_from_faction(game *g, faction *fac)
personality.aggression -= rng(0, 2);
personality.bravery -= rng(0, 2);
switch (rng(1, 4)) {
case 1: boost_skill_level(sk_mechanics, dice(2, 4)); break;
case 2: boost_skill_level(sk_electronics, dice(2, 4)); break;
case 3: boost_skill_level(sk_cooking, dice(2, 4)); break;
case 4: boost_skill_level(sk_tailor, dice(2, 4)); break;
case 1: boost_skill_level("mechanics", dice(2, 4)); break;
case 2: boost_skill_level("electronics", dice(2, 4)); break;
case 3: boost_skill_level("cooking", dice(2, 4)); break;
case 4: boost_skill_level("tailor", dice(2, 4)); break;
}
}
@@ -673,9 +674,9 @@ void npc::randomize_from_faction(game *g, faction *fac)
per_max += rng(0, 2);
int_max += rng(0, 4);
if (one_in(3)) {
boost_skill_level(sk_mechanics, dice(2, 3));
boost_skill_level(sk_electronics, dice(2, 3));
boost_skill_level(sk_firstaid, dice(2, 3));
boost_skill_level("mechanics", dice(2, 3));
boost_skill_level("electronics", dice(2, 3));
boost_skill_level("firstaid", dice(2, 3));
}
}
if (fac->has_value(FACVAL_BOOKS)) {
@@ -1033,76 +1034,89 @@ void npc::place_near(game *g, int potentialX, int potentialY)
posy = potentialY + y;
}
skill npc::best_skill()
Skill* npc::best_skill()
{
std::vector<int> best_skills;
std::vector<Skill*> best_skills;
int highest = 0;
for (int i = sk_unarmed; i <= sk_rifle; i++) {
if (skillLevel(i) > highest && i != sk_gun) {
highest = skillLevel(i);
best_skills.clear();
for (std::vector<Skill*>::iterator iter = Skill::skills.begin(); iter != Skill::skills.end(); ++iter) {
if ((*iter)->ident() != "gun") {
if (skillLevel(*iter) > highest) {
highest = skillLevel(*iter);
best_skills.clear();
best_skills.push_back(*iter);
} else if (skillLevel(*iter) == highest) {
best_skills.push_back(*iter);
}
}
if (skillLevel(i) == highest && i != sk_gun)
best_skills.push_back(i);
}
int index = rng(0, best_skills.size() - 1);
return skill(best_skills[index]);
return best_skills[index];
}
void npc::starting_weapon(game *g)
{
if (!styles.empty()) {
weapon.make(g->itypes[styles[rng(0, styles.size() - 1)]]);
return;
}
skill best = best_skill();
int index;
switch (best) {
case sk_bashing:
switch (rng(0, 5)) {
case 0: weapon.make(g->itypes["hammer"]); break;
case 1: weapon.make(g->itypes["wrench"]); break;
case 2: weapon.make(g->itypes["hammer_sledge"]); break;
case 3: weapon.make(g->itypes["pipe"]); break;
case 4: weapon.make(g->itypes["bat"]); break;
case 5: weapon.make(g->itypes["crowbar"]); break;
}
break;
case sk_cutting:
switch (rng(0, 5)) {
case 0: weapon.make(g->itypes["knife_butcher"]); break;
case 1: weapon.make(g->itypes["hatchet"]); break;
case 2: weapon.make(g->itypes["ax"]); break;
case 3: weapon.make(g->itypes["machete"]); break;
case 4: weapon.make(g->itypes["knife_combat"]); break;
case 5: weapon.make(g->itypes["katana"]); break;
}
break;
case sk_throw:
// TODO: Some throwing weapons... grenades?
break;
case sk_pistol:
index = rng(0, g->mapitems[mi_pistols].size() - 1);
weapon.make(g->itypes[(g->mapitems[mi_pistols])[index]]);
break;
case sk_shotgun:
index = rng(0, g->mapitems[mi_shotguns].size() - 1);
weapon.make(g->itypes[(g->mapitems[mi_shotguns])[index]]);
break;
case sk_smg:
index = rng(0, g->mapitems[mi_smg].size() - 1);
weapon.make(g->itypes[(g->mapitems[mi_smg])[index]]);
break;
case sk_rifle:
index = rng(0, g->mapitems[mi_rifles].size() - 1);
weapon.make(g->itypes[(g->mapitems[mi_rifles])[index]]);
break;
}
if (weapon.is_gun()) {
it_gun* gun = dynamic_cast<it_gun*>(weapon.type);
weapon.charges = gun->clip;
weapon.curammo = dynamic_cast<it_ammo*>(g->itypes[default_ammo(gun->ammo)]);
}
if (!styles.empty())
{
weapon.make(g->itypes[styles[rng(0, styles.size() - 1)]]);
return;
}
// TODO add throwing weapons
std::list<itype_id> possible_items;
Skill* best = best_skill();
if (best->ident() == "bashing")
{
possible_items.push_back("hammer");
possible_items.push_back("wrench");
possible_items.push_back("hammer_sledge");
possible_items.push_back("pipe");
possible_items.push_back("bat");
possible_items.push_back("crowbar");
}
else if (best->ident() == "cutting")
{
possible_items.push_back("knife_butcher");
possible_items.push_back("hatchet");
possible_items.push_back("ax");
possible_items.push_back("machete");
possible_items.push_back("knife_combat");
possible_items.push_back("katana");
}
else if (best->ident() == "pistol")
{
int index = rng(0, g->mapitems[mi_pistols].size() - 1);
possible_items.push_back(g->mapitems[mi_pistols][index]);
}
else if (best->ident() == "shotgun")
{
int index = rng(0, g->mapitems[mi_shotguns].size() - 1);
possible_items.push_back(g->mapitems[mi_shotguns][index]);
}
else if (best->ident() == "smg")
{
int index = rng(0, g->mapitems[mi_smg].size() - 1);
possible_items.push_back(g->mapitems[mi_smg][index]);
}
else if (best->ident() == "rifle")
{
int index = rng(0, g->mapitems[mi_rifles].size() - 1);
possible_items.push_back(g->mapitems[mi_rifles][index]);
}
if (possible_items.size() > 0)
{
std::list<itype_id>::iterator chosen = possible_items.begin();
std::advance(chosen, rng(0, possible_items.size() - 1));
weapon.make(item_controller->find_template(*chosen));
}
if (weapon.is_gun())
{
it_gun* gun = dynamic_cast<it_gun*>(weapon.type);
weapon.charges = gun->clip;
weapon.curammo = dynamic_cast<it_ammo*>(g->itypes[default_ammo(gun->ammo)]);
}
}
bool npc::wear_if_wanted(item it)
@@ -1144,7 +1158,7 @@ bool npc::wear_if_wanted(item it)
return false;
}
bool npc::wield(game *g, char invlet)
bool npc::wield(game *g, signed char invlet)
{
if (invlet < 0) { // Wielding a style
int index = 0 - invlet - 1;
@@ -1442,14 +1456,16 @@ int npc::assigned_missions_value(game *g)
return ret;
}
std::vector<skill> npc::skills_offered_to(player *p)
std::vector<Skill*> npc::skills_offered_to(player *p)
{
std::vector<skill> ret;
std::vector<Skill*> ret;
if (p == NULL)
return ret;
for (int i = 0; i < num_skill_types; i++) {
if (p->skillLevel(Skill::skill(i)) < skillLevel(i))
ret.push_back( skill(i) );
for (std::vector<Skill*>::iterator aSkill = Skill::skills.begin();
aSkill != Skill::skills.end(); ++aSkill) {
if (p->skillLevel(*aSkill) < skillLevel(*aSkill)) {
ret.push_back(*aSkill);
}
}
return ret;
}
@@ -1508,15 +1524,15 @@ void npc::decide_needs()
it_gun* gun = dynamic_cast<it_gun*>(weapon.type);
needrank[need_ammo] = 5 * has_ammo(gun->ammo).size();
}
if (weapon.type->id == "null" && skillLevel(sk_unarmed) < 4)
if (weapon.type->id == "null" && skillLevel("unarmed") < 4)
needrank[need_weapon] = 1;
else
needrank[need_weapon] = weapon.type->melee_dam + weapon.type->melee_cut +
weapon.type->m_to_hit;
if (!weapon.is_gun())
needrank[need_gun] = skillLevel(sk_unarmed) + skillLevel(sk_melee) +
skillLevel(sk_bashing) + skillLevel(sk_cutting) -
skillLevel(sk_gun) * 2 + 5;
needrank[need_gun] = skillLevel("unarmed") + skillLevel("melee") +
skillLevel("bashing") + skillLevel("cutting") -
skillLevel("gun") * 2 + 5;
needrank[need_food] = 15 - hunger;
needrank[need_drink] = 15 - thirst;
invslice slice = inv.slice(0, inv.size());
@@ -1586,7 +1602,7 @@ void npc::init_selling(std::vector<item*> &items, std::vector<int> &prices)
val = value(slice[i]->front()) - (slice[i]->front().price() / 50);
if (val <= NPC_LOW_VALUE || mission == NPC_MISSION_SHOPKEEP) {
items.push_back(&slice[i]->front());
price = slice[i]->front().price() / (price_adjustment(skillLevel(sk_barter)));
price = slice[i]->front().price() / (price_adjustment(skillLevel("barter")));
prices.push_back(price);
}
}
@@ -1605,7 +1621,7 @@ void npc::init_buying(inventory& you, std::vector<item*> &items,
price = slice[i]->front().price();
if (val >= NPC_VERY_HI_VALUE)
price *= 2;
price *= price_adjustment(skillLevel(sk_barter));
price *= price_adjustment(skillLevel("barter"));
prices.push_back(price);
}
}
@@ -1631,8 +1647,8 @@ void npc::update_worst_item_value()
int npc::value(const item &it)
{
int ret = it.price() / 50;
skill best = best_skill();
if (best != sk_unarmed) {
Skill* best = best_skill();
if (best->ident() != "unarmed") {
int weapon_val = it.weapon_value(this) - weapon.weapon_value(this);
if (weapon_val > 0)
ret += weapon_val;
@@ -2067,10 +2083,10 @@ void npc::die(game *g, bool your_fault)
my_body.make_corpse(g->itypes["corpse"], g->mtypes[mon_null], g->turn);
my_body.name = name;
g->m.add_item(posx, posy, my_body);
std::vector<item> dump;
std::vector<item *> dump;
inv.dump(dump);
for (int i = 0; i < dump.size(); i++)
g->m.add_item(posx, posy, dump[i]);
g->m.add_item(posx, posy, *(dump[i]));
for (int i = 0; i < worn.size(); i++)
g->m.add_item(posx, posy, worn[i]);
if (weapon.type->id != "null")
@@ -2080,8 +2096,6 @@ void npc::die(game *g, bool your_fault)
if (g->active_missions[i].npc_id == getID())
g->fail_mission( g->active_missions[i].uid );
}
g->cur_om->remove_npc(getID());
}
std::string npc_attitude_name(npc_attitude att)
+12 -8
View File
@@ -356,12 +356,14 @@ struct npc_chatbin
std::vector<int> missions_assigned;
int mission_selected;
int tempvalue; //No clue what this value does, but it is used all over the place. So it is NOT temp.
Skill* skill;
talk_topic first_topic;
npc_chatbin()
{
mission_selected = -1;
tempvalue = -1;
skill = NULL;
first_topic = TALK_NONE;
}
@@ -369,7 +371,7 @@ struct npc_chatbin
{
std::stringstream ret;
ret << first_topic << " " << mission_selected << " " << tempvalue << " " <<
missions.size() << " " << missions_assigned.size();
(skill ? skill->ident() : "none") << " " << missions.size() << " " << missions_assigned.size();
for (int i = 0; i < missions.size(); i++)
ret << " " << missions[i];
for (int i = 0; i < missions_assigned.size(); i++)
@@ -380,9 +382,11 @@ struct npc_chatbin
void load_info(std::stringstream &info)
{
int tmpsize_miss, tmpsize_assigned, tmptopic;
info >> tmptopic >> mission_selected >> tempvalue >> tmpsize_miss >>
tmpsize_assigned;
std::string skill_ident;
info >> tmptopic >> mission_selected >> tempvalue >> skill_ident >>
tmpsize_miss >> tmpsize_assigned;
first_topic = talk_topic(tmptopic);
skill = skill_ident == "none" ? NULL : Skill::skill(skill_ident);
for (int i = 0; i < tmpsize_miss; i++) {
int tmpmiss;
info >> tmpmiss;
@@ -413,7 +417,7 @@ public:
void randomize_from_faction(game *g, faction *fac);
void spawn_at(overmap *o, int posx, int posy, int omz);
void place_near(game *g, int potentialX, int potentialY);
skill best_skill();
Skill* best_skill();
void starting_weapon(game *g);
// Save & load
@@ -443,7 +447,7 @@ public:
void make_angry(); // Called if the player attacks us
bool wants_to_travel_with(player *p);
int assigned_missions_value(game *g);
std::vector<skill> skills_offered_to(player *p); // Skills that're higher
std::vector<Skill*> skills_offered_to(player *p); // Skills that're higher
std::vector<itype_id> styles_offered_to(player *p); // Martial Arts
// State checks
bool is_enemy(); // We want to kill/mug/etc the player
@@ -475,7 +479,7 @@ public:
void update_worst_item_value(); // Find the worst value in our inventory
int value(const item &it);
bool wear_if_wanted(item it);
virtual bool wield(game *g, char invlet);
virtual bool wield(game *g, signed char invlet);
bool has_healing_item();
bool has_painkiller();
bool took_painkiller();
@@ -511,7 +515,7 @@ public:
npc_action address_player (game *g);
npc_action long_term_goal_action(game *g);
bool alt_attack_available(game *g); // Do we have grenades, molotov, etc?
char choose_escape_item(); // Returns index of our best escape aid
signed char choose_escape_item(); // Returns index of our best escape aid
// Helper functions for ranged combat
int confident_range(char invlet = 0); // >= 50% chance to hit
@@ -540,7 +544,7 @@ public:
void melee_player (game *g, player &foe);
void wield_best_melee (game *g);
void alt_attack (game *g, int target);
void use_escape_item (game *g, char invlet, int target);
void use_escape_item (game *g, signed char invlet, int target);
void heal_player (game *g, player &patient);
void heal_self (game *g);
void take_painkiller (game *g);
+24 -23
View File
@@ -691,7 +691,7 @@ bool npc::alt_attack_available(game *g)
return false;
}
char npc::choose_escape_item()
signed char npc::choose_escape_item()
{
int best = -1, ret = -1;
invslice slice = inv.slice(0, inv.size());
@@ -717,7 +717,7 @@ char npc::choose_escape_item()
return slice[ret]->front().invlet;
}
void npc::use_escape_item(game *g, char invlet, int target)
void npc::use_escape_item(game *g, signed char invlet, int target)
{
if (invlet == 0) {
debugmsg("%s tried to use item with null invlet", name.c_str());
@@ -809,10 +809,10 @@ int npc::confident_range(char invlet)
item *thrown = &(inv.item_by_letter(invlet));
max = throw_range(invlet); // The max distance we can throw
int deviation = 0;
if (skillLevel(sk_throw) < 8)
deviation += rng(0, 8 - skillLevel(sk_throw));
if (skillLevel("throw") < 8)
deviation += rng(0, 8 - skillLevel("throw"));
else
deviation -= skillLevel(sk_throw) - 6;
deviation -= skillLevel("throw") - 6;
deviation += throw_dex_mod();
@@ -959,10 +959,10 @@ void npc::move_to(game *g, int x, int y)
moves = 0;
}
if (recoil > 0) { // Start by dropping recoil a little
if (int(str_cur / 2) + skillLevel(sk_gun) >= recoil)
if (int(str_cur / 2) + skillLevel("gun") >= recoil)
recoil = 0;
else {
recoil -= int(str_cur / 2) + skillLevel(sk_gun);
recoil -= int(str_cur / 2) + skillLevel("gun");
recoil = int(recoil / 2);
}
}
@@ -998,7 +998,8 @@ void npc::move_to(game *g, int x, int y)
else if (g->m.move_cost(x, y) > 0) {
posx = x;
posy = y;
moves -= run_cost(g->m.move_cost(x, y) * 50);
bool diag = trigdist && posx != x && posy != y;
moves -= run_cost(g->m.combined_movecost(posx, posy, x, y), diag);
} else if (g->m.open_door(x, y, (g->m.ter(posx, posy) == t_floor)))
moves -= 100;
else if (g->m.has_flag(bashable, x, y)) {
@@ -1176,10 +1177,10 @@ void npc::move_pause()
{
moves = 0;
if (recoil > 0) {
if (str_cur + 2 * skillLevel(sk_gun) >= recoil)
if (str_cur + 2 * skillLevel("gun") >= recoil)
recoil = 0;
else {
recoil -= str_cur + 2 * skillLevel(sk_gun);
recoil -= str_cur + 2 * skillLevel("gun");
recoil = int(recoil / 2);
}
}
@@ -1462,7 +1463,7 @@ void npc::wield_best_melee(game *g)
item& it = inv.best_for_melee(this);
int best_score = it.melee_value(this);
if (!styles.empty() && // Wield a style if our skills warrant it
best_score < 15 * skillLevel(sk_unarmed) + 8 * skillLevel(sk_melee)) {
best_score < 15 * skillLevel("unarmed") + 8 * skillLevel("melee")) {
// TODO: More intelligent style choosing
wield(g, 0 - rng(1, styles.size()));
return;
@@ -1674,16 +1675,16 @@ void npc::heal_player(game *g, player &patient)
int amount_healed;
if (has_amount("1st_aid", 1)) {
switch (worst) {
case hp_head: amount_healed = 10 + 1.6 * skillLevel(sk_firstaid); break;
case hp_torso: amount_healed = 20 + 3 * skillLevel(sk_firstaid); break;
default: amount_healed = 15 + 2 * skillLevel(sk_firstaid);
case hp_head: amount_healed = 10 + 1.6 * skillLevel("firstaid"); break;
case hp_torso: amount_healed = 20 + 3 * skillLevel("firstaid"); break;
default: amount_healed = 15 + 2 * skillLevel("firstaid");
}
use_charges("1st_aid", 1);
} else if (has_amount("bandages", 1)) {
switch (worst) {
case hp_head: amount_healed = 1 + 1.6 * skillLevel(sk_firstaid); break;
case hp_torso: amount_healed = 4 + 3 * skillLevel(sk_firstaid); break;
default: amount_healed = 3 + 2 * skillLevel(sk_firstaid);
case hp_head: amount_healed = 1 + 1.6 * skillLevel("firstaid"); break;
case hp_torso: amount_healed = 4 + 3 * skillLevel("firstaid"); break;
default: amount_healed = 3 + 2 * skillLevel("firstaid");
}
use_charges("bandages", 1);
}
@@ -1724,16 +1725,16 @@ void npc::heal_self(game *g)
int amount_healed;
if (has_amount("1st_aid", 1)) {
switch (worst) {
case hp_head: amount_healed = 10 + 1.6 * skillLevel(sk_firstaid); break;
case hp_torso: amount_healed = 20 + 3 * skillLevel(sk_firstaid); break;
default: amount_healed = 15 + 2 * skillLevel(sk_firstaid);
case hp_head: amount_healed = 10 + 1.6 * skillLevel("firstaid"); break;
case hp_torso: amount_healed = 20 + 3 * skillLevel("firstaid"); break;
default: amount_healed = 15 + 2 * skillLevel("firstaid");
}
use_charges("1st_aid", 1);
} else if (has_amount("bandages", 1)) {
switch (worst) {
case hp_head: amount_healed = 1 + 1.6 * skillLevel(sk_firstaid); break;
case hp_torso: amount_healed = 4 + 3 * skillLevel(sk_firstaid); break;
default: amount_healed = 3 + 2 * skillLevel(sk_firstaid);
case hp_head: amount_healed = 1 + 1.6 * skillLevel("firstaid"); break;
case hp_torso: amount_healed = 4 + 3 * skillLevel("firstaid"); break;
default: amount_healed = 3 + 2 * skillLevel("firstaid");
}
use_charges("bandages", 1);
} else {
+34 -20
View File
@@ -26,6 +26,10 @@
ret.back().text = txt;\
ret.back().tempvalue = index
#define SELECT_SKIL(txt, skillIn) ret.push_back(talk_response());\
ret.back().text = txt;\
ret.back().skill = skillIn;
#define TRIAL(tr, diff) ret.back().trial = tr;\
ret.back().difficulty = diff
@@ -227,7 +231,7 @@ std::string dynamic_line(talk_topic topic, game *g, npc *p)
case TALK_TRAIN: {
if (g->u.backlog.type == ACT_TRAIN)
return "Shall we resume?";
std::vector<skill> trainable = p->skills_offered_to( &(g->u) );
std::vector<Skill*> trainable = p->skills_offered_to( &(g->u) );
std::vector<itype_id> styles = p->styles_offered_to( &(g->u) );
if (trainable.empty() && styles.empty())
return "Sorry, but it doesn't seem I have anything to teach you.";
@@ -567,6 +571,11 @@ std::vector<talk_response> gen_responses(talk_topic topic, game *g, npc *p)
SUCCESS(TALK_MISSION_SUCCESS);
SUCCESS_ACTION(&talk_function::mission_success);
break;
case MGOAL_GO_TO_TYPE:
RESPONSE("We're here!");
SUCCESS(TALK_MISSION_SUCCESS);
SUCCESS_ACTION(&talk_function::mission_success);
break;
case MGOAL_GO_TO:
case MGOAL_FIND_NPC:
RESPONSE("Here I am.");
@@ -583,6 +592,12 @@ std::vector<talk_response> gen_responses(talk_topic topic, game *g, npc *p)
SUCCESS(TALK_MISSION_SUCCESS);
SUCCESS_ACTION(&talk_function::mission_success);
break;
case MGOAL_RECRUIT_NPC:
case MGOAL_RECRUIT_NPC_CLASS:
RESPONSE("I brought'em.");
SUCCESS(TALK_MISSION_SUCCESS);
SUCCESS_ACTION(&talk_function::mission_success);
break;
default:
RESPONSE("Mission success! I don't know what else to say.");
SUCCESS(TALK_MISSION_SUCCESS);
@@ -737,13 +752,13 @@ std::vector<talk_response> gen_responses(talk_topic topic, game *g, npc *p)
if (g->u.backlog.type == ACT_TRAIN) {
std::stringstream resume;
resume << "Yes, let's resume training " <<
(g->u.backlog.index > 0 ?
skill_name(g->u.backlog.index) :
(g->u.backlog.name != "" ?
Skill::skill(g->u.backlog.name)->name() :
g->itypes[ martial_arts_itype_ids[0-g->u.backlog.index] ]->name);
SELECT_TEMP( resume.str(), g->u.backlog.index);
SUCCESS(TALK_TRAIN_START);
}
std::vector<skill> trainable = p->skills_offered_to( &(g->u) );
std::vector<Skill*> trainable = p->skills_offered_to( &(g->u) );
std::vector<itype_id> styles = p->styles_offered_to( &(g->u) );
if (trainable.empty() && styles.empty()) {
RESPONSE("Oh, okay."); // Nothing to learn here
@@ -757,12 +772,12 @@ std::vector<talk_response> gen_responses(talk_topic topic, game *g, npc *p)
//shift--;
printed++;
std::stringstream skilltext;
skill trained = trainable[i];
Skill* trained = trainable[i];
skilltext << skill_name(trained) << ": " << static_cast<int>(g->u.skillLevel(trained)) <<
skilltext << trained->name() << ": " << static_cast<int>(g->u.skillLevel(trained)) <<
" -> " << g->u.skillLevel(trained) + 1 << " (cost " <<
200 * (g->u.skillLevel(trained) + 1) << ")";
SELECT_TEMP( skilltext.str(), trainable[i] );
SELECT_SKIL( skilltext.str(), trainable[i] );
SUCCESS(TALK_TRAIN_START);
}
if (shift < 0)
@@ -1487,18 +1502,15 @@ void talk_function::set_engagement_all(game *g, npc *p)
void talk_function::start_training(game *g, npc *p)
{
int cost = 0, time = 0;
skill sk_used = sk_null;
//There were some style references here that... didn't do anything. Created but never used.
//TODO: Remove these comments once I'm sure this is correct.
//itype_id style = "null";
if (p->chatbin.tempvalue < 0) {
Skill* sk_used = NULL;
if (p->chatbin.skill == NULL) {
// we're training a martial art style
cost = -800;
// style = itype_id(0 - p->chatbin.tempvalue);
time = 30000;
} else {
sk_used = skill(p->chatbin.tempvalue);
cost = -200 * (1 + g->u.skillLevel(Skill::skill(sk_used)));
time = 10000 + 5000 * g->u.skillLevel(Skill::skill(sk_used));
sk_used = p->chatbin.skill;
cost = -200 * (1 + g->u.skillLevel(sk_used));
time = 10000 + 5000 * g->u.skillLevel(sk_used);
}
// Pay for it
@@ -1507,7 +1519,7 @@ void talk_function::start_training(game *g, npc *p)
else if (!trade(g, p, cost, "Pay for training:"))
return;
// Then receive it
g->u.assign_activity(g, ACT_TRAIN, time, p->chatbin.tempvalue);
g->u.assign_activity(g, ACT_TRAIN, time, p->chatbin.tempvalue, 0, p->chatbin.skill->ident());
}
void parse_tags(std::string &phrase, player *u, npc *me)
@@ -1689,6 +1701,8 @@ talk_topic dialogue::opt(talk_topic topic, game *g)
beta->chatbin.mission_selected = chosen.mission_index;
if (chosen.tempvalue != -1)
beta->chatbin.tempvalue = chosen.tempvalue;
if (chosen.skill != NULL)
beta->chatbin.skill = chosen.skill;
talk_function effect;
if (chosen.trial == TALK_TRIAL_NONE ||
@@ -1765,12 +1779,12 @@ Tab key to switch lists, letters to pick items, Enter to finalize, Esc to quit\n
// Adjust the prices based on your barter skill.
for (int i = 0; i < their_price.size(); i++) {
their_price[i] *= (price_adjustment(g->u.skillLevel(sk_barter)) +
their_price[i] *= (price_adjustment(g->u.skillLevel("barter")) +
(p->int_cur - g->u.int_cur) / 15);
getting_theirs[i] = false;
}
for (int i = 0; i < your_price.size(); i++) {
your_price[i] /= (price_adjustment(g->u.skillLevel(sk_barter)) +
your_price[i] /= (price_adjustment(g->u.skillLevel("barter")) +
(p->int_cur - g->u.int_cur) / 15);
getting_yours[i] = false;
}
@@ -1779,7 +1793,7 @@ Tab key to switch lists, letters to pick items, Enter to finalize, Esc to quit\n
bool focus_them = true; // Is the focus on them?
bool update = true; // Re-draw the screen?
int them_off = 0, you_off = 0;// Offset from the start of the list
char ch, help;
signed char ch, help;
do {
if (update) { // Time to re-draw
+316 -287
View File
@@ -23,6 +23,7 @@ struct oter_t {
const map_extras& embellishments;
bool known_down;
bool known_up;
int mondensity;
};
const map_extras no_extras(0);
@@ -87,7 +88,9 @@ enum oter_id {
ot_s_restaurant_coffee_west,
ot_sub_station_north, ot_sub_station_east, ot_sub_station_south,
ot_sub_station_west,
ot_s_garage_north, ot_s_garage_east, ot_s_garage_south, ot_s_garage_west, ot_cabin, ot_farm, ot_farm_field,
ot_s_garage_north, ot_s_garage_east, ot_s_garage_south, ot_s_garage_west,
ot_cabin_strange, ot_cabin_strange_b, ot_cabin,
ot_farm, ot_farm_field,
ot_police_north, ot_police_east, ot_police_south, ot_police_west,
ot_bank_north, ot_bank_east, ot_bank_south, ot_bank_west,
ot_bar_north, ot_bar_east, ot_bar_south, ot_bar_west,
@@ -102,6 +105,8 @@ enum oter_id {
ot_hospital_entrance, ot_hospital,
ot_public_works_entrance, ot_public_works,
ot_school_1, ot_school_2, ot_school_3, ot_school_4, ot_school_5, ot_school_6, ot_school_7, ot_school_8, ot_school_9,
ot_prison_1, ot_prison_2, ot_prison_3, ot_prison_4, ot_prison_5, ot_prison_6, ot_prison_7, ot_prison_8, ot_prison_9,
ot_prison_b, ot_prison_b_entrance,
ot_hotel_tower_1_1, ot_hotel_tower_1_2, ot_hotel_tower_1_3, ot_hotel_tower_1_4, ot_hotel_tower_1_5, ot_hotel_tower_1_6,
ot_hotel_tower_1_7, ot_hotel_tower_1_8, ot_hotel_tower_1_9,ot_hotel_tower_b_1, ot_hotel_tower_b_2, ot_hotel_tower_b_3,
ot_mansion_entrance, ot_mansion, ot_fema_entrance, ot_fema,
@@ -119,6 +124,7 @@ enum oter_id {
ot_radio_tower,
ot_toxic_dump,
ot_haz_sar_entrance, ot_haz_sar,
ot_haz_sar_entrance_b1, ot_haz_sar_b1,
ot_cave, ot_cave_rat,
// Underground terrain
ot_spider_pit_under,
@@ -152,291 +158,306 @@ enum oter_id {
// Order MUST match enum oter_id above!
const oter_t oterlist[num_ter_types] = {
{"nothing", '%', c_white, 0, no_extras, false, false},
{"crater", 'O', c_red, 2, field_extras, false, false},
{"field", '.', c_brown, 2, field_extras, false, false},
{"dirt lot", 'O', c_brown, 1, field_extras, false, false},
{"forest", 'F', c_green, 3, field_extras, false, false},
{"forest", 'F', c_green, 4, field_extras, false, false},
{"swamp", 'F', c_cyan, 4, field_extras, false, false},
{"bee hive", '8', c_yellow, 3, field_extras, false, false},
{"forest", 'F', c_green, 3, field_extras, false, false},
{"nothing", '%', c_white, 0, no_extras, false, false, 0},
{"crater", 'O', c_red, 2, field_extras, false, false, 0},
{"field", '.', c_brown, 2, field_extras, false, false, 0},
{"dirt lot", 'O', c_brown, 1, field_extras, false, false, 0},
{"forest", 'F', c_green, 3, field_extras, false, false, 0},
{"forest", 'F', c_green, 4, field_extras, false, false, 0},
{"swamp", 'F', c_cyan, 4, field_extras, false, false, 0},
{"bee hive", '8', c_yellow, 3, field_extras, false, false, 0},
{"forest", 'F', c_green, 3, field_extras, false, false, 0},
/* The tile above is a spider pit. */
{"fungal bloom", 'T', c_ltgray, 2, field_extras, false, false},
{"highway", 'H', c_dkgray, 2, road_extras, false, false},
{"highway", '=', c_dkgray, 2, road_extras, false, false},
{"BUG (omdata.h:oterlist)", '%', c_magenta, 0, no_extras, false, false},
{"road", LINE_XOXO, c_dkgray, 2, road_extras, false, false},
{"road", LINE_OXOX, c_dkgray, 2, road_extras, false, false},
{"road", LINE_XXOO, c_dkgray, 2, road_extras, false, false},
{"road", LINE_OXXO, c_dkgray, 2, road_extras, false, false},
{"road", LINE_OOXX, c_dkgray, 2, road_extras, false, false},
{"road", LINE_XOOX, c_dkgray, 2, road_extras, false, false},
{"road", LINE_XXXO, c_dkgray, 2, road_extras, false, false},
{"road", LINE_XXOX, c_dkgray, 2, road_extras, false, false},
{"road", LINE_XOXX, c_dkgray, 2, road_extras, false, false},
{"road", LINE_OXXX, c_dkgray, 2, road_extras, false, false},
{"road", LINE_XXXX, c_dkgray, 2, road_extras, false, false},
{"road, manhole", LINE_XXXX, c_yellow, 2, road_extras, true, false},
{"bridge", '|', c_dkgray, 2, no_extras, false, false},
{"bridge", '-', c_dkgray, 2, no_extras, false, false},
{"river", 'R', c_blue, 1, no_extras, false, false},
{"river bank", 'R', c_ltblue, 1, no_extras, false, false},
{"river bank", 'R', c_ltblue, 1, no_extras, false, false},
{"river bank", 'R', c_ltblue, 1, no_extras, false, false},
{"river bank", 'R', c_ltblue, 1, no_extras, false, false},
{"river bank", 'R', c_ltblue, 1, no_extras, false, false},
{"river bank", 'R', c_ltblue, 1, no_extras, false, false},
{"river bank", 'R', c_ltblue, 1, no_extras, false, false},
{"river bank", 'R', c_ltblue, 1, no_extras, false, false},
{"river bank", 'R', c_ltblue, 1, no_extras, false, false},
{"river bank", 'R', c_ltblue, 1, no_extras, false, false},
{"river bank", 'R', c_ltblue, 1, no_extras, false, false},
{"river bank", 'R', c_ltblue, 1, no_extras, false, false},
{"house", '^', c_ltgreen, 5, build_extras, false, false},
{"house", '>', c_ltgreen, 5, build_extras, false, false},
{"house", 'v', c_ltgreen, 5, build_extras, false, false},
{"house", '<', c_ltgreen, 5, build_extras, false, false},
{"house", '^', c_ltgreen, 5, build_extras, false, false},
{"house", '>', c_ltgreen, 5, build_extras, false, false},
{"house", 'v', c_ltgreen, 5, build_extras, false, false},
{"house", '<', c_ltgreen, 5, build_extras, false, false},
{"parking lot", 'O', c_dkgray, 1, build_extras, false, false},
{"park", 'O', c_green, 2, build_extras, false, false},
{"gas station", '^', c_ltblue, 5, build_extras, false, false},
{"gas station", '>', c_ltblue, 5, build_extras, false, false},
{"gas station", 'v', c_ltblue, 5, build_extras, false, false},
{"gas station", '<', c_ltblue, 5, build_extras, false, false},
{"pharmacy", '^', c_ltred, 5, build_extras, false, false},
{"pharmacy", '>', c_ltred, 5, build_extras, false, false},
{"pharmacy", 'v', c_ltred, 5, build_extras, false, false},
{"pharmacy", '<', c_ltred, 5, build_extras, false, false},
{"doctor's office", '^', i_ltred, 5, build_extras, false, false},
{"doctor's office", '>', i_ltred, 5, build_extras, false, false},
{"doctor's office", 'v', i_ltred, 5, build_extras, false, false},
{"doctor's office", '<', i_ltred, 5, build_extras, false, false},
{"office", '^', c_ltgray, 5, build_extras, false, false},
{"office", '>', c_ltgray, 5, build_extras, false, false},
{"office", 'v', c_ltgray, 5, build_extras, false, false},
{"office", '<', c_ltgray, 5, build_extras, false, false},
{"apartment tower", 'A', c_ltgreen, 5, no_extras, false, false},
{"apartment tower", 'A', c_ltgreen, 5, no_extras, false, false},
{"apartment tower", 'A', c_ltgreen, 5, no_extras, false, false},
{"apartment tower", 'A', c_ltgreen, 5, no_extras, false, false},
{"office tower", 'T', i_ltgray, 5, no_extras, false, false},
{"office tower", 't', i_ltgray, 5, no_extras, false, false},
{"tower parking", 'p', i_ltgray, 5, no_extras, false, false},
{"tower parking", 'p', i_ltgray, 5, no_extras, false, false},
{"church", 'C', c_ltred, 5, build_extras, false, false},
{"church", 'C', c_ltred, 5, build_extras, false, false},
{"church", 'C', c_ltred, 5, build_extras, false, false},
{"church", 'C', c_ltred, 5, build_extras, false, false},
{"cathedral", 'C', i_ltred, 5, no_extras, false, false},
{"cathedral", 'C', i_ltred, 5, no_extras, false, false},
{"cathedral basement", 'C', i_ltred, 5, no_extras, false, false},
{"cathedral basement", 'C', i_ltred, 5, no_extras, false, false},
{"grocery store", '^', c_green, 5, build_extras, false, false},
{"grocery store", '>', c_green, 5, build_extras, false, false},
{"grocery store", 'v', c_green, 5, build_extras, false, false},
{"grocery store", '<', c_green, 5, build_extras, false, false},
{"hardware store", '^', c_cyan, 5, build_extras, false, false},
{"hardware store", '>', c_cyan, 5, build_extras, false, false},
{"hardware store", 'v', c_cyan, 5, build_extras, false, false},
{"hardware store", '<', c_cyan, 5, build_extras, false, false},
{"electronics store", '^', c_yellow, 5, build_extras, false, false},
{"electronics store", '>', c_yellow, 5, build_extras, false, false},
{"electronics store", 'v', c_yellow, 5, build_extras, false, false},
{"electronics store", '<', c_yellow, 5, build_extras, false, false},
{"sporting goods store",'^', c_ltcyan, 5, build_extras, false, false},
{"sporting goods store",'>', c_ltcyan, 5, build_extras, false, false},
{"sporting goods store",'v', c_ltcyan, 5, build_extras, false, false},
{"sporting goods store",'<', c_ltcyan, 5, build_extras, false, false},
{"liquor store", '^', c_magenta, 5, build_extras, false, false},
{"liquor store", '>', c_magenta, 5, build_extras, false, false},
{"liquor store", 'v', c_magenta, 5, build_extras, false, false},
{"liquor store", '<', c_magenta, 5, build_extras, false, false},
{"gun store", '^', c_red, 5, build_extras, false, false},
{"gun store", '>', c_red, 5, build_extras, false, false},
{"gun store", 'v', c_red, 5, build_extras, false, false},
{"gun store", '<', c_red, 5, build_extras, false, false},
{"clothing store", '^', c_blue, 5, build_extras, false, false},
{"clothing store", '>', c_blue, 5, build_extras, false, false},
{"clothing store", 'v', c_blue, 5, build_extras, false, false},
{"clothing store", '<', c_blue, 5, build_extras, false, false},
{"library", '^', c_brown, 5, build_extras, false, false},
{"library", '>', c_brown, 5, build_extras, false, false},
{"library", 'v', c_brown, 5, build_extras, false, false},
{"library", '<', c_brown, 5, build_extras, false, false},
{"restaurant", '^', c_pink, 5, build_extras, false, false},
{"restaurant", '>', c_pink, 5, build_extras, false, false},
{"restaurant", 'v', c_pink, 5, build_extras, false, false},
{"restaurant", '<', c_pink, 5, build_extras, false, false},
{"fast food restaurant", '^', c_pink, 5, build_extras, false, false},
{"fast food restaurant", '>', c_pink, 5, build_extras, false, false},
{"fast food restaurant", 'v', c_pink, 5, build_extras, false, false},
{"fast food restaurant", '<', c_pink, 5, build_extras, false, false},
{"coffee shop", '^', c_pink, 5, build_extras, false, false},
{"coffee shop", '>', c_pink, 5, build_extras, false, false},
{"coffee shop", 'v', c_pink, 5, build_extras, false, false},
{"coffee shop", '<', c_pink, 5, build_extras, false, false},
{"subway station", 'S', c_yellow, 5, build_extras, true, false},
{"subway station", 'S', c_yellow, 5, build_extras, true, false},
{"subway station", 'S', c_yellow, 5, build_extras, true, false},
{"subway station", 'S', c_yellow, 5, build_extras, true, false},
{"garage", 'O', c_white, 5, build_extras, false, false},
{"garage", 'O', c_white, 5, build_extras, false, false},
{"garage", 'O', c_white, 5, build_extras, false, false},
{"garage", 'O', c_white, 5, build_extras, false, false},
{"cabin", 'C', i_green, 5, build_extras, false, false},
{"farm", '^', i_brown, 5, build_extras, false, false},
{"farm field", '#', i_brown, 5, field_extras, false, false},
{"police station", '^', h_yellow, 5, build_extras, false, false},
{"police station", '>', h_yellow, 5, build_extras, false, false},
{"police station", 'v', h_yellow, 5, build_extras, false, false},
{"police station", '<', h_yellow, 5, build_extras, false, false},
{"bank", '$', c_ltgray, 5, no_extras, false, false},
{"bank", '$', c_ltgray, 5, no_extras, false, false},
{"bank", '$', c_ltgray, 5, no_extras, false, false},
{"bank", '$', c_ltgray, 5, no_extras, false, false},
{"bar", '^', i_magenta, 5, build_extras, false, false},
{"bar", '>', i_magenta, 5, build_extras, false, false},
{"bar", 'v', i_magenta, 5, build_extras, false, false},
{"bar", '<', i_magenta, 5, build_extras, false, false},
{"pawn shop", '^', c_white, 5, build_extras, false, false},
{"pawn shop", '>', c_white, 5, build_extras, false, false},
{"pawn shop", 'v', c_white, 5, build_extras, false, false},
{"pawn shop", '<', c_white, 5, build_extras, false, false},
{"mil. surplus", '^', i_ltgray, 5, build_extras, false, false},
{"mil. surplus", '>', i_ltgray, 5, build_extras, false, false},
{"mil. surplus", 'v', i_ltgray, 5, build_extras, false, false},
{"mil. surplus", '<', i_ltgray, 5, build_extras, false, false},
{"furniture store", '^', i_brown, 5, build_extras, false, false},
{"furniture store", '>', i_brown, 5, build_extras, false, false},
{"furniture store", 'v', i_brown, 5, build_extras, false, false},
{"furniture store", '<', i_brown, 5, build_extras, false, false},
{"abandoned storefront", '^', h_dkgray, 5, build_extras, false, false},
{"abandoned storefront", '>', h_dkgray, 5, build_extras, false, false},
{"abandoned storefront", 'v', h_dkgray, 5, build_extras, false, false},
{"abandoned storefront", '<', h_dkgray, 5, build_extras, false, false},
{"megastore", '+', c_ltblue, 5, build_extras, false, false},
{"megastore", 'M', c_blue, 5, build_extras, false, false},
{"hospital", 'H', c_ltred, 5, build_extras, false, false},
{"hospital", 'H', c_red, 5, build_extras, false, false},
{"public works", 'W', c_ltgray, 5, no_extras, false, false},
{"public works", 'w', c_ltgray, 5, no_extras, false, false},
{"regional school", 's', c_ltblue, 5, no_extras, false, false},
{"regional school", 'S', c_ltblue, 5, no_extras, false, false},
{"regional school", 's', c_ltblue, 5, no_extras, false, false},
{"regional school", 's', c_ltblue, 5, no_extras, false, false},
{"regional school", 's', c_ltblue, 5, no_extras, false, false},
{"regional school", 's', c_ltblue, 5, no_extras, false, false},
{"regional school", 's', c_ltblue, 5, no_extras, false, false},
{"regional school", 's', c_ltblue, 5, no_extras, false, false},
{"regional school", 's', c_ltblue, 5, no_extras, false, false},
{"hotel parking", 'h', c_ltblue, 5, no_extras, false, false},
{"hotel parking", 'h', c_ltblue, 5, no_extras, false, false},
{"hotel parking", 'h', c_ltblue, 5, no_extras, false, false},
{"hotel parking", 'h', c_ltblue, 5, no_extras, false, false},
{"hotel entrance", 'H', c_ltblue, 5, no_extras, false, false},
{"hotel parking", 'h', c_ltblue, 5, no_extras, false, false},
{"hotel tower", 'H', c_ltblue, 5, no_extras, false, false},
{"hotel tower", 'H', c_ltblue, 5, no_extras, false, false},
{"hotel tower", 'H', c_ltblue, 5, no_extras, false, false},
{"hotel basement", 'B', c_ltblue, 5, no_extras, false, false},
{"hotel basement", 'B', c_ltblue, 5, no_extras, false, false},
{"hotel basement", 'B', c_ltblue, 5, no_extras, false, false},
{"mansion", 'M', c_ltgreen, 5, build_extras, false, false},
{"mansion", 'M', c_green, 5, build_extras, false, false},
{"fema camp", '+', c_blue, 5, build_extras, false, false},
{"fema camp", 'F', i_blue, 5, build_extras, false, false},
{"radio station", 'X', i_ltgray, 5, build_extras, false, false},
{"radio station", 'X', i_ltgray, 5, build_extras, false, false},
{"radio station", 'X', i_ltgray, 5, build_extras, false, false},
{"radio station", 'X', i_ltgray, 5, build_extras, false, false},
{"evac shelter", '+', c_white, 2, no_extras, true, false},
{"evac shelter", '+', c_white, 2, no_extras, false, true},
{"LMOE shelter", '+', c_red, 2, no_extras, true, false},
{"LMOE shelter", '+', c_red, 2, no_extras, false, true},
{"science lab", 'L', c_ltblue, 5, no_extras, false, false},
{"science lab", 'L', c_blue, 5, no_extras, true, false},
{"science lab", 'L', c_ltblue, 5, no_extras, false, false},
{"science lab", 'L', c_cyan, 5, no_extras, false, false},
{"nuclear plant", 'P', c_ltgreen, 5, no_extras, false, false},
{"nuclear plant", 'P', c_ltgreen, 5, no_extras, false, false},
{"military bunker", 'B', c_dkgray, 2, no_extras, true, true},
{"military outpost", 'M', c_dkgray, 2, build_extras, false, false},
{"missile silo", '0', c_ltgray, 2, no_extras, false, false},
{"missile silo", '0', c_ltgray, 2, no_extras, false, false},
{"strange temple", 'T', c_magenta, 5, no_extras, true, false},
{"strange temple", 'T', c_pink, 5, no_extras, true, false},
{"strange temple", 'T', c_pink, 5, no_extras, false, false},
{"strange temple", 'T', c_yellow, 5, no_extras, false, false},
{"sewage treatment", 'P', c_red, 5, no_extras, true, false},
{"sewage treatment", 'P', c_green, 5, no_extras, false, true},
{"sewage treatment", 'P', c_green, 5, no_extras, false, false},
{"mine entrance", 'M', c_ltgray, 5, no_extras, true, false},
{"mine shaft", 'O', c_dkgray, 5, no_extras, true, true},
{"mine", 'M', c_brown, 2, no_extras, false, false},
{"mine", 'M', c_brown, 2, no_extras, false, false},
{"mine", 'M', c_brown, 2, no_extras, false, false},
{"spiral cavern", '@', c_pink, 2, no_extras, false, false},
{"spiral cavern", '@', c_pink, 2, no_extras, false, false},
{"radio tower", 'X', c_ltgray, 2, no_extras, false, false},
{"toxic waste dump", 'D', c_pink, 2, no_extras, false, false},
{"hazardous waste sarcophagus", 'X', c_ltred, 5, no_extras, false, false},
{"hazardous waste sarcophagus", 'X', c_pink, 5, no_extras, false, false},
{"cave", 'C', c_brown, 2, field_extras, false, false},
{"rat cave", 'C', c_dkgray, 2, no_extras, true, false},
{"cavern", '0', c_ltgray, 2, no_extras, false, false},
{"anthill", '%', c_brown, 2, no_extras, true, false},
{"solid rock", '%', c_dkgray, 5, no_extras, false, false},
{"rift", '^', c_red, 2, no_extras, false, false},
{"hellmouth", '^', c_ltred, 2, no_extras, true, false},
{"slime pit", '~', c_ltgreen, 2, no_extras, true, false},
{"slime pit", '~', c_ltgreen, 2, no_extras, false, false},
{"triffid grove", 'T', c_ltred, 5, no_extras, true, false},
{"triffid roots", 'T', c_ltred, 5, no_extras, true, true},
{"triffid heart", 'T', c_red, 5, no_extras, false, true},
{"basement", 'O', c_dkgray, 5, no_extras, false, true},
{"subway station", 'S', c_yellow, 5, subway_extras, false, true},
{"subway", LINE_XOXO, c_dkgray, 5, subway_extras, false, false},
{"subway", LINE_OXOX, c_dkgray, 5, subway_extras, false, false},
{"subway", LINE_XXOO, c_dkgray, 5, subway_extras, false, false},
{"subway", LINE_OXXO, c_dkgray, 5, subway_extras, false, false},
{"subway", LINE_OOXX, c_dkgray, 5, subway_extras, false, false},
{"subway", LINE_XOOX, c_dkgray, 5, subway_extras, false, false},
{"subway", LINE_XXXO, c_dkgray, 5, subway_extras, false, false},
{"subway", LINE_XXOX, c_dkgray, 5, subway_extras, false, false},
{"subway", LINE_XOXX, c_dkgray, 5, subway_extras, false, false},
{"subway", LINE_OXXX, c_dkgray, 5, subway_extras, false, false},
{"subway", LINE_XXXX, c_dkgray, 5, subway_extras, false, false},
{"sewer", LINE_XOXO, c_green, 5, no_extras, false, false},
{"sewer", LINE_OXOX, c_green, 5, no_extras, false, false},
{"sewer", LINE_XXOO, c_green, 5, no_extras, false, false},
{"sewer", LINE_OXXO, c_green, 5, no_extras, false, false},
{"sewer", LINE_OOXX, c_green, 5, no_extras, false, false},
{"sewer", LINE_XOOX, c_green, 5, no_extras, false, false},
{"sewer", LINE_XXXO, c_green, 5, no_extras, false, false},
{"sewer", LINE_XXOX, c_green, 5, no_extras, false, false},
{"sewer", LINE_XOXX, c_green, 5, no_extras, false, false},
{"sewer", LINE_OXXX, c_green, 5, no_extras, false, false},
{"sewer", LINE_XXXX, c_green, 5, no_extras, false, false},
{"ant tunnel", LINE_XOXO, c_brown, 5, no_extras, false, false},
{"ant tunnel", LINE_OXOX, c_brown, 5, no_extras, false, false},
{"ant tunnel", LINE_XXOO, c_brown, 5, no_extras, false, false},
{"ant tunnel", LINE_OXXO, c_brown, 5, no_extras, false, false},
{"ant tunnel", LINE_OOXX, c_brown, 5, no_extras, false, false},
{"ant tunnel", LINE_XOOX, c_brown, 5, no_extras, false, false},
{"ant tunnel", LINE_XXXO, c_brown, 5, no_extras, false, false},
{"ant tunnel", LINE_XXOX, c_brown, 5, no_extras, false, false},
{"ant tunnel", LINE_XOXX, c_brown, 5, no_extras, false, false},
{"ant tunnel", LINE_OXXX, c_brown, 5, no_extras, false, false},
{"ant tunnel", LINE_XXXX, c_brown, 5, no_extras, false, false},
{"ant food storage", 'O', c_green, 5, no_extras, false, false},
{"ant larva chamber", 'O', c_white, 5, no_extras, false, false},
{"ant queen chamber", 'O', c_red, 5, no_extras, false, false},
{"cavern", '0', c_ltgray, 5, no_extras, false, false},
{"tutorial room", 'O', c_cyan, 5, no_extras, false, false}
{"fungal bloom", 'T', c_ltgray, 2, field_extras, false, false, 0},
{"highway", 'H', c_dkgray, 2, road_extras, false, false, 0},
{"highway", '=', c_dkgray, 2, road_extras, false, false, 0},
{"BUG (omdata.h:oterlist)", '%', c_magenta, 0, no_extras, false, false, 0},
{"road", LINE_XOXO, c_dkgray, 2, road_extras, false, false, 0},
{"road", LINE_OXOX, c_dkgray, 2, road_extras, false, false, 0},
{"road", LINE_XXOO, c_dkgray, 2, road_extras, false, false, 0},
{"road", LINE_OXXO, c_dkgray, 2, road_extras, false, false, 0},
{"road", LINE_OOXX, c_dkgray, 2, road_extras, false, false, 0},
{"road", LINE_XOOX, c_dkgray, 2, road_extras, false, false, 0},
{"road", LINE_XXXO, c_dkgray, 2, road_extras, false, false, 0},
{"road", LINE_XXOX, c_dkgray, 2, road_extras, false, false, 0},
{"road", LINE_XOXX, c_dkgray, 2, road_extras, false, false, 0},
{"road", LINE_OXXX, c_dkgray, 2, road_extras, false, false, 0},
{"road", LINE_XXXX, c_dkgray, 2, road_extras, false, false, 0},
{"road, manhole", LINE_XXXX, c_yellow, 2, road_extras, true, false, 0},
{"bridge", '|', c_dkgray, 2, no_extras, false, false, 0},
{"bridge", '-', c_dkgray, 2, no_extras, false, false, 0},
{"river", 'R', c_blue, 1, no_extras, false, false, 0},
{"river bank", 'R', c_ltblue, 1, no_extras, false, false, 0},
{"river bank", 'R', c_ltblue, 1, no_extras, false, false, 0},
{"river bank", 'R', c_ltblue, 1, no_extras, false, false, 0},
{"river bank", 'R', c_ltblue, 1, no_extras, false, false, 0},
{"river bank", 'R', c_ltblue, 1, no_extras, false, false, 0},
{"river bank", 'R', c_ltblue, 1, no_extras, false, false, 0},
{"river bank", 'R', c_ltblue, 1, no_extras, false, false, 0},
{"river bank", 'R', c_ltblue, 1, no_extras, false, false, 0},
{"river bank", 'R', c_ltblue, 1, no_extras, false, false, 0},
{"river bank", 'R', c_ltblue, 1, no_extras, false, false, 0},
{"river bank", 'R', c_ltblue, 1, no_extras, false, false, 0},
{"river bank", 'R', c_ltblue, 1, no_extras, false, false, 0},
{"house", '^', c_ltgreen, 5, build_extras, false, false, 2},
{"house", '>', c_ltgreen, 5, build_extras, false, false, 2},
{"house", 'v', c_ltgreen, 5, build_extras, false, false, 2},
{"house", '<', c_ltgreen, 5, build_extras, false, false, 2},
{"house", '^', c_ltgreen, 5, build_extras, false, false, 2},
{"house", '>', c_ltgreen, 5, build_extras, false, false, 2},
{"house", 'v', c_ltgreen, 5, build_extras, false, false, 2},
{"house", '<', c_ltgreen, 5, build_extras, false, false, 2},
{"parking lot", 'O', c_dkgray, 1, build_extras, false, false, 2},
{"park", 'O', c_green, 2, build_extras, false, false, 2},
{"gas station", '^', c_ltblue, 5, build_extras, false, false, 2},
{"gas station", '>', c_ltblue, 5, build_extras, false, false, 2},
{"gas station", 'v', c_ltblue, 5, build_extras, false, false, 2},
{"gas station", '<', c_ltblue, 5, build_extras, false, false, 2},
{"pharmacy", '^', c_ltred, 5, build_extras, false, false, 2},
{"pharmacy", '>', c_ltred, 5, build_extras, false, false, 2},
{"pharmacy", 'v', c_ltred, 5, build_extras, false, false, 2},
{"pharmacy", '<', c_ltred, 5, build_extras, false, false, 2},
{"doctor's office", '^', i_ltred, 5, build_extras, false, false, 2},
{"doctor's office", '>', i_ltred, 5, build_extras, false, false, 2},
{"doctor's office", 'v', i_ltred, 5, build_extras, false, false, 2},
{"doctor's office", '<', i_ltred, 5, build_extras, false, false, 2},
{"office", '^', c_ltgray, 5, build_extras, false, false, 2},
{"office", '>', c_ltgray, 5, build_extras, false, false, 2},
{"office", 'v', c_ltgray, 5, build_extras, false, false, 2},
{"office", '<', c_ltgray, 5, build_extras, false, false, 2},
{"apartment tower", 'A', c_ltgreen, 5, no_extras, false, false, 2},
{"apartment tower", 'A', c_ltgreen, 5, no_extras, false, false, 2},
{"apartment tower", 'A', c_ltgreen, 5, no_extras, false, false, 2},
{"apartment tower", 'A', c_ltgreen, 5, no_extras, false, false, 2},
{"office tower", 'T', i_ltgray, 5, no_extras, false, false, 2},
{"office tower", 't', i_ltgray, 5, no_extras, false, false, 2},
{"tower parking", 'p', i_ltgray, 5, no_extras, false, false, 2},
{"tower parking", 'p', i_ltgray, 5, no_extras, false, false, 2},
{"church", 'C', c_ltred, 5, build_extras, false, false, 2},
{"church", 'C', c_ltred, 5, build_extras, false, false, 2},
{"church", 'C', c_ltred, 5, build_extras, false, false, 2},
{"church", 'C', c_ltred, 5, build_extras, false, false, 2},
{"cathedral", 'C', i_ltred, 5, no_extras, false, false, 2},
{"cathedral", 'C', i_ltred, 5, no_extras, false, false, 2},
{"cathedral basement", 'C', i_ltred, 5, no_extras, false, false, 2},
{"cathedral basement", 'C', i_ltred, 5, no_extras, false, false, 2},
{"grocery store", '^', c_green, 5, build_extras, false, false, 2},
{"grocery store", '>', c_green, 5, build_extras, false, false, 2},
{"grocery store", 'v', c_green, 5, build_extras, false, false, 2},
{"grocery store", '<', c_green, 5, build_extras, false, false, 2},
{"hardware store", '^', c_cyan, 5, build_extras, false, false, 2},
{"hardware store", '>', c_cyan, 5, build_extras, false, false, 2},
{"hardware store", 'v', c_cyan, 5, build_extras, false, false, 2},
{"hardware store", '<', c_cyan, 5, build_extras, false, false, 2},
{"electronics store", '^', c_yellow, 5, build_extras, false, false, 2},
{"electronics store", '>', c_yellow, 5, build_extras, false, false, 2},
{"electronics store", 'v', c_yellow, 5, build_extras, false, false, 2},
{"electronics store", '<', c_yellow, 5, build_extras, false, false, 2},
{"sporting goods store",'^', c_ltcyan, 5, build_extras, false, false, 2},
{"sporting goods store",'>', c_ltcyan, 5, build_extras, false, false, 2},
{"sporting goods store",'v', c_ltcyan, 5, build_extras, false, false, 2},
{"sporting goods store",'<', c_ltcyan, 5, build_extras, false, false, 2},
{"liquor store", '^', c_magenta, 5, build_extras, false, false, 2},
{"liquor store", '>', c_magenta, 5, build_extras, false, false, 2},
{"liquor store", 'v', c_magenta, 5, build_extras, false, false, 2},
{"liquor store", '<', c_magenta, 5, build_extras, false, false, 2},
{"gun store", '^', c_red, 5, build_extras, false, false, 2},
{"gun store", '>', c_red, 5, build_extras, false, false, 2},
{"gun store", 'v', c_red, 5, build_extras, false, false, 2},
{"gun store", '<', c_red, 5, build_extras, false, false, 2},
{"clothing store", '^', c_blue, 5, build_extras, false, false, 2},
{"clothing store", '>', c_blue, 5, build_extras, false, false, 2},
{"clothing store", 'v', c_blue, 5, build_extras, false, false, 2},
{"clothing store", '<', c_blue, 5, build_extras, false, false, 2},
{"library", '^', c_brown, 5, build_extras, false, false, 2},
{"library", '>', c_brown, 5, build_extras, false, false, 2},
{"library", 'v', c_brown, 5, build_extras, false, false, 2},
{"library", '<', c_brown, 5, build_extras, false, false, 2},
{"restaurant", '^', c_pink, 5, build_extras, false, false, 2},
{"restaurant", '>', c_pink, 5, build_extras, false, false, 2},
{"restaurant", 'v', c_pink, 5, build_extras, false, false, 2},
{"restaurant", '<', c_pink, 5, build_extras, false, false, 2},
{"fast food restaurant", '^', c_pink, 5, build_extras, false, false, 2},
{"fast food restaurant", '>', c_pink, 5, build_extras, false, false, 2},
{"fast food restaurant", 'v', c_pink, 5, build_extras, false, false, 2},
{"fast food restaurant", '<', c_pink, 5, build_extras, false, false, 2},
{"coffee shop", '^', c_pink, 5, build_extras, false, false, 2},
{"coffee shop", '>', c_pink, 5, build_extras, false, false, 2},
{"coffee shop", 'v', c_pink, 5, build_extras, false, false, 2},
{"coffee shop", '<', c_pink, 5, build_extras, false, false, 2},
{"subway station", 'S', c_yellow, 5, build_extras, true, false, 2},
{"subway station", 'S', c_yellow, 5, build_extras, true, false, 2},
{"subway station", 'S', c_yellow, 5, build_extras, true, false, 2},
{"subway station", 'S', c_yellow, 5, build_extras, true, false, 2},
{"garage", 'O', c_white, 5, build_extras, false, false, 2},
{"garage", 'O', c_white, 5, build_extras, false, false, 2},
{"garage", 'O', c_white, 5, build_extras, false, false, 2},
{"garage", 'O', c_white, 5, build_extras, false, false, 2},
{"forest", 'F', c_green, 5, field_extras, false, false, 0}, //lost cabin
{"cabin basement", 'C', i_green, 5, build_extras, false, false, 0},
{"cabin", 'C', i_green, 5, build_extras, false, false, 2},
{"farm", '^', i_brown, 5, build_extras, false, false, 2},
{"farm field", '#', i_brown, 5, field_extras, false, false, 2},
{"police station", '^', h_yellow, 5, build_extras, false, false, 2},
{"police station", '>', h_yellow, 5, build_extras, false, false, 2},
{"police station", 'v', h_yellow, 5, build_extras, false, false, 2},
{"police station", '<', h_yellow, 5, build_extras, false, false, 2},
{"bank", '$', c_ltgray, 5, no_extras, false, false, 2},
{"bank", '$', c_ltgray, 5, no_extras, false, false, 2},
{"bank", '$', c_ltgray, 5, no_extras, false, false, 2},
{"bank", '$', c_ltgray, 5, no_extras, false, false, 2},
{"bar", '^', i_magenta, 5, build_extras, false, false, 2},
{"bar", '>', i_magenta, 5, build_extras, false, false, 2},
{"bar", 'v', i_magenta, 5, build_extras, false, false, 2},
{"bar", '<', i_magenta, 5, build_extras, false, false, 2},
{"pawn shop", '^', c_white, 5, build_extras, false, false, 2},
{"pawn shop", '>', c_white, 5, build_extras, false, false, 2},
{"pawn shop", 'v', c_white, 5, build_extras, false, false, 2},
{"pawn shop", '<', c_white, 5, build_extras, false, false, 2},
{"mil. surplus", '^', i_ltgray, 5, build_extras, false, false, 2},
{"mil. surplus", '>', i_ltgray, 5, build_extras, false, false, 2},
{"mil. surplus", 'v', i_ltgray, 5, build_extras, false, false, 2},
{"mil. surplus", '<', i_ltgray, 5, build_extras, false, false, 2},
{"furniture store", '^', i_brown, 5, build_extras, false, false, 2},
{"furniture store", '>', i_brown, 5, build_extras, false, false, 2},
{"furniture store", 'v', i_brown, 5, build_extras, false, false, 2},
{"furniture store", '<', i_brown, 5, build_extras, false, false, 2},
{"abandoned storefront", '^', h_dkgray, 5, build_extras, false, false, 2},
{"abandoned storefront", '>', h_dkgray, 5, build_extras, false, false, 2},
{"abandoned storefront", 'v', h_dkgray, 5, build_extras, false, false, 2},
{"abandoned storefront", '<', h_dkgray, 5, build_extras, false, false, 2},
{"megastore", '+', c_ltblue, 5, build_extras, false, false, 2},
{"megastore", 'M', c_blue, 5, build_extras, false, false, 2},
{"hospital", 'H', c_ltred, 5, build_extras, false, false, 2},
{"hospital", 'H', c_red, 5, build_extras, false, false, 2},
{"public works", 'W', c_ltgray, 5, no_extras, false, false, 2},
{"public works", 'w', c_ltgray, 5, no_extras, false, false, 2},
{"regional school", 's', c_ltblue, 5, no_extras, false, false, 2},
{"regional school", 'S', c_ltblue, 5, no_extras, false, false, 2},
{"regional school", 's', c_ltblue, 5, no_extras, false, false, 2},
{"regional school", 's', c_ltblue, 5, no_extras, false, false, 2},
{"regional school", 's', c_ltblue, 5, no_extras, false, false, 2},
{"regional school", 's', c_ltblue, 5, no_extras, false, false, 2},
{"regional school", 's', c_ltblue, 5, no_extras, false, false, 2},
{"regional school", 's', c_ltblue, 5, no_extras, false, false, 2},
{"regional school", 's', c_ltblue, 5, no_extras, false, false, 2},
{"prison", 'p', i_ltblue, 5, no_extras, false, false, 0},
{"prison", 'P', i_ltblue, 5, no_extras, false, false, 0},
{"prison", 'p', i_ltblue, 5, no_extras, false, false, 0},
{"prison", 'p', i_ltblue, 5, no_extras, false, false, 0},
{"prison", 'p', i_ltblue, 5, no_extras, false, false, 0},
{"prison", 'p', i_ltblue, 5, no_extras, false, false, 0},
{"prison", 'p', i_ltblue, 5, no_extras, false, false, 0},
{"prison", 'p', i_ltblue, 5, no_extras, false, false, 0},
{"prison", 'p', i_ltblue, 5, no_extras, false, false, 0},
{"prison", 'p', i_ltblue, 5, no_extras, false, false, 0},
{"prison", 'p', i_ltblue, 5, no_extras, false, false, 0},
{"hotel parking", 'h', c_ltblue, 5, no_extras, false, false, 2},
{"hotel parking", 'h', c_ltblue, 5, no_extras, false, false, 2},
{"hotel parking", 'h', c_ltblue, 5, no_extras, false, false, 2},
{"hotel parking", 'h', c_ltblue, 5, no_extras, false, false, 2},
{"hotel entrance", 'H', c_ltblue, 5, no_extras, false, false, 2},
{"hotel parking", 'h', c_ltblue, 5, no_extras, false, false, 2},
{"hotel tower", 'H', c_ltblue, 5, no_extras, false, false, 2},
{"hotel tower", 'H', c_ltblue, 5, no_extras, false, false, 2},
{"hotel tower", 'H', c_ltblue, 5, no_extras, false, false, 2},
{"hotel basement", 'B', c_ltblue, 5, no_extras, false, false, 2},
{"hotel basement", 'B', c_ltblue, 5, no_extras, false, false, 2},
{"hotel basement", 'B', c_ltblue, 5, no_extras, false, false, 2},
{"mansion", 'M', c_ltgreen, 5, build_extras, false, false, 2},
{"mansion", 'M', c_green, 5, build_extras, false, false, 2},
{"fema camp", '+', c_blue, 5, build_extras, false, false, 0},
{"fema camp", 'F', i_blue, 5, build_extras, false, false, 0},
{"radio station", 'X', i_ltgray, 5, build_extras, false, false, 0},
{"radio station", 'X', i_ltgray, 5, build_extras, false, false, 0},
{"radio station", 'X', i_ltgray, 5, build_extras, false, false, 0},
{"radio station", 'X', i_ltgray, 5, build_extras, false, false, 0},
{"evac shelter", '+', c_white, 2, no_extras, true, false, 0},
{"evac shelter", '+', c_white, 2, no_extras, false, true, 0},
{"LMOE shelter", '+', c_red, 2, no_extras, true, false, 0},
{"LMOE shelter", '+', c_red, 2, no_extras, false, true, 0},
{"science lab", 'L', c_ltblue, 5, no_extras, false, false, 0},
{"science lab", 'L', c_blue, 5, no_extras, true, false, 0},
{"science lab", 'L', c_ltblue, 5, no_extras, false, false, 0},
{"science lab", 'L', c_cyan, 5, no_extras, false, false, 0},
{"nuclear plant", 'P', c_ltgreen, 5, no_extras, false, false, 0},
{"nuclear plant", 'P', c_ltgreen, 5, no_extras, false, false, 0},
{"military bunker", 'B', c_dkgray, 2, no_extras, true, true, 0},
{"military outpost", 'M', c_dkgray, 2, build_extras, false, false, 0},
{"missile silo", '0', c_ltgray, 2, no_extras, false, false, 0},
{"missile silo", '0', c_ltgray, 2, no_extras, false, false, 0},
{"strange temple", 'T', c_magenta, 5, no_extras, true, false, 0},
{"strange temple", 'T', c_pink, 5, no_extras, true, false, 0},
{"strange temple", 'T', c_pink, 5, no_extras, false, false, 0},
{"strange temple", 'T', c_yellow, 5, no_extras, false, false, 0},
{"sewage treatment", 'P', c_red, 5, no_extras, true, false, 0},
{"sewage treatment", 'P', c_green, 5, no_extras, false, true, 0},
{"sewage treatment", 'P', c_green, 5, no_extras, false, false, 0},
{"mine entrance", 'M', c_ltgray, 5, no_extras, true, false, 0},
{"mine shaft", 'O', c_dkgray, 5, no_extras, true, true, 0},
{"mine", 'M', c_brown, 2, no_extras, false, false, 0},
{"mine", 'M', c_brown, 2, no_extras, false, false, 0},
{"mine", 'M', c_brown, 2, no_extras, false, false, 0},
{"spiral cavern", '@', c_pink, 2, no_extras, false, false, 0},
{"spiral cavern", '@', c_pink, 2, no_extras, false, false, 0},
{"radio tower", 'X', c_ltgray, 2, no_extras, false, false, 0},
{"toxic waste dump", 'D', c_pink, 2, no_extras, false, false, 0},
{"hazardous waste sarcophagus", 'X', c_ltred, 5, no_extras, false, false, 0},
{"hazardous waste sarcophagus", 'X', c_pink, 5, no_extras, false, false, 0},
{"hazardous waste sarcophagus", 'X', c_pink, 5, no_extras, false, false, 0},
{"hazardous waste sarcophagus", 'X', c_pink, 5, no_extras, false, false, 0},
{"cave", 'C', c_brown, 2, field_extras, false, false, 0},
{"rat cave", 'C', c_dkgray, 2, no_extras, true, false, 0},
{"cavern", '0', c_ltgray, 2, no_extras, false, false, 0},
{"anthill", '%', c_brown, 2, no_extras, true, false, 0},
{"solid rock", '%', c_dkgray, 5, no_extras, false, false, 0},
{"rift", '^', c_red, 2, no_extras, false, false, 0},
{"hellmouth", '^', c_ltred, 2, no_extras, true, false, 0},
{"slime pit", '~', c_ltgreen, 2, no_extras, false, false, 0},
{"slime pit", '~', c_ltgreen, 2, no_extras, true, false, 0},
{"triffid grove", 'T', c_ltred, 5, no_extras, true, false, 0},
{"triffid roots", 'T', c_ltred, 5, no_extras, true, true, 0},
{"triffid heart", 'T', c_red, 5, no_extras, false, true, 0},
{"basement", 'O', c_dkgray, 5, no_extras, false, true, 0},
{"subway station", 'S', c_yellow, 5, subway_extras, false, true, 0},
{"subway", LINE_XOXO, c_dkgray, 5, subway_extras, false, false, 0},
{"subway", LINE_OXOX, c_dkgray, 5, subway_extras, false, false, 0},
{"subway", LINE_XXOO, c_dkgray, 5, subway_extras, false, false, 0},
{"subway", LINE_OXXO, c_dkgray, 5, subway_extras, false, false, 0},
{"subway", LINE_OOXX, c_dkgray, 5, subway_extras, false, false, 0},
{"subway", LINE_XOOX, c_dkgray, 5, subway_extras, false, false, 0},
{"subway", LINE_XXXO, c_dkgray, 5, subway_extras, false, false, 0},
{"subway", LINE_XXOX, c_dkgray, 5, subway_extras, false, false, 0},
{"subway", LINE_XOXX, c_dkgray, 5, subway_extras, false, false, 0},
{"subway", LINE_OXXX, c_dkgray, 5, subway_extras, false, false, 0},
{"subway", LINE_XXXX, c_dkgray, 5, subway_extras, false, false, 0},
{"sewer", LINE_XOXO, c_green, 5, no_extras, false, false, 0},
{"sewer", LINE_OXOX, c_green, 5, no_extras, false, false, 0},
{"sewer", LINE_XXOO, c_green, 5, no_extras, false, false, 0},
{"sewer", LINE_OXXO, c_green, 5, no_extras, false, false, 0},
{"sewer", LINE_OOXX, c_green, 5, no_extras, false, false, 0},
{"sewer", LINE_XOOX, c_green, 5, no_extras, false, false, 0},
{"sewer", LINE_XXXO, c_green, 5, no_extras, false, false, 0},
{"sewer", LINE_XXOX, c_green, 5, no_extras, false, false, 0},
{"sewer", LINE_XOXX, c_green, 5, no_extras, false, false, 0},
{"sewer", LINE_OXXX, c_green, 5, no_extras, false, false, 0},
{"sewer", LINE_XXXX, c_green, 5, no_extras, false, false, 0},
{"ant tunnel", LINE_XOXO, c_brown, 5, no_extras, false, false, 0},
{"ant tunnel", LINE_OXOX, c_brown, 5, no_extras, false, false, 0},
{"ant tunnel", LINE_XXOO, c_brown, 5, no_extras, false, false, 0},
{"ant tunnel", LINE_OXXO, c_brown, 5, no_extras, false, false, 0},
{"ant tunnel", LINE_OOXX, c_brown, 5, no_extras, false, false, 0},
{"ant tunnel", LINE_XOOX, c_brown, 5, no_extras, false, false, 0},
{"ant tunnel", LINE_XXXO, c_brown, 5, no_extras, false, false, 0},
{"ant tunnel", LINE_XXOX, c_brown, 5, no_extras, false, false, 0},
{"ant tunnel", LINE_XOXX, c_brown, 5, no_extras, false, false, 0},
{"ant tunnel", LINE_OXXX, c_brown, 5, no_extras, false, false, 0},
{"ant tunnel", LINE_XXXX, c_brown, 5, no_extras, false, false, 0},
{"ant food storage", 'O', c_green, 5, no_extras, false, false, 0},
{"ant larva chamber", 'O', c_white, 5, no_extras, false, false, 0},
{"ant queen chamber", 'O', c_red, 5, no_extras, false, false, 0},
{"cavern", '0', c_ltgray, 5, no_extras, false, false, 0},
{"tutorial room", 'O', c_cyan, 5, no_extras, false, false, 0}
};
// Overmap specials--these are "special encounters," dungeons, nests, etc.
@@ -503,6 +524,7 @@ enum omspec_id
OMSPEC_HOUSE,
OMSPEC_GAS,
OMSPEC_CABIN,
OMSPEC_CABIN_STRANGE,
OMSPEC_LMOE,
OMSPEC_FARM,
OMSPEC_TEMPLE,
@@ -522,6 +544,7 @@ enum omspec_id
OMSPEC_OFFICE_TOWER,
OMSPEC_CATHEDRAL,
OMSPEC_SCHOOL,
OMSPEC_PRISON,
OMSPEC_HOTEL_TOWER,
OMSPEC_SEWAGE,
OMSPEC_MINE,
@@ -558,6 +581,9 @@ const overmap_special overmap_specials[NUM_OMSPECS] = {
{ot_cabin, 0, 30, 20, -1, "GROUP_NULL", 0, 0, 0, 0, // Woods cabin
&omspec_place::forest, mfb(OMS_FLAG_CLASSIC)},
{ot_cabin_strange, 1, 1, 20, -1, "GROUP_NULL", 0, 0, 0, 0, // Hidden cabin
&omspec_place::forest, mfb(OMS_FLAG_CLASSIC)},
{ot_lmoe, 0, 3, 20, -1, "GROUP_NULL", 0, 0, 0, 0,
&omspec_place::wilderness, mfb(OMS_FLAG_CLASSIC)},
@@ -616,6 +642,9 @@ const overmap_special overmap_specials[NUM_OMSPECS] = {
{ot_school_2, 1, 3, 1, 5, "GROUP_NULL", 0, 0, 0, 0,
&omspec_place::wilderness, mfb(OMS_FLAG_ROAD) | mfb(OMS_FLAG_CLASSIC) | mfb(OMS_FLAG_3X3_FIXED)},
{ot_prison_2, 1, 1, 3, -1, "GROUP_NULL", 0, 0, 0, 0,
&omspec_place::land, mfb(OMS_FLAG_ROAD) | mfb(OMS_FLAG_CLASSIC) | mfb(OMS_FLAG_3X3_FIXED)},
{ot_hotel_tower_1_2, 1, 4, -1, 4, "GROUP_NULL", 0, 0, 0, 0,
&omspec_place::wilderness, mfb(OMS_FLAG_ROAD) | mfb(OMS_FLAG_CLASSIC) | mfb(OMS_FLAG_3X3_FIXED)},
@@ -627,13 +656,13 @@ const overmap_special overmap_specials[NUM_OMSPECS] = {
&omspec_place::wilderness, mfb(OMS_FLAG_PARKING_LOT)},
// Terrain MIN MAX DISTANCE
{ot_anthill, 0, 30, 10, -1, "GROUP_ANT", 10, 30, 1000, 2000,
{ot_anthill, 0, 30, 10, -1, "GROUP_ANT", 1000, 2000, 10, 30,
&omspec_place::wilderness, 0},
{ot_spider_pit, 0,500, 0, -1, "GROUP_NULL", 0, 0, 0, 0,
&omspec_place::forest, 0},
{ot_slimepit, 0, 4, 0, -1, "GROUP_GOO", 2, 10, 100, 200,
{ot_slimepit_down, 0, 4, 0, -1, "GROUP_GOO", 100, 200, 2, 10,
&omspec_place::land, 0},
{ot_fungal_bloom, 0, 3, 5, -1, "GROUP_FUNGI", 600, 1200, 30, 50,
+498 -384
View File
@@ -10,6 +10,8 @@
option_table OPTIONS;
bool trigdist;
option_key lookup_option_key(std::string id);
bool option_is_bool(option_key id);
void create_default_options();
@@ -17,421 +19,519 @@ std::string options_header();
void game::show_options()
{
WINDOW* w_options_border = newwin(25, 80, (TERMY > 25) ? (TERMY-25)/2 : 0, (TERMX > 80) ? (TERMX-80)/2 : 0);
WINDOW* w_options = newwin(23, 78, 1 + ((TERMY > 25) ? (TERMY-25)/2 : 0), 1 + ((TERMX > 80) ? (TERMX-80)/2 : 0));
WINDOW* w_options_border = newwin(25, 80, (TERMY > 25) ? (TERMY-25)/2 : 0, (TERMX > 80) ? (TERMX-80)/2 : 0);
WINDOW* w_options = newwin(23, 78, 1 + ((TERMY > 25) ? (TERMY-25)/2 : 0), 1 + ((TERMX > 80) ? (TERMX-80)/2 : 0));
int offset = 1;
const int MAX_LINE = 22;
int line = 0;
char ch = ' ';
bool changed_options = false;
bool needs_refresh = true;
wborder(w_options_border, LINE_XOXO, LINE_XOXO, LINE_OXOX, LINE_OXOX,
LINE_OXXO, LINE_OOXX, LINE_XXOO, LINE_XOOX);
mvwprintz(w_options_border, 0, 36, c_ltred, " OPTIONS ");
wrefresh(w_options_border);
do {
// TODO: change instructions
if (needs_refresh) {
werase(w_options);
mvwprintz(w_options, 0, 40, c_white, "Use up/down keys to scroll through");
mvwprintz(w_options, 1, 40, c_white, "available options.");
mvwprintz(w_options, 2, 40, c_white, "Use left/right keys to toggle.");
mvwprintz(w_options, 3, 40, c_white, "Press ESC or q to return. ");
// highlight options for option descriptions
std::string tmp = option_desc(option_key(offset + line));
std::string out;
size_t pos;
int displayline = 5;
int offset = 1;
const int MAX_LINE = 22;
int line = 0;
char ch = ' ';
bool changed_options = false;
bool needs_refresh = true;
wborder(w_options_border, LINE_XOXO, LINE_XOXO, LINE_OXOX, LINE_OXOX,
LINE_OXXO, LINE_OOXX, LINE_XXOO, LINE_XOOX);
mvwprintz(w_options_border, 0, 36, c_ltred, " OPTIONS ");
wrefresh(w_options_border);
do {
pos = tmp.find_first_of('\n');
out = tmp.substr(0, pos);
mvwprintz(w_options, displayline, 40, c_white, out.c_str());
tmp = tmp.substr(pos + 1);
displayline++;
} while (pos != std::string::npos && displayline < 12);
needs_refresh = false;
}
// TODO: change instructions
if(needs_refresh) {
werase(w_options);
mvwprintz(w_options, 0, 40, c_white, "Use up/down keys to scroll through");
mvwprintz(w_options, 1, 40, c_white, "available options.");
mvwprintz(w_options, 2, 40, c_white, "Use left/right keys to toggle.");
mvwprintz(w_options, 3, 40, c_white, "Press ESC or q to return. ");
// highlight options for option descriptions
std::string tmp = option_desc(option_key(offset + line));
std::string out;
size_t pos;
int displayline = 5;
do {
pos = tmp.find_first_of('\n');
out = tmp.substr(0, pos);
mvwprintz(w_options, displayline, 40, c_white, out.c_str());
tmp = tmp.substr(pos + 1);
displayline++;
} while(pos != std::string::npos && displayline < 12);
needs_refresh = false;
}
// Clear the lines
for (int i = 0; i < 25; i++)
mvwprintz(w_options, i, 0, c_black, " ");
int valid_option_count = 0;
for(int i = 0; i < 25; i++) {
mvwprintz(w_options, i, 0, c_black, " ");
}
int valid_option_count = 0;
// display options
for (int i = 0; i < 26 && offset + i < NUM_OPTION_KEYS; i++)
{
valid_option_count++;
mvwprintz(w_options, i, 0, c_white, "%s: ",
option_name( option_key(offset + i) ).c_str());
for(int i = 0; i < 26 && offset + i < NUM_OPTION_KEYS; i++) {
valid_option_count++;
mvwprintz(w_options, i, 0, c_white, "%s: ",
option_name(option_key(offset + i)).c_str());
if (option_is_bool(option_key(offset + i)))
{
bool on = OPTIONS[ option_key(offset + i) ];
if (i == line)
mvwprintz(w_options, i, 30, hilite(c_ltcyan), (on ? "True" : "False"));
else
mvwprintz(w_options, i, 30, (on ? c_ltgreen : c_ltred), (on ? "True" : "False"));
} else {
char option_val = OPTIONS[ option_key(offset + i) ];
if (i == line)
mvwprintz(w_options, i, 30, hilite(c_ltcyan), "%d", option_val );
else
mvwprintz(w_options, i, 30, c_ltgreen, "%d", option_val );
}
}
wrefresh(w_options);
ch = input();
needs_refresh = true;
if(option_is_bool(option_key(offset + i))) {
bool on = OPTIONS[ option_key(offset + i) ];
if(i == line) {
mvwprintz(w_options, i, 30, hilite(c_ltcyan), (on ? "True" : "False"));
} else {
mvwprintz(w_options, i, 30, (on ? c_ltgreen : c_ltred), (on ? "True" : "False"));
}
} else {
char option_val = OPTIONS[ option_key(offset + i) ];
if(i == line) {
mvwprintz(w_options, i, 30, hilite(c_ltcyan), "%d", option_val);
} else {
mvwprintz(w_options, i, 30, c_ltgreen, "%d", option_val);
}
}
}
wrefresh(w_options);
ch = input();
needs_refresh = true;
switch (ch) {
switch(ch) {
// move up and down
case 'j':
line++;
if (line > MAX_LINE/2 && offset + 1 < NUM_OPTION_KEYS - MAX_LINE) {
++offset;
--line;
}
if (line > MAX_LINE) {
line = 0;
offset = 1;
}
break;
case 'k':
line--;
if (line < MAX_LINE/2 && offset > 1) {
--offset;
++line;
}
if (line < 0) {
line = MAX_LINE;
offset = NUM_OPTION_KEYS - MAX_LINE - 1;
}
break;
case 'j':
line++;
if(line > MAX_LINE/2 && offset + 1 < NUM_OPTION_KEYS - MAX_LINE) {
++offset;
--line;
}
if(line > MAX_LINE) {
line = 0;
offset = 1;
}
break;
case 'k':
line--;
if(line < MAX_LINE/2 && offset > 1) {
--offset;
++line;
}
if(line < 0) {
line = MAX_LINE;
offset = NUM_OPTION_KEYS - MAX_LINE - 1;
}
break;
// toggle options with left/right keys
case 'h':
if (option_is_bool(option_key(offset + line)))
OPTIONS[ option_key(offset + line) ] = !(OPTIONS[ option_key(offset + line) ]);
else
{
OPTIONS[ option_key(offset + line) ]--;
if ((OPTIONS[ option_key(offset + line) ]) < 0 )
OPTIONS[ option_key(offset + line) ] = option_max_options(option_key(offset + line)) - 1;
}
changed_options = true;
break;
case 'l':
if (option_is_bool(option_key(offset + line)))
OPTIONS[ option_key(offset + line) ] = !(OPTIONS[ option_key(offset + line) ]);
else
{
OPTIONS[ option_key(offset + line) ]++;
if ((OPTIONS[ option_key(offset + line) ]) >= option_max_options(option_key(offset + line)))
OPTIONS[ option_key(offset + line) ] = 0;
}
changed_options = true;
break;
}
if (changed_options && OPTIONS[OPT_SEASON_LENGTH] < 1 ) OPTIONS[OPT_SEASON_LENGTH]=option_max_options(OPT_SEASON_LENGTH)-1;
} while (ch != 'q' && ch != 'Q' && ch != KEY_ESCAPE);
case 'h':
if(option_is_bool(option_key(offset + line))) {
OPTIONS[ option_key(offset + line) ] = !(OPTIONS[ option_key(offset + line) ]);
} else {
OPTIONS[ option_key(offset + line) ]--;
if((OPTIONS[ option_key(offset + line) ]) < option_min_options(option_key(offset + line))) {
OPTIONS[ option_key(offset + line) ] = option_max_options(option_key(offset + line)) - 1;
}
}
changed_options = true;
break;
case 'l':
if(option_is_bool(option_key(offset + line))) {
OPTIONS[ option_key(offset + line) ] = !(OPTIONS[ option_key(offset + line) ]);
} else {
OPTIONS[ option_key(offset + line) ]++;
if((OPTIONS[ option_key(offset + line) ]) >= option_max_options(option_key(offset + line))) {
OPTIONS[ option_key(offset + line) ] = option_min_options(option_key(offset + line));
}
}
changed_options = true;
break;
}
if(changed_options && OPTIONS[OPT_SEASON_LENGTH] < 1) { OPTIONS[OPT_SEASON_LENGTH]=option_max_options(OPT_SEASON_LENGTH)-1; }
} while(ch != 'q' && ch != 'Q' && ch != KEY_ESCAPE);
if (changed_options && query_yn("Save changes?"))
save_options();
werase(w_options);
if(changed_options && query_yn("Save changes?")) {
save_options();
trigdist=(OPTIONS[OPT_CIRCLEDIST] ? true : false);
}
werase(w_options);
}
void load_options()
{
std::ifstream fin;
fin.open("data/options.txt");
if (!fin.is_open()) {
fin.close();
create_default_options();
fin.open("data/options.txt");
if (!fin.is_open()) {
DebugLog() << "Could neither read nor create ./data/options.txt\n";
return;
}
}
std::ifstream fin;
fin.open("data/options.txt");
if(!fin.is_open()) {
fin.close();
create_default_options();
fin.open("data/options.txt");
if(!fin.is_open()) {
DebugLog() << "Could neither read nor create ./data/options.txt\n";
return;
}
}
while (!fin.eof()) {
std::string id;
fin >> id;
if (id == "")
getline(fin, id); // Empty line, chomp it
else if (id[0] == '#') // # indicates a comment
getline(fin, id);
else {
option_key key = lookup_option_key(id);
if (key == OPT_NULL) {
DebugLog() << "Bad option: " << id << "\n";
getline(fin, id);
} else if (option_is_bool(key)) {
std::string val;
fin >> val;
if (val == "T")
OPTIONS[key] = 1.;
else
OPTIONS[key] = 0.;
} else {
std::string check;
double val;
fin >> check;
while(!fin.eof()) {
std::string id;
fin >> id;
if(id == "") {
getline(fin, id); // Empty line, chomp it
} else if(id[0] == '#') { // # indicates a comment
getline(fin, id);
} else {
option_key key = lookup_option_key(id);
if(key == OPT_NULL) {
DebugLog() << "Bad option: " << id << "\n";
getline(fin, id);
} else if(option_is_bool(key)) {
std::string val;
fin >> val;
if(val == "T") {
OPTIONS[key] = 1.;
} else {
OPTIONS[key] = 0.;
}
} else {
std::string check;
double val;
fin >> check;
if (check == "T" || check == "F")
val = (check == "T") ? 1.: 0.;
else
val = atoi(check.c_str());
if(check == "T" || check == "F") {
val = (check == "T") ? 1.: 0.;
} else {
val = atoi(check.c_str());
}
OPTIONS[key] = val;
}
}
if (fin.peek() == '\n')
getline(fin, id); // Chomp
}
fin.close();
OPTIONS[key] = val;
}
}
if(fin.peek() == '\n') {
getline(fin, id); // Chomp
}
}
fin.close();
trigdist=false; // cache to global due to heavy usage.
if(OPTIONS[OPT_CIRCLEDIST]) { trigdist=true; }
}
option_key lookup_option_key(std::string id)
{
if (id == "use_celsius")
return OPT_USE_CELSIUS;
if (id == "use_metric_system")
return OPT_USE_METRIC_SYS;
if (id == "force_capital_yn")
return OPT_FORCE_YN;
if (id == "no_bright_backgrounds")
return OPT_NO_CBLINK;
if (id == "24_hour")
return OPT_24_HOUR;
if (id == "snap_to_target")
return OPT_SNAP_TO_TARGET;
if (id == "safemode")
return OPT_SAFEMODE;
if (id == "safemodeproximity")
return OPT_SAFEMODEPROXIMITY;
if (id == "autosafemode")
return OPT_AUTOSAFEMODE;
if (id == "autosafemodeturns")
return OPT_AUTOSAFEMODETURNS;
if (id == "autosave")
return OPT_AUTOSAVE;
if (id == "gradual_night_light")
return OPT_GRADUAL_NIGHT_LIGHT;
if (id == "rain_animation")
return OPT_RAIN_ANIMATION;
if (id == "query_disassemble")
return OPT_QUERY_DISASSEMBLE;
if (id == "drop_empty")
return OPT_DROP_EMPTY;
if (id == "skill_rust")
return OPT_SKILL_RUST;
if (id == "delete_world")
return OPT_DELETE_WORLD;
if (id == "initial_points")
return OPT_INITIAL_POINTS;
if(id == "initial_time")
return OPT_INITIAL_TIME;
if (id == "viewport_x")
return OPT_VIEWPORT_X;
if (id == "viewport_y")
return OPT_VIEWPORT_Y;
if (id == "move_view_offset")
return OPT_MOVE_VIEW_OFFSET;
if (id == "static_spawn")
return OPT_STATIC_SPAWN;
if (id == "classic_zombies")
return OPT_CLASSIC_ZOMBIES;
if (id == "season_length")
return OPT_SEASON_LENGTH;
if (id == "static_npc")
return OPT_STATIC_NPC;
if (id == "random_npc")
return OPT_RANDOM_NPC;
return OPT_NULL;
if(id == "use_celsius") {
return OPT_USE_CELSIUS;
}
if(id == "use_metric_system") {
return OPT_USE_METRIC_SYS;
}
if(id == "force_capital_yn") {
return OPT_FORCE_YN;
}
if(id == "no_bright_backgrounds") {
return OPT_NO_CBLINK;
}
if(id == "24_hour") {
return OPT_24_HOUR;
}
if(id == "snap_to_target") {
return OPT_SNAP_TO_TARGET;
}
if(id == "safemode") {
return OPT_SAFEMODE;
}
if(id == "safemodeproximity") {
return OPT_SAFEMODEPROXIMITY;
}
if(id == "autosafemode") {
return OPT_AUTOSAFEMODE;
}
if(id == "autosafemodeturns") {
return OPT_AUTOSAFEMODETURNS;
}
if(id == "autosave") {
return OPT_AUTOSAVE;
}
if(id == "autosave_turns") {
return OPT_AUTOSAVE_TURNS;
}
if(id == "autosave_minutes") {
return OPT_AUTOSAVE_MINUTES;
}
if(id == "gradual_night_light") {
return OPT_GRADUAL_NIGHT_LIGHT;
}
if(id == "rain_animation") {
return OPT_RAIN_ANIMATION;
}
if(id == "circledist") {
return OPT_CIRCLEDIST;
}
if(id == "query_disassemble") {
return OPT_QUERY_DISASSEMBLE;
}
if(id == "drop_empty") {
return OPT_DROP_EMPTY;
}
if(id == "skill_rust") {
return OPT_SKILL_RUST;
}
if(id == "delete_world") {
return OPT_DELETE_WORLD;
}
if(id == "initial_points") {
return OPT_INITIAL_POINTS;
}
if(id == "max_trait_points") {
return OPT_MAX_TRAIT_POINTS;
}
if(id == "initial_time") {
return OPT_INITIAL_TIME;
}
if(id == "viewport_x") {
return OPT_VIEWPORT_X;
}
if(id == "viewport_y") {
return OPT_VIEWPORT_Y;
}
if(id == "move_view_offset") {
return OPT_MOVE_VIEW_OFFSET;
}
if(id == "static_spawn") {
return OPT_STATIC_SPAWN;
}
if(id == "classic_zombies") {
return OPT_CLASSIC_ZOMBIES;
}
if(id == "season_length") {
return OPT_SEASON_LENGTH;
}
if(id == "static_npc") {
return OPT_STATIC_NPC;
}
if(id == "random_npc") {
return OPT_RANDOM_NPC;
}
if(id == "rad_mutation") {
return OPT_RAD_MUTATION;
}
if(id == "save_sleep") {
return OPT_SAVESLEEP;
}
return OPT_NULL;
}
std::string option_string(option_key key)
{
switch (key) {
case OPT_USE_CELSIUS: return "use_celsius";
case OPT_USE_METRIC_SYS: return "use_metric_system";
case OPT_FORCE_YN: return "force_capital_yn";
case OPT_NO_CBLINK: return "no_bright_backgrounds";
case OPT_24_HOUR: return "24_hour";
case OPT_SNAP_TO_TARGET: return "snap_to_target";
case OPT_SAFEMODE: return "safemode";
case OPT_SAFEMODEPROXIMITY: return "safemodeproximity";
case OPT_AUTOSAFEMODE: return "autosafemode";
case OPT_AUTOSAFEMODETURNS: return "autosafemodeturns";
case OPT_AUTOSAVE: return "autosave";
case OPT_GRADUAL_NIGHT_LIGHT: return "gradual_night_light";
case OPT_RAIN_ANIMATION: return "rain_animation";
case OPT_QUERY_DISASSEMBLE: return "query_disassemble";
case OPT_DROP_EMPTY: return "drop_empty";
case OPT_SKILL_RUST: return "skill_rust";
case OPT_DELETE_WORLD: return "delete_world";
case OPT_INITIAL_POINTS: return "initial_points";
case OPT_INITIAL_TIME: return "initial_time";
case OPT_VIEWPORT_X: return "viewport_x";
case OPT_VIEWPORT_Y: return "viewport_y";
case OPT_MOVE_VIEW_OFFSET: return "move_view_offset";
case OPT_STATIC_SPAWN: return "static_spawn";
case OPT_CLASSIC_ZOMBIES: return "classic_zombies";
case OPT_SEASON_LENGTH: return "season_length";
case OPT_STATIC_NPC: return "static_npc";
case OPT_RANDOM_NPC: return "random_npc";
default: return "unknown_option";
}
return "unknown_option";
switch(key) {
case OPT_USE_CELSIUS: return "use_celsius";
case OPT_USE_METRIC_SYS: return "use_metric_system";
case OPT_FORCE_YN: return "force_capital_yn";
case OPT_NO_CBLINK: return "no_bright_backgrounds";
case OPT_24_HOUR: return "24_hour";
case OPT_SNAP_TO_TARGET: return "snap_to_target";
case OPT_SAFEMODE: return "safemode";
case OPT_SAFEMODEPROXIMITY: return "safemodeproximity";
case OPT_AUTOSAFEMODE: return "autosafemode";
case OPT_AUTOSAFEMODETURNS: return "autosafemodeturns";
case OPT_AUTOSAVE: return "autosave";
case OPT_AUTOSAVE_TURNS: return "autosave_turns";
case OPT_AUTOSAVE_MINUTES: return "autosave_minutes";
case OPT_GRADUAL_NIGHT_LIGHT: return "gradual_night_light";
case OPT_RAIN_ANIMATION: return "rain_animation";
case OPT_CIRCLEDIST: return "circledist";
case OPT_QUERY_DISASSEMBLE: return "query_disassemble";
case OPT_DROP_EMPTY: return "drop_empty";
case OPT_SKILL_RUST: return "skill_rust";
case OPT_DELETE_WORLD: return "delete_world";
case OPT_INITIAL_POINTS: return "initial_points";
case OPT_MAX_TRAIT_POINTS: return "max_trait_points";
case OPT_INITIAL_TIME: return "initial_time";
case OPT_VIEWPORT_X: return "viewport_x";
case OPT_VIEWPORT_Y: return "viewport_y";
case OPT_MOVE_VIEW_OFFSET: return "move_view_offset";
case OPT_STATIC_SPAWN: return "static_spawn";
case OPT_CLASSIC_ZOMBIES: return "classic_zombies";
case OPT_SEASON_LENGTH: return "season_length";
case OPT_STATIC_NPC: return "static_npc";
case OPT_RANDOM_NPC: return "random_npc";
case OPT_RAD_MUTATION: return "rad_mutation";
case OPT_SAVESLEEP: return "save_sleep";
default: return "unknown_option";
}
return "unknown_option";
}
std::string option_desc(option_key key)
{
switch (key) {
case OPT_USE_CELSIUS: return "If true, use Celcius not Fahrenheit.\nDefault is fahrenheit";
case OPT_USE_METRIC_SYS: return "If true, use Km/h not mph.\nDefault is mph";
case OPT_FORCE_YN: return "If true, y/n prompts are case-\nsensitive and y and n\nare not accepted.\nDefault is true";
case OPT_NO_CBLINK: return "If true, bright backgrounds are not\nused--some consoles are not\ncompatible.\nDefault is false";
case OPT_24_HOUR: return "12h/24h Time:\n0 - AM/PM (default)\n1 - 24h military\n2 - 24h normal";
case OPT_SNAP_TO_TARGET: return "If true, automatically follow the\ncrosshair when firing/throwing.\nDefault is false";
case OPT_SAFEMODE: return "If true, safemode will be on after\nstarting a new game or loading.\nDefault is true";
case OPT_SAFEMODEPROXIMITY: return "If safemode is enabled,\ndistance to hostiles when safemode\nshould show a warning.\n0=Viewdistance, and the default";
case OPT_AUTOSAFEMODE: return "If true, auto-safemode will be on\nafter starting a new game or loading.\nDefault is false";
case OPT_AUTOSAFEMODETURNS: return "Number of turns after safemode\nis reenabled if no hostiles are\nin safemodeproximity distance.\nDefault is 50";
case OPT_AUTOSAVE: return "If true, game will periodically\nsave the map\nDefault is false";
case OPT_GRADUAL_NIGHT_LIGHT: return "If true will add nice gradual-lighting\nshould only make a difference\nduring the night.\nDefault is false";
case OPT_RAIN_ANIMATION: return "If true, will display weather\nanimations.\nDefault is true";
case OPT_QUERY_DISASSEMBLE: return "If true, will query before\ndisassembling items.\nDefault is true";
case OPT_DROP_EMPTY: return "Set to drop empty containers after\nuse.\n0 - don't drop any (default)\n1 - all except watertight containers\n2 - all containers";
case OPT_SKILL_RUST: return "Set the level of skill rust.\n0 - vanilla Cataclysm (default)\n1 - capped at skill levels\n2 - none at all";
case OPT_DELETE_WORLD: return "Delete saves upon player death.\n0 - no (default)\n1 - yes\n2 - query";
case OPT_INITIAL_POINTS: return "Initial points available on character\ngeneration.\nDefault is 6";
case OPT_INITIAL_TIME: return "Initial starting time of day on\ncharacter generation.\nDefault is 8:00";
case OPT_VIEWPORT_X: return "WINDOWS ONLY: Set the expansion of the\nviewport along the X axis.\nRequires restart.\nDefault is 12.\nPOSIX systems will use terminal size\nat startup.";
case OPT_VIEWPORT_Y: return "WINDOWS ONLY: Set the expansion of the\nviewport along the Y axis.\nRequires restart.\nDefault is 12.\nPOSIX systems will use terminal size\nat startup.";
case OPT_MOVE_VIEW_OFFSET: return "Move view by how many squares per\nkeypress.\nDefault is 1";
case OPT_SEASON_LENGTH: return "Season length, in days.\nDefault is 14";
case OPT_STATIC_SPAWN: return "Spawn zombies at game start instead of\nduring game. Must reset world\ndirectory after changing for it to\ntake effect.\nDefault is false";
case OPT_CLASSIC_ZOMBIES: return "Only spawn classic zombies and natural\nwildlife. Requires a reset of\nsave folder to take effect.\nThis disables certain buildings.\nDefault is false";
case OPT_STATIC_NPC: return "If true, the game will spawn static\nNPC at the start of the game,\nrequires world reset.\nDefault is false";
case OPT_RANDOM_NPC: return "If true, the game will randomly spawn\nNPC during gameplay.\nDefault is false";
default: return " ";
}
return "Big ol Bug (options.cpp:option_desc)";
switch(key) {
case OPT_USE_CELSIUS: return "If true, use Celcius not Fahrenheit.\nDefault is fahrenheit";
case OPT_USE_METRIC_SYS: return "If true, use Km/h not mph.\nDefault is mph";
case OPT_FORCE_YN: return "If true, y/n prompts are case-\nsensitive and y and n\nare not accepted.\nDefault is true";
case OPT_NO_CBLINK: return "If true, bright backgrounds are not\nused--some consoles are not\ncompatible.\nDefault is false";
case OPT_24_HOUR: return "12h/24h Time:\n0 - AM/PM (default)\n1 - 24h military\n2 - 24h normal";
case OPT_SNAP_TO_TARGET: return "If true, automatically follow the\ncrosshair when firing/throwing.\nDefault is false";
case OPT_SAFEMODE: return "If true, safemode will be on after\nstarting a new game or loading.\nDefault is true";
case OPT_SAFEMODEPROXIMITY: return "If safemode is enabled,\ndistance to hostiles when safemode\nshould show a warning.\n0=Viewdistance, and the default";
case OPT_AUTOSAFEMODE: return "If true, auto-safemode will be on\nafter starting a new game or loading.\nDefault is false";
case OPT_AUTOSAFEMODETURNS: return "Number of turns after safemode\nis reenabled if no hostiles are\nin safemodeproximity distance.\nDefault is 50";
case OPT_AUTOSAVE: return "If true, game will periodically\nsave the map\nDefault is false";
case OPT_AUTOSAVE_TURNS: return "Number of minutes between autosaves";
case OPT_AUTOSAVE_MINUTES: return "Minimum number of real time minutes\nbetween autosaves";
case OPT_GRADUAL_NIGHT_LIGHT: return "If true will add nice gradual-lighting\nshould only make a difference\nduring the night.\nDefault is true";
case OPT_RAIN_ANIMATION: return "If true, will display weather\nanimations.\nDefault is true";
case OPT_CIRCLEDIST: return "If true, the game will calculate\nrange in a realistic way:\nlight sources will be circles\ndiagonal movement will\ncover more ground and take\nlonger.\nIf disabled, everything is\nsquare: moving to the northwest\ncorner of a building\ntakes as long as moving\nto the north wall.";
case OPT_QUERY_DISASSEMBLE: return "If true, will query before\ndisassembling items.\nDefault is true";
case OPT_DROP_EMPTY: return "Set to drop empty containers after\nuse.\n0 - don't drop any (default)\n1 - all except watertight containers\n2 - all containers";
case OPT_SKILL_RUST: return "Set the level of skill rust.\n0 - vanilla Cataclysm (default)\n1 - capped at skill levels\n2 - none at all";
case OPT_DELETE_WORLD: return "Delete saves upon player death.\n0 - no (default)\n1 - yes\n2 - query";
case OPT_INITIAL_POINTS: return "Initial points available on character\ngeneration.\nDefault is 6";
case OPT_MAX_TRAIT_POINTS: return "Maximum trait points available for\ncharacter generation.\nDefault is 12";
case OPT_INITIAL_TIME: return "Initial starting time of day on\ncharacter generation.\nDefault is 8:00";
case OPT_VIEWPORT_X: return "WINDOWS ONLY: Set the expansion of the\nviewport along the X axis.\nRequires restart.\nDefault is 12.\nPOSIX systems will use terminal size\nat startup.";
case OPT_VIEWPORT_Y: return "WINDOWS ONLY: Set the expansion of the\nviewport along the Y axis.\nRequires restart.\nDefault is 12.\nPOSIX systems will use terminal size\nat startup.";
case OPT_MOVE_VIEW_OFFSET: return "Move view by how many squares per\nkeypress.\nDefault is 1";
case OPT_SEASON_LENGTH: return "Season length, in days.\nDefault is 14";
case OPT_STATIC_SPAWN: return "Spawn zombies at game start instead of\nduring game. Must reset world\ndirectory after changing for it to\ntake effect.\nDefault is true";
case OPT_CLASSIC_ZOMBIES: return "Only spawn classic zombies and natural\nwildlife. Requires a reset of\nsave folder to take effect.\nThis disables certain buildings.\nDefault is false";
case OPT_STATIC_NPC: return "If true, the game will spawn static\nNPC at the start of the game,\nrequires world reset.\nDefault is false";
case OPT_RANDOM_NPC: return "If true, the game will randomly spawn\nNPC during gameplay.\nDefault is false";
case OPT_RAD_MUTATION: return "If true, radiation causes the player\nto mutate.\nDefault is true";
case OPT_SAVESLEEP: return "If true, game will ask to save the map\nbefore sleeping. Default is false";
default: return " ";
}
return "Big ol Bug (options.cpp:option_desc)";
}
std::string option_name(option_key key)
{
switch (key) {
case OPT_USE_CELSIUS: return "Use Celsius";
case OPT_USE_METRIC_SYS: return "Use Metric System";
case OPT_FORCE_YN: return "Force Y/N in prompts";
case OPT_NO_CBLINK: return "No Bright Backgrounds";
case OPT_24_HOUR: return "24 Hour Time";
case OPT_SNAP_TO_TARGET: return "Snap to Target";
case OPT_SAFEMODE: return "Safemode on by default";
case OPT_SAFEMODEPROXIMITY: return "Safemode proximity distance";
case OPT_AUTOSAFEMODE: return "Auto-Safemode on by default";
case OPT_AUTOSAFEMODETURNS: return "Turns to reenable safemode";
case OPT_AUTOSAVE: return "Periodically Autosave";
case OPT_GRADUAL_NIGHT_LIGHT: return "Gradual night light";
case OPT_RAIN_ANIMATION: return "Rain animation";
case OPT_QUERY_DISASSEMBLE: return "Query on disassembly";
case OPT_DROP_EMPTY: return "Drop empty containers";
case OPT_SKILL_RUST: return "Skill Rust";
case OPT_DELETE_WORLD: return "Delete World";
case OPT_INITIAL_POINTS: return "Initial points";
case OPT_INITIAL_TIME: return "Initial time";
case OPT_VIEWPORT_X: return "Viewport width";
case OPT_VIEWPORT_Y: return "Viewport height";
case OPT_MOVE_VIEW_OFFSET: return "Move view offset";
case OPT_STATIC_SPAWN: return "Static spawn";
case OPT_CLASSIC_ZOMBIES: return "Classic zombies";
case OPT_SEASON_LENGTH: return "Season length";
case OPT_STATIC_NPC: return "Static npcs";
case OPT_RANDOM_NPC: return "Random npcs";
default: return "Unknown Option (options.cpp:option_name)";
}
return "Big ol Bug (options.cpp:option_name)";
switch(key) {
case OPT_USE_CELSIUS: return "Use Celsius";
case OPT_USE_METRIC_SYS: return "Use Metric System";
case OPT_FORCE_YN: return "Force Y/N in prompts";
case OPT_NO_CBLINK: return "No Bright Backgrounds";
case OPT_24_HOUR: return "24 Hour Time";
case OPT_SNAP_TO_TARGET: return "Snap to Target";
case OPT_SAFEMODE: return "Safemode on by default";
case OPT_SAFEMODEPROXIMITY: return "Safemode proximity distance";
case OPT_AUTOSAFEMODE: return "Auto-Safemode on by default";
case OPT_AUTOSAFEMODETURNS: return "Turns to reenable safemode";
case OPT_AUTOSAVE: return "Periodically Autosave";
case OPT_AUTOSAVE_TURNS: return "Game minutes between autosaves";
case OPT_AUTOSAVE_MINUTES: return "Real minutes between autosaves";
case OPT_GRADUAL_NIGHT_LIGHT: return "Gradual night light";
case OPT_RAIN_ANIMATION: return "Rain animation";
case OPT_CIRCLEDIST: return "Circular distances";
case OPT_QUERY_DISASSEMBLE: return "Query on disassembly";
case OPT_DROP_EMPTY: return "Drop empty containers";
case OPT_SKILL_RUST: return "Skill Rust";
case OPT_DELETE_WORLD: return "Delete World";
case OPT_INITIAL_POINTS: return "Initial points";
case OPT_MAX_TRAIT_POINTS: return "Maximum trait points";
case OPT_INITIAL_TIME: return "Initial time";
case OPT_VIEWPORT_X: return "Viewport width";
case OPT_VIEWPORT_Y: return "Viewport height";
case OPT_MOVE_VIEW_OFFSET: return "Move view offset";
case OPT_STATIC_SPAWN: return "Static spawn";
case OPT_CLASSIC_ZOMBIES: return "Classic zombies";
case OPT_SEASON_LENGTH: return "Season length";
case OPT_STATIC_NPC: return "Static npcs";
case OPT_RANDOM_NPC: return "Random npcs";
case OPT_RAD_MUTATION: return "Mutations by radiation";
case OPT_SAVESLEEP: return "Ask to save before sleeping";
default: return "Unknown Option (options.cpp:option_name)";
}
return "Big ol Bug (options.cpp:option_name)";
}
bool option_is_bool(option_key id)
{
switch (id) {
case OPT_24_HOUR:
case OPT_SAFEMODEPROXIMITY:
case OPT_AUTOSAFEMODETURNS:
case OPT_SKILL_RUST:
case OPT_DROP_EMPTY:
case OPT_DELETE_WORLD:
case OPT_INITIAL_POINTS:
case OPT_INITIAL_TIME:
case OPT_VIEWPORT_X:
case OPT_VIEWPORT_Y:
case OPT_SEASON_LENGTH:
case OPT_MOVE_VIEW_OFFSET:
return false;
break;
default:
return true;
}
return true;
switch(id) {
case OPT_24_HOUR:
case OPT_SAFEMODEPROXIMITY:
case OPT_AUTOSAFEMODETURNS:
case OPT_SKILL_RUST:
case OPT_DROP_EMPTY:
case OPT_DELETE_WORLD:
case OPT_INITIAL_POINTS:
case OPT_MAX_TRAIT_POINTS:
case OPT_INITIAL_TIME:
case OPT_VIEWPORT_X:
case OPT_VIEWPORT_Y:
case OPT_SEASON_LENGTH:
case OPT_MOVE_VIEW_OFFSET:
case OPT_AUTOSAVE_TURNS:
case OPT_AUTOSAVE_MINUTES:
return false;
break;
default:
return true;
}
return true;
}
char option_max_options(option_key id)
{
char ret;
if (option_is_bool(id))
ret = 2;
else
switch (id)
{
case OPT_24_HOUR:
ret = 3;
break;
case OPT_SAFEMODEPROXIMITY:
ret = 61;
break;
case OPT_AUTOSAFEMODETURNS:
ret = 51;
break;
case OPT_INITIAL_POINTS:
ret = 25;
break;
case OPT_INITIAL_TIME:
ret = 24; // 0h to 23h
break;
case OPT_DELETE_WORLD:
case OPT_DROP_EMPTY:
case OPT_SKILL_RUST:
ret = 3;
break;
case OPT_VIEWPORT_X:
case OPT_VIEWPORT_Y:
ret = 93; // TODO Set up min/max values so weird numbers don't have to be used.
break;
case OPT_SEASON_LENGTH:
ret = 127;
break;
case OPT_MOVE_VIEW_OFFSET:
ret = 50; // TODO calculate max for screen size
break;
default:
char ret;
if(option_is_bool(id)) {
ret = 2;
break;
}
return ret;
} else
switch(id) {
case OPT_24_HOUR:
ret = 3;
break;
case OPT_SAFEMODEPROXIMITY:
ret = 61;
break;
case OPT_AUTOSAFEMODETURNS:
ret = 101;
break;
case OPT_INITIAL_POINTS:
ret = 25;
break;
case OPT_MAX_TRAIT_POINTS:
ret = 25;
break;
case OPT_INITIAL_TIME:
ret = 24; // 0h to 23h
break;
case OPT_DELETE_WORLD:
case OPT_DROP_EMPTY:
case OPT_SKILL_RUST:
ret = 3;
break;
case OPT_VIEWPORT_X:
case OPT_VIEWPORT_Y:
ret = 93; // TODO Set up min/max values so weird numbers don't have to be used.
break;
case OPT_SEASON_LENGTH:
ret = 127;
break;
case OPT_MOVE_VIEW_OFFSET:
ret = 50; // TODO calculate max for screen size
break;
case OPT_AUTOSAVE_TURNS:
case OPT_AUTOSAVE_MINUTES:
ret = 127;
break;
default:
ret = 2;
break;
}
return ret;
}
char option_min_options(option_key id)
{
char ret;
if(option_is_bool(id)) {
ret = 0;
} else
switch(id) {
case OPT_MAX_TRAIT_POINTS:
ret = 3;
break;
default:
ret = 0;
break;
}
return ret;
}
void create_default_options()
{
std::ofstream fout;
fout.open("data/options.txt");
if (!fout.is_open())
return;
std::ofstream fout;
fout.open("data/options.txt");
if(!fout.is_open()) {
return;
}
fout << options_header() << "\n\
fout << options_header() << "\n\
# If true, use C not F\n\
use_celsius F\n\
# If true, use Km/h not mph\
@@ -454,10 +554,16 @@ autosafemode F\n\
autosafemodeturns 50\n\
# If true, game will periodically save the map\n\
autosave F\n\
# Minutes between autosaves\n\
autosave_turns 30\n\
# Minimum real time minutes between autosaves\n\
autosave_minutes 5\n\
# If true will add nice gradual-lighting (should only make a difference @night)\n\
gradual_night_light F\n\
gradual_night_light T\n\
# If true, will display weather animations\n\
rain_animation T\n\
# If true, compute distance with real math\n\
circledist T\n\
# If true, will query beefore disassembling items\n\
query_disassemble T\n\
# Player will automatically drop empty containers after use\n\
@@ -471,6 +577,8 @@ skill_rust 0\n\
delete_world 0\n\
# Initial points available in character generation\n\
initial_points 6\n\
# Maximum trait points allowed in character generation\n\
max_trait_points 12\n\
# Initial time at character generation\n\
initial_time 8\n\
# The width of the terrain window in characters.\n\
@@ -489,13 +597,17 @@ season_length 14\n\
static_npc F\n\
# Spawn random NPCs during gameplay.\n\
random_npc F\n\
# Radiation causes mutations.\n\
rad_mutation T\n\
# Ask to save before sleeping.\n\
save_sleep F\n\
";
fout.close();
fout.close();
}
std::string options_header()
{
return "\
return "\
# This is the options file. It works similarly to keymap.txt: the format is\n\
# <option name> <option value>\n\
# <option value> may be any number, positive or negative. If you use a\n\
@@ -512,19 +624,21 @@ std::string options_header()
void save_options()
{
std::ofstream fout;
fout.open("data/options.txt");
if (!fout.is_open())
return;
std::ofstream fout;
fout.open("data/options.txt");
if(!fout.is_open()) {
return;
}
fout << options_header() << std::endl;
for (int i = 1; i < NUM_OPTION_KEYS; i++) {
option_key key = option_key(i);
fout << option_string(key) << " ";
if (option_is_bool(key))
fout << (OPTIONS[key] ? "T" : "F");
else
fout << OPTIONS[key];
fout << "\n";
}
fout << options_header() << std::endl;
for(int i = 1; i < NUM_OPTION_KEYS; i++) {
option_key key = option_key(i);
fout << option_string(key) << " ";
if(option_is_bool(key)) {
fout << (OPTIONS[key] ? "T" : "F");
} else {
fout << OPTIONS[key];
}
fout << "\n";
}
}
+41 -25
View File
@@ -5,33 +5,39 @@
enum option_key {
OPT_NULL = 0,
OPT_FORCE_YN, // Y/N versus y/n
OPT_USE_CELSIUS, // Display temp as C not F
OPT_USE_METRIC_SYS, // Display speed as Km/h not mph
OPT_NO_CBLINK, // No bright backgrounds
OPT_24_HOUR, // 24 hour time
OPT_SNAP_TO_TARGET, // game::firing snaps to target
OPT_SAFEMODE, // Safemode on by default?
OPT_SAFEMODEPROXIMITY, //Range after which safemode kicks in
OPT_AUTOSAFEMODE, // Autosafemode on by default?
OPT_AUTOSAFEMODETURNS, //Number of turns untill safemode kicks back in
OPT_AUTOSAVE, // Automatically save the game on intervals.
OPT_FORCE_YN, // Y/N versus y/n
OPT_USE_CELSIUS, // Display temp as C not F
OPT_USE_METRIC_SYS, // Display speed as Km/h not mph
OPT_NO_CBLINK, // No bright backgrounds
OPT_24_HOUR, // 24 hour time
OPT_SNAP_TO_TARGET, // game::firing snaps to target
OPT_SAFEMODE, // Safemode on by default?
OPT_SAFEMODEPROXIMITY, // Range after which safemode kicks in
OPT_AUTOSAFEMODE, // Autosafemode on by default?
OPT_AUTOSAFEMODETURNS, // Number of turns untill safemode kicks back in
OPT_AUTOSAVE, // Automatically save the game on intervals.
OPT_AUTOSAVE_TURNS, // Turns between autosaves
OPT_AUTOSAVE_MINUTES, // Minimum realtime minutes between autosaves
OPT_GRADUAL_NIGHT_LIGHT, // be so cool at night :)
OPT_RAIN_ANIMATION, // Enable the rain and other weather animation
OPT_QUERY_DISASSEMBLE, // Query before disassembling items
OPT_DROP_EMPTY, // auto drop empty containers after use
OPT_SKILL_RUST, // level of skill rust
OPT_DELETE_WORLD, // Delete workd every time New Character is created
OPT_INITIAL_POINTS, // Set the number of character points
OPT_INITIAL_TIME, // Sets the starting hour (0-24)
OPT_VIEWPORT_X, // Set the width of the terrain window, in characters
OPT_VIEWPORT_Y, // Set the height of the terrain window, in characters
OPT_RAIN_ANIMATION, // Enable the rain and other weather animation
OPT_CIRCLEDIST, // Compute distance with pythagorean theorem
OPT_QUERY_DISASSEMBLE, // Query before disassembling items
OPT_DROP_EMPTY, // auto drop empty containers after use
OPT_SKILL_RUST, // level of skill rust
OPT_DELETE_WORLD, // Delete workd every time New Character is created
OPT_INITIAL_POINTS, // Set the number of character points
OPT_MAX_TRAIT_POINTS, // Set the number of trait points
OPT_INITIAL_TIME, // Sets the starting hour (0-24)
OPT_VIEWPORT_X, // Set the width of the terrain window, in characters
OPT_VIEWPORT_Y, // Set the height of the terrain window, in characters
OPT_MOVE_VIEW_OFFSET, // Sensitivity of shift+(movement)
OPT_STATIC_SPAWN, // Makes zombies spawn using the new static system
OPT_CLASSIC_ZOMBIES, // Only spawn the more classic zombies and buildings.
OPT_SEASON_LENGTH, // Season length, in days
OPT_STATIC_NPC, //Spawn static npcs
OPT_RANDOM_NPC, //Spawn random npcs
OPT_STATIC_SPAWN, // Makes zombies spawn using the new static system
OPT_CLASSIC_ZOMBIES, // Only spawn the more classic zombies and buildings.
OPT_SEASON_LENGTH, // Season length, in days
OPT_STATIC_NPC, // Spawn static npcs
OPT_RANDOM_NPC, // Spawn random npcs
OPT_RAD_MUTATION, // Radiation mutates
OPT_SAVESLEEP, // Ask to save before sleeping
NUM_OPTION_KEYS
};
@@ -58,6 +64,15 @@ struct option_table
case OPT_MOVE_VIEW_OFFSET:
options[i] = 1;
break;
case OPT_AUTOSAVE_TURNS:
options[i] = 30;
break;
case OPT_AUTOSAVE_MINUTES:
options[i] = 5;
break;
case OPT_MAX_TRAIT_POINTS:
options[i] = 12;
break;
default:
options[i] = 0;
}
@@ -72,6 +87,7 @@ extern option_table OPTIONS;
bool option_is_bool(option_key id);
char option_max_options(option_key id);
char option_min_options(option_key id);
void show_options();
void load_options();
void save_options();
+32 -84
View File
@@ -483,87 +483,26 @@ char popup_getkey(const char *mes, ...)
return ch;
}
int menu_vec(bool cancelable, const char *mes, std::vector<std::string> options)
{
if (options.size() == 0) {
debugmsg("0-length menu (\"%s\")", mes);
return -1;
}
std::string title = mes;
int height = 3 + options.size(), width = title.length() + 2;
for (int i = 0; i < options.size(); i++) {
if (options[i].length() + 6 > width)
width = options[i].length() + 6;
}
int currsel=-1;
std::string spaces(width-2, ' ');
WINDOW *w = newwin(height, width, (TERMY-height)/2, (TERMX > width) ? (TERMX-width)/2 : 0);
wattron(w, c_white);
wborder(w, LINE_XOXO, LINE_XOXO, LINE_OXOX, LINE_OXOX,
LINE_OXXO, LINE_OOXX, LINE_XXOO, LINE_XOOX );
mvwprintw(w, 1, 1, title.c_str());
long ch;
int res;
do
{
for (int i = 0; i < options.size(); i++) {
mvwprintz(w, i + 2, 1, (i==currsel ? h_white : c_white), "%s", spaces.c_str() );
mvwprintz(w, i + 2, 1, (i==currsel ? h_white : c_white), "%c: %s", (i < 9? i + '1' :
(i == 9? '0' : 'a' + i - 10)),
options[i].c_str());
}
wrefresh(w);
ch = getch();
if (cancelable && ch == KEY_ESCAPE)
res = options.size();
else
if (ch >= '1' && ch <= '9')
res = ch - '1' + 1;
else
if (ch == '0')
res = 10;
else
if (ch >= 'a' && ch <= 'z')
res = ch - 'a' + 11;
else
if (ch == KEY_DOWN )
currsel++;
else
if (ch == KEY_UP )
currsel--;
else
if(ch == '\n' && currsel >= 0 && currsel < options.size() )
res=currsel+1;
else
res = -1;
if (res > options.size())
res = -1;
if (currsel < -1) currsel = options.size() - 1;
else if ( currsel > 0 && currsel > options.size() ) currsel = 0;
}
while (res == -1);
werase(w);
wrefresh(w);
delwin(w);
return (res);
int menu_vec(bool cancelable, const char *mes, std::vector<std::string> options) { // compatibility stub for uimenu(cancelable, mes, options)
return (int)uimenu(cancelable, mes, options);
}
int menu(bool cancelable, const char *mes, ...)
{
va_list ap;
va_start(ap, mes);
char* tmp;
std::vector<std::string> options;
bool done = false;
while (!done) {
tmp = va_arg(ap, char*);
if (tmp != NULL) {
std::string strtmp = tmp;
options.push_back(strtmp);
} else
done = true;
}
return (menu_vec(cancelable, mes, options));
int menu(bool cancelable, const char *mes, ...) { // compatibility stub for uimenu(cancelable, mes, ...)
va_list ap;
va_start(ap, mes);
char* tmp;
std::vector<std::string> options;
bool done = false;
while (!done) {
tmp = va_arg(ap, char*);
if (tmp != NULL) {
std::string strtmp = tmp;
options.push_back(strtmp);
} else {
done = true;
}
}
return (uimenu(cancelable, mes, options));
}
void popup_top(const char *mes, ...)
@@ -988,9 +927,18 @@ void hit_animation(int iX, int iY, nc_color cColor, char cTile, int iTimeout)
timeout(iTimeout);
getch(); //useing this, because holding down a key with nanosleep can get yourself killed
timeout(-1);
/*timespec ts;
ts.tv_sec = 0;
ts.tv_nsec = iTimeout * 1000 * 1000; //100ms
nanosleep(&ts, NULL);*/
}
std::string from_sentence_case (const std::string &kingston)
{
if (kingston.size()>0) {
std::string montreal = kingston;
if(montreal.empty()) {
return "";
} else {
montreal.replace(0,1,1,tolower(kingston.at(0)));
return montreal;
}
}
return "";
}
+4
View File
@@ -7,6 +7,7 @@
#include <vector>
#include "item.h"
#include "ui.h"
// LINE_NESW - X for on, O for off
#define LINE_XOXO 4194424
@@ -74,6 +75,9 @@ long special_symbol (long sym);
// utility: moves \n's around to fit string breaks within a certain width.
std::string word_rewrap (const std::string &in, int width);
// string manipulations.
std::string from_sentence_case (const std::string &kingston);
// short visual animation (player, monster, ...) (hit, dodge, ...)
void hit_animation(int iX, int iY, nc_color cColor, char cTile, int iTimeout = 70);
+71 -42
View File
@@ -20,8 +20,8 @@
#include "overmapbuffer.h"
#ifdef _MSC_VER
// MSVC prefers ISO C++ conformant names over POSIX names, but it's missing a redirect for snprintf
#define snprintf _snprintf
// MSVC doesn't have c99-compatible "snprintf", so do what picojson does and use _snprintf_s instead
#define snprintf _snprintf_s
#endif
#define STREETCHANCE 2
@@ -44,7 +44,7 @@ void settlement_building(settlement &set, int x, int y);
double dist(int x1, int y1, int x2, int y2)
{
return sqrt(double(pow(x1-x2, 2.0) + pow(y1-y2, 2.0)));
return sqrt(double((x1-x2)*(x1-x2) + (y1-y2)*(y1-y2)));
}
bool is_river(oter_id ter)
@@ -748,10 +748,15 @@ bool overmap::generate_sub(int const z)
std::vector<point> bunker_points;
std::vector<point> shelter_points;
std::vector<point> lmoe_points;
std::vector<point> cabin_strange_points;
std::vector<point> triffid_points;
std::vector<point> temple_points;
std::vector<point> office_entrance_points;
std::vector<point> office_points;
std::vector<point> prison_points;
std::vector<point> prison_entrance_points;
std::vector<point> haz_sar_entrance_points;
std::vector<point> haz_sar_points;
std::vector<point> cathedral_entrance_points;
std::vector<point> cathedral_points;
std::vector<point> hotel_tower_1_points;
@@ -825,6 +830,9 @@ bool overmap::generate_sub(int const z)
else if (ter(i, j, z + 1) == ot_lmoe)
lmoe_points.push_back( point(i, j) );
else if (ter(i, j, z + 1) == ot_cabin_strange)
cabin_strange_points.push_back( point(i, j) );
else if (ter(i, j, z + 1) == ot_mine_entrance)
shaft_points.push_back( point(i, j) );
@@ -855,6 +863,16 @@ bool overmap::generate_sub(int const z)
office_entrance_points.push_back( point(i, j) );
else if (ter(i, j, z + 1) == ot_office_tower_1)
office_points.push_back( point(i, j) );
else if (ter(i, j, z + 1) == ot_prison_1 || ter(i, j, z + 1) == ot_prison_3 ||
ter(i, j, z + 1) == ot_prison_4 || ter(i, j, z + 1) == ot_prison_5 || ter(i, j, z + 1) == ot_prison_6 ||
ter(i, j, z + 1) == ot_prison_7 || ter(i, j, z + 1) == ot_prison_8 || ter(i, j, z + 1) == ot_prison_9)
prison_points.push_back( point(i, j) );
else if (ter(i, j, z + 1) == ot_prison_2)
prison_entrance_points.push_back( point(i, j) );
else if (ter(i, j, z + 1) == ot_haz_sar_entrance)
haz_sar_entrance_points.push_back( point(i, j) );
else if (ter(i, j, z + 1) == ot_haz_sar)
haz_sar_points.push_back( point(i, j) );
else if (ter(i, j, z + 1) == ot_cathedral_1_entrance)
cathedral_entrance_points.push_back( point(i, j) );
else if (ter(i, j, z + 1) == ot_cathedral_1)
@@ -921,6 +939,9 @@ bool overmap::generate_sub(int const z)
for (int i = 0; i < lmoe_points.size(); i++)
ter(lmoe_points[i].x, lmoe_points[i].y, z) = ot_lmoe_under;
for (int i = 0; i < cabin_strange_points.size(); i++)
ter(cabin_strange_points[i].x, cabin_strange_points[i].y, z) = ot_cabin_strange_b;
for (int i = 0; i < triffid_points.size(); i++) {
if (z == -1) {
@@ -943,6 +964,14 @@ bool overmap::generate_sub(int const z)
ter(office_entrance_points[i].x, office_entrance_points[i].y, z) = ot_office_tower_b_entrance;
for (int i = 0; i < office_points.size(); i++)
ter(office_points[i].x, office_points[i].y, z) = ot_office_tower_b;
for (int i = 0; i < prison_points.size(); i++)
ter(prison_points[i].x, prison_points[i].y, z) = ot_prison_b;
for (int i = 0; i < prison_entrance_points.size(); i++)
ter(prison_entrance_points[i].x, prison_entrance_points[i].y, z) = ot_prison_b_entrance;
for (int i = 0; i < haz_sar_entrance_points.size(); i++){
ter(haz_sar_entrance_points[i].x, haz_sar_entrance_points[i].y, z-1) = ot_haz_sar_entrance_b1;}
for (int i = 0; i < haz_sar_points.size(); i++){
ter(haz_sar_points[i].x, haz_sar_points[i].y, z-1) = ot_haz_sar_b1;}
for (int i = 0; i < cathedral_entrance_points.size(); i++)
ter(cathedral_entrance_points[i].x, cathedral_entrance_points[i].y, z) = ot_cathedral_b_entrance;
for (int i = 0; i < cathedral_points.size(); i++)
@@ -1103,10 +1132,10 @@ int overmap::dist_from_city(point p)
}
void overmap::draw(WINDOW *w, game *g, int z, int &cursx, int &cursy,
int &origx, int &origy, char &ch, bool blink,
int &origx, int &origy, signed char &ch, bool blink,
overmap &hori, overmap &vert, overmap &diag)
{
bool legend = true, note_here = false, npc_here = false;
bool note_here = false, npc_here = false;
std::string note_text;
int om_map_width = TERMX-28;
int om_map_height = TERMY;
@@ -1292,40 +1321,39 @@ void overmap::draw(WINDOW *w, game *g, int z, int &cursx, int &cursy,
{
print_npcs(g, w, cursx, cursy, z);
}
if (legend) {
cur_ter = ter(cursx, cursy, z);
cur_ter = ter(cursx, cursy, z);
// Draw the vertical line
for (int j = 0; j < om_map_height; j++)
mvwputch(w, j, om_map_width, c_white, LINE_XOXO);
for (int j = 0; j < om_map_height; j++)
mvwputch(w, j, om_map_width, c_white, LINE_XOXO);
// Clear the legend
for (int i = om_map_width + 1; i < om_map_width + 55; i++) {
for (int j = 0; j < om_map_height; j++)
mvwputch(w, j, i, c_black, ' ');
}
if (csee) {
mvwputch(w, 1, om_map_width + 1, oterlist[ccur_ter].color, oterlist[ccur_ter].sym);
mvwprintz(w, 1, om_map_width + 3, oterlist[ccur_ter].color, "%s",
oterlist[ccur_ter].name.c_str());
} else
mvwprintz(w, 1, om_map_width + 1, c_dkgray, "# Unexplored");
if (target.x != -1 && target.y != -1) {
int distance = rl_dist(origx, origy, target.x, target.y);
mvwprintz(w, 3, om_map_width + 1, c_white, "Distance to target: %d", distance);
}
mvwprintz(w, 15, om_map_width + 1, c_magenta, "Use movement keys to pan. ");
mvwprintz(w, 16, om_map_width + 1, c_magenta, "0 - Center map on character");
mvwprintz(w, 17, om_map_width + 1, c_magenta, "t - Toggle legend ");
mvwprintz(w, 18, om_map_width + 1, c_magenta, "/ - Search ");
mvwprintz(w, 19, om_map_width + 1, c_magenta, "N - Add/Edit a note ");
mvwprintz(w, 20, om_map_width + 1, c_magenta, "D - Delete a note ");
mvwprintz(w, 21, om_map_width + 1, c_magenta, "L - List notes ");
mvwprintz(w, 22, om_map_width + 1, c_magenta, "Esc or q - Return to game ");
char level_string[10];
sprintf(level_string, "LEVEL %i",z);
mvwprintz(w, getmaxy(w)-1, om_map_width + 1, c_red, level_string);
for (int i = om_map_width + 1; i < om_map_width + 55; i++) {
for (int j = 0; j < om_map_height; j++)
mvwputch(w, j, i, c_black, ' ');
}
if (csee) {
mvwputch(w, 1, om_map_width + 1, oterlist[ccur_ter].color, oterlist[ccur_ter].sym);
mvwprintz(w, 1, om_map_width + 3, oterlist[ccur_ter].color, "%s",
oterlist[ccur_ter].name.c_str());
} else
mvwprintz(w, 1, om_map_width + 1, c_dkgray, "# Unexplored");
if (target.x != -1 && target.y != -1) {
int distance = rl_dist(origx, origy, target.x, target.y);
mvwprintz(w, 3, om_map_width + 1, c_white, "Distance to target: %d", distance);
}
mvwprintz(w, 15, om_map_width + 1, c_magenta, "Use movement keys to pan. ");
mvwprintz(w, 16, om_map_width + 1, c_magenta, "0 - Center map on character");
mvwprintz(w, 17, om_map_width + 1, c_magenta, "/ - Search ");
mvwprintz(w, 18, om_map_width + 1, c_magenta, "N - Add/Edit a note ");
mvwprintz(w, 19, om_map_width + 1, c_magenta, "D - Delete a note ");
mvwprintz(w, 20, om_map_width + 1, c_magenta, "L - List notes ");
mvwprintz(w, 21, om_map_width + 1, c_magenta, "Esc or q - Return to game ");
char level_string[10];
sprintf(level_string, "LEVEL %i",z);
mvwprintz(w, getmaxy(w)-1, om_map_width + 1, c_red, level_string);
// Done with all drawing!
wrefresh(w);
}
@@ -1340,7 +1368,7 @@ point overmap::draw_overmap(game *g, int zlevel)
int cursx = (g->levx + int(MAPSIZE / 2)) / 2,
cursy = (g->levy + int(MAPSIZE / 2)) / 2;
int origx = cursx, origy = cursy, origz = zlevel;
char ch = 0;
signed char ch = 0;
point ret(-1, -1);
overmap hori, vert, diag; // Adjacent maps
@@ -1444,9 +1472,7 @@ point overmap::draw_overmap(game *g, int zlevel)
cursx = found.x;
cursy = found.y;
}
}/* else if (ch == 't') *** Legend always on for now! ***
legend = !legend;
*/
}
else if (ch == ERR) // Hit timeout on input, so make characters blink
blink = !blink;
} while (ch != KEY_ESCAPE && ch != 'q' && ch != 'Q' && ch != ' ' &&
@@ -1934,7 +1960,7 @@ bool overmap::build_slimepit(int x, int y, int z, int s)
{
if (rng(1, s * 2) >= n)
{
if (one_in(8))
if (one_in(8) && z > -OVERMAP_DEPTH)
{
ter(i, j, z) = ot_slimepit_down;
requires_sub = true;
@@ -2006,6 +2032,9 @@ void overmap::place_rifts(int const z)
void overmap::make_hiway(int x1, int y1, int x2, int y2, int z, oter_id base)
{
if (x1 == x2 && y1 == y2)
return;
std::vector<point> next;
int dir = 0;
int x = x1, y = y1;
@@ -2757,7 +2786,7 @@ void overmap::place_mongroups()
for (int i = 0; i < numgroups; i++) {
zg.push_back(
mongroup("GROUP_WORM", rng(0, OMAPX * 2 - 1), rng(0, OMAPY * 2 - 1), 0,
rng(20, 40), rng(500, 1000)));
rng(20, 40), rng(30, 50)));
}
}

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