Compare commits

...

2825 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
Ethan "Soron" Kaminski 1cd0f1f61d Update changelog with everything since 602e64dafe 2013-05-30 19:01:23 +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
Ethan "Soron" Kaminski 783f0ef4a2 Merge PR #1216 - fix body temp equalization 2013-05-30 17:43:14 +12: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
Kevin Granade a98b011ed6 Merge pull request #1278 from dluechoy/keep_light_on
Vehicle head lights stay on after save and exit.
2013-05-29 21:28:31 -07:00
Tommy 492054b243 Display the correct inventory letter when picking up stacking items. 2013-05-30 16:20:43 +12:00
Kevin Granade c8b7515f38 Merge listing of all nearby items in advanced inventory. 2013-05-29 21:59:32 -05:00
Kevin Granade 78df118350 Merge pull request #1273 from i2amroy/Read-Time-INT-Effect
Read time INT penalty fix
2013-05-29 19:23:52 -07:00
D Lue Choy 0b035b344c Vehicle head lights stay on after save and exit.
They will also stay off.
This adds one integer to the "V ..."  entries of maps.txt

Signed-off-by: D Lue Choy <dluechoy@>
2013-05-29 22:15:05 -04:00
Kevin Granade afcec85b1c Mapgen enhancements and bugfixes. 2013-05-29 20:58:27 -05: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
Kevin Granade 29dcc1960c Merge fix to player exploration carrying over to later characters. 2013-05-29 19:58:43 -05:00
origamiwolf 45498558f9 Add zombie spawns to mansions 2013-05-30 07:47:29 +08:00
fnord d7b08463ea fix build breaking typo 2013-05-29 18:43:56 -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
fnord 2eb0ad444e advanced inventory: 'a' will now list everything in the surrounding
3x3 squares. defaults have changed from inventory, down, to down,
inventory (this fits my usage patterns better at least, can revert
if they're atypical). Color changes: The colors are subjectively
better.
2013-05-29 18:22:00 -05:00
origamiwolf 7b7b50dad7 Added more furnishings and items to mansion rooms 2013-05-30 00:34:06 +08:00
Fergus Dall a5620124d6 Stop generating extra lab levels after the finale 2013-05-29 20:58:48 +09:30
Fergus Dall 7642811bbf Generate extra downstairs in labs as needed to ensure connectivity 2013-05-29 20:58:09 +09:30
Christian Buskirk 9457aacdf0 Buffed INT penalty 2013-05-29 00:22:19 -07: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
Ilya Grigorev 9b15e7fcf8 fix crash 2013-05-28 17:49:04 +04:00
alex-gh 1f4459aafd Badly damaged clothing yields less raw materials when cut. Reinforced clothing yields more. 2013-05-28 09:57:44 +02:00
Ethan "Soron" Kaminski 8ab3b1a1cf Merge PR #1264 - show stat effects in @ screen 2013-05-28 18:47:39 +12:00
Ethan "Soron" Kaminski 085dcfd617 Merge PR #1263 - further refine rag requirements for sewing 2013-05-28 18:46:55 +12:00
Ethan "Soron" Kaminski 8e722ea716 Merge PR #1247 - spiral rooms now coded sanely 2013-05-28 18:46:36 +12:00
Ethan "Soron" Kaminski f15a4de104 Merge PR #1209 - avoid leaking seen overmap info 2013-05-28 18:46:16 +12:00
Fergus Dall 10e3ae9f33 Delete map exploration data on player death 2013-05-28 16:13:09 +09:30
veryinky 331bc16d61 Retry of player stat info on character screen 2013-05-27 23:25:11 -04:00
Reaper42 77c87667db Quickfix:sewing not require materials,if they are not nedded 2013-05-28 10:11:45 +07: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
Kevin Granade c8ce78afd0 Merge pull request #1258 from quietust/msvcfix
Fix MSVC compile
2013-05-27 15:49:06 -07:00
Kevin Granade ef83b84f8b A plethora of small bugfixes. 2013-05-27 17:17:17 -05:00
Kevin Granade a395843c68 Merge pickup menu enhancements. 2013-05-27 17:07:41 -05:00
Quietust 7615f98ff7 Fix MSVC compile, and re-enable optimization on itypedef.cpp 2013-05-27 16:50:14 -05:00
Kevin Granade a6494f5ad5 Merge cleanup of unload code. 2013-05-27 16:44:06 -05:00
Kevin Granade 379c161446 Store the current terrain and trap value in a local for temperature and fatigue calculations. 2013-05-27 16:39:57 -05:00
Kevin Granade 0c734d6832 Fix ter_at/ter mixup. 2013-05-27 15:54:01 -05:00
Kevin Granade 06e7288463 Merge more temperature system adjustments.
Conflicts:
	player.cpp
2013-05-27 15:53:18 -05:00
Kevin Granade a1833b71bb Remove an unused variable. 2013-05-27 15:20:31 -05:00
Kevin Granade 47fb78f48f Allow reading books with no associated skill as a noop. 2013-05-27 15:20:09 -05:00
Kevin Granade 3062f7b1c5 Merge mission enhancements and new lab locations. 2013-05-27 13:29:56 -05:00
Kevin Granade 685d36e801 Merge remote-tracking branch 'dda/master' into clear-overmap-buffer 2013-05-27 11:08:45 -05:00
Reaper42 928fc755cc Rags are not used as thread 2013-05-27 21:50:37 +07:00
veryinky 3942bb6bde Added electric cars to town spawns 2013-05-27 06:50:15 -04:00
veryinky 740ccdeae5 Flatbed trucks now have rear windows 2013-05-27 06:27:00 -04:00
fnord 43ab59355c pickup: make use of top border of item info window, to display item name 2013-05-27 04:15:12 -05:00
fnord 01975326ff inventory item submenu: can scroll to "=", selection highliter visible by default 2013-05-27 04:00:14 -05:00
fnord d19eb1b420 pickup: corrected mistaken removal of weight/volume subtraction on deselect 2013-05-27 03:49:05 -05:00
veryinky 6d6df3b0e0 Update catacurse so title bar displays .6git instead of .5 2013-05-27 04:33:37 -03:00
veryinky 5ed3f2cdc3 fix for int display in chargen 2013-05-27 03:20:43 -04:00
veryinky fd856d47cd thingy 2013-05-27 02:33:01 -04:00
veryinky 432aa7a7f9 .6 now 2013-05-27 03:15:21 -03:00
fnord 60d84eb9c7 pickup: item info automatically displays highlighted item 2013-05-27 01:06:25 -05:00
fnord 22a998a486 pickup: pagination corrections 2013-05-27 01:06:25 -05:00
fnord 8d25113870 pickup: selection highlights first item by default, follows letter input 2013-05-27 01:06:25 -05:00
veryinky 8eed366797 The 0.4-Git was annoying me 2013-05-27 01:47:45 -04:00
acidia 829b4c4755 Cleaning //tribute 2013-05-26 23:07:05 -05:00
acidia 52db89f7c8 Deleted some code artifacts in //tribute 2013-05-26 23:04:22 -05:00
Kevin Granade 49e7c28584 Merge a batch of simple bugfixes and refactors.
Conflicts:
	item.h
	player.cpp
	player.h
2013-05-26 22:50:13 -05:00
Kevin Granade 6377d81abc Really fix spiral room generation. 2013-05-26 20:14:45 -05:00
Kevin Granade 3c1b528685 Indention fix in spiral room generation. 2013-05-26 20:14:14 -05:00
Ethan "Soron" Kaminski 8f290fcc86 Unify and make sane the gun/tool unloading code
Closes #1242. Also makes it so that liquids don't get dumped on the ground if you're over-volume (since they can just go in another container).
2013-05-27 12:12:03 +12:00
Shoes01 e0e1f3e654 Removed some VARSIZE tags that weren't supposed to be 2013-05-26 21:05:42 -03:00
Shoes01 b663eef6f0 Update changelog 2013-05-26 21:02:59 -03:00
Shoes01 0ff829de6a Merge branch 'warmth' into features-and-tweaks 2013-05-26 20:59:22 -03:00
Shoes01 c7e5684425 Merge branch 'sleep-fixes' into features-and-tweaks 2013-05-26 20:59:17 -03:00
Shoes01 3df4b1af97 Tweaked warmth values of footwear 2013-05-26 20:55:31 -03:00
Shoes01 35ae82ec91 player::warmth now handles warmth reduction due to rain; wool is not affected 2013-05-26 20:47:45 -03:00
Ethan "Soron" Kaminski 34f6fb4e8d Set curammo properly in item constructor
Closes #1228. ACTUALLY closes #1142.
2013-05-27 11:18:44 +12:00
Ethan "Soron" Kaminski 7e53e362b3 Use standard item spawning method in game::wish
Closes #1142. Also makes it so that jacqueshammer spawns with no gasoline, but that's due to the item definition file.
2013-05-27 11:08:30 +12:00
Ethan "Soron" Kaminski 6319f032ec Monster-triggered crossbow traps only drop 1 bolt
Closes #1241.
2013-05-27 10:25:55 +12:00
Ethan "Soron" Kaminski 26c3919ded Recipe name collision message gives better info 2013-05-27 10:11:43 +12:00
Ethan "Soron" Kaminski e9fe6943b3 Made a couple crafting-related methods take player*, for NPC future-proofing 2013-05-27 10:10:57 +12:00
Octav Sandulescu b5c37c493e Add acid-from-batteries recipe. 2013-05-26 23:08:13 +01:00
Kevin Granade 9a83ba77d2 Today's batch of bugfixes. 2013-05-26 16:58:12 -05:00
Ethan "Soron" Kaminski e397c29983 Merge PRs #1239 and #1230 - trivial fixes 2013-05-27 09:35:08 +12:00
Ethan "Soron" Kaminski a49daf240c Rename mapgen_helper to building_generation 2013-05-27 09:31:39 +12:00
acidia e0ee49cfef Added FOLLOWUP for stringing mission together and strung 'patriot' together 2013-05-26 14:51:58 -05:00
Shoes01 0ead765da9 While sleeping, the player is informed if he is too cold or warm 2013-05-26 14:46:34 -03:00
Shoes01 0ec54e1dcf Sleeping is only interrupted by very hot or cold temperatures 2013-05-26 14:23:10 -03:00
Shoes01 efe30fdc31 Sofa and armchair get comfort messages too 2013-05-26 14:19:58 -03:00
Shoes01 faf89f3c8e Sleeping on an armchair or sofa is now benificial 2013-05-26 14:18:38 -03:00
jason.gilbert@nbed.nb.ca 195a68e9e1 Cold and heat are now less likely to interrupt sleeping 2013-05-26 14:12:39 -03:00
acidia b804dde202 Left a Testing Value in mattack::parrot 2013-05-26 12:07:46 -05:00
acidia d95c55f8c4 Added 'parrot' attack that will allow Mi Go to 'call out' 2013-05-26 11:57:30 -05:00
acidia 195446684f Added 'parrot' attack that will allow Mi Go to 'call out' 2013-05-26 11:56:53 -05:00
acidia 447fa2e768 Added 'parrot' attack that will allow Mi Go to 'call out' 2013-05-26 11:55:42 -05:00
Jan Christian Kaessens 1035cc8ba6 Fix for #1237, uninitialized moveCount 2013-05-26 18:54:02 +02:00
acidia 7929120aa8 Swap Broken Gas Pump for Broken Generator in Lab Utility 2013-05-26 11:49:03 -04:00
acidia 0696961ea7 Added Broken Generator 2013-05-26 11:46:22 -04:00
acidia e558e38487 Adding the Two Black Box Missions 2013-05-26 10:11:10 -05:00
acidia df013ad57b Adding the Two Black Box Missions 2013-05-26 11:09:26 -04:00
acidia 06f5c8ddd7 Added Starting Script for Black Box Transcript Mission 2013-05-26 11:07:03 -04:00
acidia c5e5541282 Added the Two Black Box Missions 2013-05-26 10:04:56 -05:00
jason.gilbert@nbed.nb.ca ab984471bd Oversized clothing can be worn regardless of encumberance or anything 2013-05-26 11:37:44 -03:00
jason.gilbert@nbed.nb.ca ca48e195b2 Added comment to list item flags (current and future planned ones) 2013-05-26 11:25:23 -03:00
jason.gilbert@nbed.nb.ca 2ee0736a5a Added OVERSIZE flags to items 2013-05-26 11:24:49 -03:00
jason.gilbert@nbed.nb.ca 9d766a375f Merge branches 'fixes' and 'new' into fixes 2013-05-26 10:59:22 -03:00
Octav Sandulescu 89e2fabaf4 Remove batteries from acid bomb recipe. 2013-05-26 14:32:39 +01:00
jason.gilbert@nbed.nb.ca c91b3ebaa2 Being hot now makes your MORE thirsty, not less 2013-05-26 09:33:01 -03:00
Octav Sandulescu 77bb0fe85f Typo fix 2013-05-26 13:02:44 +01:00
Octav Sandulescu 678b3f5f5c Get acid water from funnels during acid rain. 2013-05-26 13:00:38 +01:00
Fergus Dall 17a6d312a7 Fixed defective spiral cavern spirals 2013-05-26 17:58:08 +09:30
acidia cc5bccdf33 Add Black Box Spawn for Helicopter Crashes 2013-05-26 02:01:09 -05:00
Ethan "Soron" Kaminski a62858a5a5 Merge PR #1214 - 'V' looks in nearby containers, lab coats fittable 2013-05-26 18:34:09 +12:00
Ethan "Soron" Kaminski ab6425d526 Remove a couple dangling braces. 2013-05-26 18:08:10 +12:00
Ethan "Soron" Kaminski 7bad2dfd0a Fix another case of rng() in for loop conditionals 2013-05-26 17:57:49 +12:00
Ethan "Soron" Kaminski ac4c9c60d3 Remove some needless iteration in mapgen item spawning 2013-05-26 17:55:28 +12:00
Ethan "Soron" Kaminski bc07a5179f Fix a bug in mapgen spawn with rng() used in for loop conditional 2013-05-26 17:51:17 +12:00
Ethan "Soron" Kaminski 61e4d140e3 Merge PR #1212 - armor display bug 2013-05-26 17:45:42 +12:00
Fergus Dall 07317608bc Stop clearing artifact_itype_ids after save
Fixes #1213
2013-05-26 14:57:57 +09:30
Ethan "Soron" Kaminski b32ff5badc Make sewing pluralization saner 2013-05-26 17:09:27 +12:00
Ethan "Soron" Kaminski 4653350687 Sewing uses rags/leather from far away 2013-05-26 17:06:59 +12:00
acidia 8a2cc5493c Added Computer Commands for New Lab Rooms 2013-05-25 23:54:40 -05:00
acidia a97b899e74 6 New Lab Rooms and Added Concrete Walls to Rotate 2013-05-26 00:51:14 -04:00
Kevin Granade fb3ba56953 Base body temperature equalization on body temperature instead of convergant temperature. 2013-05-25 23:42:38 -05:00
acidia 0ee8e83212 Added Computer Functions for Data Lab 2013-05-26 00:39:43 -04:00
origamiwolf 16ab75d7fa Condensed protection values into one line 2013-05-26 12:37:50 +08:00
acidia 3a4c5e8047 Added Black Box 2013-05-25 23:35:06 -05:00
acidia 26611e970f Added Black Box Transcript 2013-05-25 23:33:24 -05:00
origamiwolf 9d984bbd5f Revert window size expansion 2013-05-26 12:30:20 +08:00
Ethan "Soron" Kaminski 141d788990 Factor out a bit of common logic in iuse::sew 2013-05-26 16:06:05 +12:00
Ethan "Soron" Kaminski ef00549452 Save-breaking typo fix: "stablizer" -> "stabilizer" 2013-05-26 15:47:13 +12:00
Christian Buskirk 5f3ccbcf1c Stopped players from being able to (e)xamine sealed crates to see their contents 2013-05-25 20:42:22 -07:00
Christian Buskirk 552a6d3cd4 Removed extraneous spaces 2013-05-25 20:04:34 -07:00
Christian Buskirk efa46c5d62 Allows the V menu to see items in adjacent containers unless container is sealed
Addresses issue #272
2013-05-25 19:45:09 -07:00
origamiwolf 92739fdbeb Expand item examine window 2013-05-26 10:42:05 +08:00
Ethan "Soron" Kaminski 84a0becfe4 Add corpse revivification to active item handling in inventory 2013-05-26 13:59:10 +12:00
Christian Buskirk 31c5694c10 Allow lab coats to be fitted
Fixes problem #1160
2013-05-25 18:43:32 -07:00
Ethan "Soron" Kaminski 1c0e09c334 Extract common weapon/inventory active item code from player 2013-05-26 13:30:14 +12:00
Kevin Granade 5aa4104683 Clear overmap_buffer when exiting a game session to avoid leaking seen state to another character. 2013-05-25 19:59:07 -05:00
origamiwolf d626730dd2 Fixed incorrect armour documentation 2013-05-26 08:48:44 +08:00
Ethan "Soron" Kaminski f3b0bcb7c9 Merge PR #1204 - fix NPC segfault (in choose_escape_item()) 2013-05-26 12:46:01 +12:00
Kevin Granade 6db72c165c Also check for no item found in use_escape_item(). 2013-05-25 19:40:53 -05:00
Kevin Granade d67fc55322 Merge headlights for default vehicles.
Conflicts:
	veh_typedef.cpp
2013-05-25 19:05:20 -05:00
Kevin Granade 78942cc30f Merge a batch of minor fixes. 2013-05-25 19:04:01 -05:00
Kevin Granade 0f682ec45e Merge improved vehicle collision code. 2013-05-25 18:55:18 -05:00
D Lue Choy d4f500787b Road vehicles now have a non-zero number of headlights.
Scooter, Military Truck and Semi Truck templates now have a similar number of head lights as the vehicles they are inspired by.
The lights have not been repositioned optimally for the game.

Signed-off-by: D Lue Choy <dluechoy@>
2013-05-25 19:54:01 -04:00
Ethan "Soron" Kaminski 986b7a07f0 Merge PR #1147 - bicycle seats 2013-05-26 11:25:13 +12:00
Ethan "Soron" Kaminski 835652c5d2 Merge PR #1206 - percent signs in gunmod descriptions 2013-05-26 11:24:04 +12:00
Ethan "Soron" Kaminski 6f63dd7522 Merge PR #1163 - improved armor damage descriptions 2013-05-26 11:16:36 +12:00
Fergus Dall ab15f1a879 Make % sign appear properly for the magazine line in gunmod descriptions
Fixed #1179
2013-05-26 08:42:09 +09:30
Ethan "Soron" Kaminski 4f8010d0a0 Merge PR #1202 - fix firing into smoke 2013-05-26 11:01:22 +12:00
Ethan "Soron" Kaminski 0988944949 Merge PR #1165 - moving furniture causes noise 2013-05-26 10:56:36 +12:00
Ethan "Soron" Kaminski c52f6b9048 Merge PR #1164 - fix teleporting arrows, etc.
Conflicts:
	ranged.cpp
2013-05-26 10:56:11 +12:00
Williham Totland 1e07470c98 Resolves an issue where bearings would not spawn. 2013-05-26 00:53:36 +02:00
Williham Totland 61113a8dd9 Resolves an issue where saving would oblitterate skill practice 2013-05-26 00:46:41 +02:00
Williham Totland 5acbb5b3db Disassembling ammo gives firearms training. 2013-05-26 00:44:20 +02:00
Kevin Granade ebecd3b40e Prevent use of an invalid index in NPC AI code.
Thanks jkaessens for providing the backtrace that enabled solving it.
2013-05-25 17:42:27 -05:00
Williham Totland 01cc3f6bf7 Foraging gives survival exprience 2013-05-26 00:40:21 +02:00
Williham Totland fcee31c237 Imroves birthday math 2013-05-26 00:39:17 +02:00
Kevin Granade 21855e2176 Remove redundant check of map::sees() that was confusing us when targeting monsters standing in smoke. 2013-05-25 16:12:16 -05:00
Kevin Granade 68cadcb52c Clean up some comments in game::target(). 2013-05-25 16:11:25 -05:00
Kevin Granade a28693139d More small fixes. 2013-05-25 15:01:31 -05:00
fnord 2e3af258b4 switched back to debugmsg (disabled) 2013-05-25 14:13:41 -05:00
fnord 528edd10b2 Revert "Enabling collision logging": silly assumption about dbg()
This reverts commit 01bfde4bc7.
2013-05-25 14:09:59 -05:00
Kevin Granade 8bf2035d3c Merge remote-tracking branch 'dda/pr/1167' into dda-master 2013-05-25 14:09:26 -05:00
fnord 25c9986d4d Moving items to the ground via advanced inventory and drop will add charges if applicable (ammo etc) 2013-05-25 13:57:03 -05:00
fnord 0c759878bd fixed left/right miscounting in pickup 2013-05-25 13:08:07 -05:00
origamiwolf 903feb9bc1 Added notes on how armour protection works 2013-05-25 23:12:59 +08:00
jason.gilbert@nbed.nb.ca 23f088e938 Merge branch 'fire-head-fix' of github.com:Shoes01/Cataclysm-DDA into test
Conflicts:
	disease.cpp
2013-05-25 11:58:23 -03:00
Kevin Granade c9ef1d465b Simple bugfix megamerge. 2013-05-25 09:55:14 -05:00
origamiwolf 9d61f574e8 Fix segfault when trying to read a wielded book 2013-05-25 22:48:41 +08:00
fnord 01bfde4bc7 Enabling collision logging 2013-05-25 09:21:26 -05:00
Octav Sandulescu f673fe21d2 Fix the Code::Blocks project by including material.{h,cpp}. 2013-05-25 14:58:16 +01:00
Ethan "Soron" Kaminski 7f5d6f8383 Fix an occasional segfault due to improper vector bounds in rng()
Thanks to forum user utunnels for spotting this (see http://www.cataclysmdda.com/smf/index.php?topic=1478).
2013-05-26 00:16:36 +12:00
fnord a9606106cd Vehicle collisions no longer become insane ping-pong fests that generate
velocity out of nowhere: vector changes now derived from equations at
http://en.wikipedia.org/wiki/Elastic_collision
2013-05-25 04:15:35 -05:00
fnord 029ce0d948 Added missing break; that caused disassemble to prompt for reassign 2013-05-25 03:24:14 -05:00
Kevin Granade 97e822da48 Merge Cathedral and a batch of new missions. 2013-05-24 22:20:49 -05:00
Fergus Dall 25b58a0873 Make autosave save mapdata and artifacts properly
Fixes #1175
2013-05-25 12:42:50 +09:30
Fergus Dall d9dcdb8915 Make artifact loading work for artifacts on the ground 2013-05-25 12:27:36 +09:30
Williham Totland c02fd28af1 40mm acid bomb crafting 2013-05-25 02:56:53 +02:00
Williham Totland a22522a725 Adds acid bomb 40mm shells 2013-05-25 02:47:13 +02:00
Fergus Dall 8dc7cd36fe Separated t_locker and t_rack from t_fridge and t_glass_fridge in map::bash 2013-05-25 09:35:04 +09:30
Kevin Granade 49b3b63d72 Merge skill gain/morale refactor. 2013-05-24 18:51:21 -05:00
fnord d2501bc030 Advanced inventory takes equipped items plus weapon into account and limits pickups accordingly. (Until invlet indexing is eliminated) 2013-05-24 14:06:19 -05:00
D Lue Choy 97b9331afb 96% fix for issue #808
Unfortunately worn items with charges (not implemented) are not ejected
from inventory. And item letter collisions are not corrected.
2013-05-24 14:15:20 -04:00
Fergus Dall 6451098bd8 Make lockers and racks spawn pipe instead of hose
Fixes #1172
2013-05-24 22:37:59 +09:30
Steven Wu 510c759f64 Fixes #960 by removing (dam != 0) check 2013-05-24 00:04:04 -07:00
Fergus Dall 6363ad61f7 Prevent non-version tags from being used for version info.
Fixes #1141
2013-05-24 15:58:58 +09:30
origamiwolf 551fc095ac Armour layering UI now shows fitted encumbrance values and coverage 2013-05-24 13:10:26 +08:00
Kevin Granade 7cfb3e9369 Merge pull request #1162 from ethankaminski/fridge-hoses
Make fridges drop a hose when deconstructed/smashed
2013-05-23 21:26:14 -07:00
Kevin Granade 222ce076f5 Add noise when moving furniture. 2013-05-23 23:06:57 -05:00
Kevin Granade d7d7b8bf49 Refactor game::fire() to behave sensibly about trajectories. 2013-05-23 22:50:15 -05:00
Ethan "Soron" Kaminski b5ace4ad2a Extract mapgen to helper methods, up to ot_forest_water 2013-05-24 15:20:36 +12:00
Kevin Granade 35eea03570 Remove HP reference from bite attack. 2013-05-23 21:37:26 -05:00
Kevin Granade 91449a4fc0 Apply new damage verbs to feedback when armor is damaged. 2013-05-23 21:36:26 -05:00
Kevin Granade 3e835b85a0 Add strings describing how different matrials take damage to material_type. 2013-05-23 21:35:47 -05:00
Ethan "Soron" Kaminski 0816af5cb8 Use the helper files for helper functions 2013-05-24 14:34:45 +12:00
Ethan "Soron" Kaminski a783ea88d3 Add a proper struct for passing around neighbor data 2013-05-24 14:30:43 +12:00
Ethan "Soron" Kaminski 8e4024afb0 Extract ot_null generation to a helper method 2013-05-24 14:15:01 +12:00
Ethan "Soron" Kaminski d29b244ff3 Add a debugmsg call when generating ot_null terrain 2013-05-24 14:04:27 +12:00
Ethan "Soron" Kaminski 092793805b Make fridges drop a hose when deconstructed/smashed 2013-05-24 13:48:23 +12:00
acidia 3d5ba4eae8 Fixed Jabberwock Name Typo 2013-05-23 20:34:09 -05:00
acidia 4350320437 Moved Jabberwock entry 2013-05-23 20:24:10 -05:00
acidia 3153790ac8 Moved Jabberwock entry 2013-05-23 20:17:35 -05:00
acidia 2316fd5911 Moved Jabberwock entry 2013-05-23 20:15:52 -05:00
acidia b8519ed9c7 Added flesh golem attack, chance of roar and a swipe attack that can knock you down. 2013-05-23 19:54:54 -05:00
Ethan "Soron" Kaminski 4183d70999 Update the help text about XP and learning 2013-05-24 12:53:29 +12:00
acidia 9a8283e121 Added flesh_golem attack 2013-05-23 19:48:09 -05:00
acidia 6f96ab0173 Added flesh golem attack, chance of roar and a swipe attack that can knock you down. 2013-05-23 19:47:27 -05:00
acidia 9f48d73510 Made flag mission text a bit clearer 2013-05-23 19:41:24 -05:00
acidia 305d1f5cdd Fixed warning statments caused by stained glass windows code... 2013-05-23 19:37:35 -05:00
Ethan "Soron" Kaminski b1a8c6d395 Remove references to skill comprehension 2013-05-24 12:22:57 +12:00
Ethan "Soron" Kaminski bd364111dc Replace references to "XP" with "Focus" 2013-05-24 12:12:21 +12:00
Kevin Granade e9745bba42 Merge armor handling refactor. 2013-05-23 18:51:17 -05:00
Ethan "Soron" Kaminski 3882cb5cc2 Add missing break statements to item examination logic 2013-05-24 10:08:52 +12:00
Ethan "Soron" Kaminski 7920ca2d48 Merge PR #1126 - armor UI tweaks
Conflicts:
	data/changelog.txt
2013-05-24 09:39:04 +12:00
Ethan "Soron" Kaminski 8673eea0a1 Merge PR #1151 - switching levels during map view 2013-05-24 09:25:58 +12:00
Ethan "Soron" Kaminski dc2d6a7244 Merge PR #1158 - fix backspacing in empty text fields 2013-05-24 09:13:11 +12:00
fnord 34d4b97189 string input popup: Prevent junk (^, etc) from being added if backspace is hit
while line is blank.
2013-05-23 10:44:04 -05:00
origamiwolf eb0f327c49 Added disassembly recipe for vacuum sealer 2013-05-23 22:01:00 +08:00
origamiwolf 877b136f02 remove storage check to show all allowable clothing on specific body part 2013-05-23 21:20:56 +08:00
Fergus Dall 705a2f25d6 Add level indicator to overmap screen 2013-05-23 20:30:28 +09:30
TheDarklingWolf 10ce9024f4 Merge branch 'pr/1148' 2013-05-23 09:47:08 +01:00
Kyratzes Talvadore 40350df34f Merge pull request #1146 from ethankaminski/vehicle-animation
Remove the vehicle animation delay
2013-05-23 01:38:14 -07:00
Fergus Dall ad3c7828d4 Make debug menu "Reveal map" reveal different z-levels as well 2013-05-23 16:47:39 +09:30
Fergus Dall 25dd4be923 Make '<' and '>' show different z-levels on the overmap screen 2013-05-23 16:47:29 +09:30
Kevin Granade 9474e84e35 Another day, another bugfix merge.
Conflicts:
	game.cpp
2013-05-22 19:42:07 -05:00
Kevin Granade ede15e1a8f Don't limit trajectory drawing to erroneous sight range. 2013-05-22 18:53:12 -05:00
Kevin Granade b51549e20a Use game::u_see() to check visibility and map::sees() to draw line in targeting screen. 2013-05-22 18:53:12 -05:00
Kevin Granade b9f6c70b95 Use map::draw() in game::plthrow() and game::plshoot() instead of drawing manually. 2013-05-22 18:53:12 -05:00
Kevin Granade 6359d73864 Drow enemes even when they're out of range. 2013-05-22 18:53:12 -05:00
Kevin Granade f8a43b5053 Add a saddle item and vehicle part for bicycles and motorcycles.
It is smaller and lighter than a car seat, but cannot have a seatbelt attached.
Incidentally it also can't hold tems dropped on it.
2013-05-22 18:52:39 -05:00
Kevin Granade f7b4bb5635 Require an anchor point to be present to install a seatbelt. 2013-05-22 18:52:39 -05:00
Kevin Granade 27f6f4064a Add new anchor point flag and apply it to car seats. 2013-05-22 18:52:39 -05:00
Kevin Granade 783bc2cc18 Nuke some commented out debug code. 2013-05-22 18:52:39 -05:00
Ethan "Soron" Kaminski 524ad4a5e1 Remove the vehicle animation delay
Nobody seems to like the vehicle animation delay, and I'm not aware of any reason why it's in the code, other than slowing down the animation. Excising the code.
2013-05-23 11:25:50 +12:00
Ethan "Soron" Kaminski 3ed605f45f Typo fix ("ressign" -> "reassign") 2013-05-23 11:22:57 +12:00
Ethan "Soron" Kaminski dcca01a26d Merge PR #1134 - in-inventory invlet reassignment 2013-05-23 11:06:07 +12:00
Charlie Nolan (FunnyMan3595) deedf81e90 Fixed a bug that prevented books from giving experience at 0 skill. 2013-05-22 15:04:19 -05:00
Charlie Nolan (FunnyMan3595) bd387006f4 SkillLevel::train and _exercise have increased granularity. 2013-05-22 11:00:39 -05:00
Charlie Nolan (FunnyMan3595) ed149d8ef3 max_ex < min_ex produces strange results in rng() 2013-05-22 10:13:59 -05:00
Charlie Nolan (FunnyMan3595) 086e56c81d Styling fix. 2013-05-22 10:12:27 -05:00
Charlie Nolan (FunnyMan3595) 3b561a037e No need to check for XP in the pool anymore. 2013-05-22 10:00:42 -05:00
Charlie Nolan (FunnyMan3595) e97fd63d8b Minor fixes to learning's rng() calls. 2013-05-22 09:59:51 -05:00
Charlie Nolan (FunnyMan3595) 9475956cdc Bugfix and minor cleanup to player::calc_focus_equilibrium 2013-05-22 09:55:54 -05:00
origamiwolf f74a85320e sauces now spawn in glass jars 2013-05-22 22:38:25 +08:00
origamiwolf d314685789 Added detailed armor info 2013-05-22 21:01:06 +08:00
origamiwolf 42d5e77536 Ensure distinct colours for armour damage, and added color key 2013-05-22 19:22:53 +08:00
Ethan "Soron" Kaminski 6d35478837 Remove obsolete sklevel member from player class 2013-05-22 20:43:30 +12:00
fnord be01f5fcab reassign invlet inside inventory with "=" item menu option 2013-05-22 03:07:25 -05:00
Ethan "Soron" Kaminski ad9f771c02 Remove obsolete, unused skill-related members of player class 2013-05-22 18:38:07 +12:00
Ethan "Soron" Kaminski 268819aa44 Merge PR #1101 - correct behavior of wborder in catacurse 2013-05-22 17:51:59 +12:00
Ethan "Soron" Kaminski 865b5ec6ba Merge PR #1125 - arrow keys work in multidrop/pickup windows 2013-05-22 17:48:13 +12:00
Ethan "Soron" Kaminski d2d7cc175e Merge PR #1114 - catacurse color tweaks 2013-05-22 17:47:04 +12:00
Ethan "Soron" Kaminski a195837be5 Erase the item info window when closing the pickup UI 2013-05-22 17:41:19 +12:00
Ethan "Soron" Kaminski 3ee1b69be4 Fix pickup window flickering in slow contexts 2013-05-22 17:39:55 +12:00
Ethan "Soron" Kaminski cec14342fa Merge PR #1118 - bifocals 2013-05-22 16:49:22 +12:00
Ethan "Soron" Kaminski e6b8b4b858 Merge PR #1117 - gasoline lanterns 2013-05-22 16:25:32 +12:00
fnord 9d7ed3b561 Added declaration that got lost in manual patch 2013-05-21 22:34:05 -05:00
alex-gh 723002d92b Gasoline lantern no longer disappears when it runs out. 2013-05-22 02:38:17 +02:00
alex-gh 05037ceed2 Gasoline lantern actually produces light now. Updated indentation of player::active_light to indentation required by CODE_STYLE 2013-05-22 01:56:50 +02:00
Fergus Dall f4795426be Make bifocal glasses spawn in bedrooms, offices and churchs 2013-05-22 08:21:37 +09:30
alex-gh acdf2094d0 Gasoline lanterns can actually spawn now. 2013-05-22 00:25:44 +02:00
Ethan "Soron" Kaminski bbd5143dc3 Merge PR #1110 - sewing crash fix 2013-05-22 10:20:21 +12:00
Ethan "Soron" Kaminski 9e23cf1a92 Merge PR #1115 - excise silly rounding logic 2013-05-22 10:13:40 +12:00
Ethan "Soron" Kaminski edafe2e453 Only warn about exiting a moving vehicle if >= 1 mph 2013-05-22 09:56:03 +12:00
Ethan "Soron" Kaminski e11b84b982 Merge PR #1127 - vehicle flinging fix
Conflicts:
	game.cpp
2013-05-22 09:27:00 +12:00
Ethan "Soron" Kaminski 8c1751c0b5 Merge PR #1124 - healing fixes, toolset normalization, soldering iron decomp 2013-05-22 09:08:02 +12:00
Skyrunner eafd32048b Fixed issue # 1037. fling_player_or_monster now considers vehicle speed when flinging. 2013-05-21 23:56:31 +09:00
origamiwolf 8712b85bea Updated changelog 2013-05-21 22:18:20 +08:00
origamiwolf b9b08294c9 Fixed bug in armour sort reassignment 2013-05-21 22:16:19 +08:00
origamiwolf f162d0f195 Use itype names instead and colour to indicate damage status 2013-05-21 21:58:21 +08:00
fnord ff98c8c4db Corrected typo: '\n' exits, '\t' selects 2013-05-21 08:09:41 -05:00
fnord 3f13bb9f25 multidrop allows scrolling with up/down, and selection with left/right 2013-05-21 07:53:26 -05:00
fnord ce19e1bf8d Arrow selection in 'g'et command 2013-05-21 07:52:44 -05:00
Williham Totland f64cb83838 Resolves an issue where rags and patches would not be consumed. 2013-05-21 14:00:29 +02:00
Williham Totland d790f8f9ba Normalizes toolset usage, makes soldering iron learnable from decomp 2013-05-21 13:56:39 +02:00
Williham Totland f42e20b48d Made V. Fast Healer/Regeneration be more effective while sleeping also. 2013-05-21 13:52:24 +02:00
Ethan "Soron" Kaminski 5f6441214b Learning from skill books reduces mental focus equilibrium point 2013-05-21 21:09:54 +12:00
Fergus Dall ded915d780 Fixed compiler error 2013-05-21 17:46:45 +09:30
Fergus Dall a711120781 Add bifocal glasses
Closes #845
2013-05-21 16:24:16 +09:30
Joshua Hunter ec1e7b63e1 fixed comment above to show new values for rng 2013-05-20 23:47:50 -07:00
alex-gh 6479dfcbe2 Lowered the efficiency a bit. The lanterns were too efficient. 2013-05-21 06:29:37 +02:00
alex-gh d3462eca05 Added gasoline lanterns. 2013-05-21 06:11:43 +02:00
Joshua Hunter 479f6feb6c fixes rng rounding error on initial fuel state 2013-05-20 18:39:54 -07:00
Dirkkun d897f1b9cb Catacurses color tweaks
Brightens the darker colors to remove ninja bears and stealthy zombie
hulks. Also makes light gray a bit darker because it currently looks
white.
2013-05-20 20:56:03 -04:00
Ethan "Soron" Kaminski c37e641e6b Merge PR #1085 - shrub smashing tweak 2013-05-21 11:19:39 +12:00
Ethan "Soron" Kaminski e098d1d39b Add feedback about focus gain to the morale screen 2013-05-21 11:16:52 +12:00
Ethan "Soron" Kaminski a2727180df Fix an NPC initialization bug
Nasty little thing that could cause a crash at game start, due to an index being out-of-bounds.
2013-05-21 10:51:27 +12:00
Ethan "Soron" Kaminski 79fc31c74f Merge UI enhancements (PRs #1095, #1093, #1081) 2013-05-21 10:32:11 +12:00
fnord cda170ff64 Add missing check for empty list 2013-05-20 16:30:36 -05:00
Williham Totland 7fceef44f2 Resolves an issue where destroying an item while tailoring would crash the game. 2013-05-20 18:32:09 +02:00
origamiwolf d1e11bf78a Display coverage in item stats, and fixed parenthesis warning 2013-05-20 22:48:46 +08:00
origamiwolf 3957eb2bf6 Add a small luck factor for armour damage to prevent complete invulnerabilities 2013-05-20 22:33:30 +08:00
origamiwolf bb56645fb0 Indentation cleanup 2013-05-20 22:28:48 +08:00
origamiwolf 04bd38a2ab Use coverage to determine if armour is hit, and thickness to determine damage absorption and armour damage 2013-05-20 22:23:13 +08:00
fnord 78591cd9ca Changing square resets page and position in list. Active border color yellow. 2013-05-20 02:11:26 -05:00
fnord fe2b68697b item colors for active window (green for usable ammo, blue for useful books etc) 2013-05-20 01:57:36 -05:00
fnord 4d27d8a250 Currently active window border is green. For windows, this requires
dab2041d158d804ae1fec8af937af3f145ab1c44 ( catacurse_wborder_fix )
2013-05-20 01:51:41 -05:00
fnord c474d10f77 Restructuring sorting to add less clutter. 2013-05-20 01:50:11 -05:00
fnord 600130b1a1 wborder() should not wattron(win, c_white): ncurses does not, and it prevents custom border colors
via 'wattron(win, c_green);  wborder(win, ...);  wattroff(win, c_green);'
2013-05-20 01:34:46 -05:00
Ethan "Soron" Kaminski 602e64dafe Update changelog for everything since 0.5 2013-05-20 17:42:27 +12:00
acidia 22f93982df small mission dialogue edits 2013-05-19 20:39:05 -05:00
acidia 6bb10531bc Added Jabberwock monster 2013-05-19 19:43:39 -05:00
acidia eb345f04c2 Added Jabberwock monster 2013-05-19 19:42:36 -05:00
acidia 96a4d54295 Added Jabberwock monster 2013-05-19 19:41:23 -05:00
acidia ca9a57c684 Added Kill Jabberwock mission 2013-05-19 19:39:49 -05:00
acidia 9074961c55 Added Kill Jabberwock 2013-05-19 19:38:03 -05:00
acidia 909ca50c49 Adding place_jabberwock 2013-05-19 19:33:10 -05:00
acidia c0f8cea2cf Added Kill Jabberwock 2013-05-19 19:30:14 -05:00
origamiwolf c4318c4e3d Made bash_resist and cut_resist accessors const 2013-05-20 07:51:57 +08:00
acidia 14eb3ddd4f Added Corporate Accounting Ledger, Patient Records, and National Weather Transcripts 2013-05-19 17:49:23 -04:00
acidia 8a3bec3f62 Added spawning of unique items for quests 2013-05-19 16:43:08 -05:00
acidia 697cba3bb5 Added new missions to mission_id 2013-05-19 16:28:37 -05:00
acidia b5087e1ed4 Added new missions... 2013-05-19 16:27:27 -05:00
acidia fd689a4a3b Added dialogue for 4 of the new missions 2013-05-19 16:26:00 -05:00
acidia e38776ab89 Added Corporate Accounting Ledger, Patient Records, and National Weather Transcripts 2013-05-19 16:17:59 -05:00
acidia 06696b6002 Added the small relic for the cathedral fetch quest 2013-05-19 16:11:58 -04:00
acidia 491273bd35 Added Cathedral
The towers will get filled in with the addition of z-levels...
2013-05-19 16:08:24 -04:00
acidia 4182ff8bf5 Added Cathedral 2013-05-19 15:05:51 -05:00
acidia 49589a2406 Added Cathedral 2013-05-19 16:03:19 -04:00
fnord 65e992f0c2 Advanced inventory now remembers the last sorting method of each
pane. This is only per game session, pending a method to add trivial
variables without breaking savegames.
2013-05-19 14:04:29 -05:00
fnord 15df8f7f37 Typo correction(s) and sanity check 2013-05-19 12:11:43 -05:00
fnord 73378e1456 Documented sort key and current sorting method 2013-05-19 12:04:07 -05:00
fnord 6bf376f3cf Advanced inventory will now sort via the 's' key: unsorted (order that
items were added), by name, weight, volume, and charges. (pending more).
Also:
* up/down in the 'e'xamine window will move to the next / previous
item in the list.
* weight and volume are displayed for ground / car squares
2013-05-19 11:48:55 -05:00
acidia 1708fc2b3b Added find flag dialogue 2013-05-19 12:22:57 -04:00
acidia 91f2a5a00a Added Find Flag 2013-05-19 11:19:04 -05:00
acidia 748d7561d8 Added GET_FLAG 2013-05-19 11:18:14 -05:00
acidia 1faf1e61c0 Added American Flag 2013-05-19 11:14:54 -05:00
acidia 2dbd68c703 Added American Flag Spawn for School 2013-05-19 11:13:11 -05:00
origamiwolf 08e8426cbd Added a new function and UI to re-layer clothing 2013-05-20 00:00:57 +08:00
origamiwolf c68bb0f295 Fully separate armour geometry from materials 2013-05-19 14:47:20 +08:00
Ethan "Soron" Kaminski ef62aeaa65 Rework learning mechanics, following issue #613
Implements items 1 through 5, from issue #613.
2013-05-19 16:50:20 +12:00
origamiwolf c288630d74 outer layers of armour protect inner layers 2013-05-19 12:30:42 +08:00
Kevin Granade d9de70eb3f Merge remote-tracking branches 'dda/pr/1082' and 'dda/pr/1083' into dda-master
Conflicts:
	game.h
2013-05-18 21:57:57 -05:00
Kevin Granade 9e3482b8ef Reduce difficulty to smash a shrub into underbrush. 2013-05-18 20:48:29 -05:00
Ethan "Soron" Kaminski d578c09c85 Account for ingredient age during cooking 2013-05-19 11:50:14 +12:00
Ethan "Soron" Kaminski 3d03d8c2a7 Stop item tags from spreading during map load 2013-05-19 11:22:14 +12:00
Ethan "Soron" Kaminski 3c70c9475c Fix iuse::sew indentation 2013-05-19 11:02:22 +12:00
Ethan "Soron" Kaminski 68551c1145 Merge PR #1069 - rags and leather for sewing repairs 2013-05-19 10:59:11 +12:00
Ethan "Soron" Kaminski 348e83c86a Merge PR #1076 - scrolling in menus, inventory 2013-05-19 10:37:22 +12:00
Ethan "Soron" Kaminski 3983e49459 Merge PR #1080 - pit constructions 2013-05-19 10:32:09 +12:00
Ethan "Soron" Kaminski a09087b3f2 Merge PR #1038 - scentmap optimization 2013-05-19 10:25:42 +12:00
fnord 4e66ed5cb3 One can now choose to ignore further sound interruptions and complete current task. Example: reloading while dozens of zeds are beating down walls. 2013-05-18 14:16:57 -05:00
origamiwolf ff458e43ea separate out materials contributions to armour protection values 2013-05-19 01:42:44 +08:00
fnord 4466f7e315 Actually remembers selection now. Oops 2013-05-18 12:36:59 -05:00
origamiwolf 1140e5a28a Fixed material not being passed correctly, and added chitin to item factory 2013-05-19 01:06:42 +08:00
Kevin Granade 9bef3b10ef Merge remote-tracking branches 'dda/pr/1077' and 'dda/pr/1078' into dda-master 2013-05-18 10:06:20 -05:00
Kevin Granade eb27dae044 Add pit construction recipe to the start of constructions requiring a pit.
This is to avoid confusion about their apparent unbuildability.
Thanks vache for pointing out this solution.
2013-05-18 10:02:56 -05:00
origamiwolf 0a2bfc91f4 use materials functions in armour absorption code 2013-05-18 22:46:25 +08:00
Kevin Granade d0e47205ea Prevent navagable terrain from receiving the scent-blocking trait. 2013-05-18 09:38:09 -05:00
Kevin Granade 431c9cdb1f Merge remote-tracking branch 'dda/master' into scent-performance 2013-05-18 09:22:06 -05:00
Kevin Granade 2a77a1307e Merge pull request #1052 from ethankaminski/windows-fixes
Catacurse fixes (closes #1045)
2013-05-18 07:20:45 -07:00
fnord 4e964a58f9 inventory will remember last selection position when backing out of per item menu 2013-05-18 08:28:43 -05:00
fnord 37d1a0b365 The inventory now allows selection via up / down / enter keys. 2013-05-18 08:14:49 -05:00
origamiwolf aeee7fa419 Added more materials calls, moved material resistance matrix to json 2013-05-18 19:51:44 +08:00
Ethan "Soron" Kaminski af799bc6c4 Track used items in game::consume_items 2013-05-18 22:59:40 +12:00
fnord efd23ef434 Item menu in inventory allows up/down/enter selection as well. compare_split_screen_popup has been abused further, taking an additional optional argument and returning int instead of char. 2013-05-18 05:55:42 -05:00
Ethan "Soron" Kaminski 0cb717e342 Use a std::list for used item tracking (easier to combine) 2013-05-18 22:46:45 +12:00
Ethan "Soron" Kaminski d13ca72b67 Make containers unloadable again 2013-05-18 22:16:37 +12:00
Ethan "Soron" Kaminski d85b39e41f Use boolean rather than bitwise logic in a conditional 2013-05-18 21:57:47 +12:00
Ethan "Soron" Kaminski 6a570f0c53 Merge PR #1019 - weather handles non-default starting time 2013-05-18 21:42:13 +12:00
fnord 1ec122d162 Background for selected entry extends the entire line. 2013-05-18 04:30:55 -05:00
Ethan "Soron" Kaminski cf1fcdde28 Merge PR #1073 - spontaneous fitting fix 2013-05-18 21:30:35 +12:00
fnord 2dd42317ef menu function allows selection via up/down + enter in addition to
single character.
2013-05-18 03:50:44 -05:00
origamiwolf 7da807e1be set up JSON for materials 2013-05-18 16:38:49 +08:00
Kevin Granade 989be8275d Merge welder fix. 2013-05-17 23:56:16 -05:00
KA101 5485b75e2f Move the "good" appearance mutations to the "good" column 2013-05-17 23:54:25 -05:00
Kevin Granade 55e1197800 Move fitted clothing generation to item spawn method so dropped items don't become fitted. 2013-05-17 23:37:19 -05:00
Kevin Granade 3cb3dce7f2 Extract common code from the two spawn item methods. 2013-05-17 23:36:20 -05:00
Ethan "Soron" Kaminski 294c04cc1e Actually use the iterator variable in a for loop 2013-05-18 13:40:42 +12:00
Ethan "Soron" Kaminski 9bbefa16e8 Allow tracking of consumed items 2013-05-18 13:39:41 +12:00
Ethan "Soron" Kaminski b66fd49c8e Add a debug message if no components are available 2013-05-18 13:05:48 +12:00
Ethan "Soron" Kaminski 424bcf0b5d Re-indent game::consume_items 2013-05-18 13:04:16 +12:00
alex-gh 78d87c8e4c Make sewing use rags/leather. 2013-05-18 02:00:11 +02:00
alex-gh 11f18517f4 Check if we have enough rags/leather before sewing. 2013-05-18 01:44:39 +02:00
Kevin Granade 7eff9b9fe1 Merge remote-tracking branch 'dda/pr/1051' into dda-master 2013-05-17 18:16:59 -05:00
Kevin Granade fec629aa4f Merge remote-tracking branch 'dda/pr/1021' into dda-master 2013-05-17 18:15:17 -05:00
Ethan "Soron" Kaminski 66e8cdf26b Merge PR #929 - air conditioning 2013-05-18 10:58:49 +12:00
fnord 015a8b5284 initilization fix, redux 2013-05-17 17:27:14 -05:00
fnord 6ad3169434 Merge remote branch 'origin/master' into air_conditioning 2013-05-17 11:33:35 -05:00
maseck 0379189c17 Fixed errors in original commit 2013-05-17 11:06:56 -04:00
origamiwolf ac4c785fb8 Added chitin as a material 2013-05-17 21:26:39 +08:00
origamiwolf e08ceb81db Rewrite armour damage code 2013-05-17 21:13:23 +08:00
origamiwolf 4495a9369f Rewrite armor damage absorption code 2013-05-17 20:38:43 +08:00
Ethan "Soron" Kaminski 11fac6058d Fix welder charges, allow code to force-mark tools as available 2013-05-17 23:16:22 +12:00
alex-gh 098887a329 Moved bone broth to the food crafting category. 2013-05-17 13:13:15 +02:00
Ethan "Soron" Kaminski f394fa7b92 Make bone broth made of flesh, normalize toolset charges 2013-05-17 22:28:08 +12:00
Ethan "Soron" Kaminski 0da409648c Merge PR #1049 - add bone broth 2013-05-17 18:41:07 +12:00
Ethan "Soron" Kaminski 9108c53e5d Merge PR #1044 - advanced inventory changes 2013-05-17 18:23:55 +12:00
Ethan "Soron" Kaminski 22c3301c5b Make hoses usable (as a tool) to siphon gas 2013-05-17 16:06:25 +12:00
Ethan "Soron" Kaminski e22b6f6e81 Make siphoning take the same time as refueling 2013-05-17 15:29:39 +12:00
Ethan "Soron" Kaminski 2ab5e43c29 Siphoning is possible on any tile of the vehicle now 2013-05-17 15:26:58 +12:00
Ethan "Soron" Kaminski 40318b986d Add missing return statement to catacurse's getch() 2013-05-17 14:43:01 +12:00
maseck a8051ba330 Create arrays for n/e/s/w_fac and t_north/east/south/west 2013-05-16 22:26:13 -04:00
alex-gh d4bbbf352b Buffed bone broth to make up for a long cooking time 2013-05-17 03:06:35 +02:00
alex-gh 95b0f791c2 Added bone broth. 2013-05-17 03:05:12 +02:00
Ethan "Soron" Kaminski 6f1ddd2126 Make newwin in catacurse correctly handle 0 for ncols/nlines 2013-05-17 13:04:41 +12:00
Kevin Granade 03153ebfc5 Merge pull request #1046 from ethankaminski/bolt-category
Moved bolts to ammo category, like arrows
2013-05-16 17:36:58 -07:00
Kevin Granade 2e475fa83d Merge bugfixes du jour. 2013-05-16 19:19:25 -05:00
Kevin Granade b0345c2f7b Update unit test to use overmapbuffer. 2013-05-16 19:13:43 -05:00
Kevin Granade 9f94ff602b Exit early from map::field_at() if trhere are no fields in the current submap. 2013-05-16 19:13:09 -05:00
Kevin Granade ec1f8c0656 Further cleanup of update_scent, and handle barrier scent attenuation properly. 2013-05-16 19:12:31 -05:00
alex-gh 8f9f2b81fa random_good_bionic() should no longer return faulty bionics. 2013-05-17 01:28:41 +02:00
Kevin Granade 2e40eeaf57 Move STARTING_MINUTES to mongroupdef.cpp since it's the only place it's used now. 2013-05-16 17:52:11 -05:00
Kevin Granade 195d8caba5 Don't add in the starting time offset to the initial weather change calculation, it's alreadt in OPT_INITIAL_TIME. 2013-05-16 17:51:36 -05:00
Ethan "Soron" Kaminski f0eb67f2df Moved bolts to ammo category, like arrows 2013-05-17 10:41:22 +12:00
fnord aec010d4aa Unclobber cleanup 2013-05-16 10:35:30 -05:00
fnord 61d7722d58 advanced_inv: refactor. Struct contains all window pane specific variables,
eliminating code duplication in anticipation of further functionality.
Space now exits. 'i' selects inventory. Scrolling past end of page
advances to next page.
2013-05-16 10:26:44 -05:00
origamiwolf 5510fdda83 Alter glowstick behaviour to match reality 2013-05-16 21:30:32 +08:00
Ethan "Soron" Kaminski c2d5d6b845 Prevent unloading of M72 LAW and NX-17 Charge Rifle 2013-05-16 20:57:43 +12:00
Ethan "Soron" Kaminski 688263a4b2 Merge PR #1033 - item tags as sets 2013-05-16 18:20:56 +12:00
Ethan "Soron" Kaminski b505b82a6c Merge pull request #1035 from kevingranade/pad-oper
Add padding argument to coding style specification.
2013-05-15 22:58:48 -07:00
Kevin Granade ed4ca9497d Unrolled and refactored update_scent() to accelerate waiting, reading, etc. 2013-05-16 00:44:28 -05:00
Kevin Granade b04f51abe3 Merge todays bugfixes. 2013-05-15 21:09:59 -05:00
Kevin Granade 41950db139 Merge remote-tracking branch 'dda/pr/1023' into dda-master 2013-05-15 21:06:08 -05:00
Kevin Granade ac3bebf8bc Add padding argument to coding style specification. 2013-05-15 21:04:45 -05:00
Kevin Granade a9e0ee9515 Style cleanup. 2013-05-15 20:58:17 -05:00
Kevin Granade 1bfb4bec63 Merge remote-tracking branch 'dda/pr/986' into dda-master 2013-05-15 20:44:17 -05:00
Kevin Granade d62c714434 Merge remote-tracking branch 'dda/pr/1020' into dda-master 2013-05-15 20:17:49 -05:00
Kevin Granade 1d84ccf2b5 Clean up obsolete item flag enum and tag->enum mapping. 2013-05-15 20:08:04 -05:00
Kevin Granade 9a79713510 Convert item::item_flags to item::item_tags.
Also changing from a bit array to a set of strings.
Applying the same change to item::mode.
2013-05-15 20:08:03 -05:00
Kevin Granade 5f87fcd549 Move some library includes to the end of the list where they belong. 2013-05-15 20:08:03 -05:00
Kevin Granade 98779857d6 Remove obsolete item construction macros. 2013-05-15 20:08:03 -05:00
Kevin Granade e7fb33496e Remove unused flag parameter from item template constructors. 2013-05-15 20:08:03 -05:00
Kevin Granade 1bc4f249de Remove overloaded use of item::mode in preperation for turning it into a string field. 2013-05-15 20:08:03 -05:00
Kevin Granade d6b05e978e Add a catajson method to extract a list of strings as a set for use as tags. 2013-05-15 20:08:03 -05:00
Ethan "Soron" Kaminski 76bbf9779d Merge pull request #1026 from Voker57/fixes
Added missing break to season length option
2013-05-15 16:25:22 -07:00
Fergus Dall aaff40057e Make android give a power source even for passive bionics
Fixes #1027
2013-05-16 08:51:48 +09:30
Ethan "Soron" Kaminski 6dae388bcf Make signs in negative torso smart, like the rest 2013-05-16 11:21:07 +12:00
Voker57 32e2942650 Added missing break to season length option 2013-05-15 18:12:22 +04:00
fnord fd9975c5ff Debug spew removed. Oops 2013-05-15 06:34:50 -05:00
fnord db5c679e8d Dropping stuff into a vehicle container will add charges instead of adding
a new item, if applicable.
2013-05-15 04:24:17 -05:00
Ethan "Soron" Kaminski a6d32cde1a Add fuel siphoning to the game.
You can now siphon fuel from the vehicle examination screen. Requires a hose.

Eventually I'd like to add a Mechanics recipe to make an alternate siphon item out of pipe or something, because hoses are really too rare to be the sole item for something as important as fuel siphoning.
2013-05-15 19:23:20 +12:00
Ethan "Soron" Kaminski f34568ee60 Add a message when nearby corpses rez 2013-05-15 17:52:29 +12:00
Ethan "Soron" Kaminski bbbe83ffdc Fix zombie revival timing - no longer tuned for testing
Whoops, left the code in a testing state when I committed at some point.
2013-05-15 15:36:21 +12:00
Ethan "Soron" Kaminski 01f5296a1d Save state of zombie death drops 2013-05-15 15:30:52 +12:00
Ethan "Soron" Kaminski 3fbca61610 Fix some revification bugs 2013-05-15 15:28:35 +12:00
Ethan "Soron" Kaminski 3367e0cf13 Zombies rise from the dead after a certain amount of time 2013-05-15 14:06:24 +12:00
Ethan "Soron" Kaminski 98220d9e36 Extract corpse-revival code to a method of game 2013-05-15 13:02:59 +12:00
Kevin Granade 2d8967f603 Take starting time option into account when setting initial weather timeout. 2013-05-14 19:42:42 -05:00
Ethan "Soron" Kaminski cbfe708f36 Merge PR #1018 - vehicle collisions less crazy 2013-05-15 12:18:36 +12:00
Kevin Granade 2be2924e05 Merge remote-tracking branch 'dda/pr/1015' into dda-master 2013-05-14 19:10:19 -05:00
Kevin Granade ea7211ab97 Don't allow driverless vehicles to recover from skids. 2013-05-14 18:55:24 -05:00
Kevin Granade 8047cbf4ff Make skidding cause uncontrollable turning rather than uncontrollable impossible vector changes. 2013-05-14 18:55:23 -05:00
Ethan "Soron" Kaminski b7d0bae27e Use correct spelling of "acceptable" in JSON 2013-05-15 11:12:50 +12:00
Ethan "Soron" Kaminski ad1920876c Merge PR #1009 - ammo to JSON 2013-05-15 11:10:13 +12:00
Ethan "Soron" Kaminski 46bcc0845a Merge PR #1011 - purifier fix 2013-05-15 10:42:46 +12:00
Ethan "Soron" Kaminski 95f3b83ff3 Add missing semicolon after catacurse.h function declaration 2013-05-15 10:41:13 +12:00
Ethan "Soron" Kaminski 4ca94f6bb1 Merge PR #985 - more curses functions in catacurse 2013-05-15 10:34:39 +12:00
Ethan "Soron" Kaminski 1941b4de71 Update the Windows titlebar to say 0.5 2013-05-15 10:30:54 +12:00
Ethan "Soron" Kaminski 5edcfdcd26 Change some more odd double vs. int stuff 2013-05-15 10:22:58 +12:00
Ethan "Soron" Kaminski 397b231583 Fix floating-point math to actually use floating point numbers 2013-05-15 10:13:54 +12:00
alexanderkunz dcf02f0d67 Updated VERSION to 0.5
...because the old version number was the first thing I was worrying about when i compiled it.
2013-05-14 16:20:16 +02:00
Herbert Jones e066f83cda Added license. 2013-05-14 09:13:47 -05:00
fnord 6402bcf27b Purifiers will no longer remove starting traits such as 'android',
'skilled liar' or 'nearsighted'
2013-05-14 09:09:44 -05:00
TheDarklingWolf 80ece8d258 Added overmap stuff to visual studio project file. 2013-05-14 11:20:48 +01:00
TheDarklingWolf 03a6364d9b Added overmap buffer stuff to .cbp 2013-05-14 11:18:45 +01:00
Kyratzes Talvadore be6647066c Merge pull request #1000 from ethankaminski/welding-fix
Stop the player from being able to install vehicle parts sans welder
2013-05-14 03:05:24 -07:00
Fergus Dall a720914bb5 Move all gun mods into json raws 2013-05-14 17:41:32 +09:30
Ethan "Soron" Kaminski 4a6764af79 Merge PR #1001 - resizable bionics window 2013-05-14 15:03:48 +12:00
Ethan "Soron" Kaminski 1662931a47 Merge PR #1002 - Windows compilation fix 2013-05-14 15:02:51 +12:00
Ethan "Soron" Kaminski 7b21957354 Merge PR #920 - easier cross-compilation 2013-05-14 15:02:30 +12:00
Ben Fox-Moore e93219ff14 Fix compilation on windows 2013-05-14 03:50:55 +01:00
Ethan "Soron" Kaminski ea1d558122 Check one more time that the player has tools, before they install items 2013-05-14 14:02:38 +12:00
Ethan "Soron" Kaminski f625fe9122 Merge PR #984 - overmap caching 2013-05-14 13:01:05 +12:00
Ethan "Soron" Kaminski 823feaf118 Add a "highlights" section to the 0.5 changelog 2013-05-14 12:54:36 +12:00
Ethan "Soron" Kaminski 04099f616a Update changelog with the rest of the 0.5 changes 2013-05-14 12:38:02 +12:00
Kevin Granade 45366ee295 Bugfixes of the Day. 2013-05-13 18:51:24 -05:00
Kevin Granade 2cea5dddbf Add a clear method to overmapbuffer and call it when resetting the world. 2013-05-13 18:42:00 -05:00
Ethan "Soron" Kaminski 06a6c3edda Fix artifact armor (fix incorrect superclass constructor call) 2013-05-14 09:39:20 +12:00
Ethan "Soron" Kaminski 361dd56d86 Fix unloading a weapon from the inventory screen, skip some deletion/creation 2013-05-14 09:14:01 +12:00
Ben Fox-Moore 65add6f7e0 Full height bionics window 2013-05-13 21:03:55 +01:00
OzoneH3 f8e8578d6f List Item tweaks.
Redraw terrain after closing +/- priority popup.
Display Reset text when filter is applyd.
Allow resetting priority with empty text.
2013-05-13 21:14:48 +02:00
OzoneH3 23adb8980e Merge branch 'master' of https://github.com/TheDarklingWolf/Cataclysm-DDA 2013-05-13 20:41:52 +02:00
Ethan "Soron" Kaminski 4628c57a0e Correct vehicle part removal message to not say "install" 2013-05-13 21:44:03 +12:00
fnord e36d22b247 Advanced inventory's weight and volume columns will now display full
stack values. Oops. Small UI comprovements in addition to this:
* The 'same square!' popup can be ignored as it will pass the next
 keypress (except q and esc) and disappear.
* '0' for weight or volume will appear dimmed.
* current/max number of items displayed at top right
* current inventory total displayed above 'weight vol' header.
* [stack amount] moved to it's own column as it's easier to read.
2013-05-13 03:54:49 -05:00
Kevin Granade e6ecd0f808 Integrate overmapbuffer as the cache of overmaps. 2013-05-12 20:49:45 -05:00
Kevin Granade 9bbac19deb Add overmapbuffer class for caching overmaps. 2013-05-12 20:49:16 -05:00
Ben Fox-Moore 70ef2c462d Fix incorrect mvwgetch prototype 2013-05-13 00:12:30 +01:00
Ben Fox-Moore 68952a196e Add wgetch and mvwgetch functions 2013-05-12 23:48:20 +01:00
Ethan "Soron" Kaminski 08b2937f6d Fix phase for gasoline and non-clean water 2013-05-13 10:35:12 +12:00
Ethan "Soron" Kaminski bd488e0d43 Make item_factory consistently use lowercase for phases 2013-05-13 10:34:33 +12:00
Kevin Granade ac6097c90e Merge remote-tracking branch 'dda/pr/975' into dda-master 2013-05-12 16:46:12 -05:00
Kevin Granade 3f8c412ed5 Only apply daylight on square where player is standing to avoid flooding the lightmap when in less than total sunlight. 2013-05-12 16:42:28 -05:00
Kevin Granade 2668d71da3 Remove unnecessary comments, and reduce unimpaired_range() to the standard max range. 2013-05-12 14:30:04 -05:00
Kevin Granade cd027374a8 Merge remote-tracking branch 'dda/pr/921' into dda-master 2013-05-12 14:27:06 -05:00
fnord 4851b6b46e Crackers don't matter 2013-05-12 14:16:24 -05:00
Kevin Granade 4274b47aaf Merge remote-tracking branch 'dda/pr/975' into dda-master 2013-05-12 14:04:25 -05:00
Kevin Granade fbdc5d645c Merge remote-tracking branch 'dda/pr/968' into dda-master 2013-05-12 14:00:32 -05:00
fnord 5e344b212a Merge origin/master, remove headlight power multiplier 2013-05-12 13:53:55 -05:00
Kevin Granade a75932c41f Merge remote-tracking branch 'dda/pr/964' into dda-master
Conflicts:
	item_factory.cpp
2013-05-12 13:47:48 -05:00
acidia 7bb642a151 Polished Artifacts in Modernist Apartment 2013-05-12 14:46:36 -04:00
acidia ec3e7159ba Deleted the stairs for the Modern Apartment Tower
Easy to throw back in once we have vertical z-levels
2013-05-12 13:39:30 -05:00
Kevin Granade 1bbb0450e9 Merge bugfixes. 2013-05-12 13:38:30 -05:00
acidia 87dc9c95bc Added Modern Apartment Tower Spawning 2013-05-12 13:36:52 -05:00
acidia bf6de1f221 Adding Modernist Apartment Tower 2013-05-12 13:33:49 -05:00
Kyratzes Talvadore 2dda9136b1 Merge pull request #966 from kevingranade/fix-comestables
Fix use -> use_action typo in comestable definitions.
2013-05-12 10:43:01 -07:00
acidia 68440d6b9b Added alcohol spawn for Apartments 2013-05-12 12:16:54 -05:00
Kyratzes Talvadore 143b697272 Merge pull request #974 from kevingranade/spiked-plate
Add steel plate and spikes as alternates to the spiked plate recipe.
2013-05-12 09:42:41 -07:00
acidia 3af4f50a0b Added Conservative Apartments (2x2) 2013-05-12 12:35:20 -04:00
acidia c8278a4a01 Added Conservative Apartments (2x2)
Conservative as in the exterior is geometrical as opposed to the more modernist (on its way)
2013-05-12 12:32:26 -04:00
origamiwolf 0ca7b343d7 Hulks get only rags and pants 2013-05-13 00:24:27 +08:00
TheDarklingWolf 3f928311a3 Merge branch 'pr/962' 2013-05-12 17:22:42 +01:00
Kevin Granade 0c6d4d0df6 Add steel plate and spikes as alternates to the spiked plate recipe. 2013-05-12 11:12:14 -05:00
Fergus Dall efd7a7a1d1 Make constructions consume components properly
Fixes #967
2013-05-12 18:49:52 +09:30
indigochill c533b3e5e3 Vehicle damage from falling rubble will no longer be truncated. 2013-05-12 05:13:25 -04:00
indigochill 3ef72e3278 Game message will now alert a player when they are hit by a cavein. 2013-05-12 05:12:06 -04:00
origamiwolf efc0cc8e76 Rearranged zombie item drops to account for generated clothing 2013-05-12 16:45:13 +08:00
origamiwolf c16218cd12 Expanded spawn items function and intial test of zombie clothing drops 2013-05-12 16:10:32 +08:00
Kevin Granade db7d4073f7 Fix use -> use_action typo in comestable definitions. 2013-05-12 01:13:55 -05:00
Kevin Granade c380b77f64 Add strength requirement for new terrain pieces. 2013-05-12 01:11:17 -05:00
Kevin Granade 1b3d547a1f Add an exercise machine terrain piece. 2013-05-12 01:11:17 -05:00
Kevin Granade ba78704a74 Merge remote-tracking branch 'dda/pr/951' into fixup 2013-05-12 01:10:47 -05:00
Fergus Dall 215ee8a0a9 Move books into json raws 2013-05-12 15:09:11 +09:30
Fergus Dall 84a87fe6ad Let books be added to json raws 2013-05-12 15:03:26 +09:30
GlyphGryph d4e9057939 Merge pull request #963 from fergus-dall/armor-json
Move all armor defintions into json raws
2013-05-11 22:07:21 -07:00
Fergus Dall 0e1660efce Make it_armor.power_armor default to false 2013-05-12 14:11:06 +09:30
Fergus Dall 50977e8062 Move all armor defintions into json raws 2013-05-12 14:03:55 +09:30
Fergus Dall 0cedbf6955 Let armor be specified in json raws 2013-05-12 14:02:24 +09:30
Kevin Granade 03d7f7385d The great item migration continues. 2013-05-11 23:27:43 -05:00
Kevin Granade 1923bd5137 Merge some bugfixes. 2013-05-11 23:23:46 -05:00
Kevin Granade 653900fd85 Clean up some warnings. 2013-05-11 23:21:18 -05:00
Kevin Granade 439279c069 Prevent vehicles from spawning on top of other vehicles or in walls or other structures. 2013-05-11 22:52:59 -05:00
Kevin Granade ca0a7a614f Align spawned vehicle hulks with roads. 2013-05-11 22:51:15 -05:00
Kevin Granade 8dd5e8df67 Add default arguments to add_vehicle(). 2013-05-11 22:50:22 -05:00
Fergus Dall 434c9057a4 Move all comestables into json raws 2013-05-12 12:39:04 +09:30
acidia 850b41c92c Added Monster Spawns for Hotel 2013-05-11 22:32:05 -04:00
Fergus Dall 239740ad6a Fixed another warning 2013-05-12 11:22:35 +09:30
Fergus Dall 65d19be1be Prevent extras from spawning on bridges.
Closes #557.
2013-05-12 11:15:43 +09:30
Kevin Granade 7c92f74668 Merge remote-tracking branch 'dda/pr/938' into dda-master 2013-05-11 20:09:41 -05:00
Kevin Granade ae4a3c3118 Merge key interrupt for long-term activity. 2013-05-11 20:03:48 -05:00
Fergus Dall d102b0d6e2 Moved id and name to the start of item definitons. 2013-05-12 10:28:40 +09:30
Kevin Granade 767475355e Merge a batch of bugfixes. 2013-05-11 18:57:02 -05:00
Kevin Granade ed83664888 Cleanup style in the dodge system rewrite. 2013-05-11 18:40:41 -05:00
Kevin Granade dbbc4fe323 Ad a design doc with simple rationale for dodge system. 2013-05-11 16:46:31 -05:00
jason.gilbert@nbed.nb.ca 2054755efa Lowered homeostasis adjustement while hot 2013-05-11 18:24:36 -03:00
jason.gilbert@nbed.nb.ca 44d3adbc92 Tweaked pain due to heat 2013-05-11 18:23:21 -03:00
fnord 7ecfbef8ce Sanity check when selecting h2h 2013-05-11 16:03:58 -05:00
GlyphGryph 72e2ccb419 Merge pull request #948 from fergus-dall/warning-fix
Fixed two warnings
2013-05-11 12:53:18 -07:00
GlyphGryph 314c05c059 Merge pull request #928 from fergus-dall/ammo-json
Adds ammo handling to item factorys, and moves ammo definitions to JSON raws
2013-05-11 12:51:30 -07:00
fnord 86d7cabfc2 Keyconfig will now handle spaces, tabs, and the default keymap.txt (which differs in format from a saved keymap.txt, go figure) 2013-05-11 14:16:23 -05:00
i2amroy f28e427a04 Update changelog.txt 2013-05-11 12:19:48 -06:00
Christian Buskirk 95937d27b6 Added Comments
Also fixed 1 backwards greater then.
2013-05-11 11:12:19 -07:00
Xantrim 8b67bd05b9 Looks like water from funnels should have a 1 in 10 chance of being poisoned.
The original code always returned 0.
2013-05-11 19:07:35 +02:00
acidia 1e78e6f302 Finally touches to add interior locked doors 2013-05-11 11:45:41 -05:00
acidia b6a1dadafc Updated to treat interior locked doors like other doors... 2013-05-11 11:42:46 -05:00
acidia 0a313cf103 Adding interior locked doors... 2013-05-11 12:40:17 -04:00
acidia a0200f5922 Adding interior locked doors... 2013-05-11 11:38:21 -05:00
acidia 78d067e51b Hotel room doors updated to the new interior locked 2013-05-11 11:36:05 -05:00
acidia 95207ca2cb Adding Washer and Dryer 2013-05-11 11:57:46 -04:00
acidia 56efd2853c Added Hotel Spawning 2013-05-11 10:53:36 -05:00
acidia ef4766f1f1 Adding Hotel Basemement Links 2013-05-11 10:48:03 -05:00
acidia 97b4043be2 Added Hotel Tower Floor 1 and Basement
The is is first draft without zombies and locked doors...
2013-05-11 10:44:25 -05:00
fnord 94345a60e5 Hitting '.' (pause) while reading will prompt to stop reading or
continue. One can also pull up help, player info, and the message log,
however the character will not be reading in the background as this happens.
'.' should also offer to abort building, longterm crafting, and wait.
2013-05-11 10:39:09 -05:00
OzoneH3 318f7771b8 Fixed construction menu lettering. 2013-05-11 17:08:10 +02:00
OzoneH3 b8094625c8 Signed the License signoff. 2013-05-11 16:49:47 +02:00
OzoneH3 fb80910a1b Fixed broken overmap Note blinking. 2013-05-11 16:47:43 +02:00
acidia fe2af5a9e9 Fix bug where choosing not to hack would cause the terminal to glitch 2013-05-11 10:12:03 -04:00
fnord 84244301c0 game::load_keyboard_settings correctly handles it whn space and tab are bound. 2013-05-11 08:33:49 -05:00
Fergus Dall ee2578039c Change bullet explosions to use ammo_type instead of recasting every step.
This seems to fix a crash that happens when the explosions destroy a wall that
collapses onto the tile containing the exploding bullets. See #679
2013-05-11 21:56:04 +09:30
Alexander Voikov 7ede782371 fix parentheses in game::explosion 2013-05-11 17:28:10 +06:00
Alexander Voikov 6adb425ab4 simplify and fix map::has_adjacent_furniture 2013-05-11 17:27:08 +06:00
Fergus Dall 076fe953a8 Fixed two warnings 2013-05-11 18:58:32 +09:30
OzoneH3 78ae253b7e Merge branch 'master' of https://github.com/TheDarklingWolf/Cataclysm-DDA 2013-05-11 10:04:49 +02:00
Fergus Dall 6284c7f310 Finish adding everything using the MELEE macro to json raws 2013-05-11 15:00:38 +09:30
Fergus Dall 8cac4f05c2 Move a bunch of melee items to raws 2013-05-11 14:49:17 +09:30
Kevin Granade e5a6fa0f5f Remove debug message. 2013-05-10 23:28:44 -05:00
Fergus Dall 7c4db80ac4 Set phase for gasoline to liquid.
Requires pull request #939 or #941 to function.
2013-05-11 13:30:22 +09:30
GlyphGryph 7ac4ae9bfa Added comestible handling, and water as the default testing item. 2013-05-10 23:44:07 -04:00
Ethan "Soron" Kaminski d35a2ebb8d Merge PR #923 - misc indentation/style cleanup 2013-05-11 14:27:54 +12:00
Kevin Granade bf8c56c511 Merge remote-tracking branch 'dda/pr/936' into dda-master 2013-05-10 21:06:06 -05:00
fnord 7b3f6542e7 Initialize cache vars in class 2013-05-10 21:04:56 -05:00
Kevin Granade 269b04cb1f Merge remote-tracking branch 'dda/pr/937' into dda-master 2013-05-10 20:54:55 -05:00
Kevin Granade 1a10ceaa25 Merge remote-tracking branch 'dda/pr/917' into dda-master 2013-05-10 20:32:37 -05:00
acidia c14902154c Added Sealing Command for HWS/SRCF 2013-05-10 20:21:51 -05:00
acidia 0f06505787 HWS command to seal Sarcophagus and the last of the e-mails Grackle helped with. 2013-05-10 21:16:10 -04:00
acidia 37d8d33244 Finishing HWS/SRCF Computer Work 2013-05-10 20:12:49 -05:00
Fergus Dall f7e9e9b41b Move point selection for footsteps from add_footstep to draw_footsteps 2013-05-11 10:19:45 +09:30
Fergus Dall 36c0eb27e0 Store the source of footsteps and don't display them if the source is visible. 2013-05-11 10:07:19 +09:30
Kevin Granade ee54b68f33 Initialize variables and check whether pointer is valid before dereferencing. 2013-05-10 19:26:56 -05:00
Kevin Granade 8f11e360a9 Merge remote-tracking branch 'dda/pr/856' into dda-master 2013-05-10 19:00:53 -05:00
Fergus Dall 55d84400b9 Fix up item descriptions 2013-05-11 09:27:40 +09:30
Ethan "Soron" Kaminski 16702223b4 Merge PR #925 - catacurse tweaks, remove redundant redraws
Conflicts:
	crafting.cpp
2013-05-11 11:53:49 +12:00
Kevin Granade 218a8e9807 Merge branch 'dda-master' into style-cleanup 2013-05-10 18:38:36 -05:00
Ethan "Soron" Kaminski 3474800769 Fix some missing flags from tools in JSON 2013-05-11 11:36:14 +12:00
Kevin Granade ccf0dbb5fd More style cleanup. 2013-05-10 18:35:33 -05:00
Kevin Granade 556d60b4d2 Merge remote-tracking branch 'dda/pr/931' into dda-master 2013-05-10 18:28:06 -05:00
Kevin Granade 3dccc08411 Add a comment indicating range of values returned from fine_detail_vision_mod(). 2013-05-10 18:10:38 -05:00
Kevin Granade aac52183f5 Merge remote-tracking branch 'dda/pr/927' into dda-master
Conflicts:
	data/changelog.txt
2013-05-10 18:08:16 -05:00
Kevin Granade af048b1bbc Merge remote-tracking branch 'dda/pr/914' into dda-master
Conflicts:
	itypedef.cpp
2013-05-10 17:54:34 -05:00
Fergus Dall 1ae24a17ff Move visibility check for footsteps from add_footsteps into draw_footsteps.
May fix #438, #439 and #930
2013-05-11 01:37:07 +09:30
fnord ec96820550 Temperature: Bio climate mod will only modify comfort levels if active.
Traditional air conditioning will modify comfort levels in addition
to bio climate mod. This wraps the has_bionic("bio_climate") check in
a new player::in_climate_control(game g*) function, which will return
positive on has_active_bionic("bio_climate"). If not, it will perform
additional checks that are cached every 20-60 turns to save cpu and
simulate temperature acclimation.
Currently, it will check to see if the player is inside a vehicle
with no open doors, and a working engine with fuel (total_power(true)).
Later a requirement for an Air Conditioning vehicle item can be added,
as well as building checks if / when building power is added.
2013-05-10 07:44:00 -05:00
Fergus Dall 892fe144ca Added lazycat's suggestions 2013-05-10 21:41:02 +09:30
Fergus Dall 6cc77411e4 Fix types and ammo_types 2013-05-10 19:30:10 +09:30
Fergus Dall 0b87149c28 Move gasoline to json raws 2013-05-10 18:56:06 +09:30
Fergus Dall c732772315 Moved ammo defs to json raws 2013-05-10 18:38:12 +09:30
Fergus Dall 779184be8f Let ammo be specified in the JSON raws 2013-05-10 17:11:25 +09:30
Ethan "Soron" Kaminski 34bf1926d9 Update changelog for glass bottle tweak 2013-05-10 19:25:05 +12:00
Ethan "Soron" Kaminski d39962b38b Merge PR #859 - crafting window resizing 2013-05-10 19:17:06 +12:00
fnord 214b3ef0b7 +{} 2013-05-10 02:12:57 -05:00
fnord a850c62f91 Merge remote branch 'origin/master' into crafting_ui_tweaks 2013-05-10 02:10:02 -05:00
fnord 988ed77f5c Canteen straps are a lie =[ 2013-05-10 02:08:18 -05:00
fnord 56127dd975 Merge remote branch 'origin/master' into nerf_glass-boost_canteens 2013-05-10 02:05:38 -05:00
i2amroy e92496ff5a Update changelog.txt 2013-05-10 00:39:46 -06:00
Christian Buskirk 97278bac0b Experience gain buff
Some more playtesting shows that leveling up in the dodge skill is still
rather difficult. This generally buffs experience gain, the end result
should be slightly faster growth then the old code.
2013-05-09 22:48:50 -07:00
Ethan "Soron" Kaminski b73395132f Merge PR #922 - fix recipes with shared tool/component lists 2013-05-10 17:29:07 +12:00
Christian Buskirk 9d78235b17 Implemented fine detail modifier 2013-05-09 22:20:20 -07:00
Fergus Dall ac7ad13d59 Check update for validity in DrawWindow 2013-05-10 12:54:21 +09:30
Fergus Dall 360a3279a1 Attempt at fixing flickering on windows 2013-05-10 12:26:45 +09:30
Christian Buskirk 79c53e5a95 Allman style for sewing function 2013-05-09 19:23:02 -07:00
Shoes01 bb1872ac1a Disease.cpp fixes 2013-05-09 18:51:42 -07:00
Kevin Granade 5167440503 Misc indention/style cleanup. 2013-05-09 20:43:51 -05:00
Kevin Granade d55064493c MErge tire changing code. 2013-05-09 20:20:48 -05:00
Kevin Granade 03ff172e16 Merge indoor pool fix. 2013-05-09 20:03:23 -05:00
Ben Fox-Moore 16bf49adde Check crafting_inv for items, handle tools with charges
Previously was only searching playing inventory, which wouldn't include
any items found around the player.
2013-05-10 02:01:17 +01:00
Ben Fox-Moore c8e359644c Rename color field to available.
Force colors to be calculated for all components.
Added the same checking to tools.
When consuming components/tools, only pick from those that are available.
2013-05-10 01:07:09 +01:00
Kevin Granade 7566c8bd50 Merge remote-tracking branch 'dda/pr/904' into dda-master 2013-05-09 17:58:06 -05:00
Ben Fox-Moore b030902cd8 Add field to component in recipe to indicate availability in inventory
can_make uses it to make sure there are enough of each component to be
used as both tool and component if needed.

Default for the field is -1, which indicates
the component is not present in the inventory. 1 indicates it is and
there are enough to be used as both tool and component if need. Setting
to 0 indicates there are not.

If the recipe can still be crafted with alternative components, they
are colored green as the additional information isn't needed.
2013-05-09 23:49:03 +01:00
fnord 19292eda23 Give headlights MORE POWER as they are absolutely pitiful and useless. Temporary fix; headlights are still incredibly fugly, due to how apply_light_arc is hard coded to use a 90 degree beam and constrained in a square region. 2013-05-09 17:37:34 -05:00
fnord 833dc0f746 Allow light sources to be visible more than 12 squares away, due to unimpaired_range default of 12 in c1188bf. Changed to SEEX * MAPSIZE which is the limitation of lightmaps cache. Note that this exposes bugs that were hidden in the dark; walls (among other things) appear to have a light value of 2, targeting is still constrained to night time visibility (#251), and headlight beams are short and positively fugly. 2013-05-09 17:32:33 -05:00
indigochill 042e838ceb Commented out some debugmsgs for better playability 2013-05-09 19:38:28 +00:00
indigochill 0f7e91ea4b Vehicles now take damage from caveins. Also fixed a segfault if no NPCs were spawned. 2013-05-09 19:34:19 +00:00
Xantrim 8ab097029d Added a new variable TARGETSYSTEM, which is set to WINDOWS or LINUX according to
the desired system.

Calling make without parameters automatically sets the target to Linux.

Added a section for global settings for Windows and Linux.
Linux only needs -ncurses.
Windows needs additional stuff.

Relaxed the cross-compile target. The cross-compiler prefix now only needs to
contain mingw32, as there are many different versions out there.
2013-05-09 18:49:38 +02:00
Xantrim 8d321fac3e Restored ncurses compatibility. 2013-05-09 18:10:40 +02:00
Xantrim a68f1c9019 Fix for issue #912 - missing catacurse functions
- Adds mvgetch, combination of move + getch
- Adds getnstr.
  Reads a given maximum number of characters into a string.
  Can either show or hide the input.
  Only supports basic editing (backspace).
- Slightly modified wish.cpp to accommodate for the modified echo functionality
  and to limit the maximum of given items at a time to 9999.
2013-05-09 16:57:49 +02:00
fnord 6d0840b2e0 Show guages for all installed fuel tanks in vehicle dialog. Only overlay fuel tanks used for propulsion in status bar. 2013-05-09 08:40:57 -05:00
fnord c16266e59d Remove unused slen variable used in removed keyword coloration kludge 2013-05-09 06:30:26 -05:00
fnord 3d16bb6bb9 Fix desc: hydralic => hydraulic 2013-05-09 06:04:30 -05:00
fnord d49b4f1677 Allow player to change tires with a wrench and a jack (requires 0 mechanical skill but does not skill up). Add "jack" item to mi_hardware and mi_mechanics spawnlists. 2013-05-09 05:51:35 -05:00
saTo 19ad248bd8 Merge branch 'master' of https://github.com/TheDarklingWolf/Cataclysm-DDA 2013-05-09 12:45:46 +02:00
Ethan "Soron" Kaminski ee92ac51fe Merge PR #915 - fix elevator sight bug 2013-05-09 20:42:45 +12:00
Fergus Dall 66005e3056 Give elevator tiles the transparent flag
Closes #865
2013-05-09 18:00:48 +09:30
Fergus Dall 514f277a16 Add indoors terain type "pool water" for mansion pools
Closes #868
2013-05-09 17:33:04 +09:30
Fergus Dall 8e2096e93a Prevent butering corpses while driving. Fixes #685 2013-05-09 17:00:46 +09:30
Ethan "Soron" Kaminski b6ce97120f Update changelog 2013-05-09 18:20:15 +12:00
Ethan "Soron" Kaminski fcb0a4daa9 Move tools to JSON. 146 of them. 2013-05-09 18:19:41 +12:00
Ethan "Soron" Kaminski 85adbf7fe2 Add some missing iuse functions to the item factory 2013-05-09 18:19:24 +12:00
Ethan "Soron" Kaminski 09d37a86a0 Merge PR #906 - tools from JSON 2013-05-09 17:02:21 +12:00
Ethan "Soron" Kaminski fcaa32ec5c Merge PR #907 - chargen skill screen crash fix 2013-05-09 17:01:01 +12:00
Ethan "Soron" Kaminski d8ded8228e Update changelog. IMO, this is fully up-to-date. 2013-05-09 16:53:49 +12:00
Kevin Granade 569cf05f50 Attempt at fixing skill picker in character creation screen. 2013-05-08 23:42:34 -05:00
GlyphGryph 1c183d9406 Added handling of tools to item factory, and switched over lighter. 2013-05-08 23:55:29 -04:00
Ethan "Soron" Kaminski 6c9f84b42c Update changelog, to 02b4c0f 2013-05-09 15:03:14 +12:00
Kevin Granade 0dcb206f78 Removing null skill and player status screen hack that compensated for it. 2013-05-08 21:56:56 -05:00
Kevin Granade 71d60cb2d1 Merge remote-tracking branch 'dda/pr/899' into dda-master 2013-05-08 21:43:44 -05:00
Kevin Granade 22dd9dfc5e Merge pit and spiked pit interaction funtions. 2013-05-08 20:59:44 -05:00
Kevin Granade f05d81673d Merge remote-tracking branch 'dda/pr/896' into dda-master 2013-05-08 20:32:01 -05:00
Ethan "Soron" Kaminski bb93200423 Add a comment about the absurd length of map::draw_map 2013-05-09 13:05:15 +12:00
Ethan "Soron" Kaminski 2f13f6636c Another batch of un-shadowing variables 2013-05-09 13:05:14 +12:00
Ethan "Soron" Kaminski 333ee08d62 Merge PR #895 - roads don't overwrite buildings as much
Conflicts:
	data/changelog.txt
2013-05-09 12:41:22 +12:00
Ethan "Soron" Kaminski d70e73cd2f Merge PR #889 - spawn ratios 2013-05-09 11:48:39 +12:00
Ethan "Soron" Kaminski 1b691b1279 Merge PR #900 - improved wish menu 2013-05-09 11:43:28 +12:00
Ben Fox-Moore d67d368a25 Cursor visible during input (search and count) 2013-05-09 00:42:23 +01:00
Ben Fox-Moore cdd37aef00 Improve Debug Wish menu
Separate header window to allow for longer info message
Esc to stop search
List refresh on backspace
Give one of item if conversion from string to int fails
2013-05-09 00:11:13 +01:00
Ethan "Soron" Kaminski fd5623160a Merge PR #898 - in-game computer updates 2013-05-09 11:04:36 +12:00
Fergus Dall 75d63194e1 Fix exponential growth of artifacts.gsav 2013-05-09 08:18:30 +09:30
Ben Fox-Moore 382f3c351e Allow wishing for more than one of an item at a time 2013-05-08 22:38:05 +01:00
github@grigro.de 4c9137a6ba Fixing things so code compiles on MS Visual Studio 2010, which showed an interesting error.
- Use of references in variadic functions:
  This can lead to errors in different compilers, as it violates the ISO C++ standard. For an explanation, see this links:
  http://www.open-std.org/jtc1/sc22/wg21/docs/papers/1995/N0695.pdf
  The only function I found violating this was the setvector set of functions. I changed the reference type to a pointer type and all calls to it.
- Fixed some iterations of the form
   for( iter *it = bla.begin()++; ... )
  This increments the iterator returned by begin() AFTER assigning it. So the increment does nothing and even leads to an compiler error in MSVC++.
  As far as I can tell, the only affected parts iterate over all the skills, and should not skip the first. If this is wrong, this needs to be fixed as in
   for( iter *it = bla.begin() + 1; ... )
2013-05-08 22:01:38 +02:00
acidia 1ea167a34d Fixed HWS e-mail typos 2013-05-08 14:51:24 -05:00
acidia 2a440181f4 Fixed HWS e-mail names 2013-05-08 15:49:04 -04:00
acidia 6ea9bd624e Fixing a typo I made in COMPACT_RESEARCH 2013-05-08 15:42:51 -04:00
acidia 1a0a051ccb Dropped security for individual e-mails, too much hassel. 2013-05-08 15:27:44 -04:00
acidia db1f3e7707 HWS 2nd computer activated 2013-05-08 15:21:59 -04:00
acidia 0a50ad2ecc E-mails for HWS 2013-05-08 15:18:42 -04:00
acidia 53ee7d5878 HWS e-mails part II
These were too long to add initially so I held off till I had a bit better handle of computer.ccp
2013-05-08 15:17:35 -04:00
acidia 1f8acf900e Cleaning Up Computer Messages
Computer interface is more fluid and will redirect you to a clean menu rather than having remnants of the last action.
2013-05-08 12:47:48 -05:00
acidia 20765e1ea8 Add query_any
This speeds up reading computer text significantly
2013-05-08 12:28:56 -05:00
origamiwolf 25c5c88a74 Similar change for spiked pits 2013-05-08 23:51:42 +08:00
origamiwolf 6c0f80736c rewrote pit iexamine to allow for planks on map tile to be used 2013-05-08 23:35:19 +08:00
acidia 9b1f9d2c98 Metion of building additions and support for 2x2 and 3x3 fixed buildings... 2013-05-08 10:27:57 -05:00
acidia fde5614ffd Simple building check that prevents roads from going through buildings... 2013-05-08 10:23:09 -05:00
Fergus Dall f3cfa189c1 Update changelog 2013-05-08 22:53:33 +09:30
Fergus Dall a9b8a4badf Fix tabbed indentation 2013-05-08 22:48:54 +09:30
Fergus Dall 0af738b937 Fix typo in comments 2013-05-08 22:45:30 +09:30
Fergus Dall 60bd4c8918 Make loading artifact armors work
Closes #860
2013-05-08 22:42:06 +09:30
Fergus Dall 8fd5532e95 Make loading tool artifacts work 2013-05-08 22:06:35 +09:30
Fergus Dall 1272ea7b65 Remove old artifact loading code 2013-05-08 21:42:44 +09:30
Fergus Dall 8e4580057c Changed artifact saving to use json, to allow easy storage of the arbitrary
strings that can appear in names/descriptions.

Closes #357
2013-05-08 21:34:24 +09:30
Ethan "Soron" Kaminski 8fa100a309 Fix another batch of shadowed variables 2013-05-08 18:51:28 +12:00
Kevin Granade 2290edd3fb MErge in some hats. 2013-05-07 21:48:27 -05:00
Kevin Granade 0b4761a9b1 Merge mutation-based temperature effects.
Conflicts:
	data/changelog.txt
2013-05-07 21:29:28 -05:00
Kevin Granade 3eb4c6489a Merge tweak of hunger and fatigue termperature effect.
Conflicts:
	data/changelog.txt
2013-05-07 21:28:22 -05:00
Kevin Granade e3cfb527f2 Merge metabolism boost. 2013-05-07 21:27:17 -05:00
Kevin Granade 98d4976199 Merge batch of bugfixes. 2013-05-07 21:22:46 -05:00
Kevin Granade 99aef279f8 Scale monster spawns based on monster group entry multiplier property. 2013-05-07 20:48:19 -05:00
Kevin Granade 89a34d39fc Extract new multiplier property from monster group entries. 2013-05-07 20:47:32 -05:00
Kevin Granade e783d2528b Add multiplier to moster group entries. 2013-05-07 20:45:48 -05:00
Ben Fox-Moore ca3d4a72fc Remove unused variable warnings 2013-05-08 02:38:51 +01:00
Ben Fox-Moore a6f1260329 New overlap::is_road_or_highway function to reduce duplicate code
Used in omspec_place::by_highway and overmap::place_special
2013-05-08 02:37:15 +01:00
notquitethere fe5c14ab59 Update mapitemsdef.cpp -- Added hats
Added the pickelhaube and the beret to the relevant spawn lists (to mi_pawn and mi_mil_armor).
2013-05-08 03:36:59 +02:00
Ben Fox-Moore 92f9e3c53c Lone gas stations can now rotate 2013-05-08 02:34:22 +01:00
notquitethere 5b6b519092 Updated itypedef.cpp -- added hats
Added the beret and the pickelhaube. One is for military and fashion spawns, the other for the pawnshop (and maybe one day museums?).
2013-05-08 03:29:57 +02:00
Shoes01 530b0c8e81 Update changelog 2013-05-07 18:17:13 -07:00
Shoes01 746c5be69b Updated update_bodytemp() opening comment to reflect recent changes 2013-05-07 18:15:56 -07:00
Shoes01 290c1de6dc Tweaked hunger and fatigue's contribution to body temperature 2013-05-07 18:09:24 -07:00
Shoes01 6fbc2ee982 Update changelog 2013-05-07 18:03:43 -07:00
Shoes01 73e06f8507 Changed cold/hot to chilly/warm to better reflect effects on player 2013-05-07 18:03:12 -07:00
Shoes01 bbcc613b69 Player generates more heat while awake 2013-05-07 18:00:16 -07:00
Shoes01 f7fd14d17c Missing ;s 2013-05-07 17:55:09 -07:00
Shoes01 d97da371c3 Updated changelog (somewhat vaguely for fun) 2013-05-07 17:48:56 -07:00
Shoes01 a675fde2e4 Added body temperature effects for disintergration and radioactive mutations 2013-05-07 17:46:26 -07:00
Shoes01 8938e47b2e Removed bodytemp calculation skip over mutated bodyparts 2013-05-07 17:43:50 -07:00
indigochill 6b7f836085 Implemented more elaborate rubble damage and effects. Also, penalties for movement over rubble fields. 2013-05-07 23:45:51 +00:00
indigochill 63923cd643 Merging changes from the main cavein branch 2013-05-07 22:27:06 +00:00
indigochill 95e1afae3e Implemented more robust vehicle rubble protection for (N)PCs 2013-05-07 18:39:26 +00:00
indigochill 47fd6137d1 Now only vehicle roofs will protect vehicle-bound (N)PCs. 2013-05-07 17:49:34 +00:00
indigochill 82360b296e Adding floor rubble-spawning changes to wall rubble-spawning 2013-05-07 17:18:49 +00:00
indigochill 581bb99133 Fixing logic error in rubble spawning bias 2013-05-07 17:15:15 +00:00
indigochill 62b311f2bc Biasing rubble spawning away from the most dense piles 2013-05-07 17:11:52 +00:00
indigochill 581a1a0bbc Fixing minor debugmsg typo 2013-05-07 16:19:12 +00:00
origamiwolf 684b607479 Changed failed crafting check 2013-05-07 21:02:34 +08:00
indigochill 957439e63c Being in a vehicle will make a PC/NPC impervious to being hit by rubble 2013-05-07 11:16:45 +00:00
Christian Buskirk 7e3ed4a61f Finalized version
New curves! % Data may be found at http://pastebin.com/qLhRyjGF.
2013-05-06 23:37:41 -07:00
Kevin Granade fbfb9bac2e Add abandoned storefront and furniture store. Contributed by Animouse. 2013-05-06 21:25:21 -05:00
Ben Fox-Moore 3d6332465b Move Furniture required strength is now in ter_t
Provide a more appropriate error message if you're not strong enough
2013-05-07 02:49:15 +01:00
Kevin Granade aab1e7509e Merge remote-tracking branch 'dda/pr/877' into dda-master 2013-05-06 20:26:09 -05:00
Kevin Granade 51048fdbad Merge separating out contribution and regular readme content. 2013-05-06 20:23:42 -05:00
Ben Fox-Moore a4172fa0f7 Clarified that issues on Github are preferred to emails 2013-05-07 01:27:48 +01:00
Kevin Granade e6f71af174 Merge today's batch of bugfixes. 2013-05-06 18:56:58 -05:00
Ben Fox-Moore b1f7d161bf Advanced inventory doesn't reveal sealed container contents 2013-05-07 00:33:07 +01:00
Kevin Granade 1985b18dfa Merge branch 'master' of github.com:TheDarklingWolf/Cataclysm-DDA into dda-master 2013-05-06 18:17:17 -05:00
indigochill 992d1daf25 Implemented NPC damage/effect for cave-ins 2013-05-06 21:23:34 +00:00
indigochill f407045a4a Implemented more advanced PC damage/effects for cave-ins 2013-05-06 21:09:35 +00:00
fnord 167ef3387e Glass water bottles: volume 2=>3 to match storage volume, weight +1
(glass is heavy). Canteens: volume 6 => 4. -2 volume is a virtual
 unit to account for ease of handling; 3 500ml water bottles (6 vol)
 are more of a pain to handle and probably occupy more dead space
 packed together, to say nothing about a canteen's strap etc etc.
2013-05-06 13:33:54 -05:00
origamiwolf e357c21509 Remove uncommented code line 2013-05-06 23:11:26 +08:00
origamiwolf 7a1b31dd30 Unloading bugfix 2013-05-06 23:02:43 +08:00
origamiwolf 2ae15f12ab Sewing kits don't use up a charge if unable to sew in low light 2013-05-06 21:54:43 +08:00
Ben Fox-Moore 2257549e91 Update CONTRIBUTING.md link to full path 2013-05-06 13:48:42 +01:00
indigochill 547457ab42 Merge pull request #1 from indigochill/rubblemovement
Merged
2013-05-06 04:11:42 -07:00
indigochill e0430d4244 Fixed scope of NPC implementation of DI_BOULDERING disease 2013-05-06 10:55:31 +00:00
indigochill 20eb69d706 Fixed DI_BOULDERING duration for NPCs 2013-05-06 10:51:44 +00:00
indigochill 4fd57be302 NPCs can now be affected by the DI_BOULDERING disease 2013-05-06 10:30:05 +00:00
indigochill 84a306b08b Fixed an embarrassing logic erro 2013-05-06 10:28:25 +00:00
indigochill b68579b4e2 Implementation of ME_BOULDERING effect 2013-05-06 10:02:09 +00:00
indigochill 69b3e9b77d Monsters who are not flying or aquatic will get the ME_BOULDERING effect when moving through a rubble field 2013-05-06 10:01:32 +00:00
indigochill 1e9709f22b Created monster bouldering effect to apply effect when moving over rubble field 2013-05-06 09:59:58 +00:00
Ethan "Soron" Kaminski 71310f885a Merge pull request #871 from atomicdryad/gun-range2_son_of_gun-range
re-push ddb088c and a14eb58 (gun-range), which author clobbered in 4e8f6b3 (add missing prices)
2013-05-06 02:08:36 -07:00
Ethan "Soron" Kaminski b62c726070 Coilguns have 3x range as well as 3x damage
If we're making coilguns require battery charges, we should really have them buffed compared to nailguns. A range buff seemed appropriate, and 3x the nailgun's range matches up nicely with the existing damage buff.
2013-05-06 03:57:56 -05:00
Ethan "Soron" Kaminski ae5b0e746a Make arrow/bolt range mainly determined by the weapon, not the ammo 2013-05-06 03:57:50 -05:00
fnord ce233072df pickup: Prevent pgup/pgdn item selection. multidrop: restore (number)+(letter) partial drop functionality 2013-05-06 02:04:43 -05:00
fnord b943c93b3c crafting ui: Fixed erronious commit: lines now display properly and 'e' works 2013-05-06 02:03:23 -05:00
fnord 0a88f66a58 Merge branch 'master' into crafting_ui_tweaks 2013-05-06 02:03:10 -05:00
Ethan "Soron" Kaminski 1e9411426a Remove some variable shadowing (in files touched by another cleanup branch) 2013-05-06 15:31:50 +12:00
Ethan "Soron" Kaminski 3ca3b484f7 Un-shadow a member of picojson 2013-05-06 14:17:29 +12:00
Ethan "Soron" Kaminski ebda7d3a4f Remove shadowed variables from headers 2013-05-06 14:06:13 +12:00
Kevin Granade e223e362b0 Merge pull request #866 from ethankaminski/partial-stacks-fix
Fix silly variable-shadowing error in remove_partial_stack
2013-05-05 19:04:34 -07:00
Kevin Granade b15b5b1002 Merge remote-tracking branch 'dda/pr/866' into dda-master 2013-05-05 20:30:38 -05:00
Kevin Granade f1d601a2c4 Merge remote-tracking branch 'dda/pr/864' into dda-master
Conflicts:
	omdata.h
2013-05-05 18:55:16 -05:00
indigochill d207182c04 Now only the highest-density rubble fields block sight 2013-05-05 23:37:05 +00:00
Ethan "Soron" Kaminski a8bbc27b0a Fix silly variable-shadowing error in remove_partial_stack
Closes #790, obsoletes #840.

Now how do we turn on the relevant GCC error so that we don't get this sort of thing again?
2013-05-06 11:12:46 +12:00
GlyphGryph a0f67902ae Merge pull request #862 from ethankaminski/scissors
Factor out common clothing-cutting logic
2013-05-05 15:57:55 -07:00
Ethan "Soron" Kaminski 8bfd9cd380 Fix silly lack of indentation 2013-05-06 10:55:16 +12:00
Kevin Granade 874364596f Merge remote-tracking branch 'dda/pr/846' into dda-master 2013-05-05 17:52:11 -05:00
Ethan "Soron" Kaminski 61d99558bc Merge PR #807 - crashes less likely to screw terminal cursor 2013-05-06 10:46:59 +12:00
Ethan "Soron" Kaminski d52e9b2cd6 Add missing leading period to .45 caliber retool's name 2013-05-06 10:20:49 +12:00
Ethan "Soron" Kaminski 700a92ac6a Merge PR #858 - ability to define gunmods in JSON 2013-05-06 10:14:45 +12:00
acidia 919596eacb Added OMS_FLAG_3X3_FIXED
I was playing with pretty rotational matrix when I got fed up and just wrote it out.  Isn't pretty but it works perfectly so far.  The 'if (special.ter == ot_school_2)' adds the road tile in front of the school parking lot that is offset from the entrance.
2013-05-05 17:10:17 -05:00
GlyphGryph 986f780fd7 Removed duplicate '45 caliber retool' in itypedefs. 2013-05-05 18:06:48 -04:00
acidia 031afc690b Added School Spawn Group 2013-05-05 17:06:19 -05:00
acidia a0c6c152a3 Added School Spawn Group 2013-05-05 17:05:06 -05:00
acidia 466fb00531 Added Regional School Spawning
Feel free the change the style/color of the tiles...
2013-05-05 17:03:57 -05:00
acidia 9f0d0a212f Added Regional School (3x3)
First go around with 3x3 fixed structures...
2013-05-05 16:59:27 -05:00
acidia fe173195b2 Stopped Zombies from Spawing in Walls
There can be zombies stuck in the elevator but that is more of a "feature" rather than a bug.
2013-05-05 16:45:01 -05:00
indigochill f1235a08b6 Implemented bouldering disease 2013-05-05 21:10:55 +00:00
indigochill a937f01a41 Created 'DI_BOULDERING' disease to handle the player moving over rubble 2013-05-05 21:10:21 +00:00
indigochill b8b4dd0fab Replaced movecost solution with a disease-based solution. 2013-05-05 21:09:37 +00:00
indigochill 8bd11deb24 Removing field movecost addition to terrain movecost. It wasn't a workable solution. 2013-05-05 21:08:07 +00:00
indigochill c3a29e9dcd Removing field movecost. It wasn't a workable solution. 2013-05-05 21:07:14 +00:00
Ethan "Soron" Kaminski ba34bbb8f2 May as well comment what the new variables are for 2013-05-06 08:59:08 +12:00
GlyphGryph d1f36ccfcc Merge pull request #852 from atomicdryad/pickup_win_uifixes
Pickup: Dynamic height up to status line. Document ','.
2013-05-05 13:42:31 -07:00
Ben Fox-Moore 11b042bac1 Add Code Style info 2013-05-05 21:31:41 +01:00
Ben Fox-Moore 02c8b31912 Fix syntax error 2013-05-05 21:22:11 +01:00
Ben Fox-Moore 9373b9c163 Add link to CONTRIBUTING.md 2013-05-05 21:20:12 +01:00
Ben Fox-Moore 2e297ec7f0 Fix syntax error in README.md 2013-05-05 21:12:07 +01:00
Ben Fox-Moore 3a22667aa6 Updated README.md with extra content from the original README 2013-05-05 21:08:35 +01:00
Ben Fox-Moore b347bb83bf Remove unneeded information about the game from CONTRIBUTING.md 2013-05-05 20:13:53 +01:00
Ben Fox-Moore f356ada0fd Renamed README.md to CONTRIBUTING.md as it's more accurate 2013-05-05 20:04:00 +01:00
indigochill 6c0568916b Fixed field_movecost switch/case 2013-05-05 18:36:40 +00:00
Kevin Granade d1913896c0 Merge remote-tracking branch 'dda/pr/839' into dda-master 2013-05-05 13:24:02 -05:00
Kevin Granade e17ab1b08e Misc bugfixes. 2013-05-05 13:10:07 -05:00
Kevin Granade ed5a88f6da Merge remote-tracking branch 'dda/pr/837' into dda-master 2013-05-05 12:56:17 -05:00
jason.gilbert@nbed.nb.ca 1af5328537 Allman style'd player::update_bodytemp() 2013-05-05 14:38:09 -03:00
jason.gilbert@nbed.nb.ca 6fe3e4e565 Allman styling 200/450 lines of player::suffer 2013-05-05 14:33:16 -03:00
Kevin Granade a28898441b Merge pull request #857 from atomicdryad/makefile_drama_oh_my
'version.h: version' => 'version.cpp: version'
2013-05-05 10:26:47 -07:00
indigochill 4e685ba359 The implementation of map::field_movecost 2013-05-05 17:25:49 +00:00
indigochill ea42509125 Implemented field movecost adding to terrain movecost 2013-05-05 17:24:09 +00:00
indigochill a994d7f1a2 Only the densest rubble fields block vision. 2013-05-05 17:23:06 +00:00
indigochill 9eee37c023 Added map::field_movecost to allow fields to affect the movecost of a tile 2013-05-05 17:21:58 +00:00
fnord d02feb1d5d Allow crafting window to make full use of screen height, 'e' will also describe item as per convention 2013-05-05 12:21:22 -05:00
indigochill 48d77b97bb New rubble fields will no longer overwrite old ones. 2013-05-05 16:44:38 +00:00
fnord c3cc3609f4 '-f' added to 'rm version.h'. Fixes make clean error. 2013-05-05 11:18:49 -05:00
GlyphGryph 9046960f2a Added ability to handle gunmods to the item factory. 2013-05-05 12:17:44 -04:00
fnord 3da9282266 'version.h: version' from 697d818 does nothing, and makes version.h
a makefile item (it is not meant to be). Build failure, if 'version'
is not listed in 'all:'
'version.cpp: version' makes the 'version' function a prerequisite
for obj/version.o, which is all that's needed.
2013-05-05 10:48:34 -05:00
acidia 4a0c8f41a7 Adding Zombies to Office Tower 2013-05-05 10:21:57 -05:00
indigochill 50321598e7 Fixed bug with applying rubble field_effect. Rubble will also no longer spawn on terrain flagged with 'noitem'. 2013-05-05 15:19:19 +00:00
indigochill 2be4117401 Merge branch 'master' of https://github.com/TheDarklingWolf/Cataclysm-DDA into cavein 2013-05-05 14:39:40 +00:00
indigochill 333554ac55 Removed DI_CRUSHED disease implementation for now since it was being difficult. Replaced it with a simpler implementation. Made monster damage application more robust, including handling monster death if applicable. NPCs now take damage if caught in a cave-in. Vehicles do not. 2013-05-05 14:38:45 +00:00
indigochill c75167f56b Added 'DI_CRUSHED' disease to apply player effect for cave-ins. Currently not active. See map::field_effect. 2013-05-05 14:35:41 +00:00
GlyphGryph 1a6addb6ba Merge pull request #842 from ethankaminski/catajson-itemfactory
Item factory uses catajson, has better error messages
2013-05-05 07:02:02 -07:00
fnord e0c5e4b51e exit vehicle menus via 'q' as well as escape 2013-05-05 08:29:11 -05:00
fnord 9363f651a3 Pickup: Dynamic height up to status line. Document ','. 2013-05-05 08:27:15 -05:00
Fergus Dall 9e3d36d779 Fixed warning in game::advanced_inv() 2013-05-05 22:42:41 +09:30
indigochill 4ff76d150c Added field_effect to roof cave-ins 2013-05-05 12:50:16 +00:00
indigochill 448a359bdc Added map::field_effect() as a means of applying effects to things directly via fields 2013-05-05 12:47:46 +00:00
indigochill cf6d9a3e29 Added 'Crushed' disease to handle effect of cave-ins on player 2013-05-05 12:42:45 +00:00
Ethan "Soron" Kaminski 0f50711b03 Combine common cotton/leather handling in iuse::scissors 2013-05-05 20:24:02 +12:00
Ethan "Soron" Kaminski d14bfa655c Combine relevant portions of iuse::knife and iuse::scissors 2013-05-05 20:05:49 +12:00
acidia 9cbbfe2ee0 Added Office Tower Floor 1 and Basement (2x2) 2013-05-05 01:09:27 -05:00
acidia c74d6d7a86 Connecting Basement for Office Tower 2013-05-05 01:05:50 -05:00
acidia 20f1ab1ef6 Added Office Tower Floor 1 and Basement (2x2)
Floor 2 is pending Z-level code...
2013-05-05 00:59:07 -05:00
Ethan "Soron" Kaminski 814408e639 Rename "damage" item field to "bashing" (more accurate) 2013-05-05 17:33:57 +12:00
Kevin Granade 066521bb54 Don't hide your light under a bushel, allow lights in piles of items to glow. 2013-05-04 23:45:57 -05:00
Kevin Granade ff22e6a50f Push adjacent overmap variables up into overmap::draw_overmap() instead overmap::draw() and only reload when necessary. 2013-05-04 22:25:30 -05:00
Ethan "Soron" Kaminski bed07b632b Actually remove commented-out methods 2013-05-05 15:12:40 +12:00
Ethan "Soron" Kaminski 409d9f8e61 Fix the rest of the item JSON warnings 2013-05-05 15:07:10 +12:00
Ethan "Soron" Kaminski 760a8c6a08 Stop loading instruments.json - missing fields caused debug spam 2013-05-05 14:57:33 +12:00
Ethan "Soron" Kaminski 4e8f6b33e7 Add missing prices to most items, fix missing spaces in descriptions 2013-05-05 14:56:04 +12:00
Ethan "Soron" Kaminski 812ac5864f Use catajson for item template loading, better debug messages 2013-05-05 14:42:44 +12:00
Ben Fox-Moore 73bad6e342 Added notification for freenode channel 2013-05-05 02:36:28 +01:00
origamiwolf d961f1d35d Indent fix 2013-05-05 09:32:41 +08:00
origamiwolf d13cc7bbe5 Added crossbow trap chance based on monster size 2013-05-05 09:31:49 +08:00
Ben Fox-Moore cff00d318d Enabled IRC notifications 2013-05-05 02:17:42 +01:00
Ben Fox-Moore 4e76914767 Initial .travis.yml to enable Travis Continuous Integration 2013-05-05 02:17:42 +01:00
indigochill 4fccb12826 Merge branch 'master' of https://github.com/TheDarklingWolf/Cataclysm-DDA into cavein 2013-05-05 01:02:58 +00:00
origamiwolf 14be4a7acc Changed logic for walking onto sharp terrain, tiny animals no longer affected by sharp or rough terrain 2013-05-05 09:01:19 +08:00
indigochill e37bcefcbd Rubble field will be generated in the vicinity of a cavein 2013-05-05 00:48:01 +00:00
indigochill 7937bbac72 Added the 'fd_rubble' field 2013-05-05 00:22:36 +00:00
Ethan "Soron" Kaminski 5ab6ee2058 Merge PE #834 - contrib docs in readme 2013-05-05 11:09:48 +12:00
Kevin Granade ef64daaab3 Merge remote-tracking branch 'dda/pr/823' into dda-master 2013-05-04 18:05:14 -05:00
jason.gilbert@nbed.nb.ca 5ccc0d8080 Added some missing ()s and {}s 2013-05-04 19:40:13 -03:00
Shoes01 5a176c84d0 Cleaning up body temp code still 2013-05-04 19:30:04 -03:00
Shoes01 b65b9d5b94 Cleaning : made a grammar issue more compact 2013-05-04 19:30:04 -03:00
Shoes01 937a5ca44c More minor tinkering in bodytemp code 2013-05-04 19:30:03 -03:00
Shoes01 a91a0b0dbb Tidy up body temp code
Conflicts:

	player.cpp
2013-05-04 19:29:56 -03:00
GlyphGryph e9159d3c02 Merge pull request #810 from kevingranade/is-indoor-removal
Is indoor removal
2013-05-04 15:14:44 -07:00
GlyphGryph 01e3b5e063 Merge pull request #817 from kevingranade/clairvoyance-debug
Clairvoyance debug
2013-05-04 14:42:14 -07:00
Kevin Granade 34c3f2d9fc Merge window-related bugfixes. 2013-05-04 16:08:38 -05:00
Kevin Granade c6b8b4202b Merge remote-tracking branch 'dda/pr/818' into dda-master
Conflicts:
	inventory_ui.cpp
2013-05-04 16:00:21 -05:00
Kevin Granade f5f40ec2e6 Merge many small bugfixes. 2013-05-04 15:37:26 -05:00
fnord 163e92c1d8 season length 0 is bad 2013-05-04 15:01:30 -05:00
Kevin Granade ffa28ea872 Change able_inside() to use a custom heuristic for determining inside-ness to disallow furniture construction adjacent to floor tiles. 2013-05-04 14:55:30 -05:00
GlyphGryph b02deeb45a Merge pull request #835 from Catacstone/no_point_depatching
Disallow leather patch duplication by cutting
2013-05-04 11:34:59 -07:00
GlyphGryph c50bc06c9c Merge pull request #828 from fergus-dall/make-fix
Fix problems intoduced in cc31d07
2013-05-04 11:23:21 -07:00
origamiwolf 8def207ddf tiny animals don't trigger landmines 2013-05-05 01:17:02 +08:00
origamiwolf 27dbfbefee indent fix 2013-05-05 01:13:23 +08:00
origamiwolf 33b3540a1e stop animals suiciding on certain terrain, fields and traps 2013-05-05 01:11:17 +08:00
indigochill cc361d8f19 Survival kit floors are now 'indoors' to provide protection from rain. 2013-05-04 16:59:44 +00:00
Livingstone ed9826f145 Disallow leather patch duplication by cutting 2013-05-04 19:53:24 +03:00
origamiwolf de6fd3480e Expanded monmove can_move_to function to take into account various game conditions 2013-05-05 00:20:34 +08:00
Ben Fox-Moore aee74ccdc5 Added Advanced Techniques section 2013-05-04 16:29:30 +01:00
origamiwolf db4e8eeb2c Leaping monsters can no longer teleport through windows 2013-05-04 23:23:25 +08:00
origamiwolf 23515bb121 Delete world option bugfix 2013-05-04 22:46:10 +08:00
origamiwolf ebf8fb0177 Laser beams pass through, but do not destroy, glass 2013-05-04 21:45:33 +08:00
origamiwolf 5a1c0aafb2 Flamethrower fixes 2013-05-04 21:21:21 +08:00
Fergus Dall fdb67b69f9 Delete version.h on make clean 2013-05-04 22:47:33 +09:30
Fergus Dall 1018865602 Revert "Fix some more makefile stuff"
This reverts commit cc31d07b98.
2013-05-04 22:46:06 +09:30
Ben Fox-Moore 339a4b96a6 Added --ff-only to 'git pull upstream master'.
Ensures that no commits have been made directly to master.
2013-05-04 12:29:18 +01:00
origamiwolf cc2573e81d Shots no longer pass through reinforced glass 2013-05-04 19:00:19 +08:00
Dirkkun b445f2b026 House Items Distribution
Moved a few items around.  Added a few items that should be available.
2013-05-04 06:23:00 -04:00
fnord e98c1891b6 Merge remote branch 'origin/master' into various_ui_fixes 2013-05-04 04:34:51 -05:00
Ben Fox-Moore ca2add2332 Updated README.md with instructions for compiling and guidelines 2013-05-04 10:29:26 +01:00
fnord b17969c596 Advanced inventory: move to/from vehicle storage 2013-05-04 04:27:30 -05:00
origamiwolf bc8c2c052d Removing vehicle headlights yields zero charge flashlight 2013-05-04 17:10:23 +08:00
Ethan "Soron" Kaminski 2b7cb8d713 Merge PR #821 (fix season length default) and #820 (makefile, version.h stuff) 2013-05-04 20:54:36 +12:00
Fergus Dall 06a25a234b Make season length default to 14 days. Closes #671 2013-05-04 18:12:13 +09:30
Fergus Dall cc31d07b98 Fix some more makefile stuff
Remove version.h when doing a make clean
Ensure that version.o is rebuilt every time version.h changes
2013-05-04 17:25:44 +09:30
Kevin Granade 16d5b46565 Merge bugfixes from fergus-dall. 2013-05-04 02:00:12 -05:00
jones f97a7e5185 fix two dialog boxes when using trunks
fix errors in inventory_ui
fix ui oversight when working vehicle parts
2013-05-04 01:36:42 -05:00
Kevin Granade fa29a60fa4 Add debug function to spawn an artifact that gives long range clairvoyance. 2013-05-04 01:31:09 -05:00
Kevin Granade 9a4e6fa235 Add super clairvoyance artifact power for debugging. 2013-05-04 01:28:29 -05:00
Kevin Granade 50f8554968 Move artifact global data to artifact.cpp. 2013-05-04 01:25:06 -05:00
fnord fe67da5df2 stop pgup/pgdn from selecting stuff in multidrop 2013-05-04 00:51:55 -05:00
Fergus Dall 697d818a99 Make version a prerequisite for version.h instead of all.
The way it was could cause version.o to be built before version.h when multithreading was used for make.
2013-05-04 15:05:29 +09:30
Fergus Dall 73b5879c87 Stop mulitdrop from being affected by changes to u.inv.size() 2013-05-04 14:38:55 +09:30
Fergus Dall 8952996c16 Add "The" to the start of monster death messages. Closes #804 2013-05-04 13:43:12 +09:30
Ethan "Soron" Kaminski fd41008a42 Add missing OMS_FLAG_2X2 and OMS_FLAG_2X2_SECOND values 2013-05-04 15:00:29 +12:00
Ethan "Soron" Kaminski 19fd360f4c Merge PR #803 - 2x2 buildings (public works, HWS)
Conflicts:
	computer.cpp
	omdata.h
2013-05-04 14:42:05 +12:00
Kevin Granade eff49db944 Replace calls to is_indoor() with negated call to is_outside() to unify the logic. 2013-05-03 20:53:53 -05:00
Ethan "Soron" Kaminski 8e9d769a7c Merge PR #802 (lab lore), #799 (outdoors desk spawn) 2013-05-04 12:53:12 +12:00
acidia 52d35ecd0a Hazmatbot buffed to deter looting... 2013-05-03 17:08:45 -05:00
acidia 76cb4a1e92 Added four of the Security Reminders from the Hazardous Waste Sarcophagus 2013-05-03 16:34:16 -05:00
acidia 5e770db4b0 Added four of the Security Reminders from the Hazardous Waste Sarcophagus 2013-05-03 16:32:34 -05:00
acidia c155d3e771 Added Hazmatbot... 2013-05-03 16:30:18 -05:00
acidia 39bf2f0b83 Added Hazmatbot for toxic waste areas...
Really just a temporary re-skin of the secubot, feel free to make it a bit more unique.  A few of these act as the guardians of the Hazardous Waste Sarcophagus.
2013-05-03 16:28:33 -05:00
acidia ecfc2b555b Added Hazardous Waste Sarcophagus Spawning...
Trying to keep it fairly rare.  May eventually want to set it to 1 but a max of 2 will at least let most people eventually find one.
2013-05-03 16:23:07 -05:00
acidia 67f9e2f22f Added Hazardous Waste Sarcophagus (2x2)...
Uses the new 2x2 building code.  Only a fraction of the computer stuff is added at the moment, multi-page support is needed for the rest.
2013-05-03 16:18:14 -05:00
acidia 341adbdd86 Update Public Works 2x2 direction code...
This works better for buildings in the city where multiple sides of the building entrance face roads.
2013-05-03 16:09:02 -05:00
fnord 25733bc0d3 Hide cursor after map buffer loads 2013-05-03 15:55:08 -05:00
Soy 6cd2a52306 More spelling and grammar fixes with help from InfernoZeus 2013-05-03 19:25:32 +02:00
Soy dc998944a8 fixed grammar 2013-05-03 18:40:39 +02:00
acidia b19d4e25c5 Construction Worker Locker Items 2013-05-03 09:37:00 -05:00
acidia e67f83d49c Added construction worker locker items entry... 2013-05-03 09:35:28 -05:00
acidia b5658f6820 Added Public Works spawning...
A fairly rare building, currently only 1-3 will spawn in a map but it may make more sense to balance it to 1-2.  It should be a nice surprise to find it.   

I'm not sure why but I can't get it to spawn without the mfb(OMS_FLAG_CLASSIC)... I'm not sure how many people will be offended by this since the FEMA camp also has it.
2013-05-03 09:33:28 -05:00
acidia c864072ad4 Added support for 2x2 buildings...
This must be placed after OMS_FLAG_ROAD, else the building attempts to rotate before a road has been drawn to connect it to a town.  Tile rotation and identification is handled in mapgen.ccp
2013-05-03 09:23:03 -05:00
acidia aa79906bdf Adding Public Works (2x2)
The public works houses town/county utility vehicles and maintenance supplies.
2013-05-03 09:17:06 -05:00
Soy bc5b3e37df Added some lab lore that hints to XE037 mutation, and gives a reason for zombie dogs. (And no zombie Chihuahua dogs). 2013-05-03 16:04:44 +02:00
ErdrickXLII f13def77f1 Fixed desks spawning outside 2013-05-03 04:39:55 -03:00
Ethan "Soron" Kaminski 8835883e7a Merge PR #798 - typo fixes (diseases) 2013-05-03 16:59:24 +12:00
Alpha16 cc9b6fb693 Fixed some typos in disease.cpp 2013-05-02 21:57:25 -06:00
Ethan "Soron" Kaminski 465107b5dd Merge PR #793 - Joint Torsion Ratchet bionic power system 2013-05-03 13:47:14 +12:00
Kevin Granade f60b03008b Merge remote-tracking branch 'dda/pr/797' into dda-master 2013-05-02 20:27:05 -05:00
Kevin Granade dc6d27cd02 Merge remote-tracking branch 'dda/pr/796' into dda-master 2013-05-02 20:27:03 -05:00
Ethan "Soron" Kaminski c07a0a01a3 Merge fix for PR #787 - flyers spawn now 2013-05-03 13:13:55 +12:00
Ethan "Soron" Kaminski e6e1cf1b90 Fix malformed JSON entry. 2013-05-03 13:09:01 +12:00
Ethan "Soron" Kaminski 0cf42d906f Merge PR #787: text snippets! Fliers!
Conflicts:
	CataclysmWin.cbp
	msvc100/Cataclysm.vcxproj
2013-05-03 13:08:34 +12:00
Kevin Granade c2d7c818a8 Add flyer to spawn lists. 2013-05-02 19:56:28 -05:00
Ethan "Soron" Kaminski 112d203638 Tweak the catajson message about parse errors 2013-05-03 12:27:36 +12:00
Kevin Granade ab2192a14a Override description of stationary items with dynamic description. 2013-05-02 19:23:54 -05:00
Kevin Granade 9082f60def Add new stationary itype and a flyer item. 2013-05-02 19:22:55 -05:00
Kevin Granade 45031f1d8f Make item::mode persistent across saves. 2013-05-02 19:21:16 -05:00
Kevin Granade 730f264c1b Add snippets data file and initialize snippets library. 2013-05-02 19:20:34 -05:00
Ethan "Soron" Kaminski a7ca556f3b Warn if catajson encounters a parse error 2013-05-03 12:14:07 +12:00
Ethan "Soron" Kaminski a14eb58308 Coilguns have 3x range as well as 3x damage
If we're making coilguns require battery charges, we should really have them buffed compared to nailguns. A range buff seemed appropriate, and 3x the nailgun's range matches up nicely with the existing damage buff.
2013-05-03 11:59:57 +12:00
Ethan "Soron" Kaminski ddb088c16b Make arrow/bolt range mainly determined by the weapon, not the ammo 2013-05-03 11:59:13 +12:00
Ethan "Soron" Kaminski a6f662f28f Add a range field to gun definitions 2013-05-03 11:49:30 +12:00
Alpha16 4f60654735 Moved functionality from do_turn to plmove
No longer can the pause key exploit the charge mechanic.
2013-05-02 17:48:25 -06:00
Ethan "Soron" Kaminski 1b016fd4db Merge PR #794 - couple typo fixes 2013-05-03 10:41:46 +12:00
Alpha16 095e119ef7 Adjusted torsion ratchet bionic
Now only increments every 60 steps (not pauses, sleeping, etc)
2013-05-02 01:59:25 -06:00
ChAoSDragon b251bd36ce Fixed some typos. 2013-05-01 23:53:41 -07:00
Ethan "Soron" Kaminski 0960eb42c3 Fix a backwards conditional 2013-05-02 18:28:29 +12:00
Ethan "Soron" Kaminski 5d9c28b463 Merge PR #792 - couple bugfixes 2013-05-02 18:23:10 +12:00
Christian Buskirk ba7009bc4b Enemies of human size or larger are less likely to explode. 2013-05-01 23:10:47 -07:00
Christian Buskirk 70d9598045 Clarified the Drunken Master trait description 2013-05-01 22:52:21 -07:00
Ethan "Soron" Kaminski 4843518041 Remove IF_VARSIZE from blankets and sleeping bags 2013-05-02 17:40:49 +12:00
Ethan "Soron" Kaminski fda759909f Fix more missing spaces 2013-05-02 17:39:05 +12:00
Ethan "Soron" Kaminski 50332ba1c5 Actual typo fix. 2013-05-02 17:36:28 +12:00
Ethan "Soron" Kaminski 2289cd3088 Fixing some missing spaces in item descriptions. 2013-05-02 17:35:48 +12:00
Ethan "Soron" Kaminski 0fa61f1998 Merge PR #789 - item techniques handled by item_factory 2013-05-02 17:27:29 +12:00
Christian Buskirk 514e29cb40 Fixed compile error 2013-05-01 22:15:52 -07:00
Ethan "Soron" Kaminski 9c8aae56ba Merge pull request #791 from atomicdryad/dejunkification
Remove junk from map.cpp.
2013-05-01 21:57:16 -07:00
Christian Buskirk e239e301ff Removed the ability to tailor blankets and sleeping bags.
Fixes issue 758.
2013-05-01 21:34:59 -07:00
Kevin Granade 7aa7b944f0 Fix off-by-one range error. 2013-05-01 22:51:35 -05:00
Christian Buskirk 5b62eb9080 Added name to credits and signoff 2013-05-01 20:29:47 -07:00
fnord ce7adeb7ea Remove BOM from map.cpp. 2013-05-01 21:33:16 -05:00
Ethan "Soron" Kaminski 673df9aebd Fix typo that was causing 0 reload times for all guns 2013-05-02 14:29:59 +12:00
Christian Buskirk 51260d5274 Fixed else if. 2013-05-01 18:38:39 -07:00
Kevin Granade 50e03e2fc7 Merge several fixes. 2013-05-01 20:31:35 -05:00
GlyphGryph 8c8fd8c5c2 Added handling of techniques to item_factory, and thus items json. 2013-05-01 21:29:57 -04:00
Kevin Granade c206119e85 Merge remote-tracking branch 'dda/pr/770' into dda-master 2013-05-01 20:23:44 -05:00
Ethan "Soron" Kaminski ec44ca7964 Move slings to JSON
Note: the GUN() macro is still needed for the fusion blaster pseudo-item. Not sure if it's safe to move that to JSON yet or not.
2013-05-02 13:19:07 +12:00
Ethan "Soron" Kaminski ef923b87c9 Merge slings into json-guns
Conflicts:
	itypedef.cpp
2013-05-02 13:05:57 +12:00
Christian Buskirk dd9249485e melee_skill (DEX) should be used for grab chance. 2013-05-01 18:05:25 -07:00
Christian Buskirk 00cc4a2436 This will never trigger. 2013-05-01 17:57:26 -07:00
Kevin Granade 6fec8185d1 Merge remote-tracking branch 'dda/pr/763' into dda-master
Conflicts:
	itypedef.cpp
2013-05-01 19:49:26 -05:00
Christian Buskirk b01b722c33 Added XP gain for dodging special attacks. 2013-05-01 17:27:09 -07:00
Kevin Granade ff1e4d0b66 Add text snippet class for assigning and retrieving variable descriptions. 2013-05-01 19:21:51 -05:00
Kevin Granade 73097eb284 Const qualify djb2_hash parameter. 2013-05-01 19:21:51 -05:00
Ethan "Soron" Kaminski 65ac642977 Merge PR #761 - add slings and slingshots
Conflicts:
	.gitignore
	game.cpp
	mapitemsdef.cpp
2013-05-02 12:11:40 +12:00
Christian Buskirk 87e16a5f2a Fixed if/else's and dodge_roll. 2013-05-01 17:10:54 -07:00
Christian Buskirk 31ccd4144b Made physical specials use melee skill (bite/tentacles) 2013-05-01 16:47:22 -07:00
Christian Buskirk b283e16493 Added dodge xp, removed broken dodge system. 2013-05-01 16:40:39 -07:00
Ethan "Soron" Kaminski 23e6eb34ec Merge PR #760 - make clean-tests target 2013-05-02 11:38:20 +12:00
Ethan "Soron" Kaminski 78b20a7993 Remove MSVC references to texthash 2013-05-02 11:30:44 +12:00
Ethan "Soron" Kaminski 22c60b3789 Give player::try_study_recipe a default return statement 2013-05-02 11:03:10 +12:00
Ethan "Soron" Kaminski 1cf221fd87 Remove unused (and poorly implemented) "text_hash" struct 2013-05-02 10:57:50 +12:00
Christian Buskirk 2f2b5038c1 Added in chance to dodge normal attacks, fixed player dodge rolls 2013-05-01 15:45:23 -07:00
Ethan "Soron" Kaminski 3d5596f74e Merge PR #784 - fix backwards dodge rolls 2013-05-02 10:24:36 +12:00
Ethan "Soron" Kaminski b47377b717 Merge PR #780 - less spam during book study
Conflicts:
	player.cpp
2013-05-02 10:12:12 +12:00
Ethan "Soron" Kaminski 066ca69a7b Merge PR #777 - learning recipes from difficult books 2013-05-02 10:09:57 +12:00
Christian Buskirk ee42111888 Fixed dodge chances to function correctly 2013-05-01 13:35:15 -07:00
Livingstone 8cb7d77514 No more recipes info while studying 2013-05-01 19:13:44 +03:00
uzername 80fa320fd4 Gas stations now spawn near highways, but not on intersections 2013-05-01 18:55:13 +03:00
uzername 5af6393756 Lone gas stations near the highways 2013-05-01 18:15:46 +03:00
origamiwolf bb74ffaff1 Bugfix for learned recipes being retained when creating new character without exiting game. 2013-05-01 22:02:28 +08:00
Skyrunner c7bd14c9fa Fixed issue #744: isle->aisle. 2013-05-01 22:38:56 +09:00
origamiwolf d3647d1713 Allow for lower level recipes to be learned from books whose starting level is higher than player's current level 2013-05-01 21:35:20 +08:00
Kyratzes Talvadore 38f3c52b84 Merge pull request #775 from uzername/master
Can I have a line in SIGNOFF, please?
2013-05-01 04:52:59 -07:00
uzername 466281438c Can I have a line in SIGNOFF? 2013-05-01 14:27:08 +03:00
Ethan "Soron" Kaminski 485fa925e7 Minor bionic typo fix 2013-05-01 22:45:01 +12:00
Ethan "Soron" Kaminski 0538e02dc0 Merge PR #769 - resizable morale panel name column 2013-05-01 22:24:54 +12:00
Ben Fox-Moore ba29e071a7 Name column in morale panel will now automatically grow if needed
Any names that are too long are truncated.
2013-05-01 10:21:35 +01:00
Ben Fox-Moore 6f067f0995 Revert "Change specific book name to generic 'difficult book', should fix display problems with verbosely named books"
This reverts commit 004aa3c9e9.
2013-05-01 10:19:56 +01:00
Christian Buskirk 83e727ccd7 Made light map actually store the natural light values 2013-05-01 01:08:10 -07:00
Ethan "Soron" Kaminski 0ea9f640df Right-align the advanced inventory volume 2013-05-01 19:22:19 +12:00
Ethan "Soron" Kaminski 708ef8e8f5 Merge PR #767 - advanced inventory weight/volume 2013-05-01 19:17:43 +12:00
Ethan "Soron" Kaminski 388e5ff84f Move all gun definitions to JSON
Also added a "range" field to the gun definitions, since I was touching them all anyway. Currently set to 0 for all guns, and unused, but lays the groundwork for making arrow range be mostly determined by the bow rather than the arrow.
2013-05-01 19:08:19 +12:00
Ethan "Soron" Kaminski af824e6bca Merge branch 'master' into json-guns 2013-05-01 19:05:04 +12:00
Ethan "Soron" Kaminski fb30f54798 Merge pull request #764 from GlyphGryph/flags_to_item_factory
Flags to item factory
2013-05-01 00:01:04 -07:00
Ethan "Soron" Kaminski 39b8ff354b Couple more item factory fixes 2013-05-01 18:53:19 +12:00
Ethan "Soron" Kaminski aae82d3866 Move skill initialization to happen inside the game's init method 2013-05-01 18:52:34 +12:00
Ethan "Soron" Kaminski fdccfb42b2 Merge pull request #765 from InfernoZeus/mac-compile-fix
Updated Makefile to set minimum OS X version to 10.6
2013-04-30 23:11:55 -07:00
fnord 01e694efaf advanced inventory: Display weight and volume for held items 2013-05-01 01:11:46 -05:00
Ben Fox-Moore 2e326de350 Updated Makefile to set minimum OS X version to 10.6 2013-05-01 07:04:57 +01:00
Ethan "Soron" Kaminski 09ed66030b Add no-arg it_gun constructor, fix a couple silly compile errors 2013-05-01 18:03:03 +12:00
Ethan "Soron" Kaminski b827f13abc Merge branch 'master' into json-guns 2013-05-01 17:51:17 +12:00
GlyphGryph 21519a4a32 Fixed jsonized items not showing up in wish menu. Not the best fix - better alternatives appreciated. 2013-05-01 00:17:11 -04:00
GlyphGryph e1391ad272 Added handling for item flags when loading from json files. 2013-05-01 00:02:19 -04:00
Ethan "Soron" Kaminski ba11230b5f Let guns be defined from JSON as well 2013-05-01 15:47:55 +12:00
Ethan "Soron" Kaminski 0030442c93 Move most of the generic items to JSON
Only handled things that used the MELEE macro and had no flags.
2013-05-01 14:51:35 +12:00
Ethan "Soron" Kaminski 9e2f41f426 Fix color typo and remove redundant color in item factory 2013-05-01 14:00:46 +12:00
Alpha16 f5367786f5 Adjusted slingshot, added ball bearing ammunition
Sling and Slingshot should be completely cleaned up.
2013-04-30 19:08:40 -06:00
Kevin Granade 2c63b38829 Add make target to cleanup test build artifacts. 2013-04-30 20:05:03 -05:00
Kevin Granade 050e63e12f Merge batch of small changes. 2013-04-30 19:44:56 -05:00
Ethan "Soron" Kaminski c9296205e7 Use the lightmap rather than global light levels for darkness checks 2013-05-01 12:15:32 +12:00
Kevin Granade b1518235b6 Add recipe for creating directional antenna. 2013-04-30 18:45:31 -05:00
Kevin Granade bf9fe279ed Add directional antenna and iuse function. 2013-04-30 18:45:31 -05:00
Ethan "Soron" Kaminski ad021aadb8 Use a logging method that doesn't hang in options initialization 2013-05-01 11:26:39 +12:00
Ethan "Soron" Kaminski b60366c142 Merge PR #756 - move targeting info window 2013-05-01 09:49:44 +12:00
Ethan "Soron" Kaminski 16fba6284c Merge PR #754 - targeting help text 2013-05-01 09:27:22 +12:00
fnord 4a3c4681c1 Targeting window moved to cover messages area, instead of covering
half of messages and status information.
2013-04-30 15:24:00 -05:00
fnord bd20b654eb Make targeting help less bothersome by putting it at the bottom. Move
title to -< border >----
2013-04-30 14:55:26 -05:00
fnord 3b204f6df0 mingw compile fix 2013-04-30 08:07:18 -05:00
Dirkkun 7ce79129bc Windows Animations
2 changes fix to catacurse from lazy cat.
2013-04-30 08:42:15 -04:00
fnord deb8c052bd Autogenerate version number via git describe --tags .., bump version
elsewhere
2013-04-30 05:55:19 -05:00
ethankaminski 141fdc9a80 Add a debugmsg call to the null check in overmap::save 2013-04-30 20:23:18 +12:00
Christian Buskirk c888616d9d Rebalanced gas pump break chances 2013-04-29 23:32:29 -07:00
Christian Buskirk 3c9b8f6bff Fixed hydrogen tank typo 2013-04-29 23:31:17 -07:00
Ben Fox-Moore 4ddf2b0178 Fixed Segmentation Fault when exiting before ever creating a game 2013-04-30 07:25:36 +01:00
ethankaminski 7d80546989 Extract light level checking into a common function 2013-04-30 17:20:33 +12:00
ethankaminski 6874535966 Move the light check for sewing to before the request for an item 2013-04-30 17:15:07 +12:00
ethankaminski 4efe14ebe5 Merge PR #739 - item_factory colors 2013-04-30 15:04:42 +12:00
GlyphGryph 4281e29814 Added all the colors used in the itypedef file to the item_factory. 2013-04-29 23:01:04 -04:00
ethankaminski 5582877ca9 Add version.cpp and version.h to the Codeblocks project file 2013-04-30 14:58:25 +12:00
Quietust b0a164928b Add version.cpp 2013-04-29 21:26:52 -05:00
Alpha16 6494f07212 Removed an unneccesary comment and a leftover ammo type 2013-04-29 19:58:45 -06:00
Kevin Granade e54f3966fc Remove commented out code. 2013-04-29 20:05:29 -05:00
Kevin Granade 279a9bd713 Merge misc bugfix branches. 2013-04-29 19:15:59 -05:00
Alpha16 ffb6cc269b Added sling and slingshot ranged beginner weapons
Atlatl not included. Sling levels up throwing, Slingshot levels archery.
2013-04-29 18:13:25 -06:00
jones 06d9a8ad85 Fix dropping stacks 2013-04-29 18:58:46 -05:00
Kevin Granade 311e9842e7 Merge debug message clarifications and reworded option descriptions.. 2013-04-29 18:58:41 -05:00
Kevin Granade 1cb66c25e6 Merge new health indicator. 2013-04-29 18:39:28 -05:00
Kevin Granade 21b79fbdd8 Initialize player::temp_conv on player creation. 2013-04-29 18:26:33 -05:00
Kevin Granade 09a175935c Fix bracketing that was exiting from equalize_bodytemp() before calculating any temperature changes. 2013-04-29 18:25:54 -05:00
Kevin Granade 057a65f632 Temperature code bugfixes and features. 2013-04-29 18:24:26 -05:00
ErdrickXLII b9fcadf4d9 Fixed negative clothing layers in stat screen. 2013-04-29 20:02:06 -03:00
Ethan "Soron" Kaminski 923eeda247 Merge pull request #731 from kevingranade/radio-tuning
Radio tuning
2013-04-29 15:42:31 -07:00
Kevin Granade 5636362e5f Add tunable radios feature to changelog. 2013-04-29 17:22:06 -05:00
Kevin Granade 9d39ef4428 Refactor radio iuse function to handle tuning radios. 2013-04-29 17:06:09 -05:00
Kevin Granade 58219fd309 Extract radio strength values to some defines. 2013-04-29 17:06:09 -05:00
Kevin Granade 314b70e7c3 Add a frequency property to radio transmitters. 2013-04-29 17:06:09 -05:00
Soy 7e728edf79 Various ugly and pretty mutations now have an effect on npc relations. 2013-04-29 21:45:17 +02:00
Soy f4e2194d8d Merge remote-tracking branch 'upstream/master' 2013-04-29 19:48:24 +02:00
TheDarklingWolf 88b154a6a9 Merge branch 'pr/705' 2013-04-29 18:16:03 +01:00
TheDarklingWolf 43e6f88f15 Fix small typo in light checking for sewing 2013-04-29 18:15:45 +01:00
fnord c6ae17fc13 win32: Define hard coded version instead of including version.h
Temporary workaround.
2013-04-29 11:16:11 -05:00
fnord 70f0d2fda2 don't commit autogenerated version.h 2013-04-29 08:09:33 -05:00
fnord 118dfafb92 Show version and automagically updated git info in main menu 2013-04-29 07:56:47 -05:00
Soy b311d68952 Changed the motd in preparation for the 0.5 release. 2013-04-29 13:28:15 +02:00
Soy 50c6fb24bd * Fixed options text lengths, added defaults
* Added <filename:function> text to a lot of bug text messages.
2013-04-29 12:22:53 +02:00
jason.gilbert@nbed.nb.ca 8fd8e9722d Update changelog 2013-04-29 06:54:13 -03:00
jason.gilbert@nbed.nb.ca fdbbe5e953 Added missing )s 2013-04-29 06:54:13 -03:00
jason.gilbert@nbed.nb.ca d915d69327 Bark mutation lowers blistering from fire 2013-04-29 06:54:12 -03:00
jason.gilbert@nbed.nb.ca 5150be5f3b Being furry adds warmth 2013-04-29 06:54:12 -03:00
jason.gilbert@nbed.nb.ca b8cbc7fdb1 If a body part can't wear clothes due to a mutation, that body part is skipped 2013-04-29 06:54:12 -03:00
jason.gilbert@nbed.nb.ca fefd11d2fc Reduced cold/hot related message spam 2013-04-29 06:54:11 -03:00
jason.gilbert@nbed.nb.ca cc6c7d561a Tweaked sleep code for cold, and added mirror conditions for being too hot 2013-04-29 06:54:11 -03:00
Kevin Granade d6edf8d2ec Merge misc fixes. 2013-04-28 19:17:21 -05:00
Livingstone 64d641f328 Eating skill books on accident makes me SICP 2013-04-29 02:05:20 +03:00
Livingstone 6eb520a095 Clean future weather on cleanup 2013-04-29 01:38:32 +03:00
GlyphGryph 8458ac3496 New health display. 2013-04-28 18:04:26 -04:00
Soy 3bcdc9f854 Merge remote-tracking branch 'upstream/master' 2013-04-28 21:07:59 +02:00
Soy f778ee86a2 * Fixed cavern canned food generation. 2013-04-28 21:07:54 +02:00
fnord 9c90bf4c30 advanced inventory: [e]xamine 2013-04-28 13:53:38 -05:00
Kevin Granade 8980898543 Refresh screen when exiting advanced inventory. 2013-04-28 13:52:47 -05:00
Kevin Granade 4f5cf8c47c Merge dynamically sized advanced inventory. 2013-04-28 13:30:55 -05:00
Kevin Granade e1a0fe4181 Merge gothic style churches. 2013-04-28 13:28:21 -05:00
Kevin Granade c73bee4927 Merge Vacum sealing and new recipes.
Conflicts:
	itypedef.cpp
2013-04-28 13:20:26 -05:00
Soy 0912d4b997 Merge remote-tracking branch 'upstream/master' 2013-04-28 20:19:21 +02:00
Kevin Granade a49cbfc37f Fix swapped magnitudes for cannabilism morale bonus/penalty. 2013-04-28 13:18:17 -05:00
Soy 11b8e95723 Merge remote-tracking branch 'upstream/master' 2013-04-28 20:11:26 +02:00
Kevin Granade 4269091a00 Merge MSVC build fixes. 2013-04-28 13:03:21 -05:00
Kevin Granade 4f9b8f1e96 Merge fixes to Android trait. 2013-04-28 13:01:08 -05:00
Kevin Granade 9b27e46bf2 Merge changes to animal hostility. 2013-04-28 12:58:45 -05:00
Kevin Granade 7f3caf2bc7 Add a message for a cannibal relishing human flesh. 2013-04-28 12:56:01 -05:00
Kevin Granade 946473384a Sweak cannibalism penalty back up a bit. 2013-04-28 12:02:04 -05:00
acidia bbf08d18b8 Adding Gothic style churches...
An alternate design for the church using stained glass windows
2013-04-28 12:01:37 -05:00
Kevin Granade 5900a9f06a Merge adjustments to cannabilism handling. 2013-04-28 11:59:25 -05:00
acidia 94c46e5d46 Adding stained glass windows...
Adds red, blue, and green stained glass windows for the Gothic style church and the future cathedral.  Can't see in/out of them abut they also are raised up off the ground so that they aren't accessible to be bashed in.
2013-04-28 11:56:55 -05:00
acidia 191edaaaf0 Update mapgen.cpp
Added the Gothic style church as an alternate to the New England/Country style.
2013-04-28 11:50:38 -05:00
Quietust d2fe8b4b1a GCC has sqrt(double), but MSVC has sqrt(float) + sqrt(double) + sqrt(long double), so we need to specify which one to use 2013-04-28 11:40:41 -05:00
origamiwolf 0be21c5494 Added vacuum packing of foods 2013-04-28 21:36:06 +08:00
origamiwolf 7beead5acf The Joy of Italian Cooking 2013-04-28 20:39:51 +08:00
TheDarklingWolf 1cef2fdbee Merge branch 'master' of https://github.com/TheDarklingWolf/Cataclysm-DDA 2013-04-28 13:30:31 +01:00
TheDarklingWolf f814f8db72 Remove previously mentioned crafting components and apparently fix compiling 2013-04-28 13:30:08 +01:00
Soy 29964dea6c Merge remote-tracking branch 'upstream/master' 2013-04-28 14:16:42 +02:00
Kyratzes Talvadore 67d44ac47d Merge pull request #710 from ethankaminski/blister-fix
Stop blisters from lowering max HP
2013-04-28 05:12:14 -07:00
Soy 515485c9ca Merge remote-tracking branch 'upstream/master'
Conflicts:
	mapitemsdef.cpp
2013-04-28 14:10:02 +02:00
Soy 46e5e5185b * added matches to cavern spawn list. Now you at least have a chance of escape. 2013-04-28 14:07:59 +02:00
TheDarklingWolf e3e7a87c06 Merge branch 'master' of https://github.com/TheDarklingWolf/Cataclysm-DDA 2013-04-28 13:01:42 +01:00
TheDarklingWolf 33fcd7e4a7 Some currently unused crafting components. 2013-04-28 12:59:17 +01:00
fnord 5cf8e82279 Displays page number 2013-04-28 04:59:12 -05:00
origamiwolf d88ab1794a Food canning now use glass jars and some minor can food tweaks 2013-04-28 17:03:33 +08:00
origamiwolf 1122ee7c78 Added canning jars and vacuum sealers 2013-04-28 16:45:28 +08:00
fnord e97baf1fe8 debuggery removed 2013-04-28 03:42:41 -05:00
fnord 27ae55a6ac advanced inventory: dynamically sized, instead of static 120x40.
wasteful padding removed. pending further cleanup and fluff.
2013-04-28 03:38:23 -05:00
Christian Buskirk a93535783d Cougar stalk change
Changed MTRIG_TIME to MTRIG_STALK; now it only rolls to increase after a
creature starts to follow the player instead of as soon as they see
them. Name change was in-case someone wanted to implement an actual
MTRIG_TIME later for something else.
2013-04-28 00:12:33 -07:00
ethankaminski 9fd40a77a3 Stop blisters from lowering max HP 2013-04-28 18:57:32 +12:00
ethankaminski e1f244e876 Remove commented-out "cheater's block". Served no purpose. 2013-04-28 18:35:06 +12:00
ethankaminski d61e3023c0 Make sure androids don't start with endgame bionics, if any exist 2013-04-28 18:34:10 +12:00
ethankaminski 73d53f542f Remove unimplemented bionics - not properly dummied out, no implementation 2013-04-28 18:29:55 +12:00
ethankaminski 20a8616c00 Prevent random bionic generation from creating null or faulty bionics 2013-04-28 18:27:42 +12:00
Kevin Granade 9f5d3ce750 Add a helper function to streamline body temperature unit test. 2013-04-28 00:13:50 -05:00
Christian Buskirk 9f8f9c48b2 Set neutral attitude (anger = 0) to IGNORE.
Right now creatures with 0 anger will be ordered to track down the
player. It seems more realistic to have 0 anger creatures ignore the
player (as they aren't hostile). The end result of this is wildlife are
slightly less likely to attack if the player gives them a wide berth,
compared to before where they were guaranteed to attack eventually.
2013-04-27 19:45:49 -07:00
Kevin Granade 23cd22ef46 Merge a batch of new building types. 2013-04-27 21:39:21 -05:00
Kevin Granade f05fa032c7 Merge a slew of new magazines. 2013-04-27 21:23:39 -05:00
Joshua Hunter 7e6c823518 Fix #607 - Sewing in the Dark 2013-04-27 19:16:06 -07:00
acidia 7142f90209 Update mapitems.h 2013-04-27 21:15:50 -05:00
acidia 51ccd1dee1 Update mapitemsdef.cpp 2013-04-27 21:14:44 -05:00
acidia 48901ed9f5 Update omdata.h 2013-04-27 21:13:36 -05:00
acidia 54a1fc3b3a Update overmap.cpp 2013-04-27 21:12:08 -05:00
acidia 29f26c6967 Update mapgen.cpp 2013-04-27 21:10:34 -05:00
acidia e2217827b4 Update mapgen.cpp 2013-04-27 19:38:02 -05:00
acidia 9198766a5a Update mapitems.h 2013-04-27 19:36:20 -05:00
acidia 7684faf67c Update mapitemsdef.cpp
Does repeating an entry here increase the chances that a given item will spawn?
2013-04-27 19:35:21 -05:00
acidia a01d962440 Update omdata.h 2013-04-27 19:34:09 -05:00
acidia 470a8ccc08 Update overmap.cpp 2013-04-27 19:31:52 -05:00
acidia f3ad25db35 Update mapgen.cpp
Adds coffee/doughnut shop and fast food joint
2013-04-27 19:29:53 -05:00
Kevin Granade e791265eff Merge some bugfixes. 2013-04-27 18:14:41 -05:00
ethankaminski b1b0d50820 Fix map save bug 2013-04-28 11:09:57 +12:00
Dirkkun 164a2c8dac MinGW and GitHub for Windows fixes
MinGW - Remove 3 warnings that UINT cannot be NULL.
GH4W - Add built objects to ignore list.
2013-04-27 15:51:07 -04:00
Soy 05408ced2b Merge remote-tracking branch 'upstream/master' 2013-04-27 18:35:03 +02:00
Soy 5f2cec8dff * fixed usb mission item deletion bug. 2013-04-27 18:34:39 +02:00
Kevin Granade 37877fbf76 Merge new content. 2013-04-27 10:52:29 -05:00
Kevin Granade d889f9f057 Added short note describing test suite build instructions. 2013-04-27 10:03:51 -05:00
Kevin Granade 2e9d8785cb Remove leftover variable left over after refactor. 2013-04-27 09:49:21 -05:00
Kevin Granade 51d77112fe Batch of bugfixes. 2013-04-27 09:38:05 -05:00
Williham Totland fc6f7dd9b8 CBM: Power Storage Mk. II 2013-04-27 15:09:14 +02:00
ethankaminski 9be377c847 Fix dropping a weapon that doesn't fit in inventory 2013-04-27 22:40:25 +12:00
ethankaminski 5b72456b80 Remove a C++11 line so that Cygwin can compile stuff 2013-04-27 20:41:09 +12:00
Dirkkun 80a17d0f17 Books 2013-04-27 04:19:40 -04:00
Kevin Granade 69455c0573 Add a batch of tests for key temperature equilibrium points. 2013-04-27 03:02:27 -05:00
Kevin Granade bff8159633 Update test Makefile to build more robustly. 2013-04-27 02:58:10 -05:00
ethankaminski f889246ea3 Remove the hardcoded (and apparently arbitrary) cap on oter_id 2013-04-27 17:52:23 +12:00
acidia 64a9db567f Update overmap.cpp 2013-04-26 21:07:58 -05:00
acidia 498cb106a5 Update mapitemsdef.cpp 2013-04-26 21:03:44 -05:00
acidia 2ae29f9c4b Update mapitems.h 2013-04-26 21:02:41 -05:00
acidia 6bba43e88d Update map.cpp
Needed for some computer functions...
2013-04-26 21:00:26 -05:00
acidia 3cdf9ba616 Update map.h 2013-04-26 20:58:27 -05:00
acidia 5538ea0b3e Update mapdata.h 2013-04-26 20:55:51 -05:00
acidia 721256dacf Update computer.h 2013-04-26 20:52:01 -05:00
acidia af24e6e70a Update computer.cpp
Added three functions that the doctor's office and the church currently use.
2013-04-26 20:49:46 -05:00
acidia ed4d4da62c Update omdata.h
Used inverted colors from pharmacy...
2013-04-26 20:43:04 -05:00
acidia 685e3dd7ef Update overmap.cpp
Adding Doctor's Office to Spawn
2013-04-26 20:40:06 -05:00
acidia ca18fe3125 Update mapgen.cpp
Added Doctor's Office
2013-04-26 20:36:14 -05:00
ethankaminski 6c39291f7f Make STL not crash if we use all of the available charges from the first item in inventory 2013-04-27 11:33:29 +12:00
Kevin Granade 20b12b9790 Merge fire bow. 2013-04-26 18:17:53 -05:00
Kevin Granade 7e1548fa72 Merge mutation code refactor and adjustment of robust genetics algorithm. 2013-04-26 18:12:32 -05:00
Kevin Granade 6208d00a70 Merge pair of bugfix pull requests. 2013-04-26 18:05:01 -05:00
ethankaminski 1f90391445 Update changelog for my major changes since 0.4 2013-04-27 10:55:26 +12:00
ethankaminski 3da22f74cb Add a fire drill item (survivalcraft firestarter) 2013-04-27 10:47:32 +12:00
ethankaminski 440b73b99a Extract most iuse firestarting logic into helper methods 2013-04-27 10:24:05 +12:00
Soy 4562cfb68a * removed a stupid save an loading bug.
* fixed typo
* Set default value for some npc.plt.
* removed one npc.die statement from mission fail. (would cause crash).
* fixed cleanup_at_end. Added null checks to mission functions. and find mission now complains when it cannot find a mission.
* removed reset npcs code. That wasn't used nor working.
2013-04-26 22:50:07 +02:00
magikmw 830cba6b2e fixed permissions from executable to read/write on disease.h 2013-04-26 14:30:43 +02:00
Kevin Granade 68411e1fd3 Merge pull request #669 from FunnyMan3595/code_style
Added a file describing the project's coding style, with astyle line.
2013-04-25 20:58:05 -07:00
Charlie Nolan (FunnyMan3595) 5b57969620 Added a file describing the project's coding style, with astyle line. 2013-04-25 22:27:56 -05:00
Charlie Nolan (FunnyMan3595) 0e5ae9372c Improved Robust Genetics.
Without: 33% chance to pick a bad mutation, otherwise picks any mutation
With (old): 22% chance to pick a bad mutation
With (new): 33% chance to pick a good mutation
2013-04-25 22:24:05 -05:00
acidia 692e3d7663 Update computer.h 2013-04-25 21:49:17 -05:00
acidia f4fbbbcc30 Update computer.h 2013-04-25 21:13:15 -05:00
acidia 756db54c7e Update computer.cpp
The default option for the radio station terminal for now.
2013-04-25 21:11:50 -05:00
acidia 65d85921c7 Update omdata.h
I'm indifferent to the tile they use... it is the inversion of the radio tower.
2013-04-25 21:09:23 -05:00
Charlie Nolan (FunnyMan3595) 572a45c265 Added self to SIGNOFF. 2013-04-25 21:03:48 -05:00
acidia 9f2d795b39 Update overmap.cpp
Spawns radio stations in towns.
2013-04-25 21:02:29 -05:00
acidia 7535508ad5 Update mapgen.cpp
Adding the radio station.
2013-04-25 20:58:55 -05:00
Kevin Granade 9a434a4733 Add weather radio note to changelog. 2013-04-25 20:05:06 -05:00
Kevin Granade 1767e5db95 Merge pull request #666 from ethankaminski/armor-mat
Make nylon-based gear use material COTTON, not PLASTIC
2013-04-25 17:50:10 -07:00
ethankaminski 8e74b2c011 More PLASTIC -> COTTON, seem to have failed to save the file 2013-04-26 12:49:35 +12:00
Kevin Granade 83bb89c118 Save and load future weather conditions so it doesn't get scrambled. 2013-04-25 19:46:56 -05:00
ethankaminski f328c63fb2 Make nylon-based gear use material COTTON, not PLASTIC
Rationale: nylon really behaves more like cotton than like hard plastics (which seem to be the primary purpose of the PLASTIC material).

Also, it's silly that you can't patch up your backpacks. I know I've had to do that IRL, so I don't see why it shouldn't be possible in-game.

This might also let us scrap the check in the item damage code which skips over storage items.
2013-04-26 12:24:03 +12:00
Kevin Granade 4755ed4366 Merge more wildlife. 2013-04-25 18:52:50 -05:00
Kevin Granade 1516b240fb Merge warmth items. 2013-04-25 18:39:54 -05:00
jason.gilbert@nbed.nb.ca 730d8dba94 Beds now require blankets to be made 2013-04-25 18:08:31 -07:00
jason.gilbert@nbed.nb.ca 8ff9af741a Updated changelog
Conflicts:

	data/changelog.txt
2013-04-25 18:08:29 -07:00
jason.gilbert@nbed.nb.ca 75b7199f79 Signoff
Conflicts:

	SIGNOFF
2013-04-25 18:07:50 -07:00
jason.gilbert@nbed.nb.ca d56f63ce1a Fixed comma issues in recipes 2013-04-25 18:07:20 -07:00
jason.gilbert@nbed.nb.ca 6e4366f3fe Added new warmth items to spawn
Conflicts:

	mapitemsdef.cpp
2013-04-25 17:59:42 -07:00
jason.gilbert@nbed.nb.ca dada465e7b Added new crafting recipes for new warmth items, survival is needed for fur items 2013-04-25 17:58:11 -07:00
jason.gilbert@nbed.nb.ca 86e8487d7b Added new warmth items 2013-04-25 17:58:11 -07:00
jason.gilbert@nbed.nb.ca 38e60b604a Added rate of change for body temperature to GUI 2013-04-25 17:58:11 -07:00
Kevin Granade 42cd8b4e65 Merge cleanup of compile warnings and errors, and supress some debug messages.
Conflicts:
	map.cpp
2013-04-25 18:31:33 -05:00
Kevin Granade b5b00fb4fc Merge Cleanup of npc fixes, npc options, now part of normal options.
Conflicts:
	options.cpp
	options.h
2013-04-25 18:28:22 -05:00
Kevin Granade 05ae3c9f30 Merge tab switches between panes in advanced inventory 2013-04-25 18:15:46 -05:00
Kevin Granade 2770eeb57e Merge Removed a hardcoded limit on recipe availability checking. 2013-04-25 18:13:50 -05:00
Kevin Granade 02b4c0f095 Merge Multidrop screen updates to show new weight/volume. 2013-04-25 18:09:07 -05:00
Kevin Granade 5fb07abc23 Merge mass of bugfixes. 2013-04-25 17:56:16 -05:00
Charlie Nolan (FunnyMan3595) 049c966126 Fixed the disassemble check in player.cpp to use the new recipe data structure.
This fixes the segfault in issue #658.
2013-04-25 17:50:01 -05:00
Kevin Granade 30219cec41 Merge Don't offer to drink when topping off a water container from an infinite source. 2013-04-25 17:43:34 -05:00
Kevin Granade 11cea1008f Reduce max value for season length to avoid overruning the char variable it is written to. 2013-04-25 17:39:02 -05:00
Kevin Granade b01d4a2a94 Merge Option to set the amount of squares the Move View keys shift per keypress.
Conflicts:
	options.cpp
	options.h
2013-04-25 17:32:47 -05:00
ethankaminski fc36ea3be4 Prevent longbow (1) from happening - thanks FunnyMan
Thanks to FunnyMan's reproduction steps, I've figured out what's causing longbow (1) to happen. Hurray, long-running bug squashed :).
2013-04-26 10:30:58 +12:00
Kevin Granade 71934ca884 Merge option to set number of days in season. 2013-04-25 17:30:14 -05:00
Kevin Granade b079323940 Merge scrolling support for options menu. 2013-04-25 17:29:33 -05:00
ethankaminski 78c523e342 Loaded longbows (buggy state) will fire 2013-04-26 10:12:24 +12:00
Soy 220f14d127 * Updated DEVELOPER_FAQ.txt. with some npc info. 2013-04-25 23:26:18 +02:00
Soy 2b7df6cd55 Added more lit items to the npc forbidden items list. 2013-04-25 23:20:33 +02:00
Soy b9018f8159 * Removed duplicated code
* Made nuke launch only explode once. But with the strength of a mininuke.
2013-04-25 22:30:41 +02:00
Soy 8513fa26bf Merge remote-tracking branch 'upstream/master' 2013-04-25 20:35:48 +02:00
Williham Totland a75e6fed42 Cannibal morale adjustment 2013-04-25 19:22:18 +02:00
TheDarklingWolf 5e20983ecf Merge branch 'master' of https://github.com/TheDarklingWolf/Cataclysm-DDA 2013-04-25 18:17:49 +01:00
TheDarklingWolf 4ec2602c33 Fix issue with boarding up broken windows. Taping changed to use able_window_pane like it should have been using from the start. 2013-04-25 18:16:43 +01:00
Kyratzes Talvadore 33ae4f5b95 Merge pull request #651 from quietust/msvc
Add weather_data.cpp to MSVC project files
2013-04-25 09:45:19 -07:00
TheDarklingWolf 5f858741fc Fixed missing brace in iuse.cpp, removed duplicate t_chaingate_c in map.cpp and added t_chaingate_l to existing chaingate case. Closes #654 2013-04-25 17:43:31 +01:00
Livingstone dfe29f2e1c Debugmon on stopping vehicles, killing monsters in play 2013-04-25 18:02:17 +03:00
Livingstone 4858457ba9 Missing braces, double cases 2013-04-25 17:00:29 +03:00
TheDarklingWolf 088412e207 Merge branch 'master' of https://github.com/TheDarklingWolf/Cataclysm-DDA 2013-04-25 14:19:07 +01:00
TheDarklingWolf f42e077270 Removed iexamine::fence_post from metal posts. Chainlink fences now hacksaw into dirt, metal fence posts can be cut down. Chain gates can be bashed. Fixed a wire feedback loop. 2013-04-25 14:18:43 +01:00
Quietust b5389c050d Fix [advance|decrease]_nextinv - .end() points BEYOND the last character, so dereferencing it doesn't work (and is also illegal) 2013-04-25 08:03:15 -05:00
Quietust f30e78c27a Add weather_data.cpp to MSVC project files 2013-04-25 08:02:24 -05:00
Soy 61a2e08927 Removed outdated comments. And commented out code. 2013-04-25 10:16:31 +02:00
ethankaminski 09aba18d4e Zero vehicle turn count if velocity == 0
I *think* this will fix the "stopping out of map vehicle" debugmsg spam? Seems like it was the result of an uninitialized member variable.
2013-04-25 19:48:39 +12:00
Soy bda59fae16 Merge remote-tracking branch 'upstream/master' 2013-04-25 09:46:37 +02:00
Soy 72607bef81 * Fixed typo in nuke functions, fixed typo in bionics.
* Moved npc options to normal options file.
* Removed duplicated npc load code.
* Removed redundant cast.
2013-04-25 09:46:31 +02:00
ethankaminski ecc249e971 Improve option scrolling, re-add wraparound 2013-04-25 19:00:02 +12:00
ethankaminski 6619ca67fb Change the option menu behavior so that it scrolls 2013-04-25 18:48:02 +12:00
fnord 9d17476027 advanced_inv: Tab toggles between panes as is typical of ncurses
apps
2013-04-25 01:47:26 -05:00
ethankaminski f4d6dc512e Fix formatting while multidropping to account for variable numbers of digits 2013-04-25 18:30:34 +12:00
ethankaminski 40e9ed7e61 Rename method to inventory::remove_item_by_charges
I don't like using "quantity" in the method name of something that only ever works on items with charges.
2013-04-25 18:12:32 +12:00
ethankaminski b69cc518f8 Fix removal by charges to actually remove the item if it's a full stack 2013-04-25 18:05:12 +12:00
ethankaminski 4b4ee3d086 Fix NPC trading crash
Right, getting pointers to a copied inventory that goes out of scope will cause issues. Why do we even have a copy constructor for inventory, anyway?
2013-04-25 17:20:32 +12:00
Kevin Granade 230b184529 Add weather forecasting function and hook up to radios. 2013-04-24 23:33:13 -05:00
Kevin Granade 45d2a9b118 Generate future weather on game load. 2013-04-24 23:32:24 -05:00
Kevin Granade b70447484d Add a calendar method to return the dat of the week as a string. 2013-04-24 23:21:16 -05:00
Charlie Nolan (FunnyMan3595) 250f133f10 Only offer one swap when picking up items.
Fixes issue #588.
2013-04-24 22:55:46 -05:00
ethankaminski d3f2b5a5f4 NPC conversation uses player::skillLevel, rather than uninitialized sklevel
Fixes a bug where if you tried to get training from an NPC right after loading a save, the NPC would think that you've got 0 in all your skills.
2013-04-25 15:34:04 +12:00
Charlie Nolan (FunnyMan3595) 248449ed9c Topping off a partly-full container from an infinite source is a success.
Fixes issue #629.
2013-04-24 22:33:07 -05:00
Charlie Nolan (FunnyMan3595) 3b2dbc2cbc Additional cleanup for lifting tool and component limits. 2013-04-24 22:20:15 -05:00
Charlie Nolan (FunnyMan3595) a6f30533b6 Removed 20-tool and -component limit from crafting recipes. 2013-04-24 21:39:02 -05:00
Charlie Nolan (FunnyMan3595) 0bcf810973 Removed a hardcoded limit on recipe availability checking.
This was making it possible to create recipies that should not have been
possible, including when no tools or components were present.
2013-04-24 21:17:14 -05:00
Alpha16 53e3aec4ac Ignoring unwanted files 2013-04-24 20:11:59 -06:00
ethankaminski 15bbf67b59 Another quick fix for the same ammo idiom 2013-04-25 13:23:35 +12:00
ethankaminski 6bc0f4016d Slight tweak to inventory subsets to account for ammo idioms 2013-04-25 13:20:32 +12:00
ethankaminski 3a2b8b9a97 Multidrop screen updates to show new weight/volume 2013-04-25 12:57:21 +12:00
Kevin Granade 06b86b448f Teensy cleanup of string outputting code. 2013-04-24 19:24:03 -05:00
Kevin Granade 4fd0b7645b Refactor calendar::print_time() to allow outputting the time to the current hour. 2013-04-24 19:24:03 -05:00
Kevin Granade 3f27b8d314 Move weather data to a cpp file. 2013-04-24 19:24:03 -05:00
Kevin Granade 2d26346388 Attach a random city name to cities as they are constructed. 2013-04-24 19:24:03 -05:00
Kevin Granade 104abb0724 Add city names pulled from http://en.wikipedia.org/wiki/List_of_New_England_towns to names.json. 2013-04-24 19:24:03 -05:00
Kevin Granade 42976d8f31 Add city names to names module. 2013-04-24 19:24:03 -05:00
Kevin Granade bf389bc2e1 Const up calendar access as much as possible. 2013-04-24 19:24:03 -05:00
Kevin Granade 950a36a1c5 Add weather radio broadcast type to radio towers. 2013-04-24 19:24:02 -05:00
Kevin Granade 4e98459092 Calculate weather conditions ahead of time. 2013-04-24 19:24:02 -05:00
Kevin Granade 6c61c54080 Move seasons enum to calendar. 2013-04-24 19:24:02 -05:00
Quietust f773e5b53b Fix random crash on creating new character with bionics 2013-04-24 19:15:40 -05:00
Kevin Granade 6398d533bb Merge funnels for rain collection.
Conflicts:
	game.cpp
	map.cpp
2013-04-24 19:11:34 -05:00
Dirkkun 59a46573ac Wildlife Additions
Added coyotes and moose.  Added the cat to the spawn list.  Minor animal
color and text edits.
2013-04-24 19:39:47 -04:00
Kevin Granade 23274c44bb Bugfix megamerge. 2013-04-24 18:10:51 -05:00
fnord be009d84c5 remove_stack_by_letter in game::advanced_inv (or the way it's called)
causes crash. To replicate, / and move full stack of ammo to ground
moving partial stack works so I've duct taped it
2013-04-24 17:21:11 -05:00
fnord 2661c02c28 Merge remote branch 'origin/master' into key_improvements 2013-04-24 16:26:41 -05:00
fnord 0d302ed37e pageup/down win32 fix 2013-04-24 16:02:17 -05:00
Charlie Nolan (FunnyMan3595) 1b04a42118 Added a 5-minute timeout to autosaves.
Fixes issue 568.
2013-04-24 13:04:27 -05:00
Quietust 25b90e09d8 Fix for issue #628 - don't go into scrolling logic if there aren't enough to fill the screen 2013-04-24 11:39:59 -05:00
Williham Totland de6c291f8a Resolves #624 2013-04-24 16:16:34 +02:00
fnord 1bd96df08d oopsie 2013-04-24 08:19:57 -05:00
fnord a5434b1a93 Customizable amount of squares that 'move view' shifts. 2013-04-24 07:46:38 -05:00
ethankaminski 3b140e646c Fix wielding items on pickup.
Temporary patch, what I'd like to do is convert all the invlet-taking player functions in ones that take item references.
2013-04-24 23:14:55 +12:00
Soy fd5c80075d Added newline to SIGNOFF 2013-04-24 11:01:46 +02:00
Soy 219b918331 Merge remote-tracking branch 'upstream/master' 2013-04-24 11:00:51 +02:00
Nathan Morley bb72502d24 Added a placeable funnel item to collect water when it is raining. 2013-04-23 23:01:58 -06:00
Kevin Granade 3fd82111cd Merge rewrite of recycling machine. 2013-04-23 21:50:36 -05:00
Kevin Granade 40c010583e Stop supressing char-subscripts warning as we don't seem to do it anywhere. 2013-04-23 21:49:52 -05:00
Quietust 7b6f3c83c8 Suppress some of the most blatantly pointless warnings 2013-04-23 21:37:10 -05:00
Kevin Granade 656156c9ed Merge Quick bugfixes for #614 (NPC update). 2013-04-23 21:17:14 -05:00
Kevin Granade 30a7792771 Merge Stacking fixes. 2013-04-23 21:14:23 -05:00
Kevin Granade d60e329a24 Change variable back to int to handle greater-than-ascii values. 2013-04-23 20:34:43 -05:00
ethankaminski e11bb41545 Make player/npc destructors virtual 2013-04-24 13:24:49 +12:00
ethankaminski 4113da2fbc Fix NPC inventory iteration (not necessary any longer). 2013-04-24 13:18:57 +12:00
Kevin Granade 28e2a5249f Merge remote-tracking branch 'dda/pr/592' into dda-master
Conflicts:
	game.cpp
2013-04-23 20:14:25 -05:00
Kevin Granade 4c8bbdbf87 Remove some unused variables.] 2013-04-23 20:09:06 -05:00
Kevin Granade 4d9f79dedc Merge massive NPC fix. 2013-04-23 20:08:31 -05:00
TheDarklingWolf d566a863ed Merge branch 'master' of https://github.com/TheDarklingWolf/Cataclysm-DDA 2013-04-24 00:50:44 +01:00
TheDarklingWolf 2aabb97ae5 Lightstrips and Glowsticks in the inventory can be used to read. This is a horrible hack and needs to be remedied correctly at some point. 2013-04-24 00:50:09 +01:00
Kevin Granade aaec4da0f2 Merge solar panel recipes. 2013-04-23 18:47:13 -05:00
ethankaminski 96ce0e5a7f Make inventory::add_item handle ammo/meds properly 2013-04-24 11:41:59 +12:00
TheDarklingWolf e3df93e349 Changelog 2013-04-24 00:31:38 +01:00
Soy 2999ceae34 Merge remote-tracking branch 'upstream/master' 2013-04-24 01:28:07 +02:00
TheDarklingWolf b1300c09b1 Merge branch 'master' of https://github.com/TheDarklingWolf/Cataclysm-DDA 2013-04-24 00:26:42 +01:00
TheDarklingWolf d533039fd0 Glowsticks. They glow! 2013-04-24 00:26:19 +01:00
ethankaminski c69717ef49 Fix inventory::restack a bit 2013-04-24 11:25:39 +12:00
Kevin Granade 32cf3ff1ed Mass-merge of Key improvements, Makefile: Don't clobber LDFLAGS / CXXFLAGS if set, and Add a comment clarifying standards-compliant getch() behavior. 2013-04-23 18:23:29 -05:00
Soy 1e6c1205c3 Merge remote-tracking branch 'upstream/master' 2013-04-24 01:18:50 +02:00
Kevin Granade 1d76f9eb0d Temporary fix for excess construction recipe components causing crashes, make arrays bigger. 2013-04-23 18:18:11 -05:00
Soy cd1f2b332e Merge remote-tracking branch 'upstream/master'
Conflicts:
	game.cpp
2013-04-24 01:17:51 +02:00
origamiwolf b1256b61a7 Added variable recycler efficiency 2013-04-24 06:55:59 +08:00
origamiwolf d9453558cc Use item controller to determine weights instead of hardcoding them 2013-04-24 06:48:11 +08:00
TheDarklingWolf b206ce466d Merge branch 'master' of https://github.com/TheDarklingWolf/Cataclysm-DDA 2013-04-23 23:44:36 +01:00
TheDarklingWolf a6926595d5 Added glowsticks 2013-04-23 23:44:23 +01:00
Soy dd27ea987f * Nuclear missle now kills npcs. Can only be launched once. Disarming the nuke works. And spawns smoke in the lower chamber. Also added lazycats fixes.
* Fixed text of the emergency shelter. It got to many spaces.
* Added Z level coord to npc spawns. (this is not checked for everywhere)
* Added monsters spawning on teleport and load
* Added messages to a few debug options.
* boomer explodes typo fix.
* It dies changed into <monstername> dies
* marked for death npcs do not show up on the overmap.
* fixed the overmap positioning of active/omap npcs
* overmap npc showing now looks at Z coords as well.
2013-04-24 00:43:13 +02:00
Kyratzes Talvadore 05fceafad7 Merge pull request #600 from ethankaminski/unload-bugfix
Fix gun unloading (gives n bullets, rather than n stacks of bullets)
2013-04-23 15:25:05 -07:00
Kyratzes Talvadore 114a8a6228 Merge pull request #598 from atomicdryad/2013_literacy_campaign
Books are the definition of good reading material. Harumph!
2013-04-23 15:24:43 -07:00
origamiwolf cb3240a6b7 Recycler code made more consistent 2013-04-24 06:23:36 +08:00
TheDarklingWolf a69b84485b Adjusted some warmth 2013-04-23 22:59:48 +01:00
TheDarklingWolf a19533dd07 Fursuits, custom made for /rlg/ 2013-04-23 22:44:00 +01:00
TheDarklingWolf bda64f135d 'You can no longer learn from this %s' -> 'You can no longer learn from %s' 2013-04-23 20:45:46 +01:00
TheDarklingWolf aacb2cdcfa Alarmed windows can now be taped up. 2013-04-23 20:43:25 +01:00
TheDarklingWolf bdd1b7cbfe Broken and empty windows can no longer be taped up 2013-04-23 20:40:51 +01:00
fnord 62d3f27572 Makefile: Don't clobber LDFLAGS / CXXFLAGS if set 2013-04-23 14:21:29 -05:00
Kyratzes Talvadore be2edad24b Merge pull request #604 from quietust/master
Bugfix for items loaded from raws
2013-04-23 11:32:05 -07:00
Kyratzes Talvadore 130e4cdba4 Merge pull request #606 from Catacstone/disarming_query
Move disarming last to remove blackboxing, fix drinking with hands
2013-04-23 11:30:44 -07:00
TheDarklingWolf 288d0f3759 Lightstrips will no longer spam the message log telling you that you cannot do anything interesting with them. 2013-04-23 19:27:36 +01:00
Livingstone 4c1020445b Move disarming last to remove blackboxing, fix drinking with hands 2013-04-23 21:23:04 +03:00
Quietust ae267664a7 Item_factory::init() needs to happen before load_item_templates() 2013-04-23 13:07:49 -05:00
TheDarklingWolf 73c07b1745 Domestic windows now drop 3ft strings when broken and disassembled. 2013-04-23 18:51:55 +01:00
TheDarklingWolf 8f0e648a7a String can now be crafted with sinew and plant fibre. Fixed issue with no recipes after rain coat showing up. 2013-04-23 18:35:22 +01:00
TheDarklingWolf 429b1d248e Palisade walls & gates now require 2 lengths of 6 foot rope, rather than one of 30 foot rope. 2013-04-23 18:31:12 +01:00
Soy 183399d114 Added name to SIGNOFF
Merge remote-tracking branch 'upstream/master'

Conflicts:
	game.cpp
2013-04-23 18:50:59 +02:00
Soy eb1959689e Fixed saving bug, working on fixing the overmap display bug. 2013-04-23 13:43:49 +02:00
ethankaminski e9b38fdcb0 Fix gun unloading (gives n bullets, rather than n stacks of bullets) 2013-04-23 22:43:53 +12:00
fnord d7a5104bb5 Books are the definition of good reading material. Harumph! 2013-04-23 05:09:22 -05:00
fnord 8ea8efc3de update input() for pgdown,pgup = >,< 2013-04-23 04:31:35 -05:00
fnord 2b6c989ab3 Merge remote branch 'origin/master' into key_improvements 2013-04-23 04:29:56 -05:00
fnord 4d8a61842e pgup/pgdown for all inventory menus and cheaters 2013-04-23 03:17:19 -05:00
ethankaminski dc5781a0c0 Add a comment clarifying standards-compliant getch() behavior
After a lengthy forum debate involving an alternate and streamlined implementation of getch(), I discovered that getch() IS in fact required to call refresh() at times. It's unclear whether InvalidateRect (a Windows-specific function) is required as well, but a screen refresh is the desired outcome.

Leaving a comment to that effect, so that future programmers aren't lead on another wild goose chase when they notice that getch is refreshing the window without an obvious reason.
2013-04-23 18:45:31 +12:00
Quietust c4567d6317 itypedef.cpp takes a huge amount of time to compile, so disable optimization for now 2013-04-22 23:20:45 -05:00
Quietust 52d4c473f2 Allow compilation using MSVC 2010 Express, both 32-bit and 64-bit 2013-04-22 22:26:24 -05:00
Quietust 2837110c01 Fix some warnings that turned up when attempting to compile with MSVC 2013-04-22 22:26:23 -05:00
Kevin Granade 3802be27ef Merged Refactor inventory, improve item reference validity, fix #503. 2013-04-22 21:51:04 -05:00
Kevin Granade d291c41bb5 Clean up working of tutorial message. 2013-04-22 21:19:43 -05:00
Kevin Granade 948e103796 Re-add check for no items in game::pickup(). 2013-04-22 21:08:32 -05:00
Kevin Granade 7231aabea3 Merge Fix for #585. 2013-04-22 20:04:15 -05:00
Kevin Granade 953f491979 Merge dvanced inventory, input_wait(unused?): [><] = pg(down|up). 2013-04-22 20:01:11 -05:00
Kevin Granade 51238c65e2 Merge fix for issue 542. 2013-04-22 20:00:11 -05:00
Kevin Granade b399a4881c Cleanup some small details after cleanup. 2013-04-22 19:56:40 -05:00
Kevin Granade 284b37d63c Merged Assorted bugfixes. 2013-04-22 19:39:42 -05:00
Kevin Granade 8e576dbadc Merge To Serve Man.
Conflicts:
	data/changelog.txt
2013-04-22 19:31:16 -05:00
Kevin Granade 2de693c70f Merge Rain coats from plastic bags. 2013-04-22 19:28:11 -05:00
Kevin Granade c061849783 Merge Soron's signoff. 2013-04-22 19:27:13 -05:00
Kevin Granade 7e56cd21b0 Merge Made use instead of 2013-04-22 19:26:10 -05:00
Kevin Granade be630b910a Merge Various fixes and additions.
Conflicts:
	data/changelog.txt
	itypedef.cpp
	player.cpp
2013-04-22 19:24:15 -05:00
ethankaminski 244ec0c355 Fix a segfault when canceling a "R"ead 2013-04-23 11:24:20 +12:00
Soy d76febdf56 Fixed long range debug teleport also teleporting npcs. 2013-04-23 00:40:13 +02:00
origamiwolf 9e1bf24313 Merge branch 'master' of https://github.com/TheDarklingWolf/Cataclysm-DDA into CDDA-toiletfix 2013-04-23 05:44:44 +08:00
origamiwolf 07fd5e30ec Water collection moved to iexamine.cpp 2013-04-23 05:09:18 +08:00
Soy 59d6dfdbf9 Merge remote-tracking branch 'upstream/master' 2013-04-22 22:07:30 +02:00
Soy 5dad2a3ae4 Fixed some merge mistakes. 2013-04-22 22:07:06 +02:00
TheDarklingWolf ba3d5a97b7 Removed hotplate from ammo crafting recipes & javelin, added toolset to poppy painkillers and sleeping pills 2013-04-22 21:03:55 +01:00
fnord 9fdfaf7536 pgup/pgdown in normal inventory 2013-04-22 14:12:01 -05:00
fnord 74a4b97535 advanced inventory, input_wait(unused?): [><] = pg(down|up) 2013-04-22 14:02:32 -05:00
TheDarklingWolf bd368b94e2 Monsters that step on cots are no longer listed erroneously as zombies. Unless they are zombies, in which case it is not erroneous. 2013-04-22 19:59:34 +01:00
TheDarklingWolf e4616ccfc0 Move arrows into ammo crafting 2013-04-22 19:47:36 +01:00
Kyratzes Talvadore 6f1956f6dd Merge pull request #575 from ethankaminski/stop-no-interesting
Fix "nothing interesting..." spam for food and active map items
2013-04-22 11:35:15 -07:00
Kyratzes Talvadore bd60983ecc Merge pull request #589 from atomicdryad/adv-inv-keyfix
bea00043: cast key for getsquare to fix keys 0-9 in advanced inventory
2013-04-22 11:31:01 -07:00
fnord bb121595ee bea00043: cast key for getsquare to fix keys 0-9 in advanced inventory 2013-04-22 13:27:11 -05:00
TheDarklingWolf dd18ad45e9 Merge branch 'master' of https://github.com/TheDarklingWolf/Cataclysm-DDA 2013-04-22 19:13:52 +01:00
TheDarklingWolf 5de5da1fc6 Brought glass jaw in line with the health given from tough. 2013-04-22 19:13:29 +01:00
Soy 7c8e421caa Merge remote-tracking branch 'upstream/master'
Conflicts:
	field.cpp
	game.cpp
	player.h
	ranged.cpp
2013-04-22 19:38:02 +02:00
unknown 698ddeb76c Fix to prevent '%' symbols from being inrerpolated several times. 2013-04-22 17:12:01 +01:00
Soy 72d3f55379 Also added npc function to check if the npc is in the active list.
* added the word mutation, to the mutation strings. As those could be very unclear. "you lose ugly"
* reworked mission fail and mission end to work with the new npc system.
* cleaned up the dead npc removal system. It now actually removes the objects.
* fixed the nuke stuff.
2013-04-22 18:00:10 +02:00
Soy fcf68613ae Made npc vectors pointers to npc objects and not just vectors of npcs. Fixed the code so it worked everywhere.
Updated the active npc list. Now it works like this: all npcs are stored in the overmap list. And active npc are temporary stored in the active list when active.
The active list is not saved. It will just load the npc from the overmap.
Made getters and setters for the npc and player ID. To make them harder to change.

Minor fixes
* Added searching info to wish.cpp
* Added helper functions to the overmap. These functions look for npcs in specific overmap squares.
* overmap now prints a list of npc names. Not just one.
* fixed typo in radio message
2013-04-22 17:44:28 +02:00
Quietust c9e34e95c0 Don't exclude blank lines from motd/credits 2013-04-22 08:29:01 -05:00
Williham Totland d053c9941b Accidentally a trailing comma 2013-04-22 15:19:26 +02:00
Williham Totland 407ca5efbc adjusted CBM: Solar Panel craft difficulty 2013-04-22 14:48:43 +02:00
Williham Totland aebd88c14e Added crafting recipe for CBM: Solar Panels; made CBM: PAI reversible 2013-04-22 14:13:48 +02:00
Williham Totland f2f16cff33 Updated changelog 2013-04-22 14:09:15 +02:00
Williham Totland 17b6c189d1 Added solar panel recipe. 2013-04-22 14:08:12 +02:00
Williham Totland aa2247366a Added several spawn sites for solar cells. 2013-04-22 13:55:17 +02:00
Williham Totland d92980a712 Added solar cells. 2013-04-22 13:52:24 +02:00
ethankaminski 3044f815c2 Fix a player::activity reference to use invlets 2013-04-22 21:21:21 +12:00
ethankaminski ac68e41197 Merge remote-tracking branch 'upstream/master' into inv-fixup
Conflicts:
	pldata.h
2013-04-22 20:59:07 +12:00
ethankaminski 3631fb6b81 Remove inventory::operator[]. No significant old indexed functions!
Well, that was a doozy. Finally got inventory::operator[] excised. Some stuff is still using slices (in particular, UI and AI), and those should probably be moved into friend classes or something at some point.

Now time for testing.
2013-04-22 20:55:21 +12:00
Williham Totland 02b682e810 Updated changelog 2013-04-22 04:42:42 +02:00
ethankaminski 64b041f0b6 Remove inventory::index_by_letter
Sort of a hack in two places, but those functions should be rewritten *anyway*.

Only one more inventory method that uses index! Woo-hoo!
2013-04-22 14:39:49 +12:00
Williham Totland ae1bedc416 Adds recepies for making human-based food to To Serve Man. 2013-04-22 04:36:49 +02:00
Williham Totland 0e4fba8d11 Adds a new book, "To Serve Man".
It's... it's a cookbook!
2013-04-22 04:36:38 +02:00
ethankaminski 72dcd674d0 Convert inventory::remove_stack(int) to use invlets 2013-04-22 14:21:09 +12:00
Williham Totland c1bedb2d96 Added some new human-based food items 2013-04-22 04:11:01 +02:00
ethankaminski ed7c7bba64 Convert inventory::remove_stack(int, int) to use invlet 2013-04-22 14:07:50 +12:00
ethankaminski dbb4ada1a4 Eliminate (unused) inventory::remove_item(int, int) 2013-04-22 13:45:57 +12:00
ethankaminski 401f05846a Eliminate inventory::remove_item_by_quantity 2013-04-22 13:39:48 +12:00
ethankaminski cbe46754fc Fix "nothing interesting..." spam for food and active map items 2013-04-22 13:01:02 +12:00
Livingstone f73beda29b Rain coats from plastic bags 2013-04-22 03:20:07 +03:00
ethankaminski bf5fc488f9 Update signoff
I forget whether my first commit came in just before or just after the license was added. Updating the signoff so that people don't need to bother checking.
2013-04-22 12:19:06 +12:00
Williham Totland 59283dfd42 updated changelog 2013-04-22 01:34:08 +02:00
Quietust 7dcb069fd1 Fix some incorrect types 2013-04-21 18:31:56 -05:00
Williham Totland 243c3decd8 Ups the storage threshold for armor absorption 2013-04-22 01:31:50 +02:00
Williham Totland 62aa4a0172 Makes weak alcohol also recharge CBM batteries 2013-04-22 01:31:29 +02:00
Quietust f1f7b0d3ca Fix class/struct definition mismatches 2013-04-21 18:31:18 -05:00
Williham Totland 0f3e8741ab Makes power armor lighter, but more oppressive. 2013-04-22 01:30:43 +02:00
Quietust c955683776 Minor cleanup to determine_terrain_with_simple_method -some other compilers choke on this 2013-04-21 18:30:15 -05:00
Williham Totland 221ad9f456 Prevents canned foods from instarotting 2013-04-22 01:30:07 +02:00
Williham Totland d18d627c58 Removes drawbacks from armor CBMs 2013-04-22 01:28:48 +02:00
Quietust a963d1f737 Add parentheses to silence compiler error - these were almost definitely bugs 2013-04-21 18:28:30 -05:00
Quietust b5ffa4b4b0 Fix potential crash with reading from empty string 2013-04-21 18:26:38 -05:00
Williham Totland 5da6e6ff5e Normalized toolset charges usage 2013-04-22 01:25:29 +02:00
Williham Totland 9bc9a07182 Added Screwriver and Wild Apple, w/recipe 2013-04-22 01:19:45 +02:00
Kevin Granade ea4c9b3f08 Really disassemble? after checking possibility. 2013-04-21 17:39:55 -05:00
Kevin Granade f0b9466faa Merge Reordering examination messages. 2013-04-21 17:37:25 -05:00
Kevin Granade 548b9608f0 Merge Allow escape and arrow keys to be used in the advanced inventory. 2013-04-21 17:36:54 -05:00
Kevin Granade 339189950e Merge Continuous reading i.e. Study mk I. 2013-04-21 17:33:46 -05:00
Kevin Granade b7695f4d3f Merge Add a current/max power display to the bionics screen. 2013-04-21 17:25:09 -05:00
Kevin Granade 8c3851a65c Merge Convert construction menu to use item_factory methods for retrieving item data. 2013-04-21 17:24:40 -05:00
Matias Oksa 3a32c08fa8 Really disassemble? after checking possibility 2013-04-22 00:56:51 +03:00
ethankaminski bea000431b Allow escape and arrow keys to be used in the advanced inventory 2013-04-22 09:34:42 +12:00
Matias Oksa f708b30c37 Reordering examination messages 2013-04-22 00:25:10 +03:00
Kajetan Rzepecki c789bc8656 Fixed itypes related crash in construction menu
Similarily to `crafting.cpp` construction menu ran into a null pointer dereference and crashed the game. It's fixed now by using `item_controller` instead of `game->itypes`.
2013-04-21 22:21:01 +02:00
Kevin Granade 28c9dcd6ce Fully parenthesize a logic operation to silence warning. May have been a bug anyway. 2013-04-21 14:26:48 -05:00
Kevin Granade c4f26747c5 Add items loaded from json to legacy item list. 2013-04-21 14:06:31 -05:00
Matias Oksa 15af713e26 Continuous reading i.e. Study mk I 2013-04-21 21:39:24 +03:00
Kajetan Rzepecki 34ad5f6bdd Fixed crafting menu crashing the game
Crafting system uses now the `item_factory` instead of naked `itypes` pointer.
2013-04-21 19:31:13 +02:00
ethankaminski 82a88c1fb6 Add a current/max power display to the bionics screen 2013-04-21 18:07:50 +12:00
ethankaminski 8f31e5a85e Get rid of inventory::remove_item(int index) 2013-04-21 17:26:33 +12:00
ethankaminski 53aba45c44 Fix new multidrop bug (shallow copy getting out of sync with the original) 2013-04-21 16:33:24 +12:00
Kevin Granade 79b394ce83 Merge remote-tracking branch 'dda/pr/543' into dda-master 2013-04-20 22:09:40 -05:00
Kevin Granade 92a2afd621 Merge remote-tracking branch 'dda/pr/541' into dda-master 2013-04-20 22:03:43 -05:00
Kevin Granade 34ab6b29fb Merge remote-tracking branch 'dda/pr/540' into dda-master 2013-04-20 21:59:09 -05:00
ethankaminski 36998f5e68 Use | instead for the default wait key - doesn't conflict with anything this time 2013-04-21 13:48:53 +12:00
GlyphGryph 82e47d68e7 Added handling of iuse functionality to the item factory. Made mapgen code go through item factory to get templates, so json file entries are actually used here. 2013-04-20 10:40:28 -04:00
ethankaminski 5593ca32d3 Allow esc to exit from menu() and menu_vec() (e.g., wait, use knife, etc.) 2013-04-20 21:29:49 +12:00
ethankaminski a7f17e1d1e Change default wait key to "_"
IMO, it's silly to have the default wait key be one key away from the default craft key - makes it too easy to accidentally wait when you meant to craft. Especially given that you need to press "7" to exit the menu.
2013-04-20 19:13:49 +12:00
veryinky 2185593afb Fix so lockers and racks turn into t_floor 2013-04-19 19:19:33 -04:00
veryinky 1b85e47a73 Altered mapdata.h for decon-tag to locker & rack 2013-04-19 19:08:22 -04:00
veryinky afdf59a63d Locker and display rack construction 2013-04-19 19:00:07 -04:00
Kevin Granade c9a2f5e087 Merge pull request #537 from veryinky/hfleshfix
human flesh no longer indestructible
2013-04-19 15:03:13 -07:00
Kyratzes Talvadore 2e2720fe1d Merge pull request #538 from gordallott/master
STEMCELL disease message was missing its break statement
2013-04-19 12:56:05 -07:00
gordallott 7ebc84dc7b Stemcell disease message was missing a break statement 2013-04-19 20:48:03 +01:00
veryinky 06bfb23843 human flesh no longer indestructible 2013-04-19 12:46:51 -04:00
ethankaminski dd066d3c6a Fix massive slowdown when firing weapons/calling u_see
Well, thanks to profiling tools, I found out that u_see was calling has_artifact_with, which was using O(n^2) operations on the new list-based inventory. Move relevant code into the inventory class.
2013-04-19 17:58:11 +12:00
Zach Morgan a5dedb81aa update SIGNOFF 2013-04-18 18:44:28 -04:00
Kevin Granade 238497e821 Merge remote-tracking branch 'dda/pr/533' into dda-master 2013-04-18 16:57:28 -05:00
Williham Totland d80afc35fb Update SIGNOFF 2013-04-18 22:50:04 +03:00
ethankaminski c3e9cbfe3c Remove inventory::stack_at(index), move some code into inventory 2013-04-18 15:50:21 +12:00
ethankaminski cb2532688a Remove unused inventory::as_vector method 2013-04-18 11:54:13 +12:00
ethankaminski c1a8c4f5f7 Add some more inventory letter methods, remove more inventory::index_by_letter calls 2013-04-18 11:37:13 +12:00
Kevin Granade d4c0937ba2 Merge remote-tracking branch 'dda/pr/526' into dda-master 2013-04-17 18:27:09 -05:00
Kevin Granade 456273c1ea Merge Changes to Logwall construction, log&sod roof recipe. 2013-04-17 18:26:32 -05:00
ethankaminski 444dec1ffb Remove some calls to inventory::index_by_letter 2013-04-18 11:19:04 +12:00
ethankaminski b61cae985c Remove unused inventory methods "front" and "back" 2013-04-18 11:14:34 +12:00
Kevin Granade 6e8e795cdd Merge New traits, opposites to Truth-teller, Ugly et.al. into dda-master. 2013-04-17 18:03:30 -05:00
Kevin Granade 4ad647ae0d Raise power consumption of power armor interface to be more in line with powering it from UPS, still twice as efficient. 2013-04-17 17:55:42 -05:00
Williham Totland e5ce3ef87d Resolves an issue where armor would only protect against cut damage if the attack also imparted bashing damage 2013-04-17 17:47:55 -05:00
ethankaminski 56ed01160d Unload no longer requires wielding the container/gun (closes #503) 2013-04-18 10:18:36 +12:00
ethankaminski 59fdcb847c Change inventory::restack to not mangle references 2013-04-18 10:18:19 +12:00
veryinky 5702416bf4 Stone fireplace construction 2013-04-17 12:58:36 -04:00
Williham Totland 680ae8ddf5 Updated changelog 2013-04-17 18:57:19 +02:00
Williham Totland 673c2db045 Adds a pair of boots to the mechanic profession; adds Scoundrel profession. 2013-04-17 18:56:04 +02:00
veryinky 7466110f94 Log & Sod roof 2013-04-17 12:41:21 -04:00
Williham Totland 29c40355e4 make desks pushable 2013-04-17 18:40:49 +02:00
veryinky 0c3d17970e Allow building log walls with 2x4s 2013-04-17 12:34:06 -04:00
Williham Totland b4086724d8 New traits, opposites to Truth-teller, Ugly et.al. 2013-04-17 17:11:28 +02:00
Williham Totland bd9e41a912 Makes power armor more sturdy 2013-04-17 14:49:45 +02:00
Williham Totland deb553d2f8 Resolves an issue where glasses could not be worn with power armor 2013-04-17 14:09:08 +02:00
Williham Totland 0cabda6a8b Changelog updated 2013-04-17 13:59:33 +02:00
Williham Totland 08c5f1dfa0 Added to military spawn list 2013-04-17 13:58:00 +02:00
Williham Totland 8e412a8dfc craftable power armor interface CBM 2013-04-17 13:50:51 +02:00
ethankaminski c3f6ccce35 Improve readability of item sort code, stop flip-flops 2013-04-17 21:12:45 +12:00
ethankaminski d1481feedd Remove reference-mangling player::sort_inv() voodoo
Refactor the inventory sorting code so that it no longer mangles references (thanks to using std::list now).

Also move logic into the inventory and item classes, rather than being in player.

Note that inventory::sorted never seems to be *used*...
2013-04-17 20:53:00 +12:00
ethankaminski 47e36208e9 Use a std::list instead of a std::vector to store inventory items 2013-04-17 17:30:56 +12:00
Kevin Granade f2e3b04bd1 Merge pull request #521 from veryinky/itemfactorycbp
item_factory and item_group added to cbp
2013-04-16 21:49:31 -07:00
veryinky 97f94107ad item_factory and item_group added to cbp 2013-04-17 00:18:34 -04:00
Kevin Granade 98e03d0bf9 Merge dynamic to automatic scope variable conversion for item factory. 2013-04-16 22:28:10 -05:00
ethankaminski 5f47c42841 Fix drum materials 2013-04-17 14:06:14 +12:00
ethankaminski 14c6a29b2c Remove memory leak (use non-dynamic allocation) 2013-04-17 13:51:41 +12:00
ethankaminski 3fcd6716fc Make OPT_SKILL_RUST = 1 actually work 2013-04-17 13:14:02 +12:00
ethankaminski e1b8545338 Don't show player rusting skills when they've got rust off 2013-04-17 13:12:36 +12:00
Kevin Granade 50553e8d2c Tidy up item spawning in map::destroy(). 2013-04-16 20:06:30 -05:00
Kevin Granade f3953ee05b Add wreckage specific to palisade wall and gate destruction. 2013-04-16 20:05:53 -05:00
Kevin Granade bf9e4f1dd6 Fixup indentation of minimap note handling code. 2013-04-16 19:28:47 -05:00
Kevin Granade 98d7025fc7 Fix palisade gate open/close messages, thanks Tearlach. 2013-04-16 19:10:30 -05:00
Kevin Granade 371a0e870a Periodic wipe of trailing whitespace. 2013-04-16 18:35:43 -05:00
Kevin Granade 872304660a Clean up remaining item manager references. 2013-04-16 18:31:23 -05:00
Kevin Granade ac0a5b2dee Merge item initialization rewrite into dda-master 2013-04-16 17:47:39 -05:00
Kevin Granade d9f03fb014 Merge remote-tracking branch 'dda/pr/515' into dda-master 2013-04-16 17:31:14 -05:00
Kevin Granade bb1c4f4894 Merge remote-tracking branch 'dda/pr/514' into dda-master 2013-04-16 17:29:02 -05:00
Kevin Granade 8f20305d0e Merge remote-tracking branch 'dda/pr/511' into dda-master 2013-04-16 17:27:45 -05:00
TheDarklingWolf 740b354ce0 Merge branch 'master' of https://github.com/TheDarklingWolf/Cataclysm-DDA 2013-04-16 16:08:34 +01:00
TheDarklingWolf 004aa3c9e9 Change specific book name to generic 'difficult book', should fix display problems with verbosely named books 2013-04-16 16:03:51 +01:00
ethankaminski ede7f95aad Stop counting bionics/gunmods as weapons
This stops some inventory UI bugs where category labels would get mixed up.

This doesn't fix any systemic issues; for that, factoring out common logic in player::sort_inv() and find_firsts() would probably be best.
2013-04-16 19:23:43 +12:00
Fergus Dall 52da6cf1f4 Show note symbols on the minimap. Closes #508 2013-04-16 16:43:27 +09:30
ethankaminski 37a4bcdd1b Remove obsolete debugging check
That check won't be doing anything, since i is never modified in the loop. i.e., its sole effect is to make sure that the compiler's for (...) implementation is sane.

Also, it needs i >= z.size(), not i > z.size(), anyway.
2013-04-16 13:36:54 +12:00
ethankaminski a0df40fc56 Stop the monster list from being edited while we're iterating 2013-04-16 13:31:30 +12:00
Kevin Granade 867e94ef27 Ditch a bunch of redundant string and rope crafting recipes. Thanks ZChris13. 2013-04-15 19:34:52 -05:00
Kevin Granade 195acfece5 Remove the last warning in the codebase. 2013-04-15 18:50:10 -05:00
Kevin Granade 26f37817dd Fix map_has_adjacent_furniture(), thanks for pointing it out web-hijacker. 2013-04-15 18:49:46 -05:00
Kevin Granade 06628cd42d Merge Minor bug fixes for list_item priority list. 2013-04-15 18:11:12 -05:00
Kevin Granade 1336b449ca Merge Improved JSON reading API 2013-04-15 18:09:45 -05:00
Eric Ng(ZwodahS) 54e125864b Fix some bugs in list_item priority
Previously:
when asking for priority, pressing ESC will reset the
value to empty string.
Now :
pressing ESC will keep the last value

Previously:
When a filter is reset, the priority listing screws up temporarily.
Now :
Fixed.
2013-04-15 21:38:41 +08:00
Kevin Granade fa47c7c739 Merge pull request #507 from ethankaminski/pointy-stick-again
Rebalance wood spear/javelin recipes, update fence post recipe
2013-04-14 21:36:24 -07:00
ethankaminski dcba959d86 Smashing fence posts gives pointy sticks now 2013-04-15 15:44:32 +12:00
ethankaminski 9e3299a762 Rebalance wood spear/javelin recipes, update fence post recipe
Couple more balance adjustments after the wood spear/pointy stick split.
2013-04-15 15:40:30 +12:00
Kevin Granade 26885d4888 Merge pull request #505 from ethankaminski/pointy-stick-recipe
Add pointy stick as a tool to cooked meat/veggies
2013-04-14 20:25:57 -07:00
ethankaminski 57e3bda687 Add pointy stick as a tool to cooked meat/veggies
Two of the early cooking recipes expected wood spears to be easily craftable. Add pointy stick as a valid tool, as well.
2013-04-15 11:32:23 +12:00
ethankaminski 010450c2ff Add catajson to Codeblocks project file 2013-04-15 10:59:25 +12:00
ethankaminski 7e40c8d0fd Profession code uses catajson instead of picojson now 2013-04-15 10:55:35 +12:00
ethankaminski 1ab83d89c9 Recipe initialization uses catajson instead of picojson now 2013-04-15 10:46:28 +12:00
ethankaminski c1005ccead Add a convenient wrapper class around picojson 2013-04-15 10:17:58 +12:00
Kevin Granade dc366f0926 Merge remote-tracking branch 'dda/pr/494' into dda-master 2013-04-14 16:54:20 -05:00
TheDarklingWolf 6baff491b1 Added addiction.cpp to project file. 2013-04-14 22:51:03 +01:00
Kevin Granade 6084becec5 fergus-dall megamerge 2013-04-14 15:48:23 -05:00
Kevin Granade 6e3ec2efe4 Make addictions in professions optional. 2013-04-14 15:32:30 -05:00
Kevin Granade 3e69ecd2a6 Addictions can be configured in professions.json and move addiction mechanics to dedicated module. 2013-04-14 14:26:02 -05:00
Eric Ng(ZwodahS) 7f147dc1d0 Merge remote-tracking branch 'base/master' 2013-04-15 02:11:21 +08:00
Eric Ng(ZwodahS) 748b526d80 Added a priority function to list items 2013-04-15 02:09:29 +08:00
Kevin Granade 76dbbf2ed3 Add ability to learn recipes from books, and an extra battery mod for tools that uses it for its construction recipe. 2013-04-14 13:01:29 -05:00
Kevin Granade 19241894a2 Updated changelog. 2013-04-14 12:48:33 -05:00
Kevin Granade f68bd65e41 Cook off a random number of rounds each turn when ammo is in a fire instead of all of them at once. 2013-04-14 12:47:07 -05:00
Kevin Granade 32f5bb9ccb Base ammo explosions on new cookoff and other flags instead of item identity. 2013-04-14 12:41:07 -05:00
Kevin Granade b716ca2bf0 Add ammo flag indicating which ammo types explode when burned and apply to appropriate items. 2013-04-14 12:38:27 -05:00
veryinky 31d74a25eb Fixes for debug messages and vehicle alignment 2013-04-14 09:08:44 -04:00
Fergus Dall ec9d3d8495 Make scooters spawn with small wheels. Closes #497 2013-04-14 20:59:11 +09:30
veryinky ad791dcfc5 Spawns abandoned/ruined vehicles on roads 2013-04-14 07:23:54 -04:00
Fergus Dall a3e26c82e0 Encumberance decriptions now determine the correct sign using the '+' tag. 2013-04-14 19:44:32 +09:30
Fergus Dall 1c1bed274f Disarmed crossbow traps now only drop one bolt 2013-04-14 19:03:32 +09:30
Fergus Dall 06f9c0f8bf Triggering crossbow traps now gives only one bolt.
map::spawn_item() will now correctly set charges for single objects.
2013-04-14 18:58:42 +09:30
Fergus Dall 52f7e4546b Dissarming a crossbow trap will drop crossbow bolts. 2013-04-14 18:16:05 +09:30
Eric Ng(ZwodahS) 1033e45a55 SIGN OFF 2013-04-14 16:21:58 +08:00
Fergus Dall 43eeae6936 Attempt at making the construction menu more readable.
See issue #462
2013-04-14 16:45:36 +09:30
Fergus Dall 90876a43dc Make foods in containers use their own age to show rotteness, not
the age of the containter. Fixes #491
2013-04-14 15:46:55 +09:30
Kevin Granade f87921a761 A bunch of Changelog entries. 2013-04-13 23:39:31 -05:00
Fergus Dall 9f00b8b960 Fixed bug in construction menu 2013-04-14 12:06:39 +09:30
Fergus Dall b53a33b2b8 Addictions can be configured in professions.json 2013-04-14 11:48:42 +09:30
Kevin Granade 56bc3fb1ea Merge pull request #487 from fergus-dall/torch-light
It is now possible to read using a torch
2013-04-13 18:46:13 -07:00
Kevin Granade 50f2c1f1ef Add duct tape as an option to spear recipes, thanks Jihelu. 2013-04-13 20:45:05 -05:00
ethankaminski c6b23f8900 Add a craftable item mod that doubles battery capacity of tools
You can learn the "extra battery mod" recipe from "What is a Transistor?" and "Advanced Electronics". Requires Electronics 3+ to learn.
2013-04-14 13:44:03 +12:00
Kevin Granade 7f99a4f03e Make old wood spear recipe into pointy stick recipe, add a more advanced recipe for wooden spear, and tweak javelin recipe. 2013-04-13 20:27:50 -05:00
Kevin Granade ca9269b66d Add pointy stick as a more basic wood spear. 2013-04-13 20:27:02 -05:00
ethankaminski 8b582a6797 Recipes can be learned from books now 2013-04-14 12:54:57 +12:00
Kevin Granade 55dbb14262 Display when skills are rusting. 2013-04-13 19:22:12 -05:00
Kevin Granade ca1af0d0b1 Set skill last practiced value to game start by default. 2013-04-13 19:20:39 -05:00
Kevin Granade 941899e366 Factor out algorithm for determining skill rust rate. 2013-04-13 19:19:47 -05:00
Fergus Dall 64ec817803 It is now possible to read using a torch 2013-04-14 09:04:58 +09:30
Kevin Granade 371736daae Rafactor weapon type skill advancement to be more concise. 2013-04-13 16:32:44 -05:00
Kevin Granade 1b4af36ea2 Merge Melee practice and message tweaks. 2013-04-13 14:53:15 -05:00
Kevin Granade b704ae5da1 Merge Motercycles now spawn with motercycle wheels. 2013-04-13 14:47:39 -05:00
Kevin Granade 529097d57a Merge pull request #480 from ethankaminski/prof-tailor
New profession: Tailor
2013-04-13 12:39:13 -07:00
Kevin Granade f138dada12 Merge pull request #485 from daftfad/master
license signoff
2013-04-13 12:38:15 -07:00
Paul R 5b734ebb57 daftfad signoff 2013-04-13 14:06:17 -04:00
origamiwolf 03d961758f Adjusted order of melee practice 2013-04-14 00:57:14 +08:00
origamiwolf 08429eb222 Melee verb depends on type of weapon instead of damage type 2013-04-14 00:39:11 +08:00
origamiwolf a5db6af0d7 Adjusted conditions for cutting and stabbing skill practice 2013-04-14 00:08:32 +08:00
Kevin Granade 790f181b62 Merge Fixed some compiler warnings. 2013-04-13 10:58:16 -05:00
Kevin Granade 0ab1fb13cf Merge Cleaned up the construction menu and fixed a couple of bugs. 2013-04-13 10:56:57 -05:00
Kevin Granade b936e46459 Merge Waters quench more. Closes #447. 2013-04-13 10:54:10 -05:00
Kevin Granade f31be642f0 Merge Death by starvation thirst. Closes #472. 2013-04-13 10:52:46 -05:00
Kevin Granade 818a7248a8 Merge Frank Huard's signoff.
Conflicts:
	SIGNOFF
2013-04-13 10:51:17 -05:00
Kevin Granade b7edd4a572 Merge oragamiwolf signoff.
Conflicts:
	SIGNOFF
2013-04-13 10:50:31 -05:00
Kevin Granade 6a54ff6e16 Reverse erroneous attempt to prevent premature skill rust by setting lastPracticed in the future. 2013-04-13 10:47:11 -05:00
Kevin Granade 81b5f63355 Merge Fix rust so it doesn't happen the same turn you practice. 2013-04-13 10:45:22 -05:00
Kevin Granade e81c029888 Merge Fix some missing tools/components from recipes. 2013-04-13 10:40:43 -05:00
Kevin Granade 2d63545383 Merge Added .22 casings into dda-master 2013-04-13 10:38:45 -05:00
Fergus Dall e01060baa8 Fixed some compiler warnings 2013-04-13 22:50:34 +09:30
Fergus Dall 9690a5c418 Golf carts now spawn with small wheels, not normal ones 2013-04-13 22:15:52 +09:30
Fergus Dall 661217f26f Scooters now spawn with motercycle wheels 2013-04-13 22:15:22 +09:30
Fergus Dall 31fdb9d0e3 Motercycles now spawn with motercycle wheels.
Fixes #481
2013-04-13 21:25:46 +09:30
TheDarklingWolf 9c0c359227 Signoff. 2013-04-13 12:03:34 +01:00
ethankaminski 56f567505d New profession: tailor
Thanks to sodapop on the forums for a good, easy-to-implement idea.
2013-04-13 22:51:41 +12:00
Fergus Dall 50e9318c15 Fixed a typo 2013-04-13 20:14:01 +09:30
veryinky 4e525a45a4 signoff 2013-04-13 06:28:09 -04:00
origamiwolf 24207440aa Signoff. 2013-04-13 18:23:48 +08:00
Fergus Dall 6f368c12c6 Cleaned up the construction loop 2013-04-13 19:51:47 +09:30
veryinky 3d3dc16c70 Waters quench more. Closes #447 2013-04-13 06:19:24 -04:00
Fergus Dall 96d5c727b0 'B' will no longer exit the crafting menu 2013-04-13 19:46:04 +09:30
Fergus Dall bea3acb963 Stopped 'k' from being treated the same as '\n' on the construction menu 2013-04-13 19:36:22 +09:30
veryinky 65c633bd74 Death by starvation thirst 2013-04-13 06:03:22 -04:00
ethankaminski 78c6a3f18f Fix rust so it doesn't happen the same turn you practice 2013-04-13 21:23:16 +12:00
ethankaminski 780652f51e Fix some missing tools/components from recipes 2013-04-13 20:48:45 +12:00
Skyrunner 507b24e26c Revert "Changed makefile to use -std=c++0x. Also changed a compatibility issue in game.h"
This reverts commit dc6671c110.
2013-04-13 17:35:02 +09:00
Skyrunner 9f308335f3 Revert "Changed RNG to use STD's <random>, with std::default_random_engine."
This reverts commit c9641f2a9d.
2013-04-13 17:34:48 +09:00
Skyrunner 8e0d43a546 Revert "RNG namespace made. Only has normal function and the generator "gen"."
This reverts commit 5a0f485374.
2013-04-13 17:34:29 +09:00
Kevin Granade 1cc14d602c Merge pull request #472 from veryinky/minmove25
Set minimum move to 25
2013-04-12 22:17:12 -07:00
GlyphGryph 128cd2f0e4 Renamed Item_manager to Item_factory, removed extraneous typedefs, cleaned up some details. 2013-04-13 00:49:11 -04:00
GlyphGryph e541e51288 Mapgen now spawns using the item factory. Re-added accidently removed line that loaded in existing items from item file. 2013-04-13 00:19:12 -04:00
Kevin Granade 956b37f773 Calculate indoor-ness of a square based on terrain flag instead of terrain identity. 2013-04-12 23:09:08 -05:00
Kevin Granade 2e95b66094 Add indoor terrain flag and apply it to appropriate terrain. 2013-04-12 23:08:26 -05:00
veryinky 8178e569bd Set minimum move to 25 2013-04-12 22:47:43 -04:00
GlyphGryph 90e57f1dae A bit of clean up. Fixed some warnings, removed an unused method. 2013-04-12 22:16:32 -04:00
GlyphGryph 6a82abe713 Merge branch 'master' into add_item_manager
Conflicts:
	game.cpp
	mapgen.cpp
2013-04-12 21:33:51 -04:00
GlyphGryph 5c2ff4d8b8 Added reading in of item groups from group definition files. 2013-04-12 21:30:31 -04:00
Kevin Granade 710439ad03 Sign contributor statement releasing my contributions under CC-BY-SA. 2013-04-12 19:37:35 -05:00
Kevin Granade 5e0774d595 Add a signoff statement to the repository for developers to digitally sign. 2013-04-12 19:36:36 -05:00
Kevin Granade 2bbdd5f4b1 Base hardcore trait and slowdown from leg damage on percent of max hp instead of absolute values. 2013-04-12 19:28:55 -05:00
Kevin Granade 0dc7d00cc9 Merge remote-tracking branch 'dda/pr/464' into dda-master 2013-04-12 18:12:16 -05:00
Kevin Granade af8e413d7d Whitespace cleanup. 2013-04-12 18:06:54 -05:00
Kevin Granade e918f15f51 Merge remote-tracking branch 'dda/pr/425' into dda-master
Conflicts:
	crafting.cpp
2013-04-12 17:56:44 -05:00
Skyrunner 5a0f485374 RNG namespace made. Only has normal function and the generator "gen".
Gen is seeded in main, directly after "seed = time(0)".
2013-04-13 00:30:18 +09:00
Skyrunner c9641f2a9d Changed RNG to use STD's <random>, with std::default_random_engine.
The RNG functions now use uniform int distribution and uniform real distribution.
2013-04-13 00:20:53 +09:00
Skyrunner dc6671c110 Changed makefile to use -std=c++0x. Also changed a compatibility issue in game.h 2013-04-13 00:04:54 +09:00
Kyratzes Talvadore f5a4b5b010 Merge pull request #466 from ZwodahS/master
added recraft and advinv to default keymap.txt
2013-04-12 06:14:49 -07:00
veryinky e5f8ecadae Fix to hardcore for leg hp & movecost 2013-04-12 05:36:25 -04:00
Eric Ng(ZwodahS) a753dbfe36 added advinv and recraft to the default keymap file 2013-04-12 16:37:34 +08:00
veryinky 7d24f45e6e Added .22 casings 2013-04-12 04:36:36 -04:00
veryinky 6f86400737 New Hardcore -60 hp chargen trait 2013-04-12 03:09:04 -04:00
Kevin Granade bb42924b3c Merge learning recipes from item disassembly. 2013-04-11 21:55:06 -05:00
Kevin Granade b8b5335e43 Merge pull request #463 from veryinky/cbpmapgenformat
cbp file update for latest pulls
2013-04-11 19:54:35 -07:00
veryinky 1b7645c11e cbp file update for latest pulls 2013-04-11 22:30:58 -04:00
Kevin Granade b26da9ae82 Merge pull request #460 from veryinky/sewissue355
fix for -1 charge sewkits Closes #355
2013-04-11 19:15:49 -07:00
ethankaminski 11e88402e3 Re-enable flashlight recipe autolearn, and make UPS learn-by-disassembly (level 4) 2013-04-12 14:14:31 +12:00
Kevin Granade 153765e3d5 Merge pull request #458 from veryinky/bulletinfix
Fix for bulletin boards. Closes #443
2013-04-11 19:13:58 -07:00
ethankaminski 03e4176618 Add in learn-by-disassembly for recipes
Note: breaks saves and probably templates. Adding more recipes won't break saves, and adding new ways to learn recipes also won't break saves.
2013-04-12 14:08:29 +12:00
ethankaminski 4645695fdd Merge branch 'master' into crafting 2013-04-12 13:56:11 +12:00
Kevin Granade d2804adc96 Merge helper functions for easier static map feature generation. 2013-04-11 20:50:15 -05:00
Kevin Granade f9ba079c85 Merge Recipe code refactor and json-ification of recipes. 2013-04-11 20:49:12 -05:00
veryinky 025768538b fix for -1 charge sewkits Closes #355 2013-04-11 20:35:18 -04:00
Kyratzes Talvadore d7322153aa Merge pull request #459 from veryinky/weatherwarn
fixed warnings for weather and fixed keybind clearline
2013-04-11 17:23:56 -07:00
veryinky 61fb34181f fixed for weather and help 2013-04-11 20:18:15 -04:00
ethankaminski f142e4582d Add unique string identifiers to each recipe 2013-04-12 12:15:33 +12:00
veryinky 9abbbe6265 Fix for bulletin boards. Closes #443 2013-04-11 19:53:02 -04:00
veryinky 1f786288d2 Fix for bulletin boards. Closes #443 2013-04-11 19:33:08 -04:00
Kyratzes Talvadore 4b9c82aef4 Merge pull request #457 from veryinky/nokitchenunitspawn
Removed kitchen units from garage spawn list
2013-04-11 16:19:56 -07:00
Kyratzes Talvadore 08b6d7b43d Merge pull request #455 from veryinky/issue450
roadmap now paper|null
2013-04-11 16:18:57 -07:00
Kyratzes Talvadore 56aec1d572 Merge pull request #454 from veryinky/acidfix
Acid rain causes pain not injury
2013-04-11 16:18:41 -07:00
Kyratzes Talvadore 4d63b52b94 Merge pull request #456 from veryinky/viewmoralekeyfix
Changed default viewmorale key to v
2013-04-11 16:18:28 -07:00
veryinky 4b6cd52dbf Removed kitchen units from garage spawn list 2013-04-11 18:58:48 -04:00
veryinky cb8d101d8d Changed default viewmorale key to v 2013-04-11 18:54:32 -04:00
veryinky f612e678d8 roadmap now paper|null 2013-04-11 18:29:45 -04:00
veryinky 4371287a65 Acid rain causes pain not injury 2013-04-11 18:21:05 -04:00
maseck 9b1196341e Added back the rotate call I that got removed
Derr.
2013-04-11 16:33:48 -04:00
maseck f2a0fd2de1 Added formatted writes for Map Generation.
Provides a formatted_set_terrain method. Also added helper.cpp to the
cbp file.
2013-04-11 15:33:16 -04:00
ethankaminski fffbd401bd Push recipes out to JSON
Yeesh, this was gnarly. picojson is annoying to work with (especially if you're doing error-checking), and that was a lot of recipes. Perl recipe2json script available upon request, assuming I haven't deleted it.
2013-04-11 22:10:58 +12:00
Kevin Granade e577ea5196 Only rust if X turns have passed since practice, not every x turns. 2013-04-11 01:35:10 -05:00
Kevin Granade 7c3bdcbcb9 Halve rate of skill rust across the board. 2013-04-11 01:34:40 -05:00
Kevin Granade ff1e899a30 Only risk discharging bio_mem if options would allow skill rust. 2013-04-11 01:33:51 -05:00
Kevin Granade 5ef35157af Fix longstanding skill rust bugs. 2013-04-11 01:33:10 -05:00
Kevin Granade 15a3a00501 Pull skill rust logic into skill class. 2013-04-11 00:37:46 -05:00
Kevin Granade 8ce04d82be Set last practiced timestamp when practicing skill. 2013-04-10 22:54:18 -05:00
ethankaminski 5ed1e1323c Fix recipe filter 2013-04-11 15:28:20 +12:00
ethankaminski 0c9af0172d Let recipes be non-autolearned
First pass at making learned vs. automatic recipes. Also fixes a bug where you could use the search function to gain access to noncraftable recipes (i.e., recipes meant only for disassembly).
2013-04-11 15:17:18 +12:00
Kevin Granade 69a7583a30 Add lastPracticed member to SkillLevel class. 2013-04-10 21:09:00 -05:00
Kevin Granade e011dd4a37 Add anti-multiple-inclusion wrapper to calendar.h 2013-04-10 20:48:50 -05:00
Kevin Granade 92a07d19ba Remove a warning by fully parenthesizing a logic operation. 2013-04-10 19:49:04 -05:00
Kevin Granade 387e3a73f1 Cleanup trailing whitespace. 2013-04-10 19:48:28 -05:00
Kevin Granade 23307443f3 Merge remote-tracking branch 'dda/pr/441' into dda-master 2013-04-10 19:39:39 -05:00
Eric Ng(ZwodahS) 8c0aefb52f allow 2 different square to be view side by side 2013-04-11 02:59:13 +08:00
veryinky c7b8a3544e Fix for negative hand encumb 2013-04-10 01:44:31 -04:00
ethankaminski 823fad701a Minor cleanup (linebreaks, remove unused variable) 2013-04-10 15:55:20 +12:00
ethankaminski 4254294d06 Remove now-unused craft_cat member from recipe struct 2013-04-10 15:53:41 +12:00
ethankaminski 5a987c407b Change master recipe data structure - organized by category now 2013-04-10 15:43:28 +12:00
Eric Ng(ZwodahS) 5a8ae2719e Merge branch 'base' 2013-04-10 10:52:17 +08:00
Eric Ng(ZwodahS) 4d83c56bf3 bug fixes 2013-04-10 10:51:51 +08:00
Eric Ng(ZwodahS) 47037471c0 bug fix: item do not disappear when using [e] 2013-04-10 10:46:57 +08:00
Kevin Granade c6323c497d Changed pickled to canned since I'm an inveterate pedant. 2013-04-09 20:50:13 -05:00
Kevin Granade 0cd6dd8a34 Merge Pickling/canning into dda-master 2013-04-09 20:19:20 -05:00
Kevin Granade 16868d3424 Only display Masochist morale condition if there is a masochism bonus. 2013-04-09 19:35:15 -05:00
Kevin Granade f21fe182bd Merge Display player feat morale boosts into dda-master 2013-04-09 19:34:10 -05:00
Kevin Granade 4ccb96cfdd Merge remote-tracking branch 'dda/master' into dda-master 2013-04-09 19:24:21 -05:00
jwo7777777 756070a34a Pickling/canning - using glass bottles, sheet metal, food, and fire ... and tools
This commit has three recipes as a starter.  Basic idea is to let the
player CRAFT a TOOL that is a sealed jar containing a comestible.  Then
the tool is activated, turning it into a glass bottle containing
spoilable food inside.  Until activated, the sealed jar is preserved
forever.
To add recipes, add a non-reversible RECIPE("jar_something",
CC_FOOD,......     then add two itypes  TOOL("jar_something", ......
&iuse::dejar, ....)  and FOOD("something",...........).  The iuse::dejar
function will transform the sealed jar into the container with the food.
note: probably won't handle paper wrappers.
2013-04-09 18:25:06 -05:00
Eric Ng(ZwodahS) 6185322415 fix ui 2013-04-09 23:18:48 +08:00
Eric Ng(ZwodahS) 259450b6d2 fix bug, inverted the numbering 2013-04-09 23:14:17 +08:00
Eric Ng(ZwodahS) 8839361610 fix a bug that crash the game when moving items in empty list 2013-04-09 21:26:08 +08:00
Eric Ng(ZwodahS) e6f9bc1e9e Added an advanced inventory management function 2013-04-09 17:44:48 +08:00
veryinky 2a2e09f592 Display player feat morale boosts 2013-04-09 05:39:19 -04:00
Eric Ng(ZwodahS) e81766387b basic functionality done 2013-04-09 14:08:06 +08:00
Eric Ng(ZwodahS) 59febd4ad6 temporary commit to merge code from base 2013-04-09 11:28:32 +08:00
Matt Ammann 8933256fe1 Merge remote-tracking branch 'upstream/master' into phases
Conflicts:
	player.cpp
2013-04-08 22:32:51 -04:00
GlyphGryph 2dde93b067 Added a file for group definitions, and the ability to read them in and use them. 2013-04-08 22:22:21 -04:00
Kevin Granade f97606e06b Merge pull request #434 from ethankaminski/interface
Item interface improvements, rewrite of hairy game::list_items() function
2013-04-08 19:14:22 -07:00
Kevin Granade 7347d6c0b4 Cleanup some trailing whitespace. 2013-04-08 21:13:28 -05:00
GlyphGryph 5fbbab5567 Added the Item_group class, and related subclasses, for handling grouping items with frequencies. 2013-04-08 21:48:19 -04:00
Kevin Granade 7fbb6554e4 Merge remote-tracking branch 'dda/pr/434' into dda-master 2013-04-08 20:45:50 -05:00
Kevin Granade e64fdc4381 Merge pull request #435 from origamiwolf/CDDA-heatingelement
Heating elements now obtainable from disassembling solder irons
2013-04-08 18:38:35 -07:00
Kevin Granade c2c3b24b12 Merge pull request #433 from fergus-dall/lighting-fix
Draw lit areas outside of LOS and normal sight radius the same as unlit areas
2013-04-08 18:37:50 -07:00
Kevin Granade cf1b542511 Merge items that won't take damage from a small fire can no longer be used to start fires into dda-master 2013-04-08 20:36:06 -05:00
Kevin Granade 95bf0f46c8 Merge remote-tracking branch 'dda/pr/430' into dda-master 2013-04-08 20:25:43 -05:00
Kevin Granade 1ca9a88224 Rework fire handling to streamline using multiple fire sources to light items. 2013-04-08 20:21:27 -05:00
Kevin Granade eb74d17ffb Const some player methods. 2013-04-08 20:21:26 -05:00
ethankaminski 29e6b4715c Make map::generate_lightmap use has_flags for light source items 2013-04-08 20:21:26 -05:00
ethankaminski 5b9602a745 Make lots of item methods const 2013-04-08 20:21:26 -05:00
Matt Ammann 3354255b5a Fixed bracket issue caused by merge conflict 2013-04-08 20:05:45 -04:00
Matt Ammann 128f30d28a Fixed crafting of drinks 2013-04-08 13:57:53 -04:00
Matt Ammann 1e469829c6 Fixed typo 2013-04-08 10:01:35 -04:00
Matt Ammann aa04172ac7 Merge remote-tracking branch 'upstream/master' into phases
Conflicts:
	player.cpp
2013-04-08 09:56:41 -04:00
origamiwolf 95ed637ef4 Heating elements now obtainable from disassembling solder irons 2013-04-08 20:56:49 +08:00
ethankaminski 054878d127 Make item examination window better, when looking at nearby items 2013-04-08 22:31:54 +12:00
ethankaminski f3f4cad530 Tell the player when their gear is damaged in combat 2013-04-08 22:18:50 +12:00
ethankaminski b55185b114 Add examine capability to nearby item list 2013-04-08 22:15:15 +12:00
Fergus Dall e70b3de26a Draw lit areas outside of LOS and normal sight radius the same as unlit areas 2013-04-08 19:02:59 +09:30
ethankaminski 184ee41860 Make reset flag not be the same variable as user input 2013-04-08 21:23:22 +12:00
ethankaminski cc46377dbb Split off more code into its own function, for readability/modularity 2013-04-08 21:21:50 +12:00
ethankaminski b1d7220ce7 Update some comments in game::list_items() 2013-04-08 20:43:05 +12:00
ethankaminski 60ca9b336c Move path-to-square drawing code into its own function 2013-04-08 20:41:19 +12:00
ethankaminski 8a48779047 Leave a comment that filter behavior doesn't quite match the text 2013-04-08 19:49:26 +12:00
ethankaminski 0838e39b38 Make item filters persistent again 2013-04-08 19:47:31 +12:00
ethankaminski f6ec8bb16b Split off filter-asking code into its own function, from game::list_items() 2013-04-08 19:44:20 +12:00
ethankaminski 2ac0add305 Update indentation/brace style of game::list_items()
Did the style update as a separate commit so that diffs are meaningful.
2013-04-08 19:07:38 +12:00
ethankaminski 62fa68ef43 Make data structure sane, speed up loop in game::list_items
Replaced a scary triple-nested std::map with a vector. Moved filter-applying code to only happen when the filter is changed (rather than after every draw). General cleanup.
2013-04-08 18:45:56 +12:00
Fergus Dall f991d2c14f Items that won't take damage from a small fire can no longer be used to start
fires.
2013-04-08 15:16:44 +09:30
ethankaminski 763186cb8e Add some comments to game::list_items, to make it less incomprehensible 2013-04-08 17:13:42 +12:00
ethankaminski 5fc316e275 Add a virtual destructor to a polymorphic struct that really should have one 2013-04-08 15:58:44 +12:00
Kevin Granade 652ed6cf01 Merge pull request #428 from veryinky/master
More things can be used as lighters
2013-04-07 20:50:34 -07:00
Kevin Granade 1baa560d27 Merge pull request #427 from ethankaminski/bionic-cleanup
Clean up some bionics issues
2013-04-07 20:44:50 -07:00
Kevin Granade 45bdb24cfe Remove unused t parameter from game::u_see(). 2013-04-07 22:36:48 -05:00
veryinky 13b53cac38 Merge branch 'master' of git://github.com/TheDarklingWolf/Cataclysm-DDA 2013-04-07 21:07:53 -04:00
ethankaminski a1bb155612 Make it possible to cancel CBM: Power Storage installation 2013-04-08 13:05:46 +12:00
ethankaminski f962ce139a Fix copy-paste errors (only affects Android trait chargen?) 2013-04-08 13:01:34 +12:00
veryinky 585ee75769 More items can be used as lighters 2013-04-07 20:59:14 -04:00
ethankaminski bf44765446 Fix bionic descriptions (no more leading spaces!) 2013-04-08 12:58:18 +12:00
Kevin Granade 09d5e1dcf0 Auto-size weather_data array instead of specifying the size. 2013-04-07 19:26:05 -05:00
Kevin Granade c39d925b7e Return NULL in profession lookup method instead of nothing. 2013-04-07 19:25:02 -05:00
Kevin Granade 7508fdeef9 Const some more map methods. 2013-04-07 19:25:01 -05:00
Kevin Granade c5bcd48104 Nuke commented out source code. 2013-04-07 19:25:01 -05:00
Matt Ammann 31c794ecd7 Separated phases of matter from materials 2013-04-07 18:15:11 -04:00
saTo d00da29a4f Merge branch 'master' of https://github.com/TheDarklingWolf/Cataclysm-DDA 2013-04-07 23:41:23 +02:00
TheDarklingWolf 0437a6a1da Update Changelog 2013-04-07 21:11:02 +01:00
TheDarklingWolf 8ffd80bc3c Fix an issue in iexamine.cpp 2013-04-07 21:06:18 +01:00
TheDarklingWolf 8161d5e05c Remove iexamine::tent from canvas walls. 2013-04-07 19:31:50 +01:00
TheDarklingWolf 0d0c76ddc1 Fix non fittable clothing not being possible to reinforce. 2013-04-07 18:46:14 +01:00
TheDarklingWolf 78f5684d99 Merge branch 'master' of https://github.com/TheDarklingWolf/Cataclysm-DDA 2013-04-07 13:25:07 +01:00
TheDarklingWolf 3b29b27771 Added option to wish for an item in its container to the wish menu. Thanks to jwo(lotsofsevens) for the idea. Closes #415 2013-04-07 13:23:19 +01:00
Kevin Granade db84695991 Set vehicle interiours to inside, not outside. 2013-04-07 00:00:15 -05:00
Kevin Granade de34f5b77c Rebuild map cache after a map update. 2013-04-06 23:59:45 -05:00
Kevin Granade 696a172d0a Make ammunition explode instead of merely burning. 2013-04-06 23:59:16 -05:00
Kevin Granade a639ccbe28 Merge remote-tracking branch 'dda/pr/406' into dda-master 2013-04-06 21:11:32 -05:00
GlyphGryph 63b22b823d Added actual item creation methods to the manager. 2013-04-06 18:48:37 -04:00
Kyratzes Talvadore 787201a31e Merge pull request #411 from Voker57/tweaks
Make Aero-evaporator produce 'clean water' (instead of clean 'water')
2013-04-06 11:31:43 -07:00
TheDarklingWolf ff56b067c4 Chitinous guantlets are no longer hats. Closes #413 2013-04-06 19:30:45 +01:00
Voker57 d93650de66 Make Aero-evaporator produce 'clean water' (instead of clean 'water') 2013-04-06 20:25:19 +04:00
TheDarklingWolf 1ca87176c4 Merge branch 'master' of https://github.com/TheDarklingWolf/Cataclysm-DDA 2013-04-06 12:50:01 +01:00
TheDarklingWolf a82df535fa Fitted clothing can be reinforced. Closes #410 2013-04-06 12:48:26 +01:00
aspolito 01b7ecc18b use_if_avail 2013-04-05 21:30:35 -07:00
Kevin Granade 197e609124 Perform correct inventory bounds checking. 2013-04-05 22:29:09 -05:00
Kevin Granade 545dc8bbbc Merge pull request #404 from ethankaminski/elec-crafts
Add lightstrip and noise emitter (new electronics crafts)
2013-04-05 19:58:30 -07:00
GlyphGryph 4fc2a470f5 Merge branch 'master' into add_item_manager 2013-04-05 22:56:40 -04:00
GlyphGryph 354dddc705 Expanded the item loading system to handle materials as well, and added a melee file with a HATCHET. 2013-04-05 22:55:20 -04:00
Kevin Granade 01da9c940f Merge pull request #405 from ethankaminski/shocker-drop-fix
Fix shocker drops, rename Internal Battery to Power Storage
2013-04-05 18:57:46 -07:00
ethankaminski 817344154c Fix shocker drops, rename Internal Battery to Power Storage
So, apparently shocker zombies were supposed to drop CBMs that boost internal power storage. Making reality line up with intention :).

Also, why do we have bio_battery and bio_batteries? Renaming the former to bio_power_storage.
2013-04-06 14:33:39 +13:00
Kevin Granade 1c558a9c0d Remove ~ from list of inventory keys as it's not readily available on spanish keyboards. 2013-04-05 20:01:12 -05:00
ethankaminski e95c9aa28d Add lightstrips as a 0-level electronics craft
Meant to last for about 5 days on 15 charges of batteries, and provide 1 light. Not able to be deactivated, but can be disassembled once dead.
2013-04-06 13:59:49 +13:00
Kevin Granade 62737a7950 Adjust help test on guns to include firing modes. 2013-04-05 19:43:50 -05:00
Kevin Granade 43693bbae7 Disassemble some obsolete caching code, slight performance increase. 2013-04-05 18:35:37 -05:00
Kevin Granade baf791b5d3 Fix up ordering of body parts in character screen. 2013-04-05 17:56:49 -05:00
Kevin Granade cd615422bb Merge remote-tracking branch 'dda/pr/402' into fix-history 2013-04-05 17:36:28 -05:00
Kevin Granade cae16d32b1 Return a copy of a ter_id instead of a reference to avoid crashing. 2013-04-05 17:21:06 -05:00
ethankaminski 95620911c0 Add noise emitter as a new electronics craft
Noise emitter: meant to draw zombies to a given location. Uses 1 battery/turn.
2013-04-06 11:07:07 +13:00
ethankaminski 40d9591981 Fix up ordering of body parts in character screen 2013-04-06 10:37:50 +13:00
ethankaminski d7bf561fad Fix tab display after starting a new preset/random character 2013-04-06 10:21:55 +13:00
Voker57 7c2a6beed4 Option to set number of days in season 2013-04-05 23:14:19 +04:00
TheDarklingWolf acb0fa8425 Clothing can now be made fitted using a sewing kit. 2013-04-05 17:36:38 +01:00
TheDarklingWolf c9aca9e2dc Merge branch 'master' of https://github.com/TheDarklingWolf/Cataclysm-DDA 2013-04-05 17:24:08 +01:00
TheDarklingWolf 2d8e2a2088 Bandages & First aid no longer display uninjured body parts (This is purely visual, still WIP) 2013-04-05 17:23:41 +01:00
Kyratzes Talvadore 2e5906ef0c Merge pull request #399 from origamiwolf/CDDA-itemflag
Using IF_VARSIZE and IF_FIT flags to generate fitted clothing
2013-04-05 09:23:27 -07:00
origamiwolf 6cbf21e7fe Item description shows clothing fit status 2013-04-05 23:37:12 +08:00
origamiwolf a6dbb75cce Crafted clothing comes fitted 2013-04-05 23:37:08 +08:00
origamiwolf 4cc6ae7edd Remove fitted items, added IF_VARSIZE flags to fittable clothing
Updated to new profession code.
2013-04-05 23:37:02 +08:00
origamiwolf 0979d8c71e Use IF_FIT flag to determine encumbrance reductions 2013-04-05 23:36:57 +08:00
origamiwolf 57868c74bc Added random fitted clothing generation in add_item 2013-04-05 23:36:52 +08:00
origamiwolf a3abd5bcc6 Added flags for sized and fitted clothing 2013-04-05 23:36:48 +08:00
Kevin Granade 00cdb03cea Final cleanup after rewriting history to remove erronaeous merge of mass-update of code style. 2013-04-05 08:46:14 -05:00
ethankaminski 4d1bba8bbe Re-add pocket knife and matches as all-profession starter gear 2013-04-05 08:43:32 -05:00
Matthew Ammann c733e4b9af Spelling and grammar fixes in item descriptions 2013-04-05 08:41:29 -05:00
jason.gilbert@nbed.nb.ca 9e47869388 Added messages to main screen about cold body parts
Conflicts:

	player.cpp
2013-04-05 08:37:36 -05:00
jason.gilbert@nbed.nb.ca cf96d030a9 Updated cold messages 2013-04-05 08:35:46 -05:00
jason.gilbert@nbed.nb.ca ece990ec01 Update changelog
Conflicts:

	data/changelog.txt
2013-04-05 08:35:19 -05:00
ethankaminski c533fcf832 Fix indent/missing brace issue. 2013-04-05 08:34:11 -05:00
ethankaminski 07b34d7ef2 Make the large new function conform to indent style 2013-04-05 08:34:11 -05:00
ethankaminski 82e243c07f Make new files conform to indentation standard 2013-04-05 08:34:11 -05:00
jason.gilbert@nbed.nb.ca 7daae41cf4 Added detail and polish to the warmth colors in the @ menu 2013-04-05 08:34:11 -05:00
jason.gilbert@nbed.nb.ca 9d6d2f24c4 Uncommented body equalization code 2013-04-05 08:34:11 -05:00
jason.gilbert@nbed.nb.ca 5656841982 Fixed blood loss code
Conflicts:

	player.cpp
2013-04-05 08:33:46 -05:00
ethankaminski c76a403b55 Actually check that we've got the points for our profession 2013-04-05 08:33:00 -05:00
ethankaminski 5c112e1480 Give the player an ordered profession list during chargen 2013-04-05 08:33:00 -05:00
ethankaminski 17ae49dd4a Make removing professions emit a warning, not crash 2013-04-05 08:33:00 -05:00
ethankaminski 7d9689028f Actually give mechanic profession books. Also, bump it to 2 points.
Conflicts:

	data/raw/professions.json
2013-04-05 08:32:46 -05:00
ethankaminski a339407086 Add professions to character creation, affecting starter gear
Profession code based in part on skill code. Breaks save files and templates, but as currently written, adding new professions does not break compatibility.

Also add 4 sample professions: Unemployed (unchanged from current), Lab Technician (starts with labwear), Nudist (starts with nothing, -1 point cost), Wannabe Mechanic (starts with toolbelt, wrench, some books).

Conflicts:

	data/raw/professions.json
	newcharacter.cpp
2013-04-05 08:30:51 -05:00
Shoes01 ad3de43e6a Added cold mouth and hot mouth DIs 2013-04-05 08:28:15 -05:00
jason.gilbert@nbed.nb.ca ece782625a Init'd temp_conv, and removed blood loss (not working) 2013-04-05 08:28:15 -05:00
jason.gilbert@nbed.nb.ca 2f8d827c8e Update changelog
Conflicts:

	data/changelog.txt
2013-04-05 08:27:55 -05:00
jason.gilbert@nbed.nb.ca 4b46b78be8 Minor frostbite fix regarding pain 2013-04-05 08:27:18 -05:00
jason.gilbert@nbed.nb.ca f56ae59586 Encum screen now colors warmth values for body parts if they are adequate 2013-04-05 08:27:18 -05:00
jason.gilbert@nbed.nb.ca 1d8805f3fa Remaining hp affects body temp. Fixed bio_climate name 2013-04-05 08:27:18 -05:00
jason.gilbert@nbed.nb.ca 5bfa00de3f Fixed body temp not warming up. Cleaned up.
Conflicts:

	data/changelog.txt
2013-04-05 08:26:58 -05:00
jason.gilbert@nbed.nb.ca 9c5677b5f5 Fixed body temperature equalization, cleaned up code 2013-04-05 08:23:58 -05:00
jason.gilbert@nbed.nb.ca 2bb67b30a6 Rate of heat loss increases for torso/head, and if in water/sewage 2013-04-05 08:23:58 -05:00
jason.gilbert@nbed.nb.ca b2c9ec1577 Bodyheat now tied to hp 2013-04-05 08:23:58 -05:00
jason.gilbert@nbed.nb.ca 65bb5e001e WIP bodytemp equalization
Conflicts:

	player.cpp
2013-04-05 08:23:43 -05:00
jason.gilbert@nbed.nb.ca 85b1ebc033 Commented out body temperature equalization code; it was not working correctly 2013-04-05 08:21:50 -05:00
Shoes01 e7183e60a4 Common cold now lowers body temperature 2013-04-05 08:21:50 -05:00
Shoes01 a368fefb0f Update changelog
Conflicts:

	data/changelog.txt
2013-04-05 08:21:38 -05:00
Aapo 9ae5faad12 Couple of typos fixed 2013-04-05 16:05:33 +03:00
Kevin Granade 2041eee0a9 Indention foxups in construction recipes. 2013-04-04 23:55:39 -05:00
Kevin Granade 307db0d9e0 Allow finishing a window from any stage of construction. Thanks Vexification for reporting. 2013-04-04 23:55:39 -05:00
Kevin Granade d5883b5fb1 Convert writing accesses to map terain to use the new ter_set() method. 2013-04-04 23:55:39 -05:00
Kevin Granade 6a75336347 The payoff, qualify map::ter() as fully const. 2013-04-04 23:55:38 -05:00
Kevin Granade d3f0d9e289 Add write accessor to set terrain values. 2013-04-04 23:55:38 -05:00
jason.gilbert@nbed.nb.ca 8340844cd8 Reduced GUI clutter from bodytemp info
Conflicts:

	player.cpp
2013-04-04 23:55:14 -05:00
ethankaminski 2a0dfe1868 Remove nudist profession - was mostly an example of negative point value 2013-04-04 23:53:13 -05:00
ethankaminski 22d20a9cf8 Add Chain Smoker profession, and let professions give addictions
Conflicts:

	newcharacter.cpp
2013-04-04 23:52:49 -05:00
ethankaminski 483e0ff312 Re-add pocket knife and matches as all-profession starter gear
Conflicts:

	data/raw/professions.json
	newcharacter.cpp
2013-04-04 23:50:29 -05:00
Voker57 1f58f281c5 Fixed too complex books being possible even when depressed 2013-04-04 23:49:04 -05:00
Voker57 49f5e895ed Additional heat sources for javelins 2013-04-04 23:49:04 -05:00
Voker57 03ee927084 Added thread to wooden javelin recipe 2013-04-04 23:49:04 -05:00
Voker57 46831513b5 Typo fix 2013-04-04 23:49:04 -05:00
TheDarklingWolf 9262b40ae4 Added fences to iuse::hammer. Updated style. 2013-04-04 23:49:04 -05:00
TheDarklingWolf e4bc1b7c57 Made copbots blue. 2013-04-04 23:49:04 -05:00
TheDarklingWolf 6be0f9009e Added welding goggles to various recipes which require a welder. 2013-04-04 23:49:04 -05:00
TheDarklingWolf eff3d172ad Small typo fix in welding goggles. Added welding goggles to mechanics mapitem definition. 2013-04-04 23:49:04 -05:00
TheDarklingWolf 6c7d45cc16 You can no longer cauterize yourself if you are not bleeding or bitten. 2013-04-04 23:49:04 -05:00
Kyratzes Talvadore 5fd829aa52 Corrected readme email 2013-04-04 16:15:15 +02:00
Kyratzes Talvadore d5f89e5dc7 Merge pull request #379 from origamiwolf/CDDA
Fix container unloading.
2013-04-04 07:13:35 -07:00
TheDarklingWolf 504403e0ce Merge branch 'master' of https://github.com/TheDarklingWolf/Cataclysm-DDA 2013-04-04 15:09:52 +01:00
origamiwolf 90fc36b064 Fix container unloading. 2013-04-04 22:09:34 +08:00
TheDarklingWolf 49dc432d8f Fixed cutting rags/string in scissors and knives.
Made skewers 0 weight, increased amount generated by cutting wood with a knife.
Cutting wood with a knife no longer generates a splinter.
Reformatted iuse::scissors and iuse::knife as per style changes.
Modified CataclysmWin.cbp to output executable into project directory.
2013-04-04 15:06:22 +01:00
Kyratzes Talvadore 3e2e6fe7f8 Merge pull request #372 from ethankaminski/reload-fix
Make multiple types of ammo stop freaking out item examination
2013-04-04 05:12:16 -07:00
Kyratzes Talvadore 82fb42c93c Merge pull request #374 from ethankaminski/labcomputer-fix
Add missing numeric value to print statement of lab computers
2013-04-04 05:10:50 -07:00
GlyphGryph 9230700679 Symbol loading works properly, shuffled a few things around. 2013-04-04 07:52:04 -04:00
ethankaminski 7113766aa4 Add missing numeric value to print statement 2013-04-04 17:39:57 +13:00
Kevin Granade b67916f9cd Default to warnings on since they're manageable now. 2013-04-03 21:58:24 -05:00
Kevin Granade 2d77a2a3af Remove unused variable. 2013-04-03 21:57:55 -05:00
Kevin Granade 7fd45e85d0 Invoke player constructor from npc copy constructor. 2013-04-03 21:57:38 -05:00
Kevin Granade 009bd0458c Fully bracket to avoid ambiguity. 2013-04-03 21:57:02 -05:00
Kevin Granade dc35824b53 Rearange tileray struct initialization to make the compiler happy. 2013-04-03 21:46:33 -05:00
Kevin Granade 48c7e1fe2a Actually apply move penalty for getting a weapon stuck in a monster. 2013-04-03 21:46:00 -05:00
Kevin Granade 4c4f5e9f56 Fully bracket some expressions to avoid ambiguity. 2013-04-03 21:45:24 -05:00
Kevin Granade ef744c5525 Remove some unused variables. 2013-04-03 21:44:38 -05:00
Kevin Granade 7e1e43d186 Fully parenthesize logic statements. 2013-04-03 21:43:56 -05:00
Kevin Granade 4c0daa7b57 Warning cleanup. 2013-04-03 21:03:00 -05:00
Kevin Granade 5198b22302 Remove unused variables 2013-04-03 20:54:23 -05:00
Kevin Granade 293b61c714 Remove unused variable. 2013-04-03 20:51:12 -05:00
Kevin Granade 171f72276b Warning cleanup and style changes in game.cpp. 2013-04-03 20:47:42 -05:00
ethankaminski 59f3f4039f Make multiple types of ammo stop freaking out item examination
Whoops, introduced this bug with my action hinting code.
2013-04-04 14:33:09 +13:00
Kevin Granade c23e4aed6c Cleanup misc warnings in monmove.cpp 2013-04-03 19:25:48 -05:00
Kevin Granade 439a5fb9ed Misc warning cleanup in field.cpp. 2013-04-03 19:18:41 -05:00
Kevin Granade 8645051fab Rearange intialization order of parameters to make compiler happy. 2013-04-03 19:00:22 -05:00
Kevin Granade cfb9e3fe21 Remove unnecessary const qualifier. 2013-04-03 18:56:49 -05:00
GlyphGryph 8231ba3a06 Added ability for item manager to read in item from file and create it. 2013-04-03 19:54:28 -04:00
Soy 2a5fc534e0 Updated the cleanup to not save everything when it has already been saved. Pushes the cleanup npc's to the omap, removes them from the active list to prevent teleportation.
game::load now also runs update map, to correctly get all the inactive npcs.
Wish prompt has hint to search function added.
2013-04-03 20:28:26 +02:00
TheDarklingWolf d7cba9f752 Removed Herobr.. Grack. 2013-04-03 18:56:53 +01:00
TheDarklingWolf 518d9b5bc0 Fix waterskins holding more water than they should. Closes #367 2013-04-03 18:24:30 +01:00
TheDarklingWolf b04f1eb44a Added trail flag to 66mm, added (Currently not used) backblast flag to LAWs. 2013-04-03 16:49:07 +01:00
TheDarklingWolf 52c3ee670e Boot crafting and butcher knife cutting fixed. Closes #364 Closes #365 2013-04-03 14:46:12 +01:00
TheDarklingWolf 0afc96717a Added a suppresses smoke flag. 2013-04-03 11:18:42 +01:00
TheDarklingWolf f5f624027c Removed - from valid inventory characters. It's already used to wield nothing. 2013-04-03 09:27:07 +01:00
Kyratzes Talvadore 32f939e79b Merge pull request #363 from ethankaminski/chargen-tidy
Tidy up chargen finalization
2013-04-03 01:22:16 -07:00
ethankaminski 49f497ba40 Restoring a conditional that got dropped by the last commit 2013-04-03 21:19:45 +13:00
ethankaminski 257f787d7e Tidy up chargen finalization
Reduce messiness and - IMPORTANTLY - make it so characters can't go unnamed ("yes, waste points" -> "I want to give a name" started the game without naming the char).
2013-04-03 21:03:07 +13:00
GlyphGryph b9c2dae06a Changes to item_manager. Added consts where possible, some more randomized access options, and swapped the test in npc.cpp for one in mapgen.cpp
The new options allow you to draw either a random id or random template from a group tag. Also nested those properly to avoid code duplication.
The last bit was thanks to the fact that the number of npc bugs makes it ineffective as a test... and there's no way to see if it even works.
2013-04-03 00:14:29 -04:00
Kevin Granade 6c357fa2c9 Merge pull request #360 from veryinky/master
Woodstoves related changes + metal tank crafting.
2013-04-02 20:19:17 -07:00
veryinky 859aa2e8c2 Woodstove construction 2013-04-02 22:35:45 -04:00
Soy df49f8a895 After death/suicide the npcs/factions, artifacts, and overmap and local map are saved now. (was not done before, some of this data gets deleted later when the character specific save is deleted).
Splitted some of the save() functions out to separate functions.
Changed the debug 7 function, all the active npc locations are now shown as messages.
Added minor comments at places.
2013-04-03 04:27:49 +02:00
GlyphGryph 099cc919c3 Merge branch 'master' into add_item_manager 2013-04-02 22:14:10 -04:00
veryinky b02ab12ea2 Merge branch 'master' of git://github.com/TheDarklingWolf/Cataclysm-DDA 2013-04-02 18:30:09 -04:00
Kevin Granade f478dc5c45 Kill trailing whitespace\! 2013-04-02 17:19:57 -05:00
Kevin Granade b8bc5a7b25 Remove a ton of commented-out code. 2013-04-02 17:18:40 -05:00
Kevin Granade 3d291f7d70 Merge remote-tracking branch 'dda/pr/347' into dda-master 2013-04-02 17:10:32 -05:00
Soy 43e1d92388 Starting npc spawn is Y.
Added reset_npcs function. Added currently active npc's %nr to debug feature. Removed unused code. Changed the way freshly spawned npcs act.
Added comments to npc.cpp
Added comments to npc.h (trying to figure out/document how it all works).
Added missing text to npctalk.cpp. (minor bugfix).
2013-04-03 00:08:52 +02:00
veryinky 19c93f3bc2 Merge branch 'master' of git://github.com/TheDarklingWolf/Cataclysm-DDA 2013-04-02 17:43:47 -04:00
TheDarklingWolf eacc97927a Actually changed all references of Silencer to Suppressor 2013-04-02 22:17:46 +01:00
TheDarklingWolf e475dc46ff Change code references for silencer to suppressor to match ingame name. 2013-04-02 22:04:56 +01:00
TheDarklingWolf ae9e074aff Renamed silencer to suppressor. 2013-04-02 21:48:12 +01:00
veryinky efad1cf3d6 Merge branch 'master' of git://github.com/TheDarklingWolf/Cataclysm-DDA 2013-04-02 14:23:17 -04:00
TheDarklingWolf 15a42427c4 My LAW goes FWOOSH! Added changes to changelog. 2013-04-02 18:58:40 +01:00
TheDarklingWolf c118da5524 Merge branch 'master' of https://github.com/TheDarklingWolf/Cataclysm-DDA 2013-04-02 18:48:53 +01:00
TheDarklingWolf 6ecb916e70 Added M72-LAW. Placed it in the Soldier & Helicopter Mapextras, and the launcher spawnlist. 2013-04-02 18:48:14 +01:00
Kevin Granade 2974c54cb1 Merge pull request #351 from Voker57/fixes
Remove >< from possible inventory letters since they make items inaccessible
2013-04-02 10:22:46 -07:00
Voker57 7737b34e49 Remove >< from possible inventory letters 2013-04-02 21:13:50 +04:00
TheDarklingWolf 9e7a74c0b2 Added new IF_NO_UNLOAD flag, used to prevent a weapon from being unloaded. (Charge rifles, LAWs, etc). 2013-04-02 16:52:15 +01:00
TheDarklingWolf 7f4a0cb3b1 Made the message when you attempt to close the curtains from outside more informative. 2013-04-02 16:46:52 +01:00
TheDarklingWolf dd1e9f9777 Fix traps overwriting each other. 2013-04-02 15:43:11 +01:00
TheDarklingWolf 575b2ce302 Mininukes require a grenade or 2 40mm concussive/frag. 2013-04-02 14:57:39 +01:00
TheDarklingWolf 7af47f6b90 Merge branch 'master' of https://github.com/TheDarklingWolf/Cataclysm-DDA 2013-04-02 14:36:36 +01:00
TheDarklingWolf c5f2101744 Added some stuff to the changelog 2013-04-02 14:36:05 +01:00
GlyphGryph c69fcca380 Added the ability to ask the itemm_controller for a random id or itype from a group. 2013-04-02 09:17:28 -04:00
Kevin Granade daa842c88b Merge pull request #346 from veryinky/CraftingSeatPedal
Crafting seats require springs, pedals chunks.
2013-04-02 06:15:37 -07:00
origamiwolf beff3aa23d Bugfix for hot foods in containers not cooling down. Fixes #336 2013-04-02 20:03:22 +08:00
veryinky 6dc7e01410 Crafting seats require springs, pedals chunks. 2013-04-02 01:57:17 -03:00
Kevin Granade c5f06e6531 Fix style of random_map_extra(). 2013-04-01 22:52:28 -05:00
Kevin Granade 7fa9498417 Exclude non-classic map extras from selection when in classic zombie mode. 2013-04-01 22:46:23 -05:00
Kevin Granade 2cb272f3fa Add etags and ctags targets to phony list. 2013-04-01 21:46:23 -05:00
Kevin Granade a7603358d1 Add etags make target. 2013-04-01 21:46:23 -05:00
Kevin Granade 9244f91cc4 Merge pull request #345 from ethankaminski/invlet-fix
Stop the inventory being confused by non-alpha invlets
2013-04-01 19:40:40 -07:00
Kevin Granade facf3a3838 Some const and interface cleanup in map. 2013-04-01 21:38:40 -05:00
Kevin Granade ca9dd45ea8 Allow rain animation to be disabled with an option. 2013-04-01 21:15:33 -05:00
Kevin Granade ef902addc5 Use normal outside cache for determining where to draw rain animation. 2013-04-01 20:59:36 -05:00
Kevin Granade f75288aa5b Take zlevel into account when determining outsidedness. 2013-04-01 20:58:51 -05:00
Kevin Granade ea767e2f0d Seperate out linker to allow substituting distcc for CXX. 2013-04-01 20:09:08 -05:00
Kevin Granade e8e733620a Merge pull request #342 from wito/weather-fixes
Weather fixes
2013-04-01 18:01:13 -07:00
ethankaminski b182d91f90 Stop the inventory being confused by non-alpha invlets 2013-04-02 14:00:56 +13:00
Kevin Granade 5ebf79b895 Merge pull request #340 from veryinky/patch-1
crafting recipes for seat, muffler, crank.
2013-04-01 17:58:50 -07:00
Kevin Granade 379bc45587 Merge pull request #339 from veryinky/fix
fix kill count display
2013-04-01 17:53:05 -07:00
Kevin Granade 1bbba41719 Merge pull request #334 from ethankaminski/trait-farsighted
Add Far-Sighted trait
2013-04-01 17:13:50 -07:00
TheDarklingWolf 9b4a00ad2e Merge branch 'master' of https://github.com/TheDarklingWolf/Cataclysm-DDA 2013-04-02 00:58:49 +01:00
Kevin Granade eebcbf3c61 Merge pull request #332 from Soyweiser/NPC_fixes
Npc spawning on top of each other fixed
2013-04-01 16:58:29 -07:00
TheDarklingWolf 86ffd5c2fa Merge branch 'master' of https://github.com/TheDarklingWolf/Cataclysm-DDA 2013-04-02 00:58:22 +01:00
TheDarklingWolf b58b819012 Actually fixed the rollmat crash this time. Ctrl-Z is a fickle friend. 2013-04-02 00:57:59 +01:00
Kevin Granade 73ff14cd8c Merge pull request #329 from Soyweiser/master
Stopped npc's from spawning. Using a new npc.txt file.
2013-04-01 16:49:41 -07:00
TheDarklingWolf e93d2c1090 Merge branch 'master' of https://github.com/TheDarklingWolf/Cataclysm-DDA 2013-04-02 00:47:09 +01:00
TheDarklingWolf 73864981c7 Fix rollmat crash, blade trap blade drops, added Brazier to benign list. Closes #331 2013-04-02 00:46:18 +01:00
Kevin Granade 82e7b9716f Merge pull request #328 from jbfink/spelling-fix
Spelling correction (supplimental to supplemental) in overmapp.cc
2013-04-01 16:38:40 -07:00
Kevin Granade 39bfcc8867 Merge remote-tracking branch 'remotes/dda/pr/307' into dda-master
Conflicts:
	itype.h
	itypedef.cpp
	mapitemsdef.cpp
2013-04-01 18:33:06 -05:00
Williham Totland 29cf1f608c Removes glare from sunlight while indoors 2013-04-01 23:17:50 +02:00
Williham Totland d338869491 Makes rain make you wet 2013-04-01 23:11:58 +02:00
veryinky 18a2649452 crafting recipes for seat, muffler, crank. 2013-04-01 18:07:34 -03:00
veryinky 4518131c58 fix kill count display 2013-04-01 17:48:18 -03:00
Williham Totland b4f9e8139d lightning now makes a player wet, adds thunder (still no strikes) 2013-04-01 22:32:38 +02:00
Williham Totland 14c8c5e357 string identifiers 2013-04-01 21:36:12 +02:00
Williham Totland fdc1a6c6d8 ups power armor weight, makes hauling frame unique-equipped 2013-04-01 21:31:18 +02:00
ethankaminski c266bb9fba Make Far-Sighted also apply a penalty to electronics/tailoring crafting
Added electronics/tailoring crafting penalties to far-sighted, after GlyphGryph suggested it.
Only crafting is penalized (not disassembly), because making things is more fiddly than taking them apart.
Only electronics/tailoring are affected (tailoring less so) because they seem the most reliant on fine detail vision.
2013-04-01 19:29:29 +13:00
ethankaminski 521aa1f30f Add far-sighted as a trait, take penalties with no reading glasses
Added the Far-Sighted trait. If you're far-sighted and have no reading glasses on, you're unable to read and take a melee accuracy penalty.
2013-04-01 18:17:07 +13:00
Kevin Granade 79c36ebc3f And a few more symbols for labelling inventoy items. 2013-03-31 23:55:21 -05:00
Kevin Granade d70ad0a2ce Replace hard-coded ascii calculations with an explicit string of characters for use in labelling inventory items. 2013-03-31 23:52:24 -05:00
Soy 5e93e734fe Added missing a few npctalk switch cases. 2013-04-01 06:30:12 +02:00
Soy d6426f85cb Added fix for npc spawning on top of other npc. It now searches in a spiral pattern for a free spot (a game->is_empty spot). 2013-04-01 06:08:35 +02:00
Soy b0507b7c91 small comment problem fixed 2013-04-01 04:08:56 +02:00
Soy 59f5d337ff Removed old data/nonpc.txt and no_npc.txt files. Added npc.txt you can set in the npc.txt file which npcs you want to spawn. The starting one or random spawn ones. All defaults are set to not spawn them. 2013-04-01 03:58:48 +02:00
GlyphGryph 45a4d4f575 Merge branch 'master' into add_item_manager 2013-03-31 21:07:12 -04:00
GlyphGryph 428391ee1f Added an Item_manager class, and the global item_controller to reference it's only instance.
It is fully initialized as part of game.cpps initialization step, and doesn't do much for the moment aside from providing another way to access the same information already accessed through the itypes map. However, it lays the groundwork for additional changes.

To insure proper functionality, calls to itypes in wish.cpp now use the new item_controller.
2013-03-31 21:03:33 -04:00
Kevin Granade 6fa9547df3 Cleanup DOS-style newlines. 2013-03-31 18:49:14 -05:00
Ids dce2ebdf21 create_starting_npcs will not generate starting npcs if the no_npc.txt file exists. 2013-04-01 01:27:32 +02:00
Kevin Granade 2ef337b379 Mass-remove trailing whitespace. 2013-03-31 18:26:39 -05:00
jbfink af017d5b96 Spelling correction (supplimental to supplemental) in overmapp.cc 2013-03-31 19:10:15 -04:00
TheDarklingWolf 3db8f03679 Made kegs spawn in the junk mapitem 2013-03-31 21:28:50 +01:00
TheDarklingWolf aaba2d6d3b Updated app title to 0.4 2013-03-31 21:18:24 +01:00
TheDarklingWolf d342bdc6d1 Change purse description. Closes #281 2013-03-31 21:09:19 +01:00
TheDarklingWolf 545ad70c15 Merge branch 'master' of https://github.com/TheDarklingWolf/Cataclysm-DDA 2013-03-31 20:24:24 +01:00
TheDarklingWolf 8897d27526 Various small fixes. Closes #324 Closes #317 2013-03-31 20:23:34 +01:00
Kevin Granade fd05d90e5a Merge pull request #320 from ethankaminski/autodrop_crashfix
Fix a crash bug that would occur if the player had autodrop on
2013-03-31 12:17:14 -07:00
Kevin Granade 6ee607f8ed Merge pull request #319 from ethankaminski/drawing-fix
Better fix for rain drawing
2013-03-31 12:04:23 -07:00
Kyratzes Talvadore 50fe2c7104 Merge pull request #321 from ethankaminski/nailfix
Re-fix nail drop rate
2013-03-31 05:09:42 -07:00
Kyratzes Talvadore 57bef43546 Merge pull request #323 from ethankaminski/item-fixes
Fix segfault-causing typo in shocker zombie butchering
2013-03-31 05:09:13 -07:00
ethankaminski ff5f35069a Fix segfault-causing typo in shocker zombie butchering 2013-04-01 00:45:08 +13:00
ethankaminski 986488955e One last case of nail over-generation 2013-03-31 23:16:22 +13:00
ethankaminski 4fe312bc1f Re-fix nail drop rate from deconstruction
Looks like the item refactor blew away my fix to nail drop rate, after changing how spawn_item works with charged items. Re-fixing.
2013-03-31 23:12:26 +13:00
ethankaminski 0b2285d621 Fix a crash bug that would occur if the player had autodrop on 2013-03-31 20:32:42 +13:00
ethankaminski 58d2b42818 Actually, really fix rain this time
Bug introduced by the last commit, and fixed by this commit: rain would fall where mobs were standing, replacing them with nothing.

The real issue: there was a variable in map::draw that was being set according to the player character's coordinates, when other code wanted it to be set according to the viewport center. ACTUALLY fix it this time. I hope. Unless there's more magic.
2013-03-31 18:27:57 +13:00
ethankaminski 5b5ef7ce6a Better rain drawing fix for shifted viewports
My previous fix for rain in shifted viewports made it so that rain would just not fall after you got too far away from the player. Fixed it the RIGHT way this time.
2013-03-31 18:01:57 +13:00
ethankaminski 9e5bb85684 Rename some arcane "cx"/"cy" variables 2013-03-31 18:01:14 +13:00
Kevin Granade 3522136133 Merge pull request #318 from ethankaminski/master
Fix new crash when generating fitted underarmor
2013-03-30 21:14:40 -07:00
ethankaminski 5b88d6032c Add one more missing fitted item def 2013-03-31 17:08:51 +13:00
origamiwolf 91934d490c Added heatpack to map item spawns.
Merged manually across item indexing refactor by Kevin Granade.
2013-03-30 21:55:20 -05:00
Kevin Granade ead4a85c30 Merge remote-tracking branch 'ethankaminski/knife-cauterize' into dda-master
Conflicts:
	data/changelog.txt
2013-03-30 21:33:31 -05:00
Kevin Granade 3ab096c7bd Fix construction recipe macros so they don't scribble all over the crafting recipes. 2013-03-30 21:24:46 -05:00
Kevin Granade 5746f4ca9c Merge remote-tracking branch 'dda/pr/316' into dda-master 2013-03-30 20:45:31 -05:00
Kevin Granade 2bb7dd9bac Fix indexing errors in construction definition macros. 2013-03-30 20:45:22 -05:00
ethankaminski cec149a6d0 Re-added leather trenchcoat recipe 2013-03-31 14:31:05 +13:00
ethankaminski 908c365d3e Re-add fitted items to the definitions 2013-03-31 14:21:45 +13:00
ethankaminski ff3769a6b4 Remove duplicate cases of toolsets. 2013-03-31 13:50:49 +13:00
Kevin Granade 73333b0af6 Fix indices used by crafting recipe definition macros, thanks Soron and veryinky for reporting. 2013-03-30 19:25:42 -05:00
Kevin Granade 208cc86ca9 Merge pull request #313 from ethankaminski/batsys-fix
Make the battery system bionic only consume as many batteries as needed
2013-03-30 16:50:41 -07:00
ethankaminski 4c36416aaa Use the new item framework 2013-03-31 12:45:49 +13:00
ethankaminski 3817112743 Merge branch 'master' into knife-cauterize 2013-03-31 12:45:26 +13:00
Kevin Granade 945beeac94 Merge pull request #306 from wito/more-pushables
Just makes a few more things pushable.
2013-03-30 16:38:34 -07:00
Kevin Granade 1ef319b69f Correct handling of flamable liquids. 2013-03-30 18:33:31 -05:00
Kevin Granade 9688f48263 Remove trailing whitespace. 2013-03-30 18:33:05 -05:00
Kevin Granade fc7ecb81d3 Remove some commented out code. 2013-03-30 18:32:37 -05:00
ethankaminski 3d9632c061 Make knives capable of cauterization with a lighter. 2013-03-31 12:22:05 +13:00
ethankaminski eae9b5d7fd Move the meat of cauterization into player.cpp 2013-03-31 12:04:41 +13:00
ethankaminski 1de6840abe Make the battery system bionic only consume as many batteries as needed 2013-03-31 11:10:06 +13:00
GlyphGryph 5b3999963f Changed itypes to use a map instead of a hash, as well as some required changes elsewhere, like in bionics, to make that work.
This is a significant refactor. It is the first step on moving items out to an external data file, and allowing more control over how items work later on.
2013-03-30 13:26:14 -04:00
Kevin Granade 04ff8c6f3f Merge pull request #305 from wito/crafting-madness
Modified crafting to not yield ALL THE THREAD!
2013-03-30 08:40:40 -07:00
Williham Totland e62b8a4476 Modified crafting to not yield ALL THE THREAD! when disassembling string, and related madness 2013-03-30 16:32:19 +01:00
Williham Totland 6335f1016d bathtub, oven, cupboards pushable 2013-03-30 16:31:14 +01:00
TheDarklingWolf 794f5f685d Increased volume&Weight of Stone Pot and Waterskin 2013-03-30 12:34:41 +00:00
TheDarklingWolf 523c253d77 Merge branch 'master' of https://github.com/TheDarklingWolf/Cataclysm-DDA 2013-03-30 12:11:14 +00:00
TheDarklingWolf 5e81d8ad64 Update brazier description 2013-03-30 12:11:01 +00:00
Kevin Granade 5b451558f4 Merge pull request #300 from ethankaminski/cauterize
Add cauterization as a way to remove bites/bleeding
2013-03-29 23:18:49 -07:00
Kevin Granade 636566920b resurrect overmap::find_all() for use by roadmap. 2013-03-30 01:16:51 -05:00
ethankaminski 012d5d0e0a Make the cauterization message's tone more intense 2013-03-30 18:06:54 +13:00
Kevin Granade aff09c13db Merge branch 'roadmap' into dda-master 2013-03-29 23:55:42 -05:00
Kevin Granade e7a5f8e799 Pull together vehicle-derived map caching into a single loop. 2013-03-29 23:22:38 -05:00
Kevin Granade 18b4b10da0 Pull iteration over map into build_outside_cache(), move it to be with other caching functions, and reformat it. 2013-03-29 23:22:00 -05:00
Kevin Granade 96f706a92e Make any tile that has a vision line drawn through it visible. 2013-03-29 23:18:35 -05:00
ethankaminski ff8809a8c4 Add cauterization (soldering iron/hotplate only for now)
You can now cauterize yourself with certain items, causing a fair amount of pain in exchange for healing (uninfected) bite and bleeding effects.
Now maybe I won't have situations where I'm out of first aid kits, have plenty of antibiotics, and intentionally wait the ~4 hours until the bite gets infected so I can heal the damn thing :P.
2013-03-30 16:59:16 +13:00
ethankaminski a16121b7ea Should probably add my major changes to the changelog 2013-03-30 16:57:05 +13:00
Kevin Granade 7fd4b7526d Merge branch 'pr/287' into dda-master 2013-03-29 21:42:46 -05:00
Kevin Granade 3cfce434ba Add a sound effect when breaking a window when trying to pry it open. 2013-03-29 21:34:24 -05:00
Kevin Granade 01a76511ca Merge pull request #294 from origamiwolf/CDDA-itemflag
Expansion of item_flags
2013-03-29 18:54:05 -07:00
Kevin Granade a278488d0a Merge pull request #299 from ethankaminski/wolf-fix
Fix one (primary/only?) source of wolf self-attacks.
2013-03-29 17:49:57 -07:00
Kevin Granade c851c02845 Merge branch 'pr/296' into dda-master
Conflicts:
	data/changelog.txt
2013-03-29 19:24:30 -05:00
Kevin Granade 13ae920d71 Merge pull request #295 from wito/gunmod-fix
Adresses an issue where M203s and underslung shotguns would start at -1 charges
2013-03-29 17:17:33 -07:00
Kevin Granade c944ec0f19 Merge pull request #291 from ethankaminski/examine_hinting
Improve item examination sidebar
2013-03-29 17:16:28 -07:00
ethankaminski cd0aa8fad5 Fix one (primary/only?) source of wolf self-attacks. 2013-03-30 12:56:33 +13:00
Williham Totland 953e4ba2ed changelog 2013-03-29 23:38:37 +01:00
Kyratzes Talvadore 23c05e83eb Merge pull request #298 from wito/wito-changelog
Wito changelog
2013-03-29 15:16:22 -07:00
Williham Totland ddd7080774 Changes added 2013-03-29 22:51:23 +01:00
Williham Totland a791f86881 Merge branch 'wito-changelog' of github.com:wito/Cataclysm-DDA into wito-changelog 2013-03-29 22:48:39 +01:00
Williham Totland c78261e78c Changes added 2013-03-29 22:47:54 +01:00
Williham Totland b2f3a7e425 Changes added 2013-03-29 22:47:02 +01:00
Kyratzes Talvadore 02929f47d2 Merge pull request #297 from ethankaminski/hitdraw_bugfix
Maybe fix the Windows segfault when firing at out-of-view monsters
2013-03-29 14:31:37 -07:00
ethankaminski 013812de4d Maybe fix the Windows segfault when firing at out-of-view monsters 2013-03-30 10:26:27 +13:00
Williham Totland e45237acaa Removed skill check for guns vis-a-vis one-handed-ness 2013-03-29 22:23:21 +01:00
Williham Totland ebf2e3c562 Adresses an issue where M203s and underslung shotguns would start at -1 charges. 2013-03-29 20:38:05 +01:00
Williham Totland 6e0d1b59d2 Hauling frame added to spawn lists 2013-03-29 18:01:10 +01:00
Williham Totland bb8b64cf09 Power armor hauling frame 2013-03-29 17:59:43 +01:00
origamiwolf 50bb31cc46 Extended item flags to individual items, which allows for hot food. 2013-03-30 00:06:54 +08:00
Kevin Granade ceed70560f Merge pull request #293 from wito/power-armor
Adjusted damage reduction values
2013-03-29 08:23:39 -07:00
TheDarklingWolf 0952d85022 Merge branch 'master' of https://github.com/TheDarklingWolf/Cataclysm-DDA 2013-03-29 13:10:53 +00:00
TheDarklingWolf 903d02b598 Commented out hit animation. Seems to fix crash errors with NPCs and players attacking offscreen 2013-03-29 13:10:27 +00:00
Kyratzes Talvadore 7523b28ed3 Merge pull request #290 from ZwodahS/basemaster
Update crafting recipe search
2013-03-29 06:05:07 -07:00
Kyratzes Talvadore ef13701022 Merge pull request #292 from ethankaminski/rainfix
Fix weather effects with offset viewports
2013-03-29 06:04:09 -07:00
Williham Totland 9d3221c734 Adjusted damage reduction values 2013-03-29 13:24:22 +01:00
ethankaminski a79d056a1a Fix weather effects with offset viewports.
Made rain actually be drawn in the right place when the viewport is offset. Now I understand what went wrong! (but only through trial and error :P.)
2013-03-30 00:18:12 +13:00
ethankaminski 98949a4a96 Rename the use_rating enum to hint_rating 2013-03-29 22:50:08 +13:00
ethankaminski a4eefd9856 Remove an unused function declaration, and fix comment alignment 2013-03-29 22:34:53 +13:00
ethankaminski 9fdbd37085 Make room for the word "Disassemble"
Looks like that sidebar I was playing with cut off the last letter of "disassemble".
Three options: move everything one character to the left; widen the window; or choose a shorter word.
I went with the first of those options, since it's unlikely to break anything, still uses the right word, and there was room.
2013-03-29 22:22:50 +13:00
ethankaminski 86f52e663b Add a "D"isassemble option to the item examination screen 2013-03-29 22:21:07 +13:00
ethankaminski 73ca6fa7cf Add hinting to "U"nload as well 2013-03-29 21:41:22 +13:00
ethankaminski e2e32c0648 Should probably add myself to the credits at this point 2013-03-29 21:23:06 +13:00
ethankaminski 4930d6329a Add colored hinting to the item exam sidebar
When examining an item, the sidebar listing possible actions now has colored hinting.

Green: can do that action
Red: the item permits that action, but circumstances don't
Gray: the item does not permit that action

A few things (notably, Unload) don't hint yet. Also, there may be some rare cases that were missed.
2013-03-29 21:19:51 +13:00
Eric Ng(ZwodahS) 09c6496ef2 Displayed crafting searched results in 1 tab instead of their own crafting tabs 2013-03-29 15:12:22 +08:00
ethankaminski 196e5e2bc8 Further enhance compare_split_screen_popup()
Since compare_split_screen_popup() looks like it's been patched repeatedly, and since a display I want to work on uses that function, I don't feel to bad about adding (and documenting!) another kludgey feature to the function to allow for the change I want to make later on.
2013-03-29 19:13:22 +13:00
Matthew Ammann 5e9b6b6819 Added chance to break glass when prying open a window 2013-03-29 00:29:53 -04:00
Matthew Ammann b11079b996 Merge remote-tracking branch 'upstream/master' into pryWindows 2013-03-29 00:12:17 -04:00
Kevin Granade c9f0cd83a8 Merge pull request #289 from ethankaminski/longcrafting
Craft recipe continuously
2013-03-28 20:29:06 -07:00
Kevin Granade a1f2c4880a Merge pull request #288 from veryinky/master
Item description bugfix and update.
2013-03-28 20:01:04 -07:00
Kevin Granade 99f99b4e31 Merge pull request #286 from wito/power-armor
Power armor!
Merging, but it needs an adjustment to not wear out so quick.  Even powered it was taking heavy damage from handfuls of Zs.
2013-03-28 19:49:39 -07:00
Kevin Granade 739461b493 Merge pull request #276 from wito/vehcile-parts-two
Vehicle Parts. Car isles, water tanks & more…
2013-03-28 19:03:03 -07:00
veryinky 8e83e3da02 Update item.cpp 2013-03-28 22:40:20 -03:00
origamiwolf bddf99b610 Added specific item flag variable 2013-03-29 09:34:25 +08:00
ethankaminski e527b053ba Tweak longcraft behavior. 2013-03-29 14:13:47 +13:00
ethankaminski b3fd4457c8 Added ability to craft as long as possible 2013-03-29 11:23:46 +13:00
ethankaminski 282b7ede67 Refactor crafting interface code a bit
Made some changes that make it easier to add new actions that initiate crafting. Moved some code into separate functions, so there's less duplication.
2013-03-29 10:32:56 +13:00
TheDarklingWolf 1d996fe1d1 Added Eben to possible names, removed drops from zombie dogs 2013-03-28 21:18:39 +00:00
Matthew Ammann 6d5ce19836 Crowbars now pry open windows 2013-03-28 16:20:17 -04:00
Williham Totland e29fc1425c Power armor added to spawn lists. 2013-03-28 20:44:33 +01:00
Williham Totland 55fbd65bfe Power drain, wear limitations, enc adjustment 2013-03-28 20:44:12 +01:00
Williham Totland 5ee7471d67 Power armor! 2013-03-28 20:43:44 +01:00
TheDarklingWolf 352d1b298e Change character to spawn with matches instead of lighter 2013-03-28 19:09:03 +00:00
Kevin Granade ea493762e6 Merge pull request #284 from ethankaminski/nail-droprate
Nail/drug drop rate fix
2013-03-28 06:40:52 -07:00
ethankaminski 398d6bc480 Whose idea was it to have quantity=1 drop two items? 2013-03-28 22:06:52 +13:00
ethankaminski c7fb15ba92 Merge remote-tracking branch 'upstream/master' into nail-droprate 2013-03-28 21:39:39 +13:00
ethankaminski 82820641a9 Fix the nail/drug droprate bug introduced by my last fix 2013-03-28 21:36:34 +13:00
Whales 5b7fa524b9 Added license. 2013-03-27 22:29:24 -05:00
Kevin Granade e6139173d3 Merge pull request #280 from origamiwolf/CDDA
Dynamic spawn fix
2013-03-27 20:13:14 -07:00
origamiwolf 73f752be35 Charges description for food items changed to Portions, which
will no longer show -1 for single portion food items.
fixes #266
2013-03-28 10:00:00 +08:00
Kevin Granade 49f9704622 Merge pull request #279 from ethankaminski/sinew-bugfix
Sinew drop rate bugfix, and ability to spawn copies of charged items
2013-03-27 18:54:43 -07:00
Kevin Granade a79dadb2a3 Merge pull request #278 from teh-sam/master
Add matches (20 in a book) to the game
2013-03-27 18:22:57 -07:00
Kevin Granade 6dffb1ddba Merge pull request #265 from wito/inventory-fix
Improved pickup behaviour when near item limit
2013-03-27 18:06:39 -07:00
origamiwolf 6020c78a2f Dynamic spawn fix 2013-03-28 09:05:03 +08:00
Williham Totland 47b607819e fix for unlimited items in inventory. 2013-03-28 01:49:28 +01:00
Kevin Granade 1cb9d2cc81 Merge pull request #264 from wito/item-limit
Item limit per square is now 64
2013-03-27 17:21:39 -07:00
Kevin Granade f98ebb6fd6 Merge pull request #257 from ZwodahS/basemaster
added a search function to crafting menu
2013-03-27 16:29:28 -07:00
ethankaminski 679e33fabf Fix a potential bug with non-default quantity/charges
Whoops, forgot to update map::spawn_item() (formerly map::add_item()) to support non-default quantity AND charges. Now it should be possible to spawn N copies of an item with M charges.
2013-03-28 12:12:16 +13:00
ethankaminski 1a78c75394 Rename itype-taking map::add_item() to map::spawn_item()
Per Kevin's suggestion. Hopefully this'll make it easier to find instances of that name later on.
2013-03-28 12:10:53 +13:00
teh-sam be9a7cb28f Adding to various appropriate spawns 2013-03-27 16:50:32 -06:00
teh-sam b09643a69a Update itypedef.cpp 2013-03-27 16:41:20 -06:00
ethankaminski 565863d77d Made it possible to spawn several instances of charged items
This fixes a bug involving sinew spawning sinew*n, instead of n copies of sinew*10.
2013-03-28 11:39:10 +13:00
teh-sam 6ddef70815 Add book of matches 2013-03-27 16:27:21 -06:00
Williham Totland 9de1305b75 Fixed an issue where fuel for gas/plasma engines would not drain. 2013-03-27 23:16:52 +01:00
Williham Totland a7e977b4b7 fixed a bug where reversing the vehicle would drain the storage battery. 2013-03-27 19:01:17 +01:00
Williham Totland 41045c5a6a trickle charging storage batteries 2013-03-27 18:28:04 +01:00
Williham Totland e384a013db Battery upscale.
Battery usage in vehicles are upscaled by a factor of 100.
Output of the mini-reactor is scaled to match.
2013-03-27 18:12:50 +01:00
Williham Totland 6493039b0b drinking from vehicle sink 2013-03-27 15:55:28 +01:00
Williham Totland 01c482e909 allow for integrated kitchen to be used in crafting 2013-03-27 15:23:45 +01:00
Williham Totland 35aaba05f7 Water tanks for vehicles, tank drain utility function 2013-03-27 15:23:07 +01:00
Williham Totland 6d16b303ae kitchen unit installable 2013-03-27 13:29:24 +01:00
Williham Totland 678c64c1d5 RV Kitchen unit 2013-03-27 12:59:10 +01:00
Eric Ng(ZwodahS) 3c03730fc3 Merge remote-tracking branch 'base/master' into basemaster 2013-03-27 11:51:18 +08:00
Kevin Granade 6878be3e07 Reskin fresh/fast zombie as a zombie dog. 2013-03-26 21:26:14 -05:00
Kevin Granade 1a0b11bdd4 Add a cooldown to zombie bite attack. 2013-03-26 21:25:36 -05:00
Kevin Granade 204e8bd33d Adjust agression flags of several animals. 2013-03-26 21:24:58 -05:00
Kevin Granade d4b446599a Cleanup merge flubs in wolf flags. 2013-03-26 21:23:05 -05:00
Kevin Granade 24ec07af5b Drain input buffer of repeated keypresses to prevent overshoot. 2013-03-26 20:16:32 -05:00
TheDarklingWolf c1e3aff6f0 Molotovs use full bottle again 2013-03-26 21:47:05 +00:00
TheDarklingWolf ac8bfd011b Berries and wild veggies should no longer spawn rotten. They now have their birthday set to
the turn they are created. Closes #241
2013-03-26 21:20:29 +00:00
TheDarklingWolf 52a2fb9214 Being overencumbered with hoarder no longer gives a morale bonus. Closes #271 2013-03-26 19:45:46 +00:00
Williham Totland 06630c6cc6 Car isle and floor trunks 2013-03-26 20:10:46 +01:00
Williham Totland e7df8092a7 Improved pickup behaviour when near item limit 2013-03-26 16:03:06 +01:00
Williham Totland 2f15639834 Item limit increased for vehicles, as well. 2013-03-26 13:43:20 +01:00
Williham Totland ac5b21e753 Item limit per tile is now 64 2013-03-26 13:30:05 +01:00
Williham Totland c1258b7b9e Merge branch 'weak-beer' 2013-03-26 12:43:31 +01:00
Williham Totland 1f08fd9d08 tailoring provides fitted gear 2013-03-26 12:39:58 +01:00
Williham Totland 88d2a18bbe Fitted items appearing in world. 2013-03-26 12:37:10 +01:00
Williham Totland 7f7a16d38a Also, dress shirts. 2013-03-26 12:36:58 +01:00
Williham Totland 0923703509 A few new items made available as fitted. 2013-03-26 12:20:42 +01:00
Williham Totland ca468be5b0 Leather trenchcoat made craftable 2013-03-26 12:18:33 +01:00
Williham Totland 1352c67fee Watered down the beer 2013-03-26 11:59:08 +01:00
Williham Totland b5983bcfce Merge github.com:TheDarklingWolf/Cataclysm-DDA 2013-03-26 11:15:26 +01:00
Eric Ng(ZwodahS) ba8dda9e4d fix recraft bug not checking morale 2013-03-26 12:48:34 +08:00
Eric Ng(ZwodahS) 09018363b3 Merge remote-tracking branch 'base/master' into basemaster 2013-03-26 12:33:22 +08:00
Kevin Granade c58992c251 Optimize seen calculation by precalculating it. 2013-03-25 22:41:45 -05:00
Kevin Granade 16d7b2c88d Fix dumb merge error that breaks the build. 2013-03-25 20:36:52 -05:00
Kevin Granade 525119dd30 Pull last of lightmap class into map class. 2013-03-25 19:51:53 -05:00
Kevin Granade 0918650cb2 Const some calendar accessors. 2013-03-25 19:51:53 -05:00
Kevin Granade eb7e450a3b Expand lightmap to cover entire map and make it's coodrinates match the map. 2013-03-25 19:51:53 -05:00
Kevin Granade 20e0f06e3a Remove cache built flag. 2013-03-25 19:51:53 -05:00
Kevin Granade d0d8925608 Pull transparency cache into map class. 2013-03-25 19:51:53 -05:00
Kevin Granade 476712991c Remove monster caching in lightmap and just retrieve light data from monsters directly. 2013-03-25 19:51:53 -05:00
Kevin Granade 4af7a4f7be Remove lightmap-specific caching of vehicle data and access vehicles directly for transparency and lighting info. 2013-03-25 19:51:52 -05:00
Kevin Granade 5ee73b40ed Move outside cache data and construction to map class. 2013-03-25 19:51:52 -05:00
Kevin Granade 0977d4bae1 Pull more static data out of inner loop and const more things in map::draw(). 2013-03-25 19:51:52 -05:00
Williham Totland d53b95223e Merge github.com:TheDarklingWolf/Cataclysm-DDA 2013-03-25 17:41:13 +01:00
Eric Ng(ZwodahS) 42ede8ae08 fix a bug that was accidentally introduced 2013-03-26 00:25:45 +08:00
Eric Ng(ZwodahS) 79b41bac9e added a search function to crafting 2013-03-25 13:39:34 +08:00
Eric Ng(ZwodahS) d9d8047b71 indentation without changes 2013-03-25 12:53:58 +08:00
TheDarklingWolf c213bb0dde Merge branch 'master' of https://github.com/TheDarklingWolf/Cataclysm-DDA 2013-03-24 19:43:16 +00:00
TheDarklingWolf ecbd8acd0e Added iexamine files to .cbp 2013-03-24 19:42:51 +00:00
Kyratzes Talvadore 63582c6aa1 Merge pull request #256 from Shoes01/master
Buffed fire, fixed frostbite occurring in above freezing temps
2013-03-24 12:23:23 -07:00
Shoes01 e2ea835a8f Merge branch 'master' of github.com:TheDarklingWolf/Cataclysm-DDA 2013-03-24 15:47:14 -07:00
Shoes01 2121cc1abb Standing on fire heats players, if fire is big enough 2013-03-24 15:44:44 -07:00
Williham Totland 7ba5e980a5 Merge github.com:TheDarklingWolf/Cataclysm-DDA 2013-03-24 20:22:03 +01:00
TheDarklingWolf 824c4403ef Merge branch 'master' of https://github.com/TheDarklingWolf/Cataclysm-DDA
Conflicts:
	map.cpp
2013-03-24 19:20:23 +00:00
TheDarklingWolf 6b7dd80aff Made warm clothing protect against proper rain. Reduced check for drizzle. 2013-03-24 19:19:04 +00:00
Shoes01 835ae6b10a Standing on a fire or magma tile also heats up player 2013-03-24 09:31:44 -07:00
Shoes01 11a6a46b4f Buffed fire's heating capabilities 2013-03-24 09:20:15 -07:00
Shoes01 c41bbcc715 Frostbite now only occurs in freezing temperatures 2013-03-24 09:17:13 -07:00
Shoes01 564fb6fddf Being on fire now increases bodytemp 2013-03-24 09:12:13 -07:00
Kyratzes Talvadore dcbf8bea88 Merge pull request #255 from iank/throwing_bug
Fix throwing bug
2013-03-24 06:53:42 -07:00
Your Name 3e99666c5b Fix throwing bug
Previously, if a user pressed '0' when selecting target and then fired,
thrown object would always hit with a headshot, no matter the range or
skill.
2013-03-24 01:21:26 -04:00
Kevin Granade 63ab391d87 Merge pull request #252 from Catacstone/explode-examine
Examine() to iuse::style functions
2013-03-23 13:53:01 -07:00
Matias Oksa 2562cab0d0 Examine() to iuse::style functions 2013-03-23 22:19:16 +02:00
Kevin Granade 758193655d Merge pull request #249 from benjamg/hotfix/highway_spawn
fix max and min count checking
2013-03-23 13:08:24 -07:00
Kevin Granade 318f9831f2 Make smashing picket fences drop some 2x4s and nails instead of... spears? 2013-03-23 14:57:53 -05:00
Kevin Granade 75b99b303b Merge pull request #250 from iank/smashable_picket_fence
Make picket fence smashable
2013-03-23 12:41:41 -07:00
Williham Totland 63c1f4e90a Merge branch 'hotfix/highway_spawn' of github.com:benjamg/Cataclysm-DDA 2013-03-23 20:38:00 +01:00
Williham Totland a320089556 Merge github.com:TheDarklingWolf/Cataclysm-DDA 2013-03-23 20:24:59 +01:00
benjamg 799b0fc98b use omspec before valid can be used 2013-03-23 19:04:44 +00:00
Kevin Granade 1e6572d07b Merge pull request #248 from benjamg/hotfix/overmap_copy_constructor
fix to make the copy constructor public again. some compilers required it
2013-03-23 11:44:35 -07:00
Your Name 177f547bba Make picket fence smashable 2013-03-23 13:46:18 -04:00
benjamg 2eff3aa0ef fix max and min count checking 2013-03-23 12:49:31 +00:00
Williham Totland 4ea7602be4 Merge github.com:TheDarklingWolf/Cataclysm-DDA 2013-03-23 13:16:37 +01:00
benjamg 95865b3cab seem the std::swap default isn't good for overmap so for now duplicate code 2013-03-23 11:33:03 +00:00
benjamg bfe1bfb2c9 fix to make the copy constructor public again. some compilers required it 2013-03-23 09:37:48 +00:00
Kevin Granade bf4a014b44 Merge pull request #203 from tasetase/opti
Trivial minor optimizations
2013-03-22 21:23:22 -07:00
tasetase d8c07512b6 Reverted bad optimization 2013-03-23 00:18:43 -04:00
tasetase ed68f5c5c8 Merge branch 'opti' of https://github.com/tasetase/DDAtase into opti 2013-03-23 00:14:03 -04:00
tasetase 16cf629aa3 Saved current ter_id in map::drawsq for less ter(x,y) calls 2013-03-22 23:56:00 -04:00
Kevin Granade 2b1e86e87e Trailing whitespace fixups in monstergroups.json. 2013-03-22 21:28:47 -05:00
Kevin Granade 643214d089 Prevent fungal spires from spawning. 2013-03-22 21:28:47 -05:00
Williham Totland c9ca0e653e Merge branch 'master' of git://github.com/TheDarklingWolf/Cataclysm-DDA 2013-03-23 02:31:38 +01:00
Kevin Granade 18d4c6095b Merge pull request #246 from tasetase/glyphs
Fix for glyphs on linux!
2013-03-22 18:23:39 -07:00
Williham Totland 1c6a35d3d0 Merge branch 'glyphs' of git://github.com/tasetase/DDAtase 2013-03-23 02:00:40 +01:00
tasetase 8e9c0bb87a Fixed linux compatibility 2013-03-22 20:54:41 -04:00
Kevin Granade db92fda0a0 Simplify fur and leather production in butcher(). 2013-03-22 19:30:18 -05:00
Kyratzes Talvadore 74cacdba88 Merge pull request #245 from tasetase/glyphs
Use of Extended ASCII, new wall glyphs and corners
2013-03-22 15:39:33 -07:00
tasetase 7fb40f8aa8 Moved the logic to a method 2013-03-22 17:54:59 -04:00
tasetase f11f1c059d Merge remote-tracking branch 'upstream/master' into glyphs 2013-03-22 17:48:38 -04:00
Kyratzes Talvadore 83b5f1f4a2 Merge pull request #244 from wito/new-containers
Beer in kegs in liquor stores and bars
2013-03-22 14:10:51 -07:00
OzoneH3 892bd0d4ff Close overmap with 'm' key. 2013-03-22 21:29:01 +01:00
Williham Totland 3921184c94 Beer in kegs in liquor stores and bars 2013-03-22 21:15:18 +01:00
Kyratzes Talvadore 949698f25b Merge pull request #243 from wito/new-containers
Big jerrycans in hardware stores and garages
2013-03-22 12:56:03 -07:00
Williham Totland ddd8c2bdec Big jerrycans in hardware stores and garages 2013-03-22 20:33:11 +01:00
OzoneH3 0203f7ddfa Merge pull request #242 from benjamg/hotfix/roads
highways now on ground level and not high in the sky
2013-03-22 11:37:20 -07:00
benjamg 6b65d8522f highways now on ground level and not high in the sky 2013-03-22 18:33:20 +00:00
OzoneH3 dea3eea1fe Made windows window borders c_white like their linux equivalents. 2013-03-22 19:18:34 +01:00
tasetase 5061472733 Changed the pipe/dash glyph to E-ASCII equivalent, and implemented a on-draw corner-making 2013-03-21 20:40:04 -04:00
Shoes01 1f2ee09b71 Merge branch 'master' of github.com:TheDarklingWolf/Cataclysm-DDA
Conflicts:
	crafting.cpp
2013-03-20 21:49:44 -07:00
Matias Oksa 902ccce77f Evac shelters as a cherry on top 2013-03-14 22:16:43 +02:00
Matias Oksa e35def251f More roadmap targets, now including: roads 2013-03-14 22:11:20 +02:00
tasetase d735fe501c Additional optimization to update_scent 2013-03-13 19:43:48 -04:00
tasetase 07fdec11c9 Optimized update_scent for less map::move_cost calls 2013-03-13 17:57:40 -04:00
203 changed files with 76791 additions and 24013 deletions
+22
View File
@@ -6,3 +6,25 @@ debug.log
logg.txt
bindist/
cataclysmdda-*
objwin/
cataclysm.exe
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
+11
View File
@@ -0,0 +1,11 @@
language: cpp
compiler:
- gcc
script: make
notifications:
irc: "irc.newnet.net#Cataclysm-DDA"
irc: "irc.freenode.org#Cataclysm-DDA"
use_notice: true
skip_join: true
+8
View File
@@ -0,0 +1,8 @@
Current policy is to update code to the standard style when changing a
substantial portion of it. Blocks of code can be passed through astyle
to ensure that their formatting is correct:
astyle --style=allman --indent=spaces=4 --add-brackets --align-pointer=name -p
For example, from vi, set marks a and b around the block, then:
:'a,'b ! astyle --style=allman --indent=spaces=4 --add-brackets --align-pointer=name
-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-
```
+144
View File
@@ -0,0 +1,144 @@
# Contribute
Contributing to Cataclysm: Dark Days Ahead is easy - simply fork the repository here on GitHub, make your changes, and then send us a pull request.
## Guidelines
There are a couple of guidelines we suggest sticking to:
* Add this repository as an `upstream` remote.
* Keep your `master` branch clean. This means you can easily pull changes made to this repository into yours.
* Create a new branch for each new feature or set of related bug fixes.
* Never merge from your local branches into your `master` branch. Only update that by pulling from `upstream/master`.
## Code Style
Current policy is to only update code to the standard style when changing a substantial portion of it, but **please** do this in a seperate commit. Blocks of code can be passed through astyle to ensure that their formatting is correct:
astyle --style=allman --indent=spaces=4 --add-brackets --align-pointer=name
For example, from vi, set marks a and b around the block, then:
:'a,'b ! astyle --style=allman --indent=spaces=4 --add-brackets --align-pointer=name
## Example Workflow
#### Setup your environment
*(This only needs to be done once.)*
1. Fork this repository here on GitHub.
2. Clone your fork locally.
$ git clone https://github.com/YOUR_USERNAME/Cataclysm-DDA.git
# Clones your fork of the repository into the current directory in terminal
3. Add this repository as a remote.
$ cd Cataclysm-DDA
# Changes the active directory in the prompt to the newly cloned "Cataclysm-DDA" directory
$ git remote add -f upstream https://github.com/TheDarklingWolf/Cataclysm-DDA.git
# Assigns the original repository to a remote called "upstream"
#### Update your `master` branch
1. Make sure you have your `master` branch checked out.
$ git checkout master
2. Pull the changes from the `upstream/master` branch.
$ git pull --ff-only upstream master
# gets changes from "master" branch on the "upstream" remote
* Note: If this gives you an error, it means you have committed directly to your local `master` branch. [Click here for instructions on how to fix this issue](#why-does-git-pull---ff-only-result-in-an-error).
#### Make your changes
0. Update your `master` branch, if you haven't already.
1. For each new feature or bug fix, create a new branch.
$ git branch new_feature
# Creates a new branch called "new_feature"
$ git checkout new_feature
# Makes "new_feature" the active branch
2. Once you've committed some changes locally, you need to push them to your fork here on GitHub.
$ git push origin new_feature
# origin was automatically set to point to your fork when you cloned it
3. Once you're finished working on your branch, and have committed and pushed all your changes, submit a pull request from your `new_feature` branch to this repository's `master` branch.
* Note: any new commits to the `new_feature` branch on GitHub will automatically be included in the pull request, so make sure to only commit related changes to the same branch.
## Advanced Techniques
These guidelines aren't essential, but they can make keeping things in order much easier.
#### Using remote tracking branches
Remote tracking branches allow you to easily stay in touch with this repository's `master` branch, as they automatically know which remote branch to get changes from.
$ git branch -vv
* master xxxx [origin/master] ....
new_feature xxxx ....
Here you can see we have two branches; `master` which is tracking `origin/master`, and `new_feature` which isn't tracking any branch. In practice, what this means is that git won't know where to get changes from.
$ git checkout new_feature
Switched to branch 'new_feature'
$ git pull
There is no tracking information for the current branch.
Please specify which branch you want to merge with.
In order to easily pull changes from `upstream/master` into the `new_feature` branch, we can tell git which branch it should track. (You can even do this for your local master branch.)
$ git branch -u upstream/master new_feature
Branch new_feature set up to track remote branch master from upstream.
$ git pull
Updating xxxx..xxxx
....
You can also set the tracking information at the same time as creating the branch.
$ git branch new_feature_2 --track upstream/master
Branch new_feature_2 set up to track remote branch master from upstream.
* Note: Although this makes it easier to pull from `upstream/master`, it doesn't change anything with regards to pushing. `git push` fails because you don't have permission to push to `upstream/master`.
$ git push
error: The requested URL returned error: 403 while accessing https://github.com/TheDarklingWolf/Cataclysm-DDA.git
fatal: HTTP request failed
$ git push origin
....
To https://github.com/YOUR_USERNAME/Cataclysm-DDA.git
xxxx..xxxx new_feature -> new_feature
## Frequently Asked Questions
####Why does `git pull --ff-only` result in an error?
If `git pull --ff-only` shows an error, it means that you've committed directly to your local `master` branch. To fix this, we create a new branch with these commits, find the point at which we diverged from `upstream/master`, and then reset `master` to that point.
$ git pull --ff-only upstream master
From https://github.com/TheDarklingWolf/Cataclysm-DDA
* branch master -> FETCH_HEAD
fatal: Not possible to fast-forward, aborting.
$ git branch new_branch master # mark the current commit with a tmp branch
$ git merge-base master upstream/master
cc31d0... # the last commit before we committed directly to master
$ git reset --hard cc31d0....
HEAD is now at cc31d0... ...
Now that `master` has been cleaned up, we can easily pull from `upstream/master`, and then continue working on `new_branch`.
$ git pull --ff-only upstream master
# gets changes from the "upstream" remote for the matching branch, in this case "master"
$ git checkout new_branch
+47 -8
View File
@@ -7,15 +7,29 @@
<Option compiler="gcc" />
<Build>
<Target title="Release">
<Option output="bin/Release/Cataclysm" prefix_auto="1" extension_auto="1" />
<Option output="Cataclysm" prefix_auto="1" extension_auto="1" />
<Option object_output="obj/Release/" />
<Option type="1" />
<Option type="0" />
<Option compiler="gcc" />
<Compiler>
<Add option="-O2" />
<Add option="-Os" />
</Compiler>
<Linker>
<Add option="-s" />
<Add option="-Wl,-stack,12000000,-subsystem,windows" />
<Add option="-static -lgdi32" />
</Linker>
</Target>
<Target title="Debug">
<Option output="Cataclysm" prefix_auto="1" extension_auto="1" />
<Option object_output="obj/Debug/" />
<Option type="0" />
<Option compiler="gcc" />
<Compiler>
<Add option="-pg" />
<Add option="-g" />
</Compiler>
<Linker>
<Add option="-pg -lgmon" />
<Add option="-Wl,-stack,12000000,-subsystem,windows" />
<Add option="-static -lgdi32" />
</Linker>
@@ -23,6 +37,7 @@
</Build>
<Unit filename="action.cpp" />
<Unit filename="action.h" />
<Unit filename="addiction.cpp" />
<Unit filename="addiction.h" />
<Unit filename="artifact.cpp" />
<Unit filename="artifact.h" />
@@ -33,10 +48,13 @@
<Unit filename="bionics.h" />
<Unit filename="bodypart.cpp" />
<Unit filename="bodypart.h" />
<Unit filename="building_generation.cpp" />
<Unit filename="building_generation.h" />
<Unit filename="calendar.cpp" />
<Unit filename="calendar.h" />
<Unit filename="catacurse.cpp" />
<Unit filename="catacurse.h" />
<Unit filename="catajson.cpp" />
<Unit filename="catajson.h" />
<Unit filename="color.cpp" />
<Unit filename="color.h" />
<Unit filename="computer.cpp" />
@@ -66,6 +84,10 @@
<Unit filename="graffiti.cpp" />
<Unit filename="graffiti.h" />
<Unit filename="help.cpp" />
<Unit filename="helper.cpp" />
<Unit filename="helper.h" />
<Unit filename="iexamine.cpp" />
<Unit filename="iexamine.h" />
<Unit filename="input.cpp" />
<Unit filename="input.h" />
<Unit filename="inventory.cpp" />
@@ -73,6 +95,10 @@
<Unit filename="inventory_ui.cpp" />
<Unit filename="item.cpp" />
<Unit filename="item.h" />
<Unit filename="item_factory.cpp" />
<Unit filename="item_factory.h" />
<Unit filename="item_group.cpp" />
<Unit filename="item_group.h" />
<Unit filename="itype.h" />
<Unit filename="itypedef.cpp" />
<Unit filename="iuse.cpp" />
@@ -92,8 +118,12 @@
<Unit filename="mapdata.cpp" />
<Unit filename="mapdata.h" />
<Unit filename="mapgen.cpp" />
<Unit filename="mapgenformat.cpp" />
<Unit filename="mapgenformat.h" />
<Unit filename="mapitems.h" />
<Unit filename="mapitemsdef.cpp" />
<Unit filename="material.cpp" />
<Unit filename="material.h" />
<Unit filename="melee.cpp" />
<Unit filename="mission.cpp" />
<Unit filename="mission.h" />
@@ -133,12 +163,16 @@
<Unit filename="output.h" />
<Unit filename="overmap.cpp" />
<Unit filename="overmap.h" />
<Unit filename="overmapbuffer.cpp" />
<Unit filename="overmapbuffer.h" />
<Unit filename="picojson.h" />
<Unit filename="player.cpp" />
<Unit filename="player.h" />
<Unit filename="pldata.h" />
<Unit filename="posix_time.cpp" />
<Unit filename="posix_time.h" />
<Unit filename="profession.cpp" />
<Unit filename="profession.h" />
<Unit filename="ranged.cpp" />
<Unit filename="resource.rc">
<Option compilerVar="WINDRES" />
@@ -151,8 +185,8 @@
<Unit filename="setvector.h" />
<Unit filename="skill.cpp" />
<Unit filename="skill.h" />
<Unit filename="texthash.cpp" />
<Unit filename="texthash.h" />
<Unit filename="text_snippets.cpp" />
<Unit filename="text_snippets.h" />
<Unit filename="tileray.cpp" />
<Unit filename="tileray.h" />
<Unit filename="trap.h" />
@@ -160,15 +194,20 @@
<Unit filename="trapfunc.cpp" />
<Unit filename="tutorial.cpp" />
<Unit filename="tutorial.h" />
<Unit filename="ui.cpp" />
<Unit filename="ui.h" />
<Unit filename="veh_interact.cpp" />
<Unit filename="veh_interact.h" />
<Unit filename="veh_type.h" />
<Unit filename="veh_typedef.cpp" />
<Unit filename="vehicle.cpp" />
<Unit filename="vehicle.h" />
<Unit filename="version.cpp" />
<Unit filename="version.h" />
<Unit filename="weather.cpp" />
<Unit filename="weather.h" />
<Unit filename="weather_data.h" />
<Unit filename="weather_data.cpp" />
<Unit filename="wincurse.cpp" />
<Unit filename="wish.cpp" />
<Extensions>
<code_completion />
+51
View File
@@ -12,6 +12,8 @@
Edit iuse.h and include the function in the class declaration; then edit
iuse.cpp and define your function. Functions may be shared among different
item types.
6) If you do not want NPCs to carry the item, add it to the list called
mapitems[mi_trader_avoid] in mapitemsdef.cpp.
1.2 Adding a monster
1) Edit mtype.h. Change the enum mon_id and insert a unique identifier for
@@ -59,6 +61,52 @@
{ot_toxic_dump, 0, 5, 15, -1, mcat_null, 0, 0, 0, 0, &omspec_place::wilderness,0}
The comments given in source code to structure struct overmap_special explains the meaning of these constants in the example above.
1.4 Adding/editing armour and how armour protection is calculated
1) Edit armor.json and add your armor item near similar types.
2) The fields are:
"type" : "ARMOR", // this must be ARMOR
"id" : "socks", // the identifier used by the game. Must be one continuous word, use underscores if necessary
"name" : "socks", // the name appearing in the examine box. Can be more than one word separated by spaces
"weight" : 1, // weight of armour
"color" : "blue", // ascii character colour
"covers" : ["FEET"], // where it covers. Possible options are TORSO, HEAD, EYES, MOUTH, ARMS, HANDS, LEGS, FEET
"to_hit" : 0, // bonus if using it as a melee weapon (whatever for?)
"storage" : 0, // how many volume storage slots it adds
"symbol" : "[", // ascii character
"description" : "Socks. Put 'em on your feet.", // description of armour
"price" : 100, // price of armour, used when bartering with NPCs
"material" : ["COTTON", "NULL"], // material types. See materials.json for possible options
"volume" : 1, // volume occupied
"cutting" : 0, // cutting damage caused by using it as a melee weapon
"warmth" : 10, // how much warmth clothing provides
"phase" : "solid", // what phase it is
"enviromental_protection" : 0, // how much environmental protection it affords
"rarity" : 70, // determines how often it spawns
"encumberance" : 0, // base encumbrance (unfitted value)
"bashing" : -5, // bashing damage caused by using it as a melee weapon
"flags" : ["VARSIZE"] // used to indicate clothing type which can be fitted. Leave out the flags field entirely if clothing cannot be fitted
"coverage" : 80, // what percentage of body part
"material_thickness" : 1 // thickness of material, in millimetre units (approximately). Generally ranges between 1 - 5, more unusual armour types go up to 10 or more
3) When the player is hit at a specific body part, armour coverage determines whether the armour is hit, or an uncovered part of the player is hit (roll 1d100 against coverage)
4) If the above roll fails (ie roll value is above coverage), then the armour does not absorb any damage from the blow, neither does it become damaged
5) If the above roll succeeds, the armour is hit, possibly absorbing some damage and possibly getting damaged in the process
6) The above steps are repeated for each layer of armour on the body part
7) Armour protects against bash and cut damage. These are determined by multiplying the armour thickness by the material bash/cut resistance factor respectively, given in materials.json
8) If the armour is made from 2 materials types, then it takes a weighted average of the primary material (66%) and secondary material (33%).
9) Materials resistance factors are given relative to PAPER as a material (this probably needs some fine-tuning for balance).
1.5 Acid resistance
This determines how items react to acid fields. Item acid resistances are a weighted
average of the materials acid resistance (see item::acid_resist).
An item acid resistance of zero means it will get corroded every turn
An item acid resistance above zero means it has a chance of getting corroded every turn
An item acid resistance above 9 means completely acidproof
Acid resistance values are in materials.json, and defined as such:
0 - zero resistance to acid (metals)
1 - partly resistant to acid
2 - very resistant to acid
3 - complete acid resistance
FAQ
Q: What the heck is up with the map objects?
@@ -80,3 +128,6 @@ An overmap encapsulates the large-scale structure of a map
There are an arbitrary number of overmaps
Additional overmaps are generated as the player enters new areas.
FAQ
Q: what is the relation of NPCS/Monsters vs maps. How are they stored, where are they stored? Are they stored?
A: All npcs are now stored in the overmap. Active npcs only contain the currently active npcs. There is a difference between npc active npc coordinates, and overmap coordinates. So these will need to be changed when saving the npcs. Or else the npcs will be saved at the wrong location. And yes they are stored.
+1
View File
@@ -0,0 +1 @@
Cataclysm is licensed under the Creative Commons Attribution-ShareAlike 3.0 Unported License. To view a copy of this license, visit http://creativecommons.org/licenses/by-sa/3.0/ or send a letter to Creative Commons, 444 Castro Street, Suite 900, Mountain View, California, 94041, USA.
+97 -22
View File
@@ -7,23 +7,30 @@
# make NATIVE=linux32
# Linux cross-compile to Win32
# make CROSS=i686-pc-mingw32-
# or make CROSS=i586-mingw32msvc-
# or whichever prefix your crosscompiler uses
# as long as its name contains mingw32
# Win32
# Run: make NATIVE=win32
# OS X
# Run: make NATIVE=osx
# Build types:
# Debug (no optimizations)
# Default
# Release (turn on optimizations)
# make RELEASE=1
# Tiles (uses SDL rather than ncurses)
# make TILES=1
# comment these to toggle them as one sees fit.
# WARNINGS will spam hundreds of warnings, mostly safe, if turned on
# DEBUG is best turned on if you plan to debug in gdb -- please do!
# PROFILE is for use with gprof or a similar program -- don't bother generally
#WARNINGS = -Wall -Wextra -Wno-switch -Wno-sign-compare -Wno-missing-braces -Wno-unused-parameter -Wno-char-subscripts
WARNINGS = -Wall -Wextra -Wno-switch -Wno-sign-compare -Wno-missing-braces -Wno-unused-parameter -Wno-psabi
# Uncomment below to disable warnings
WARNINGS = -w
#WARNINGS = -w
DEBUG = -g
#PROFILE = -pg
#OTHERS = -O3
@@ -44,18 +51,28 @@ DEBUG = -g
#DEFINES += -DDEBUG_ENABLE_MAP_GEN
#DEFINES += -DDEBUG_ENABLE_GAME
VERSION = 0.3
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)
CXX = $(CROSS)g++
LD = $(CROSS)g++
# enable optimizations. slow to build
ifdef RELEASE
@@ -63,47 +80,88 @@ ifdef RELEASE
DEBUG =
endif
CXXFLAGS = $(WARNINGS) $(DEBUG) $(PROFILE) $(OTHERS) -MMD
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
#ifeq ($(OS), Msys)
# LDFLAGS = -static -lpdcurses
#else
LDFLAGS = -lncurses
# LDFLAGS += -lncurses
#endif
# Check if called without a special build target
ifeq ($(NATIVE),)
ifeq ($(CROSS),)
TARGETSYSTEM=LINUX
endif
endif
# Linux 64-bit
ifeq ($(NATIVE), linux64)
CXXFLAGS += -m64
TARGETSYSTEM=LINUX
else
# Linux 32-bit
ifeq ($(NATIVE), linux32)
CXXFLAGS += -m32
TARGETSYSTEM=LINUX
endif
endif
# OSX
ifeq ($(NATIVE), osx)
CXXFLAGS += -mmacosx-version-min=10.6
TARGETSYSTEM=LINUX
endif
# Win32 (mingw32?)
ifeq ($(NATIVE), win32)
TARGET = $(W32TARGET)
BINDIST = $(W32BINDIST)
BINDIST_CMD = $(W32BINDIST_CMD)
ODIR = $(W32ODIR)
W32LDFLAGS = -Wl,-stack,12000000,-subsystem,windows
LDFLAGS += -static -lgdi32
TARGETSYSTEM=WINDOWS
endif
# MXE cross-compile to win32
ifeq ($(CROSS), i686-pc-mingw32-)
ifneq (,$(findstring mingw32,$(CROSS)))
DEFINES += -DCROSS_LINUX
TARGETSYSTEM=WINDOWS
endif
# Global settings for Windows targets
ifeq ($(TARGETSYSTEM),WINDOWS)
TARGET = $(W32TARGET)
BINDIST = $(W32BINDIST)
BINDIST_CMD = $(W32BINDIST_CMD)
ODIR = $(W32ODIR)
LDFLAGS += -lgdi32
LDFLAGS += -static -lgdi32
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)
@@ -111,15 +169,23 @@ HEADERS = $(wildcard *.h)
_OBJS = $(SOURCES:.cpp=.o)
OBJS = $(patsubst %,$(ODIR)/%,$(_OBJS))
all: $(TARGET)
all: version $(TARGET)
@
$(TARGET): $(ODIR) $(DDIR) $(OBJS)
$(CXX) $(W32FLAGS) -o $(TARGET) $(DEFINES) $(CXXFLAGS) \
$(LD) $(W32FLAGS) -o $(TARGET) $(DEFINES) $(CXXFLAGS) \
$(OBJS) $(LDFLAGS)
.PHONY: version
version:
@( VERSION_STRING=$(VERSION) ; \
[ -e ".git" ] && GITVERSION=$$( git describe --tags --always --dirty --match "[0-9]*.[0-9]*" ) && VERSION_STRING=$$GITVERSION ; \
[ -e "version.h" ] && OLDVERSION=$$(grep VERSION version.h|cut -d '"' -f2) ; \
if [ "x$$VERSION_STRING" != "x$$OLDVERSION" ]; then echo "#define VERSION \"$$VERSION_STRING\"" | tee version.h ; fi \
)
$(ODIR):
mkdir $(ODIR)
mkdir -p $(ODIR)
$(DDIR):
@mkdir $(DDIR)
@@ -127,10 +193,13 @@ $(DDIR):
$(ODIR)/%.o: %.cpp
$(CXX) $(DEFINES) $(CXXFLAGS) -c $< -o $@
clean:
rm -f $(TARGET) $(W32TARGET) $(ODIR)/*.o $(ODIR)/*.d $(W32ODIR)/*.o $(W32BINDIST) \
version.cpp: version
clean: clean-tests
rm -rf $(TARGET) $(W32TARGET) $(ODIR) $(W32ODIR) $(W32BINDIST) \
$(BINDIST)
rm -rf $(BINDIST_DIR)
rm -f version.h
bindist: $(BINDIST)
@@ -145,13 +214,19 @@ export ODIR _OBJS LDFLAGS CXX W32FLAGS DEFINES CXXFLAGS
ctags: $(SOURCES) $(HEADERS)
ctags $(SOURCES) $(HEADERS)
etags: $(SOURCES) $(HEADERS)
etags $(SOURCES) $(HEADERS)
tests: $(ODIR) $(DDIR) $(OBJS)
$(MAKE) -C tests
check: tests
$(MAKE) -C tests check
.PHONY: tests check
clean-tests:
$(MAKE) -C tests clean
.PHONY: tests check ctags etags clean-tests
-include $(SOURCES:%.cpp=$(DEPDIR)/%.P)
-include ${OBJS:.o=.d}
+9 -1
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,13 +31,15 @@ LDFLAGS = -static -lgdi32
SOURCES = $(wildcard *.cpp)
_OBJS = $(SOURCES:.cpp=.o)
RSRC = $(wildcard *.rc)
_OBJS += $(RSRC:.rc=.res)
OBJS = $(patsubst %,$(ODIR)/%,$(_OBJS))
all: $(TARGET)
@
$(TARGET): $(ODIR) $(DDIR) $(OBJS)
$(CXX) $(LINKERFLAGS) -o $(TARGET) $(CFLAGS) $(OBJS) $(LDFLAGS)
$(CXX) $(LINKERFLAGS) -o $(TARGET) $(CFLAGS) $(OBJS) $(LDFLAGS) -DMINGW
$(ODIR):
mkdir $(ODIR)
@@ -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)
+1 -1
View File
@@ -39,7 +39,7 @@ game also has extensive documentation via the ? command. Pressing ?1 will list
all the key commands, which is a good place to start.
To submit a bug, complaint, feature request, or praise, please send them via
email to fivedozenwhales@gmail.com. You can also submit problem reports and
email to TheDarklingWolf@gmail.com. You can also submit problem reports and
patches at the github repository at http://github.com/Whales/Cataclysm .
I strive to include as many feature requests as possible, and if you submit one
+38 -9
View File
@@ -1,13 +1,42 @@
Cataclysm: Dark Days Ahead
==========================
You emerge from the shelter into the dim light of an overcast day, and look around for the first time since the disaster.
The world as you knew it is gone. A ruined world stands in its place, full of nightmares come to life. Nothing can ever go back to the way it was, before the Cataclysm, but you have to be strong. You have to survive. You have to persevere. If you don't, death will be one of the better outcomes.
Above your head, storm clouds gather, and the rain stings and hisses against your skin. You shoulder your backpack, and start walking. The world has gone to hell, but you get the sinking feeling that there are darker days ahead.
# Cataclysm: Dark Days Ahead
Cataclysm: Dark Days Ahead is a roguelike set in a post-apocalyptic world. While some have described it as a "zombie game", there's far more to Cataclysm than that. Struggle to survive in a harsh, persistant, procedurally generated world. Scavenge the remnants of a dead civilization for for food, equipment, or, if you're lucky, a vehicle with a full tank of gas to get you the hell out of Dodge. Fight to defeat or escape from a wide variety of powerful monstrosities, from zombies to giant insects to killer robots and things far stranger and deadlier, and against the others like yourself, that want what you have...
Build the tools and defenses you will need to overcome the challenges you face, from a strongly fortified lair full of customized firearms and surrounded by pits and landmines, to a mobile, gasoline powered blade spinning fortress of death, tearing apart anything stupid enough to get in the way. And finally, improve! Learn skills to help you survive, acquire mind-bending mutations, and convert your own body into a cybernetic masterpiece.
Make no mistake - there is no other game quite like Cataclysm. How long can you survive?
## Download
The following binary releases are available:
* [Windows Executable](http://www.cataclysmdda.com/Downloads/CataDDA0.4.zip)
* [OS X 10.6+ Executable](http://www.cataclysm.glyphgryph.com/Downloads/CataDDA0.4.tar.gz)
The source can either be downloaded as [an archive](https://github.com/TheDarklingWolf/Cataclysm-DDA/archive/master.zip), or you can clone it from [our GitHub repository](https://github.com/TheDarklingWolf/Cataclysm-DDA/).
## Compile
The latest instructions on how to compile can be found on [our wiki](http://www.wiki.cataclysmdda.com/index.php?title=How_to_compile).
## Contribute
Please see [CONTRIBUTING.md](https://github.com/TheDarklingWolf/Cataclysm-DDA/blob/master/CONTRIBUTING.md) for details.
## Frequently Asked Questions
#### Is there a tutorial?
Yes, you can find the tutorial in the **Special** menu at the main menu. You can also access documentation in-game via the **?** key.
#### How can I change the key bindings?
Press the `?` key, followed by the `1` key to see the full list of key commands. Press the `+` key to add a key binding, select which action with the corresponding letter key `a-w`, and then the key you wish to assign to that action.
#### How can I start a new world?
Simply delete the **save** folder, which can be found in the same directory as the executable.
#### I've found a bug / I would like to make a suggestion. What should I do?
Please submit an issue on [our GitHub page](https://github.com/TheDarklingWolf/Cataclysm-DDA/issues/). If you're not able to, send an email to `TheDarklingWolf@gmail.com`.
+28
View File
@@ -0,0 +1,28 @@
The undersigned release all their contributions to the Cataclysm project under the Creative Commons Attribution-ShareAlike 3.0 Unported License.
Kevin Granade <kevin.granade@gmail.com>
Matthew Moffatt <TheDarklingWolf@gmail.com>
origamiwolf <origamiwolf@gmail.com>
Frank Huard <veryinky@gmail.com>
daftfad <daftfjord@gmail.com>
ZwodahS <ericnjf@gmail.com>
Williham "Wito" Totland <williham.totland@gmail.com>
Zach Morgan <zpmorgan@gmail.com>
Livingstone <minexal@gmail.com>
Ethan "Soron" Kaminski <ethan.kaminski@gmail.com>
Soyweiser <soyweiser@gmail.com>
Jason Gilbert <0jason.gilbert@gmail.com>
Charlie Nolan (FunnyMan3595) <funnyman3595@gmail.com>
uzername (some_name) <ivanpost777@gmail.com>
Christian Buskirk (i2amroy) <i2amroy@gmail.com>
Kevin McKayven (GlyphGryph) <glyphgryph@gmail.com>
Ozone <satori.jj@gmail.com>
Herbert Jones <jones.herbert@gmail.com>
Justin "MacrosBlackD" Drury <macrosblackd@gmail.com>
AtomicDryad <fnord@fnord> / <atomicdryad@gmail.com>
Izicata
Voker57 <voker57@gmail.com>
Tommy <yobbobanana@gmx.com>
teh-sam
Alex Casey (Tamunshin) <tamunshin@hotmail.com>
Stevensonz <money3030@yahoo.com.>
+6
View File
@@ -0,0 +1,6 @@
There's a slowly growing test suite in tests/. To build install libtap
from http://www.shlomifish.org/open-source/projects/libtap/ *, then build
the "check" target. e.g. "make check". This builds and runs any tests.
*Unpack the tarball with "gunzip tap-1.03.tar.gz && tar xf tap-1.03.tar"
instead of the usual tar command.
+376 -315
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,20 +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.peek() != '\n' && !fin.eof()) {
char ch;
fin >> ch;
if (keymap.find(ch) != keymap.end())
debugmsg("\
while (!keymap_txt.eof()) {
char ch;
keymap_txt >> std::noskipws >> ch >> std::skipws;
if (ch == '\n') {
break;
} else if (ch != ' ' || keymap_txt.peek() == '\n') {
if (kmap.find(ch) != kmap.end()) {
debugmsg("\
Warning! '%c' assigned twice in the keymap!\n\
%s is being ignored.\n\
Fix data/keymap.txt at your next chance!", ch, id.c_str());
else
keymap[ ch ] = act;
} else {
kmap[ ch ] = act;
}
}
}
}
} else {
getline(fin, id); // Clear the whole line
getline(keymap_txt, id); // Clear the whole line
}
}
}
@@ -88,315 +128,336 @@ void game::clear_bindings(action_id act)
std::string action_ident(action_id act)
{
switch (act) {
case ACTION_PAUSE:
return "pause";
case ACTION_MOVE_N:
return "move_n";
case ACTION_MOVE_NE:
return "move_ne";
case ACTION_MOVE_E:
return "move_e";
case ACTION_MOVE_SE:
return "move_se";
case ACTION_MOVE_S:
return "move_s";
case ACTION_MOVE_SW:
return "move_sw";
case ACTION_MOVE_W:
return "move_w";
case ACTION_MOVE_NW:
return "move_nw";
case ACTION_MOVE_DOWN:
return "move_down";
case ACTION_MOVE_UP:
return "move_up";
case ACTION_CENTER:
return "center";
case ACTION_SHIFT_N:
return "shift_n";
case ACTION_SHIFT_NE:
return "shift_ne";
case ACTION_SHIFT_E:
return "shift_e";
case ACTION_SHIFT_SE:
return "shift_se";
case ACTION_SHIFT_S:
return "shift_s";
case ACTION_SHIFT_SW:
return "shift_sw";
case ACTION_SHIFT_W:
return "shift_w";
case ACTION_SHIFT_NW:
return "shift_nw";
case ACTION_OPEN:
return "open";
case ACTION_CLOSE:
return "close";
case ACTION_SMASH:
return "smash";
case ACTION_EXAMINE:
return "examine";
case ACTION_PICKUP:
return "pickup";
case ACTION_BUTCHER:
return "butcher";
case ACTION_CHAT:
return "chat";
case ACTION_LOOK:
return "look";
case ACTION_PEEK:
return "peek";
case ACTION_LIST_ITEMS:
return "listitems";
case ACTION_INVENTORY:
return "inventory";
case ACTION_COMPARE:
return "compare";
case ACTION_ORGANIZE:
return "organize";
case ACTION_USE:
return "apply";
case ACTION_USE_WIELDED:
return "apply_wielded";
case ACTION_WEAR:
return "wear";
case ACTION_TAKE_OFF:
return "take_off";
case ACTION_EAT:
return "eat";
case ACTION_READ:
return "read";
case ACTION_WIELD:
return "wield";
case ACTION_PICK_STYLE:
return "pick_style";
case ACTION_RELOAD:
return "reload";
case ACTION_UNLOAD:
return "unload";
case ACTION_THROW:
return "throw";
case ACTION_FIRE:
return "fire";
case ACTION_FIRE_BURST:
return "fire_burst";
case ACTION_SELECT_FIRE_MODE:
return "select_fire_mode";
case ACTION_DROP:
return "drop";
case ACTION_DIR_DROP:
return "drop_adj";
case ACTION_BIONICS:
return "bionics";
case ACTION_WAIT:
return "wait";
case ACTION_CRAFT:
return "craft";
case ACTION_CONSTRUCT:
return "construct";
case ACTION_DISASSEMBLE:
return "disassemble";
case ACTION_SLEEP:
return "sleep";
case ACTION_TOGGLE_SAFEMODE:
return "safemode";
case ACTION_TOGGLE_AUTOSAFE:
return "autosafe";
case ACTION_IGNORE_ENEMY:
return "ignore_enemy";
case ACTION_SAVE:
return "save";
case ACTION_QUIT:
return "quit";
case ACTION_PL_INFO:
return "player_data";
case ACTION_MAP:
return "map";
case ACTION_MISSIONS:
return "missions";
case ACTION_FACTIONS:
return "factions";
case ACTION_KILLS:
return "kills";
case ACTION_MORALE:
return "morale";
case ACTION_MESSAGES:
return "messages";
case ACTION_HELP:
return "help";
case ACTION_DEBUG:
return "debug";
case ACTION_DISPLAY_SCENT:
return "debug_scent";
case ACTION_TOGGLE_DEBUGMON:
return "debug_mode";
case ACTION_NULL:
return "null";
case ACTION_RECRAFT:
return "recraft";
}
return "unknown";
}
switch (act) {
case ACTION_PAUSE:
return "pause";
case ACTION_MOVE_N:
return "move_n";
case ACTION_MOVE_NE:
return "move_ne";
case ACTION_MOVE_E:
return "move_e";
case ACTION_MOVE_SE:
return "move_se";
case ACTION_MOVE_S:
return "move_s";
case ACTION_MOVE_SW:
return "move_sw";
case ACTION_MOVE_W:
return "move_w";
case ACTION_MOVE_NW:
return "move_nw";
case ACTION_MOVE_DOWN:
return "move_down";
case ACTION_MOVE_UP:
return "move_up";
case ACTION_CENTER:
return "center";
case ACTION_SHIFT_N:
return "shift_n";
case ACTION_SHIFT_NE:
return "shift_ne";
case ACTION_SHIFT_E:
return "shift_e";
case ACTION_SHIFT_SE:
return "shift_se";
case ACTION_SHIFT_S:
return "shift_s";
case ACTION_SHIFT_SW:
return "shift_sw";
case ACTION_SHIFT_W:
return "shift_w";
case ACTION_SHIFT_NW:
return "shift_nw";
case ACTION_OPEN:
return "open";
case ACTION_CLOSE:
return "close";
case ACTION_SMASH:
return "smash";
case ACTION_EXAMINE:
return "examine";
case ACTION_ADVANCEDINV:
return "advinv";
case ACTION_PICKUP:
return "pickup";
case ACTION_BUTCHER:
return "butcher";
case ACTION_CHAT:
return "chat";
case ACTION_LOOK:
return "look";
case ACTION_PEEK:
return "peek";
case ACTION_LIST_ITEMS:
return "listitems";
case ACTION_INVENTORY:
return "inventory";
case ACTION_COMPARE:
return "compare";
case ACTION_ORGANIZE:
return "organize";
case ACTION_USE:
return "apply";
case ACTION_USE_WIELDED:
return "apply_wielded";
case ACTION_WEAR:
return "wear";
case ACTION_TAKE_OFF:
return "take_off";
case ACTION_EAT:
return "eat";
case ACTION_READ:
return "read";
case ACTION_WIELD:
return "wield";
case ACTION_PICK_STYLE:
return "pick_style";
case ACTION_RELOAD:
return "reload";
case ACTION_UNLOAD:
return "unload";
case ACTION_THROW:
return "throw";
case ACTION_FIRE:
return "fire";
case ACTION_FIRE_BURST:
return "fire_burst";
case ACTION_SELECT_FIRE_MODE:
return "select_fire_mode";
case ACTION_DROP:
return "drop";
case ACTION_DIR_DROP:
return "drop_adj";
case ACTION_BIONICS:
return "bionics";
case ACTION_SORT_ARMOR:
return "sort_armor";
case ACTION_WAIT:
return "wait";
case ACTION_CRAFT:
return "craft";
case ACTION_RECRAFT:
return "recraft";
case ACTION_LONGCRAFT:
return "long_craft";
case ACTION_CONSTRUCT:
return "construct";
case ACTION_DISASSEMBLE:
return "disassemble";
case ACTION_SLEEP:
return "sleep";
case ACTION_CONTROL_VEHICLE:
return "control_vehicle";
case ACTION_TOGGLE_SAFEMODE:
return "safemode";
case ACTION_TOGGLE_AUTOSAFE:
return "autosafe";
case ACTION_IGNORE_ENEMY:
return "ignore_enemy";
case ACTION_SAVE:
return "save";
case ACTION_QUIT:
return "quit";
case ACTION_PL_INFO:
return "player_data";
case ACTION_MAP:
return "map";
case ACTION_MISSIONS:
return "missions";
case ACTION_FACTIONS:
return "factions";
case ACTION_KILLS:
return "kills";
case ACTION_MORALE:
return "morale";
case ACTION_MESSAGES:
return "messages";
case ACTION_HELP:
return "help";
case ACTION_DEBUG:
return "debug";
case ACTION_DISPLAY_SCENT:
return "debug_scent";
case ACTION_TOGGLE_DEBUGMON:
return "debug_mode";
case ACTION_NULL:
return "null";
}
return "unknown";
}
action_id look_up_action(std::string ident)
{
for (int i = 0; i < NUM_ACTIONS; i++) {
if (action_ident( action_id(i) ) == ident)
return action_id(i);
}
return ACTION_NULL;
for (int i = 0; i < NUM_ACTIONS; i++)
{
if (action_ident( action_id(i) ) == ident)
{
return action_id(i);
}
}
return ACTION_NULL;
}
std::string action_name(action_id act)
{
switch (act) {
case ACTION_PAUSE:
return "Pause";
case ACTION_MOVE_N:
return "Move North";
case ACTION_MOVE_NE:
return "Move Northeast";
case ACTION_MOVE_E:
return "Move East";
case ACTION_MOVE_SE:
return "Move Southeast";
case ACTION_MOVE_S:
return "Move South";
case ACTION_MOVE_SW:
return "Move Southwest";
case ACTION_MOVE_W:
return "Move West";
case ACTION_MOVE_NW:
return "Move Northwest";
case ACTION_MOVE_DOWN:
return "Descend Stairs";
case ACTION_MOVE_UP:
return "Ascend Stairs";
case ACTION_CENTER:
return "Center View";
case ACTION_SHIFT_N:
return "Move View North";
case ACTION_SHIFT_NE:
return "Move View Northeast";
case ACTION_SHIFT_E:
return "Move View East";
case ACTION_SHIFT_SE:
return "Move View Southeast";
case ACTION_SHIFT_S:
return "Move View South";
case ACTION_SHIFT_SW:
return "Move View Southwest";
case ACTION_SHIFT_W:
return "Move View West";
case ACTION_SHIFT_NW:
return "Move View Northwest";
case ACTION_OPEN:
return "Open Door";
case ACTION_CLOSE:
return "Close Door";
case ACTION_SMASH:
return "Smash Nearby Terrain";
case ACTION_EXAMINE:
return "Examine Nearby Terrain";
case ACTION_PICKUP:
return "Pick Item(s) Up";
case ACTION_BUTCHER:
return "Butcher";
case ACTION_CHAT:
return "Chat with NPC";
case ACTION_LOOK:
return "Look Around";
case ACTION_PEEK:
return "Peek Around Corners";
case ACTION_LIST_ITEMS:
return "List all items around the player";
case ACTION_INVENTORY:
return "Open Inventory";
case ACTION_COMPARE:
return "Compare two Items";
case ACTION_ORGANIZE:
return "Swap Inventory Letters";
case ACTION_USE:
return "Apply or Use Item";
case ACTION_USE_WIELDED:
return "Apply or Use Wielded Item";
case ACTION_WEAR:
return "Wear Item";
case ACTION_TAKE_OFF:
return "Take Off Worn Item";
case ACTION_EAT:
return "Eat";
case ACTION_READ:
return "Read";
case ACTION_WIELD:
return "Wield";
case ACTION_PICK_STYLE:
return "Select Unarmed Style";
case ACTION_RELOAD:
return "Reload Wielded Item";
case ACTION_UNLOAD:
return "Unload or Empty Wielded Item";
case ACTION_THROW:
return "Throw Item";
case ACTION_FIRE:
return "Fire Wielded Item";
case ACTION_FIRE_BURST:
return "Burst-Fire Wielded Item";
case ACTION_SELECT_FIRE_MODE:
return "Toggle attack mode of Wielded Item";
case ACTION_DROP:
return "Drop Item";
case ACTION_DIR_DROP:
return "Drop Item to Adjacent Tile";
case ACTION_BIONICS:
return "View/Activate Bionics";
case ACTION_WAIT:
return "Wait for Several Minutes";
case ACTION_CRAFT:
return "Craft Items";
case ACTION_CONSTRUCT:
return "Construct Terrain";
case ACTION_DISASSEMBLE:
return "Disassemble items";
case ACTION_SLEEP:
return "Sleep";
case ACTION_TOGGLE_SAFEMODE:
return "Toggle Safemode";
case ACTION_TOGGLE_AUTOSAFE:
return "Toggle Auto-Safemode";
case ACTION_IGNORE_ENEMY:
return "Ignore Nearby Enemy";
case ACTION_SAVE:
return "Save and Quit";
case ACTION_QUIT:
return "Commit Suicide";
case ACTION_PL_INFO:
return "View Player Info";
case ACTION_MAP:
return "View Map";
case ACTION_MISSIONS:
return "View Missions";
case ACTION_FACTIONS:
return "View Factions";
case ACTION_KILLS:
return "View Kills";
case ACTION_MORALE:
return "View Morale";
case ACTION_MESSAGES:
return "View Message Log";
case ACTION_HELP:
return "View Help";
case ACTION_DEBUG:
return "Debug Menu";
case ACTION_DISPLAY_SCENT:
return "View Scentmap";
case ACTION_TOGGLE_DEBUGMON:
return "Toggle Debug Messages";
case ACTION_NULL:
return "No Action";
case ACTION_RECRAFT:
return "Recraft last recipe";
}
return "Someone forgot to name an action.";
switch (act)
{
case ACTION_PAUSE:
return "Pause";
case ACTION_MOVE_N:
return "Move North";
case ACTION_MOVE_NE:
return "Move Northeast";
case ACTION_MOVE_E:
return "Move East";
case ACTION_MOVE_SE:
return "Move Southeast";
case ACTION_MOVE_S:
return "Move South";
case ACTION_MOVE_SW:
return "Move Southwest";
case ACTION_MOVE_W:
return "Move West";
case ACTION_MOVE_NW:
return "Move Northwest";
case ACTION_MOVE_DOWN:
return "Descend Stairs";
case ACTION_MOVE_UP:
return "Ascend Stairs";
case ACTION_CENTER:
return "Center View";
case ACTION_SHIFT_N:
return "Move View North";
case ACTION_SHIFT_NE:
return "Move View Northeast";
case ACTION_SHIFT_E:
return "Move View East";
case ACTION_SHIFT_SE:
return "Move View Southeast";
case ACTION_SHIFT_S:
return "Move View South";
case ACTION_SHIFT_SW:
return "Move View Southwest";
case ACTION_SHIFT_W:
return "Move View West";
case ACTION_SHIFT_NW:
return "Move View Northwest";
case ACTION_OPEN:
return "Open Door";
case ACTION_CLOSE:
return "Close Door";
case ACTION_SMASH:
return "Smash Nearby Terrain";
case ACTION_EXAMINE:
return "Examine Nearby Terrain";
case ACTION_PICKUP:
return "Pick Item(s) Up";
case ACTION_BUTCHER:
return "Butcher";
case ACTION_CHAT:
return "Chat with NPC";
case ACTION_LOOK:
return "Look Around";
case ACTION_PEEK:
return "Peek Around Corners";
case ACTION_LIST_ITEMS:
return "List all items around the player";
case ACTION_INVENTORY:
return "Open Inventory";
case ACTION_ADVANCEDINV:
return "Advanced Inventory management";
case ACTION_COMPARE:
return "Compare two Items";
case ACTION_ORGANIZE:
return "Swap Inventory Letters";
case ACTION_USE:
return "Apply or Use Item";
case ACTION_USE_WIELDED:
return "Apply or Use Wielded Item";
case ACTION_WEAR:
return "Wear Item";
case ACTION_TAKE_OFF:
return "Take Off Worn Item";
case ACTION_EAT:
return "Eat";
case ACTION_READ:
return "Read";
case ACTION_WIELD:
return "Wield";
case ACTION_PICK_STYLE:
return "Select Unarmed Style";
case ACTION_RELOAD:
return "Reload Wielded Item";
case ACTION_UNLOAD:
return "Unload or Empty Wielded Item";
case ACTION_THROW:
return "Throw Item";
case ACTION_FIRE:
return "Fire Wielded Item";
case ACTION_FIRE_BURST:
return "Burst-Fire Wielded Item";
case ACTION_SELECT_FIRE_MODE:
return "Toggle attack mode of Wielded Item";
case ACTION_DROP:
return "Drop Item";
case ACTION_DIR_DROP:
return "Drop Item to Adjacent Tile";
case ACTION_BIONICS:
return "View/Activate Bionics";
case ACTION_SORT_ARMOR:
return "Re-layer armour/clothing";
case ACTION_WAIT:
return "Wait for Several Minutes";
case ACTION_CRAFT:
return "Craft Items";
case ACTION_RECRAFT:
return "Recraft last recipe";
case ACTION_LONGCRAFT:
return "Craft as long as possible";
case ACTION_CONSTRUCT:
return "Construct Terrain";
case ACTION_DISASSEMBLE:
return "Disassemble items";
case ACTION_SLEEP:
return "Sleep";
case ACTION_CONTROL_VEHICLE:
return "Control Vehicle";
case ACTION_TOGGLE_SAFEMODE:
return "Toggle Safemode";
case ACTION_TOGGLE_AUTOSAFE:
return "Toggle Auto-Safemode";
case ACTION_IGNORE_ENEMY:
return "Ignore Nearby Enemy";
case ACTION_SAVE:
return "Save and Quit";
case ACTION_QUIT:
return "Commit Suicide";
case ACTION_PL_INFO:
return "View Player Info";
case ACTION_MAP:
return "View Map";
case ACTION_MISSIONS:
return "View Missions";
case ACTION_FACTIONS:
return "View Factions";
case ACTION_KILLS:
return "View Kills";
case ACTION_MORALE:
return "View Morale";
case ACTION_MESSAGES:
return "View Message Log";
case ACTION_HELP:
return "View Help";
case ACTION_DEBUG:
return "Debug Menu";
case ACTION_DISPLAY_SCENT:
return "View Scentmap";
case ACTION_TOGGLE_DEBUGMON:
return "Toggle Debug Messages";
case ACTION_NULL:
return "No Action";
}
return "Someone forgot to name an action.";
}
+4
View File
@@ -38,6 +38,7 @@ ACTION_PEEK,
ACTION_LIST_ITEMS,
// Inventory Interaction (including quasi-inventories like bionics)
ACTION_INVENTORY,
ACTION_ADVANCEDINV,
ACTION_COMPARE,
ACTION_ORGANIZE,
ACTION_USE,
@@ -57,13 +58,16 @@ ACTION_SELECT_FIRE_MODE,
ACTION_DROP,
ACTION_DIR_DROP,
ACTION_BIONICS,
ACTION_SORT_ARMOR,
// Long-term / special actions
ACTION_WAIT,
ACTION_CRAFT,
ACTION_RECRAFT,
ACTION_LONGCRAFT,
ACTION_CONSTRUCT,
ACTION_DISASSEMBLE,
ACTION_SLEEP,
ACTION_CONTROL_VEHICLE,
ACTION_TOGGLE_SAFEMODE,
ACTION_TOGGLE_AUTOSAFE,
ACTION_IGNORE_ENEMY,
+227
View File
@@ -0,0 +1,227 @@
#include "addiction.h"
void addict_effect(game *g, addiction &add)
{
int in = add.intensity;
switch (add.type) {
case ADD_CIG:
if (in > 20 || one_in((500 - 20 * in))) {
g->add_msg("You %s a cigarette.",
rng(0, 6) < in ? "need" : "could use");
g->cancel_activity_query("You have a nicotine craving.");
g->u.add_morale(MORALE_CRAVING_NICOTINE, -15, -50);
if (one_in(800 - 50 * in))
g->u.fatigue++;
if (one_in(400 - 20 * in))
g->u.stim--;
}
break;
case ADD_CAFFEINE:
g->u.moves -= 2;
if (in > 20 || one_in((500 - 20 * in))) {
g->add_msg("You want some caffeine.");
g->cancel_activity_query("You have a caffeine craving.");
g->u.add_morale(MORALE_CRAVING_CAFFEINE, -5, -30);
if (rng(0, 10) < in)
g->u.stim--;
if (rng(8, 400) < in) {
g->add_msg("Your hands start shaking... you need it bad!");
g->u.add_disease(DI_SHAKES, 20, g);
}
}
break;
case ADD_ALCOHOL:
g->u.per_cur--;
g->u.int_cur--;
if (rng(40, 1200) <= in * 10)
g->u.health--;
if (one_in(20) && rng(0, 20) < in) {
g->add_msg("You could use a drink.");
g->cancel_activity_query("You have an alcohol craving.");
g->u.add_morale(MORALE_CRAVING_ALCOHOL, -35, -120);
} else if (rng(8, 300) < in) {
g->add_msg("Your hands start shaking... you need a drink bad!");
g->cancel_activity_query("You have an alcohol craving.");
g->u.add_morale(MORALE_CRAVING_ALCOHOL, -35, -120);
g->u.add_disease(DI_SHAKES, 50, g);
} else if (!g->u.has_disease(DI_HALLU) && rng(10, 1600) < in)
g->u.add_disease(DI_HALLU, 3600, g);
break;
case ADD_SLEEP:
// No effects here--just in player::can_sleep()
// EXCEPT! Prolong this addiction longer than usual.
if (one_in(2) && add.sated < 0)
add.sated++;
break;
case ADD_PKILLER:
if ((in >= 25 || int(g->turn) % (100 - in * 4) == 0) && g->u.pkill > 0)
g->u.pkill--; // Tolerance increases!
if (g->u.pkill >= 35) // No further effects if we're doped up.
add.sated = 0;
else {
g->u.str_cur -= 1 + int(in / 7);
g->u.per_cur--;
g->u.dex_cur--;
if (g->u.pain < in * 3)
g->u.pain++;
if (in >= 40 || one_in((1200 - 30 * in)))
g->u.health--;
if (one_in(20) && dice(2, 20) < in) {
g->add_msg("Your hands start shaking... you need some painkillers.");
g->cancel_activity_query("You have an opiate craving.");
g->u.add_morale(MORALE_CRAVING_OPIATE, -40, -200);
g->u.add_disease(DI_SHAKES, 20 + in * 5, g);
} else if (one_in(20) && dice(2, 30) < in) {
g->add_msg("You feel anxious. You need your painkillers!");
g->u.add_morale(MORALE_CRAVING_OPIATE, -30, -200);
g->cancel_activity_query("You have a craving.");
} else if (one_in(50) && dice(3, 50) < in) {
g->add_msg("You throw up heavily!");
g->cancel_activity_query("Throwing up.");
g->u.vomit(g);
}
}
break;
case ADD_SPEED: {
int move_pen = in * 5;
if (move_pen > 30)
move_pen = 30;
g->u.moves -= move_pen;
g->u.int_cur--;
g->u.str_cur--;
if (g->u.stim > -100 && (in >= 20 || int(g->turn) % (100 - in * 5) == 0))
g->u.stim--;
if (rng(0, 150) <= in)
g->u.health--;
if (dice(2, 100) < in) {
g->add_msg("You feel depressed. Speed would help.");
g->cancel_activity_query("You have a speed craving.");
g->u.add_morale(MORALE_CRAVING_SPEED, -25, -200);
} else if (one_in(10) && dice(2, 80) < in) {
g->add_msg("Your hands start shaking... you need a pick-me-up.");
g->cancel_activity_query("You have a speed craving.");
g->u.add_morale(MORALE_CRAVING_SPEED, -25, -200);
g->u.add_disease(DI_SHAKES, in * 20, g);
} else if (one_in(50) && dice(2, 100) < in) {
g->add_msg("You stop suddenly, feeling bewildered.");
g->cancel_activity();
g->u.moves -= 300;
} else if (!g->u.has_disease(DI_HALLU) && one_in(20) &&
8 + dice(2, 80) < in)
g->u.add_disease(DI_HALLU, 3600, g);
} break;
case ADD_COKE:
g->u.int_cur--;
g->u.per_cur--;
if (in >= 30 || one_in((900 - 30 * in))) {
g->add_msg("You feel like you need a bump.");
g->cancel_activity_query("You have a craving for cocaine.");
g->u.add_morale(MORALE_CRAVING_COCAINE, -20, -250);
}
if (dice(2, 80) <= in) {
g->add_msg("You feel like you need a bump.");
g->cancel_activity_query("You have a craving for cocaine.");
g->u.add_morale(MORALE_CRAVING_COCAINE, -20, -250);
g->u.stim -= 3;
}
break;
case ADD_CRACK:
g->u.int_cur--;
g->u.per_cur--;
if (in >= 30 || one_in((900 - 30 * in))) {
g->add_msg("You're shivering, you need some crack.");
g->cancel_activity_query("You have a craving for crack.");
g->u.add_morale(MORALE_CRAVING_CRACK, -80, -250);
}
if (dice(2, 80) <= in) {
g->add_msg("You're shivering, you need some crack.");
g->cancel_activity_query("You have a craving for crack.");
g->u.add_morale(MORALE_CRAVING_CRACK, -80, -250);
g->u.stim -= 3;
}
break;
}
}
std::string addiction_name(addiction cur)
{
switch (cur.type) {
case ADD_CIG: return "Nicotine Withdrawal";
case ADD_CAFFEINE: return "Caffeine Withdrawal";
case ADD_ALCOHOL: return "Alcohol Withdrawal";
case ADD_SLEEP: return "Sleeping Pill Dependance";
case ADD_PKILLER: return "Opiate Withdrawal";
case ADD_SPEED: return "Amphetamine Withdrawal";
case ADD_COKE: return "Cocaine Withdrawal";
case ADD_CRACK: return "Crack Cocaine Withdrawal";
default: return "Erroneous addiction";
}
}
add_type addiction_type(std::string name)
{
if (name == "nicotine")
return ADD_CIG;
else if (name == "caffeine")
return ADD_CAFFEINE;
else if (name == "alcohol")
return ADD_ALCOHOL;
else if (name == "sleeping pill")
return ADD_SLEEP;
else if (name == "opiate")
return ADD_PKILLER;
else if (name == "amphetamine")
return ADD_SPEED;
else if (name == "cocaine")
return ADD_COKE;
else if (name == "crack")
return ADD_CRACK;
else
return ADD_NULL;
}
std::string addiction_text(addiction cur)
{
std::stringstream dump;
int strpen = 1 + int(cur.intensity / 7);
switch (cur.type) {
case ADD_CIG:
return "Intelligence - 1; Occasional cravings";
case ADD_CAFFEINE:
return "Strength - 1; Slight sluggishness; Occasional cravings";
case ADD_ALCOHOL:
return "\
Perception - 1; Intelligence - 1; Occasional Cravings;\n\
Risk of delirium tremens";
case ADD_SLEEP:
return "You may find it difficult to sleep without medication.";
case ADD_PKILLER:
dump << "Strength -" << strpen << "; Perception - 1; Dexterity - 1;" <<
std::endl <<
"Depression and physical pain to some degree. Frequent cravings. Vomiting.";
return dump.str();
case ADD_SPEED:
return "Strength - 1; Intelligence - 1;\n\
Movement rate reduction. Depression. Weak immune system. Frequent cravings.";
case ADD_COKE:
return "Perception - 1; Intelligence - 1; Frequent cravings.";
case ADD_CRACK:
return "Perception - 2; Intelligence - 2; Frequent cravings.";
default:
return "";
}
}
+4 -200
View File
@@ -8,208 +8,12 @@
#define MIN_ADDICTION_LEVEL 3 // Minimum intensity before effects are seen
void addict_effect(game *g, addiction &add)
{
int in = add.intensity;
void addict_effect(game *g, addiction &add);
switch (add.type) {
case ADD_CIG:
if (in > 20 || one_in((500 - 20 * in))) {
g->add_msg("You %s a cigarette.",
rng(0, 6) < in ? "need" : "could use");
g->cancel_activity_query("You have a nicotine craving.");
g->u.add_morale(MORALE_CRAVING_NICOTINE, -15, -50);
if (one_in(800 - 50 * in))
g->u.fatigue++;
if (one_in(400 - 20 * in))
g->u.stim--;
}
break;
std::string addiction_name(addiction cur);
case ADD_CAFFEINE:
g->u.moves -= 2;
if (in > 20 || one_in((500 - 20 * in))) {
g->add_msg("You want some caffeine.");
g->cancel_activity_query("You have a caffeine craving.");
g->u.add_morale(MORALE_CRAVING_CAFFEINE, -5, -30);
if (rng(0, 10) < in)
g->u.stim--;
if (rng(8, 400) < in) {
g->add_msg("Your hands start shaking... you need it bad!");
g->u.add_disease(DI_SHAKES, 20, g);
}
}
break;
add_type addiction_type(std::string name);
case ADD_ALCOHOL:
g->u.per_cur--;
g->u.int_cur--;
if (rng(40, 1200) <= in * 10)
g->u.health--;
if (one_in(20) && rng(0, 20) < in) {
g->add_msg("You could use a drink.");
g->cancel_activity_query("You have an alcohol craving.");
g->u.add_morale(MORALE_CRAVING_ALCOHOL, -35, -120);
} else if (rng(8, 300) < in) {
g->add_msg("Your hands start shaking... you need a drink bad!");
g->cancel_activity_query("You have an alcohol craving.");
g->u.add_morale(MORALE_CRAVING_ALCOHOL, -35, -120);
g->u.add_disease(DI_SHAKES, 50, g);
} else if (!g->u.has_disease(DI_HALLU) && rng(10, 1600) < in)
g->u.add_disease(DI_HALLU, 3600, g);
break;
case ADD_SLEEP:
// No effects here--just in player::can_sleep()
// EXCEPT! Prolong this addiction longer than usual.
if (one_in(2) && add.sated < 0)
add.sated++;
break;
case ADD_PKILLER:
if ((in >= 25 || int(g->turn) % (100 - in * 4) == 0) && g->u.pkill > 0)
g->u.pkill--; // Tolerance increases!
if (g->u.pkill >= 35) // No further effects if we're doped up.
add.sated = 0;
else {
g->u.str_cur -= 1 + int(in / 7);
g->u.per_cur--;
g->u.dex_cur--;
if (g->u.pain < in * 3)
g->u.pain++;
if (in >= 40 || one_in((1200 - 30 * in)))
g->u.health--;
if (one_in(20) && dice(2, 20) < in) {
g->add_msg("Your hands start shaking... you need some painkillers.");
g->cancel_activity_query("You have an opiate craving.");
g->u.add_morale(MORALE_CRAVING_OPIATE, -40, -200);
g->u.add_disease(DI_SHAKES, 20 + in * 5, g);
} else if (one_in(20) && dice(2, 30) < in) {
g->add_msg("You feel anxious. You need your painkillers!");
g->u.add_morale(MORALE_CRAVING_OPIATE, -30, -200);
g->cancel_activity_query("You have a craving.");
} else if (one_in(50) && dice(3, 50) < in) {
g->add_msg("You throw up heavily!");
g->cancel_activity_query("Throwing up.");
g->u.vomit(g);
}
}
break;
case ADD_SPEED: {
int move_pen = in * 5;
if (move_pen > 30)
move_pen = 30;
g->u.moves -= move_pen;
g->u.int_cur--;
g->u.str_cur--;
if (g->u.stim > -100 && (in >= 20 || int(g->turn) % (100 - in * 5) == 0))
g->u.stim--;
if (rng(0, 150) <= in)
g->u.health--;
if (dice(2, 100) < in) {
g->add_msg("You feel depressed. Speed would help.");
g->cancel_activity_query("You have a speed craving.");
g->u.add_morale(MORALE_CRAVING_SPEED, -25, -200);
} else if (one_in(10) && dice(2, 80) < in) {
g->add_msg("Your hands start shaking... you need a pick-me-up.");
g->cancel_activity_query("You have a speed craving.");
g->u.add_morale(MORALE_CRAVING_SPEED, -25, -200);
g->u.add_disease(DI_SHAKES, in * 20, g);
} else if (one_in(50) && dice(2, 100) < in) {
g->add_msg("You stop suddenly, feeling bewildered.");
g->cancel_activity();
g->u.moves -= 300;
} else if (!g->u.has_disease(DI_HALLU) && one_in(20) &&
8 + dice(2, 80) < in)
g->u.add_disease(DI_HALLU, 3600, g);
} break;
case ADD_COKE:
g->u.int_cur--;
g->u.per_cur--;
if (in >= 30 || one_in((900 - 30 * in))) {
g->add_msg("You feel like you need a bump.");
g->cancel_activity_query("You have a craving for cocaine.");
g->u.add_morale(MORALE_CRAVING_COCAINE, -20, -250);
}
if (dice(2, 80) <= in) {
g->add_msg("You feel like you need a bump.");
g->cancel_activity_query("You have a craving for cocaine.");
g->u.add_morale(MORALE_CRAVING_COCAINE, -20, -250);
g->u.stim -= 3;
}
break;
case ADD_CRACK:
g->u.int_cur--;
g->u.per_cur--;
if (in >= 30 || one_in((900 - 30 * in))) {
g->add_msg("You're shivering, you need some crack.");
g->cancel_activity_query("You have a craving for crack.");
g->u.add_morale(MORALE_CRAVING_CRACK, -80, -250);
}
if (dice(2, 80) <= in) {
g->add_msg("You're shivering, you need some crack.");
g->cancel_activity_query("You have a craving for crack.");
g->u.add_morale(MORALE_CRAVING_CRACK, -80, -250);
g->u.stim -= 3;
}
break;
}
}
std::string addiction_name(addiction cur)
{
switch (cur.type) {
case ADD_CIG: return "Nicotine Withdrawal";
case ADD_CAFFEINE: return "Caffeine Withdrawal";
case ADD_ALCOHOL: return "Alcohol Withdrawal";
case ADD_SLEEP: return "Sleeping Pill Dependance";
case ADD_PKILLER: return "Opiate Withdrawal";
case ADD_SPEED: return "Amphetamine Withdrawal";
case ADD_COKE: return "Cocaine Withdrawal";
case ADD_CRACK: return "Crack Cocaine Withdrawal";
default: return "Erroneous addiction";
}
}
std::string addiction_text(addiction cur)
{
std::stringstream dump;
int strpen = 1 + int(cur.intensity / 7);
switch (cur.type) {
case ADD_CIG:
return "Intelligence - 1; Occasional cravings";
case ADD_CAFFEINE:
return "Strength - 1; Slight sluggishness; Occasional cravings";
case ADD_ALCOHOL:
return "\
Perception - 1; Intelligence - 1; Occasional Cravings;\n\
Risk of delirium tremens";
case ADD_SLEEP:
return "You may find it difficult to sleep without medication.";
case ADD_PKILLER:
dump << "Strength -" << strpen << "; Perception - 1; Dexterity - 1;" <<
std::endl <<
"Depression and physical pain to some degree. Frequent cravings. Vomiting.";
return dump.str();
case ADD_SPEED:
return "Strength - 1; Intelligence - 1;\n\
Movement rate reduction. Depression. Weak immune system. Frequent cravings.";
case ADD_COKE:
return "Perception - 1; Intelligence - 1; Frequent cravings.";
case ADD_CRACK:
return "Perception - 2; Intelligence - 2; Frequent cravings.";
default:
return "";
}
}
std::string addiction_text(addiction cur);
#endif
+378 -23
View File
@@ -9,6 +9,347 @@ std::vector<art_effect_passive> fill_bad_passive();
std::vector<art_effect_active> fill_good_active();
std::vector<art_effect_active> fill_bad_active();
int passive_effect_cost[NUM_AEPS] = {
0, // AEP_NULL
3, // AEP_STR_UP
3, // AEP_DEX_UP
3, // AEP_PER_UP
3, // AEP_INT_UP
5, // AEP_ALL_UP
4, // AEP_SPEED_UP
2, // AEP_IODINE
4, // AEP_SNAKES
7, // AEP_INVISIBLE
5, // AEP_CLAIRVOYANCE
50, // AEP_SUPER_CLAIRVOYANCE
2, // AEP_STEALTH
2, // AEP_EXTINGUISH
1, // AEP_GLOW
1, // AEP_PSYSHIELD
3, // AEP_RESIST_ELECTRICITY
3, // AEP_CARRY_MORE
5, // AEP_SAP_LIFE
0, // AEP_SPLIT
-2, // AEP_HUNGER
-2, // AEP_THIRST
-1, // AEP_SMOKE
-5, // AEP_EVIL
-3, // AEP_SCHIZO
-5, // AEP_RADIOACTIVE
-3, // AEP_MUTAGENIC
-5, // AEP_ATTENTION
-2, // AEP_STR_DOWN
-2, // AEP_DEX_DOWN
-2, // AEP_PER_DOWN
-2, // AEP_INT_DOWN
-5, // AEP_ALL_DOWN
-4, // AEP_SPEED_DOWN
-5, // AEP_FORCE_TELEPORT
-3, // AEP_MOVEMENT_NOISE
-2, // AEP_BAD_WEATHER
-1 // AEP_SICK
};
int active_effect_cost[NUM_AEAS] = {
0, // AEA_NULL
2, // AEA_STORM
4, // AEA_FIREBALL
5, // AEA_ADRENALINE
4, // AEA_MAP
0, // AEA_BLOOD
0, // AEA_FATIGUE
4, // AEA_ACIDBALL
5, // AEA_PULSE
4, // AEA_HEAL
3, // AEA_CONFUSED
3, // AEA_ENTRANCE
3, // AEA_BUGS
5, // AEA_TELEPORT
1, // AEA_LIGHT
4, // AEA_GROWTH
6, // AEA_HURTALL
0, // AEA_SPLIT
-3, // AEA_RADIATION
-2, // AEA_PAIN
-3, // AEA_MUTATE
-2, // AEA_PARALYZE
-3, // AEA_FIRESTORM
-6, // AEA_ATTENTION
-4, // AEA_TELEGLOW
-2, // AEA_NOISE
-2, // AEA_SCREAM
-3, // AEA_DIM
-4, // AEA_FLASH
-2, // AEA_VOMIT
-5 // AEA_SHADOWS
};
artifact_shape_datum artifact_shape_data[ARTSHAPE_MAX] = {
{"BUG", "BUG", 0, 0, 0, 0},
{"sphere", "smooth sphere", 2, 4, 0, 10},
{"rod", "tapered rod", 1, 7, 1, 7},
{"teardrop", "teardrop-shaped stone", 2, 6, 0, 8},
{"lamp", "hollow, transparent cube", 4, 9, 0, 3},
{"snake", "winding, flexible rod", 0, 8, 0, 8},
{"disc", "smooth disc", 4, 6, 2, 4},
{"beads", "string of beads", 3, 7, 0, 6},
{"napkin", "very thin sheet", 0, 3, 0, 3},
{"urchin", "spiked sphere", 3, 5, 2, 6},
{"jelly", "malleable blob", 2, 8, 2, 4},
{"spiral", "spiraling rod", 5, 6, 2, 3},
{"pin", "pointed rod", 1, 5, 1, 9},
{"tube", "hollow tube", 2, 5, 3, 6},
{"pyramid", "regular tetrahedron", 3, 7, 2, 4},
{"crystal", "translucent crystal", 1, 6, 2, 7},
{"knot", "twisted, knotted cord", 2, 6, 1, 7},
{"crescent", "crescent-shaped stone", 2, 6, 2, 6}
};
artifact_property_datum artifact_property_data[ARTPROP_MAX] = {
{"BUG", "BUG",
{AEP_NULL, AEP_NULL, AEP_NULL, AEP_NULL},
{AEP_NULL, AEP_NULL, AEP_NULL, AEP_NULL},
{AEA_NULL, AEA_NULL, AEA_NULL, AEA_NULL},
{AEA_NULL, AEA_NULL, AEA_NULL, AEA_NULL}
},
{"wriggling", "is constantly wriggling",
{AEP_SPEED_UP, AEP_SNAKES, AEP_NULL, AEP_NULL},
{AEP_DEX_DOWN, AEP_FORCE_TELEPORT, AEP_SICK, AEP_NULL},
{AEA_TELEPORT, AEA_ADRENALINE, AEA_NULL, AEA_NULL},
{AEA_MUTATE, AEA_ATTENTION, AEA_VOMIT, AEA_NULL}
},
{"glowing", "glows faintly",
{AEP_INT_UP, AEP_GLOW, AEP_CLAIRVOYANCE, AEP_NULL},
{AEP_RADIOACTIVE, AEP_MUTAGENIC, AEP_ATTENTION, AEP_NULL},
{AEA_LIGHT, AEA_LIGHT, AEA_LIGHT, AEA_NULL},
{AEA_ATTENTION, AEA_TELEGLOW, AEA_FLASH, AEA_SHADOWS}
},
{"humming", "hums very quietly",
{AEP_ALL_UP, AEP_PSYSHIELD, AEP_NULL, AEP_NULL},
{AEP_SCHIZO, AEP_PER_DOWN, AEP_INT_DOWN, AEP_NULL},
{AEA_PULSE, AEA_ENTRANCE, AEA_NULL, AEA_NULL},
{AEA_NOISE, AEA_NOISE, AEA_SCREAM, AEA_NULL}
},
{"moving", "shifts from side to side slowly",
{AEP_STR_UP, AEP_DEX_UP, AEP_SPEED_UP, AEP_NULL},
{AEP_HUNGER, AEP_PER_DOWN, AEP_FORCE_TELEPORT, AEP_NULL},
{AEA_TELEPORT, AEA_TELEPORT, AEA_MAP, AEA_NULL},
{AEA_PARALYZE, AEA_VOMIT, AEA_VOMIT, AEA_NULL}
},
{"whispering", "makes very faint whispering sounds",
{AEP_CLAIRVOYANCE, AEP_EXTINGUISH, AEP_STEALTH, AEP_NULL},
{AEP_EVIL, AEP_SCHIZO, AEP_ATTENTION, AEP_NULL},
{AEA_FATIGUE, AEA_ENTRANCE, AEA_ENTRANCE, AEA_NULL},
{AEA_ATTENTION, AEA_SCREAM, AEA_SCREAM, AEA_SHADOWS}
},
{"breathing",
"shrinks and grows very slightly with a regular pulse, as if breathing",
{AEP_SAP_LIFE, AEP_ALL_UP, AEP_SPEED_UP, AEP_CARRY_MORE},
{AEP_HUNGER, AEP_THIRST, AEP_SICK, AEP_BAD_WEATHER},
{AEA_ADRENALINE, AEA_HEAL, AEA_ENTRANCE, AEA_GROWTH},
{AEA_MUTATE, AEA_ATTENTION, AEA_SHADOWS, AEA_NULL}
},
{"dead", "is icy cold to the touch",
{AEP_INVISIBLE, AEP_CLAIRVOYANCE, AEP_EXTINGUISH, AEP_SAP_LIFE},
{AEP_HUNGER, AEP_EVIL, AEP_ALL_DOWN, AEP_SICK},
{AEA_BLOOD, AEA_HURTALL, AEA_NULL, AEA_NULL},
{AEA_PAIN, AEA_SHADOWS, AEA_DIM, AEA_VOMIT}
},
{"itchy", "makes your skin itch slightly when it is close",
{AEP_DEX_UP, AEP_SPEED_UP, AEP_PSYSHIELD, AEP_NULL},
{AEP_RADIOACTIVE, AEP_MUTAGENIC, AEP_SICK, AEP_NULL},
{AEA_ADRENALINE, AEA_BLOOD, AEA_HEAL, AEA_BUGS},
{AEA_RADIATION, AEA_PAIN, AEA_PAIN, AEA_VOMIT}
},
{"glittering", "glitters faintly under direct light",
{AEP_INT_UP, AEP_EXTINGUISH, AEP_GLOW, AEP_NULL},
{AEP_SMOKE, AEP_ATTENTION, AEP_NULL, AEP_NULL},
{AEA_MAP, AEA_LIGHT, AEA_CONFUSED, AEA_ENTRANCE},
{AEA_RADIATION, AEA_MUTATE, AEA_ATTENTION, AEA_FLASH}
},
{"electric", "very weakly shocks you when touched",
{AEP_RESIST_ELECTRICITY, AEP_DEX_UP, AEP_SPEED_UP, AEP_PSYSHIELD},
{AEP_THIRST, AEP_SMOKE, AEP_STR_DOWN, AEP_BAD_WEATHER},
{AEA_STORM, AEA_ADRENALINE, AEA_LIGHT, AEA_NULL},
{AEA_PAIN, AEA_PARALYZE, AEA_FLASH, AEA_FLASH}
},
{"slimy", "feels slimy",
{AEP_SNAKES, AEP_STEALTH, AEP_EXTINGUISH, AEP_SAP_LIFE},
{AEP_THIRST, AEP_DEX_DOWN, AEP_SPEED_DOWN, AEP_SICK},
{AEA_BLOOD, AEA_ACIDBALL, AEA_GROWTH, AEA_ACIDBALL},
{AEA_MUTATE, AEA_MUTATE, AEA_VOMIT, AEA_VOMIT}
},
{"engraved", "is covered with odd etchings",
{AEP_CLAIRVOYANCE, AEP_INVISIBLE, AEP_PSYSHIELD, AEP_SAP_LIFE},
{AEP_EVIL, AEP_ATTENTION, AEP_NULL, AEP_NULL},
{AEA_FATIGUE, AEA_TELEPORT, AEA_HEAL, AEA_FATIGUE},
{AEA_ATTENTION, AEA_ATTENTION, AEA_TELEGLOW, AEA_DIM}
},
{"crackling", "occasionally makes a soft crackling sound",
{AEP_EXTINGUISH, AEP_RESIST_ELECTRICITY, AEP_NULL, AEP_NULL},
{AEP_SMOKE, AEP_RADIOACTIVE, AEP_MOVEMENT_NOISE, AEP_NULL},
{AEA_STORM, AEA_FIREBALL, AEA_PULSE, AEA_NULL},
{AEA_PAIN, AEA_PARALYZE, AEA_NOISE, AEA_NOISE}
},
{"warm", "is warm to the touch",
{AEP_STR_UP, AEP_EXTINGUISH, AEP_GLOW, AEP_NULL},
{AEP_SMOKE, AEP_RADIOACTIVE, AEP_NULL, AEP_NULL},
{AEA_FIREBALL, AEA_FIREBALL, AEA_FIREBALL, AEA_LIGHT},
{AEA_FIRESTORM, AEA_FIRESTORM, AEA_TELEGLOW, AEA_NULL}
},
{"rattling", "makes a rattling sound when moved",
{AEP_DEX_UP, AEP_SPEED_UP, AEP_SNAKES, AEP_CARRY_MORE},
{AEP_ATTENTION, AEP_INT_DOWN, AEP_MOVEMENT_NOISE, AEP_MOVEMENT_NOISE},
{AEA_BLOOD, AEA_PULSE, AEA_BUGS, AEA_NULL},
{AEA_PAIN, AEA_ATTENTION, AEA_NOISE, AEA_NULL}
},
{"scaled", "has a surface reminiscent of reptile scales",
{AEP_SNAKES, AEP_SNAKES, AEP_SNAKES, AEP_STEALTH},
{AEP_THIRST, AEP_MUTAGENIC, AEP_SPEED_DOWN, AEP_NULL},
{AEA_ADRENALINE, AEA_BUGS, AEA_GROWTH, AEA_NULL},
{AEA_MUTATE, AEA_SCREAM, AEA_DIM, AEA_NULL}
},
{"fractal",
"has a self-similar pattern which repeats until it is too small for you to see",
{AEP_ALL_UP, AEP_ALL_UP, AEP_CLAIRVOYANCE, AEP_PSYSHIELD},
{AEP_SCHIZO, AEP_ATTENTION, AEP_FORCE_TELEPORT, AEP_BAD_WEATHER},
{AEA_STORM, AEA_FATIGUE, AEA_TELEPORT, AEA_NULL},
{AEA_RADIATION, AEA_MUTATE, AEA_TELEGLOW, AEA_TELEGLOW}
}
};
artifact_tool_form_datum artifact_tool_form_data[NUM_ARTTOOLFORMS] = {
{"", '*', c_white, "null", "null", 0, 0, 0, 0, ARTWEAP_BULK,
{ARTWEAP_NULL, ARTWEAP_NULL, ARTWEAP_NULL}},
{"Harp", ';', c_yellow, "wood", "null", 20, 30, 10, 18, ARTWEAP_BULK,
{ARTWEAP_SPEAR, ARTWEAP_SWORD, ARTWEAP_KNIFE}},
{"Staff", '/', c_brown, "wood", "null", 6, 12, 4, 10, ARTWEAP_CLUB,
{ARTWEAP_BULK, ARTWEAP_SPEAR, ARTWEAP_KNIFE}},
{"Sword", '/', c_ltblue, "steel", "null", 8, 14, 8, 28, ARTWEAP_SWORD,
{ARTWEAP_BULK, ARTWEAP_NULL, ARTWEAP_NULL}},
{"Dagger", ';', c_ltblue, "steel", "null", 1, 4, 1, 6, ARTWEAP_KNIFE,
{ARTWEAP_NULL, ARTWEAP_NULL, ARTWEAP_NULL}},
{"Cube", '*', c_white, "steel", "null", 1, 3, 1, 20, ARTWEAP_BULK,
{ARTWEAP_SPEAR, ARTWEAP_NULL, ARTWEAP_NULL}}
};
artifact_weapon_datum artifact_weapon_data[NUM_ARTWEAPS] = {
{"", 0, 0, 0, 0, 0, 0, 0, 0, ""},
// Adjective Vol,wgt Bash Cut To-Hit
{"Heavy", 0, 12, 10, 20, 0, 0, -2, 0,
""},
{"Knobbed", 1, 2, 14, 30, 0, 0, -1, 1,
""},
{"Spiked", 1, 1, 0, 0, 20, 40, -1, 1,
"SPEAR"},
{"Edged", 2, 4, 0, 0, 20, 50, -1, 2,
""},
{"Bladed", 1, 2, 0, 0, 12, 30, -1, 1,
"STAB"}
};
artifact_armor_form_datum artifact_armor_form_data[NUM_ARTARMFORMS] = {
{"", 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", "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","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", "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", "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","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", "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", "null", 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, true,
{ARMORMOD_NULL, ARMORMOD_NULL, ARMORMOD_NULL, ARMORMOD_NULL, ARMORMOD_NULL}}
};
artifact_armor_form_datum artifact_armor_mod_data[NUM_ARMORMODS] = {
{"", 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, "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, "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, "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", "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", "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", "null",
4, 12, 3, 2, 2, 0, 1, -4, 0, 0, 0, 0, false,
{ARMORMOD_NULL, ARMORMOD_NULL, ARMORMOD_NULL, ARMORMOD_NULL, ARMORMOD_NULL}},
};
std::string artifact_adj[NUM_ART_ADJS] = {
"Forbidden", "Unknown", "Forgotten", "Hideous", "Eldritch",
"Gelatinous", "Ancient", "Cursed", "Bloody", "Undying",
"Shadowy", "Silent", "Cyclopean", "Fungal", "Unspeakable",
"Grotesque", "Frigid", "Shattered", "Sleeping", "Repellent"
};
// Prepending + makes it proper, e.g. "The Forbidden Abyss"
std::string artifact_noun[NUM_ART_NOUNS] = {
"Technique", "Dreams", "Beasts", "Evil", "Miasma",
"+Abyss", "+City", "Shadows", "Shade", "Illusion",
"Justice", "+Necropolis", "Ichor", "+Monolith", "Aeons",
"Graves", "Horrors", "Suffering", "Death", "Horror"
};
std::string artifact_name(std::string type);
itype* game::new_artifact()
@@ -31,7 +372,9 @@ itype* game::new_artifact()
art->melee_dam = rng(weapon->bash_min, weapon->bash_max);
art->melee_cut = rng(weapon->cut_min, weapon->cut_max);
art->m_to_hit = rng(weapon->to_hit_min, weapon->to_hit_max);
art->item_flags = weapon->flags;
if( weapon->tag != "" ) {
art->item_tags.insert(weapon->tag);
}
// Add an extra weapon perhaps?
if (one_in(2)) {
int select = rng(0, 2);
@@ -42,7 +385,9 @@ itype* game::new_artifact()
art->melee_dam += rng(weapon->bash_min, weapon->bash_max);
art->melee_cut += rng(weapon->bash_min, weapon->bash_max);
art->m_to_hit += rng(weapon->to_hit_min, weapon->to_hit_max);
art->item_flags |= weapon->flags;
if( weapon->tag != "" ) {
art->item_tags.insert(weapon->tag);
}
std::stringstream newname;
newname << weapon->adjective << " " << info->name;
art->name = artifact_name(newname.str());
@@ -141,7 +486,9 @@ It may have unknown powers; use 'a' to activate them.";
art->charge_type = ARTC_NULL; // 1 in 8 chance that it can't recharge!
art->id = itypes.size();
itypes.push_back(art);
itypes[art->id]=art;
artifact_itype_ids.push_back(art->id);
return art;
} else { // Generate an armor artifact
@@ -160,11 +507,10 @@ It may have unknown powers; use 'a' to activate them.";
art->melee_dam = info->melee_bash;
art->melee_cut = info->melee_cut;
art->m_to_hit = info->melee_hit;
art->item_flags = 0;
art->covers = info->covers;
art->encumber = info->encumb;
art->dmg_resist = info->dmg_resist;
art->cut_resist = info->cut_resist;
art->coverage = info->coverage;
art->thickness = info->thickness;
art->env_resist = info->env_resist;
art->warmth = info->warmth;
art->storage = info->storage;
@@ -191,15 +537,15 @@ It may have unknown powers; use 'a' to activate them.";
art->encumber += modinfo->encumb;
if (modinfo->dmg_resist > 0 || art->dmg_resist > abs(modinfo->dmg_resist))
art->dmg_resist += modinfo->dmg_resist;
if (modinfo->coverage > 0 || art->coverage > abs(modinfo->coverage))
art->coverage += modinfo->coverage;
else
art->dmg_resist = 0;
art->coverage = 0;
if (modinfo->cut_resist > 0 || art->cut_resist > abs(modinfo->cut_resist))
art->cut_resist += modinfo->cut_resist;
if (modinfo->thickness > 0 || art->thickness > abs(modinfo->thickness))
art->thickness += modinfo->thickness;
else
art->cut_resist = 0;
art->thickness = 0;
if (modinfo->env_resist > 0 || art->env_resist > abs(modinfo->env_resist))
art->env_resist += modinfo->env_resist;
@@ -244,8 +590,11 @@ It may have unknown powers; use 'a' to activate them.";
art->effects_worn.push_back(passive_tmp);
}
art->id = itypes.size();
itypes.push_back(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;
}
}
@@ -265,14 +614,13 @@ 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;
art->melee_cut = 0;
art->m_to_hit = 0;
art->item_flags = 0;
art->name = property_data->name + " " + shape_data->name;
std::stringstream desc;
@@ -358,8 +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();
itypes.push_back(art);
std::stringstream artid;
artid << "artifact" << artifact_itype_ids.size();
art->id = artid.str();
artifact_itype_ids.push_back(art->id);
itypes[art->id] = art;
return art;
}
@@ -426,23 +777,23 @@ void game::process_artifact(item *it, player *p, bool wielded)
if (it->charges < tool->max_charges) {
switch (tool->charge_type) {
case ARTC_TIME:
if (turn.second == 0 && turn.minute == 0) // Once per hour
if (turn.seconds() == 0 && turn.minutes() == 0) // Once per hour
it->charges++;
break;
case ARTC_SOLAR:
if (turn.second == 0 && turn.minute % 10 == 0 &&
if (turn.seconds() == 0 && turn.minutes() % 10 == 0 &&
is_in_sunlight(p->posx, p->posy))
it->charges++;
break;
case ARTC_PAIN:
if (turn.second == 0) {
if (turn.seconds() == 0) {
add_msg("You suddenly feel sharp pain for no reason.");
p->pain += 3 * rng(1, 3);
it->charges++;
}
break;
case ARTC_HP:
if (turn.second == 0) {
if (turn.seconds() == 0) {
add_msg("You feel your body decaying.");
p->hurtall(1);
it->charges++;
@@ -600,6 +951,10 @@ void game::add_artifact_messages(std::vector<art_effect_passive> effects)
add_msg("You can see through walls!");
break;
case AEP_SUPER_CLAIRVOYANCE:
add_msg("You can see through everything!");
break;
case AEP_STEALTH:
add_msg("Your steps stop making noise.");
break;
+1
View File
@@ -17,6 +17,7 @@ enum art_effect_passive {
AEP_SNAKES, // Summons friendly snakes when you're hit
AEP_INVISIBLE, // Makes you invisible
AEP_CLAIRVOYANCE, // See through walls
AEP_SUPER_CLAIRVOYANCE, // See through walls to a great distance
AEP_STEALTH, // Your steps are quieted
AEP_EXTINGUISH, // May extinguish nearby flames
AEP_GLOW, // Four-tile light source
+22 -342
View File
@@ -5,85 +5,10 @@
#include "artifact.h"
#include "itype.h"
int passive_effect_cost[NUM_AEPS] = {
0, // AEP_NULL
extern int passive_effect_cost[NUM_AEPS];
3, // AEP_STR_UP
3, // AEP_DEX_UP
3, // AEP_PER_UP
3, // AEP_INT_UP
5, // AEP_ALL_UP
4, // AEP_SPEED_UP
2, // AEP_IODINE
4, // AEP_SNAKES
7, // AEP_INVISIBLE
5, // AEP_CLAIRVOYANCE
2, // AEP_STEALTH
2, // AEP_EXTINGUISH
1, // AEP_GLOW
1, // AEP_PSYSHIELD
3, // AEP_RESIST_ELECTRICITY
3, // AEP_CARRY_MORE
5, // AEP_SAP_LIFE
extern int active_effect_cost[NUM_AEAS];
0, // AEP_SPLIT
-2, // AEP_HUNGER
-2, // AEP_THIRST
-1, // AEP_SMOKE
-5, // AEP_EVIL
-3, // AEP_SCHIZO
-5, // AEP_RADIOACTIVE
-3, // AEP_MUTAGENIC
-5, // AEP_ATTENTION
-2, // AEP_STR_DOWN
-2, // AEP_DEX_DOWN
-2, // AEP_PER_DOWN
-2, // AEP_INT_DOWN
-5, // AEP_ALL_DOWN
-4, // AEP_SPEED_DOWN
-5, // AEP_FORCE_TELEPORT
-3, // AEP_MOVEMENT_NOISE
-2, // AEP_BAD_WEATHER
-1 // AEP_SICK
};
int active_effect_cost[NUM_AEAS] = {
0, // AEA_NULL
2, // AEA_STORM
4, // AEA_FIREBALL
5, // AEA_ADRENALINE
4, // AEA_MAP
0, // AEA_BLOOD
0, // AEA_FATIGUE
4, // AEA_ACIDBALL
5, // AEA_PULSE
4, // AEA_HEAL
3, // AEA_CONFUSED
3, // AEA_ENTRANCE
3, // AEA_BUGS
5, // AEA_TELEPORT
1, // AEA_LIGHT
4, // AEA_GROWTH
6, // AEA_HURTALL
0, // AEA_SPLIT
-3, // AEA_RADIATION
-2, // AEA_PAIN
-3, // AEA_MUTATE
-2, // AEA_PARALYZE
-3, // AEA_FIRESTORM
-6, // AEA_ATTENTION
-4, // AEA_TELEGLOW
-2, // AEA_NOISE
-2, // AEA_SCREAM
-3, // AEA_DIM
-4, // AEA_FLASH
-2, // AEA_VOMIT
-5 // AEA_SHADOWS
};
struct artifact_shape_datum
{
@@ -93,26 +18,7 @@ struct artifact_shape_datum
int weight_min, weight_max;
};
artifact_shape_datum artifact_shape_data[ARTSHAPE_MAX] = {
{"BUG", "BUG", 0, 0, 0, 0},
{"sphere", "smooth sphere", 2, 4, 0, 10},
{"rod", "tapered rod", 1, 7, 1, 7},
{"teardrop", "teardrop-shaped stone", 2, 6, 0, 8},
{"lamp", "hollow, transparent cube", 4, 9, 0, 3},
{"snake", "winding, flexible rod", 0, 8, 0, 8},
{"disc", "smooth disc", 4, 6, 2, 4},
{"beads", "string of beads", 3, 7, 0, 6},
{"napkin", "very thin sheet", 0, 3, 0, 3},
{"urchin", "spiked sphere", 3, 5, 2, 6},
{"jelly", "malleable blob", 2, 8, 2, 4},
{"spiral", "spiraling rod", 5, 6, 2, 3},
{"pin", "pointed rod", 1, 5, 1, 9},
{"tube", "hollow tube", 2, 5, 3, 6},
{"pyramid", "regular tetrahedron", 3, 7, 2, 4},
{"crystal", "translucent crystal", 1, 6, 2, 7},
{"knot", "twisted, knotted cord", 2, 6, 1, 7},
{"crescent", "crescent-shaped stone", 2, 6, 2, 6}
};
extern artifact_shape_datum artifact_shape_data[ARTSHAPE_MAX];
struct artifact_property_datum
{
@@ -124,118 +30,7 @@ struct artifact_property_datum
art_effect_active active_bad[4];
};
artifact_property_datum artifact_property_data[ARTPROP_MAX] = {
{"BUG", "BUG",
{AEP_NULL, AEP_NULL, AEP_NULL, AEP_NULL},
{AEP_NULL, AEP_NULL, AEP_NULL, AEP_NULL},
{AEA_NULL, AEA_NULL, AEA_NULL, AEA_NULL},
{AEA_NULL, AEA_NULL, AEA_NULL, AEA_NULL}
},
{"wriggling", "is constantly wriggling",
{AEP_SPEED_UP, AEP_SNAKES, AEP_NULL, AEP_NULL},
{AEP_DEX_DOWN, AEP_FORCE_TELEPORT, AEP_SICK, AEP_NULL},
{AEA_TELEPORT, AEA_ADRENALINE, AEA_NULL, AEA_NULL},
{AEA_MUTATE, AEA_ATTENTION, AEA_VOMIT, AEA_NULL}
},
{"glowing", "glows faintly",
{AEP_INT_UP, AEP_GLOW, AEP_CLAIRVOYANCE, AEP_NULL},
{AEP_RADIOACTIVE, AEP_MUTAGENIC, AEP_ATTENTION, AEP_NULL},
{AEA_LIGHT, AEA_LIGHT, AEA_LIGHT, AEA_NULL},
{AEA_ATTENTION, AEA_TELEGLOW, AEA_FLASH, AEA_SHADOWS}
},
{"humming", "hums very quietly",
{AEP_ALL_UP, AEP_PSYSHIELD, AEP_NULL, AEP_NULL},
{AEP_SCHIZO, AEP_PER_DOWN, AEP_INT_DOWN, AEP_NULL},
{AEA_PULSE, AEA_ENTRANCE, AEA_NULL, AEA_NULL},
{AEA_NOISE, AEA_NOISE, AEA_SCREAM, AEA_NULL}
},
{"moving", "shifts from side to side slowly",
{AEP_STR_UP, AEP_DEX_UP, AEP_SPEED_UP, AEP_NULL},
{AEP_HUNGER, AEP_PER_DOWN, AEP_FORCE_TELEPORT, AEP_NULL},
{AEA_TELEPORT, AEA_TELEPORT, AEA_MAP, AEA_NULL},
{AEA_PARALYZE, AEA_VOMIT, AEA_VOMIT, AEA_NULL}
},
{"whispering", "makes very faint whispering sounds",
{AEP_CLAIRVOYANCE, AEP_EXTINGUISH, AEP_STEALTH, AEP_NULL},
{AEP_EVIL, AEP_SCHIZO, AEP_ATTENTION, AEP_NULL},
{AEA_FATIGUE, AEA_ENTRANCE, AEA_ENTRANCE, AEA_NULL},
{AEA_ATTENTION, AEA_SCREAM, AEA_SCREAM, AEA_SHADOWS}
},
{"breathing",
"shrinks and grows very slightly with a regular pulse, as if breathing",
{AEP_SAP_LIFE, AEP_ALL_UP, AEP_SPEED_UP, AEP_CARRY_MORE},
{AEP_HUNGER, AEP_THIRST, AEP_SICK, AEP_BAD_WEATHER},
{AEA_ADRENALINE, AEA_HEAL, AEA_ENTRANCE, AEA_GROWTH},
{AEA_MUTATE, AEA_ATTENTION, AEA_SHADOWS, AEA_NULL}
},
{"dead", "is icy cold to the touch",
{AEP_INVISIBLE, AEP_CLAIRVOYANCE, AEP_EXTINGUISH, AEP_SAP_LIFE},
{AEP_HUNGER, AEP_EVIL, AEP_ALL_DOWN, AEP_SICK},
{AEA_BLOOD, AEA_HURTALL, AEA_NULL, AEA_NULL},
{AEA_PAIN, AEA_SHADOWS, AEA_DIM, AEA_VOMIT}
},
{"itchy", "makes your skin itch slightly when it is close",
{AEP_DEX_UP, AEP_SPEED_UP, AEP_PSYSHIELD, AEP_NULL},
{AEP_RADIOACTIVE, AEP_MUTAGENIC, AEP_SICK, AEP_NULL},
{AEA_ADRENALINE, AEA_BLOOD, AEA_HEAL, AEA_BUGS},
{AEA_RADIATION, AEA_PAIN, AEA_PAIN, AEA_VOMIT}
},
{"glittering", "glitters faintly under direct light",
{AEP_INT_UP, AEP_EXTINGUISH, AEP_GLOW, AEP_NULL},
{AEP_SMOKE, AEP_ATTENTION, AEP_NULL, AEP_NULL},
{AEA_MAP, AEA_LIGHT, AEA_CONFUSED, AEA_ENTRANCE},
{AEA_RADIATION, AEA_MUTATE, AEA_ATTENTION, AEA_FLASH}
},
{"electric", "very weakly shocks you when touched",
{AEP_RESIST_ELECTRICITY, AEP_DEX_UP, AEP_SPEED_UP, AEP_PSYSHIELD},
{AEP_THIRST, AEP_SMOKE, AEP_STR_DOWN, AEP_BAD_WEATHER},
{AEA_STORM, AEA_ADRENALINE, AEA_LIGHT, AEA_NULL},
{AEA_PAIN, AEA_PARALYZE, AEA_FLASH, AEA_FLASH}
},
{"slimy", "feels slimy",
{AEP_SNAKES, AEP_STEALTH, AEP_EXTINGUISH, AEP_SAP_LIFE},
{AEP_THIRST, AEP_DEX_DOWN, AEP_SPEED_DOWN, AEP_SICK},
{AEA_BLOOD, AEA_ACIDBALL, AEA_GROWTH, AEA_ACIDBALL},
{AEA_MUTATE, AEA_MUTATE, AEA_VOMIT, AEA_VOMIT}
},
{"engraved", "is covered with odd etchings",
{AEP_CLAIRVOYANCE, AEP_INVISIBLE, AEP_PSYSHIELD, AEP_SAP_LIFE},
{AEP_EVIL, AEP_ATTENTION, AEP_NULL, AEP_NULL},
{AEA_FATIGUE, AEA_TELEPORT, AEA_HEAL, AEA_FATIGUE},
{AEA_ATTENTION, AEA_ATTENTION, AEA_TELEGLOW, AEA_DIM}
},
{"crackling", "occasionally makes a soft crackling sound",
{AEP_EXTINGUISH, AEP_RESIST_ELECTRICITY, AEP_NULL, AEP_NULL},
{AEP_SMOKE, AEP_RADIOACTIVE, AEP_MOVEMENT_NOISE, AEP_NULL},
{AEA_STORM, AEA_FIREBALL, AEA_PULSE, AEA_NULL},
{AEA_PAIN, AEA_PARALYZE, AEA_NOISE, AEA_NOISE}
},
{"warm", "is warm to the touch",
{AEP_STR_UP, AEP_EXTINGUISH, AEP_GLOW, AEP_NULL},
{AEP_SMOKE, AEP_RADIOACTIVE, AEP_NULL, AEP_NULL},
{AEA_FIREBALL, AEA_FIREBALL, AEA_FIREBALL, AEA_LIGHT},
{AEA_FIRESTORM, AEA_FIRESTORM, AEA_TELEGLOW, AEA_NULL}
},
{"rattling", "makes a rattling sound when moved",
{AEP_DEX_UP, AEP_SPEED_UP, AEP_SNAKES, AEP_CARRY_MORE},
{AEP_ATTENTION, AEP_INT_DOWN, AEP_MOVEMENT_NOISE, AEP_MOVEMENT_NOISE},
{AEA_BLOOD, AEA_PULSE, AEA_BUGS, AEA_NULL},
{AEA_PAIN, AEA_ATTENTION, AEA_NOISE, AEA_NULL}
},
{"scaled", "has a surface reminiscent of reptile scales",
{AEP_SNAKES, AEP_SNAKES, AEP_SNAKES, AEP_STEALTH},
{AEP_THIRST, AEP_MUTAGENIC, AEP_SPEED_DOWN, AEP_NULL},
{AEA_ADRENALINE, AEA_BUGS, AEA_GROWTH, AEA_NULL},
{AEA_MUTATE, AEA_SCREAM, AEA_DIM, AEA_NULL}
},
{"fractal",
"has a self-similar pattern which repeats until it is too small for you to see",
{AEP_ALL_UP, AEP_ALL_UP, AEP_CLAIRVOYANCE, AEP_PSYSHIELD},
{AEP_SCHIZO, AEP_ATTENTION, AEP_FORCE_TELEPORT, AEP_BAD_WEATHER},
{AEA_STORM, AEA_FATIGUE, AEA_TELEPORT, AEA_NULL},
{AEA_RADIATION, AEA_MUTATE, AEA_TELEGLOW, AEA_TELEGLOW}
}
};
extern artifact_property_datum artifact_property_data[ARTPROP_MAX];
enum artifact_weapon_type
{
@@ -253,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;
@@ -262,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),
@@ -283,25 +78,7 @@ enum artifact_tool_form
NUM_ARTTOOLFORMS
};
artifact_tool_form_datum artifact_tool_form_data[NUM_ARTTOOLFORMS] = {
{"", '*', c_white, MNULL, MNULL, 0, 0, 0, 0, ARTWEAP_BULK,
{ARTWEAP_NULL, ARTWEAP_NULL, ARTWEAP_NULL}},
{"Harp", ';', c_yellow, WOOD, MNULL, 20, 30, 10, 18, ARTWEAP_BULK,
{ARTWEAP_SPEAR, ARTWEAP_SWORD, ARTWEAP_KNIFE}},
{"Staff", '/', c_brown, WOOD, MNULL, 6, 12, 4, 10, ARTWEAP_CLUB,
{ARTWEAP_BULK, ARTWEAP_SPEAR, ARTWEAP_KNIFE}},
{"Sword", '/', c_ltblue, STEEL, MNULL, 8, 14, 8, 28, ARTWEAP_SWORD,
{ARTWEAP_BULK, ARTWEAP_NULL, ARTWEAP_NULL}},
{"Dagger", ';', c_ltblue, STEEL, MNULL, 1, 4, 1, 6, ARTWEAP_KNIFE,
{ARTWEAP_NULL, ARTWEAP_NULL, ARTWEAP_NULL}},
{"Cube", '*', c_white, STEEL, MNULL, 1, 3, 1, 20, ARTWEAP_BULK,
{ARTWEAP_SPEAR, ARTWEAP_NULL, ARTWEAP_NULL}}
};
extern artifact_tool_form_datum artifact_tool_form_data[NUM_ARTTOOLFORMS];
struct artifact_weapon_datum
{
@@ -310,23 +87,10 @@ struct artifact_weapon_datum
int bash_min, bash_max;
int cut_min, cut_max;
int to_hit_min, to_hit_max;
unsigned flags : NUM_ITEM_FLAGS;
std::string tag;
};
artifact_weapon_datum artifact_weapon_data[NUM_ARTWEAPS] = {
{"", 0, 0, 0, 0, 0, 0, 0, 0, 0},
// Adjective Vol,wgt Bash Cut To-Hit
{"Heavy", 0, 12, 10, 20, 0, 0, -2, 0,
0},
{"Knobbed", 1, 2, 14, 30, 0, 0, -1, 1,
0},
{"Spiked", 1, 1, 0, 0, 20, 40, -1, 1,
mfb(IF_SPEAR)},
{"Edged", 2, 4, 0, 0, 20, 50, -1, 2,
0},
{"Bladed", 1, 2, 0, 0, 12, 30, -1, 1,
mfb(IF_STAB)}
};
extern artifact_weapon_datum artifact_weapon_data[NUM_ARTWEAPS];
enum artifact_armor_mod
{
@@ -344,12 +108,12 @@ 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 dmg_resist;
int cut_resist;
int coverage;
int thickness;
int env_resist;
int warmth;
int storage;
@@ -361,13 +125,13 @@ 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])
: name (Name), color (Color), m1 (M1), m2 (M2), volume (Volume),
weight (Weight), encumb (Encumb), dmg_resist (Dmg_res),
cut_resist (Cut_res), env_resist (Env_res), warmth (Warmth),
weight (Weight), encumb (Encumb), coverage (Coverage),
thickness (thickness), env_resist (Env_res), warmth (Warmth),
storage (Storage), melee_bash (Bash), melee_cut (Cut), melee_hit (Hit),
covers (Covers), plural (Plural), available_mods (Mods) { };
@@ -387,102 +151,18 @@ enum artifact_armor_form
NUM_ARTARMFORMS
};
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,
0, false,
{ARMORMOD_NULL, ARMORMOD_NULL, ARMORMOD_NULL, ARMORMOD_NULL, ARMORMOD_NULL}},
// Name color Materials Vol Wgt Enc Dmg Cut Env Wrm Sto Bsh Cut Hit
{"Robe", c_red, WOOL, MNULL, 6, 6, 1, 3, 1, 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, 4, 12, 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, 16, 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 Dmg Cut Env Wrm Sto Bsh Cut Hit
{"Helm", c_dkgray,SILVER, MNULL, 6, 6, 2, 4, 18, 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, 6, 6, 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 Dmg Cut Env Wrm Sto Bsh Cut Hit
{"Boots", c_blue, LEATHER, MNULL, 6, 2, 1, 6, 6, 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,
0, true,
{ARMORMOD_NULL, ARMORMOD_NULL, ARMORMOD_NULL, ARMORMOD_NULL, ARMORMOD_NULL}}
};
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.
*/
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,
{ARMORMOD_NULL, ARMORMOD_NULL, ARMORMOD_NULL, ARMORMOD_NULL, ARMORMOD_NULL}},
// Description; "It is ..." or "They are ..."
{"very thin and light.", c_white, MNULL, MNULL,
// Vol Wgt Enc Dmg Cut 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,
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,
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,
// Vol Wgt Enc Dmg Cut Env Wrm Sto
4, 2, 1, 4, 0, 1, 3, 0, 0, 0, 0, 0, false,
{ARMORMOD_NULL, ARMORMOD_NULL, ARMORMOD_NULL, ARMORMOD_NULL, ARMORMOD_NULL}},
{"leather-padded.", c_white, LEATHER, MNULL,
4, 4, 1, 10, 4, 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,
4, 12, 3, 8, 14, 0, 1, -4, 0, 0, 0, 0, false,
{ARMORMOD_NULL, ARMORMOD_NULL, ARMORMOD_NULL, ARMORMOD_NULL, ARMORMOD_NULL}},
};
extern artifact_armor_form_datum artifact_armor_mod_data[NUM_ARMORMODS];
#define NUM_ART_ADJS 20
std::string artifact_adj[NUM_ART_ADJS] = {
"Forbidden", "Unknown", "Forgotten", "Hideous", "Eldritch",
"Gelatinous", "Ancient", "Cursed", "Bloody", "Undying",
"Shadowy", "Silent", "Cyclopean", "Fungal", "Unspeakable",
"Grotesque", "Frigid", "Shattered", "Sleeping", "Repellent"
};
extern std::string artifact_adj[NUM_ART_ADJS];
#define NUM_ART_NOUNS 20
// Prepending + makes it proper, e.g. "The Forbidden Abyss"
std::string artifact_noun[NUM_ART_NOUNS] = {
"Technique", "Dreams", "Beasts", "Evil", "Miasma",
"+Abyss", "+City", "Shadows", "Shade", "Illusion",
"Justice", "+Necropolis", "Ichor", "+Monolith", "Aeons",
"Graves", "Horrors", "Suffering", "Death", "Horror"
};
extern std::string artifact_noun[NUM_ART_NOUNS];
#endif
+443 -143
View File
@@ -9,12 +9,53 @@
#define BATTERY_AMOUNT 4 // How much batteries increase your power
std::map<bionic_id, bionic_data*> bionics;
std::vector<bionic_id> faulty_bionics;
std::vector<bionic_id> power_source_bionics;
std::vector<bionic_id> unpowered_bionics;
void bionics_install_failure(game *g, player *u, int success);
bionic_data::bionic_data(std::string new_name, bool new_power_source, bool new_activated,
int new_power_cost, int new_charge_time, std::string new_description, bool new_faulty){
name = new_name;
power_source = new_power_source;
activated = new_activated;
power_cost = new_power_cost;
charge_time = new_charge_time;
description = new_description;
faulty = new_faulty;
}
bionic_id game::random_good_bionic() const
{
std::map<std::string,bionic_data*>::const_iterator random_bionic;
do
{
random_bionic = bionics.begin();
std::advance(random_bionic,rng(0,bionics.size()-1));
} while (random_bionic->first == "bio_null" || random_bionic->second->faulty);
return random_bionic->first;
}
// helper function for power_bionics
void show_power_level_in_titlebar(WINDOW* window, player* p)
{
mvwprintz(window, 1, 62, c_white, "Power: %d/%d", p->power_level, p->max_power_level);
}
void player::power_bionics(game *g)
{
WINDOW* wBio = newwin(25, 80, (TERMY > 25) ? (TERMY-25)/2 : 0, (TERMX > 80) ? (TERMX-80)/2 : 0);
WINDOW* w_description = newwin(3, 78, 21 + getbegy(wBio), 1 + getbegx(wBio));
int HEIGHT = TERMY;
int WIDTH = 80;
int START_X = (TERMX - WIDTH)/2;
int START_Y = (TERMY - HEIGHT)/2;
WINDOW* wBio = newwin(HEIGHT, WIDTH, START_Y, START_X);
int DESCRIPTION_WIDTH = WIDTH - 2; // Same width as bionics window minus 2 for the borders
int DESCRIPTION_HEIGHT = 3;
int DESCRIPTION_START_X = getbegx(wBio) + 1; // +1 to avoid border
int DESCRIPTION_START_Y = getmaxy(wBio) - DESCRIPTION_HEIGHT - 1; // At the bottom of the bio window, -1 to avoid border
WINDOW* w_description = newwin(DESCRIPTION_HEIGHT, DESCRIPTION_WIDTH, DESCRIPTION_START_Y, DESCRIPTION_START_X);
werase(wBio);
wborder(wBio, LINE_XOXO, LINE_XOXO, LINE_OXOX, LINE_OXOX,
@@ -22,23 +63,28 @@ void player::power_bionics(game *g)
std::vector <bionic> passive;
std::vector <bionic> active;
mvwprintz(wBio, 1, 1, c_blue, "BIONICS -");
mvwprintz(wBio, 1, 11, c_white, "Activating. Press '!' to examine your implants.");
int HEADER_TEXT_Y = START_Y + 1;
mvwprintz(wBio, HEADER_TEXT_Y, 1, c_blue, "BIONICS -");
mvwprintz(wBio, HEADER_TEXT_Y, 11, c_white, "Activating. Press '!' to examine your implants.");
show_power_level_in_titlebar(wBio, this);
int HEADER_LINE_Y = START_Y + 2;
int DESCRIPTION_LINE_Y = DESCRIPTION_START_Y - 1;
for (int i = 1; i < 79; i++) {
mvwputch(wBio, 2, i, c_ltgray, LINE_OXOX);
mvwputch(wBio, 20, i, c_ltgray, LINE_OXOX);
mvwputch(wBio, HEADER_LINE_Y, i, c_ltgray, LINE_OXOX); // Draw line under title
mvwputch(wBio, DESCRIPTION_LINE_Y, i, c_ltgray, LINE_OXOX); // Draw line above description
}
mvwputch(wBio, 2, 0, c_ltgray, LINE_XXXO); // |-
mvwputch(wBio, 2, 79, c_ltgray, LINE_XOXX); // -|
// Draw symbols to connect additional lines to border
mvwputch(wBio, HEADER_LINE_Y, 0, c_ltgray, LINE_XXXO); // |-
mvwputch(wBio, HEADER_LINE_Y, 79, c_ltgray, LINE_XOXX); // -|
mvwputch(wBio, 20, 0, c_ltgray, LINE_XXXO); // |-
mvwputch(wBio, 20, 79, c_ltgray, LINE_XOXX); // -|
mvwputch(wBio, DESCRIPTION_LINE_Y, 0, c_ltgray, LINE_XXXO); // |-
mvwputch(wBio, DESCRIPTION_LINE_Y, 79, c_ltgray, LINE_XOXX); // -|
for (int i = 0; i < my_bionics.size(); i++) {
if ( bionics[my_bionics[i].id].power_source ||
!bionics[my_bionics[i].id].activated )
if ( bionics[my_bionics[i].id]->power_source ||
!bionics[my_bionics[i].id]->activated )
passive.push_back(my_bionics[i]);
else
active.push_back(my_bionics[i]);
@@ -47,12 +93,12 @@ void player::power_bionics(game *g)
if (passive.size() > 0) {
mvwprintz(wBio, 3, 1, c_ltblue, "Passive:");
for (int i = 0; i < passive.size(); i++) {
if (bionics[passive[i].id].power_source)
if (bionics[passive[i].id]->power_source)
type = c_ltcyan;
else
type = c_cyan;
mvwputch(wBio, 4 + i, 1, type, passive[i].invlet);
mvwprintz(wBio, 4 + i, 3, type, bionics[passive[i].id].name.c_str());
mvwprintz(wBio, 4 + i, 3, type, bionics[passive[i].id]->name.c_str());
}
}
if (active.size() > 0) {
@@ -65,9 +111,9 @@ void player::power_bionics(game *g)
mvwputch(wBio, 4 + i, 33, type, active[i].invlet);
mvwprintz(wBio, 4 + i, 35, type,
(active[i].powered ? "%s - ON" : "%s - %d PU / %d trns"),
bionics[active[i].id].name.c_str(),
bionics[active[i].id].power_cost,
bionics[active[i].id].charge_time);
bionics[active[i].id]->name.c_str(),
bionics[active[i].id]->power_cost,
bionics[active[i].id]->charge_time);
}
}
wrefresh(wBio);
@@ -95,23 +141,25 @@ void player::power_bionics(game *g)
}
if (ch == KEY_ESCAPE) {
if (activating) {
if (bionics[tmp->id].activated) {
if (bionics[tmp->id]->activated) {
show_power_level_in_titlebar(wBio, this);
itype_id weapon_id = weapon.type->id;
if (tmp->powered) {
tmp->powered = false;
g->add_msg("%s powered off.", bionics[tmp->id].name.c_str());
} else if (power_level >= bionics[tmp->id].power_cost ||
(weapon.type->id == itm_bio_claws && tmp->id == bio_claws))
g->add_msg("%s powered off.", bionics[tmp->id]->name.c_str());
} else if (power_level >= bionics[tmp->id]->power_cost ||
(weapon_id == "bio_claws_weapon" && tmp->id == "bio_claws_weapon"))
activate_bionic(b, g);
} else
mvwprintz(wBio, 21, 1, c_ltred, "\
You can not activate %s! To read a description of \
%s, press '!', then '%c'.", bionics[tmp->id].name.c_str(),
bionics[tmp->id].name.c_str(), tmp->invlet);
%s, press '!', then '%c'.", bionics[tmp->id]->name.c_str(),
bionics[tmp->id]->name.c_str(), tmp->invlet);
} else { // Describing bionics, not activating them!
// Clear the lines first
ch = 0;
werase(w_description);
mvwprintz(w_description, 0, 0, c_ltblue, bionics[tmp->id].description.c_str());
mvwprintz(w_description, 0, 0, c_ltblue, bionics[tmp->id]->description.c_str());
}
}
}
@@ -132,15 +180,15 @@ You can not activate %s! To read a description of \
void player::activate_bionic(int b, game *g)
{
bionic bio = my_bionics[b];
int power_cost = bionics[bio.id].power_cost;
if (weapon.type->id == itm_bio_claws && bio.id == bio_claws)
int power_cost = bionics[bio.id]->power_cost;
if (weapon.type->id == "bio_claws_weapon" && bio.id == "bio_claws_weapon")
power_cost = 0;
if (power_level < power_cost) {
if (my_bionics[b].powered) {
g->add_msg("Your %s powers down.", bionics[bio.id].name.c_str());
g->add_msg("Your %s powers down.", bionics[bio.id]->name.c_str());
my_bionics[b].powered = false;
} else
g->add_msg("You cannot power your %s", bionics[bio.id].name.c_str());
g->add_msg("You cannot power your %s", bionics[bio.id]->name.c_str());
return;
}
@@ -149,9 +197,9 @@ void player::activate_bionic(int b, game *g)
my_bionics[b].charge--;
} else {
// Not-on units, or those with zero charge, have to pay the power cost
if (bionics[bio.id].charge_time > 0) {
if (bionics[bio.id]->charge_time > 0) {
my_bionics[b].powered = true;
my_bionics[b].charge = bionics[bio.id].charge_time;
my_bionics[b].charge = bionics[bio.id]->charge_time;
}
power_level -= power_cost;
}
@@ -165,20 +213,14 @@ void player::activate_bionic(int b, game *g)
InputEvent input;
item tmp_item;
switch (bio.id) {
case bio_painkiller:
if(bio.id == "bio_painkiller"){
pkill += 6;
pain -= 2;
if (pkill > pain)
pkill = pain;
break;
case bio_nanobots:
} else if (bio.id == "bio_nanobots"){
healall(4);
break;
case bio_resonator:
} else if (bio.id == "bio_resonator"){
g->sound(posx, posy, 30, "VRRRRMP!");
for (int i = posx - 1; i <= posx + 1; i++) {
for (int j = posy - 1; j <= posy + 1; j++) {
@@ -186,12 +228,10 @@ void player::activate_bionic(int b, game *g)
g->m.bash(i, j, 40, junk); // Multibash effect, so that doors &c will fall
g->m.bash(i, j, 40, junk);
if (g->m.is_destructable(i, j) && rng(1, 10) >= 4)
g->m.ter(i, j) = t_rubble;
g->m.ter_set(i, j, t_rubble);
}
}
break;
case bio_time_freeze:
} else if (bio.id == "bio_time_freeze"){
moves += 100 * power_level;
power_level = 0;
g->add_msg("Your speed suddenly increases!");
@@ -205,17 +245,13 @@ void player::activate_bionic(int b, game *g)
}
if (one_in(5))
add_disease(DI_TELEGLOW, rng(50, 400), g);
break;
case bio_teleport:
} else if (bio.id == "bio_teleport"){
g->teleport();
add_disease(DI_TELEGLOW, 300, g);
break;
}
// TODO: More stuff here (and bio_blood_filter)
case bio_blood_anal:
else if(bio.id == "bio_blood_anal"){
w = newwin(20, 40, 3 + ((TERMY > 25) ? (TERMY-25)/2 : 0), 10+((TERMX > 80) ? (TERMX-80)/2 : 0));
wborder(w, LINE_XOXO, LINE_XOXO, LINE_OXOX, LINE_OXOX,
LINE_OXXO, LINE_OOXX, LINE_XXOO, LINE_XOOX );
if (has_disease(DI_FUNGUS))
@@ -238,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))
@@ -260,9 +304,7 @@ void player::activate_bionic(int b, game *g)
refresh();
getch();
delwin(w);
break;
case bio_blood_filter:
} else if(bio.id == "bio_blood_filter"){
rem_disease(DI_FUNGUS);
rem_disease(DI_POISON);
rem_disease(DI_PKILL1);
@@ -272,14 +314,19 @@ 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);
break;
case bio_evap:
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[itm_water], 0);
tmp_item = item(g->itypes["water_clean"], 0);
thirst -= 50;
if (has_trait(PF_GOURMAND) && thirst < -60) {
g->add_msg("You can't finish it all!");
@@ -292,128 +339,112 @@ void player::activate_bionic(int b, game *g)
t = g->inv("Choose a container:");
if (i_at(t).type == 0) {
g->add_msg("You don't have that item!");
power_level += bionics[bio_evap].power_cost;
power_level += bionics["bio_evap"]->power_cost;
} else if (!i_at(t).is_container()) {
g->add_msg("That %s isn't a container!", i_at(t).tname().c_str());
power_level += bionics[bio_evap].power_cost;
power_level += bionics["bio_evap"]->power_cost;
} else {
it_container *cont = dynamic_cast<it_container*>(i_at(t).type);
if (i_at(t).volume_contained() + 1 > cont->contains) {
g->add_msg("There's no space left in your %s.", i_at(t).tname().c_str());
power_level += bionics[bio_evap].power_cost;
power_level += bionics["bio_evap"]->power_cost;
} else if (!(cont->flags & con_wtight)) {
g->add_msg("Your %s isn't watertight!", i_at(t).tname().c_str());
power_level += bionics[bio_evap].power_cost;
power_level += bionics["bio_evap"]->power_cost;
} else {
g->add_msg("You pour water into your %s.", i_at(t).tname().c_str());
i_at(t).put_in(item(g->itypes[itm_water], 0));
i_at(t).put_in(item(g->itypes["water_clean"], 0));
}
}
}
break;
case bio_lighter:
} else if(bio.id == "bio_lighter"){
g->draw();
mvprintw(0, 0, "Torch in which direction?");
input = get_input();
get_direction(dirx, diry, input);
if (dirx == -2) {
g->add_msg("Invalid direction.");
power_level += bionics[bio_lighter].power_cost;
power_level += bionics["bio_lighter"]->power_cost;
return;
}
dirx += posx;
diry += posy;
if (!g->m.add_field(g, dirx, diry, fd_fire, 1)) // Unsuccessful.
g->add_msg("You can't light a fire there.");
break;
case bio_claws:
if (weapon.type->id == itm_bio_claws) {
} else if(bio.id == "bio_claws"){
if (weapon.type->id == "bio_claws_weapon") {
g->add_msg("You withdraw your claws.");
weapon = ret_null;
} else if (weapon.type->id != 0) {
} else if(weapon.type->id != "null"){
g->add_msg("Your claws extend, forcing you to drop your %s.",
weapon.tname().c_str());
g->m.add_item(posx, posy, weapon);
weapon = item(g->itypes[itm_bio_claws], 0);
weapon = item(g->itypes["bio_claws_weapon"], 0);
weapon.invlet = '#';
} else {
g->add_msg("Your claws extend!");
weapon = item(g->itypes[itm_bio_claws], 0);
weapon = item(g->itypes["bio_claws_weapon"], 0);
weapon.invlet = '#';
}
break;
case bio_blaster:
} else if(bio.id == "bio_blaster"){
tmp_item = weapon;
weapon = item(g->itypes[itm_bio_blaster], 0);
weapon.curammo = dynamic_cast<it_ammo*>(g->itypes[itm_bio_fusion]);
weapon = item(g->itypes["bio_blaster_gun"], 0);
weapon.curammo = dynamic_cast<it_ammo*>(g->itypes["bio_fusion_ammo"]);
weapon.charges = 1;
g->refresh_all();
g->plfire(false);
weapon = tmp_item;
break;
case bio_laser:
} else if (bio.id == "bio_laser"){
tmp_item = weapon;
weapon = item(g->itypes[itm_v29], 0);
weapon.curammo = dynamic_cast<it_ammo*>(g->itypes[itm_laser_pack]);
weapon = item(g->itypes["v29"], 0);
weapon.curammo = dynamic_cast<it_ammo*>(g->itypes["laser_pack"]);
weapon.charges = 1;
g->refresh_all();
g->plfire(false);
weapon = tmp_item;
break;
case bio_emp:
} else if (bio.id == "bio_emp"){
g->draw();
mvprintw(0, 0, "Fire EMP in which direction?");
input = get_input();
get_direction(dirx, diry, input);
if (dirx == -2) {
g->add_msg("Invalid direction.");
power_level += bionics[bio_emp].power_cost;
power_level += bionics["bio_emp"]->power_cost;
return;
}
dirx += posx;
diry += posy;
g->emp_blast(dirx, diry);
break;
case bio_hydraulics:
} else if (bio.id == "bio_hydraulics"){
g->add_msg("Your muscles hiss as hydraulic strength fills them!");
break;
case bio_water_extractor:
} else if (bio.id == "bio_water_extractor"){
for (int i = 0; i < g->m.i_at(posx, posy).size(); i++) {
item tmp = g->m.i_at(posx, posy)[i];
if (tmp.type->id == itm_corpse && query_yn("Extract water from the %s",
if (tmp.type->id == "corpse" && query_yn("Extract water from the %s",
tmp.tname().c_str())) {
i = g->m.i_at(posx, posy).size() + 1; // Loop is finished
t = g->inv("Choose a container:");
if (i_at(t).type == 0) {
g->add_msg("You don't have that item!");
power_level += bionics[bio_water_extractor].power_cost;
power_level += bionics["bio_water_extractor"]->power_cost;
} else if (!i_at(t).is_container()) {
g->add_msg("That %s isn't a container!", i_at(t).tname().c_str());
power_level += bionics[bio_water_extractor].power_cost;
power_level += bionics["bio_water_extractor"]->power_cost;
} else {
it_container *cont = dynamic_cast<it_container*>(i_at(t).type);
if (i_at(t).volume_contained() + 1 > cont->contains) {
g->add_msg("There's no space left in your %s.", i_at(t).tname().c_str());
power_level += bionics[bio_water_extractor].power_cost;
power_level += bionics["bio_water_extractor"]->power_cost;
} else {
g->add_msg("You pour water into your %s.", i_at(t).tname().c_str());
i_at(t).put_in(item(g->itypes[itm_water], 0));
i_at(t).put_in(item(g->itypes["water"], 0));
}
}
}
if (i == g->m.i_at(posx, posy).size() - 1) // We never chose a corpse
power_level += bionics[bio_water_extractor].power_cost;
power_level += bionics["bio_water_extractor"]->power_cost;
}
break;
case bio_magnet:
} else if(bio.id == "bio_magnet"){
for (int i = posx - 10; i <= posx + 10; i++) {
for (int j = posy - 10; j <= posy + 10; j++) {
if (g->m.i_at(i, j).size() > 0) {
@@ -424,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++) {
@@ -449,16 +480,14 @@ void player::activate_bionic(int b, game *g)
}
}
}
break;
case bio_lockpick:
} else if(bio.id == "bio_lockpick"){
g->draw();
mvprintw(0, 0, "Unlock in which direction?");
input = get_input();
get_direction(dirx, diry, input);
if (dirx == -2) {
g->add_msg("Invalid direction.");
power_level += bionics[bio_lockpick].power_cost;
power_level += bionics["bio_lockpick"]->power_cost;
return;
}
dirx += posx;
@@ -466,11 +495,9 @@ void player::activate_bionic(int b, game *g)
if (g->m.ter(dirx, diry) == t_door_locked) {
moves -= 40;
g->add_msg("You unlock the door.");
g->m.ter(dirx, diry) = t_door_c;
g->m.ter_set(dirx, diry, t_door_c);
} else
g->add_msg("You can't unlock that %s.", g->m.tername(dirx, diry).c_str());
break;
}
}
@@ -515,9 +542,9 @@ bool player::install_bionics(game *g, it_bionic* type)
// Init the list of bionics
for (int i = 1; i < type->options.size(); i++) {
bionic_id id = type->options[i];
mvwprintz(w, i + 3, 1, (has_bionic(id) ? c_ltred : c_ltblue),
bionics[id].name.c_str());
bionic_id bio_id = type->options[i];
mvwprintz(w, i + 3, 1, (has_bionic(bio_id) ? c_ltred : c_ltblue),
bionics[bio_id]->name.c_str());
}
// Helper text
mvwprintz(w, 3, 39, c_white, "Difficulty of this module: %d",
@@ -552,27 +579,33 @@ bool player::install_bionics(game *g, it_bionic* type)
mvwprintz(w, 13, 39, c_white, "or faulty installation.");
wrefresh(w);
if (type->id == itm_bionics_battery) { // No selection list; just confirm
mvwprintz(w, 3, 1, h_ltblue, "Battery Level +%d", BATTERY_AMOUNT);
if (type->id == "bio_power_storage" || type->id == "bio_power_storage_mkII") { // No selection list; just confirm
int pow_up = BATTERY_AMOUNT;
if (type->id == "bio_power_storage_mkII") {
pow_up = 10;
}
mvwprintz(w, 3, 1, h_ltblue, "Power Storage +%d", pow_up);
mvwprintz(w_description, 0, 0, c_ltblue, "\
Installing this bionic will increase your total battery capacity by %d.\n\
Batteries are necessary for most bionics to function. They also require a\n\
charge mechanism, which must be installed from another CBM.", BATTERY_AMOUNT);
Installing this bionic will increase your total power storage by %d.\n\
Power is necessary for most bionics to function. You also require a\n\
charge mechanism, which must be installed from another CBM.", pow_up);
InputEvent input;
wrefresh(w_description);
wrefresh(w);
do
input = get_input();
while (input != Confirm && input != Close);
while (input != Confirm && input != Cancel);
if (input == Confirm) {
practice("electronics", (100 - chance_of_success) * 1.5);
practice("firstaid", (100 - chance_of_success) * 1.0);
practice("mechanics", (100 - chance_of_success) * 0.5);
practice(g->turn, "electronics", (100 - chance_of_success) * 1.5);
practice(g->turn, "firstaid", (100 - chance_of_success) * 1.0);
practice(g->turn, "mechanics", (100 - chance_of_success) * 0.5);
int success = chance_of_success - rng(1, 100);
if (success > 0) {
g->add_msg("Successfully installed batteries.");
max_power_level += BATTERY_AMOUNT;
max_power_level += pow_up;
} else
bionics_install_failure(g, this, success);
werase(w);
@@ -591,14 +624,14 @@ charge mechanism, which must be installed from another CBM.", BATTERY_AMOUNT);
do {
bionic_id id = type->options[selection];
mvwprintz(w, 3 + selection, 1, (has_bionic(id) ? h_ltred : h_ltblue),
bionics[id].name.c_str());
bionic_id bio_id = type->options[selection];
mvwprintz(w, 3 + selection, 1, (has_bionic(bio_id) ? h_ltred : h_ltblue),
bionics[bio_id]->name.c_str());
// Clear the bottom three lines...
werase(w_description);
// ...and then fill them with the description of the selected bionic
mvwprintz(w_description, 0, 0, c_ltblue, bionics[id].description.c_str());
mvwprintz(w_description, 0, 0, c_ltblue, bionics[bio_id]->description.c_str());
wrefresh(w_description);
wrefresh(w);
@@ -606,8 +639,8 @@ charge mechanism, which must be installed from another CBM.", BATTERY_AMOUNT);
switch (input) {
case DirectionS:
mvwprintz(w, 2 + selection, 0, (has_bionic(id) ? c_ltred : c_ltblue),
bionics[id].name.c_str());
mvwprintz(w, 2 + selection, 0, (has_bionic(bio_id) ? c_ltred : c_ltblue),
bionics[bio_id]->name.c_str());
if (selection == type->options.size() - 1)
selection = 0;
else
@@ -615,8 +648,8 @@ charge mechanism, which must be installed from another CBM.", BATTERY_AMOUNT);
break;
case DirectionN:
mvwprintz(w, 2 + selection, 0, (has_bionic(id) ? c_ltred : c_ltblue),
bionics[id].name.c_str());
mvwprintz(w, 2 + selection, 0, (has_bionic(bio_id) ? c_ltred : c_ltblue),
bionics[bio_id]->name.c_str());
if (selection == 0)
selection = type->options.size() - 1;
else
@@ -624,21 +657,21 @@ charge mechanism, which must be installed from another CBM.", BATTERY_AMOUNT);
break;
}
if (input == Confirm && has_bionic(id)) {
popup("You already have a %s!", bionics[id].name.c_str());
if (input == Confirm && has_bionic(bio_id)) {
popup("You already have a %s!", bionics[bio_id]->name.c_str());
input = Nothing;
}
} while (input != Cancel && input != Confirm);
if (input == Confirm) {
practice("electronics", (100 - chance_of_success) * 1.5);
practice("firstaid", (100 - chance_of_success) * 1.0);
practice("mechanics", (100 - chance_of_success) * 0.5);
bionic_id id = type->options[selection];
practice(g->turn, "electronics", (100 - chance_of_success) * 1.5);
practice(g->turn, "firstaid", (100 - chance_of_success) * 1.0);
practice(g->turn, "mechanics", (100 - chance_of_success) * 0.5);
bionic_id bio_id = type->options[selection];
int success = chance_of_success - rng(1, 100);
if (success > 0) {
g->add_msg("Successfully installed %s.", bionics[id].name.c_str());
add_bionic(id);
g->add_msg("Successfully installed %s.", bionics[bio_id]->name.c_str());
add_bionic(bio_id);
} else
bionics_install_failure(g, this, success);
werase(w);
@@ -716,10 +749,10 @@ void bionics_install_failure(game *g, player *u, int success)
{
fail_text += ", causing a faulty installation.";
std::vector<bionic_id> valid;
for (int i = max_bio_good + 1; i < max_bio; i++) {
bionic_id id = bionic_id(i);
if (!u->has_bionic(id))
valid.push_back(id);
for (std::vector<std::string>::iterator it = faulty_bionics.begin() ; it != faulty_bionics.end(); ++it){
if (!u->has_bionic(*it)){
valid.push_back(*it);
}
}
if (valid.size() == 0) { // We've got all the bad bionics!
if (u->max_power_level > 0) {
@@ -738,3 +771,270 @@ void bionics_install_failure(game *g, player *u, int success)
g->add_msg(fail_text.c_str());
}
void game::init_bionics(){
bionics["bio_null"] = new bionic_data("NULL bionics", false, false, 0, 0, "\
If you're seeing this, it's a bug. (game::init_bionics)");
// NAME ,PW_SRC, ACT ,COST, TIME,
bionics["bio_batteries"] = new bionic_data("Battery System", true, false, 0, 0, "\
You have a battery draining attachment, and thus can make use of the energy\n\
contained in normal, everyday batteries. Use 'E' to consume batteries.");
power_source_bionics.push_back("bio_batteries");
bionics["bio_metabolics"] = new bionic_data("Metabolic Interchange", true, false, 0, 0, "\
Your digestive system and power supply are interconnected. Any drain on\n\
energy instead increases your hunger.");
power_source_bionics.push_back("bio_metabolics");
bionics["bio_solar"] = new bionic_data("Solar Panels", true, false, 0, 0, "\
You have a few solar panels installed. While in direct sunlight, your power\n\
level will slowly recharge.");
power_source_bionics.push_back("bio_solar");
bionics["bio_torsionratchet"] = new bionic_data("Joint Torsion Ratchet", true, false, 0, 0, "\
Your joints have been equipped with torsion ratchets that generate power slowly\n\
when you move.");
power_source_bionics.push_back("bio_torsionratchet");
bionics["bio_furnace"] = new bionic_data("Internal Furnace", true, false, 0, 0, "\
You can burn nearly any organic material as fuel (use 'E'), recharging your\n\
power level. Some materials will burn better than others.");
power_source_bionics.push_back("bio_furnace");
bionics["bio_ethanol"] = new bionic_data("Ethanol Burner", true, false, 0, 0, "\
You burn alcohol as fuel in an extremely efficient reaction. However, you\n\
will still suffer the inebriating effects of the substance.");
power_source_bionics.push_back("bio_ethanol");
bionics["bio_memory"] = new bionic_data("Enhanced Memory Banks", false, false, 1, 0, "\
Your memory has been enhanced with small quantum storage drives. Any time\n\
you start to forget a skill, you have a chance at retaining all knowledge, at\n\
the cost of a small amount of poweron.");
unpowered_bionics.push_back("bio_memory");
bionics["bio_ears"] = new bionic_data("Enhanced Hearing", false, false, 0, 0, "\
Your hearing has been drastically improved, allowing you to hear ten times\n\
better than the average person. Additionally, high-intensity sounds will be\n\
automatically dampened before they can damage your hearing.");
unpowered_bionics.push_back("bio_ears");
bionics["bio_eye_enhancer"] = new bionic_data("Diamond Cornea", false, false, 0, 0, "\
Your vision is greatly enhanced, giving you a +2 bonus to perception.");
unpowered_bionics.push_back("bio_eye_enhancer");
bionics["bio_membrane"] = new bionic_data("Nictating Membrane", false, false, 0, 0, "\
Your eyes have a thin membrane that closes over your eyes while underwater,\n\
negating any vision penalties.");
unpowered_bionics.push_back("bio_membrane");
bionics["bio_targeting"] = new bionic_data("Targeting System", false, false, 0, 0, "\
Your eyes are equipped with range finders, and their movement is synced with\n\
that of your arms, to a degree. Shots you fire will be much more accurate,\n\
particularly at long range.");
unpowered_bionics.push_back("bio_targeting");
bionics["bio_gills"] = new bionic_data("Membrane Oxygenator", false, false, 1, 0, "\
An oxygen interchange system automatically switches on while underwater,\n\
slowly draining your energy reserves but providing oxygen.");
unpowered_bionics.push_back("bio_gills");
bionics["bio_purifier"] = new bionic_data("Air Filtration System", false, false, 1, 0, "\
Implanted in your trachea is an advanced filtration system. If toxins find\n\
their way into your windpipe, the filter will attempt to remove them.");
unpowered_bionics.push_back("bio_purifier");
bionics["bio_climate"] = new bionic_data("Internal Climate Control", false, true, 1, 30, "\
Throughout your body lies a network of thermal piping which eases the effects\n\
of high and low ambient temperatures.");
unpowered_bionics.push_back("bio_climate");
bionics["bio_storage"] = new bionic_data("Internal Storage", false, false, 0, 0, "\
Space inside your chest cavity has been converted into a storage area. You\n\
may carry an extra 8 units of volume.");
unpowered_bionics.push_back("bio_storage");
bionics["bio_recycler"] = new bionic_data("Recycler Unit", false, false, 0, 0, "\
Your digestive system has been outfitted with a series of filters and\n\
processors, allowing you to reclaim waste liquid and, to a lesser degree,\n\
nutrients. The net effect is a greatly reduced need to eat and drink.");
unpowered_bionics.push_back("bio_recycler");
bionics["bio_digestion"] = new bionic_data("Expanded Digestive System", false, false, 0, 0, "\
You have been outfitted with three synthetic stomachs and industrial-grade\n\
intestines. Not only can you extract much more nutrition from food, but you\n\
are highly resistant to foodborne illness, and can sometimes eat rotten food.");
unpowered_bionics.push_back("bio_digestion");
bionics["bio_tools"] = new bionic_data("Integrated Toolset", false, false, 0, 0, "\
Implanted in your hands and fingers is a complete tool set - screwdriver,\n\
hammer, wrench, and heating elements. You can use this in place of many\n\
tools when crafting.");
unpowered_bionics.push_back("bio_tools");
bionics["bio_shock"] = new bionic_data("Electroshock Unit", false, false, 1, 0, "\
While fighting unarmed, or with a weapon that conducts electricity, there is\n\
a chance that a successful hit will shock your opponent, inflicting extra\n\
damage and disabling them temporarily at the cost of some energy.");
unpowered_bionics.push_back("bio_shock");
bionics["bio_heat_absorb"] = new bionic_data("Heat Drain", false, false, 1, 0, "\
While fighting unarmed against a warm-blooded opponent, there is a chance\n\
that a successful hit will drain body heat, inflicting a small amount of\n\
extra damage, and increasing your power reserves slightly.");
unpowered_bionics.push_back("bio_heat_absorb");
bionics["bio_carbon"] = new bionic_data("Subdermal Carbon Filament", false, false, 0, 0, "\
Lying just beneath your skin is a thin armor made of carbon nanotubes. This\n\
reduces bashing damage by 2 and cutting damage by 4.");
unpowered_bionics.push_back("bio_carbon");
bionics["bio_armor_head"] = new bionic_data("Alloy Plating - Head", false, false, 0, 0, "\
The flesh on your head has been replaced by a strong armor, protecting both\n\
your head and jaw regions.");
unpowered_bionics.push_back("bio_armor_head");
bionics["bio_armor_torso"] = new bionic_data("Alloy Plating - Torso", false, false, 0, 0, "\
The flesh on your torso has been replaced by a strong armor, protecting you\n\
greatly.");
unpowered_bionics.push_back("bio_armor_torso");
bionics["bio_armor_arms"] = new bionic_data("Alloy Plating - Arms", false, false, 0, 0, "\
The flesh on your arms has been replaced by a strong armor, protecting you\n\
greatly.");
unpowered_bionics.push_back("bio_armor_arms");
bionics["bio_armor_legs"] = new bionic_data("Alloy Plating - Legs", false, false, 0, 0, "\
The flesh on your legs has been replaced by a strong armor, protecting you\n\
greatly.");
unpowered_bionics.push_back("bio_armor_legs");
bionics["bio_flashlight"] = new bionic_data("Cranial Flashlight", false, true, 1, 30, "\
Mounted between your eyes is a small but powerful LED flashlight.");
bionics["bio_night_vision"] = new bionic_data("Implanted Night Vision", false, true, 1, 20, "\
Your eyes have been modified to amplify existing light, allowing you to see\n\
in the dark.");
bionics["bio_infrared"] = new bionic_data("Infrared Vision", false, true, 1, 4, "\
Your range of vision extends into the infrared, allowing you to see warm-\n\
blooded creatures in the dark, and even through walls.");
bionics["bio_face_mask"] = new bionic_data("Facial Distortion", false, true, 1, 10, "\
Your face is actually made of a compound which may be molded by electrical\n\
impulses, making you impossible to recognize. While not powered, however,\n\
the compound reverts to its default shape.");
bionics["bio_ads"] = new bionic_data("Active Defense System", false, true, 1, 7, "\
A thin forcefield surrounds your body, continually draining power. Anything\n\
attempting to penetrate this field has a chance of being deflected at the\n\
cost of more energy. Melee attacks will be stopped more often than bullets.");
bionics["bio_ods"] = new bionic_data("Offensive Defense System", false, true, 1, 6, "\
A thin forcefield surrounds your body, continually draining power. This\n\
field does not deflect penetration, but rather delivers a very strong shock,\n\
damaging unarmed attackers and those with a conductive weapon.");
bionics["bio_scent_mask"] = new bionic_data("Olfactory Mask", false, true, 1, 8, "\
While this system is powered, your body will produce very little odor, making\n\
it nearly impossible for creatures to track you by scent.");
bionics["bio_scent_vision"] = new bionic_data("Scent Vision", false, true, 1, 30, "\
While this system is powered, you're able to visually sense your own scent,\n\
making it possible for you to recognize your surroundings even if you can't\n\
see it.");
bionics["bio_cloak"] = new bionic_data("Cloaking System", false, true, 2, 1, "\
This high-power system uses a set of cameras and LEDs to make you blend into\n\
your background, rendering you fully invisible to normal vision. However,\n\
you may be detected by infrared, sonar, etc.");
bionics["bio_painkiller"] = new bionic_data("Sensory Dulling", false, true, 2, 0, "\
Your nervous system is wired to allow you to inhibit the signals of pain,\n\
allowing you to dull your senses at will. However, the use of this system\n\
may cause delayed reaction time and drowsiness.");
bionics["bio_nanobots"] = new bionic_data("Repair Nanobots", false, true, 5, 0, "\
Inside your body is a fleet of tiny dormant robots. Once charged from your\n\
energy banks, they will flit about your body, repairing any damage.");
bionics["bio_heatsink"] = new bionic_data("Thermal Dissipation", false, true, 1, 6, "\
Powerful heatsinks supermaterials are woven into your flesh. While powered,\n\
this system will prevent heat damage up to 2000 degrees fahrenheit. Note\n\
that this does not affect your internal temperature.");
bionics["bio_resonator"] = new bionic_data("Sonic Resonator", false, true, 4, 0, "\
Your entire body may resonate at very high power, creating a short-range\n\
shockwave. While it will not to much damage to flexible creatures, stiff\n\
items such as walls, doors, and even robots will be severely damaged.");
bionics["bio_time_freeze"] = new bionic_data("Time Dilation", false, true, 3, 0, "\
At an immense cost of power, you may increase your body speed and reactions\n\
dramatically, essentially freezing time. You are still delicate, however,\n\
and violent or rapid movements may damage you due to friction.");
bionics["bio_teleport"] = new bionic_data("Teleportation Unit", false, true, 10, 0, "\
This highly experimental unit folds space over short distances, instantly\n\
transporting your body up to 25 feet at the cost of much power. Note that\n\
prolonged or frequent use may have dangerous side effects.");
bionics["bio_blood_anal"] = new bionic_data("Blood Analysis", false, true, 1, 0, "\
Small sensors have been implanted in your heart, allowing you to analyse your\n\
blood. This will detect many illnesses, drugs, and other conditions.");
bionics["bio_blood_filter"] = new bionic_data("Blood Filter", false, true, 3, 0, "\
A filtration system in your heart allows you to actively filter out chemical\n\
impurities, primarily drugs. It will have limited impact on viruses. Note\n\
that it is not a targeted filter; ALL drugs in your system will be affected.");
bionics["bio_alarm"] = new bionic_data("Alarm System", false, true, 1, 400, "\
A motion-detecting alarm system will notice almost all movement within a\n\
fifteen-foot radius, and will silently alert you. This is very useful during\n\
sleep, or if you suspect a cloaked pursuer.");
bionics["bio_evap"] = new bionic_data("Aero-Evaporator", false, true, 8, 0, "\
This unit draws moisture from the surrounding air, which then is poured from\n\
a fingertip in the form of water. It may fail in very dry environments.");
bionics["bio_lighter"] = new bionic_data("Mini-Flamethrower", false, true, 3, 0, "\
The index fingers of both hands have powerful fire starters which extend from\n\
the tip.");
bionics["bio_claws"] = new bionic_data("Adamantium Claws", false, true, 3, 0, "\
Your fingers can withdraw into your hands, allowing a set of vicious claws to\n\
extend. These do considerable cutting damage, but prevent you from holding\n\
anything else.");
bionics["bio_blaster"] = new bionic_data("Fusion Blaster Arm", false, true, 2, 0, "\
Your left arm has been replaced by a heavy-duty fusion blaster! You may use\n\
your energy banks to fire a damaging heat ray; however, you are unable to use\n\
or carry two-handed items, and may only fire handguns.");
bionics["bio_laser"] = new bionic_data("Finger-Mounted Laser", false, true, 2, 0, "\
One of your fingers has a small high-powered laser embedded in it. This long\n\
range weapon is not incredibly damaging, but is very accurate, and has the\n\
potential to start fires.");
bionics["bio_emp"] = new bionic_data("Directional EMP", false, true, 4, 0, "\
Mounted in the palms of your hand are small parabolic EMP field generators.\n\
You may use power to fire a short-ranged blast which will disable electronics\n\
and robots.");
bionics["bio_hydraulics"] = new bionic_data("Hydraulic Muscles", false, true, 1, 3, "\
While activated, the muscles in your arms will be greatly enchanced,\n\
increasing your strength by 20.");
bionics["bio_water_extractor"] = new bionic_data("Water Extraction Unit", false, true, 2, 0, "\
Nanotubes embedded in the palm of your hand will pump any available fluid out\n\
of a dead body, cleanse it of impurities and convert it into drinkable water.\n\
You must, however, have a container to store the water in.");
bionics["bio_magnet"] = new bionic_data("Electromagnetic Unit", false, true, 2, 0, "\
Embedded in your hand is a powerful electromagnet, allowing you to pull items\n\
made of iron over short distances.");
bionics["bio_fingerhack"] = new bionic_data("Fingerhack", false, true, 1, 0, "\
One of your fingers has an electrohack embedded in it; an all-purpose hacking\n\
unit used to override control panels and the like (but not computers). Skill\n\
in computers is important, and a failed use may damage your circuits.");
bionics["bio_lockpick"] = new bionic_data("Fingerpick", false, true, 1, 0, "\
One of your fingers has an electronic lockpick embedded in it. This auto-\n\
matic system will quickly unlock all but the most advanced key locks without\n\
any skill required on the part of the user.");
bionics["bio_ground_sonar"] = new bionic_data("Terranian Sonar", false, true, 1, 5, "\
Your feet are equipped with precision sonar equipment, allowing you to detect\n\
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\
your body, causing pain and brief paralysis but no damage.",true);
faulty_bionics.push_back("bio_dis_shock");
bionics["bio_dis_acid"] = new bionic_data("Acidic Discharge", false, false, 0, 0, "\
A malfunctioning bionic which occasionally discharges acid into your muscles,\n\
causing sharp pain and minor damage.",true);
faulty_bionics.push_back("bio_dis_shock");
bionics["bio_drain"] = new bionic_data("Electrical Drain", false, false, 0, 0, "\
A malfunctioning bionic. It doesn't perform any useful function, but will\n\
occasionally draw power from your batteries.",true);
faulty_bionics.push_back("bio_drain");
bionics["bio_noise"] = new bionic_data("Noisemaker", false, false, 0, 0, "\
A malfunctioning bionic. It will occasionally emit a loud burst of noise.",true);
faulty_bionics.push_back("bio_noise");
bionics["bio_power_weakness"] = new bionic_data("Power Overload", false, false, 0, 0, "\
Damaged power circuits cause short-circuiting inside your muscles when your\n\
batteries are above 75%%%% capacity, causing greatly reduced strength. This\n\
has no effect if you have no internal batteries.",true);
faulty_bionics.push_back("bio_power_weakness");
bionics["bio_stiff"] = new bionic_data("Wire-induced Stiffness", false, false, 0, 0, "\
Improperly installed wires cause a physical stiffness in most of your body,\n\
causing increased encumberance.",true);
faulty_bionics.push_back("bio_stiff");
}
+21 -300
View File
@@ -1,51 +1,27 @@
#ifndef _BIONICS_H_
#define _BIONICS_H_
#include <string>
#include <map>
/* Thought: Perhaps a HUD bionic that changes the display of the game?
* Showing more information or something. */
enum bionic_id {
bio_null,
// Power sources
bio_batteries, bio_metabolics, bio_solar, bio_furnace, bio_ethanol,
// Automatic / Always-On
bio_memory, bio_ears,
bio_eye_enhancer, bio_membrane, bio_targeting,
bio_gills, bio_purifier,
bio_climate, bio_storage, bio_recycler, bio_digestion, // TODO: Ynnn
bio_tools, bio_shock, bio_heat_absorb,
bio_carbon, bio_armor_head, bio_armor_torso, bio_armor_arms, bio_armor_legs,
// Player Activated
bio_flashlight, bio_night_vision, bio_infrared,
bio_face_mask, // TODO
bio_ads, bio_ods, bio_scent_mask,bio_scent_vision, bio_cloak, bio_painkiller,
bio_nanobots, bio_heatsink, bio_resonator, bio_time_freeze, bio_teleport,
bio_blood_anal, bio_blood_filter, bio_alarm,
bio_evap, bio_lighter, bio_claws, bio_blaster, bio_laser, bio_emp,
bio_hydraulics, bio_water_extractor, bio_magnet, bio_fingerhack, bio_lockpick,
bio_ground_sonar,
max_bio_start,
// EVERYTHING below this point is not available to brand-new players
// TODO: all these suckers
bio_banish, bio_gate_out, bio_gate_in, bio_nightfall, bio_drilldown,
bio_heatwave, bio_lightning, bio_tremor, bio_flashflood,
max_bio_good,
// Everything below THIS point is bad bionics, meant to be punishments
bio_dis_shock, bio_dis_acid, bio_drain, bio_noise, bio_power_weakness,
bio_stiff,
max_bio
};
typedef std::string bionic_id;
struct bionic_data {
std::string name;
bool power_source;
bool activated; // If true, then the below function only happens when
// activated; otherwise, it happens every turn
int power_cost;
int charge_time; // How long, when activated, between drawing power_cost
// If 0, it draws power once
std::string description;
class bionic_data {
public:
bionic_data(std::string new_name, bool new_power_source, bool new_activated,
int new_power_cost, int new_charge_time, std::string new_description, bool new_faulty = false);
std::string name;
bool power_source;
bool activated; // If true, then the below function only happens when
// activated; otherwise, it happens every turn
int power_cost;
int charge_time; // How long, when activated, between drawing power_cost
// If 0, it draws power once
std::string description;
bool faulty; // Whether or not the bionic is faulty
};
struct bionic {
@@ -54,7 +30,7 @@ struct bionic {
bool powered;
int charge;
bionic() {
id = bio_batteries;
id = "bio_batteries";
invlet = 'a';
powered = false;
charge = 0;
@@ -67,264 +43,9 @@ struct bionic {
};
};
const bionic_data bionics[] = {
{"NULL bionics", false, false, 0, 0, "\
If you're seeing this, it's a bug."},
// NAME ,PW_SRC, ACT ,COST, TIME,
{"Battery System", true, false, 0, 0, "\
You have a battery draining attachment, and thus can make use of the energy\n\
contained in normal, everyday batteries. Use 'E' to consume batteries."},
{"Metabolic Interchange", true, false, 0, 0, "\
Your digestive system and power supply are interconnected. Any drain on\n\
energy instead increases your hunger."},
{"Solar Panels", true, false, 0, 0, "\
You have a few solar panels installed. While in direct sunlight, your power\n\
level will slowly recharge."},
{"Internal Furnace", true, false, 0, 0, "\
You can burn nearly any organic material as fuel (use 'E'), recharging your\n\
power level. Some materials will burn better than others."},
{"Ethanol Burner", true, false, 0, 0, "\
You burn alcohol as fuel in an extremely efficient reaction. However, you\n\
will still suffer the inebriating effects of the substance."},
{"Enhanced Memory Banks", false, false, 1, 0, "\
Your memory has been enhanced with small quantum storage drives. Any time\n\
you start to forget a skill, you have a chance at retaining all knowledge, at\n\
the cost of a small amount of power."},
{"Enhanced Hearing", false, false, 0, 0, "\
Your hearing has been drastically improved, allowing you to hear ten times\n\
better than the average person. Additionally, high-intensity sounds will be\n\
automatically dampened before they can damage your hearing."},
{"Diamond Cornea", false, false, 0, 0, "\
Your vision is greatly enhanced, giving you a +2 bonus to perception."},
{"Nictating Membrane", false, false, 0, 0, "\
Your eyes have a thin membrane that closes over your eyes while underwater,\n\
negating any vision penalties."},
{"Targeting System", false, false, 0, 0, "\
Your eyes are equipped with range finders, and their movement is synced with\n\
that of your arms, to a degree. Shots you fire will be much more accurate,\n\
particularly at long range."},
{"Membrane Oxygenator", false, false, 1, 0, "\
An oxygen interchange system automatically switches on while underwater,\n\
slowly draining your energy reserves but providing oxygen."},
{"Air Filtration System", false, false, 1, 0, "\
Implanted in your trachea is an advanced filtration system. If toxins find\n\
their way into your windpipe, the filter will attempt to remove them."},
{"Internal Climate Control", false, true, 1, 30, "\
Throughout your body lies a network of thermal piping which eases the effects\n\
of high and low ambient temperatures."},
{"Internal Storage", false, false, 0, 0, "\
Space inside your chest cavity has been converted into a storage area. You\n\
may carry an extra 8 units of volume."},
{"Recycler Unit", false, false, 0, 0, "\
Your digestive system has been outfitted with a series of filters and\n\
processors, allowing you to reclaim waste liquid and, to a lesser degree,\n\
nutrients. The net effect is a greatly reduced need to eat and drink."},
{"Expanded Digestive System", false, false, 0, 0, "\
You have been outfitted with three synthetic stomachs and industrial-grade\n\
intestines. Not only can you extract much more nutrition from food, but you\n\
are highly resistant to foodborne illness, and can sometimes eat rotten food."},
{"Integrated Toolset", false, false, 0, 0, "\
Implanted in your hands and fingers is a complete tool set - screwdriver,\n\
hammer, wrench, and heating elements. You can use this in place of many\n\
tools when crafting."},
{"Electroshock Unit", false, false, 1, 0, "\
While fighting unarmed, or with a weapon that conducts electricity, there is\n\
a chance that a successful hit will shock your opponent, inflicting extra\n\
damage and disabling them temporarily at the cost of some energy."},
{"Heat Drain", false, false, 1, 0, "\
While fighting unarmed against a warm-blooded opponent, there is a chance\n\
that a successful hit will drain body heat, inflicting a small amount of\n\
extra damage, and increasing your power reserves slightly."},
{"Subdermal Carbon Filament", false, false, 0, 0, "\
Lying just beneath your skin is a thin armor made of carbon nanotubes. This\n\
reduces bashing damage by 2 and cutting damage by 4, but also reduces your\n\
dexterity by 2."},
{"Alloy Plating - Head", false, false, 0, 0, "\
The flesh on your head has been replaced by a strong armor, protecting both\n\
your head and jaw regions, but increasing encumberance by 2 and decreasing\n\
perception by 1."},
{"Alloy Plating - Torso", false, false, 0, 0, "\
The flesh on your torso has been replaced by a strong armor, protecting you\n\
greatly, but increasing your encumberance by 2."},
{"Alloy Plating - Arms", false, false, 0, 0, "\
The flesh on your arms has been replaced by a strong armor, protecting you\n\
greatly, but decreasing your dexterity by 1."},
{"Alloy Plating - Legs", false, false, 0, 0, "\
The flesh on your legs has been replaced by a strong armor, protecting you\n\
greatly, but decreasing your speed by 15."},
{"Cranial Flashlight", false, true, 1, 30, "\
Mounted between your eyes is a small but powerful LED flashlight."},
{"Implanted Night Vision", false, true, 1, 20, "\
Your eyes have been modified to amplify existing light, allowing you to see\n\
in the dark."},
{"Infrared Vision", false, true, 1, 4, "\
Your range of vision extends into the infrared, allowing you to see warm-\n\
blooded creatures in the dark, and even through walls."},
{"Facial Distortion", false, true, 1, 10, "\
Your face is actually made of a compound which may be molded by electrical\n\
impulses, making you impossible to recognize. While not powered, however,\n\
the compound reverts to its default shape."},
{"Active Defense System", false, true, 1, 7, "\
A thin forcefield surrounds your body, continually draining power. Anything\n\
attempting to penetrate this field has a chance of being deflected at the\n\
cost of more energy. Melee attacks will be stopped more often than bullets."},
{"Offensive Defense System", false, true, 1, 6, "\
A thin forcefield surrounds your body, continually draining power. This\n\
field does not deflect penetration, but rather delivers a very strong shock,\n\
damaging unarmed attackers and those with a conductive weapon."},
{"Olfactory Mask", false, true, 1, 8, "\
While this system is powered, your body will produce very little odor, making\n\
it nearly impossible for creatures to track you by scent."},
{"Scent Vision", false, true, 1, 30, "\
While this system is powered, you're able to visually sense your own scent,\n\
making it possible for you to recognize your surroundings even if you can't\n\
see it."},
{"Cloaking System", false, true, 2, 1, "\
This high-power system uses a set of cameras and LEDs to make you blend into\n\
your background, rendering you fully invisible to normal vision. However,\n\
you may be detected by infrared, sonar, etc."},
{"Sensory Dulling", false, true, 2, 0, "\
Your nervous system is wired to allow you to inhibit the signals of pain,\n\
allowing you to dull your senses at will. However, the use of this system\n\
may cause delayed reaction time and drowsiness."},
{"Repair Nanobots", false, true, 5, 0, "\
Inside your body is a fleet of tiny dormant robots. Once charged from your\n\
energy banks, they will flit about your body, repairing any damage."},
{"Thermal Dissapation", false, true, 1, 6, "\
Powerful heatsinks supermaterials are woven into your flesh. While powered,\n\
this system will prevent heat damage up to 2000 degrees fahrenheit. Note\n\
that this does not affect your internal temperature."},
{"Sonic Resonator", false, true, 4, 0, "\
Your entire body may resonate at very high power, creating a short-range\n\
shockwave. While it will not to much damage to flexible creatures, stiff\n\
items such as walls, doors, and even robots will be severely damaged."},
{"Time Dilation", false, true, 3, 0, "\
At an immense cost of power, you may increase your body speed and reactions\n\
dramatically, essentially freezing time. You are still delicate, however,\n\
and violent or rapid movements may damage you due to friction."},
{"Teleportation Unit", false, true, 10, 0, "\
This highly experimental unit folds space over short distances, instantly\n\
transporting your body up to 25 feet at the cost of much power. Note that\n\
prolonged or frequent use may have dangerous side effects."},
{"Blood Analysis", false, true, 1, 0, "\
Small sensors have been implanted in your heart, allowing you to analyse your\n\
blood. This will detect many illnesses, drugs, and other conditions."},
{"Blood Filter", false, true, 3, 0, "\
A filtration system in your heart allows you to actively filter out chemical\n\
impurities, primarily drugs. It will have limited impact on viruses. Note\n\
that it is not a targeted filter; ALL drugs in your system will be affected."},
{"Alarm System", false, true, 1, 400, "\
A motion-detecting alarm system will notice almost all movement within a\n\
fifteen-foot radius, and will silently alert you. This is very useful during\n\
sleep, or if you suspect a cloaked pursuer."},
{"Aero-Evaporator", false, true, 8, 0, "\
This unit draws moisture from the surrounding air, which then is poured from\n\
a fingertip in the form of water. It may fail in very dry environments."},
{"Mini-Flamethrower", false, true, 3, 0, "\
The index fingers of both hands have powerful fire starters which extend from\n\
the tip."},
{"Adamantium Claws", false, true, 3, 0, "\
Your fingers can withdraw into your hands, allowing a set of vicious claws to\n\
extend. These do considerable cutting damage, but prevent you from holding\n\
anything else."},
{"Fusion Blaster Arm", false, true, 2, 0, "\
Your left arm has been replaced by a heavy-duty fusion blaster! You may use\n\
your energy banks to fire a damaging heat ray; however, you are unable to use\n\
or carry two-handed items, and may only fire handguns."},
{"Finger-Mounted Laser", false, true, 2, 0, "\
One of your fingers has a small high-powered laser embedded in it. This long\n\
range weapon is not incredibly damaging, but is very accurate, and has the\n\
potential to start fires."},
{"Directional EMP", false, true, 4, 0, "\
Mounted in the palms of your hand are small parabolic EMP field generators.\n\
You may use power to fire a short-ranged blast which will disable electronics\n\
and robots."},
{"Hydraulic Muscles", false, true, 1, 3, "\
While activated, the muscles in your arms will be greatly enchanced,\n\
increasing your strength by 20."},
{"Water Extraction Unit", false, true, 2, 0, "\
Nanotubs embedded in the palm of your hand will pump any available fluid out\n\
of a dead body, cleanse it of impurities and convert it into drinkable water.\n\
You must, however, have a container to store the water in."},
{"Electromagnetic Unit", false, true, 2, 0, "\
Embedded in your hand is a powerful electromagnet, allowing you to pull items\n\
made of iron over short distances."},
{"Fingerhack", false, true, 1, 0, "\
One of your fingers has an electrohack embedded in it; an all-purpose hacking\n\
unit used to override control panels and the like (but not computers). Skill\n\
in computers is important, and a failed use may damage your circuits."},
{"Fingerpick", false, true, 1, 0, "\
One of your fingers has an electronic lockpick embedded in it. This auto-\n\
matic system will quickly unlock all but the most advanced key locks without\n\
any skill required on the part of the user."},
{"Terranian Sonar", false, true, 1, 5, "\
Your feet are equipped with precision sonar equipment, allowing you to detect\n\
the movements of creatures below the ground."},
{"max_bio_start - BUG", false, false, 0, 0, "\
This is a placeholder bionic meant to demarkate those which a new character\n\
can start with. If you are reading this, you have found a bug!"},
{"Banishment", false, true, 40, 0, "\
You can briefly open a one-way gate to the nether realm, banishing a single\n\
target there permanently. This is not without its dangers, however, as the\n\
inhabitants of the nether world may take notice."},
{"Gate Out", false, true, 55, 0, "\
You can temporarily open a two-way gate to the nether realm, accessible only\n\
by you. This will remove you from immediate danger, but may attract the\n\
attention of the nether world's inhabitants..."},
{"Gate In", false, true, 35, 0, "\
You can temporarily open a one-way gate from the nether realm. This will\n\
attract the attention of its horrifying inhabitants, who may begin to pour\n\
into reality."},
{"Artificial Night", false, true, 5, 1, "\
Photon absorbtion panels will attract and obliterate photons within a 100'\n\
radius, casting an area around you into pitch darkness."},
{"Borehole Drill", false, true, 30, 0, "\
Your legs can transform into a powerful drill which will bury you 50 feet\n\
into the earth. Be careful to only drill down when you know you will be able\n\
to get out, or you'll simply dig your own tomb."},
{"Heatwave", false, true, 45, 0, "\
At the cost of immense power, you can cause dramatic spikes in the ambient\n\
temperature around you. These spikes are very short-lived, but last long\n\
enough to ignite wood, paper, gunpowder, and other substances."},
{"Chain Lightning", false, true, 48, 0, "\
Powerful capacitors unleash an electrical storm at your command, sending a\n\
chain of highly-damaging lightning through the air. It has the power to\n\
injure several opponents before grounding itself."},
{"Tremor Pads", false, true, 40, 0, "\
Using tremor pads in your feet, you can cause a miniature earthquake. The\n\
shockwave will damage enemies (particularly those digging underground), tear\n\
down walls, and churn the earth."},
{"Flashflood", false, true, 35, 0, "\
By drawing the moisture from the air, and synthesizing water from in-air\n\
elements, you can create a massive puddle around you. The effects are more\n\
powerful when used near a body of water."},
{"max_bio_good - BUG", false, false, 0, 0, "\
This is a placeholder bionic. If you are reading this, you have found a bug!"},
{"Electrical Discharge", false, false, 0, 0, "\
A malfunctioning bionic which occasionally discharges electricity through\n\
your body, causing pain and brief paralysis but no damage."},
{"Acidic Discharge", false, false, 0, 0, "\
A malfunctioning bionic which occasionally discharges acid into your muscles,\n\
causing sharp pain and minor damage."},
{"Electrical Drain", false, false, 0, 0, "\
A malfunctioning bionic. It doesn't perform any useful function, but will\n\
occasionally draw power from your batteries."},
{"Noisemaker", false, false, 0, 0, "\
A malfunctioning bionic. It will occasionally emit a loud burst of noise."},
{"Power Overload", false, false, 0, 0, "\
Damaged power circuits cause short-circuiting inside your muscles when your\n\
batteries are above 75%%%% capacity, causing greatly reduced strength. This\n\
has no effect if you have no internal batteries."},
{"Wire-induced Stiffness", false, false, 0, 0, "\
Improperly installed wires cause a physical stiffness in most of your body,\n\
causing increased encumberance."}
};
extern std::map<bionic_id, bionic_data*> bionics;
extern std::vector<bionic_id> faulty_bionics;
extern std::vector<bionic_id> power_source_bionics;
extern std::vector<bionic_id> unpowered_bionics;
#endif
+388
View File
@@ -0,0 +1,388 @@
#include "building_generation.h"
#include "output.h"
#include "item_factory.h"
mapgendata::mapgendata(oter_id north, oter_id east, oter_id south, oter_id west)
{
t_nesw[0] = north;
t_nesw[1] = east;
t_nesw[2] = south;
t_nesw[3] = west;
n_fac = 0;
e_fac = 0;
s_fac = 0;
w_fac = 0;
}
void mapgendata::set_dir(int dir_in, int val)
{
switch (dir_in)
{
case 0:
n_fac = val;
break;
case 1:
e_fac = val;
break;
case 2:
s_fac = val;
break;
case 3:
w_fac = val;
break;
default:
debugmsg("Invalid direction for mapgendata::set_dir. dir_in = %d", dir_in);
break;
}
}
void mapgendata::fill(int val)
{
n_fac = val;
e_fac = val;
s_fac = val;
w_fac = val;
}
int& mapgendata::dir(int dir_in)
{
switch (dir_in)
{
case 0:
return n_fac;
break;
case 1:
return e_fac;
break;
case 2:
return s_fac;
break;
case 3:
return w_fac;
break;
default:
debugmsg("Invalid direction for mapgendata::set_dir. dir_in = %d", dir_in);
//return something just so the compiler doesn't freak out. Not really correct, though.
return n_fac;
break;
}
}
ter_id grass_or_dirt()
{
if (one_in(4))
return t_grass;
return t_dirt;
}
ter_id dirt_or_pile()
{
if (one_in(4))
return t_dirtmound;
return t_dirt;
}
// helper functions below
void mapgen_null(map *m)
{
debugmsg("Generating terrain for ot_null, please report this as a bug");
for (int i = 0; i < SEEX * 2; i++)
{
for (int j = 0; j < SEEY * 2; j++)
{
m->ter_set(i, j, t_null);
m->radiation(i, j) = 0;
}
}
}
void mapgen_crater(map *m, mapgendata dat)
{
for(int i = 0; i < 4; i++)
{
if(dat.t_nesw[i] != ot_crater)
{
dat.set_dir(i, 6);
}
}
for (int i = 0; i < SEEX * 2; i++)
{
for (int j = 0; j < SEEY * 2; j++)
{
if (rng(0, dat.w_fac) <= i && rng(0, dat.e_fac) <= SEEX * 2 - 1 - i &&
rng(0, dat.n_fac) <= j && rng(0, dat.s_fac) <= SEEX * 2 - 1 - j )
{
m->ter_set(i, j, t_rubble);
m->radiation(i, j) = rng(0, 4) * rng(0, 2);
}
else
{
m->ter_set(i, j, t_dirt);
m->radiation(i, j) = rng(0, 2) * rng(0, 2) * rng(0, 2);
}
}
}
m->place_items(mi_wreckage, 83, 0, 0, SEEX * 2 - 1, SEEY * 2 - 1, true, 0);
}
void mapgen_field(map *m, int turn)
{
for (int i = 0; i < SEEX * 2; i++)
{
for (int j = 0; j < SEEY * 2; j++)
{
m->ter_set(i, j, grass_or_dirt());
if (one_in(120))
{
if (one_in(30))
{
m->ter_set(i, j, t_shrub_blueberry);
}
else
if (one_in(30))
{
m->ter_set(i, j, t_shrub_strawberry);
}
else
{
m->ter_set(i, j, t_shrub);
}
}
else
if (one_in(1000)) { m->ter_set(i,j, t_mutpoppy); }
}
}
m->place_items(mi_field, 60, 0, 0, SEEX * 2 - 1, SEEY * 2 - 1, true, turn);
}
void mapgen_dirtlot(map *m, game *g)
{
for (int i = 0; i < SEEX * 2; i++)
{
for (int j = 0; j < SEEY * 2; j++)
{
m->ter_set(i, j, t_dirt);
if (one_in(120))
{
m->ter_set(i, j, t_pit_shallow);
}
else if (one_in(50))
{
m->ter_set(i,j, t_grass);
}
}
}
if (one_in(4))
{
m->add_vehicle (g, veh_truck, 12, 12, 90, -1, -1);
}
}
void mapgen_forest_general(map *m, oter_id terrain_type, mapgendata dat, int turn)
{
switch (terrain_type)
{
case ot_forest_thick:
dat.fill(8);
break;
case ot_forest_water:
dat.fill(4);
break;
case ot_forest:
dat.fill(0);
break;
}
for (int i = 0; i < 4; i++)
{
if (dat.t_nesw[i] == ot_forest || dat.t_nesw[i] == ot_forest_water)
{
dat.dir(i) += 14;
}
else if (dat.t_nesw[i] == ot_forest_thick)
{
dat.dir(i) += 18;
}
}
for (int i = 0; i < SEEX * 2; i++)
{
for (int j = 0; j < SEEY * 2; j++)
{
int forest_chance = 0, num = 0;
if (j < dat.n_fac)
{
forest_chance += dat.n_fac - j;
num++;
}
if (SEEX * 2 - 1 - i < dat.e_fac)
{
forest_chance += dat.e_fac - (SEEX * 2 - 1 - i);
num++;
}
if (SEEY * 2 - 1 - j < dat.s_fac)
{
forest_chance += dat.s_fac - (SEEY * 2 - 1 - j);
num++;
}
if (i < dat.w_fac)
{
forest_chance += dat.w_fac - i;
num++;
}
if (num > 0)
{
forest_chance /= num;
}
int rn = rng(0, forest_chance);
if ((forest_chance > 0 && rn > 13) || one_in(100 - forest_chance))
{
if (one_in(250))
{
m->ter_set(i, j, t_tree_apple);
m->spawn_item(i, j, "apple", turn);
}
else
{
m->ter_set(i, j, t_tree);
}
}
else if ((forest_chance > 0 && rn > 10) || one_in(100 - forest_chance))
{
m->ter_set(i, j, t_tree_young);
}
else if ((forest_chance > 0 && rn > 9) || one_in(100 - forest_chance))
{
if (one_in(250))
{
m->ter_set(i, j, t_shrub_blueberry);
}
else
{
m->ter_set(i, j, t_underbrush);
}
}
else
{
m->ter_set(i, j, t_dirt);
}
}
}
m->place_items(mi_forest, 60, 0, 0, SEEX * 2 - 1, SEEY * 2 - 1, true, turn);
if (terrain_type == ot_forest_water)
{
// Reset *_fac to handle where to place water
for (int i = 0; i < 4; i++)
{
if (dat.t_nesw[i] == ot_forest_water)
{
dat.set_dir(i, 2);
}
else if (dat.t_nesw[i] >= ot_river_center && dat.t_nesw[i] <= ot_river_nw)
{
dat.set_dir(i, 3);
}
else if (dat.t_nesw[i] == ot_forest || dat.t_nesw[i] == ot_forest_thick)
{
dat.set_dir(i, 1);
}
else
{
dat.set_dir(i, 0);
}
}
int x = SEEX / 2 + rng(0, SEEX), y = SEEY / 2 + rng(0, SEEY);
for (int i = 0; i < 20; i++)
{
if (x >= 0 && x < SEEX * 2 && y >= 0 && y < SEEY * 2)
{
if (m->ter(x, y) == t_water_sh)
{
m->ter_set(x, y, t_water_dp);
}
else if (m->ter(x, y) == t_dirt || m->ter(x, y) == t_underbrush)
{
m->ter_set(x, y, t_water_sh);
}
}
else
{
i = 20;
}
x += rng(-2, 2);
y += rng(-2, 2);
if (x < 0 || x >= SEEX * 2)
{
x = SEEX / 2 + rng(0, SEEX);
}
if (y < 0 || y >= SEEY * 2)
{
y = SEEY / 2 + rng(0, SEEY);
}
for (int j = 0; j < dat.n_fac; j++)
{
int wx = rng(0, SEEX * 2 -1), wy = rng(0, SEEY - 1);
if (m->ter(wx, wy) == t_dirt || m->ter(wx, wy) == t_underbrush)
{
m->ter_set(wx, wy, t_water_sh);
}
}
for (int j = 0; j < dat.e_fac; j++)
{
int wx = rng(SEEX, SEEX * 2 - 1), wy = rng(0, SEEY * 2 - 1);
if (m->ter(wx, wy) == t_dirt || m->ter(wx, wy) == t_underbrush)
{
m->ter_set(wx, wy, t_water_sh);
}
}
for (int j = 0; j < dat.s_fac; j++)
{
int wx = rng(0, SEEX * 2 - 1), wy = rng(SEEY, SEEY * 2 - 1);
if (m->ter(wx, wy) == t_dirt || m->ter(wx, wy) == t_underbrush)
{
m->ter_set(wx, wy, t_water_sh);
}
}
for (int j = 0; j < dat.w_fac; j++)
{
int wx = rng(0, SEEX - 1), wy = rng(0, SEEY * 2 - 1);
if (m->ter(wx, wy) == t_dirt || m->ter(wx, wy) == t_underbrush)
{
m->ter_set(wx, wy, t_water_sh);
}
}
}
int rn = rng(0, 2) * rng(0, 1) * (rng(0, 1) + rng(0, 1));// Good chance of 0
for (int i = 0; i < rn; i++)
{
x = rng(0, SEEX * 2 - 1);
y = rng(0, SEEY * 2 - 1);
m->add_trap(x, y, tr_sinkhole);
if (m->ter(x, y) != t_water_sh)
{
m->ter_set(x, y, t_dirt);
}
}
}
if (one_in(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++)
{
for (int j = 0; j < SEEX * 2; j++)
{
if ((m->ter(i, j) == t_dirt || m->ter(i, j) == t_underbrush) && !one_in(3))
{
m->add_field(NULL, i, j, fd_web, rng(1, 3));
}
}
}
m->add_spawn(mon_spider_web, rng(1, 2), SEEX, SEEY);
}
}
+32
View File
@@ -0,0 +1,32 @@
#ifndef _BUILDING_GENERATION_H_
#define _BUILDING_GENERATION_H_
#include "omdata.h"
#include "map.h"
struct mapgendata
{
public:
oter_id t_nesw[4];
int n_fac; // dir == 0
int e_fac; // dir == 1
int s_fac; // dir == 2
int w_fac; // dir == 3
mapgendata(oter_id north, oter_id east, oter_id south, oter_id west);
void set_dir(int dir_in, int val);
void fill(int val);
int& dir(int dir_in);
};
ter_id grass_or_dirt();
ter_id dirt_or_pile();
// helper functions for mapgen.cpp, so that we can avoid having a massive switch statement (sorta)
void mapgen_null(map *m);
void mapgen_crater(map *m, mapgendata dat);
void mapgen_field(map *m, int turn);
void mapgen_dirtlot(map *m, game *g);
void mapgen_forest_general(map *m, oter_id terrain_type, mapgendata dat, int turn);
#endif
+156 -71
View File
@@ -35,26 +35,26 @@ calendar::calendar(int Minute, int Hour, int Day, season_type Season, int Year)
calendar::calendar(int turn)
{
int minutes = int(turn / 10);
int hours = minutes / 60;
int days = hours / 24;
int seasons = days / DAYS_IN_SEASON;
int minute_param = int(turn / 10);
int hour_param = minute_param / 60;
int day_param = hour_param / 24;
int season_param = day_param / OPTIONS[OPT_SEASON_LENGTH];
second = 6 * (turn % 10);
minute = minutes % 60;
hour = hours % 24;
day = 1 + days % DAYS_IN_SEASON;
season = season_type(seasons % 4);
year = seasons / 4;
minute = minute_param % 60;
hour = hour_param % 24;
day = 1 + day_param % (int)OPTIONS[OPT_SEASON_LENGTH];
season = season_type(season_param % 4);
year = season_param / 4;
}
int calendar::get_turn()
int calendar::get_turn() const
{
int ret = second / 6;
ret += minute * 10;
ret += hour * 600;
ret += day * 14400;
ret += int(season) * 14400 * DAYS_IN_SEASON;
ret += year * 14400 * 4 * DAYS_IN_SEASON;
ret += int(season) * 14400 * (int)OPTIONS[OPT_SEASON_LENGTH];
ret += year * 14400 * 4 * (int)OPTIONS[OPT_SEASON_LENGTH];
return ret;
}
@@ -64,8 +64,8 @@ calendar::operator int() const
ret += minute * 10;
ret += hour * 600;
ret += day * 14400;
ret += int(season) * 14400 * DAYS_IN_SEASON;
ret += year * 14400 * 4 * DAYS_IN_SEASON;
ret += int(season) * 14400 * (int)OPTIONS[OPT_SEASON_LENGTH];
ret += year * 14400 * 4 * (int)OPTIONS[OPT_SEASON_LENGTH];
return ret;
}
@@ -86,16 +86,16 @@ calendar& calendar::operator =(calendar &rhs)
calendar& calendar::operator =(int rhs)
{
int minutes = int(rhs / 10);
int hours = minutes / 60;
int days = hours / 24;
int seasons = days / DAYS_IN_SEASON;
int minute_param = int(rhs / 10);
int hour_param = minute_param / 60;
int day_param = hour_param / 24;
int season_param = day_param / OPTIONS[OPT_SEASON_LENGTH];
second = 6 * (rhs % 10);
minute = minutes % 60;
hour = hours % 24;
day = days % DAYS_IN_SEASON;
season = season_type(seasons % 4);
year = seasons / 4;
minute = minute_param % 60;
hour = hour_param % 24;
day = day_param % (int)OPTIONS[OPT_SEASON_LENGTH];
season = season_type(season_param % 4);
year = season_param / 4;
return *this;
}
@@ -149,11 +149,11 @@ calendar& calendar::operator +=(int rhs)
return *this;
}
bool calendar::operator ==(int rhs)
bool calendar::operator ==(int rhs) const
{
return int(*this) == rhs;
}
bool calendar::operator ==(calendar &rhs)
bool calendar::operator ==(calendar &rhs) const
{
return (second == rhs.second &&
minute == rhs.minute &&
@@ -213,9 +213,9 @@ void calendar::standardize()
hour %= 24;
}
int tmpseason = int(season);
if (day >= DAYS_IN_SEASON) {
tmpseason += day / DAYS_IN_SEASON;
day %= DAYS_IN_SEASON;
if (day >= OPTIONS[OPT_SEASON_LENGTH]) {
tmpseason += day / OPTIONS[OPT_SEASON_LENGTH];
day %= (int)OPTIONS[OPT_SEASON_LENGTH];
}
if (tmpseason >= 4) {
year += tmpseason / 4;
@@ -224,16 +224,16 @@ void calendar::standardize()
season = season_type(tmpseason);
}
int calendar::minutes_past_midnight()
int calendar::minutes_past_midnight() const
{
//debugmsg("minute: %d hour: %d");
int ret = minute + hour * 60;
return ret;
}
moon_phase calendar::moon()
moon_phase calendar::moon() const
{
int phase = day / (DAYS_IN_SEASON / 4);
int phase = day / (OPTIONS[OPT_SEASON_LENGTH] / 4);
//phase %= 4; Redundant?
if (phase == 3)
return MOON_HALF;
@@ -241,7 +241,7 @@ moon_phase calendar::moon()
return moon_phase(phase);
}
calendar calendar::sunrise()
calendar calendar::sunrise() const
{
calendar ret;
int start_hour = 0, end_hour = 0;
@@ -263,7 +263,7 @@ calendar calendar::sunrise()
end_hour = SUNRISE_SOLSTICE;
break;
}
double percent = double(double(day) / DAYS_IN_SEASON);
double percent = double(double(day) / OPTIONS[OPT_SEASON_LENGTH]);
double time = double(start_hour) * (1.- percent) + double(end_hour) * percent;
ret.hour = int(time);
@@ -273,7 +273,7 @@ calendar calendar::sunrise()
return ret;
}
calendar calendar::sunset()
calendar calendar::sunset() const
{
calendar ret;
int start_hour = 0, end_hour = 0;
@@ -295,7 +295,7 @@ calendar calendar::sunset()
end_hour = SUNSET_SOLSTICE;
break;
}
double percent = double(double(day) / DAYS_IN_SEASON);
double percent = double(double(day) / OPTIONS[OPT_SEASON_LENGTH]);
double time = double(start_hour) * (1.- percent) + double(end_hour) * percent;
ret.hour = int(time);
@@ -305,7 +305,7 @@ calendar calendar::sunset()
return ret;
}
bool calendar::is_night()
bool calendar::is_night() const
{
calendar sunrise_time = sunrise(), sunset_time = sunset();
@@ -316,7 +316,7 @@ bool calendar::is_night()
return (mins > sunset_mins + TWILIGHT_MINUTES || mins < sunrise_mins);
}
int calendar::sunlight()
int calendar::sunlight() const
{
calendar sunrise_time = sunrise(), sunset_time = sunset();
@@ -346,41 +346,58 @@ int calendar::sunlight()
return DAYLIGHT_LEVEL;
}
std::string calendar::print_time(bool twentyfour)
{
std::stringstream ret;
if (twentyfour) {
ret << hour << ":";
if (minute < 10)
ret << "0";
ret << minute;
} else {
if (OPTIONS[OPT_24_HOUR] == 1) {
int hours = hour % 24;
if (hours < 10)
ret << "0";
ret << hours;
} else if (OPTIONS[OPT_24_HOUR] == 2) {
int hours = hour % 24;
ret << hours << ":";
}else {
int hours = hour % 12;
if (hours == 0)
hours = 12;
ret << hours << ":";
}
if (minute < 10)
ret << "0";
ret << minute;
if (OPTIONS[OPT_24_HOUR] == 0) {
if (hour < 12)
ret << " AM";
else
ret << " PM";
}
}
return ret.str();
std::string calendar::print_time(bool just_hour) const
{
std::stringstream time_string;
if (OPTIONS[OPT_24_HOUR] == 1)
{
int hour_param = hour % 24;
if (hour_param < 10)
{
time_string << "0";
}
time_string << hour_param;
}
else if (OPTIONS[OPT_24_HOUR] == 2)
{
int hour_param = hour % 24;
time_string << hour_param;
if (!just_hour) time_string << ":";
}
else
{
int hour_param = hour % 12;
if (hour_param == 0)
{
hour_param = 12;
}
time_string << hour_param;
if (!just_hour) time_string << ":";
}
if(!just_hour)
{
if (minute < 10)
{
time_string << "0";
}
time_string << minute;
}
if (OPTIONS[OPT_24_HOUR] == 0)
{
if (hour < 12)
{
time_string << " AM";
}
else
{
time_string << " PM";
}
}
return time_string.str();
}
std::string calendar::textify_period()
@@ -414,3 +431,71 @@ std::string calendar::textify_period()
return ret.str();
}
std::string calendar::day_of_week() const
{
// Design rationale
// <kevingranade> here's a question
// <kevingranade> what day of the week is day 0?
// <wito> Sunday
// <GlyphGryph> Why does it matter?
// <GlyphGryph> For like where people are and stuff?
// <wito> 7 is also Sunday
// <kevingranade> NOAA weather forecasts include day of week
// <GlyphGryph> Also by day0 do you mean the day people start day 0
// <GlyphGryph> Or actual day 0
// <kevingranade> good point, turn 0
// <GlyphGryph> So day 5
// <wito> Oh, I thought we were talking about week day numbering in general.
// <wito> Day 5 is a thursday, I think.
// <wito> Nah, Day 5 feels like a thursday. :P
// <wito> Which would put the apocalpyse on a saturday?
// <Starfyre> must be a thursday. I was never able to get the hang of those.
// <ZChris13> wito: seems about right to me
// <wito> kevingranade: add four for thursday. ;)
// <kevingranade> sounds like consensus to me
// <kevingranade> Thursday it is
enum weekday
{
THURSDAY = 0,
FRIDAY = 1,
SATURDAY = 2,
SUNDAY = 3,
MONDAY = 4,
TUESDAY = 5,
WEDNESDAY = 6
};
// calendar::day gets mangled by season transitions, so reclaculate days since start.
int current_day = day % 7;
std::string day_string;
switch (current_day)
{
case SUNDAY:
day_string = "Sunday";
break;
case MONDAY:
day_string = "Monday";
break;
case TUESDAY:
day_string = "Tuesday";
break;
case WEDNESDAY:
day_string = "Wendsday";
break;
case THURSDAY:
day_string = "Thursday";
break;
case FRIDAY:
day_string = "Friday";
break;
case SATURDAY:
day_string = "Saturday";
break;
}
return day_string;
}
+36 -17
View File
@@ -1,10 +1,7 @@
#include <string>
#include "weather.h"
#ifndef _CALENDAR_H_
#define _CALENDAR_H_
// How many minutes exist when the game starts - 8:00 AM
#define STARTING_MINUTES 480
// The number of days in a season - this also defines moon cycles
#define DAYS_IN_SEASON 14
#include <string>
// Convert minutes, hours, days to turns
#define MINUTES(x) ((x) * 10)
@@ -28,6 +25,14 @@
// How much light is provided in full daylight
#define DAYLIGHT_LEVEL 60
enum season_type {
SPRING = 0,
SUMMER = 1,
AUTUMN = 2,
WINTER = 3
#define FALL AUTUMN
};
enum moon_phase {
MOON_NEW = 0,
MOON_HALF,
@@ -36,7 +41,7 @@ MOON_FULL
class calendar
{
public:
private:
// The basic data; note that "second" should always be a multiple of 6
int second;
int minute;
@@ -46,11 +51,12 @@ class calendar
int year;
// End data
public:
calendar();
calendar(const calendar &copy);
calendar(int Minute, int Hour, int Day, season_type Season, int Year);
calendar(int turn);
int get_turn();
int get_turn() const;
operator int() const; // Returns get_turn() for backwards compatibility
calendar& operator = (calendar &rhs);
calendar& operator = (int rhs);
@@ -62,22 +68,35 @@ class calendar
calendar operator - (int rhs);
calendar operator + (calendar &rhs);
calendar operator + (int rhs);
bool operator ==(int rhs);
bool operator ==(calendar &rhs);
bool operator ==(int rhs) const;
bool operator ==(calendar &rhs) const;
void increment(); // Add one turn / 6 seconds
void standardize(); // Ensure minutes <= 59, hour <= 23, etc.
// Sunlight and day/night calcuations
int minutes_past_midnight(); // Useful for sunrise/set calculations
moon_phase moon(); // Find phase of moon
calendar sunrise(); // Current time of sunrise
calendar sunset(); // Current time of sunset
bool is_night(); // After sunset + TWILIGHT_MINUTES, before sunrise
int sunlight(); // Current amount of sun/moonlight; uses preceding funcs
int minutes_past_midnight() const; // Useful for sunrise/set calculations
moon_phase moon() const; // Find phase of moon
calendar sunrise() const; // Current time of sunrise
calendar sunset() const; // Current time of sunset
bool is_night() const; // After sunset + TWILIGHT_MINUTES, before sunrise
int sunlight() const; // Current amount of sun/moonlight; uses preceding funcs
// Basic accessors
int seconds() const {return second;}
int minutes() const {return minute;}
int hours() const {return hour;}
int days() const {return day;}
season_type get_season() const {return season;}
int years() const {return year;}
void set_season(season_type new_season) {season = new_season;}
// Print-friendly stuff
std::string print_time(bool twentyfour = false);
std::string print_time(bool just_hour = false) const;
std::string textify_period(); // "1 second" "2 hours" "two days"
std::string day_of_week() const;
};
#endif // _CALENDAR_H_
+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
+14 -6
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;
@@ -97,6 +99,9 @@ typedef struct {
#define KEY_RIGHT 0x105 /* right arrow*/
#define KEY_HOME 0x106 /* home key */ //<---------not used
#define KEY_BACKSPACE 0x107 /* Backspace */ //<---------not used
#define KEY_NPAGE 0x152 /* page down */
#define KEY_PPAGE 0x153 /* page up */
#define KEY_ENTER 0x157 /* enter */
/* Curses external declarations. */
@@ -114,21 +119,24 @@ int wborder(WINDOW *win, chtype ls, chtype rs, chtype ts, chtype bs, chtype tl,
int wrefresh(WINDOW *win);
int refresh(void);
int getch(void);
int wgetch(WINDOW* win);
int mvgetch(int y, int x);
int mvwgetch(WINDOW* win, int y, int x);
int mvwprintw(WINDOW *win, int y, int x, const char *fmt, ...);
int mvprintw(int y, int x, const char *fmt, ...);
int werase(WINDOW *win);
int start_color(void);
int init_pair(short pair, short f, short b);
int wmove(WINDOW *win, int y, int x);
int getnstr(char *str, int size);
int clear(void);
int clearok(WINDOW *win);
int erase(void);
int endwin(void);
int mvwaddch(WINDOW *win, int y, int x, const chtype ch);
int wclear(WINDOW *win);
int wprintw(WINDOW *win, const char *fmt, ...);
WINDOW *initscr(void);
int noecho(void);//PORTABILITY, DUMMY FUNCTION
int cbreak(void);//PORTABILITY, DUMMY FUNCTION
int keypad(WINDOW *faux, bool bf);//PORTABILITY, DUMMY FUNCTION
int curs_set(int visibility);//PORTABILITY, DUMMY FUNCTION
@@ -146,11 +154,11 @@ int getbegy(WINDOW *win);
int move(int y, int x);
void timeout(int delay);//PORTABILITY, DUMMY FUNCTION
void set_escdelay(int delay);//PORTABILITY, DUMMY FUNCTION
//Window Functions, Do not call these outside of catacurse.cpp
int echo(void);
int noecho(void);
//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
+316
View File
@@ -0,0 +1,316 @@
#include "catajson.h"
#include "output.h"
#include <string>
#include <iostream>
#include <fstream>
#include <sstream>
catajson::catajson()
{
path_msg = "";
}
catajson::catajson(std::string path)
{
std::ifstream file;
file.open(path.c_str());
file >> val;
file.close();
path_msg = path;
std::string err = picojson::get_last_error();
if (! err.empty()) {
debugmsg("Parse error in %s.\n\nERROR: %s\n", path.c_str(), err.c_str());
}
}
catajson::catajson(picojson::value val_in, std::string path_msg_in)
{
val = val_in;
path_msg = path_msg_in;
}
char catajson::as_char() const
{
std::string temp = as_string();
if (temp.size() != 1)
{
debugmsg("JSON warning at %s: value requested as char, string length is not 1", path_msg.c_str());
}
return temp[0];
}
std::string catajson::as_string() const
{
if (val.is<std::string>())
{
return val.get<std::string>();
}
else
{
debugmsg("JSON error at %s: value is not a string", path_msg.c_str());
}
return "";
}
int catajson::as_int() const
{
double temp = as_double();
int ret = static_cast<int>(temp);
if (ret != temp)
{
debugmsg("JSON warning at %s: value was requested as int, provided as double", path_msg.c_str());
}
return ret;
}
bool catajson::as_bool() const
{
if (val.is<bool>())
{
return val.get<bool>();
}
else
{
debugmsg("JSON error at %s: value is not a boolean", path_msg.c_str());
}
return val.evaluate_as_boolean();
}
double catajson::as_double() const
{
if (val.is<double>())
{
return val.get<double>();
}
else
{
debugmsg("JSON error at %s: value is not numeric", path_msg.c_str());
}
return 0;
}
std::set<std::string> catajson::as_tags()
{
std::set<std::string> tags;
if (is_array())
{
for (set_begin(); has_curr(); next())
{
tags.insert( curr().as_string() );
}
}
else
{
// We should have gotten a string, if not an array.
tags.insert( as_string() );
}
return tags;
}
catajson catajson::get(std::string key) const
{
if (val.is<picojson::object>())
{
if (has(key))
{
return catajson(val.get(key), path_msg + "[" + key + "]");
}
else
{
debugmsg("JSON error at %s[%s]: value does not exist", path_msg.c_str(), key.c_str());
}
}
else
{
debugmsg("JSON error at %s: value is not an object", path_msg.c_str());
}
return catajson();
}
catajson catajson::get(int index) const
{
if (val.is<picojson::array>())
{
if (has(index))
{
std::stringstream text;
text << path_msg << "[" << index << "]";
return catajson(val.get(index), text.str());
}
else
{
debugmsg("JSON error at %s[%d]: value does not exist", path_msg.c_str(), index);
}
}
else
{
debugmsg("JSON error at %s: value is not an array", path_msg.c_str());
}
return catajson();
}
bool catajson::has(std::string key) const
{
if (val.is<picojson::object>())
{
return val.contains(key);
}
else
{
debugmsg("JSON error at %s: value is not an object", path_msg.c_str());
}
return false;
}
bool catajson::has(int index) const
{
if (val.is<picojson::array>())
{
return val.contains(index);
}
else
{
debugmsg("JSON error at %s: value is not an array", path_msg.c_str());
}
return false;
}
bool catajson::is_char() const
{
return is_string() && as_string().size() == 1;
}
bool catajson::is_string() const
{
return val.is<std::string>();
}
bool catajson::is_number() const
{
return val.is<double>();
}
bool catajson::is_bool() const
{
return val.is<bool>();
}
bool catajson::is_object() const
{
return val.is<picojson::object>();
}
bool catajson::is_array() const
{
return val.is<picojson::array>();
}
void catajson::set_begin()
{
if (val.is<picojson::array>())
{
ar_iter = val.get<picojson::array>().begin();
}
else if (val.is<picojson::object>())
{
obj_iter = val.get<picojson::object>().begin();
}
else
{
debugmsg("JSON error at %s: cannot call set_begin(), value is not an array or object", path_msg.c_str());
}
}
void catajson::set_end()
{
if (val.is<picojson::array>())
{
ar_iter = val.get<picojson::array>().end();
}
else if (val.is<picojson::object>())
{
obj_iter = val.get<picojson::object>().end();
}
else
{
debugmsg("JSON error at %s: cannot call set_end(), value is not an array or object", path_msg.c_str());
}
}
void catajson::next()
{
if (val.is<picojson::array>())
{
++ar_iter;
}
else if (val.is<picojson::object>())
{
++obj_iter;
}
else
{
debugmsg("JSON error at %s: tried to iterate an invalid value", path_msg.c_str());
}
}
void catajson::prev()
{
if (val.is<picojson::array>())
{
--ar_iter;
}
else if (val.is<picojson::object>())
{
--obj_iter;
}
else
{
debugmsg("JSON error at %s: tried to iterate an invalid value", path_msg.c_str());
}
}
bool catajson::has_curr() const
{
if (val.is<picojson::array>())
{
if (ar_iter >= val.get<picojson::array>().begin() && ar_iter < val.get<picojson::array>().end())
{
return true;
}
}
else if (val.is<picojson::object>())
{
return has(obj_iter->first);
}
else
{
debugmsg("JSON error at %s: not an array or object", path_msg.c_str());
}
return false;
}
catajson catajson::curr() const
{
if (val.is<picojson::array>())
{
const int count = val.get<picojson::array>().size();
for (int i = 0; i < count; ++i)
{
if (val.get(i) == *ar_iter)
{
return get(i);
}
}
}
else if (val.is<picojson::object>())
{
return get(obj_iter->first);
}
else
{
debugmsg("JSON error at %s: not an array or object", path_msg.c_str());
}
return catajson();
}
+53
View File
@@ -0,0 +1,53 @@
#ifndef _CATAJSON_H_
#define _CATAJSON_H_
#include "picojson.h"
#include <set>
class catajson
{
public:
catajson();
catajson(std::string path);
catajson(picojson::value val, std::string path_msg);
// accessors for picojson values containing simple types
char as_char() const;
std::string as_string() const;
int as_int() const;
bool as_bool() const;
double as_double() const;
// accessor for not-so-simple type
std::set<std::string> as_tags();
// accessors in the case of array or object values
catajson get(std::string key) const;
catajson get(int index) const;
//these check whether a given key/index is valid
bool has(std::string key) const;
bool has(int index) const;
bool is_char() const;
bool is_string() const;
bool is_number() const; // double OR int
bool is_bool() const;
bool is_object() const; // string-value pairs
bool is_array() const;
// these are intended for use in iteration
// STL-style iterators are acceptable too, if anyone wants to add them
void set_begin(); // start iterating from the beginning
void set_end(); // start iterating from the end
void next(); // caller's responsibility to init first
void prev(); // caller's responsibility to init first
bool has_curr() const; // would curr() be valid?
catajson curr() const; // get the current element
private:
picojson::value val;
picojson::array::const_iterator ar_iter;
picojson::object::const_iterator obj_iter;
std::string path_msg; // used for error messages
};
#endif
+44
View File
@@ -39,3 +39,47 @@ ADDITIONS
they die. This works the same as attacks, but the relevent files are
mondeath.h and mondeath.cpp.
1.3 Adding a recipe
1) Edit recipes.json. Add your recipe among similar recipes. Required fields
are "result", "category", "difficulty", "time", "autolearn", "components".
Optional fields are "reversible" (defaults to false), "tools" (defaults to
none), "skill_pri" (primary skill, defaults to none), "skill_sec" (defaults
to none), "id_suffix" (disambiguates recipes with the same result, must be
unique among the set of such recipes), "decomp_learn" (the level (if any)
when you can learn it from disassembly), "book_learn" (a list of books that
teach the recipe, and the level they teach it at).
1.4 Adding/editing armour and how armour protection is calculated
1) Edit armor.json and add your armor item near similar types.
2) The fields are:
"type" : "ARMOR", // this must be ARMOR
"id" : "socks", // the identifier used by the game. Must be one continuous word, use underscores if necessary
"name" : "socks", // the name appearing in the examine box. Can be more than one word separated by spaces
"weight" : 1, // weight of armour
"color" : "blue", // ascii character colour
"covers" : ["FEET"], // where it covers. Possible options are TORSO, HEAD, EYES, MOUTH, ARMS, HANDS, LEGS, FEET
"to_hit" : 0, // to-hit bonus if using it as a melee weapon (whatever for?)
"storage" : 0, // how many volume storage slots it adds
"symbol" : "[", // ascii character
"description" : "Socks. Put 'em on your feet.", // description of armour
"price" : 100, // price of armour, used when bartering with NPCs
"material" : ["COTTON", "NULL"], // material types. See materials.json for possible options
"volume" : 1, // volume occupied
"cutting" : 0, // cutting damage caused by using it as a melee weapon
"warmth" : 10, // how much warmth clothing provides
"phase" : "solid", // what phase it is
"enviromental_protection" : 0, // how much environmental protection it affords
"rarity" : 70, // determines how often it spawns
"encumberance" : 0, // base encumbrance (unfitted value)
"bashing" : -5, // bashing damage caused by using it as a melee weapon
"flags" : ["VARSIZE"] // used to indicate clothing type which can be fitted. Leave out the flags field entirely if clothing cannot be fitted
"coverage" : 80, // what percentage of body part
"material_thickness" : 1 // thickness of material, in millimetre units (approximately). Generally ranges between 1 - 5, more unusual armour types go up to 10 or more
3) When the player is hit at a specific body part, armour coverage determines whether the armour is hit, or an uncovered part of the player is hit (roll 1d100 against coverage)
4) If the above roll fails (ie roll value is above coverage), then the armour does not absorb any damage from the blow, neither does it become damaged
5) If the above roll succeeds, the armour is hit, possibly absorbing some damage and possibly getting damaged in the process
6) The above steps are repeated for each layer of armour on the body part
7) Armour protects against bash and cut damage. These are determined by multiplying the armour thickness by the material bash/cut resistance factor respectively, given in materials.json
8) If the armour is made from 2 materials types, then it takes a weighted average of the primary material (66%) and secondary material (33%).
9) Materials resistance factors are given relative to PAPER as a material (this probably needs some fine-tuning for balance).
+32
View File
@@ -0,0 +1,32 @@
Stat system scaling:
Minimum stat: 1 (should only happen due to penalties)
Nominal stat: 8 ("average" person)
Very high stat: ? (realistic world class human)
Maximal stat: 20 (higher may be achievable, but we're not worried about balancing at that point.)
Skill system scaling:
Minimum skill: 0 (no training)
Maximum skill: 10 (requires regular training to maintain)
Monster melee skill scaling:
Ranges from 8 to 16
Dodge System assumptions:
Dodge chance is based on attacker's melee skill and target's dex stat and dodge skill.
Successful dodges negate the attack and impose a cumulative penalty on dodges within the same turn.
Dodge Use Cases:
An individual with no skill and nominal stats in ideal circumstances against a basic opponent should occasionally be able to dodge.
An individual with no skill and nominal stats in ideal corcumstances against a skilled opponent should rarely if ever be able to dodge.
An individual with world-class dodging ability, in ideal circumstances against a basic opponent should have a negligible chance of failure.
An individual with world-class dodging ability, in ideal circumstances against a skilled opponent should have a moderate chance of failure.
The effect of increasing dodge skill has a growth rate with diminishing returns that accelerates sharply at the point where you move beyond the dodge a "regular" character is likely to achieve (7 and above)
The balance of melee versus dodge should favour dodge which, after all, isn't effective against a wide variety of other types of attacks.
Even a world class dodger should not be able to dodge continuously when attacked many times a turn.
+473 -78
View File
@@ -93,7 +93,7 @@ void computer::use(game *g)
case 'y':
case 'Y':
if (!hack_attempt(&(g->u))) {
if (!hack_attempt(g, &(g->u))) {
if (failures.size() == 0) {
print_line("Maximum login attempts exceeded. Press any key...");
getch();
@@ -140,7 +140,7 @@ void computer::use(game *g)
if (current.security > 0) {
print_error("Password required.");
if (query_bool("Hack into system?")) {
if (!hack_attempt(&(g->u), current.security)) {
if (!hack_attempt(g, &(g->u), current.security)) {
activate_random_failure(g);
shutdown_terminal();
return;
@@ -151,18 +151,19 @@ void computer::use(game *g)
}
} else // No need to hack, just activate
activate_function(g, current.action);
reset_terminal();
} // Done processing a selected option.
} while (!done); // Done with main terminal loop
shutdown_terminal(); // This should have been done by now, but just in case.
}
bool computer::hack_attempt(player *p, int Security)
bool computer::hack_attempt(game *g, player *p, int Security)
{
if (Security == -1)
Security = security; // Set to main system security if no value passed
p->practice("computer", 5 + Security * 2);
p->practice(g->turn, "computer", 5 + Security * 2);
int player_roll = p->skillLevel("computer");
if (p->int_cur < 8 && one_in(2))
player_roll -= rng(0, 8 - p->int_cur);
@@ -221,10 +222,10 @@ void computer::load_data(std::string data)
std::string tmpname;
int tmpaction, tmpsec;
dump >> tmpname >> tmpaction >> tmpsec;
size_t found = tmpname.find("_");
while (found != std::string::npos) {
tmpname.replace(found, 1, " ");
found = tmpname.find("_");
size_t tmp_found = tmpname.find("_");
while (tmp_found != std::string::npos) {
tmpname.replace(tmp_found, 1, " ");
tmp_found = tmpname.find("_");
}
add_option(tmpname, computer_action(tmpaction), tmpsec);
}
@@ -248,6 +249,24 @@ void computer::activate_function(game *g, computer_action action)
g->m.translate(t_door_metal_locked, t_floor);
print_line("Doors opened.");
break;
//LOCK AND UNLOCK are used to build more complex buildings that can have multiple doors that can be locked and
//unlocked by different computers. Simply uses translate_radius which take a given radius and player position
//to determine which terrain tiles to edit.
case COMPACT_LOCK:
g->m.translate_radius(t_door_metal_c, t_door_metal_locked, 8.0, g->u.posx, g->u.posy);
print_line("Lock enabled.");
break;
case COMPACT_UNLOCK:
g->m.translate_radius(t_door_metal_locked, t_door_metal_c, 8.0, g->u.posx, g->u.posy);
print_line("Lock disabled.");
break;
//Toll is required for the church computer/mechanism to function
case COMPACT_TOLL:
g->sound(g->u.posx, g->u.posy, 120, "Bohm... Bohm... Bohm...");
break;
case COMPACT_SAMPLE:
for (int x = 0; x < SEEX * MAPSIZE; x++) {
@@ -260,12 +279,12 @@ void computer::activate_function(game *g, computer_action action)
for (int i = 0; i < g->m.i_at(x1, y1).size(); i++) {
item *it = &(g->m.i_at(x1, y1)[i]);
if (it->is_container() && it->contents.empty()) {
it->put_in( item(g->itypes[itm_sewage], g->turn) );
it->put_in( item(g->itypes["sewage"], g->turn) );
found_item = true;
}
}
if (!found_item) {
item sewage(g->itypes[itm_sewage], g->turn);
item sewage(g->itypes["sewage"], g->turn);
g->m.add_item(x1, y1, sewage);
}
}
@@ -374,6 +393,7 @@ void computer::activate_function(game *g, computer_action action)
print_line(" %s", log.c_str());
print_line("Press any key...");
getch();
reset_terminal();
} break;
case COMPACT_MAPS: {
@@ -387,9 +407,11 @@ void computer::activate_function(game *g, computer_action action)
if (maxy >= OMAPY) maxy = OMAPY - 1;
for (int i = minx; i <= maxx; i++) {
for (int j = miny; j <= maxy; j++)
g->cur_om.seen(i, j, 0) = true;
g->cur_om->seen(i, j, 0) = true;
}
print_line("Surface map data downloaded.");
query_any("Press any key to continue...");
reset_terminal();
} break;
case COMPACT_MAP_SEWER: {
@@ -403,50 +425,84 @@ void computer::activate_function(game *g, computer_action action)
if (maxy >= OMAPY) maxy = OMAPY - 1;
for (int i = minx; i <= maxx; i++) {
for (int j = miny; j <= maxy; j++)
if ((g->cur_om.ter(i, j, g->levz) >= ot_sewer_ns &&
g->cur_om.ter(i, j, g->levz) <= ot_sewer_nesw) ||
(g->cur_om.ter(i, j, g->levz) >= ot_sewage_treatment &&
g->cur_om.ter(i, j, g->levz) <= ot_sewage_treatment_under))
g->cur_om.seen(i, j, g->levz) = true;
if ((g->cur_om->ter(i, j, g->levz) >= ot_sewer_ns &&
g->cur_om->ter(i, j, g->levz) <= ot_sewer_nesw) ||
(g->cur_om->ter(i, j, g->levz) >= ot_sewage_treatment &&
g->cur_om->ter(i, j, g->levz) <= ot_sewage_treatment_under))
g->cur_om->seen(i, j, g->levz) = true;
}
print_line("Sewage map data downloaded.");
} break;
case COMPACT_MISS_LAUNCH: {
// Target Acquisition.
point target = g->cur_om.choose_point(g, 0);
if (target.x == -1) {
print_line("Launch canceled.");
return;
}
// Figure out where the glass wall is...
int wall_spot = 0;
for (int i = g->u.posx; i < g->u.posx + SEEX * 2 && wall_spot == 0; i++) {
if (g->m.ter(i, 10) == t_wall_glass_v)
wall_spot = i;
}
// ...and put radioactive to the right of it
for (int i = wall_spot + 1; i < SEEX * 2 - 1; i++) {
for (int j = 1; j < SEEY * 2 - 1; j++) {
if (one_in(3))
g->m.add_field(NULL, i, j, fd_nuke_gas, 3);
}
}
// For each level between here and the surface, remove the missile
for (int level = g->levz; level < 0; level++) {
tinymap tmpmap(&g->itypes, &g->mapitems, &g->traps);
tmpmap.load(g, g->levx, g->levy, level, false);
tmpmap.translate(t_missile, t_hole);
tmpmap.save(&g->cur_om, g->turn, g->levx, level, g->levz);
}
for (int x = target.x - 2; x <= target.x + 2; x++) {
for (int y = target.y - 2; y <= target.y + 2; y++)
g->nuke(x, y);
}
case COMPACT_MISS_LAUNCH:
{
// Target Acquisition.
point target = g->cur_om->draw_overmap(g, 0);
if (target.x == -1)
{
g->add_msg("Target acquisition canceled");
return;
}
if(query_yn("Confirm nuclear missile launch."))
{
g->add_msg("Nuclear missile launched!");
options.clear();//Remove the option to fire another missle.
}
else
{
g->add_msg("Nuclear missile launch aborted.");
return;
}
g->refresh_all();
//Put some smoke gas and explosions at the nuke location.
for(int i= g->u.posx +8; i < g->u.posx +15; i++)
{
for(int j= g->u.posy +3; j < g->u.posy +12; j++)
if(!one_in(4))
g->m.add_field(NULL, i+rng(-2,2), j+rng(-2,2), fd_smoke, rng(1,9));
}
g->explosion(g->u.posx +10, g->u.posx +21, 200, 0, true); //Only explode once. But make it large.
//...ERASE MISSILE, OPEN SILO, DISABLE COMPUTER
// For each level between here and the surface, remove the missile
for (int level = g->levz; level <= 0; level++)
{
map tmpmap(&g->itypes, &g->mapitems, &g->traps);
tmpmap.load(g, g->levx, g->levy, level, false);
if(level < 0)
tmpmap.translate(t_missile, t_hole);
else if(level == 0)
tmpmap.translate(t_metal_floor, t_hole);
tmpmap.save(g->cur_om, g->turn, g->levx, g->levy, level);
}
for(int x = target.x - 2; x <= target.x + 2; x++)
{
for(int y = target.y - 2; y <= target.y + 2; y++)
g->nuke(x, y);
}
activate_failure(g, COMPFAIL_SHUTDOWN);
} break;
case COMPACT_MISS_DISARM: // TODO: This!
case COMPACT_MISS_DISARM: // TODO: stop the nuke from creating radioactive clouds.
if(query_yn("Disarm missile."))
{
g->add_msg("Nuclear missile disarmed!");
options.clear();//disable missile.
activate_failure(g, COMPFAIL_SHUTDOWN);
}
else
{
g->add_msg("Nuclear missile remains active.");
return;
}
break;
case COMPACT_LIST_BIONICS: {
@@ -467,14 +523,14 @@ void computer::activate_function(game *g, computer_action action)
for (int i = 0; i < names.size(); i++)
print_line(names[i].c_str());
if (more > 0)
print_line("%d OTHERS FOUND...");
print_line("%d OTHERS FOUND...", more);
} break;
case COMPACT_ELEVATOR_ON:
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(x, y) = t_elevator_control;
g->m.ter_set(x, y, t_elevator_control);
}
}
print_line("Elevator activated.");
@@ -547,7 +603,7 @@ know that's sort of a big deal, but come on, these guys can't handle it?\n");
print_line("\
SITE %d%d%d%d%d\n\
PERTINANT FOREMAN LOGS WILL BE PREPENDED TO NOTES",
g->cur_om.pos().x, g->cur_om.pos().y, g->levx, g->levy, abs(g->levz));
g->cur_om->pos().x, g->cur_om->pos().y, g->levx, g->levy, abs(g->levz));
print_line("\n\
MINE OPERATIONS SUSPENDED; CONTROL TRANSFERRED TO AMIGARA PROJECT UNDER\n\
IMPERATIVE 2:07B\n\
@@ -579,7 +635,7 @@ of pureed bone & LSD.");
break;
case COMPACT_DOWNLOAD_SOFTWARE:
if (!g->u.has_amount(itm_usb_drive, 1))
if (!g->u.has_amount("usb_drive", 1))
print_error("USB drive required!");
else {
mission *miss = g->find_mission(mission_id);
@@ -589,9 +645,9 @@ of pureed bone & LSD.");
}
item software(g->itypes[miss->item_id], 0);
software.mission_id = mission_id;
int index = g->u.pick_usb();
g->u.inv[index].contents.clear();
g->u.inv[index].put_in(software);
item* usb = g->u.pick_usb();
usb->contents.clear();
usb->put_in(software);
print_line("Software downloaded.");
}
break;
@@ -604,11 +660,11 @@ of pureed bone & LSD.");
print_error("ERROR: Please place sample in centrifuge.");
else if (g->m.i_at(x, y).size() > 1)
print_error("ERROR: Please remove all but one sample from centrifuge.");
else if (g->m.i_at(x, y)[0].type->id != itm_vacutainer)
else if (g->m.i_at(x, y)[0].type->id != "vacutainer")
print_error("ERROR: Please use vacutainer-contained samples.");
else if (g->m.i_at(x, y)[0].contents.empty())
print_error("ERROR: Vacutainer empty.");
else if (g->m.i_at(x, y)[0].contents[0].type->id != itm_blood)
else if (g->m.i_at(x, y)[0].contents[0].type->id != "blood")
print_error("ERROR: Please only use blood samples.");
else { // Success!
item *blood = &(g->m.i_at(x, y)[0].contents[0]);
@@ -618,13 +674,13 @@ of pureed bone & LSD.");
print_line("Result: Human blood. Unknown pathogen found.");
print_line("Pathogen bonded to erythrocytes and leukocytes.");
if (query_bool("Download data?")) {
if (!g->u.has_amount(itm_usb_drive, 1))
if (!g->u.has_amount("usb_drive", 1))
print_error("USB drive required!");
else {
item software(g->itypes[itm_software_blood_data], 0);
int index = g->u.pick_usb();
g->u.inv[index].contents.clear();
g->u.inv[index].put_in(software);
item software(g->itypes["software_blood_data"], 0);
item* usb = g->u.pick_usb();
usb->contents.clear();
usb->put_in(software);
print_line("Software downloaded.");
}
}
@@ -637,22 +693,321 @@ of pureed bone & LSD.");
}
}
break;
case COMPACT_DATA_ANAL:
for (int x = g->u.posx - 2; x <= g->u.posx + 2; x++) {
for (int y = g->u.posy - 2; y <= g->u.posy + 2; y++) {
if (g->m.ter(x, y) == t_floor_blue) {
print_error("PROCESSING DATA");
if (g->m.i_at(x, y).empty()){
print_error("ERROR: Please place memory bank in scan area.");
query_any("Press any key to continue...");}
else if (g->m.i_at(x, y).size() > 1){
print_error("ERROR: Please only scan one item at a time.");
query_any("Press any key to continue...");}
else if (g->m.i_at(x, y)[0].type->id != "usb_drive" && g->m.i_at(x, y)[0].type->id != "black_box"){
print_error("ERROR: Memory bank destroyed or not present.");
query_any("Press any key to continue...");}
else if (g->m.i_at(x, y)[0].type->id == "usb_drive" && g->m.i_at(x, y)[0].contents.empty()){
print_error("ERROR: Memory bank is empty.");
query_any("Press any key to continue...");}
else { // Success!
if (g->m.i_at(x, y)[0].type->id == "usb_drive"){
print_line("Memory Bank: Unencrypted\nNothing of interest.");
query_any("Press any key to continue...");}
if (g->m.i_at(x, y)[0].type->id == "black_box"){
print_line("Memory Bank: Military Hexron Encryption\nPrinting Transcript\n");
query_any("Press any key to continue...");
item transcript(g->itypes["black_box_transcript"], g->turn);
g->m.add_item(g->u.posx, g->u.posy, transcript);
} else
print_line("Memory Bank: Unencrypted\nNothing of interest.\n");
query_any("Press any key to continue...");
reset_terminal();
}
}
}
}
break;
case COMPACT_DISCONNECT:
reset_terminal();
print_line("\n\
ERROR: NETWORK DISCONNECT \n\
UNABLE TO REACH NETWORK ROUTER OR PROXY. PLEASE CONTACT YOUR\n\
SYSTEM ADMINISTRATOR TO RESOLVE THIS ISSUE.\n\
\n");
query_any("Press any key to continue...");
reset_terminal();
break;
case COMPACT_EMERG_MESS:
print_line("\
GREETINGS CITIZEN. A BIOLOGICAL ATTACK HAS TAKEN PLACE AND A STATE OF \n\
EMERGENCY HAS BEEN DECLARED. EMERGENCY PERSONNEL WILL BE AIDING YOU \n\
SHORTLY. TO ENSURE YOUR SAFETY PLEASE FOLLOW THE BELOW STEPS. \n\
\n\
1. DO NOT PANIC. \n\
2. REMAIN INSIDE THE BUILDING. \n\
3. SEEK SHELTER IN THE BASEMENT. \n\
4. USE PROVIDED GAS MASKS. \n\
5. AWAIT FURTHER INSTRUCTIONS \n\
\n\
Press any key to continue...");
GREETINGS CITIZEN. A BIOLOGICAL ATTACK HAS TAKEN PLACE AND A STATE OF \n\
EMERGENCY HAS BEEN DECLARED. EMERGENCY PERSONNEL WILL BE AIDING YOU \n\
SHORTLY. TO ENSURE YOUR SAFETY PLEASE FOLLOW THE BELOW STEPS. \n\
\n\
1. DO NOT PANIC. \n\
2. REMAIN INSIDE THE BUILDING. \n\
3. SEEK SHELTER IN THE BASEMENT. \n\
4. USE PROVIDED GAS MASKS. \n\
5. AWAIT FURTHER INSTRUCTIONS \n\
\n\
\n");
query_any("Press any key to continue...");
reset_terminal();
break;
case COMPACT_TOWER_UNRESPONSIVE:
print_line("\
WARNING, RADIO TOWER IS UNRESPONSIVE. \n\
\n\
BACKUP POWER INSUFFICIENT TO MEET BROADCASTING REQUIREMENTS. \n\
IN THE EVENT OF AN EMERGENCY, CONTACT LOCAL NATIONAL GUARD \n\
UNITS TO RECEIVE PRIORITY WHEN GENERATORS ARE BEING DEPLOYED. \n\
\n\
\n");
query_any("Press any key to continue...");
reset_terminal();
break;
case COMPACT_SR1_MESS:
reset_terminal();
print_line("\n\
Subj: Security Reminder\n\
To: all SRCF staff\n\
From: Constantine Dvorak, Undersecretary of Nuclear Security\n\
\n\
I want to remind everyone on staff: Do not open or examine\n\
containers above your security-clearance. If you have some\n\
question about safety protocols or shipping procedures, please\n\
contact your SRCF administrator or on-site military officer.\n\
When in doubt, assume all containers are Class-A Biohazards\n\
and highly toxic. Take full precautions!\n\
\n");
query_any("Press any key to continue...");
reset_terminal();
break;
case COMPACT_SR2_MESS:
reset_terminal();
print_line("\n\
Subj: Security Reminder\n\
To: all SRCF staff\n\
From: Constantine Dvorak, Undersecretary of Nuclear Security\n\
\n\
From today onward medical wastes are not to be stored anywhere\n\
near radioactive materials. All containers are to be\n\
re-arranged according to these new regulations. If your\n\
facility currently has these containers stored in close\n\
proximity, you are to work with armed guards on duty at all\n\
times. Report any unusual activity to your SRCF administrator\n\
at once.\n\
");
query_any("Press any key to continue...");
reset_terminal();
break;
case COMPACT_SR3_MESS:
reset_terminal();
print_line("\n\
Subj: Security Reminder\n\
To: all SRCF staff\n\
From: Constantine Dvorak, Undersecretary of Nuclear Security\n\
\n\
Worker health and safety is our number one concern! As such,\n\
we are instituting weekly health examinations for all SRCF\n\
employees. Report any unusual symptoms or physical changes\n\
to your SRCF administrator at once.\n\
");
query_any("Press any key to continue...");
reset_terminal();
break;
case COMPACT_SR4_MESS:
reset_terminal();
print_line("\n\
Subj: Security Reminder\n\
To: all SRCF staff\n\
From: Constantine Dvorak, Undersecretary of Nuclear Security\n\
\n\
All compromised facilities will remain under lock down until\n\
further notice. Anyone who has seen or come in direct contact\n\
with the creatures is to report to the home office for a full\n\
medical evaluation and security debriefing.\n\
");
query_any("Press any key to continue...");
reset_terminal();
break;
case COMPACT_SRCF_1_MESS:
reset_terminal();
print_line("\n\
Subj: EPA: Report All Potential Containment Breaches 3873643\n\
To: all SRCF staff\n\
From: Robert Shane, Director of the EPA\n\
\n\
All hazardous waste dumps and sarcouphagi must submit three\n\
samples from each operational leache system to the following\n\
addresses:\n\
\n\
CDC Bioterrism Lab \n\
Building 10\n\
Corporate Square Boulevard\n\
Atlanta, GA 30329\n\
\n\
EPA Region 8 Laboratory\n\
16194 W. 45th\n\
Drive Golden, Colorado 80403\n\
\n\
These samples must be accurate and any attempts to cover\n\
incompetencies will resault in charges of Federal Corrution\n\
and potentially Treason.\n");
query_any("Press any key to continue...");
reset_terminal();
print_line("Director of the EPA,\n\
Robert Shane\n\
\n");
query_any("Press any key to continue...");
reset_terminal();
break;
case COMPACT_SRCF_2_MESS:
reset_terminal();
print_line(" Subj: SRCF: Internal Memo, EPA [2918024]\n\
To: all SRCF admin staff\n\
From: Constantine Dvorak, Undersecretary of Nuclear Security\n\
\n\
Director Grimes has released a new series of accusations that\n\
will soon be investigated by a Congressional committee. Below\n\
is the message that he sent myself.\n\
\n\
--------------------------------------------------------------\n\
Subj: Congressional Investigations\n\
To: Constantine Dvorak, Undersecretary of Nuclear Safety\n\
From: Robert Shane, director of the EPA\n\
\n\
The EPA has opposed the Security-Restricted Containment\n\
Facility (SRCF) project from its inception. We were horrified\n\
that these facilities would be constructed so close to populated\n\
areas, and only agreed to sign-off on the project if we were\n\
allowed to freely examine and monitor the sarcophagi. But that\n\
has not happened. Since then the DoE has employed any and all\n\
means to keep EPA agents from visiting the SRCFs, using military\n\
secrecy, emergency powers, and inter-departmental gag orders to\n");
query_any("Press any key to continue...");
reset_terminal();
print_line(" surround the project with an impenetrable thicket of red tape.\n\
\n\
Although our agents have not been allowed inside, our atmospheric\n\
testers in nearby communities have detected high levels of toxins\n\
and radiation, and we've found dozens of potentially dangerous\n\
unidentified compounds in the ground water. We now have\n\
conclusive evidence that the SRCFs are a threat to the public\n\
safety. We are taking these data to state representatives and\n\
petitioning for a full congressional inquiry. They should be\n\
able to force open your secret vaults, and the world will see\n\
what you've been hiding.\n\
\n\
If you had any hand in this outbreak I hope you rot in hell.\n\
\n\
Director of the EPA,\n\
Robert Shane\n\
\n");
query_any("Press any key to continue...");
reset_terminal();
break;
case COMPACT_SRCF_3_MESS:
reset_terminal();
print_line(" Subj: CDC: Internal Memo, Standby [2918115]\n\
To: all SRCF staff\n\
From: Ellen Grimes, Director of the EPA\n\
\n\
Your site along with many others has been found to be\n\
contaminated with what we will now refer to as [redracted].\n\
It is vital that you standby for further orders. We are\n\
currently awaiting the President to decide our course of\n\
action in this national crisis. You will proceed with fail-\n\
safe procedures and rig the sarcouphagus with c-4 as outlined\n\
in Publication 4423. We will send you orders to either detonate\n\
and seal the sarcouphagus or remove the charges. It is of\n\
upmost importance that the facility is sealed immediatly when\n\
the orders are given, we have been alerted by Homeland Security\n\
that there are potential terrorist suspects that are being\n\
detained in connection with the recent national crisis.\n\
\n\
Director of the CDC,\n\
Ellen Grimes\n\
\n");
query_any("Press any key to continue...");
reset_terminal();
break;
case COMPACT_SRCF_SEAL_ORDER:
reset_terminal();
print_line(" Subj: USARMY: SEAL SRCF [987167]\n\
To: all SRCF staff\n\
From: Major General Cornelius, U.S. Army\n\
\n\
As a general warning to all civilian staff: the 10th Mountain\n\
Division has been assigned to oversee the sealing of the SRCF\n\
facilities. By direct order, all non-essential staff must vacate\n\
at the earliest possible opportunity to prevent potential\n\
contamination. Low yield tactical nuclear demolition charges\n\
will be deployed in the lower tunnels to ensure that recovery\n\
of hazardous material is impossible. The Army Corps of Engineers\n\
will then dump concrete over the rubble so that we can redeploy \n\
the 10th Mountain into the greater Boston area.\n\
\n\
Cornelius,\n\
Major General, U.S. Army\n\
Commander of the 10th Mountain Division\n\
\n");
query_any("Press any key to continue...");
reset_terminal();
break;
case COMPACT_SRCF_SEAL:
g->add_msg("Evacuate Immediatly!");
for (int x = 0; x < SEEX * MAPSIZE; x++) {
for (int y = 0; y < SEEY * MAPSIZE; y++) {
if (g->m.ter(x, y) == t_elevator || g->m.ter(x, y) == t_vat) {
g->m.ter_set(x, y, t_rubble);
g->explosion(x, y, 40, 0, true);
}
if (g->m.ter(x, y) == t_wall_glass_h || g->m.ter(x, y) == t_wall_glass_v)
g->m.ter_set(x, y, t_rubble);
if (g->m.ter(x, y) == t_sewage_pipe || g->m.ter(x, y) == t_sewage || g->m.ter(x, y) == t_grate)
g->m.ter_set(x, y, t_rubble);
if (g->m.ter(x, y) == t_sewage_pump) {
g->m.ter_set(x, y, t_rubble);
g->explosion(x, y, 50, 0, true);
}
}
}
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)
}
@@ -674,7 +1029,7 @@ void computer::activate_failure(game *g, computer_failure fail)
for (int x = 0; x < SEEX * MAPSIZE; x++) {
for (int y = 0; y < SEEY * MAPSIZE; y++) {
if (g->m.has_flag(console, x, y))
g->m.ter(x, y) = t_console_broken;
g->m.ter_set(x, y, t_console_broken);
}
}
break;
@@ -731,7 +1086,7 @@ void computer::activate_failure(game *g, computer_failure fail)
for (int x = 0; x < SEEX * MAPSIZE; x++) {
for (int y = 0; y < SEEY * MAPSIZE; y++) {
if (g->m.ter(x, y) == t_sewage_pump) {
g->m.ter(x, y) = t_rubble;
g->m.ter_set(x, y, t_rubble);
g->explosion(x, y, 10, 0, false);
}
}
@@ -760,7 +1115,7 @@ void computer::activate_failure(game *g, computer_failure fail)
i = leak_size;
else {
p = next_move[rng(0, next_move.size() - 1)];
g->m.ter(p.x, p.y) = t_sewage;
g->m.ter_set(p.x, p.y, t_sewage);
}
}
}
@@ -785,11 +1140,11 @@ void computer::activate_failure(game *g, computer_failure fail)
print_error("ERROR: Please place sample in centrifuge.");
else if (g->m.i_at(x, y).size() > 1)
print_error("ERROR: Please remove all but one sample from centrifuge.");
else if (g->m.i_at(x, y)[0].type->id != itm_vacutainer)
else if (g->m.i_at(x, y)[0].type->id != "vacutainer")
print_error("ERROR: Please use vacutainer-contained samples.");
else if (g->m.i_at(x, y)[0].contents.empty())
print_error("ERROR: Vacutainer empty.");
else if (g->m.i_at(x, y)[0].contents[0].type->id != itm_blood)
else if (g->m.i_at(x, y)[0].contents[0].type->id != "blood")
print_error("ERROR: Please only use blood samples.");
else {
print_error("ERROR: Blood sample destroyed.");
@@ -801,6 +1156,31 @@ void computer::activate_failure(game *g, computer_failure fail)
}
getch();
break;
case COMPFAIL_DESTROY_DATA:
print_error("ERROR: ACCESSING DATA MALFUNCTION");
for (int x = 0; x <= 23; x++) {
for (int y = 0; y <= 23; y++) {
if (g->m.ter(x, y) == t_floor_blue) {
for (int i = 0; i < g->m.i_at(x, y).size(); i++) {
if (g->m.i_at(x, y).empty())
print_error("ERROR: Please place memory bank in scan area.");
else if (g->m.i_at(x, y).size() > 1)
print_error("ERROR: Please only scan one item at a time.");
else if (g->m.i_at(x, y)[0].type->id != "usb_drive")
print_error("ERROR: Memory bank destroyed or not present.");
else if (g->m.i_at(x, y)[0].contents.empty())
print_error("ERROR: Memory bank is empty.");
else {
print_error("ERROR: Data bank destroyed.");
g->m.i_at(x, y)[i].contents.clear();
}
}
}
}
}
getch();
break;
}// switch (fail)
}
@@ -826,6 +1206,21 @@ bool computer::query_bool(const char *mes, ...)
return (ret == 'y' || ret == 'Y');
}
bool computer::query_any(const char *mes, ...)
{
// Translate the printf flags
va_list ap;
va_start(ap, mes);
char buff[6000];
vsprintf(buff, mes, ap);
va_end(ap);
std::string full_line = buff;
// Print the resulting text
print_line(full_line.c_str());
getch();
return true;
}
char computer::query_ynq(const char *mes, ...)
{
// Translate the printf flags
+20 -2
View File
@@ -1,7 +1,6 @@
#ifndef _COMPUTER_H_
#define _COMPUTER_H_
//#include "texthash.h"
#include "output.h"
#include <vector>
#include <string>
@@ -15,6 +14,9 @@ enum computer_action
{
COMPACT_NULL = 0,
COMPACT_OPEN,
COMPACT_LOCK,
COMPACT_UNLOCK,
COMPACT_TOLL,
COMPACT_SAMPLE,
COMPACT_RELEASE,
COMPACT_TERMINATE,
@@ -31,8 +33,21 @@ enum computer_action
COMPACT_AMIGARA_START,
COMPACT_DOWNLOAD_SOFTWARE,
COMPACT_BLOOD_ANAL,
COMPACT_DATA_ANAL,
COMPACT_DISCONNECT,
COMPACT_STEMCELL_TREATMENT,
COMPACT_EMERG_MESS,
COMPACT_TOWER_UNRESPONSIVE,
COMPACT_SR1_MESS, //Security Reminders for Hazardous Waste Sarcophagus (SRCF)
COMPACT_SR2_MESS,
COMPACT_SR3_MESS,
COMPACT_SR4_MESS,
COMPACT_SRCF_1_MESS,
COMPACT_SRCF_2_MESS,
COMPACT_SRCF_3_MESS,
COMPACT_SRCF_SEAL_ORDER,
COMPACT_SRCF_SEAL,
COMPACT_SRCF_ELEVATOR,
NUM_COMPUTER_ACTIONS
};
@@ -48,6 +63,7 @@ enum computer_failure
COMPFAIL_PUMP_LEAK,
COMPFAIL_AMIGARA,
COMPFAIL_DESTROY_BLOOD,
COMPFAIL_DESTROY_DATA,
NUM_COMPUTER_FAILURES
};
@@ -77,7 +93,7 @@ public:
// Basic usage
void shutdown_terminal(); // Shutdown (free w_terminal, etc)
void use(game *g);
bool hack_attempt(player *p, int Security = -1);// -1 defaults to main security
bool hack_attempt(game *g, player *p, int Security = -1);// -1 defaults to main security
// Save/load
std::string save_data();
void load_data(std::string data);
@@ -111,6 +127,8 @@ private:
char query_ynq(const char *text, ...);
// Same as query_ynq, but returns true for y or Y
bool query_bool(const char *text, ...);
// Simply wait for any key, returns True
bool query_any(const char *text, ...);
};
#endif
+450 -254
View File
File diff suppressed because it is too large Load Diff
+3 -2
View File
@@ -8,8 +8,8 @@ struct construction_stage
{
ter_id terrain;
int time; // In minutes, i.e. 10 turns
std::vector<itype_id> tools[3];
std::vector<component> components[3];
std::vector<component> tools[10];
std::vector<component> components[10];
construction_stage(ter_id Terrain, int Time) :
terrain (Terrain), time (Time) { };
@@ -39,6 +39,7 @@ struct construct // Construction functions.
bool able_empty (game *, point); // Able if tile is empty
bool able_window(game *, point); // Any window tile
bool able_make_window(game *, point); // Any window tile or empty
bool able_empty_window(game *, point); // Empty window tiles
bool able_window_pane(game *, point); // Only intact windows
bool able_broken_window(game *, point); // Able if tile is broken window
+1363 -1860
View File
File diff suppressed because it is too large Load Diff
+24 -25
View File
@@ -3,66 +3,65 @@
#include <string>
#include <vector>
#include <map>
#include "itype.h"
#include "skill.h"
#include "rng.h"
#define MAX_DISPLAYED_RECIPES 18
enum craft_cat {
CC_NULL = 0,
CC_WEAPON,
CC_AMMO,
CC_FOOD,
CC_DRINK,
CC_CHEM,
CC_ELECTRONIC,
CC_ARMOR,
CC_MISC,
CC_NONCRAFT,
NUM_CC
};
typedef std::string craft_cat;
struct component
{
itype_id type;
int count;
component() { type = itm_null; count = 0; }
component(itype_id TYPE, int COUNT) : type (TYPE), count (COUNT) {}
int available; // -1 means the player doesn't have the item, 1 means they do,
// 0 means they have item but not enough for both tool and component
component() { type = "null"; count = 0; available = -1;}
component(itype_id TYPE, int COUNT) : type (TYPE), count (COUNT), available(-1) {}
};
struct recipe {
std::string ident;
int id;
itype_id result;
craft_cat category;
craft_cat cat;
Skill *sk_primary;
Skill *sk_secondary;
int difficulty;
int time;
bool reversible; // can the item be disassembled?
bool autolearn; // do we learn it just by leveling skills?
int learn_by_disassembly; // what level (if any) do we learn it by disassembly?
std::vector<component> tools[20];
std::vector<component> components[20];
std::vector<std::vector<component> > tools;
std::vector<std::vector<component> > components;
recipe() {
id = 0;
result = itm_null;
category = CC_NULL;
result = "null";
sk_primary = NULL;
sk_secondary = NULL;
difficulty = 0;
time = 0;
reversible = false;
autolearn = false;
}
recipe(int pid, itype_id pres, craft_cat cat, const char *p1, const char *p2,
int pdiff, int ptime, bool preversible) :
id (pid), result (pres), category (cat), difficulty (pdiff), time (ptime), reversible (preversible)
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;
}
};
typedef std::vector<recipe*> recipe_list;
typedef std::map<craft_cat, recipe_list> recipe_map;
#endif
+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
+24 -16
View File
@@ -28,10 +28,10 @@ terminated.
%
Tests on the prehistoric fauna show extremely close genetic relationships with
extant and extinct terranian animals. It might be that the portal had performed
a transposition in time, unfortunately the portal device had been destroyed
when security had put down the fauna.
a transposition in time, unfortunately the portal device was destroyed when
security put down the fauna.
%
An incident occured in the teleportation lab, wherein a subject managed to
An incident occurred in the teleportation lab, wherein a subject managed to
teleport into another subject. The latter was completely destroyed from the
inside out, while the former sustained little damage. I would like to explore
the phenomenon further, but subjects are expensive.
@@ -46,10 +46,10 @@ tunnels along the 4th dimension, allowing life forms to transfer to this
plane. All subjects with prolonged exposure have been terminated.
%
Our lifeform extraction program continues to produce samples of specimen
XE037. It seems to be a kind of living, semi-sentient primordal ooze, and is
XE037. It seems to be a kind of living, semi-sentient primordial ooze, and is
the basis of much of the life we have found.
%
Specimen XE037, jokingly referred to as "the blob," has been observed entering
Specimen XE037, jokingly referred to as "the blob", has been observed entering
a kind of dormant state, forming a depression in the floor. Hendelson stepped
into one of these pits yesterday, and was immediately coated and attacked.
%
@@ -81,7 +81,7 @@ the surface, particularly in the sewage systems.
%
Today we applied a very small sample of XE037, suspended in water, to subject
TP92, prior to necessary termination. During the postmortem examination, the
subject went through a revivication progress, but displayed next to no human
subject went through a revivification progress, but displayed next to no human
intelligence.
%
Mendelson shows a dismaying lack of organization and security consciousness.
@@ -109,7 +109,7 @@ in the insects, and security intervention was required.
%
Program S37ZBE, investigation of XE037 on inert human bodies, is making great
strides. Recently we found that XE037 has no effect when introduced to a
deceased body; revivication only occurs when the subject is exposed to XE037
deceased body; revivification only occurs when the subject is exposed to XE037
prior to expiration.
%
S37ZBE, the special investigation into the effects of XE037 on inert human
@@ -117,32 +117,32 @@ bodies, has made terrific discoveries. It seems that it occasionally displays
a mutagenic property which manifests itself after termination of the subject,
resulting in a striking variety in postmortem morphology.
%
S37ZBE may be put on indefinate hold shortly. Postmortem morphological
S37ZBE may be put on indefinite hold shortly. Postmortem morphological
changes have reached extreme levels; this morning one subject nearly doubled
in size, acquiring enough strength to reduce a concrete wall to rubble. It
required a 6 man team, heavily armed, to re-terminate the subject.
%
Jakobson insists that S37ZBE must continue, despite the extreme security and
safety risks. Nearly half our security forces have been redirected to the
project, simply to deal with the occasional escape of a subject.
safety risks. Nearly half of our security forces have been redirected to the
S37ZBE project, simply to deal with the occasional escape of a subject.
%
Jakobson was killed today by one of S37ZBE's subjects; ironic considering how
hard he fought to keep the project active. Alarmingly, his corpse revivified
immediately. This suggests that XE037 may have contaminated the lab at large.
%
Termination of a subject which was never a part of S37ZBE has confirmed my
fears. XE037 has contaminated most if not all of the laboratory, most likely
via the water supply. Research has started immediately into a process to
destroy XE037 within the human body.
fears. XE037 has contaminated most, if not all of the laboratory, most
likely via the water supply. Research has started immediately into a process
to destroy XE037 within the human body.
%
Despite a wide variety of treatments, we have been completely unsuccessful in
removing XE037 from human subjects. Every individual displayed revivication
removing XE037 from human subjects. Every individual displayed revivification
post termination. Interestingly, XE037 seems to be completely inert prior to
termination.
%
We have finally found success in S37BEP, our emergency investigation into the
destruction of XE037 in living subjects. 8 of 10 of the subjects showed no
revivication, despite confirmed dosages of XE037.
revivification, despite confirmed dosages of XE037.
%
PE062, our "cure" for XE037 contamination, has neared perfection. Sadly, the
production of PE062 is a costly and time-consuming process. What is more, the
@@ -155,7 +155,7 @@ half mile from the laboratory. It is unclear how it escaped; it is quite
possible that it is in the ground water now.
%
An emergency meeting was held today to discuss the possible implications of
widespread XE037 contamination. It was agreed that neturalization must be
widespread XE037 contamination. It was agreed that neutralization must be
instated immediately to prevent a catastrophic event.
%
It has begun. The XE037 contamination has spread for miles, and those who
@@ -163,6 +163,14 @@ have since deceased have revivified. It is my fear that extremely large
populations will be decimated by this pandemic. We must find a way to remove
XE037 from revivified bodies.
%
We have even more distressing news than the widespread XE037 contamination,
there are reports of the XE037 mutating into various new variants. See
data files on XE037a - XE037f. Research on the effects of these variants
is ongoing. We do know that XE037d shows signs of PE062 immunity, and
XE037b can revive various breeds of canines. However, revival is not
as guaranteed as standard XE037 humanoid infection. Canine body size seems
to influence the chances. See experiment tXE037b_c.
%
Today we found our solution, quite by accident. It was found that XE037 is
completely removed from a revivified body following a series of extremely-high
energy 4th dimensional transpositions. Unfortunately, this invariably allows
+368
View File
@@ -1,5 +1,373 @@
Changelog will be a little light for the early entries due to me being really bad at documenting things.
0.6
Highlights:
---
* Zombies will revive after a time, if not butchered (or otherwise dealt with).
* The Android trait now behaves the way that the description indicates.
* Gasoline can be siphoned from vehicles. Requires a rubber hose for now - these are easier to acquire.
* Sewing requires materials other than thread - rags for cloth, leather patches for leather, kevlar bricks, plastic chunks.
* Leather/Kevlar/plastic/fur repair/reinforcement actually possible!
* Inventory management UI improvements, and a new screen to organize worn items.
* NPCs continue to be less buggy, but are still prone to crashes.
* Weapon firing code reworked a bit. UI improvements, and you should now be able to fire at anything within range.
* Reworked the armor/protection code.
* Reworked the learning system: replaced XP with Focus. See the relevant help text.
* Added a *bunch* of new multi-stage missions, for those who play with the shelter NPC turned on.
* Many new buildings (See full changelong list)
* Vehicle collision physics are now based on *actual* physics! Reduces collision insanity.
* Option to use triginometric distance instead of roguelike distance. In other words light, line of sight are circular instead of square.
* Zombie density in towns is based on nearby buildings instead of distance from town center.
* Higher-performance (on windows) SDL-based rendering as an optional build type.
* Movement on and around vehicles greatly streamlined.
* Sound indicator lets you know how much noise you're making.
* Turn cost indicator lets you know how long actions take.
* Overkilled monsters now spray gibs around instead of disapearing.
* Mostly remove limits on how many items fit in a tile of ground.
* As usual, many bugfixes.
Full list:
---
Purifier no longer removes traits available at chargen.
Fix some calculations that wanted floating-point math, and were using integer math.
Fix some vehicle collision craziness related to skids.
Added zombie revival. Chance of unbutchered zombie corpses rezzing, once 6 hours have passed.
Advanced inventory UI improvements/fixes.
Dropping count-by-charge items (batteries, meds, etc.) into vehicles will cause restacking.
Android trait always gives a power system bionic.
Fix torso encumbrance display (it's smart about sign use now).
Bitmask-based item flags no longer exist! Instead, we have string-based tags, that have no upper limit.
Tweaked glowstick behavior - can no longer deactivate, and they have a dead state.
Android trait should no longer give the player faulty bionics.
Bolts moved to ammo category, like arrows.
Added bone broth, and recipe.
Adjust how Climate Control bionic works, make vehicles have functioning (magic!) AC.
Added fuel siphoning using rubber hose.
Appearance-improving mutations are now flagged as being good mutations.
Welder charges are actually used during vehicle construction.
Items will no longer become erroneously fitted, and item tags should not spread during map loading.
Weather accounts for starting time properly.
Containers can be unloaded again (they were bugged).
Optimized scentmap updates, hopefully this speeds up certain activities.
Pit-requiring constructions have pit digging as their first two stages, to make it more obvious what the prereqs are.
Some menus (notably, inventory) can be navigated with arrow keys and enter.
Allowing sewing of leather items, make sewing require rags/patches.
Cooking rotten food does not make it magically fresh any more.
Resolves an issue where destroying an item while tailoring would crash the game.
New UI to sort clothing and automatically assign special characters to clothing (accessed via +)
Footwear warmth values tweaked to be more flexible.
Wool warmth is not reduced by rain.
Sofas and armchairs help with sleeping.
Temperature is less of an issue while sleeping.
Warning messages for when the player is cold/hot while sleeping.
Oversized clothing can be worn over anything (blankets, cloaks, etc).
Sound interruptions can be categorically ignored while crafting, reading, etc.
More improvements to the advanced inventory UI.
Shrubs less difficult to smash.
Upgraded versions of Fast Healer still give you bonuses while sleeping.
Soldering iron recipe learnable via disassembly.
Integrated toolset power usage normalized on a few recipes.
Vehicle speed is now taken into account when throwing a character that exits a moving vehicle.
Gasoline lanterns added to the game.
Bifocal glasses added to the game.
Tweak Windows (catacurse) colors.
Correct window border color behavior under Windows.
Add glass jars, make sauces spawn in them instead of in tin cans.
Removed a couple NPC crash bugs.
You can safely exit a vehicle moving less than 1 MPH.
Fix a pair of drawing glitches related to the item pickup window.
Remove the artificial delay when animating vehicle movement.
Out-of-range enemies are still drawn when firing a weapon.
Make it so that anything within range can be targeted with a ranged weapon.
Disassembly recipe for vacuum sealer.
Backspace no longer causes junk to be input during string entry.
The overmap screen now lets you use "<" and ">" to view different z-levels.
Reworked the armor/protection code.
Fridges drop rubber hose instead of pipe when destroyed.
Reworked the learning system: replaced XP with Focus. See the relevant help text.
Autosave should save everything now, rather than a subset.
Fix artifact saving/loading... again.
Added new missions.
Added cathedral to mapgen.
Fixed flamethrowers.
Add 40mm acid bomb shells.
Moving furniture causes noise.
Clothing damage descriptions now depend on the item's material.
Gunmods now show "%" properly in the magazine size line.
Add bicycle seats: low-mass seats that can't take a seatbelt.
Vehicle collision physics are now based on *actual* physics! Reduces collision insanity.
Foraging gives survival experience, even on failure.
Disassembling ammo gives firearms experience.
Ball bearings should hopefully drop now.
Added headlights to a few more default vehicles.
Lab coats can be fitted.
Items in adjacent containers (fridges, lockers, etc.) visible with 'V' screen.
Players can no longer examine sealed crates to see their contents.
Funnels give acid water during acid rain :).
Acid water (after refinement) now an alternate ingredient for acid bombs.
Corrected a few item name typos.
Cleaned up generation of a particular (spiral-y) underground room.
More temperature tweaks.
Being hot makes you MORE thirsty, not less.
Reworked item unloading and reloading a bit to remove bugs.
Flatbed trucks now have rear windows.
Electric cars added as potential vehicle spawns.
Fix some bugs related to known overmap data and leaking the state to other characters.
Effects of current stats are shown on the '@' screen.
Materials obtained from clothing depend on the clothing's damage level.
Fixed some lab mapgen bugs.
Mansions got a little love.
Having too little intelligence for a book is more of a penalty.
Vehicle headlight state is persistent after save-load.
Being hot no longer increases thirst by an unreasonable amount
Minor : temp_conv and dis.intensity are saved, fixing strange on-load inconsistencies
Minor : Diseases that affect speed no longer overwrite eachother in the @ menu
Clothing with pockets provides a bonus to hand warmth when not wielding a weapon.
New large building with basement: Prison
Basement level for hazardous waste sarcophagus.
New building with basement: musterious cabin.
Display recent log messages on player death.
Radiation exposure is now more dangerous
Mutations from radiation can be disabled.
Mutation categories now more dominant.
Added themed mutagens with recipes.
New medical items.
Bundle of plastic bags item for stowing bags.
Rebalance chance of cutting weapons getting stuck, much less likely now.
Smashing corpses prevents them from reviving.
Burning corpses prevents them from reviving.
Stopped players from leaving slime trails or webs while in a vehicle.
Made vitamins have an effect again.
Made multiple gasoline tanks drain properly.
Added tiny pain effect to Acid Drizzle, raincoats now offer a bit of protection to acid rain/drizzle.
Advanced inv: "e" pulls up inventory item menu. Help window displays feedback messages for actions taken. "?" toggles between help and msg viewer.
Eliminate radiation dosage saturation, halving dosage rate to compensate. (radiation is slower, but more implacable)
Fitting screen now shows storage and encumbrance in item columns.
Added leather vest item and crafting recipe.
avoid use of pow() in distance calculation, speeding them up an order of magnitude.
Make blood filter remove all other drug based diseases.
Make blood analysis detect all drugs.
Behold, sharpie markers.
Display actual keymapping instead of default one in most help text.
Stopped bleeding, bites, and poison from applying when stopped by armor.
Safely hop from slow-moving vehicles, get hurt from quick ones.
Multidrop screen now shows a summary of what is about to be dropped.
Sort inventory by item charges, use low-charge items first.
Option to auto-save before sleep.
Lava burns things and can be used for crafting.
Multiple fixes to burst-fire targeting.
Prevent turrets from shooting themselves.
Prevent friendly turrets from trying to shoot through the player.
Brasas catcher item to catch your brass for recrafting.
More power armor variants.
Make movement take half the cost of both the beginning and end tiles, instead of just taking the cost of the end tile.
Made shooting interactions more realistic.
Add radiation badge item and associated infrastructure.
Automagically add new keybindings, so long as they don't conflict.
Significantly reduces the number of giant worms.
Adds strawberry bushes.
Advanced inventory: Add [c]ategory sort.
Large number of added archery items: Wide range of bows crossbows, and arrows, and a multitude of crafting recipes.
Stop unnecessaraly saving adjacent overmaps every time they are potentially dirtied. (prevents periodic pauses!)
Hard Leg Guards and Metal Leg guards.
Picking berry bushes trains survival (at low levels).
Added skill support into professions.
======
0.5
Highlights:
---
* Many new details added to mapgen! New buildings, ruined vehicles on roads, and so on.
* Much more modding-friendly: MANY bits of data have been moved into data files, rather than being hardcoded in the source.
* A handful of recipes can be learned from sources other than just leveling your skills.
* Artifacts should save/load properly now!
* Assorted UI tweaks and improvements.
* Weather radio and directional antenna.
* Rain funnels - first step towards proper rain barrels.
* Robust Genetics and dodging have both been significantly rebalanced, and should actually be useful.
* Zombies wear damaged clothing.
* Tailoring is more important, and string is easier to acquire.
* New content all around!
* Numerous bugfixes.
Full list:
---
Matches usable anywhere lighters could be used previously.
Draw lit areas outside of LOS and normal sight radius the same as unlit areas
Tell the player when their gear is damaged in combat
Display player feat morale boosts
Pickling/canning
Only rust skill if X turns have passed since practice, not every x turns.
Halve rate of skill rust across the board.
Push crafting recipes out to JSON - now moddable without recompiling!
Acid rain causes pain not injury
Changed default viewmorale key to v
Learn crafting recipes from item disassembly or books.
New Hardcore trait
Other new traits: Skilled Liar, Pretty, Beautiful, Very Beautiful, Glorius (cancels truth-teller, ugly mutations)
Set minimum move to 25
Death by starvation or thirst
New professions: tailor, scoundrel
Adjusted conditions for cutting and stabbing skill practice (should be able to practice piercing now)
Code compiles with no warnings. No user-visible change, but important stability milestone.
Added a craftable power armor power interface CBM, solar panels.
Continuous reading.
New mixed drinks
A new book; "To Serve Man"
Glowsticks, found in sporting goods stores and bedrooms.
Broken and Empty windows can no longer be taped up, alarmed windows can.
Palisade walls changed to require 2 6foot ropes rather than one thirty foot one.
Domestic Windows drop strings now (Those are the kind that can be opened)
String can be made from sinew and plant fibre.
Added blankets, fur blankets (craft only), emergency blankets, sleeping bags, fur sleeping bags (craft only).
Added house coat, snuggie, cloak, fur cloak (craft only), leather cloak (craft only).
Added fur scarf, fur gloves, fur trenchcoat, fur pants, fur boots (all craft only).
All tailoring items that use fur require survival as secondary skill.
Added crafting recipes for bandana, blanket, house coat, cloak.
Weather radio
Radios are tuneable, so you can receive from more than one station without moving.
New item that doubles battery capacity of tools, recipe learn from certain electronics books.
Bugfix: reduced chance of "Tried to kill monster" debug s pam.
Bugfix: reduced chance of "Stopping out-of-map vehicle" spam.
Bugfix: can unload liquids into items wielded in hands (e.g., steel jerrycans).
Bionics screen shows current and maximum power.
Escape key usable to exit out of more menus.
Multidrop screen continually updates to show new potential weight/volume.
Bugfix: longbow should not end up loaded while in inventory, and can be fired if it does.
Backpacks, messenger bags, etc. can be repaired via sewing kits.
Add fire drill as a survivalcraft firestarter (trickier and slower than lighter/matches).
Furry mutation provides warmth, Bark mutation protects from fire.
Removed/reduced a lot of spam messages related to being hot or cold.
Sleeping should be easier in the cold (decreased chances of waking up).
Being too hot can now wake you up.
Inreased the amount fo heat generated by the player while awake.
Tweaked hunger and fatigue's contribution to body temperature.
More traits and mutations have body temperature effects.
Fix artifact saving and loading.
Multiple building additions in town and in the countryside.
Support for 2x2 and 3x3 buildings.
Temporary fix to decrease the number of large structures with roads running through them.
Items can only be set on fire if it would affect them (no more burning sheets infinitely).
Looking around at items (with "V") has a few improvements.
Soldering irons give heating elements when disassembled, tweak numbers for hotplates and water purifiers.
Advanced inventory management screen, default keymap "/". Lets you interact with adjacent tiles.
Roadmap is made of paper.
Removed RV kitchen units from some spawn locations.
Backend: made it much easier to define pre-built locations. Responsible for a lot of the new building types.
Increased the quench value of clean water.
Early-game survivalist stabbing weapon is now pointy stick. Wood spear is higher level.
You can now read using torches and other items.
Addictions can be configured explicitly in the professions file.
Tweak crossbow trap drops.
Made several UI screens smarter (resize to fit screen, esc can exit, etc.).
Show nearby map notes on the minimap.
Some item types can be defined from data files now! So far: misc/melee, armor, guns, ammo, tools, gun mods, books
Glasses can be worn with power armor.
Added several new constructions.
Power use of integrated toolset has been rebalanced.
Armor CBMs have had drawbacks removed.
Rain coats can be made from plastic bags.
Fursuits.
Work to make NPCs less buggy.
Nuclear missile fixes.
Tweaked steel recycler behavior.
Autosaves take into account the passage of real-world time.
Placable funnel that collects some water while raining.
Characters with the Android trait no longer get unimplemented bionics.
Added several new options.
NPC spawning is toggled with the in-game options menu rather than a text file hack.
Added more wildlife (coyotes, cats, etc.).
Robust Genetics trait heavily buffed.
Change how overmap tile data is saved, to allow for more terrain types and buildings.
Add high-capacity power storage CBM.
Add some new magazines and entertainment books.
Blisters no longer lower max HP (at least until the system is more fleshed out).
Cannibal trait has been rebalanced, as well as morale effects of eating human flesh.
Added cookbook for Italian recipes.
Sewing now requires an adequate source of light.
New health display for non-Self Aware characters, accurate to 1/10th max HP rather than 1/4th.
Targeting window (when throwing/firing weapons) has been reorganized.
Directional antennas!
Gas pumps have been rebalanced (less fragile when filling vehicles, more fragile when filling containers).
Added sling, slingshot, and associated ammunition.
Gas stations can spawn next to highways.
Large creatures are more likely to leave a corpse when taking high damage.
Add flavor items with variable descriptions to the game (fliers and such).
Some guns have range modifiers independent of their ammo. Buffed coilgun range.
Add limb torsion ratchet bionic, generates power when moving.
Desks don't spawn outside any more.
The option to delete your world on character death actually works now!
Tweaked projectile/glass interaction, stopped leaping monsters from phasing through windows.
Debug menu changes.
Made it possible to build indoor furniture in more situations.
Updated readme, added contributing guidelines.
Stopped small animals from suiciding, in many cases (e.g., broken windows and landmines).
Add a few hats. No, not TF2-style.
Artifacts will successfully save and load now!
Adjusted monster spawning mechanics to reduce the chance of swarms of difficult zombies.
Stop roads from going through buildings so often.
Pits less awkward to board over (can use nearby items).
Tweak glass bottle weight/volume.
Allow for reading/sewing in the dark through mutations/CBM's with a speed penalty.
Rewrote dodge abilities to have a noticeable impact.
Mansion pools are considered indoors now.
Tires can be changed with a wrench and a jack.
Add game logic to handle recipes that take the same item as a component and a tool, and add UI to alert the player.
Improve rendering in the main Windows port - animations should display better.
Cave-ins cause damaging rubble to fall.
Improve fuel guage display in the vehicle examination window.
Overmap notes blink again.
Space and tab should be available for keymaps.
Hitting the "pause"/"skip turn" button will let you cancel reading, crafting, and other long-term actions.
Special road spawns should not happen on bridges.
Ruined vehicles spawn on roads.
Zombies wear damaged clothing.
Nighttime lights are visible from reasonable distances now.
======
0.4
Make the battery system bionic only consume as many batteries as necessary to fully power yourself
Knives can also cauterize wounds now. Requires a lighter.
Soldering irons (and hotplates, why not) can be used to cauterize wounds, causing pain and removing any bleeding or uninfected bite effects.
Fixed crash bug in Windows when attacks hit something off-screen?
Fixed precipitation animation with shifted viewport.
Can now disassemble items from the examination screen.
Added colored hinting to the item examination sidebar listing possible actions. e.g., "W" (for "wear") is grayed out if the item isn't wearable.
Added ability to craft a recipe continuously (until out of materials, etc.).
Reduce (maybe fully fix) wolf self-attacks.
Power armor.
More fitted gear, and a few more pieces made craftable.
Vehicle-mountable water tanks and kitchen units, implied storage-battery-charging generators.
Map tiles can now contain up to 64 items.
Beer has been made weaker, and now appears in kegs in liquor stores and bars.
Steel jerrycans.
Any gun can now be used one-handed if you are strong enough.
Hardcoded frostbite not to occur above freezing temperatures.
Improved fire's ability to warm the player. Also, standing on fire and being on fire warm up the player.
Fixed body temperature equalization.
Sunny and clear weather no longer warm the player underground.
Standing in water or sewage will increase the rate of heat loss (but not make the player colder)
The head and torso now lose heat faster than other body parts.
Body temperature drops as you lose HP.
Encumberance menu's listing of warmth has been made more colorful.
Mouth (face) now has appropriate cold and hot diseases.
The ability to cauterize wounds to heal bites and stop bleeding. (a)ctivate a knife, requires a lighter.
The ability to craft an item as many times as is possible. Defaults to the + key. (Linux and Mac users will need to assign a key)
Added M72-LAW. Makes a large explosion and penetrates armour well. One shot only.
Clothing can be made fitted by (a)pplying a sewing kit.
Some foods can be heated, hot food grants a larger morale bonus than cold food.
Ammunition explodes rather than burning.
Lightstrips, function as weak light providers. Craftable.
Bandages and First Aid kits no longer show uninjured bodyparts in the menu.
Some basic professions, more to be added later.
0.3
Many menus stretch with an enlarged viewport.
An action to repeat the last craft has been added, default keybinding of -
+1 -1
View File
@@ -13,4 +13,4 @@ BurnZeZ, Oddzball, Shades, Shoes01, Tase, GalenEvil
Contributors:
AkrionXxarr, Benjamg, Creidieki, Daftfad, Elricsfate, Gim,
GlyphGryph, Gremour, HerbertJones, hovatterz, Origamiwolf,
Uzername, Voker57, Wito
Soron, Uzername, Voker57, Wito, i2amroy
Binary file not shown.
+4 -4
View File
@@ -1,10 +1,9 @@
# This message may be 16 lines long at maximum.
# Max length of a line is 68 characters; the following line is for reference
####################################################################
New features v0.3:
Reduced sight range of monsters. Monster bites and infections.
A bunch of new survival craft.
Fixes, fixes and more fixes.
New features v0.5:
* Todo
* Fixes, fixes and more fixes.
For latest discussions and news on Cataclysm DDA, please visit:
@@ -14,5 +13,6 @@ Wiki: http://wiki.cataclysmdda.com/
The game now has new configurable options:
Customizeable Viewport, Spawntype: Classic/Static, Starting time
Static NPCs, Randomly spawning NPCs, Seasons
Ingame you can access the options via the help menu (?2).
View File
View File
+16
View File
@@ -0,0 +1,16 @@
[
{ "id":"TEST",
"items":[
["GUITAR", 400],
["DRUM", 300],
["HATCHET", 200]
],
"groups":[
["NOTHING", 200]
]
},
{ "id":"NOTHING",
"default_item": "MISSING_ITEM"
}
]
File diff suppressed because it is too large Load Diff
+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
}
]
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
+33
View File
@@ -0,0 +1,33 @@
[
{ "id":"GUITAR",
"symbol": "$",
"color": "red",
"name":"Guitar",
"description":"An acoustic six-string guitar. A bit out of tune, but in good shape otherwise.",
"rarity": 60,
"material": "wood",
"weight": 13,
"volume": 24,
"damage": 14,
"to_hit": 1,
"use": "PLAY_GUITAR",
"variations": [
{ "odds" : 200,
"name" : "Specific Variation"
}
]
},
{ "id":"DRUM",
"symbol": "o",
"color": "green",
"name":"Bongo",
"description": "A handheld drum. Suitable for making loud noises into all hours of the night.",
"rarity": 60,
"material": ["wood", "steel"],
"weight": 10,
"volume": 10,
"damage": 11,
"to_hit": 1,
"use": "PLAY_DRUM"
}
]
File diff suppressed because it is too large Load Diff
+613
View File
@@ -0,0 +1,613 @@
[
{ "id":"retool_45",
"type": "GUNMOD",
"symbol": ":",
"color": "green",
"name":".45 caliber retool",
"description":"Replacing several key parts of a 9mm, .38, .40 or .44 firearm converts it to a .45 firearm. The conversion results in reduced accuracy and increased recoil.",
"rarity": 3,
"price": 480,
"material": "steel",
"weight": 2,
"volume": 2,
"bashing": 3,
"cutting": 0,
"to_hit": -1,
"accuracy_modifier": 2,
"damage_modifier": 0,
"loudness_modifier": 0,
"ammo_modifier": ".45",
"recoil_modifier": 2,
"burst_modifier": 0,
"clip_size_modifier": 0,
"mod_targets": ["pistol", "smg"],
"acceptable_ammo": ["9MM", "38", "40", "44"]
},
{
"type" : "GUNMOD",
"id" : "suppressor",
"name" : "suppressor",
"clip_size_modifier" : 0,
"accuracy_modifier" : -1,
"damage_modifier" : -4,
"ammo_modifier" : "none",
"description" : "Using a suppressor is almost an imperative in zombie-infested regions. Gunfire is very noisy, and will attract predators. Its only drawback is a reduced muzzle velocity, resulting in less accuracy and damage.",
"weight" : 1,
"to_hit" : 2,
"color" : "dark_gray",
"symbol" : ":",
"material" : ["steel", "plastic"],
"mod_targets" : ["pistol", "smg", "rifle"],
"volume" : 2,
"bashing" : 3,
"cutting" : 0,
"burst_modifier" : 0,
"recoil_modifier" : 0,
"rarity" : 15,
"price" : 480,
"loudness_modifier" : -25
},
{
"type" : "GUNMOD",
"id" : "grip",
"name" : "enhanced grip",
"clip_size_modifier" : 0,
"accuracy_modifier" : 2,
"damage_modifier" : 0,
"ammo_modifier" : "none",
"description" : "A grip placed forward on the barrel allows for greater control and accuracy. Aside from increased weight, there are no drawbacks.",
"weight" : 1,
"to_hit" : -1,
"color" : "brown",
"symbol" : ":",
"material" : ["steel", "plastic"],
"mod_targets" : ["shotgun", "smg", "rifle"],
"volume" : 1,
"bashing" : 0,
"cutting" : 0,
"burst_modifier" : 0,
"recoil_modifier" : -2,
"rarity" : 12,
"price" : 280,
"loudness_modifier" : 0
},
{
"type" : "GUNMOD",
"id" : "barrel_big",
"name" : "barrel extension",
"clip_size_modifier" : 0,
"accuracy_modifier" : 6,
"damage_modifier" : 1,
"ammo_modifier" : "none",
"description" : "A longer barrel increases the muzzle velocity of a firearm, contributing to both accuracy and damage. However, the longer barrel tends to vibrate after firing, greatly increasing recoil.",
"weight" : 1,
"to_hit" : 2,
"color" : "light_gray",
"symbol" : ":",
"material" : ["steel", "null"],
"mod_targets" : ["smg", "rifle"],
"volume" : 4,
"bashing" : 5,
"cutting" : 0,
"burst_modifier" : 0,
"recoil_modifier" : 5,
"rarity" : 10,
"price" : 400,
"loudness_modifier" : 0
},
{
"type" : "GUNMOD",
"id" : "barrel_small",
"name" : "shortened barrel",
"clip_size_modifier" : 0,
"accuracy_modifier" : -5,
"damage_modifier" : 0,
"ammo_modifier" : "none",
"description" : "A shortened barrel results in markedly reduced accuracy, and a minor increase in noise, but also reduces recoil greatly as a result of the improved managability of the firearm.",
"weight" : 1,
"to_hit" : -1,
"color" : "light_gray",
"symbol" : ":",
"material" : ["steel", "null"],
"mod_targets" : ["smg", "rifle"],
"volume" : 1,
"bashing" : -2,
"cutting" : 0,
"burst_modifier" : 0,
"recoil_modifier" : -6,
"rarity" : 6,
"price" : 320,
"loudness_modifier" : 2
},
{
"type" : "GUNMOD",
"id" : "barrel_rifled",
"name" : "rifled barrel",
"clip_size_modifier" : 0,
"accuracy_modifier" : 10,
"damage_modifier" : -20,
"ammo_modifier" : "none",
"description" : "Rifling a shotgun barrel is mainly done in order to improve its accuracy when firing slugs. The rifling makes the gun less suitable for shot, however.",
"weight" : 1,
"to_hit" : 1,
"color" : "light_gray",
"symbol" : ":",
"material" : ["steel", "null"],
"mod_targets" : ["shotgun"],
"volume" : 2,
"bashing" : 3,
"cutting" : 0,
"burst_modifier" : -1,
"recoil_modifier" : 0,
"rarity" : 5,
"price" : 220,
"loudness_modifier" : 0
},
{
"type" : "GUNMOD",
"id" : "clip",
"name" : "extended magazine",
"clip_size_modifier" : 50,
"accuracy_modifier" : -1,
"damage_modifier" : 0,
"ammo_modifier" : "none",
"description" : "Increases the ammunition capacity of your firearm by 50%, but the added bulk reduces accuracy slightly.",
"weight" : 1,
"to_hit" : -1,
"color" : "light_gray",
"symbol" : ":",
"material" : ["steel", "plastic"],
"mod_targets" : ["pistol", "shotgun", "smg", "rifle"],
"volume" : 1,
"bashing" : -2,
"cutting" : 0,
"burst_modifier" : 0,
"recoil_modifier" : 0,
"rarity" : 8,
"price" : 560,
"loudness_modifier" : 0
},
{
"type" : "GUNMOD",
"id" : "clip2",
"name" : "double magazine",
"clip_size_modifier" : 100,
"accuracy_modifier" : -2,
"damage_modifier" : 0,
"ammo_modifier" : "none",
"description" : "Completely doubles the ammunition capacity of your firearm, but the added bulk reduces accuracy and increases recoil.",
"weight" : 2,
"to_hit" : 0,
"color" : "light_gray",
"symbol" : ":",
"material" : ["steel", "plastic"],
"mod_targets" : ["shotgun", "smg", "rifle"],
"volume" : 2,
"bashing" : 0,
"cutting" : 0,
"burst_modifier" : 0,
"recoil_modifier" : 2,
"rarity" : 4,
"price" : 720,
"loudness_modifier" : 0
},
{
"type" : "GUNMOD",
"id" : "spare_mag",
"name" : "spare magazine",
"clip_size_modifier" : 0,
"accuracy_modifier" : 0,
"damage_modifier" : 0,
"ammo_modifier" : "none",
"description" : "A spare magazine you can keep on hand to make reloads faster, but must itself be reloaded before it can be used again.",
"weight" : 1,
"to_hit" : 0,
"color" : "light_gray",
"symbol" : ":",
"material" : ["steel", "plastic"],
"mod_targets" : ["pistol", "shotgun", "smg", "rifle"],
"volume" : 1,
"bashing" : 0,
"cutting" : 0,
"burst_modifier" : 0,
"recoil_modifier" : 0,
"rarity" : 15,
"price" : 200,
"loudness_modifier" : 0
},
{
"type" : "GUNMOD",
"id" : "brass_catcher",
"name" : "brass catcher",
"clip_size_modifier" : 0,
"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",
"name" : "gyroscopic stabilizer",
"clip_size_modifier" : -10,
"accuracy_modifier" : 2,
"damage_modifier" : -2,
"ammo_modifier" : "none",
"description" : "An advanced unit that straps onto the side of your firearm and reduces vibration, greatly reducing recoil and increasing accuracy. However, it also takes up space in the magazine slot, reducing ammo capacity.",
"weight" : 2,
"to_hit" : -3,
"color" : "blue",
"symbol" : ":",
"material" : ["steel", "plastic"],
"mod_targets" : ["smg", "rifle"],
"volume" : 3,
"bashing" : 0,
"cutting" : 0,
"burst_modifier" : 0,
"recoil_modifier" : -8,
"rarity" : 4,
"price" : 680,
"loudness_modifier" : 0
},
{
"type" : "GUNMOD",
"id" : "blowback",
"name" : "rapid blowback",
"clip_size_modifier" : 0,
"accuracy_modifier" : -3,
"damage_modifier" : 0,
"ammo_modifier" : "none",
"description" : "An improved blowback mechanism makes your firearm's automatic fire faster, at the cost of reduced accuracy and increased noise.",
"weight" : 1,
"to_hit" : 0,
"color" : "red",
"symbol" : ":",
"material" : ["steel", "plastic"],
"mod_targets" : ["smg", "rifle"],
"volume" : 0,
"bashing" : 0,
"cutting" : 0,
"burst_modifier" : 6,
"recoil_modifier" : 0,
"rarity" : 3,
"price" : 700,
"loudness_modifier" : 4
},
{
"type" : "GUNMOD",
"id" : "autofire",
"name" : "auto-fire mechanism",
"weight" : 2,
"color" : "red",
"burst_modifier" : 3,
"loudness_modifier" : 2,
"to_hit" : -1,
"accuracy_modifier" : -2,
"price" : 650,
"clip_size_modifier" : 0,
"description" : "A simple mechanism that converts a pistol to a fully-automatic weapon, with a burst size of three rounds. However, it reduces accuracy, and increases noise and recoil.",
"symbol" : ":",
"material" : ["steel", "plastic"],
"volume" : 1,
"cutting" : 0,
"recoil_modifier" : 2,
"damage_modifier" : 0,
"acceptable_ammo" : ["22", "9MM", "38", "40", "57", "46"],
"mod_targets" : ["pistol"],
"rarity" : 2,
"bashing" : 2,
"ammo_modifier" : "none"
},
{
"type" : "GUNMOD",
"id" : "retool_9mm",
"name" : "9mm caliber retool",
"weight" : 1,
"color" : "green",
"burst_modifier" : 0,
"loudness_modifier" : 0,
"to_hit" : -1,
"accuracy_modifier" : -1,
"price" : 420,
"clip_size_modifier" : 0,
"description" : "Replacing several key parts of a .38, .40, .44 or .45 firearm converts it to a 9mm firearm. The conversion results in a slight reduction in accuracy.",
"symbol" : ":",
"material" : ["steel", "null"],
"volume" : 1,
"cutting" : 0,
"recoil_modifier" : 0,
"damage_modifier" : 0,
"acceptable_ammo" : ["38", "40", "44", "45"],
"mod_targets" : ["pistol", "smg"],
"rarity" : 3,
"bashing" : 0,
"ammo_modifier" : "9mm"
},
{
"type" : "GUNMOD",
"id" : "retool_22",
"name" : ".22 caliber retool",
"weight" : 1,
"color" : "green",
"burst_modifier" : 0,
"loudness_modifier" : 0,
"to_hit" : -1,
"accuracy_modifier" : -1,
"price" : 320,
"clip_size_modifier" : 0,
"description" : "Replacing several key parts of a 9mm, .38, .40, 5.7mm, 4.6mm, 7.62mm or .223 firearm converts it to a .22 firearm. The conversion results in a slight reduction in accuracy.",
"symbol" : ":",
"material" : ["steel", "null"],
"volume" : 1,
"cutting" : 0,
"recoil_modifier" : 0,
"damage_modifier" : 0,
"acceptable_ammo" : ["9MM", "38", "40", "57", "46", "762", "223"],
"mod_targets" : ["pistol", "smg", "rifle"],
"rarity" : 2,
"bashing" : -2,
"ammo_modifier" : ".22"
},
{
"type" : "GUNMOD",
"id" : "retool_57",
"name" : "5.7mm caliber retool",
"weight" : 1,
"color" : "green",
"burst_modifier" : 0,
"loudness_modifier" : 0,
"to_hit" : -1,
"accuracy_modifier" : -1,
"price" : 460,
"clip_size_modifier" : 0,
"description" : "FN Hestal sells a conversion kit, used to convert .22, 9mm, or .38 firearms to their proprietary 5.7x28mm, a round designed for accuracy and armor penetration.",
"symbol" : ":",
"material" : ["steel", "null"],
"volume" : 1,
"cutting" : 0,
"recoil_modifier" : 0,
"damage_modifier" : 0,
"acceptable_ammo" : ["22", "9MM", "38"],
"mod_targets" : ["pistol", "smg"],
"rarity" : 1,
"bashing" : -3,
"ammo_modifier" : "5.7mm"
},
{
"type" : "GUNMOD",
"id" : "retool_46",
"name" : "4.6mm caliber retool",
"weight" : 1,
"color" : "green",
"burst_modifier" : 0,
"loudness_modifier" : 0,
"to_hit" : -1,
"accuracy_modifier" : -1,
"price" : 460,
"clip_size_modifier" : 0,
"description" : "Heckler and Koch sells a conversion kit, used to convert .22, 9mm, or .38 firearms to their proprietary 4.6x30mm, a round designed for accuracy and armor penetration.",
"symbol" : ":",
"material" : ["steel", "null"],
"volume" : 1,
"cutting" : 0,
"recoil_modifier" : 0,
"damage_modifier" : 0,
"acceptable_ammo" : ["22", "9MM", "38"],
"mod_targets" : ["pistol", "smg"],
"rarity" : 1,
"bashing" : -3,
"ammo_modifier" : "4.6mm"
},
{
"type" : "GUNMOD",
"id" : "retool_308",
"name" : ".308 caliber retool",
"weight" : 1,
"color" : "green",
"burst_modifier" : 0,
"loudness_modifier" : 0,
"to_hit" : 1,
"accuracy_modifier" : -2,
"price" : 520,
"clip_size_modifier" : -20,
"description" : "This kit is used to convert a shotgun or 7.62mm, .223 or .30-06 rifle to the popular and powerful .308 caliber. The conversion results in reduced ammo capacity and a slight reduction in accuracy.",
"symbol" : ":",
"material" : ["steel", "null"],
"volume" : 2,
"cutting" : 0,
"recoil_modifier" : 0,
"damage_modifier" : 0,
"acceptable_ammo" : ["SHOT", "762", "223", "3006"],
"mod_targets" : ["shotgun", "rifle"],
"rarity" : 2,
"bashing" : 4,
"ammo_modifier" : ".308"
},
{
"type" : "GUNMOD",
"id" : "retool_223",
"name" : ".223 caliber retool",
"weight" : 1,
"color" : "green",
"burst_modifier" : 0,
"loudness_modifier" : 0,
"to_hit" : 1,
"accuracy_modifier" : -2,
"price" : 500,
"clip_size_modifier" : -10,
"description" : "This kit is used to convert a shotgun or 7.62mm, .30-06, or .308 rifle to the popular, accurate, and damaging .223 caliber. The conversion results in slight reductions in both accuracy and ammo capacity.",
"symbol" : ":",
"material" : ["steel", "null"],
"volume" : 2,
"cutting" : 0,
"recoil_modifier" : 0,
"damage_modifier" : 0,
"acceptable_ammo" : ["SHOT", "762", "3006", "308"],
"mod_targets" : ["shotgun", "rifle"],
"rarity" : 2,
"bashing" : 4,
"ammo_modifier" : ".223"
},
{
"type" : "GUNMOD",
"id" : "conversion_battle",
"name" : "battle rifle conversion",
"clip_size_modifier" : 20,
"accuracy_modifier" : -6,
"damage_modifier" : 6,
"ammo_modifier" : "none",
"description" : "This is a complete conversion kit, designed to turn a rifle into a powerful battle rifle. It reduces accuracy, and increases noise and recoil, but also increases damage, ammo capacity, and fire rate.",
"weight" : 3,
"to_hit" : -1,
"color" : "magenta",
"symbol" : ":",
"material" : ["steel", "null"],
"mod_targets" : ["rifle"],
"volume" : 4,
"bashing" : 6,
"cutting" : 0,
"burst_modifier" : 4,
"recoil_modifier" : 4,
"rarity" : 1,
"price" : 680,
"loudness_modifier" : 4
},
{
"type" : "GUNMOD",
"id" : "conversion_sniper",
"name" : "sniper conversion",
"clip_size_modifier" : -15,
"accuracy_modifier" : 10,
"damage_modifier" : 8,
"ammo_modifier" : "none",
"description" : "This is a complete conversion kit, designed to turn a rifle into a deadly sniper rifle. It decreases ammo capacity, and removes any automatic fire capabilities, but also increases accuracy and damage.",
"weight" : 2,
"to_hit" : -1,
"color" : "green",
"symbol" : ":",
"material" : ["steel", "null"],
"mod_targets" : ["rifle"],
"volume" : 1,
"bashing" : 0,
"cutting" : 0,
"burst_modifier" : -99,
"recoil_modifier" : 0,
"rarity" : 1,
"price" : 660,
"loudness_modifier" : 3
},
{
"type" : "GUNMOD",
"id" : "m203",
"name" : "M203",
"weight" : 1,
"color" : "light_red",
"burst_modifier" : 0,
"loudness_modifier" : 0,
"to_hit" : -1,
"accuracy_modifier" : -2,
"price" : 650,
"clip_size_modifier" : 1,
"description" : "The M203 was originally designed for use with M16 variants but today can be attached to almost any rifle. It allows a single 40mm grenade to be loaded and fired.",
"symbol" : ":",
"material" : ["steel", "null"],
"volume" : 2,
"cutting" : 0,
"recoil_modifier" : 0,
"damage_modifier" : 0,
"mod_targets" : ["rifle"],
"rarity" : 2,
"bashing" : 2,
"flags" : ["MODE_AUX"],
"ammo_modifier" : "40mm"
},
{
"type" : "GUNMOD",
"id" : "bayonet",
"name" : "bayonet",
"weight" : 2,
"color" : "light_cyan",
"burst_modifier" : 0,
"loudness_modifier" : 0,
"to_hit" : -3,
"accuracy_modifier" : 0,
"price" : 400,
"clip_size_modifier" : 0,
"description" : "A bayonet is a stabbing weapon that can be attached to the front of a shotgun, sub-machinegun or rifle, allowing a melee attack to deal piercing damage. The added length increases recoil slightly.",
"symbol" : ":",
"material" : ["steel", "null"],
"volume" : 2,
"cutting" : 16,
"recoil_modifier" : 3,
"damage_modifier" : 0,
"mod_targets" : ["shotgun", "smg", "rifle"],
"rarity" : 6,
"bashing" : 0,
"flags" : ["STAB"],
"ammo_modifier" : "none"
},
{
"type" : "GUNMOD",
"id" : "u_shotgun",
"name" : "underslung shotgun",
"weight" : 1,
"color" : "light_red",
"burst_modifier" : 0,
"loudness_modifier" : 0,
"to_hit" : -1,
"accuracy_modifier" : -2,
"price" : 650,
"clip_size_modifier" : 2,
"description" : "A miniaturized shotgun with 2 barrels, which can be mounted under the barrel of many rifles. It allows two shotgun shells to be loaded and fired.",
"symbol" : ":",
"material" : ["steel", "null"],
"volume" : 2,
"cutting" : 0,
"recoil_modifier" : 0,
"damage_modifier" : 0,
"mod_targets" : ["rifle"],
"rarity" : 2,
"bashing" : 2,
"flags" : ["MODE_AUX"],
"ammo_modifier" : "shot"
},
{
"type" : "GUNMOD",
"id" : "gun_crossbow",
"name" : "rail-mounted crossbow",
"weight" : 1,
"color" : "light_red",
"burst_modifier" : 0,
"loudness_modifier" : 0,
"to_hit" : -1,
"accuracy_modifier" : 0,
"price" : 500,
"clip_size_modifier" : 1,
"description" : "A kit to attach a pair of crossbow arms and a firing rail to the barrel of a long firearm. It allows crossbow bolts to be fired.",
"symbol" : ":",
"material" : ["steel", "wood"],
"volume" : 2,
"cutting" : 0,
"recoil_modifier" : 0,
"damage_modifier" : 0,
"mod_targets" : ["shotgun", "rifle"],
"rarity" : 2,
"bashing" : 2,
"flags" : ["MODE_AUX", "STR_RELOAD"],
"ammo_modifier" : "bolt"
}
]
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
+249
View File
@@ -0,0 +1,249 @@
[
{
"ident" : "null",
"name" : "Null",
"bash_resist" : 0,
"cut_resist" : 0,
"bash_dmg_verb" : "damaged",
"cut_dmg_verb" : "damaged",
"dmg_adj" : ["lightly damaged", "damaged", "very damaged", "thoroughly damaged"],
"acid_resist" : 0,
"elec_resist" : 0,
"fire_resist" : 0,
"density" : 1
},
{
"ident" : "veggy",
"name" : "Plant Matter",
"bash_resist" : 1,
"cut_resist" : 1,
"bash_dmg_verb" : "ripped",
"cut_dmg_verb" : "cut",
"dmg_adj" : ["lightly damaged", "damaged", "very damaged", "thoroughly damaged"],
"acid_resist" : 1,
"elec_resist" : 1,
"fire_resist" : 0,
"density" : 4
},
{
"ident" : "flesh",
"name" : "Flesh",
"bash_resist" : 1,
"cut_resist" : 1,
"bash_dmg_verb" : "bruised",
"cut_dmg_verb" : "sliced",
"dmg_adj" : ["bruised", "mutilated", "badly mutilated", "thoroughly mutilated"],
"acid_resist" : 1,
"elec_resist" : 1,
"fire_resist" : 0,
"density" : 5
},
{
"ident" : "powder",
"name" : "Powder",
"bash_resist" : 1,
"cut_resist" : 1,
"bash_dmg_verb" : "damaged",
"cut_dmg_verb" : "damaged",
"dmg_adj" : ["lightly damaged", "damaged", "very damaged", "thoroughly damaged"],
"acid_resist" : 0,
"elec_resist" : 2,
"fire_resist" : 0,
"density" : 1
},
{
"ident" : "hflesh",
"name" : "Human Flesh",
"bash_resist" : 1,
"cut_resist" : 1,
"bash_dmg_verb" : "bruised",
"cut_dmg_verb" : "sliced",
"dmg_adj" : ["bruised", "mutilated", "badly mutilated", "thoroughly mutilated"],
"acid_resist" : 1,
"elec_resist" : 1,
"fire_resist" : 0,
"density" : 5
},
{
"ident" : "cotton",
"name" : "Cotton",
"bash_resist" : 1,
"cut_resist" : 1,
"bash_dmg_verb" : "ripped",
"cut_dmg_verb" : "cut",
"dmg_adj" : ["ripped", "torn", "shredded", "tattered"],
"acid_resist" : 1,
"elec_resist" : 2,
"fire_resist" : 0,
"density" : 3
},
{
"ident" : "wool",
"name" : "Wool",
"bash_resist" : 1,
"cut_resist" : 1,
"bash_dmg_verb" : "torn",
"cut_dmg_verb" : "cut",
"dmg_adj" : ["ripped", "torn", "shredded", "tattered"],
"acid_resist" : 1,
"elec_resist" : 2,
"fire_resist" : 0,
"density" : 9
},
{
"ident" : "leather",
"name" : "Leather",
"bash_resist" : 2,
"cut_resist" : 2,
"bash_dmg_verb" : "ripped",
"cut_dmg_verb" : "sliced",
"dmg_adj" : ["scratched", "cut", "shredded", "tattered"],
"acid_resist" : 1,
"elec_resist" : 2,
"fire_resist" : 1,
"density" : 6
},
{
"ident" : "kevlar",
"name" : "Kevlar",
"bash_resist" : 2,
"cut_resist" : 4,
"bash_dmg_verb" : "ripped",
"cut_dmg_verb" : "cut",
"dmg_adj" : ["marked", "dented", "scarred", "broken"],
"acid_resist" : 2,
"elec_resist" : 2,
"fire_resist" : 1,
"density" : 10
},
{
"ident" : "fur",
"name" : "Fur",
"bash_resist" : 2,
"cut_resist" : 2,
"bash_dmg_verb" : "ripped",
"cut_dmg_verb" : "sliced",
"dmg_adj" : ["ripped", "torn", "shredded", "tattered"],
"acid_resist" : 1,
"elec_resist" : 2,
"fire_resist" : 0,
"density" : 9
},
{
"ident" : "chitin",
"name" : "Chitin",
"bash_resist" : 3,
"cut_resist" : 4,
"bash_dmg_verb" : "cracked",
"cut_dmg_verb" : "chipped",
"dmg_adj" : ["scratched", "cut", "cracked", "shattered"],
"acid_resist" : 1,
"elec_resist" : 2,
"fire_resist" : 2,
"density" : 10
},
{
"ident" : "stone",
"name" : "Stone",
"bash_resist" : 6,
"cut_resist" : 6,
"bash_dmg_verb" : "cracked",
"cut_dmg_verb" : "chipped",
"dmg_adj" : ["scratched", "cut", "cracked", "shattered"],
"acid_resist" : 3,
"elec_resist" : 2,
"fire_resist" : 2,
"density" : 17
},
{
"ident" : "paper",
"name" : "Paper",
"bash_resist" : 1,
"cut_resist" : 1,
"bash_dmg_verb" : "ripped",
"cut_dmg_verb" : "cut",
"dmg_adj" : ["ripped", "torn", "shredded", "tattered"],
"acid_resist" : 1,
"elec_resist" : 2,
"fire_resist" : 0,
"density" : 4
},
{
"ident" : "wood",
"name" : "Wood",
"bash_resist" : 3,
"cut_resist" : 2,
"bash_dmg_verb" : "splintered",
"cut_dmg_verb" : "gouged",
"dmg_adj" : ["scratched", "chipped", "cracked", "splintered"],
"acid_resist" : 2,
"elec_resist" : 2,
"fire_resist" : 0,
"density" : 4
},
{
"ident" : "plastic",
"name" : "Plastic",
"bash_resist" : 2,
"cut_resist" : 2,
"bash_dmg_verb" : "dented",
"cut_dmg_verb" : "gouged",
"dmg_adj" : ["scratched", "cut", "cracked", "shattered"],
"acid_resist" : 2,
"elec_resist" : 2,
"fire_resist" : 0,
"density" : 8
},
{
"ident" : "glass",
"name" : "Glass",
"bash_resist" : 3,
"cut_resist" : 4,
"bash_dmg_verb" : "cracked",
"cut_dmg_verb" : "scratched",
"dmg_adj" : ["scratched", "cut", "cracked", "shattered"],
"acid_resist" : 3,
"elec_resist" : 2,
"fire_resist" : 2,
"density" : 14
},
{
"ident" : "iron",
"name" : "Iron",
"bash_resist" : 4,
"cut_resist" : 4,
"bash_dmg_verb" : "dented",
"cut_dmg_verb" : "scratched",
"dmg_adj" : ["marked", "dented", "smashed", "shattered"],
"acid_resist" : 0,
"elec_resist" : 0,
"fire_resist" : 2,
"density" : 52
},
{
"ident" : "steel",
"name" : "Steel",
"bash_resist" : 6,
"cut_resist" : 6,
"bash_dmg_verb" : "dented",
"cut_dmg_verb" : "scratched",
"dmg_adj" : ["marked", "dented", "smashed", "shattered"],
"acid_resist" : 0,
"elec_resist" : 0,
"fire_resist" : 2,
"density" : 52
},
{
"ident" : "silver",
"name" : "Silver",
"bash_resist" : 2,
"cut_resist" : 3,
"bash_dmg_verb" : "dented",
"cut_dmg_verb" : "scratched",
"dmg_adj" : ["marked", "dented", "smashed", "shattered"],
"acid_resist" : 2,
"elec_resist" : 0,
"fire_resist" : 2,
"density" : 70
}
]
+148 -146
View File
@@ -3,80 +3,82 @@
"name" : "GROUP_FOREST",
"default" : "mon_squirrel",
"monsters" : [
{ "monster" : "mon_rabbit", "freq" : 150 },
{ "monster" : "mon_deer", "freq" : 30 },
{ "monster" : "mon_wolf", "freq" : 30 },
{ "monster" : "mon_bear", "freq" : 20 },
{ "monster" : "mon_cougar", "freq" : 20 },
{ "monster" : "mon_spider_wolf", "freq" : 30 },
{ "monster" : "mon_spider_jumping", "freq" : 30 },
{ "monster" : "mon_dog", "freq" : 10 },
{ "monster" : "mon_crow", "freq" : 30 }
{ "monster" : "mon_rabbit", "freq" : 150, "multiplier" : 0 },
{ "monster" : "mon_deer", "freq" : 30, "multiplier" : 3 },
{ "monster" : "mon_moose", "freq" : 10, "multiplier" : 3 },
{ "monster" : "mon_wolf", "freq" : 30, "multiplier" : 5 },
{ "monster" : "mon_coyote", "freq" : 30, "multiplier" : 5 },
{ "monster" : "mon_bear", "freq" : 20, "multiplier" : 10 },
{ "monster" : "mon_cougar", "freq" : 20, "multiplier" : 10 },
{ "monster" : "mon_spider_wolf", "freq" : 30, "multiplier" : 10 },
{ "monster" : "mon_spider_jumping", "freq" : 30, "multiplier" : 10 },
{ "monster" : "mon_dog", "freq" : 10, "multiplier" : 0 },
{ "monster" : "mon_cat", "freq" : 10, "multiplier" : 0 },
{ "monster" : "mon_crow", "freq" : 30, "multiplier" : 0 }
]
},
{
"name" : "GROUP_ANT",
"default" : "mon_ant",
"monsters" : [
{ "monster" : "mon_ant_larva", "freq" : 40 },
{ "monster" : "mon_ant_soldier", "freq" : 90 },
{ "monster" : "mon_ant_queen", "freq" : 0 }
{ "monster" : "mon_ant_larva", "freq" : 40, "multiplier" : 0 },
{ "monster" : "mon_ant_soldier", "freq" : 90, "multiplier" : 5 },
{ "monster" : "mon_ant_queen", "freq" : 0, "multiplier" : 0 }
]
},
{
"name" : "GROUP_BEE",
"default" : "mon_bee",
"monsters" : [
"monsters" : [
]
},
{
"name" : "GROUP_WORM",
"default" : "mon_worm",
"monsters" : [
{ "monster" : "mon_graboid", "freq" : 30 },
{ "monster" : "mon_halfworm", "freq" : 0 }
{ "monster" : "mon_graboid", "freq" : 30, "multiplier" : 20 },
{ "monster" : "mon_halfworm", "freq" : 0, "multiplier" : 0 }
]
},
{
"name" : "GROUP_ZOMBIE",
"default" : "mon_zombie",
"monsters" : [
{ "monster" : "mon_zombie_cop", "freq" : 20 },
{ "monster" : "mon_zombie_fast", "freq" : 70 },
{ "monster" : "mon_zombie_grabber", "freq" : 70 },
{ "monster" : "mon_skeleton", "freq" : 30 },
{ "monster" : "mon_zombie_smoker", "freq" : 30 },
{ "monster" : "mon_zombie_shrieker", "freq" : 30 },
{ "monster" : "mon_zombie_spitter", "freq" : 30 },
{ "monster" : "mon_zombie_electric", "freq" : 30 },
{ "monster" : "mon_zombie_necro", "freq" : 1 },
{ "monster" : "mon_boomer", "freq" : 30 },
{ "monster" : "mon_zombie_brute", "freq" : 10 },
{ "monster" : "mon_zombie_hulk", "freq" : 1 },
{ "monster" : "mon_zombie_master", "freq" : 1 },
{ "monster" : "mon_crow", "freq" : 1 }
{ "monster" : "mon_zombie_cop", "freq" : 20, "multiplier" : 3 },
{ "monster" : "mon_zombie_fast", "freq" : 70, "multiplier" : 2 },
{ "monster" : "mon_zombie_grabber", "freq" : 70, "multiplier" : 1 },
{ "monster" : "mon_skeleton", "freq" : 30, "multiplier" : 2 },
{ "monster" : "mon_zombie_smoker", "freq" : 30, "multiplier" : 5 },
{ "monster" : "mon_zombie_shrieker", "freq" : 30, "multiplier" : 5 },
{ "monster" : "mon_zombie_spitter", "freq" : 30, "multiplier" : 5 },
{ "monster" : "mon_zombie_electric", "freq" : 30, "multiplier" : 5 },
{ "monster" : "mon_zombie_necro", "freq" : 1, "multiplier" : 25 },
{ "monster" : "mon_boomer", "freq" : 30, "multiplier" : 7 },
{ "monster" : "mon_zombie_brute", "freq" : 10, "multiplier" : 15 },
{ "monster" : "mon_zombie_hulk", "freq" : 1, "multiplier" : 50 },
{ "monster" : "mon_zombie_master", "freq" : 1, "multiplier" : 25 },
{ "monster" : "mon_crow", "freq" : 1, "multiplier" : 0 }
]
},
{
"name" : "GROUP_TRIFFID",
"default" : "mon_triffid",
"monsters" : [
{ "monster" : "mon_triffid_young", "freq" : 300 },
{ "monster" : "mon_vinebeast", "freq" : 160 },
{ "monster" : "mon_triffid_queen", "freq" : 60 }
{ "monster" : "mon_triffid_young", "freq" : 300, "multiplier" : 0 },
{ "monster" : "mon_vinebeast", "freq" : 160, "multiplier" : 10 },
{ "monster" : "mon_triffid_queen", "freq" : 60, "multiplier" : 0 }
]
},
{
"name" : "GROUP_FUNGI",
"default" : "mon_fungaloid",
"monsters" : [
{ "monster" : "mon_fungaloid_dormant", "freq" : 0 },
{ "monster" : "mon_ant_fungus", "freq" : 0 },
{ "monster" : "mon_zombie_fungus", "freq" : 300 },
{ "monster" : "mon_boomer_fungus", "freq" : 30 },
{ "monster" : "mon_spore", "freq" : 0 },
{ "monster" : "mon_fungaloid_queen", "freq" : 303 },
{ "monster" : "mon_fungal_wall", "freq" : 0 }
{ "monster" : "mon_fungaloid_dormant", "freq" : 0, "multiplier" : 0 },
{ "monster" : "mon_ant_fungus", "freq" : 0, "multiplier" : 0 },
{ "monster" : "mon_zombie_fungus", "freq" : 300, "multiplier" : 0 },
{ "monster" : "mon_boomer_fungus", "freq" : 30, "multiplier" : 0 },
{ "monster" : "mon_spore", "freq" : 0, "multiplier" : 0 },
{ "monster" : "mon_fungal_wall", "freq" : 0, "multiplier" : 0 }
]
},
@@ -84,66 +86,66 @@
"name" : "GROUP_GOO",
"default" : "mon_blob",
"monsters" : [
{ "monster" : "mon_blob_small", "freq" : 200 }
{ "monster" : "mon_blob_small", "freq" : 200, "multiplier" : 0 }
]
},
{
"name" : "GROUP_CHUD",
"default" : "mon_chud",
"monsters" : [
{ "monster" : "mon_one_eye", "freq" : 90 },
{ "monster" : "mon_crawler", "freq" : 35 }
{ "monster" : "mon_one_eye", "freq" : 90, "multiplier" : 0 },
{ "monster" : "mon_crawler", "freq" : 35, "multiplier" : 0 }
]
},
{
"name" : "GROUP_SEWER",
"default" : "mon_sewer_rat",
"monsters" : [
{ "monster" : "mon_sewer_fish", "freq" : 470 },
{ "monster" : "mon_sewer_snake", "freq" : 240 }
{ "monster" : "mon_sewer_fish", "freq" : 470, "multiplier" : 0 },
{ "monster" : "mon_sewer_snake", "freq" : 240, "multiplier" : 0 }
]
},
{
"name" : "GROUP_SWAMP",
"default" : "mon_mosquito",
"monsters" : [
{ "monster" : "mon_dragonfly", "freq" : 130 },
{ "monster" : "mon_centipede", "freq" : 150 },
{ "monster" : "mon_frog", "freq" : 100 },
{ "monster" : "mon_slug", "freq" : 85 },
{ "monster" : "mon_dermatik_larva", "freq" : 0 },
{ "monster" : "mon_dermatik", "freq" : 65 }
{ "monster" : "mon_dragonfly", "freq" : 130, "multiplier" : 0 },
{ "monster" : "mon_centipede", "freq" : 150, "multiplier" : 0 },
{ "monster" : "mon_frog", "freq" : 100, "multiplier" : 0 },
{ "monster" : "mon_slug", "freq" : 85, "multiplier" : 0 },
{ "monster" : "mon_dermatik_larva", "freq" : 0, "multiplier" : 0 },
{ "monster" : "mon_dermatik", "freq" : 65, "multiplier" : 0 }
]
},
{
"name" : "GROUP_LAB",
"default" : "mon_zombie_scientist",
"monsters" : [
{ "monster" : "mon_blob_small", "freq" : 25 },
{ "monster" : "mon_manhack", "freq" : 245 },
{ "monster" : "mon_skitterbot", "freq" : 245 }
{ "monster" : "mon_blob_small", "freq" : 25, "multiplier" : 0 },
{ "monster" : "mon_manhack", "freq" : 245, "multiplier" : 0 },
{ "monster" : "mon_skitterbot", "freq" : 245, "multiplier" : 0 }
]
},
{
"name" : "GROUP_NETHER",
"default" : "mon_blank",
"monsters" : [
{ "monster" : "mon_flying_polyp", "freq" : 25 },
{ "monster" : "mon_hunting_horror", "freq" : 240 },
{ "monster" : "mon_mi_go", "freq" : 120 },
{ "monster" : "mon_yugg", "freq" : 70 },
{ "monster" : "mon_gelatin", "freq" : 120 },
{ "monster" : "mon_flaming_eye", "freq" : 120 },
{ "monster" : "mon_kreck", "freq" : 210 },
{ "monster" : "mon_gozu", "freq" : 25 }
{ "monster" : "mon_flying_polyp", "freq" : 25, "multiplier" : 0 },
{ "monster" : "mon_hunting_horror", "freq" : 240, "multiplier" : 0 },
{ "monster" : "mon_mi_go", "freq" : 120, "multiplier" : 0 },
{ "monster" : "mon_yugg", "freq" : 70, "multiplier" : 0 },
{ "monster" : "mon_gelatin", "freq" : 120, "multiplier" : 0 },
{ "monster" : "mon_flaming_eye", "freq" : 120, "multiplier" : 0 },
{ "monster" : "mon_kreck", "freq" : 210, "multiplier" : 0 },
{ "monster" : "mon_gozu", "freq" : 25, "multiplier" : 0 }
]
},
{
"name" : "GROUP_SPIRAL",
"default" : "mon_human_snail",
"monsters" : [
{ "monster" : "mon_twisted_body", "freq" : 180 },
{ "monster" : "mon_vortex", "freq" : 80 }
{ "monster" : "mon_twisted_body", "freq" : 180, "multiplier" : 0 },
{ "monster" : "mon_vortex", "freq" : 80, "multiplier" : 0 }
]
},
{
@@ -156,130 +158,130 @@
"name" : "GROUP_SPIDER",
"default" : "mon_spider_wolf",
"monsters" : [
{ "monster" : "mon_spider_web", "freq" : 200 },
{ "monster" : "mon_spider_jumping", "freq" : 400 },
{ "monster" : "mon_spider_widow", "freq" : 200 }
{ "monster" : "mon_spider_web", "freq" : 200, "multiplier" : 0 },
{ "monster" : "mon_spider_jumping", "freq" : 400, "multiplier" : 0 },
{ "monster" : "mon_spider_widow", "freq" : 200, "multiplier" : 0 }
]
},
{
"name" : "GROUP_ROBOT",
"default" : "mon_manhack",
"monsters" : [
{ "monster" : "mon_skitterbot", "freq" : 220 },
{ "monster" : "mon_secubot", "freq" : 150 },
{ "monster" : "mon_copbot", "freq" : 0 },
{ "monster" : "mon_molebot", "freq" : 40 },
{ "monster" : "mon_tripod", "freq" : 110 },
{ "monster" : "mon_chickenbot", "freq" : 60 },
{ "monster" : "mon_tankbot", "freq" : 20 }
{ "monster" : "mon_skitterbot", "freq" : 220, "multiplier" : 0 },
{ "monster" : "mon_secubot", "freq" : 150, "multiplier" : 0 },
{ "monster" : "mon_copbot", "freq" : 0, "multiplier" : 0 },
{ "monster" : "mon_molebot", "freq" : 40, "multiplier" : 0 },
{ "monster" : "mon_tripod", "freq" : 110, "multiplier" : 0 },
{ "monster" : "mon_chickenbot", "freq" : 60, "multiplier" : 0 },
{ "monster" : "mon_tankbot", "freq" : 20, "multiplier" : 0 }
]
},
{
"name" : "GROUP_POLICE", "_comment" : "+30% cops",
"default" : "mon_zombie",
"monsters" : [
{ "monster" : "mon_zombie_cop", "freq" : 320 },
{ "monster" : "mon_zombie_fast", "freq" : 70 },
{ "monster" : "mon_zombie_grabber", "freq" : 70 },
{ "monster" : "mon_skeleton", "freq" : 30 },
{ "monster" : "mon_zombie_smoker", "freq" : 30 },
{ "monster" : "mon_zombie_shrieker", "freq" : 30 },
{ "monster" : "mon_zombie_spitter", "freq" : 30 },
{ "monster" : "mon_zombie_electric", "freq" : 30 },
{ "monster" : "mon_zombie_necro", "freq" : 1 },
{ "monster" : "mon_boomer", "freq" : 30 },
{ "monster" : "mon_zombie_brute", "freq" : 10 },
{ "monster" : "mon_zombie_hulk", "freq" : 1 },
{ "monster" : "mon_zombie_master", "freq" : 1 },
{ "monster" : "mon_crow", "freq" : 1 }
{ "monster" : "mon_zombie_cop", "freq" : 320, "multiplier" : 3 },
{ "monster" : "mon_zombie_fast", "freq" : 70, "multiplier" : 2 },
{ "monster" : "mon_zombie_grabber", "freq" : 70, "multiplier" : 1 },
{ "monster" : "mon_skeleton", "freq" : 30, "multiplier" : 2 },
{ "monster" : "mon_zombie_smoker", "freq" : 30, "multiplier" : 5 },
{ "monster" : "mon_zombie_shrieker", "freq" : 30, "multiplier" : 5 },
{ "monster" : "mon_zombie_spitter", "freq" : 30, "multiplier" : 5 },
{ "monster" : "mon_zombie_electric", "freq" : 30, "multiplier" : 5 },
{ "monster" : "mon_zombie_necro", "freq" : 1, "multiplier" : 25 },
{ "monster" : "mon_boomer", "freq" : 30, "multiplier" : 7 },
{ "monster" : "mon_zombie_brute", "freq" : 10, "multiplier" : 15 },
{ "monster" : "mon_zombie_hulk", "freq" : 1, "multiplier" : 50 },
{ "monster" : "mon_zombie_master", "freq" : 1, "multiplier" : 25 },
{ "monster" : "mon_crow", "freq" : 1, "multiplier" : 0 }
]
},
{
"name" : "GROUP_HOUSE", "_comment" : "+15% child",
"default" : "mon_zombie",
"monsters" : [
{ "monster" : "mon_zombie_child", "freq" : 150 },
{ "monster" : "mon_zombie_cop", "freq" : 20 },
{ "monster" : "mon_zombie_fast", "freq" : 70 },
{ "monster" : "mon_zombie_grabber", "freq" : 70 },
{ "monster" : "mon_skeleton", "freq" : 30 },
{ "monster" : "mon_zombie_smoker", "freq" : 30 },
{ "monster" : "mon_zombie_shrieker", "freq" : 30 },
{ "monster" : "mon_zombie_spitter", "freq" : 30 },
{ "monster" : "mon_zombie_electric", "freq" : 30 },
{ "monster" : "mon_zombie_necro", "freq" : 1 },
{ "monster" : "mon_boomer", "freq" : 30 },
{ "monster" : "mon_zombie_brute", "freq" : 10 },
{ "monster" : "mon_zombie_hulk", "freq" : 1 },
{ "monster" : "mon_zombie_master", "freq" : 1 },
{ "monster" : "mon_crow", "freq" : 1 }
{ "monster" : "mon_zombie_child", "freq" : 150, "multiplier" : 2 },
{ "monster" : "mon_zombie_cop", "freq" : 20, "multiplier" : 2 },
{ "monster" : "mon_zombie_fast", "freq" : 70, "multiplier" : 2 },
{ "monster" : "mon_zombie_grabber", "freq" : 70, "multiplier" : 1 },
{ "monster" : "mon_skeleton", "freq" : 30, "multiplier" : 2 },
{ "monster" : "mon_zombie_smoker", "freq" : 30, "multiplier" : 5 },
{ "monster" : "mon_zombie_shrieker", "freq" : 30, "multiplier" : 5 },
{ "monster" : "mon_zombie_spitter", "freq" : 30, "multiplier" : 5 },
{ "monster" : "mon_zombie_electric", "freq" : 30, "multiplier" : 5 },
{ "monster" : "mon_zombie_necro", "freq" : 1, "multiplier" : 25 },
{ "monster" : "mon_boomer", "freq" : 30, "multiplier" : 7 },
{ "monster" : "mon_zombie_brute", "freq" : 10, "multiplier" : 15 },
{ "monster" : "mon_zombie_hulk", "freq" : 1, "multiplier" : 50 },
{ "monster" : "mon_zombie_master", "freq" : 1, "multiplier" : 25 },
{ "monster" : "mon_crow", "freq" : 1, "multiplier" : 0 }
]
},
{
"name" : "GROUP_PHARM", "_comment" : "+15% fast",
"default" : "mon_zombie",
"monsters" : [
{ "monster" : "mon_zombie_cop", "freq" : 20 },
{ "monster" : "mon_zombie_fast", "freq" : 220 },
{ "monster" : "mon_zombie_grabber", "freq" : 70 },
{ "monster" : "mon_skeleton", "freq" : 30 },
{ "monster" : "mon_zombie_smoker", "freq" : 30 },
{ "monster" : "mon_zombie_shrieker", "freq" : 30 },
{ "monster" : "mon_zombie_spitter", "freq" : 30 },
{ "monster" : "mon_zombie_electric", "freq" : 30 },
{ "monster" : "mon_zombie_necro", "freq" : 1 },
{ "monster" : "mon_boomer", "freq" : 30 },
{ "monster" : "mon_zombie_brute", "freq" : 10 },
{ "monster" : "mon_zombie_hulk", "freq" : 1 },
{ "monster" : "mon_zombie_master", "freq" : 1 },
{ "monster" : "mon_crow", "freq" : 1 }
{ "monster" : "mon_zombie_cop", "freq" : 20, "multiplier" : 2 },
{ "monster" : "mon_zombie_fast", "freq" : 220, "multiplier" : 2 },
{ "monster" : "mon_zombie_grabber", "freq" : 70, "multiplier" : 1 },
{ "monster" : "mon_skeleton", "freq" : 30, "multiplier" : 2 },
{ "monster" : "mon_zombie_smoker", "freq" : 30, "multiplier" : 5 },
{ "monster" : "mon_zombie_shrieker", "freq" : 30, "multiplier" : 5 },
{ "monster" : "mon_zombie_spitter", "freq" : 30, "multiplier" : 5 },
{ "monster" : "mon_zombie_electric", "freq" : 30, "multiplier" : 5 },
{ "monster" : "mon_zombie_necro", "freq" : 1, "multiplier" : 25 },
{ "monster" : "mon_boomer", "freq" : 30, "multiplier" : 7 },
{ "monster" : "mon_zombie_brute", "freq" : 10, "multiplier" : 15 },
{ "monster" : "mon_zombie_hulk", "freq" : 1, "multiplier" : 50 },
{ "monster" : "mon_zombie_master", "freq" : 1, "multiplier" : 25 },
{ "monster" : "mon_crow", "freq" : 1, "multiplier" : 0 }
]
},
{
"name" : "GROUP_ELECTRO", "_comment" : "+15% electric",
"default" : "mon_zombie",
"monsters" : [
{ "monster" : "mon_zombie_cop", "freq" : 20 },
{ "monster" : "mon_zombie_fast", "freq" : 70 },
{ "monster" : "mon_zombie_grabber", "freq" : 70 },
{ "monster" : "mon_skeleton", "freq" : 30 },
{ "monster" : "mon_zombie_smoker", "freq" : 30 },
{ "monster" : "mon_zombie_shrieker", "freq" : 30 },
{ "monster" : "mon_zombie_spitter", "freq" : 30 },
{ "monster" : "mon_zombie_electric", "freq" : 180 },
{ "monster" : "mon_zombie_necro", "freq" : 1 },
{ "monster" : "mon_boomer", "freq" : 30 },
{ "monster" : "mon_zombie_brute", "freq" : 10 },
{ "monster" : "mon_zombie_hulk", "freq" : 1 },
{ "monster" : "mon_zombie_master", "freq" : 1 },
{ "monster" : "mon_crow", "freq" : 1 }
{ "monster" : "mon_zombie_cop", "freq" : 20, "multiplier" : 2 },
{ "monster" : "mon_zombie_fast", "freq" : 70, "multiplier" : 2 },
{ "monster" : "mon_zombie_grabber", "freq" : 70, "multiplier" : 1 },
{ "monster" : "mon_skeleton", "freq" : 30, "multiplier" : 2 },
{ "monster" : "mon_zombie_smoker", "freq" : 30, "multiplier" : 5 },
{ "monster" : "mon_zombie_shrieker", "freq" : 30, "multiplier" : 5 },
{ "monster" : "mon_zombie_spitter", "freq" : 30, "multiplier" : 5 },
{ "monster" : "mon_zombie_electric", "freq" : 180, "multiplier" : 5 },
{ "monster" : "mon_zombie_necro", "freq" : 1, "multiplier" : 25 },
{ "monster" : "mon_boomer", "freq" : 30, "multiplier" : 7 },
{ "monster" : "mon_zombie_brute", "freq" : 10, "multiplier" : 15 },
{ "monster" : "mon_zombie_hulk", "freq" : 1, "multiplier" : 50 },
{ "monster" : "mon_zombie_master", "freq" : 1, "multiplier" : 25 },
{ "monster" : "mon_crow", "freq" : 1, "multiplier" : 0 }
]
},
{
"name" : "GROUP_GROCERY", "_comment" : "+15% bommers",
"default" : "mon_zombie",
"monsters" : [
{ "monster" : "mon_zombie_cop", "freq" : 20 },
{ "monster" : "mon_zombie_fast", "freq" : 70 },
{ "monster" : "mon_zombie_grabber", "freq" : 70 },
{ "monster" : "mon_skeleton", "freq" : 30 },
{ "monster" : "mon_zombie_smoker", "freq" : 30 },
{ "monster" : "mon_zombie_shrieker", "freq" : 30 },
{ "monster" : "mon_zombie_spitter", "freq" : 30 },
{ "monster" : "mon_zombie_electric", "freq" : 30 },
{ "monster" : "mon_zombie_necro", "freq" : 1 },
{ "monster" : "mon_boomer", "freq" : 180 },
{ "monster" : "mon_zombie_brute", "freq" : 10 },
{ "monster" : "mon_zombie_hulk", "freq" : 1 },
{ "monster" : "mon_zombie_master", "freq" : 1 },
{ "monster" : "mon_crow", "freq" : 1 }
{ "monster" : "mon_zombie_cop", "freq" : 20, "multiplier" : 2 },
{ "monster" : "mon_zombie_fast", "freq" : 70, "multiplier" : 2 },
{ "monster" : "mon_zombie_grabber", "freq" : 70, "multiplier" : 1 },
{ "monster" : "mon_skeleton", "freq" : 30, "multiplier" : 2 },
{ "monster" : "mon_zombie_smoker", "freq" : 30, "multiplier" : 5 },
{ "monster" : "mon_zombie_shrieker", "freq" : 30, "multiplier" : 5 },
{ "monster" : "mon_zombie_spitter", "freq" : 30, "multiplier" : 5 },
{ "monster" : "mon_zombie_electric", "freq" : 30, "multiplier" : 5 },
{ "monster" : "mon_zombie_necro", "freq" : 1, "multiplier" : 25 },
{ "monster" : "mon_boomer", "freq" : 180, "multiplier" : 7 },
{ "monster" : "mon_zombie_brute", "freq" : 10, "multiplier" : 15 },
{ "monster" : "mon_zombie_hulk", "freq" : 1, "multiplier" : 50 },
{ "monster" : "mon_zombie_master", "freq" : 1, "multiplier" : 25 },
{ "monster" : "mon_crow", "freq" : 1, "multiplier" : 0 }
]
},
{
"name" : "GROUP_MAYBE_MIL", "_comment" : "50% chance military zombie",
"default" : "mon_null",
"monsters" : [
{ "monster" : "mon_zombie_soldier", "freq" : 50 }
{ "monster" : "mon_zombie_soldier", "freq" : 50, "multiplier" : 0 }
]
}
]
]
+1157 -3
View File
File diff suppressed because it is too large Load Diff
+67
View File
@@ -0,0 +1,67 @@
[
{
"ident": "unemployed",
"name": "Unemployed",
"description":
"They say you don't have any 'useful skills', but at least your clothes fit\nwell.",
"points": 0,
"items": ["jeans", "tshirt", "sneakers"]
},
{
"ident": "tailor",
"name": "Tailor",
"description":
"You've made and adjusted clothing for some of the biggest names in town.\nNow, their undead bodies are trying to eat your brains. At least you'll be\nable to keep your own clothing repaired.",
"points": 1,
"items": ["polo_shirt", "blazer", "pants", "dress_shoes", "sewing_kit", "scissors", "manual_tailor"]
},
{
"ident": "labtech",
"name": "Lab Technician",
"description":
"It was your first day in the lab when the cataclysm hit. You were evacuated\nwith all the civilians, but at least you kept your lab gear.",
"points": 1,
"items": ["dress_shirt", "pants", "boots", "coat_lab", "gloves_rubber", "glasses_safety"]
},
{
"ident": "mechanic",
"name": "Wannabe Mechanic",
"description":
"Although you never got your driver's license, you've always loved cars.\nYou start with a wrench, a toolbelt, and some car-related reading material.",
"points": 2,
"items": ["tank_top", "jeans", "boots", "beltrig", "wrench", "mag_cars", "manual_mechanics"]
},
{
"ident": "scoundrel",
"name": "Scoundrel",
"description":
"Your flexible outlook on law has ensured your survival, but now what?\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"],
"skills" : [
{
"name" : "melee",
"level" : 1
}
]
},
{
"ident": "smoker",
"name": "Chain Smoker",
"description":
"Everyone at work knew you as the person who always had a cigarette or two\nin hand. Now, you're down to a single pack, and you hope you find more soon.\nYou start out with a strong nicotine addiction, and 10 cigarettes.",
"points": -1,
"items": ["pants", "dress_shirt", "dress_shoes", "cig"],
"addictions": [
{
"type": "nicotine",
"intensity": 10
}
]
}
]
File diff suppressed because it is too large Load Diff
+54 -32
View File
@@ -1,142 +1,164 @@
[
[
"null",
"null",
"The skill of true Zen."
],
[
"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.",
[]
]
]
+77
View File
@@ -0,0 +1,77 @@
{
"snippets":
[
{
"category": "flier",
"text": "This is an advertisement for the Diet Devil brand Metabolic Exchange CBM. It shows a picture of a tiny obese devil sitting on a woman's shoulder. The woman stares intently at a gigantic wedding cake covered with bacon and candybars. The caption reads: \"Burn calories! Burn!\""
},
{
"category": "flier",
"text": "This is an advertisement for the Diet Devil brand Internal Furnace CBM. It shows a picture of a tiny obese devil sitting on a man's shoulder. The man is about to bite into a frosting-covered baby. The caption reads: \"Eat What You Want! How You Want! Who You Want!\""
},
{
"category": "flier",
"text": "This is an advertisement for the Diet Devil brand Ethanol Burner CBM. It shows a picture of a teenaged boy driving a car while chugging a bottle of whiskey. A tiny obese devil sits on his shoulder and drinks a martini. The caption reads: \"Drink like there's no tomorrow!\""
},
{
"category": "flier",
"text": "This is an advertisement for the Twenty8 brand Diamond Cornea CBM. It shows a picture of the cyber-module being clutched by an eagle in flight. The captions read: \"Get the new Model 28.bx Eagle-Eye!\" and \"Twenty8. See what you've been missing.\""
},
{
"category": "flier",
"text": "This is an advertisement for the Twenty8 brand Night Vision CBM. It shows a picture of an owl swooping down on a the cyber-module. The captions read: \"Get the new Model 28.hx Night-Owl!\" and \"Twenty8. See what you've been missing.\""
},
{
"category": "flier",
"text": "This is an advertisement for the Twenty8 brand Diamond Cornea CBM. It shows a picture of a flying hawk carrying the cyber-module in its beak. The captions read: \"Get the new Model 28.xx Hawk-Eye!\" and \"Twenty8. See what you've been missing.\""
},
{
"category": "flier",
"text": "This is an advertisement for the Twenty8 brand Scent Vision CBM. It shows a picture of a vulture perched on a pile of skulls and cyber-modules. The captions read: \"Get the new Model 28.vx Vulture today!\" and \"Twenty8. See what you've been missing.\""
},
{
"category": "flier",
"text": "This is an ad for a Twenty8 brand Infrared Vision CBM. It shows a picture of a robotic phoenix covered in flames. The captions read: \"Get the new Model 28.tx Phoenix today!\" and \"Twenty8. See what you've been missing.\""
},
{
"category": "flier",
"text": "This is an advertisement for DoubleTech brand law enforcement robots. It shows a picture of copbot and an eyebot boldly emerging from a cloud of teargas and flame. The caption reads: \"DoubleTech Industries. Built to Protect. Programmed to Serve.\""
},
{
"category": "flier",
"text": "This is an advertisement for DoubleTech brand law enforcement robots. It shows a picture of an eyebot flying alongside a bald eagle and a Stealth bomber painted as an American flag. The caption reads: \"Built to Protect. Programmed to Serve.\""
},
{
"category": "flier",
"text": "This is an advertisement for DoubleTech brand law enforcement robots. It shows a picture of a dozen eyebots floating over a woman as she jogs through a park. The captions read: \"Built to Protect. Programmed to Serve.\""
},
{
"category": "flier",
"text": "This is an advertisement for DoubleTech brand law enforcement robots. It shows a picture of copbot pepper-spraying a handcuffed rioter. In the background a troop of boy scouts salutes the robot. The caption reads: \"Built to Protect. Programmed to Serve.\""
},
{
"category": "flier",
"text": "This is an advertisement for Robert's Universal Robotics brand law enforcement robots. It shows a picture of tripod robot incinerating a mob of looters and stepping over charred and smoking corpses. The caption reads: \"Built to Protect. Programmed to Serve.\""
},
{
"category": "flier",
"text": "This is an advertisement for Robert's Universal Robots brand labor-bots. It shows a picture of a robot carrying a heavy pallet of bricks. In the background a human foreman is sleeping on the job, with his hardhat pulled down over his eyes. The captions read: \"It's a tough job, so why should you have to do it?\" and \"R.U.R. Technology you can Trust.\""
},
{
"category": "flier",
"text": "This is an advertisement for Robert's Universal Robots brand labor-bots. It shows a picture of a factory floor run entirely by robots. In the background a man in a suit reads a newspaper that shows soaring stock prices. The caption reads: \"R.U.R. Technology you can Trust.\""
},
{
"category": "flier",
"text": "This is an advertisement for Sybil's Cyber Boutique. It shows a picture of several bikini-clad female doctors removing the skin from man's face. The patient is strapped to a chair but cheerfully gives two thumbs up. The caption reads: \"Free Plastic Surgery While You Wait!\""
},
{
"category": "flier",
"text": "This is an advertisement for Sybil's Cyber Boutique. It shows a picture of a nerdy looking man surrounded by a group of admiring women. In the foreground a blood-drenched doctor gives an exaggerated wink and a two thumbs up. The caption reads: \"Holiday sales! Get the package deals!\""
},
{
"category": "flier",
"text": "This is an advertisement for Sybil's Cyber Boutique. It shows a picture of a man flexing shiny cybernetic arms in front of a mirror. He is flanked by two scantily clad nurses who hold bloody chainsaws and give approving thumbs up. In the background feral dogs gnaw on the man's discarded former limbs. The caption reads: \"Spring Cleaning Sale! 20% off!\""
}
]
}
+64 -59
View File
@@ -4,6 +4,7 @@
#include "keypress.h"
#include "itype.h"
#include "mtype.h"
#include "overmapbuffer.h"
#include <string>
#include <vector>
#include <sstream>
@@ -80,7 +81,7 @@ bool defense_game::init(game *g)
g->u.cash = initial_cash;
popup_nowait("Please wait as the map generates [ 0%]");
// TODO: support multiple defence games? clean up old defence game
g->cur_om = overmap(g, 0, 0);
g->cur_om = &overmap_buffer.get(g, 0, 0);
init_map(g);
caravan(g);
return true;
@@ -157,10 +158,10 @@ void defense_game::game_over(game *g)
void defense_game::init_itypes(game *g)
{
g->itypes[itm_2x4]->volume = 0;
g->itypes[itm_2x4]->weight = 0;
g->itypes[itm_landmine]->price = 300;
g->itypes[itm_bot_turret]->price = 6000;
g->itypes["2x4"]->volume = 0;
g->itypes["2x4"]->weight = 0;
g->itypes["landmine"]->price = 300;
g->itypes["bot_turret"]->price = 6000;
}
void defense_game::init_mtypes(game *g)
@@ -186,21 +187,25 @@ void defense_game::init_constructions(game *g)
void defense_game::init_recipes(game *g)
{
for (int i = 0; i < g->recipes.size(); i++) {
g->recipes[i]->time /= 10; // Things take turns, not minutes
}
for (recipe_map::iterator map_iter = g->recipes.begin(); map_iter != g->recipes.end(); ++map_iter)
{
for (recipe_list::iterator list_iter = map_iter->second.begin(); list_iter != map_iter->second.end(); ++list_iter)
{
(*list_iter)->time /= 10; // Things take turns, not minutes
}
}
}
void defense_game::init_map(game *g)
{
for (int x = 0; x < OMAPX; x++) {
for (int y = 0; y < OMAPY; y++) {
g->cur_om.ter(x, y, 0) = ot_field;
g->cur_om.seen(x, y, 0) = true;
g->cur_om->ter(x, y, 0) = ot_field;
g->cur_om->seen(x, y, 0) = true;
}
}
g->cur_om.save();
g->cur_om->save();
g->levx = 100;
g->levy = 100;
g->levz = 0;
@@ -212,29 +217,29 @@ void defense_game::init_map(game *g)
case DEFLOC_HOSPITAL:
for (int x = 49; x <= 51; x++) {
for (int y = 49; y <= 51; y++)
g->cur_om.ter(x, y, 0) = ot_hospital;
g->cur_om->ter(x, y, 0) = ot_hospital;
}
g->cur_om.ter(50, 49, 0) = ot_hospital_entrance;
g->cur_om->ter(50, 49, 0) = ot_hospital_entrance;
break;
case DEFLOC_MALL:
for (int x = 49; x <= 51; x++) {
for (int y = 49; y <= 51; y++)
g->cur_om.ter(x, y, 0) = ot_megastore;
g->cur_om->ter(x, y, 0) = ot_megastore;
}
g->cur_om.ter(50, 49, 0) = ot_megastore_entrance;
g->cur_om->ter(50, 49, 0) = ot_megastore_entrance;
break;
case DEFLOC_BAR:
g->cur_om.ter(50, 50, 0) = ot_bar_north;
g->cur_om->ter(50, 50, 0) = ot_bar_north;
break;
case DEFLOC_MANSION:
for (int x = 49; x <= 51; x++) {
for (int y = 49; y <= 51; y++)
g->cur_om.ter(x, y, 0) = ot_mansion;
g->cur_om->ter(x, y, 0) = ot_mansion;
}
g->cur_om.ter(50, 49, 0) = ot_mansion_entrance;
g->cur_om->ter(50, 49, 0) = ot_mansion_entrance;
break;
}
// Init the map
@@ -253,10 +258,10 @@ void defense_game::init_map(game *g)
mx -= mx % 2;
my -= my % 2;
tinymap tm(&g->itypes, &g->mapitems, &g->traps);
tm.generate(g, &(g->cur_om), mx, my, 0, int(g->turn));
tm.generate(g, g->cur_om, mx, my, 0, int(g->turn));
tm.clear_spawns();
tm.clear_traps();
tm.save(&g->cur_om, int(g->turn), mx, my, 0);
tm.save(g->cur_om, int(g->turn), mx, my, 0);
}
}
@@ -268,7 +273,7 @@ void defense_game::init_map(game *g)
std::vector<point> valid;
for (int x = g->u.posx - 1; x <= g->u.posx + 1; x++) {
for (int y = g->u.posy - 1; y <= g->u.posy + 1; y++) {
if (generator.can_move_to(g->m, x, y) && g->is_empty(x, y))
if (generator.can_move_to(g, x, y) && g->is_empty(x, y))
valid.push_back( point(x, y) );
}
}
@@ -713,7 +718,7 @@ std::string defense_style_name(defense_style style)
case DEFENSE_TRIFFIDS: return "Day of the Triffids";
case DEFENSE_SKYNET: return "Skynet";
case DEFENSE_LOVECRAFT: return "The Call of Cthulhu";
default: return "Bug! Report this!";
default: return "Bug! (bug in defense.cpp:defense_style_name)";
}
}
@@ -742,19 +747,19 @@ std::string defense_style_description(defense_style style)
case DEFENSE_LOVECRAFT:
return "Ward off legions of eldritch horrors.";
default:
return "What the heck is this I don't even know. A bug!";
return "What the heck is this I don't even know. (defense.cpp:defense_style_description)";
}
}
std::string defense_location_name(defense_location location)
{
switch (location) {
case DEFLOC_NULL: return "Nowhere?! A bug!";
case DEFLOC_NULL: return "Nowhere?! (bug in defense.cpp:defense_location_name)";
case DEFLOC_HOSPITAL: return "Hospital";
case DEFLOC_MALL: return "Megastore";
case DEFLOC_BAR: return "Bar";
case DEFLOC_MANSION: return "Mansion";
default: return "a ghost's house (bug)";
default: return "a ghost's house (bug in defense.cpp:defense_location_name)";
}
}
@@ -762,7 +767,7 @@ std::string defense_location_description(defense_location location)
{
switch (location) {
case DEFLOC_NULL:
return "NULL Bug.";
return "NULL Bug. (defense.cpp:defense_location_description)";
case DEFLOC_HOSPITAL:
return "One entrance and many rooms. Some medical supplies.";
case DEFLOC_MALL:
@@ -772,7 +777,7 @@ std::string defense_location_description(defense_location location)
case DEFLOC_MANSION:
return "A large house with many rooms and.";
default:
return "Unknown data bug.";
return "Unknown data bug. (defense.cpp:defense_location_description)";
}
}
@@ -997,7 +1002,7 @@ Press Enter to buy everything in your cart, Esc to buy nothing.");
for (int j = 0; j < item_count[0][i]; j++) {
if (g->u.volume_carried() + tmp.volume() <= g->u.volume_capacity() &&
g->u.weight_carried() + tmp.weight() <= g->u.weight_capacity() &&
g->u.inv.size() < 52)
g->u.inv.size() < inv_chars.size())
g->u.i_add(tmp);
else { // Could fit it in the inventory!
dropped_some = true;
@@ -1021,7 +1026,7 @@ std::string caravan_category_name(caravan_category cat)
case CARAVAN_CLOTHES: return "Clothing & Armor";
case CARAVAN_TOOLS: return "Tools, Traps & Grenades";
}
return "BUG";
return "BUG (defense.cpp:caravan_category_name)";
}
std::vector<itype_id> caravan_items(caravan_category cat)
@@ -1032,51 +1037,51 @@ std::vector<itype_id> caravan_items(caravan_category cat)
return ret;
case CARAVAN_MELEE:
setvector(ret,
itm_hammer, itm_bat, itm_mace, itm_morningstar, itm_hammer_sledge, itm_hatchet,
itm_knife_combat, itm_rapier, itm_machete, itm_katana, itm_spear_knife,
itm_pike, itm_chainsaw_off, NULL);
setvector(&ret,
"hammer", "bat", "mace", "morningstar", "hammer_sledge", "hatchet",
"knife_combat", "rapier", "machete", "katana", "spear_knife",
"pike", "chainsaw_off", NULL);
break;
case CARAVAN_GUNS:
setvector(ret,
itm_crossbow, itm_bolt_steel, itm_compbow, itm_arrow_cf, itm_marlin_9a,
itm_22_lr, itm_hk_mp5, itm_9mm, itm_taurus_38, itm_38_special, itm_deagle_44,
itm_44magnum, itm_m1911, itm_hk_ump45, itm_45_acp, itm_fn_p90, itm_57mm,
itm_remington_870, itm_shot_00, itm_shot_slug, itm_browning_blr, itm_3006,
itm_ak47, itm_762_m87, itm_m4a1, itm_556, itm_savage_111f, itm_hk_g3,
itm_762_51, itm_hk_g80, itm_12mm, itm_plasma_rifle, itm_plasma, NULL);
setvector(&ret,
"crossbow", "bolt_steel", "compbow", "arrow_cf", "marlin_9a",
"22_lr", "hk_mp5", "9mm", "taurus_38", "38_special", "deagle_44",
"44magnum", "m1911", "hk_ump45", "45_acp", "fn_p90", "57mm",
"remington_870", "shot_00", "shot_slug", "browning_blr", "3006",
"ak47", "762_m87", "m4a1", "556", "savage_111f", "hk_g3",
"762_51", "hk_g80", "12mm", "plasma_rifle", "plasma", NULL);
break;
case CARAVAN_COMPONENTS:
setvector(ret,
itm_rag, itm_fur, itm_leather, itm_superglue, itm_string_36, itm_chain,
itm_processor, itm_RAM, itm_power_supply, itm_motor, itm_hose, itm_pot,
itm_2x4, itm_battery, itm_nail, itm_gasoline, NULL);
setvector(&ret,
"rag", "fur", "leather", "superglue", "string_36", "chain",
"processor", "RAM", "power_supply", "motor", "hose", "pot",
"2x4", "battery", "nail", "gasoline", NULL);
break;
case CARAVAN_FOOD:
setvector(ret,
itm_1st_aid, itm_water, itm_energy_drink, itm_whiskey, itm_can_beans,
itm_mre_beef, itm_flour, itm_inhaler, itm_codeine, itm_oxycodone, itm_adderall,
itm_cig, itm_meth, itm_royal_jelly, itm_mutagen, itm_purifier, NULL);
setvector(&ret,
"1st_aid", "water", "energy_drink", "whiskey", "can_beans",
"mre_beef", "flour", "inhaler", "codeine", "oxycodone", "adderall",
"cig", "meth", "royal_jelly", "mutagen", "purifier", NULL);
break;
case CARAVAN_CLOTHES:
setvector(ret,
itm_backpack, itm_vest, itm_trenchcoat, itm_jacket_leather, itm_kevlar,
itm_gloves_fingerless, itm_mask_filter, itm_mask_gas, itm_glasses_eye,
itm_glasses_safety, itm_goggles_ski, itm_goggles_nv, itm_helmet_ball,
itm_helmet_riot, NULL);
setvector(&ret,
"backpack", "vest", "trenchcoat", "jacket_leather", "kevlar",
"gloves_fingerless", "mask_filter", "mask_gas", "glasses_eye",
"glasses_safety", "goggles_ski", "goggles_nv", "helmet_ball",
"helmet_riot", NULL);
break;
case CARAVAN_TOOLS:
setvector(ret,
itm_screwdriver, itm_wrench, itm_saw, itm_hacksaw, itm_lighter, itm_sewing_kit,
itm_scissors, itm_extinguisher, itm_flashlight, itm_hotplate,
itm_soldering_iron, itm_shovel, itm_jackhammer, itm_landmine, itm_teleporter,
itm_grenade, itm_flashbang, itm_EMPbomb, itm_smokebomb, itm_bot_manhack,
itm_bot_turret, itm_UPS_off, itm_mininuke, NULL);
setvector(&ret,
"screwdriver", "wrench", "saw", "hacksaw", "lighter", "sewing_kit",
"scissors", "extinguisher", "flashlight", "hotplate",
"soldering_iron", "shovel", "jackhammer", "landmine", "teleporter",
"grenade", "flashbang", "EMPbomb", "smokebomb", "bot_manhack",
"bot_turret", "UPS_off", "mininuke", NULL);
break;
}
+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;
+243 -142
View File
@@ -3,6 +3,7 @@
#include "bodypart.h"
#include "disease.h"
#include "weather.h"
#include <stdlib.h>
#include <sstream>
void dis_msg(game *g, dis_type type)
@@ -29,6 +30,11 @@ void dis_msg(game *g, dis_type type)
case DI_TEARGAS:
g->add_msg("You inhale a lungful of tear gas.");
break;
case DI_CRUSHED:
g->add_msg("The ceiling collapses on you!");
break;
case DI_BOULDERING:
g->add_msg("You are slowed by the rubble.");
case DI_BOOMERED:
g->add_msg("You're covered in bile!");
break;
@@ -74,11 +80,12 @@ void dis_msg(game *g, dis_type type)
g->add_msg("You're knocked to the floor!");
break;
case DI_AMIGARA:
g->add_msg("You can't look away from the fautline...");
g->add_msg("You can't look away from the faultline...");
break;
case DI_STEMCELL_TREATMENT:
g->add_msg("You receive a pureed bone & enamel injection into your eyeball.");
g->add_msg("It is excruciating.");
break;
case DI_BITE:
g->add_msg("The bite wound feels really deep...");
break;
@@ -99,7 +106,6 @@ void dis_msg(game *g, dis_type type)
void dis_effect(game *g, player &p, disease &dis)
{
int bonus;
int junk;
switch (dis.type) {
case DI_GLARE:
p.per_cur -= 1;
@@ -111,47 +117,49 @@ void dis_effect(game *g, player &p, disease &dis)
case DI_COLD_HEAD:
switch (dis.intensity) {
case 3 : p.int_cur -= 3; if (!p.has_disease(DI_SLEEP) && one_in(200)) g->add_msg("Your thoughts are unclear.");
case 3 : p.int_cur -= 3; if (!p.has_disease(DI_SLEEP) && one_in(400)) g->add_msg("Your thoughts are unclear.");
case 2 : p.int_cur--;
case 1 : if (!p.has_disease(DI_SLEEP) && one_in(600)) g->add_msg("\"Brr.\"");
}
break;
case DI_COLD_MOUTH:
switch (dis.intensity) {
case 3 : p.per_cur -= 3; if (!p.has_disease(DI_SLEEP) && one_in(400)) g->add_msg("Your face is stiff from the cold.");
case 2 : p.per_cur--;
}
break;
case DI_COLD_TORSO:
switch (dis.intensity) {
case 3 : p.dex_cur -= 2; if (!p.has_disease(DI_SLEEP) && one_in(200)) g->add_msg("Your torso is burning up. You should remove some layers.");
case 3 : p.dex_cur -= 2; if (!p.has_disease(DI_SLEEP) && one_in(400)) g->add_msg("Your torso is burning up. You should remove some layers.");
// Speed -20
case 2 : p.dex_cur -= 1;
// Speed -5
case 1 : p.dex_cur -= 1; if (!p.has_disease(DI_SLEEP) && one_in(600)) g->add_msg("\"Brr.\"");
// Speed -2
// case1 : Speed -2
}
break;
case DI_COLD_ARMS:
switch (dis.intensity) {
case 3 : p.dex_cur -= 2;
case 2 : p.dex_cur--;
case 1 : if (!p.has_disease(DI_SLEEP) && one_in(600)) g->add_msg("Your arms are shivering.");
case 2 : p.dex_cur--; if (!p.has_disease(DI_SLEEP) && one_in(800)) g->add_msg("Your arms are shivering.");
}
break;
case DI_COLD_HANDS:
switch (dis.intensity) {
case 3 : p.dex_cur -= 2;
case 2 : p.dex_cur -= 2;
case 1 : if (!p.has_disease(DI_SLEEP) && one_in(600)) g->add_msg("\"Brr.\"");
case 2 : p.dex_cur -= 2; if (!p.has_disease(DI_SLEEP) && one_in(800)) g->add_msg("Your hands are shivering.");
}
break;
case DI_COLD_LEGS:
switch (dis.intensity) {
case 3 : p.str_cur--; if (!p.has_disease(DI_SLEEP) && one_in(200)) g->add_msg("Your legs are seizing from the incredible cold.");
case 3 : p.str_cur--; if (!p.has_disease(DI_SLEEP) && one_in(400)) g->add_msg("Your legs are seizing from the incredible cold.");
// Speed -20
case 2 : p.str_cur--;
// Speed -5
case 1 : if (!p.has_disease(DI_SLEEP) && one_in(600)) g->add_msg("Your legs feel sluggish from the cold.");
// Speed -2
// case 1 : Speed -2
}
break;
@@ -159,7 +167,6 @@ void dis_effect(game *g, player &p, disease &dis)
switch (dis.intensity) {
case 3 : p.str_cur--;
case 2 : p.str_cur--;
case 1 : if (!p.has_disease(DI_SLEEP) && one_in(600)) g->add_msg("\"Brr.\"");
}
break;
@@ -167,8 +174,8 @@ void dis_effect(game *g, player &p, disease &dis)
switch (dis.intensity) {
case 2 : p.dex_cur -= 3;
case 1 :
if (p.temp_cur[bp_mouth] > BODYTEMP_COLD && p.pain < 40) p.pain++;
if (!p.has_disease(DI_SLEEP) && one_in(200)) g->add_msg("Your hands feel numb.");
if (p.temp_cur[bp_hands] > BODYTEMP_COLD && p.pain < 40) p.pain++;
if (!p.has_disease(DI_SLEEP) && one_in(400)) g->add_msg("Your hands feel numb.");
}
break;
@@ -176,8 +183,8 @@ void dis_effect(game *g, player &p, disease &dis)
switch (dis.intensity) {
case 2 : // -4 speed
case 1 :
if (p.temp_cur[bp_mouth] > BODYTEMP_COLD && p.pain < 40) p.pain++;
if (!p.has_disease(DI_SLEEP) && one_in(200)) g->add_msg("Your feet feel numb.");
if (p.temp_cur[bp_feet] > BODYTEMP_COLD && p.pain < 40) p.pain++;
if (!p.has_disease(DI_SLEEP) && one_in(400)) g->add_msg("Your feet feel numb.");
}
break;
@@ -186,72 +193,79 @@ void dis_effect(game *g, player &p, disease &dis)
case 2 : p.per_cur -= 3;
case 1 :
if (p.temp_cur[bp_mouth] > BODYTEMP_COLD && p.pain < 40) p.pain++;
if (!p.has_disease(DI_SLEEP) && one_in(200)) g->add_msg("Your face feels numb.");
if (!p.has_disease(DI_SLEEP) && one_in(400)) g->add_msg("Your face feels numb.");
}
break;
case DI_BLISTERS_HANDS:
p.dex_cur--;
if (p.pain < 35) p.pain++;
if (one_in(2)) p.hp_max[hp_arm_r]--;
else p.hp_max[hp_arm_l]--;
if (one_in(2)) p.hp_cur[hp_arm_r]--;
else p.hp_cur[hp_arm_l]--;
break;
case DI_BLISTERS_FEET:
p.str_cur--;
if (p.pain < 35) p.pain++;
if (one_in(2)) p.hp_max[hp_leg_r]--;
else p.hp_max[hp_leg_l]--;
if (one_in(2)) p.hp_cur[hp_leg_r]--;
else p.hp_cur[hp_leg_l]--;
break;
case DI_BLISTERS_MOUTH:
p.per_cur--;
p.hp_max[hp_head]--;
p.hp_cur[hp_head]--;
if (p.pain < 35) p.pain++;
break;
case DI_HOT_HEAD:
switch (dis.intensity) {
case 3 :
p.thirst--;
if (p.pain < 50) p.pain++;
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 (one_in(15000 - p.temp_cur[bp_head])) p.vomit(g); // Hallucinations handled in game.cpp
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++;
if (!p.has_disease(DI_SLEEP) && one_in(400)) g->add_msg("The heat is making you see things.");
// Speed -5
case 1 :
if (!p.has_disease(DI_SLEEP) && one_in(600)) g->add_msg("\"Phew, it's hot.\"");
// Speed -2
// case 1 : Speed -2
}
break;
case DI_HOT_MOUTH:
switch (dis.intensity) {
case 3 : if (int(g->turn) % 150 == 0) p.thirst++;
if (p.pain < 30) p.pain++;
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(200)) g->add_msg("You are sweating profusely.");
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 :
if (!p.has_disease(DI_SLEEP) && one_in(600)) g->add_msg("\"Phew, it's hot.\"");
// Speed -2
// case 1 : Speed -2
}
break;
case DI_HOT_ARMS:
switch (dis.intensity) {
case 3 : p.thirst--;
if (p.pain < 50) p.pain++;
case 2 : p.thirst--;
case 1 : if (!p.has_disease(DI_SLEEP) && one_in(600)) g->add_msg("\"Phew, it's hot.\"");
case 3 :
if (int(g->turn) % 150 == 0) p.thirst++;
if (p.pain < 30) p.pain++;
case 2 : if (int(g->turn) % 300 == 0) p.thirst++;
}
break;
@@ -259,27 +273,24 @@ void dis_effect(game *g, player &p, disease &dis)
switch (dis.intensity) {
case 3 : p.dex_cur--;
case 2 : p.dex_cur--;
case 1 : if (!p.has_disease(DI_SLEEP) && one_in(600)) g->add_msg("\"Phew, it's hot.\"");
}
break;
case DI_HOT_LEGS:
switch (dis.intensity) {
case 3 : p.thirst--;
if (p.pain < 50) p.pain++;
if (one_in(200)) g->add_msg("Your legs are cramping up.");
case 2 : p.thirst--;
case 1 : if (!p.has_disease(DI_SLEEP) && one_in(600)) g->add_msg("\"Phew, it's hot.\"");
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 : if (int(g->turn) % 300 == 0) p.thirst++;
}
break;
case DI_HOT_FEET:
switch (dis.intensity) {
case 3 : if (p.pain < 50) p.pain++;
case 2 :
case 3 :
if (p.pain < 30) p.pain++;
if (!p.has_disease(DI_SLEEP) && one_in(200)) g->add_msg("Your feet are swelling in the heat.");
case 1 : if (!p.has_disease(DI_SLEEP) && one_in(600)) g->add_msg("\"Phew, it's hot.\"");
if (!p.has_disease(DI_SLEEP) && one_in(400)) g->add_msg("Your feet are swelling in the heat.");
}
break;
@@ -364,23 +375,51 @@ 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--;
}
}
break;
case DI_CRUSHED:
p.hurtall(10);
//This could be developed on later, for instance
//to deal different damage amounts to different body parts and
//to account for helmets and other armor
break;
case DI_BOULDERING:
switch(g->u.disease_intensity(DI_BOULDERING)){
case 1:
p.dex_cur -= 1;
break;
case 2:
p.dex_cur -= 3;
break;
case 3:
p.dex_cur -= 5;
break;
default:
debugmsg("Something went wrong with DI_BOULDERING.");
debugmsg("Check disease.cpp");
}
if (p.dex_cur < 1) {
p.dex_cur = 1;
}
case DI_BOOMERED:
p.per_cur -= 5;
break;
@@ -430,7 +469,7 @@ void dis_effect(game *g, player &p, disease &dis)
one_in(2000 + bonus * 10)) {
if (!p.is_npc())
g->add_msg("You vomit a thick, gray goop.");
else if (g->u_see(p.posx, p.posy, junk))
else if (g->u_see(p.posx, p.posy))
g->add_msg("%s vomits a thick, gray goop.", p.name.c_str());
p.moves = -200;
p.hunger += 50;
@@ -440,7 +479,7 @@ void dis_effect(game *g, player &p, disease &dis)
if (one_in(1000 + bonus * 8)) {
if (!p.is_npc())
g->add_msg("You double over, spewing live spores from your mouth!");
else if (g->u_see(p.posx, p.posy, junk))
else if (g->u_see(p.posx, p.posy))
g->add_msg("%s coughs up a stream of live spores!", p.name.c_str());
p.moves = -500;
int sporex, sporey;
@@ -451,7 +490,7 @@ void dis_effect(game *g, player &p, disease &dis)
sporey = p.posy + j;
if (g->m.move_cost(sporex, sporey) > 0 && one_in(5)) {
if (g->mon_at(sporex, sporey) >= 0) { // Spores hit a monster
if (g->u_see(sporex, sporey, junk))
if (g->u_see(sporex, sporey))
g->add_msg("The %s is covered in tiny spores!",
g->z[g->mon_at(sporex, sporey)].name().c_str());
if (!g->z[g->mon_at(sporex, sporey)].make_fungus(g))
@@ -466,7 +505,7 @@ void dis_effect(game *g, player &p, disease &dis)
} else if (one_in(6000 + bonus * 20)) {
if (!p.is_npc())
g->add_msg("Fungus stalks burst through your hands!");
else if (g->u_see(p.posx, p.posy, junk))
else if (g->u_see(p.posx, p.posy))
g->add_msg("Fungus stalks burst through %s's hands!", p.name.c_str());
p.hurt(g, bp_arms, 0, 60);
p.hurt(g, bp_arms, 1, 60);
@@ -491,41 +530,67 @@ void dis_effect(game *g, player &p, disease &dis)
g->add_msg("You try to sleep, but can't...");
break;
case DI_SLEEP:
p.moves = 0;
if (int(g->turn) % 25 == 0) {
if (p.fatigue > 0)
p.fatigue -= 1 + rng(0, 1) * rng(0, 1);
if (p.has_trait(PF_FASTHEALER))
p.healall(rng(0, 1));
else
p.healall(rng(0, 1) * rng(0, 1) * rng(0, 1));
if (p.fatigue <= 0 && p.fatigue > -20) {
p.fatigue = -25;
g->add_msg("Fully rested.");
dis.duration = dice(3, 100);
}
}
if (int(g->turn) % 100 == 0 && !p.has_bionic(bio_recycler)) {
// Hunger and thirst advance more slowly while we sleep.
p.hunger--;
p.thirst--;
}
if (rng(5, 80) + rng(0, 120) + rng(0, abs(p.fatigue)) +
rng(0, abs(p.fatigue * 5)) < g->light_level() &&
(p.fatigue < 10 || one_in(p.fatigue / 2))) {
g->add_msg("The light wakes you up.");
dis.duration = 1;
}
// Cold may wake you up.
// Player gets desperate for sleep
if (p.temp_cur[bp_torso] < BODYTEMP_VERY_COLD - p.fatigue/2 ||
(one_in(p.temp_cur[bp_torso]) && p.temp_cur[bp_torso] < BODYTEMP_NORM - p.fatigue/2)){
g->add_msg("The cold wakes you up.");
dis.duration = 1;
}
case DI_SLEEP:
p.moves = 0;
break;
if (int(g->turn) % 25 == 0) {
if (p.fatigue > 0)
p.fatigue -= 1 + rng(0, 1) * rng(0, 1);
if (p.has_trait(PF_FASTHEALER)) {
p.healall(rng(0, 1));
} else if (p.has_trait(PF_FASTHEALER2)) {
p.healall(rng(0, 2));
} else if (p.has_trait(PF_REGEN)) {
p.healall(rng(1, 2));
} else {
p.healall(rng(0, 1) * rng(0, 1) * rng(0, 1));
}
if (p.fatigue <= 0 && p.fatigue > -20) {
p.fatigue = -25;
g->add_msg("Fully rested.");
dis.duration = dice(3, 100);
}
}
if (int(g->turn) % 100 == 0 && !p.has_bionic("bio_recycler")) {
// Hunger and thirst advance more slowly while we sleep.
p.hunger--;
p.thirst--;
}
if (rng(5, 80) + rng(0, 120) + rng(0, abs(p.fatigue)) +
rng(0, abs(p.fatigue * 5)) < g->light_level() &&
(p.fatigue < 10 || one_in(p.fatigue / 2))) {
g->add_msg("The light wakes you up.");
dis.duration = 1;
}
// Cold or heat may wake you up.
// Player will sleep through cold or heat if fatigued enough
for (int i = 0 ; i < num_bp ; i++)
{
if (p.temp_cur[i] < BODYTEMP_VERY_COLD - p.fatigue/2)
{
if (one_in(5000)) { g->add_msg("You toss and turn trying to keep warm."); }
if (p.temp_cur[i] < BODYTEMP_FREEZING - p.fatigue/2 || (one_in(p.temp_cur[i] + 5000)))
{
g->add_msg("The cold wakes you up.");
dis.duration = 1;
}
}
else if (p.temp_cur[i] > BODYTEMP_VERY_HOT + p.fatigue/2)
{
if (one_in(5000)) { g->add_msg("You toss and turn in the heat."); }
if (p.temp_cur[i] > BODYTEMP_SCORCHING + p.fatigue/2 || (one_in(15000 - p.temp_cur[i])))
{
g->add_msg("The heat wakes you up.");
dis.duration = 1;
}
}
}
break;
case DI_STEMCELL_TREATMENT:
//slightly repair broken limbs. (also nonbroken limbs (unless they're too healthy))
@@ -710,11 +775,10 @@ void dis_effect(game *g, player &p, disease &dis)
}
}
if (valid_spawns.size() >= 1) {
int t;
p.rem_disease(DI_DERMATIK); // No more infection! yay.
if (!p.is_npc())
g->add_msg("Insects erupt from your skin!");
else if (g->u_see(p.posx, p.posy, t))
else if (g->u_see(p.posx, p.posy))
g->add_msg("Insects erupt from %s's skin!", p.name.c_str());
p.moves -= 600;
monster grub(g->mtypes[mon_dermatik_larva]);
@@ -763,11 +827,10 @@ void dis_effect(game *g, player &p, disease &dis)
p.int_cur -= 2;
p.str_cur -= 1;
if (one_in(10 + 40 * p.int_cur)) {
int t;
if (!p.is_npc()) {
g->add_msg("You start scratching yourself all over!");
g->cancel_activity();
} else if (g->u_see(p.posx, p.posy, t))
} else if (g->u_see(p.posx, p.posy))
g->add_msg("%s starts scratching %s all over!", p.name.c_str(),
(p.male ? "himself" : "herself"));
p.moves -= 150;
@@ -901,10 +964,10 @@ void dis_effect(game *g, player &p, disease &dis)
tries < 10);
if (tries < 10) {
if (g->m.move_cost(x, y) == 0)
g->m.ter(x, y) = t_rubble;
g->m.ter_set(x, y, t_rubble);
beast.spawn(x, y);
g->z.push_back(beast);
if (g->u_see(x, y, junk)) {
if (g->u_see(x, y)) {
g->cancel_activity_query("A monster appears nearby!");
g->add_msg("A portal opens nearby, and a monster crawls through!");
}
@@ -954,7 +1017,7 @@ void dis_effect(game *g, player &p, disease &dis)
one_in(250)) {
mon_id type = MonsterGroupManager::GetMonsterFromGroup("GROUP_NETHER", &g->mtypes);
monster beast(g->mtypes[type]);
int x, y, tries = 0, junk;
int x, y, tries = 0;
do {
x = p.posx + rng(-4, 4);
y = p.posy + rng(-4, 4);
@@ -963,10 +1026,10 @@ void dis_effect(game *g, player &p, disease &dis)
tries < 10);
if (tries < 10) {
if (g->m.move_cost(x, y) == 0)
g->m.ter(x, y) = t_rubble;
g->m.ter_set(x, y, t_rubble);
beast.spawn(x, y);
g->z.push_back(beast);
if (g->u_see(x, y, junk)) {
if (g->u_see(x, y)) {
g->cancel_activity_query("A monster appears nearby!");
g->add_msg("A portal opens nearby, and a monster crawls through!");
}
@@ -991,8 +1054,8 @@ void dis_effect(game *g, player &p, disease &dis)
for (int i = 0; !lesser && i < p.worn.size(); i++) {
if (p.worn[i].is_artifact()) {
it_artifact_armor *armor = dynamic_cast<it_artifact_armor*>(p.worn[i].type);
for (int i = 0; i < armor->effects_worn.size(); i++) {
if (armor->effects_worn[i] == AEP_EVIL)
for (int j = 0; j < armor->effects_worn.size(); j++) {
if (armor->effects_worn[j] == AEP_EVIL)
lesser = true;
}
}
@@ -1089,16 +1152,20 @@ void dis_effect(game *g, player &p, disease &dis)
} else if (dis.duration > 3600) { //Infection Symptoms 18 hours into infection
if (one_in(100)) {
if (!p.is_npc())
if (p.has_disease(DI_SLEEP)) {
p.rem_disease(DI_SLEEP);
g->add_msg("You wake up.");
g->add_msg("You feel terribly weak, standing up is nearly impossible.");
} else
g->add_msg("You can barely remain standing.");
p.vomit(g);
if(p.pain < 100)
p.pain++;
if (!p.is_npc()) {
if (p.has_disease(DI_SLEEP)) {
p.rem_disease(DI_SLEEP);
g->add_msg("You wake up.");
g->add_msg("You feel terribly weak, standing up is nearly impossible.");
} else {
g->add_msg("You can barely remain standing.");
}
}
p.vomit(g);
if(p.pain < 100)
{
p.pain++;
}
}
p.str_cur-= 2;
p.dex_cur-= 2;
@@ -1161,6 +1228,7 @@ int disease_speed_boost(disease dis)
case DI_ASTHMA: return 0 - int(dis.duration / 5);
case DI_GRACK: return +20000;
case DI_METH: return (dis.duration > 600 ? 50 : -40);
case DI_BOULDERING: return ( 0 - (dis.intensity * 10));
default: return 0;
}
}
@@ -1172,32 +1240,37 @@ std::string dis_name(disease dis)
case DI_GLARE: return "Glare";
case DI_COLD_HEAD:
switch (dis.intensity) {
case 1: return "Cold head";
case 1: return "Chilly head";
case 2: return "Cold head!";
case 3: return "Freezing head!!";}
case DI_COLD_MOUTH:
switch (dis.intensity) {
case 1: return "Chilly face";
case 2: return "Cold face!";
case 3: return "Freezing face!!";}
case DI_COLD_TORSO:
switch (dis.intensity) {
case 1: return "Cold torso";
case 1: return "Chilly torso";
case 2: return "Cold torso!";
case 3: return "Freezing torso!!";}
case DI_COLD_ARMS:
switch (dis.intensity) {
case 1: return "Cold arms";
case 1: return "Chilly arms";
case 2: return "Cold arms!";
case 3: return "Freezing arms!!";}
case DI_COLD_HANDS:
switch (dis.intensity) {
case 1: return "Cold hands";
case 1: return "Chilly hands";
case 2: return "Cold hands!";
case 3: return "Freezing hands!!";}
case DI_COLD_LEGS:
switch (dis.intensity) {
case 1: return "Cold legs";
case 1: return "Chilly legs";
case 2: return "Cold legs!";
case 3: return "Freezing legs!!";}
case DI_COLD_FEET:
switch (dis.intensity) {
case 1: return "Cold feet";
case 1: return "Chilly feet";
case 2: return "Cold feet!";
case 3: return "Freezing feet!!";}
case DI_FROSTBITE_HANDS:
@@ -1214,32 +1287,37 @@ std::string dis_name(disease dis)
case 2: return "Frostbite - face";}
case DI_HOT_HEAD:
switch (dis.intensity) {
case 1: return "Hot head";
case 1: return "Warm head";
case 2: return "Hot head!";
case 3: return "Scorching head!!";}
case DI_HOT_MOUTH:
switch (dis.intensity) {
case 1: return "Warm face";
case 2: return "Hot face!";
case 3: return "Scorching face!!";}
case DI_HOT_TORSO:
switch (dis.intensity) {
case 1: return "Hot torso";
case 1: return "Warm torso";
case 2: return "Hot torso!";
case 3: return "Scorching torso!!";}
case DI_HOT_ARMS:
switch (dis.intensity) {
case 1: return "Hot arms";
case 1: return "Warm arms";
case 2: return "Hot arms!";
case 3: return "Scorching arms!!";}
case DI_HOT_HANDS:
switch (dis.intensity) {
case 1: return "Hot hands";
case 1: return "Warm hands";
case 2: return "Hot hands!";
case 3: return "Scorching hands!!";}
case DI_HOT_LEGS:
switch (dis.intensity) {
case 1: return "Hot legs";
case 1: return "Warm legs";
case 2: return "Hot legs!";
case 3: return "Scorching legs!!";}
case DI_HOT_FEET:
switch (dis.intensity) {
case 1: return "Hot feet";
case 1: return "Warm feet";
case 2: return "Hot feet!";
case 3: return "Scorching feet!!";}
case DI_BLISTERS_MOUTH: return "Blisters - face";
@@ -1294,6 +1372,7 @@ std::string dis_name(disease dis)
return "Meth Comedown";
case DI_IN_PIT: return "Stuck in Pit";
case DI_BOULDERING: return "Clambering Over Rubble";
case DI_STEMCELL_TREATMENT: return "Stem cell treatment";
@@ -1306,7 +1385,7 @@ std::string dis_name(disease dis)
switch (dis.intensity) {
case 1: return "Snakebite Unlocked!";
case 2: return "Viper Strike Unlocked!";
default: return "VIPER BUG!!!!";
default: return "Viper combo bug. (in disease.cpp:dis_name)";
}
case DI_BITE:
if (dis.duration > 3000) return "Bite Wound";
@@ -1341,17 +1420,11 @@ std::string dis_description(disease dis)
case 2: return "Your head is very exposed to the cold. It is hard to concentrate.";
case 3: return "Your head is dangerously cold. Getting undressed sounds like a good idea.";}
case DI_COLD_EYES:
switch (dis.intensity) {
case 1: return "Your eyes are exposed to the cold.";
case 2: return "Your eyes are very exposed to the cold.";
case 3: return "Your eyes are dangerously cold.";}
case DI_COLD_MOUTH:
switch (dis.intensity) {
case 1: return "Your mouth is exposed to the cold.";
case 2: return "Your mouth is very exposed to the cold.";
case 3: return "Your mouth is dangerously cold.";}
case 1: return "Your face is exposed to the cold.";
case 2: return "Your face is very exposed to the cold.";
case 3: return "Your face is dangerously cold.";}
case DI_COLD_TORSO:
switch (dis.intensity) {
@@ -1363,25 +1436,25 @@ std::string dis_description(disease dis)
switch (dis.intensity) {
case 1: return "Your arms are exposed to the cold.";
case 2: return "Your arms are very exposed to the cold. Your arms are shivering.";
case 3: return "Your arms is dangerously cold. Your arms are shivering uncontrollably";}
case 3: return "Your arms are dangerously cold. Your arms are shivering uncontrollably";}
case DI_COLD_HANDS:
switch (dis.intensity) {
case 1: return "Your hands are exposed to the cold.";
case 2: return "Your hands are very exposed to the cold. Your hands are shivering.";
case 3: return "Your hands is dangerously cold. Your hands are shivering uncontrollably";}
case 3: return "Your hands are dangerously cold. Your hands are shivering uncontrollably";}
case DI_COLD_LEGS:
switch (dis.intensity) {
case 1: return "Your legs are exposed to the cold.";
case 2: return "Your legs are very exposed to the cold. Your strength is sapped.";
case 3: return "Your legs is dangerously cold. Your strength is sapped.";}
case 3: return "Your legs are dangerously cold. Your strength is sapped.";}
case DI_COLD_FEET:
switch (dis.intensity) {
case 1: return "Your feet are exposed to the cold.";
case 2: return "Your feet are very exposed to the cold. Your strength is sapped.";
case 3: return "Your feet is dangerously cold. Your strength is sapped.";}
case 3: return "Your feet are dangerously cold. Your strength is sapped.";}
case DI_FROSTBITE_HANDS:
switch (dis.intensity) {
@@ -1415,6 +1488,12 @@ std::string dis_description(disease dis)
case 2: return "Your head is sweating from the heat. You feel nauseated. You have a headache.";
case 3: return "Your head is sweating profusely. You feel very nauseated. You have a headache.";}
case DI_HOT_MOUTH:
switch (dis.intensity) {
case 1: return "Your face feels warm.";
case 2: return "Your face is sweating from the heat, making it hard to see.";
case 3: return "Your face is sweating profusely, making it hard to see.";}
case DI_HOT_TORSO:
switch (dis.intensity) {
case 1: return "Your torso feels warm.";
@@ -1441,7 +1520,7 @@ std::string dis_description(disease dis)
case DI_HOT_FEET:
switch (dis.intensity) {
case 1: return "Your feet feel hot.";
case 1: return "Your feet feel warm.";
case 2: return "Your feet are painfully swollen due to the heat.";
case 3: return "Your feet are painfully swollen due to the heat.";}
@@ -1482,6 +1561,28 @@ Loss of health - Torso";
Loss of health - Entire Body\n\
Your clothing and other equipment may be consumed by the flames.";
case DI_CRUSHED: return "\
If you're seeing this, there is a bug in disease.cpp!";
case DI_BOULDERING:
switch (dis.intensity){
case 1:
return "\
Dexterity - 1; Speed -10%\
You are being slowed by climbing over a pile of rubble";
case 2:
return "\
Dexterity - 3; Speed -20%\
You are being slowed by climbing over a heap of rubble";
case 3:
return "\
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";
@@ -1649,7 +1750,7 @@ You have an infected wound.";
You are recovering from an infection.";
default:
return "Who knows? This is probably a bug.";
return "Who knows? This is probably a bug. (disease.cpp:dis_description)";
}
}
Executable → Regular
+1 -1
View File
@@ -8,7 +8,7 @@
#define MIN_DISEASE_AGE (-43200) // Permanent disease capped @ 3 days
struct game;
class game;
void dis_msg(game *g, dis_type type);
+13 -8
View File
@@ -5,14 +5,19 @@
#define sgn(x) (((x) < 0) ? -1 : 1)
#endif
enum material {
MNULL = 0,
//Food Materials
LIQUID, VEGGY, FLESH, POWDER, HFLESH, //Human Flesh.
//Clothing
COTTON, WOOL, LEATHER, KEVLAR, FUR,
//Other
STONE, PAPER, WOOD, PLASTIC, GLASS, IRON, STEEL, SILVER
enum phase_id {
PNULL, SOLID, LIQUID, GAS, PLASMA
};
enum damage_type
{
DNULL = 0,
BASH,
CUT,
ACID,
ELECTRICITY,
FIRE,
NUM_DAM_TYPES
};
struct point {
+6 -8
View File
@@ -25,7 +25,7 @@ void event::actualize(game *g)
tmp.attitude = NPCATT_DEFEND;
tmp.posx = g->u.posx - SEEX * 2 + rng(-5, 5);
tmp.posy = g->u.posy - SEEY * 2 + rng(-5, 5);
g->active_npc.push_back(tmp);
g->active_npc.push_back(&tmp);
}
} break;
@@ -113,7 +113,7 @@ void event::actualize(game *g)
for (int x = 0; x < SEEX * MAPSIZE; x++) {
for (int y = 0; y < SEEY * MAPSIZE; y++) {
if (g->m.ter(x, y) == t_root_wall && one_in(3))
g->m.ter(x, y) = t_underbrush;
g->m.ter_set(x, y, t_underbrush);
}
}
break;
@@ -123,9 +123,8 @@ void event::actualize(game *g)
for (int x = 0; x < SEEX * MAPSIZE; x++) {
for (int y = 0; y < SEEY * MAPSIZE; y++) {
if (g->m.ter(x, y) == t_grate) {
g->m.ter(x, y) = t_stairs_down;
int j;
if (!saw_grate && g->u_see(x, y, j))
g->m.ter_set(x, y, t_stairs_down);
if (!saw_grate && g->u_see(x, y))
saw_grate = true;
}
}
@@ -185,7 +184,7 @@ void event::actualize(game *g)
// flood_buf is filled with correct tiles; now copy them back to g->m
for (int x = 0; x < SEEX * MAPSIZE; x++) {
for (int y = 0; y < SEEY * MAPSIZE; y++)
g->m.ter(x, y) = flood_buf[x][y];
g->m.ter_set(x, y, flood_buf[x][y]);
}
g->add_event(EVENT_TEMPLE_FLOOD, int(g->turn) + rng(2, 3));
} break;
@@ -230,8 +229,7 @@ void event::per_turn(game *g)
return; // We're safely indoors!
eyebot.spawn(place.x, place.y);
g->z.push_back(eyebot);
int t;
if (g->u_see(place.x, place.y, t))
if (g->u_see(place.x, place.y))
g->add_msg("An eyebot swoops down nearby!");
}
} break;
+4 -4
View File
@@ -57,7 +57,7 @@ faction::faction(int uid)
mapy = 0;
size = 0;
power = 0;
uid = id;
id = uid;
}
@@ -92,9 +92,9 @@ void faction::load_info(std::string data)
goal = faction_goal(goaltmp);
job1 = faction_job(jobtmp1);
job2 = faction_job(jobtmp2);
int size, tmpop;
dump >> size;
for (int i = 0; i < size; i++) {
int tmpsize, tmpop;
dump >> tmpsize;
for (int i = 0; i < tmpsize; i++) {
dump >> tmpop;
opinion_of.push_back(tmpop);
}
+233 -96
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,28 +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(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;
@@ -87,17 +97,34 @@ bool map::process_fields_in_submap(game *g, int gridn)
destroyed = false;
vol = i_at(x, y)[i].volume();
item *it = &(i_at(x, y)[i]);
it_ammo *ammo_type = NULL;
if (it->is_ammo() && it->ammo_type() != AT_BATT &&
it->ammo_type() != AT_NAIL && it->ammo_type() != AT_BB &&
it->ammo_type() != AT_BOLT && it->ammo_type() != AT_ARROW && it->ammo_type() != AT_NULL) {
cur->age /= 2;
cur->age -= 600;
destroyed = true;
smoke += 6;
consumed++;
} else if (it->made_of(PAPER)) {
if (it->is_ammo())
{
ammo_type = dynamic_cast<it_ammo*>(it->type);
}
if(ammo_type != NULL &&
(ammo_type->ammo_effects & mfb(AMMO_FLAME) ||
ammo_type->ammo_effects & mfb(AMMO_INCENDIARY) ||
ammo_type->ammo_effects & mfb(AMMO_EXPLOSIVE) ||
ammo_type->ammo_effects & mfb(AMMO_FRAG) ||
ammo_type->ammo_effects & mfb(AMMO_NAPALM) ||
ammo_type->ammo_effects & mfb(AMMO_EXPLOSIVE_BIG) ||
ammo_type->ammo_effects & mfb(AMMO_TEARGAS) ||
ammo_type->ammo_effects & mfb(AMMO_SMOKE) ||
ammo_type->ammo_effects & mfb(AMMO_FLASHBANG) ||
ammo_type->ammo_effects & mfb(AMMO_COOKOFF)))
{
const int rounds_exploded = rng(1, it->charges);
// TODO: Vary the effect based on the ammo flag instead of just exploding them all.
// cook off ammo instead of just burning it.
for(int j = 0; j < (rounds_exploded / 10) + 1; j++)
{
g->explosion(x, y, ammo_type->damage / 2, true, false);
}
it->charges -= rounds_exploded;
if(it->charges == 0) destroyed = true;
} else if (it->made_of("paper")) {
destroyed = it->burn(cur->density * 3);
consumed++;
if (cur->density == 1)
@@ -105,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);
@@ -116,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);
@@ -127,7 +154,7 @@ bool map::process_fields_in_submap(game *g, int gridn)
smoke++;
}
} else if (it->made_of(FLESH)) {
} 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);
@@ -139,27 +166,22 @@ bool map::process_fields_in_submap(game *g, int gridn)
}
} else if (it->made_of(LIQUID)) {
switch (it->type->id) { // TODO: Make this be not a hack.
case itm_whiskey:
case itm_vodka:
case itm_rum:
case itm_tequila:
cur->age -= 300;
smoke += 6;
break;
default:
cur->age += rng(80 * vol, 300 * vol);
smoke++;
if(it->type->id == "tequila" || it->type->id == "whiskey" ||
it->type->id == "vodka" || it->type->id == "rum") {
cur->age -= 300;
smoke += 6;
} else {
cur->age += rng(80 * vol, 300 * vol);
smoke++;
}
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);
@@ -180,10 +202,10 @@ 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)) {
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(x, y) = ter_id(int(ter(x, y)) + 1);
ter_set(x, y, ter_id(int(ter(x, y)) + 1));
cur->age = 0;
cur->density = 3;
g->explosion(x, y, 40, 0, true);
@@ -198,7 +220,7 @@ bool map::process_fields_in_submap(game *g, int gridn)
cur->age -= cur->density * cur->density * 40;
smoke += 15;
if (cur->density == 3)
ter(x, y) = t_ash;
ter_set(x, y, t_ash);
} else if (has_flag(l_flammable, x, y) && one_in(62 - cur->density * 10)) {
cur->age -= cur->density * cur->density * 30;
@@ -219,7 +241,8 @@ bool map::process_fields_in_submap(game *g, int gridn)
// If the flames are in a pit, it can't spread to non-pit
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)) {
if (cur->density == 3 && cur->age < 0 && tr_brazier != tr_at(x, y)
&& (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);
@@ -247,11 +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)) {
ter(fx, fy) = ter_id(int(ter(fx, fy)) + 1);
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 )&&
(in_pit == (ter(fx, fy) == t_pit)) &&
((cur->density == 3 &&
(has_flag(flammable, fx, fy) || one_in(20))) ||
@@ -278,7 +302,8 @@ bool map::process_fields_in_submap(game *g, int gridn)
// If we're not spreading, maybe we'll stick out some smoke, huh?
if (move_cost(fx, fy) > 0 &&
(!one_in(smoke) || (nosmoke && one_in(40))) &&
rng(3, 35) < cur->density * 10 && cur->age < 1000) {
rng(3, 35) < cur->density * 10 && cur->age < 1000 &&
(has_flag(suppress_smoke, x, y) != true )) {
smoke--;
add_field(g, fx, fy, fd_smoke, rng(1, cur->density));
}
@@ -300,7 +325,7 @@ bool map::process_fields_in_submap(game *g, int gridn)
for (int a = -1; a <= 1; a++) {
for (int b = -1; b <= 1; b++) {
if ((field_at(x+a, y+b).type == fd_smoke &&
field_at(x+a, y+b).density < 3 ) ||
field_at(x+a, y+b).density < 3) ||
(field_at(x+a, y+b).is_null() && move_cost(x+a, y+b) > 0))
spread.push_back(point(x+a, y+b));
}
@@ -539,7 +564,7 @@ bool map::process_fields_in_submap(game *g, int gridn)
case fd_push_items: {
std::vector<item> *it = &(i_at(x, y));
for (int i = 0; i < it->size(); i++) {
if ((*it)[i].type->id != itm_rock || (*it)[i].bday >= int(g->turn) - 1)
if ((*it)[i].type->id != "rock" || (*it)[i].bday >= int(g->turn) - 1)
i++;
else {
item tmp = (*it)[i];
@@ -564,18 +589,16 @@ bool map::process_fields_in_submap(game *g, int gridn)
mondex = g->mon_at(newp.x, newp.y);
if (npcdex != -1) {
int junk;
npc *p = &(g->active_npc[npcdex]);
npc *p = g->active_npc[npcdex];
p->hit(g, random_body_part(), rng(0, 1), 6, 0);
if (g->u_see(newp.x, newp.y, junk))
if (g->u_see(newp.x, newp.y))
g->add_msg("A %s hits %s!", tmp.tname().c_str(), p->name.c_str());
}
if (mondex != -1) {
int junk;
monster *mon = &(g->z[mondex]);
mon->hurt(6 - mon->armor_bash());
if (g->u_see(newp.x, newp.y, junk))
if (g->u_see(newp.x, newp.y))
g->add_msg("A %s hits the %s!", tmp.tname().c_str(),
mon->name().c_str());
}
@@ -674,6 +697,10 @@ void map::step_in_field(int x, int y, game *g)
inside = (veh && veh->is_inside(veh_part));
}
if (cur->type != fd_rubble){
g->u.rem_disease(DI_BOULDERING);
}
switch (cur->type) {
case fd_null:
case fd_blood: // It doesn't actually do anything
@@ -712,11 +739,17 @@ void map::step_in_field(int x, int y, game *g)
case fd_fire:
adjusted_intensity = cur->density;
if( g->u.in_vehicle )
if( inside )
adjusted_intensity -= 2;
else
adjusted_intensity -= 1;
if (!g->u.has_active_bionic(bio_heatsink)) {
{
if( inside )
{
adjusted_intensity -= 2;
}
else
{
adjusted_intensity -= 1;
}
}
if (!g->u.has_active_bionic("bio_heatsink")) {
if (adjusted_intensity == 1) {
g->add_msg("You burn your legs and feet!");
g->u.hit(g, bp_feet, 0, 0, rng(2, 6));
@@ -742,24 +775,38 @@ void map::step_in_field(int x, int y, game *g)
}
break;
case fd_smoke:
if (cur->density == 3 && !inside)
g->u.infect(DI_SMOKE, bp_mouth, 4, 15, g);
case fd_rubble:
g->u.add_disease(DI_BOULDERING, 0, g, cur->density, 3);
break;
case fd_smoke:
if (cur->density == 3 && !inside)
{
g->u.infect(DI_SMOKE, bp_mouth, 4, 15, g);
}
break;
case fd_tear_gas:
if ((cur->density > 1 || !one_in(3)) && !inside || inside && one_in(3))
g->u.infect(DI_TEARGAS, bp_mouth, 5, 20, g);
if (cur->density > 1 && !inside || inside && one_in(3))
g->u.infect(DI_BLIND, bp_eyes, cur->density * 2, 10, g);
break;
if ((cur->density > 1 || !one_in(3)) && (!inside || (inside && one_in(3))))
{
g->u.infect(DI_TEARGAS, bp_mouth, 5, 20, g);
}
if (cur->density > 1 && (!inside || (inside && one_in(3))))
{
g->u.infect(DI_BLIND, bp_eyes, cur->density * 2, 10, g);
}
break;
case fd_toxic_gas:
if (cur->density == 2 && !inside || cur->density == 3 && inside )
g->u.infect(DI_POISON, bp_mouth, 5, 30, g);
else if (cur->density == 3 && !inside)
g->u.infect(DI_BADPOISON, bp_mouth, 5, 30, g);
break;
if (cur->density == 2 && (!inside || (cur->density == 3 && inside)))
{
g->u.infect(DI_POISON, bp_mouth, 5, 30, g);
}
else if (cur->density == 3 && !inside)
{
g->u.infect(DI_BADPOISON, bp_mouth, 5, 30, g);
}
break;
case fd_nuke_gas:
g->u.radiation += rng(0, cur->density * (cur->density + 1));
@@ -771,7 +818,7 @@ void map::step_in_field(int x, int y, game *g)
case fd_flame_burst:
if (inside) break;
if (!g->u.has_active_bionic(bio_heatsink)) {
if (!g->u.has_active_bionic("bio_heatsink")) {
g->add_msg("You're torched by flames!");
g->u.hit(g, bp_legs, 0, 0, rng(2, 6));
g->u.hit(g, bp_legs, 1, 0, rng(2, 6));
@@ -827,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)) {
@@ -845,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))
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;
@@ -864,32 +913,38 @@ 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));
}
}
// Drop through to smoke
case fd_rubble:
if (!z->has_flag(MF_FLIES) && !z->has_flag(MF_AQUATIC))
z->add_effect(ME_BOULDERING, 1);
break;
case fd_smoke:
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(VEGGY)) && !z->has_flag(MF_NO_BREATHE)) {
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) {
z->add_effect(ME_STUNNED, rng(10, 20));
@@ -899,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);
}
@@ -925,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))
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;
@@ -966,9 +1022,9 @@ void map::mon_in_field(int x, int y, game *g, monster *z)
if (tries == 10)
g->explode_mon(g->mon_at(z->posx, z->posy));
else {
int mon_hit = g->mon_at(newposx, newposy), t;
int mon_hit = g->mon_at(newposx, newposy);
if (mon_hit != -1) {
if (g->u_see(z, t))
if (g->u_see(z))
g->add_msg("The %s teleports into a %s, killing them both!",
z->name().c_str(), g->z[mon_hit].name().c_str());
g->explode_mon(mon_hit);
@@ -993,3 +1049,84 @@ bool vector_has(std::vector <item> vec, itype_id type)
}
return false;
}
void map::field_effect(int x, int y, game *g) //Applies effect of field immediately
{
field *cur = &field_at(x, y);
switch (cur->type) { //Can add independent code for different types of fields to apply different effects
case fd_rubble:
int hit_chance = 10;
int fdmon = g->mon_at(x, y); //The index of the monster at (x,y), or -1 if there isn't one
int fdnpc = g->npc_at(x, y); //The index of the NPC at (x,y), or -1 if there isn't one
npc *me = NULL;
if (fdnpc != -1)
me = g->active_npc[fdnpc];
int veh_part;
bool pc_inside = false;
bool npc_inside = false;
if (g->u.in_vehicle) {
vehicle *veh = g->m.veh_at(x, y, veh_part);
pc_inside = (veh && veh->is_inside(veh_part));
}
if (me && me->in_vehicle) {
vehicle *veh = g->m.veh_at(x, y, veh_part);
npc_inside = (veh && veh->is_inside(veh_part));
}
if (g->u.posx == x && g->u.posy == y && !pc_inside) { //If there's a PC at (x,y) and he's not in a covered vehicle...
if (g->u.dodge(g) < rng(1, hit_chance) || one_in(g->u.dodge(g))) {
int how_many_limbs_hit = rng(0, num_hp_parts);
for ( int i = 0 ; i < how_many_limbs_hit ; i++ ) {
g->u.hp_cur[rng(0, num_hp_parts)] -= rng(0, 10);
g->add_msg("You are hit by the falling debris!");
}
if (one_in(g->u.dex_cur)) {
g->u.add_disease(DI_DOWNED, 2, g);
}
if (one_in(g->u.str_cur)) {
g->u.add_disease(DI_STUNNED, 2, g);
}
}
else if (one_in(g->u.str_cur)) {
g->add_msg("You trip as you evade the falling debris!");
g->u.add_disease(DI_DOWNED, 1, g);
}
//Avoiding disease system for the moment, since I was having trouble with it.
// g->u.add_disease(DI_CRUSHED, 42, g); //Using a disease allows for easy modification without messing with field code
// g->u.rem_disease(DI_CRUSHED); //For instance, if we wanted to easily add a chance of limb mangling or a stun effect later
}
if (fdmon != -1 && fdmon < g->z.size()) { //If there's a monster at (x,y)...
monster* monhit = &(g->z[fdmon]);
int dam = 10; //This is a simplistic damage implementation. It can be improved, for instance to account for armor
if (monhit->hurt(dam)) //Ideally an external disease-like system would handle this to make it easier to modify later
g->kill_mon(fdmon, false);
}
if (fdnpc != -1) {
if (fdnpc < g->active_npc.size() && !npc_inside) { //If there's an NPC at (x,y) and he's not in a covered vehicle...
if (me->dodge(g) < rng(1, hit_chance) || one_in(me->dodge(g))) {
int how_many_limbs_hit = rng(0, num_hp_parts);
for ( int i = 0 ; i < how_many_limbs_hit ; i++ ) {
me->hp_cur[rng(0, num_hp_parts)] -= rng(0, 10);
}
if (one_in(me->dex_cur)) {
me->add_disease(DI_DOWNED, 2, g);
}
if (one_in(me->str_cur)) {
me->add_disease(DI_STUNNED, 2, g);
}
}
else if (one_in(me->str_cur)) {
me->add_disease(DI_DOWNED, 1, g);
}
}
if (me->hp_cur[hp_head] <= 0 || me->hp_cur[hp_torso] <= 0) {
me->die(g, false); //Right now cave-ins are treated as not the player's fault. This should be iterated on.
g->active_npc.erase(g->active_npc.begin() + fdnpc);
} //Still need to add vehicle damage, but I'm ignoring that for now.
}
vehicle *veh = veh_at(x, y, veh_part);
if (veh) {
veh->damage(veh_part, ceil(veh->parts[veh_part].hp/3.0 * cur->density), 1, false);
}
}
}
+4861 -2431
View File
File diff suppressed because it is too large Load Diff
+105 -35
View File
@@ -25,6 +25,7 @@
#include "action.h"
#include <vector>
#include <map>
#include <list>
#include <stdarg.h>
// Fixed window sizes
@@ -46,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,
@@ -112,14 +118,21 @@ 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);
// Sound at (x, y) of intensity (vol), described to the player is (description)
void sound(int x, int y, int vol, std::string description);
// creates a list of coordinates to draw footsteps
void add_footstep(int x, int y, int volume, int distance);
std::vector<point> footsteps;
void add_footstep(int x, int y, int volume, int distance, monster* source);
std::vector<std::vector<point> > footsteps;
std::vector<monster*> footsteps_source;
// visual cue to monsters moving out of the players sight
void draw_footsteps();
// Explosion at (x, y) of intensity (power), with (shrapnel) chunks of shrapnel
@@ -143,6 +156,8 @@ class game
// Kill that monster; fixes any pointers etc
void kill_mon(int index, bool player_did_it = false);
void explode_mon(int index); // Explode a monster; like kill_mon but messier
void revive_corpse(int x, int y, int n); // revives a corpse from an item pile
void revive_corpse(int x, int y, item *it); // revives a corpse by item pointer, caller handles item deletion
// hit_monster_with_flags processes ammo flags (e.g. incendiary, etc)
void hit_monster_with_flags(monster &z, unsigned int flags);
void plfire(bool burst); // Player fires a gun (target selection)...
@@ -153,6 +168,11 @@ class game
std::vector<point> &trajectory);
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
void assign_mission(int id); // Just assign an existing mission
@@ -163,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
@@ -175,20 +196,20 @@ 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, int dir, int 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);
int& scent(int x, int y);
float natural_light_level();
float natural_light_level() const;
unsigned char light_level();
void reset_light_level();
int assign_npc_id();
int assign_faction_id();
faction* faction_by_id(int it);
bool sees_u(int x, int y, int &t);
bool u_see (int x, int y, int &t);
bool u_see (monster *mon, int &t);
bool u_see (int x, int y);
bool u_see (monster *mon);
bool pl_sees(player *p, monster *mon, int &t);
void refresh_all();
void update_map(int &x, int &y); // Called by plmove when the map updates
@@ -204,29 +225,40 @@ 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);
std::string sFilter;
int list_filter_high_priority(std::vector<map_item_stack> &stack, std::string prorities);
int list_filter_low_priority(std::vector<map_item_stack> &stack,int start, std::string prorities);
std::vector<map_item_stack> filter_item_stacks(std::vector<map_item_stack> stack, std::string filter);
std::vector<map_item_stack> find_nearby_items(int search_x, int search_y);
std::string ask_item_filter(WINDOW* window, int rows);
void draw_trail_to_square(std::vector<point>& vPoint, int x, int y);
void reset_item_list_state(WINDOW* window, int height);
std::string sFilter; // this is a member so that it's remembered over time
std::string list_item_upvote;
std::string list_item_downvote;
char inv(std::string title = "Inventory:");
char inv_type(std::string title = "Inventory:", int inv_item_type = 0);
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);
void remove_item(item *it);
inventory crafting_inventory(); // inv_from_map, inv, & 'weapon'
void consume_items(std::vector<component> components);
void consume_tools(std::vector<component> tools);
inventory crafting_inventory(player *p); // inv_from_map, inv, & 'weapon'
std::list<item> consume_items(player *p, std::vector<component> components);
void consume_tools(player *p, std::vector<component> tools, bool force_available);
bool has_gametype() const { return gamemode && gamemode->id() != SGAME_NULL; }
special_game_id gametype() const { return (gamemode) ? gamemode->id() : SGAME_NULL; }
std::vector <itype*> itypes;
std::map<std::string, itype*> itypes;
std::vector <mtype*> mtypes;
std::vector <vehicle*> vtypes;
std::vector <trap*> traps;
std::vector<recipe*> recipes; // The list of valid recipes
recipe_map recipes; // The list of valid recipes
std::vector<constructable*> constructions; // The list of constructions
std::vector <itype_id> mapitems[num_itloc]; // Items at various map types
@@ -234,20 +266,23 @@ 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
weather_type weather; // Weather pattern--SEE weather.h
std::list<weather_segment> future_weather;
char nextinv; // Determines which letter the next inv item will have
overmap cur_om;
overmap *cur_om;
map m;
light_map lm;
int levx, levy, levz; // Placement inside the overmap
player u;
std::vector<monster> z;
std::vector<monster_and_count> coming_to_stairs;
int monstairx, monstairy, monstairz;
std::vector<npc> active_npc;
std::vector<npc *> active_npc;
std::vector<faction> factions;
std::vector<mission> active_missions; // Missions which may be assigned
// NEW: Dragging a piece of furniture, with a list of items contained
@@ -255,10 +290,10 @@ class game
std::vector<item> items_dragged;
int weight_dragged; // Computed once, when you start dragging
bool debugmon;
bool no_npc;
std::map<int, std::map<int, bool> > mapRain;
int w_void_lines;
WINDOW *w_terrain;
WINDOW *w_minimap;
WINDOW *w_HP;
@@ -269,18 +304,38 @@ class game
WINDOW *w_void; //space unter status if viewport Y > 12
overmap *om_hori, *om_vert, *om_diag; // Adjacent overmaps
bool handle_liquid(item &liquid, bool from_ground, bool infinite);
void open_gate( game *g, const int examx, const int examy, const enum ter_id handle_type );
recipe* recipe_by_name(std::string name); // See crafting.cpp
bionic_id random_good_bionic() const; // returns a non-faulty, valid bionic
void load_artifacts(); // Load artifact data
// Needs to be called by main() before MAPBUFFER.load
private:
// Game-start procedures
bool opening_screen();// Warn about screen size, then present the main menu
void print_menu(WINDOW* w_open, int iSel, const int iMenuOffsetX, int iMenuOffsetY, bool bShowDDA = true);
void print_menu_items(WINDOW* w_in, std::vector<std::string> vItems, int iSel, int iOffsetY, int iOffsetX);
bool load_master(); // Load the master data file, with factions &c
void load_weather(std::ifstream &fin);
void load(std::string name); // Load a player-specific save file
void start_game(); // Starts a new game
void start_special_game(special_game_id gametype); // See gamemode.cpp
//private save functions.
void save_factions_missions_npcs();
void save_artifacts();
void save_maps();
std::string save_weather() const;
// Data Initialization
void init_itypes(); // Initializes item types
void init_skills();
void init_bionics(); // Initializes bionics... for now.
void init_mapitems(); // Initializes item placement
void init_mtypes(); // Initializes monster types
void init_mongroups(); // Initualizes monster groups
@@ -294,11 +349,13 @@ class game
void init_autosave(); // Initializes autosave parameters
void load_keyboard_settings(); // Load keybindings from disk
void save_keymap(); // Save keybindings to disk
std::vector<char> keys_bound_to(action_id act); // All keys bound to act
void clear_bindings(action_id act); // Deletes all keys bound to act
void create_factions(); // Creates new factions (for a new game world)
void load_npcs(); //Make any nearby NPCs from the overmap active.
void create_starting_npcs(); // Creates NPCs that start near you
// Player actions
@@ -312,36 +369,46 @@ class game
void open(); // Open a door 'o'
void close(); // Close a door 'c'
void smash(); // Smash terrain
void craft(); // See crafting.cpp
void recraft(); // See crafting.cpp
void try_and_make(recipe *r);
bool can_make(recipe *r);
void make_craft(recipe *making); // See crafting.cpp
void complete_craft(); // See crafting.cpp
void craft(); // See crafting.cpp
void recraft(); // See crafting.cpp
void long_craft(); // See crafting.cpp
bool crafting_allowed(); // See crafting.cpp
recipe* select_crafting_recipe(); // See crafting.cpp
bool making_would_work(recipe *r); // See crafting.cpp
bool can_make(recipe *r); // See crafting.cpp
bool check_enough_materials(recipe *r, inventory crafting_inv);
void make_craft(recipe *making); // See crafting.cpp
void make_all_craft(recipe *making); // See crafting.cpp
void complete_craft(); // See crafting.cpp
void pick_recipes(std::vector<recipe*> &current,
std::vector<bool> &available, craft_cat tab);// crafting.cpp
void disassemble(); // See crafting.cpp
void disassemble_item(recipe *dis); // See crafting.cpp
void complete_disassemble(); // See crafting.cpp
void construction_menu(); // See construction.cpp
std::vector<bool> &available, craft_cat tab,std::string filter);// crafting.cpp
void add_known_recipes(std::vector<recipe*> &current, recipe_list source,
std::string filter = ""); //crafting.cpp
craft_cat next_craft_cat(craft_cat cat); // crafting.cpp
craft_cat prev_craft_cat(craft_cat cat); // crafting.cpp
void disassemble(char ch = 0); // See crafting.cpp
void complete_disassemble(); // See crafting.cpp
recipe* recipe_by_index(int index); // See crafting.cpp
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
void exam_vehicle(vehicle &veh, int examx, int examy, int cx=0, int cy=0);
void pickup(int posx, int posy, int min);// Pickup items; ',' or via examine()
// Pick where to put liquid; false if it's left where it was
bool handle_liquid(item &liquid, bool from_ground, bool infinite);
void compare(int iCompareX = -999, int iCompareY = -999); // Compare two Items 'I'
void drop(char chInput = '.'); // Drop an item 'd'
void drop_in_direction(); // Drop w/ direction 'D'
void reassign_item(); // Reassign the letter of an item '='
void reassign_item(char ch = '.'); // Reassign the letter of an item '='
void butcher(); // Butcher a corpse 'B'
void complete_butcher(int index); // Finish the butchering process
void forage(); // Foraging ('a' on underbrush)
@@ -352,7 +419,7 @@ class game
void takeoff(char chInput = '.'); // Remove armor 'T'
void reload(); // Reload a wielded gun/tool 'r'
void reload(char chInput);
void unload(); // Unload a wielded gun/tool 'U'
void unload(item& it); // Unload a gun/tool 'U'
void unload(char chInput);
void wield(char chInput = '.'); // Wield a weapon 'w'
void read(); // Read a book 'R' (or 'a')
@@ -386,6 +453,7 @@ class game
void update_weather(); // Updates the temperature and weather patten
void hallucinate(const int x, const int y); // Prints hallucination junk to the screen
void mon_info(); // Prints a list of nearby monsters (top right)
void handle_key_blocking_activity(); // Abort reading etc.
bool handle_action();
void update_scent(); // Updates the scent map
bool is_game_over(); // Returns true if the player quit or died
@@ -433,13 +501,15 @@ 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 moves_since_last_save;
int item_exchanges_since_save;
time_t last_save_timestamp;
unsigned char latest_lightlevel;
calendar latest_lightlevel_turn;
special_game *gamemode;
int moveCount; //Times the player has moved (not pause, sleep, etc)
};
#endif
+3 -3
View File
@@ -5,10 +5,10 @@ std::string special_game_name(special_game_id id)
{
switch (id) {
case SGAME_NULL:
case NUM_SPECIAL_GAMES: return "nethack (this is a bug)";
case NUM_SPECIAL_GAMES: return "Bug (gamemode.cpp:special_game_name)";
case SGAME_TUTORIAL: return "Tutorial";
case SGAME_DEFENSE: return "Defense";
default: return "Uncoded (this is a bug)";
default: return "Uncoded (gamemode.cpp:special_game_name)";
}
}
@@ -26,7 +26,7 @@ special_game* get_special_game(special_game_id id)
ret = new defense_game;
break;
default:
debugmsg("Missing something in get_special_game()?");
debugmsg("Missing something in gamemode.cpp:get_special_game()?");
ret = new special_game;
break;
}
+1
View File
@@ -22,6 +22,7 @@ special_game* get_special_game(special_game_id id);
struct special_game
{
virtual ~special_game() { return; };
virtual special_game_id id() { return SGAME_NULL; };
// init is run when the game begins
virtual bool init(game *g) { return true; };
+260 -169
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);
@@ -39,7 +41,7 @@ c: Viewing k: Traps\n\
d: Hunger, Thirst, and Sleep l: Items overview\n\
e: Pain and Stimulants m: Combat\n\
f: Addiction n: Unarmed Styles\n\
g: Morale and XP o: Survival tips\n\
g: Morale and Learning o: Survival tips\n\
h: Radioactivity and Mutation\n\
\n\
1: List of all commands (you can change key commands here)\n\
@@ -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();
@@ -221,14 +245,24 @@ Press any key for more...");
getch();
werase(w_help);
mvwprintz(w_help, 0, 0, c_white, "\
Morale is also responsible for filling your XP pool. This XP pool is used\n\
for improving your skills; as you use your skills, points are taken from the\n\
XP pool and placed into the skill used. If your XP pool is empty, your\n\
skills cannot be improved except through the use of books.\n\
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\n\
to learn from practical experience.\n\
\n\
Your XP pool will not fill unless your morale is at least 0. A morale level\n\
between 0 and 100 gives the percentage chance for your XP to increase by 1\n\
each turn. Above 100, you get 1 XP point each turn for every 100 morale.");
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\
than when it is near the set point. Having high morale will raise the set\n\
point, and having low morale will lower the set point. Pain is also factored\n\
into the set point calculation - it's harder to learn when you're in pain.\n\
\n\
Your focus is also lowered by certain activities. Training your skills\n\
through real-world practice lowers your focus gradually, by an amount that\n\
depends on your current level of focus (higher focus means larger decreases,\n\
as well as improved learning). Training your skills by reading books\n\
decreases your focus rapidly, by giving a significant penalty to the set\n\
point of your focus.");
wrefresh(w_help);
refresh();
getch();
@@ -238,7 +272,7 @@ each turn. Above 100, you get 1 XP point each turn for every 100 morale.");
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\
@@ -285,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();
@@ -319,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();
@@ -342,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();
@@ -388,26 +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\
cursor to the relevant space, then hit '.' or 'f'. Some guns have automatic\n\
fire; to shoot a burst, press 'F'. This will severely reduce accuracy.\n\
\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%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();
@@ -422,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();
@@ -454,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\
@@ -471,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();
@@ -486,7 +553,7 @@ extremities from frostbite and to keep your distance from large fires.");
case '1': {
werase(w_help);
int offset = 1;
char ch = ' ';
char remapch = ' ';
bool changed_keymap = false;
bool needs_refresh = true;
do {
@@ -507,7 +574,7 @@ extremities from frostbite and to keep your distance from large fires.");
}
// Clear the lines
for (int i = 0; i < 23; i++)
mvwprintz(w_help, i, 0, c_black, " ");
mvwprintz(w_help, i, 0, c_black, " ");
for (int i = 0; i < 23 && offset + i < NUM_ACTIONS; i++) {
std::vector<char> keys = keys_bound_to( action_id(offset + i) );
@@ -525,14 +592,14 @@ extremities from frostbite and to keep your distance from large fires.");
}
wrefresh(w_help);
refresh();
ch = input();
remapch = input();
int sx = 0, sy = 0;
get_direction(this, sx, sy, ch);
get_direction(this, sx, sy, remapch);
if (sy == -1 && offset > 1)
offset--;
if (sy == 1 && offset + 20 < NUM_ACTIONS)
offset++;
if (ch == '-' || ch == '+') {
if (remapch == '-' || remapch == '+') {
needs_refresh = true;
for (int i = 0; i < 23 && i + offset < NUM_ACTIONS; i++) {
mvwprintz(w_help, i, 0, c_ltblue, "%c", 'a' + i);
@@ -544,10 +611,10 @@ extremities from frostbite and to keep your distance from large fires.");
if (actch >= 'a' && actch <= 'a' + 24 &&
actch - 'a' + offset < NUM_ACTIONS) {
action_id act = action_id(actch - 'a' + offset);
if (ch == '-' && query_yn("Clear keys for %s?",action_name(act).c_str())){
if (remapch == '-' && query_yn("Clear keys for %s?",action_name(act).c_str())){
clear_bindings(act);
changed_keymap = true;
} else if (ch == '+') {
} else if (remapch == '+') {
char newbind = popup_getkey("New key for %s:", action_name(act).c_str());
if (keymap.find(newbind) == keymap.end()) { // It's not in use! Good.
keymap[ newbind ] = act;
@@ -558,7 +625,7 @@ extremities from frostbite and to keep your distance from large fires.");
}
}
}
} while (ch != 'q' && ch != 'Q' && ch != KEY_ESCAPE);
} while (remapch != 'q' && remapch != 'Q' && remapch != KEY_ESCAPE);
if (changed_keymap && query_yn("Save changes?"))
save_keymap();
werase(w_help);
@@ -576,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\
@@ -585,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();
@@ -599,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\
@@ -607,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();
@@ -629,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();
@@ -647,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.");
@@ -706,22 +788,23 @@ O Parking lot - Empty lot, few items. Mostly useless.");
Handguns are small weapons held in one or both hands. They are much more\n\
difficult to aim and control than larger firearms, and this is reflected in\n\
their poor accuracy. However, their small size makes them appropriate for\n\
short-range combat, where largers guns fare poorly.\n\
short-range combat, where larger guns fare poorly.\n\
They are also relatively quick to reload, and use a very wide selection of\n\
ammunition. Their small size and low weight make it possible to carry\n\
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...");
@@ -736,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.");
@@ -763,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\
@@ -793,13 +876,13 @@ making them very good at clearing out large numbers of enemies.");
mvwprintz(w_help, 10, 0, c_magenta, "( Energy Weapons");
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 atttacks. 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\
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\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);
@@ -808,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();
@@ -842,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();
+24
View File
@@ -0,0 +1,24 @@
#include "helper.h"
#include <string>
#include <sstream>
namespace helper
{
int to_int(std::string str)
{
std::istringstream buffer(str);
int value;
buffer >> value;
if(str != to_string(value)) //if the converted value is different then return 0 (similar to atoi)
{
return 0;
}
return value;
}
std::string to_string(int i)
{
std::stringstream sstr;
sstr << i;
std::string str1 = sstr.str();
return str1;
}
}
+10
View File
@@ -0,0 +1,10 @@
#ifndef _HELPER_H_
#define _HELPER_H_
#include <string>
#include <sstream>
namespace helper
{
int to_int(std::string str);
std::string to_string(int i);
}
#endif
+756
View File
@@ -0,0 +1,756 @@
//
// iexamine.cpp
// Cataclysm
//
// Livingstone
//
#include "item_factory.h"
#include "iuse.h"
#include "game.h"
#include "mapdata.h"
#include "keypress.h"
#include "output.h"
#include "rng.h"
#include "line.h"
#include "player.h"
#include <sstream>
void iexamine::none (game *g, player *p, map *m, int examx, int examy) {
g->add_msg("That is a %s.", m->tername(examx, examy).c_str());
};
void iexamine::gaspump(game *g, player *p, map *m, int examx, int examy) {
if (!query_yn("Use the %s?",m->tername(examx, examy).c_str())) {
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;
use_pump = g->handle_liquid(gas, false, true);
}
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);
}
}
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->vertical_move( movez, false );
}
void iexamine::controls_gate(game *g, player *p, map *m, int examx, int examy) {
if (!query_yn("Use the %s?",m->tername(examx, examy).c_str())) {
none(g, p, m, examx, examy);
return;
}
g->open_gate(g,examx,examy, m->ter(examx,examy));
}
void iexamine::cardreader(game *g, player *p, map *m, int examx, int examy) {
itype_id card_type = (m->ter(examx, examy) == t_card_science ? "id_science" :
"id_military");
if (p->has_amount(card_type, 1) && query_yn("Swipe your ID card?")) {
p->moves -= 100;
for (int i = -3; i <= 3; i++) {
for (int j = -3; j <= 3; j++) {
if (m->ter(examx + i, examy + j) == t_door_metal_locked)
m->ter_set(examx + i, examy + j, t_floor);
}
}
for (int i = 0; i < g->z.size(); i++) {
if (g->z[i].type->id == mon_turret) {
g->z.erase(g->z.begin() + i);
i--;
}
}
g->add_msg("You insert your ID card.");
g->add_msg("The nearby doors slide into the floor.");
p->use_amount(card_type, 1);
} else {
bool using_electrohack = (p->has_amount("electrohack", 1) &&
query_yn("Use electrohack on the reader?"));
bool using_fingerhack = (!using_electrohack && p->has_bionic("bio_fingerhack") &&
p->power_level > 0 &&
query_yn("Use fingerhack on the reader?"));
if (using_electrohack || using_fingerhack) {
p->moves -= 500;
p->practice(g->turn, "computer", 20);
int success = rng(p->skillLevel("computer") / 4 - 2, p->skillLevel("computer") * 2);
success += rng(-3, 3);
if (using_fingerhack)
success++;
if (p->int_cur < 8)
success -= rng(0, int((8 - p->int_cur) / 2));
else if (p->int_cur > 8)
success += rng(0, int((p->int_cur - 8) / 2));
if (success < 0) {
g->add_msg("You cause a short circuit!");
if (success <= -5) {
if (using_electrohack) {
g->add_msg("Your electrohack is ruined!");
p->use_amount("electrohack", 1);
} else {
g->add_msg("Your power is drained!");
p->charge_power(0 - rng(0, p->power_level));
}
}
m->ter_set(examx, examy, t_card_reader_broken);
} else if (success < 6)
g->add_msg("Nothing happens.");
else {
g->add_msg("You activate the panel!");
g->add_msg("The nearby doors slide into the floor.");
m->ter_set(examx, examy, t_card_reader_broken);
for (int i = -3; i <= 3; i++) {
for (int j = -3; j <= 3; j++) {
if (m->ter(examx + i, examy + j) == t_door_metal_locked)
m->ter_set(examx + i, examy + j, t_floor);
}
}
}
} else {
g->add_msg("Looks like you need a %s.",g->itypes[card_type]->name.c_str());
}
}
}
void iexamine::rubble(game *g, player *p, map *m, int examx, int examy) {
if (!(p->has_amount("shovel", 1) || p->has_amount("primitive_shovel", 1))) {
g->add_msg("If only you had a shovel...");
return;
}
const char *xname = m->tername(examx, examy).c_str();
if (query_yn("Clear up that %s?",xname)) {
// "Remove"
p->moves -= 200;
// "Replace"
if(m->ter(examx,examy) == t_rubble) {
item rock(g->itypes["rock"], g->turn);
m->add_item(p->posx, p->posy, rock);
m->add_item(p->posx, p->posy, rock);
}
// "Refloor"
if (g->levz < 0) {
m->ter_set(examx, examy, t_rock_floor);
} else {
m->ter_set(examx, examy, t_dirt);
}
// "Remind"
g->add_msg("You clear up that %s.", xname);
}
}
void iexamine::chainfence(game *g, player *p, map *m, int examx, int examy) {
if (!query_yn("Climb %s?",m->tername(examx, examy).c_str())) {
none(g, p, m, examx, examy);
return;
}
p->moves -= 400;
if (one_in(p->dex_cur)) {
g->add_msg("You slip whilst climbing and fall down again");
} else {
p->moves += p->dex_cur * 10;
p->posx = examx;
p->posy = examy;
}
}
void iexamine::tent(game *g, player *p, map *m, int examx, int examy) {
if (!query_yn("Take down your tent?")) {
none(g, p, m, examx, examy);
return;
}
p->moves -= 200;
for (int i = -1; i <= 1; i++)
for (int j = -1; j <= 1; j++)
m->ter_set(examx + i, examy + j, t_dirt);
g->add_msg("You take down the tent");
item dropped(g->itypes["tent_kit"], g->turn);
m->add_item(examx, examy, dropped);
}
void iexamine::shelter(game *g, player *p, map *m, int examx, int examy) {
if (!query_yn("Take down %s?",m->tername(examx, examy).c_str())) {
none(g, p, m, examx, examy);
return;
}
p->moves -= 200;
for (int i = -1; i <= 1; i++)
for (int j = -1; j <= 1; j++)
m->ter_set(examx + i, examy + j, t_dirt);
g->add_msg("You take down the shelter");
item dropped(g->itypes["shelter_kit"], g->turn);
m->add_item(examx, examy, dropped);
}
void iexamine::wreckage(game *g, player *p, map *m, int examx, int examy) {
if (!(p->has_amount("shovel", 1) || p->has_amount("primitive_shovel", 1))) {
g->add_msg("If only you had a shovel..");
return;
}
if (query_yn("Clear up that wreckage?")) {
p->moves -= 200;
m->ter_set(examx, examy, t_dirt);
item chunk(g->itypes["steel_chunk"], g->turn);
item scrap(g->itypes["scrap"], g->turn);
item pipe(g->itypes["pipe"], g->turn);
item wire(g->itypes["wire"], g->turn);
m->add_item(examx, examy, chunk);
m->add_item(examx, examy, scrap);
if (one_in(5)) {
m->add_item(examx, examy, pipe);
m->add_item(examx, examy, wire); }
g->add_msg("You clear the wreckage up");
}
}
void iexamine::pit(game *g, player *p, map *m, int examx, int examy)
{
bool player_has = false;
bool map_has = false;
inventory map_inv;
map_inv.form_from_map(g, point(p->posx, p->posy), 1);
// check if player has 2x4
player_has = p->has_amount("2x4", 1);
// check if map has 2x4 in a 1-tile radius around player
map_has = map_inv.has_amount("2x4", 1);
// return if there is no 2x4 around
if (!player_has && !map_has)
{
none(g, p, m, examx, examy);
return;
}
if (query_yn("Place a plank over the pit?"))
{
// if both have, then ask to use the one on the map
if (player_has && map_has)
{
if (query_yn("Use the plank at your feet?"))
{
m->use_amount(point(p->posx, p->posy), 1, "2x4", 1, false);
}
else
{
p->use_amount("2x4", 1);
}
}
else if (player_has && !map_has) // only player has plank
{
p->use_amount("2x4", 1);
}
else if (!player_has && map_has) // only map has plank
{
m->use_amount(point(p->posx, p->posy), 1, "2x4", 1, false);
}
if( m->ter(examx, examy) == t_pit )
{
m->ter_set(examx, examy, t_pit_covered);
}
else if( m->ter(examx, examy) == t_pit_spiked )
{
m->ter_set(examx, examy, t_pit_spiked_covered);
}
g->add_msg("You place a plank of wood over the pit.");
}
}
void iexamine::pit_covered(game *g, player *p, map *m, int examx, int examy)
{
if(!query_yn("Remove cover?"))
{
none(g, p, m, examx, examy);
return;
}
item plank(g->itypes["2x4"], g->turn);
g->add_msg("You remove the plank.");
m->add_item(p->posx, p->posy, plank);
if( m->ter(examx, examy) == t_pit_covered )
{
m->ter_set(examx, examy, t_pit);
}
else if( m->ter(examx, examy) == t_pit_spiked_covered )
{
m->ter_set(examx, examy, t_pit_spiked);
}
}
void iexamine::fence_post(game *g, player *p, map *m, int examx, int examy) {
int ch = menu(true, "Fence Construction:", "Rope Fence", "Wire Fence",
"Barbed Wire Fence", "Cancel", NULL);
switch (ch){
case 1:{
if (p->has_amount("rope_6", 2)) {
p->use_amount("rope_6", 2);
m->ter_set(examx, examy, t_fence_rope);
p->moves -= 200;
} else
g->add_msg("You need 2 six-foot lengths of rope to do that");
} break;
case 2:{
if (p->has_amount("wire", 2)) {
p->use_amount("wire", 2);
m->ter_set(examx, examy, t_fence_wire);
p->moves -= 200;
} else
g->add_msg("You need 2 lengths of wire to do that!");
} break;
case 3:{
if (p->has_amount("wire_barbed", 2)) {
p->use_amount("wire_barbed", 2);
m->ter_set(examx, examy, t_fence_barbed);
p->moves -= 200;
} else
g->add_msg("You need 2 lengths of barbed wire to do that!");
} break;
case 4:
default:
break;
}
}
void iexamine::remove_fence_rope(game *g, player *p, map *m, int examx, int examy) {
if(!query_yn("Remove %s?",m->tername(examx, examy).c_str())) {
none(g, p, m, examx, examy);
return;
}
item rope(g->itypes["rope_6"], g->turn);
m->add_item(p->posx, p->posy, rope);
m->add_item(p->posx, p->posy, rope);
m->ter_set(examx, examy, t_fence_post);
p->moves -= 200;
}
void iexamine::remove_fence_wire(game *g, player *p, map *m, int examx, int examy) {
if(!query_yn("Remove %s?",m->tername(examx, examy).c_str())) {
none(g, p, m, examx, examy);
return;
}
item rope(g->itypes["wire"], g->turn);
m->add_item(p->posx, p->posy, rope);
m->add_item(p->posx, p->posy, rope);
m->ter_set(examx, examy, t_fence_post);
p->moves -= 200;
}
void iexamine::remove_fence_barbed(game *g, player *p, map *m, int examx, int examy) {
if(!query_yn("Remove %s?",m->tername(examx, examy).c_str())) {
none(g, p, m, examx, examy);
return;
}
item rope(g->itypes["wire_barbed"], g->turn);
m->add_item(p->posx, p->posy, rope);
m->add_item(p->posx, p->posy, rope);
m->ter_set(examx, examy, t_fence_post);
p->moves -= 200;
}
void iexamine::slot_machine(game *g, player *p, map *m, int examx, int examy) {
if (p->cash < 10)
g->add_msg("You need $10 to play.");
else if (query_yn("Insert $10?")) {
do {
if (one_in(5))
popup("Three cherries... you get your money back!");
else if (one_in(20)) {
popup("Three bells... you win $50!");
p->cash += 40; // Minus the $10 we wagered
} else if (one_in(50)) {
popup("Three stars... you win $200!");
p->cash += 190;
} else if (one_in(1000)) {
popup("JACKPOT! You win $5000!");
p->cash += 4990;
} else {
popup("No win.");
p->cash -= 10;
}
} while (p->cash >= 10 && query_yn("Play again?"));
}
}
void iexamine::bulletin_board(game *g, player *p, map *m, int examx, int examy) {
basecamp *camp = m->camp_at(examx, examy);
if (camp && camp->board_x() == examx && camp->board_y() == examy) {
std::vector<std::string> options;
options.push_back("Cancel");
// Causes a warning due to being unused, but don't want to delete since
// it's clearly what's intened for future functionality.
//int choice = menu_vec(true, camp->board_name().c_str(), options) - 1;
}
else {
bool create_camp = m->allow_camp(examx, examy);
std::vector<std::string> options;
if (create_camp)
options.push_back("Create camp");
options.push_back("Cancel");
// TODO: Other Bulletin Boards
int choice = menu_vec(true, "Bulletin Board", options) - 1;
if (choice >= 0 && choice < options.size()) {
if (options[choice] == "Create camp") {
// TODO: Allow text entry for name
m->add_camp("Home", examx, examy);
}
}
}
}
void iexamine::fault(game *g, player *p, map *m, int examx, int examy) {
popup("\
This wall is perfectly vertical. Odd, twisted holes are set in it, leading\n\
as far back into the solid rock as you can see. The holes are humanoid in\n\
shape, but with long, twisted, distended limbs.");
}
void iexamine::pedestal_wyrm(game *g, player *p, map *m, int examx, int examy) {
if (!m->i_at(examx, examy).empty()) {
none(g, p, m, examx, examy);
return;
}
g->add_msg("The pedestal sinks into the ground...");
m->ter_set(examx, examy, t_rock_floor);
g->add_event(EVENT_SPAWN_WYRMS, int(g->turn) + rng(5, 10));
}
void iexamine::pedestal_temple(game *g, player *p, map *m, int examx, int examy) {
if (m->i_at(examx, examy).size() == 1 &&
m->i_at(examx, examy)[0].type->id == "petrified_eye") {
g->add_msg("The pedestal sinks into the ground...");
m->ter_set(examx, examy, t_dirt);
m->i_at(examx, examy).clear();
g->add_event(EVENT_TEMPLE_OPEN, int(g->turn) + 4);
} else if (p->has_amount("petrified_eye", 1) &&
query_yn("Place your petrified eye on the pedestal?")) {
p->use_amount("petrified_eye", 1);
g->add_msg("The pedestal sinks into the ground...");
m->ter_set(examx, examy, t_dirt);
g->add_event(EVENT_TEMPLE_OPEN, int(g->turn) + 4);
} else
g->add_msg("This pedestal is engraved in eye-shaped diagrams, and has a large\
semi-spherical indentation at the top.");
}
void iexamine::fswitch(game *g, player *p, map *m, int examx, int examy) {
if(!query_yn("Flip the %s?",m->tername(examx, examy).c_str())) {
none(g, p, m, examx, examy);
return;
}
p->moves -= 100;
for (int y = examy; y <= examy + 5; y++) {
for (int x = 0; x < SEEX * MAPSIZE; x++) {
switch (m->ter(examx, examy)) {
case t_switch_rg:
if (m->ter(x, y) == t_rock_red)
m->ter_set(x, y, t_floor_red);
else if (m->ter(x, y) == t_floor_red)
m->ter_set(x, y, t_rock_red);
else if (m->ter(x, y) == t_rock_green)
m->ter_set(x, y, t_floor_green);
else if (m->ter(x, y) == t_floor_green)
m->ter_set(x, y, t_rock_green);
break;
case t_switch_gb:
if (m->ter(x, y) == t_rock_blue)
m->ter_set(x, y, t_floor_blue);
else if (m->ter(x, y) == t_floor_blue)
m->ter_set(x, y, t_rock_blue);
else if (m->ter(x, y) == t_rock_green)
m->ter_set(x, y, t_floor_green);
else if (m->ter(x, y) == t_floor_green)
m->ter_set(x, y, t_rock_green);
break;
case t_switch_rb:
if (m->ter(x, y) == t_rock_blue)
m->ter_set(x, y, t_floor_blue);
else if (m->ter(x, y) == t_floor_blue)
m->ter_set(x, y, t_rock_blue);
else if (m->ter(x, y) == t_rock_red)
m->ter_set(x, y, t_floor_red);
else if (m->ter(x, y) == t_floor_red)
m->ter_set(x, y, t_rock_red);
break;
case t_switch_even:
if ((y - examy) % 2 == 1) {
if (m->ter(x, y) == t_rock_red)
m->ter_set(x, y, t_floor_red);
else if (m->ter(x, y) == t_floor_red)
m->ter_set(x, y, t_rock_red);
else if (m->ter(x, y) == t_rock_green)
m->ter_set(x, y, t_floor_green);
else if (m->ter(x, y) == t_floor_green)
m->ter_set(x, y, t_rock_green);
else if (m->ter(x, y) == t_rock_blue)
m->ter_set(x, y, t_floor_blue);
else if (m->ter(x, y) == t_floor_blue)
m->ter_set(x, y, t_rock_blue);
}
break;
}
}
}
g->add_msg("You hear the rumble of rock shifting.");
g->add_event(EVENT_TEMPLE_SPAWN, g->turn + 3);
}
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;
}
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) {
pick_plant(g, p, m, examx, examy, "apple", t_tree);
}
void iexamine::shrub_blueberry(game *g, player *p, map *m, int examx, int examy) {
pick_plant(g, p, m, examx, examy, "blueberries", 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) {
if(!query_yn("Pick %s?",m->tername(examx, examy).c_str())) return;
p->assign_activity(g, ACT_FORAGE, 500 / (p->skillLevel("survival") + 1), 0);
p->activity.placement = point(examx, examy);
p->moves = 0;
}
void iexamine::recycler(game *g, player *p, map *m, int examx, int examy) {
int ch = menu(true,
"Recycle metal into?:", "Lumps", "Sheets", "Chunks", "Scraps", "Cancel", NULL);
// check for how much steel, by weight, is in the recycler
// only items made of STEEL are checked
// IRON and other metals cannot be turned into STEEL for now
int steel_weight = 0;
int num_lumps = 0;
int num_sheets = 0;
int num_chunks = 0;
int num_scraps = 0;
if (m->i_at(examx, examy).size() == 0)
{
g->add_msg("The recycler is currently empty. Drop some metal items onto it and examine it again.");
return;
}
if (ch == 5)
{
g->add_msg("Never mind.");
return;
}
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"))
steel_weight += it->weight();
m->i_at(examx, examy).erase(m->i_at(examx, examy).begin() + i);
i--;
}
double recover_factor = rng(6, 9) / 10.0;
steel_weight = (int)(steel_weight * recover_factor);
if (steel_weight == 0)
{
g->add_msg("The recycler chews up all the items in its hopper.");
g->add_msg("The recycler beeps: \"No steel to process!\"");
return;
}
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 / (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!\"");
g->add_msg("It spits out an assortment of smaller pieces instead.");
}
break;
case 2: // 1 metal sheet = weight 20
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!\"");
g->add_msg("It spits out an assortment of smaller pieces instead.");
}
break;
case 3: // 1 steel chunk = weight 6
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!\"");
g->add_msg("It spits out an assortment of smaller pieces instead.");
}
break;
case 4: // 1 metal scrap = weight 1
num_scraps = steel_weight / (scrap_weight);
break;
}
for (int i = 0; i < num_lumps; i++)
{
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, "sheet_metal", 0);
}
for (int i = 0; i < num_chunks; i++)
{
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, "scrap", 0);
}
}
void iexamine::trap(game *g, player *p, map *m, int examx, int examy) {
if (g->traps[m->tr_at(examx, examy)]->difficulty < 99 &&
p->per_cur-p->encumb(bp_eyes) >= g->traps[m->tr_at(examx, examy)]->visibility &&
query_yn("There is a %s there. Disarm?",
g->traps[m->tr_at(examx, examy)]->name.c_str())) {
m->disarm_trap(g, examx, examy);
}
else if (m->tr_at(examx, examy) == tr_funnel && m->is_outside(examx, examy) &&
(g->weather == WEATHER_DRIZZLE || g->weather == WEATHER_RAINY ||
g->weather == WEATHER_THUNDER || g->weather == WEATHER_LIGHTNING))
{
water_source(g, p, m, examx, examy);
}
else if (m->tr_at(examx, examy) == tr_funnel && m->is_outside(examx, examy) &&
(g->weather == WEATHER_ACID_DRIZZLE || g->weather == WEATHER_ACID_RAIN))
{
acid_source(g, p, m, examx, examy);
}
}
void iexamine::water_source(game *g, player *p, map *m, const int examx, const int examy)
{
item water = m->water_from(examx, examy);
// Try to handle first (bottling) drink after.
// changed boolean, large sources should be infinite
if (g->handle_liquid(water, true, true))
{
p->moves -= 100;
}
else if (query_yn("Drink from your hands?"))
{
p->inv.push_back(water);
water = p->inv.item_by_type(water.typeId());
p->eat(g, water.invlet);
p->moves -= 350;
}
}
void iexamine::acid_source(game *g, player *p, map *m, const int examx, const int examy)
{
item acid = m->acid_from(examx, examy);
if (g->handle_liquid(acid, true, true))
{
p->moves -= 100;
}
}
+56
View File
@@ -0,0 +1,56 @@
//
// iexamine.h
// Cataclysm
//
// Livingstone
//
#ifndef __Cataclysmic__iexamine__
#define __Cataclysmic__iexamine__
//#include <iostream>
class game;
class item;
class player;
class map;
class iexamine
{
public:
void none (game *g, player *p, map *m, int examx, int examy);
void gaspump (game *g, player *p, map *m, int examx, int examy);
void elevator (game *g, player *p, map *m, int examx, int examy);
void controls_gate(game *g, player *p, map *m, int examx, int examy);
void cardreader (game *g, player *p, map *m, int examx, int examy);
void rubble (game *g, player *p, map *m, int examx, int examy);
void chainfence (game *g, player *p, map *m, int examx, int examy);
void tent (game *g, player *p, map *m, int examx, int examy);
void shelter (game *g, player *p, map *m, int examx, int examy);
void wreckage (game *g, player *p, map *m, int examx, int examy);
void pit (game *g, player *p, map *m, int examx, int examy);
void pit_covered (game *g, player *p, map *m, int examx, int examy);
void fence_post (game *g, player *p, map *m, int examx, int examy);
void remove_fence_rope (game *g, player *p, map *m, int examx, int examy);
void remove_fence_wire (game *g, player *p, map *m, int examx, int examy);
void remove_fence_barbed (game *g, player *p, map *m, int examx, int examy);
void slot_machine (game *g, player *p, map *m, int examx, int examy);
void bulletin_board (game *g, player *p, map *m, int examx, int examy);
void fault (game *g, player *p, map *m, int examx, int examy);
void pedestal_wyrm (game *g, player *p, map *m, int examx, int examy);
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);
void water_source (game *g, player *p, map *m, const int examx, const int examy);
void acid_source (game *g, player *p, map *m, const int examx, const int examy);
};
#endif /* defined(__Cataclysmic__iexamine__) */
+6 -1
View File
@@ -60,7 +60,12 @@ InputEvent get_input(int ch)
case ',':
case 'g':
return Pickup;
case 'f':
case 'F':
return Filter;
case 'r':
case 'R':
return Reset;
default:
return Undefined;
}
+2 -1
View File
@@ -19,7 +19,8 @@ enum InputEvent {
DirectionDown, /* Think stairs */
DirectionUp,
Filter,
Reset,
Pickup,
Nothing,
Undefined
+1197 -298
View File
File diff suppressed because it is too large Load Diff
+75 -25
View File
@@ -4,35 +4,48 @@
#include "item.h"
#include <string>
#include <vector>
#include <list>
class game;
class map;
const extern std::string inv_chars;
typedef std::list< std::list<item> > invstack;
typedef std::vector< std::list<item>* > invslice;
class inventory
{
public:
item& operator[] (int i);
std::vector<item>& stack_at(int i);
std::vector<item> const_stack(int i) const;
std::vector<item> as_vector();
item& front();
item& back();
invslice slice(int start, int length);
invslice slice(const std::list<item>* stack, int length);
// returns an inventory instance containing only the chosen items
// chosen is an invlet-count mapping
inventory subset(std::map<char, int> chosen) const;
std::list<item>& stack_by_letter(char ch);
std::list<item> const_stack(int i) const;
int size() const;
int num_items() const;
bool is_sorted() const;
inventory& operator= (inventory &rhs);
inventory& operator= (const inventory &rhs);
inventory& operator+= (const inventory &rhs);
inventory& operator+= (const item &rhs);
inventory& operator+= (const std::vector<item> &rhs);
inventory& operator+= (const std::list<item> &rhs);
inventory operator+ (const inventory &rhs);
inventory operator+ (const item &rhs);
inventory operator+ (const std::vector<item> &rhs);
inventory operator+ (const std::list<item> &rhs);
inventory filter_by_category(item_cat cat, const player& u) const;
void unsort(); // flags the inventory as unsorted
void sort();
void clear();
void add_stack(std::vector<item> newits);
void push_back(std::vector<item> newits);
void add_item (item newit, bool keep_invlet = false);
void add_stack(std::list<item> newits);
void push_back(std::list<item> newits);
item& add_item (item newit, bool keep_invlet = false); //returns a ref to the added item
void add_item_by_type(itype_id type, int count = 1, int charges = -1);
void add_item_keep_invlet(item newit);
void push_back(item newit);
@@ -44,25 +57,60 @@ class inventory
void form_from_map(game *g, point origin, int distance);
std::vector<item> remove_stack(int index);
item remove_item(int index);
item remove_item(int stack, int index);
std::list<item> remove_stack_by_letter(char ch);
std::list<item> remove_partial_stack(char ch, int amount);
item remove_item(item *it);
item remove_item_by_type(itype_id type);
item remove_item_by_letter(char ch);
item remove_item_by_quantity(int index, int quantity);
item remove_item_by_charges(char ch, int quantity); // charged items, not stacks
std::vector<item> remove_mission_items(int mission_id);
item& item_by_letter(char ch);
int index_by_letter(char ch);
item& item_by_type(itype_id type);
item& item_or_container(itype_id type); // returns an item, or a container of it
std::vector<item*> all_items_by_type(itype_id type);
std::vector<item*> all_ammo(ammotype type);
// Below, "amount" refers to quantity
// "charges" refers to charges
int amount_of (itype_id it);
int charges_of(itype_id it);
int amount_of (itype_id it) const;
int charges_of(itype_id it) const;
void use_amount (itype_id it, int quantity, bool use_container = false);
void use_charges(itype_id it, int quantity);
std::list<item> use_amount (itype_id it, int quantity, bool use_container = false);
std::list<item> use_charges(itype_id it, int quantity);
bool has_amount (itype_id it, int quantity);
bool has_charges(itype_id it, int quantity);
bool has_item(item *it); // Looks for a specific item
bool has_amount (itype_id it, int quantity) const;
bool has_charges(itype_id it, int quantity) const;
bool has_item(item *it) const; // Looks for a specific item
bool has_gun_for_ammo(ammotype type) const;
bool has_active_item(itype_id) const;
bool has_mission_item(int mission_id) const;
int butcher_factor() const;
bool has_artifact_with(art_effect_passive effect) const;
bool has_liquid(itype_id type) const;
item& watertight_container();
// NPC/AI functions
int worst_item_value(npc* p) const;
bool has_enough_painkiller(int pain) const;
item& most_appropriate_painkiller(int pain);
item& best_for_melee(player *p);
item& most_loaded_gun();
void rust_iron_items();
int weight() const;
int volume() const;
int max_active_item_charges(itype_id id) const;
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();
// hack to account for players saving inventory data (including weapon, etc.)
std::string save_str_no_quant() const;
/* TODO: This stuff, I guess?
std::string save();
@@ -70,10 +118,12 @@ class inventory
*/
item nullitem;
std::vector<item> nullstack;
std::list<item> nullstack;
private:
item remove_item(invstack::iterator iter);
void assign_empty_invlet(item &it, player *p = NULL);
std::vector< std::vector<item> > items;
invstack items;
bool sorted;
};
#endif
+447 -263
View File
@@ -1,48 +1,52 @@
#include "game.h"
#include "output.h"
#include "uistate.h"
#include "keypress.h"
#include <string>
#include <vector>
#include <map>
#include <sstream>
#include <algorithm>
const int iCategorieNum = 11;
std::string CATEGORIES[iCategorieNum] =
{"GROUND:", "FIREARMS:", "AMMUNITION:", "CLOTHING:", "FOOD/DRINKS:",
"TOOLS:", "BOOKS:", "WEAPONS:", "MODS/BIONICS", "MEDICINE/DRUGS", "OTHER:"};
std::vector<int> find_firsts(inventory &inv)
//TODO: make this function not have issues with items that are classed as multiple things
std::vector<int> find_firsts(invslice &slice)
{
std::vector<int> firsts;
for (int i = 0; i < iCategorieNum-1; i++) {
firsts.push_back(-1);
}
for (int i = 0; i < inv.size(); i++) {
if (firsts[0] == -1 && inv[i].is_gun()) {
for (int i = 0; i < slice.size(); i++) {
item& it = slice[i]->front();
if (firsts[0] == -1 && it.is_gun()) {
firsts[0] = i;
} else if (firsts[1] == -1 && inv[i].is_ammo()) {
} else if (firsts[1] == -1 && it.is_ammo()) {
firsts[1] = i;
} else if (firsts[2] == -1 && inv[i].is_armor()) {
} else if (firsts[2] == -1 && it.is_armor()) {
firsts[2] = i;
} else if (firsts[3] == -1 && inv[i].is_food_container()) {
} else if (firsts[3] == -1 && it.is_food_container()) {
firsts[3] = i;
} else if (inv[i].is_food()) {
it_comest* comest = dynamic_cast<it_comest*>(inv[i].type);
} else if (it.is_food()) {
it_comest* comest = dynamic_cast<it_comest*>(it.type);
if (firsts[3] == -1 && comest->comesttype != "MED") {
firsts[3] = i;
} else if (firsts[8] == -1 && comest->comesttype == "MED") {
firsts[8] = i;
}
} else if (firsts[4] == -1 && inv[i].is_tool()) {
} else if (firsts[4] == -1 && it.is_tool()) {
firsts[4] = i;
} else if (firsts[5] == -1 && inv[i].is_book()) {
} else if (firsts[5] == -1 && it.is_book()) {
firsts[5] = i;
} else if (firsts[6] == -1 && inv[i].is_weap()) {
} else if (firsts[6] == -1 && it.is_weap()) {
firsts[6] = i;
} else if (firsts[7] == -1 && (inv[i].is_gunmod() || inv[i].is_bionic())) {
} else if (firsts[7] == -1 && (it.is_gunmod() || it.is_bionic())) {
firsts[7] = i;
} else if (firsts[9] == -1 && inv[i].is_other()) {
} else if (firsts[9] == -1 && it.is_other()) {
firsts[9] = i;
}
}
@@ -50,27 +54,40 @@ std::vector<int> find_firsts(inventory &inv)
return firsts;
}
void print_inv_weight_vol(game *g, WINDOW* w_inv, int weight_carried, int vol_carried)
{
// Print weight
mvwprintw(w_inv, 0, 43, "Weight: ");
if (weight_carried >= g->u.weight_capacity() * .25)
{
wprintz(w_inv, c_red, "%4d", weight_carried);
}
else
{
wprintz(w_inv, c_ltgray, "%4d", weight_carried);
}
wprintz(w_inv, c_ltgray, "/%-4d", int(g->u.weight_capacity() * .25));//, g->u.weight_capacity());
// Print volume
mvwprintw(w_inv, 0, 61, "Volume: ");
if (vol_carried > g->u.volume_capacity() - 2)
{
wprintz(w_inv, c_red, "%3d", vol_carried);
}
else
{
wprintz(w_inv, c_ltgray, "%3d", vol_carried);
}
wprintw(w_inv, "/%-3d", g->u.volume_capacity() - 2);
}
void print_inv_statics(game *g, WINDOW* w_inv, std::string title,
std::vector<char> dropped_items)
{
// Print our header
mvwprintw(w_inv, 0, 0, title.c_str());
// Print weight
mvwprintw(w_inv, 0, 45, "Weight: ");
if (g->u.weight_carried() >= g->u.weight_capacity() * .25)
wprintz(w_inv, c_red, "%d", g->u.weight_carried());
else
wprintz(w_inv, c_ltgray, "%d", g->u.weight_carried());
wprintz(w_inv, c_ltgray, "/%d", int(g->u.weight_capacity() * .25));//, g->u.weight_capacity());
// Print volume
mvwprintw(w_inv, 0, 62, "Volume: ");
if (g->u.volume_carried() > g->u.volume_capacity() - 2)
wprintz(w_inv, c_red, "%d", g->u.volume_carried());
else
wprintz(w_inv, c_ltgray, "%d", g->u.volume_carried());
wprintw(w_inv, "/%d", g->u.volume_capacity() - 2);
print_inv_weight_vol(g, w_inv, g->u.weight_carried(), g->u.volume_carried());
// Print our weapon
int n_items = 0;
@@ -113,11 +130,11 @@ void print_inv_statics(game *g, WINDOW* w_inv, std::string title,
}
// Print items carried
for(int ch='a'; ch <= 'z'; ++ch)
n_items += ((g->u.inv.index_by_letter(ch) == -1) ? 0 : 1);
for(int ch='A'; ch <= 'Z'; ++ch)
n_items += ((g->u.inv.index_by_letter(ch) == -1) ? 0 : 1);
mvwprintw(w_inv, 1, 62, "Items: %d/52 ", n_items);
for (std::string::const_iterator invlet = inv_chars.begin();
invlet != inv_chars.end(); invlet++) {
n_items += ((g->u.inv.item_by_letter(*invlet).is_null()) ? 0 : 1);
}
mvwprintw(w_inv, 1, 62, "Items: %d/%d ", n_items, inv_chars.size());
}
// Display current inventory.
@@ -125,31 +142,40 @@ char game::inv(std::string title)
{
WINDOW* w_inv = newwin(((VIEWY < 12) ? 25 : VIEWY*2+1), ((VIEWX < 12) ? 80 : VIEWX*2+56), VIEW_OFFSET_Y, VIEW_OFFSET_X);
const int maxitems = (VIEWY < 12) ? 20 : VIEWY*2-4; // Number of items to show at one time.
char ch = '.';
int start = 0, cur_it;
u.sort_inv();
int ch = (int)'.';
int start = 0, cur_it, max_it;
u.inv.sort();
u.inv.restack(&u);
invslice slice = u.inv.slice(0, u.inv.size());
std::vector<char> null_vector;
print_inv_statics(this, w_inv, title, null_vector);
// Gun, ammo, weapon, armor, food, tool, book, other
std::vector<int> firsts = find_firsts(u.inv);
std::vector<int> firsts = find_firsts(slice);
int selected=-1;
int selected_char=(int)' ';
if( uistate.last_inv_start >= 0 ) start = uistate.last_inv_start;
if( uistate.last_inv_sel >= 0 ) selected = uistate.last_inv_sel;
do {
if (ch == '<' && start > 0) { // Clear lines and shift
selected_char=(int)' ';
if (( ch == '<' || ch == KEY_PPAGE ) && start > 0) { // Clear lines and shift
for (int i = 1; i < maxitems+4; i++)
mvwprintz(w_inv, i, 0, c_black, " ");
start -= maxitems;
if (start < 0)
start = 0;
mvwprintw(w_inv, maxitems + 4, 0, " ");
if ( selected > -1 ) selected = start; // oy, the cheese
}
if (ch == '>' && cur_it < u.inv.size()) { // Clear lines and shift
if ((ch == '>' || ch == KEY_NPAGE ) && cur_it < u.inv.size()) { // Clear lines and shift
start = cur_it;
mvwprintw(w_inv, maxitems + 4, 12, " ");
for (int i = 1; i < maxitems+4; i++)
mvwprintz(w_inv, i, 0, c_black, " ");
if ( selected < start && selected > -1 ) selected = start;
}
int cur_line = 2;
max_it = 0;
for (cur_it = start; cur_it < start + maxitems && cur_line < maxitems+3; cur_it++) {
// Clear the current line;
mvwprintw(w_inv, cur_line, 0, " ");
@@ -160,17 +186,20 @@ char game::inv(std::string title)
cur_line++;
}
}
if (cur_it < u.inv.size()) {
mvwputch (w_inv, cur_line, 0, c_white, u.inv[cur_it].invlet);
mvwprintz(w_inv, cur_line, 1, u.inv[cur_it].color_in_inventory(&u), " %s",
u.inv[cur_it].tname(this).c_str());
if (u.inv.stack_at(cur_it).size() > 1)
wprintw(w_inv, " [%d]", u.inv.stack_at(cur_it).size());
if (u.inv[cur_it].charges > 0)
wprintw(w_inv, " (%d)", u.inv[cur_it].charges);
else if (u.inv[cur_it].contents.size() == 1 &&
u.inv[cur_it].contents[0].charges > 0)
wprintw(w_inv, " (%d)", u.inv[cur_it].contents[0].charges);
if (cur_it < slice.size()) {
item& it = slice[cur_it]->front();
if(cur_it==selected) selected_char=(int)it.invlet;
mvwputch (w_inv, cur_line, 0, (cur_it == selected ? h_white : c_white), it.invlet);
mvwprintz(w_inv, cur_line, 1, (cur_it == selected ? h_white : it.color_in_inventory(&u) ), " %s",
it.tname(this).c_str());
if (slice[cur_it]->size() > 1)
wprintw(w_inv, " [%d]", slice[cur_it]->size());
if (it.charges > 0)
wprintw(w_inv, " (%d)", it.charges);
else if (it.contents.size() == 1 &&
it.contents[0].charges > 0)
wprintw(w_inv, " (%d)", it.contents[0].charges);
max_it=cur_it;
}
cur_line++;
}
@@ -179,96 +208,93 @@ char game::inv(std::string title)
if (cur_it < u.inv.size())
mvwprintw(w_inv, maxitems + 4, 12, "> More items");
wrefresh(w_inv);
ch = getch();
} while (ch == '<' || ch == '>');
if ( ch == KEY_DOWN ) {
if ( selected < 0 ) {
selected = start;
} else {
selected++;
}
if ( selected > max_it ) {
if( cur_it < u.inv.size() ) {
ch='>';
} else {
selected = u.inv.size() - 1; // wraparound?
}
}
} else if ( ch == KEY_UP ) {
selected--;
if ( selected < -1 ) {
selected = -1; // wraparound?
} else if ( selected < start ) {
if ( start > 0 ) {
for (int i = 1; i < maxitems+4; i++)
mvwprintz(w_inv, i, 0, c_black, " ");
start -= maxitems;
if (start < 0)
start = 0;
mvwprintw(w_inv, maxitems + 4, 0, " ");
}
}
} else if ( ch == '\n' || ch == KEY_RIGHT ) {
// 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 );
werase(w_inv);
delwin(w_inv);
erase();
refresh_all();
return ch;
return (char)ch;
}
char game::inv_type(std::string title, int inv_item_type)
char game::inv_type(std::string title, item_cat inv_item_type)
{
// this function lists inventory objects by type
// refer to enum item_cat in itype.h for list of categories
WINDOW* w_inv = newwin(((VIEWY < 12) ? 25 : VIEWY*2+1), ((VIEWX < 12) ? 80 : VIEWX*2+56), VIEW_OFFSET_Y, VIEW_OFFSET_X);
const int maxitems = (VIEWY < 12) ? 20 : VIEWY*2-4; // Number of items to show at one time.
char ch = '.';
int start = 0, cur_it;
u.sort_inv();
int ch = (int)'.';
int start = 0, cur_it, max_it;
u.inv.sort();
u.inv.restack(&u);
std::vector<char> null_vector;
print_inv_statics(this, w_inv, title, null_vector);
// Gun, ammo, weapon, armor, food, tool, book, other
// Create the reduced inventory
inventory reduced_inv = u.inv;
reduced_inv.clear();
int inv_index = 0;
inventory reduced_inv = u.inv.filter_by_category(inv_item_type, u);
if (u.inv.size() > 0)
{
do
{
switch (inv_item_type)
{
case IC_COMESTIBLE: // food
if (u.inv[inv_index].is_food(&u) || u.inv[inv_index].is_food_container(&u))
reduced_inv += u.inv[inv_index];
break;
case IC_AMMO: // ammo
if (u.inv[inv_index].is_ammo() || u.inv[inv_index].is_ammo_container())
reduced_inv += u.inv[inv_index];
break;
case IC_ARMOR: // armour
if (u.inv[inv_index].is_armor())
reduced_inv += u.inv[inv_index];
break;
case IC_BOOK: // books
if (u.inv[inv_index].is_book())
reduced_inv += u.inv[inv_index];
break;
case IC_TOOL: // tools
if (u.inv[inv_index].is_tool())
reduced_inv += u.inv[inv_index];
break;
case IC_CONTAINER: // containers for liquid handling
if (u.inv[inv_index].is_tool() || u.inv[inv_index].is_gun())
{
if (u.inv[inv_index].ammo_type() == AT_GAS)
reduced_inv += u.inv[inv_index];
}
else
{
if (u.inv[inv_index].is_container())
reduced_inv += u.inv[inv_index];
}
break;
}
inv_index++;
} while (inv_index < u.inv.size());
}
std::vector<int> firsts = find_firsts(reduced_inv);
invslice slice = reduced_inv.slice(0, reduced_inv.size());
std::vector<int> firsts = find_firsts(slice);
int selected=-1;
int selected_char=(int)' ';
do {
if (ch == '<' && start > 0) { // Clear lines and shift
if (( ch == '<' || ch == KEY_PPAGE ) && start > 0) { // Clear lines and shift
for (int i = 1; i < maxitems+4; i++)
mvwprintz(w_inv, i, 0, c_black, " ");
start -= maxitems;
if (start < 0)
start = 0;
mvwprintw(w_inv, maxitems + 4, 0, " ");
if ( selected > -1 ) selected = start; // oy, the cheese
}
if (ch == '>' && cur_it < reduced_inv.size()) { // Clear lines and shift
if (( ch == '>' || ch == KEY_NPAGE ) && cur_it < reduced_inv.size()) { // Clear lines and shift
start = cur_it;
mvwprintw(w_inv, maxitems + 4, 12, " ");
for (int i = 1; i < maxitems+4; i++)
mvwprintz(w_inv, i, 0, c_black, " ");
if ( selected < start && selected > -1 ) selected = start;
}
int cur_line = 2;
max_it = 0;
for (cur_it = start; cur_it < start + maxitems && cur_line < maxitems+3; cur_it++) {
// Clear the current line;
mvwprintw(w_inv, cur_line, 0, " ");
@@ -280,19 +306,22 @@ char game::inv_type(std::string title, int inv_item_type)
}
}
if (cur_it < reduced_inv.size())
if (cur_it < slice.size())
{
mvwputch (w_inv, cur_line, 0, c_white, reduced_inv[cur_it].invlet);
mvwprintz(w_inv, cur_line, 1, reduced_inv[cur_it].color_in_inventory(&u), " %s",
reduced_inv[cur_it].tname(this).c_str());
if (reduced_inv.stack_at(cur_it).size() > 1)
wprintw(w_inv, " [%d]", reduced_inv.stack_at(cur_it).size());
if (reduced_inv[cur_it].charges > 0)
wprintw(w_inv, " (%d)", reduced_inv[cur_it].charges);
else if (reduced_inv[cur_it].contents.size() == 1 &&
reduced_inv[cur_it].contents[0].charges > 0)
wprintw(w_inv, " (%d)", reduced_inv[cur_it].contents[0].charges);
cur_line++;
item& it = slice[cur_it]->front();
if(cur_it==selected) selected_char=(int)it.invlet;
mvwputch (w_inv, cur_line, 0, (cur_it == selected ? h_white : c_white), it.invlet);
mvwprintz(w_inv, cur_line, 1, (cur_it == selected ? h_white : it.color_in_inventory(&u) ), " %s",
it.tname(this).c_str());
if (slice[cur_it]->size() > 1)
wprintw(w_inv, " [%d]", slice[cur_it]->size());
if (it.charges > 0)
wprintw(w_inv, " (%d)", it.charges);
else if (it.contents.size() == 1 &&
it.contents[0].charges > 0)
wprintw(w_inv, " (%d)", it.contents[0].charges);
cur_line++;
max_it=cur_it;
}
// cur_line++;
}
@@ -301,52 +330,121 @@ char game::inv_type(std::string title, int inv_item_type)
if (cur_it < reduced_inv.size())
mvwprintw(w_inv, maxitems + 4, 12, "> More items");
wrefresh(w_inv);
ch = getch();
} while (ch == '<' || ch == '>');
if ( ch == KEY_DOWN ) {
if ( selected < 0 ) {
selected = start;
} else {
selected++;
}
if ( selected > max_it ) {
if( cur_it < u.inv.size() ) {
ch='>';
} else {
selected = u.inv.size() - 1; // wraparound?
}
}
} else if ( ch == KEY_UP ) {
selected--;
if ( selected < -1 ) {
selected = -1; // wraparound?
} else if ( selected < start ) {
if ( start > 0 ) {
for (int i = 1; i < maxitems+4; i++)
mvwprintz(w_inv, i, 0, c_black, " ");
start -= maxitems;
if (start < 0)
start = 0;
mvwprintw(w_inv, maxitems + 4, 0, " ");
}
}
} else if ( ch == '\n' || ch == KEY_RIGHT ) {
ch = selected_char;
}
} while (ch == '<' || ch == '>' || ch == KEY_NPAGE || ch == KEY_PPAGE || ch == KEY_UP || ch == KEY_DOWN );
werase(w_inv);
delwin(w_inv);
erase();
refresh_all();
return ch;
return (char)ch;
}
std::vector<item> game::multidrop()
{
u.sort_inv();
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.
int dropping[u.inv.size()]; // Count of how many we'll drop from each stack
for (int i = 0; i < u.inv.size(); i++)
dropping[i] = 0;
std::map<char, int> dropping; // Count of how many we'll drop from each stack
int count = 0; // The current count
std::vector<char> weapon_and_armor; // Always single, not counted
bool warned_about_bionic = false; // Printed add_msg re: dropping bionics
print_inv_statics(this, w_inv, "Multidrop:", weapon_and_armor);
// Gun, ammo, weapon, armor, food, tool, book, other
std::vector<int> firsts = find_firsts(u.inv);
int base_weight = u.weight_carried();
int base_volume = u.volume_carried();
char ch = '.';
int start = 0, cur_it;
int ch = (int)'.';
int start = 0, cur_it, max_it;
invslice stacks = u.inv.slice(0, u.inv.size());
std::vector<int> firsts = find_firsts(stacks);
int selected=-1;
int selected_char=(int)' ';
do {
if (ch == '<' && start > 0) {
for (int i = 1; i < maxitems+4; i++)
mvwprintz(w_inv, i, 0, c_black, " ");
start -= maxitems;
if (start < 0)
start = 0;
mvwprintw(w_inv, maxitems + 4, 0, " ");
}
if (ch == '>' && cur_it < u.inv.size()) {
start = cur_it;
mvwprintw(w_inv, maxitems + 4, 12, " ");
for (int i = 1; i < maxitems+4; i++)
mvwprintz(w_inv, i, 0, c_black, " ");
inventory drop_subset = u.inv.subset(dropping);
int new_weight = base_weight - drop_subset.weight();
int new_volume = base_volume - drop_subset.volume();
for (int i = 0; i < weapon_and_armor.size(); ++i) {
new_weight -= u.i_at(weapon_and_armor[i]).weight();
}
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]) {
@@ -354,83 +452,168 @@ std::vector<item> game::multidrop()
cur_line++;
}
}
if (cur_it < u.inv.size()) {
mvwputch (w_inv, cur_line, 0, c_white, u.inv[cur_it].invlet);
if ( selected < start && selected > -1 ) selected = start;
if (cur_it < stacks.size()) {
item& it = stacks[cur_it]->front();
if(cur_it==selected) selected_char=(int)it.invlet;
mvwputch (w_inv, cur_line, 0, (cur_it == selected ? h_white : c_white), it.invlet);
char icon = '-';
if (dropping[cur_it] >= u.inv.stack_at(cur_it).size())
if (dropping[it.invlet] >= (it.count_by_charges() ? it.charges : stacks[cur_it]->size()))
icon = '+';
else if (dropping[cur_it] > 0)
else if (dropping[it.invlet] > 0)
icon = '#';
nc_color col = (dropping[cur_it] == 0 ? c_ltgray : c_white);
nc_color col = ( cur_it == selected ? h_white : (dropping[it.invlet] == 0 ? c_ltgray : c_white ) );
mvwprintz(w_inv, cur_line, 1, col, " %c %s", icon,
u.inv[cur_it].tname(this).c_str());
if (u.inv.stack_at(cur_it).size() > 1)
wprintz(w_inv, col, " [%d]", u.inv.stack_at(cur_it).size());
if (u.inv[cur_it].charges > 0)
wprintz(w_inv, col, " (%d)", u.inv[cur_it].charges);
else if (u.inv[cur_it].contents.size() == 1 &&
u.inv[cur_it].contents[0].charges > 0)
wprintw(w_inv, " (%d)", u.inv[cur_it].contents[0].charges);
it.tname(this).c_str());
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);
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;
}
if (start > 0)
mvwprintw(w_inv, maxitems + 4, 0, "< Go Back");
if (cur_it < u.inv.size())
mvwprintw(w_inv, maxitems + 4, 12, "> More items");
wrefresh(w_inv);
/* back to (int)getch() as input() mangles arrow keys
ch = input();
*/
ch = getch();
if (ch >= '0' && ch <= '9') {
ch -= '0';
if ( ch == '<' || ch == KEY_PPAGE ) {
if( start > 0) {
for (int i = 1; i < maxitems+4; i++)
mvwprintz(w_inv, i, 0, c_black, " ");
start -= maxitems;
if (start < 0)
start = 0;
mvwprintw(w_inv, maxitems + 4, 0, " ");
if ( selected > -1 ) selected = start; // oy, the cheese
}
} else if ( ch == '>' || ch == KEY_NPAGE ) {
if ( cur_it < u.inv.size()) {
start = cur_it;
mvwprintw(w_inv, maxitems + 4, 12, " ");
for (int i = 1; i < maxitems+4; i++)
mvwprintz(w_inv, i, 0, c_black, " ");
if ( selected < start && selected > -1 ) selected = start;
}
} else if ( ch == KEY_DOWN ) {
if ( selected < 0 ) {
selected = start;
} else {
selected++;
}
if ( selected > max_it ) {
if( cur_it < u.inv.size() ) {
start = cur_it;
mvwprintw(w_inv, maxitems + 4, 12, " ");
for (int i = 1; i < maxitems+4; i++)
mvwprintz(w_inv, i, 0, c_black, " ");
} else {
selected = u.inv.size() - 1; // wraparound?
}
}
} else if ( ch == KEY_UP ) {
selected--;
if ( selected < -1 ) {
selected = -1; // wraparound?
} else if ( selected < start ) {
if ( start > 0 ) {
for (int i = 1; i < maxitems+4; i++)
mvwprintz(w_inv, i, 0, c_black, " ");
start -= maxitems;
if (start < 0)
start = 0;
mvwprintw(w_inv, maxitems + 4, 0, " ");
}
}
} else if (ch >= '0'&& ch <= '9') {
ch = (char)ch - '0';
count *= 10;
count += ch;
} else if (u.has_item(ch)) {
int index = u.inv.index_by_letter(ch);
if (index == -1) { // Not from inventory
int found = false;
for (int i = 0; i < weapon_and_armor.size() && !found; i++) {
if (weapon_and_armor[i] == ch) {
weapon_and_armor.erase(weapon_and_armor.begin() + i);
found = true;
print_inv_statics(this, w_inv, "Multidrop:", weapon_and_armor);
} else { // todo: reformat and maybe rewrite
if ( ch == '\t' || ch == KEY_RIGHT || ch == KEY_LEFT ) {
ch = selected_char;
}
}
if (!found) {
if (ch == u.weapon.invlet && u.weapon.type->id > num_items &&
u.weapon.type->id < num_all_items) {
if (!warned_about_bionic)
add_msg("You cannot drop your %s.", u.weapon.tname(this).c_str());
warned_about_bionic = true;
} else {
weapon_and_armor.push_back(ch);
print_inv_statics(this, w_inv, "Multidrop:", weapon_and_armor);
if (u.has_item(ch)) {
item& it = u.inv.item_by_letter(ch);
if (it.is_null()) { // Not from inventory
int found = false;
for (int i = 0; i < weapon_and_armor.size() && !found; i++) {
if (weapon_and_armor[i] == ch) {
weapon_and_armor.erase(weapon_and_armor.begin() + i);
found = true;
print_inv_statics(this, w_inv, "Multidrop:", weapon_and_armor);
}
}
if (!found) {
if ( ch == u.weapon.invlet &&
std::find(unreal_itype_ids.begin(), unreal_itype_ids.end(), u.weapon.type->id) != unreal_itype_ids.end()){
if (!warned_about_bionic)
add_msg("You cannot drop your %s.", u.weapon.tname(this).c_str());
warned_about_bionic = true;
} else {
weapon_and_armor.push_back(ch);
print_inv_statics(this, w_inv, "Multidrop:", weapon_and_armor);
}
}
} else {
int index = -1;
for (int i = 0; i < stacks.size(); ++i) {
if (stacks[i]->front().invlet == it.invlet) {
index = i;
break;
}
}
if (index == -1) {
debugmsg("Inventory got out of sync with inventory slice?");
}
if (count == 0) {
if (it.count_by_charges())
{
if (dropping[it.invlet] == 0)
dropping[it.invlet] = -1;
else
dropping[it.invlet] = 0;
}
else
{
if (dropping[it.invlet] == 0)
dropping[it.invlet] = stacks[index]->size();
else
dropping[it.invlet] = 0;
}
}
else if (count >= stacks[index]->size() && !it.count_by_charges())
dropping[it.invlet] = stacks[index]->size();
else
dropping[it.invlet] = count;
count = 0;
}
}
}
} else {
if (count == 0) {
if (u.inv.stack_at(index)[0].count_by_charges())
{
if (dropping[index] == 0)
dropping[index] = -1;
else
dropping[index] = 0;
}
else
{
if (dropping[index] == 0)
dropping[index] = u.inv.stack_at(index).size();
else
dropping[index] = 0;
}
}
else if (count >= u.inv.stack_at(index).size() && !u.inv.stack_at(index)[0].count_by_charges())
dropping[index] = u.inv.stack_at(index).size();
else
dropping[index] = count;
count = 0;
}
}
} while (ch != '\n' && ch != KEY_ESCAPE && ch != ' ');
werase(w_inv);
@@ -443,42 +626,30 @@ std::vector<item> game::multidrop()
if (ch != '\n')
return ret; // Canceled!
int current_stack = 0;
int max_size = u.inv.size();
for (int i = 0; i < max_size; i++) {
if (dropping[i] == -1) { // drop whole stack of charges
ret.push_back(u.inv.remove_item(current_stack));
current_stack--;
}
for (int j = 0; j < dropping[i]; j++) {
if (u.inv.stack_at(current_stack)[0].count_by_charges()) { // dropping parts of stacks
int tmpcount = dropping[i];
if (tmpcount >= u.inv.stack_at(current_stack)[0].charges) {
ret.push_back(u.inv.remove_item(current_stack));
current_stack--;
} else {
u.inv.stack_at(current_stack)[0].charges -= tmpcount;
ret.push_back(u.inv.remove_item_by_quantity(current_stack, tmpcount));
}
j = dropping[i];
} else {
if (current_stack >= 0) {
if (u.inv.stack_at(current_stack).size() == 1) {
ret.push_back(u.inv.remove_item(current_stack));
current_stack--;
} else
ret.push_back(u.inv.remove_item(current_stack));
}
}
}
current_stack++;
for (std::map<char,int>::iterator it = dropping.begin(); it != dropping.end(); it++) {
if (it->second == -1)
ret.push_back( u.inv.remove_item_by_letter( it->first));
else if (it->second && u.inv.item_by_letter( it->first).count_by_charges()) {
int charges = u.inv.item_by_letter( it->first).charges;// >= it->second ? : it->second;
ret.push_back( u.inv.remove_item_by_charges( it->first, it->second > charges ? charges : it->second));
} else if (it->second)
for (int j = it->second; j > 0; j--)
ret.push_back( u.inv.remove_item_by_letter( it->first));
}
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;
}
@@ -486,7 +657,7 @@ std::vector<item> game::multidrop()
void game::compare(int iCompareX, int iCompareY)
{
int examx, examy;
char ch = '.';
int ch = (int)'.';
if (iCompareX != -999 && iCompareX != -999) {
examx = iCompareX;
@@ -521,21 +692,22 @@ void game::compare(int iCompareX, int iCompareY)
}
//Only the first 10 Items due to numbering 0-9
const int groundsize = (grounditems.size() > 10 ? 10 : grounditems.size());
u.sort_inv();
u.inv.sort();
u.inv.restack(&u);
invslice stacks = u.inv.slice(0, u.inv.size());
WINDOW* w_inv = newwin(TERMY-VIEW_OFFSET_Y*2, TERMX-VIEW_OFFSET_X*2, VIEW_OFFSET_Y, VIEW_OFFSET_X);
int maxitems = TERMY-5-VIEW_OFFSET_Y*2; // Number of items to show at one time.
int compare[u.inv.size() + groundsize]; // Count of how many we'll drop from each stack
std::vector<int> compare_list; // Count of how many we'll drop from each stack
bool bFirst = false; // First Item selected
bool bShowCompare = false;
char cLastCh;
for (int i = 0; i < u.inv.size() + groundsize; i++)
compare[i] = 0;
compare_list.resize(u.inv.size() + groundsize, 0);
std::vector<char> weapon_and_armor; // Always single, not counted
print_inv_statics(this, w_inv, "Compare:", weapon_and_armor);
// Gun, ammo, weapon, armor, food, tool, book, other
std::vector<int> first = find_firsts(u.inv);
std::vector<int> first = find_firsts(stacks);
std::vector<int> firsts;
if (groundsize > 0) {
firsts.push_back(0);
@@ -546,7 +718,7 @@ void game::compare(int iCompareX, int iCompareY)
ch = '.';
int start = 0, cur_it;
do {
if (ch == '<' && start > 0) {
if (( ch == '<' || ch == KEY_PPAGE ) && start > 0) {
for (int i = 1; i < maxitems+4; i++)
mvwprintz(w_inv, i, 0, c_black, " ");
start -= maxitems;
@@ -554,7 +726,7 @@ void game::compare(int iCompareX, int iCompareY)
start = 0;
mvwprintw(w_inv, maxitems + 4, 0, " ");
}
if (ch == '>' && cur_it < u.inv.size() + groundsize) {
if (( ch == '>' || ch == KEY_NPAGE ) && cur_it < u.inv.size() + groundsize) {
start = cur_it;
mvwprintw(w_inv, maxitems + 4, 12, " ");
for (int i = 1; i < maxitems+4; i++)
@@ -575,25 +747,26 @@ void game::compare(int iCompareX, int iCompareY)
}
if (cur_it < u.inv.size() + groundsize) {
char icon = '-';
if (compare[cur_it] == 1)
if (compare_list[cur_it] == 1)
icon = '+';
if (cur_it < groundsize) {
mvwputch (w_inv, cur_line, 0, c_white, '1'+((cur_it<9) ? cur_it: -1));
nc_color col = (compare[cur_it] == 0 ? c_ltgray : c_white);
nc_color col = (compare_list[cur_it] == 0 ? c_ltgray : c_white);
mvwprintz(w_inv, cur_line, 1, col, " %c %s", icon,
grounditems[cur_it].tname(this).c_str());
} else {
mvwputch (w_inv, cur_line, 0, c_white, u.inv[cur_it-groundsize].invlet);
nc_color col = (compare[cur_it] == 0 ? c_ltgray : c_white);
item& it = stacks[cur_it-groundsize]->front();
mvwputch (w_inv, cur_line, 0, c_white, it.invlet);
nc_color col = (compare_list[cur_it] == 0 ? c_ltgray : c_white);
mvwprintz(w_inv, cur_line, 1, col, " %c %s", icon,
u.inv[cur_it-groundsize].tname(this).c_str());
if (u.inv.stack_at(cur_it-groundsize).size() > 1)
wprintz(w_inv, col, " [%d]", u.inv.stack_at(cur_it-groundsize).size());
if (u.inv[cur_it-groundsize].charges > 0)
wprintz(w_inv, col, " (%d)", u.inv[cur_it-groundsize].charges);
else if (u.inv[cur_it-groundsize].contents.size() == 1 &&
u.inv[cur_it-groundsize].contents[0].charges > 0)
wprintw(w_inv, " (%d)", u.inv[cur_it-groundsize].contents[0].charges);
it.tname(this).c_str());
if (stacks[cur_it-groundsize]->size() > 1)
wprintz(w_inv, col, " [%d]", stacks[cur_it-groundsize]->size());
if (it.charges > 0)
wprintz(w_inv, col, " (%d)", it.charges);
else if (it.contents.size() == 1 &&
it.contents[0].charges > 0)
wprintw(w_inv, " (%d)", it.contents[0].charges);
}
}
cur_line++;
@@ -605,8 +778,8 @@ void game::compare(int iCompareX, int iCompareY)
wrefresh(w_inv);
ch = getch();
if (u.has_item(ch)) {
int index = u.inv.index_by_letter(ch);
if (index == -1) { // Not from inventory
item& it = u.inv.item_by_letter(ch);
if (it.is_null()) { // Not from inventory
bool found = false;
for (int i = 0; i < weapon_and_armor.size() && !found; i++) {
if (weapon_and_armor[i] == ch) {
@@ -617,8 +790,9 @@ void game::compare(int iCompareX, int iCompareY)
}
}
if (!found) {
if (ch == u.weapon.invlet && u.weapon.type->id > num_items &&
u.weapon.type->id < num_all_items) {
if ( ch == u.weapon.invlet &&
std::find(unreal_itype_ids.begin(), unreal_itype_ids.end(), u.weapon.type->id) != unreal_itype_ids.end()){
//Do Bionic stuff here?!
} else {
if (!bFirst)
@@ -633,14 +807,24 @@ void game::compare(int iCompareX, int iCompareY)
}
}
} else {
if (compare[index+groundsize] == 1)
int index = -1;
for (int i = 0; i < stacks.size(); ++i) {
if (stacks[i]->front().invlet == it.invlet) {
index = i;
break;
}
}
if (index == -1) {
debugmsg("Inventory got out of sync with inventory slice?");
}
if (compare_list[index+groundsize] == 1)
{
compare[index+groundsize] = 0;
compare_list[index+groundsize] = 0;
bFirst = false;
} else {
if (!bFirst)
{
compare[index+groundsize] = 1;
compare_list[index+groundsize] = 1;
bFirst = true;
cLastCh = ch;
} else {
@@ -654,14 +838,14 @@ void game::compare(int iCompareX, int iCompareY)
if (ch == '0') {
iZero = 10;
}
if (compare[ch-'1'+iZero] == 1)
if (compare_list[ch-'1'+iZero] == 1)
{
compare[ch-'1'+iZero] = 0;
compare_list[ch-'1'+iZero] = 0;
bFirst = false;
} else {
if (!bFirst)
{
compare[ch-'1'+iZero] = 1;
compare_list[ch-'1'+iZero] = 1;
bFirst = true;
cLastCh = ch;
} else {
+727 -438
View File
File diff suppressed because it is too large Load Diff
+108 -50
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
@@ -41,11 +45,12 @@ public:
item(std::string itemdata, game *g);
~item();
void make(itype* it);
void clear(); // cleanup that's required to re-use an item variable
// returns the default container of this item, with this item in it
item in_its_container(std::vector<itype*> *itypes);
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);
@@ -56,85 +61,98 @@ public:
int clip_size();
int accuracy();
int gun_damage(bool with_ammo = true);
int noise();
int noise() const;
int burst_size();
int recoil(bool with_ammo = true);
int range(player *p = NULL);
ammotype ammo_type();
int pick_reload_ammo(player &u, bool interactive);
bool reload(player &u, int index);
ammotype ammo_type() const;
char pick_reload_ammo(player &u, bool interactive);
bool reload(player &u, char invlet);
void next_mode();
std::string save_info(); // Formatted for save files
std::string save_info() const; // Formatted for save files
void load_info(std::string data, game *g);
//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();
int price();
char symbol() const;
nc_color color() const;
int price() const;
bool invlet_is_okay();
bool stacks_with(item rhs);
void put_in(item payload);
int weight();
int volume();
int weight() const;
int volume() const;
int volume_contained();
int attack_time();
int damage_bash();
int damage_cut();
bool has_flag(item_flag f);
int damage_cut() const;
bool has_flag(std::string f) const;
bool has_technique(technique_id t, player *p = NULL);
int has_gunmod(int type);
int has_gunmod(itype_id type);
item* active_gunmod();
item const* inspect_active_gunmod() const;
std::vector<technique_id> techniques();
bool goes_bad();
bool count_by_charges();
bool count_by_charges() const;
bool craft_has_charges();
int num_charges();
bool rotten(game *g);
bool ready_to_revive(game *g); // used for corpses
// Our value as a weapon, given particular skills
int weapon_value(int skills[num_skill_types]);
int weapon_value(player *p) const;
// As above, but discounts its use as a ranged weapon
int melee_value (int skills[num_skill_types]);
int melee_value (player *p);
// 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);
bool conductive(); // Electricity
bool made_of(std::string mat_ident) const;
std::string get_material(int m) const;
bool made_of(phase_id phase) const;
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(); // True if type is NULL, or points to the null item (id == 0)
bool is_food(player *u);// Some non-food items are food to certain players
bool is_food_container(player *u); // Ditto
bool is_food(); // Ignoring the ability to eat batteries, etc.
bool is_food_container(); // Ignoring the ability to eat batteries, etc.
bool is_ammo_container();
bool is_drink();
bool is_weap();
bool is_bashing_weapon();
bool is_cutting_weapon();
bool is_gun();
bool is_silent();
bool is_gunmod();
bool is_bionic();
bool is_ammo();
bool is_armor();
bool is_book();
bool is_container();
bool is_tool();
bool is_software();
bool is_macguffin();
bool is_style();
bool is_other(); // Doesn't belong in other categories
bool is_var_veh_part();
bool is_artifact();
bool is_null() const; // True if type is NULL, or points to the null item (id == 0)
bool is_food(player const*u) const;// Some non-food items are food to certain players
bool is_food_container(player const*u) const; // Ditto
bool is_food() const; // Ignoring the ability to eat batteries, etc.
bool is_food_container() const; // Ignoring the ability to eat batteries, etc.
bool is_ammo_container() const;
bool is_drink() const;
bool is_weap() const;
bool is_bashing_weapon() const;
bool is_cutting_weapon() const;
bool is_gun() const;
bool is_silent() const;
bool is_gunmod() const;
bool is_bionic() const;
bool is_ammo() const;
bool is_armor() const;
bool is_book() const;
bool is_container() const;
bool is_tool() const;
bool is_software() const;
bool is_macguffin() const;
bool is_style() const;
bool is_stationary() const;
bool is_other() const; // Doesn't belong in other categories
bool is_var_veh_part() const;
bool is_artifact() const;
int typeId();
bool operator<(const item& other) const;
itype* type;
itype_id typeId() const;
itype* type;
mtype* corpse;
it_ammo* curammo;
@@ -145,25 +163,65 @@ 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{
int poison; // How badly poisoned is it?
int bigness; // engine power, wheel size
int frequency; // Radio frequency
int note; // Associated dynamic text snippet.
int irridation; // Tracks radiation dosage.
};
int mode; // Mode of operation, can be changed by the player.
std::string mode; // Mode of operation, can be changed by the player.
std::set<std::string> item_tags; // generic item specific flags
unsigned item_counter; // generic counter to be used with item flags
int mission_id;// Refers to a mission in game's master list
int player_id; // Only give a mission to the right player!
static itype * nullitem();
item clone();
private:
int sort_rank() const;
static itype * nullitem_m;
};
std::ostream & operator<<(std::ostream &, const item &);
std::ostream & operator<<(std::ostream &, const item *);
struct map_item_stack
{
public:
item example; //an example item for showing stats, etc.
int x;
int y;
int count;
//only expected to be used for things like lists and vectors
map_item_stack()
{
example = item();
x = 0;
y = 0;
count = 0;
}
map_item_stack(item it, int arg_x, int arg_y)
{
example = it;
x = arg_x;
y = arg_y;
count = 1;
}
};
//the assigned numbers are a result of legacy stuff in compare_split_screen_popup(),
//it would be better long-term to rewrite stuff so that we don't need that hack
enum hint_rating {
HINT_CANT = 0, //meant to display as gray
HINT_IFFY = 1, //meant to display as red
HINT_GOOD = -999 // meant to display as green
};
#endif
+896
View File
@@ -0,0 +1,896 @@
#include "item_factory.h"
#include "rng.h"
#include "enums.h"
#include "catajson.h"
#include "addiction.h"
#include <algorithm>
#include <cstdlib>
#include <iostream>
#include <fstream>
#include <stdio.h>
// mfb(n) converts a flag to its appropriate position in covers's bitfield
#ifndef mfb
#define mfb(n) long(1 << (n))
#endif
Item_factory* item_controller = new Item_factory();
//Every item factory comes with a missing item
Item_factory::Item_factory(){
init();
m_missing_item = new itype();
m_missing_item->name = "Error: Item Missing.";
m_missing_item->description = "There is only the space where an object should be, but isn't. No item template of this type exists.";
m_templates["MISSING_ITEM"]=m_missing_item;
}
void Item_factory::init(){
//Populate the iuse functions
iuse_function_list["NONE"] = &iuse::none;
iuse_function_list["SEWAGE"] = &iuse::sewage;
iuse_function_list["HONEYCOMB"] = &iuse::honeycomb;
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;
iuse_function_list["PKILL_1"] = &iuse::pkill_1;
iuse_function_list["PKILL_2"] = &iuse::pkill_2;
iuse_function_list["PKILL_3"] = &iuse::pkill_3;
iuse_function_list["PKILL_4"] = &iuse::pkill_4;
iuse_function_list["PKILL_L"] = &iuse::pkill_l;
iuse_function_list["XANAX"] = &iuse::xanax;
iuse_function_list["CIG"] = &iuse::cig;
iuse_function_list["ANTIBIOTIC"] = &iuse::antibiotic;
iuse_function_list["WEED"] = &iuse::weed;
iuse_function_list["COKE"] = &iuse::coke;
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;
iuse_function_list["PROZAC"] = &iuse::prozac;
iuse_function_list["SLEEP"] = &iuse::sleep;
iuse_function_list["IODINE"] = &iuse::iodine;
iuse_function_list["FLUMED"] = &iuse::flumed;
iuse_function_list["FLUSLEEP"] = &iuse::flusleep;
iuse_function_list["INHALER"] = &iuse::inhaler;
iuse_function_list["BLECH"] = &iuse::blech;
iuse_function_list["MUTAGEN"] = &iuse::mutagen;
iuse_function_list["PURIFIER"] = &iuse::purifier;
iuse_function_list["MARLOSS"] = &iuse::marloss;
iuse_function_list["DOGFOOD"] = &iuse::dogfood;
// TOOLS
iuse_function_list["LIGHTER"] = &iuse::lighter;
iuse_function_list["PRIMITIVE_FIRE"] = &iuse::primitive_fire;
iuse_function_list["SEW"] = &iuse::sew;
iuse_function_list["EXTRA_BATTERY"] = &iuse::extra_battery;
iuse_function_list["SCISSORS"] = &iuse::scissors;
iuse_function_list["EXTINGUISHER"] = &iuse::extinguisher;
iuse_function_list["HAMMER"] = &iuse::hammer;
iuse_function_list["LIGHT_OFF"] = &iuse::light_off;
iuse_function_list["LIGHT_ON"] = &iuse::light_on;
iuse_function_list["GASOLINE_LANTERN_OFF"] = &iuse::gasoline_lantern_off;
iuse_function_list["GASOLINE_LANTERN_ON"] = &iuse::gasoline_lantern_on;
iuse_function_list["LIGHTSTRIP"] = &iuse::lightstrip;
iuse_function_list["LIGHTSTRIP_ACTIVE"] = &iuse::lightstrip_active;
iuse_function_list["GLOWSTICK"] = &iuse::glowstick;
iuse_function_list["GLOWSTICK_ACTIVE"] = &iuse::glowstick_active;
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;
iuse_function_list["RADIO_ON"] = &iuse::radio_on;
iuse_function_list["NOISE_EMITTER_OFF"] = &iuse::noise_emitter_off;
iuse_function_list["NOISE_EMITTER_ON"] = &iuse::noise_emitter_on;
iuse_function_list["ROADMAP"] = &iuse::roadmap;
//// These have special arguments and won't work here
//iuse_function_list["ROADMAP_A_TARGET"] = &iuse::roadmap_a_target;
//iuse_function_list["ROADMAP_TARGETS"] = &iuse::roadmap_targets;
iuse_function_list["PICKLOCK"] = &iuse::picklock;
iuse_function_list["CROWBAR"] = &iuse::crowbar;
iuse_function_list["MAKEMOUND"] = &iuse::makemound;
iuse_function_list["DIG"] = &iuse::dig;
iuse_function_list["SIPHON"] = &iuse::siphon;
iuse_function_list["CHAINSAW_OFF"] = &iuse::chainsaw_off;
iuse_function_list["CHAINSAW_ON"] = &iuse::chainsaw_on;
iuse_function_list["JACKHAMMER"] = &iuse::jackhammer;
iuse_function_list["JACQUESHAMMER"] = &iuse::jacqueshammer;
iuse_function_list["PICKAXE"] = &iuse::pickaxe;
iuse_function_list["SET_TRAP"] = &iuse::set_trap;
iuse_function_list["GEIGER"] = &iuse::geiger;
iuse_function_list["TELEPORT"] = &iuse::teleport;
iuse_function_list["CAN_GOO"] = &iuse::can_goo;
iuse_function_list["PIPEBOMB"] = &iuse::pipebomb;
iuse_function_list["PIPEBOMB_ACT"] = &iuse::pipebomb_act;
iuse_function_list["GRENADE"] = &iuse::grenade;
iuse_function_list["GRENADE_ACT"] = &iuse::grenade_act;
iuse_function_list["FLASHBANG"] = &iuse::flashbang;
iuse_function_list["FLASHBANG_ACT"] = &iuse::flashbang_act;
iuse_function_list["C4"] = &iuse::c4;
iuse_function_list["C4ARMED"] = &iuse::c4armed;
iuse_function_list["EMPBOMB"] = &iuse::EMPbomb;
iuse_function_list["EMPBOMB_ACT"] = &iuse::EMPbomb_act;
iuse_function_list["SCRAMBLER"] = &iuse::scrambler;
iuse_function_list["SCRAMBLER_ACT"] = &iuse::scrambler_act;
iuse_function_list["GASBOMB"] = &iuse::gasbomb;
iuse_function_list["GASBOMB_ACT"] = &iuse::gasbomb_act;
iuse_function_list["SMOKEBOMB"] = &iuse::smokebomb;
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;
iuse_function_list["DYNAMITE_ACT"] = &iuse::dynamite_act;
iuse_function_list["FIRECRACKER_PACK"] = &iuse::firecracker_pack;
iuse_function_list["FIRECRACKER_PACK_ACT"] = &iuse::firecracker_pack_act;
iuse_function_list["FIRECRACKER"] = &iuse::firecracker;
iuse_function_list["FIRECRACKER_ACT"] = &iuse::firecracker_act;
iuse_function_list["MININUKE"] = &iuse::mininuke;
iuse_function_list["MININUKE_ACT"] = &iuse::mininuke_act;
iuse_function_list["PHEROMONE"] = &iuse::pheromone;
iuse_function_list["PORTAL"] = &iuse::portal;
iuse_function_list["MANHACK"] = &iuse::manhack;
iuse_function_list["TURRET"] = &iuse::turret;
iuse_function_list["UPS_OFF"] = &iuse::UPS_off;
iuse_function_list["UPS_ON"] = &iuse::UPS_on;
iuse_function_list["TAZER"] = &iuse::tazer;
iuse_function_list["MP3"] = &iuse::mp3;
iuse_function_list["MP3_ON"] = &iuse::mp3_on;
iuse_function_list["VORTEX"] = &iuse::vortex;
iuse_function_list["DOG_WHISTLE"] = &iuse::dog_whistle;
iuse_function_list["VACUTAINER"] = &iuse::vacutainer;
iuse_function_list["KNIFE"] = &iuse::knife;
iuse_function_list["LUMBER"] = &iuse::lumber;
iuse_function_list["HACKSAW"] = &iuse::hacksaw;
iuse_function_list["TENT"] = &iuse::tent;
iuse_function_list["SHELTER"] = &iuse::shelter;
iuse_function_list["TORCH"] = &iuse::torch;
iuse_function_list["TORCH_LIT"] = &iuse::torch_lit;
iuse_function_list["CANDLE"] = &iuse::candle;
iuse_function_list["CANDLE_LIT"] = &iuse::candle_lit;
iuse_function_list["BULLET_PULLER"] = &iuse::bullet_puller;
iuse_function_list["BOLTCUTTERS"] = &iuse::boltcutters;
iuse_function_list["MOP"] = &iuse::mop;
iuse_function_list["SPRAY_CAN"] = &iuse::spray_can;
iuse_function_list["RAG"] = &iuse::rag;
iuse_function_list["PDA"] = &iuse::pda;
iuse_function_list["PDA_FLASHLIGHT"] = &iuse::pda_flashlight;
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
// This function is used when an artifact is activated
// It examines the item's artifact-specific properties
// See artifact.h for a list
iuse_function_list["ARTIFACT"] = &iuse::artifact;
// Offensive Techniques
techniques_list["SWEEP"] = mfb(TEC_SWEEP);
techniques_list["PRECISE"] = mfb(TEC_PRECISE);
techniques_list["BRUTAL"] = mfb(TEC_BRUTAL);
techniques_list["GRAB"] = mfb(TEC_GRAB);
techniques_list["WIDE"] = mfb(TEC_WIDE);
techniques_list["RAPID"] = mfb(TEC_RAPID);
techniques_list["FEINT"] = mfb(TEC_FEINT);
techniques_list["THROW"] = mfb(TEC_THROW);
techniques_list["DISARM"] = mfb(TEC_DISARM);
// Defensive Techniques
techniques_list["BLOCK"] = mfb(TEC_BLOCK);
techniques_list["BLOCK_LEGS"] = mfb(TEC_BLOCK_LEGS);
techniques_list["WBLOCK_1"] = mfb(TEC_WBLOCK_1);
techniques_list["WBLOCK_2"] = mfb(TEC_WBLOCK_2);
techniques_list["WBLOCK_3"] = mfb(TEC_WBLOCK_3);
techniques_list["COUNTER"] = mfb(TEC_COUNTER);
techniques_list["BREAK"] = mfb(TEC_BREAK);
techniques_list["DEF_THROW"] = mfb(TEC_DEF_THROW);
techniques_list["DEF_DISARM"] = mfb(TEC_DEF_DISARM);
//Ammo lists
ammo_flags_list["NULL"] = mfb(AT_NULL);
ammo_flags_list["THREAD"] = mfb(AT_THREAD);
ammo_flags_list["BATT"] = mfb(AT_BATT);
ammo_flags_list["PLUT"] = mfb(AT_PLUT);
ammo_flags_list["NAIL"] = mfb(AT_NAIL);
ammo_flags_list["BB"] = mfb(AT_BB);
ammo_flags_list["BOLT"] = mfb(AT_BOLT);
ammo_flags_list["ARROW"] = mfb(AT_ARROW);
ammo_flags_list["SHOT"] = mfb(AT_SHOT);
ammo_flags_list["22"] = mfb(AT_22);
ammo_flags_list["9MM"] = mfb(AT_9MM);
ammo_flags_list["762x25"] = mfb(AT_762x25);
ammo_flags_list["38"] = mfb(AT_38);
ammo_flags_list["40"] = mfb(AT_40);
ammo_flags_list["44"] = mfb(AT_44);
ammo_flags_list["45"] = mfb(AT_45);
ammo_flags_list["57"] = mfb(AT_57);
ammo_flags_list["46"] = mfb(AT_46);
ammo_flags_list["762"] = mfb(AT_762);
ammo_flags_list["223"] = mfb(AT_223);
ammo_flags_list["3006"] = mfb(AT_3006);
ammo_flags_list["308"] = mfb(AT_308);
ammo_flags_list["40MM"] = mfb(AT_40MM);
ammo_flags_list["66MM"] = mfb(AT_66MM);
ammo_flags_list["GAS"] = mfb(AT_GAS);
ammo_flags_list["FUSION"] = mfb(AT_FUSION);
ammo_flags_list["MUSCLE"] = mfb(AT_MUSCLE);
ammo_flags_list["12MM"] = mfb(AT_12MM);
ammo_flags_list["PLASMA"] = mfb(AT_PLASMA);
ammo_flags_list["WATER"] = mfb(AT_WATER);
ammo_flags_list["PEBBLE"] = mfb(AT_PEBBLE);
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);
ammo_effects_list["ACIDBOMB"] = mfb(AMMO_ACIDBOMB);
ammo_effects_list["EXPLOSIVE_BIG"] = mfb(AMMO_EXPLOSIVE_BIG);
ammo_effects_list["TEARGAS"] = mfb(AMMO_TEARGAS);
ammo_effects_list["SMOKE"] = mfb(AMMO_SMOKE);
ammo_effects_list["TRAIL"] = mfb(AMMO_TRAIL);
ammo_effects_list["FLASHBANG"] = mfb(AMMO_FLASHBANG);
ammo_effects_list["STREAM"] = mfb(AMMO_STREAM);
ammo_effects_list["COOKOFF"] = mfb(AMMO_COOKOFF);
ammo_effects_list["LASER"] = mfb(AMMO_LASER);
bodyparts_list["TORSO"] = mfb(bp_torso);
bodyparts_list["HEAD"] = mfb(bp_head);
bodyparts_list["EYES"] = mfb(bp_eyes);
bodyparts_list["MOUTH"] = mfb(bp_mouth);
bodyparts_list["ARMS"] = mfb(bp_arms);
bodyparts_list["HANDS"] = mfb(bp_hands);
bodyparts_list["LEGS"] = mfb(bp_legs);
bodyparts_list["FEET"] = mfb(bp_feet);
}
//Will eventually be deprecated - Loads existing item format into the item factory, and vice versa
void Item_factory::init(game* main_game){
load_item_templates(); // this one HAS to be called after game is created
// Make a copy of our items loaded from JSON
std::map<Item_tag, itype*> new_templates = m_templates;
//Copy the hardcoded template pointers to the factory list
m_templates.insert(main_game->itypes.begin(), main_game->itypes.end());
//Copy the JSON-derived items to the legacy list
main_game->itypes.insert(new_templates.begin(), new_templates.end());
//And add them to the various item lists, as needed.
for(std::map<Item_tag, itype*>::iterator iter = new_templates.begin(); iter != new_templates.end(); ++iter) {
standard_itype_ids.push_back(iter->first);
}
}
//Returns the template with the given identification tag
itype* Item_factory::find_template(const Item_tag id){
std::map<Item_tag, itype*>::iterator found = m_templates.find(id);
if(found != m_templates.end()){
return found->second;
}
else{
return m_missing_item;
}
}
//Returns a random template from the list of all templates.
itype* Item_factory::random_template(){
return template_from("ALL");
}
//Returns a random template from those with the given group tag
itype* Item_factory::template_from(const Item_tag group_tag){
return find_template( id_from(group_tag) );
}
//Returns a random template name from the list of all templates.
const Item_tag Item_factory::random_id(){
return id_from("ALL");
}
//Returns a random template name from the list of all templates.
const Item_tag Item_factory::id_from(const Item_tag group_tag){
std::map<Item_tag, Item_group*>::iterator group_iter = m_template_groups.find(group_tag);
//If the tag isn't found, just return a reference to missing item.
if(group_iter != m_template_groups.end()){
return group_iter->second->get_id();
} else {
return "MISSING_ITEM";
}
}
item Item_factory::create(Item_tag id, int created_at){
return item(find_template(id), created_at);
}
Item_list Item_factory::create(Item_tag id, int created_at, int quantity){
Item_list new_items;
item new_item_base = create(id, created_at);
for(int ii=0;ii<quantity;++ii){
new_items.push_back(new_item_base.clone());
}
return new_items;
}
item Item_factory::create_from(Item_tag group, int created_at){
return create(id_from(group), created_at);
}
Item_list Item_factory::create_from(Item_tag group, int created_at, int quantity){
return create(id_from(group), created_at, quantity);
}
item Item_factory::create_random(int created_at){
return create(random_id(), created_at);
}
Item_list Item_factory::create_random(int created_at, int quantity){
Item_list new_items;
item new_item_base = create(random_id(), created_at);
for(int ii=0;ii<quantity;++ii){
new_items.push_back(new_item_base.clone());
}
return new_items;
}
///////////////////////
// DATA FILE READING //
///////////////////////
void Item_factory::load_item_templates(){
load_item_templates_from("data/raw/items/melee.json");
load_item_templates_from("data/raw/items/ranged.json");
load_item_templates_from("data/raw/items/ammo.json");
load_item_templates_from("data/raw/items/mods.json");
load_item_templates_from("data/raw/items/tools.json");
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");
}
// Load values from this data file into m_templates
void Item_factory::load_item_templates_from(const std::string file_name){
catajson all_items(file_name);
if (! all_items.is_array()) {
debugmsg("%s is not an array of item_templates", file_name.c_str());
exit(2);
}
//Crawl through and extract the items
for (all_items.set_begin(); all_items.has_curr(); all_items.next()) {
catajson entry = all_items.curr();
// The one element we absolutely require for an item definition is an id
if(!entry.has("id") || !entry.get("id").is_string())
{
debugmsg("Item definition skipped, no id found or id was malformed.");
}
else
{
Item_tag new_id = entry.get("id").as_string();
// If everything works out, add the item to the group list...
// unless a similar item is already there
if(m_templates.find(new_id) != m_templates.end())
{
debugmsg("Item definition skipped, id %s already exists.", new_id.c_str());
}
else
{
itype* new_item_template;
if (!entry.has("type"))
{
new_item_template = new itype();
}
else
{
std::string type_label = entry.get("type").as_string();
if (type_label == "GUNMOD")
{
it_gunmod* gunmod_template = new it_gunmod();
gunmod_template->damage = entry.get("damage_modifier").as_int();;
gunmod_template->loudness = entry.get("loudness_modifier").as_int();
gunmod_template->newtype = ammo_from_string(entry.get("ammo_modifier").as_string());
gunmod_template->used_on_pistol = is_mod_target(entry.get("mod_targets"), "pistol");
gunmod_template->used_on_shotgun = is_mod_target(entry.get("mod_targets"), "shotgun");
gunmod_template->used_on_smg = is_mod_target(entry.get("mod_targets"), "smg");
gunmod_template->used_on_rifle = is_mod_target(entry.get("mod_targets"), "rifle");
gunmod_template->accuracy = entry.get("accuracy_modifier").as_int();
gunmod_template->recoil = entry.get("recoil_modifier").as_int();
gunmod_template->burst = entry.get("burst_modifier").as_int();
gunmod_template->clip = entry.get("clip_size_modifier").as_int();
gunmod_template->acceptible_ammo_types = (!entry.has("acceptable_ammo") ? 0 : flags_from_json(entry.get("acceptable_ammo"), "ammo"));
new_item_template = gunmod_template;
}
else if (type_label == "COMESTIBLE")
{
it_comest* comest_template = new it_comest();
comest_template->comesttype = entry.get("comestible_type").as_string();
comest_template->tool = entry.get("tool").as_string();
comest_template->container = entry.get("container").as_string();
comest_template->quench = entry.get("quench").as_int();
comest_template->nutr = entry.get("nutrition").as_int();
comest_template->spoils = entry.get("spoils_in").as_int();
comest_template->addict = entry.get("addiction_potential").as_int();
comest_template->charges = entry.get("charges").as_int();
comest_template->stim = entry.get("stim").as_int();
comest_template->healthy = entry.get("heal").as_int();
comest_template->fun = entry.get("fun").as_int();
comest_template->add = addiction_type(entry.get("addiction_type").as_string());
new_item_template = comest_template;
}
else if (type_label == "GUN")
{
it_gun* gun_template = new it_gun();
gun_template->ammo = ammo_from_string(entry.get("ammo").as_string());
gun_template->skill_used = Skill::skill(entry.get("skill").as_string());
gun_template->dmg_bonus = entry.get("ranged_damage").as_int();
gun_template->range = entry.get("range").as_int();
gun_template->accuracy = entry.get("accuracy").as_int();
gun_template->recoil = entry.get("recoil").as_int();
gun_template->durability = entry.get("durability").as_int();
gun_template->burst = entry.get("burst").as_int();
gun_template->clip = entry.get("clip_size").as_int();
gun_template->reload_time = entry.get("reload").as_int();
new_item_template = gun_template;
}
else if (type_label == "TOOL")
{
it_tool* tool_template = new it_tool();
tool_template->ammo = ammo_from_string(entry.get("ammo").as_string());
tool_template->max_charges = entry.get("max_charges").as_int();
tool_template->def_charges = entry.get("initial_charges").as_int();
tool_template->charges_per_use = entry.get("charges_per_use").as_int();
tool_template->turns_per_charge = entry.get("turns_per_charge").as_int();
tool_template->revert_to = entry.get("revert_to").as_string();
new_item_template = tool_template;
}
else if (type_label == "AMMO")
{
it_ammo* ammo_template = new it_ammo();
ammo_template->type =
ammo_from_string(
entry.get("ammo_type").as_string());
ammo_template->damage = entry.get("damage").as_int();
ammo_template->pierce = entry.get("pierce").as_int();
ammo_template->range = entry.get("range").as_int();
ammo_template->accuracy =
entry.get("accuracy").as_int();
ammo_template->recoil = entry.get("recoil").as_int();
ammo_template->count = entry.get("count").as_int();
ammo_template->ammo_effects =
(!entry.has("effects") ? 0 :
flags_from_json(entry.get("effects"),
"ammo_effects"));
new_item_template = ammo_template;
}
else if (type_label == "ARMOR")
{
it_armor* armor_template = new it_armor();
armor_template->encumber = entry.get("encumberance").as_int();
armor_template->coverage = entry.get("coverage").as_int();
armor_template->thickness = entry.get("material_thickness").as_int();
armor_template->env_resist = entry.get("enviromental_protection").as_int();
armor_template->warmth = entry.get("warmth").as_int();
armor_template->storage = entry.get("storage").as_int();
armor_template->power_armor = entry.has("power_armor") ? entry.get("power_armor").as_bool() : false;
armor_template->covers = entry.has("covers") ?
flags_from_json(entry.get("covers"),"bodyparts") : 0;
new_item_template = armor_template;
}
else if (type_label == "BOOK")
{
it_book* book_template = new it_book();
book_template->level = entry.get("max_level").as_int();
book_template->req = entry.get("required_level").as_int();
book_template->fun = entry.get("fun").as_int();
book_template->intel = entry.get("intelligence").as_int();
book_template->time = entry.get("time").as_int();
book_template->type = Skill::skill(entry.get("skill").as_string());
new_item_template = book_template;
}
else
{
debugmsg("Item definition for %s skipped, unrecognized type: %s", new_id.c_str(),
type_label.c_str());
break;
}
}
new_item_template->id = new_id;
m_templates[new_id] = new_item_template;
// And then proceed to assign the correct field
new_item_template->rarity = entry.get("rarity").as_int();
new_item_template->price = entry.get("price").as_int();
new_item_template->name = entry.get("name").as_string();
new_item_template->sym = entry.get("symbol").as_char();
new_item_template->color = color_from_string(entry.get("color").as_string());
new_item_template->description = entry.get("description").as_string();
if(entry.has("material")){
set_material_from_json(new_id, entry.get("material"));
} else {
new_item_template->m1 = "null";
new_item_template->m2 = "null";
}
Item_tag new_phase = "solid";
if(entry.has("phase")){
new_phase = entry.get("phase").as_string();
}
new_item_template->phase = phase_from_tag(new_phase);
new_item_template->volume = entry.get("volume").as_int();
new_item_template->weight = entry.get("weight").as_int();
new_item_template->melee_dam = entry.get("bashing").as_int();
new_item_template->melee_cut = entry.get("cutting").as_int();
new_item_template->m_to_hit = entry.get("to_hit").as_int();
if( entry.has("flags") )
{
new_item_template->item_tags = entry.get("flags").as_tags();
/*
List of current flags
FIT - Reduces encumberance by one
VARSIZE - Can be made to fit via tailoring
OVERSIZE - Can always be worn no matter encumberance/mutations/bionics/etc
HOOD - Will increase warmth for head if head is cold and player is not wearing a helmet (headwear of material that is not wool or cotton)
POCKETS - Will increase warmth for hands if hands are cold and the player is wielding nothing
*/
}
new_item_template->techniques = (!entry.has("techniques") ? 0 :
flags_from_json(entry.get("techniques"), "techniques"));
new_item_template->use = (!entry.has("use_action") ? &iuse::none :
use_from_string(entry.get("use_action").as_string()));
}
}
}
}
// Load values from this data file into m_template_groups
void Item_factory::load_item_groups_from(const std::string file_name){
std::ifstream data_file;
picojson::value input_value;
data_file.open(file_name.c_str());
data_file >> input_value;
data_file.close();
//Handle any obvious errors on file load
std::string err = picojson::get_last_error();
if (! err.empty()) {
std::cerr << "In JSON file \"" << file_name << "\"" << data_file << ":" << err << std::endl;
exit(1);
}
if (! input_value.is<picojson::array>()) {
std::cerr << file_name << " is not an array of item groups"<< std::endl;
exit(2);
}
//Crawl through once and create an entry for every definition
const picojson::array& all_items = input_value.get<picojson::array>();
for (picojson::array::const_iterator entry = all_items.begin(); entry != all_items.end(); ++entry) {
if( !(entry->is<picojson::object>()) ){
std::cerr << "Invalid group definition, entry not a JSON object" << std::endl;
}
else{
const picojson::value::object& entry_body = entry->get<picojson::object>();
// The one element we absolutely require for an item definition is an id
picojson::value::object::const_iterator key_pair = entry_body.find("id");
if( key_pair == entry_body.end() || !(key_pair->second.is<std::string>()) ){
std::cerr << "Group definition skipped, no id found or id was malformed." << std::endl;
} else {
Item_tag group_id = key_pair->second.get<std::string>();
m_template_groups[group_id] = new Item_group(group_id);
}
}
}
//Once all the group definitions are set, fill them out
for (picojson::array::const_iterator entry = all_items.begin(); entry != all_items.end(); ++entry) {
const picojson::value::object& entry_body = entry->get<picojson::object>();
Item_tag group_id = entry_body.find("id")->second.get<std::string>();
Item_group current_group = *m_template_groups.find(group_id)->second;
//Add items
picojson::value::object::const_iterator key_pair = entry_body.find("items");
if( key_pair != entry_body.end() ){
if( !(key_pair->second.is<picojson::array>()) ){
std::cerr << "Invalid item list for group definition '"+group_id+"', list of items not an array." << std::endl;
} else {
//We have confirmed that we have a list of SOMETHING, now let's add them one at a time.
const picojson::array& items_to_add = key_pair->second.get<picojson::array>();
for (picojson::array::const_iterator item_pair = items_to_add.begin(); item_pair != items_to_add.end(); ++item_pair) {
//Before adding, make sure this element is in the right format, namely ["TAG_NAME", frequency number]
if(!(item_pair->is<picojson::array>())){
std::cerr << "Invalid item list for group definition '"+group_id+"', element is not an array." << std::endl;
} else if(item_pair->get<picojson::array>().size()!=2){
std::cerr << "Invalid item list for group definition '"+group_id+"', element does not have 2 values." << std::endl;
} else {
picojson::array item_frequency_array = item_pair->get<picojson::array>();
//Finally, insure that the first value is a string, and the second is a number
if(!item_frequency_array[0].is<std::string>() || !item_frequency_array[1].is<double>() ){
std::cerr << "Invalid item list for group definition '"+group_id+"', element is not a valid tag/frequency pair." << std::endl;
} else {
current_group.add_entry(item_frequency_array[0].get<std::string>(), (int)item_frequency_array[1].get<double>());
}
}
}
}
}
//Add groups
key_pair = entry_body.find("groups");
if(key_pair != entry_body.end()){
if( !(key_pair->second.is<picojson::array>()) ){
std::cerr << "Invalid group list for group definition '"+group_id+"', list of items not an array." << std::endl;
} else {
//We have confirmed that we have a list of SOMETHING, now let's add them one at a time.
const picojson::array& items_to_add = key_pair->second.get<picojson::array>();
for (picojson::array::const_iterator item_pair = items_to_add.begin(); item_pair != items_to_add.end(); ++item_pair) {
//Before adding, make sure this element is in the right format, namely ["TAG_NAME", frequency number]
if(!(item_pair->is<picojson::array>())){
std::cerr << "Invalid group list for group definition '"+group_id+"', element is not an array." << std::endl;
} else if(item_pair->get<picojson::array>().size()!=2){
std::cerr << "Invalid group list for group definition '"+group_id+"', element does not have 2 values." << std::endl;
} else {
picojson::array item_frequency_array = item_pair->get<picojson::array>();
//Finally, insure that the first value is a string, and the second is a number
if(!item_frequency_array[0].is<std::string>() || !item_frequency_array[1].is<double>() ){
std::cerr << "Invalid group list for group definition '"+group_id+"', element is not a valid tag/frequency pair." << std::endl;
} else {
Item_group* subgroup = m_template_groups.find(item_frequency_array[0].get<std::string>())->second;
current_group.add_group(subgroup, (int)item_frequency_array[1].get<double>());
}
}
}
}
}
}
}
//Grab color, with appropriate error handling
nc_color Item_factory::color_from_string(std::string new_color){
if("red"==new_color){
return c_red;
} else if("blue"==new_color){
return c_blue;
} else if("green"==new_color){
return c_green;
} else if("light_cyan"==new_color){
return c_ltcyan;
} else if("brown"==new_color){
return c_brown;
} else if("light_red"==new_color){
return c_ltred;
} else if("white"==new_color){
return c_white;
} else if("light_blue"==new_color){
return c_ltblue;
} else if("yellow"==new_color){
return c_yellow;
} else if("magenta"==new_color){
return c_magenta;
} else if("cyan"==new_color){
return c_cyan;
} else if("light_gray"==new_color){
return c_ltgray;
} else if("dark_gray"==new_color){
return c_dkgray;
} else if("light_green"==new_color){
return c_ltgreen;
} else if("pink"==new_color){
return c_pink;
} else {
debugmsg("Received invalid color property %s. Color is required.", new_color.c_str());
return c_white;
}
}
ammotype Item_factory::ammo_from_string(std::string new_ammo){
if("nail"==new_ammo){
return AT_NAIL;
} else if ("BB" == new_ammo) {
return AT_BB;
} else if ("pebble" == new_ammo) {
return AT_PEBBLE;
} else if ("bolt" == new_ammo) {
return AT_BOLT;
} else if ("arrow" == new_ammo) {
return AT_ARROW;
} else if ("shot" == new_ammo) {
return AT_SHOT;
} else if (".22" == new_ammo) {
return AT_22;
} else if ("9mm" == new_ammo) {
return AT_9MM;
} else if ("7.62x25mm" == new_ammo) {
return AT_762x25;
} else if (".38" == new_ammo) {
return AT_38;
} else if (".40" == new_ammo) {
return AT_40;
} else if (".44" == new_ammo) {
return AT_44;
} else if (".45" == new_ammo) {
return AT_45;
} else if ("5.7mm" == new_ammo) {
return AT_57;
} else if ("4.6mm" == new_ammo) {
return AT_46;
} else if ("7.62x39mm" == new_ammo) {
return AT_762;
} else if (".223" == new_ammo) {
return AT_223;
} else if (".30-06" == new_ammo) {
return AT_3006;
} else if (".308" == new_ammo) {
return AT_308;
} else if ("40mm" == new_ammo) {
return AT_40MM;
} else if ("66mm" == new_ammo) {
return AT_66MM;
} else if ("gasoline" == new_ammo) {
return AT_GAS;
} else if ("thread" == new_ammo) {
return AT_THREAD;
} else if ("battery" == new_ammo) {
return AT_BATT;
} else if ("plutonium" == new_ammo) {
return AT_PLUT;
} else if ("muscle" == new_ammo) {
return AT_MUSCLE;
} else if ("fusion" == new_ammo) {
return AT_FUSION;
} else if ("12mm" == new_ammo) {
return AT_12MM;
} else if ("plasma" == new_ammo) {
return AT_PLASMA;
} else if ("water" == new_ammo) {
return AT_WATER;
} else if ("none" == new_ammo) {
return AT_NULL; // NX17 and other special weapons
} else {
debugmsg("Read invalid ammo %s.", new_ammo.c_str());
return AT_NULL;
}
}
Use_function Item_factory::use_from_string(std::string function_name){
std::map<Item_tag, Use_function>::iterator found_function = iuse_function_list.find(function_name);
//Before returning, make sure sure the function actually exists
if(found_function != iuse_function_list.end()){
return found_function->second;
} else {
//Otherwise, return a hardcoded function we know exists (hopefully)
debugmsg("Received unrecognized iuse function %s, using iuse::none instead", function_name.c_str());
return &iuse::none;
}
}
void Item_factory::set_flag_by_string(unsigned& cur_flags, std::string new_flag, std::string flag_type)
{
std::map<Item_tag, unsigned> flag_map;
if(flag_type=="ammo"){
flag_map = ammo_flags_list;
} else if(flag_type=="techniques"){
flag_map = techniques_list;
} else if(flag_type=="ammo_effects"){
flag_map = ammo_effects_list;
} else if(flag_type=="bodyparts"){
flag_map = bodyparts_list;
}
set_bitmask_by_string(flag_map, cur_flags, new_flag);
}
void Item_factory::set_bitmask_by_string(std::map<Item_tag, unsigned> flag_map, unsigned& cur_bitmask, std::string new_flag)
{
std::map<Item_tag, unsigned>::const_iterator found_flag_iter = flag_map.find(new_flag);
if(found_flag_iter != flag_map.end())
{
cur_bitmask = cur_bitmask | found_flag_iter->second;
}
else
{
debugmsg("Invalid item flag (etc.): %s", new_flag.c_str());
}
}
unsigned Item_factory::flags_from_json(catajson flag_list, std::string flag_type){
//If none is found, just use the standard none action
unsigned flag = 0;
//Otherwise, grab the right label to look for
if (flag_list.is_array())
{
for (flag_list.set_begin(); flag_list.has_curr(); flag_list.next())
{
set_flag_by_string(flag, flag_list.curr().as_string(), flag_type);
}
}
else
{
//we should have gotten a string, if not an array, and catajson will do error checking
set_flag_by_string(flag, flag_list.as_string(), flag_type);
}
return flag;
}
bool Item_factory::is_mod_target(catajson targets, std::string weapon){
//If none is found, just use the standard none action
unsigned is_included = false;
//Otherwise, grab the right label to look for
if (targets.is_array())
{
for (targets.set_begin(); targets.has_curr() && !is_included; targets.next())
{
if(targets.curr().as_string() == weapon){
is_included=true;
}
}
}
else
{
if(targets.as_string() == weapon){
is_included=true;
}
}
return is_included;
}
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
std::string material_list[2] = {"null", "null"};
if (mat_list.is_array())
{
if (mat_list.has(2))
{
debugmsg("Too many materials provided for item %s", new_id.c_str());
}
material_list[0] = mat_list.get(0).as_string();
material_list[1] = mat_list.get(1).as_string();
}
else
{
material_list[0] = mat_list.as_string();
}
itype* temp = find_template(new_id);
temp->m1 = material_list[0];
temp->m2 = material_list[1];
}
phase_id Item_factory::phase_from_tag(Item_tag name){
if(name == "liquid"){
return LIQUID;
} else if(name == "solid"){
return SOLID;
} else if(name == "gas"){
return GAS;
} else if(name == "plasma"){
return PLASMA;
} else {
return PNULL;
}
};
+85
View File
@@ -0,0 +1,85 @@
#ifndef _ITEM_FACTORY_H_
#define _ITEM_FACTORY_H_
#include "game.h"
#include "itype.h"
#include "item.h"
#include "color.h"
#include "picojson.h"
#include "catajson.h"
#include "item_group.h"
#include "iuse.h"
#include <string>
#include <vector>
#include <map>
typedef std::string Item_tag;
typedef std::vector<item> Item_list;
typedef void (iuse::*Use_function)(game*,player*,item*,bool);
//For the iuse arguments
class game;
class player;
class Item_factory
{
public:
//Setup
Item_factory();
void init();
void init(game* main_game);
//Intermediary Methods - Will probably be removed at final stage
itype* find_template(Item_tag id);
itype* random_template();
itype* template_from(Item_tag group_tag);
const Item_tag random_id();
const Item_tag id_from(Item_tag group_tag);
//Production methods
item create(Item_tag id, int created_at);
Item_list create(Item_tag id, int created_at, int quantity);
item create_from(Item_tag group, int created_at);
Item_list create_from(Item_tag group, int created_at, int quantity);
item create_random(int created_at);
Item_list create_random(int created_at, int quantity);
private:
std::map<Item_tag, itype*> m_templates;
itype* m_missing_item;
std::map<Item_tag, Item_group*> m_template_groups;
//json data handlers
void load_item_templates();
void load_item_templates_from(const std::string file_name);
void load_item_groups_from(const std::string file_name);
nc_color color_from_string(std::string color);
Use_function use_from_string(std::string name);
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);
phase_id phase_from_tag(Item_tag name);
ammotype ammo_from_string(std::string ammo);
//two convenience functions that just call into set_bitmask_by_string
void set_flag_by_string(unsigned& cur_flags, std::string new_flag, std::string flag_type);
//sets a bitmask (cur_bitmask) based on the values of flag_map and new_flag
void set_bitmask_by_string(std::map<Item_tag, unsigned> flag_map,
unsigned& cur_bitmask, std::string new_flag);
//iuse stuff
std::map<Item_tag, Use_function> iuse_function_list;
//techniques stuff
std::map<Item_tag, unsigned> techniques_list;
//ammo stuff
std::map<Item_tag, unsigned> ammo_flags_list;
//ammo effects
std::map<Item_tag, unsigned> ammo_effects_list;
//bodyparts
std::map<Item_tag, unsigned> bodyparts_list;
};
extern Item_factory* item_controller;
#endif
+88
View File
@@ -0,0 +1,88 @@
#include "item_factory.h"
#include "item_group.h"
#include "rng.h"
#include <map>
#include <algorithm>
Item_group::Item_group(const Item_tag id) : m_id(id), m_max_odds(0){
}
// When selecting an id from this group, the value returned is determined based on the odds
// given when inserted into the group.
const Item_tag Item_group::get_id(){
//Create a list of visited groups - in case of recursion, this will be needed to throw an error.
std::vector<Item_tag> recursion_list;
return get_id(recursion_list);
}
const Item_tag Item_group::get_id(std::vector<Item_tag> recursion_list){
int rolled_value = rng(1,m_max_odds)-1;
//Insure we haven't already visited this group
if(std::find(recursion_list.begin(), recursion_list.end(), m_id) != recursion_list.end()){
std::string error_message = "Recursion loop occured in retrieval from item group "+m_id+". Recursion backtrace follows:\n";
for(std::vector<Item_tag>::iterator iter = recursion_list.begin(); iter != recursion_list.end(); ++iter){
error_message+=*iter;
}
debugmsg(error_message.c_str());
return "MISSING_ITEM";
}
//So we don't visit this item group again
recursion_list.push_back(m_id);
//First, check through groups.
//Groups are assigned first, and will get the lower value odds.
for(std::vector<Item_group_group*>::iterator iter = m_groups.begin(); iter != m_groups.end(); ++iter){
if((*iter)->check(rolled_value)){
return (*iter)->get(recursion_list);
}
}
//If no match was found in groups, check in entries
for(std::vector<Item_group_entry*>::iterator iter = m_entries.begin(); iter != m_entries.end(); ++iter){
if((*iter)->check(rolled_value)){
return (*iter)->get();
}
}
debugmsg("There was an unknown error in Item_group::get_id.");
return "MISSING_ITEM";
}
void Item_group::add_entry(const Item_tag id, int chance){
m_max_odds = m_max_odds+chance;
Item_group_entry* new_entry = new Item_group_entry(id, m_max_odds);
m_entries.push_back(new_entry);
}
void Item_group::add_group(Item_group* group, int chance){
m_max_odds = m_max_odds+chance;
Item_group_group* new_group = new Item_group_group(group, m_max_odds);
m_groups.push_back(new_group);
}
//Item_group_entry definition
Item_group_entry::Item_group_entry(const Item_tag id, int upper_bound): m_id(id), m_upper_bound(upper_bound){
}
bool Item_group_entry::check(int value) const{
return (value < m_upper_bound);
}
const Item_tag Item_group_entry::get() const{
return m_id;
}
//Item_group_group definitions
Item_group_group::Item_group_group(Item_group* group, int upper_bound): m_group(group), m_upper_bound(upper_bound){
}
bool Item_group_group::check(int value) const{
return (value < m_upper_bound);
}
const Item_tag Item_group_group::get(std::vector<Item_tag> recursion_list){
return m_group->get_id(recursion_list);
}
+53
View File
@@ -0,0 +1,53 @@
#ifndef _ITEM_GROUP_H_
#define _ITEM_GROUP_H_
#include <vector>
typedef std::string Item_tag;
class Item_group_entry;
class Item_group_group;
class Item_group
{
public:
Item_group(Item_tag id);
const Item_tag get_id();
const Item_tag get_id(std::vector<Item_tag> recursion_list);
void add_entry(const Item_tag item_id, int chance);
void add_group(Item_group*, int chance);
private:
const Item_tag m_id;
int m_max_odds;
std::vector<Item_group_group*> m_groups;
std::vector<Item_group_entry*> m_entries;
};
//Item group entries involve a string value, and an upper bound
//Since items beforehand have already been checked, there is no need
//to add a lower bound value.
class Item_group_entry
{
public:
Item_group_entry(const Item_tag id, int upper_bound);
bool check(int value) const;
const Item_tag get() const;
private:
const Item_tag m_id;
int m_upper_bound;
};
class Item_group_group
{
public:
Item_group_group(Item_group* group, int upper_bound);
bool check(int value) const;
const Item_tag get(std::vector<Item_tag> recursion_list);
private:
Item_group* m_group;
int m_upper_bound;
};
#endif
+344 -469
View File
File diff suppressed because it is too large Load Diff
+325 -4495
View File
File diff suppressed because it is too large Load Diff
+1891 -1006
View File
File diff suppressed because it is too large Load Diff
+28 -11
View File
@@ -5,10 +5,12 @@ class game;
class item;
class player;
class iuse
{
public:
void none (game *g, player *p, item *it, bool t) { };
void none (game *g, player *p, item *it, bool t);
// FOOD AND DRUGS (ADMINISTRATION)
void sewage (game *g, player *p, item *it, bool t);
@@ -16,8 +18,10 @@ 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);
void pkill_1 (game *g, player *p, item *it, bool t);
void pkill_2 (game *g, player *p, item *it, bool t);
void pkill_3 (game *g, player *p, item *it, bool t);
@@ -31,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);
@@ -42,29 +48,43 @@ 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);
// TOOLS
void lighter (game *g, player *p, item *it, bool t);
void primitive_fire(game *g, player *p, item *it, bool t);
void sew (game *g, player *p, item *it, bool t);
void extra_battery(game *g, player *p, item *it, bool t);
void scissors (game *g, player *p, item *it, bool t);
void extinguisher (game *g, player *p, item *it, bool t);
void hammer (game *g, player *p, item *it, bool t);
void light_off (game *g, player *p, item *it, bool t);
void light_on (game *g, player *p, item *it, bool t);
void gasoline_lantern_off (game *g, player *p, item *it, bool t);
void gasoline_lantern_on (game *g, player *p, item *it, bool t);
void lightstrip (game *g, player *p, item *it, bool t);
void lightstrip_active(game *g, player *p, item *it, bool t);
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);
void radio_off (game *g, player *p, item *it, bool t);
void radio_on (game *g, player *p, item *it, bool t);
void noise_emitter_off(game *g, player *p, item *it, bool t);
void noise_emitter_on (game *g, player *p, item *it, bool t);
void roadmap (game *g, player *p, item *it, bool t);
void roadmap_a_target (game *g, player *p, item *it, bool t, int target);
void roadmap_targets(game *g, player *p, item *it, bool t, int target, int target_range, int distance, int reveal_distance);
void picklock (game *g, player *p, item *it, bool t);
void crowbar (game *g, player *p, item *it, bool t);
void makemound (game *g, player *p, item *it, bool t);
void dig (game *g, player *p, item *it, bool t);
void siphon (game *g, player *p, item *it, bool t);
void chainsaw_off (game *g, player *p, item *it, bool t);
void chainsaw_on (game *g, player *p, item *it, bool t);
void jackhammer (game *g, player *p, item *it, bool t);
@@ -91,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);
@@ -124,15 +145,17 @@ class iuse
void candle (game *g, player *p, item *it, bool t);
void candle_lit (game *g, player *p, item *it, bool t);
void bullet_puller (game *g, player *p, item *it, bool t);
void screwdriver (game *g, player *p, item *it, bool t);
void wrench (game *g, player *p, item *it, bool t);
void boltcutters (game *g, player *p, item *it, bool t);
void mop (game *g, player *p, item *it, bool t);
void spray_can (game *g, player *p, item *it, bool t);
void rag (game *g, player *p, item *it, bool t);
void pda (game *g, player *p, item *it, bool t);
void pda_flashlight (game *g, player *p, item *it, bool t);
void LAW (game *g, player *p, item *it, bool t);
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
@@ -140,12 +163,6 @@ class iuse
// It examines the item's artifact-specific properties
// See artifact.h for a list
void artifact (game *g, player *p, item *it, bool t);
void heal (game *g, player *p, item *it, bool t);
void twist_space (game *g, player *p, item *it, bool t);
void mass_vampire (game *g, player *p, item *it, bool t);
void growth (game *g, player *p, item *it, bool t);
void water (game *g, player *p, item *it, bool t);
void lava (game *g, player *p, item *it, bool t);
};
+32 -2
View File
@@ -8,11 +8,31 @@ long input(long ch)
ch = getch();
}
// 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.
timeout(0);
do {
newch = getch();
} while( newch != ERR && newch == ch );
timeout(-1);
// If we read a different character than the one we're going to act on, re-queue it.
if (newch != ERR && newch != ch) {
ungetch(newch);
}
#endif
switch (ch) {
case KEY_UP: return 'k';
case KEY_LEFT: return 'h';
case KEY_RIGHT: return 'l';
case KEY_DOWN: return 'j';
case KEY_NPAGE: return '>';
case KEY_PPAGE: return '<';
case 459: return '\n';
default: return ch;
}
@@ -38,6 +58,12 @@ bool input_wait(char & ret_ch, int delay_ms)
case KEY_DOWN:
ret_ch = 'j';
break;
case KEY_NPAGE:
ret_ch = '>';
break;
case KEY_PPAGE:
ret_ch = '<';
break;
case 459:
ret_ch = '\n';
break;
@@ -165,6 +191,7 @@ open o\n\
close c\n\
smash s\n\
examine e\n\
advinv /\n\
pickup , g\n\
butcher B\n\
chat C\n\
@@ -193,13 +220,16 @@ select_fire_mode F\n\
drop d\n\
drop_adj D\n\
bionics p\n\
sort_armor +\n\
\n\
# LONG TERM & SPECIAL ACTIONS\n\
wait ^\n\
wait |\n\
craft &\n\
recraft -\n\
construct *\n\
disassemble (\n\
sleep $\n\
control_vehicle ^\n\
safemode !\n\
autosafe \"\n\
ignore_enemy '\n\
@@ -212,7 +242,7 @@ map m :\n\
missions M\n\
factions #\n\
kills )\n\
morale %\n\
morale v\n\
messages P\n\
help ?\n\
\n\

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