Compare commits

...

1171 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 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
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
Fergus Dall a720914bb5 Move all gun mods into json raws 2013-05-14 17:41:32 +09:30
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
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
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 7b3f6542e7 Initialize cache vars in class 2013-05-10 21:04:56 -05:00
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
Shoes01 bb1872ac1a Disease.cpp fixes 2013-05-09 18:51:42 -07:00
137 changed files with 24200 additions and 8299 deletions
+16
View File
@@ -12,3 +12,19 @@ version.h
Cataclysm.exe
CataclysmWin.depend
CataclysmWin.layout
# Visual Studio files
*.suo
*.user
Cataclysm.sdf
Release*/
*.opensdf
# Temporary and backup files
*~
\#*
*.bak
# System Files
Thumbs.db
.DS_Store
+1 -1
View File
@@ -2,7 +2,7 @@ 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
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-
```
+22 -1
View File
@@ -19,6 +19,21 @@
<Add option="-static -lgdi32" />
</Linker>
</Target>
<Target title="Debug">
<Option output="Cataclysm" prefix_auto="1" extension_auto="1" />
<Option object_output="obj/Debug/" />
<Option type="0" />
<Option compiler="gcc" />
<Compiler>
<Add option="-pg" />
<Add option="-g" />
</Compiler>
<Linker>
<Add option="-pg -lgmon" />
<Add option="-Wl,-stack,12000000,-subsystem,windows" />
<Add option="-static -lgdi32" />
</Linker>
</Target>
</Build>
<Unit filename="action.cpp" />
<Unit filename="action.h" />
@@ -33,9 +48,10 @@
<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" />
@@ -106,6 +122,8 @@
<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" />
@@ -176,6 +194,8 @@
<Unit filename="trapfunc.cpp" />
<Unit filename="tutorial.cpp" />
<Unit filename="tutorial.h" />
<Unit filename="ui.cpp" />
<Unit filename="ui.h" />
<Unit filename="veh_interact.cpp" />
<Unit filename="veh_interact.h" />
<Unit filename="veh_type.h" />
@@ -187,6 +207,7 @@
<Unit filename="weather.cpp" />
<Unit filename="weather.h" />
<Unit filename="weather_data.cpp" />
<Unit filename="wincurse.cpp" />
<Unit filename="wish.cpp" />
<Extensions>
<code_completion />
+47 -1
View File
@@ -61,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?
@@ -84,4 +130,4 @@ An overmap encapsulates the large-scale structure of a map
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.
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.
+39 -12
View File
@@ -20,13 +20,15 @@
# Default
# Release (turn on optimizations)
# make RELEASE=1
# Tiles (uses SDL rather than ncurses)
# make TILES=1
# comment these to toggle them as one sees fit.
# WARNINGS will spam hundreds of warnings, mostly safe, if turned on
# DEBUG is best turned on if you plan to debug in gdb -- please do!
# PROFILE is for use with gprof or a similar program -- don't bother generally
WARNINGS = -Wall -Wextra -Wno-switch -Wno-sign-compare -Wno-missing-braces -Wno-unused-parameter
WARNINGS = -Wall -Wextra -Wno-switch -Wno-sign-compare -Wno-missing-braces -Wno-unused-parameter -Wno-psabi
# Uncomment below to disable warnings
#WARNINGS = -w
DEBUG = -g
@@ -54,11 +56,18 @@ VERSION = 0.5
TARGET = cataclysm
TILESTARGET = cataclysm-tiles
W32TILESTARGET = cataclysm-tiles.exe
W32TARGET = cataclysm.exe
BINDIST_DIR = bindist
BUILD_DIR = $(CURDIR)
# tiles object directories are because gcc gets confused
# when preprocessor defines change, but the source doesn't
ODIR = obj
ODIRTILES = obj/tiles
W32ODIR = objwin
W32ODIRTILES = objwin/tiles
DDIR = .deps
OS = $(shell uname -o)
@@ -73,11 +82,11 @@ endif
CXXFLAGS += $(WARNINGS) $(DEBUG) $(PROFILE) $(OTHERS) -MMD
BINDIST_EXTRAS = README data cataclysm-launcher
BINDIST_EXTRAS = README data
BINDIST = cataclysmdda-$(VERSION).tar.gz
W32BINDIST = cataclysmdda-$(VERSION).zip
BINDIST_CMD = tar -czvf $(BINDIST) $(BINDIST_DIR)
W32BINDIST_CMD = zip -r $(W32BINDIST) $(BINDIST_DIR)
BINDIST_CMD = tar --transform=s@^$(BINDIST_DIR)@cataclysmdda-$(VERSION)@ -czvf $(BINDIST) $(BINDIST_DIR)
W32BINDIST_CMD = cd $(BINDIST_DIR) && zip -r ../$(W32BINDIST) * && cd $(BUILD_DIR)
# is this section even being used anymore?
# SOMEBODY PLEASE CHECK
@@ -119,14 +128,10 @@ endif
# MXE cross-compile to win32
ifneq (,$(findstring mingw32,$(CROSS)))
DEFINES += -DCROSS_LINUX
TARGETSYSTEM=WINDOWS
endif
# Global settings for Linux targets
ifeq ($(TARGETSYSTEM),LINUX)
LDFLAGS += -lncurses
endif
# Global settings for Windows targets
ifeq ($(TARGETSYSTEM),WINDOWS)
TARGET = $(W32TARGET)
@@ -137,6 +142,28 @@ ifeq ($(TARGETSYSTEM),WINDOWS)
W32FLAGS += -Wl,-stack,12000000,-subsystem,windows
endif
ifdef TILES
LDFLAGS += -lSDL -lSDL_ttf -lfreetype -lz
DEFINES += -DTILES
ifeq ($(TARGETSYSTEM),WINDOWS)
LDFLAGS += -lgdi32 -ldxguid -lwinmm
TARGET = $(W32TILESTARGET)
ODIR = $(W32ODIRTILES)
else
TARGET = $(TILESTARGET)
ODIR = $(ODIRTILES)
endif
else
# Link to ncurses if we're using a non-tiles, Linux build
ifeq ($(TARGETSYSTEM),LINUX)
LDFLAGS += -lncurses
endif
endif
ifeq ($(TARGETSYSTEM),LINUX)
BINDIST_EXTRAS += cataclysm-launcher
endif
SOURCES = $(wildcard *.cpp)
HEADERS = $(wildcard *.h)
_OBJS = $(SOURCES:.cpp=.o)
@@ -152,13 +179,13 @@ $(TARGET): $(ODIR) $(DDIR) $(OBJS)
.PHONY: version
version:
@( VERSION_STRING=$(VERSION) ; \
[ -e ".git" ] && GITVERSION=$$( git describe --tags --always --dirty ) && VERSION_STRING=$$GITVERSION ; \
[ -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)
@@ -169,7 +196,7 @@ $(ODIR)/%.o: %.cpp
version.cpp: version
clean: clean-tests
rm -f $(TARGET) $(W32TARGET) $(ODIR)/*.o $(ODIR)/*.d $(W32ODIR)/*.o $(W32BINDIST) \
rm -rf $(TARGET) $(W32TARGET) $(ODIR) $(W32ODIR) $(W32BINDIST) \
$(BINDIST)
rm -rf $(BINDIST_DIR)
rm -f version.h
+8
View File
@@ -13,6 +13,7 @@ DDIR = .deps
TARGET = cataclysm.exe
CXX = g++
WNDRES = windres
LINKER = i486-mingw32-ld
LINKERFLAGS = -Wl,-stack,12000000,-subsystem,windows
@@ -20,6 +21,7 @@ LINKERFLAGS = -Wl,-stack,12000000,-subsystem,windows
CFLAGS = $(WARNINGS) $(DEBUG) $(PROFILE) $(OTHERS)
LDFLAGS = -static -lgdi32
RFLAGS = -J rc -O coff
#ifeq ($(OS), Msys)
#LDFLAGS = -static -lpdcurses
@@ -29,6 +31,8 @@ LDFLAGS = -static -lgdi32
SOURCES = $(wildcard *.cpp)
_OBJS = $(SOURCES:.cpp=.o)
RSRC = $(wildcard *.rc)
_OBJS += $(RSRC:.rc=.res)
OBJS = $(patsubst %,$(ODIR)/%,$(_OBJS))
all: $(TARGET)
@@ -46,7 +50,11 @@ $(DDIR):
$(ODIR)/%.o: %.cpp
$(CXX) $(CFLAGS) -c $< -o $@
$(ODIR)/%.res: %.rc
$(WNDRES) $(RFLAGS) $< -o $@
clean:
rm -f $(TARGET) $(ODIR)/*.o
-include $(SOURCES:%.cpp=$(DEPDIR)/%.P)
+10
View File
@@ -15,4 +15,14 @@ Jason Gilbert <0jason.gilbert@gmail.com>
Charlie Nolan (FunnyMan3595) <funnyman3595@gmail.com>
uzername (some_name) <ivanpost777@gmail.com>
Christian Buskirk (i2amroy) <i2amroy@gmail.com>
Kevin McKayven (GlyphGryph) <glyphgryph@gmail.com>
Ozone <satori.jj@gmail.com>
Herbert Jones <jones.herbert@gmail.com>
Justin "MacrosBlackD" Drury <macrosblackd@gmail.com>
AtomicDryad <fnord@fnord> / <atomicdryad@gmail.com>
Izicata
Voker57 <voker57@gmail.com>
Tommy <yobbobanana@gmx.com>
teh-sam
Alex Casey (Tamunshin) <tamunshin@hotmail.com>
Stevensonz <money3030@yahoo.com.>
+53 -9
View File
@@ -1,9 +1,20 @@
#include "game.h"
#include "keypress.h"
#include "output.h"
#include <istream>
#include <sstream>
#include <fstream>
void parse_keymap(std::istream &keymap_txt, std::map<char, action_id> &kmap);
void game::load_keyboard_settings()
{
// Load the default keymap
std::istringstream sin;
sin.str(default_keymap_txt());
parse_keymap(sin, default_keymap);
// Load the player's actual keymap
std::ifstream fin;
fin.open("data/keymap.txt");
if (!fin) { // It doesn't exist
@@ -15,13 +26,37 @@ void game::load_keyboard_settings()
}
if (!fin) { // Still can't open it--probably bad permissions
debugmsg("Can't open data/keymap.txt. This may be a permissions issue.");
keymap = default_keymap;
return;
} else {
parse_keymap(fin, keymap);
}
while (!fin.eof()) {
// Check for new defaults, and automatically bind them if possible
std::map<char, action_id>::iterator d_it;
bool found;
for (d_it = default_keymap.begin(); d_it != default_keymap.end(); d_it++) {
found = false;
std::map<char, action_id>::iterator k_it;
for (k_it = keymap.begin(); k_it != keymap.end(); k_it++) {
if (d_it->second == k_it->second) {
found = true;
break;
}
}
if (!found && !keymap.count(d_it->first)) {
keymap[d_it->first] = d_it->second;
}
}
}
void parse_keymap(std::istream &keymap_txt, std::map<char, action_id> &kmap)
{
while (!keymap_txt.eof()) {
std::string id;
fin >> id;
keymap_txt >> id;
if (id == "")
getline(fin, id); // Empty line, chomp it
getline(keymap_txt, id); // Empty line, chomp it
else if (id[0] != '#') {
action_id act = look_up_action(id);
if (act == ACTION_NULL)
@@ -29,25 +64,25 @@ void game::load_keyboard_settings()
Warning! data/keymap.txt contains an unknown action, \"%s\"\n\
Fix data/keymap.txt at your next chance!", id.c_str());
else {
while (!fin.eof()) {
while (!keymap_txt.eof()) {
char ch;
fin >> std::noskipws >> ch >> std::skipws;
keymap_txt >> std::noskipws >> ch >> std::skipws;
if (ch == '\n') {
break;
} else if (ch != ' ' || fin.peek() == '\n') {
if (keymap.find(ch) != keymap.end()) {
} else if (ch != ' ' || keymap_txt.peek() == '\n') {
if (kmap.find(ch) != kmap.end()) {
debugmsg("\
Warning! '%c' assigned twice in the keymap!\n\
%s is being ignored.\n\
Fix data/keymap.txt at your next chance!", ch, id.c_str());
} else {
keymap[ ch ] = act;
kmap[ ch ] = act;
}
}
}
}
} else {
getline(fin, id); // Clear the whole line
getline(keymap_txt, id); // Clear the whole line
}
}
}
@@ -196,6 +231,8 @@ std::string action_ident(action_id act)
return "drop_adj";
case ACTION_BIONICS:
return "bionics";
case ACTION_SORT_ARMOR:
return "sort_armor";
case ACTION_WAIT:
return "wait";
case ACTION_CRAFT:
@@ -210,6 +247,8 @@ std::string action_ident(action_id act)
return "disassemble";
case ACTION_SLEEP:
return "sleep";
case ACTION_CONTROL_VEHICLE:
return "control_vehicle";
case ACTION_TOGGLE_SAFEMODE:
return "safemode";
case ACTION_TOGGLE_AUTOSAFE:
@@ -366,6 +405,8 @@ std::string action_name(action_id act)
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:
@@ -380,6 +421,8 @@ std::string action_name(action_id act)
return "Disassemble items";
case ACTION_SLEEP:
return "Sleep";
case ACTION_CONTROL_VEHICLE:
return "Control Vehicle";
case ACTION_TOGGLE_SAFEMODE:
return "Toggle Safemode";
case ACTION_TOGGLE_AUTOSAFE:
@@ -417,3 +460,4 @@ std::string action_name(action_id act)
}
return "Someone forgot to name an action.";
}
+2
View File
@@ -58,6 +58,7 @@ ACTION_SELECT_FIRE_MODE,
ACTION_DROP,
ACTION_DIR_DROP,
ACTION_BIONICS,
ACTION_SORT_ARMOR,
// Long-term / special actions
ACTION_WAIT,
ACTION_CRAFT,
@@ -66,6 +67,7 @@ ACTION_LONGCRAFT,
ACTION_CONSTRUCT,
ACTION_DISASSEMBLE,
ACTION_SLEEP,
ACTION_CONTROL_VEHICLE,
ACTION_TOGGLE_SAFEMODE,
ACTION_TOGGLE_AUTOSAFE,
ACTION_IGNORE_ENEMY,
+58 -52
View File
@@ -225,78 +225,78 @@ artifact_property_datum artifact_property_data[ARTPROP_MAX] = {
};
artifact_tool_form_datum artifact_tool_form_data[NUM_ARTTOOLFORMS] = {
{"", '*', c_white, MNULL, MNULL, 0, 0, 0, 0, ARTWEAP_BULK,
{"", '*', c_white, "null", "null", 0, 0, 0, 0, ARTWEAP_BULK,
{ARTWEAP_NULL, ARTWEAP_NULL, ARTWEAP_NULL}},
{"Harp", ';', c_yellow, WOOD, MNULL, 20, 30, 10, 18, ARTWEAP_BULK,
{"Harp", ';', c_yellow, "wood", "null", 20, 30, 10, 18, ARTWEAP_BULK,
{ARTWEAP_SPEAR, ARTWEAP_SWORD, ARTWEAP_KNIFE}},
{"Staff", '/', c_brown, WOOD, MNULL, 6, 12, 4, 10, ARTWEAP_CLUB,
{"Staff", '/', c_brown, "wood", "null", 6, 12, 4, 10, ARTWEAP_CLUB,
{ARTWEAP_BULK, ARTWEAP_SPEAR, ARTWEAP_KNIFE}},
{"Sword", '/', c_ltblue, STEEL, MNULL, 8, 14, 8, 28, ARTWEAP_SWORD,
{"Sword", '/', c_ltblue, "steel", "null", 8, 14, 8, 28, ARTWEAP_SWORD,
{ARTWEAP_BULK, ARTWEAP_NULL, ARTWEAP_NULL}},
{"Dagger", ';', c_ltblue, STEEL, MNULL, 1, 4, 1, 6, ARTWEAP_KNIFE,
{"Dagger", ';', c_ltblue, "steel", "null", 1, 4, 1, 6, ARTWEAP_KNIFE,
{ARTWEAP_NULL, ARTWEAP_NULL, ARTWEAP_NULL}},
{"Cube", '*', c_white, STEEL, MNULL, 1, 3, 1, 20, ARTWEAP_BULK,
{"Cube", '*', c_white, "steel", "null", 1, 3, 1, 20, ARTWEAP_BULK,
{ARTWEAP_SPEAR, ARTWEAP_NULL, ARTWEAP_NULL}}
};
artifact_weapon_datum artifact_weapon_data[NUM_ARTWEAPS] = {
{"", 0, 0, 0, 0, 0, 0, 0, 0, 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)},
"SPEAR"},
{"Edged", 2, 4, 0, 0, 20, 50, -1, 2,
0},
""},
{"Bladed", 1, 2, 0, 0, 12, 30, -1, 1,
mfb(IF_STAB)}
"STAB"}
};
artifact_armor_form_datum artifact_armor_form_data[NUM_ARTARMFORMS] = {
{"", c_white, MNULL, MNULL, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
{"", c_white, "null", "null", 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, false,
{ARMORMOD_NULL, ARMORMOD_NULL, ARMORMOD_NULL, ARMORMOD_NULL, ARMORMOD_NULL}},
// Name color Materials Vol Wgt Enc Dmg Cut Env Wrm Sto Bsh Cut Hit
{"Robe", c_red, WOOL, MNULL, 6, 6, 1, 3, 1, 0, 2, 0, -8, 0, -3,
// 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,MNULL, 14, 14, 2, 4, 12, 1, 4, 4, -6, 0, -3,
{"Coat", c_brown,"leather","null", 14, 14, 2, 3, 2, 1, 4, 4, -6, 0, -3,
mfb(bp_torso), false,
{ARMORMOD_LIGHT, ARMORMOD_POCKETED, ARMORMOD_FURRED, ARMORMOD_PADDED,
ARMORMOD_PLATED}},
{"Mask", c_white, WOOD, MNULL, 4, 1, 2, 2, 16, 1, 2, 0, 2, 0, -2,
{"Mask", c_white, "wood", "null", 4, 1, 2, 2, 2, 1, 2, 0, 2, 0, -2,
mfb(bp_eyes)|mfb(bp_mouth), false,
{ARMORMOD_FURRED, ARMORMOD_FURRED, ARMORMOD_NULL, ARMORMOD_NULL,
ARMORMOD_NULL}},
// Name color Materials Vol Wgt Enc Dmg Cut Env Wrm Sto Bsh Cut Hit
{"Helm", c_dkgray,SILVER, MNULL, 6, 6, 2, 4, 18, 0, 1, 0, 8, 0, -2,
// 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,MNULL, 2, 1, 1, 6, 6, 1, 2, 0, -4, 0, -2,
{"Gloves", c_ltblue,"leather","null", 2, 1, 1, 3, 3, 1, 2, 0, -4, 0, -2,
mfb(bp_hands), true,
{ARMORMOD_BULKY, ARMORMOD_FURRED, ARMORMOD_PADDED, ARMORMOD_PLATED,
ARMORMOD_NULL}},
// Name color Materials Vol Wgt Enc Dmg Cut Env Wrm Sto Bsh Cut Hit
{"Boots", c_blue, LEATHER, MNULL, 6, 2, 1, 6, 6, 1, 3, 0, 4, 0, -1,
// 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, MNULL, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
{"Ring", c_ltgreen, "silver", "null", 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, true,
{ARMORMOD_NULL, ARMORMOD_NULL, ARMORMOD_NULL, ARMORMOD_NULL, ARMORMOD_NULL}}
@@ -304,33 +304,33 @@ artifact_armor_form_datum artifact_armor_form_data[NUM_ARTARMFORMS] = {
artifact_armor_form_datum artifact_armor_mod_data[NUM_ARMORMODS] = {
{"", c_white, MNULL, MNULL, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, false,
{"", c_white, "null", "null", 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, false,
{ARMORMOD_NULL, ARMORMOD_NULL, ARMORMOD_NULL, ARMORMOD_NULL, ARMORMOD_NULL}},
// Description; "It is ..." or "They are ..."
{"very thin and light.", c_white, MNULL, MNULL,
// Vol Wgt Enc Dmg Cut Env Wrm Sto
{"very thin and light.", c_white, "null", "null",
// Vol Wgt Enc Cov Thk Env Wrm Sto
-4, -8, -2, -1, -1, -1, -1, 0, 0, 0, 0, 0, false,
{ARMORMOD_NULL, ARMORMOD_NULL, ARMORMOD_NULL, ARMORMOD_NULL, ARMORMOD_NULL}},
{"extremely bulky.", c_white, MNULL, MNULL,
{"extremely bulky.", c_white, "null", "null",
8, 10, 2, 1, 1, 0, 1, 0, 0, 0, 0, 0, false,
{ARMORMOD_NULL, ARMORMOD_NULL, ARMORMOD_NULL, ARMORMOD_NULL, ARMORMOD_NULL}},
{"covered in pockets.", c_white, MNULL, MNULL,
{"covered in pockets.", c_white, "null", "null",
1, 1, 1, 0, 0, 0, 0, 16, 0, 0, 0, 0, false,
{ARMORMOD_NULL, ARMORMOD_NULL, ARMORMOD_NULL, ARMORMOD_NULL, ARMORMOD_NULL}},
{"disgustingly furry.", c_white, WOOL, MNULL,
{"disgustingly furry.", c_white, "wool", "null",
// Vol Wgt Enc Dmg Cut Env Wrm Sto
4, 2, 1, 4, 0, 1, 3, 0, 0, 0, 0, 0, false,
4, 2, 1, 1, 1, 1, 3, 0, 0, 0, 0, 0, false,
{ARMORMOD_NULL, ARMORMOD_NULL, ARMORMOD_NULL, ARMORMOD_NULL, ARMORMOD_NULL}},
{"leather-padded.", c_white, LEATHER, MNULL,
4, 4, 1, 10, 4, 0, 1, -3, 0, 0, 0, 0, false,
{"leather-padded.", c_white, "leather", "null",
4, 4, 1, 1, 1, 0, 1, -3, 0, 0, 0, 0, false,
{ARMORMOD_NULL, ARMORMOD_NULL, ARMORMOD_NULL, ARMORMOD_NULL, ARMORMOD_NULL}},
{"plated in iron.", c_white, IRON, MNULL,
4, 12, 3, 8, 14, 0, 1, -4, 0, 0, 0, 0, false,
{"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}},
};
@@ -372,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);
@@ -383,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());
@@ -503,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;
@@ -534,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;
@@ -587,8 +590,10 @@ It may have unknown powers; use 'a' to activate them.";
art->effects_worn.push_back(passive_tmp);
}
art->id = itypes.size();
itypes[art->id]=art;
std::stringstream artid;
artid << "artifact" << artifact_itype_ids.size();
art->id = artid.str();
itypes[art->id] = art;
artifact_itype_ids.push_back(art->id);
return art;
}
@@ -609,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;
@@ -702,9 +706,11 @@ itype* game::new_natural_artifact(artifact_natural_property prop)
art->charge_type = art_charge( rng(ARTC_NULL + 1, NUM_ARTCS - 1) );
}
art->id = itypes.size();
std::stringstream artid;
artid << "artifact" << artifact_itype_ids.size();
art->id = artid.str();
artifact_itype_ids.push_back(art->id);
itypes[art->id]=art;
itypes[art->id] = art;
return art;
}
+12 -12
View File
@@ -48,8 +48,8 @@ struct artifact_tool_form_datum
std::string name;
char sym;
nc_color color;
material m1;
material m2;
std::string m1;
std::string m2;
int volume_min, volume_max;
int weight_min, weight_max;
artifact_weapon_type base_weapon;
@@ -57,7 +57,7 @@ struct artifact_tool_form_datum
/*
artifact_tool_form_datum
(std::string Name, char Sym, nc_color Color, material M1, material M2,
(std::string Name, char Sym, nc_color Color, std::string M1, std::string M2,
int Volmin, int Volmax, int Wgtmin, int Wgtmax, artifact_weapon_type Base,
artifact_weapon_type extra[3])
: name (Name), sym (Sym), color (Color), m1 (M1), m2 (M2),
@@ -87,7 +87,7 @@ 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;
};
extern artifact_weapon_datum artifact_weapon_data[NUM_ARTWEAPS];
@@ -108,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;
@@ -125,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) { };
@@ -154,7 +154,7 @@ enum artifact_armor_form
extern artifact_armor_form_datum artifact_armor_form_data[NUM_ARTARMFORMS];
/* Armor mods alter the normal values of armor.
* If the basic armor type has MNULL as its second material, and the mod has a
* If the basic armor type has "null" as its second material, and the mod has a
* material attached, the second material will be changed.
*/
extern artifact_armor_form_datum artifact_armor_mod_data[NUM_ARMORMODS];
+28 -8
View File
@@ -274,8 +274,16 @@ void player::activate_bionic(int b, game *g)
good.push_back("Alcohol");
if (has_disease(DI_CIG))
good.push_back("Nicotine");
if (has_disease(DI_METH))
good.push_back("Methamphetamines");
if (has_disease(DI_HIGH))
good.push_back("Intoxicant: Other");
if (has_disease(DI_HALLU) || has_disease(DI_VISUALS))
bad.push_back("Magic Mushroom");
if (has_disease(DI_IODINE))
good.push_back("Iodine");
if (has_disease(DI_TOOK_XANAX))
good.push_back("Xanax");
if (has_disease(DI_TOOK_PROZAC))
good.push_back("Prozac");
if (has_disease(DI_TOOK_FLUMED))
@@ -306,9 +314,16 @@ void player::activate_bionic(int b, game *g)
rem_disease(DI_DRUNK);
rem_disease(DI_CIG);
rem_disease(DI_HIGH);
rem_disease(DI_HALLU);
rem_disease(DI_VISUALS);
rem_disease(DI_IODINE);
rem_disease(DI_TOOK_XANAX);
rem_disease(DI_TOOK_PROZAC);
rem_disease(DI_TOOK_FLUMED);
rem_disease(DI_ADRENALINE);
rem_disease(DI_METH);
pkill = 0;
stim = 0;
} else if(bio.id == "bio_evap"){
if (query_yn("Drink directly? Otherwise you will need a container.")) {
tmp_item = item(g->itypes["water_clean"], 0);
@@ -440,7 +455,7 @@ void player::activate_bionic(int b, game *g)
}
traj.insert(traj.begin(), point(i, j));
for (int k = 0; k < g->m.i_at(i, j).size(); k++) {
if (g->m.i_at(i, j)[k].made_of(IRON) || g->m.i_at(i, j)[k].made_of(STEEL)){
if (g->m.i_at(i, j)[k].made_of("iron") || g->m.i_at(i, j)[k].made_of("steel")){
tmp_item = g->m.i_at(i, j)[k];
g->m.i_rem(i, j, k);
for (l = 0; l < traj.size(); l++) {
@@ -910,7 +925,7 @@ 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 Dissapation", false, true, 1, 6, "\
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.");
@@ -987,34 +1002,39 @@ 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.");
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.");
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.");
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.");
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.");
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.");
causing increased encumberance.",true);
faulty_bionics.push_back("bio_stiff");
}
+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
-3
View File
@@ -3,9 +3,6 @@
#include <string>
// How many minutes exist when the game starts - 8:00 AM
#define STARTING_MINUTES 480
// Convert minutes, hours, days to turns
#define MINUTES(x) ((x) * 10)
#define HOURS(x) ((x) * 600)
+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
+8 -3
View File
@@ -1,9 +1,11 @@
#ifndef __CATACURSE__
#define __CATACURSE__
#if (defined _WIN32 || defined WINDOWS)
#define _WIN32_WINNT 0x0500
#define WIN32_LEAN_AND_MEAN
//#define VC_EXTRALEAN
#include <windows.h>
#include "windows.h"
#endif
#include <stdio.h>
typedef int chtype;
typedef unsigned short attr_t;
@@ -99,6 +101,7 @@ typedef struct {
#define KEY_BACKSPACE 0x107 /* Backspace */ //<---------not used
#define KEY_NPAGE 0x152 /* page down */
#define KEY_PPAGE 0x153 /* page up */
#define KEY_ENTER 0x157 /* enter */
/* Curses external declarations. */
@@ -116,7 +119,9 @@ 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);
@@ -125,6 +130,7 @@ int init_pair(short pair, short f, short b);
int wmove(WINDOW *win, int y, int x);
int getnstr(char *str, int size);
int clear(void);
int clearok(WINDOW *win);
int erase(void);
int endwin(void);
int mvwaddch(WINDOW *win, int y, int x, const chtype ch);
@@ -150,10 +156,9 @@ void timeout(int delay);//PORTABILITY, DUMMY FUNCTION
void set_escdelay(int delay);//PORTABILITY, DUMMY FUNCTION
int echo(void);
int noecho(void);
//Window Functions, Do not call these outside of catacurse.cpp
//non-curses functions, Do not call these in the main game code
void WinDestroy();
bool WinCreate(bool initgl);
void CheckMessages();
int FindWin(WINDOW *wnd);
LRESULT CALLBACK ProcessMessages(HWND__ *hWnd,u_int32_t Msg,WPARAM wParam, LPARAM lParam);
#endif
+18
View File
@@ -91,6 +91,24 @@ double catajson::as_double() const
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>())
+3
View File
@@ -2,6 +2,7 @@
#define _CATAJSON_H_
#include "picojson.h"
#include <set>
class catajson
{
@@ -16,6 +17,8 @@ public:
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;
+35
View File
@@ -48,3 +48,38 @@ ADDITIONS
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).
+92
View File
@@ -693,6 +693,53 @@ 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("\
@@ -940,6 +987,26 @@ SHORTLY. TO ENSURE YOUR SAFETY PLEASE FOLLOW THE BELOW STEPS. \n\
}
}
break;
case COMPACT_SRCF_ELEVATOR:
if (!g->u.has_amount("sarcophagus_access_code", 1)){
print_error("Access code required!");
query_any("Press any key to continue...");}
else{
g->u.use_amount("sarcophagus_access_code", 1);
reset_terminal();
print_line("\nPower: Backup Only\nRadion Level: Very Dangerous\nOperational: Overrided\n\n");
query_any("Press any key to continue...");
for (int x = 0; x < SEEX * MAPSIZE; x++) {
for (int y = 0; y < SEEY * MAPSIZE; y++) {
if (g->m.ter(x, y) == t_elevator_control_off) {
g->m.ter_set(x, y, t_elevator_control);
}
}
}
}
break;
} // switch (action)
}
@@ -1089,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)
}
+4
View File
@@ -33,6 +33,8 @@ 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,
@@ -45,6 +47,7 @@ enum computer_action
COMPACT_SRCF_3_MESS,
COMPACT_SRCF_SEAL_ORDER,
COMPACT_SRCF_SEAL,
COMPACT_SRCF_ELEVATOR,
NUM_COMPUTER_ACTIONS
};
@@ -60,6 +63,7 @@ enum computer_failure
COMPFAIL_PUMP_LEAK,
COMPFAIL_AMIGARA,
COMPFAIL_DESTROY_BLOOD,
COMPFAIL_DESTROY_DATA,
NUM_COMPUTER_FAILURES
};
+66 -50
View File
@@ -141,7 +141,14 @@ void game::init_construction()
COMP("2x4", 10);
COMP("nail", 20);
CONSTRUCT("Build Log Wall", 2, &construct::able_pit, &construct::done_nothing);
CONSTRUCT("Build Log Wall", 2, &construct::able_dig, &construct::done_nothing);
STAGE(t_pit_shallow, 10);
TOOL("shovel");
TOOLCONT("primitive_shovel");
TOOLCONT("digging_stick");
STAGE(t_pit, 10);
TOOL("shovel");
TOOLCONT("primitive_shovel");
STAGE(t_wall_log_half, 20);
TOOL("shovel");
TOOLCONT("primitive_shovel");
@@ -155,7 +162,14 @@ void game::init_construction()
COMP("stick", 3);
COMPCONT("2x4", 6);
CONSTRUCT("Build Palisade Wall", 2, &construct::able_pit, &construct::done_nothing);
CONSTRUCT("Build Palisade Wall", 2, &construct::able_dig, &construct::done_nothing);
STAGE(t_pit_shallow, 10);
TOOL("shovel");
TOOLCONT("primitive_shovel");
TOOLCONT("digging_stick");
STAGE(t_pit, 10);
TOOL("shovel");
TOOLCONT("primitive_shovel");
STAGE(t_palisade, 20);
TOOL("shovel");
TOOLCONT("primitive_shovel");
@@ -168,7 +182,14 @@ void game::init_construction()
COMP("stick", 8);
COMPCONT("2x4", 8);
CONSTRUCT("Build Palisade Gate", 2, &construct::able_pit, &construct::done_nothing);
CONSTRUCT("Build Palisade Gate", 2, &construct::able_dig, &construct::done_nothing);
STAGE(t_pit_shallow, 10);
TOOL("shovel");
TOOLCONT("primitive_shovel");
TOOLCONT("digging_stick");
STAGE(t_pit, 10);
TOOL("shovel");
TOOLCONT("primitive_shovel");
STAGE(t_palisade_gate, 20);
TOOL("shovel");
TOOLCONT("primitive_shovel");
@@ -422,7 +443,7 @@ void game::construction_menu()
long ch;
bool exit = false;
inventory total_inv = crafting_inventory();
inventory total_inv = crafting_inventory(&u);
do {
// Erase existing list of constructions
@@ -711,7 +732,7 @@ bool game::player_can_build(player &p, inventory pinv, constructable* con,
void game::place_construction(constructable *con)
{
refresh_all();
inventory total_inv = crafting_inventory();
inventory total_inv = crafting_inventory(&u);
std::vector<point> valid;
for (int x = u.posx - 1; x <= u.posx + 1; x++) {
@@ -746,15 +767,9 @@ void game::place_construction(constructable *con)
}
}
}
mvprintz(0, 0, c_red, "Pick a direction in which to construct:");
int dirx, diry;
get_direction(this, dirx, diry, input());
if (dirx == -2) {
add_msg("Invalid direction.");
if (!choose_adjacent("Contruct", dirx, diry))
return;
}
dirx += u.posx;
diry += u.posy;
bool point_is_okay = false;
for (int i = 0; i < valid.size() && !point_is_okay; i++) {
if (valid[i].x == dirx && valid[i].y == diry)
@@ -794,8 +809,6 @@ void game::place_construction(constructable *con)
void game::complete_construction()
{
inventory map_inv;
map_inv.form_from_map(this, point(u.posx, u.posy), PICKUP_RANGE);
int stage_num = u.activity.values[0];
constructable *built = constructions[u.activity.index];
construction_stage stage = built->stages[stage_num];
@@ -807,7 +820,7 @@ void game::complete_construction()
u.practice(turn, "carpentry", 10);
for (int i = 0; i < 10; i++) {
if (!stage.components[i].empty())
consume_items(stage.components[i]);
consume_items(&u, stage.components[i]);
}
// Make the terrain change
@@ -944,7 +957,8 @@ bool construct::able_between_walls(game *g, point p)
(g->m.has_flag(supports_roof, p.x -1, p.y) && g->m.has_flag(supports_roof, p.x, p.y -1)) ||
(g->m.has_flag(supports_roof, p.x +1, p.y) && g->m.has_flag(supports_roof, p.x, p.y +1)) ||
(g->m.has_flag(supports_roof, p.x +1, p.y) && g->m.has_flag(supports_roof, p.x, p.y -1)) ||
(g->m.has_flag(supports_roof, p.x, p.y -1) && g->m.has_flag(supports_roof, p.x, p.y +1)));
(g->m.has_flag(supports_roof, p.x, p.y -1) && g->m.has_flag(supports_roof, p.x, p.y +1))) &&
(g->m.move_cost(p.x, p.y) != 0);
}
bool construct::able_deconstruct(game *g, point p)
@@ -954,7 +968,7 @@ bool construct::able_deconstruct(game *g, point p)
void construct::done_window_pane(game *g, point p)
{
g->m.spawn_item(g->u.posx, g->u.posy, item_controller->find_template("glass_sheet"), 0);
g->m.spawn_item(g->u.posx, g->u.posy, "glass_sheet", 0);
}
void construct::done_furniture(game *g, point p)
@@ -977,6 +991,7 @@ void construct::done_furniture(game *g, point p)
break;
}
g->sound(x, y, terlist[g->m.ter(p.x, p.y)].move_str_req * 2, "a scraping noise");
g->m.ter_set(x, y, g->m.ter(p.x, p.y));
g->m.ter_set(p.x, p.y, t_floor);
@@ -1006,7 +1021,7 @@ void construct::done_tree(game *g, point p)
void construct::done_log(game *g, point p)
{
g->m.spawn_item(p.x, p.y, item_controller->find_template("log"), int(g->turn), rng(5, 15));
g->m.spawn_item(p.x, p.y, "log", int(g->turn), rng(5, 15));
}
@@ -1048,35 +1063,35 @@ void construct::done_deconstruct(game *g, point p)
case t_makeshift_bed:
case t_bed:
case t_armchair:
g->m.spawn_item(p.x, p.y, item_controller->find_template("2x4"), 0, 9);
g->m.spawn_item(p.x, p.y, item_controller->find_template("rag"), 0, 9);
g->m.spawn_item(p.x, p.y, item_controller->find_template("nail"), 0, 0, rng(6,8));
g->m.spawn_item(p.x, p.y, "2x4", 0, 10);
g->m.spawn_item(p.x, p.y, "rag", 0, rng(10,15));
g->m.spawn_item(p.x, p.y, "nail", 0, 0, rng(6,8));
g->m.ter_set(p.x, p.y, t_floor);
break;
case t_door_c:
case t_door_o:
g->m.spawn_item(p.x, p.y, item_controller->find_template("2x4"), 0, 3);
g->m.spawn_item(p.x, p.y, item_controller->find_template("nail"), 0, 0, rng(6,12));
g->m.spawn_item(p.x, p.y, "2x4", 0, 4);
g->m.spawn_item(p.x, p.y, "nail", 0, 0, rng(6,12));
g->m.ter_set(p.x, p.y, t_door_frame);
break;
case t_window_domestic:
g->m.spawn_item(p.x, p.y, item_controller->find_template("stick"), 0);
g->m.spawn_item(p.x, p.y, item_controller->find_template("sheet"), 0, 1);
g->m.spawn_item(p.x, p.y, item_controller->find_template("glass_sheet"), 0);
g->m.spawn_item(p.x, p.y, item_controller->find_template("nail"), 0, 0, 3);
g->m.spawn_item(p.x, p.y, item_controller->find_template("string_36"), 0, 0, 1);
g->m.spawn_item(p.x, p.y, "stick", 0);
g->m.spawn_item(p.x, p.y, "sheet", 0, 2);
g->m.spawn_item(p.x, p.y, "glass_sheet", 0);
g->m.spawn_item(p.x, p.y, "nail", 0, 0, rng(3,4));
g->m.spawn_item(p.x, p.y, "string_36", 0, 0, 1);
g->m.ter_set(p.x, p.y, t_window_empty);
break;
case t_window:
g->m.spawn_item(p.x, p.y, item_controller->find_template("glass_sheet"), 0);
g->m.spawn_item(p.x, p.y, "glass_sheet", 0);
g->m.ter_set(p.x, p.y, t_window_empty);
break;
case t_backboard:
g->m.spawn_item(p.x, p.y, item_controller->find_template("2x4"), 0, 4);
g->m.spawn_item(p.x, p.y, item_controller->find_template("nail"), 0, 0, rng(6,10));
g->m.spawn_item(p.x, p.y, "2x4", 0, 4);
g->m.spawn_item(p.x, p.y, "nail", 0, 0, rng(6,10));
g->m.ter_set(p.x, p.y, t_pavement);
break;
@@ -1084,8 +1099,8 @@ void construct::done_deconstruct(game *g, point p)
case t_bench:
case t_crate_o:
case t_crate_c:
g->m.spawn_item(p.x, p.y, item_controller->find_template("2x4"), 0, 4);
g->m.spawn_item(p.x, p.y, item_controller->find_template("nail"), 0, 0, rng(6,10));
g->m.spawn_item(p.x, p.y, "2x4", 0, 4);
g->m.spawn_item(p.x, p.y, "nail", 0, 0, rng(6,10));
g->m.ter_set(p.x, p.y, t_floor);
break;
@@ -1093,57 +1108,58 @@ void construct::done_deconstruct(game *g, point p)
case t_cupboard:
case t_desk:
case t_bulletin:
g->m.spawn_item(p.x, p.y, item_controller->find_template("2x4"), 0, 4);
g->m.spawn_item(p.x, p.y, item_controller->find_template("nail"), 0, 0, rng(6,10));
g->m.spawn_item(p.x, p.y, "2x4", 0, 4);
g->m.spawn_item(p.x, p.y, "nail", 0, 0, rng(6,10));
g->m.ter_set(p.x, p.y, t_floor);
break;
case t_slide:
g->m.spawn_item(p.x, p.y, item_controller->find_template("sheet_metal"), 0);
g->m.spawn_item(p.x, p.y, item_controller->find_template("pipe"), 0, rng(4,8));
g->m.spawn_item(p.x, p.y, "sheet_metal", 0);
g->m.spawn_item(p.x, p.y, "pipe", 0, rng(4,8));
g->m.ter_set(p.x, p.y, t_grass);
break;
case t_locker:
g->m.spawn_item(p.x, p.y, item_controller->find_template("sheet_metal"), 0);
g->m.spawn_item(p.x, p.y, item_controller->find_template("pipe"), 0, rng(4,8));
g->m.spawn_item(p.x, p.y, "sheet_metal", 0, rng(1,2));
g->m.spawn_item(p.x, p.y, "pipe", 0, rng(4,8));
g->m.ter_set(p.x, p.y, t_floor);
break;
case t_rack:
g->m.spawn_item(p.x, p.y, item_controller->find_template("pipe"), 0, rng(6,12));
g->m.spawn_item(p.x, p.y, "pipe", 0, rng(6,12));
g->m.ter_set(p.x, p.y, t_floor);
break;
case t_monkey_bars:
g->m.spawn_item(p.x, p.y, item_controller->find_template("pipe"), 0, rng(6,12));
g->m.spawn_item(p.x, p.y, "pipe", 0, rng(6,12));
g->m.ter_set(p.x, p.y, t_grass);
break;
case t_fridge:
g->m.spawn_item(p.x, p.y, item_controller->find_template("scrap"), 0, rng(2,6));
g->m.spawn_item(p.x, p.y, item_controller->find_template("steel_chunk"), 0, rng(2,3));
g->m.spawn_item(p.x, p.y, "scrap", 0, rng(2,6));
g->m.spawn_item(p.x, p.y, "steel_chunk", 0, rng(2,3));
g->m.spawn_item(p.x, p.y, "hose", 0, 1);
g->m.ter_set(p.x, p.y, t_floor);
break;
case t_counter:
case t_dresser:
case t_table:
g->m.spawn_item(p.x, p.y, item_controller->find_template("2x4"), 0, 6);
g->m.spawn_item(p.x, p.y, item_controller->find_template("nail"), 0, 0, rng(6,8));
g->m.spawn_item(p.x, p.y, "2x4", 0, 6);
g->m.spawn_item(p.x, p.y, "nail", 0, 0, rng(6,8));
g->m.ter_set(p.x, p.y, t_floor);
break;
case t_pool_table:
g->m.spawn_item(p.x, p.y, item_controller->find_template("2x4"), 0, 4);
g->m.spawn_item(p.x, p.y, item_controller->find_template("rag"), 0, 4);
g->m.spawn_item(p.x, p.y, item_controller->find_template("nail"), 0, 0, rng(6,10));
g->m.spawn_item(p.x, p.y, "2x4", 0, 4);
g->m.spawn_item(p.x, p.y, "rag", 0, 4);
g->m.spawn_item(p.x, p.y, "nail", 0, 0, rng(6,10));
g->m.ter_set(p.x, p.y, t_floor);
break;
case t_bookcase:
g->m.spawn_item(p.x, p.y, item_controller->find_template("2x4"), 0, 12);
g->m.spawn_item(p.x, p.y, item_controller->find_template("nail"), 0, 0, rng(12,16));
g->m.spawn_item(p.x, p.y, "2x4", 0, 12);
g->m.spawn_item(p.x, p.y, "nail", 0, 0, rng(12,16));
g->m.ter_set(p.x, p.y, t_floor);
break;
}
+228 -152
View File
@@ -44,8 +44,8 @@ void game::init_recipes()
bool autolearn = curr.get("autolearn").as_bool();
// optional fields
bool reversible = curr.has("reversible") ? curr.get("reversible").as_bool() : false;
const char *skill1 = curr.has("skill_pri") ? curr.get("skill_pri").as_string().c_str() : NULL;
const char *skill2 = curr.has("skill_sec") ? curr.get("skill_sec").as_string().c_str() : NULL;
std::string skill1 = curr.has("skill_pri") ? curr.get("skill_pri").as_string() : "";
std::string skill2 = curr.has("skill_sec") ? curr.get("skill_sec").as_string() : "";
std::string id_suffix = curr.has("id_suffix") ? curr.get("id_suffix").as_string() : "";
int learn_by_disassembly = curr.has("decomp_learn") ? curr.get("decomp_learn").as_int() : -1;
@@ -65,7 +65,7 @@ void game::init_recipes()
{
if ((*name_iter) == rec_name)
{
debugmsg("Recipe name collision: %s", rec_name.c_str());
debugmsg("Recipe name collision (set a unique value for the id_suffix field to fix): %s", rec_name.c_str());
}
}
@@ -186,7 +186,7 @@ bool game::making_would_work(recipe *making)
bool game::can_make(recipe *r)
{
bool RET_VAL = true;
inventory crafting_inv = crafting_inventory();
inventory crafting_inv = crafting_inventory(&u);
if(!u.knows_recipe(r))
{
return false;
@@ -522,7 +522,7 @@ recipe* game::select_crafting_recipe()
recipe *chosen = NULL;
InputEvent input;
inventory crafting_inv = crafting_inventory();
inventory crafting_inv = crafting_inventory(&u);
std::string filterstring = "";
do {
if (redraw)
@@ -905,14 +905,14 @@ void draw_recipe_tabs(WINDOW *w, craft_cat tab,bool filtered)
wrefresh(w);
}
inventory game::crafting_inventory(){
inventory game::crafting_inventory(player *p){
inventory crafting_inv;
crafting_inv.form_from_map(this, point(u.posx, u.posy), PICKUP_RANGE);
crafting_inv += u.inv;
crafting_inv += u.weapon;
if (u.has_bionic("bio_tools")) {
crafting_inv.form_from_map(this, point(p->posx, p->posy), PICKUP_RANGE);
crafting_inv += p->inv;
crafting_inv += p->weapon;
if (p->has_bionic("bio_tools")) {
item tools(item_controller->find_template("toolset"), turn);
tools.charges = u.power_level;
tools.charges = p->power_level;
crafting_inv += tools;
}
return crafting_inv;
@@ -995,7 +995,8 @@ void game::complete_craft()
// farsightedness can impose a penalty on electronics and tailoring success
// it's equivalent to a 2-rank electronics penalty, 1-rank tailoring
if (u.has_trait(PF_HYPEROPIC) && !u.is_wearing("glasses_reading")) {
if (u.has_trait(PF_HYPEROPIC) && !u.is_wearing("glasses_reading")
&& !u.is_wearing("glasses_bifocal")) {
int main_rank_penalty = 0;
if (making->sk_primary == Skill::skill("electronics")) {
main_rank_penalty = 2;
@@ -1038,12 +1039,12 @@ void game::complete_craft()
for (int i = 0; i < making->components.size(); i++)
{
if (making->components[i].size() > 0)
consume_items(making->components[i]);
consume_items(&u, making->components[i]);
}
for (int i = 0; i < making->tools.size(); i++) {
if (making->tools[i].size() > 0)
consume_tools(making->tools[i]);
consume_tools(&u, making->tools[i], false);
}
u.activity.type = ACT_NULL;
return;
@@ -1058,31 +1059,50 @@ void game::complete_craft()
}
// If we're here, the craft was a success!
// Use up the components and tools
std::list<item> used;
for (int i = 0; i < making->components.size(); i++) {
if (making->components[i].size() > 0)
consume_items(making->components[i]);
if (making->components[i].size() > 0) {
std::list<item> tmp = consume_items(&u, making->components[i]);
used.splice(used.end(), tmp);
}
}
for (int i = 0; i < making->tools.size(); i++) {
if (making->tools[i].size() > 0)
consume_tools(making->tools[i]);
consume_tools(&u, making->tools[i], false);
}
// Set up the new item, and pick an inventory letter
int iter = 0;
item newit(item_controller->find_template(making->result), turn, nextinv);
if (newit.is_armor() && newit.has_flag(IF_VARSIZE))
if (newit.is_armor() && newit.has_flag("VARSIZE"))
{
newit.item_flags |= mfb(IF_FIT);
newit.item_tags.insert("FIT");
}
float used_age_tally = 0;
int used_age_count = 0;
for (std::list<item>::iterator iter = used.begin(); iter != used.end(); ++iter)
{
if (iter->goes_bad())
{
used_age_tally += ((int)turn - iter->bday)/
(float)(dynamic_cast<it_comest*>(iter->type)->spoils);
++used_age_count;
}
}
if (used_age_count > 0 && newit.goes_bad())
{
const int average_used_age = (used_age_tally / used_age_count) * dynamic_cast<it_comest*>(newit.type)->spoils;
newit.bday = newit.bday - average_used_age;
}
// for food items
if (newit.is_food())
{
int bday_tmp = turn % 3600; // fuzzy birthday for stacking reasons
newit.bday = int(turn) + 3600 - bday_tmp;
int bday_tmp = newit.bday % 3600; // fuzzy birthday for stacking reasons
newit.bday = int(newit.bday) + 3600 - bday_tmp;
if (newit.has_flag(IF_EATEN_HOT)) { // hot foods generated
newit.item_flags |= mfb(IF_HOT);
if (newit.has_flag("EATEN_HOT")) { // hot foods generated
newit.item_tags.insert("HOT");
newit.active = true;
newit.item_counter = 600;
}
@@ -1108,169 +1128,225 @@ void game::complete_craft()
newit.tname().c_str());
m.add_item(u.posx, u.posy, newit);
} else {
u.i_add(newit);
newit = u.i_add(newit);
add_msg("%c - %s", newit.invlet, newit.tname().c_str());
}
}
}
void game::consume_items(std::vector<component> components)
std::list<item> game::consume_items(player *p, std::vector<component> components)
{
// For each set of components in the recipe, fill you_have with the list of all
// matching ingredients the player has.
std::vector<component> player_has;
std::vector<component> map_has;
std::vector<component> mixed;
std::vector<component> player_use;
std::vector<component> map_use;
std::vector<component> mixed_use;
inventory map_inv;
map_inv.form_from_map(this, point(u.posx, u.posy), PICKUP_RANGE);
std::list<item> ret;
// For each set of components in the recipe, fill you_have with the list of all
// matching ingredients the player has.
std::vector<component> player_has;
std::vector<component> map_has;
std::vector<component> mixed;
std::vector<component> player_use;
std::vector<component> map_use;
std::vector<component> mixed_use;
inventory map_inv;
map_inv.form_from_map(this, point(p->posx, p->posy), PICKUP_RANGE);
for (int i = 0; i < components.size(); i++) {
itype_id type = components[i].type;
int count = abs(components[i].count);
bool pl = false, mp = false;
if (components[i].available != 1)
{
continue;
}
for (int i = 0; i < components.size(); i++)
{
itype_id type = components[i].type;
int count = abs(components[i].count);
bool pl = false, mp = false;
if (item_controller->find_template(type)->count_by_charges() && count > 0)
{
if (u.has_charges(type, count)) {
player_has.push_back(components[i]);
pl = true;
}
if (map_inv.has_charges(type, count)) {
map_has.push_back(components[i]);
mp = true;
}
if (!pl && !mp && u.charges_of(type) + map_inv.charges_of(type) >= count)
mixed.push_back(components[i]);
}
if (components[i].available != 1)
{
continue;
}
else { // Counting by units, not charges
if (item_controller->find_template(type)->count_by_charges() && count > 0)
{
if (p->has_charges(type, count))
{
player_has.push_back(components[i]);
pl = true;
}
if (map_inv.has_charges(type, count))
{
map_has.push_back(components[i]);
mp = true;
}
if (!pl && !mp && p->charges_of(type) + map_inv.charges_of(type) >= count)
{
mixed.push_back(components[i]);
}
}
else // Counting by units, not charges
{
if (u.has_amount(type, count)) {
player_has.push_back(components[i]);
pl = true;
}
if (map_inv.has_amount(type, count)) {
map_has.push_back(components[i]);
mp = true;
}
if (!pl && !mp && u.amount_of(type) + map_inv.amount_of(type) >= count)
mixed.push_back(components[i]);
if (p->has_amount(type, count))
{
player_has.push_back(components[i]);
pl = true;
}
if (map_inv.has_amount(type, count))
{
map_has.push_back(components[i]);
mp = true;
}
if (!pl && !mp && p->amount_of(type) + map_inv.amount_of(type) >= count)
{
mixed.push_back(components[i]);
}
}
}
}
}
if (player_has.size() + map_has.size() + mixed.size() == 1) { // Only 1 choice
if (player_has.size() == 1)
player_use.push_back(player_has[0]);
else if (map_has.size() == 1)
map_use.push_back(map_has[0]);
else
mixed_use.push_back(mixed[0]);
if (player_has.size() + map_has.size() + mixed.size() == 1) // Only 1 choice
{
if (player_has.size() == 1)
{
player_use.push_back(player_has[0]);
}
else if (map_has.size() == 1)
{
map_use.push_back(map_has[0]);
}
else
{
mixed_use.push_back(mixed[0]);
}
}
else // Let the player pick which component they want to use
{
std::vector<std::string> options; // List for the menu_vec below
// Populate options with the names of the items
for (int i = 0; i < map_has.size(); i++)
{
std::string tmpStr = item_controller->find_template(map_has[i].type)->name + " (nearby)";
options.push_back(tmpStr);
}
for (int i = 0; i < player_has.size(); i++)
{
options.push_back(item_controller->find_template(player_has[i].type)->name);
}
for (int i = 0; i < mixed.size(); i++)
{
std::string tmpStr = item_controller->find_template(mixed[i].type)->name +" (on person & nearby)";
options.push_back(tmpStr);
}
} else { // Let the player pick which component they want to use
std::vector<std::string> options; // List for the menu_vec below
// Populate options with the names of the items
for (int i = 0; i < map_has.size(); i++) {
std::string tmpStr = item_controller->find_template(map_has[i].type)->name + " (nearby)";
options.push_back(tmpStr);
}
for (int i = 0; i < player_has.size(); i++)
options.push_back(item_controller->find_template(player_has[i].type)->name);
for (int i = 0; i < mixed.size(); i++) {
std::string tmpStr = item_controller->find_template(mixed[i].type)->name +" (on person & nearby)";
options.push_back(tmpStr);
}
// unlike with tools, it's a bad thing if there aren't any components available
if (options.size() == 0)
{
debugmsg("Attempted a recipe with no available components!");
return ret;
}
if (options.size() == 0) // This SHOULD only happen if cooking with a fire,
return; // and the fire goes out.
// Get the selection via a menu popup
int selection = menu_vec(false, "Use which component?", options) - 1;
if (selection < map_has.size())
{
map_use.push_back(map_has[selection]);
}
else if (selection < map_has.size() + player_has.size())
{
selection -= map_has.size();
player_use.push_back(player_has[selection]);
}
else
{
selection -= map_has.size() + player_has.size();
mixed_use.push_back(mixed[selection]);
}
}
// Get the selection via a menu popup
int selection = menu_vec(false, "Use which component?", options) - 1;
if (selection < map_has.size())
map_use.push_back(map_has[selection]);
else if (selection < map_has.size() + player_has.size()) {
selection -= map_has.size();
player_use.push_back(player_has[selection]);
} else {
selection -= map_has.size() + player_has.size();
mixed_use.push_back(mixed[selection]);
}
}
for (int i = 0; i < player_use.size(); i++) {
if (item_controller->find_template(player_use[i].type)->count_by_charges() &&
player_use[i].count > 0)
u.use_charges(player_use[i].type, player_use[i].count);
else
u.use_amount(player_use[i].type, abs(player_use[i].count),
(player_use[i].count < 0));
}
for (int i = 0; i < map_use.size(); i++) {
if (item_controller->find_template(map_use[i].type)->count_by_charges() &&
map_use[i].count > 0)
m.use_charges(point(u.posx, u.posy), PICKUP_RANGE,
map_use[i].type, map_use[i].count);
else
m.use_amount(point(u.posx, u.posy), PICKUP_RANGE,
map_use[i].type, abs(map_use[i].count),
(map_use[i].count < 0));
}
for (int i = 0; i < mixed_use.size(); i++) {
if (item_controller->find_template(mixed_use[i].type)->count_by_charges() &&
mixed_use[i].count > 0) {
int from_map = mixed_use[i].count - u.charges_of(mixed_use[i].type);
u.use_charges(mixed_use[i].type, u.charges_of(mixed_use[i].type));
m.use_charges(point(u.posx, u.posy), PICKUP_RANGE,
mixed_use[i].type, from_map);
} else {
bool in_container = (mixed_use[i].count < 0);
int from_map = abs(mixed_use[i].count) - u.amount_of(mixed_use[i].type);
u.use_amount(mixed_use[i].type, u.amount_of(mixed_use[i].type),
in_container);
m.use_amount(point(u.posx, u.posy), PICKUP_RANGE,
mixed_use[i].type, from_map, in_container);
}
}
for (int i = 0; i < player_use.size(); i++)
{
if (item_controller->find_template(player_use[i].type)->count_by_charges() &&
player_use[i].count > 0)
{
std::list<item> tmp = p->use_charges(player_use[i].type, player_use[i].count);
ret.splice(ret.end(), tmp);
}
else
{
std::list<item> tmp = p->use_amount(player_use[i].type, abs(player_use[i].count),
(player_use[i].count < 0));
ret.splice(ret.end(), tmp);
}
}
for (int i = 0; i < map_use.size(); i++)
{
if (item_controller->find_template(map_use[i].type)->count_by_charges() &&
map_use[i].count > 0)
{
std::list<item> tmp = m.use_charges(point(p->posx, p->posy), PICKUP_RANGE,
map_use[i].type, map_use[i].count);
ret.splice(ret.end(), tmp);
}
else
{
std::list<item> tmp = m.use_amount(point(p->posx, p->posy), PICKUP_RANGE,
map_use[i].type, abs(map_use[i].count),
(map_use[i].count < 0));
ret.splice(ret.end(), tmp);
}
}
for (int i = 0; i < mixed_use.size(); i++)
{
if (item_controller->find_template(mixed_use[i].type)->count_by_charges() &&
mixed_use[i].count > 0)
{
int from_map = mixed_use[i].count - p->charges_of(mixed_use[i].type);
std::list<item> tmp;
tmp = p->use_charges(mixed_use[i].type, p->charges_of(mixed_use[i].type));
ret.splice(ret.end(), tmp);
tmp = m.use_charges(point(p->posx, p->posy), PICKUP_RANGE,
mixed_use[i].type, from_map);
ret.splice(ret.end(), tmp);
}
else
{
bool in_container = (mixed_use[i].count < 0);
int from_map = abs(mixed_use[i].count) - p->amount_of(mixed_use[i].type);
std::list<item> tmp;
tmp = p->use_amount(mixed_use[i].type, p->amount_of(mixed_use[i].type),
in_container);
ret.splice(ret.end(), tmp);
tmp = m.use_amount(point(p->posx, p->posy), PICKUP_RANGE,
mixed_use[i].type, from_map, in_container);
ret.splice(ret.end(), tmp);
}
}
return ret;
}
void game::consume_tools(std::vector<component> tools)
void game::consume_tools(player *p, std::vector<component> tools, bool force_available)
{
bool found_nocharge = false;
inventory map_inv;
map_inv.form_from_map(this, point(u.posx, u.posy), PICKUP_RANGE);
map_inv.form_from_map(this, point(p->posx, p->posy), PICKUP_RANGE);
std::vector<component> player_has;
std::vector<component> map_has;
// Use charges of any tools that require charges used
for (int i = 0; i < tools.size() && !found_nocharge; i++) {
if (tools[i].available != 1)
if (!force_available && tools[i].available != 1)
{
continue;
}
itype_id type = tools[i].type;
if (tools[i].count > 0) {
int count = tools[i].count;
if (u.has_charges(type, count))
if (p->has_charges(type, count))
player_has.push_back(tools[i]);
if (map_inv.has_charges(type, count))
map_has.push_back(tools[i]);
} else if (u.has_amount(type, 1) || map_inv.has_amount(type, 1))
} else if (p->has_amount(type, 1) || map_inv.has_amount(type, 1))
found_nocharge = true;
}
if (found_nocharge)
return; // Default to using a tool that doesn't require charges
if (player_has.size() == 1 && map_has.size() == 0)
u.use_charges(player_has[0].type, player_has[0].count);
p->use_charges(player_has[0].type, player_has[0].count);
else if (map_has.size() == 1 && player_has.size() == 0)
m.use_charges(point(u.posx, u.posy), PICKUP_RANGE,
m.use_charges(point(p->posx, p->posy), PICKUP_RANGE,
map_has[0].type, map_has[0].count);
else { // Variety of options, list them and pick one
// Populate the list
@@ -1288,11 +1364,11 @@ void game::consume_tools(std::vector<component> tools)
// Get selection via a popup menu
int selection = menu_vec(false, "Use which tool?", options) - 1;
if (selection < map_has.size())
m.use_charges(point(u.posx, u.posy), PICKUP_RANGE,
m.use_charges(point(p->posx, p->posy), PICKUP_RANGE,
map_has[selection].type, map_has[selection].count);
else {
selection -= map_has.size();
u.use_charges(player_has[selection].type, player_has[selection].count);
p->use_charges(player_has[selection].type, player_has[selection].count);
}
}
}
@@ -1330,7 +1406,7 @@ void game::disassemble(char ch)
{
// check tools are available
// loop over the tools and see what's required...again
inventory crafting_inv = crafting_inventory();
inventory crafting_inv = crafting_inventory(&u);
bool have_all_tools = true;
for (int j = 0; j < cur_recipe->tools.size(); j++)
{
@@ -1373,7 +1449,7 @@ void game::disassemble(char ch)
int req = cur_recipe->tools[j][0].count;
if (cur_recipe->tools[j][0].type == "welder")
{
add_msg("You need a hack saw to disassemble this.");
add_msg("You need a hacksaw to disassemble this.");
}
else
{
@@ -1447,7 +1523,7 @@ void game::complete_disassemble()
for (int j = 0; j < dis->tools.size(); j++)
{
if (dis->tools[j].size() > 0)
consume_tools(dis->tools[j]);
consume_tools(&u, dis->tools[j], false);
}
// add the components to the map
@@ -1489,7 +1565,7 @@ void game::complete_disassemble()
if (newit.count_by_charges())
{
if (dis->difficulty == 0 || comp_success)
m.spawn_item(u.posx, u.posy, item_controller->find_template(dis->components[j][0].type), 0, 0, compcount);
m.spawn_item(u.posx, u.posy, dis->components[j][0].type, 0, 0, compcount);
else
add_msg("You fail to recover a component.");
compcount = 0;
+4 -4
View File
@@ -49,14 +49,14 @@ struct recipe {
autolearn = false;
}
recipe(std::string pident, int pid, itype_id pres, craft_cat pcat, const char *p1,
const char *p2, int pdiff, int ptime, bool preversible, bool pautolearn,
recipe(std::string pident, int pid, itype_id pres, craft_cat pcat, std::string &p1,
std::string &p2, int pdiff, int ptime, bool preversible, bool pautolearn,
int plearn_dis) :
ident (pident), id (pid), result (pres), cat(pcat), difficulty (pdiff), time (ptime),
reversible (preversible), autolearn (pautolearn), learn_by_disassembly (plearn_dis)
{
sk_primary = p1?Skill::skill(p1):NULL;
sk_secondary = p2?Skill::skill(p2):NULL;
sk_primary = p1.size()?Skill::skill(p1):NULL;
sk_secondary = p2.size()?Skill::skill(p2):NULL;
}
};
+1 -1
View File
@@ -1,7 +1,7 @@
#ifndef _CURSES_DEF_H_
#define _CURSES_DEF_H_
#if (defined _WIN32 || defined WINDOWS)
#if (defined TILES || defined _WIN32 || defined WINDOWS)
#include "catacurse.h"
#elif (defined __CYGWIN__)
#include "ncurses/curses.h"
+3 -3
View File
@@ -1,3 +1,3 @@
Terminus
8
16
fixedsys
8
16
+177
View File
@@ -1,5 +1,182 @@
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:
Binary file not shown.
+138 -159
View File
@@ -7,7 +7,7 @@
"symbol" : "=",
"color" : "magenta",
"description" : "A set of universal batteries. Used to charge almost any electronic device.",
"material" : "IRON",
"material" : "iron",
"volume" : 1,
"weight" : 1,
"bashing" : 1,
@@ -29,7 +29,7 @@
"symbol" : "=",
"color" : "magenta",
"description" : "A small quantity of thread that could be used to refill a sewing kit.",
"material" : "COTTON",
"material" : "cotton",
"volume" : 1,
"weight" : 1,
"bashing" : 1,
@@ -51,7 +51,7 @@
"symbol" : "=",
"color" : "red",
"description" : "A tough sinew cut from a corpse, useable as thread.",
"material" : "FLESH",
"material" : "flesh",
"volume" : 1,
"weight" : 1,
"bashing" : 1,
@@ -73,7 +73,7 @@
"symbol" : "=",
"color" : "green",
"description" : "Tough thin fibres, taken from a plant. Can be used as thread.",
"material" : "VEGGY",
"material" : "veggy",
"volume" : 1,
"weight" : 1,
"bashing" : 1,
@@ -95,7 +95,7 @@
"symbol" : "=",
"color" : "light_gray",
"description" : "A roll of incredibly strong tape. Its uses are innumerable.",
"material" : "PLASTIC",
"material" : "plastic",
"volume" : 2,
"weight" : 2,
"bashing" : 1,
@@ -117,7 +117,7 @@
"symbol" : "=",
"color" : "light_gray",
"description" : "Plastic jacketed copper cable of the type used in small electronics.",
"material" : "PLASTIC",
"material" : "plastic",
"volume" : 2,
"weight" : 2,
"bashing" : 1,
@@ -139,7 +139,7 @@
"symbol" : "=",
"color" : "light_green",
"description" : "A nuclear-powered battery. Used to charge advanced and rare electronics.",
"material" : "STEEL",
"material" : "steel",
"volume" : 1,
"weight" : 1,
"bashing" : 1,
@@ -161,7 +161,7 @@
"symbol" : "=",
"color" : "cyan",
"description" : "A box of nails, mainly useful with a hammer.",
"material" : "IRON",
"material" : "iron",
"volume" : 1,
"weight" : 8,
"bashing" : 1,
@@ -183,7 +183,7 @@
"symbol" : "=",
"color" : "light_gray",
"description" : "A handful of pebbles, useful as ammunition for slings.",
"material" : "STONE",
"material" : "stone",
"volume" : 1,
"weight" : 1,
"bashing" : 1,
@@ -205,7 +205,7 @@
"symbol" : "=",
"color" : "light_gray",
"description" : "A box of ball bearings, useful as ammunition for slings.",
"material" : "STONE",
"material" : "stone",
"volume" : 1,
"weight" : 2,
"bashing" : 1,
@@ -227,7 +227,7 @@
"symbol" : "=",
"color" : "pink",
"description" : "A box of small steel balls. They deal virtually no damage.",
"material" : "STEEL",
"material" : "steel",
"volume" : 1,
"weight" : 6,
"bashing" : 1,
@@ -241,93 +241,27 @@
"recoil" : 0,
"count" : 200
},
{ "type" : "AMMO",
"id" : "arrow_wood",
"rarity" : 7,
"price" : 100,
"name" : "wood arrow",
{ "type" : "AMMO",
"id" : "feather",
"rarity" : 50,
"price" : 30,
"name" : "feather",
"symbol" : "=",
"color" : "green",
"description" : "A sharpened arrow carved from wood. It's light-weight, does little damage, and is so-so on accuracy. Stands a good chance of remaining intact once fired.",
"material" : "WOOD",
"volume" : 2,
"weight" : 60,
"bashing" : 1,
"cutting" : 0,
"to_hit" : 0,
"ammo_type" : "arrow",
"damage" : 8,
"pierce" : 1,
"range" : 0,
"accuracy" : 18,
"recoil" : 0,
"count" : 10
},
{ "type" : "AMMO",
"id" : "arrow_cf",
"rarity" : 5,
"price" : 300,
"name" : "carbon fiber arrow",
"symbol" : "=",
"color" : "green",
"description" : "High-tech carbon fiber shafts and 100 grain broadheads. Very light weight, fast, and notoriously fragile.",
"material" : "PLASTIC",
"volume" : 2,
"weight" : 30,
"bashing" : 1,
"cutting" : 0,
"to_hit" : 0,
"ammo_type" : "arrow",
"damage" : 12,
"pierce" : 2,
"range" : 5,
"accuracy" : 14,
"recoil" : 0,
"count" : 8
},
{ "type" : "AMMO",
"id" : "bolt_wood",
"rarity" : 8,
"price" : 100,
"name" : "wood crossbow bolt",
"symbol" : "=",
"color" : "green",
"description" : "A sharpened bolt carved from wood. It's lighter than a steel bolt, but does less damage and is less accurate. Stands a good chance of remaining intact once fired.",
"material" : "WOOD",
"color" : "white",
"description" : "Feathers from a bird. Useful for fletching arrows",
"material" : "cotton",
"volume" : 1,
"weight" : 40,
"bashing" : 1,
"weight" : 0,
"bashing" : 0,
"cutting" : 0,
"to_hit" : 0,
"ammo_type" : "bolt",
"damage" : 10,
"pierce" : 1,
"ammo_type" : "none",
"damage" : 0,
"pierce" : 0,
"range" : 0,
"accuracy" : 16,
"accuracy" : 0,
"recoil" : 0,
"count" : 15
},
{ "type" : "AMMO",
"id" : "bolt_steel",
"rarity" : 7,
"price" : 400,
"name" : "steel crossbow bolt",
"symbol" : "=",
"color" : "green",
"description" : "A sharp bolt made from steel. Deadly in skilled hands. Stands an excellent chance of remaining intact once fired.",
"material" : "STEEL",
"volume" : 1,
"weight" : 90,
"bashing" : 1,
"cutting" : 0,
"to_hit" : 0,
"ammo_type" : "bolt",
"damage" : 20,
"pierce" : 3,
"range" : 4,
"accuracy" : 12,
"recoil" : 0,
"count" : 10
"count" : 20
},
{ "type" : "AMMO",
"id" : "shot_bird",
@@ -337,7 +271,7 @@
"symbol" : "=",
"color" : "red",
"description" : "Weak shotgun ammunition. Designed for hunting birds and other small game, its applications in combat are very limited.",
"material" : "PLASTIC",
"material" : "plastic",
"volume" : 2,
"weight" : 25,
"bashing" : 1,
@@ -360,7 +294,7 @@
"symbol" : "=",
"color" : "red",
"description" : "A shell filled with iron pellets. Extremely damaging, plus the spread makes it very accurate at short range. Favored by SWAT forces.",
"material" : "PLASTIC",
"material" : "plastic",
"volume" : 2,
"weight" : 28,
"bashing" : 1,
@@ -383,7 +317,7 @@
"symbol" : "=",
"color" : "red",
"description" : "A heavy metal slug used with shotguns to give them the range capabilities of a rifle. Extremely damaging but rather innaccurate. Works best in a shotgun with a rifled barrel.",
"material" : "PLASTIC",
"material" : "plastic",
"volume" : 2,
"weight" : 34,
"bashing" : 1,
@@ -406,7 +340,7 @@
"symbol" : "=",
"color" : "red",
"description" : "A shotgun slug loaded with concussive explosives. While the slug itself will not do much damage to its target, it will explode on contact.",
"material" : "PLASTIC",
"material" : "plastic",
"volume" : 2,
"weight" : 30,
"bashing" : 1,
@@ -429,7 +363,7 @@
"symbol" : "=",
"color" : "light_blue",
"description" : "One of the smallest calibers available, the .22 Long Rifle cartridge has maintained popularity for nearly two centuries. Its minimal recoil, low cost and low noise are offset by its paltry damage.",
"material" : "STEEL",
"material" : "steel",
"volume" : 2,
"weight" : 2,
"bashing" : 1,
@@ -452,7 +386,7 @@
"symbol" : "=",
"color" : "light_blue",
"description" : "Conical Ball .22 is a variety of .22 ammunition with a very small propellant charge, generally with no gunpowder, resulting in a subsonic round. It is nearly silent, but is so weak as to be nearly useless.",
"material" : "STEEL",
"material" : "steel",
"volume" : 2,
"weight" : 2,
"bashing" : 1,
@@ -475,7 +409,7 @@
"symbol" : "=",
"color" : "light_blue",
"description" : "Rat-shot is extremely weak ammunition, designed for killing rats, snakes, or other small vermin while being unable to damage walls. It has an extremely short range and is unable to injure all but the smallest creatures.",
"material" : "STEEL",
"material" : "steel",
"volume" : 2,
"weight" : 2,
"bashing" : 1,
@@ -498,7 +432,7 @@
"symbol" : "=",
"color" : "light_blue",
"description" : "9 millimeter parabellum is generally regarded as the most popular handgun cartridge, used by the majority of US police forces. It is also a very popular round in sub-machine guns.",
"material" : "STEEL",
"material" : "steel",
"volume" : 2,
"weight" : 7,
"bashing" : 1,
@@ -521,7 +455,7 @@
"symbol" : "=",
"color" : "light_blue",
"description" : "Attempts to improve the ballistics of 9mm ammunition lead to high-pressure rounds. Increased velocity resullts in superior accuracy and damage.",
"material" : "STEEL",
"material" : "steel",
"volume" : 1,
"weight" : 7,
"bashing" : 1,
@@ -544,7 +478,7 @@
"symbol" : "=",
"color" : "light_blue",
"description" : "A step beyond the high-pressure 9mm +P round, the +P+ has an even higher internal pressure that offers a degree of armor-penetrating ability.",
"material" : "STEEL",
"material" : "steel",
"volume" : 1,
"weight" : 7,
"bashing" : 1,
@@ -567,7 +501,7 @@
"symbol" : "=",
"color" : "light_blue",
"description" : "This small caliber pistol round offers quite good armor penetration at the cost of slightly less damage. It is rarely used outside of the Chinese army.",
"material" : "STEEL",
"material" : "steel",
"volume" : 2,
"weight" : 7,
"bashing" : 1,
@@ -590,7 +524,7 @@
"symbol" : "=",
"color" : "light_blue",
"description" : "The .38 Smith & Wesson Special enjoyed popularity among US police forces throughout the 20th century. It is most commonly used in revolvers.",
"material" : "STEEL",
"material" : "steel",
"volume" : 2,
"weight" : 10,
"bashing" : 1,
@@ -613,7 +547,7 @@
"symbol" : "=",
"color" : "light_blue",
"description" : "The .38 Super is a high-pressure load of the .38 Special caliber. It is a popular choice in pistol competions for its high accuracy, while its stopping power keeps it popular for self-defense.",
"material" : "STEEL",
"material" : "steel",
"volume" : 1,
"weight" : 9,
"bashing" : 1,
@@ -636,7 +570,7 @@
"symbol" : "=",
"color" : "blue",
"description" : "Originally used by the FBI, the organization eventually abandoned the round due to its high recoil. Although respected for its versatility and power, it has largely been supplanted by the downgraded .40 S&W.",
"material" : "STEEL",
"material" : "steel",
"volume" : 2,
"weight" : 9,
"bashing" : 1,
@@ -659,7 +593,7 @@
"symbol" : "=",
"color" : "blue",
"description" : "The .40 Smith & Wesson round was developed as an alternative to 10mm Auto for the FBI after they complained of high recoil. It is as accurate as 9mm, but has greater stopping power, leading to widespread use in law enforcement.",
"material" : "STEEL",
"material" : "steel",
"volume" : 2,
"weight" : 9,
"bashing" : 1,
@@ -682,7 +616,7 @@
"symbol" : "=",
"color" : "blue",
"description" : "Described (in 1971) by Dirty Harry as \"the most powerful handgun in the world,\" the .44 Magnum gained widespead popularity due to its depictions in the media. In reality, its intense recoil makes it unsuitable in most cases.",
"material" : "STEEL",
"material" : "steel",
"volume" : 2,
"weight" : 15,
"bashing" : 1,
@@ -705,7 +639,7 @@
"symbol" : "=",
"color" : "blue",
"description" : "The .45 round was one of the most popular and powerful handgun rounds through the 20th century. It features very good accuracy and stopping power, but suffers from moderate recoil and poor armor penetration.",
"material" : "STEEL",
"material" : "steel",
"volume" : 2,
"weight" : 10,
"bashing" : 1,
@@ -728,7 +662,7 @@
"symbol" : "=",
"color" : "blue",
"description" : "Full Metal Jacket .45 rounds are designed to overcome the poor armor penetration of the standard ACP round. However, they are less likely to expand upon impact, resulting in reduced damage overall.",
"material" : "STEEL",
"material" : "steel",
"volume" : 1,
"weight" : 13,
"bashing" : 1,
@@ -751,7 +685,7 @@
"symbol" : "=",
"color" : "blue",
"description" : "The .45 Super round is an updated variant of .45 ACP. It is overloaded, resulting in a great increase in muzzle velocity. This translates to higher accuracy and range, a minor armor piercing capability, and greater recoil.",
"material" : "STEEL",
"material" : "steel",
"volume" : 1,
"weight" : 11,
"bashing" : 1,
@@ -774,7 +708,7 @@
"symbol" : "=",
"color" : "dark_gray",
"description" : "The 5.7x28mm round is a proprietary round developed by FN Hestal for use in their P90 SMG. While it is a very small round, comparable in power to .22, it features incredible armor-piercing capabilities and very low recoil.",
"material" : "STEEL",
"material" : "steel",
"volume" : 3,
"weight" : 2,
"bashing" : 1,
@@ -797,7 +731,7 @@
"symbol" : "=",
"color" : "dark_gray",
"description" : "Designed by Heckler & Koch to compete with the 5.7x28mm round, 4.6x30mm is, like the 5.7, designed to minimize weight and recoil while increasing penetration of body armor. Its low recoil makes it ideal for automatic fire.",
"material" : "STEEL",
"material" : "steel",
"volume" : 3,
"weight" : 1,
"bashing" : 1,
@@ -820,7 +754,7 @@
"symbol" : "=",
"color" : "dark_gray",
"description" : "Designed during World War II by the Soviet Union, the popularity of the AK-47 and the SKS contributed to the widespread adaption of the 7.62x39mm rifle round. However, due to its lack of yaw, this round deals less damage than most.",
"material" : "STEEL",
"material" : "steel",
"volume" : 3,
"weight" : 7,
"bashing" : 1,
@@ -843,7 +777,7 @@
"symbol" : "=",
"color" : "dark_gray",
"description" : "The M67 variant of the popular 7.62x39mm rifle round was designed to improve yaw. This causes the round to tumble inside a target, causing significantly more damage. It is still outdone by shattering rounds.",
"material" : "STEEL",
"material" : "steel",
"volume" : 3,
"weight" : 8,
"bashing" : 1,
@@ -866,7 +800,7 @@
"symbol" : "=",
"color" : "dark_gray",
"description" : "The .223 rifle round is a civilian variant of the 5.56 NATO round. It is designed to tumble or fragment inside a target, dealing devastating damage. The lower pressure of the .223 compared to the 5.56 results in lower accuracy.",
"material" : "STEEL",
"material" : "steel",
"volume" : 2,
"weight" : 2,
"bashing" : 1,
@@ -889,7 +823,7 @@
"symbol" : "=",
"color" : "dark_gray",
"description" : "This rifle round has enjoyed widespread use in NATO countries, thanks to its very light weight and high damage. It is designed to shatter inside a target, inflicting massive damage.",
"material" : "STEEL",
"material" : "steel",
"volume" : 2,
"weight" : 4,
"bashing" : 1,
@@ -912,7 +846,7 @@
"symbol" : "=",
"color" : "dark_gray",
"description" : "A variant of the widely-used 5.56 NATO round, incendiary rounds are designed to burn hotly upon impact, piercing armor and igniting flammable substances.",
"material" : "STEEL",
"material" : "steel",
"volume" : 2,
"weight" : 4,
"bashing" : 1,
@@ -935,7 +869,7 @@
"symbol" : "=",
"color" : "dark_gray",
"description" : "Based off the military .30-03 round, the .270 rifle round is compatible with most guns that fire .30-06 rounds. However, it is designed for hunting, and is less powerful than the military rounds, with nearly no armor penetration.",
"material" : "STEEL",
"material" : "steel",
"volume" : 1,
"weight" : 7,
"bashing" : 1,
@@ -958,7 +892,7 @@
"symbol" : "=",
"color" : "dark_gray",
"description" : "The .30-06 is a very powerful rifle round designed for long-range use. Its stupendous accuracy and armor piercing capabilities make it one of the most deadly rounds available, offset only by its drastic recoil and noise.",
"material" : "STEEL",
"material" : "steel",
"volume" : 1,
"weight" : 12,
"bashing" : 1,
@@ -981,7 +915,7 @@
"symbol" : "=",
"color" : "dark_gray",
"description" : "A variant of the powerful .30-06 sniper round, incendiary rounds are designed to burn hotly upon impact, piercing armor and igniting flammable substances.",
"material" : "STEEL",
"material" : "steel",
"volume" : 1,
"weight" : 12,
"bashing" : 1,
@@ -1004,7 +938,7 @@
"symbol" : "=",
"color" : "dark_gray",
"description" : "The .308 Winchester is a rifle round, the commercial equivalent of the military 7.62x51mm round. Its high accuracy and phenominal damage have made it the most poplar hunting round in the world.",
"material" : "STEEL",
"material" : "steel",
"volume" : 1,
"weight" : 9,
"bashing" : 1,
@@ -1027,7 +961,7 @@
"symbol" : "=",
"color" : "dark_gray",
"description" : "The 7.62x51mm largely replaced the .30-06 round as the standard military rifle round. It is lighter, but offers similar velocities, resulting in greater accuracy and reduced recoil.",
"material" : "STEEL",
"material" : "steel",
"volume" : 1,
"weight" : 9,
"bashing" : 1,
@@ -1050,7 +984,7 @@
"symbol" : "=",
"color" : "dark_gray",
"description" : "A variant of the powerful 7.62x51mm round, incendiary rounds are designed to burn hotly upon impact, piercing armor and igniting flammable substances.",
"material" : "STEEL",
"material" : "steel",
"volume" : 1,
"weight" : 9,
"bashing" : 1,
@@ -1073,7 +1007,7 @@
"symbol" : "=",
"color" : "light_green",
"description" : "In the middle of the 21st Century, military powers began to look towards energy based weapons. The result was the standard fusion pack, capable of delivering bolts of superheated gas at near light speed with no recoil.",
"material" : "PLASTIC",
"material" : "plastic",
"volume" : 1,
"weight" : 2,
"bashing" : 1,
@@ -1096,7 +1030,7 @@
"symbol" : "=",
"color" : "light_red",
"description" : "A 40mm grenade with a concussive explosion.",
"material" : "STEEL",
"material" : "steel",
"volume" : 1,
"weight" : 200,
"bashing" : 1,
@@ -1119,7 +1053,7 @@
"symbol" : "=",
"color" : "light_red",
"description" : "A 40mm grenade with a small explosion and a high number of damaging fragments.",
"material" : "STEEL",
"material" : "steel",
"volume" : 1,
"weight" : 220,
"bashing" : 1,
@@ -1142,7 +1076,7 @@
"symbol" : "=",
"color" : "light_red",
"description" : "A 40mm grenade with a small napalm load, designed to create a burst of flame.",
"material" : "STEEL",
"material" : "steel",
"volume" : 1,
"weight" : 200,
"bashing" : 1,
@@ -1165,7 +1099,7 @@
"symbol" : "=",
"color" : "light_red",
"description" : "A 40mm grenade with a teargas load. It will burst in a cloud of highly incapacitating gas.",
"material" : "STEEL",
"material" : "steel",
"volume" : 1,
"weight" : 210,
"bashing" : 1,
@@ -1188,7 +1122,7 @@
"symbol" : "=",
"color" : "light_red",
"description" : "A 40mm grenade with a smoke load. It will burst in a cloud of harmless gas, and will also leave a streak of smoke cover in its wake.",
"material" : "STEEL",
"material" : "steel",
"volume" : 1,
"weight" : 210,
"bashing" : 1,
@@ -1211,7 +1145,7 @@
"symbol" : "=",
"color" : "light_red",
"description" : "A 40mm grenade with a flashbang load. It will detonate with a blast of light and sound, designed to blind, deafen, and disorient anyone nearby.",
"material" : "STEEL",
"material" : "steel",
"volume" : 1,
"weight" : 210,
"bashing" : 1,
@@ -1226,6 +1160,29 @@
"count" : 6,
"effects" : ["FLASHBANG"]
},
{ "type" : "AMMO",
"id" : "40mm_acidbomb",
"rarity" : 6,
"price" : 500,
"name" : "40mm acid bomb",
"symbol" : "=",
"color" : "light_red",
"description" : "A 40mm grenade with an acid bomb load.",
"material" : "steel",
"volume" : 1,
"weight" : 200,
"bashing" : 1,
"cutting" : 0,
"to_hit" : 0,
"ammo_type" : "40mm",
"damage" : 5,
"pierce" : 0,
"range" : 40,
"accuracy" : 8,
"recoil" : 15,
"count" : 1,
"effects" : ["ACIDBOMB"]
},
{ "type" : "AMMO",
"id" : "66mm_HEAT",
"rarity" : 0,
@@ -1234,7 +1191,7 @@
"symbol" : "=",
"color" : "red",
"description" : "A 60mm High Explosive Anti Tank round. They can blow through up to two feet of concrete.",
"material" : "STEEL",
"material" : "steel",
"volume" : 1,
"weight" : 1,
"bashing" : 1,
@@ -1257,7 +1214,7 @@
"symbol" : "=",
"color" : "red",
"description" : "The Heckler & Koch 12mm projectiles are used in H&K railguns. It's made of a ferromagnetic metal, probably cobalt.",
"material" : "STEEL",
"material" : "steel",
"volume" : 1,
"weight" : 10,
"bashing" : 1,
@@ -1280,7 +1237,7 @@
"symbol" : "=",
"color" : "green",
"description" : "A canister of hydrogen. With proper equipment, it could be heated to plasma.",
"material" : "STEEL",
"material" : "steel",
"volume" : 10,
"weight" : 25,
"bashing" : 1,
@@ -1303,7 +1260,7 @@
"symbol" : "=",
"color" : "red",
"description" : "A weak plasma charge.",
"material" : "NULL",
"material" : "null",
"volume" : 0,
"weight" : 0,
"bashing" : 1,
@@ -1325,7 +1282,7 @@
"symbol" : "=",
"color" : "red",
"description" : "An empty hull from a shotgun round.",
"material" : "PLASTIC",
"material" : "plastic",
"volume" : 0,
"weight" : 0,
"bashing" : 1,
@@ -1347,7 +1304,7 @@
"symbol" : "=",
"color" : "light_blue",
"description" : "An empty casing from a 9mm round.",
"material" : "STEEL",
"material" : "steel",
"volume" : 0,
"weight" : 0,
"bashing" : 1,
@@ -1369,7 +1326,7 @@
"symbol" : "=",
"color" : "light_blue",
"description" : "An empty casing from a .22 round.",
"material" : "STEEL",
"material" : "steel",
"volume" : 0,
"weight" : 0,
"bashing" : 1,
@@ -1391,7 +1348,7 @@
"symbol" : "=",
"color" : "light_blue",
"description" : "An empty casing from a .38 round.",
"material" : "STEEL",
"material" : "steel",
"volume" : 0,
"weight" : 0,
"bashing" : 1,
@@ -1413,7 +1370,7 @@
"symbol" : "=",
"color" : "blue",
"description" : "An empty casing from a .40 round.",
"material" : "STEEL",
"material" : "steel",
"volume" : 0,
"weight" : 0,
"bashing" : 1,
@@ -1435,7 +1392,7 @@
"symbol" : "=",
"color" : "blue",
"description" : "An empty casing from a .44 round.",
"material" : "STEEL",
"material" : "steel",
"volume" : 0,
"weight" : 0,
"bashing" : 1,
@@ -1457,7 +1414,7 @@
"symbol" : "=",
"color" : "blue",
"description" : "An empty casing from a .45 round.",
"material" : "STEEL",
"material" : "steel",
"volume" : 0,
"weight" : 0,
"bashing" : 1,
@@ -1479,7 +1436,7 @@
"symbol" : "=",
"color" : "dark_gray",
"description" : "An empty casing from a 5.7x28mm round.",
"material" : "STEEL",
"material" : "steel",
"volume" : 0,
"weight" : 0,
"bashing" : 1,
@@ -1501,7 +1458,7 @@
"symbol" : "=",
"color" : "dark_gray",
"description" : "An empty casing from a 4.6x30mm round.",
"material" : "STEEL",
"material" : "steel",
"volume" : 0,
"weight" : 0,
"bashing" : 1,
@@ -1523,7 +1480,7 @@
"symbol" : "=",
"color" : "dark_gray",
"description" : "An empty casing from a 7.62x39mm round.",
"material" : "STEEL",
"material" : "steel",
"volume" : 0,
"weight" : 0,
"bashing" : 1,
@@ -1545,7 +1502,7 @@
"symbol" : "=",
"color" : "dark_gray",
"description" : "An empty casing from a .223 round.",
"material" : "STEEL",
"material" : "steel",
"volume" : 0,
"weight" : 0,
"bashing" : 1,
@@ -1567,7 +1524,7 @@
"symbol" : "=",
"color" : "dark_gray",
"description" : "An empty casing from a .30-06 round.",
"material" : "STEEL",
"material" : "steel",
"volume" : 0,
"weight" : 0,
"bashing" : 1,
@@ -1589,7 +1546,7 @@
"symbol" : "=",
"color" : "dark_gray",
"description" : "An empty casing from a .308 round.",
"material" : "STEEL",
"material" : "steel",
"volume" : 0,
"weight" : 0,
"bashing" : 1,
@@ -1611,7 +1568,7 @@
"symbol" : "=",
"color" : "dark_gray",
"description" : "A large canister from a spent 40mm grenade.",
"material" : "STEEL",
"material" : "steel",
"volume" : 0,
"weight" : 0,
"bashing" : 1,
@@ -1633,7 +1590,7 @@
"symbol" : "=",
"color" : "dark_gray",
"description" : "Firearm quality gunpowder.",
"material" : "POWDER",
"material" : "powder",
"volume" : 0,
"weight" : 0,
"bashing" : 1,
@@ -1656,7 +1613,7 @@
"symbol" : "=",
"color" : "dark_gray",
"description" : "Primer from a shotgun round.",
"material" : "STEEL",
"material" : "steel",
"volume" : 0,
"weight" : 0,
"bashing" : 1,
@@ -1679,7 +1636,7 @@
"symbol" : "=",
"color" : "dark_gray",
"description" : "Primer from a small caliber round.",
"material" : "STEEL",
"material" : "steel",
"volume" : 0,
"weight" : 0,
"bashing" : 1,
@@ -1702,7 +1659,7 @@
"symbol" : "=",
"color" : "dark_gray",
"description" : "Primer from a large caliber pistol round.",
"material" : "STEEL",
"material" : "steel",
"volume" : 0,
"weight" : 0,
"bashing" : 1,
@@ -1725,7 +1682,7 @@
"symbol" : "=",
"color" : "dark_gray",
"description" : "Primer from a small caliber rifle round.",
"material" : "STEEL",
"material" : "steel",
"volume" : 0,
"weight" : 0,
"bashing" : 1,
@@ -1748,7 +1705,7 @@
"symbol" : "=",
"color" : "dark_gray",
"description" : "Primer from a large caliber rifle round.",
"material" : "STEEL",
"material" : "steel",
"volume" : 0,
"weight" : 0,
"bashing" : 1,
@@ -1771,7 +1728,7 @@
"symbol" : "=",
"color" : "dark_gray",
"description" : "Assorted bullet materials, useful in constructing a variety of ammunition.",
"material" : "STEEL",
"material" : "steel",
"volume" : 0,
"weight" : 0,
"bashing" : 1,
@@ -1793,7 +1750,7 @@
"symbol" : "=",
"color" : "dark_gray",
"description" : "Material from an incendiary round, useful in constructing incendiary ammunition.",
"material" : "STEEL",
"material" : "steel",
"volume" : 0,
"weight" : 0,
"bashing" : 1,
@@ -1816,7 +1773,7 @@
"symbol" : "=",
"color" : "light_red",
"description" : "Gasoline is a highly flammable liquid. When under pressure, it has the potential for violent explosion.",
"material" : "STEEL",
"material" : "steel",
"volume" : 0,
"weight" : 0,
"phase" : "liquid",
@@ -1832,5 +1789,27 @@
"count" : 200,
"effects" : ["FLAME","STREAM"],
"phase": "liquid"
}
},
{ "type" : "AMMO",
"id" : "medical_tape",
"rarity" : 45,
"price" : 20,
"name" : "medical tape",
"symbol" : "=",
"color" : "white",
"description" : "A roll of medical tape, similar to duct tape.",
"material" : "plastic",
"volume" : 0,
"weight" : 0,
"bashing" : 0,
"cutting" : 0,
"to_hit" : 0,
"ammo_type" : "none",
"damage" : 0,
"pierce" : 0,
"range" : 0,
"accuracy" : 0,
"recoil" : 0,
"count" : 35
}
]
+805
View File
@@ -0,0 +1,805 @@
[
{
"type" : "AMMO",
"id" : "arrowhead",
"rarity" : 0,
"price" : 30,
"name" : "arrowhead",
"symbol" : "=",
"color" : "light_gray",
"description" : "Heads for an arrow. Placing these on an arrow will make the arrow more damaging and piercing.",
"material" : "steel",
"volume" : 1,
"weight" : 1,
"bashing" : 1,
"cutting" : 0,
"to_hit" : 0,
"ammo_type" : "none",
"damage" : 0,
"pierce" : 0,
"range" : 0,
"accuracy" : 0,
"recoil" : 0,
"count" : 10
},
{
"type" : "AMMO",
"id" : "fletching",
"rarity" : 0,
"price" : 30,
"name" : "fletching",
"symbol" : "=",
"color" : "white",
"description" : "Also known as a flight, this item provides aerodynamic stabilization of arrows.",
"material" : "leather",
"volume" : 1,
"weight" : 1,
"bashing" : 1,
"cutting" : 0,
"to_hit" : 0,
"ammo_type" : "none",
"damage" : 0,
"pierce" : 0,
"range" : 0,
"accuracy" : 0,
"recoil" : 0,
"count" : 10
},
{
"type" : "AMMO",
"id" : "shaft_wood",
"rarity" : 0,
"price" : 20,
"name" : "wood arrow shaft",
"symbol" : "=",
"color" : "green",
"description" : "A crude shaft made from wood. It needs arrowheads and fletching to become a functional arrow. You can, however, fire it from a bow.",
"material" : "wood",
"volume" : 1,
"weight" : 12,
"bashing" : 1,
"cutting" : 0,
"to_hit" : 0,
"ammo_type" : "arrow",
"damage" : 0,
"pierce" : 0,
"range" : 0,
"accuracy" : 40,
"recoil" : 0,
"count" : 10
},
{
"type" : "AMMO",
"id" : "shaft_wood_heavy",
"rarity" : 0,
"price" : 20,
"name" : "heavy wood arrow shaft",
"symbol" : "=",
"color" : "green",
"description" : "A heavy shaft made from wood. It needs arrowheads and fletching to become a functional arrow. You can, however, fire it from a bow.",
"material" : "wood",
"volume" : 1,
"weight" : 14,
"bashing" : 2,
"cutting" : 0,
"to_hit" : 0,
"ammo_type" : "arrow",
"damage" : 2,
"pierce" : 0,
"range" : 1,
"accuracy" : 35,
"recoil" : 0,
"count" : 10
},
{
"type" : "AMMO",
"id" : "shaft_metal",
"rarity" : 0,
"price" : 20,
"name" : "metal arrow shaft",
"symbol" : "=",
"color" : "green",
"description" : "A heavy shaft made from scrap metal. It needs arrowheads and fletching to become a functional arrow. You can, however, fire it from a bow.",
"material" : "steel",
"volume" : 1,
"weight" : 19,
"bashing" : 3,
"cutting" : 0,
"to_hit" : 0,
"ammo_type" : "arrow",
"damage" : 3,
"pierce" : 0,
"range" : 3,
"accuracy" : 30,
"recoil" : 0,
"count" : 10
},
{
"type" : "AMMO",
"id" : "arrow_fire_hardened",
"rarity" : 0,
"price" : 25,
"name" : "fire hardened wood arrow",
"symbol" : "=",
"color" : "green",
"description" : "A simple arrow shaft that has had a point carved into it and then fire hardened.",
"material" : "wood",
"volume" : 1,
"weight" : 12,
"bashing" : 2,
"cutting" : 0,
"to_hit" : 0,
"ammo_type" : "arrow",
"damage" : 3,
"pierce" : 0,
"range" : 2,
"accuracy" : 35,
"recoil" : 0,
"count" : 10
},
{
"type" : "AMMO",
"id" : "arrow_field_point",
"rarity" : 0,
"price" : 30,
"name" : "field point wood arrow",
"symbol" : "=",
"color" : "green",
"description" : "A simple arrow shaft that has a crude arrow head. Useful for hunting small woodland creatures.",
"material" : "wood",
"volume" : 1,
"weight" : 13,
"bashing" : 3,
"cutting" : 0,
"to_hit" : 0,
"ammo_type" : "arrow",
"damage" : 6,
"pierce" : 1,
"range" : 2,
"accuracy" : 35,
"recoil" : 0,
"count" : 10
},
{
"type" : "AMMO",
"id" : "arrow_fire_hardened_fletched",
"rarity" : 0,
"price" : 35,
"name" : "fletched fire hardened wood arrow",
"symbol" : "=",
"color" : "green",
"description" : "This simple arrow has a fire hardened point and some fletchings.",
"material" : "wood",
"volume" : 1,
"weight" : 13,
"bashing" : 3,
"cutting" : 0,
"to_hit" : 0,
"ammo_type" : "arrow",
"damage" : 4,
"pierce" : 0,
"range" : 6,
"accuracy" : 20,
"recoil" : 0,
"count" : 10
},
{
"type" : "AMMO",
"id" : "arrow_field_point_fletched",
"rarity" : 0,
"price" : 40,
"name" : "fletched field point wood arrow",
"symbol" : "=",
"color" : "green",
"description" : "A simple arrow shaft that has a crude arrow head and some fletchings. Useful for hunting small woodland creatures or as a last ditch defense against zombies.",
"material" : "wood",
"volume" : 1,
"weight" : 14,
"bashing" : 3,
"cutting" : 0,
"to_hit" : 0,
"ammo_type" : "arrow",
"damage" : 7,
"pierce" : 2,
"range" : 6,
"accuracy" : 20,
"recoil" : 0,
"count" : 10
},
{
"type" : "AMMO",
"id" : "arrow_wood",
"rarity" : 7,
"price" : 75,
"name" : "wood arrow",
"symbol" : "=",
"color" : "green",
"description" : "A basic wooden arrow, it has a metal arrow head and some fletchings. It's light-weight, does some damage, and is so-so on accuracy. Stands a good chance of remaining intact once fired.",
"material" : "wood",
"volume" : 1,
"weight" : 15,
"bashing" : 2,
"cutting" : 1,
"to_hit" : 0,
"ammo_type" : "arrow",
"damage" : 10,
"pierce" : 3,
"range" : 7,
"accuracy" : 15,
"recoil" : 0,
"count" : 10
},
{
"type" : "AMMO",
"id" : "arrow_heavy_fire_hardened_fletched",
"rarity" : 7,
"price" : 75,
"name" : "heavy fletched fire hardened arrow",
"symbol" : "=",
"color" : "green",
"description" : "This arrow is significantly sturdier than other wooden arrows. It has a firehardened point and some fletchings.",
"material" : "plastic",
"volume" : 1,
"weight" : 19,
"bashing" : 4,
"cutting" : 0,
"to_hit" : 0,
"ammo_type" : "arrow",
"damage" : 5,
"pierce" : 2,
"range" : 7,
"accuracy" : 15,
"recoil" : 0,
"count" : 10
},
{
"type" : "AMMO",
"id" : "arrow_heavy_field_point_fletched",
"rarity" : 7,
"price" : 75,
"name" : "heavy fletched field point arrow",
"symbol" : "=",
"color" : "green",
"description" : "This arrow is significantly sturdier than other wooden arrows. It has a crude field point head and some fletchings.",
"material" : "plastic",
"volume" : 1,
"weight" : 20,
"bashing" : 4,
"cutting" : 0,
"to_hit" : 0,
"ammo_type" : "arrow",
"damage" : 6,
"pierce" : 3,
"range" : 7,
"accuracy" : 15,
"recoil" : 0,
"count" : 10
},
{
"type" : "AMMO",
"id" : "arrow_wood_heavy",
"rarity" : 7,
"price" : 75,
"name" : "heavy wood arrow",
"symbol" : "=",
"color" : "green",
"description" : "A heavy wooden arrow, it has a metal arrow head and some fletchings. It's much heavier than other wooden arrows, as a result it does more damage and is more stable in flight, resulting in better accuracy over a longer range. Stands a very good chance of remaining intact once fired.",
"material" : "plastic",
"volume" : 1,
"weight" : 22,
"bashing" : 6,
"cutting" : 2,
"to_hit" : 0,
"ammo_type" : "arrow",
"damage" : 12,
"pierce" : 5,
"range" : 8,
"accuracy" : 10,
"recoil" : 0,
"count" : 10
},
{
"type" : "AMMO",
"id" : "arrow_metal_sharpened",
"rarity" : 7,
"price" : 50,
"name" : "sharpened metal arrow",
"symbol" : "=",
"color" : "green",
"description" : "This metal shaft has been carefully sharpened so that it has a crude point at the end.",
"material" : "steel",
"volume" : 1,
"weight" : 19,
"bashing" : 2,
"cutting" : 0,
"to_hit" : 0,
"ammo_type" : "arrow",
"damage" : 5,
"pierce" : 3,
"range" : 5,
"accuracy" : 25,
"recoil" : 0,
"count" : 10
},
{
"type" : "AMMO",
"id" : "arrow_metal",
"rarity" : 7,
"price" : 100,
"name" : "metal arrow",
"symbol" : "=",
"color" : "green",
"description" : "This metal arrow has a steel arrow head and some fletchings.",
"material" : "steel",
"volume" : 1,
"weight" : 21,
"bashing" : 3,
"cutting" : 2,
"to_hit" : 0,
"ammo_type" : "arrow",
"damage" : 14,
"pierce" : 7,
"range" : 10,
"accuracy" : 10,
"recoil" : 0,
"count" : 10
},
{
"type" : "AMMO",
"id" : "arrow_cf",
"rarity" : 5,
"price" : 150,
"name" : "carbon fiber arrow",
"symbol" : "=",
"color" : "green",
"description" : "High-tech carbon fiber shafts and 100 grain broadheads. Very light weight, fast, and notoriously fragile.",
"material" : "plastic",
"volume" : 2,
"weight" : 15,
"bashing" : 1,
"cutting" : 0,
"to_hit" : 0,
"ammo_type" : "arrow",
"damage" : 10,
"pierce" : 5,
"range" : 8,
"accuracy" : 15,
"recoil" : 0,
"count" : 8
},
{
"type" : "AMMO",
"id" : "arrow_exploding",
"rarity" : 5,
"price" : 350,
"name" : "exploding arrow",
"symbol" : "=",
"color" : "green",
"description" : "This arrow has a small IED strapped to its tip. Horribly inaccurate, heavy, and bulky, not only does this contraption require expert hands to pull off a shot, it requires one to loose this with a small measure of confidence the shooter won't be caught in the blast radius.",
"material" : "steel",
"volume" : 2,
"weight" : 40,
"bashing" : 2,
"cutting" : 0,
"to_hit" : 0,
"ammo_type" : "arrow",
"damage" : 15,
"pierce" : 9,
"range" : 5,
"accuracy" : 25,
"recoil" : 0,
"count" : 5,
"effects" : ["EXPLOSIVE"]
},
{
"id" : "exploding_arrow_warhead",
"symbol" : "=",
"color" : "green",
"name" : "exploding arrowhead",
"description" : "This simple IED is designed to be attached to an arrow and detonate on impact. Theoretically you could throw it but who would want to do that?",
"rarity" : 3,
"price" : 400,
"material" : "iron",
"weight" : 10,
"volume" : 1,
"bashing" : 10,
"cutting" : 0,
"to_hit" : -1,
"count" : 5,
"effects" : ["EXPLOSIVE"]
},
{
"type" : "AMMO",
"id" : "arrow_flamming",
"rarity" : 5,
"price" : 350,
"name" : "flaming arrow",
"symbol" : "=",
"color" : "green",
"description" : "This arrow has a flaming rag wrapped around the shaft near the head. You should shoot it soon before it burns your bow.",
"material" : "steel",
"volume" : 2,
"weight" : 40,
"bashing" : 2,
"cutting" : 0,
"to_hit" : 0,
"ammo_type" : "arrow",
"damage" : 15,
"pierce" : 9,
"range" : 5,
"accuracy" : 25,
"recoil" : 0,
"count" : 5,
"effects" : ["IGNITE"]
},
{
"type" : "AMMO",
"id" : "bolt_wood",
"rarity" : 8,
"price" : 100,
"name" : "wood crossbow bolt",
"symbol" : "=",
"color" : "green",
"description" : "A sharpened bolt carved from wood. It's lighter than a steel bolt, but does less damage and is less accurate. Stands a good chance of remaining intact once fired.",
"material" : "wood",
"volume" : 1,
"weight" : 40,
"bashing" : 1,
"cutting" : 0,
"to_hit" : 0,
"ammo_type" : "bolt",
"damage" : 10,
"pierce" : 1,
"range" : 0,
"accuracy" : 16,
"recoil" : 0,
"count" : 15
},
{
"type" : "AMMO",
"id" : "bolt_steel",
"rarity" : 7,
"price" : 400,
"name" : "steel crossbow bolt",
"symbol" : "=",
"color" : "green",
"description" : "A sharp bolt made from steel. Deadly in skilled hands. Stands an excellent chance of remaining intact once fired.",
"material" : "steel",
"volume" : 1,
"weight" : 25,
"bashing" : 5,
"cutting" : 0,
"to_hit" : 0,
"ammo_type" : "bolt",
"damage" : 20,
"pierce" : 10,
"range" : 6,
"accuracy" : 15,
"recoil" : 0,
"count" : 10
},
{
"id" : "selfbow",
"type" : "GUN",
"symbol" : "(",
"color" : "yellow",
"name" : "self bow",
"description" : "A bow made from a single piece of wood. It is made specifically for the person using it.",
"rarity" : 5,
"price" : 400,
"material" : "wood",
"flags" : ["ALWAYS_TWOHAND", "RELOAD_AND_SHOOT"],
"skill" : "archery",
"ammo" : "arrow",
"weight" : 8,
"volume" : 12,
"bashing" : 6,
"cutting" : 0,
"to_hit" : 0,
"ranged_damage" : 4,
"range" : 5,
"accuracy" : 28,
"recoil" : 0,
"durability" : 6,
"burst" : 0,
"clip_size" : 1,
"reload" : 70
},
{
"id" : "shortbow",
"type" : "GUN",
"symbol" : "(",
"color" : "yellow",
"name" : "short bow",
"description" : "A shorter bow than the longbow, easier to draw than the longbow but sacrifices power. Arrows fired from this weapon have a good chance of remaining intact for re-use. It requires 8 strength to fire",
"rarity" : 5,
"price" : 800,
"material" : "wood",
"flags" : ["ALWAYS_TWOHAND", "STR8_DRAW", "RELOAD_AND_SHOOT"],
"skill" : "archery",
"ammo" : "arrow",
"weight" : 3,
"volume" : 6,
"bashing" : 6,
"cutting" : 0,
"to_hit" : 0,
"ranged_damage" : 3,
"range" : 6,
"accuracy" : 22,
"recoil" : 0,
"durability" : 6,
"burst" : 0,
"clip_size" : 1,
"reload" : 60
},
{
"id" : "compbow",
"type" : "GUN",
"symbol" : "(",
"color" : "yellow",
"name" : "compound bow",
"description" : "A bow with cams that fires high velocity arrows. Weaker people can use compound bows more easily. Arrows fired from this weapon have a good chance of remaining intact for re-use. It requires 8 strength to fire",
"rarity" : 1,
"price" : 1800,
"material" : ["steel", "plastic"],
"flags" : ["ALWAYS_TWOHAND", "STR8_DRAW", "RELOAD_AND_SHOOT"],
"skill" : "archery",
"ammo" : "arrow",
"weight" : 8,
"volume" : 8,
"bashing" : 8,
"cutting" : 0,
"to_hit" : 1,
"ranged_damage" : 5,
"range" : 10,
"accuracy" : 20,
"recoil" : 0,
"durability" : 6,
"burst" : 0,
"clip_size" : 1,
"reload" : 100
},
{
"id" : "compositebow",
"type" : "GUN",
"symbol" : "(",
"color" : "yellow",
"name" : "composite bow",
"description" : "A bow made from more than one material so it is able to store more energy. Arrows fired from this weapon have a good chance of remaining intact for re-use. It requires 10 strength to fire",
"rarity" : 3,
"price" : 1200,
"material" : ["wood", "plastic"],
"flags" : ["ALWAYS_TWOHAND", "STR10_DRAW", "RELOAD_AND_SHOOT"],
"skill" : "archery",
"ammo" : "arrow",
"weight" : 6,
"volume" : 10,
"bashing" : 8,
"cutting" : 0,
"to_hit" : 0,
"ranged_damage" : 7,
"range" : 12,
"accuracy" : 18,
"recoil" : 0,
"durability" : 6,
"burst" : 0,
"clip_size" : 1,
"reload" : 110
},
{
"id" : "recurbow",
"type" : "GUN",
"symbol" : "(",
"color" : "yellow",
"name" : "recurve bow",
"description" : "A bow that curves away from the archer at the tips allowing more power to be stored in the bow. Arrows fired from this weapon have a good chance of remaining intact for re-use. It requires 10 strength to fire",
"rarity" : 2,
"price" : 1200,
"material" : ["steel", "plastic"],
"flags" : ["ALWAYS_TWOHAND", "STR10_DRAW", "RELOAD_AND_SHOOT"],
"skill" : "archery",
"ammo" : "arrow",
"weight" : 6,
"volume" : 10,
"bashing" : 12,
"cutting" : 0,
"to_hit" : 0,
"ranged_damage" : 9,
"range" : 14,
"accuracy" : 16,
"recoil" : 0,
"durability" : 6,
"burst" : 0,
"clip_size" : 1,
"reload" : 100
},
{
"id" : "reflexbow",
"type" : "GUN",
"symbol" : "(",
"color" : "yellow",
"name" : "reflex bow",
"description" : "A bow that has limbs which curve away from the archer sacrificing accuracy for power. Arrows fired from this weapon have a good chance of remaining intact for re-use. It requires 10 strength to fire",
"rarity" : 2,
"price" : 1200,
"material" : ["steel", "plastic"],
"flags" : ["ALWAYS_TWOHAND", "STR10_DRAW", "RELOAD_AND_SHOOT"],
"skill" : "archery",
"ammo" : "arrow",
"weight" : 6,
"volume" : 10,
"bashing" : 12,
"cutting" : 0,
"to_hit" : 0,
"ranged_damage" : 11,
"range" : 16,
"accuracy" : 14,
"recoil" : 0,
"durability" : 6,
"burst" : 0,
"clip_size" : 1,
"reload" : 100
},
{
"id" : "longbow",
"type" : "GUN",
"symbol" : "(",
"color" : "yellow",
"name" : "longbow",
"description" : "A six-foot wooden bow that fires arrows. This takes a fair amount of strength to draw. Arrows fired from this weapon have a good chance of remaining intact for re-use. It requires 10 strength to fire",
"rarity" : 5,
"price" : 800,
"material" : "wood",
"flags" : ["ALWAYS_TWOHAND", "STR10_DRAW", "RELOAD_AND_SHOOT"],
"skill" : "archery",
"ammo" : "arrow",
"weight" : 4,
"volume" : 8,
"bashing" : 10,
"cutting" : 0,
"to_hit" : 0,
"ranged_damage" : 7,
"range" : 20,
"accuracy" : 26,
"recoil" : 0,
"durability" : 6,
"burst" : 0,
"clip_size" : 1,
"reload" : 80
},
{
"id" : "reflexrecurvebow",
"type" : "GUN",
"symbol" : "(",
"color" : "yellow",
"name" : "reflex recurve bow",
"description" : "A bow that combines the traits from both the reflex and the recurve bows. Both the limbs and the tips curve away from the archer. This dramatically increases the power while increasing the strength to draw the bow significantly. It requires 12 strength to fire efficiently.",
"rarity" : 2,
"price" : 1200,
"material" : ["wood", "bone"],
"flags" : ["ALWAYS_TWOHAND", "STR12_DRAW", "RELOAD_AND_SHOOT"],
"skill" : "archery",
"ammo" : "arrow",
"weight" : 4,
"volume" : 5,
"bashing" : 12,
"cutting" : 0,
"to_hit" : 0,
"ranged_damage" : 15,
"range" : 18,
"accuracy" : 16,
"recoil" : 0,
"durability" : 6,
"burst" : 0,
"clip_size" : 1,
"reload" : 80
},
{
"id" : "hand_crossbow",
"type" : "GUN",
"symbol" : "(",
"color" : "green",
"name" : "pistol crossbow",
"description" : "A small concealable pistol like crossbow. It is weak due to it's small size and draw, good for hunting small game. Bolts fired from this weapon have a good chance of remaining intact for re-use.",
"rarity" : 1,
"price" : 1000,
"material" : ["iron", "wood"],
"flags" : "none",
"skill" : "archery",
"ammo" : "bolt",
"weight" : 5,
"volume" : 4,
"bashing" : 4,
"cutting" : 0,
"to_hit" : -0,
"ranged_damage" : -6,
"range" : 6,
"accuracy" : 20,
"recoil" : 0,
"durability" : 6,
"burst" : 0,
"clip_size" : 1,
"reload" : 100
},
{
"id" : "crossbow",
"type" : "GUN",
"symbol" : "(",
"color" : "green",
"name" : "crossbow",
"description" : "A slow-loading hand weapon that launches bolts. Stronger people can reload it much faster. Bolts fired from this weapon have a good chance of remaining intact for re-use.",
"rarity" : 2,
"price" : 1000,
"material" : ["iron", "wood"],
"flags" : "STR_RELOAD",
"skill" : "archery",
"ammo" : "bolt",
"weight" : 9,
"volume" : 6,
"bashing" : 11,
"cutting" : 0,
"to_hit" : 1,
"ranged_damage" : 0,
"range" : 10,
"accuracy" : 18,
"recoil" : 0,
"durability" : 6,
"burst" : 0,
"clip_size" : 1,
"reload" : 800
},
{
"id" : "huge_crossbow",
"type" : "GUN",
"symbol" : "(",
"color" : "green",
"name" : "Ganz-Rustung",
"description" : "A HUGE very slow-loading medieval crossbow from Germany. It's tension is so powerful that you feel it shake after firing. Un-skilled users will find it very hard to reload. Bolts fired from this weapon have a good chance of remaining intact for re-use.",
"rarity" : 2,
"price" : 1000,
"material" : ["iron", "wood"],
"flags" : ["ALWAYS_TWOHAND", "STR_RELOAD"],
"skill" : "archery",
"ammo" : "bolt",
"weight" : 60,
"volume" : 40,
"bashing" : 20,
"cutting" : 0,
"to_hit" : -1,
"ranged_damage" : 30,
"range" : 30,
"accuracy" : 30,
"recoil" : 30,
"durability" : 6,
"burst" : 0,
"clip_size" : 1,
"reload" : 6000
},
{
"id" : "rep_crossbow",
"type" : "GUN",
"symbol" : "(",
"color" : "green",
"name" : "repeating crossbow",
"description" : "A custom made mechanical large crossbow, with a wooden magazine that holds 10 bolts. Single bolt reload. Bolts fired from this weapon have a good chance of remaining intact for re-use.",
"rarity" : 1,
"price" : 1000,
"material" : ["iron", "wood"],
"flags" : ["ALWAYS_TWOHAND", "RELOAD_ONE", "MODE_BURST"],
"skill" : "archery",
"ammo" : "bolt",
"weight" : 16,
"volume" : 10,
"bashing" : 13,
"cutting" : 0,
"to_hit" : -1,
"ranged_damage" : -2,
"range" : 8,
"accuracy" : 30,
"recoil" : 15,
"durability" : 6,
"burst" : 3,
"clip_size" : 10,
"reload" : 100
}
]
+786 -415
View File
File diff suppressed because it is too large Load Diff
+176 -44
View File
@@ -10,7 +10,7 @@
"color" : "pink",
"intelligence" : 0,
"symbol" : "?",
"material" : ["PAPER", "NULL"],
"material" : ["paper", "null"],
"volume" : 1,
"bashing" : -3,
"cutting" : 0,
@@ -32,7 +32,7 @@
"color" : "pink",
"intelligence" : 3,
"symbol" : "?",
"material" : ["PAPER", "NULL"],
"material" : ["paper", "null"],
"volume" : 1,
"bashing" : -3,
"cutting" : 0,
@@ -54,7 +54,7 @@
"color" : "pink",
"intelligence" : 7,
"symbol" : "?",
"material" : ["PAPER", "NULL"],
"material" : ["paper", "null"],
"volume" : 1,
"bashing" : -3,
"cutting" : 0,
@@ -76,7 +76,7 @@
"color" : "pink",
"intelligence" : 2,
"symbol" : "?",
"material" : ["PAPER", "NULL"],
"material" : ["paper", "null"],
"volume" : 1,
"bashing" : -3,
"cutting" : 0,
@@ -98,7 +98,7 @@
"color" : "pink",
"intelligence" : 5,
"symbol" : "?",
"material" : ["PAPER", "NULL"],
"material" : ["paper", "null"],
"volume" : 1,
"bashing" : -3,
"cutting" : 0,
@@ -120,7 +120,7 @@
"color" : "pink",
"intelligence" : 5,
"symbol" : "?",
"material" : ["PAPER", "NULL"],
"material" : ["paper", "null"],
"volume" : 1,
"bashing" : -3,
"cutting" : 0,
@@ -142,7 +142,7 @@
"color" : "pink",
"intelligence" : 2,
"symbol" : "?",
"material" : ["PAPER", "NULL"],
"material" : ["paper", "null"],
"volume" : 1,
"bashing" : -3,
"cutting" : 0,
@@ -164,7 +164,7 @@
"color" : "pink",
"intelligence" : 2,
"symbol" : "?",
"material" : ["PAPER", "NULL"],
"material" : ["paper", "null"],
"volume" : 1,
"bashing" : -3,
"cutting" : 0,
@@ -186,7 +186,7 @@
"color" : "pink",
"intelligence" : 7,
"symbol" : "?",
"material" : ["PAPER", "NULL"],
"material" : ["paper", "null"],
"volume" : 1,
"bashing" : -3,
"cutting" : 0,
@@ -208,7 +208,7 @@
"color" : "pink",
"intelligence" : 0,
"symbol" : "?",
"material" : ["PAPER", "NULL"],
"material" : ["paper", "null"],
"volume" : 1,
"bashing" : -3,
"cutting" : 0,
@@ -230,7 +230,7 @@
"color" : "pink",
"intelligence" : 1,
"symbol" : "?",
"material" : ["PAPER", "NULL"],
"material" : ["paper", "null"],
"volume" : 1,
"bashing" : -3,
"cutting" : 0,
@@ -252,7 +252,7 @@
"color" : "pink",
"intelligence" : 2,
"symbol" : "?",
"material" : ["PAPER", "NULL"],
"material" : ["paper", "null"],
"volume" : 1,
"bashing" : -3,
"cutting" : 0,
@@ -274,7 +274,7 @@
"color" : "pink",
"intelligence" : 1,
"symbol" : "?",
"material" : ["PAPER", "NULL"],
"material" : ["paper", "null"],
"volume" : 1,
"bashing" : -3,
"cutting" : 0,
@@ -296,7 +296,7 @@
"color" : "pink",
"intelligence" : 1,
"symbol" : "?",
"material" : ["PAPER", "NULL"],
"material" : ["paper", "null"],
"volume" : 1,
"bashing" : -3,
"cutting" : 0,
@@ -318,7 +318,7 @@
"color" : "light_blue",
"intelligence" : 4,
"symbol" : "?",
"material" : ["PAPER", "NULL"],
"material" : ["paper", "null"],
"volume" : 4,
"bashing" : -2,
"cutting" : 0,
@@ -340,7 +340,7 @@
"color" : "light_blue",
"intelligence" : 5,
"symbol" : "?",
"material" : ["PAPER", "NULL"],
"material" : ["paper", "null"],
"volume" : 4,
"bashing" : -2,
"cutting" : 0,
@@ -362,7 +362,7 @@
"color" : "light_blue",
"intelligence" : 6,
"symbol" : "?",
"material" : ["PAPER", "NULL"],
"material" : ["paper", "null"],
"volume" : 3,
"bashing" : -3,
"cutting" : 0,
@@ -384,7 +384,7 @@
"color" : "light_blue",
"intelligence" : 7,
"symbol" : "?",
"material" : ["PAPER", "NULL"],
"material" : ["paper", "null"],
"volume" : 4,
"bashing" : -2,
"cutting" : 0,
@@ -406,7 +406,7 @@
"color" : "light_blue",
"intelligence" : 7,
"symbol" : "?",
"material" : ["PAPER", "NULL"],
"material" : ["paper", "null"],
"volume" : 4,
"bashing" : -2,
"cutting" : 0,
@@ -428,7 +428,7 @@
"color" : "light_blue",
"intelligence" : 7,
"symbol" : "?",
"material" : ["PAPER", "NULL"],
"material" : ["paper", "null"],
"volume" : 4,
"bashing" : -2,
"cutting" : 0,
@@ -450,7 +450,7 @@
"color" : "light_blue",
"intelligence" : 7,
"symbol" : "?",
"material" : ["PAPER", "NULL"],
"material" : ["paper", "null"],
"volume" : 4,
"bashing" : -2,
"cutting" : 0,
@@ -472,7 +472,7 @@
"color" : "green",
"intelligence" : 3,
"symbol" : "?",
"material" : ["PAPER", "NULL"],
"material" : ["paper", "null"],
"volume" : 2,
"bashing" : -4,
"cutting" : 0,
@@ -494,7 +494,7 @@
"color" : "green",
"intelligence" : 4,
"symbol" : "?",
"material" : ["PAPER", "NULL"],
"material" : ["paper", "null"],
"volume" : 1,
"bashing" : -5,
"cutting" : 0,
@@ -516,7 +516,7 @@
"color" : "green",
"intelligence" : 5,
"symbol" : "?",
"material" : ["PAPER", "NULL"],
"material" : ["paper", "null"],
"volume" : 3,
"bashing" : -3,
"cutting" : 0,
@@ -538,7 +538,7 @@
"color" : "green",
"intelligence" : 4,
"symbol" : "?",
"material" : ["PAPER", "NULL"],
"material" : ["paper", "null"],
"volume" : 3,
"bashing" : -3,
"cutting" : 0,
@@ -560,7 +560,7 @@
"color" : "green",
"intelligence" : 5,
"symbol" : "?",
"material" : ["PAPER", "NULL"],
"material" : ["paper", "null"],
"volume" : 3,
"bashing" : -3,
"cutting" : 0,
@@ -582,7 +582,7 @@
"color" : "green",
"intelligence" : 6,
"symbol" : "?",
"material" : ["PAPER", "NULL"],
"material" : ["paper", "null"],
"volume" : 3,
"bashing" : -3,
"cutting" : 0,
@@ -604,7 +604,7 @@
"color" : "green",
"intelligence" : 7,
"symbol" : "?",
"material" : ["PAPER", "NULL"],
"material" : ["paper", "null"],
"volume" : 5,
"bashing" : -2,
"cutting" : 0,
@@ -626,7 +626,7 @@
"color" : "green",
"intelligence" : 5,
"symbol" : "?",
"material" : ["PAPER", "NULL"],
"material" : ["paper", "null"],
"volume" : 3,
"bashing" : -3,
"cutting" : 0,
@@ -648,7 +648,7 @@
"color" : "green",
"intelligence" : 4,
"symbol" : "?",
"material" : ["PAPER", "NULL"],
"material" : ["paper", "null"],
"volume" : 4,
"bashing" : -2,
"cutting" : 0,
@@ -670,7 +670,7 @@
"color" : "green",
"intelligence" : 4,
"symbol" : "?",
"material" : ["PAPER", "NULL"],
"material" : ["paper", "null"],
"volume" : 4,
"bashing" : -2,
"cutting" : 0,
@@ -692,7 +692,7 @@
"color" : "green",
"intelligence" : 6,
"symbol" : "?",
"material" : ["PAPER", "NULL"],
"material" : ["paper", "null"],
"volume" : 4,
"bashing" : -2,
"cutting" : 0,
@@ -714,7 +714,7 @@
"color" : "green",
"intelligence" : 7,
"symbol" : "?",
"material" : ["PAPER", "NULL"],
"material" : ["paper", "null"],
"volume" : 3,
"bashing" : -3,
"cutting" : 0,
@@ -736,7 +736,7 @@
"color" : "green",
"intelligence" : 4,
"symbol" : "?",
"material" : ["PAPER", "NULL"],
"material" : ["paper", "null"],
"volume" : 3,
"bashing" : -3,
"cutting" : 0,
@@ -758,7 +758,7 @@
"color" : "green",
"intelligence" : 4,
"symbol" : "?",
"material" : ["PAPER", "NULL"],
"material" : ["paper", "null"],
"volume" : 2,
"bashing" : -3,
"cutting" : 0,
@@ -780,7 +780,7 @@
"color" : "green",
"intelligence" : 5,
"symbol" : "?",
"material" : ["PAPER", "NULL"],
"material" : ["paper", "null"],
"volume" : 2,
"bashing" : -3,
"cutting" : 0,
@@ -802,7 +802,7 @@
"color" : "blue",
"intelligence" : 11,
"symbol" : "?",
"material" : ["PAPER", "NULL"],
"material" : ["paper", "null"],
"volume" : 7,
"bashing" : 5,
"cutting" : 0,
@@ -824,7 +824,7 @@
"color" : "blue",
"intelligence" : 11,
"symbol" : "?",
"material" : ["PAPER", "NULL"],
"material" : ["paper", "null"],
"volume" : 7,
"bashing" : 5,
"cutting" : 0,
@@ -846,7 +846,7 @@
"color" : "blue",
"intelligence" : 9,
"symbol" : "?",
"material" : ["PAPER", "NULL"],
"material" : ["paper", "null"],
"volume" : 7,
"bashing" : 5,
"cutting" : 0,
@@ -868,7 +868,7 @@
"color" : "blue",
"intelligence" : 6,
"symbol" : "?",
"material" : ["PAPER", "NULL"],
"material" : ["paper", "null"],
"volume" : 6,
"bashing" : 4,
"cutting" : 0,
@@ -890,7 +890,7 @@
"color" : "blue",
"intelligence" : 12,
"symbol" : "?",
"material" : ["PAPER", "NULL"],
"material" : ["paper", "null"],
"volume" : 8,
"bashing" : 5,
"cutting" : 0,
@@ -912,7 +912,7 @@
"color" : "blue",
"intelligence" : 8,
"symbol" : "?",
"material" : ["PAPER", "NULL"],
"material" : ["paper", "null"],
"volume" : 6,
"bashing" : 4,
"cutting" : 0,
@@ -934,7 +934,7 @@
"color" : "blue",
"intelligence" : 13,
"symbol" : "?",
"material" : ["PAPER", "NULL"],
"material" : ["paper", "null"],
"volume" : 6,
"bashing" : 6,
"cutting" : 0,
@@ -956,7 +956,7 @@
"color" : "blue",
"intelligence" : 14,
"symbol" : "?",
"material" : ["PAPER", "NULL"],
"material" : ["paper", "null"],
"volume" : 8,
"bashing" : 8,
"cutting" : 0,
@@ -966,5 +966,137 @@
"rarity" : 1,
"price" : 920,
"required_level" : 5
},
{
"type" : "BOOK",
"id" : "record_weather",
"name" : "National Weather Transcripts",
"max_level" : 0,
"description" : "Old weather records are about as interesting as a rock.",
"weight" : 7,
"to_hit" : 1,
"color" : "blue",
"intelligence" : 0,
"symbol" : "?",
"material" : ["paper", "null"],
"volume" : 7,
"bashing" : 7,
"cutting" : 0,
"time" : 30,
"fun" : -1,
"skill" : "none",
"rarity" : 20,
"price" : 5,
"required_level" : 0
},
{
"type" : "BOOK",
"id" : "record_patient",
"name" : "Patient Treatment Records",
"max_level" : 0,
"description" : "A massive stack of medical records that contain every gory detail.",
"weight" : 6,
"to_hit" : 1,
"color" : "blue",
"intelligence" : 0,
"symbol" : "?",
"material" : ["paper", "null"],
"volume" : 6,
"bashing" : 6,
"cutting" : 0,
"time" : 30,
"fun" : -1,
"skill" : "none",
"rarity" : 20,
"price" : 5,
"required_level" : 0
},
{
"type" : "BOOK",
"id" : "record_accounting",
"name" : "Corporate Accounting Ledger",
"max_level" : 0,
"description" : "If you knew what to look for something might stand out...",
"weight" : 5,
"to_hit" : 1,
"color" : "blue",
"intelligence" : 0,
"symbol" : "?",
"material" : ["paper", "null"],
"volume" : 5,
"bashing" : 5,
"cutting" : 0,
"time" : 30,
"fun" : -1,
"skill" : "none",
"rarity" : 20,
"price" : 100,
"required_level" : 0
},
{
"type" : "BOOK",
"id" : "black_box_transcript",
"name" : "black box transcript",
"max_level" : 0,
"description" : "A full flight log for a military aircraft. Nothing of interest stands out.",
"weight" : 5,
"to_hit" : 1,
"color" : "blue",
"intelligence" : 0,
"symbol" : "?",
"material" : ["paper", "null"],
"volume" : 5,
"bashing" : 5,
"cutting" : 0,
"time" : 30,
"fun" : -1,
"skill" : "none",
"rarity" : 0,
"price" : 500,
"required_level" : 0
},
{
"type" : "BOOK",
"id" : "priest_diary",
"name" : "Priest's Diary",
"max_level" : 0,
"description" : "A small book filled with journal entries in Latin.",
"weight" : 3,
"to_hit" : 1,
"color" : "blue",
"intelligence" : 0,
"symbol" : "?",
"material" : ["PAPER", "NULL"],
"volume" : 3,
"bashing" : 3,
"cutting" : 0,
"time" : 30,
"fun" : -1,
"skill" : "none",
"rarity" : 0,
"price" : 500,
"required_level" : 0
},
{
"type" : "BOOK",
"id" : "visions_solitude",
"name" : "Visions in Solitude",
"max_level" : 0,
"description" : "A small book detailing 'visions' a prisoner had on death row.",
"weight" : 1,
"to_hit" : 1,
"color" : "blue",
"intelligence" : 0,
"symbol" : "?",
"material" : ["PAPER", "NULL"],
"volume" : 3,
"bashing" : 3,
"cutting" : 0,
"time" : 30,
"fun" : 2,
"skill" : "none",
"rarity" : 0,
"price" : 900,
"required_level" : 0
}
]
File diff suppressed because it is too large Load Diff
+2 -2
View File
@@ -5,7 +5,7 @@
"name":"Guitar",
"description":"An acoustic six-string guitar. A bit out of tune, but in good shape otherwise.",
"rarity": 60,
"material": "WOOD",
"material": "wood",
"weight": 13,
"volume": 24,
"damage": 14,
@@ -23,7 +23,7 @@
"name":"Bongo",
"description": "A handheld drum. Suitable for making loud noises into all hours of the night.",
"rarity": 60,
"material": ["WOOD", "STEEL"],
"material": ["wood", "steel"],
"weight": 10,
"volume": 10,
"damage": 11,
+189 -138
View File
File diff suppressed because it is too large Load Diff
+590 -3
View File
@@ -7,7 +7,7 @@
"description":"Replacing several key parts of a 9mm, .38, .40 or .44 firearm converts it to a .45 firearm. The conversion results in reduced accuracy and increased recoil.",
"rarity": 3,
"price": 480,
"material": "STEEL",
"material": "steel",
"weight": 2,
"volume": 2,
"bashing": 3,
@@ -21,6 +21,593 @@
"burst_modifier": 0,
"clip_size_modifier": 0,
"mod_targets": ["pistol", "smg"],
"ammo_types": ["9MM", "38", "40", "44"]
}
"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"
}
]
+75 -158
View File
@@ -8,7 +8,7 @@
"description": "A tool used to drive nails into wood or other material. It could also be used as a ad-hoc weapon, or to practice your handgun skill up to level 1.",
"rarity": 12,
"price": 100,
"material": "IRON",
"material": "iron",
"flags": "MODE_BURST",
"skill": "pistol",
"ammo": "nail",
@@ -19,7 +19,7 @@
"to_hit": 1,
"ranged_damage": 0,
"range": 0,
"accuracy": 20,
"accuracy": 40,
"recoil": 0,
"durability": 8,
"burst": 5,
@@ -36,7 +36,7 @@
"description": "Popular among children. It's fairly accurate, but BBs deal nearly no damage. It could be used to practice your rifle skill up to level 1.",
"rarity": 10,
"price": 100,
"material": ["IRON", "WOOD"],
"material": ["iron", "wood"],
"skill": "rifle",
"ammo": "BB",
"weight": 16,
@@ -63,7 +63,7 @@
"description": "A leather sling, it is easy to use and accurate, but pebbles do little damage. Pebbles are used as ammunition.",
"rarity": 5,
"price": 50,
"material": "LEATHER",
"material": "leather",
"flags": "RELOAD_AND_SHOOT",
"skill": "throw",
"ammo": "pebble",
@@ -91,7 +91,7 @@
"description": "A wooden slingshot, it is easy to use and accurate, but pebbles do little damage. Pebbles are used as ammunition.",
"rarity": 5,
"price": 50,
"material": "WOOD",
"material": "wood",
"flags": "RELOAD_AND_SHOOT",
"skill": "archery",
"ammo": "pebble",
@@ -110,89 +110,6 @@
"reload": 100
},
{
"id": "crossbow",
"type": "GUN",
"symbol": "(",
"color": "green",
"name": "crossbow",
"description": "A slow-loading hand weapon that launches bolts. Stronger people can reload it much faster. Bolts fired from this weapon have a good chance of remaining intact for re-use.",
"rarity": 2,
"price": 1000,
"material": ["IRON", "WOOD"],
"flags": "STR_RELOAD",
"skill": "archery",
"ammo": "bolt",
"weight": 9,
"volume": 6,
"bashing": 11,
"cutting": 0,
"to_hit": 1,
"ranged_damage": 0,
"range": 10,
"accuracy": 18,
"recoil": 0,
"durability": 6,
"burst": 0,
"clip_size": 1,
"reload": 800
},
{
"id": "compbow",
"type": "GUN",
"symbol": "(",
"color": "yellow",
"name": "compound bow",
"description": "A bow with wheels that fires high velocity arrows. Weaker people can use compound bows more easily. Arrows fired from this weapon have a good chance of remaining intact for re-use. It requires 8 strength to fire",
"rarity": 2,
"price": 1400,
"material": ["STEEL", "PLASTIC"],
"flags": ["STR8_DRAW", "RELOAD_AND_SHOOT"],
"skill": "archery",
"ammo": "arrow",
"weight": 8,
"volume": 12,
"bashing": 8,
"cutting": 0,
"to_hit": 1,
"ranged_damage": 0,
"range": 10,
"accuracy": 20,
"recoil": 0,
"durability": 6,
"burst": 0,
"clip_size": 1,
"reload": 100
},
{
"id": "longbow",
"type": "GUN",
"symbol": "(",
"color": "yellow",
"name": "longbow",
"description": "A six-foot wooden bow that fires feathered arrows. This takes a fair amount of strength to draw. Arrows fired from this weapon have a good chance of remaining intact for re-use. It requires 10 strength to fire",
"rarity": 5,
"price": 800,
"material": "WOOD",
"flags": ["STR10_DRAW", "RELOAD_AND_SHOOT"],
"skill": "archery",
"ammo": "arrow",
"weight": 4,
"volume": 8,
"bashing": 10,
"cutting": 0,
"to_hit": 0,
"ranged_damage": 0,
"range": 10,
"accuracy": 12,
"recoil": 0,
"durability": 6,
"burst": 0,
"clip_size": 1,
"reload": 80
},
{
"id": "rifle_22",
@@ -203,7 +120,7 @@
"description": "A home-made rifle. It is simply a pipe attached to a stock, with a hammer to strike the single round it holds.",
"rarity": 0,
"price": 800,
"material": ["IRON", "WOOD"],
"material": ["iron", "wood"],
"skill": "rifle",
"ammo": ".22",
"weight": 13,
@@ -230,7 +147,7 @@
"description": "A home-made rifle. It is simply a pipe attached to a stock, with a hammer to strike the single round it holds.",
"rarity": 0,
"price": 900,
"material": ["IRON", "WOOD"],
"material": ["iron", "wood"],
"skill": "rifle",
"ammo": "9mm",
"weight": 16,
@@ -257,7 +174,7 @@
"description": "A home-made machine pistol. It features a rudimentary blowback system, which allows for small bursts.",
"rarity": 0,
"price": 1050,
"material": ["IRON", "WOOD"],
"material": ["iron", "wood"],
"flags": "MODE_BURST",
"skill": "smg",
"ammo": "9mm",
@@ -285,7 +202,7 @@
"description": "A home-made machine pistol. It features a rudimentary blowback system, which allows for small bursts.",
"rarity": 0,
"price": 1150,
"material": ["IRON", "WOOD"],
"material": ["iron", "wood"],
"flags": "MODE_BURST",
"skill": "smg",
"ammo": ".45",
@@ -313,7 +230,7 @@
"description": "A popular, very small .22 pistol. \"Ergonomically designed to give the best shooting experience.\" --SIG Sauer official website",
"rarity": 5,
"price": 1200,
"material": ["STEEL", "PLASTIC"],
"material": ["steel", "plastic"],
"skill": "pistol",
"ammo": ".22",
"weight": 6,
@@ -340,7 +257,7 @@
"description": "A popular .22 pistol. \"Ideal for competitive target shooting or recreational shooting.\" --Smith & Wesson official website",
"rarity": 5,
"price": 1250,
"material": ["STEEL", "PLASTIC"],
"material": ["steel", "plastic"],
"skill": "pistol",
"ammo": ".22",
"weight": 10,
@@ -367,7 +284,7 @@
"description": "Possibly the most popular pistol in existance. The Glock 19 is often derided for its plastic contruction, but it is easy to shoot.",
"rarity": 7,
"price": 1400,
"material": ["STEEL", "PLASTIC"],
"material": ["steel", "plastic"],
"skill": "pistol",
"ammo": "9mm",
"weight": 5,
@@ -394,7 +311,7 @@
"description": "A popular 9mm pistol, widely used among law enforcement. Extensively tested for durability, it has been found to stay accurate even after subjected to extreme abuse.",
"rarity": 6,
"price": 1450,
"material": ["STEEL", "PLASTIC"],
"material": ["steel", "plastic"],
"skill": "pistol",
"ammo": "9mm",
"weight": 6,
@@ -421,7 +338,7 @@
"description": "A seven-round .38 revolver sold by Smith & Wesson. It features a fixed rear sight and a reinforced frame.",
"rarity": 4,
"price": 1450,
"material": ["STEEL", "PLASTIC"],
"material": ["steel", "plastic"],
"flags": "RELOAD_ONE",
"skill": "pistol",
"ammo": ".38",
@@ -449,7 +366,7 @@
"description": "A popular .38 pistol. Designed with numerous safety features and built from high-quality, durable materials.",
"rarity": 4,
"price": 1500,
"material": ["STEEL", "PLASTIC"],
"material": ["steel", "plastic"],
"skill": "pistol",
"ammo": ".38",
"weight": 6,
@@ -476,7 +393,7 @@
"description": "Originally marketed as a lightweight and compact alternative to older SIG handguns, the Pro .40 is popular among European police forces.",
"rarity": 4,
"price": 1500,
"material": ["STEEL", "PLASTIC"],
"material": ["steel", "plastic"],
"skill": "pistol",
"ammo": ".40",
"weight": 6,
@@ -503,7 +420,7 @@
"description": "The Smith and Wesson 610 is a classic six-shooter revolver chambered for 10mm rounds, or for S&W's own .40 round.",
"rarity": 2,
"price": 1460,
"material": ["STEEL", "WOOD"],
"material": ["steel", "wood"],
"flags": "RELOAD_ONE",
"skill": "pistol",
"ammo": ".40",
@@ -531,7 +448,7 @@
"description": "One of the most powerful handguns in the world when it was released in 1979, the Redhawk offers very sturdy contruction, with an appearance that is reminiscent of \"Wild West\" revolvers.",
"rarity": 3,
"price": 1560,
"material": ["STEEL", "WOOD"],
"material": ["steel", "wood"],
"flags": "RELOAD_ONE",
"skill": "pistol",
"ammo": ".44",
@@ -559,7 +476,7 @@
"description": "One of the most recognizable handguns due to its popularity in movies, the \"Deagle\" is better known for its menacing appearance than its performace. It's highly innaccurate, but its heavy weight reduces recoil.",
"rarity": 2,
"price": 1750,
"material": ["STEEL", "PLASTIC"],
"material": ["steel", "plastic"],
"skill": "pistol",
"ammo": ".44",
"weight": 17,
@@ -586,7 +503,7 @@
"description": "A popular .45 pistol, widely used among law enforcement. Extensively tested for durability, it has been found to stay accurate even after subjected to extreme abuse.",
"rarity": 6,
"price": 1600,
"material": ["STEEL", "PLASTIC"],
"material": ["steel", "plastic"],
"skill": "pistol",
"ammo": ".45",
"weight": 7,
@@ -613,7 +530,7 @@
"description": "The M1911 was the standard-issue sidearm from the US Military for most of the 20th Century. It remains one of the most popular .45 pistols today.",
"rarity": 5,
"price": 1680,
"material": ["STEEL", "PLASTIC"],
"material": ["steel", "plastic"],
"skill": "pistol",
"ammo": ".45",
"weight": 10,
@@ -640,7 +557,7 @@
"description": "Designed to work with FN's proprietary 5.7x28mm round, the Five-Seven is a lightweight pistol with a very high capacity, best used against armored opponents.",
"rarity": 2,
"price": 1550,
"material": ["STEEL", "PLASTIC"],
"material": ["steel", "plastic"],
"skill": "pistol",
"ammo": "5.7mm",
"weight": 5,
@@ -667,7 +584,7 @@
"description": "Designed to work with H&K's proprietary 4.6x30mm round, the UCP is a small pistol with a very high capacity, best used against armored opponents.",
"rarity": 2,
"price": 1500,
"material": ["STEEL", "PLASTIC"],
"material": ["steel", "plastic"],
"skill": "pistol",
"ammo": "4.6mm",
"weight": 5,
@@ -694,7 +611,7 @@
"description": "The Norinco manufactured Tokarev TT-30 is the standard sidearm of the Chinese military, it does not see extensive use outside of China.",
"rarity": 7,
"price": 1400,
"material": ["STEEL", "PLASTIC"],
"material": ["steel", "plastic"],
"skill": "pistol",
"ammo": "7.62x25mm",
"weight": 12,
@@ -721,7 +638,7 @@
"description": "The barrels of shotguns are often sawed in half to make it more maneuverable and concealable. This has the added effect of reducing accuracy greatly.",
"rarity": 1,
"price": 700,
"material": ["IRON", "WOOD"],
"material": ["iron", "wood"],
"flags": "RELOAD_ONE",
"skill": "shotgun",
"ammo": "shot",
@@ -749,7 +666,7 @@
"description": "The Saiga-12 shotgun is designed on the same Kalishnikov pattern as the AK47 rifle. It reloads with a magazine, rather than one shell at a time like most shotguns. This one has had the barrel cut short, vastly reducing accuracy but making it more portable",
"rarity": 1,
"price": 700,
"material": ["IRON", "WOOD"],
"material": ["iron", "wood"],
"flags": "MODE_BURST",
"skill": "shotgun",
"ammo": "shot",
@@ -777,7 +694,7 @@
"description": "An old shotgun, possibly antique. It is little more than a barrel, a wood stock, and a hammer to strike the cartridge. Its simple design keeps it both light and accurate.",
"rarity": 1,
"price": 600,
"material": ["IRON", "WOOD"],
"material": ["iron", "wood"],
"skill": "shotgun",
"ammo": "shot",
"weight": 20,
@@ -804,7 +721,7 @@
"description": "An old shotgun, possibly antique. It is little more than a pair of barrels, a wood stock, and a hammer to strike the cartridges.",
"rarity": 2,
"price": 1050,
"material": ["IRON", "WOOD"],
"material": ["iron", "wood"],
"flags": ["RELOAD_ONE", "MODE_BURST"],
"skill": "shotgun",
"ammo": "shot",
@@ -832,7 +749,7 @@
"description": "One of the most popular shotguns on the market, the Remington 870 is used by hunters and law enforcement agencies alike thanks to its high accuracy and muzzle velocity.",
"rarity": 9,
"price": 2200,
"material": ["STEEL", "PLASTIC"],
"material": ["steel", "plastic"],
"flags": ["RELOAD_ONE", "MODE_BURST"],
"skill": "shotgun",
"ammo": "shot",
@@ -860,7 +777,7 @@
"description": "The Mossberg 500 is a popular series of pump-action shotguns, often acquired for military use. It is noted for its high durability and low recoil.",
"rarity": 5,
"price": 2250,
"material": ["STEEL", "PLASTIC"],
"material": ["steel", "plastic"],
"flags": ["RELOAD_ONE", "MODE_BURST"],
"skill": "shotgun",
"ammo": "shot",
@@ -888,7 +805,7 @@
"description": "The Saiga-12 shotgun is designed on the same Kalishnikov pattern as the AK47 rifle. It reloads with a magazine, rather than one shell at a time like most shotguns.",
"rarity": 3,
"price": 2300,
"material": ["STEEL", "PLASTIC"],
"material": ["steel", "plastic"],
"flags": "MODE_BURST",
"skill": "shotgun",
"ammo": "shot",
@@ -916,7 +833,7 @@
"description": "The American-180 is a submachine gun developed in the 1960's that fires .22 LR, unusual for an SMG. Though the round is low-powered, the high rate of fire and large magazine makes the 180 a formidable weapon.",
"rarity": 2,
"price": 1600,
"material": "STEEL",
"material": "steel",
"flags": "MODE_BURST",
"skill": "smg",
"ammo": ".22",
@@ -944,7 +861,7 @@
"description": "The Uzi 9mm has enjoyed immense popularity, selling more units than any other submachine gun. It is widely used as a personal defense weapon, or as a primary weapon by elite frontline forces.",
"rarity": 8,
"price": 2080,
"material": "STEEL",
"material": "steel",
"flags": "MODE_BURST",
"skill": "smg",
"ammo": "9mm",
@@ -972,7 +889,7 @@
"description": "The TEC-9 is a machine pistol made of cheap polymers and machine stamped parts. Its rise in popularity among criminals is largely due to its intimidating looks and low price.",
"rarity": 10,
"price": 1750,
"material": "STEEL",
"material": "steel",
"flags": "MODE_BURST",
"skill": "smg",
"ammo": "9mm",
@@ -1000,7 +917,7 @@
"description": "The Calico M960 is an automatic carbine with a unique circular magazine that allows for high capacities and reduced recoil.",
"rarity": 6,
"price": 2400,
"material": "STEEL",
"material": "steel",
"flags": "MODE_BURST",
"skill": "smg",
"ammo": "9mm",
@@ -1028,7 +945,7 @@
"description": "The Heckler & Koch MP5 is one of the most widely-used submachine guns in the world, and has been adopted by special police forces and militaries alike. Its high degree of accuracy and low recoil are universally praised.",
"rarity": 12,
"price": 2800,
"material": ["STEEL", "PLASTIC"],
"material": ["steel", "plastic"],
"flags": "MODE_BURST",
"skill": "smg",
"ammo": "9mm",
@@ -1056,7 +973,7 @@
"description": "The MAC-10 is a popular machine pistol originally designed for military use. For many years they were the most inexpensive automatic weapon in the US, and enjoyed great popularity among criminals less concerned with quality firearms.",
"rarity": 14,
"price": 1800,
"material": "STEEL",
"material": "steel",
"flags": "MODE_BURST",
"skill": "smg",
"ammo": ".45",
@@ -1084,7 +1001,7 @@
"description": "Developed as a successor to the MP5 submachine gun, the UMP45 retains the earlier model's supreme accuracy and low recoil, but in the higher .45 caliber.",
"rarity": 12,
"price": 3000,
"material": ["STEEL", "PLASTIC"],
"material": ["steel", "plastic"],
"flags": "MODE_BURST",
"skill": "smg",
"ammo": ".45",
@@ -1112,7 +1029,7 @@
"description": "The TDI Vector is a submachine gun with a unique, in-line design that makes recoil very managable, even in the powerful .45 caliber.",
"rarity": 4,
"price": 4200,
"material": ["STEEL", "PLASTIC"],
"material": ["steel", "plastic"],
"flags": "MODE_BURST",
"skill": "smg",
"ammo": ".45",
@@ -1140,7 +1057,7 @@
"description": "The first in a new genre of guns, termed \"personal defense weapons.\" FN designed the P90 to use their proprietary 5.7x28mm ammunition. It is made for firing bursts manageably.",
"rarity": 7,
"price": 4000,
"material": ["STEEL", "PLASTIC"],
"material": ["steel", "plastic"],
"flags": "MODE_BURST",
"skill": "smg",
"ammo": "5.7mm",
@@ -1168,7 +1085,7 @@
"description": "Designed by Heckler & Koch as a competitor to the FN P90, as well as a successor to the extremely popular H&K MP5. Using H&K's proprietary 4.6x30mm ammunition, it is designed for burst fire.",
"rarity": 5,
"price": 3400,
"material": ["STEEL", "PLASTIC"],
"material": ["steel", "plastic"],
"flags": "MODE_BURST",
"skill": "smg",
"ammo": "4.6mm",
@@ -1196,7 +1113,7 @@
"description": "The Soviet made PPSh-41, chambered in 7.62 Tokarev provides a relatively large ammunition capacity, coupled with low recoil and decent accuracy.",
"rarity": 12,
"price": 2800,
"material": ["STEEL", "WOOD"],
"material": ["steel", "wood"],
"flags": "MODE_BURST",
"skill": "smg",
"ammo": "7.62x25mm",
@@ -1224,7 +1141,7 @@
"description": "The oldest and longest-produced shoulder firearm in the world. Though it fires the weak .22 round, it is highly accurate and damaging, and has essentially no recoil.",
"rarity": 14,
"price": 1600,
"material": ["IRON", "WOOD"],
"material": ["iron", "wood"],
"flags": "RELOAD_ONE",
"skill": "rifle",
"ammo": ".22",
@@ -1252,7 +1169,7 @@
"description": "A popular and highly accurate .22 rifle. At the time of its introduction in 1964, it was one of the first modern .22 rifles designed for quality, and not as a gun for children.",
"rarity": 12,
"price": 1650,
"material": ["IRON", "WOOD"],
"material": ["iron", "wood"],
"skill": "rifle",
"ammo": ".22",
"weight": 23,
@@ -1279,7 +1196,7 @@
"description": "A very popular rifle for hunting and sniping. Its low ammo capacity is offset by the very powerful .30-06 round it fires.",
"rarity": 8,
"price": 3500,
"material": ["IRON", "WOOD"],
"material": ["iron", "wood"],
"flags": "RELOAD_ONE",
"skill": "rifle",
"ammo": ".30-06",
@@ -1307,7 +1224,7 @@
"description": "A very popular and durable hunting or sniping rifle. Popular among SWAT and US Marine snipers. Highly damaging, but perhaps not as accurate as the competing Browning BLR.",
"rarity": 14,
"price": 3200,
"material": ["IRON", "WOOD"],
"material": ["iron", "wood"],
"flags": "RELOAD_ONE",
"skill": "rifle",
"ammo": ".30-06",
@@ -1335,7 +1252,7 @@
"description": "Developed by the Soviets in 1945, this rifle was quickly replaced by the full-auto AK47. However, due to its superb accuracy and low recoil, this gun maintains immense popularity.",
"rarity": 12,
"price": 3000,
"material": ["IRON", "WOOD"],
"material": ["iron", "wood"],
"skill": "rifle",
"ammo": "7.62x39mm",
"weight": 34,
@@ -1362,7 +1279,7 @@
"description": "A small, lightweight semi-auto carbine designed for military use. Its superb accuracy and low recoil makes it more suitable than full-auto rifles for some situations.",
"rarity": 12,
"price": 3200,
"material": ["IRON", "WOOD"],
"material": ["iron", "wood"],
"skill": "rifle",
"ammo": ".223",
"weight": 26,
@@ -1389,7 +1306,7 @@
"description": "A very accurate rifle chambered for the powerful .308 round. Its very low ammo capacity is offset by its accuracy and near-complete lack of recoil.",
"rarity": 10,
"price": 3280,
"material": ["STEEL", "PLASTIC"],
"material": ["steel", "plastic"],
"flags": "RELOAD_ONE",
"skill": "rifle",
"ammo": ".308",
@@ -1417,7 +1334,7 @@
"description": "An early battle rifle developed after the end of WWII. The G3 is designed to unload large amounts of deadly ammunition, but it is less suitable over long ranges.",
"rarity": 15,
"price": 5050,
"material": ["IRON", "WOOD"],
"material": ["iron", "wood"],
"flags": "MODE_BURST",
"skill": "rifle",
"ammo": ".308",
@@ -1445,7 +1362,7 @@
"description": "Designed as a replacement for the early H&K G3 battle rifle, the G36 is more accurate, and uses the much-lighter .223 round, allowing for a higher ammo capacity.",
"rarity": 17,
"price": 5100,
"material": ["IRON", "PLASTIC"],
"material": ["iron", "plastic"],
"flags": "MODE_BURST",
"skill": "rifle",
"ammo": ".223",
@@ -1473,7 +1390,7 @@
"description": "One of the most recognizable assault rifles ever made, the AK-47 is renowned for its durability even under the worst conditions.",
"rarity": 16,
"price": 4000,
"material": ["IRON", "WOOD"],
"material": ["iron", "wood"],
"flags": "MODE_BURST",
"skill": "rifle",
"ammo": "7.62x39mm",
@@ -1501,7 +1418,7 @@
"description": "A Belgian-designed battle rifle, the FN FAL is not very accurate for a rifle, but its high fire rate and powerful .308 ammunition have made it one of the most widely-used battle rifles in the world.",
"rarity": 16,
"price": 4500,
"material": ["IRON", "WOOD"],
"material": ["iron", "wood"],
"flags": "MODE_BURST",
"skill": "rifle",
"ammo": ".308",
@@ -1529,7 +1446,7 @@
"description": "This carbine was developed for military use in the early 21st century. It is damaging and accurate, though its rate of fire is a bit slower than competing .223 carbines.",
"rarity": 4,
"price": 4200,
"material": ["STEEL", "PLASTIC"],
"material": ["steel", "plastic"],
"flags": "MODE_BURST",
"skill": "rifle",
"ammo": ".223",
@@ -1557,7 +1474,7 @@
"description": "A widely used assault rifle and the father of popular rifles such as the M16. It is light and accurate, but not very durable.",
"rarity": 9,
"price": 4000,
"material": ["STEEL", "PLASTIC"],
"material": ["steel", "plastic"],
"flags": "MODE_BURST",
"skill": "rifle",
"ammo": ".223",
@@ -1585,7 +1502,7 @@
"description": "A popular carbine, long used by the US military. Though accurate, small, and lightweight, it is infamous for its fragility, particularly in less-than- ideal terrain.",
"rarity": 7,
"price": 4400,
"material": ["STEEL", "PLASTIC"],
"material": ["steel", "plastic"],
"flags": "MODE_BURST",
"skill": "rifle",
"ammo": ".223",
@@ -1613,7 +1530,7 @@
"description": "A modular assault rifle designed for use by US Special Ops units. The 'L' in its name stands for light, as it uses the lightweight .223 round. It is very accurate and low on recoil.",
"rarity": 6,
"price": 4800,
"material": ["STEEL", "PLASTIC"],
"material": ["steel", "plastic"],
"flags": "MODE_BURST",
"skill": "rifle",
"ammo": ".223",
@@ -1641,7 +1558,7 @@
"description": "A modular assault rifle designed for use by US Special Ops units. The 'H' in its name stands for heavy, as it uses the powerful .308 round. It is fairly accurate and low on recoil.",
"rarity": 5,
"price": 4950,
"material": ["STEEL", "PLASTIC"],
"material": ["steel", "plastic"],
"flags": "MODE_BURST",
"skill": "rifle",
"ammo": ".308",
@@ -1669,7 +1586,7 @@
"description": "The Steyr AUG is an Austrian assault rifle that uses a bullpup design. It is used in the armed forces and police forces of many nations, and enjoys low recoil and high accuracy.",
"rarity": 6,
"price": 4900,
"material": ["STEEL", "PLASTIC"],
"material": ["steel", "plastic"],
"flags": "MODE_BURST",
"skill": "rifle",
"ammo": ".223",
@@ -1697,7 +1614,7 @@
"description": "The M249 is a mountable machine gun used by the US military and SWAT teams. Quite innaccurate and difficult to control, the M249 is designed to fire many rounds very quickly.",
"rarity": 1,
"price": 7500,
"material": ["STEEL", "PLASTIC"],
"material": ["steel", "plastic"],
"flags": "MODE_BURST",
"skill": "rifle",
"ammo": ".223",
@@ -1725,7 +1642,7 @@
"description": "The V29 laser pistol was designed in the mid-21st century, and was one of the first firearms to use fusion as its ammunition. It is larger than most traditional handguns, but displays no recoil whatsoever.",
"rarity": 1,
"price": 7200,
"material": ["STEEL", "PLASTIC"],
"material": ["steel", "plastic"],
"skill": "pistol",
"ammo": "fusion",
"weight": 6,
@@ -1752,7 +1669,7 @@
"description": "A very powerful fusion rifle developed shortly before the influx of monsters. It can only hold two rounds at a time, but a special superheating unit causes its bolts to be extremely deadly.",
"rarity": 1,
"price": 9800,
"material": ["STEEL", "PLASTIC"],
"material": ["steel", "plastic"],
"skill": "rifle",
"ammo": "fusion",
"weight": 20,
@@ -1779,7 +1696,7 @@
"description": "A multi-purpose rifle, designed for use in conjunction with a unified power supply, or UPS. It does not reload normally; instead, press fire once to start charging it from your UPS, then again to unload the charge.",
"rarity": 1,
"price": 12000,
"material": ["STEEL", "PLASTIC"],
"material": ["steel", "plastic"],
"flags": ["CHARGE", "NO_UNLOAD"],
"skill": "rifle",
"ammo": "none",
@@ -1807,7 +1724,7 @@
"description": "A simple, home-made flamethrower. While its capacity is not superb, it is more than capable of igniting terrain and monsters alike.",
"rarity": 1,
"price": 1600,
"material": ["STEEL", "PLASTIC"],
"material": ["steel", "plastic"],
"flags": "FIRE_100",
"skill": "shotgun",
"ammo": "gasoline",
@@ -1835,7 +1752,7 @@
"description": "A large flamethrower with substantial gas reserves. Very menacing and deadly.",
"rarity": 1,
"price": 3800,
"material": "STEEL",
"material": "steel",
"flags": "FIRE_100",
"skill": "shotgun",
"ammo": "gasoline",
@@ -1863,7 +1780,7 @@
"description": "A simple, home-made grenade launcher. Basically a tube with a pin firing mechanism to activate the grenade.",
"rarity": 0,
"price": 400,
"material": ["STEEL", "WOOD"],
"material": ["steel", "wood"],
"skill": "launcher",
"ammo": "40mm",
"weight": 20,
@@ -1890,7 +1807,7 @@
"description": "A widely-used grenade launcher that first saw use by American forces in the Vietnam war. Though mostly replaced by more modern launchers, the M79 still sees use with many units worldwide.",
"rarity": 5,
"price": 4000,
"material": ["STEEL", "WOOD"],
"material": ["steel", "wood"],
"skill": "launcher",
"ammo": "40mm",
"weight": 24,
@@ -1917,7 +1834,7 @@
"description": "Developed by Heckler & Koch, the M320 grenade launcher has the functionality of larger launchers in a very small package. However, its smaller size contributes to a lack of accuracy.",
"rarity": 10,
"price": 8500,
"material": "STEEL",
"material": "steel",
"skill": "launcher",
"ammo": "40mm",
"weight": 13,
@@ -1944,7 +1861,7 @@
"description": "The Milkor Multi-Grenade Launcher is designed to compensate for the drawback of single-shot grenade launchers by allowing sustained heavy firepower. However, it is still slow to reload and must be used with careful planning.",
"rarity": 6,
"price": 10400,
"material": "STEEL",
"material": "steel",
"flags": ["RELOAD_ONE", "MODE_BURST"],
"skill": "launcher",
"ammo": "40mm",
@@ -1969,10 +1886,10 @@
"symbol": "(",
"color": "light_red",
"name": "M72 LAW",
"description": "A single use rocket launcher, developed during WW2 as a countermeasure to the increasing prevalance of tanks. Once fired, it cannot be reloaded and must be disposed of.",
"description": "A disposable light anti-tank rocket launcher. Once fired, it cannot be reloaded and must be disposed of.",
"rarity": 200,
"price": 8500,
"material": "STEEL",
"material": "steel",
"flags": ["NO_UNLOAD", "BACKBLAST"],
"skill": "launcher",
"ammo": "66mm",
@@ -2000,7 +1917,7 @@
"description": "A homemade gun, using electromagnets to accelerate a ferromagnetic projectile to high velocity. Powered by UPS.",
"rarity": 1,
"price": 200,
"material": "IRON",
"material": "iron",
"flags": "USE_UPS",
"skill": "pistol",
"ammo": "nail",
@@ -2028,7 +1945,7 @@
"description": "Developed by Heckler & Koch in 2033, the railgun magnetically propels a ferromagnetic projectile using an alternating current. This makes it silent while still deadly. Powered by UPS.",
"rarity": 2,
"price": 9200,
"material": "STEEL",
"material": "steel",
"flags": "USE_UPS",
"skill": "rifle",
"ammo": "12mm",
@@ -2056,7 +1973,7 @@
"description": "Boeing developed the focused plasma weaponry together with DARPA. It heats hydrogen to create plasma and envelops it with polymers to reduce blooming. While powerful, it suffers from short range. Powered by UPS.",
"rarity": 1,
"price": 13000,
"material": "STEEL",
"material": "steel",
"flags": ["USE_UPS", "MODE_BURST"],
"skill": "rifle",
"ammo": "plasma",
@@ -2084,7 +2001,7 @@
"description": "A shotgun modified to use a revolver cylinder mechanism, it can hold 6 cartridges.",
"rarity": 1,
"price": 600,
"material": ["IRON", "WOOD"],
"material": ["iron", "wood"],
"flags": "RELOAD_ONE",
"skill": "shotgun",
"ammo": "shot",
+479 -161
View File
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
}
]
+8 -2
View File
@@ -39,9 +39,15 @@
"ident": "scoundrel",
"name": "Scoundrel",
"description":
"Your flexible outlook on law has ensured your survival, but now what?\nYou start with cargo pants, a hoodie, and \"sundries\".",
"Your flexible outlook on law has ensured your survival, but now what?\nYou start with cargo pants, a hoodie, \"sundries\", and one additional level of melee.",
"points": 2,
"items": ["tank_top", "hoodie", "pants_cargo", "sneakers", "weed", "picklocks"]
"items": ["tank_top", "hoodie", "pants_cargo", "sneakers", "weed", "picklocks"],
"skills" : [
{
"name" : "melee",
"level" : 1
}
]
},
{
+2064 -63
View File
File diff suppressed because it is too large Load Diff
+54 -27
View File
@@ -2,136 +2,163 @@
[
"dodge",
"dodge",
"Your skill at dodging, whether it be from an attack, a trap, or a natural\noccurrence. It is also used when attempting to fall gracefully, or in other\nacrobatic feats."
"Your skill at dodging, whether it be from an attack, a trap, or a natural\noccurrence. It is also used when attempting to fall gracefully, or in other\nacrobatic feats.",
[]
],
[
"melee",
"melee",
"Your skill at hand-to-hand combat, both with and without a weapon. At low\nlevels this merely increases your chance to hit, but at higher levels it also\nincreases the damage done significantly."
"Your skill at hand-to-hand combat, both with and without a weapon. At low\nlevels this merely increases your chance to hit, but at higher levels it also\nincreases the damage done significantly.",
[]
],
[
"unarmed",
"unarmed combat",
"Your skill at combat without a weapon. While at low levels, unarmed combat is\na good way to die quickly, those skilled in it can eventually use throws and\ncrushing blows to quickly dispatch enemies."
"Your skill at combat without a weapon. While at low levels, unarmed combat is\na good way to die quickly, those skilled in it can eventually use throws and\ncrushing blows to quickly dispatch enemies.",
[]
],
[
"bashing",
"bashing weapons",
"Your skill at combat with weapons that club or bash your enemies. This\nincludes everything from rocks to baseball bats, and even the butt of rifles.\nThis increases damage, and at higher levels will improve your chance to hit."
"Your skill at combat with weapons that club or bash your enemies. This\nincludes everything from rocks to baseball bats, and even the butt of rifles.\nThis increases damage, and at higher levels will improve your chance to hit.",
[]
],
[
"cutting",
"cutting weapons",
"Your skill at combat with weapons that cut or slice your enemies. At first\nthis will simply slightly increase accuracy and damage; later on it will\nhelp you bypass armor and thick hides."
"Your skill at combat with weapons that cut or slice your enemies. At first\nthis will simply slightly increase accuracy and damage; later on it will\nhelp you bypass armor and thick hides.",
[]
],
[
"stabbing",
"piercing weapons",
"Your skill at combat that involves piercing weapons. This includes spears,\nwhich only have a stabbing attack, and things like knives, which can cut or\npierce. This increases your accuracy and chance of a deadly critical."
"Your skill at combat that involves piercing weapons. This includes spears,\nwhich only have a stabbing attack, and things like knives, which can cut or\npierce. This increases your accuracy and chance of a deadly critical.",
[]
],
[
"throw",
"throwing",
"Your skill at throwing items and getting them to go where you want. Increases\nboth accuracy and, at higher levels, range."
"Your skill at throwing items and getting them to go where you want. Increases\nboth accuracy and, at higher levels, range.",
[]
],
[
"gun",
"firearms",
"Your general skill at firearms. This increases your accuracy with any gun,\nbut not as much as the skill associated with the gun in question."
"Your general skill at firearms. This increases your accuracy with any gun,\nbut not as much as the skill associated with the gun in question.",
[]
],
[
"pistol",
"handguns",
"Your skill with handguns. These have poor accuracy, but generally are fired\nand reloaded faster than other guns, and are good in close quarters."
"Your skill with handguns. These have poor accuracy, but generally are fired\nand reloaded faster than other guns, and are good in close quarters.",
["gun_type"]
],
[
"shotgun",
"shotguns",
"Your skill with shotguns. Shot is easy to hit with, and does massive damage,\nbut has short range. Shotguns may also be loaded with slugs, which go further\nand do as much damage, but are not very accurate."
"Your skill with shotguns. Shot is easy to hit with, and does massive damage,\nbut has short range. Shotguns may also be loaded with slugs, which go further\nand do as much damage, but are not very accurate.",
["gun_type"]
],
[
"smg",
"submachine guns",
"Your skill with submachine guns and machine pistols. Halfway between a pistol\nand an assault rifle, these weapons fire and reload quickly, and may fire in\nbursts, but they are not very accurate."
"Your skill with submachine guns and machine pistols. Halfway between a pistol\nand an assault rifle, these weapons fire and reload quickly, and may fire in\nbursts, but they are not very accurate.",
["gun_type"]
],
[
"rifle",
"rifles",
"Your skill with rifles, both assault rifles and semi-auto hunting rifles.\nThese have terrific range and accuracy, but are very slow to fire and reload,\nand are not very good in close quarters."
"Your skill with rifles, both assault rifles and semi-auto hunting rifles.\nThese have terrific range and accuracy, but are very slow to fire and reload,\nand are not very good in close quarters.",
["gun_type"]
],
[
"archery",
"archery",
"Your skill with all kinds of bows, from crossbows to handmade long bows.\nThese are quiet, but require some amount of strength to use, and are not\nterribly accurate. They can only be deadly in skilled hands."
"Your skill with all kinds of bows, from crossbows to handmade long bows.\nThese are quiet, but require some amount of strength to use, and are not\nterribly accurate. They can only be deadly in skilled hands.",
[]
],
[
"launcher",
"grenade launcher",
"Your skill with grenade launchers, whether standalone or as a rifle mod.\nThese launchers fire a variety of 40mm grenades with different uses,\nbut they and their rounds are hard to find."
"Your skill with grenade launchers, whether standalone or as a rifle mod.\nThese launchers fire a variety of 40mm grenades with different uses,\nbut they and their rounds are hard to find.",
[]
],
[
"computer",
"computers",
"Your skill with computers, both in terms of legitimate use, and hacking. This\nwill help you use complex systems, and bypass their security."
"Your skill with computers, both in terms of legitimate use, and hacking. This\nwill help you use complex systems, and bypass their security.",
[]
],
[
"mechanics",
"mechanics",
"Your skill with repairs to mechanical systems, and the crafting of many items\nthat use complex parts, but are not electronics."
"Your skill with repairs to mechanical systems, and the crafting of many items\nthat use complex parts, but are not electronics.",
[]
],
[
"electronics",
"electronics",
"Your skill with repairs to electrical systems, and the crafting of many items\nthat use electrical parts."
"Your skill with repairs to electrical systems, and the crafting of many items\nthat use electrical parts.",
[]
],
[
"cooking",
"cooking",
"Your skill in combining food ingredients to make other, tastier food items.\nThis may also be used in mixing chemicals and other more esoteric tasks."
"Your skill in combining food ingredients to make other, tastier food items.\nThis may also be used in mixing chemicals and other more esoteric tasks.",
[]
],
[
"carpentry",
"construction",
"Your general knowledge in construction. This is used primarily when building\nterrain, via the * screen."
"Your general knowledge in construction. This is used primarily when building\nterrain, via the * screen.",
[]
],
[
"survival",
"survival",
"Your skill in wilderness survival. This helps you butcher meat from a corpse\nand craft various basic survival items. High levels may allow you to remove\npoison from tainted meat. Also used for skinning corpses to acquire pelts."
"Your skill in wilderness survival. This helps you butcher meat from a corpse\nand craft various basic survival items. High levels may allow you to remove\npoison from tainted meat. Also used for skinning corpses to acquire pelts.",
[]
],
[
"traps",
"traps",
"Your skill at setting and disarming traps safely and effectively. Note that\nthis does not help you detect traps, or avoid their effects if you activate\nthem."
"Your skill at setting and disarming traps safely and effectively. Note that\nthis does not help you detect traps, or avoid their effects if you activate\nthem.",
[]
],
[
"tailor",
"tailoring",
"Your skill at repairing clothing, and at higher levels, creating clothing\nfrom basic materials. Generally a sewing kit is needed. Also applies to\nother methods of clothing repair and textile crafting."
"Your skill at repairing clothing, and at higher levels, creating clothing\nfrom basic materials. Generally a sewing kit is needed. Also applies to\nother methods of clothing repair and textile crafting.",
[]
],
[
"firstaid",
"first aid",
"Your skill at emergency medical treatment, such as that from first aid kits\nand bandages. High levels of this skill may help heal more HP. Some drugs\nmay be more effective as well."
"Your skill at emergency medical treatment, such as that from first aid kits\nand bandages. High levels of this skill may help heal more HP. Some drugs\nmay be more effective as well.",
[]
],
[
"speech",
"speech",
"Your skill at talking to people, convincing them of things, lying, and many\nothers. Works best in conjunction with a high intelligence."
"Your skill at talking to people, convincing them of things, lying, and many\nothers. Works best in conjunction with a high intelligence.",
[]
],
[
"barter",
"barter",
"Your skill at getting a good deal when trading with others. Very high levels\nmight even see you getting freebies."
"Your skill at getting a good deal when trading with others. Very high levels\nmight even see you getting freebies.",
[]
],
[
"swimming",
"swimming",
"Your skill at swimming. This affects speed, your ability to swim while\nwearing clothes or carrying weights, and in-water combat."
"Your skill at swimming. This affects speed, your ability to swim while\nwearing clothes or carrying weights, and in-water combat.",
[]
],
[
"driving",
"driving",
"Your skill at driving. This affects how well you can control a vehicle,\nas well as the penalty of shooting while driving."
"Your skill at driving. This affects how well you can control a vehicle,\nas well as the penalty of shooting while driving.",
[]
]
]
+3
View File
@@ -89,6 +89,7 @@ struct talk_response
int mission_index;
mission_id miss; // If it generates a new mission
int tempvalue; // Used for various stuff
Skill* skill;
npc_opinion opinion_success;
npc_opinion opinion_failure;
void (talk_function::*effect_success)(game *, npc *);
@@ -104,6 +105,7 @@ struct talk_response
mission_index = -1;
miss = MISSION_NULL;
tempvalue = -1;
skill = NULL;
effect_success = &talk_function::nothing;
effect_failure = &talk_function::nothing;
opinion_success = npc_opinion();
@@ -120,6 +122,7 @@ struct talk_response
mission_index = rhs.mission_index;
miss = rhs.miss;
tempvalue = rhs.tempvalue;
skill = rhs.skill;
effect_success = rhs.effect_success;
effect_failure = rhs.effect_failure;
opinion_success = rhs.opinion_success;
+91 -62
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)
@@ -219,13 +220,16 @@ void dis_effect(game *g, player &p, disease &dis)
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
@@ -235,21 +239,21 @@ void dis_effect(game *g, player &p, disease &dis)
case DI_HOT_MOUTH:
switch (dis.intensity) {
case 3 : p.thirst--;
if (p.pain < 50) p.pain++;
case 2 : p.thirst--;
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(400)) g->add_msg("You are sweating profusely.");
// Speed -20
case 2 :
p.thirst--;
if (int(g->turn) % 300 == 0) p.thirst++;
p.str_cur--;
// Speed -5
// case 1 : Speed -2
@@ -258,9 +262,10 @@ void dis_effect(game *g, player &p, disease &dis)
case DI_HOT_ARMS:
switch (dis.intensity) {
case 3 : p.thirst--;
if (p.pain < 50) p.pain++;
case 2 : p.thirst--;
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;
@@ -273,17 +278,17 @@ void dis_effect(game *g, player &p, disease &dis)
case DI_HOT_LEGS:
switch (dis.intensity) {
case 3 : p.thirst--;
if (p.pain < 50) p.pain++;
case 3 :
if (int(g->turn) % 150 == 0) p.thirst++;
if (p.pain < 30) p.pain++;
if (one_in(400)) g->add_msg("Your legs are cramping up.");
case 2 : p.thirst--;
case 2 : if (int(g->turn) % 300 == 0) p.thirst++;
}
break;
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(400)) g->add_msg("Your feet are swelling in the heat.");
}
@@ -370,17 +375,19 @@ void dis_effect(game *g, player &p, disease &dis)
}
break;
// MATERIALS-TODO: this should be determined by materials properties
case DI_ONFIRE:
p.hurtall(3);
for (int i = 0; i < p.worn.size(); i++) {
if (p.worn[i].made_of(VEGGY) || p.worn[i].made_of(PAPER)) {
if (p.worn[i].made_of("veggy") || p.worn[i].made_of("paper")) {
p.worn.erase(p.worn.begin() + i);
i--;
} else if ((p.worn[i].made_of(COTTON) || p.worn[i].made_of(WOOL)) &&
} else if ((p.worn[i].made_of("cotton") || p.worn[i].made_of("wool")) &&
one_in(10)) {
p.worn.erase(p.worn.begin() + i);
i--;
} else if (p.worn[i].made_of(PLASTIC) && one_in(50)) {
} else if (p.worn[i].made_of("plastic") && one_in(50)) {
p.worn.erase(p.worn.begin() + i);
i--;
}
@@ -523,48 +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 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 ||
(one_in(p.temp_cur[i] + 1000) && p.temp_cur[i] < BODYTEMP_COLD - p.fatigue/2)){
g->add_msg("The cold wakes you up.");
dis.duration = 1;
}
if (p.temp_cur[i] > BODYTEMP_VERY_HOT + p.fatigue/2 ||
(one_in(11000 - p.temp_cur[i]) && p.temp_cur[i] > BODYTEMP_HOT + p.fatigue/2)){
g->add_msg("The heat 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))
@@ -1494,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.";}
@@ -1554,6 +1580,9 @@ Dexterity - 5; Speed -30%\
You are being slowed by climbing over a mountain of rubble";
}
case DI_STEMCELL_TREATMENT: return "\
Your insides are shifting in strange ways as the treatment takes effect.";
case DI_BOOMERED: return "\
Perception - 5\n\
Range of Sight: 1; All sight is tinted magenta";
+11 -10
View File
@@ -5,20 +5,21 @@
#define sgn(x) (((x) < 0) ? -1 : 1)
#endif
enum material {
MNULL = 0,
//Food Materials
VEGGY, FLESH, POWDER, HFLESH, //Human Flesh.
//Clothing
COTTON, WOOL, LEATHER, KEVLAR, FUR,
//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 {
int x;
int y;
+60 -48
View File
@@ -48,6 +48,8 @@ bool map::process_fields_in_submap(game *g, int gridn)
case fd_blood:
case fd_bile:
case fd_gibs_flesh:
case fd_gibs_veggy:
if (has_flag(swimmable, x, y)) // Dissipate faster in water
cur->age += 250;
break;
@@ -57,29 +59,36 @@ bool map::process_fields_in_submap(game *g, int gridn)
cur->age += 20;
for (int i = 0; i < i_at(x, y).size(); i++) {
item *melting = &(i_at(x, y)[i]);
if (melting->made_of(LIQUID) || melting->made_of(VEGGY) ||
melting->made_of(FLESH) || melting->made_of(POWDER) ||
melting->made_of(HFLESH) ||
melting->made_of(COTTON) || melting->made_of(WOOL) ||
melting->made_of(PAPER) || melting->made_of(PLASTIC) ||
(melting->made_of(GLASS) && !one_in(3)) || one_in(4)) {
// Acid destructable objects here
melting->damage++;
if (melting->damage >= 5 ||
(melting->made_of(PAPER) && melting->damage >= 3)) {
cur->age += melting->volume();
for (int m = 0; m < i_at(x, y)[i].contents.size(); m++)
i_at(x, y).push_back( i_at(x, y)[i].contents[m] );
i_at(x, y).erase(i_at(x, y).begin() + i);
i--;
// see DEVELOPER_FAQ.txt for how acid resistance is calculated
int chance = melting->acid_resist();
if (chance == 0)
{
melting->damage++;
}
else if (chance > 0 && chance < 9)
{
if (one_in(chance))
{
melting->damage++;
}
}
if (melting->damage >= 5)
{
cur->age += melting->volume();
for (int m = 0; m < i_at(x, y)[i].contents.size(); m++)
i_at(x, y).push_back( i_at(x, y)[i].contents[m] );
i_at(x, y).erase(i_at(x, y).begin() + i);
i--;
}
}
}
break;
case fd_sap:
break; // It doesn't do anything.
// TODO-MATERIALS: use fire resistance
case fd_fire: {
// Consume items as fuel to help us grow/last longer.
bool destroyed = false;
@@ -115,7 +124,7 @@ bool map::process_fields_in_submap(game *g, int gridn)
}
it->charges -= rounds_exploded;
if(it->charges == 0) destroyed = true;
} else if (it->made_of(PAPER)) {
} else if (it->made_of("paper")) {
destroyed = it->burn(cur->density * 3);
consumed++;
if (cur->density == 1)
@@ -123,7 +132,7 @@ bool map::process_fields_in_submap(game *g, int gridn)
if (vol >= 4)
smoke++;
} else if ((it->made_of(WOOD) || it->made_of(VEGGY))) {
} else if ((it->made_of("wood") || it->made_of("veggy"))) {
if (vol <= cur->density * 10 || cur->density == 3) {
cur->age -= 4;
destroyed = it->burn(cur->density);
@@ -134,7 +143,7 @@ bool map::process_fields_in_submap(game *g, int gridn)
smoke++;
}
} else if ((it->made_of(COTTON) || it->made_of(WOOL))) {
} else if ((it->made_of("cotton") || it->made_of("wool"))) {
if (vol <= cur->density * 5 || cur->density == 3) {
cur->age--;
destroyed = it->burn(cur->density);
@@ -145,7 +154,7 @@ bool map::process_fields_in_submap(game *g, int gridn)
smoke++;
}
} else if ((it->made_of(FLESH))||(it->made_of(HFLESH))) {
} else if ((it->made_of("flesh"))||(it->made_of("hflesh"))) {
if (vol <= cur->density * 5 || (cur->density == 3 && one_in(vol / 20))) {
cur->age--;
destroyed = it->burn(cur->density);
@@ -167,12 +176,12 @@ bool map::process_fields_in_submap(game *g, int gridn)
}
destroyed = true;
consumed++;
} else if (it->made_of(POWDER)) {
} else if (it->made_of("powder")) {
cur->age -= vol;
destroyed = true;
smoke += 2;
} else if (it->made_of(PLASTIC)) {
} else if (it->made_of("plastic")) {
smoke += 3;
if (it->burnt <= cur->density * 2 || (cur->density == 3 && one_in(vol))) {
destroyed = it->burn(cur->density);
@@ -193,7 +202,7 @@ bool map::process_fields_in_submap(game *g, int gridn)
if (veh)
veh->damage (part, cur->density * 10, false);
// If the flames are in a brazier, they're fully contained, so skip consuming terrain
if((tr_brazier != tr_at(x, y))&&(has_flag(fire_container, x, y) != TRUE )) {
if((tr_brazier != tr_at(x, y))&&(has_flag(fire_container, x, y) != true )) {
// Consume the terrain we're on
if (has_flag(explodes, x, y)) {
ter_set(x, y, ter_id(int(ter(x, y)) + 1));
@@ -233,7 +242,7 @@ bool map::process_fields_in_submap(game *g, int gridn)
bool in_pit = (ter(x, y) == t_pit);
// If the flames are REALLY big, they contribute to adjacent flames
if (cur->density == 3 && cur->age < 0 && tr_brazier != tr_at(x, y)
&& (has_flag(fire_container, x, y) != TRUE ) ){
&& (has_flag(fire_container, x, y) != true ) ){
// Randomly offset our x/y shifts by 0-2, to randomly pick a square to spread to
int starti = rng(0, 2);
int startj = rng(0, 2);
@@ -261,12 +270,12 @@ bool map::process_fields_in_submap(game *g, int gridn)
if (field_at(fx, fy).type == fd_web)
spread_chance = 50 + spread_chance / 2;
if (has_flag(explodes, fx, fy) && one_in(8 - cur->density) &&
tr_brazier != tr_at(x, y) && (has_flag(fire_container, x, y) != TRUE ) ) {
tr_brazier != tr_at(x, y) && (has_flag(fire_container, x, y) != true ) ) {
ter_set(fx, fy, ter_id(int(ter(fx, fy)) + 1));
g->explosion(fx, fy, 40, 0, true);
} else if ((i != 0 || j != 0) && rng(1, 100) < spread_chance &&
tr_brazier != tr_at(x, y) &&
(has_flag(fire_container, x, y) != TRUE )&&
(has_flag(fire_container, x, y) != true )&&
(in_pit == (ter(fx, fy) == t_pit)) &&
((cur->density == 3 &&
(has_flag(flammable, fx, fy) || one_in(20))) ||
@@ -294,7 +303,7 @@ bool map::process_fields_in_submap(game *g, int gridn)
if (move_cost(fx, fy) > 0 &&
(!one_in(smoke) || (nosmoke && one_in(40))) &&
rng(3, 35) < cur->density * 10 && cur->age < 1000 &&
(has_flag(suppress_smoke, x, y) != TRUE )) {
(has_flag(suppress_smoke, x, y) != true )) {
smoke--;
add_field(g, fx, fy, fd_smoke, rng(1, cur->density));
}
@@ -316,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));
}
@@ -865,6 +874,7 @@ void map::mon_in_field(int x, int y, game *g, monster *z)
}
break;
// TODO: Use acid resistance
case fd_acid:
if (!z->has_flag(MF_DIGS) && !z->has_flag(MF_FLIES) &&
!z->has_flag(MF_ACIDPROOF)) {
@@ -883,15 +893,16 @@ void map::mon_in_field(int x, int y, game *g, monster *z)
cur->density--;
break;
// MATERIALS-TODO: Use fire resistance
case fd_fire:
if ( z->made_of(FLESH) || z->made_of(HFLESH) )
if ( z->made_of("flesh") || z->made_of("hflesh") )
dam = 3;
if (z->made_of(VEGGY))
if (z->made_of("veggy"))
dam = 12;
if (z->made_of(PAPER) || z->made_of(LIQUID) || z->made_of(POWDER) ||
z->made_of(WOOD) || z->made_of(COTTON) || z->made_of(WOOL))
if (z->made_of("paper") || z->made_of(LIQUID) || z->made_of("powder") ||
z->made_of("wood") || z->made_of("cotton") || z->made_of("wool"))
dam = 20;
if (z->made_of(STONE) || z->made_of(KEVLAR) || z->made_of(STEEL))
if (z->made_of("stone") || z->made_of("kevlar") || z->made_of("steel"))
dam = -20;
if (z->has_flag(MF_FLIES))
dam -= 15;
@@ -902,16 +913,16 @@ void map::mon_in_field(int x, int y, game *g, monster *z)
dam += rng(6, 12);
if (!z->has_flag(MF_FLIES)) {
z->moves -= 20;
if (!z->made_of(LIQUID) && !z->made_of(STONE) && !z->made_of(KEVLAR) &&
!z->made_of(STEEL) && !z->has_flag(MF_FIREY))
if (!z->made_of(LIQUID) && !z->made_of("stone") && !z->made_of("kevlar") &&
!z->made_of("steel") && !z->has_flag(MF_FIREY))
z->add_effect(ME_ONFIRE, rng(3, 8));
}
} else if (cur->density == 3) {
dam += rng(10, 20);
if (!z->has_flag(MF_FLIES) || one_in(3)) {
z->moves -= 40;
if (!z->made_of(LIQUID) && !z->made_of(STONE) && !z->made_of(KEVLAR) &&
!z->made_of(STEEL) && !z->has_flag(MF_FIREY))
if (!z->made_of(LIQUID) && !z->made_of("stone") && !z->made_of("kevlar") &&
!z->made_of("steel") && !z->has_flag(MF_FIREY))
z->add_effect(ME_ONFIRE, rng(8, 12));
}
}
@@ -926,13 +937,13 @@ void map::mon_in_field(int x, int y, game *g, monster *z)
if (!z->has_flag(MF_NO_BREATHE)){
if (cur->density == 3)
z->moves -= rng(10, 20);
if (z->made_of(VEGGY)) // Plants suffer from smoke even worse
if (z->made_of("veggy")) // Plants suffer from smoke even worse
z->moves -= rng(1, cur->density * 12);
}
break;
case fd_tear_gas:
if ((z->made_of(FLESH) || z->made_of(HFLESH) || z->made_of(VEGGY)) &&
if ((z->made_of("flesh") || z->made_of("hflesh") || z->made_of("veggy")) &&
!z->has_flag(MF_NO_BREATHE)) {
z->add_effect(ME_BLIND, cur->density * 8);
if (cur->density == 3) {
@@ -943,7 +954,7 @@ void map::mon_in_field(int x, int y, game *g, monster *z)
dam = rng(2, 5);
} else
z->add_effect(ME_STUNNED, rng(1, 5));
if (z->made_of(VEGGY)) {
if (z->made_of("veggy")) {
z->moves -= rng(cur->density * 5, cur->density * 12);
dam += cur->density * rng(8, 14);
}
@@ -969,22 +980,23 @@ void map::mon_in_field(int x, int y, game *g, monster *z)
z->moves -= rng(0, 15);
dam = rng(0, 12);
}
if (z->made_of(VEGGY)) {
if (z->made_of("veggy")) {
z->moves -= rng(cur->density * 5, cur->density * 12);
dam *= cur->density;
}
}
break;
// MATERIALS-TODO: Use fire resistance
case fd_flame_burst:
if (z->made_of(FLESH) || z->made_of(HFLESH))
if (z->made_of("flesh") || z->made_of("hflesh"))
dam = 3;
if (z->made_of(VEGGY))
if (z->made_of("veggy"))
dam = 12;
if (z->made_of(PAPER) || z->made_of(LIQUID) || z->made_of(POWDER) ||
z->made_of(WOOD) || z->made_of(COTTON) || z->made_of(WOOL))
if (z->made_of("paper") || z->made_of(LIQUID) || z->made_of("powder") ||
z->made_of("wood") || z->made_of("cotton") || z->made_of("wool"))
dam = 50;
if (z->made_of(STONE) || z->made_of(KEVLAR) || z->made_of(STEEL))
if (z->made_of("stone") || z->made_of("kevlar") || z->made_of("steel"))
dam = -25;
dam += rng(0, 8);
z->moves -= 20;
@@ -1114,7 +1126,7 @@ void map::field_effect(int x, int y, game *g) //Applies effect of field immediat
}
vehicle *veh = veh_at(x, y, veh_part);
if (veh) {
veh->damage(veh_part, ceil(veh->parts[veh_part].hp/3 * cur->density), 1, false);
veh->damage(veh_part, ceil(veh->parts[veh_part].hp/3.0 * cur->density), 1, false);
}
}
}
+2672 -1198
View File
File diff suppressed because it is too large Load Diff
+34 -10
View File
@@ -47,8 +47,13 @@
#define BULLET_SPEED 10000000
#define EXPLOSION_SPEED 70000000
#define PICKUP_RANGE 2
#define MAX_ITEM_IN_SQUARE 1024 // really just a sanity check for functions not tested beyond this. in theory 4096 works (`InvletInvlet)
#define MAX_VOLUME_IN_SQUARE 1000 // 6.25 dead bears is enough for everybody!
#define MAX_ITEM_IN_VEHICLE_STORAGE MAX_ITEM_IN_SQUARE // no reason to differ
#define MAX_VOLUME_IN_VEHICLE_STORAGE 500 // todo: variation. semi trailer square could hold more. the real limit would be weight
#define PICKUP_RANGE 2
extern bool trigdist;
enum tut_type {
TUT_NULL,
TUT_BASIC, TUT_COMBAT,
@@ -113,6 +118,12 @@ class game
void vadd_msg(const char* msg, va_list ap );
void add_msg(const char* msg, ...);
void add_msg_if_player(player *p, const char* msg, ...);
std::string press_x(action_id act); // (Press X (or Y)|Try) to Z
std::string press_x(action_id act, std::string key_bound,
std::string key_unbound);
std::string press_x(action_id act, std::string key_bound_pre,
std::string key_bound_suf, std::string key_unbound);
std::string press_x(action_id act, std::string act_desc); // ('Z'ing|zing) (X( or Y)))
void add_event(event_type type, int on_turn, int faction_id = -1,
int x = -1, int y = -1);
bool event_queued(event_type type);
@@ -145,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)...
@@ -155,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
@@ -165,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
@@ -177,7 +196,7 @@ class game
void teleport(player *p = NULL);
void plswim(int x, int y); // Called by plmove. Handles swimming
// when player is thrown (by impact or something)
void fling_player_or_monster(player *p, monster *zz, 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);
@@ -206,6 +225,7 @@ class game
void add_artifact_messages(std::vector<art_effect_passive> effects);
void peek();
point look_debug(point point=point(-256,-256));
point look_around();// Look at nearby terrain ';'
void list_items(); //List all items around the player
bool list_items_match(std::string sText, std::string sPattern);
@@ -221,14 +241,15 @@ class game
std::string list_item_downvote;
char inv(std::string title = "Inventory:");
char inv_type(std::string title = "Inventory:", item_cat inv_item_type = IC_NULL);
int inventory_item_menu(char chItem, int startx = 0, int width = 50);
std::vector<item> multidrop();
faction* list_factions(std::string title = "FACTIONS:");
point find_item(item *it);
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; }
@@ -245,6 +266,7 @@ class game
std::vector <mission_type> mission_types; // The list of mission templates
mutation_branch mutation_data[PF_MAX2]; // Mutation data
std::map<char, action_id> keymap;
std::map<char, action_id> default_keymap;
calendar turn;
signed char temperature; // The air temperature
@@ -271,6 +293,7 @@ class game
std::map<int, std::map<int, bool> > mapRain;
int w_void_lines;
WINDOW *w_terrain;
WINDOW *w_minimap;
WINDOW *w_HP;
@@ -289,13 +312,15 @@ class game
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_artifacts(); // Load artifact data
void load_weather(std::ifstream &fin);
void load(std::string name); // Load a player-specific save file
void start_game(); // Starts a new game
@@ -367,12 +392,12 @@ class game
void construction_menu(); // See construction.cpp
bool player_can_build(player &p, inventory inv, constructable* con,
const int level = -1, bool cont = false,
bool exact_level=false);
bool exact_level=false);
void place_construction(constructable *con); // See construction.cpp
void complete_construction(); // See construction.cpp
bool pl_choose_vehicle (int &x, int &y);
bool vehicle_near ();
void handbrake ();
void control_vehicle(); // Use vehicle controls '^'
void examine();// Examine nearby terrain 'e'
void advanced_inv();
// open vehicle interaction screen
@@ -383,7 +408,7 @@ class game
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)
@@ -476,7 +501,6 @@ class game
std::vector<event> events; // Game events to be processed
int kills[num_monsters]; // Player's kill count
std::string last_action; // The keypresses of last turn
int moves_since_last_save;
int item_exchanges_since_save;
time_t last_save_timestamp;
+249 -159
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,27 +440,37 @@ After 30 minutes of warmup time, monsters will begin to appear. They are\n\
represented by letters on your screen; a list of monster names, and their\n\
positions relative to you, is displayed on the right side of the screen.\n\
\n\
To attack a monster with a melee weapon, simply move into them. The time it\n\
takes to attack depends on the size and weight of your weapon. Small, light\n\
weapons are the fastest; unarmed attacks increase in speed with your Unarmed\n\
Combat skill, and will eventually be VERY fast. A successful hit with a\n\
bashing weapon may stun the monster temporarily, while cutting weapons may get\n\
stuck, possibly pulling the weapon from your hands--but a monster with a weapon\n\
stuck in it will move much more slowly. A miss may make you stumble and lose\n\
movement points. If a monster hits you, your clothing may absorb some damage,\n\
but you will absorb the excess.\n\
To attack a monster with a melee weapon, simply move into them. The time\n\
it takes to attack depends on the size and weight of your weapon. Small,\n\
light weapons are the fastest; unarmed attacks increase in speed with\n\
your Unarmed Combat skill, and will eventually be VERY fast. A successful\n\
hit with a bashing weapon may stun the monster temporarily, while cutting\n\
weapons may get stuck, possibly pulling the weapon from your hands-- but\n\
a monster with a weapon stuck in it will move much more slowly. A miss\n\
may make you stumble and lose movement points. If a monster hits you,\n\
your clothing may absorb some damage, but you will absorb the excess.\n\
\n\
Swarms of monsters may call for firearms. If you find one, wield it first,\n\
then reload by pressing 'r'. If you wish to change ammo, you must unload the\n\
weapon by pressing 'U', then reload again. To fire, press 'f', move the\n\
then reload%s. If you wish to change ammo, you must unload the\n\
weapon%s, then reload again. To fire%s, move the\n\
cursor to the relevant space, then hit '.' or 'f'. Some guns have alternate\n\
firing modes, such as burst fire; to cycle modes, press 'F'. Firing\n\
continuously, especially in bursts, will severely reduce accuracy.\n\
\n\
firing modes, such as burst fire; to cycle modes%s.\n\
Firing continuously, especially in bursts, will severely reduce accuracy.\n\
Press any key for more...",
press_x(ACTION_RELOAD, " by pressing ", "").c_str(),
press_x(ACTION_UNLOAD, " by pressing ", "").c_str(),
press_x(ACTION_FIRE, ", press ", "").c_str(),
press_x(ACTION_SELECT_FIRE_MODE, ", press ", " 'Toggle attack mode of Wielded Item'").c_str());
wrefresh(w_help);
refresh();
getch();
werase(w_help);
mvwprintz(w_help, 0, 0, c_white, "\
Unlike most roguelikes, fleeing will often be your best option, especially\n\
when overwhelmed by a swarm of zombies. Try to avoid getting cornered inside\n\
a building. Ducking down into the subways or sewers is often an excellent\n\
escape tactic.");
when overwhelmed by a swarm of zombies. Try to avoid getting cornered\n\
inside a building. Ducking down into the subways or sewers is often\n\
an excellent escape tactic."/*,
press_x(ACTION_USE_WIELDED).c_str()*/);
wrefresh(w_help);
refresh();
getch();
@@ -423,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();
@@ -455,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\
@@ -472,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();
@@ -577,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\
@@ -586,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();
@@ -600,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\
@@ -608,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();
@@ -630,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();
@@ -648,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.");
@@ -714,15 +795,16 @@ several loaded handguns, switching from one to the next once their ammo is\n\
spent.");
mvwprintz(w_help, 12, 0, c_green, "( Crossbows");
mvwprintz(w_help, 13, 0, c_white, "\
The best feature of crossbows is their silence. The bolts they fire are only\n\
rarely destroyed; if you pick up the bolts after firing them, your ammunition\n\
will last much longer. Crossbows suffer from a short range and a very long\n\
reload time (modified by your strength); plus, most only hold a single round.\n\
The best feature of crossbows is their silence. The bolts they fire are\n\
only rarely destroyed; if you pick up the bolts after firing them, your \n\
ammunition will last much longer. Crossbows suffer from a short range and\n\
a very long reload time (modified by your strength); plus, most only hold\n\
a single round.\n\
For this reason, it is advisable to carry a few loaded crossbows.\n\
Crossbows can be very difficult to find; however, it is possible to craft one\n\
given enough Mechanics skill. Likewise, it is possible to make wooden bolts\n\
from any number of wooden objects, though these are much less effective than\n\
steel bolts.\n\
Crossbows can be very difficult to find; however, it is possible to craft\n\
one given enough Mechanics skill. Likewise, it is possible to make\n\
wooden bolts from any number of wooden objects, though these are much\n\
less effective than steel bolts.\n\
Crossbows use the handgun skill.");
mvwprintz(w_help, 24, 0, c_white, "Press any key to continue...");
@@ -737,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.");
@@ -764,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\
@@ -795,12 +877,12 @@ making them very good at clearing out large numbers of enemies.");
mvwprintz(w_help, 11, 0, c_white, "\
Energy weapons is an umbrella term used to describe a variety of rifles and\n\
handguns which fire lasers, plasma, or energy attacks. They started to\n\
appear in military use just prior to the start of the apocalypse, and as such\n\
are very difficult to find.\n\
appear in military use just prior to the start of the apocalypse, and\n\
as such are very difficult to find.\n\
Energy weapons have no recoil at all; they are nearly silent, have a long\n\
range, and are fairly damaging. The biggest drawback to energy weapons is\n\
scarcity of ammunition; it is wise to reserve the precious ammo for when you\n\
really need it.");
scarcity of ammunition; it is wise to reserve the precious ammo for when\n\
you really need it.");
mvwprintz(w_help, 24, 0, c_white, "Press any key to continue...");
wrefresh(w_help);
@@ -809,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();
@@ -843,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();
+95 -73
View File
@@ -25,15 +25,17 @@ void iexamine::gaspump(game *g, player *p, map *m, int examx, int examy) {
none(g, p, m, examx, examy);
return;
}
bool use_pump = false;
item gas(g->itypes["gasoline"], g->turn);
if (one_in(10 + p->dex_cur)) {
g->add_msg("You accidentally spill the gasoline.");
m->add_item(p->posx, p->posy, gas);
use_pump = true;
} else {
p->moves -= 300;
g->handle_liquid(gas, false, true);
use_pump = g->handle_liquid(gas, false, true);
}
if (one_in(10)) {
if (use_pump && one_in(10)) {
g->add_msg("With a clang and a shudder, the gas pump goes silent.");
m->ter_set(examx, examy, t_gas_pump_empty);
}
@@ -42,18 +44,7 @@ void iexamine::gaspump(game *g, player *p, map *m, int examx, int examy) {
void iexamine::elevator(game *g, player *p, map *m, int examx, int examy){
if (!query_yn("Use the %s?",m->tername(examx, examy).c_str())) return;
int movez = (g->levz < 0 ? 2 : -2);
g->levz += movez;
m->load(g, g->levx, g->levy, g->levz);
g->update_map(p->posx, p->posy);
for (int x = 0; x < SEEX * MAPSIZE; x++) {
for (int y = 0; y < SEEY * MAPSIZE; y++) {
if (m->ter(x, y) == t_elevator) {
p->posx = x;
p->posy = y;
}
}
}
g->refresh_all();
g->vertical_move( movez, false );
}
void iexamine::controls_gate(game *g, player *p, map *m, int examx, int examy) {
@@ -530,52 +521,64 @@ void iexamine::fswitch(game *g, player *p, map *m, int examx, int examy) {
}
void iexamine::flower_poppy(game *g, player *p, map *m, int examx, int examy) {
if(!query_yn("Pick %s?",m->tername(examx, examy).c_str())) {
none(g, p, m, examx, examy);
return;
}
if(!query_yn("Pick %s?",m->tername(examx, examy).c_str())) {
none(g, p, m, examx, examy);
return;
}
g->add_msg("This flower has a heady aroma");
if (!(p->is_wearing("mask_filter")||p->is_wearing("mask_gas") ||
one_in(3))) {
g->add_msg("You fall asleep...");
p->add_disease(DI_SLEEP, 1200, g);
g->add_msg("Your legs are covered by flower's roots!");
p->hurt(g,bp_legs, 0, 4);
p->moves-=50;
}
m->ter_set(examx, examy, t_dirt);
m->spawn_item(examx, examy, g->itypes["poppy_flower"],0);
m->spawn_item(examx, examy, g->itypes["poppy_bud"],0);
int resist = p->resist(bp_mouth);
if (resist < 10) {
// Can't smell the flowers with a gas mask on!
g->add_msg("This flower has a heady aroma");
}
if (one_in(3) && resist < 5) {
// Should user player::infect, but can't!
// player::infect needs to be restructured to return a bool indicating success.
g->add_msg("You fall asleep...");
p->add_disease(DI_SLEEP, 1200, g);
g->add_msg("Your legs are covered by flower's roots!");
p->hurt(g,bp_legs, 0, 4);
p->moves-=50;
}
m->ter_set(examx, examy, t_dirt);
m->spawn_item(examx, examy, "poppy_flower", 0);
m->spawn_item(examx, examy, "poppy_bud", 0);
}
void iexamine::pick_plant(game *g, player *p, map *m, int examx, int examy, std::string itemType, int new_ter) {
if (!query_yn("Pick %s?", m->tername(examx, examy).c_str())) {
none(g, p, m, examx, examy);
return;
}
SkillLevel& survival = p->skillLevel("survival");
if (survival < 1)
p->practice(g->turn, "survival", rng(5, 12));
else if (survival < 6)
p->practice(g->turn, "survival", rng(1, 12 / survival));
int num_fruits = rng(1, survival);
if (num_fruits > 12)
num_fruits = 12;
m->spawn_item(examx, examy, itemType, g->turn, num_fruits);
m->ter_set(examx, examy, (ter_id)new_ter);
}
void iexamine::tree_apple(game *g, player *p, map *m, int examx, int examy) {
if(!query_yn("Pick %s?",m->tername(examx, examy).c_str())) return;
int num_apples = rng(1, p->skillLevel("survival"));
if (num_apples >= 12)
num_apples = 12;
for (int i = 0; i < num_apples; i++)
m->spawn_item(examx, examy, g->itypes["apple"], g->turn, 0);
m->ter_set(examx, examy, t_tree);
pick_plant(g, p, m, examx, examy, "apple", t_tree);
}
void iexamine::shrub_blueberry(game *g, player *p, map *m, int examx, int examy) {
if(!query_yn("Pick %s?",m->tername(examx, examy).c_str())) {
none(g, p, m, examx, examy);
return;
}
pick_plant(g, p, m, examx, examy, "blueberries", t_shrub);
}
int num_blueberries = rng(1, p->skillLevel("survival"));
if (num_blueberries >= 12)
num_blueberries = 12;
for (int i = 0; i < num_blueberries; i++)
m->spawn_item(examx, examy, g->itypes["blueberries"], g->turn, 0);
m->ter_set(examx, examy, t_shrub);
void iexamine::shrub_strawberry(game *g, player *p, map *m, int examx, int examy) {
pick_plant(g, p, m, examx, examy, "strawberries", t_shrub);
}
void iexamine::shrub_wildveggies(game *g, player *p, map *m, int examx, int examy) {
@@ -615,7 +618,7 @@ void iexamine::recycler(game *g, player *p, map *m, int examx, int examy) {
for (int i = 0; i < m->i_at(examx, examy).size(); i++)
{
item *it = &(m->i_at(examx, examy)[i]);
if (it->made_of(STEEL))
if (it->made_of("steel"))
steel_weight += it->weight();
m->i_at(examx, examy).erase(m->i_at(examx, examy).begin() + i);
i--;
@@ -633,16 +636,21 @@ void iexamine::recycler(game *g, player *p, map *m, int examx, int examy) {
g->sound(examx, examy, 80, "Ka-klunk!");
int lump_weight = item_controller->find_template("steel_lump")->weight;
int sheet_weight = item_controller->find_template("sheet_metal")->weight;
int chunk_weight = item_controller->find_template("steel_chunk")->weight;
int scrap_weight = item_controller->find_template("scrap")->weight;
switch(ch)
{
case 1: // 1 steel lump = weight 80
num_lumps = steel_weight / (item_controller->find_template("steel_lump")->weight);
steel_weight -= num_lumps * (item_controller->find_template("steel_lump")->weight);
num_sheets = steel_weight / (item_controller->find_template("sheet_metal")->weight);
steel_weight -= num_sheets * (item_controller->find_template("sheet_metal")->weight);
num_chunks = steel_weight / (item_controller->find_template("steel_chunk")->weight);
steel_weight -= num_chunks * (item_controller->find_template("steel_chunk")->weight);
num_scraps = steel_weight / (item_controller->find_template("scrap")->weight);
num_lumps = steel_weight / (lump_weight);
steel_weight -= num_lumps * (lump_weight);
num_sheets = steel_weight / (sheet_weight);
steel_weight -= num_sheets * (sheet_weight);
num_chunks = steel_weight / (chunk_weight);
steel_weight -= num_chunks * (chunk_weight);
num_scraps = steel_weight / (scrap_weight);
if (num_lumps == 0)
{
g->add_msg("The recycler beeps: \"Insufficient steel!\"");
@@ -651,11 +659,11 @@ void iexamine::recycler(game *g, player *p, map *m, int examx, int examy) {
break;
case 2: // 1 metal sheet = weight 20
num_sheets = steel_weight / (item_controller->find_template("sheet_metal")->weight);
steel_weight -= num_sheets * (item_controller->find_template("sheet_metal")->weight);
num_chunks = steel_weight / (item_controller->find_template("steel_chunk")->weight);
steel_weight -= num_chunks * (item_controller->find_template("sheet_chunk")->weight);
num_scraps = steel_weight / (item_controller->find_template("scrap")->weight);
num_sheets = steel_weight / (sheet_weight);
steel_weight -= num_sheets * (sheet_weight);
num_chunks = steel_weight / (chunk_weight);
steel_weight -= num_chunks * (chunk_weight);
num_scraps = steel_weight / (scrap_weight);
if (num_sheets == 0)
{
g->add_msg("The recycler beeps: \"Insufficient steel!\"");
@@ -664,9 +672,9 @@ void iexamine::recycler(game *g, player *p, map *m, int examx, int examy) {
break;
case 3: // 1 steel chunk = weight 6
num_chunks = steel_weight / (item_controller->find_template("steel_chunk")->weight);
steel_weight -= num_chunks * (item_controller->find_template("steel_chunk")->weight);
num_scraps = steel_weight / (item_controller->find_template("scrap")->weight);
num_chunks = steel_weight / (chunk_weight);
steel_weight -= num_chunks * (chunk_weight);
num_scraps = steel_weight / (scrap_weight);
if (num_chunks == 0)
{
g->add_msg("The recycler beeps: \"Insufficient steel!\"");
@@ -675,28 +683,28 @@ void iexamine::recycler(game *g, player *p, map *m, int examx, int examy) {
break;
case 4: // 1 metal scrap = weight 1
num_scraps = steel_weight / (item_controller->find_template("scrap")->weight);
num_scraps = steel_weight / (scrap_weight);
break;
}
for (int i = 0; i < num_lumps; i++)
{
m->spawn_item(p->posx, p->posy, item_controller->find_template("steel_lump"), 0);
m->spawn_item(p->posx, p->posy, "steel_lump", 0);
}
for (int i = 0; i < num_sheets; i++)
{
m->spawn_item(p->posx, p->posy, item_controller->find_template("sheet_metal"), 0);
m->spawn_item(p->posx, p->posy, "sheet_metal", 0);
}
for (int i = 0; i < num_chunks; i++)
{
m->spawn_item(p->posx, p->posy, item_controller->find_template("steel_chunk"), 0);
m->spawn_item(p->posx, p->posy, "steel_chunk", 0);
}
for (int i = 0; i < num_scraps; i++)
{
m->spawn_item(p->posx, p->posy, item_controller->find_template("scrap"), 0);
m->spawn_item(p->posx, p->posy, "scrap", 0);
}
}
@@ -713,6 +721,11 @@ void iexamine::trap(game *g, player *p, map *m, int examx, int examy) {
{
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)
@@ -732,3 +745,12 @@ void iexamine::water_source(game *g, player *p, map *m, const int examx, const i
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;
}
}
+3
View File
@@ -42,12 +42,15 @@ public:
void pedestal_temple (game *g, player *p, map *m, int examx, int examy);
void fswitch (game *g, player *p, map *m, int examx, int examy);
void flower_poppy (game *g, player *p, map *m, int examx, int examy);
void pick_plant(game *g, player *p, map *m, int examx, int examy, std::string itemType, int new_ter);
void tree_apple (game *g, player *p, map *m, int examx, int examy);
void shrub_blueberry (game *g, player *p, map *m, int examx, int examy);
void shrub_strawberry (game *g, player *p, map *m, int examx, int examy);
void shrub_wildveggies (game *g, player *p, map *m, int examx, int examy);
void recycler (game *g, player *p, map *m, int examx, int examy);
void trap(game *g, player *p, map *m, int examx, int examy);
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__) */
+45 -19
View File
@@ -318,7 +318,7 @@ item& inventory::add_item(item newit, bool keep_invlet)
}
else if (it_ref->stacks_with(newit))
{
if (it_ref->is_food() && it_ref->has_flag(IF_HOT))
if (it_ref->is_food() && it_ref->has_flag("HOT"))
{
int tmpcounter = (it_ref->item_counter + newit.item_counter) / 2;
it_ref->item_counter = tmpcounter;
@@ -452,12 +452,12 @@ void inventory::form_from_map(game *g, point origin, int range)
if (!g->m.i_at(x, y)[i].made_of(LIQUID))
add_item(g->m.i_at(x, y)[i]);
// Kludges for now!
if (g->m.field_at(x, y).type == fd_fire) {
ter_id terrain_id = g->m.ter(x, y);
if ((g->m.field_at(x, y).type == fd_fire) || (terrain_id == t_lava)) {
item fire(g->itypes["fire"], 0);
fire.charges = 1;
add_item(fire);
}
ter_id terrain_id = g->m.ter(x, y);
if (terrain_id == t_toilet || terrain_id == t_water_sh || terrain_id == t_water_dp){
item water(g->itypes["water"], 0);
water.charges = 50;
@@ -650,14 +650,14 @@ std::vector<item> inventory::remove_mission_items(int mission_id)
return ret;
}
void inventory::dump(std::vector<item>& dest) const
void inventory::dump(std::vector<item *>& dest)
{
for (invstack::const_iterator iter = items.begin(); iter != items.end(); ++iter)
for (invstack::iterator iter = items.begin(); iter != items.end(); ++iter)
{
for (std::list<item>::const_iterator stack_iter = iter->begin();
for (std::list<item>::iterator stack_iter = iter->begin();
stack_iter != iter->end(); ++stack_iter)
{
dest.push_back(*stack_iter);
dest.push_back(&(*stack_iter));
}
}
}
@@ -830,8 +830,10 @@ int inventory::charges_of(itype_id it) const
return count;
}
void inventory::use_amount(itype_id it, int quantity, bool use_container)
std::list<item> inventory::use_amount(itype_id it, int quantity, bool use_container)
{
sort();
std::list<item> ret;
for (invstack::iterator iter = items.begin(); iter != items.end() && quantity > 0; ++iter)
{
for (std::list<item>::iterator stack_iter = iter->begin();
@@ -844,6 +846,7 @@ void inventory::use_amount(itype_id it, int quantity, bool use_container)
{
if (stack_iter->contents[k].type->id == it)
{
ret.push_back(stack_iter->contents[k]);
quantity--;
stack_iter->contents.erase(stack_iter->contents.begin() + k);
k--;
@@ -854,31 +857,42 @@ void inventory::use_amount(itype_id it, int quantity, bool use_container)
if (use_container && used_item_contents)
{
stack_iter = iter->erase(stack_iter);
--stack_iter;
if (iter->empty())
{
iter = items.erase(iter);
--iter;
stack_iter = iter->begin();
break;
}
else
{
--stack_iter;
}
}
else if (stack_iter->type->id == it && quantity > 0)
{
ret.push_back(*stack_iter);
quantity--;
stack_iter = iter->erase(stack_iter);
--stack_iter;
if (iter->empty())
{
iter = items.erase(iter);
--iter;
break;
}
else
{
--stack_iter;
}
}
}
}
return ret;
}
void inventory::use_charges(itype_id it, int quantity)
std::list<item> inventory::use_charges(itype_id it, int quantity)
{
sort();
std::list<item> ret;
for (invstack::iterator iter = items.begin(); iter != items.end() && quantity > 0; ++iter)
{
for (std::list<item>::iterator stack_iter = iter->begin();
@@ -892,6 +906,7 @@ void inventory::use_charges(itype_id it, int quantity)
{
if (stack_iter->contents[k].charges <= quantity)
{
ret.push_back(stack_iter->contents[k]);
quantity -= stack_iter->contents[k].charges;
if (stack_iter->contents[k].destroyed_at_zero_charges())
{
@@ -905,8 +920,11 @@ void inventory::use_charges(itype_id it, int quantity)
}
else
{
item tmp = stack_iter->contents[k];
tmp.charges = quantity;
ret.push_back(tmp);
stack_iter->contents[k].charges -= quantity;
return;
return ret;
}
}
}
@@ -916,17 +934,21 @@ void inventory::use_charges(itype_id it, int quantity)
{
if (stack_iter->charges <= quantity)
{
ret.push_back(*stack_iter);
quantity -= stack_iter->charges;
if (stack_iter->destroyed_at_zero_charges())
{
stack_iter = iter->erase(stack_iter);
--stack_iter;
if (iter->empty())
{
iter = items.erase(iter);
--iter;
break;
}
else
{
--stack_iter;
}
}
else
{
@@ -935,12 +957,16 @@ void inventory::use_charges(itype_id it, int quantity)
}
else
{
item tmp = *stack_iter;
tmp.charges = quantity;
ret.push_back(tmp);
stack_iter->charges -= quantity;
return;
return ret;
}
}
}
}
return ret;
}
bool inventory::has_amount(itype_id it, int quantity) const
@@ -1037,7 +1063,7 @@ int inventory::butcher_factor() const
++stack_iter)
{
const item& cur_item = *stack_iter;
if (cur_item.damage_cut() >= 10 && !cur_item.has_flag(IF_SPEAR))
if (cur_item.damage_cut() >= 10 && !cur_item.has_flag("SPEAR"))
{
int factor = cur_item.volume() * 5 - cur_item.weight() * 1.5 -
cur_item.damage_cut();
@@ -1206,13 +1232,13 @@ item& inventory::most_appropriate_painkiller(int pain)
return ret;
}
item& inventory::best_for_melee(int skills[num_skill_types])
item& inventory::best_for_melee(player *p)
{
item& ret = nullitem;
int best = 0;
for (invstack::iterator iter = items.begin(); iter != items.end(); ++iter)
{
int score = iter->front().melee_value(skills);
int score = iter->front().melee_value(p);
if (score > best)
{
best = score;
@@ -1245,7 +1271,7 @@ void inventory::rust_iron_items()
stack_iter != iter->end();
++stack_iter)
{
if (stack_iter->type->m1 == IRON && stack_iter->damage < 5 && one_in(8))
if (stack_iter->type->m1 == "iron" && stack_iter->damage < 5 && one_in(8))
{
stack_iter->damage++;
}
+4 -4
View File
@@ -76,8 +76,8 @@ class inventory
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) const;
bool has_charges(itype_id it, int quantity) const;
@@ -95,7 +95,7 @@ class inventory
int worst_item_value(npc* p) const;
bool has_enough_painkiller(int pain) const;
item& most_appropriate_painkiller(int pain);
item& best_for_melee(int skills[num_skill_types]);
item& best_for_melee(player *p);
item& most_loaded_gun();
void rust_iron_items();
@@ -104,7 +104,7 @@ class inventory
int volume() const;
int max_active_item_charges(itype_id id) const;
void dump(std::vector<item>& dest) const; // dumps contents into dest (does not delete contents)
void dump(std::vector<item*>& dest); // dumps contents into dest (does not delete contents)
// vector rather than list because it's NOT an item stack
std::vector<item*> active_items();
+283 -82
View File
@@ -1,5 +1,6 @@
#include "game.h"
#include "output.h"
#include "uistate.h"
#include "keypress.h"
#include <string>
#include <vector>
@@ -142,7 +143,7 @@ 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.
int ch = (int)'.';
int start = 0, cur_it;
int start = 0, cur_it, max_it;
u.inv.sort();
u.inv.restack(&u);
invslice slice = u.inv.slice(0, u.inv.size());
@@ -150,8 +151,13 @@ char game::inv(std::string title)
print_inv_statics(this, w_inv, title, null_vector);
// Gun, ammo, weapon, armor, food, tool, book, other
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 {
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, " ");
@@ -159,14 +165,17 @@ char game::inv(std::string title)
if (start < 0)
start = 0;
mvwprintw(w_inv, maxitems + 4, 0, " ");
if ( selected > -1 ) selected = start; // oy, the cheese
}
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, " ");
@@ -179,8 +188,9 @@ char game::inv(std::string title)
}
if (cur_it < slice.size()) {
item& it = slice[cur_it]->front();
mvwputch (w_inv, cur_line, 0, c_white, it.invlet);
mvwprintz(w_inv, cur_line, 1, it.color_in_inventory(&u), " %s",
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());
@@ -189,6 +199,7 @@ char game::inv(std::string title)
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++;
}
@@ -197,8 +208,44 @@ 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 == '>' || ch == KEY_NPAGE || ch == KEY_PPAGE );
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();
@@ -214,7 +261,7 @@ char game::inv_type(std::string title, item_cat inv_item_type)
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.
int ch = (int)'.';
int start = 0, cur_it;
int start = 0, cur_it, max_it;
u.inv.sort();
u.inv.restack(&u);
std::vector<char> null_vector;
@@ -227,6 +274,8 @@ char game::inv_type(std::string title, item_cat inv_item_type)
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 == '<' || ch == KEY_PPAGE ) && start > 0) { // Clear lines and shift
for (int i = 1; i < maxitems+4; i++)
@@ -235,14 +284,17 @@ char game::inv_type(std::string title, item_cat inv_item_type)
if (start < 0)
start = 0;
mvwprintw(w_inv, maxitems + 4, 0, " ");
if ( selected > -1 ) selected = start; // oy, the cheese
}
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, " ");
@@ -257,8 +309,9 @@ char game::inv_type(std::string title, item_cat inv_item_type)
if (cur_it < slice.size())
{
item& it = slice[cur_it]->front();
mvwputch (w_inv, cur_line, 0, c_white, it.invlet);
mvwprintz(w_inv, cur_line, 1, it.color_in_inventory(&u), " %s",
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());
@@ -267,7 +320,8 @@ char game::inv_type(std::string title, item_cat inv_item_type)
else if (it.contents.size() == 1 &&
it.contents[0].charges > 0)
wprintw(w_inv, " (%d)", it.contents[0].charges);
cur_line++;
cur_line++;
max_it=cur_it;
}
// cur_line++;
}
@@ -276,8 +330,41 @@ char game::inv_type(std::string title, item_cat 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 == '>' || ch == KEY_NPAGE || ch == KEY_PPAGE );
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();
@@ -290,6 +377,8 @@ std::vector<item> game::multidrop()
u.inv.sort();
u.inv.restack(&u);
WINDOW* w_inv = newwin(((VIEWY < 12) ? 25 : VIEWY*2+1), ((VIEWX < 12) ? 80 : VIEWX*2+56), VIEW_OFFSET_Y, VIEW_OFFSET_X);
int drp_line_width=getmaxx(w_inv)-90;
const std::string drp_line_padding = ( drp_line_width > 1 ? std::string(drp_line_width, ' ') : " ");
const int maxitems = (VIEWY < 12) ? 20 : VIEWY*2-4; // Number of items to show at one time.
std::map<char, int> dropping; // Count of how many we'll drop from each stack
int count = 0; // The current count
@@ -300,9 +389,11 @@ std::vector<item> game::multidrop()
int base_volume = u.volume_carried();
int ch = (int)'.';
int start = 0, cur_it;
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 {
inventory drop_subset = u.inv.subset(dropping);
int new_weight = base_weight - drop_subset.weight();
@@ -311,24 +402,49 @@ std::vector<item> game::multidrop()
new_weight -= u.i_at(weapon_and_armor[i]).weight();
}
print_inv_weight_vol(this, w_inv, new_weight, new_volume);
if (( ch == '<' || ch == KEY_PPAGE ) && 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 == '>' || ch == KEY_NPAGE ) && 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, " ");
}
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]) {
@@ -336,15 +452,19 @@ std::vector<item> game::multidrop()
cur_line++;
}
}
if ( selected < start && selected > -1 ) selected = start;
if (cur_it < stacks.size()) {
item& it = stacks[cur_it]->front();
mvwputch (w_inv, cur_line, 0, c_white, it.invlet);
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[it.invlet] >= (it.count_by_charges() ? it.charges : stacks[cur_it]->size()))
icon = '+';
else if (dropping[it.invlet] > 0)
icon = '#';
nc_color col = (dropping[it.invlet] == 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,
it.tname(this).c_str());
if (stacks[cur_it]->size() > 1)
@@ -354,76 +474,146 @@ std::vector<item> game::multidrop()
else if (it.contents.size() == 1 &&
it.contents[0].charges > 0)
wprintw(w_inv, " (%d)", it.contents[0].charges);
if (icon=='+'||icon=='#') {
mvwprintz(w_inv, drp_line, 90, col, "%c %c %s", it.invlet, icon, it.tname(this).c_str());
if (icon=='+'){
if (stacks[cur_it]->size() > 1)
wprintz(w_inv, col, " [%d]", stacks[cur_it]->size());
if (it.charges > 0)
wprintz(w_inv, col, " (%d)", it.charges);
}
if (icon=='#') {
wprintz(w_inv, col, " {%d}", dropping[it.invlet]);
}
drp_line++;
}
}
cur_line++;
max_it=cur_it;
}
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();
if (ch >= '0'&& ch <= '9') {
*/
ch = getch();
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)) {
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);
} 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 &&
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;
}
}
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;
else if (count >= stacks[index]->size() && !it.count_by_charges())
dropping[it.invlet] = stacks[index]->size();
else
dropping[it.invlet] = count;
count = 0;
}
count = 0;
}
}
}
} while (ch != '\n' && ch != KEY_ESCAPE && ch != ' ');
werase(w_inv);
@@ -448,7 +638,18 @@ std::vector<item> game::multidrop()
}
for (int i = 0; i < weapon_and_armor.size(); i++)
ret.push_back(u.i_rem(weapon_and_armor[i]));
{
if (!u.takeoff(this, weapon_and_armor[i], true))
{
continue;
}
// Item could have been dropped after taking it off
if (&u.inv.item_by_letter(weapon_and_armor[i]) != &u.inv.nullitem)
{
ret.push_back(u.i_rem(weapon_and_armor[i]));
}
}
return ret;
}
+396 -220
View File
File diff suppressed because it is too large Load Diff
+29 -12
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::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);
@@ -70,8 +75,8 @@ public:
//std::string info(bool showtext = false); // Formatted for human viewing
std::string info(bool showtext = false);
std::string info(bool showtext, std::vector<iteminfo> *dump);
char symbol();
nc_color color();
char symbol() const;
nc_color color() const;
int price() const;
bool invlet_is_okay();
@@ -84,7 +89,7 @@ public:
int attack_time();
int damage_bash();
int damage_cut() const;
bool has_flag(item_flag f) const;
bool has_flag(std::string f) const;
bool has_technique(technique_id t, player *p = NULL);
int has_gunmod(itype_id type);
item* active_gunmod();
@@ -95,17 +100,26 @@ public:
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]) const;
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) const;
bool made_of(std::string mat_ident) const;
std::string get_material(int m) const;
bool made_of(phase_id phase) const;
bool conductive(); // Electricity
bool conductive() const; // Electricity
bool flammable() const;
bool destroyed_at_zero_charges();
// Most of the is_whatever() functions call the same function in our itype
bool is_null() const; // True if type is NULL, or points to the null item (id == 0)
@@ -134,7 +148,7 @@ public:
bool is_other() const; // Doesn't belong in other categories
bool is_var_veh_part() const;
bool is_artifact() const;
bool operator<(const item& other) const;
itype_id typeId() const;
@@ -149,15 +163,18 @@ 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.
unsigned item_flags : NUM_ITEM_FLAGS; // generic item specific flags
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!
+36 -96
View File
@@ -34,6 +34,7 @@ void Item_factory::init(){
iuse_function_list["ROYAL_JELLY"] = &iuse::royal_jelly;
iuse_function_list["BANDAGE"] = &iuse::bandage;
iuse_function_list["FIRSTAID"] = &iuse::firstaid;
iuse_function_list["DISINFECTANT"] = &iuse::disinfectant;
iuse_function_list["CAFF"] = &iuse::caff;
iuse_function_list["ALCOHOL"] = &iuse::alcohol;
iuse_function_list["ALCOHOL_WEAK"] = &iuse::alcohol_weak;
@@ -50,6 +51,8 @@ void Item_factory::init(){
iuse_function_list["CRACK"] = &iuse::crack;
iuse_function_list["GRACK"] = &iuse::grack;
iuse_function_list["METH"] = &iuse::meth;
iuse_function_list["VITAMINS"] = &iuse::vitamins;
iuse_function_list["VACCINE"] = &iuse::vaccine;
iuse_function_list["POISON"] = &iuse::poison;
iuse_function_list["HALLU"] = &iuse::hallu;
iuse_function_list["THORAZINE"] = &iuse::thorazine;
@@ -61,7 +64,6 @@ void Item_factory::init(){
iuse_function_list["INHALER"] = &iuse::inhaler;
iuse_function_list["BLECH"] = &iuse::blech;
iuse_function_list["MUTAGEN"] = &iuse::mutagen;
iuse_function_list["MUTAGEN_3"] = &iuse::mutagen_3;
iuse_function_list["PURIFIER"] = &iuse::purifier;
iuse_function_list["MARLOSS"] = &iuse::marloss;
iuse_function_list["DOGFOOD"] = &iuse::dogfood;
@@ -76,6 +78,8 @@ void Item_factory::init(){
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;
@@ -83,6 +87,7 @@ void Item_factory::init(){
iuse_function_list["DIRECTIONAL_ANTENNA"] = &iuse::directional_antenna;
iuse_function_list["DEVAC"] = &iuse::devac;
iuse_function_list["CAUTERIZE_ELEC"] = &iuse::cauterize_elec;
iuse_function_list["SOLDER_WELD"] = &iuse::solder_weld;
iuse_function_list["WATER_PURIFIER"] = &iuse::water_purifier;
iuse_function_list["TWO_WAY_RADIO"] = &iuse::two_way_radio;
iuse_function_list["RADIO_OFF"] = &iuse::radio_off;
@@ -97,6 +102,7 @@ void Item_factory::init(){
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;
@@ -124,6 +130,7 @@ void Item_factory::init(){
iuse_function_list["SMOKEBOMB_ACT"] = &iuse::smokebomb_act;
iuse_function_list["ACIDBOMB"] = &iuse::acidbomb;
iuse_function_list["ACIDBOMB_ACT"] = &iuse::acidbomb_act;
iuse_function_list["ARROW_FLAMABLE"] = &iuse::arrow_flamable;
iuse_function_list["MOLOTOV"] = &iuse::molotov;
iuse_function_list["MOLOTOV_LIT"] = &iuse::molotov_lit;
iuse_function_list["DYNAMITE"] = &iuse::dynamite;
@@ -165,6 +172,7 @@ void Item_factory::init(){
iuse_function_list["LAW"] = &iuse::LAW;
iuse_function_list["HEATPACK"] = &iuse::heatpack;
iuse_function_list["DEJAR"] = &iuse::dejar;
iuse_function_list["RAD_BADGE"] = &iuse::rad_badge;
// MACGUFFINS
iuse_function_list["MCG_NOTE"] = &iuse::mcg_note;
// ARTIFACTS
@@ -173,39 +181,6 @@ void Item_factory::init(){
// See artifact.h for a list
iuse_function_list["ARTIFACT"] = &iuse::artifact;
// ITEM FLAGS
item_flags_list["LIGHT_1"] = mfb(IF_LIGHT_1);
item_flags_list["LIGHT_4"] = mfb(IF_LIGHT_4);
item_flags_list["LIGHT_8"] = mfb(IF_LIGHT_8);
item_flags_list["LIGHT_20"] = mfb(IF_LIGHT_20);
item_flags_list["FIRE"] = mfb(IF_FIRE);
item_flags_list["SPEAR"] = mfb(IF_SPEAR);
item_flags_list["STAB"] = mfb(IF_STAB);
item_flags_list["WRAP"] = mfb(IF_WRAP);
item_flags_list["MESSY"] = mfb(IF_MESSY);
item_flags_list["RELOAD_ONE"] = mfb(IF_RELOAD_ONE);
item_flags_list["STR_RELOAD"] = mfb(IF_STR_RELOAD);
item_flags_list["STR8_DRAW"] = mfb(IF_STR8_DRAW);
item_flags_list["STR10_DRAW"] = mfb(IF_STR10_DRAW);
item_flags_list["USE_UPS"] = mfb(IF_USE_UPS);
item_flags_list["RELOAD_AND_SHOOT"] = mfb(IF_RELOAD_AND_SHOOT);
item_flags_list["FIRE_100"] = mfb(IF_FIRE_100);
item_flags_list["GRENADE"] = mfb(IF_GRENADE);
item_flags_list["CHARGE"] = mfb(IF_CHARGE);
item_flags_list["SHOCK"] = mfb(IF_SHOCK);
item_flags_list["UNARMED_WEAPON"] = mfb(IF_UNARMED_WEAPON);
item_flags_list["NO_UNWIELD"] = mfb(IF_NO_UNWIELD);
item_flags_list["NO_UNLOAD"] = mfb(IF_NO_UNLOAD);
item_flags_list["BACKBLAST"] = mfb(IF_BACKBLAST);
item_flags_list["MODE_AUX"] = mfb(IF_MODE_AUX);
item_flags_list["MODE_BURST"] = mfb(IF_MODE_BURST);
item_flags_list["HOT"] = mfb(IF_HOT);
item_flags_list["EATEN_HOT"] = mfb(IF_EATEN_HOT);
item_flags_list["ROTTEN"] = mfb(IF_ROTTEN);
item_flags_list["VARSIZE"] = mfb(IF_VARSIZE);
item_flags_list["FIT"] = mfb(IF_FIT);
item_flags_list["DOUBLE_AMMO"] = mfb(IF_DOUBLE_AMMO);
// Offensive Techniques
techniques_list["SWEEP"] = mfb(TEC_SWEEP);
techniques_list["PRECISE"] = mfb(TEC_PRECISE);
@@ -262,9 +237,11 @@ void Item_factory::init(){
ammo_effects_list["FLAME"] = mfb(AMMO_FLAME);
ammo_effects_list["INCENDIARY"] = mfb(AMMO_INCENDIARY);
ammo_effects_list["IGNITE"] = mfb(AMMO_IGNITE);
ammo_effects_list["EXPLOSIVE"] = mfb(AMMO_EXPLOSIVE);
ammo_effects_list["FRAG"] = mfb(AMMO_FRAG);
ammo_effects_list["NAPALM"] = mfb(AMMO_NAPALM);
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);
@@ -338,7 +315,7 @@ const Item_tag Item_factory::id_from(const Item_tag group_tag){
item Item_factory::create(Item_tag id, int created_at){
return item(find_template(id),0);
return item(find_template(id), created_at);
}
Item_list Item_factory::create(Item_tag id, int created_at, int quantity){
Item_list new_items;
@@ -379,6 +356,7 @@ void Item_factory::load_item_templates(){
load_item_templates_from("data/raw/items/comestibles.json");
load_item_templates_from("data/raw/items/armor.json");
load_item_templates_from("data/raw/items/books.json");
load_item_templates_from("data/raw/items/archery.json");
load_item_groups_from("data/raw/item_groups.json");
}
@@ -433,8 +411,7 @@ void Item_factory::load_item_templates_from(const std::string file_name){
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->techniques = (!entry.has("ammo") ? 0 :
flags_from_json(entry.get("techniques"), "ammo"));
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")
@@ -507,8 +484,8 @@ void Item_factory::load_item_templates_from(const std::string file_name){
it_armor* armor_template = new it_armor();
armor_template->encumber = entry.get("encumberance").as_int();
armor_template->dmg_resist = entry.get("bashing_protection").as_int();
armor_template->cut_resist = entry.get("cutting_protection").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();
@@ -551,8 +528,8 @@ void Item_factory::load_item_templates_from(const std::string file_name){
if(entry.has("material")){
set_material_from_json(new_id, entry.get("material"));
} else {
new_item_template->m1 = MNULL;
new_item_template->m2 = MNULL;
new_item_template->m1 = "null";
new_item_template->m2 = "null";
}
Item_tag new_phase = "solid";
if(entry.has("phase")){
@@ -565,8 +542,19 @@ void Item_factory::load_item_templates_from(const std::string file_name){
new_item_template->melee_cut = entry.get("cutting").as_int();
new_item_template->m_to_hit = entry.get("to_hit").as_int();
new_item_template->item_flags = (!entry.has("flags") ? 0 :
flags_from_json(entry.get("flags")));
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 :
@@ -801,8 +789,7 @@ Use_function Item_factory::use_from_string(std::string function_name){
void Item_factory::set_flag_by_string(unsigned& cur_flags, std::string new_flag, std::string flag_type)
{
//Use the standard item flag list unless a valid alternative is provided
std::map<Item_tag, unsigned> flag_map = item_flags_list;
std::map<Item_tag, unsigned> flag_map;
if(flag_type=="ammo"){
flag_map = ammo_flags_list;
} else if(flag_type=="techniques"){
@@ -872,7 +859,7 @@ bool Item_factory::is_mod_target(catajson targets, std::string weapon){
void Item_factory::set_material_from_json(Item_tag new_id, catajson mat_list){
//If the value isn't found, just return a group of null materials
material material_list[2] = {MNULL, MNULL};
std::string material_list[2] = {"null", "null"};
if (mat_list.is_array())
{
@@ -880,12 +867,12 @@ void Item_factory::set_material_from_json(Item_tag new_id, catajson mat_list){
{
debugmsg("Too many materials provided for item %s", new_id.c_str());
}
material_list[0] = material_from_tag(new_id, mat_list.get(0).as_string());
material_list[1] = material_from_tag(new_id, mat_list.get(1).as_string());
material_list[0] = mat_list.get(0).as_string();
material_list[1] = mat_list.get(1).as_string();
}
else
{
material_list[0] = material_from_tag(new_id, mat_list.as_string());
material_list[0] = mat_list.as_string();
}
itype* temp = find_template(new_id);
@@ -907,50 +894,3 @@ phase_id Item_factory::phase_from_tag(Item_tag name){
return PNULL;
}
};
material Item_factory::material_from_tag(Item_tag new_id, Item_tag name){
// Map the valid input tags to a valid material
// This should clearly be some sort of map, stored somewhere
// ...unless it can get replaced entirely, which would be nice.
// For now, though, that isn't the problem I'm solving.
if(name == "VEGGY"){
return VEGGY;
} else if(name == "FLESH"){
return FLESH;
} else if(name == "POWDER"){
return POWDER;
} else if(name == "HFLESH"){
return HFLESH;
} else if(name == "COTTON"){
return COTTON;
} else if(name == "WOOL"){
return WOOL;
} else if(name == "LEATHER"){
return LEATHER;
} else if(name == "KEVLAR"){
return KEVLAR;
} else if(name == "FUR"){
return FUR;
} else if(name == "STONE"){
return STONE;
} else if(name == "PAPER"){
return PAPER;
} else if(name == "WOOD"){
return WOOD;
} else if(name == "PLASTIC"){
return PLASTIC;
} else if(name == "GLASS"){
return GLASS;
} else if(name == "IRON"){
return IRON;
} else if(name == "STEEL"){
return STEEL;
} else if(name == "SILVER"){
return SILVER;
} else if(name == "NULL"){
return MNULL;
} else {
return MNULL;
}
}
+4 -7
View File
@@ -1,9 +1,6 @@
#ifndef _ITEM_FACTORY_H_
#define _ITEM_FACTORY_H_
#include <string>
#include <vector>
#include <map>
#include "game.h"
#include "itype.h"
#include "item.h"
@@ -11,7 +8,10 @@
#include "picojson.h"
#include "catajson.h"
#include "item_group.h"
#include "iuse.h"
#include "iuse.h"
#include <string>
#include <vector>
#include <map>
typedef std::string Item_tag;
typedef std::vector<item> Item_list;
@@ -59,7 +59,6 @@ private:
unsigned flags_from_json(catajson flags, std::string flag_type="");
void set_material_from_json(Item_tag new_id, catajson mats);
bool is_mod_target(catajson targets, std::string weapon);
material material_from_tag(Item_tag new_id, Item_tag index);
phase_id phase_from_tag(Item_tag name);
ammotype ammo_from_string(std::string ammo);
@@ -71,8 +70,6 @@ private:
//iuse stuff
std::map<Item_tag, Use_function> iuse_function_list;
//flags stuff
std::map<Item_tag, unsigned> item_flags_list;
//techniques stuff
std::map<Item_tag, unsigned> techniques_list;
//ammo stuff
+101 -130
View File
@@ -1,9 +1,6 @@
#ifndef _ITYPE_H_
#define _ITYPE_H_
#include <string>
#include <vector>
#include <sstream>
#include "color.h"
#include "enums.h"
#include "iuse.h"
@@ -13,6 +10,12 @@
#include "bionics.h"
#include "artifact.h"
#include "picojson.h"
#include "rng.h"
#include "material.h"
#include <string>
#include <vector>
#include <sstream>
#include <set>
// mfb(n) converts a flag to its appropriate position in covers's bitfield
#ifndef mfb
@@ -71,67 +74,14 @@ SW_DATA,
NUM_SOFTWARE_TYPES
};
enum item_flag {
IF_NULL,
IF_LIGHT_1, // Provides 1 tile of light
IF_LIGHT_4, // Provides 4 tiles of light
IF_LIGHT_8, // Provides 8 tiles of light
IF_LIGHT_20, // Provides 20 tiles of light
IF_FIRE, // Chance to set fire to tiles/enemies
IF_SPEAR, // Cutting damage is actually a piercing attack
IF_STAB, // This weapon *can* pierce, but also has normal cutting
IF_WRAP, // Can wrap around your target, costing you and them movement
IF_MESSY, // Splatters blood, etc.
IF_RELOAD_ONE, // Reload cartridge by cartridge (e.g. most shotguns)
IF_STR_RELOAD, // Reloading time is reduced by Strength * 20
IF_STR8_DRAW, // Requires strength 8 to draw
IF_STR10_DRAW, // Requires strength 10 to draw
IF_USE_UPS, // Draws power from a UPS
IF_RELOAD_AND_SHOOT, // Reloading and shooting is one action
IF_FIRE_100, // Fires 100 rounds at once! (e.g. flamethrower)
IF_GRENADE, // NPCs treat this as a grenade
IF_CHARGE, // For guns; charges up slowly
IF_SHOCK, // Stuns and damages enemies, powers up shockers.
IF_UNARMED_WEAPON, // Counts as an unarmed weapon
IF_NO_UNWIELD, // Impossible to unwield, e.g. bionic claws
IF_NO_UNLOAD, // Cannot be unloaded. For Fusion rifles and other ammo generating weapons.
IF_BACKBLAST, // Creates a backblast of smoke.
// Weapon mode flags
IF_MODE_AUX, // A gunmod with a firing mode
IF_MODE_BURST, // A burst of attacks
// Food status flags
IF_HOT, // hot food
IF_EATEN_HOT, // food meant to be eaten hot
IF_ROTTEN, // rotten food
// Clothing flags
IF_VARSIZE, // comes in variable sizes (item type flag)
IF_FIT, // clothing fits player (item specific flag)
//Book Flags
/*IF_READ_SKILLBOOK,
IF_READ_FUNBOOK,
*/
// Item mod flags
// has double the normal ammo capacity (item specific flag), only works with tools at the moment
// need to tweak a few things to make it work with guns as well
IF_DOUBLE_AMMO,
NUM_ITEM_FLAGS
};
enum ammo_effect {
AMMO_FLAME, // Sets fire to terrain and monsters
AMMO_INCENDIARY, // Sparks explosive terrain
AMMO_IGNITE, // Sets fire to some monsters
AMMO_EXPLOSIVE, // Small explosion
AMMO_FRAG, // Frag explosion
AMMO_NAPALM, // Firey explosion
AMMO_ACIDBOMB, // Acid bomb ammo
AMMO_EXPLOSIVE_BIG, // Big explosion!
AMMO_TEARGAS, // Teargas burst
AMMO_SMOKE, // Smoke burst
@@ -213,8 +163,8 @@ struct itype
char sym; // Symbol on the map
nc_color color; // Color on the map (color.h)
material m1; // Main material
material m2; // Secondary material -- MNULL if made of just 1 thing
std::string m1; // Main material
std::string m2; // Secondary material -- "null" if made of just 1 thing
phase_id phase; //e.g. solid, liquid, gas
@@ -227,7 +177,7 @@ struct itype
signed char melee_cut; // Cutting damage in melee
signed char m_to_hit; // To-hit bonus for melee combat; -5 to 5 is reasonable
unsigned item_flags : NUM_ITEM_FLAGS;
std::set<std::string> item_tags;
unsigned techniques : NUM_TECHNIQUES;
virtual bool is_food() { return false; }
@@ -251,6 +201,8 @@ struct itype
virtual bool count_by_charges() { return false; }
virtual picojson::value save_data() { return picojson::value(); }
std::string dmg_adj(int dam) { return material_type::find_material(m1)->dmg_adj(dam); }
void (iuse::*use)(game *, player *, item *, bool);// Special effects of use
itype() {
@@ -259,24 +211,23 @@ struct itype
name = "none";
sym = '#';
color = c_white;
m1 = MNULL;
m2 = MNULL;
m1 = "null";
m2 = "null";
phase = SOLID;
volume = 0;
weight = 0;
melee_dam = 0;
m_to_hit = 0;
item_flags = 0;
techniques = 0;
use = &iuse::none;
}
itype(std::string pid, unsigned char prarity, unsigned int pprice,
std::string pname, std::string pdes,
char psym, nc_color pcolor, material pm1, material pm2, phase_id pphase,
char psym, nc_color pcolor, std::string pm1, std::string pm2, phase_id pphase,
unsigned short pvolume, unsigned short pweight,
signed char pmelee_dam, signed char pmelee_cut, signed char pm_to_hit,
unsigned pitem_flags, unsigned ptechniques = 0) {
unsigned ptechniques = 0) {
id = pid;
rarity = prarity;
price = pprice;
@@ -292,7 +243,6 @@ struct itype
melee_dam = pmelee_dam;
melee_cut = pmelee_cut;
m_to_hit = pm_to_hit;
item_flags = pitem_flags;
techniques = ptechniques;
use = &iuse::none;
}
@@ -331,18 +281,18 @@ struct it_comest : public itype
it_comest(std::string pid, unsigned char prarity, unsigned int pprice,
std::string pname, std::string pdes,
char psym, nc_color pcolor, material pm1, phase_id pphase,
char psym, nc_color pcolor, std::string pm1, phase_id pphase,
unsigned short pvolume, unsigned short pweight,
signed char pmelee_dam, signed char pmelee_cut,
signed char pm_to_hit, unsigned pitem_flags,
signed char pm_to_hit,
signed char pquench, unsigned char pnutr, signed char pspoils,
signed char pstim, signed char phealthy, unsigned char paddict,
unsigned char pcharges, signed char pfun, itype_id pcontainer,
itype_id ptool, void (iuse::*puse)(game *, player *, item *, bool),
add_type padd, std::string pcomesttype)
:itype(pid, prarity, pprice, pname, pdes, psym, pcolor, pm1, MNULL, pphase,
pvolume, pweight, pmelee_dam, pmelee_cut, pm_to_hit, pitem_flags)
:itype(pid, prarity, pprice, pname, pdes, psym, pcolor, pm1, "null", pphase,
pvolume, pweight, pmelee_dam, pmelee_cut, pm_to_hit)
{
quench = pquench;
nutr = pnutr;
@@ -357,7 +307,6 @@ struct it_comest : public itype
use = puse;
add = padd;
comesttype = pcomesttype;
item_flags = pitem_flags;
}
it_comest() :itype() { };
@@ -372,7 +321,7 @@ struct it_var_veh_part: public itype
it_var_veh_part(std::string pid, unsigned char prarity, unsigned int pprice,
std::string pname, std::string pdes,
char psym, nc_color pcolor, material pm1, material pm2,
char psym, nc_color pcolor, std::string pm1, std::string pm2,
unsigned short pvolume, unsigned short pweight,
signed char pmelee_dam, signed char pmelee_cut, signed char pm_to_hit,
unsigned effects,
@@ -381,7 +330,7 @@ struct it_var_veh_part: public itype
unsigned int big_max,
bigness_property_aspect big_aspect)
:itype(pid, prarity, pprice, pname, pdes, psym, pcolor, pm1, pm2, SOLID,
pvolume, pweight, pmelee_dam, pmelee_cut, pm_to_hit, 0) {
pvolume, pweight, pmelee_dam, pmelee_cut, pm_to_hit) {
min_bigness = big_min;
max_bigness = big_max;
bigness_aspect = big_aspect;
@@ -426,7 +375,7 @@ struct it_ammo : public itype
it_ammo(std::string pid, unsigned char prarity, unsigned int pprice,
std::string pname, std::string pdes,
char psym, nc_color pcolor, material pm1, phase_id pphase,
char psym, nc_color pcolor, std::string pm1, phase_id pphase,
unsigned short pvolume, unsigned short pweight,
signed char pmelee_dam, signed char pmelee_cut, signed char pm_to_hit,
unsigned effects,
@@ -434,7 +383,7 @@ struct it_ammo : public itype
ammotype ptype, unsigned char pdamage, unsigned char ppierce,
signed char paccuracy, unsigned char precoil, unsigned char prange,
unsigned char pcount)
:itype(pid, prarity, pprice, pname, pdes, psym, pcolor, pm1, MNULL, pphase,
:itype(pid, prarity, pprice, pname, pdes, psym, pcolor, pm1, "null", pphase,
pvolume, pweight, pmelee_dam, pmelee_cut, pm_to_hit, 0) {
type = ptype;
damage = pdamage;
@@ -464,16 +413,15 @@ struct it_gun : public itype
it_gun(std::string pid, unsigned char prarity, unsigned int pprice,
std::string pname, std::string pdes,
char psym, nc_color pcolor, material pm1, material pm2,
char psym, nc_color pcolor, std::string pm1, std::string pm2,
unsigned short pvolume, unsigned short pweight,
signed char pmelee_dam, signed char pmelee_cut, signed char pm_to_hit,
unsigned pitem_flags,
const char *pskill_used, ammotype pammo, signed char pdmg_bonus, signed char prange,
signed char paccuracy, signed char precoil, unsigned char pdurability,
unsigned char pburst, int pclip, int preload_time)
:itype(pid, prarity, pprice, pname, pdes, psym, pcolor, pm1, pm2, SOLID,
pvolume, pweight, pmelee_dam, pmelee_cut, pm_to_hit, pitem_flags) {
pvolume, pweight, pmelee_dam, pmelee_cut, pm_to_hit) {
skill_used = pskill_used?Skill::skill(pskill_used):NULL;
ammo = pammo;
dmg_bonus = pdmg_bonus;
@@ -503,10 +451,10 @@ struct it_gunmod : public itype
it_gunmod(std::string pid, unsigned char prarity, unsigned int pprice,
std::string pname, std::string pdes,
char psym, nc_color pcolor, material pm1, material pm2,
char psym, nc_color pcolor, std::string pm1, std::string pm2,
unsigned short pvolume, unsigned short pweight,
signed char pmelee_dam, signed char pmelee_cut,
signed char pm_to_hit, unsigned pitem_flags,
signed char pm_to_hit,
signed char paccuracy, signed char pdamage, signed char ploudness,
signed char pclip, signed char precoil, signed char pburst,
@@ -514,7 +462,7 @@ struct it_gunmod : public itype
bool shotgun, bool smg, bool rifle)
:itype(pid, prarity, pprice, pname, pdes, psym, pcolor, pm1, pm2, SOLID,
pvolume, pweight, pmelee_dam, pmelee_cut, pm_to_hit, pitem_flags) {
pvolume, pweight, pmelee_dam, pmelee_cut, pm_to_hit) {
accuracy = paccuracy;
damage = pdamage;
loudness = ploudness;
@@ -536,8 +484,8 @@ struct it_armor : public itype
{
unsigned char covers; // Bitfield of enum body_part
signed char encumber;
unsigned char dmg_resist;
unsigned char cut_resist;
unsigned char coverage;
unsigned char thickness;
unsigned char env_resist; // Resistance to environmental effects
signed char warmth;
unsigned char storage;
@@ -548,13 +496,21 @@ struct it_armor : public itype
virtual bool is_power_armor() { return power_armor; }
virtual bool is_artifact() { return false; }
virtual picojson::value save_data() { return picojson::value(); }
std::string bash_dmg_verb() { return m2 == "null" || !one_in(3) ?
material_type::find_material(m1)->bash_dmg_verb() :
material_type::find_material(m2)->bash_dmg_verb();
}
std::string cut_dmg_verb() { return m2 == "null" || !one_in(3) ?
material_type::find_material(m1)->cut_dmg_verb() :
material_type::find_material(m2)->cut_dmg_verb();
}
it_armor() : itype()
{
covers = 0;
encumber = 0;
dmg_resist = 0;
cut_resist = 0;
coverage = 0;
thickness = 0;
env_resist = 0;
warmth = 0;
storage = 0;
@@ -563,21 +519,20 @@ struct it_armor : public itype
it_armor(itype_id pid, unsigned char prarity, unsigned int pprice,
std::string pname, std::string pdes,
char psym, nc_color pcolor, material pm1, material pm2,
char psym, nc_color pcolor, std::string pm1, std::string pm2,
unsigned short pvolume, unsigned short pweight,
signed char pmelee_dam, signed char pmelee_cut, signed char pm_to_hit,
unsigned pitem_flags,
unsigned char pcovers, signed char pencumber,
unsigned char pdmg_resist, unsigned char pcut_resist,
unsigned char pcoverage, unsigned char pthickness,
unsigned char penv_resist, signed char pwarmth,
unsigned char pstorage, bool ppower_armor = false)
:itype(pid, prarity, pprice, pname, pdes, psym, pcolor, pm1, pm2, SOLID,
pvolume, pweight, pmelee_dam, pmelee_cut, pm_to_hit, pitem_flags) {
pvolume, pweight, pmelee_dam, pmelee_cut, pm_to_hit) {
covers = pcovers;
encumber = pencumber;
dmg_resist = pdmg_resist;
cut_resist = pcut_resist;
coverage = pcoverage;
thickness = pthickness;
env_resist = penv_resist;
warmth = pwarmth;
storage = pstorage;
@@ -601,15 +556,14 @@ struct it_book : public itype
it_book() {}
it_book(std::string pid, unsigned char prarity, unsigned int pprice,
std::string pname, std::string pdes,
char psym, nc_color pcolor, material pm1, material pm2,
char psym, nc_color pcolor, std::string pm1, std::string pm2,
unsigned short pvolume, unsigned short pweight,
signed char pmelee_dam, signed char pmelee_cut, signed char pm_to_hit,
unsigned pitem_flags,
const char *ptype, unsigned char plevel, unsigned char preq,
signed char pfun, unsigned char pintel, unsigned char ptime)
:itype(pid, prarity, pprice, pname, pdes, psym, pcolor, pm1, pm2, SOLID,
pvolume, pweight, pmelee_dam, pmelee_cut, pm_to_hit, pitem_flags) {
pvolume, pweight, pmelee_dam, pmelee_cut, pm_to_hit) {
type = ptype?Skill::skill(ptype):NULL;
level = plevel;
req = preq;
@@ -633,14 +587,14 @@ struct it_container : public itype
virtual bool is_container() { return true; }
it_container(std::string pid, unsigned char prarity, unsigned int pprice,
std::string pname, std::string pdes,
char psym, nc_color pcolor, material pm1, material pm2,
char psym, nc_color pcolor, std::string pm1, std::string pm2,
unsigned short pvolume, unsigned short pweight,
signed char pmelee_dam, signed char pmelee_cut,
signed char pm_to_hit, unsigned pitem_flags,
signed char pm_to_hit,
unsigned char pcontains, unsigned pflags)
:itype(pid, prarity, pprice, pname, pdes, psym, pcolor, pm1, pm2, SOLID,
pvolume, pweight, pmelee_dam, pmelee_cut, pm_to_hit, pitem_flags) {
pvolume, pweight, pmelee_dam, pmelee_cut, pm_to_hit) {
contains = pcontains;
flags = pflags;
}
@@ -672,17 +626,16 @@ struct it_tool : public itype
it_tool(std::string pid, unsigned char prarity, unsigned int pprice,
std::string pname, std::string pdes,
char psym, nc_color pcolor, material pm1, material pm2, phase_id pphase,
char psym, nc_color pcolor, std::string pm1, std::string pm2, phase_id pphase,
unsigned short pvolume, unsigned short pweight,
signed char pmelee_dam, signed char pmelee_cut, signed char pm_to_hit,
unsigned pitem_flags,
unsigned int pmax_charges, unsigned int pdef_charges,
unsigned char pcharges_per_use, unsigned char pturns_per_charge,
ammotype pammo, itype_id prevert_to,
void (iuse::*puse)(game *, player *, item *, bool))
:itype(pid, prarity, pprice, pname, pdes, psym, pcolor, pm1, pm2, pphase,
pvolume, pweight, pmelee_dam, pmelee_cut, pm_to_hit, pitem_flags) {
pvolume, pweight, pmelee_dam, pmelee_cut, pm_to_hit) {
max_charges = pmax_charges;
def_charges = pdef_charges;
ammo = pammo;
@@ -702,14 +655,14 @@ struct it_bionic : public itype
it_bionic(std::string pid, unsigned char prarity, unsigned int pprice,
std::string pname, std::string pdes,
char psym, nc_color pcolor, material pm1, material pm2,
char psym, nc_color pcolor, std::string pm1, std::string pm2,
unsigned short pvolume, unsigned short pweight,
signed char pmelee_dam, signed char pmelee_cut,
signed char pm_to_hit, unsigned pitem_flags,
signed char pm_to_hit,
int pdifficulty)
:itype(pid, prarity, pprice, pname, pdes, psym, pcolor, pm1, pm2, SOLID,
pvolume, pweight, pmelee_dam, pmelee_cut, pm_to_hit, pitem_flags) {
pvolume, pweight, pmelee_dam, pmelee_cut, pm_to_hit) {
difficulty = pdifficulty;
options.push_back(id);
}
@@ -723,15 +676,15 @@ struct it_macguffin : public itype
it_macguffin(std::string pid, unsigned char prarity, unsigned int pprice,
std::string pname, std::string pdes,
char psym, nc_color pcolor, material pm1, material pm2,
char psym, nc_color pcolor, std::string pm1, std::string pm2,
unsigned short pvolume, unsigned short pweight,
signed char pmelee_dam, signed char pmelee_cut,
signed char pm_to_hit, unsigned pitem_flags,
signed char pm_to_hit,
bool preadable,
void (iuse::*puse)(game *, player *, item *, bool))
:itype(pid, prarity, pprice, pname, pdes, psym, pcolor, pm1, pm2, SOLID,
pvolume, pweight, pmelee_dam, pmelee_cut, pm_to_hit, pitem_flags) {
pvolume, pweight, pmelee_dam, pmelee_cut, pm_to_hit) {
readable = preadable;
use = puse;
}
@@ -746,14 +699,14 @@ struct it_software : public itype
it_software(std::string pid, unsigned char prarity, unsigned int pprice,
std::string pname, std::string pdes,
char psym, nc_color pcolor, material pm1, material pm2,
char psym, nc_color pcolor, std::string pm1, std::string pm2,
unsigned short pvolume, unsigned short pweight,
signed char pmelee_dam, signed char pmelee_cut,
signed char pm_to_hit, unsigned pitem_flags,
signed char pm_to_hit,
software_type pswtype, int ppower)
:itype(pid, prarity, pprice, pname, pdes, psym, pcolor, pm1, pm2, SOLID,
pvolume, pweight, pmelee_dam, pmelee_cut, pm_to_hit, pitem_flags) {
pvolume, pweight, pmelee_dam, pmelee_cut, pm_to_hit) {
swtype = pswtype;
power = ppower;
}
@@ -767,13 +720,13 @@ struct it_style : public itype
it_style(std::string pid, unsigned char prarity, unsigned int pprice,
std::string pname, std::string pdes,
char psym, nc_color pcolor, material pm1, material pm2,
char psym, nc_color pcolor, std::string pm1, std::string pm2,
unsigned char pvolume, unsigned char pweight,
signed char pmelee_dam, signed char pmelee_cut,
signed char pm_to_hit, unsigned pitem_flags)
signed char pm_to_hit)
:itype(pid, prarity, pprice, pname, pdes, psym, pcolor, pm1, pm2, SOLID,
pvolume, pweight, pmelee_dam, pmelee_cut, pm_to_hit, pitem_flags) { }
pvolume, pweight, pmelee_dam, pmelee_cut, pm_to_hit) { }
};
struct it_stationary : public itype
@@ -784,14 +737,14 @@ struct it_stationary : public itype
it_stationary(std::string pid, unsigned char prarity, unsigned int pprice,
std::string pname, std::string pdes,
char psym, nc_color pcolor, material pm1, material pm2,
char psym, nc_color pcolor, std::string pm1, std::string pm2,
unsigned char pvolume, unsigned char pweight,
signed char pmelee_dam, signed char pmelee_cut,
signed char pm_to_hit, unsigned pitem_flags,
signed char pm_to_hit,
std::string pcategory)
:itype(pid, prarity, pprice, pname, pdes, psym, pcolor, pm1, pm2, SOLID,
pvolume, pweight, pmelee_dam, pmelee_cut, pm_to_hit, pitem_flags)
pvolume, pweight, pmelee_dam, pmelee_cut, pm_to_hit)
{
category = pcategory;
}
@@ -826,7 +779,15 @@ struct it_artifact_tool : public it_tool
data[std::string("melee_dam")] = picojson::value(melee_dam);
data[std::string("melee_cut")] = picojson::value(melee_cut);
data[std::string("m_to_hit")] = picojson::value(m_to_hit);
data[std::string("item_flags")] = picojson::value(item_flags);
std::vector<picojson::value> tags_json;
for(std::set<std::string>::iterator it = item_tags.begin();
it != item_tags.end(); ++it)
{
tags_json.push_back(picojson::value(*it));
}
data[std::string("item_flags")] = picojson::value(tags_json);
data[std::string("techniques")] = picojson::value(techniques);
// tool data
@@ -882,10 +843,10 @@ struct it_artifact_tool : public it_tool
};
it_artifact_tool(std::string pid, unsigned int pprice, std::string pname,
std::string pdes, char psym, nc_color pcolor, material pm1,
material pm2, unsigned short pvolume, unsigned short pweight,
std::string pdes, char psym, nc_color pcolor, std::string pm1,
std::string pm2, unsigned short pvolume, unsigned short pweight,
signed char pmelee_dam, signed char pmelee_cut,
signed char pm_to_hit, unsigned pitem_flags,
signed char pm_to_hit, std::set<std::string> pitem_tags,
unsigned int pmax_charges, unsigned int pdef_charges,
unsigned char pcharges_per_use,
@@ -893,10 +854,11 @@ struct it_artifact_tool : public it_tool
ammotype pammo, itype_id prevert_to)
:it_tool(pid, 0, pprice, pname, pdes, psym, pcolor, pm1, pm2, SOLID,
pvolume, pweight, pmelee_dam, pmelee_cut, pm_to_hit, pitem_flags,
pvolume, pweight, pmelee_dam, pmelee_cut, pm_to_hit,
pmax_charges, pdef_charges, pcharges_per_use, pturns_per_charge,
pammo, prevert_to, &iuse::artifact)
{
item_tags = pitem_tags;
artifact_itype_ids.push_back(pid);
};
};
@@ -928,14 +890,22 @@ struct it_artifact_armor : public it_armor
data[std::string("melee_dam")] = picojson::value(melee_dam);
data[std::string("melee_cut")] = picojson::value(melee_cut);
data[std::string("m_to_hit")] = picojson::value(m_to_hit);
data[std::string("item_flags")] = picojson::value(item_flags);
std::vector<picojson::value> tags_json;
for(std::set<std::string>::iterator it = item_tags.begin();
it != item_tags.end(); ++it)
{
tags_json.push_back(picojson::value(*it));
}
data[std::string("item_flags")] = picojson::value(tags_json);
data[std::string("techniques")] = picojson::value(techniques);
// armor data
data[std::string("covers")] = picojson::value(covers);
data[std::string("encumber")] = picojson::value(encumber);
data[std::string("dmg_resist")] = picojson::value(dmg_resist);
data[std::string("cut_resist")] = picojson::value(cut_resist);
data[std::string("coverage")] = picojson::value(coverage);
data[std::string("material_thickness")] = picojson::value(thickness);
data[std::string("env_resist")] = picojson::value(env_resist);
data[std::string("warmth")] = picojson::value(warmth);
data[std::string("storage")] = picojson::value(storage);
@@ -960,20 +930,21 @@ struct it_artifact_armor : public it_armor
};
it_artifact_armor(std::string pid, unsigned int pprice, std::string pname,
std::string pdes, char psym, nc_color pcolor, material pm1,
material pm2, unsigned short pvolume, unsigned short pweight,
std::string pdes, char psym, nc_color pcolor, std::string pm1,
std::string pm2, unsigned short pvolume, unsigned short pweight,
signed char pmelee_dam, signed char pmelee_cut,
signed char pm_to_hit, unsigned pitem_flags,
signed char pm_to_hit, std::set<std::string> pitem_tags,
unsigned char pcovers, signed char pencumber,
unsigned char pdmg_resist, unsigned char pcut_resist,
unsigned char pcoverage, unsigned char pthickness,
unsigned char penv_resist, signed char pwarmth,
unsigned char pstorage)
:it_armor(pid, 0, pprice, pname, pdes, psym, pcolor, pm1, pm2,
pvolume, pweight, pmelee_dam, pmelee_cut, pm_to_hit, pitem_flags,
pcovers, pencumber, pdmg_resist, pcut_resist, penv_resist, pwarmth,
pvolume, pweight, pmelee_dam, pmelee_cut, pm_to_hit,
pcovers, pencumber, pcoverage, pthickness, penv_resist, pwarmth,
pstorage)
{
item_tags = pitem_tags;
artifact_itype_ids.push_back(pid);
};
};
+48 -337
View File
@@ -34,71 +34,26 @@ void game::init_itypes ()
{
// First, the null object. NOT REALLY AN OBJECT AT ALL. More of a concept.
itypes["null"]=
new itype("null", 0, 0, "none", "", '#', c_white, MNULL, MNULL, PNULL, 0, 0, 0, 0, 0, 0);
new itype("null", 0, 0, "none", "", '#', c_white, "null", "null", PNULL, 0, 0, 0, 0, 0, 0);
// Corpse - a special item
itypes["corpse"]=
new itype("corpse", 0, 0, "corpse", "A dead body.", '%', c_white, MNULL, MNULL, PNULL, 0, 0,
new itype("corpse", 0, 0, "corpse", "A dead body.", '%', c_white, "null", "null", PNULL, 0, 0,
0, 0, 1, 0);
// Fire - only appears in crafting recipes
itypes["fire"]=
new itype("fire", 0, 0, "nearby fire",
"Some fire - if you are reading this it's a bug! (itypdef:fire)",
'$', c_red, MNULL, MNULL, PNULL, 0, 0, 0, 0, 0, 0);
'$', c_red, "null", "null", PNULL, 0, 0, 0, 0, 0, 0);
// Integrated toolset - ditto
itypes["toolset"]=
new itype("toolset", 0, 0, "integrated toolset",
"A fake item. If you are reading this it's a bug! (itypdef:toolset)",
'$', c_red, MNULL, MNULL, PNULL, 0, 0, 0, 0, 0, 0);
'$', c_red, "null", "null", PNULL, 0, 0, 0, 0, 0, 0);
// For smoking crack or meth
itypes["apparatus"]=
new itype("apparatus", 0, 0, "something to smoke that from, and a lighter",
"A fake item. If you are reading this it's a bug! (itypdef:apparatus)",
'$', c_red, MNULL, MNULL, PNULL, 0, 0, 0, 0, 0, 0);
// Drinks
// Stim should be -8 to 8.
// quench MAY be less than zero--salt water and liquor make you thirstier.
// Thirst goes up by 1 every 5 minutes; so a quench of 12 lasts for 1 hour
// Any foods with a nutrition of lower than 5 will never prompt a 'You are full, force yourself to eat that?' message
#define DRINK(id, name,rarity,price,color,container,quench,nutr,spoils,stim,\
healthy,addict,charges,fun,use_func,addict_func,des, item_flags) \
itypes[id] = new it_comest(id,rarity,price,name,des,'~',\
color,MNULL,LIQUID,2,1,0,0,0,item_flags,quench,nutr,spoils,stim,healthy,addict,charges,\
fun,container,"null",use_func,addict_func,"DRINK");
#define FOOD(id, name, rarity,price,color,mat1,container,volume,weight,quench,\
nutr,spoils,stim,healthy,addict,charges,fun,use_func,addict_func,des, item_flags) \
itypes[id]=new it_comest(id,rarity,price,name,des,'%',\
color,mat1,SOLID,volume,weight,0,0,0,item_flags, quench,nutr,spoils,stim,healthy,addict,charges,\
fun,container,"null",use_func,addict_func,"FOOD");
// FOOD
// MEDS
#define MED(id, name,rarity,price,color,tool,mat,stim,healthy,addict,\
charges,fun,use_func,addict_func,des) \
itypes[id]=new it_comest(id,rarity,price,name,des,'!',\
color,mat,SOLID,1,1,0,0,0,0,0,0,0,stim,healthy,addict,charges,\
fun,"null",tool,use_func,addict_func,"MED");
/*MED("grack", "Grack Cocaine", 8,420, c_white, "apparatus",
POWDER, 200, -2, 80, 4, 50,&iuse::grack, ADD_CRACK, "\
Grack Cocaine, the strongest substance known to the multiverse\n\
this potent substance is refined from the sweat of the legendary\n\
gracken");
*/
// MELEE WEAPONS
// Only use secondary material if it will have a major impact.
// dam is a somewhat rigid bonus--anything above 30, tops, is ridiculous
// cut is even MORE rigid, and should be kept lower still
// to_hit (affects chances of hitting) should be kept small, -5 to +5
// Note that do-nothing objects (e.g. superglue) belong here too!
#define MELEE(id, name,rarity,price,sym,color,mat1,mat2,volume,wgt,dam,cut,to_hit,\
flags, des)\
itypes[id]=new itype(id,rarity,price,name,des,sym,\
color,mat1,mat2,SOLID,volume,wgt,dam,cut,to_hit,flags);
'$', c_red, "null", "null", PNULL, 0, 0, 0, 0, 0, 0);
#define VAR_VEH_PART(id, name,rarity,price,sym,color,mat1,mat2,volume,wgt,dam,cut,to_hit,\
flags, bigmin, bigmax, bigaspect, des)\
@@ -107,78 +62,65 @@ color,mat1,mat2,volume,wgt,dam,cut,to_hit,flags, bigmin, bigmax, bigaspect)
//"wheel", "wheel_wide", "wheel_bicycle", "wheel_motorbike", "wheel_small",
// NAME RAR PRC SYM COLOR MAT1 MAT2
VAR_VEH_PART("wheel", "wheel", 10, 100, ']', c_dkgray, STEEL, PLASTIC,
VAR_VEH_PART("wheel", "wheel", 10, 100, ']', c_dkgray, "steel", "plastic",
// VOL WGT DAM CUT HIT FLAGS BIGNESS_MIN BIGNESS_MAX BIGNESS_ASPECT
40, 140, 12, 0, -1, 0, 13, 20, BIGNESS_WHEEL_DIAMETER, "\
A car wheel");
// NAME RAR PRC SYM COLOR MAT1 MAT2
VAR_VEH_PART("wheel_wide", "wide wheel", 4, 340, ']', c_dkgray, STEEL, PLASTIC,
VAR_VEH_PART("wheel_wide", "wide wheel", 4, 340, ']', c_dkgray, "steel", "plastic",
// VOL WGT DAM CUT HIT FLAGS BIGNESS_MIN BIGNESS_MAX ASPECT
70, 260, 17, 0, -1, 0, 17, 36, BIGNESS_WHEEL_DIAMETER, "\
A wide wheel. \\o/ This wide.");
// NAME RAR PRC SYM COLOR MAT1 MAT2
VAR_VEH_PART("wheel_bicycle", "bicycle wheel", 18, 40, ']', c_dkgray, STEEL, PLASTIC,
VAR_VEH_PART("wheel_bicycle", "bicycle wheel", 18, 40, ']', c_dkgray, "steel", "plastic",
// VOL WGT DAM CUT HIT FLAGS BIGNESS_MIN BIGNESS_MAX ASPECT
28, 45, 8, 0, -1, 0, 9, 18, BIGNESS_WHEEL_DIAMETER, "\
A bicycle wheel");
// NAME RAR PRC SYM COLOR MAT1 MAT2
VAR_VEH_PART("wheel_motorbike", "motorbike wheel", 13, 140, ']', c_dkgray, STEEL, PLASTIC,
VAR_VEH_PART("wheel_motorbike", "motorbike wheel", 13, 140, ']', c_dkgray, "steel", "plastic",
// VOL WGT DAM CUT HIT FLAGS BIGNESS_MIN BIGNESS_MAX ASPECT
33, 85, 10, 0, -1, 0, 9, 14, BIGNESS_WHEEL_DIAMETER, "\
A motorbike wheel");
// NAME RAR PRC SYM COLOR MAT1 MAT2
VAR_VEH_PART("wheel_small", "small wheel", 5, 140, ']', c_dkgray, STEEL, PLASTIC,
VAR_VEH_PART("wheel_small", "small wheel", 5, 140, ']', c_dkgray, "steel", "plastic",
// VOL WGT DAM CUT HIT FLAGS BIGNESS_MIN BIGNESS_MAX ASPECT
9, 42, 10, 0, -1, 0, 6, 14, BIGNESS_WHEEL_DIAMETER, "\
A pretty small wheel. Probably from one of those segway things.\
It is not very menacing.");
// NAME RAR PRC SYM COLOR MAT1 MAT2
VAR_VEH_PART("1cyl_combustion", "1-cylinder engine", 3, 100, ':', c_ltcyan, IRON, MNULL,
VAR_VEH_PART("1cyl_combustion", "1-cylinder engine", 3, 100, ':', c_ltcyan, "iron", "null",
// VOL WGT DAM CUT HIT FLAGS 0BIGNESS_MIN BIGNESS_MAX ASPECT
6, 70, 4, 0, -1, 0, 28, 75, BIGNESS_ENGINE_DISPLACEMENT, "\
A single-cylinder 4-stroke combustion engine.");
// NAME RAR PRC SYM COLOR MAT1 MAT2
VAR_VEH_PART("v2_combustion", "V-twin engine", 2, 100, ':', c_ltcyan, IRON, MNULL,
VAR_VEH_PART("v2_combustion", "V-twin engine", 2, 100, ':', c_ltcyan, "iron", "null",
// VOL WGT DAM CUT HIT FLAGS BIGNESS_MIN BIGNESS_MAX ASPECT
6, 70, 4, 0, -1, 0, 65, 260, BIGNESS_ENGINE_DISPLACEMENT, "\
A 2-cylinder 4-stroke combustion engine.");
// NAME RAR PRC SYM COLOR MAT1 MAT2
VAR_VEH_PART("i4_combustion", "Inline-4 engine", 6, 150, ':', c_ltcyan, IRON, MNULL,
VAR_VEH_PART("i4_combustion", "Inline-4 engine", 6, 150, ':', c_ltcyan, "iron", "null",
// VOL WGT DAM CUT HIT FLAGS BIGNESS_MIN BIGNESS_MAX ASPECT
6, 160, 8, 0, -2, 0, 220, 350, BIGNESS_ENGINE_DISPLACEMENT, "\
A small, yet powerful 4-cylinder combustion engine.");
// NAME RAR PRC SYM COLOR MAT1 MAT2
VAR_VEH_PART("v6_combustion", "V6 engine", 3, 180, ':', c_ltcyan, IRON, MNULL,
VAR_VEH_PART("v6_combustion", "V6 engine", 3, 180, ':', c_ltcyan, "iron", "null",
// VOL WGT DAM CUT HIT FLAGS BIGNESS_MIN BIGNESS_MAX ASPECT
14, 400, 12, 0, -3, 0, 250, 520, BIGNESS_ENGINE_DISPLACEMENT, "\
A powerful 6-cylinder combustion engine.");
// NAME RAR PRC SYM COLOR MAT1 MAT2
VAR_VEH_PART("v8_combustion", "V8 engine", 2, 250, ':', c_ltcyan, IRON, MNULL,
VAR_VEH_PART("v8_combustion", "V8 engine", 2, 250, ':', c_ltcyan, "iron", "null",
// VOL WGT DAM CUT HIT FLAGS BIGNESS_MIN BIGNESS_MAX ASPECT
25, 600, 15, 0, -5, 0, 380, 700, BIGNESS_ENGINE_DISPLACEMENT, "\
A large and very powerful 8-cylinder combustion engine.");
// ARMOR
#define ARMOR(id, name, rarity,price,color,mat1,mat2,volume,wgt,dam,to_hit,\
encumber,dmg_resist,cut_resist,env,warmth,storage,covers,des,item_flags)\
itypes[id]=new it_armor(id, rarity,price,name,des,'[',\
color,mat1,mat2,volume,wgt,dam,0,to_hit,item_flags,covers,encumber,dmg_resist,cut_resist,\
env,warmth,storage)
#define POWER_ARMOR(id, name,rarity,price,color,mat1,mat2,volume,wgt,dam,to_hit,\
encumber,dmg_resist,cut_resist,env,warmth,storage,covers,des)\
itypes[id] = new it_armor(id,rarity,price,name,des,'[',\
color,mat1,mat2,volume,wgt,dam,0,to_hit,0,covers,encumber,dmg_resist,cut_resist,\
env,warmth,storage,true)
// AMMUNITION
// Material should be the wrapper--even though shot is made of iron, because
// it can survive a dip in water and be okay, its material here is PLASTIC.
// it can survive a dip in water and be okay, its material here is "plastic".
// dmg is damage done, in an average hit. Note that the average human has
// 80 health. Headshots do 8x damage; vital hits do 2x-4x; glances do 0x-1x.
// Weight and price is per 100 rounds.
@@ -193,13 +135,6 @@ accuracy,recoil,count,des,effects) \
itypes[id]=new it_ammo(id,rarity,price,name,des,'=',\
color,mat,SOLID,volume,wgt,1,0,0,effects,ammo_type,dmg,AP,accuracy,recoil,range,count);
// FUEL
// Fuel is just a special type of ammo; liquid
#define FUEL(id, name,rarity,price,ammo_type,color,dmg,AP,range,accuracy,recoil,\
count,des,effects) \
itypes[id]=new it_ammo(id,rarity,price,name,des,'~',\
color,MNULL,LIQUID,1,1,0,0,0,effects,ammo_type,dmg,AP,accuracy,recoil,range,count)
// GUNS
// ammo_type matches one of the ammo_types above.
// dmg is ADDED to the damage of the corresponding ammo. +/-, should be small.
@@ -209,43 +144,11 @@ color,MNULL,LIQUID,1,1,0,0,0,effects,ammo_type,dmg,AP,accuracy,recoil,range,coun
// clip is how many shots we get before reloading.
#define GUN(id,name,rarity,price,color,mat1,mat2,skill,ammo,volume,wgt,melee_dam,\
to_hit,dmg,range,accuracy,recoil,durability,burst,clip,reload_time,des,flags) \
to_hit,dmg,range,accuracy,recoil,durability,burst,clip,reload_time,des) \
itypes[id]=new it_gun(id,rarity,price,name,des,'(',\
color,mat1,mat2,volume,wgt,melee_dam,0,to_hit,flags,skill,ammo,dmg,range,accuracy,\
color,mat1,mat2,volume,wgt,melee_dam,0,to_hit,skill,ammo,dmg,range,accuracy,\
recoil,durability,burst,clip,reload_time)
// GUN MODS
// Accuracy is inverted from guns; high values are a bonus, low values a penalty
// The clip modification is a percentage of the original clip size.
// The final variable is a bitfield of acceptable ammo types. Using 0 means
// that any ammo type is acceptable (so long as the mod works on the class of
// gun)
#define GUNMOD(id, name, rare, value, color, mat1, mat2, volume, weight, meleedam,\
meleecut, meleehit, acc, damage, loudness, clip, recoil, burst,\
newtype, pistol, shotgun, smg, rifle, a_a_t, des, flags)\
itypes[id]=new it_gunmod(id, rare, value, name, des, ':',\
color, mat1, mat2, volume, weight, meleedam,\
meleecut, meleehit, flags, acc, damage, loudness,\
clip, recoil, burst, newtype, a_a_t, pistol,\
shotgun, smg, rifle)
// BOOKS
// Try to keep colors consistant among types of books.
// TYPE is the skill type required to read, or trained via reading; see skill.h
// LEV is the skill level you can be brought to by this book; if your skill is
// already at LEV or higher, you may enjoy the book but won't learn anything.
// REQ is the skill level required to read this book, at all. If you lack the
// required skill level, you'll waste 10 (?) turns then quit.
// FUN is the fun had by reading;
// INT is an intelligence requirement.
// TIME is the time, in minutes (10 turns), taken to gain the fun/skill bonus.
#define BOOK(id, name,rarity,price,color,mat1,mat2,volume,wgt,melee_dam,to_hit,\
type,level,req,fun,intel,time,des) \
itypes[id]=new it_book(id,rarity,price,name,des,'?',\
color,mat1,mat2,volume,wgt,melee_dam,0,to_hit,0,type,level,req,fun,intel,time)
// NAME RAR PRC COLOR MAT1 MAT2
// CONTAINERS
// These are containers you hold in your hand--ones you wear are _armor_!
// These only have two attributes; contains, which is the volume it holds, and
@@ -260,7 +163,7 @@ color,mat1,mat2,volume,wgt,melee_dam,0,to_hit,0,type,level,req,fun,intel,time)
#define CONT(id, name,rarity,price,color,mat1,mat2,volume,wgt,melee_dam,to_hit,\
contains,flags,des) \
itypes[id]=new it_container(id,rarity,price,name,des,\
')',color,mat1,mat2,volume,wgt,melee_dam,0,to_hit,0,contains,flags)
')',color,mat1,mat2,volume,wgt,melee_dam,0,to_hit,contains,flags)
// NAME RAR PRC COLOR MAT1 MAT2
/* TOOLS
@@ -280,268 +183,75 @@ itypes[id]=new it_container(id,rarity,price,name,des,\
*/
#define TOOL(id, name,rarity,price,sym,color,mat1,mat2,volume,wgt,melee_dam,\
melee_cut,to_hit,max_charge,def_charge,charge_per_use,charge_per_sec,fuel,\
revert,func,flags,des) \
revert,func,des) \
itypes[id]=new it_tool(id,rarity,price,name,des,sym,\
color,mat1,mat2,SOLID,volume,wgt,melee_dam,melee_cut,to_hit,flags,max_charge,\
color,mat1,mat2,SOLID,volume,wgt,melee_dam,melee_cut,to_hit,max_charge,\
def_charge,charge_per_use,charge_per_sec,fuel,revert,func)
// NAME RAR PRC COLOR MAT1 MAT2 VOL WGT DAM CUT HIT
GUNMOD("suppressor", "suppressor", 15, 480, c_dkgray, STEEL, PLASTIC, 2, 1, 3, 0, 2,
// ACC DAM NOI CLP REC BST NEWTYPE, PISTOL SHOT SMG RIFLE
-1, -4,-25, 0, 0, 0, AT_NULL, true, false, true, true,
0, "\
Using a suppressor is almost an imperative in zombie-infested regions. Gunfire\n\
is very noisy, and will attract predators. Its only drawback is a reduced\n\
muzzle velocity, resulting in less accuracy and damage.",
0);
GUNMOD("grip", "enhanced grip", 12, 280, c_brown, STEEL, PLASTIC, 1, 1, 0, 0, -1,
2, 0, 0, 0, -2, 0, AT_NULL, false, true, true, true,
0, "\
A grip placed forward on the barrel allows for greater control and accuracy.\n\
Aside from increased weight, there are no drawbacks.",
0);
GUNMOD("barrel_big", "barrel extension",10,400, c_ltgray, STEEL, MNULL, 4, 1, 5, 0, 2,
6, 1, 0, 0, 5, 0, AT_NULL, false, false, true, true,
0, "\
A longer barrel increases the muzzle velocity of a firearm, contributing to\n\
both accuracy and damage. However, the longer barrel tends to vibrate after\n\
firing, greatly increasing recoil.",
0);
// NAME RAR PRC COLOR MAT1 MAT2 VOL WGT DAM CUT HIT
GUNMOD("barrel_small", "shortened barrel", 6, 320, c_ltgray, STEEL, MNULL, 1, 1, -2, 0, -1,
// ACC DAM NOI CLP REC BST NEWTYPE, PISTOL SHOT SMG RIFLE
-5, 0, 2, 0, -6, 0, AT_NULL, false, false, true, true,
0, "\
A shortened barrel results in markedly reduced accuracy, and a minor increase\n\
in noise, but also reduces recoil greatly as a result of the improved\n\
managability of the firearm.",
0);
GUNMOD("barrel_rifled", "rifled barrel", 5, 220, c_ltgray, STEEL, MNULL, 2, 1, 3, 0, 1,
10,-20, 0, 0, 0, -1, AT_NULL, false, true, false, false,
0, "\
Rifling a shotgun barrel is mainly done in order to improve its accuracy when\n\
firing slugs. The rifling makes the gun less suitable for shot, however.",
0);
GUNMOD("clip", "extended magazine", 8, 560, c_ltgray, STEEL, PLASTIC, 1, 1, -2, 0, -1,
-1, 0, 0, 50, 0, 0, AT_NULL, true, true, true, true,
0, "\
Increases the ammunition capacity of your firearm by 50%, but the added bulk\n\
reduces accuracy slightly.",
0);
// NAME RAR PRC COLOR MAT1 MAT2 VOL WGT DAM CUT HIT
GUNMOD("clip2", "double magazine", 4, 720, c_ltgray, STEEL, PLASTIC, 2, 2, 0, 0, 0,
// ACC DAM NOI CLP REC BST NEWTYPE, PISTOL SHOT SMG RIFLE
-2, 0, 0,100, 2, 0, AT_NULL, false, true, true, true,
0, "\
Completely doubles the ammunition capacity of your firearm, but the added\n\
bulk reduces accuracy and increases recoil.",
0);
GUNMOD("spare_mag", "spare magazine", 15, 200, c_ltgray, STEEL, PLASTIC, 1, 1, 0, 0, 0,
0, 0, 0, 0, 0, 0, AT_NULL, true, true, true, true,
0, "\
A spare magazine you can keep on hand to make reloads faster, but must itself\n\
be reloaded before it can be used again.",
0);
GUNMOD("stablizer", "gyroscopic stablizer",4,680,c_blue, STEEL, PLASTIC, 3, 2, 0, 0, -3,
2, -2, 0,-10, -8, 0, AT_NULL, false, false, true, true,
0, "\
An advanced unit that straps onto the side of your firearm and reduces\n\
vibration, greatly reducing recoil and increasing accuracy. However, it also\n\
takes up space in the magazine slot, reducing ammo capacity.",
0);
GUNMOD("blowback", "rapid blowback", 3, 700, c_red, STEEL, PLASTIC, 0, 1, 0, 0, 0,
-3, 0, 4, 0, 0, 6, AT_NULL, false, false, true, true,
0, "\
An improved blowback mechanism makes your firearm's automatic fire faster, at\n\
the cost of reduced accuracy and increased noise.",
0);
// NAME RAR PRC COLOR MAT1 MAT2 VOL WGT DAM CUT HIT
GUNMOD("autofire", "auto-fire mechanism",2,650,c_red, STEEL, PLASTIC, 1, 2, 2, 0, -1,
// ACC DAM NOI CLP REC BST NEWTYPE, PISTOL SHOT SMG RIFLE
-2, 0, 2, 0, 2, 3, AT_NULL, true, false, false, false,
(mfb(AT_22)|mfb(AT_9MM)|mfb(AT_38)|mfb(AT_40)|mfb(AT_57)|mfb(AT_46)), "\
A simple mechanism that converts a pistol to a fully-automatic weapon, with\n\
a burst size of three rounds. However, it reduces accuracy, and increases\n\
noise and recoil.",
0);
GUNMOD("retool_9mm", "9mm caliber retool",3,420, c_green, STEEL, MNULL, 1, 1, 0, 0, -1,
-1, 0, 0, 0, 0, 0, AT_9MM, true, false, true, false,
(mfb(AT_38)|mfb(AT_40)|mfb(AT_44)|mfb(AT_45)), "\
Replacing several key parts of a .38, .40, .44 or .45 firearm converts it to\n\
a 9mm firearm. The conversion results in a slight reduction in accuracy.",
0);
GUNMOD("retool_22", ".22 caliber retool",2,320, c_green, STEEL, MNULL, 1, 1, -2, 0, -1,
-1, 0, 0, 0, 0, 0, AT_22, true, false, true, true,
(mfb(AT_9MM)|mfb(AT_38)|mfb(AT_40)|mfb(AT_57)|mfb(AT_46)|mfb(AT_762)|
mfb(AT_223)), "\
Replacing several key parts of a 9mm, .38, .40, 5.7mm, 4.6mm, 7.62mm or .223\n\
firearm converts it to a .22 firearm. The conversion results in a slight\n\
reduction in accuracy.",
0);
// NAME RAR PRC COLOR MAT1 MAT2 VOL WGT DAM CUT HIT
GUNMOD("retool_57", "5.7mm caliber retool",1,460,c_green, STEEL, MNULL, 1, 1, -3, 0, -1,
// ACC DAM NOI CLP REC BST NEWTYPE, PISTOL SHOT SMG RIFLE
-1, 0, 0, 0, 0, 0, AT_57, true, false, true, false,
(mfb(AT_22)|mfb(AT_9MM)|mfb(AT_38)), "\
FN Hestal sells a conversion kit, used to convert .22, 9mm, or .38 firearms\n\
to their proprietary 5.7x28mm, a round designed for accuracy and armor\n\
penetration.",
0);
GUNMOD("retool_46", "4.6mm caliber retool",1,460,c_green, STEEL, MNULL, 1, 1, -3, 0, -1,
-1, 0, 0, 0, 0, 0, AT_46, true, false, true, false,
(mfb(AT_22)|mfb(AT_9MM)|mfb(AT_38)), "\
Heckler and Koch sells a conversion kit, used to convert .22, 9mm, or .38\n\
firearms to their proprietary 4.6x30mm, a round designed for accuracy and\n\
armor penetration.",
0);
// NAME RAR PRC COLOR MAT1 MAT2 VOL WGT DAM CUT HIT
GUNMOD("retool_308", ".308 caliber retool",2,520,c_green, STEEL, MNULL, 2, 1, 4, 0, 1,
// ACC DAM NOI CLP REC BST NEWTYPE PISTOL SHOT SMG RIFLE
-2, 0, 0,-20, 0, 0, AT_308, false, true, false, true,
(mfb(AT_SHOT)|mfb(AT_762)|mfb(AT_223)|mfb(AT_3006)), "\
This kit is used to convert a shotgun or 7.62mm, .223 or .30-06 rifle to the\n\
popular and powerful .308 caliber. The conversion results in reduced ammo\n\
capacity and a slight reduction in accuracy.",
0);
GUNMOD("retool_223", ".223 caliber retool",2,500,c_green, STEEL, MNULL, 2, 1, 4, 0, 1,
-2, 0, 0,-10, 0, 0, AT_223, false, true, false, true,
(mfb(AT_SHOT)|mfb(AT_762)|mfb(AT_3006)|mfb(AT_308)), "\
This kit is used to convert a shotgun or 7.62mm, .30-06, or .308 rifle to the\n\
popular, accurate, and damaging .223 caliber. The conversion results in\n\
slight reductions in both accuracy and ammo capacity.",
0);
// NAME RAR PRC COLOR MAT1 MAT2 VOL WGT DAM CUT HIT
GUNMOD("conversion_battle", "battle rifle conversion",1,680,c_magenta,STEEL,MNULL, 4, 3, 6, 0, -1,
// ACC DAM NOI CLP REC BST NEWTYPE PISTOL SHOT SMG RIFLE
-6, 6, 4, 20, 4, 4, AT_NULL, false, false, false, true,
0, "\
This is a complete conversion kit, designed to turn a rifle into a powerful\n\
battle rifle. It reduces accuracy, and increases noise and recoil, but also\n\
increases damage, ammo capacity, and fire rate.",
0);
GUNMOD("conversion_sniper", "sniper conversion",1,660, c_green, STEEL, MNULL, 1, 2, 0, 0, -1,
10, 8, 3,-15, 0,-99, AT_NULL, false, false, false, true,
0, "\
This is a complete conversion kit, designed to turn a rifle into a deadly\n\
sniper rifle. It decreases ammo capacity, and removes any automatic fire\n\
capabilities, but also increases accuracy and damage.",
0);
GUNMOD("m203", "M203", 2,650, c_ltred, STEEL, MNULL, 2, 1, 2, 0, -1,
-2, 0, 0, 1, 0, 0, AT_40MM, false, false, false, true,
0, "\
The M203 was originally designed for use with M16 variants but today can be\n\
attached to almost any rifle. It allows a single 40mm grenade to be loaded\n\
and fired.",
mfb(IF_MODE_AUX));
// NAME RAR PRC COLOR MAT1 MAT2 VOL WGT DAM CUT HIT
GUNMOD("bayonet", "bayonet", 6, 400, c_ltcyan, STEEL, MNULL, 2, 2, 0, 16, -3,
// ACC DAM NOI CLP REC BST NEWTYPE PISTOL SHOT SMG RIFLE
0, 0, 0, 0, 3, 0, AT_NULL, false, true, true, true,
0, "\
A bayonet is a stabbing weapon that can be attached to the front of a\n\
shotgun, sub-machinegun or rifle, allowing a melee attack to deal\n\
piercing damage. The added length increases recoil slightly.",
mfb(IF_STAB));
GUNMOD("u_shotgun", "underslung shotgun", 2,650, c_ltred, STEEL, MNULL, 2, 1, 2, 0, -1,
-2, 0, 0, 2, 0, 0, AT_SHOT, false, false, false, true,
0, "\
A miniaturized shotgun with 2 barrels, which can be mounted under the\n\
barrel of many rifles. It allows two shotgun shells to be loaded and fired.",
mfb(IF_MODE_AUX));
GUNMOD("gun_crossbow", "rail-mounted crossbow", 2, 500, c_ltred, STEEL, WOOD, 2, 1, 2, 0, -1,
0, 0, 0, 1, 0, 0, AT_BOLT, false, true, false, true,
0, "\
A kit to attach a pair of crossbow arms and a firing rail to\n\
the barrel of a long firearm. It allows crossbow bolts to be fired.",
mfb(IF_MODE_AUX)|mfb(IF_STR_RELOAD));
CONT("bag_plastic", "plastic bag", 50, 1, c_ltgray, PLASTIC,MNULL,
CONT("bag_plastic", "plastic bag", 50, 1, c_ltgray, "plastic","null",
// VOL WGT DAM HIT VOL FLAGS
1, 0, -8, -4, 24, 0, "\
A small, open plastic bag. Essentially trash.");
CONT("bottle_plastic", "plastic bottle", 70, 8, c_ltcyan, PLASTIC,MNULL,
CONT("bottle_plastic", "plastic bottle", 70, 8, c_ltcyan, "plastic","null",
2, 0, -8, 1, 2, mfb(con_rigid)|mfb(con_wtight)|mfb(con_seals),"\
A resealable plastic bottle, holds 500mls of liquid.");
CONT("bottle_glass", "glass bottle", 70, 12, c_cyan, GLASS, MNULL,
CONT("bottle_glass", "glass bottle", 70, 12, c_cyan, "glass", "null",
3, 2, 8, 1, 3, mfb(con_rigid)|mfb(con_wtight)|mfb(con_seals),"\
A resealable glass bottle, holds 750mls of liquid.");
CONT("can_drink", "aluminum can", 70, 1, c_ltblue, STEEL, MNULL,
CONT("can_drink", "aluminum can", 70, 1, c_ltblue, "steel", "null",
1, 0, 0, 0, 1, mfb(con_rigid)|mfb(con_wtight), "\
An aluminum can, like what soda comes in.");
CONT("can_food", "tin can", 65, 2, c_blue, IRON, MNULL,
CONT("can_food", "tin can", 65, 2, c_blue, "iron", "null",
1, 0, -1, 1, 1, mfb(con_rigid)|mfb(con_wtight), "\
A tin can, like what beans come in.");
CONT("box_small", "sm. cardboard box",50, 0, c_brown, PAPER, MNULL,
CONT("box_small", "sm. cardboard box",50, 0, c_brown, "paper", "null",
4, 0, -5, 1, 4, mfb(con_rigid), "\
A small cardboard box. No bigger than a foot in any dimension.");
CONT("canteen", "plastic canteen", 20, 1000, c_green, PLASTIC,MNULL,
CONT("canteen", "plastic canteen", 20, 1000, c_green, "plastic","null",
6, 2, -8, 1, 6, mfb(con_rigid)|mfb(con_wtight)|mfb(con_seals),"\
A large military-style water canteen, with a 1.5 liter capacity and strap.");
CONT("jerrycan", "plastic jerrycan", 10, 2500, c_green, PLASTIC,MNULL,
CONT("jerrycan", "plastic jerrycan", 10, 2500, c_green, "plastic","null",
40, 4, -2, -2, 40, mfb(con_rigid)|mfb(con_wtight)|mfb(con_seals),"\
A bulky plastic jerrycan, meant to carry fuel, but can carry other liquids\n\
in a pinch. It has a capacity of 10 liters.");
CONT("jug_plastic", "gallon jug", 10, 2500, c_ltcyan, PLASTIC,MNULL,
CONT("jug_plastic", "gallon jug", 10, 2500, c_ltcyan, "plastic","null",
10, 2, -8, 1, 10, mfb(con_rigid)|mfb(con_wtight)|mfb(con_seals),"\
A standard plastic jug used for household cleaning chemicals.");
CONT("flask_glass", "glass flask", 10, 2500, c_ltcyan, GLASS,MNULL,
CONT("flask_glass", "glass flask", 10, 2500, c_ltcyan, "glass","null",
1, 0, 8, 1, 1, mfb(con_rigid)|mfb(con_wtight)|mfb(con_seals),"\
A 250 ml laboratory conical flask, with a rubber bung.");
CONT("waterskin", "waterskin", 0, 0, c_brown, LEATHER, MNULL,
CONT("waterskin", "waterskin", 0, 0, c_brown, "leather", "null",
// VOL WGT DAM HIT VOL FLAGS
6, 4, -8, -5, 6, mfb(con_wtight)|mfb(con_seals), "\
A watertight leather bag, can hold 1.5 liters of water.");
CONT("jerrycan_big", "steel jerrycan", 20, 5000, c_green, STEEL, MNULL,
CONT("jerrycan_big", "steel jerrycan", 20, 5000, c_green, "steel", "null",
100, 7, -3, -3, 100, mfb(con_rigid)|mfb(con_wtight)|mfb(con_seals),"\
A steel jerrycan, meant to carry fuel, but can carry other liquds\n\
in a pinch. It has a capacity of 25 liters.");
CONT("keg", "aluminum keg", 20, 6000, c_ltcyan, STEEL, MNULL,
CONT("keg", "aluminum keg", 20, 6000, c_ltcyan, "steel", "null",
200, 12, -4, -4, 200, mfb(con_rigid)|mfb(con_wtight)|mfb(con_seals),"\
A reusable aluminum keg, used for shipping beer.\n\
It has a capcity of 50 liters.");
CONT("jar_glass", "glass jar", 50, 2500, c_ltcyan, GLASS,MNULL,
CONT("jar_glass", "glass jar", 50, 2500, c_ltcyan, "glass","null",
1, 1, 8, 1, 1, mfb(con_rigid)|mfb(con_wtight)|mfb(con_seals),"\
A half-litre glass jar with a metal screw top lid, used for canning.");
TOOL("jack", "jack", 30, 86, ';', c_ltgray, IRON, MNULL,
TOOL("jack", "jack", 30, 86, ';', c_ltgray, "iron", "null",
// VOL WGT DAM CUT HIT FLAGS
5, 10, 11, 0, 2, 0, 0, 0, 0, AT_NULL, "null", &iuse::none, 0, "\
5, 10, 11, 0, 2, 0, 0, 0, 0, AT_NULL, "null", &iuse::none, "\
A common hydraulic jack, used when changing tires.");
// BIONICS
@@ -550,7 +260,7 @@ A common hydraulic jack, used when changing tires.");
// list of options.
#define BIO(id, name, rarity, price, color, difficulty, des) \
itypes[id]=new it_bionic(id, rarity,price,name,des,':',\
color, STEEL, PLASTIC, 10, 18, 8, 0, 0, 0, difficulty)
color, "steel", "plastic", 10, 18, 8, 0, 0, difficulty)
#define BIO_SINGLE(id,rarity,price,color,difficulty) \
BIO(id, std::string("CBM: ")+bionics[id]->name, rarity,price,color,difficulty, \
@@ -570,13 +280,13 @@ by 10 units."); // This is another special case, increases power capacity by 10
// SOFTWARE
#define SOFTWARE(id, name, price, swtype, power, description) \
itypes[id]=new it_software(id, 0, price, name, description,\
' ', c_white, MNULL, MNULL, 0, 0, 0, 0, 0, 0, swtype, power)
' ', c_white, "null", "null", 0, 0, 0, 0, 0, swtype, power)
//Macguffins
#define MACGUFFIN(id, name, price, sym, color, mat1, mat2, volume, wgt, dam, cut,\
to_hit, readable, function, description) \
itypes[id]=new it_macguffin(id, 0, price, name, description,\
sym, color, mat1, mat2, volume, wgt, dam, cut, to_hit, 0, readable,\
sym, color, mat1, mat2, volume, wgt, dam, cut, to_hit, readable,\
function)
// BIONIC IMPLANTS
@@ -657,6 +367,7 @@ BIO_SINGLE("bio_laser", 2, 7200, c_red, 5);
BIO_SINGLE("bio_emp", 2, 7200, c_red, 5);
// power armor
BIO_SINGLE("bio_power_armor_interface", 20, 1200, c_yellow, 1);
BIO_SINGLE("bio_power_armor_interface_mkII", 8, 10000, c_yellow, 8);
SOFTWARE("software_useless", "misc software", 300, SW_USELESS, 0, "\
A miscellaneous piece of hobby software. Probably useless.");
@@ -673,13 +384,13 @@ A piece of mathematical software.");
SOFTWARE("software_blood_data", "infection data", 200, SW_DATA, 5, "\
Medical data on zombie blood.");
MACGUFFIN("note", "note", 0, '?', c_white, PAPER, MNULL, 1, 0, 0, 0, 0,
MACGUFFIN("note", "note", 0, '?', c_white, "paper", "null", 1, 0, 0, 0, 0,
true, &iuse::mcg_note, "\
A hand-written paper note.");
#define STATIONARY(id, name, rarity, price, category, description) \
itypes[id] = new it_stationary(id, rarity, price, name, description,\
',', c_white, PAPER, MNULL, 0, 0, 0, 0, 0, 0, category)
',', c_white, "paper", "null", 0, 0, 0, 0, 0, category)
STATIONARY("flyer", "flyer", 5, 1, "flier", "A scrap of paper.");
@@ -693,15 +404,15 @@ for(std::map<std::string,itype*>::iterator iter = itypes.begin(); iter != itypes
}
// NAME RARE TYPE COLOR MAT
AMMO("bio_fusion_ammo", "Fusion blast", 0,0, AT_FUSION,c_dkgray, MNULL,
AMMO("bio_fusion_ammo", "Fusion blast", 0,0, AT_FUSION,c_dkgray, "null",
// VOL WGT DMG AP RNG ACC REC COUNT
0, 0, 40, 0, 10, 1, 0, 5, "", mfb(AMMO_INCENDIARY));
// NAME RARE COLOR MAT1 MAT2
GUN("bio_blaster_gun", "fusion blaster", 0,0,c_magenta, STEEL, PLASTIC,
GUN("bio_blaster_gun", "fusion blaster", 0,0,c_magenta, "steel", "plastic",
// SKILL AMMO VOL WGT MDG HIT DMG RNG ACC REC DUR BST CLIP REL
"rifle", AT_FUSION, 12, 0, 0, 0, 0, 0, 4, 0, 10, 0, 1, 500,
"",0);
"");
@@ -711,9 +422,9 @@ GUN("bio_blaster_gun", "fusion blaster", 0,0,c_magenta, STEEL, PLASTIC,
// Unarmed Styles
#define STYLE(id, name, dam, description, ...) \
itypes[id]=new it_style(id, 0, 0, name, description, '$', \
c_white, MNULL, MNULL, 0, 0, dam, 0, 0, 0); \
c_white, "null", "null", 0, 0, dam, 0, 0); \
setvector(&((static_cast<it_style*>(itypes[id])))->moves, __VA_ARGS__, NULL); \
itypes[id]->item_flags |= mfb(IF_UNARMED_WEAPON); \
itypes[id]->item_tags.insert("UNARMED_WEAPON"); \
martial_arts_itype_ids.push_back(id)
STYLE("style_karate", "karate", 2, "\
+768 -332
View File
File diff suppressed because it is too large Load Diff
+9 -2
View File
@@ -18,6 +18,7 @@ class iuse
void royal_jelly (game *g, player *p, item *it, bool t);
void bandage (game *g, player *p, item *it, bool t);
void firstaid (game *g, player *p, item *it, bool t);
void disinfectant (game *g, player *p, item *it, bool t);
void caff (game *g, player *p, item *it, bool t);
void alcohol (game *g, player *p, item *it, bool t);
void alcohol_weak (game *g, player *p, item *it, bool t);
@@ -34,6 +35,8 @@ class iuse
void crack (game *g, player *p, item *it, bool t);
void grack (game *g, player *p, item *it, bool t);
void meth (game *g, player *p, item *it, bool t);
void vitamins (game *g, player *p, item *it, bool t);
void vaccine (game *g, player *p, item *it, bool t);
void poison (game *g, player *p, item *it, bool t);
void hallu (game *g, player *p, item *it, bool t);
void thorazine (game *g, player *p, item *it, bool t);
@@ -45,7 +48,6 @@ class iuse
void inhaler (game *g, player *p, item *it, bool t);
void blech (game *g, player *p, item *it, bool t);
void mutagen (game *g, player *p, item *it, bool t);
void mutagen_3 (game *g, player *p, item *it, bool t);
void purifier (game *g, player *p, item *it, bool t);
void marloss (game *g, player *p, item *it, bool t);
void dogfood (game *g, player *p, item *it, bool t);
@@ -60,11 +62,14 @@ class iuse
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);
@@ -79,6 +84,7 @@ class iuse
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);
@@ -105,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);
@@ -148,7 +155,7 @@ class iuse
void heatpack (game *g, player *p, item *it, bool t);
void dejar (game *g, player *p, item *it, bool t);
void devac (game *g, player *p, item *it, bool t);
void rad_badge (game *g, player *p, item *it, bool t);
// MACGUFFINS
void mcg_note (game *g, player *p, item *it, bool t);
// ARTIFACTS
+5 -2
View File
@@ -8,8 +8,8 @@ long input(long ch)
ch = getch();
}
// Needs a totally seperate implementation for windows
#if !(defined _WIN32 || defined WINDOWS)
// Our current tiles and Windows code doesn't have ungetch()
#if !(defined TILES || defined _WIN32 || defined WINDOWS)
int newch;
// Clear the buffer of characters that match the one we're going to act on.
@@ -25,6 +25,7 @@ long input(long ch)
}
#endif
switch (ch) {
case KEY_UP: return 'k';
case KEY_LEFT: return 'h';
@@ -219,6 +220,7 @@ 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\
@@ -227,6 +229,7 @@ recraft -\n\
construct *\n\
disassemble (\n\
sleep $\n\
control_vehicle ^\n\
safemode !\n\
autosafe \"\n\
ignore_enemy '\n\
+143 -83
View File
@@ -2,6 +2,7 @@
#include "map.h"
#include "game.h"
#include "lightmap.h"
#include "options.h"
#define INBOUNDS(x, y) \
(x >= 0 && x < SEEX * MAPSIZE && y >= 0 && y < SEEY * MAPSIZE)
@@ -44,13 +45,13 @@ void map::generate_lightmap(game* g)
// Apply player light sources
if (held_luminance > LIGHT_AMBIENT_LOW)
apply_light_source(g->u.posx, g->u.posy, held_luminance);
apply_light_source(g->u.posx, g->u.posy, held_luminance, trigdist);
int flood_basalt_check = 0; // does excessive lava need high quality lighting? Nope nope nope nope
for(int sx = 0; sx < LIGHTMAP_CACHE_X; ++sx) {
for(int sy = 0; sy < LIGHTMAP_CACHE_Y; ++sy) {
const ter_id terrain = g->m.ter(sx, sy);
const std::vector<item> items = g->m.i_at(sx, sy);
const field current_field = g->m.field_at(sx, sy);
const std::vector<item> &items = g->m.i_at(sx, sy);
const field &current_field = g->m.field_at(sx, sy);
// When underground natural_light is 0, if this changes we need to revisit
if (natural_light > LIGHT_AMBIENT_LOW) {
if (!g->m.is_outside(sx, sy)) {
@@ -70,42 +71,44 @@ void map::generate_lightmap(game* g)
for( std::vector<item>::const_iterator itm = items.begin(); itm != items.end(); ++itm )
{
if ( itm->has_flag(IF_LIGHT_20)) { apply_light_source(sx, sy, 20); }
if ( itm->has_flag(IF_LIGHT_1)) { apply_light_source(sx, sy, 1); }
if ( itm->has_flag(IF_LIGHT_4)) { apply_light_source(sx, sy, 4); }
if ( itm->has_flag(IF_LIGHT_8)) { apply_light_source(sx, sy, 8); }
if ( itm->has_flag("LIGHT_20")) { apply_light_source(sx, sy, 20, trigdist); }
if ( itm->has_flag("LIGHT_1")) { apply_light_source(sx, sy, 1, trigdist); }
if ( itm->has_flag("LIGHT_4")) { apply_light_source(sx, sy, 4, trigdist); }
if ( itm->has_flag("LIGHT_8")) { apply_light_source(sx, sy, 8, trigdist); }
}
if(terrain == t_lava)
apply_light_source(sx, sy, 50);
if(terrain == t_lava) {
flood_basalt_check++;
apply_light_source(sx, sy, 50, trigdist && flood_basalt_check < 512 ); // todo: optimize better
}
if(terrain == t_console)
apply_light_source(sx, sy, 3);
apply_light_source(sx, sy, 3, false); // 3^2 circle is just silly
if(terrain == t_emergency_light)
apply_light_source(sx, sy, 3);
apply_light_source(sx, sy, 3, false);
// TODO: [lightmap] Attach light brightness to fields
switch(current_field.type) {
case fd_fire:
if (3 == current_field.density)
apply_light_source(sx, sy, 160);
apply_light_source(sx, sy, 160, trigdist);
else if (2 == current_field.density)
apply_light_source(sx, sy, 60);
apply_light_source(sx, sy, 60, trigdist);
else
apply_light_source(sx, sy, 16);
apply_light_source(sx, sy, 16, trigdist);
break;
case fd_fire_vent:
case fd_flame_burst:
apply_light_source(sx, sy, 8);
apply_light_source(sx, sy, 8, trigdist);
break;
case fd_electricity:
if (3 == current_field.density)
apply_light_source(sx, sy, 8);
apply_light_source(sx, sy, 8, trigdist);
else if (2 == current_field.density)
apply_light_source(sx, sy, 1);
apply_light_source(sx, sy, 1, trigdist);
else
apply_light_source(sx, sy, LIGHT_SOURCE_LOCAL); // kinda a hack as the square will still get marked
apply_light_source(sx, sy, LIGHT_SOURCE_LOCAL, trigdist); // kinda a hack as the square will still get marked
break;
}
}
@@ -116,23 +119,23 @@ void map::generate_lightmap(game* g)
int my = g->z[i].posy;
if (INBOUNDS(mx, my)) {
if (g->z[i].has_effect(ME_ONFIRE)) {
apply_light_source(mx, my, 3);
apply_light_source(mx, my, 3, trigdist);
}
// TODO: [lightmap] Attach natural light brightness to creatures
// TODO: [lightmap] Allow creatures to have light attacks (ie: eyebot)
// TODO: [lightmap] Allow creatures to have facing and arc lights
switch (g->z[i].type->id) {
case mon_zombie_electric:
apply_light_source(mx, my, 1);
apply_light_source(mx, my, 1, trigdist);
break;
case mon_turret:
apply_light_source(mx, my, 2);
apply_light_source(mx, my, 2, trigdist);
break;
case mon_flaming_eye:
apply_light_source(mx, my, LIGHT_SOURCE_BRIGHT);
apply_light_source(mx, my, LIGHT_SOURCE_BRIGHT, trigdist);
break;
case mon_manhack:
apply_light_source(mx, my, LIGHT_SOURCE_LOCAL);
apply_light_source(mx, my, LIGHT_SOURCE_LOCAL, trigdist);
break;
}
}
@@ -141,23 +144,33 @@ void map::generate_lightmap(game* g)
// Apply any vehicle light sources
VehicleList vehs = g->m.get_vehicles();
for(int v = 0; v < vehs.size(); ++v) {
if(vehs[v].v->lights_on) {
int dir = vehs[v].v->face.dir();
for (std::vector<int>::iterator part = vehs[v].v->external_parts.begin();
part != vehs[v].v->external_parts.end(); ++part) {
int px = vehs[v].x + vehs[v].v->parts[*part].precalc_dx[0];
int py = vehs[v].y + vehs[v].v->parts[*part].precalc_dy[0];
if(INBOUNDS(px, py)) {
int dpart = vehs[v].v->part_with_feature(*part , vpf_light);
if (dpart >= 0) {
float veh_luminance = vehs[v].v->part_info(dpart).power;
if (veh_luminance > LL_LIT) {
apply_light_arc(px, py, dir, veh_luminance);
}
if(vehs[v].v->lights_on) {
int dir = vehs[v].v->face.dir();
float veh_luminance=0.0;
float iteration=1.0;
for (std::vector<int>::iterator part = vehs[v].v->external_parts.begin();
part != vehs[v].v->external_parts.end(); ++part) {
int dpart = vehs[v].v->part_with_feature(*part , vpf_light);
if (dpart >= 0) {
veh_luminance += ( vehs[v].v->part_info(dpart).power / iteration );
iteration=iteration * 1.1;
}
}
if (veh_luminance > LL_LIT) {
for (std::vector<int>::iterator part = vehs[v].v->external_parts.begin();
part != vehs[v].v->external_parts.end(); ++part) {
int px = vehs[v].x + vehs[v].v->parts[*part].precalc_dx[0];
int py = vehs[v].y + vehs[v].v->parts[*part].precalc_dy[0];
if(INBOUNDS(px, py)) {
int dpart = vehs[v].v->part_with_feature(*part , vpf_light);
if (dpart >= 0) {
apply_light_arc(px, py, dir, veh_luminance, 45);
}
}
}
}
}
}
}
}
}
@@ -200,6 +213,8 @@ void map::cache_seen(int fx, int fy, int tx, int ty, int max_range)
{
if (!INBOUNDS(fx, fy) || !INBOUNDS(tx, ty)) return;
seen_cache[fx][fy] = true;
const int ax = abs(tx - fx) << 1;
const int ay = abs(ty - fy) << 1;
const int dx = (fx < tx) ? 1 : -1;
@@ -249,7 +264,7 @@ void map::cache_seen(int fx, int fy, int tx, int ty, int max_range)
}
}
void map::apply_light_source(int x, int y, float luminance)
void map::apply_light_source(int x, int y, float luminance, bool trig_brightcalc )
{
bool lit[LIGHTMAP_CACHE_X][LIGHTMAP_CACHE_Y];
memset(lit, 0, sizeof(lit));
@@ -266,19 +281,20 @@ void map::apply_light_source(int x, int y, float luminance)
int sy = y - range; int ey = y + range;
for(int off = sx; off <= ex; ++off) {
apply_light_ray(lit, x, y, off, sy, luminance);
apply_light_ray(lit, x, y, off, ey, luminance);
apply_light_ray(lit, x, y, off, sy, luminance, trig_brightcalc);
apply_light_ray(lit, x, y, off, ey, luminance, trig_brightcalc);
}
// Skip corners with + 1 and < as they were done
for(int off = sy + 1; off < ey; ++off) {
apply_light_ray(lit, x, y, sx, off, luminance);
apply_light_ray(lit, x, y, ex, off, luminance);
apply_light_ray(lit, x, y, sx, off, luminance, trig_brightcalc);
apply_light_ray(lit, x, y, ex, off, luminance, trig_brightcalc);
}
}
}
void map::apply_light_arc(int x, int y, int angle, float luminance)
void map::apply_light_arc(int x, int y, int angle, float luminance, int wideangle )
{
if (luminance <= LIGHT_SOURCE_LOCAL)
return;
@@ -286,55 +302,84 @@ void map::apply_light_arc(int x, int y, int angle, float luminance)
bool lit[LIGHTMAP_CACHE_X][LIGHTMAP_CACHE_Y];
memset(lit, 0, sizeof(lit));
#define lum_mult 3.0
luminance=luminance*lum_mult;
int range = LIGHT_RANGE(luminance);
apply_light_source(x, y, LIGHT_SOURCE_LOCAL);
apply_light_source(x, y, LIGHT_SOURCE_LOCAL, trigdist);
// Normalise (should work with negative values too)
angle = angle % 360;
// East side
if (angle < 90 || angle > 270) {
int sy = y - ((angle < 90) ? range * (( 45 - angle) / 45.0f) : range);
int ey = y + ((angle > 270) ? range * ((angle - 315) / 45.0f) : range);
const double PI = 3.14159265358979f;
const double HALFPI = 1.570796326794895f;
const double wangle=wideangle/2.0;
int ox = x + range;
for(int oy = sy; oy <= ey; ++oy)
apply_light_ray(lit, x, y, ox, oy, luminance);
}
int nangle = angle % 360;
// South side
if (angle < 180) {
int sx = x - ((angle < 90) ? range * (( angle - 45) / 45.0f) : range);
int ex = x + ((angle > 90) ? range * ((135 - angle) / 45.0f) : range);
int endx, endy;
double rad = PI * (double)nangle / 180;
calc_ray_end(nangle, range, x, y, &endx, &endy);
apply_light_ray(lit, x, y, endx, endy , luminance, trigdist);
int oy = y + range;
for(int ox = sx; ox <= ex; ++ox)
apply_light_ray(lit, x, y, ox, oy, luminance);
}
int testx, testy;
calc_ray_end(wangle + nangle, range, x, y, &testx, &testy);
// West side
if (angle > 90 && angle < 270) {
int sy = y - ((angle < 180) ? range * ((angle - 135) / 45.0f) : range);
int ey = y + ((angle > 180) ? range * ((225 - angle) / 45.0f) : range);
double wdist=sqrt(double((endx - testx) * (endx - testx) + (endy - testy) * (endy - testy)));
if(wdist > 0.5) {
double wstep = ( wangle / ( wdist * 1.42 ) ); // attempt to determine beam density required to cover all squares
int ox = x - range;
for(int oy = sy; oy <= ey; ++oy)
apply_light_ray(lit, x, y, ox, oy, luminance);
}
for (double ao=wstep; ao <= wangle; ao+=wstep) {
if ( trigdist ) {
double fdist=(ao * HALFPI) / wangle;
double orad = ( PI * ao / 180.0 );
endx = int( x + ( (double)range - fdist * 2.0) * cos(rad+orad) );
endy = int( y + ( (double)range - fdist * 2.0) * sin(rad+orad) );
apply_light_ray(lit, x, y, endx, endy , luminance, true);
// North side
if (angle > 180) {
int sx = x - ((angle > 270) ? range * ((315 - angle) / 45.0f) : range);
int ex = x + ((angle < 270) ? range * ((angle - 225) / 45.0f) : range);
int oy = y - range;
for(int ox = sx; ox <= ex; ++ox)
apply_light_ray(lit, x, y, ox, oy, luminance);
endx = int( x + ( (double)range - fdist * 2.0) * cos(rad-orad) );
endy = int( y + ( (double)range - fdist * 2.0) * sin(rad-orad) );
apply_light_ray(lit, x, y, endx, endy , luminance, true);
} else {
calc_ray_end(nangle + ao, range, x, y, &endx, &endy);
apply_light_ray(lit, x, y, endx, endy , luminance, false);
calc_ray_end(nangle - ao, range, x, y, &endx, &endy);
apply_light_ray(lit, x, y, endx, endy , luminance, false);
}
}
}
}
void map::calc_ray_end(int angle, int range, int x, int y, int* outx, int* outy)
{
const double PI = 3.14159265358979f;
double rad = (PI * angle) / 180;
if (trigdist)
{
*outx = x + range * cos(rad);
*outy = y + range * sin(rad);
} else {
int mult = 0;
if (angle >= 135 && angle <= 315)
{
mult = -1;
} else {
mult = 1;
}
if (angle <= 45 || (135 <= angle && angle <= 215) || 315 < angle)
{
*outx = x + range * mult;
*outy = y + range * tan(rad) * mult;
} else {
*outx = x + range * 1/tan(rad) * mult;
*outy = y + range * mult;
}
}
}
void map::apply_light_ray(bool lit[LIGHTMAP_CACHE_X][LIGHTMAP_CACHE_Y],
int sx, int sy, int ex, int ey, float luminance)
int sx, int sy, int ex, int ey, float luminance, bool trig_brightcalc)
{
int ax = abs(ex - sx) << 1;
int ay = abs(ey - sy) << 1;
@@ -343,6 +388,9 @@ void map::apply_light_ray(bool lit[LIGHTMAP_CACHE_X][LIGHTMAP_CACHE_Y],
int x = sx;
int y = sy;
if( sx == ex && sy == ey ) { return; }
float transparency = LIGHT_TRANSPARENCY_CLEAR;
// TODO: [lightmap] Pull out the common code here rather than duplication
@@ -362,7 +410,13 @@ void map::apply_light_ray(bool lit[LIGHTMAP_CACHE_X][LIGHTMAP_CACHE_Y],
lit[x][y] = true;
// We know x is the longest angle here and squares can ignore the abs calculation
float light = luminance / ((sx - x) * (sx - x));
float light=0.0;
if ( trig_brightcalc ) {
int td = trig_dist(sx, sy, x, y);
light = luminance / ( td * td );
} else {
light = luminance / ((sx - x) * (sx - x));
}
lm[x][y] += light * transparency;
}
@@ -389,8 +443,14 @@ void map::apply_light_ray(bool lit[LIGHTMAP_CACHE_X][LIGHTMAP_CACHE_Y],
lit[x][y] = true;
// We know y is the longest angle here and squares can ignore the abs calculation
float light = luminance / ((sy - y) * (sy - y));
lm[x][y] += light;
float light=0.0;
if ( trig_brightcalc ) {
int td = trig_dist(sx, sy, x, y);
light = luminance / ( td * td );
} else {
light = luminance / ((sy - y) * (sy - y));
}
lm[x][y] += light * transparency;
}
if (INBOUNDS(x, y))
+7 -6
View File
@@ -1,4 +1,5 @@
#include "line.h"
#include "game.h"
#include <stdlib.h>
#define SGN(a) (((a)<0) ? -1 : 1)
@@ -61,11 +62,14 @@ std::vector <point> line_to(int x1, int y1, int x2, int y2, int t)
int trig_dist(int x1, int y1, int x2, int y2)
{
return int(sqrt(double(pow(x1 - x2, 2.0) + pow(y1 - y2, 2.0))));
return int( sqrt( double( (x1-x2)*(x1-x2) + (y1-y2)*(y1-y2) ) ) );
}
int rl_dist(int x1, int y1, int x2, int y2)
{
if(trigdist) {
return trig_dist( x1, y1, x2, y2 );
}
int dx = abs(x1 - x2), dy = abs(y1 - y2);
if (dx > dy)
return dx;
@@ -74,10 +78,7 @@ int rl_dist(int x1, int y1, int x2, int y2)
int rl_dist(point a, point b)
{
int dx = abs(a.x - b.x), dy = abs(a.y - b.y);
if (dx > dy)
return dx;
return dy;
return rl_dist(a.x, a.y, b.x, b.y);
}
double slope_of(std::vector<point> line)
@@ -165,7 +166,7 @@ std::string direction_name_short(direction dir)
case NORTHEAST: return "NE";
case EAST: return "E ";
case SOUTHEAST: return "SE";
case SOUTH: return "W ";
case SOUTH: return "S ";
case SOUTHWEST: return "SW";
case WEST: return "W ";
case NORTHWEST: return "NW";
+8
View File
@@ -17,8 +17,15 @@
void exit_handler(int s);
#ifdef USE_WINMAIN
int APIENTRY WinMain (HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine, int nCmdShow)
{
int argc = __argc;
char **argv = __argv;
#else
int main(int argc, char *argv[])
{
#endif
#ifdef ENABLE_LOGGING
setupDebug();
#endif
@@ -55,6 +62,7 @@ int main(int argc, char *argv[])
game *g = new game;
g->init_ui();
MAPBUFFER.set_game(g);
g->load_artifacts(); //artifacts have to be loaded before any items are created
MAPBUFFER.load();
curs_set(0); // Invisible cursor here, because MAPBUFFER.load() is crash-prone
+663 -353
View File
File diff suppressed because it is too large Load Diff
+25 -11
View File
@@ -65,8 +65,13 @@ class map
void clear_traps();
// Movement and LOS
int move_cost(const int x, const int y); // Cost to move through; 0 = impassible
int move_cost_ter_only(const int x, const int y); // same as above, but don't take vehicles into account
// Cost to move through; 0 = impassible, 1 = 50 moves, 2 = 100 etc
int move_cost(const int x, const int y);
// Same as above, but don't take vehicles into account
int move_cost_ter_only(const int x, const int y);
// Cost to move out of one tile and into the next,
// returns player/monster moves (50, 75, 100, etc), unlike move_cost
int combined_movecost(const int x1, const int y1, const int x2, const int y2);
bool trans(const int x, const int y); // Transparent?
// (Fx, Fy) sees (Tx, Ty), within a range of (range)?
// tc indicates the Bresenham line used to connect the two points, and may
@@ -140,19 +145,25 @@ class map
// Items
std::vector<item>& i_at(int x, int y);
item water_from(const int x, const int y);
item acid_from(const int x, const int y);
void i_clear(const int x, const int y);
void i_rem(const int x, const int y, const int index);
point find_item(const item *it);
void spawn_item(const int x, const int y, itype* type, int birthday, int quantity = 0, int charges = 0, int damlevel = 0);
void spawn_artifact(const int x, const int y, itype* type, int bday);
void spawn_item(const int x, const int y, std::string itype_id, int birthday, int quantity = 0, int charges = 0, int damlevel = 0);
void add_item(const int x, const int y, item new_item);
int max_volume(const int x, const int y);
int free_volume(const int x, const int y);
int stored_volume(const int x, const int y);
bool is_full(const int x, const int y, const int addvolume = -1, const int addnumber = -1 );
bool add_item_or_charges(const int x, const int y, item new_item, int overflow_radius = 0, bool skip_checks = false );
void add_item(const int x, const int y, item new_item, int maxitems = 64); // Do we want mapgen and explosions piling up to MAX_ITEM_IN_SQUARE (1024)? NYET!
void process_active_items(game *g);
void process_active_items_in_submap(game *g, const int nonant);
void process_vehicles(game *g);
void use_amount(const point origin, const int range, const itype_id type, const int amount,
const bool use_container = false);
void use_charges(const point origin, const int range, const itype_id type, const int amount);
std::list<item> use_amount(const point origin, const int range, const itype_id type, const int amount,
const bool use_container = false);
std::list<item> use_charges(const point origin, const int range, const itype_id type, const int amount);
// Traps
trap_id& tr_at(const int x, const int y);
@@ -186,10 +197,12 @@ class map
void post_process(game *g, unsigned zones);
void place_spawns(game *g, std::string group, const int chance,
const int x1, const int y1, const int x2, const int y2, const float density);
void place_items(items_location loc, const int chance, const int x1, const int y1,
int place_items(items_location loc, const int chance, const int x1, const int y1,
const int x2, const int y2, bool ongrass, const int turn);
// put_items_from puts exactly num items, based on chances
void put_items_from(items_location loc, const int num, const int x, const int y, const int turn = 0, const int quantity = 0, const int charges = 0, const int damlevel = 0);
void spawn_item(const int x, const int y, item new_item, const int birthday,
const int quantity, const int charges, const int damlevel);
void add_spawn(mon_id type, const int count, const int x, const int y, bool friendly = false,
const int faction_id = -1, const int mission_id = -1,
std::string name = "NONE");
@@ -245,10 +258,11 @@ protected:
private:
long determine_wall_corner(const int x, const int y, const long orig_sym);
void cache_seen(const int fx, const int fy, const int tx, const int ty, const int max_range);
void apply_light_source(int x, int y, float luminance);
void apply_light_arc(int x, int y, int angle, float luminance);
void apply_light_source(int x, int y, float luminance, bool trig_brightcalc);
void apply_light_arc(int x, int y, int angle, float luminance, int wideangle = 30 );
void apply_light_ray(bool lit[MAPSIZE*SEEX][MAPSIZE*SEEY],
int sx, int sy, int ex, int ey, float luminance);
int sx, int sy, int ex, int ey, float luminance, bool trig_brightcalc = true);
void calc_ray_end(int angle, int range, int x, int y, int* outx, int* outy);
float lm[MAPSIZE*SEEX][MAPSIZE*SEEY];
float sm[MAPSIZE*SEEX][MAPSIZE*SEEY];
+27 -3
View File
@@ -50,6 +50,7 @@ enum t_flag {
rough, // May hurt the player's feet
sealed, // Can't 'e' to retrieve items here
noitem, // Items "fall off" this space
destroy_item, // Items are destroyed by this tile
goes_down, // Can '>' to go down a level
goes_up, // Can '<' to go up a level
console, // Used as a computer
@@ -111,6 +112,7 @@ t_bars,
t_door_c, t_door_b, t_door_o, t_door_locked_interior, t_door_locked, t_door_locked_alarm, t_door_frame,
t_chaingate_l, t_fencegate_c, t_fencegate_o, t_chaingate_c, t_chaingate_o, t_door_boarded,
t_door_metal_c, t_door_metal_o, t_door_metal_locked,
t_door_bar_c, t_door_bar_o, t_door_bar_locked,
t_door_glass_c, t_door_glass_o,
t_bulletin,
t_portcullis,
@@ -120,7 +122,7 @@ t_window_stained_green, t_window_stained_red, t_window_stained_blue,
t_rock, t_fault,
t_paper,
// Tree
t_tree, t_tree_young, t_tree_apple, t_underbrush, t_shrub, t_indoor_plant, t_shrub_blueberry, t_log,
t_tree, t_tree_young, t_tree_apple, t_underbrush, t_shrub, t_indoor_plant, t_shrub_blueberry, t_shrub_strawberry, t_log,
t_root_wall,
t_wax, t_floor_wax,
t_fence_v, t_fence_h, t_chainfence_v, t_chainfence_h, t_chainfence_posts,
@@ -138,10 +140,11 @@ t_sink, t_oven, t_woodstove, t_fireplace, t_bathtub, t_chair, t_armchair, t_sofa
t_sandbox, t_slide, t_monkey_bars, t_backboard,
t_bench, t_table, t_pool_table,
t_gas_pump, t_gas_pump_smashed, t_gas_pump_empty,
t_generator_broken,
t_missile, t_missile_exploded,
t_counter,
t_radio_tower, t_radio_controls,
t_console_broken, t_console, t_gates_mech_control, t_barndoor, t_palisade_pulley,
t_console_broken, t_console, t_gates_mech_control, t_gates_control_concrete, t_barndoor, t_palisade_pulley,
t_sewage_pipe, t_sewage_pump,
t_centrifuge,
t_column,
@@ -337,6 +340,12 @@ const ter_t terlist[num_terrain_types] = { // MUST match enum ter_id above!
mfb(transparent)|mfb(supports_roof), &iexamine::none},
{"closed metal door",'+', c_cyan, 0, -1, tr_null, // Actually locked
mfb(noitem)|mfb(supports_roof), &iexamine::none},
{"closed bar door",'+', c_cyan, 0, -1, tr_null,// unlocked, only created at map gen
mfb(transparent)|mfb(noitem)|mfb(supports_roof), &iexamine::none},
{"open bar door", '\'', c_cyan, 2, -1, tr_null,
mfb(transparent)|mfb(supports_roof), &iexamine::none},
{"closed bar door",'+', c_cyan, 0, -1, tr_null, // locked
mfb(transparent)|mfb(noitem)|mfb(supports_roof), &iexamine::none},
{"closed glass door",'+', c_ltcyan, 0, -1, tr_null,
mfb(transparent)|mfb(bashable)|mfb(door)|mfb(noitem)|mfb(supports_roof), &iexamine::none},
{"open glass door", '\'', c_ltcyan, 2, -1, tr_null,
@@ -405,6 +414,9 @@ const ter_t terlist[num_terrain_types] = { // MUST match enum ter_id above!
{"blueberry bush", '#', c_ltgreen, 8, -1, tr_null,
mfb(transparent)|mfb(bashable)|mfb(container)|mfb(flammable2)|mfb(thin_obstacle),
&iexamine::shrub_blueberry},
{"strawberry bush", '#', c_ltgreen, 8, -1, tr_null,
mfb(transparent)|mfb(bashable)|mfb(container)|mfb(flammable2)|mfb(thin_obstacle),
&iexamine::shrub_strawberry},
{"tree trunk", '1', c_brown, 4, -1, tr_null,
mfb(transparent)|mfb(flammable2)|mfb(diggable), &iexamine::none},
{"root wall", '#', c_brown, 0, -1, tr_null,
@@ -453,7 +465,7 @@ const ter_t terlist[num_terrain_types] = { // MUST match enum ter_id above!
{"sewage", '~', c_ltgreen, 6, -1, tr_null,
mfb(transparent)|mfb(swimmable), &iexamine::water_source},
{"lava", '~', c_red, 4, -1, tr_lava,
mfb(transparent)|mfb(liquid), &iexamine::none},
mfb(transparent)|mfb(liquid)|mfb(destroy_item), &iexamine::none},
{"bed", '#', c_magenta, 5, -1, tr_null,
mfb(transparent)|mfb(container)|mfb(flammable2)|mfb(collapses)|
mfb(deconstruct)|mfb(place_item)|mfb(indoors), &iexamine::none},
@@ -514,6 +526,8 @@ const ter_t terlist[num_terrain_types] = { // MUST match enum ter_id above!
mfb(transparent)|mfb(noitem), &iexamine::none},
{"out-of-order gasoline pump", '&', c_red, 0, -1, tr_null,
mfb(transparent)|mfb(noitem), &iexamine::none},
{"broken generator", '&', c_ltgray, 0, -1, tr_null,
mfb(transparent)|mfb(noitem), &iexamine::none},
{"missile", '#', c_ltblue, 0, -1, tr_null,
mfb(explodes)|mfb(noitem), &iexamine::none},
{"blown-out missile",'#', c_ltgray, 0, -1, tr_null,
@@ -530,6 +544,8 @@ const ter_t terlist[num_terrain_types] = { // MUST match enum ter_id above!
mfb(transparent)|mfb(console)|mfb(noitem)|mfb(collapses)|mfb(indoors), &iexamine::none},
{"mechanical winch", '6', c_cyan_red, 0, -1, tr_null,
mfb(transparent)|mfb(noitem)|mfb(collapses), &iexamine::controls_gate},
{"mechanical winch", '6', c_cyan_red, 0, -1, tr_null,
mfb(transparent)|mfb(noitem)|mfb(collapses), &iexamine::controls_gate},
{"rope and pulley", '|', c_brown, 0, -1, tr_null,
mfb(transparent)|mfb(noitem)|mfb(collapses), &iexamine::controls_gate},
{"rope and pulley", '|', c_brown, 0, -1, tr_null,
@@ -720,6 +736,8 @@ enum field_id {
fd_null = 0,
fd_blood,
fd_bile,
fd_gibs_flesh,
fd_gibs_veggy,
fd_web,
fd_slime,
fd_acid,
@@ -751,6 +769,12 @@ const field_t fieldlist[] = {
{{"bile splatter", "bile stain", "puddle of bile"}, '%',
{c_pink, c_pink, c_pink}, {true, true, true}, {false, false, false},2500},
{{"scraps of flesh", "bloody meat chunks", "heap of gore"}, '~',
{c_brown, c_ltred, c_red}, {true, true, true}, {false, false, false}, 2500},
{{"shredded leaves and twigs", "shattered branches and leaves", "broken vegetation tangle"}, '~',
{c_ltgreen, c_ltgreen, c_green}, {true, true, true}, {false, false, false}, 2500},
{{"cobwebs","webs", "thick webs"}, '}',
{c_white, c_white, c_white}, {true, true, false},{false, false, false}, 0},
+2764 -610
View File
File diff suppressed because it is too large Load Diff
+1 -1
View File
@@ -25,7 +25,7 @@ enum items_location {
mi_lab_shoes, mi_lab_torso, mi_lab_pants,
mi_hospital_lab, mi_hospital_samples, mi_surgery,
mi_office, mi_cubical_office, mi_school, mi_church, mi_vault,
mi_art, mi_pawn, mi_mil_surplus,
mi_medieval, mi_art, mi_pawn, mi_mil_surplus,
mi_shelter, mi_mechanics,
mi_chemistry, mi_teleport, mi_goo, mi_cloning_vat, mi_dissection,
mi_hydro, mi_electronics, mi_monparts, mi_bionics, mi_bionics_common,
+74 -64
View File
@@ -28,7 +28,7 @@ void game::init_mapitems()
setvector(
&mapitems[mi_road],
"muffler", "pipe", "motor", "seat",
"muffler", "pipe", "motor", "seat", "saddle",
"wheel", "wheel_wide", "wheel_bicycle", "wheel_motorbike", "wheel_small",
"1cyl_combustion", "v2_combustion", "i4_combustion", "v6_combustion",
"v8_combustion", "foot_crank", "flyer", NULL);
@@ -39,7 +39,7 @@ void game::init_mapitems()
"coke", "meth", "sneakers", "boots", "boots_winter",
"flip_flops", "dress_shoes", "heels", "coat_rain", "poncho",
"gloves_light", "mittens",
"armguard_soft", "armguard_hard",
"armguard_soft", "armguard_hard", "legguard_hard",
"gloves_wool", "gloves_winter", "gloves_liner", "gloves_leather",
"gloves_fingerless", "bandana", "scarf", "hat_cotton",
"hat_knit", "hat_fur", "helmet_bike", "helmet_motor",
@@ -80,13 +80,13 @@ void game::init_mapitems()
"solar_cell",
"manual_mechanics", "hammer", "flashlight", "soldering_iron",
"bubblewrap", "binoculars", "duct_tape", "lawnmower", "foot_crank",
"boltcutters", "spray_can", "jar_glass", "bearings", NULL);
"boltcutters", "spray_can", "jar_glass", "bearing", NULL);
setvector(
&mapitems[mi_bedroom],
"inhaler", "cig", "cigar", "weed", "coke", "meth",
"heroin", "sneakers", "socks", "mocassins", "bandana", "glasses_eye", "sunglasses",
"glasses_reading", "hat_ball", "backpack", "purse", "mbag",
"glasses_reading", "glasses_bifocal", "hat_ball", "backpack", "purse", "mbag",
"fanny", "battery", "bb", "bbgun", "mag_porn", "mag_tv", "mag_gaming",
"mag_news", "novel_romance", "novel_drama", "novel_mystery", "manual_mechanics",
"manual_speech", "manual_business", "manual_computers",
@@ -101,7 +101,7 @@ void game::init_mapitems()
"sw_610", "ruger_redhawk", "deagle_44", "usp_45", "m1911",
"fn57", "mac_10", "shotgun_sawn", "suppressor", "grip",
"clip", "spare_mag", "grenade", "EMPbomb", "gasbomb", "tazer",
"longbow", "compbow", "arrow_wood", "arrow_cf", "u_shotgun", "shot_hull",
"longbow", "compbow", "compositebow", "shortbow", "recurbow", "reflexbow", "arrow_wood", "arrow_cf", "u_shotgun", "shot_hull",
"9mm_casing", "38_casing", "40_casing", "44_casing", "45_casing",
"57mm_casing", "46mm_casing", "762_casing", "223_casing",
"3006_casing", "308_casing", "gunpowder",
@@ -163,7 +163,7 @@ void game::init_mapitems()
setvector(
&mapitems[mi_softdrugs],
"bandages", "1st_aid", "vitamins", "aspirin", "caffeine",
"pills_sleep", "iodine", "dayquil", "nyquil", NULL);
"pills_sleep", "iodine", "dayquil", "nyquil", "disinfectant", "vaccine_shot", NULL);
setvector(
&mapitems[mi_harddrugs],
@@ -199,7 +199,7 @@ void game::init_mapitems()
"superglue", "chain", "rope_6", "rope_30", "glass_sheet",
"pipe", "nail", "hose", "string_36", "frame", "metal_tank",
"wire", "wire_barbed", "duct_tape", "jerrycan", "lawnmower",
"foot_crank", "spray_can", "ax", "jerrycan_big", "funnel", "bearings", "jack",
"foot_crank", "spray_can", "ax", "jerrycan_big", "funnel", "bearing", "jack", "permanent_marker",
NULL);
setvector(
@@ -216,7 +216,7 @@ void game::init_mapitems()
setvector(
&mapitems[mi_mischw],
"2x4", "machete", "boots_steel", "hat_hard", "mask_filter",
"glasses_safety", "bb", "bbgun", "beartrap", "two_way_radio",
"glasses_safety", "bb", "bbgun", "beartrap",
"radio", "hotplate", "extinguisher", "nailgun",
"manual_mechanics", "manual_carpentry", "mag_carpentry",
"duct_tape", "lawnmower", "boltcutters",
@@ -227,13 +227,13 @@ void game::init_mapitems()
"amplifier", "antenna", "battery", "soldering_iron", "solar_cell",
"screwdriver", "processor", "RAM", "mp3", "flashlight",
"radio", "hotplate", "receiver", "transponder", "tazer",
"two_way_radio", "usb_drive", "manual_electronics", "cable",
"usb_drive", "manual_electronics", "cable",
"vac_sealer", NULL);
setvector(
&mapitems[mi_sports],
"bandages", "aspirin", "bat", "bat_metal", "sneakers", "socks", "tshirt",
"tank_top", "gloves_fingerless", "glasses_safety", "armguard_soft", "armguard_hard",
"tank_top", "gloves_fingerless", "glasses_safety", "armguard_soft", "armguard_hard", "legguard_hard",
"goggles_swim", "goggles_ski", "hat_ball", "helmet_bike",
"helmet_ball", "manual_brawl", "foot_crank", "glowstick", NULL);
@@ -244,24 +244,24 @@ void game::init_mapitems()
"bb", "bolt_steel", "bbgun", "crossbow", "manual_knives","manual_survival",
"manual_first_aid", "manual_traps", "lighter", "matches", "sewing_kit", "thread",
"hammer", "flashlight", "water_purifier", "radio", "beartrap",
"UPS_off", "string_36", "longbow", "compbow", "arrow_wood",
"arrow_cf", "wire", "rollmat", "tent_kit", "canteen", "ax",
"heatpack", "glowstick", "emer_blanket", "cloak", "sleeping_bag", NULL);
"UPS_off", "string_36", "longbow", "compbow", "compositebow", "shortbow", "recurbow", "reflexbow",
"hand_crossbow", "arrow_wood", "arrow_cf", "wire", "rollmat", "tent_kit", "canteen", "ax",
"heatpack", "glowstick", "emer_blanket", "cloak", "sleeping_bag", "gasoline_lantern", NULL);
setvector(
&mapitems[mi_allsporting],
"aspirin", "bat", "bat_metal", "sneakers", "socks", "tshirt", "tank_top",
"gloves_fingerless", "glasses_safety", "goggles_swim",
"armguard_soft", "armguard_hard", "mag_firstaid", "mag_throwing", "mag_swimming",
"armguard_soft", "armguard_hard", "legguard_hard", "mag_firstaid", "mag_throwing", "mag_swimming",
"goggles_ski", "hat_ball", "helmet_bike", "helmet_ball",
"manual_brawl", "rope_30", "hatchet", "pot", "pan",
"binoculars", "hotplate", "knife_combat", "machete", "vest",
"backpack", "bb", "bolt_steel", "bbgun", "crossbow",
"backpack", "bb", "bolt_steel", "bbgun", "crossbow", "hand_crossbow",
"manual_knives", "manual_first_aid", "manual_traps", "lighter", "matches",
"sewing_kit", "thread", "hammer", "flashlight", "water_purifier",
"radio", "beartrap", "extinguisher", "string_36", "longbow",
"compbow", "arrow_wood", "arrow_cf", "rollmat", "tent_kit",
"compbow", "compositebow", "shortbow", "recurbow", "reflexbow",
"arrow_wood", "arrow_cf", "rollmat", "tent_kit",
"foot_crank", "mag_archery", "heatpack", "glowstick", NULL);
setvector(
@@ -333,9 +333,9 @@ void game::init_mapitems()
"glasses_safety", "goggles_nv", "holster", "bootstrap",
"mag_guns", "mag_archery", "flashlight", "UPS_off", "suppressor", "grip",
"barrel_big", "barrel_small", "barrel_rifled", "clip", "spare_mag",
"clip2", "stablizer", "blowback", "autofire", "retool_45",
"clip2", "stabilizer", "blowback", "autofire", "retool_45",
"retool_9mm", "retool_22", "retool_57", "retool_46",
"retool_308", "retool_223", "tazer","shot_hull",
"retool_308", "retool_223", "brass_catcher", "tazer","shot_hull",
"9mm_casing", "38_casing", "40_casing", "44_casing", "45_casing",
"57mm_casing", "46mm_casing", "762_casing", "223_casing",
"3006_casing", "308_casing", "gunpowder",
@@ -389,7 +389,7 @@ void game::init_mapitems()
setvector(
&mapitems[mi_novels],
"novel_romance", "novel_spy", "novel_scifi", "novel_drama",
"cookbok_human", "novel_mystery", "novel_fantasy", "novel_horror",
"cookbook_human", "novel_mystery", "novel_fantasy", "novel_horror",
NULL);
setvector(
@@ -412,7 +412,7 @@ void game::init_mapitems()
setvector(
&mapitems[mi_cop_torso],
"dress_shirt", "under_armor", "jacket_light",
"dress_shirt", "under_armor", "jacket_light",
NULL);
setvector(
@@ -423,8 +423,8 @@ void game::init_mapitems()
&mapitems[mi_cop_weapons],
"baton", "kevlar", "vest", "gloves_leather", "mask_gas",
"goggles_nv", "helmet_riot", "holster", "bootstrap",
"armguard_hard",
"shot_00", "9mm", "usp_9mm", "remington_870", "two_way_radio",
"armguard_hard", "legguard_hard",
"shot_00", "9mm", "usp_9mm", "remington_870",
"UPS_off", "tazer", NULL);
setvector(
@@ -436,23 +436,24 @@ void game::init_mapitems()
&mapitems[mi_lab_shoes],
"sneakers", "boots", "boots_steel", "dress_shoes", NULL);
// increase chances of generating lab coat
// increase chances of generating lab coat
setvector(
&mapitems[mi_lab_torso],
"coat_lab", "coat_lab", "coat_lab", "coat_lab",
"tshirt", "polo_shirt", "dress_shirt", "dress",
"sweatshirt", "sweater", "hoodie", "jumpsuit",
"hazmat_suit", NULL);
"coat_lab", "coat_lab", "coat_lab", "coat_lab",
"tshirt", "polo_shirt", "dress_shirt", "dress",
"sweatshirt", "sweater", "hoodie", "jumpsuit",
"hazmat_suit", NULL);
setvector(
&mapitems[mi_lab_pants],
"jeans", "pants", "pants_cargo", "skirt", NULL);
"jeans", "pants", "pants_cargo", "skirt", NULL);
setvector(
&mapitems[mi_hospital_lab],
"blood", "iodine", "bleach", "bandages", "syringe",
"canister_empty", "coat_lab", "gloves_medical", "mask_dust",
"glasses_safety", "vacutainer", "usb_drive", NULL);
"glasses_safety", "vacutainer", "usb_drive", "disinfectant",
"gauze", "medical_tape", "wrapped_rad_badge", NULL);
setvector(
&mapitems[mi_hospital_samples],
@@ -461,11 +462,12 @@ void game::init_mapitems()
setvector(
&mapitems[mi_surgery],
"blood", "iodine", "bandages", "scalpel", "syringe",
"gloves_medical", "mask_dust", "vacutainer", "rag_bloody", NULL);
"gloves_medical", "mask_dust", "vacutainer", "rag_bloody", "disinfectant",
"gauze", "medical_tape", NULL);
setvector(
&mapitems[mi_office],
"cola", "aspirin", "cigar", "glasses_eye", "sunglasses", "glasses_reading",
"cola", "aspirin", "cigar", "glasses_eye", "sunglasses", "glasses_reading", "glasses_bifocal",
"purse", "mbag", "battery", "mag_news", "manual_business",
"textbook_business", "lighter", "matches", "extinguisher", "flashlight",
"radio", "bubblewrap", "coffee_raw", "usb_drive",
@@ -473,12 +475,12 @@ void game::init_mapitems()
setvector(
&mapitems[mi_cubical_office],
"cola", "aspirin", "cigar", "glasses_eye", "sunglasses", "glasses_reading",
"cola", "aspirin", "cigar", "glasses_eye", "sunglasses", "glasses_reading", "glasses_bifocal",
"purse", "mbag", "battery", "mag_news", "manual_business",
"textbook_business", "manual_computers", "textbook_computers", "lighter", "matches", "extinguisher", "flashlight",
"radio", "bubblewrap", "coffee_raw", "usb_drive","rootbeer", "cig", "coat_rain", "poncho",
"mag_tv", "mag_news", "lighter", "matches", "extinguisher", "mp3", NULL);
setvector(
&mapitems[mi_school],
"glasses_reading", "purse", "mbag", "battery", "mag_news", "manual_computers",
@@ -487,20 +489,26 @@ void game::init_mapitems()
"manual_tailor", "manual_carpentry", "novel_romance", "novel_spy", "novel_scifi", "novel_drama",
"novel_mystery", "novel_fantasy", "novel_horror", "chocolate", "candy", "backpack", "pockknife", "mag_comic",
NULL);
setvector(
&mapitems[mi_church],
"glasses_eye", "sunglasses", "glasses_reading", "lighter", "matches", "coat_rain", "cane", "candlestick",
"glasses_eye", "sunglasses", "glasses_reading", "glasses_bifocal", "lighter", "matches", "coat_rain", "cane", "candlestick",
"candlestick", "candlestick", "candlestick", NULL);
setvector(
&mapitems[mi_vault],
"purifier", "plut_cell", "ftk93", "nx17", "canister_goo",
"UPS_off", "gold", "plasma_engine",
"bio_time_freeze", "bio_teleport",
"power_armor_basic",
"bio_time_freeze", "bio_teleport",
"power_armor_basic",
"power_armor_light", "power_armor_heavy",
"minireactor", "alloy_plate", NULL);
setvector(
&mapitems[mi_medieval],
"katana", "mace", "morningstar", "rapier", "broadsword",
"pike", "helmet_plate", "armor_plate", "huge_crossbow", NULL);
setvector(
&mapitems[mi_art],
"fur", "katana", "petrified_eye", "spiral_stone", "rapier",
@@ -526,14 +534,14 @@ void game::init_mapitems()
"broadsword", "morningstar", "helmet_plate", "cot", "rollmat", "tent_kit",
"bat_metal", "lawnmower", "pickelhaube",
"makeshift_machete", "picklocks", "rucksack", "puller", "press",
"vac_sealer", NULL);
"vac_sealer", "gasoline_lantern", "huge_crossbow", NULL);
setvector(
&mapitems[mi_mil_surplus], // NOT food or armor!
"knife_combat", "binoculars", "bolt_steel", "crossbow",
"mag_guns", "manual_brawl", "manual_knives", "cot",
"manual_mechanics", "manual_first_aid", "manual_traps",
"flashlight", "water_purifier", "two_way_radio", "radio",
"flashlight", "water_purifier", "radio",
"geiger_off", "usb_drive", "canteen", "jerrycan", "rucksack",
"heatpack", "sleeping_bag", "emer_blanket", "flyer", NULL);
@@ -548,7 +556,7 @@ void game::init_mapitems()
"manual_first_aid", "manual_tailor", "manual_carpentry",
"lighter", "matches", "sewing_kit", "thread", "hammer", "extinguisher",
"flashlight", "hotplate", "water_purifier", "radio", "rollmat",
"tent_kit", "canteen", "spray_can", "ax", "heatpack", "blanket", "emer_blanket", "flyer", NULL);
"tent_kit", "canteen", "spray_can", "ax", "heatpack", "blanket", "emer_blanket", "flyer", "gasoline_lantern", "vaccine_shot", NULL);
setvector(
&mapitems[mi_mechanics],
@@ -556,7 +564,7 @@ void game::init_mapitems()
"wheel", "wheel_wide", "wheel_bicycle", "wheel_motorbike", "wheel_small",
"1cyl_combustion", "v2_combustion", "i4_combustion", "v6_combustion",
"vehicle_controls", "v8_combustion", "hacksaw", "welder", "motor",
"goggles_welding", "solar_cell", "bearings",
"goggles_welding", "solar_cell", "bearing",
"motor_large", "storage_battery", "solar_panel", "jerrycan", "jerrycan_big", "metal_tank", "jack", NULL);
setvector(
@@ -568,7 +576,7 @@ void game::init_mapitems()
setvector(
&mapitems[mi_teleport],
"screwdriver", "wrench", "jumpsuit", "mask_dust",
"screwdriver", "wrench", "jumpsuit", "mask_dust", "wrapped_rad_badge",
"glasses_safety", "goggles_welding", "teleporter", "usb_drive",
NULL);
@@ -654,7 +662,7 @@ void game::init_mapitems()
&mapitems[mi_mil_rifles],
"556", "556_incendiary", "762_51", "762_51_incendiary",
"laser_pack", "12mm", "plasma", "m4a1", "scar_l", "scar_h",
"m249", "ftk93", "nx17", "hk_g80", "plasma_rifle",
"m249", "ftk93", "nx17", "hk_g80", "plasma_rifle", "brass_catcher",
"suppressor", "clip", "spare_mag", "m203", "UPS_off", "u_shotgun",
NULL);
@@ -667,13 +675,13 @@ void game::init_mapitems()
&mapitems[mi_mil_armor],
"pants_army", "kevlar", "vest", "mask_gas", "goggles_nv",
"helmet_army", "backpack", "UPS_off", "beltrig", "under_armor",
"boots", "armguard_hard", "power_armor_basic", "power_armor_frame",
"boots", "armguard_hard", "legguard_hard", "power_armor_basic", "power_armor_frame",
"helmet_army", "backpack", "UPS_off", "beltrig", "beret", NULL);
setvector(
&mapitems[mi_mil_accessories],
"mask_gas", "goggles_nv", "backpack", "UPS_off",
"armguard_hard", "power_armor_frame",
"mask_gas", "goggles_nv", "backpack", "UPS_off",
"armguard_hard", "legguard_hard", "power_armor_frame",
NULL);
setvector(
@@ -728,14 +736,14 @@ void game::init_mapitems()
"boots_steel", "pants_cargo", "shorts_cargo", "pants_army", "jumpsuit",
"jacket_leather", "kevlar", "vest", "gloves_fingerless",
"mask_filter", "mask_gas", "goggles_ski", "helmet_skid",
"armguard_hard", "under_armor", "long_underpants",
"armguard_hard", "legguard_hard", "under_armor", "long_underpants",
"helmet_ball", "helmet_riot", "helmet_motor", "holster",
"bootstrap", "UPS_off", "beltrig", "rucksack",
"emer_blanket", "cloak", NULL);
setvector(
&mapitems[mi_survival_tools],
"bandages", "1st_aid", "caffeine", "iodine", "electrohack",
"bandages", "1st_aid", "disinfectant", "caffeine", "iodine", "electrohack",
"string_36", "rope_30", "chain", "binoculars",
"bottle_plastic", "lighter", "matches", "sewing_kit", "thread", "extinguisher",
"flashlight", "crowbar", "chainsaw_off", "beartrap",
@@ -747,7 +755,7 @@ void game::init_mapitems()
"1st_aid", "motor", "hose", "screwdriver", "wrench", "pipe",
"boots", "jumpsuit", "coat_lab", "gloves_rubber",
"mask_filter", "glasses_safety", "hat_hard", "extinguisher",
"flashlight", "water_purifier", "two_way_radio",
"flashlight", "water_purifier",
"bio_tools", "bio_storage", "bio_flashlight",
"bio_lighter", "bio_magnet", "flyer",
"bio_purifier", "bio_climate", "bio_heatsink", "bio_blood_filter", NULL);
@@ -756,7 +764,7 @@ void game::init_mapitems()
&mapitems[mi_construction_worker],
"boots", "boots_steel", "jumpsuit", "gloves_rubber","gloves_leather",
"mask_filter", "glasses_safety", "hat_hard", "battery",
"flashlight", "two_way_radio", NULL);
"flashlight", NULL);
setvector(
&mapitems[mi_mine_storage],
@@ -767,11 +775,11 @@ void game::init_mapitems()
"water_clean", "1st_aid", "rope_30", "chain", "boots_steel",
"jumpsuit", "gloves_leather", "mask_filter", "mask_gas",
"glasses_safety", "goggles_welding", "goggles_nv", "hat_hard",
"backpack", "battery", "flashlight", "two_way_radio",
"backpack", "battery", "flashlight",
"jackhammer", "jacqueshammer", "dynamite", "UPS_off",
"bio_tools", "bio_flashlight", "bio_lighter", "bio_magnet",
"bio_resonator", "bio_hydraulics",
"jerrycan", "jerrycan_big", NULL);
"jerrycan", "jerrycan_big", "gasoline_lantern", NULL);
setvector(
@@ -783,12 +791,12 @@ void game::init_mapitems()
"cola", "caffeine", "cig", "weed", "amplifier",
"transponder", "receiver", "antenna", "screwdriver",
"battery", "mag_porn", "mag_tv", "manual_electronics",
"lighter", "flashlight", "two_way_radio", "radio", "mp3",
"lighter", "flashlight", "radio", "mp3",
"solar_cell", "flyer", "usb_drive", NULL);
setvector(
&mapitems[mi_toxic_dump_equipment],
"1st_aid", "iodine", "canister_empty", "boots_steel",
"1st_aid", "iodine", "canister_empty", "boots_steel", "wrapped_rad_badge",
"hazmat_suit", "mask_gas", "hat_hard", "textbook_carpentry",
"extinguisher", "radio", "geiger_off", "UPS_off", "flyer",
"bio_purifier", "bio_climate", "bio_heatsink", "bio_blood_filter", NULL);
@@ -798,7 +806,7 @@ void game::init_mapitems()
"wrapper", "string_6", "chain", "rock", "pipe",
"mag_porn", "bottle_plastic", "bottle_glass", "can_drink",
"can_food", "lighter", "matches", "flashlight", "rag", "crowbar",
"spray_can", "jar_glass", "flyer", NULL);
"spray_can", "jar_glass", "flyer", "gasoline_lanern", NULL);
setvector(
&mapitems[mi_sewer],
@@ -907,7 +915,7 @@ void game::init_mapitems()
"hard_plate", "motor", "motor_large", "hose", "pants_army",
"jumpsuit", "kevlar", "mask_gas", "helmet_army", "battery",
"plut_cell", "m249", "v8_combustion", "extinguisher",
"two_way_radio", "radio", "UPS_off", "beltrig",
"radio", "UPS_off", "beltrig",
"rucksack", "LAW_Packed", NULL);
// TODO: Replace kevlar with the ceramic plate armor
@@ -917,16 +925,16 @@ void game::init_mapitems()
"iodine", "codeine", "cig", "knife_combat", "boots_steel",
"pants_army", "kevlar", "vest", "gloves_fingerless",
"mask_gas", "glasses_safety", "goggles_nv", "hat_boonie",
"armguard_hard",
"armguard_hard", "legguard_hard",
"helmet_army", "backpack", "holster", "bootstrap", "9mm",
"45_acp", "556", "556_incendiary", "762_51",
"762_51_incendiary", "laser_pack", "40mm_concussive",
"40mm_frag", "40mm_incendiary", "40mm_teargas", "40mm_smoke",
"40mm_flashbang", "usp_9mm", "usp_45", "m4a1", "scar_l",
"scar_h", "m249", "ftk93", "nx17", "m320", "mgl",
"suppressor", "clip", "lighter", "flashlight", "two_way_radio",
"suppressor", "clip", "brass_catcher", "lighter", "flashlight",
"landmine", "grenade", "flashbang", "EMPbomb", "gasbomb",
"smokebomb", "UPS_off", "tazer", "c4", "hk_g80", "12mm",
"smokebomb", "UPS_off", "tazer", "c4", "hk_g80", "12mm", "flamethrower",
"binoculars", "u_shotgun", "beltrig", "power_armor_basic",
"power_armor_helmet_basic", "power_armor_frame", "spare_mag",
"canteen", "jerrycan", "rucksack", "heatpack", "LAW_Packed", NULL);
@@ -941,7 +949,7 @@ void game::init_mapitems()
"textbook_chemistry", "SICP", "textbook_robots",
"soldering_iron", "geiger_off", "teleporter", "canister_goo",
"EMPbomb", "pheromone", "portal", "bot_manhack", "UPS_off",
"tazer", "plasma", "usb_drive",
"tazer", "plasma", "usb_drive", "wrapped_rad_badge",
"bio_purifier", "bio_climate", "bio_heatsink", "bio_blood_filter",
"software_useless", "canteen", NULL);
@@ -952,7 +960,9 @@ void game::init_mapitems()
"plut_cell", "laser_pack", "m249", "v29", "ftk93", "nx17",
"conversion_battle", "conversion_sniper", "canister_goo",
"mininuke", "portal", "c4", "12mm", "hk_g80",
"power_armor_basic", "power_armor_helmet_basic", "power_armor_frame",
"power_armor_basic", "power_armor_helmet_basic", "power_armor_frame",
"power_armor_light", "power_armor_helmet_light",
"power_armor_heavy", "power_armor_helmet_heavy",
"plasma", "plasma_rifle", NULL);
setvector(
@@ -982,7 +992,7 @@ void game::init_mapitems()
"heroin", "syringe", "electrohack", "hatchet", "nailboard",
"knife_combat", "bat", "machete", "katana", "pants_cargo", "shorts_cargo",
"hoodie", "gloves_fingerless", "backpack", "holster",
"armguard_soft", "armguard_hard",
"armguard_soft", "armguard_hard", "legguard_hard",
"shot_00", "9mm", "45_acp", "glock_19", "shotgun_sawn",
"uzi", "tec9", "mac_10", "suppressor", "clip2", "autofire",
"mag_porn", "lighter", "matches", "crowbar", "pipebomb", "grenade",
@@ -1012,5 +1022,5 @@ void game::init_mapitems()
"dynamite_act", "firecracker_pack_act", "firecracker_act",
"mininuke_act", "UPS_on", "mp3_on", "c4armed", "apparatus",
"brazier", "rag_bloody", "candle_lit", "torch_lit",
"acidbomb_act", NULL);
"acidbomb_act", "huge_crossbow", "rep_crossbow", "vaccine_shot", "bio_claws_weapon", NULL);
}
+221
View File
@@ -0,0 +1,221 @@
#include <iostream>
#include <fstream>
#include <sstream>
#include "catajson.h"
#include "material.h"
#include "enums.h"
#include "game.h"
material_type::material_type()
{
_id = 0;
_ident = "null";
_name = "null";
_bash_resist = 0;
_cut_resist = 0;
_bash_dmg_verb = "damages";
_cut_dmg_verb = "damages";
_dmg_adj[0] = "lightly damaged";
_dmg_adj[1] = "damaged";
_dmg_adj[2] = "very damaged";
_dmg_adj[3] = "thoroughly damaged";
_acid_resist = 0;
_elec_resist = 0;
_fire_resist = 0;
_density = 1;
}
material_type::material_type(unsigned int id, std::string ident, std::string name,
int bash_resist, int cut_resist,
std::string bash_dmg_verb, std::string cut_dmg_verb,
std::string dmg_adj[], int acid_resist, int elec_resist, int fire_resist,
int density)
{
_id = id;
_ident = ident;
_name = name;
_bash_resist = bash_resist;
_cut_resist = cut_resist;
_bash_dmg_verb = bash_dmg_verb;
_cut_dmg_verb = bash_dmg_verb;
_dmg_adj[0] = dmg_adj[0];
_dmg_adj[1] = dmg_adj[1];
_dmg_adj[2] = dmg_adj[2];
_dmg_adj[3] = dmg_adj[3];
_acid_resist = acid_resist;
_elec_resist = elec_resist;
_fire_resist = fire_resist;
_density = density;
}
material_type::material_type(std::string ident)
{
material_type* mat_type = find_material(ident);
_id = mat_type->id();
_name = mat_type->name();
_bash_resist = mat_type->bash_resist();
_cut_resist = mat_type->cut_resist();
_bash_dmg_verb = mat_type->bash_dmg_verb();
_cut_dmg_verb = mat_type->bash_dmg_verb();
_dmg_adj[0] = mat_type->dmg_adj(1);
_dmg_adj[1] = mat_type->dmg_adj(2);
_dmg_adj[2] = mat_type->dmg_adj(3);
_dmg_adj[3] = mat_type->dmg_adj(4);
_acid_resist = mat_type->acid_resist();
_elec_resist = mat_type->elec_resist();
_fire_resist = mat_type->fire_resist();
_density = mat_type->density();
}
material_map material_type::_all_materials(material_type::load_materials());
material_map material_type::load_materials()
{
material_map allMaterials;
catajson materialsRaw("data/raw/materials.json");
unsigned int id = 0;
for (materialsRaw.set_begin(); materialsRaw.has_curr(); materialsRaw.next())
{
++id;
catajson currMaterial = materialsRaw.curr();
std::string ident = currMaterial.get("ident").as_string();
std::string name = currMaterial.get("name").as_string();
int bash_resist = currMaterial.get("bash_resist").as_int();
int cut_resist = currMaterial.get("cut_resist").as_int();
std::string bash_dmg_verb = currMaterial.get("bash_dmg_verb").as_string();
std::string cut_dmg_verb = currMaterial.get("cut_dmg_verb").as_string();
int acid_resist = currMaterial.get("acid_resist").as_int();
int elec_resist = currMaterial.get("elec_resist").as_int();
int fire_resist = currMaterial.get("fire_resist").as_int();
int density = currMaterial.get("density").as_int();
catajson adjList = currMaterial.get("dmg_adj");
std::string dmg_adj[4];
dmg_adj[0] = adjList.get(0).as_string();
dmg_adj[1] = adjList.get(1).as_string();
dmg_adj[2] = adjList.get(2).as_string();
dmg_adj[3] = adjList.get(3).as_string();
material_type newMaterial(id, ident, name, bash_resist, cut_resist, bash_dmg_verb,
cut_dmg_verb, dmg_adj, acid_resist, elec_resist, fire_resist, density);
allMaterials[ident] = newMaterial;
}
return allMaterials;
}
material_type* material_type::find_material(std::string ident)
{
material_map::iterator found = _all_materials.find(ident);
if(found != _all_materials.end()){
return &(found->second);
}
else
{
debugmsg("Tried to get invalid material: %s", ident.c_str());
return NULL;
}
}
material_type* material_type::base_material()
{
return material_type::find_material("null");
}
int material_type::dam_resist(damage_type damtype) const
{
switch (damtype)
{
case BASH:
return _bash_resist;
break;
case CUT:
return _cut_resist;
break;
case ACID:
return _acid_resist;
break;
case ELECTRICITY:
return _elec_resist;
break;
case FIRE:
return _fire_resist;
break;
default:
return 0;
break;
}
}
bool material_type::is_null() const
{
return (_ident == "null");
}
unsigned int material_type::id() const
{
return _id;
}
std::string material_type::ident() const
{
return _ident;
}
std::string material_type::name() const
{
return _name;
}
int material_type::bash_resist() const
{
return _bash_resist;
}
int material_type::cut_resist() const
{
return _cut_resist;
}
std::string material_type::bash_dmg_verb() const
{
return _bash_dmg_verb;
}
std::string material_type::cut_dmg_verb() const
{
return _cut_dmg_verb;
}
std::string material_type::dmg_adj(int dam) const
{
int tmpdam = dam - 1;
// bounds check
if (tmpdam < 0 || tmpdam >= 4)
return "";
return _dmg_adj[tmpdam];
}
int material_type::acid_resist() const
{
return _acid_resist;
}
int material_type::elec_resist() const
{
return _elec_resist;
}
int material_type::fire_resist() const
{
return _fire_resist;
}
int material_type::density() const
{
return _density;
}
+63
View File
@@ -0,0 +1,63 @@
#ifndef _MATERIALS_H_
#define _MATERIALS_H_
#include <string>
#include <map>
#include "enums.h"
class material_type;
typedef std::map<std::string, material_type> material_map;
class material_type
{
private:
unsigned int _id;
std::string _ident;
std::string _name;
int _bash_resist; // negative integers means susceptibility
int _cut_resist;
std::string _bash_dmg_verb;
std::string _cut_dmg_verb;
std::string _dmg_adj[4];
int _acid_resist;
int _elec_resist;
int _fire_resist;
int _density; // relative to "powder", which is 1
public:
material_type();
material_type(unsigned int id, std::string ident, std::string name,
int bash_resist, int cut_resist,
std::string bash_dmg_verb, std::string cut_dmg_verb,
std::string dmg_adj[], int acid_resist, int elec_resist, int fire_resist,
int density);
material_type(std::string ident);
static material_map _all_materials;
static material_map load_materials();
// functions
static material_type* find_material(std::string ident);
// static material_type* find_material_from_tag(material mat);
static material_type* base_material(); // null material
int dam_resist(damage_type damtype) const;
unsigned int id() const;
bool is_null() const;
std::string ident() const;
std::string name() const;
int bash_resist() const;
int cut_resist() const;
std::string bash_dmg_verb() const;
std::string cut_dmg_verb() const;
std::string dmg_adj(int dam) const;
int acid_resist() const;
int elec_resist() const;
int fire_resist() const;
int density() const;
};
#endif // _MATERIALS_H_
+85 -48
View File
@@ -40,7 +40,7 @@ bool player::is_armed()
bool player::unarmed_attack()
{
return (weapon.typeId() == "null" || weapon.is_style() ||
weapon.has_flag(IF_UNARMED_WEAPON));
weapon.has_flag("UNARMED_WEAPON"));
}
int player::base_to_hit(bool real_life, int stat)
@@ -90,7 +90,7 @@ int player::hit_roll()
}
// Using a spear?
if (weapon.has_flag(IF_SPEAR) || weapon.has_flag(IF_STAB)) {
if (weapon.has_flag("SPEAR") || weapon.has_flag("STAB")) {
int stab_bonus = int(skillLevel("stabbing") / 2);
if (stab_bonus > best_bonus)
best_bonus = stab_bonus;
@@ -107,7 +107,8 @@ int player::hit_roll()
}
// Farsightedness makes us hit worse
if (has_trait(PF_HYPEROPIC) && !is_wearing("glasses_reading")) {
if (has_trait(PF_HYPEROPIC) && !is_wearing("glasses_reading")
&& !is_wearing("glasses_bifocal")) {
numdice -= 2;
}
@@ -153,7 +154,7 @@ int player::hit_mon(game *g, monster *z, bool allow_grab) // defaults to true
}
melee_practice(g->turn, *this, false, unarmed_attack(),
weapon.is_bashing_weapon(), weapon.is_cutting_weapon(),
(weapon.has_flag(IF_SPEAR) || weapon.has_flag(IF_STAB)));
(weapon.has_flag("SPEAR") || weapon.has_flag("STAB")));
move_cost += stumble_pen;
if (weapon.has_technique(TEC_FEINT, this))
move_cost = rng(move_cost / 3, move_cost);
@@ -170,12 +171,6 @@ int player::hit_mon(game *g, monster *z, bool allow_grab) // defaults to true
int pain = 0; // Boost to pain; required for perform_technique
// Moves lost to getting your weapon stuck
int stuck_penalty = roll_stuck_penalty(z, (stab_dam >= cut_dam));
if (weapon.is_style())
stuck_penalty = 0;
moves -= stuck_penalty;
// Pick one or more special attacks
technique_id technique = pick_technique(g, z, NULL, critical_hit, allow_grab);
@@ -197,7 +192,9 @@ int player::hit_mon(game *g, monster *z, bool allow_grab) // defaults to true
int dam = bash_dam + (cut_dam > stab_dam ? cut_dam : stab_dam);
hit_message(g, You.c_str(), verb.c_str(), target.c_str(), dam, critical_hit);
if( g->u_see( z ) ) {
hit_message(g, You.c_str(), verb.c_str(), target.c_str(), dam, critical_hit);
}
bool bashing = (bash_dam >= 10 && !unarmed_attack());
bool cutting = (cut_dam >= 10);
@@ -254,7 +251,7 @@ void player::hit_player(game *g, player &p, bool allow_grab)
}
melee_practice(g->turn, *this, false, unarmed_attack(),
weapon.is_bashing_weapon(), weapon.is_cutting_weapon(),
(weapon.has_flag(IF_SPEAR) || weapon.has_flag(IF_STAB)));
(weapon.has_flag("SPEAR") || weapon.has_flag("STAB")));
move_cost += stumble_pen;
if (weapon.has_technique(TEC_FEINT, this))
move_cost = rng(move_cost / 3, move_cost);
@@ -298,12 +295,6 @@ void player::hit_player(game *g, player &p, bool allow_grab)
int pain = 0; // Boost to pain; required for perform_technique
// Moves lost to getting your weapon stuck
int stuck_penalty = roll_stuck_penalty(NULL, (stab_dam >= cut_dam));
if (weapon.is_style())
stuck_penalty = 0;
moves -= stuck_penalty;
// Pick one or more special attacks
technique_id technique = pick_technique(g, NULL, &p, critical_hit, allow_grab);
@@ -424,7 +415,7 @@ bool player::scored_crit(int target_dodge)
best_skill = skillLevel("bashing");
if (weapon.is_cutting_weapon() && skillLevel("cutting") > best_skill)
best_skill = skillLevel("cutting");
if ((weapon.has_flag(IF_SPEAR) || weapon.has_flag(IF_STAB)) &&
if ((weapon.has_flag("SPEAR") || weapon.has_flag("STAB")) &&
skillLevel("stabbing") > best_skill)
best_skill = skillLevel("stabbing");
if (unarmed_attack() && skillLevel("unarmed") > best_skill)
@@ -583,7 +574,7 @@ int player::roll_bash_damage(monster *z, bool crit)
int player::roll_cut_damage(monster *z, bool crit)
{
if (weapon.has_flag(IF_SPEAR))
if (weapon.has_flag("SPEAR"))
return 0; // Stabs, doesn't cut!
int z_armor_cut = (z == NULL ? 0 : z->armor_cut() - skillLevel("cutting") / 2);
@@ -592,7 +583,7 @@ int player::roll_cut_damage(monster *z, bool crit)
if (z_armor_cut < 0)
z_armor_cut = 0;
int ret = weapon.damage_cut() - z_armor_cut;
double ret = weapon.damage_cut() - z_armor_cut;
if (unarmed_attack() && !wearing_something_on(bp_hands)) {
if (has_trait(PF_CLAWS))
@@ -608,19 +599,19 @@ int player::roll_cut_damage(monster *z, bool crit)
// 80%, 88%, 96%, 104%, 112%, 116%, 120%, 124%, 128%, 132%
if (skillLevel("cutting") <= 5)
ret *= double( 0.8 + 0.08 * skillLevel("cutting") );
ret *= 0.8 + 0.08 * skillLevel("cutting");
else
ret *= double( 0.92 + 0.04 * skillLevel("cutting") );
ret *= 0.92 + 0.04 * skillLevel("cutting");
if (crit)
ret *= double( 1.0 + double(skillLevel("cutting") / 12) );
ret *= 1.0 + (skillLevel("cutting") / 12.0);
return ret;
}
int player::roll_stab_damage(monster *z, bool crit)
{
int ret = 0;
double ret = 0;
int z_armor = (z == NULL ? 0 : z->armor_cut() - 3 * skillLevel("stabbing"));
if (crit)
@@ -636,7 +627,7 @@ int player::roll_stab_damage(monster *z, bool crit)
ret++;
if (has_trait(PF_THORNS))
ret += 4;
} else if (weapon.has_flag(IF_SPEAR) || weapon.has_flag(IF_STAB))
} else if (weapon.has_flag("SPEAR") || weapon.has_flag("STAB"))
ret = int((weapon.damage_cut() - z_armor) / 4);
else
return 0; // Can't stab at all!
@@ -654,7 +645,7 @@ int player::roll_stab_damage(monster *z, bool crit)
return 0; // No negative stabbing!
if (crit) {
int multiplier = double( 1.0 + double(skillLevel("stabbing") / 5) );
double multiplier = 1.0 + (skillLevel("stabbing") / 5.0);
if (multiplier > 2.5)
multiplier = 2.5;
ret *= multiplier;
@@ -663,21 +654,67 @@ int player::roll_stab_damage(monster *z, bool crit)
return ret;
}
// Chance of a weapon sticking is based on weapon attack type.
// Only an issue for cutting and piercing weapons.
// Attack modes are "CHOP", "STAB", and "SLICE".
// "SPEAR" is synonymous with "STAB".
// Weapons can have a "low_stick" flag indicating they
// Have a feature to prevent sticking, such as a spear with a crossbar,
// Or a stabbing blade designed to resist sticking.
int player::roll_stuck_penalty(monster *z, bool stabbing)
{
int ret = 0;
int basharm = (z == NULL ? 6 : z->armor_bash()),
cutarm = (z == NULL ? 6 : z->armor_cut());
if (stabbing)
ret = weapon.damage_cut() * 3 + basharm * 3 + cutarm * 3 -
dice(skillLevel("stabbing"), 10);
else
ret = weapon.damage_cut() * 4 + basharm * 5 + cutarm * 4 -
dice(skillLevel("cutting"), 10);
// The cost of the weapon getting stuck, in units of move points.
const int weapon_speed = attack_speed( *this, false );
int stuck_cost = weapon_speed;
const int attack_skill = stabbing ? skillLevel("stabbing") : skillLevel("cutting");
const float cut_damage = weapon.damage_cut();
const float bash_damage = weapon.damage_bash();
float cut_bash_ratio = 0.0;
if (ret >= weapon.damage_cut() * 10)
return weapon.damage_cut() * 10;
return (ret < 0 ? 0 : ret);
// Scale cost along with the ratio between cutting and bashing damage of the weapon.
if( cut_damage > 0.0 || bash_damage > 0.0 )
{
cut_bash_ratio = cut_damage / ( cut_damage + bash_damage );
}
stuck_cost *= cut_bash_ratio;
if( weapon.has_flag("SLICE") )
{
// Slicing weapons assumed to have a very low chance of sticking.
stuck_cost *= 0.25;
}
else if( weapon.has_flag("STAB") || weapon.has_flag("SPEAR") )
{
// Stabbing has a moderate change of sticking.
stuck_cost *= 0.50;
}
else if( weapon.has_flag("CHOP") )
{
// Chopping has a high chance of sticking.
stuck_cost *= 1.00;
}
else
{
// Items with no attack type are assumed to be improvised weapons,
// and get a very high stick cost.
stuck_cost *= 2.00;
}
if( weapon.has_flag("NON_STUCK") )
{
// Greatly reduce sticking frequency/severity if the weapon has an anti-sticking feature.
stuck_cost /= 4;
}
// Reduce cost based on player skill, by 10.5 move/level on average.
stuck_cost -= dice( attack_skill, 20 );
// Make sure cost doesn't go negative.
stuck_cost = std::max( stuck_cost, 0 );
// Cap stuck penalty at 2x weapon speed.
stuck_cost = std::min( stuck_cost, 2*weapon_speed );
return stuck_cost;
}
technique_id player::pick_technique(game *g, monster *z, player *p,
@@ -719,7 +756,7 @@ technique_id player::pick_technique(game *g, monster *z, player *p,
if (possible.empty()) { // Use non-crits only if any crit-onlies aren't used
if (weapon.has_technique(TEC_DISARM, this) && !z &&
p->weapon.typeId() != "null" && !p->weapon.has_flag(IF_UNARMED_WEAPON) &&
p->weapon.typeId() != "null" && !p->weapon.has_flag("UNARMED_WEAPON") &&
dice( dex_cur + skillLevel("unarmed"), 8) >
dice(p->dex_cur + p->skillLevel("melee"), 10))
possible.push_back(TEC_DISARM);
@@ -918,7 +955,7 @@ technique_id player::pick_defensive_technique(game *g, monster *z, player *p)
if (weapon.has_technique(TEC_DEF_DISARM, this) &&
z == NULL && p->weapon.typeId() != "null" &&
!p->weapon.has_flag(IF_UNARMED_WEAPON) &&
!p->weapon.has_flag("UNARMED_WEAPON") &&
dice( dex_cur + skillLevel("unarmed"), 8) >
dice(p->dex_cur + p->skillLevel("melee"), 10))
return TEC_DEF_DISARM;
@@ -1187,7 +1224,7 @@ void player::melee_special_effects(game *g, monster *z, player *p, bool crit,
}
// Glass weapons shatter sometimes
if (weapon.made_of(GLASS) &&
if (weapon.made_of("glass") &&
rng(0, weapon.volume() + 8) < weapon.volume() + str_cur) {
if (can_see)
g->add_msg("%s %s shatters!", Your.c_str(), weapon.tname(g).c_str());
@@ -1204,7 +1241,7 @@ void player::melee_special_effects(game *g, monster *z, player *p, bool crit,
// Getting your weapon stuck
int cutting_penalty = roll_stuck_penalty(z, stab_dam > cut_dam);
if (weapon.has_flag(IF_MESSY)) { // e.g. chainsaws
if (weapon.has_flag("MESSY")) { // e.g. chainsaws
cutting_penalty /= 6; // Harder to get stuck
for (int x = tarposx - 1; x <= tarposx + 1; x++) {
for (int y = tarposy - 1; y <= tarposy + 1; y++) {
@@ -1223,7 +1260,7 @@ void player::melee_special_effects(game *g, monster *z, player *p, bool crit,
g->add_msg("Your %s gets stuck in %s, pulling it out of your hands!",
weapon.tname().c_str(), target.c_str());
if (mon) {
if (weapon.has_flag(IF_SPEAR) || weapon.has_flag(IF_STAB))
if (weapon.has_flag("SPEAR") || weapon.has_flag("STAB"))
z->speed *= .7;
else
z->speed *= .85;
@@ -1240,7 +1277,7 @@ void player::melee_special_effects(game *g, monster *z, player *p, bool crit,
if (cutting_penalty >= 50 && is_u)
g->add_msg("Your %s gets stuck in %s, but you yank it free.",
weapon.tname().c_str(), target.c_str());
if (mon && (weapon.has_flag(IF_SPEAR) || weapon.has_flag(IF_STAB)))
if (mon && (weapon.has_flag("SPEAR") || weapon.has_flag("STAB")))
z->speed *= .9;
}
@@ -1485,7 +1522,7 @@ std::string melee_verb(technique_id tech, std::string your, player &p,
// verb should be based on how the weapon is used, and the total damage inflicted
// if it's a stabbing weapon or a spear
if (p.weapon.has_flag(IF_SPEAR) || (p.weapon.has_flag(IF_STAB) && stab_dam > cut_dam))
if (p.weapon.has_flag("SPEAR") || (p.weapon.has_flag("STAB") && stab_dam > cut_dam))
{
if (bash_dam + stab_dam + cut_dam >= 30)
return "impale" + s;
@@ -1548,13 +1585,13 @@ void melee_practice(const calendar& turn, player &u, bool hit, bool unarmed,
}
// type of weapon used determines order of practice
if (u.weapon.has_flag(IF_SPEAR))
if (u.weapon.has_flag("SPEAR"))
{
if (stabbing) first = "stabbing";
if (bashing) second = "bashing";
if (cutting) third = "cutting";
}
else if (u.weapon.has_flag(IF_STAB))
else if (u.weapon.has_flag("STAB"))
{
// stabbity weapons have a 50-50 chance of raising either stabbing or cutting first
if (one_in(2))
+601
View File
@@ -222,6 +222,607 @@ of those things now. Can you put her out of her misery for me?";
return "Really... that's too bad.";
}
break;
//patriot mission 1
case MISSION_GET_FLAG:
switch (state) {
case TALK_MISSION_DESCRIBE:
return "Does our flag still yet wave?";
case TALK_MISSION_OFFER:
return "Does our flag still yet wave? We're battered but not yet out of the\
fight, we need the old colors!";
case TALK_MISSION_ACCEPTED:
return "\
Hell ya! Find me one of those big ol' American flags.";
case TALK_MISSION_REJECTED:
return "Seriously? God damned commie...";
case TALK_MISSION_ADVICE:
return "Find a large federal building or school, they must have one.";
case TALK_MISSION_INQUIRE:
return "Rescued the standard yet?";
case TALK_MISSION_SUCCESS:
return "America, fuck ya!";
case TALK_MISSION_SUCCESS_LIE:
return "What?! You liar!";
case TALK_MISSION_FAILURE:
return "You give up? This country fell apart because no one could find a\
good man to rely on... might as well give up, I guess.";
}
break;
//patriot mission 2
case MISSION_GET_BLACK_BOX:
switch (state) {
case TALK_MISSION_DESCRIBE:
return "We've got the flag, now we need to locate US forces.";
case TALK_MISSION_OFFER:
return "We have the flag but now we need to locate US troops to see\
what we can do to help. I haven't seen any but I'm figure'n one of\
those choppers that were fly'n round during th outbreak would have a good\
idea. If you can get me a black box from one of the wrecks I'll look\
into where we might open'er at.";
case TALK_MISSION_ACCEPTED:
return "\
Fuck ya, America!";
case TALK_MISSION_REJECTED:
return "Do you have any better ideas?";
case TALK_MISSION_ADVICE:
return "Survivors were talking about them crashing but I don't know\
where. If I were a pilot I'd avoid crash landing in a city or forest\
though.";
case TALK_MISSION_INQUIRE:
return "How 'bout that black box?";
case TALK_MISSION_SUCCESS:
return "America, fuck ya!";
case TALK_MISSION_SUCCESS_LIE:
return "What?! I out'ta whip you're ass.";
case TALK_MISSION_FAILURE:
return "Damn, I'll have to find'er myself.";
}
break;
//patriot mission 3
case MISSION_GET_BLACK_BOX_TRANSCRIPT:
switch (state) {
case TALK_MISSION_DESCRIBE:
return "With the black box in hand, we need to find a lab.";
case TALK_MISSION_OFFER:
return "Thanks to your searching we've got the black box but now we\
need to have a look'n-side her. Now, most buildings don't have power\
anymore but there are a few that might be of use. Have you ever seen\
one of those science labs that have popped up in the middle of nowhere?\
Them suckers have a glowing terminal out front so I know they have power\
somewhere inside'em. If you can get inside and find a computer lab that\
still works you ought to be able to find out what's in the black box.";
case TALK_MISSION_ACCEPTED:
return "\
Fuck ya, America!";
case TALK_MISSION_REJECTED:
return "Do you have any better ideas?";
case TALK_MISSION_ADVICE:
return "When I was play'n with the terminal for the one I ran into it\
kept asking for an ID card. Finding one would be the first order of business.";
case TALK_MISSION_INQUIRE:
return "How 'bout that black box?";
case TALK_MISSION_SUCCESS:
return "America, fuck ya! I was in the guard a few years back so I'm\
confident I can make heads-or-tails of these transmissions.";
case TALK_MISSION_SUCCESS_LIE:
return "What?! I out'ta whip you're ass.";
case TALK_MISSION_FAILURE:
return "Damn, I maybe we can find an egg-head to crack the terminal.";
}
break;
//patriot mission 4
case MISSION_EXPLORE_SARCOPHAGUS:
switch (state) {
case TALK_MISSION_DESCRIBE:
return "You wouldn't believe what I found...";
case TALK_MISSION_OFFER:
return "Holy hell, the crash you recovered the black box from wasn't as old as I thought. \
Check this out, it was on its approach to pick up a team sent to secure and destroy something called a \
'Hazardous Waste Sarcophagus' in the middle of nowhere. If the bird never picked up the team then we \
may still have a chance to meet up with them. It includes an access code for the elevator and an encoded \
message for the team leader, I guess. If we want to join up with what remains of the government then now \
may be our only chance.";
case TALK_MISSION_ACCEPTED:
return "\
Fuck ya, America!";
case TALK_MISSION_REJECTED:
return "Are you going to forfeit your duty when the country needs you the most?";
case TALK_MISSION_ADVICE:
return "If there is a military team down there then we better go in prepared if we want to \
impress them. Carry as much ammo as you can and prepare to ditch this place if they have a second \
bird coming to pick them up.";
case TALK_MISSION_INQUIRE:
return "Having any trouble following the map?";
case TALK_MISSION_SUCCESS:
return "We got this shit!";
case TALK_MISSION_SUCCESS_LIE:
return "What?! I out'ta whip your ass.";
case TALK_MISSION_FAILURE:
return "Damn, we were so close.";
}
break;
//martyr mission 1
case MISSION_GET_RELIC:
switch (state) {
case TALK_MISSION_DESCRIBE:
return "St. Michael the archangel defend me in battle...";
case TALK_MISSION_OFFER:
return "As the world seems to abandon the reality that we once knew, it \
becomes plausible that the old superstitions that were cast aside may \
have had some truth to them. Please go and find me a religious relic...\
I doubt it will be of much use but I've got to hope in something.";
case TALK_MISSION_ACCEPTED:
return "\
I wish you the best of luck, may whatever god you please guide your path.";
case TALK_MISSION_REJECTED:
return "Ya, I guess the stress may just be getting to me...";
case TALK_MISSION_ADVICE:
return "I suppose a large church or cathedral may have something.";
case TALK_MISSION_INQUIRE:
return "Any luck?";
case TALK_MISSION_SUCCESS:
return "Thank you, I need some time alone now...";
case TALK_MISSION_SUCCESS_LIE:
return "What good does this do us?";
case TALK_MISSION_FAILURE:
return "It was a lost cause anyways...";
}
break;
//martyr mission 2
case MISSION_RECOVER_PRIEST_DIARY:
switch (state) {
case TALK_MISSION_DESCRIBE:
return "St. Michael the archangel defend me in battle...";
case TALK_MISSION_OFFER:
return "From what I understand, the creatures you encountered \
surrounding this relic were unlike anything I've heard of. It is \
laughable that I now consider the living dead to be part of our \
ordinary reality. Never-the-less, the church must have some explanation \
for these events. I have located the residence of a local clergy man, \
could you go to this address and recover any items that may reveal what \
the church's stance is on these events?";
case TALK_MISSION_ACCEPTED:
return "\
I wish you the best of luck, may whatever god you please guide your path.";
case TALK_MISSION_REJECTED:
return "Ya, I guess the stress may just be getting to me...";
case TALK_MISSION_ADVICE:
return "If the information is confidential the priest must have it hidden \
within his own home.";
case TALK_MISSION_INQUIRE:
return "Any luck?";
case TALK_MISSION_SUCCESS:
return "Thank you, a diary is exactly what I was looking for.";
case TALK_MISSION_SUCCESS_LIE:
return "What good does this do us?";
case TALK_MISSION_FAILURE:
return "It was a lost cause anyways...";
}
break;
//martyr mission 3
case MISSION_INVESTIGATE_CULT:
switch (state) {
case TALK_MISSION_DESCRIBE:
return "St. Michael the archangel defend me in battle...";
case TALK_MISSION_OFFER:
return "You have no idea how interesting this diary is. I have two \
very promising leads... First things first, the Catholic Church has been \
performing its own investigations into global cult phenomenon and it appears \
to have become very interested in a local cult as of recently. Could you investigate \
a location for me? I'm not sure what was going on here but the priest seemed \
fairly worried about it.";
case TALK_MISSION_ACCEPTED:
return "\
I wish you the best of luck, may whatever god you please guide your path... You may need it \
this time more than the past excursions you have gone on. There is a note about potential human \
sacrifice in the days immediately before and after the outbreak. The name of the cult is believed \
to be the Church of Starry Wisdom but it is noted that accounts differ.";
case TALK_MISSION_REJECTED:
return "Ya, I guess the stress may just be getting to me...";
case TALK_MISSION_ADVICE:
return "I doubt the site is still occupied but I'd carry a firearm at least... I'm not sure what \
you might be looking for but I'm positive you'll find something out of the ordinary if you look long \
enough.";
case TALK_MISSION_INQUIRE:
return "I'm positive there is something there... there has to be, any luck?";
case TALK_MISSION_SUCCESS:
return "Thank you, your account of these... demonic creations proves the fears the churches \
had were well founded. Our priority should be routing out any survivors of this cult... I don't \
known if they are responsible for the outbreak but they certainly know more about it than I do.";
case TALK_MISSION_SUCCESS_LIE:
return "What good does this do us?";
case TALK_MISSION_FAILURE:
return "It was a lost cause anyways...";
}
break;
//martyr mission 4
case MISSION_INVESTIGATE_PRISON_VISIONARY:
switch (state) {
case TALK_MISSION_DESCRIBE:
return "St. Michael the archangel defend me in battle...";
case TALK_MISSION_OFFER:
return "I have another task if you are feeling up to it. There is a prisoner that \
the priest made special mention of. I was wondering if you could see \
what may have happened to him or if he left anything in his cell. The priest admits the individual is rather \
unstable, to put it lightly, but the priest personally believed the man was some kind of repentant visionary. I'm \
not in a position to cast out the account just yet... it seems the man has prophesied events accurately before \
concerning the Church of Starry Wisdom.";
case TALK_MISSION_ACCEPTED:
return "\
I wish you the best of luck, may whatever god you please guide your path... I can only imagine that the prison \
will be a little slice of hell. I'm not sure what they would have decided to do with the inmates when they knew \
death was almost certain. ";
case TALK_MISSION_REJECTED:
return "Ya, I guess the stress may just be getting to me...";
case TALK_MISSION_ADVICE:
return "The worst case scenario will probably be that the prisoners have escaped their cells and turned the \
building into their own little fortress. Best case, the building went into lock-down and secured the prisoners in \
their cells. Either way, navigating the building will pose its own difficulties.";
case TALK_MISSION_INQUIRE:
return "Any luck?";
case TALK_MISSION_SUCCESS:
return "Thank you, I'm not sure what to make of this but I'll ponder your account.";
case TALK_MISSION_SUCCESS_LIE:
return "What good does this do us?";
case TALK_MISSION_FAILURE:
return "It was a lost cause anyways...";
}
break;
case MISSION_GET_RECORD_WEATHER:
switch (state) {
case TALK_MISSION_DESCRIBE:
return "I wonder if a retreat might exist...";
case TALK_MISSION_OFFER:
return "Everyone who dies gets back up, right? Which means that whatever \
is causing this it must be airborne to have infected everyone. I believe that \
if that is the case then there should be regions that were not downwind from \
where-ever the disease was released. We need to find a record of all the \
weather patterns leading up to the outbreak.";
case TALK_MISSION_ACCEPTED:
return "\
Thanks so much, you may save both of us yet.";
case TALK_MISSION_REJECTED:
return "Ya, it was a long shot I admit.";
case TALK_MISSION_ADVICE:
return "I'm not sure, maybe a news station would have what we are looking?";
case TALK_MISSION_INQUIRE:
return "Any luck?";
case TALK_MISSION_SUCCESS:
return "These look more complicated than I thought, just give me some time.";
case TALK_MISSION_SUCCESS_LIE:
return "This isn't what we need.";
case TALK_MISSION_FAILURE:
return "If only we could find a great valley or something.";
}
break;
//humanitarian mission 1
case MISSION_GET_RECORD_PATIENT:
switch (state) {
case TALK_MISSION_DESCRIBE:
return "I hope I don't see many names I know...";
case TALK_MISSION_OFFER:
return "I've lost so many friends... please find me a patient list from the \
regional hospital or doctor's office. I just want to know who might still be out there.";
case TALK_MISSION_ACCEPTED:
return "\
Thank you, I suppose it wont change what has already happened but it will bring me closure.";
case TALK_MISSION_REJECTED:
return "Please, I just want to know what happened to everyone.";
case TALK_MISSION_ADVICE:
return "I bet you'll run into a lot of those things in the hospital, please be careful.";
case TALK_MISSION_INQUIRE:
return "Any luck?";
case TALK_MISSION_SUCCESS:
return "Oh dear, I thought Timmy would have made it...";
case TALK_MISSION_SUCCESS_LIE:
return "Thanks for trying... I guess.";
case TALK_MISSION_FAILURE:
return "I bet some of them are still out there...";
}
break;
//humanitarian mission 2
case MISSION_REACH_FEMA_CAMP:
switch (state) {
case TALK_MISSION_DESCRIBE:
return "Maybe they escaped to one of the camps...";
case TALK_MISSION_OFFER:
return "I can't thank you enough for bringing me the patient records but I do have \
another request. You seem to know your way around... could you take me to one of the \
FEMA camps? I know some were overrun but I don't want to believe all of them could have \
fallen.";
case TALK_MISSION_ACCEPTED:
return "\
Thank you, just bring me to the camp... I just want to see.";
case TALK_MISSION_REJECTED:
return "Please, I don't know what else to do.";
case TALK_MISSION_ADVICE:
return "We should go at night, if it is overrun then we can quickly make our escape.";
case TALK_MISSION_INQUIRE:
return "Any leads on where a camp might be?";
case TALK_MISSION_SUCCESS:
return "I guess this wasn't as bright an idea as I thought.";
case TALK_MISSION_SUCCESS_LIE:
return "Thanks for trying... I guess.";
case TALK_MISSION_FAILURE:
return "I bet some of them are still out there...";
}
break;
//humanitarian mission 3
case MISSION_REACH_FARM_HOUSE:
switch (state) {
case TALK_MISSION_DESCRIBE:
return "I just need a place to start over...";
case TALK_MISSION_OFFER:
return "I've accepted that everyone I used to know is dead... one way or another. I \
really wish I could have done something to save my brother but he was one of the first to go. \
I'd like to start over, just rebuild at one of the farms in the countryside. Can you help me \
secure one?";
case TALK_MISSION_ACCEPTED:
return "\
Thank you, let's find a remote one so we don't have to worry about many zombies.";
case TALK_MISSION_REJECTED:
return "Please, I just don't know what to do otherwise.";
case TALK_MISSION_ADVICE:
return "Traveling the backroads would be a good way to search for one.";
case TALK_MISSION_INQUIRE:
return "Shall we keep looking for a farm house?";
case TALK_MISSION_SUCCESS:
return "Well, my adventuring days are over. I can't thank you enough. Trying to make \
this place self sustaining will take some work but the future is looking brighter. At least it \
ought to be safe for now. You'll always be welcome here.";
case TALK_MISSION_SUCCESS_LIE:
return "Thanks for trying... I guess.";
case TALK_MISSION_FAILURE:
return "I guess it was just a pipe dream.";
}
break;
//vigilante mission 1
case MISSION_GET_RECORD_ACCOUNTING:
switch (state) {
case TALK_MISSION_DESCRIBE:
return "Those twisted snakes...";
case TALK_MISSION_OFFER:
return "Our world fell apart because our leaders were as crooked as the con-men that \
paid for their elections. Just find me one of those corporate accounting books and I'll \
show you and the rest of the world just who is at fault.";
case TALK_MISSION_ACCEPTED:
return "\
You'll see, I know I'm right.";
case TALK_MISSION_REJECTED:
return "I know it isn't pressing but the big corporations didn't get a chance to destroy \
the evidence yet.";
case TALK_MISSION_ADVICE:
return "Try a big corporate building of some sort, they're bound to have an accounting department.";
case TALK_MISSION_INQUIRE:
return "Any luck?";
case TALK_MISSION_SUCCESS:
return "Great, let's see... uh... hmmm... Fine, I didn't even do my own taxes but I'm sure this \
will prove their guilt if we get an expert to examine it.";
case TALK_MISSION_SUCCESS_LIE:
return "Thanks for trying... I guess.";
case TALK_MISSION_FAILURE:
return "The day of reckoning will come for the corporations if it hasn't already.";
}
break;
//vigilante mission 2
case MISSION_GET_SAFE_BOX:
switch (state) {
case TALK_MISSION_DESCRIBE:
return "Those twisted snakes...";
case TALK_MISSION_OFFER:
return "Now I don't mean to upset you but I'm not sure what I can do with the accounting ledger at the \
moment. We do have a new lead though, the ledger has a safe deposit box under the regional manager's name. \
Guess what, dumb sucker wrote down his combination. Come with me to retrieve the box and you can keep any \
of the goodies in it that I can't use to press charges against these bastards.";
case TALK_MISSION_ACCEPTED:
return "\
You may make a tidy profit from this.";
case TALK_MISSION_REJECTED:
return "I know it isn't pressing but the world is going to be just as corrupt when we start rebuilding unless \
we take measure to stop those who seek to rule over us.";
case TALK_MISSION_ADVICE:
return "This shouldn't be hard unless we run into a horde.";
case TALK_MISSION_INQUIRE:
return "Any luck?";
case TALK_MISSION_SUCCESS:
return "Great, anything I can't use to prosecute the bastards is yours, as promised.";
case TALK_MISSION_SUCCESS_LIE:
return "Thanks for trying... I guess.";
case TALK_MISSION_FAILURE:
return "The day of reckoning will come for the corporations if it hasn't already.";
}
break;
//vigilante mission 3
case MISSION_GET_DEPUTY_BADGE:
switch (state) {
case TALK_MISSION_DESCRIBE:
return "Those twisted snakes...";
case TALK_MISSION_OFFER:
return "I hope you will find use from what you got out of the deposit box but I also have another job for you \
that might lead you to an opportunity to deal out justice for those who cannot. First things first, we can't just \
look like ruffians. Find us a deputy badge, easy enough?";
case TALK_MISSION_ACCEPTED:
return "\
I'd check the police station.";
case TALK_MISSION_REJECTED:
return "We're also official... just hang in there and I'll show you what we can really do.";
case TALK_MISSION_ADVICE:
return "They shouldn't be that hard to find... should they?";
case TALK_MISSION_INQUIRE:
return "Any luck?";
case TALK_MISSION_SUCCESS:
return "Great work, Deputy. We're in business.";
case TALK_MISSION_SUCCESS_LIE:
return "Thanks for trying... I guess.";
case TALK_MISSION_FAILURE:
return "The day of reckoning will come for the criminals if it hasn't already.";
}
break;
//demon slayer mission 1
case MISSION_KILL_JABBERWOCK:
switch (state) {
case TALK_MISSION_DESCRIBE:
return "The eater of the dead... something was ripping zombies to shreds and only leaving a few scattered limbs...";
case TALK_MISSION_OFFER:
return "A few days ago another survivor and I were trying to avoid the cities by staying in the woods \
during the day and foraging for gear at night. It worked well against the normal zed's but one night something \
caught onto our trail and chased us for ten minutes or so until we decided to split up and meet-up back here. My \
buddy never showed up and I don't have the means to kill whatever it was. Can you lend a hand?";
case TALK_MISSION_ACCEPTED:
return "\
Thanks, make sure you're ready for whatever the beast is.";
case TALK_MISSION_REJECTED:
return "Hey, I know I wouldn't volunteer for it either.";
case TALK_MISSION_ADVICE:
return "I'd carry a shotgun at least, it sounded pretty big.";
case TALK_MISSION_INQUIRE:
return "Any luck?";
case TALK_MISSION_SUCCESS:
return "You look a little shaken up, I can't tell you how glad I am that you killed it though.";
case TALK_MISSION_SUCCESS_LIE:
return "Something in the shadows still seems to stare at me when I look at the woods.";
case TALK_MISSION_FAILURE:
return "I'm glad you came back alive... I wasn't sure if I had sent you to your death.";
}
break;
//demon slayer mission 2
case MISSION_KILL_100_Z:
switch (state) {
case TALK_MISSION_DESCRIBE:
return "You seem to know this new world better than most...";
case TALK_MISSION_OFFER:
return "You're kitted out better than most... would you be interested in making this world a \
little better for the rest of us? The towns have enough supplies for us survivors to \
start securing a foothold but we don't have anyone with the skills and equipment to thin the masses \
of undead. I'll lend you a hand to the best of my ability but you really \
showed promise taking out that other beast. You, I, and a 100 regular zombies laid to rest, what do you say?";
case TALK_MISSION_ACCEPTED:
return "\
Hell ya, we may get ourselves killed but we'll be among the first legends of the apocalypse.";
case TALK_MISSION_REJECTED:
return "Hey, I know I wouldn't volunteer for it either... but then I remember that most of us survivors \
won't make it unless someone decides to take the initiative.";
case TALK_MISSION_ADVICE:
return "I'd secure an ammo cache and try to sweep a town in multiple passes.";
case TALK_MISSION_INQUIRE:
return "Got this knocked out?";
case TALK_MISSION_SUCCESS:
return "Man... you're a goddamn machine. It was a pleasure working with you. You know, you may just change \
our little neck of the world if you keep this up.";
case TALK_MISSION_SUCCESS_LIE:
return "I don't think that was quite a hundred dead zeds.";
case TALK_MISSION_FAILURE:
return "Quitting already?";
}
break;
//demon slayer mission 3
case MISSION_KILL_HORDE_MASTER:
switch (state) {
case TALK_MISSION_DESCRIBE:
return "I've heard some bad rumors so I hope you are up for another challenge...";
case TALK_MISSION_OFFER:
return "Apparently one of the other survivors picked up on an unusually dense horde of undead \
moving into the area. At the center of this throng there was a 'leader' of some sort. The short of it is, \
kill the son of a bitch. We don't know what it is capable of or why it is surrounded by other zombies but \
this thing reeks of trouble. Do whatever it takes but we can't risk it getting away.";
case TALK_MISSION_ACCEPTED:
return "\
I'll lend you a hand but I'd try and recruit another gunslinger if you can.";
case TALK_MISSION_REJECTED:
return "What's the use of walking away, they'll track you down eventually.";
case TALK_MISSION_ADVICE:
return "Don't risk torching the building it may be hiding in if it has a basement. The sucker may still be \
alive under the rubble and ash.";
case TALK_MISSION_INQUIRE:
return "Got this knocked out?";
case TALK_MISSION_SUCCESS:
return "May that bastard never get up again.";
case TALK_MISSION_SUCCESS_LIE:
return "I don't think we got it yet.";
case TALK_MISSION_FAILURE:
return "Quitting already?";
}
break;
//demon slayer mission 4
case MISSION_RECRUIT_TRACKER:
switch (state) {
case TALK_MISSION_DESCRIBE:
return "You seem to know this new world better than most...";
case TALK_MISSION_OFFER:
return "We've got another problem to deal with but I don't think we can handle \
it on our own. So, I sent word out and found us a volunteer... of sorts. He's vain \
as hell but has a little skill with firearms. He was supposed to collect whatever he \
had of value and is going to meet us at a cabin in the woods. Wasn't sure how long \
we were going to be so I told him to just camp there until we picked him up.";
case TALK_MISSION_ACCEPTED:
return "\
Rodger, if he's a no-show then any other gunslinger will do... but I doubt he'll quit \
before we even begin.";
case TALK_MISSION_REJECTED:
return "Hey, I know I wouldn't volunteer for it either... but then I remember that most of us survivors \
won't make it unless someone decides to take the initiative.";
case TALK_MISSION_ADVICE:
return "I hope the bastard is packing heat... else we'll need to grab him a gun before we hit our next \
target.";
case TALK_MISSION_INQUIRE:
return "Found a gunslinger?";
case TALK_MISSION_SUCCESS:
return "Great, just let me know when you are ready to wade knee-deep in an ocean of blood.";
case TALK_MISSION_SUCCESS_LIE:
return "I don't think so...";
case TALK_MISSION_FAILURE:
return "Quitting already?";
}
break;
//demon slayer mission 4b
case MISSION_JOIN_TRACKER:
switch (state) {
case TALK_MISSION_DESCRIBE:
return "Well damn, you must be the guys here to pick me up...";
case TALK_MISSION_OFFER:
return "I got the brief so I know what I'm getting into. Let me be upfront, \
treat me like shit and I'm going to cover my own hide. Without a strong band a man doesn't \
stand a chance in this world. You ready to take charge boss?";
case TALK_MISSION_ACCEPTED:
return "\
Before we get into a major fight just make sure we have the gear we need, boss.";
case TALK_MISSION_REJECTED:
return "I don't think you're going to find many other survivors who haven't taken up a faction yet.";
case TALK_MISSION_ADVICE:
return "I'm a pretty good shot with a rifle or pistol.";
case TALK_MISSION_INQUIRE:
return "Any problems boss?";
case TALK_MISSION_SUCCESS:
return "Wait... are you really making me a deputy?";
case TALK_MISSION_SUCCESS_LIE:
return "I don't think so...";
case TALK_MISSION_FAILURE:
return "Quitting already?";
}
break;
default:
switch (state) {
case TALK_MISSION_DESCRIBE:
+59
View File
@@ -4,6 +4,7 @@
#include <vector>
#include <string>
#include <sstream>
#include "omdata.h"
#include "itype.h"
#include "npc.h"
@@ -19,6 +20,26 @@ enum mission_id {
MISSION_RESCUE_DOG,
MISSION_KILL_ZOMBIE_MOM,
MISSION_REACH_SAFETY,
MISSION_GET_FLAG, //patriot 1
MISSION_GET_BLACK_BOX, //patriot 2
MISSION_GET_BLACK_BOX_TRANSCRIPT, //patriot 3
MISSION_EXPLORE_SARCOPHAGUS, //patriot 4
MISSION_GET_RELIC, //martyr 1
MISSION_RECOVER_PRIEST_DIARY, //martyr 2
MISSION_INVESTIGATE_CULT, //martyr 3
MISSION_INVESTIGATE_PRISON_VISIONARY, //martyr 4
MISSION_GET_RECORD_WEATHER, //scientist 1
MISSION_GET_RECORD_PATIENT, //humanitarian 1
MISSION_REACH_FEMA_CAMP, //humanitarian 2
MISSION_REACH_FARM_HOUSE, //humanitarian 3
MISSION_GET_RECORD_ACCOUNTING, //vigilante 1
MISSION_GET_SAFE_BOX, //vigilante 2
MISSION_GET_DEPUTY_BADGE, //vigilante 3
MISSION_KILL_JABBERWOCK, //demon slayer 1
MISSION_KILL_100_Z, //demon slayer 2
MISSION_KILL_HORDE_MASTER, //demon slayer 3
MISSION_RECRUIT_TRACKER, //demon slayer 4
MISSION_JOIN_TRACKER, //demon slayer 4b
NUM_MISSION_IDS
};
@@ -36,12 +57,17 @@ enum mission_origin {
enum mission_goal {
MGOAL_NULL = 0,
MGOAL_GO_TO, // Reach a certain overmap tile
MGOAL_GO_TO_TYPE, // Instead of a point, go to an oter_id map tile like ot_hospital_entrance
MGOAL_FIND_ITEM, // Find an item of a given type
MGOAL_FIND_ANY_ITEM, // Find an item tagged with this mission
MGOAL_FIND_MONSTER, // Find and retrieve a friendly monster
MGOAL_FIND_NPC, // Find a given NPC
MGOAL_ASSASSINATE, // Kill a given NPC
MGOAL_KILL_MONSTER, // Kill a particular hostile monster
MGOAL_KILL_MONSTER_TYPE, // Kill a number of a given monster type
MGOAL_RECRUIT_NPC, // Recruit a given NPC
MGOAL_RECRUIT_NPC_CLASS, // Recruit an NPC class
NUM_MGOAL
};
@@ -59,17 +85,30 @@ struct mission_place { // Return true if [posx,posy] is valid in overmap
*/
struct mission_start {
void standard (game *, mission *); // Standard for its goal type
void join (game *, mission *); // NPC giving mission joins your party
void infect_npc (game *, mission *); // DI_INFECTION, remove antibiotics
void place_dog (game *, mission *); // Put a dog in a house!
void place_zombie_mom (game *, mission *); // Put a zombie mom in a house!
void place_jabberwock (game *, mission *); // Put a jabberwok in the woods nearby
void kill_100_z (game *, mission *); // Kill 100 more regular zombies
void kill_horde_master (game *, mission *);// Kill the master zombie at the center of the horde
void place_npc_software(game *, mission *); // Put NPC-type-dependent software
void place_priest_diary (game *, mission *); // Hides the priest's diary in a local house
void place_deposit_box (game *, mission *); // Place a safe deposit box in a nearby bank
void reveal_lab_black_box (game *, mission *); // Reveal the nearest lab and give black box
void oepn_sarcophagus (game *, mission *); // Reveal the sarcophagus and give access code acidia v
void reveal_hospital (game *, mission *); // Reveal the nearest hospital
void find_safety (game *, mission *); // Goal is set to non-spawn area
void point_prison (game *, mission *); // Point to prison entrance
void point_cabin_strange (game *, mission *); // Point to strange cabin location
void recruit_tracker (game *, mission *); // Recruit a tracker to help you
void place_book (game *, mission *); // Place a book to retrieve
};
struct mission_end { // These functions are run when a mission ends
void standard (game *, mission *){}; // Nothing special happens
void leave (game *, mission *); // NPC leaves after the mission is complete
void deposit_box (game *, mission *); // random valuable reward
void heal_infection (game *, mission *);
};
@@ -90,6 +129,11 @@ struct mission_type {
std::vector<mission_origin> origins; // Points of origin
itype_id item_id;
npc_class recruit_class; // The type of NPC you are to recruit
int recruit_npc_id;
mon_id monster_type;
int monster_kill_goal;
oter_id target_id;
mission_id follow_up;
bool (mission_place::*place)(game *g, int x, int y);
@@ -109,6 +153,11 @@ struct mission_type {
deadline_low = 0;
deadline_high = 0;
item_id = "null";
target_id = ot_null;
recruit_class = NC_NONE;
recruit_npc_id = -1;
monster_type = mon_null;
monster_kill_goal = -1;
follow_up = MISSION_NULL;
};
@@ -124,6 +173,11 @@ struct mission {
int uid; // Unique ID number, used for referencing elsewhere
point target; // Marked on the player's map. (-1,-1) for none
itype_id item_id; // Item that needs to be found (or whatever)
oter_id target_id; // Destination type to be reached
npc_class recruit_class; // The type of NPC you are to recruit acidia
int recruit_npc_id; // The ID of a specific NPC to recruit
mon_id monster_type; // Monster ID that are to be killed
int monster_kill_goal; // the kill count you wish to reach
int count; // How many of that item
int deadline; // Turn number
int npc_id; // ID of a related npc
@@ -144,6 +198,11 @@ struct mission {
uid = -1;
target = point(-1, -1);
item_id = "null";
target_id = ot_null;
recruit_class = NC_NONE;
recruit_npc_id = -1;
monster_type = mon_null;
monster_kill_goal = -1;
count = 0;
deadline = 0;
npc_id = -1;
+17
View File
@@ -11,3 +11,20 @@ void mission_end::heal_infection(game *g, mission *miss)
}
}
}
void mission_end::leave(game *g, mission *miss)
{
npc *p = g->find_npc(miss->npc_id);
p->attitude = NPCATT_NULL;
}
void mission_end::deposit_box(game *g, mission *miss)
{
npc *p = g->find_npc(miss->npc_id);
p->attitude = NPCATT_NULL;//npc leaves your party
std::string itemName = "deagle_44";
if (one_in(4)) itemName = "katana";
else if (one_in(3)) itemName = "m4a1";
g->u.i_add( item(g->itypes[itemName], 0) );
g->add_msg("%s gave you an item from the deposit box.", p->name.c_str());
}
+235
View File
@@ -12,6 +12,12 @@ void mission_start::standard(game *g, mission *miss)
{
}
void mission_start::join(game *g, mission *miss)
{
npc *p = g->find_npc(miss->npc_id);
p->attitude = NPCATT_FOLLOW;
}
void mission_start::infect_npc(game *g, mission *miss)
{
npc *p = g->find_npc(miss->npc_id);
@@ -67,6 +73,67 @@ void mission_start::place_zombie_mom(game *g, mission *miss)
zomhouse.save(g->cur_om, int(g->turn), house.x * 2, house.y * 2, 0);
}
void mission_start::place_jabberwock(game *g, mission *miss)
{
int dist = 0;
point site = g->cur_om->find_closest(g->om_location(), ot_forest_thick, 1, dist, false);
miss->target = site;
// Make it seen on our map
for (int x = site.x - 6; x <= site.x + 6; x++) {
for (int y = site.y - 6; y <= site.y + 6; y++)
g->cur_om->seen(x, y, 0) = true;
}
tinymap grove(&(g->itypes), &(g->mapitems), &(g->traps));
grove.load(g, site.x * 2, site.y * 2, 0, false);
grove.add_spawn(mon_jabberwock, 1, SEEX, SEEY, false, -1, miss->uid, "NONE");
grove.save(g->cur_om, int(g->turn), site.x * 2, site.y * 2, 0);
}
void mission_start::kill_100_z(game *g, mission *miss)
{
npc *p = g->find_npc(miss->npc_id);
p->attitude = NPCATT_FOLLOW;//npc joins you
miss->monster_type = mon_zombie;
int killed = 0;
killed += g->kill_count(mon_zombie);
miss->monster_kill_goal = 100+killed;//your kill score must increase by 100
}
void mission_start::kill_horde_master(game *g, mission *miss)
{
npc *p = g->find_npc(miss->npc_id);
p->attitude = NPCATT_FOLLOW;//npc joins you
int dist = 0;//pick one of the below locations for the horde to haunt
point site = g->cur_om->find_closest(g->om_location(), ot_office_tower_1, 1, dist, false);
if (site.x == -1 && site.y == -1 )
site = g->cur_om->find_closest(g->om_location(), ot_hotel_tower_1_8, 1, dist, false);
if (site.x == -1 && site.y == -1)
site = g->cur_om->find_closest(g->om_location(), ot_school_5, 1, dist, false);
if (site.x == -1 && site.y == -1)
site = g->cur_om->find_closest(g->om_location(), ot_forest_thick, 1, dist, false);
miss->target = site;
// Make it seen on our map
for (int x = site.x - 6; x <= site.x + 6; x++) {
for (int y = site.y - 6; y <= site.y + 6; y++)
g->cur_om->seen(x, y, 0) = true;
}
tinymap tile(&(g->itypes), &(g->mapitems), &(g->traps));
tile.load(g, site.x * 2, site.y * 2, 0, false);
tile.add_spawn(mon_zombie_master, 1, SEEX, SEEY, false, -1, miss->uid, "Demonic Soul");
tile.add_spawn(mon_zombie_brute,3,SEEX,SEEY);
tile.add_spawn(mon_zombie_fast,3,SEEX,SEEY);
if (SEEX > 1 && SEEX < OMAPX && SEEY > 1 && SEEY < OMAPY){
for (int x = SEEX - 1; x <= SEEX + 1; x++) {
for (int y = SEEY - 1; y <= SEEY + 1; y++)
tile.add_spawn(mon_zombie,rng(3,10),x,y);
tile.add_spawn(mon_zombie_fast,rng(0,2),SEEX,SEEY);
}
}
tile.add_spawn(mon_zombie_necro,2,SEEX,SEEY);
tile.add_spawn(mon_zombie_hulk,1,SEEX,SEEY);
tile.save(g->cur_om, int(g->turn), site.x * 2, site.y * 2, 0);
}
void mission_start::place_npc_software(game *g, mission *miss)
{
npc* dev = g->find_npc(miss->npc_id);
@@ -195,6 +262,117 @@ void mission_start::place_npc_software(game *g, mission *miss)
compmap.save(g->cur_om, int(g->turn), place.x * 2, place.y * 2, 0);
}
void mission_start::place_priest_diary(game *g, mission *miss)
{
point place;
int city_id = g->cur_om->closest_city( g->om_location() );
place = g->cur_om->random_house_in_city(city_id);
miss->target = place;
for (int x = place.x - 2; x <= place.x + 2; x++) {
for (int y = place.y - 2; y <= place.y + 2; y++)
g->cur_om->seen(x, y, 0) = true;
}
tinymap compmap(&(g->itypes), &(g->mapitems), &(g->traps));
compmap.load(g, place.x * 2, place.y * 2, 0, false);
point comppoint;
std::vector<point> valid;
for (int x = 0; x < SEEX * 2; x++) {
for (int y = 0; y < SEEY * 2; y++) {
if (compmap.ter(x, y) == t_bed || compmap.ter(x, y) == t_dresser || compmap.ter(x, y) == t_indoor_plant || compmap.ter(x, y) == t_cupboard) {
valid.push_back( point(x, y) );
}
}
}
if (valid.empty())
comppoint = point( rng(6, SEEX * 2 - 7), rng(6, SEEY * 2 - 7) );
else
comppoint = valid[rng(0, valid.size() - 1)];
compmap.spawn_item(comppoint.x, comppoint.y, "priest_diary", 0);
compmap.save(g->cur_om, int(g->turn), place.x * 2, place.y * 2, 0);
}
void mission_start::place_deposit_box(game *g, mission *miss)
{
npc *p = g->find_npc(miss->npc_id);
p->attitude = NPCATT_FOLLOW;//npc joins you
int dist = 0;
point site = g->cur_om->find_closest(g->om_location(), ot_bank_north, 1, dist, false);
if (site.x == -1 && site.y == -1 )
site = g->cur_om->find_closest(g->om_location(), ot_bank_south, 1, dist, false);
if (site.x == -1 && site.y == -1)
site = g->cur_om->find_closest(g->om_location(), ot_bank_east, 1, dist, false);
if (site.x == -1 && site.y == -1)
site = g->cur_om->find_closest(g->om_location(), ot_bank_west, 1, dist, false);
if (site.x == -1 && site.y == -1)
site = g->cur_om->find_closest(g->om_location(), ot_office_tower_1, 1, dist, false);
miss->target = site;
for (int x = site.x - 2; x <= site.x + 2; x++) {
for (int y = site.y - 2; y <= site.y + 2; y++)
g->cur_om->seen(x, y, 0) = true;
}
tinymap compmap(&(g->itypes), &(g->mapitems), &(g->traps));
compmap.load(g, site.x * 2, site.y * 2, 0, false);
point comppoint;
std::vector<point> valid;
for (int x = 0; x < SEEX * 2; x++) {
for (int y = 0; y < SEEY * 2; y++) {
if (compmap.ter(x, y) == t_floor) {
bool okay = false;
for (int x2 = x - 1; x2 <= x + 1 && !okay; x2++) {
for (int y2 = y - 1; y2 <= y + 1 && !okay; y2++) {
if (compmap.ter(x2, y2) == t_wall_metal_h|| compmap.ter(x2, y2) == t_wall_metal_v) {
okay = true;
valid.push_back( point(x, y) );
}
}
}
}
}
}
if (valid.empty())
comppoint = point( rng(6, SEEX * 2 - 7), rng(6, SEEY * 2 - 7) );
else
comppoint = valid[rng(0, valid.size() - 1)];
compmap.spawn_item(comppoint.x, comppoint.y, "safe_box", 0);
compmap.save(g->cur_om, int(g->turn), site.x * 2, site.y * 2, 0);
}
void mission_start::reveal_lab_black_box(game *g, mission *miss)
{
npc* dev = g->find_npc(miss->npc_id);
if (dev != NULL) {
g->u.i_add( item(g->itypes["black_box"], 0) );
g->add_msg("%s gave you back the black box.", dev->name.c_str());
}
int dist = 0;
point place = g->cur_om->find_closest(g->om_location(), ot_lab, 1, dist,
false);
for (int x = place.x - 3; x <= place.x + 3; x++) {
for (int y = place.y - 3; y <= place.y + 3; y++)
g->cur_om->seen(x, y, 0) = true;
}
miss->target = place;
}
void mission_start::oepn_sarcophagus(game *g, mission *miss)
{
npc *p = g->find_npc(miss->npc_id);
p->attitude = NPCATT_FOLLOW;
if (p != NULL) {
g->u.i_add( item(g->itypes["sarcophagus_access_code"], 0) );
g->add_msg("%s gave you sarcophagus access code.", p->name.c_str());
}
int dist = 0;
point place = g->cur_om->find_closest(g->om_location(), ot_haz_sar_entrance, 1, dist,
false);
for (int x = place.x - 3; x <= place.x + 3; x++) {
for (int y = place.y - 3; y <= place.y + 3; y++)
g->cur_om->seen(x, y, 0) = true;
}
miss->target = place;
}
void mission_start::reveal_hospital(game *g, mission *miss)
{
npc* dev = g->find_npc(miss->npc_id);
@@ -244,6 +422,63 @@ void mission_start::find_safety(game *g, mission *miss)
}
}
void mission_start::point_prison(game *g, mission *miss)
{
int dist = 0;
point place = g->cur_om->find_closest(g->om_location(), ot_prison_5, 1, dist,
false);
for (int x = place.x - 3; x <= place.x + 3; x++) {
for (int y = place.y - 3; y <= place.y + 3; y++)
g->cur_om->seen(x, y, 0) = true;
}
miss->target = place;
}
void mission_start::point_cabin_strange(game *g, mission *miss)
{
int dist = 0;
point place = g->cur_om->find_closest(g->om_location(), ot_cabin_strange, 1, dist,
false);
for (int x = place.x - 3; x <= place.x + 3; x++) {
for (int y = place.y - 3; y <= place.y + 3; y++)
g->cur_om->seen(x, y, 0) = true;
}
miss->target = place;
}
void mission_start::recruit_tracker(game *g, mission *miss)
{
npc *p = g->find_npc(miss->npc_id);
p->attitude = NPCATT_FOLLOW;//npc joins you
int dist = 0;
point site = g->cur_om->find_closest(g->om_location(), ot_cabin, 1, dist, false);
miss->target = site;
miss->recruit_class = NC_COWBOY;
// Make it seen on our map
for (int x = site.x - 2; x <= site.x + 2; x++) {
for (int y = site.y - 2; y <= site.y + 2; y++)
g->cur_om->seen(x, y, 0) = true;
}
npc * temp = new npc();
temp->normalize(g);
temp->randomize(g, NC_COWBOY);
temp->omx = site.x*2;
temp->omy = site.y*2;
temp->mapx = site.x*2;
temp->mapy = site.y*2;
temp->posx = 11;
temp->posy = 11;
temp->attitude = NPCATT_TALK;
temp->mission = NPC_MISSION_SHOPKEEP;
temp->personality.aggression -= 1;
temp->op_of_u.owed = 10; int mission_index = g->reserve_mission(MISSION_JOIN_TRACKER, temp->getID());
if (mission_index != -1)
temp->chatbin.missions.push_back(mission_index);
g->cur_om->npcs.push_back(temp);
}
void mission_start::place_book(game *g, mission *miss)
{
}
+150 -1
View File
@@ -10,7 +10,8 @@ mission_type(id, name, goal, diff, val, urgent, place, start, end, fail) )
#define ORIGINS(...) setvector(&mission_types[id].origins, __VA_ARGS__, NULL)
#define ITEM(itid) mission_types[id].item_id = itid
#define DESTINATION(dest) mission_types[id].target_id = dest
#define FOLLOWUP(next_up) mission_types[id].follow_up = next_up
// DEADLINE defines the low and high end time limits, in hours
// Omitting DEADLINE means the mission never times out
#define DEADLINE(low, high) mission_types[id].deadline_low = low * 600;\
@@ -58,6 +59,154 @@ mission_type(id, name, goal, diff, val, urgent, place, start, end, fail) )
&mission_end::standard, &mission_fail::standard);
ORIGINS(ORIGIN_NULL);
//patriot mission 1
MISSION("Find Flag", MGOAL_FIND_ITEM, 2, 1000, false,
&mission_place::always, &mission_start::standard,
&mission_end::standard, &mission_fail::standard);
ORIGINS(ORIGIN_OPENER_NPC, ORIGIN_ANY_NPC);
FOLLOWUP(MISSION_GET_BLACK_BOX);
ITEM("american_flag");
//patriot mission 2
MISSION("Retrieve Military Black Box", MGOAL_FIND_ITEM, 2, 1000, false,
&mission_place::always, &mission_start::standard,
&mission_end::standard, &mission_fail::standard);
ORIGINS(ORIGIN_SECONDARY);
FOLLOWUP(MISSION_GET_BLACK_BOX_TRANSCRIPT);
ITEM("black_box");
//patriot mission 3
MISSION("Retrieve Black Box Transcript", MGOAL_FIND_ITEM, 2, 1500, false,
&mission_place::always, &mission_start::reveal_lab_black_box,
&mission_end::standard, &mission_fail::standard);
ORIGINS(ORIGIN_SECONDARY);
FOLLOWUP(MISSION_EXPLORE_SARCOPHAGUS);
ITEM("black_box_transcript");
//patriot mission 4
MISSION("Follow Sarcophagus Team", MGOAL_GO_TO_TYPE, 2, 500, false,
&mission_place::always, &mission_start::oepn_sarcophagus,
&mission_end::standard, &mission_fail::standard);
ORIGINS(ORIGIN_SECONDARY);
DESTINATION(ot_haz_sar_b1);
//martyr mission 1
MISSION("Find Relic", MGOAL_FIND_ITEM, 2, 1000, false,
&mission_place::always, &mission_start::standard,
&mission_end::standard, &mission_fail::standard);
ORIGINS(ORIGIN_OPENER_NPC, ORIGIN_ANY_NPC);
FOLLOWUP(MISSION_RECOVER_PRIEST_DIARY);
ITEM("small_relic");
//martyr mission 2
MISSION("Recover Priest's Diary", MGOAL_FIND_ITEM, 2, 700, false,
&mission_place::always, &mission_start::place_priest_diary,
&mission_end::standard, &mission_fail::standard);
ORIGINS(ORIGIN_SECONDARY);
FOLLOWUP(MISSION_INVESTIGATE_CULT);
ITEM("priest_diary");
//martyr mission 3
MISSION("Investigate Cult", MGOAL_FIND_ITEM, 2, 1500, false,
&mission_place::always, &mission_start::point_cabin_strange,
&mission_end::standard, &mission_fail::standard);
ORIGINS(ORIGIN_SECONDARY);
FOLLOWUP(MISSION_INVESTIGATE_PRISON_VISIONARY);
ITEM("etched_skull");
//martyr mission 4
MISSION("Prison Visionary", MGOAL_FIND_ITEM, 2, 1500, false,
&mission_place::always, &mission_start::point_prison,
&mission_end::standard, &mission_fail::standard);
ORIGINS(ORIGIN_SECONDARY);
ITEM("visions_solitude");
MISSION("Find Weather Log", MGOAL_FIND_ITEM, 2, 500, false,
&mission_place::always, &mission_start::standard,
&mission_end::standard, &mission_fail::standard);
ORIGINS(ORIGIN_OPENER_NPC, ORIGIN_ANY_NPC);
ITEM("record_weather");
//humanitarian mission 1
MISSION("Find Patient Records", MGOAL_FIND_ITEM, 2, 600, false,
&mission_place::always, &mission_start::standard,
&mission_end::standard, &mission_fail::standard);
ORIGINS(ORIGIN_OPENER_NPC, ORIGIN_ANY_NPC);
FOLLOWUP(MISSION_REACH_FEMA_CAMP);
ITEM("record_patient");
//humanitarian mission 2
MISSION("Reach FEMA Camp", MGOAL_GO_TO_TYPE, 2, 600, false,
&mission_place::always, &mission_start::join,
&mission_end::standard, &mission_fail::standard);
ORIGINS(ORIGIN_SECONDARY);
DESTINATION(ot_fema);
FOLLOWUP(MISSION_REACH_FARM_HOUSE);
//humanitarian mission 3
MISSION("Reach Farm House", MGOAL_GO_TO_TYPE, 2, 600, false,
&mission_place::always, &mission_start::join,
&mission_end::leave, &mission_fail::standard);
ORIGINS(ORIGIN_SECONDARY);
DESTINATION(ot_farm);
//vigilante mission 1
MISSION("Find Corporate Accounts", MGOAL_FIND_ITEM, 2, 1400, false,
&mission_place::always, &mission_start::standard,
&mission_end::standard, &mission_fail::standard);
ORIGINS(ORIGIN_OPENER_NPC, ORIGIN_ANY_NPC);
FOLLOWUP(MISSION_GET_SAFE_BOX);
ITEM("record_accounting");
//vigilante mission 2
MISSION("Retrieve Deposit Box", MGOAL_FIND_ITEM, 2, 300, false,
&mission_place::always, &mission_start::place_deposit_box,
&mission_end::deposit_box, &mission_fail::standard);
ORIGINS(ORIGIN_SECONDARY);
FOLLOWUP(MISSION_GET_DEPUTY_BADGE);
ITEM("safe_box");
//vigilante mission 3
MISSION("Find Deputy Badge", MGOAL_FIND_ITEM, 2, 1500, false,
&mission_place::always, &mission_start::standard,
&mission_end::standard, &mission_fail::standard);
ORIGINS(ORIGIN_SECONDARY);
ITEM("badge_deputy");
//demon slayer mission 1
MISSION("Kill Jabberwock", MGOAL_KILL_MONSTER, 5, 2000, true,
&mission_place::always, &mission_start::place_jabberwock,
&mission_end::standard, &mission_fail::standard);
ORIGINS(ORIGIN_OPENER_NPC, ORIGIN_ANY_NPC);
FOLLOWUP(MISSION_KILL_100_Z);
//demon slayer mission 2
MISSION("Kill 100 Zombies", MGOAL_KILL_MONSTER_TYPE, 5, 2500, false,
&mission_place::always, &mission_start::kill_100_z,
&mission_end::leave, &mission_fail::standard);
ORIGINS(ORIGIN_SECONDARY);
FOLLOWUP(MISSION_KILL_HORDE_MASTER);
//demon slayer mission 3
MISSION("Kill Horde Master",MGOAL_KILL_MONSTER, 5, 2500, true,
&mission_place::always, &mission_start::kill_horde_master,
&mission_end::leave, &mission_fail::standard);
ORIGINS(ORIGIN_SECONDARY);
FOLLOWUP(MISSION_RECRUIT_TRACKER);
//demon slayer mission 4
MISSION("Recruit Tracker",MGOAL_RECRUIT_NPC_CLASS, 5, 700, false,
&mission_place::always, &mission_start::recruit_tracker,
&mission_end::standard, &mission_fail::standard);
ORIGINS(ORIGIN_SECONDARY);
//demon slayer mission 4b
MISSION("Tracker", MGOAL_FIND_ITEM, 5, 0, true,
&mission_place::always, &mission_start::join,
&mission_end::standard, &mission_fail::standard);
ORIGINS(ORIGIN_SECONDARY);
ITEM("badge_deputy");
MISSION("Find a Book", MGOAL_FIND_ANY_ITEM, 2, 800, false,
&mission_place::always, &mission_start::place_book,
&mission_end::standard, &mission_fail::standard);
+153 -49
View File
@@ -4,6 +4,7 @@
#include "rng.h"
#include "line.h"
#include "bodypart.h"
#include "material.h"
//Used for e^(x) functions
#include <stdio.h>
@@ -45,7 +46,7 @@ void mattack::antqueen(game *g, monster *z)
} else if (egg_points.size() == 0) { // There's no eggs nearby--lay one.
if (g->u_see(z->posx, z->posy))
g->add_msg("The %s lays an egg!", z->name().c_str());
g->m.spawn_item(z->posx, z->posy, g->itypes["ant_egg"], g->turn);
g->m.spawn_item(z->posx, z->posy, "ant_egg", g->turn);
} else { // There are eggs nearby. Let's hatch some.
z->moves -= 20 * egg_points.size(); // It takes a while
if (g->u_see(z->posx, z->posy))
@@ -226,13 +227,8 @@ void mattack::resurrect(game *g, monster *z)
if (g->m.i_at(x, y)[n].type->id == "corpse" && one_in(2)) {
if (g->u_see(x, y))
raised++;
int burnt_penalty = g->m.i_at(x, y)[n].burnt;
monster mon(g->m.i_at(x, y)[n].corpse, x, y);
mon.speed = int(mon.speed * .8) - burnt_penalty / 2;
mon.hp = int(mon.hp * .7) - burnt_penalty;
g->m.i_rem(x, y, n);
g->revive_corpse(x, y, n);
n = g->m.i_at(x, y).size(); // Only one body raised per tile
g->z.push_back(mon);
}
}
}
@@ -828,7 +824,7 @@ void mattack::formblob(game *g, monster *z)
g->z[thatmon].speed += 5;
if (g->z[thatmon].speed >= 60)
g->z[thatmon].poly(g->mtypes[mon_blob]);
} else if ((g->z[thatmon].made_of(FLESH) || g->z[thatmon].made_of(VEGGY)) &&
} else if ((g->z[thatmon].made_of("flesh") || g->z[thatmon].made_of("veggy")) &&
rng(0, z->hp) > rng(0, g->z[thatmon].hp)) { // Blobify!
didit = true;
g->z[thatmon].poly(g->mtypes[mon_blob]);
@@ -961,7 +957,7 @@ void mattack::vortex(game *g, monster *z)
}
// TODO: Hit NPCs
if (dam == 0 || i == traj.size() - 1) {
if (thrown.made_of(GLASS)) {
if (thrown.made_of("glass")) {
if (g->u_see(traj[i].x, traj[i].y))
g->add_msg("The %s shatters!", thrown.tname().c_str());
for (int n = 0; n < thrown.contents.size(); n++)
@@ -979,30 +975,19 @@ void mattack::vortex(game *g, monster *z)
int distance = 0, damage = 0;
monster *thrown = &(g->z[mondex]);
switch (thrown->type->size) {
case MS_TINY: distance = 5; break;
case MS_SMALL: distance = 3; break;
case MS_MEDIUM: distance = 2; break;
case MS_LARGE: distance = 1; break;
case MS_TINY: distance = 10; break;
case MS_SMALL: distance = 6; break;
case MS_MEDIUM: distance = 4; break;
case MS_LARGE: distance = 2; break;
case MS_HUGE: distance = 0; break;
}
damage = distance * 4;
switch (thrown->type->mat) {
case LIQUID: distance += 3; damage -= 10; break;
case VEGGY: distance += 1; damage -= 5; break;
case POWDER: distance += 4; damage -= 30; break;
case COTTON:
case WOOL: distance += 5; damage -= 40; break;
case LEATHER: distance -= 1; damage += 5; break;
case KEVLAR: distance -= 3; damage -= 20; break;
case STONE: distance -= 3; damage += 5; break;
case PAPER: distance += 6; damage -= 10; break;
case WOOD: distance += 1; damage += 5; break;
case PLASTIC: distance += 1; damage += 5; break;
case GLASS: distance += 2; damage += 20; break;
case IRON: distance -= 1; // fall through
case STEEL:
case SILVER: distance -= 3; damage -= 10; break;
}
damage = distance * 3;
// subtract 1 unit of distance for every 10 units of density
// subtract 5 units of damage for every 10 units of density
material_type* mon_mat = material_type::find_material(thrown->type->mat);
distance -= mon_mat->density() / 10;
damage -= mon_mat->density() / 5;
if (distance > 0) {
if (g->u_see(thrown))
g->add_msg("The %s is thrown by winds!", thrown->name().c_str());
@@ -1159,28 +1144,75 @@ void mattack::tazer(game *g, monster *z)
g->u.moves -= shock * 20;
}
int coord2angle ( const int x, const int y, const int tgtx, const int tgty ) {
const double DBLRAD2DEG = 57.2957795130823f;
//const double PI = 3.14159265358979f;
const double DBLPI = 6.28318530717958f;
double rad = atan2 ( tgty - y, tgtx - x );
if ( rad < 0 ) rad = DBLPI - (0 - rad);
return int( rad * DBLRAD2DEG );
}
void mattack::smg(game *g, monster *z)
{
int t, fire_t;
if (z->friendly != 0) { // Attacking monsters, not the player!
if (z->friendly != 0) { // Attacking monsters, not the player!
monster* target = NULL;
const int iff_dist=24; // iff check triggers at this distance
int iff_hangle=15; // iff safety margin (degrees). less accuracy, more paranoia
int closest = 19;
int c=0;
int u_angle = 0; // player angle relative to turret
int boo_hoo = 0; // how many targets were passed due to IFF. Tragically.
bool iff_trig = false; // player seen and within range of stray shots
int pldist=rl_dist(z->posx, z->posy, g->u.posx, g->u.posy);
if ( pldist < iff_dist &&
g->sees_u(z->posx, z->posy, t) ) {
iff_trig = true;
if ( pldist < 3 ) iff_hangle=( pldist == 2 ? 30 : 60 ); // granularity increases with proximity
u_angle = coord2angle (z->posx, z->posy, g->u.posx, g->u.posy );
}
for (int i = 0; i < g->z.size(); i++) {
int dist = rl_dist(z->posx, z->posy, g->z[i].posx, g->z[i].posy);
if (g->z[i].friendly == 0 && dist < closest &&
g->m.sees(z->posx, z->posy, g->z[i].posx, g->z[i].posy, 18, t)) {
target = &(g->z[i]);
closest = dist;
fire_t = t;
}
if ( g->m.sees(z->posx, z->posy, g->z[i].posx, g->z[i].posy, 18, t) ) {
int dist = rl_dist(z->posx, z->posy, g->z[i].posx, g->z[i].posy);
if (g->z[i].friendly == 0 ) {
bool safe_target=true;
if ( iff_trig ) {
int tangle = coord2angle (z->posx, z->posy, g->z[i].posx, g->z[i].posy );
int diff = abs ( u_angle - tangle );
if ( diff + iff_hangle > 360 || diff < iff_hangle ) {
safe_target=false;
boo_hoo++;
}
//mvprintw(c,VIEWX * 2 + 8,"tgt? %d <=> %d : %d",tangle, u_angle, diff);
}
if (dist < closest && safe_target ) {
target = &(g->z[i]);
closest = dist;
fire_t = t;
}
} // else if ( advanced_software_upgrade ) {
// todo; make friendly && unfriendly lists, then select closest non-friendly fire target
}
c++;
}
z->sp_timeout = z->type->sp_freq; // Reset timer
if (target == NULL) // Couldn't find any targets!
return;
if (target == NULL) {// Couldn't find any targets!
if(boo_hoo > 0 && g->u_see(z->posx, z->posy) ) { // because that stupid oaf was in the way!
if(boo_hoo > 1) {
g->add_msg("Pointed in your direction, the %s emits %d annoyed sounding beeps.",
z->name().c_str(),boo_hoo);
} else {
g->add_msg("Pointed in your direction, the %s emits an IFF warning beep.",
z->name().c_str());
}
}
return;
}
z->moves = -150; // It takes a while
if (g->u_see(z->posx, z->posy))
g->add_msg("The %s fires its smg!", z->name().c_str());
player tmp;
npc tmp;
tmp.name = "The " + z->name();
tmp.skillLevel("smg").level(1);
@@ -1219,7 +1251,7 @@ void mattack::smg(game *g, monster *z)
if (g->u_see(z->posx, z->posy))
g->add_msg("The %s fires its smg!", z->name().c_str());
// Set up a temporary player to fire this gun
player tmp;
npc tmp;
tmp.name = "The " + z->name();
tmp.skillLevel("smg").level(1);
@@ -1413,14 +1445,57 @@ void mattack::breathe(game *g, monster *z)
}
}
void mattack::bite(game *g, monster *z)
void mattack::bite(game *g, monster *z) {
if (rl_dist(z->posx, z->posy, g->u.posx, g->u.posy) > 1) {
return;
}
z->sp_timeout = z->type->sp_freq; // Reset timer
g->add_msg("The %s lunges forward attempting to bite you!", z->name().c_str());
z->moves -= 100;
// Can we dodge the attack? Uses player dodge function % chance (melee.cpp)
int dodge_check = std::max(g->u.dodge(g) - rng(0, z->type->melee_skill), 0L);
if (rng(0, 10000) < 10000 / (1 + (99 * exp(-.6 * dodge_check)))) {
g->add_msg("You dodge it!");
g->u.practice(g->turn, "dodge", z->type->melee_skill*2);
return;
}
body_part hit = random_body_part();
int dam = rng(5, 10), side = rng(0, 1);
dam = g->u.hit(g, hit, side, dam, 0);
if (dam > 0) {
g->add_msg("Your %s is bitten!", body_part_name(hit, side).c_str());
if(one_in(14 - dam)) {
g->u.add_disease(DI_BITE, 3600, g);
}
} else {
g->add_msg("Your %s is bitten, but your armor protects you.", body_part_name(hit, side).c_str());
}
g->u.practice(g->turn, "dodge", z->type->melee_skill);
}
void mattack::flesh_golem(game *g, monster *z)
{
if (rl_dist(z->posx, z->posy, g->u.posx, g->u.posy) > 1)
{
return;
if (one_in(12)){
int j;
if (rl_dist(z->posx, z->posy, g->u.posx, g->u.posy) > 20 ||
!g->sees_u(z->posx, z->posy, j))
return; // Out of range
z->moves = -200;
z->sp_timeout = z->type->sp_freq; // Reset timer
g->sound(z->posx, z->posy, 80, "a terrifying roar that nearly deafens you!");
}
return;
}
z->sp_timeout = z->type->sp_freq; // Reset timer
g->add_msg("The %s lunges forward attempting to bite you!", z->name().c_str());
g->add_msg("The %s swings a massive claw at you!", z->name().c_str());
z->moves -= 100;
// Can we dodge the attack? Uses player dodge function % chance (melee.cpp)
@@ -1433,12 +1508,41 @@ void mattack::bite(game *g, monster *z)
}
body_part hit = random_body_part();
int dam = rng(5, 10), side = rng(0, 1);
g->add_msg("Your %s is bitten for %d damage!", body_part_name(hit, side).c_str(), dam);
g->add_msg("Your %s is battered for %d damage!", body_part_name(hit, side).c_str(), dam);
g->u.hit(g, hit, side, dam, 0);
if(one_in(10))
if(one_in(6))
{
g->u.add_disease(DI_BITE, 3600, g);
g->u.add_disease(DI_DOWNED, 30, g);
}
g->u.practice(g->turn, "dodge", z->type->melee_skill);
}
void mattack::parrot(game *g, monster *z)
{
if (rl_dist(z->posx, z->posy, g->u.posx, g->u.posy) > 50)
return; // Out of range
if (one_in(20)){
z->moves = -100; // It takes a while
z->sp_timeout = z->type->sp_freq; // Reset timer
switch (rng(1,18)) {
case 1: g->sound(z->posx, z->posy, 60, "a woman cry out!"); break;
case 2: g->sound(z->posx, z->posy, 40, "a small girl crying..."); break;
case 3: g->sound(z->posx, z->posy, 20, "'This creature has some form of higher level brain function.'"); break;
case 4: g->sound(z->posx, z->posy, 40, "'Shall we terminate the specimen if power is lost?'"); break;
case 5: g->sound(z->posx, z->posy, 40, "a small girl pleading, 'Mommy, help!'"); break;
case 6: g->sound(z->posx, z->posy, 40, "a child, 'Oh God, my leg! Give it back!'"); break;
case 7: g->sound(z->posx, z->posy, 40, "'Destroy the specimen if it begins to interact with the lock.'"); break;
case 8: g->sound(z->posx, z->posy, 40, "a woman yell, 'I hope you rot in hell for this!'"); break;
case 9: g->sound(z->posx, z->posy, 40, "'Kill them all and let God sort them out!'"); break;
case 10: g->sound(z->posx, z->posy, 40, "'I'm gonna cut your damned limbs off and let you blead out!'"); break;
case 11: g->sound(z->posx, z->posy, 40, "'I wonder if you understand what I'm saying.'"); break;
case 12: g->sound(z->posx, z->posy, 40, "'I believe that it is trying to learn our language.'"); break;
case 13: g->sound(z->posx, z->posy, 40, "'It seems to want to experiment on us... give it a prisoner.'"); break;
case 14: g->sound(z->posx, z->posy, 40, "'It is interested in observing the brain of a living human.'"); break;
case 15: g->sound(z->posx, z->posy, 40, "'Would it react differently with a child?'"); break;
case 16: g->sound(z->posx, z->posy, 40, "'It seems to want to experiment on us... give it a prisoner.'"); break;
case 17: g->sound(z->posx, z->posy, 40, "'Although advanced, its ethics are not our own.'"); break;
case 18: g->sound(z->posx, z->posy, 40, "'It shows no empathy towards the prisoners we... 'gave' it.'"); break;
}
}
}
+2
View File
@@ -46,6 +46,8 @@ class mattack
void upgrade (game *g, monster *z);
void breathe (game *g, monster *z);
void bite (game *g, monster *z);
void flesh_golem (game *g, monster *z);
void parrot (game *g, monster *z);
};
#endif
+96 -14
View File
@@ -10,21 +10,97 @@ void mdeath::normal(game *g, monster *z)
{
if (g->u_see(z))
g->add_msg("The %s dies!", z->name().c_str());
if (z->made_of(FLESH) && z->has_flag(MF_WARM)) {
if (z->made_of("flesh") && z->has_flag(MF_WARM)) {
if (g->m.field_at(z->posx, z->posy).type == fd_blood &&
g->m.field_at(z->posx, z->posy).density < 3)
g->m.field_at(z->posx, z->posy).density++;
else
g->m.add_field(g, z->posx, z->posy, fd_blood, 1);
}
// Drop a dang ol' corpse
// If their hp is less than -50, we destroyed them so badly no corpse was left
if ((z->hp >= -50 || z->hp >= 0 - 2 * z->type->hp) &&
(z->made_of(FLESH) || z->made_of(VEGGY))) {
item tmp;
tmp.make_corpse(g->itypes["corpse"], z->type, g->turn);
g->m.add_item(z->posx, z->posy, tmp);
}
int gib_amount = 0;
bool leave_corpse = false;
int corpse_damage = 0;
// determine how much of a mess is left, for flesh and veggy creatures
if (z->made_of("flesh") || z->made_of("veggy") || z->made_of("hflesh"))
{
if (z->hp >= 0 - 2 * z->type->hp) // less than 2x monster hp overkill, leave corpse
{
leave_corpse = true;
corpse_damage = 0;
}
if (z->hp >= 0 - 2 * z->type->hp - 20 && z->hp < 0 - 2 * z->type->hp) // corpse with damage 1
{
leave_corpse = true;
corpse_damage = 1;
gib_amount = rng(1,3);
}
if (z->hp >= 0 - 2 * z->type->hp - 40 && z->hp < 0 - 2 * z->type->hp - 20) // corpse with damage 2
{
leave_corpse = true;
corpse_damage = 2;
gib_amount = rng(2,5);
}
if (z->hp >= 0 - 2 * z->type->hp - 60 && z->hp < 0 - 2 * z->type->hp - 40) // corpse with damage 3
{
leave_corpse = true;
corpse_damage = 3;
gib_amount = rng(3,9);
}
if (z->hp >= 0 - 2 * z->type->hp - 80 && z->hp < 0 - 2 * z->type->hp - 60) // corpse with damage 4
{
leave_corpse = true;
corpse_damage = 4;
gib_amount = rng(4,12);
}
if (z->hp <= 0 - 2 * z->type->hp - 80) // no corpse if MS_TINY or MS_SMALL, gib_amount fields only
{
if (z->type->size == MS_MEDIUM || z->type->size == MS_LARGE || z->type->size == MS_HUGE)
{
leave_corpse = true;
corpse_damage = 4;
}
else
{
leave_corpse = false;
}
gib_amount = rng(5,15);
}
}
// leave a corpse, if any
if (leave_corpse)
{
item tmp;
tmp.make_corpse(g->itypes["corpse"], z->type, g->turn);
tmp.damage = corpse_damage;
g->m.add_item(z->posx, z->posy, tmp);
}
// leave gibs
for (int i = 0; i < gib_amount; i++)
{
int rand_posx = z->posx + rng(1,5) - 3;
int rand_posy = z->posx + rng(1,5) - 3;
if (((g->m.field_at(rand_posx, rand_posy).type == fd_gibs_flesh) ||
(g->m.field_at(rand_posx, rand_posy).type == fd_gibs_veggy)) &&
(g->m.field_at(rand_posx, rand_posy).density < 3))
{
g->m.field_at(rand_posx, rand_posy).density++;
}
else if (g->m.field_at(rand_posx, rand_posy).is_null())
{
if (z->made_of("flesh") || z->made_of("hflesh"))
{
g->m.add_field(g, z->posx + rng(1,5) - 3, z->posy + rng(1,5) - 3, fd_gibs_flesh, rng(1,3));
}
else if (z->made_of("veggy"))
{
g->m.add_field(g, z->posx + rng(1,5) - 3, z->posy + rng(1,5) - 3, fd_gibs_veggy, rng(1,3));
}
}
}
}
void mdeath::acid(game *g, monster *z)
@@ -313,12 +389,18 @@ void mdeath::smokeburst(game *g, monster *z)
}
}
// this function generates clothing for zombies
// this function generates clothing for zombies
void mdeath::zombie(game *g, monster *z)
{
// normal death function first
mdeath::normal(g, z);
// skip clothing generation if the zombie was rezzed rather than spawned
if (z->no_extra_death_drops)
{
return;
}
// now generate appropriate clothing
switch(z->type->id)
{
@@ -343,12 +425,12 @@ void mdeath::zombie(game *g, monster *z)
g->m.put_items_from(mi_mil_armor_helmet, 1, z->posx, z->posy, g->turn, 0, 0, rng(1,4));
}
break;
case mon_zombie_hulk:
g->m.spawn_item(z->posx, z->posy, item_controller->find_template("rag"), g->turn, 0, 0, rng(5,10));
g->m.spawn_item(z->posx, z->posy, "rag", g->turn, 0, 0, rng(5,10));
g->m.put_items_from(mi_pants, 1, z->posx, z->posy, g->turn, 0, 0, rng(1,4));
break;
default:
g->m.put_items_from(mi_pants, 1, z->posx, z->posy, g->turn, 0, 0, rng(1,4));
g->m.put_items_from(mi_shirts, 1, z->posx, z->posy, g->turn, 0, 0, rng(1,4));
+4
View File
@@ -5,6 +5,9 @@
#include "picojson.h"
#include "options.h"
// Default start time, this is the only place it's still used.
#define STARTING_MINUTES 480
//Adding a group:
// 1: Declare it in the MonsterGroupDefs enum in mongroup.h
// 2: Define it in here with the macro Group(your group, default monster)
@@ -225,6 +228,7 @@ void init_translation()
monStr2monId["mon_sewer_fish"] = mon_sewer_fish; monStr2monId["mon_sewer_snake"] = mon_sewer_snake; monStr2monId["mon_sewer_rat"] = mon_sewer_rat; monStr2monId["mon_rat_king"] = mon_rat_king;
monStr2monId["mon_mosquito"] = mon_mosquito; monStr2monId["mon_dragonfly"] = mon_dragonfly; monStr2monId["mon_centipede"] = mon_centipede; monStr2monId["mon_frog"] = mon_frog; monStr2monId["mon_slug"] = mon_slug;
monStr2monId["mon_dermatik_larva"] = mon_dermatik_larva; monStr2monId["mon_dermatik"] = mon_dermatik;
monStr2monId["mon_jabberwock"] = mon_jabberwock;
monStr2monId["mon_spider_wolf"] = mon_spider_wolf; monStr2monId["mon_spider_web"] = mon_spider_web; monStr2monId["mon_spider_jumping"] = mon_spider_jumping; monStr2monId["mon_spider_trapdoor"] = mon_spider_trapdoor;
monStr2monId["mon_spider_widow"] = mon_spider_widow;
monStr2monId["mon_dark_wyrm"] = mon_dark_wyrm; monStr2monId["mon_amigara_horror"] = mon_amigara_horror; monStr2monId["mon_dog_thing"] = mon_dog_thing; monStr2monId["mon_headless_dog_thing"] = mon_headless_dog_thing;
+59 -21
View File
@@ -230,7 +230,6 @@ void monster::move(game *g)
return;
}
moves -= 100;
bool moved = false;
point next;
int mondex = (plans.size() > 0 ? g->mon_at(plans[0].x, plans[0].y) : -1);
@@ -253,6 +252,7 @@ void monster::move(game *g)
if (current_attitude == MATT_IGNORE ||
(current_attitude == MATT_FOLLOW && plans.size() <= MONSTER_FOLLOW_DIST)) {
moves -= 100;
stumble(g, false);
return;
}
@@ -289,10 +289,11 @@ void monster::move(game *g)
int npcdex = g->npc_at(next.x, next.y);
if (next.x == g->u.posx && next.y == g->u.posy && type->melee_dice > 0)
hit_player(g, g->u);
else if (mondex != -1 && g->z[mondex].type->species == species_hallu)
else if (mondex != -1 && g->z[mondex].type->species == species_hallu) {
g->kill_mon(mondex);
else if (mondex != -1 && type->melee_dice > 0 && this != &(g->z[mondex]) &&
(g->z[mondex].friendly != 0 || has_flag(MF_ATTACKMON)))
moves -= 100;
} else if (mondex != -1 && type->melee_dice > 0 && this != &(g->z[mondex]) &&
(g->z[mondex].friendly != 0 || has_flag(MF_ATTACKMON)))
hit_monster(g, mondex);
else if (npcdex != -1 && type->melee_dice > 0)
hit_player(g, *g->active_npc[npcdex]);
@@ -302,6 +303,7 @@ void monster::move(game *g)
int bashskill = int(type->melee_dice * type->melee_sides);
g->m.bash(next.x, next.y, bashskill, bashsound);
g->sound(next.x, next.y, 18, bashsound);
moves -= 100;
} else if (g->m.move_cost(next.x, next.y) == 0 && has_flag(MF_DESTROYS)) {
g->m.destroy(g, next.x, next.y, true);
moves -= 250;
@@ -309,7 +311,8 @@ void monster::move(game *g)
move_to(g, next.x, next.y);
else
moves -= 100;
}
} else
moves -= 100;
// If we're close to our target, we get focused and don't stumble
if ((has_flag(MF_STUMBLES) && (plans.size() > 3 || plans.size() == 0)) ||
@@ -354,15 +357,16 @@ void monster::friendly_move(game *g)
{
point next;
bool moved = false;
moves -= 100;
if (plans.size() > 0 && (plans[0].x != g->u.posx || plans[0].y != g->u.posy) &&
(can_move_to(g, plans[0].x, plans[0].y) ||
(g->m.has_flag(bashable, plans[0].x, plans[0].y) && has_flag(MF_BASHES)))){
next = plans[0];
plans.erase(plans.begin());
moved = true;
} else
} else {
moves -= 100;
stumble(g, moved);
}
if (moved) {
int mondex = g->mon_at(next.x, next.y);
int npcdex = g->npc_at(next.x, next.y);
@@ -378,6 +382,7 @@ void monster::friendly_move(game *g)
int bashskill = int(type->melee_dice * type->melee_sides);
g->m.bash(next.x, next.y, bashskill, bashsound);
g->sound(next.x, next.y, 18, bashsound);
moves -= 100;
} else if (g->m.move_cost(next.x, next.y) == 0 && has_flag(MF_DESTROYS)) {
g->m.destroy(g, next.x, next.y, true);
moves -= 250;
@@ -495,6 +500,8 @@ point monster::sound_move(game *g)
void monster::hit_player(game *g, player &p, bool can_grab)
{
moves -= 100;
if (type->melee_dice == 0) // We don't attack, so just return
{
return;
@@ -590,10 +597,10 @@ void monster::hit_player(game *g, player &p, bool can_grab)
}
//Hurt the player
p.hit(g, bphit, side, dam, cut);
dam = p.hit(g, bphit, side, dam, cut);
//Monster effects
if (has_flag(MF_VENOM))
if (dam > 0 && has_flag(MF_VENOM))
{
if (!is_npc)
{
@@ -601,7 +608,7 @@ void monster::hit_player(game *g, player &p, bool can_grab)
}
p.add_disease(DI_POISON, 30, g);
}
else if (has_flag(MF_BADVENOM))
else if (dam > 0 && has_flag(MF_BADVENOM))
{
if (!is_npc)
{
@@ -695,6 +702,33 @@ void monster::hit_player(game *g, player &p, bool can_grab)
}
}
int monster::calc_movecost(game *g, int x1, int y1, int x2, int y2)
{
int movecost = 0;
int diag_mult = (trigdist && x1 != x2 && y1 != y2) ? 1.41 : 1;
// Digging and flying monsters ignore terrain cost
if (has_flag(MF_DIGS) || has_flag(MF_FLIES)) {
movecost = 100 * diag_mult;
// Swimming monsters move super fast in water
} else if (has_flag(MF_SWIMS)) {
if (g->m.has_flag(swimmable, x1, y1))
movecost += 25;
else
movecost += 50 * g->m.move_cost(x1, y1);
if (g->m.has_flag(swimmable, x2, y2))
movecost += 25;
else
movecost += 50 * g->m.move_cost(x2, y2);
movecost *= diag_mult;
// All others use the same calculation as the player
} else {
movecost = (g->m.combined_movecost(x1, y1, x2, y2));
}
return movecost;
}
void monster::move_to(game *g, int x, int y)
{
int mondex = g->mon_at(x, y);
@@ -703,13 +737,12 @@ void monster::move_to(game *g, int x, int y)
moves = 0;
return;
}
if (plans.size() > 0)
plans.erase(plans.begin());
if (has_flag(MF_SWIMS) && g->m.has_flag(swimmable, x, y))
moves += 50;
if (!has_flag(MF_DIGS) && !has_flag(MF_FLIES) &&
(!has_flag(MF_SWIMS) || !g->m.has_flag(swimmable, x, y)))
moves -= (g->m.move_cost(x, y) - 2) * 50;
moves -= calc_movecost(g, posx, posy, x, y);
posx = x;
posy = y;
footsteps(g, x, y);
@@ -720,7 +753,7 @@ void monster::move_to(game *g, int x, int y)
if (!has_flag(MF_DIGS) && !has_flag(MF_FLIES) &&
g->m.tr_at(posx, posy) != tr_null) { // Monster stepped on a trap!
trap* tr = g->traps[g->m.tr_at(posx, posy)];
if (dice(3, sk_dodge + 1) < dice(3, tr->avoidance)) {
if (dice(3, type->sk_dodge + 1) < dice(3, tr->avoidance)) {
trapfuncm f;
(f.*(tr->actm))(g, this, posx, posy);
}
@@ -767,10 +800,13 @@ void monster::stumble(game *g, bool moved)
}
int choice = rng(0, valid_stumbles.size() - 1);
posx = valid_stumbles[choice].x;
posy = valid_stumbles[choice].y;
if (!has_flag(MF_DIGS) || !has_flag(MF_FLIES))
moves -= (g->m.move_cost(posx, posy) - 2) * 50;
int cx = valid_stumbles[choice].x;
int cy = valid_stumbles[choice].y;
moves -= calc_movecost(g, posx, posy, cx, cy);
posx = cx;
posy = cy;
// Here we have to fix our plans[] list,
// acquiring a new path to the previous target.
// target == either end of current plan, or the player.
@@ -911,8 +947,10 @@ int monster::turns_to_reach(game *g, int x, int y)
for (int i = 0; i < path.size(); i++) {
if (g->m.move_cost(path[i].x, path[i].y) == 0) // We have to bash through
turns += 5;
else if (i == 0)
turns += double(calc_movecost(g, posx, posy, path[i].x, path[i].y)) / speed;
else
turns += double(50 * g->m.move_cost(path[i].x, path[i].y)) / speed;
turns += double(calc_movecost(g, path[i-1].x, path[i-1].y, path[i].x, path[i].y)) / speed;
}
return int(turns + .9); // Round up
}
+82 -57
View File
@@ -32,6 +32,7 @@ monster::monster()
morale = 2;
faction_id = -1;
mission_id = -1;
no_extra_death_drops = false;
dead = false;
made_footstep = false;
unique_name = "";
@@ -58,6 +59,7 @@ monster::monster(mtype *t)
morale = t->morale;
faction_id = -1;
mission_id = -1;
no_extra_death_drops = false;
dead = false;
made_footstep = false;
unique_name = "";
@@ -84,6 +86,7 @@ monster::monster(mtype *t, int x, int y)
morale = type->morale;
faction_id = -1;
mission_id = -1;
no_extra_death_drops = false;
dead = false;
made_footstep = false;
unique_name = "";
@@ -122,18 +125,19 @@ std::string monster::name()
return type->name;
}
// MATERIALS-TODO: put description in materials.json?
std::string monster::name_with_armor()
{
std::string ret = type->name;
if (type->species == species_insect)
ret += "'s carapace";
else {
switch (type->mat) {
case VEGGY: ret += "'s thick bark"; break;
case FLESH: ret += "'s thick hide"; break;
case IRON:
case STEEL: ret += "'s armor plating"; break;
}
if (type->mat == "veggy")
ret += "'s thick bark";
else if (type->mat == "flesh" || type->mat == "hflesh")
ret += "'s thick hide";
else if (type->mat == "iron" || type->mat == "steel")
ret += "'s armor plating";
}
return ret;
}
@@ -258,7 +262,7 @@ bool monster::can_hear()
return has_flag(MF_HEARS) && !has_effect(ME_DEAF);
}
bool monster::made_of(material m)
bool monster::made_of(std::string m)
{
if (type->mat == m)
return true;
@@ -279,9 +283,10 @@ void monster::load_info(std::string data, std::vector <mtype*> *mtypes)
dump << data;
dump >> idtmp >> posx >> posy >> wandx >> wandy >> wandf >> moves >> speed >>
hp >> sp_timeout >> plansize >> friendly >> faction_id >> mission_id >>
dead >> anger >> morale;
no_extra_death_drops >> dead >> anger >> morale;
type = (*mtypes)[idtmp];
point ptmp;
plans.clear();
for (int i = 0; i < plansize; i++) {
dump >> ptmp.x >> ptmp.y;
plans.push_back(ptmp);
@@ -290,16 +295,17 @@ void monster::load_info(std::string data, std::vector <mtype*> *mtypes)
std::string monster::save_info()
{
std::stringstream pack;
pack << int(type->id) << " " << posx << " " << posy << " " << wandx << " " <<
wandy << " " << wandf << " " << moves << " " << speed << " " << hp <<
" " << sp_timeout << " " << plans.size() << " " << friendly << " " <<
faction_id << " " << mission_id << " " << dead << " " << anger <<
" " << morale;
for (int i = 0; i < plans.size(); i++) {
pack << " " << plans[i].x << " " << plans[i].y;
}
return pack.str();
std::stringstream pack;
pack << int(type->id) << " " << posx << " " << posy << " " << wandx << " " <<
wandy << " " << wandf << " " << moves << " " << speed << " " << hp <<
" " << sp_timeout << " " << plans.size() << " " << friendly << " " <<
faction_id << " " << mission_id << " " << no_extra_death_drops << " " <<
dead << " " << anger << " " << morale;
for (int i = 0; i < plans.size(); i++) {
pack << " " << plans[i].x << " " << plans[i].y;
}
return pack.str();
}
void monster::debug(player &u)
@@ -529,6 +535,7 @@ int monster::hit(game *g, player &p, body_part &bp_hit) {
void monster::hit_monster(game *g, int i)
{
monster* target = &(g->z[i]);
moves -= 100;
if (this == target) {
debugmsg("stopped monster from hitting itself");
@@ -624,41 +631,9 @@ void monster::die(game *g)
{
if (!dead)
dead = true;
// Drop goodies
int total_chance = 0, total_it_chance, cur_chance, selected_location,
selected_item;
bool animal_done = false;
std::vector<items_location_and_chance> it = g->monitems[type->id];
std::vector<itype_id> mapit;
if (type->item_chance != 0 && it.size() == 0)
debugmsg("Type %s has item_chance %d but no items assigned!",
type->name.c_str(), type->item_chance);
else {
for (int i = 0; i < it.size(); i++)
total_chance += it[i].chance;
while (rng(0, 99) < abs(type->item_chance) && !animal_done) {
cur_chance = rng(1, total_chance);
selected_location = -1;
while (cur_chance > 0) {
selected_location++;
cur_chance -= it[selected_location].chance;
}
total_it_chance = 0;
mapit = g->mapitems[it[selected_location].loc];
for (int i = 0; i < mapit.size(); i++)
total_it_chance += g->itypes[mapit[i]]->rarity;
cur_chance = rng(1, total_it_chance);
selected_item = -1;
while (cur_chance > 0) {
selected_item++;
cur_chance -= g->itypes[mapit[selected_item]]->rarity;
}
g->m.spawn_item(posx, posy, g->itypes[mapit[selected_item]], 0);
if (type->item_chance < 0)
animal_done = true; // Only drop ONE item.
}
} // Done dropping items
if (!no_extra_death_drops) {
drop_items_on_death(g);
}
// If we're a queen, make nearby groups of our type start to die out
if (has_flag(MF_QUEEN)) {
@@ -708,6 +683,55 @@ void monster::die(game *g)
}
}
void monster::drop_items_on_death(game *g)
{
int total_chance = 0, total_it_chance, cur_chance, selected_location,
selected_item;
bool animal_done = false;
std::vector<items_location_and_chance> it = g->monitems[type->id];
std::vector<itype_id> mapit;
if (type->item_chance != 0 && it.size() == 0)
{
debugmsg("Type %s has item_chance %d but no items assigned!",
type->name.c_str(), type->item_chance);
return;
}
for (int i = 0; i < it.size(); i++)
{
total_chance += it[i].chance;
}
while (rng(0, 99) < abs(type->item_chance) && !animal_done)
{
cur_chance = rng(1, total_chance);
selected_location = -1;
while (cur_chance > 0)
{
selected_location++;
cur_chance -= it[selected_location].chance;
}
total_it_chance = 0;
mapit = g->mapitems[it[selected_location].loc];
for (int i = 0; i < mapit.size(); i++)
{
total_it_chance += g->itypes[mapit[i]]->rarity;
}
cur_chance = rng(1, total_it_chance);
selected_item = -1;
while (cur_chance > 0)
{
selected_item++;
cur_chance -= g->itypes[mapit[selected_item]]->rarity;
}
g->m.spawn_item(posx, posy, mapit[selected_item], 0);
if (type->item_chance < 0)
{
animal_done = true; // Only drop ONE item.
}
}
}
void monster::add_effect(monster_effect_type effect, int duration)
{
for (int i = 0; i < effects.size(); i++) {
@@ -747,13 +771,14 @@ void monster::process_effects(game *g)
hurt(rng(1, 3));
break;
// MATERIALS-TODO: use fire resistance
case ME_ONFIRE:
if (made_of(FLESH))
if (made_of("flesh"))
hurt(rng(3, 8));
if (made_of(VEGGY))
if (made_of("veggy"))
hurt(rng(10, 20));
if (made_of(PAPER) || made_of(POWDER) || made_of(WOOD) || made_of(COTTON) ||
made_of(WOOL))
if (made_of("paper") || made_of("powder") || made_of("wood") || made_of("cotton") ||
made_of("wool"))
hurt(rng(15, 40));
break;
+4 -1
View File
@@ -65,7 +65,7 @@ class monster {
bool has_flag(m_flag f); // Returns true if f is set (see mtype.h)
bool can_see(); // MF_SEES and no ME_BLIND
bool can_hear(); // MF_HEARS and no ME_DEAF
bool made_of(material m); // Returns true if it's made of m
bool made_of(std::string m); // Returns true if it's made of m
bool made_of(phase_id p); // Returns true if its phase is p
void load_info(std::string data, std::vector<mtype*> *mtypes);
@@ -93,6 +93,7 @@ class monster {
point scent_move(game *g);
point sound_move(game *g);
void hit_player(game *g, player &p, bool can_grab = true);
int calc_movecost(game *g, int x1, int y1, int x2, int y2);
void move_to(game *g, int x, int y);
void stumble(game *g, bool moved);
void knock_back_from(game *g, int posx, int posy);
@@ -113,6 +114,7 @@ class monster {
int dodge_roll(); // For the purposes of comparing to player::hit_roll()
int fall_damage(); // How much a fall hurts us
void die(game *g);
void drop_items_on_death(game *g);
// Other
void add_effect(monster_effect_type effect, int duration);
@@ -143,6 +145,7 @@ class monster {
int faction_id; // If we belong to a faction
int mission_id; // If we're related to a mission
mtype *type;
bool no_extra_death_drops; // if true, don't spawn loot items as part of death
bool dead;
bool made_footstep;
std::string unique_name; // If we're unique
+12
View File
@@ -7,18 +7,30 @@ Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Win32 = Debug|Win32
Debug|x64 = Debug|x64
Debug SDL|Win32 = Debug SDL|Win32
Debug SDL|x64 = Debug SDL|x64
Release|Win32 = Release|Win32
Release|x64 = Release|x64
Release SDL|Win32 = Release SDL|Win32
Release SDL|x64 = Release SDL|x64
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{FE1372AC-5F90-447E-BBCA-1B253836EB77}.Debug|Win32.ActiveCfg = Debug|Win32
{FE1372AC-5F90-447E-BBCA-1B253836EB77}.Debug|Win32.Build.0 = Debug|Win32
{FE1372AC-5F90-447E-BBCA-1B253836EB77}.Debug|x64.ActiveCfg = Debug|x64
{FE1372AC-5F90-447E-BBCA-1B253836EB77}.Debug|x64.Build.0 = Debug|x64
{FE1372AC-5F90-447E-BBCA-1B253836EB77}.Debug SDL|Win32.ActiveCfg = Debug SDL|Win32
{FE1372AC-5F90-447E-BBCA-1B253836EB77}.Debug SDL|Win32.Build.0 = Debug SDL|Win32
{FE1372AC-5F90-447E-BBCA-1B253836EB77}.Debug SDL|x64.ActiveCfg = Debug SDL|x64
{FE1372AC-5F90-447E-BBCA-1B253836EB77}.Debug SDL|x64.Build.0 = Debug SDL|x64
{FE1372AC-5F90-447E-BBCA-1B253836EB77}.Release|Win32.ActiveCfg = Release|Win32
{FE1372AC-5F90-447E-BBCA-1B253836EB77}.Release|Win32.Build.0 = Release|Win32
{FE1372AC-5F90-447E-BBCA-1B253836EB77}.Release|x64.ActiveCfg = Release|x64
{FE1372AC-5F90-447E-BBCA-1B253836EB77}.Release|x64.Build.0 = Release|x64
{FE1372AC-5F90-447E-BBCA-1B253836EB77}.Release SDL|Win32.ActiveCfg = Release SDL|Win32
{FE1372AC-5F90-447E-BBCA-1B253836EB77}.Release SDL|Win32.Build.0 = Release SDL|Win32
{FE1372AC-5F90-447E-BBCA-1B253836EB77}.Release SDL|x64.ActiveCfg = Release SDL|x64
{FE1372AC-5F90-447E-BBCA-1B253836EB77}.Release SDL|x64.Build.0 = Release SDL|x64
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
+54 -14
View File
@@ -1,4 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup Label="ProjectConfigurations">
<ProjectConfiguration Include="Debug|Win32">
@@ -9,6 +9,14 @@
<Configuration>Debug</Configuration>
<Platform>x64</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Debug SDL|Win32">
<Configuration>Debug SDL</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Debug SDL|x64">
<Configuration>Debug SDL</Configuration>
<Platform>x64</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Release|Win32">
<Configuration>Release</Configuration>
<Platform>Win32</Platform>
@@ -17,18 +25,26 @@
<Configuration>Release</Configuration>
<Platform>x64</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Release SDL|Win32">
<Configuration>Release SDL</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Release SDL|x64">
<Configuration>Release SDL</Configuration>
<Platform>x64</Platform>
</ProjectConfiguration>
</ItemGroup>
<PropertyGroup Label="Globals">
<ProjectGuid>{FE1372AC-5F90-447E-BBCA-1B253836EB77}</ProjectGuid>
<RootNamespace>Cataclysm</RootNamespace>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<PropertyGroup Condition="'$(Configuration)'=='Debug'" Label="Configuration">
<PropertyGroup Condition="'$(Configuration)'=='Debug' or '$(Configuration)'=='Debug SDL'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<UseDebugLibraries>true</UseDebugLibraries>
<CharacterSet>MultiByte</CharacterSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)'=='Release'" Label="Configuration">
<PropertyGroup Condition="'$(Configuration)'=='Release' or '$(Configuration)'=='Release SDL'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries>
<CharacterSet>MultiByte</CharacterSet>
@@ -43,15 +59,14 @@
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<PropertyGroup Label="UserMacros" />
<PropertyGroup />
<ItemDefinitionGroup>
<ClCompile>
<WarningLevel>Level4</WarningLevel>
<PreprocessorDefinitions>_MBCS;NOMINMAX;_USE_MATH_DEFINES;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<PreprocessorDefinitions>_MBCS;NOMINMAX;_USE_MATH_DEFINES;USE_WINMAIN;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<DisableSpecificWarnings>4100;4127;4996</DisableSpecificWarnings>
</ClCompile>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)'=='Debug'">
<ItemDefinitionGroup Condition="'$(Configuration)'=='Debug' or '$(Configuration)'=='Debug SDL'">
<ClCompile>
<Optimization>Disabled</Optimization>
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
@@ -60,11 +75,30 @@
<GenerateDebugInformation>true</GenerateDebugInformation>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)'=='Release'">
<ItemDefinitionGroup Condition="'$(Configuration)'=='Release' or '$(Configuration)'=='Release SDL'">
<Link>
<OptimizeReferences>true</OptimizeReferences>
<GenerateDebugInformation>true</GenerateDebugInformation>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)'=='Debug SDL' or '$(Configuration)'=='Release SDL'">
<ClCompile>
<PreprocessorDefinitions>TILES;%(PreprocessorDefinitions)</PreprocessorDefinitions>
</ClCompile>
<Link>
<AdditionalDependencies>SDL.lib;SDL_ttf.lib;%(AdditionalDependencies)</AdditionalDependencies>
</Link>
</ItemDefinitionGroup>
<PropertyGroup>
<CustomBuildBeforeTargets>ClCompile</CustomBuildBeforeTargets>
</PropertyGroup>
<ItemDefinitionGroup>
<CustomBuildStep>
<Command>getversion.cmd</Command>
<Message>Generationg version.h</Message>
<Outputs>version.h</Outputs>
</CustomBuildStep>
</ItemDefinitionGroup>
<ItemGroup>
<ClCompile Include="..\action.cpp" />
<ClCompile Include="..\addiction.cpp" />
@@ -72,8 +106,8 @@
<ClCompile Include="..\basecamp.cpp" />
<ClCompile Include="..\bionics.cpp" />
<ClCompile Include="..\bodypart.cpp" />
<ClCompile Include="..\building_generation.cpp" />
<ClCompile Include="..\calendar.cpp" />
<ClCompile Include="..\catacurse.cpp" />
<ClCompile Include="..\catajson.cpp" />
<ClCompile Include="..\color.cpp" />
<ClCompile Include="..\computer.cpp" />
@@ -97,9 +131,7 @@
<ClCompile Include="..\item.cpp" />
<ClCompile Include="..\item_factory.cpp" />
<ClCompile Include="..\item_group.cpp" />
<ClCompile Include="..\itypedef.cpp">
<Optimization>Disabled</Optimization>
</ClCompile>
<ClCompile Include="..\itypedef.cpp" />
<ClCompile Include="..\iuse.cpp" />
<ClCompile Include="..\keypress.cpp" />
<ClCompile Include="..\lightmap.cpp" />
@@ -112,6 +144,7 @@
<ClCompile Include="..\mapgen.cpp" />
<ClCompile Include="..\mapgenformat.cpp" />
<ClCompile Include="..\mapitemsdef.cpp" />
<ClCompile Include="..\material.cpp" />
<ClCompile Include="..\melee.cpp" />
<ClCompile Include="..\mission.cpp" />
<ClCompile Include="..\missiondef.cpp" />
@@ -142,6 +175,7 @@
<ClCompile Include="..\profession.cpp" />
<ClCompile Include="..\ranged.cpp" />
<ClCompile Include="..\rng.cpp" />
<ClCompile Include="..\sdlcurse.cpp" />
<ClCompile Include="..\settlement.cpp" />
<ClCompile Include="..\setvector.cpp" />
<ClCompile Include="..\skill.cpp" />
@@ -150,12 +184,14 @@
<ClCompile Include="..\trapdef.cpp" />
<ClCompile Include="..\trapfunc.cpp" />
<ClCompile Include="..\tutorial.cpp" />
<ClCompile Include="..\ui.cpp" />
<ClCompile Include="..\vehicle.cpp" />
<ClCompile Include="..\veh_interact.cpp" />
<ClCompile Include="..\veh_typedef.cpp" />
<ClCompile Include="..\version.cpp" />
<ClCompile Include="..\weather.cpp" />
<ClCompile Include="..\weather_data.cpp" />
<ClCompile Include="..\wincurse.cpp" />
<ClCompile Include="..\wish.cpp" />
</ItemGroup>
<ItemGroup>
@@ -166,6 +202,7 @@
<ClInclude Include="..\basecamp.h" />
<ClInclude Include="..\bionics.h" />
<ClInclude Include="..\bodypart.h" />
<ClInclude Include="..\building_generation.h" />
<ClInclude Include="..\calendar.h" />
<ClInclude Include="..\catacurse.h" />
<ClInclude Include="..\catajson.h" />
@@ -201,6 +238,7 @@
<ClInclude Include="..\mapdata.h" />
<ClInclude Include="..\mapgenformat.h" />
<ClInclude Include="..\mapitems.h" />
<ClInclude Include="..\material.h" />
<ClInclude Include="..\mission.h" />
<ClInclude Include="..\monattack.h" />
<ClInclude Include="..\mondeath.h" />
@@ -216,7 +254,7 @@
<ClInclude Include="..\options.h" />
<ClInclude Include="..\output.h" />
<ClInclude Include="..\overmap.h" />
<ClCompile Include="..\overmapbuffer.h" />
<ClInclude Include="..\overmapbuffer.h" />
<ClInclude Include="..\picojson.h" />
<ClInclude Include="..\player.h" />
<ClInclude Include="..\pldata.h" />
@@ -230,11 +268,13 @@
<ClInclude Include="..\tileray.h" />
<ClInclude Include="..\trap.h" />
<ClInclude Include="..\tutorial.h" />
<ClInclude Include="..\ui.h" />
<ClInclude Include="..\vehicle.h" />
<ClInclude Include="..\veh_interact.h" />
<ClInclude Include="..\veh_type.h" />
<ClInclude Include="..\version.h" />
<ClInclude Include="..\wdirent.h" />
<ClInclude Include="..\weather.h" />
<ClInclude Include="..\weather_data.h" />
</ItemGroup>
<ItemGroup>
<ResourceCompile Include="..\resource.rc" />
@@ -245,4 +285,4 @@
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets">
</ImportGroup>
</Project>
</Project>
+39 -3
View File
@@ -33,10 +33,10 @@
<ClCompile Include="..\bodypart.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\calendar.cpp">
<ClCompile Include="..\building_generation.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\catacurse.cpp">
<ClCompile Include="..\calendar.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\catajson.cpp">
@@ -147,6 +147,9 @@
<ClCompile Include="..\mapitemsdef.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\material.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\melee.cpp">
<Filter>Source Files</Filter>
</ClCompile>
@@ -219,6 +222,9 @@
<ClCompile Include="..\overmap.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\overmapbuffer.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\player.cpp">
<Filter>Source Files</Filter>
</ClCompile>
@@ -234,6 +240,9 @@
<ClCompile Include="..\rng.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\sdlcurse.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\settlement.cpp">
<Filter>Source Files</Filter>
</ClCompile>
@@ -243,6 +252,9 @@
<ClCompile Include="..\skill.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\text_snippets.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\tileray.cpp">
<Filter>Source Files</Filter>
</ClCompile>
@@ -255,6 +267,9 @@
<ClCompile Include="..\tutorial.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\ui.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\veh_interact.cpp">
<Filter>Source Files</Filter>
</ClCompile>
@@ -273,6 +288,9 @@
<ClCompile Include="..\weather_data.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\wincurse.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\wish.cpp">
<Filter>Source Files</Filter>
</ClCompile>
@@ -299,6 +317,9 @@
<ClInclude Include="..\bodypart.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="..\building_generation.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="..\calendar.h">
<Filter>Header Files</Filter>
</ClInclude>
@@ -404,6 +425,9 @@
<ClInclude Include="..\mapitems.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="..\material.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="..\mission.h">
<Filter>Header Files</Filter>
</ClInclude>
@@ -449,6 +473,9 @@
<ClInclude Include="..\overmap.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="..\overmapbuffer.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="..\picojson.h">
<Filter>Header Files</Filter>
</ClInclude>
@@ -476,6 +503,9 @@
<ClInclude Include="..\skill.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="..\text_snippets.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="..\tileray.h">
<Filter>Header Files</Filter>
</ClInclude>
@@ -485,6 +515,9 @@
<ClInclude Include="..\tutorial.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="..\ui.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="..\veh_interact.h">
<Filter>Header Files</Filter>
</ClInclude>
@@ -494,10 +527,13 @@
<ClInclude Include="..\vehicle.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="..\wdirent.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="..\weather.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="..\weather_data.h">
<ClInclude Include="..\version.h">
<Filter>Header Files</Filter>
</ClInclude>
</ItemGroup>
+4
View File
@@ -0,0 +1,4 @@
@echo off
SETLOCAL
for /F "tokens=*" %%i in ('git describe --tags --always --dirty --match "[0-9]*.[0-9]*"') do set VERSION=%%i
>..\version.h echo #define VERSION "%VERSION%"
+10 -4
View File
@@ -8,6 +8,7 @@
#include <math.h>
#include "mondeath.h"
#include "monattack.h"
#include "material.h"
#include "enums.h"
#include "color.h"
@@ -46,6 +47,8 @@ mon_graboid, mon_worm, mon_halfworm,
mon_boomer, mon_boomer_fungus, mon_skeleton, mon_zombie_necro,
mon_zombie_scientist, mon_zombie_soldier, mon_zombie_grabber,
mon_zombie_master, mon_beekeeper, mon_zombie_child,
// Flesh Golem
mon_jabberwock,
// Triffids
mon_triffid, mon_triffid_young, mon_triffid_queen, mon_creeper_hub,
mon_creeper_vine, mon_biollante, mon_vinebeast, mon_triffid_heart,
@@ -73,6 +76,8 @@ mon_human_snail, mon_twisted_body, mon_vortex,
mon_flying_polyp, mon_hunting_horror, mon_mi_go, mon_yugg, mon_gelatin,
mon_flaming_eye, mon_kreck, mon_gracke, mon_blank, mon_gozu, mon_shadow, mon_breather_hub,
mon_breather, mon_shadow_snake,
// Cult, lobotomized creatures that are human/undead hybrids
mon_dementia, mon_homunculus, mon_blood_sacrifice, mon_flesh_angel,
// Robots
mon_eyebot, mon_manhack, mon_skitterbot, mon_secubot, mon_hazmatbot, mon_copbot, mon_molebot,
mon_tripod, mon_chickenbot, mon_tankbot, mon_turret, mon_exploder,
@@ -156,8 +161,9 @@ MF_ACIDTRAIL, // Leaves a trail of acid
MF_FIREY, // Burns stuff and is immune to fire
MF_QUEEN, // When it dies, local populations start to die off too
MF_ELECTRONIC, // e.g. a robot; affected by emp blasts, and other stuff
MF_FUR, // May produce fur when butchered.
MF_FUR, // May produce fur when butchered
MF_LEATHER, // May produce leather when butchered
MF_FEATHER, // May produce feather when butchered
MF_CBM, // May produce a cbm or two when butchered
MF_BONES, // May produce bones and sinews when butchered
MF_IMMOBILE, // Doesn't move (e.g. turrets)
@@ -185,7 +191,7 @@ struct mtype {
nc_color color;// Color of symbol (see color.h)
m_size size;
material mat; // See enums.h for material list. Generally, flesh; veggy?
std::string mat; // See materials.json for material list. Generally, flesh; veggy?
phase_id phase;
std::vector<m_flag> flags;
std::vector<m_category> categories;
@@ -222,7 +228,7 @@ struct mtype {
sym = ' ';
color = c_white;
size = MS_MEDIUM;
mat = FLESH;
mat = "hflesh";
phase = SOLID;
difficulty = 0;
agro = 0;
@@ -244,7 +250,7 @@ struct mtype {
}
// Non-default (messy)
mtype (int pid, std::string pname, monster_species pspecies, char psym,
nc_color pcolor, m_size psize, material pmat,
nc_color pcolor, m_size psize, std::string pmat,
unsigned int pdiff, signed char pagro,
signed char pmorale, unsigned int pspeed, unsigned char pml_skill,
unsigned char pml_dice, unsigned char pml_sides, unsigned char pml_cut,
+174 -119
View File
@@ -38,7 +38,7 @@ desc))
// PLEASE NOTE: The description is AT MAX 4 lines of 46 characters each.
// FOREST ANIMALS
mon("squirrel", species_mammal, 'r', c_ltgray, MS_TINY, FLESH,
mon("squirrel", species_mammal, 'r', c_ltgray, MS_TINY, "flesh",
// dif agr mor spd msk mdi m## cut dge bsh cut itm HP special freq
0,-99, -8,140, 0, 1, 1, 0, 4, 0, 0, 0, 1, 0,
&mdeath::normal, &mattack::none, "\
@@ -47,7 +47,7 @@ A small woodland animal."
FLAGS(MF_SEES, MF_HEARS, MF_SMELLS, MF_ANIMAL, MF_WARM, MF_FUR, MF_BONES);
CATEGORIES(MC_WILDLIFE);
mon("rabbit", species_mammal, 'r', c_white, MS_TINY, FLESH,
mon("rabbit", species_mammal, 'r', c_white, MS_TINY, "flesh",
// dif agr mor spd msk mdi m## cut dge bsh cut itm HP special freq
0,-99, -7,180, 0, 0, 0, 0, 6, 0, 0, 0, 4, 0,
&mdeath::normal, &mattack::none, "\
@@ -57,7 +57,7 @@ delicious flesh."
FLAGS(MF_SEES, MF_HEARS, MF_SMELLS, MF_ANIMAL, MF_WARM, MF_FUR, MF_BONES);
CATEGORIES(MC_WILDLIFE);
mon("deer", species_mammal, 'd', c_brown, MS_LARGE, FLESH,
mon("deer", species_mammal, 'd', c_brown, MS_LARGE, "flesh",
// dif agr mor spd msk mdi m## cut dge bsh cut itm HP special freq
1,-99, -5,300, 4, 3, 3, 0, 3, 0, 0, 0, 80, 0,
&mdeath::normal, &mattack::none, "\
@@ -66,7 +66,7 @@ A large buck, fast-moving and strong."
FLAGS(MF_SEES, MF_HEARS, MF_SMELLS, MF_ANIMAL, MF_WARM, MF_FUR, MF_BONES);
CATEGORIES(MC_WILDLIFE);
mon("moose", species_mammal, 'M', c_brown, MS_LARGE, FLESH,
mon("moose", species_mammal, 'M', c_brown, MS_LARGE, "flesh",
// dif agr mor spd msk mdi m## cut dge bsh cut itm HP special freq
1,-50, -5,200, 10, 3, 4, 0, 1, 3, 1, 0, 100, 0,
&mdeath::normal, &mattack::none, "\
@@ -75,7 +75,7 @@ A buck of the largest deer species."
FLAGS(MF_SEES, MF_HEARS, MF_SMELLS, MF_ANIMAL, MF_WARM, MF_FUR, MF_BONES);
CATEGORIES(MC_WILDLIFE);
mon("wolf", species_mammal, 'w', c_ltgray, MS_MEDIUM, FLESH,
mon("wolf", species_mammal, 'w', c_ltgray, MS_MEDIUM, "flesh",
// dif agr mor spd msk mdi m## cut dge bsh cut itm HP special freq
12, 0, 20,165, 14, 2, 3, 4, 4, 1, 0, 0, 28, 0,
&mdeath::normal, &mattack::none, "\
@@ -87,7 +87,7 @@ PLACATE(MTRIG_MEAT);
FEARS(MTRIG_FIRE, MTRIG_FRIEND_DIED);
CATEGORIES(MC_WILDLIFE);
mon("coyote", species_mammal, 'w', c_brown, MS_MEDIUM, FLESH,
mon("coyote", species_mammal, 'w', c_brown, MS_MEDIUM, "flesh",
// dif agr mor spd msk mdi m## cut dge bsh cut itm HP special freq
10, 0, 20,155, 12, 2, 3, 2, 3, 1, 0, 0, 22, 0,
&mdeath::normal, &mattack::none, "\
@@ -99,7 +99,7 @@ PLACATE(MTRIG_MEAT);
FEARS(MTRIG_FIRE, MTRIG_FRIEND_DIED);
CATEGORIES(MC_WILDLIFE);
mon("bear", species_mammal, 'B', c_dkgray, MS_LARGE, FLESH,
mon("bear", species_mammal, 'B', c_dkgray, MS_LARGE, "flesh",
// dif agr mor spd msk mdi m## cut dge bsh cut itm HP special freq
10,-10, 40,140, 10, 3, 4, 6, 3, 2, 0, 0, 90, 0,
&mdeath::normal, &mattack::none, "\
@@ -111,7 +111,7 @@ PLACATE(MTRIG_MEAT);
FEARS(MTRIG_FIRE);
CATEGORIES(MC_WILDLIFE);
mon("cougar", species_mammal, 'C', c_brown, MS_MEDIUM, FLESH,
mon("cougar", species_mammal, 'C', c_brown, MS_MEDIUM, "flesh",
// dif agr mor spd msk mdi m## cut dge bsh cut itm HP special freq
12, 0, 20,180, 14, 2, 3, 4, 4, 1, 0, 0, 15, 5,
&mdeath::normal, &mattack::leap, "\
@@ -123,17 +123,17 @@ PLACATE(MTRIG_MEAT);
FEARS(MTRIG_FIRE, MTRIG_FRIEND_DIED);
CATEGORIES(MC_WILDLIFE);
mon("crow", species_mammal, 'v', c_dkgray, MS_TINY, FLESH,
mon("crow", species_mammal, 'v', c_dkgray, MS_TINY, "flesh",
// dif agr mor spd msk mdi m## cut dge bsh cut itm HP special freq
10,-99, -8,140, 0, 1, 1, 0, 4, 0, 0, 0, 1, 0,
&mdeath::normal, &mattack::none, "\
A small woodland animal."
);
FLAGS(MF_SEES, MF_HEARS, MF_SMELLS, MF_ANIMAL, MF_WARM, MF_FLIES, MF_VIS40, MF_BONES);
FLAGS(MF_SEES, MF_HEARS, MF_SMELLS, MF_ANIMAL, MF_WARM, MF_FLIES, MF_VIS40, MF_BONES, MF_FEATHER);
CATEGORIES(MC_WILDLIFE);
// DOMESICATED ANIMALS
mon("dog", species_mammal, 'd', c_white, MS_SMALL, FLESH,
mon("dog", species_mammal, 'd', c_white, MS_SMALL, "flesh",
// dif agr mor spd msk mdi m## cut dge bsh cut itm HP special freq
5, 2, 15,150, 12, 2, 3, 3, 3, 0, 0, 0, 25, 0,
&mdeath::normal, &mattack::none, "\
@@ -145,7 +145,7 @@ PLACATE(MTRIG_MEAT);
FEARS(MTRIG_FIRE);
CATEGORIES(MC_WILDLIFE);
mon("cat", species_mammal, 'c', c_white, MS_TINY, FLESH,
mon("cat", species_mammal, 'c', c_white, MS_TINY, "flesh",
// dif agr mor spd msk mdi m## cut dge bsh cut itm HP special freq
0, -40, 15,150, 12, 1, 3, 2, 4, 0, 0, 0, 10, 0,
&mdeath::normal, &mattack::none, "\
@@ -158,7 +158,7 @@ FEARS(MTRIG_FIRE, MTRIG_SOUND);
CATEGORIES(MC_WILDLIFE);
// INSECTOIDS
mon("ant larva",species_insect, 'a', c_white, MS_SMALL, FLESH,
mon("ant larva",species_insect, 'a', c_white, MS_SMALL, "flesh",
// dif agr mor spd msk mdi m## cut dge bsh cut itm HP special freq
0, -1, 10, 65, 4, 1, 3, 0, 0, 0, 0, 0, 10, 0,
&mdeath::normal, &mattack::none, "\
@@ -167,7 +167,7 @@ of glistening white flesh turns your stomach."
);
FLAGS(MF_SMELLS, MF_POISON);
mon("giant ant",species_insect, 'a', c_brown, MS_MEDIUM, FLESH,
mon("giant ant",species_insect, 'a', c_brown, MS_MEDIUM, "flesh",
// dif agr mor spd msk mdi m## cut dge bsh cut itm HP special freq
7, 15, 60,100, 9, 1, 6, 4, 2, 4, 8,-40, 40, 0,
&mdeath::normal, &mattack::none, "\
@@ -177,7 +177,7 @@ vicious mandibles."
);
FLAGS(MF_SMELLS);
mon("soldier ant",species_insect, 'a', c_blue, MS_MEDIUM, FLESH,
mon("soldier ant",species_insect, 'a', c_blue, MS_MEDIUM, "flesh",
// dif agr mor spd msk mdi m## cut dge bsh cut itm HP special freq
16, 25,100,115, 12, 2, 4, 6, 2, 5, 10,-50, 80, 0,
&mdeath::normal, &mattack::none, "\
@@ -187,7 +187,7 @@ mandibles."
);
FLAGS(MF_SMELLS);
mon("queen ant",species_insect, 'a', c_ltred, MS_LARGE, FLESH,
mon("queen ant",species_insect, 'a', c_ltred, MS_LARGE, "flesh",
// dif agr mor spd msk mdi m## cut dge bsh cut itm HP special freq
13, 0,100, 60, 6, 3, 4, 4, 1, 6, 14,-40,180, 1,
&mdeath::normal, &mattack::antqueen, "\
@@ -198,7 +198,7 @@ still more."
);
FLAGS(MF_SMELLS, MF_QUEEN);
mon("fungal insect",species_fungus, 'a',c_ltgray, MS_MEDIUM, VEGGY,
mon("fungal insect",species_fungus, 'a',c_ltgray, MS_MEDIUM, "veggy",
// dif agr mor spd msk mdi m## cut dge bsh cut itm HP special freq
5, 80,100, 75, 5, 1, 5, 3, 1, 1, 1, 0, 30, 60,
&mdeath::normal, &mattack::fungus, "\
@@ -208,7 +208,7 @@ from every joint on its body."
);
FLAGS(MF_SMELLS, MF_POISON);
mon("giant fly",species_insect, 'a', c_ltgray, MS_SMALL, FLESH,
mon("giant fly",species_insect, 'a', c_ltgray, MS_SMALL, "flesh",
// dif agr mor spd msk mdi m## cut dge bsh cut itm HP special freq
8, 50, 30,120, 3, 1, 3, 0, 5, 0, 0, 0, 25, 0,
&mdeath::normal, &mattack::none, "\
@@ -217,7 +217,7 @@ It buzzes around incessantly."
);
FLAGS(MF_SMELLS, MF_FLIES, MF_STUMBLES, MF_HIT_AND_RUN);
mon("giant bee",species_insect, 'a', c_yellow, MS_SMALL, FLESH,
mon("giant bee",species_insect, 'a', c_yellow, MS_SMALL, "flesh",
// dif agr mor spd msk mdi m## cut dge bsh cut itm HP special freq
15,-10, 50,140, 4, 1, 1, 5, 6, 0, 5,-50, 20, 0,
&mdeath::normal, &mattack::none, "\
@@ -228,7 +228,7 @@ sized sting pointed forward."
FLAGS(MF_SMELLS, MF_VENOM, MF_FLIES, MF_STUMBLES, MF_HIT_AND_RUN);
ANGER(MTRIG_HURT, MTRIG_FRIEND_DIED, MTRIG_PLAYER_CLOSE);
mon("giant wasp",species_insect, 'a', c_red, MS_MEDIUM, FLESH,
mon("giant wasp",species_insect, 'a', c_red, MS_MEDIUM, "flesh",
// dif agr mor spd msk mdi m## cut dge bsh cut itm HP special freq
22, 5, 60,150, 6, 1, 3, 7, 7, 0, 7,-40, 35, 0,
&mdeath::normal, &mattack::none, "\
@@ -240,7 +240,7 @@ ANGER(MTRIG_HURT, MTRIG_FRIEND_DIED, MTRIG_PLAYER_CLOSE, MTRIG_SOUND);
// GIANT WORMS
mon("graboid", species_worm, 'S', c_red, MS_HUGE, FLESH,
mon("graboid", species_worm, 'S', c_red, MS_HUGE, "flesh",
// dif agr mor spd msk mdi m## cut dge bsh cut itm HP special freq
17, 30,120,180, 11, 3, 8, 4, 0, 5, 5, 0,180, 0,
&mdeath::worm, &mattack::none, "\
@@ -251,7 +251,7 @@ enormous body is hidden underground."
);
FLAGS(MF_DIGS, MF_HEARS, MF_GOODHEARING, MF_DESTROYS, MF_WARM, MF_LEATHER);
mon("giant worm",species_worm, 'S', c_pink, MS_LARGE, FLESH,
mon("giant worm",species_worm, 'S', c_pink, MS_LARGE, "flesh",
// dif agr mor spd msk mdi m## cut dge bsh cut itm HP special freq
10, 30,100, 85, 9, 4, 5, 2, 0, 2, 0, 0, 50, 0,
&mdeath::worm, &mattack::none, "\
@@ -262,7 +262,7 @@ large, fanged mouth."
);
FLAGS(MF_DIGS, MF_HEARS, MF_GOODHEARING, MF_WARM, MF_LEATHER);
mon("half worm",species_worm, 's', c_pink, MS_MEDIUM, FLESH,
mon("half worm",species_worm, 's', c_pink, MS_MEDIUM, "flesh",
// dif agr mor spd msk mdi m## cut dge bsh cut itm HP special freq
2, 10, 40, 80, 5, 3, 5, 0, 0, 0, 0, 0, 20, 0,
&mdeath::normal, &mattack::none, "\
@@ -271,7 +271,7 @@ A portion of a giant worm that is still alive."
FLAGS(MF_DIGS, MF_HEARS, MF_GOODHEARING, MF_WARM, MF_LEATHER);
// ZOMBIES
mon("zombie", species_zombie, 'Z', c_ltgreen, MS_MEDIUM, FLESH,
mon("zombie", species_zombie, 'Z', c_ltgreen, MS_MEDIUM, "flesh",
// dif agr mor spd msk mdi m## cut dge bsh cut itm HP special freq
3,100,100, 70, 8, 1, 5, 2, 1, 0, 0, 40, 50, 5,
&mdeath::zombie, &mattack::bite, "\
@@ -282,7 +282,7 @@ rage."
FLAGS(MF_SEES, MF_HEARS, MF_SMELLS, MF_STUMBLES, MF_WARM, MF_BASHES, MF_POISON, MF_BLEED, MF_NO_BREATHE, MF_VIS40);
CATEGORIES(MC_CLASSIC);
mon("zombie cop", species_zombie, 'Z', c_blue, MS_MEDIUM, FLESH,
mon("zombie cop", species_zombie, 'Z', c_blue, MS_MEDIUM, "flesh",
// dif agr mor spd msk mdi m## cut dge bsh cut itm HP special freq
3,100,100, 70, 8, 1, 5, 0, 1, 0, 0, 40, 50, 5,
&mdeath::zombie, &mattack::bite, "\
@@ -293,7 +293,7 @@ up to fight the infection."
FLAGS(MF_SEES, MF_HEARS, MF_SMELLS, MF_STUMBLES, MF_WARM, MF_BASHES, MF_POISON, MF_BLEED, MF_NO_BREATHE, MF_VIS30);
CATEGORIES(MC_CLASSIC);
mon("shrieker zombie",species_zombie, 'Z',c_magenta, MS_MEDIUM, FLESH,
mon("shrieker zombie",species_zombie, 'Z',c_magenta, MS_MEDIUM, "flesh",
// dif agr mor spd msk mdi m## cut dge bsh cut itm HP special freq
10,100,100, 95, 9, 1, 2, 0, 4, 0, 0, 45, 50, 10,
&mdeath::zombie, &mattack::shriek, "\
@@ -302,7 +302,7 @@ a gaping hole from mid-neck up."
);
FLAGS(MF_SEES, MF_HEARS, MF_SMELLS, MF_STUMBLES, MF_WARM, MF_BASHES, MF_POISON, MF_NO_BREATHE, MF_VIS50);
mon("spitter zombie",species_zombie, 'Z',c_yellow, MS_MEDIUM, FLESH,
mon("spitter zombie",species_zombie, 'Z',c_yellow, MS_MEDIUM, "flesh",
// dif agr mor spd msk mdi m## cut dge bsh cut itm HP special freq
9,100,100,105, 8, 1, 5, 0, 4, 0, 0, 30, 60, 20,
&mdeath::acid, &mattack::acid, "\
@@ -313,7 +313,7 @@ yellow fluid."
FLAGS(MF_SEES, MF_HEARS, MF_SMELLS, MF_STUMBLES, MF_WARM, MF_BASHES, MF_POISON,
MF_ACIDPROOF, MF_NO_BREATHE, MF_VIS40);
mon("shocker zombie",species_zombie,'Z',c_ltcyan, MS_MEDIUM, FLESH,
mon("shocker zombie",species_zombie,'Z',c_ltcyan, MS_MEDIUM, "flesh",
// dif agr mor spd msk mdi m## cut dge bsh cut itm HP special freq
10,100,100,110, 8, 1, 6, 0, 4, 0, 0, 40, 65, 25,
&mdeath::zombie, &mattack::shockstorm, "\
@@ -324,7 +324,7 @@ lightning."
FLAGS(MF_SEES, MF_HEARS, MF_SMELLS, MF_STUMBLES, MF_WARM, MF_BASHES, MF_POISON,
MF_ELECTRIC, MF_CBM, MF_NO_BREATHE, MF_VIS40);
mon("smoker zombie",species_zombie,'Z',c_ltgray, MS_MEDIUM, FLESH,
mon("smoker zombie",species_zombie,'Z',c_ltgray, MS_MEDIUM, "flesh",
// dif agr mor spd msk mdi m## cut dge bsh cut itm HP special freq
10,100,100,110, 8, 1, 6, 0, 4, 0, 0, 0, 65, 1,
&mdeath::smokeburst, &mattack::smokecloud, "\
@@ -334,7 +334,7 @@ thick, obfuscating smoke."
FLAGS(MF_SEES, MF_HEARS, MF_SMELLS, MF_STUMBLES, MF_WARM, MF_BASHES, MF_POISON,
MF_HARDTOSHOOT, MF_FRIENDLY_SPECIAL, MF_NO_BREATHE, MF_VIS40);
mon("zombie dog",species_zombie, 'd', c_ltgreen, MS_MEDIUM, FLESH,
mon("zombie dog",species_zombie, 'd', c_ltgreen, MS_MEDIUM, "flesh",
// dif agr mor spd msk mdi m## cut dge bsh cut itm HP special freq
12,100,100,150, 10, 1, 4, 3, 4, 0, 0, 0, 40, 5,
&mdeath::normal, &mattack::bite, "\
@@ -346,7 +346,7 @@ FLAGS(MF_SEES, MF_HEARS, MF_SMELLS, MF_STUMBLES, MF_WARM, MF_BASHES, MF_POISON,
MF_HIT_AND_RUN, MF_NO_BREATHE, MF_VIS50);
CATEGORIES(MC_CLASSIC);
mon("zombie brute",species_zombie, 'Z', c_red, MS_MEDIUM, FLESH,
mon("zombie brute",species_zombie, 'Z', c_red, MS_MEDIUM, "flesh",
// dif agr mor spd msk mdi m## cut dge bsh cut itm HP special freq
25,100,100,115, 9, 4, 4, 2, 0, 6, 3, 60, 80, 5,
&mdeath::zombie, &mattack::bite, "\
@@ -355,7 +355,7 @@ distended muscles on both arms and legs."
);
FLAGS(MF_SEES, MF_HEARS, MF_SMELLS, MF_STUMBLES, MF_WARM, MF_BASHES, MF_POISON, MF_NO_BREATHE, MF_VIS40);
mon("zombie hulk",species_zombie, 'Z', c_blue, MS_HUGE, FLESH,
mon("zombie hulk",species_zombie, 'Z', c_ltred, MS_HUGE, "flesh",
// dif agr mor spd msk mdi m## cut dge bsh cut itm HP special freq
50,100,100,130, 9, 4, 8, 0, 0, 12, 8, 80,260, 0,
&mdeath::zombie, &mattack::none, "\
@@ -365,7 +365,7 @@ A zombie that has somehow grown to the size of\n\
FLAGS(MF_SEES, MF_HEARS, MF_SMELLS, MF_STUMBLES, MF_WARM, MF_BASHES,
MF_DESTROYS, MF_POISON, MF_ATTACKMON, MF_LEATHER, MF_NO_BREATHE, MF_VIS50);
mon("fungal zombie",species_fungus, 'Z',c_ltgray, MS_MEDIUM, FLESH,
mon("fungal zombie",species_fungus, 'Z',c_ltgray, MS_MEDIUM, "flesh",
// dif agr mor spd msk mdi m## cut dge bsh cut itm HP special freq
6,100,100, 45, 6, 1, 6, 0, 0, 0, 0, 20, 40, 50,
&mdeath::zombie, &mattack::fungus, "\
@@ -375,7 +375,7 @@ over its translucent flesh."
);
FLAGS(MF_SEES, MF_HEARS, MF_SMELLS, MF_STUMBLES, MF_WARM, MF_BASHES, MF_POISON, MF_NO_BREATHE, MF_VIS30);
mon("boomer", species_zombie, 'Z', c_pink, MS_LARGE, FLESH,
mon("boomer", species_zombie, 'Z', c_pink, MS_LARGE, "flesh",
// dif agr mor spd msk mdi m## cut dge bsh cut itm HP special freq
5,100,100, 55, 7, 2, 4, 0, 1, 3, 0, 35, 40, 20,
&mdeath::boomer, &mattack::boomer, "\
@@ -385,7 +385,7 @@ from its mouth."
);
FLAGS(MF_SEES, MF_HEARS, MF_SMELLS, MF_STUMBLES, MF_WARM, MF_BASHES, MF_POISON, MF_NO_BREATHE, MF_VIS40);
mon("fungal boomer",species_fungus, 'B',c_ltgray, MS_LARGE, FLESH,
mon("fungal boomer",species_fungus, 'B',c_ltgray, MS_LARGE, "flesh",
// dif agr mor spd msk mdi m## cut dge bsh cut itm HP special freq
7,100,100, 40, 5, 2, 6, 0, 0, 3, 0, 20, 20, 30,
&mdeath::fungus, &mattack::fungus, "\
@@ -395,7 +395,7 @@ and it dribbles a gray sludge from its mouth."
);
FLAGS(MF_SEES, MF_HEARS, MF_SMELLS, MF_STUMBLES, MF_WARM, MF_BASHES, MF_POISON, MF_NO_BREATHE, MF_VIS30);
mon("skeleton", species_zombie, 'Z', c_white, MS_MEDIUM, STONE,
mon("skeleton", species_zombie, 'Z', c_white, MS_MEDIUM, "stone",
// dif agr mor spd msk mdi m## cut dge bsh cut itm HP special freq
8,100,100, 90, 10, 1, 5, 3, 2, 0, 15, 0, 40, 5,
&mdeath::zombie, &mattack::bite, "\
@@ -405,7 +405,7 @@ motion."
);
FLAGS(MF_SEES, MF_HEARS, MF_BLEED, MF_HARDTOSHOOT, MF_NO_BREATHE, MF_VIS30);
mon("zombie necromancer",species_zombie, 'Z',c_dkgray, MS_MEDIUM, FLESH,
mon("zombie necromancer",species_zombie, 'Z',c_dkgray, MS_MEDIUM, "flesh",
// dif agr mor spd msk mdi m## cut dge bsh cut itm HP special freq
13, 0,100,100, 4, 2, 3, 0, 4, 0, 0, 50,140, 4,
&mdeath::zombie, &mattack::resurrect, "\
@@ -416,7 +416,7 @@ feeling of dread and terror."
FLAGS(MF_SEES, MF_HEARS, MF_SMELLS, MF_STUMBLES, MF_WARM, MF_BASHES, MF_POISON, MF_NO_BREATHE, MF_NO_BREATHE, MF_VIS50);
ANGER(MTRIG_HURT, MTRIG_PLAYER_WEAK);
mon("zombie scientist",species_zombie, 'Z',c_ltgray, MS_MEDIUM, FLESH,
mon("zombie scientist",species_zombie, 'Z',c_ltgray, MS_MEDIUM, "flesh",
// dif agr mor spd msk mdi m## cut dge bsh cut itm HP special freq
3,100,100, 75, 7, 1, 3, 0, 1, 0, 0, 50, 35, 20,
&mdeath::zombie, &mattack::science, "\
@@ -427,7 +427,7 @@ than most zombies, but more resourceful too."
FLAGS(MF_SEES, MF_HEARS, MF_SMELLS, MF_STUMBLES, MF_WARM, MF_BASHES, MF_POISON, MF_BLEED,
MF_ACIDPROOF, MF_NO_BREATHE, MF_VIS50);
mon("zombie soldier", species_zombie, 'Z',c_ltblue, MS_MEDIUM, FLESH,
mon("zombie soldier", species_zombie, 'Z',c_ltblue, MS_MEDIUM, "flesh",
// dif agr mor spd msk mdi m## cut dge bsh cut itm HP special freq
20,100,100, 80, 12, 2, 4, 0, 0, 8, 16, 60,100, 5,
&mdeath::zombie, &mattack::bite, "\
@@ -439,7 +439,7 @@ most zombies."
FLAGS(MF_SEES, MF_HEARS, MF_SMELLS, MF_WARM, MF_BASHES, MF_POISON, MF_BLEED, MF_NO_BREATHE, MF_VIS30);
CATEGORIES(MC_CLASSIC);
mon("grabber zombie", species_zombie, 'Z',c_green, MS_MEDIUM, FLESH,
mon("grabber zombie", species_zombie, 'Z',c_green, MS_MEDIUM, "flesh",
// dif agr mor spd msk mdi m## cut dge bsh cut itm HP special freq
8,100,100, 70, 10, 1, 2, 0, 4, 0, 0, 40, 65, 0,
&mdeath::zombie, &mattack::none, "\
@@ -450,7 +450,7 @@ at its surroundings as it moves."
FLAGS(MF_SEES, MF_HEARS, MF_SMELLS, MF_STUMBLES, MF_WARM, MF_BASHES, MF_POISON, MF_BLEED,
MF_GRABS, MF_NO_BREATHE, MF_VIS30);
mon("master zombie", species_zombie, 'M',c_yellow, MS_MEDIUM, FLESH,
mon("master zombie", species_zombie, 'M',c_yellow, MS_MEDIUM, "flesh",
// dif agr mor spd msk mdi m## cut dge bsh cut itm HP special freq
16, 5,100, 90, 4, 1, 3, 0, 4, 0, 0, 60,120, 3,
&mdeath::zombie, &mattack::upgrade, "\
@@ -461,7 +461,7 @@ a better grasp of movement than most..."
FLAGS(MF_SEES, MF_HEARS, MF_SMELLS, MF_WARM, MF_BASHES, MF_POISON, MF_NO_BREATHE, MF_VIS50);
ANGER(MTRIG_HURT, MTRIG_PLAYER_WEAK);
mon("scarred zombie", species_zombie, 'Z', c_yellow, MS_MEDIUM, FLESH,
mon("scarred zombie", species_zombie, 'Z', c_yellow, MS_MEDIUM, "flesh",
// dif agr mor spd msk mdi m## cut dge bsh cut itm HP special freq
3,100,100, 40, 8, 1, 5, 0, 1, 12, 8, 20, 25, 0,
&mdeath::zombie, &mattack::none, "\
@@ -472,7 +472,7 @@ but moves a bit slower"
);
FLAGS(MF_SEES, MF_HEARS, MF_SMELLS, MF_STUMBLES, MF_WARM, MF_BASHES, MF_POISON, MF_NO_BREATHE, MF_VIS30);
mon("child zombie",species_zombie, 'z', c_ltgreen, MS_SMALL, FLESH,
mon("child zombie",species_zombie, 'z', c_ltgreen, MS_SMALL, "flesh",
// dif agr mor spd msk mdi m## cut dge bsh cut itm HP special freq
2, 65,100, 70, 8, 1, 3, 2, 2, 0, 0, 20, 25, 0,
&mdeath::zombie, &mattack::none, "\
@@ -483,9 +483,21 @@ FLAGS(MF_SEES, MF_HEARS, MF_SMELLS, MF_STUMBLES, MF_WARM, MF_BASHES, MF_BLEED,
MF_POISON, MF_GUILT, MF_NO_BREATHE, MF_VIS30);
CATEGORIES(MC_CLASSIC);
//Somewhere between a zombie and a blob creature
mon("jabberwock", species_none, 'J', c_dkgray_red, MS_HUGE, "flesh",
// dif agr mor spd msk mdi m## cut dge bsh cut itm HP special freq
50,100,100,140, 9, 4, 8, 3, 3, 12, 8, 0,400, 0,
&mdeath::normal, &mattack::flesh_golem, "\
An amalgamation of putrid human and animal\n\
parts that have become fused in this golem\n\
of flesh. The eyes of all the heads dart\n\
rapidly and the mouths scream or groan."
);
FLAGS(MF_SEES, MF_HEARS, MF_SMELLS, MF_STUMBLES, MF_WARM, MF_BASHES,
MF_DESTROYS, MF_ATTACKMON, MF_LEATHER, MF_BONES, MF_VIS50);
// PLANTS & FUNGI
mon("triffid", species_plant, 'F', c_ltgreen, MS_MEDIUM, VEGGY,
mon("triffid", species_plant, 'F', c_ltgreen, MS_MEDIUM, "veggy",
// dif agr mor spd msk mdi m## cut dge bsh cut itm HP special freq
16, 20,100, 75, 9, 2, 4, 5, 0, 10, 2, 0, 80, 0,
&mdeath::normal, &mattack::none, "\
@@ -496,7 +508,7 @@ sting within."
);
FLAGS(MF_HEARS, MF_SMELLS, MF_BASHES, MF_NOHEAD);
mon("young triffid",species_plant, 'f', c_ltgreen, MS_SMALL, VEGGY,
mon("young triffid",species_plant, 'f', c_ltgreen, MS_SMALL, "veggy",
// dif agr mor spd msk mdi m## cut dge bsh cut itm HP special freq
2, 0, 10, 65, 7, 1, 4, 3, 0, 0, 0, 0, 40, 0,
&mdeath::normal, &mattack::none, "\
@@ -506,7 +518,7 @@ is still sharp and deadly."
);
FLAGS(MF_HEARS, MF_SMELLS, MF_NOHEAD);
mon("queen triffid",species_plant, 'F', c_red, MS_LARGE, VEGGY,
mon("queen triffid",species_plant, 'F', c_red, MS_LARGE, "veggy",
// dif agr mor spd msk mdi m## cut dge bsh cut itm HP special freq
28,100,200, 85, 14, 2, 7, 8, 0, 10, 4, 0,280, 2,
&mdeath::normal, &mattack::growplants, "\
@@ -517,7 +529,7 @@ and immediately takes root."
);
FLAGS(MF_HEARS, MF_SMELLS, MF_BASHES, MF_NOHEAD);
mon("creeper hub",species_plant, 'V', c_dkgray, MS_MEDIUM, VEGGY,
mon("creeper hub",species_plant, 'V', c_dkgray, MS_MEDIUM, "veggy",
// dif agr mor spd msk mdi m## cut dge bsh cut itm HP special freq
16,100,100,100, 0, 0, 0, 0, 0, 8, 0, 0,100, 2,
&mdeath::kill_vines, &mattack::grow_vine, "\
@@ -527,7 +539,7 @@ directions."
);
FLAGS(MF_NOHEAD, MF_IMMOBILE);
mon("creeping vine",species_plant, 'v', c_green, MS_TINY, VEGGY,
mon("creeping vine",species_plant, 'v', c_green, MS_TINY, "veggy",
// dif agr mor spd msk mdi m## cut dge bsh cut itm HP special freq
4,100,100, 75, 0, 0, 0, 0, 0, 2, 0, 0, 2, 2,
&mdeath::vine_cut, &mattack::vine, "\
@@ -536,7 +548,7 @@ it grows, spreading rapidly."
);
FLAGS(MF_NOHEAD, MF_HARDTOSHOOT, MF_PLASTIC, MF_IMMOBILE);
mon("biollante",species_plant, 'F', c_magenta, MS_LARGE, VEGGY,
mon("biollante",species_plant, 'F', c_magenta, MS_LARGE, "veggy",
// dif agr mor spd msk mdi m## cut dge bsh cut itm HP special freq
20,100,100,100, 0, 0, 0, 0, 0, 0, 0,-80,120, 2,
&mdeath::normal, &mattack::spit_sap, "\
@@ -546,7 +558,7 @@ and pulsate ominously."
);
FLAGS(MF_NOHEAD, MF_IMMOBILE);
mon("vinebeast",species_plant, 'V', c_red, MS_LARGE, VEGGY,
mon("vinebeast",species_plant, 'V', c_red, MS_LARGE, "veggy",
// dif agr mor spd msk mdi m## cut dge bsh cut itm HP special freq
14, 60, 40, 75, 15, 2, 4, 2, 4, 10, 0, 0,100, 0,
&mdeath::normal, &mattack::none, "\
@@ -558,7 +570,7 @@ the middle."
FLAGS(MF_HEARS, MF_GOODHEARING, MF_NOHEAD, MF_HARDTOSHOOT, MF_GRABS,
MF_SWIMS, MF_PLASTIC);
mon("triffid heart",species_plant, 'T', c_red, MS_HUGE, VEGGY,
mon("triffid heart",species_plant, 'T', c_red, MS_HUGE, "veggy",
// dif agr mor spd msk mdi m## cut dge bsh cut itm HP special freq
45,100,100,100, 0, 0, 0, 0, 0, 14, 4, 0,300, 5,
&mdeath::triffid_heart, &mattack::triffid_heartbeat, "\
@@ -568,7 +580,7 @@ the root walls around it."
);
FLAGS(MF_NOHEAD, MF_IMMOBILE, MF_QUEEN);
mon("fungaloid",species_fungus, 'F', c_ltgray, MS_MEDIUM, VEGGY,
mon("fungaloid",species_fungus, 'F', c_ltgray, MS_MEDIUM, "veggy",
// dif agr mor spd msk mdi m## cut dge bsh cut itm HP special freq
12, 0,100, 45, 8, 3, 3, 0, 0, 4, 0, 0, 80, 200,
&mdeath::fungus, &mattack::fungus, "\
@@ -581,7 +593,7 @@ ANGER(MTRIG_PLAYER_CLOSE, MTRIG_PLAYER_WEAK);
FLAGS(MF_HEARS, MF_SMELLS, MF_POISON, MF_NO_BREATHE, MF_NOHEAD);
// This is a "dormant" fungaloid that doesn't waste CPU cycles ;)
mon("fungaloid",species_fungus, 'F', c_ltgray, MS_MEDIUM, VEGGY,
mon("fungaloid",species_fungus, 'F', c_ltgray, MS_MEDIUM, "veggy",
// dif agr mor spd msk mdi m## cut dge bsh cut itm HP special freq
0, 0,100, 1, 8, 2, 4, 0, 0, 4, 0, 0, 1, 0,
&mdeath::fungusawake, &mattack::none, "\
@@ -592,7 +604,7 @@ mobility and a weak attack."
);
FLAGS(MF_HEARS, MF_SMELLS, MF_POISON, MF_NO_BREATHE, MF_NOHEAD);
mon("young fungaloid",species_fungus, 'f',c_ltgray, MS_SMALL, VEGGY,
mon("young fungaloid",species_fungus, 'f',c_ltgray, MS_SMALL, "veggy",
// dif agr mor spd msk mdi m## cut dge bsh cut itm HP special freq
6,100,100, 65, 8, 1, 4, 6, 0, 4, 4, 0, 70, 0,
&mdeath::normal, &mattack::none, "\
@@ -603,7 +615,7 @@ full-grown fungaloids."
);
FLAGS(MF_HEARS, MF_SMELLS, MF_POISON, MF_NO_BREATHE, MF_NOHEAD);
mon("spore", species_fungus, 'o', c_ltgray, MS_TINY, VEGGY,
mon("spore", species_fungus, 'o', c_ltgray, MS_TINY, "veggy",
// dif agr mor spd msk mdi m## cut dge bsh cut itm HP special freq
1,-50,100,100, 0, 0, 0, 0, 6, 0, 0, 0, 5, 50,
&mdeath::disintegrate, &mattack::plant, "\
@@ -612,7 +624,7 @@ wafting on the breeze."
);
FLAGS(MF_STUMBLES, MF_FLIES, MF_POISON, MF_NO_BREATHE, MF_NOHEAD);
mon("fungal spire",species_fungus, 'T', c_ltgray, MS_HUGE, STONE,
mon("fungal spire",species_fungus, 'T', c_ltgray, MS_HUGE, "stone",
// dif agr mor spd msk mdi m## cut dge bsh cut itm HP special freq
40,100,100,100, 0, 0, 0, 0, 0, 10, 10, 0,300, 5,
&mdeath::fungus, &mattack::fungus_sprout, "\
@@ -622,7 +634,7 @@ continuously growing new defenses."
);
FLAGS(MF_NOHEAD, MF_POISON, MF_IMMOBILE, MF_NO_BREATHE, MF_QUEEN);
mon("fungal wall",species_fungus, 'F', c_dkgray, MS_HUGE, VEGGY,
mon("fungal wall",species_fungus, 'F', c_dkgray, MS_HUGE, "veggy",
// dif agr mor spd msk mdi m## cut dge bsh cut itm HP special freq
5,100,100,100, 0, 0, 0, 0, 0, 10, 10, 0, 10, 8,
&mdeath::disintegrate, &mattack::fungus, "\
@@ -634,7 +646,7 @@ alarming rate."
FLAGS(MF_NOHEAD, MF_POISON, MF_NO_BREATHE, MF_IMMOBILE);
// BLOBS & SLIMES &c
mon("blob", species_nether, 'O', c_dkgray, MS_MEDIUM, MNULL,
mon("blob", species_nether, 'O', c_dkgray, MS_MEDIUM, "null",
// dif agr mor spd msk mdi m## cut dge bsh cut itm HP special freq
19,100,100, 85, 9, 2, 4, 0, 0, 6, 0, 0, 85, 30,
&mdeath::blobsplit, &mattack::formblob, "\
@@ -645,7 +657,7 @@ oil."
FLAGS(MF_SMELLS, MF_HEARS, MF_GOODHEARING, MF_NOHEAD, MF_POISON, MF_NO_BREATHE, MF_ACIDPROOF);
mtypes[mon_blob]->phase = LIQUID;
mon("small blob",species_nether, 'o', c_dkgray, MS_SMALL, MNULL,
mon("small blob",species_nether, 'o', c_dkgray, MS_SMALL, "null",
// dif agr mor spd msk mdi m## cut dge bsh cut itm HP special freq
2,100,100, 50, 6, 1, 4, 0, 0, 2, 0, 0, 50, 0,
&mdeath::blobsplit, &mattack::none, "\
@@ -657,7 +669,7 @@ FLAGS(MF_SMELLS, MF_HEARS, MF_GOODHEARING, MF_NOHEAD, MF_POISON, MF_NO_BREATHE,
mtypes[mon_blob_small]->phase = LIQUID;
// CHUDS & SUBWAY DWELLERS
mon("C.H.U.D.", species_none, 'S', c_ltgray, MS_MEDIUM, FLESH,
mon("C.H.U.D.", species_none, 'S', c_ltgray, MS_MEDIUM, "flesh",
// dif agr mor spd msk mdi m## cut dge bsh cut itm HP special freq
8, 30, 30,110, 10, 1, 5, 0, 3, 0, 0, 25, 60, 0,
&mdeath::normal, &mattack::none, "\
@@ -668,7 +680,7 @@ the subways."
FLAGS(MF_SEES, MF_HEARS, MF_WARM, MF_BASHES, MF_HUMAN, MF_VIS40, MF_BONES);
FEARS(MTRIG_HURT, MTRIG_FIRE);
mon("one-eyed mutant",species_none, 'S',c_ltred, MS_MEDIUM, FLESH,
mon("one-eyed mutant",species_none, 'S',c_ltred, MS_MEDIUM, "flesh",
// dif agr mor spd msk mdi m## cut dge bsh cut itm HP special freq
18, 30, 30,130, 20, 2, 4, 0, 5, 0, 0, 40, 80, 0,
&mdeath::normal, &mattack::none, "\
@@ -678,7 +690,7 @@ hair and a grapefruit-sized bloodshot eye."
FLAGS(MF_SEES, MF_HEARS, MF_WARM, MF_BASHES, MF_HUMAN, MF_BONES);
FEARS(MTRIG_HURT, MTRIG_FIRE);
mon("crawler mutant",species_none, 'S', c_red, MS_LARGE, FLESH,
mon("crawler mutant",species_none, 'S', c_red, MS_LARGE, "flesh",
// dif agr mor spd msk mdi m## cut dge bsh cut itm HP special freq
16, 40, 40, 80, 10, 2, 6, 0, 1, 8, 0, 0,180, 0,
&mdeath::normal, &mattack::none, "\
@@ -689,7 +701,7 @@ body across the ground."
FLAGS(MF_SEES, MF_HEARS, MF_SMELLS, MF_WARM, MF_BASHES, MF_POISON, MF_HUMAN, MF_VIS40, MF_BONES);
FEARS(MTRIG_HURT, MTRIG_FIRE);
mon("sewer fish",species_none, 's', c_ltgreen, MS_SMALL, FLESH,
mon("sewer fish",species_none, 's', c_ltgreen, MS_SMALL, "flesh",
// dif agr mor spd msk mdi m## cut dge bsh cut itm HP special freq
13,100,100,120, 17, 1, 3, 3, 6, 0, 0, 0, 20, 0,
&mdeath::normal, &mattack::none, "\
@@ -699,7 +711,7 @@ three rows of razor-sharp teeth."
FLAGS(MF_SEES, MF_SMELLS, MF_WARM, MF_AQUATIC, MF_VIS30, MF_BONES);
FEARS(MTRIG_HURT);
mon("sewer snake",species_none, 's', c_yellow, MS_SMALL, FLESH,
mon("sewer snake",species_none, 's', c_yellow, MS_SMALL, "flesh",
// dif agr mor spd msk mdi m## cut dge bsh cut itm HP special freq
2, 20, 40, 60, 12, 1, 2, 5, 1, 0, 0, 0, 10, 0,
&mdeath::normal, &mattack::none, "\
@@ -709,7 +721,7 @@ underground life."
FLAGS(MF_SEES, MF_SMELLS, MF_WARM, MF_VENOM, MF_SWIMS, MF_LEATHER, MF_VIS30, MF_BONES);
FEARS(MTRIG_HURT);
mon("sewer rat",species_mammal, 's', c_dkgray, MS_SMALL, FLESH,
mon("sewer rat",species_mammal, 's', c_dkgray, MS_SMALL, "flesh",
// dif agr mor spd msk mdi m## cut dge bsh cut itm HP special freq
3, 20, 40,105, 10, 1, 2, 1, 2, 0, 0, 0, 10, 0,
&mdeath::normal, &mattack::none, "\
@@ -719,7 +731,7 @@ hungrily."
);
FLAGS(MF_SEES, MF_SMELLS, MF_HEARS, MF_WARM, MF_SWIMS, MF_ANIMAL, MF_FUR, MF_VIS40, MF_BONES);
mon("rat king",species_mammal, 'S', c_dkgray, MS_MEDIUM, FLESH,
mon("rat king",species_mammal, 'S', c_dkgray, MS_MEDIUM, "flesh",
// dif agr mor spd msk mdi m## cut dge bsh cut itm HP special freq
18, 10,100, 40, 4, 1, 3, 1, 0, 0, 0, 0,220, 3,
&mdeath::ratking, &mattack::ratking, "\
@@ -729,7 +741,7 @@ of nausea washes over you in its presence."
);
// SWAMP CREATURES
mon("giant mosquito",species_insect, 'y',c_ltgray, MS_SMALL, FLESH,
mon("giant mosquito",species_insect, 'y',c_ltgray, MS_SMALL, "flesh",
// dif agr mor spd msk mdi m## cut dge bsh cut itm HP special freq
12, 20, 20,120, 8, 1, 1, 1, 5, 0, 0, 0, 20, 0,
&mdeath::normal, &mattack::none, "\
@@ -739,7 +751,7 @@ proboscis."
);
FLAGS(MF_SMELLS, MF_HEARS, MF_STUMBLES, MF_VENOM, MF_FLIES, MF_HIT_AND_RUN);
mon("giant dragonfly",species_insect, 'y',c_ltgreen, MS_SMALL, FLESH,
mon("giant dragonfly",species_insect, 'y',c_ltgreen, MS_SMALL, "flesh",
// dif agr mor spd msk mdi m## cut dge bsh cut itm HP special freq
13, 20,100,155, 12, 1, 3, 6, 5, 0, 6,-20, 70, 0,
&mdeath::normal, &mattack::none, "\
@@ -748,7 +760,7 @@ through the air, its mouth a cluster of fangs."
);
FLAGS(MF_SEES, MF_SMELLS, MF_FLIES, MF_HIT_AND_RUN, MF_VIS40);
mon("giant centipede",species_insect, 'a',c_ltgreen, MS_MEDIUM, FLESH,
mon("giant centipede",species_insect, 'a',c_ltgreen, MS_MEDIUM, "flesh",
// dif agr mor spd msk mdi m## cut dge bsh cut itm HP special freq
9, 20,100,120, 10, 1, 3, 5, 2, 0, 8,-30, 60, 0,
&mdeath::normal, &mattack::none, "\
@@ -758,7 +770,7 @@ pincers attached to its head."
);
FLAGS(MF_SMELLS, MF_HEARS, MF_POISON, MF_VENOM);
mon("giant frog",species_none, 'F', c_green, MS_LARGE, FLESH,
mon("giant frog",species_none, 'F', c_green, MS_LARGE, "flesh",
// dif agr mor spd msk mdi m## cut dge bsh cut itm HP special freq
10, 10,100, 90, 8, 2, 3, 0, 2, 4, 0, 0, 70, 5,
&mdeath::normal, &mattack::leap, "\
@@ -768,7 +780,7 @@ much as you imagine it might eye an insect."
FLAGS(MF_SEES, MF_SMELLS, MF_HEARS, MF_SWIMS, MF_LEATHER, MF_VIS40, MF_BONES);
FEARS(MTRIG_HURT);
mon("giant slug",species_none, 'S', c_yellow, MS_HUGE, FLESH,
mon("giant slug",species_none, 'S', c_yellow, MS_HUGE, "flesh",
// dif agr mor spd msk mdi m## cut dge bsh cut itm HP special freq
16, 20,100, 60, 7, 1, 5, 1, 0, 8, 2, 0,190, 10,
&mdeath::normal, &mattack::acid, "\
@@ -779,7 +791,7 @@ its fang-lined mouth."
FLAGS(MF_SEES, MF_SMELLS, MF_BASHES, MF_ACIDPROOF, MF_ACIDTRAIL, MF_VIS30);
FEARS(MTRIG_HURT, MTRIG_PLAYER_CLOSE);
mon("dermatik larva",species_insect, 'i',c_white, MS_TINY, FLESH,
mon("dermatik larva",species_insect, 'i',c_white, MS_TINY, "flesh",
// dif agr mor spd msk mdi m## cut dge bsh cut itm HP special freq
4,-20,-20, 20, 1, 1, 2, 2, 1, 0, 0, 0, 10, 0,
&mdeath::normal, &mattack::none, "\
@@ -789,7 +801,7 @@ digging than fighting."
);
FLAGS(MF_HEARS, MF_SMELLS, MF_POISON, MF_DIGS);
mon("dermatik", species_insect, 'i', c_red, MS_TINY, FLESH,
mon("dermatik", species_insect, 'i', c_red, MS_TINY, "flesh",
// dif agr mor spd msk mdi m## cut dge bsh cut itm HP special freq
18, 30, 30,100, 5, 1, 1, 6, 7, 0, 6, 0, 60, 50,
&mdeath::normal, &mattack::dermatik, "\
@@ -800,9 +812,8 @@ place of a sting."
);
FLAGS(MF_HEARS, MF_SMELLS, MF_STUMBLES, MF_POISON, MF_FLIES);
// SPIDERS
mon("wolf spider",species_insect, 's', c_brown, MS_MEDIUM, FLESH,
mon("wolf spider",species_insect, 's', c_brown, MS_MEDIUM, "flesh",
// dif agr mor spd msk mdi m## cut dge bsh cut itm HP special freq
20, 20,100,110, 7, 1, 1, 8, 6, 2, 8,-70, 40, 0,
&mdeath::normal, &mattack::none, "\
@@ -811,7 +822,7 @@ and aggresively."
);
FLAGS(MF_SMELLS, MF_HEARS, MF_VENOM);
mon("web spider",species_insect, 's', c_yellow, MS_SMALL, FLESH,
mon("web spider",species_insect, 's', c_yellow, MS_SMALL, "flesh",
// dif agr mor spd msk mdi m## cut dge bsh cut itm HP special freq
16, 30, 80,120, 5, 1, 1, 7, 5, 2, 7,-70, 35, 0,
&mdeath::normal, &mattack::none, "\
@@ -821,7 +832,7 @@ entangled before pouncing and biting."
);
FLAGS(MF_SMELLS, MF_HEARS, MF_VENOM, MF_WEBWALK);
mon("jumping spider",species_insect, 's',c_white, MS_SMALL, FLESH,
mon("jumping spider",species_insect, 's',c_white, MS_SMALL, "flesh",
// dif agr mor spd msk mdi m## cut dge bsh cut itm HP special freq
14, 40, 80,100, 7, 1, 1, 4, 8, 0, 3,-60, 30, 2,
&mdeath::normal, &mattack::leap, "\
@@ -832,7 +843,7 @@ another."
);
FLAGS(MF_SMELLS, MF_HEARS, MF_VENOM, MF_HIT_AND_RUN);
mon("trap door spider",species_insect, 's',c_blue, MS_MEDIUM, FLESH,
mon("trap door spider",species_insect, 's',c_blue, MS_MEDIUM, "flesh",
// dif agr mor spd msk mdi m## cut dge bsh cut itm HP special freq
20, 60,100,110, 5, 1, 2, 7, 3, 2, 8,-80, 70, 0,
&mdeath::normal, &mattack::none, "\
@@ -843,7 +854,7 @@ in its webs."
);
FLAGS(MF_SMELLS, MF_HEARS, MF_VENOM, MF_WEBWALK);
mon("black widow",species_insect, 's', c_dkgray, MS_SMALL, FLESH,
mon("black widow",species_insect, 's', c_dkgray, MS_SMALL, "flesh",
// dif agr mor spd msk mdi m## cut dge bsh cut itm HP special freq
20,-10,100, 90, 6, 1, 1, 6, 3, 0, 3,-50, 40, 0,
&mdeath::normal, &mattack::none, "\
@@ -855,7 +866,7 @@ FLAGS(MF_SMELLS, MF_HEARS, MF_BADVENOM, MF_WEBWALK);
ANGER(MTRIG_PLAYER_WEAK, MTRIG_PLAYER_CLOSE, MTRIG_HURT);
// UNEARTHED HORRORS
mon("dark wyrm",species_none, 'S', c_blue, MS_LARGE, FLESH,
mon("dark wyrm",species_none, 'S', c_blue, MS_LARGE, "flesh",
// dif agr mor spd msk mdi m## cut dge bsh cut itm HP special freq
20,100,100,100, 8, 2, 6, 4, 4, 6, 0, 0,120, 0,
&mdeath::normal, &mattack::none, "\
@@ -866,7 +877,7 @@ round mouth lined with dagger-like teeth."
FLAGS(MF_SMELLS, MF_HEARS, MF_GOODHEARING, MF_DESTROYS, MF_POISON, MF_SUNDEATH,
MF_ACIDPROOF, MF_ACIDTRAIL);
mon("Amigara horror",species_none, 'H', c_white, MS_LARGE, FLESH,
mon("Amigara horror",species_none, 'H', c_white, MS_LARGE, "flesh",
// dif agr mor spd msk mdi m## cut dge bsh cut itm HP special freq
30,100,100, 70, 10, 2, 4, 0, 2, 0, 0, 0,250, 0,
&mdeath::amigara, &mattack::fear_paralyze, "\
@@ -878,7 +889,7 @@ distorted to the point of being tentacles."
FLAGS(MF_SMELLS, MF_HEARS, MF_SEES, MF_STUMBLES, MF_HARDTOSHOOT);
// This "dog" is, in fact, a disguised Thing
mon("dog", species_nether, 'd', c_white, MS_SMALL, FLESH,
mon("dog", species_nether, 'd', c_white, MS_SMALL, "flesh",
// dif agr mor spd msk mdi m## cut dge bsh cut itm HP special freq
5,100,100,150, 12, 2, 3, 3, 3, 0, 0, 0, 25, 40,
&mdeath::thing, &mattack::dogthing, "\
@@ -887,7 +898,7 @@ A medium-sized domesticated dog, gone feral."
FLAGS(MF_SEES, MF_SMELLS, MF_HEARS, MF_ANIMAL, MF_WARM, MF_FUR,
MF_FRIENDLY_SPECIAL);
mon("tentacle dog",species_nether, 'd', c_dkgray, MS_MEDIUM, FLESH,
mon("tentacle dog",species_nether, 'd', c_dkgray, MS_MEDIUM, "flesh",
// dif agr mor spd msk mdi m## cut dge bsh cut itm HP special freq
14,100,100,120, 12, 2, 4, 0, 3, 0, 0, 0,120, 5,
&mdeath::thing, &mattack::tentacle, "\
@@ -896,7 +907,7 @@ tentacles extending from its head."
);
FLAGS(MF_SEES, MF_SMELLS, MF_HEARS, MF_BASHES);
mon("Thing", species_nether, 'H', c_dkgray, MS_LARGE, FLESH,
mon("Thing", species_nether, 'H', c_dkgray, MS_LARGE, "flesh",
// dif agr mor spd msk mdi m## cut dge bsh cut itm HP special freq
25,100,100,135, 14, 2, 4, 0, 5, 8, 0, 0,160, 5,
&mdeath::melt, &mattack::tentacle, "\
@@ -906,7 +917,7 @@ sprout tentacles rapidly."
FLAGS(MF_SMELLS, MF_HEARS, MF_NOHEAD, MF_BASHES, MF_SWIMS, MF_ATTACKMON,
MF_PLASTIC, MF_ACIDPROOF);
mon("human snail",species_none, 'h', c_green, MS_LARGE, FLESH,
mon("human snail",species_none, 'h', c_green, MS_LARGE, "flesh",
// dif agr mor spd msk mdi m## cut dge bsh cut itm HP special freq
10, 0, 30, 50, 4, 1, 5, 0, 0, 6, 12, 0, 50, 15,
&mdeath::normal, &mattack::acid, "\
@@ -916,7 +927,7 @@ FLAGS(MF_SMELLS, MF_HEARS, MF_POISON, MF_ACIDPROOF, MF_ACIDTRAIL);
ANGER(MTRIG_PLAYER_WEAK, MTRIG_FRIEND_DIED);
FEARS(MTRIG_PLAYER_CLOSE, MTRIG_HURT);
mon("twisted body",species_none, 'h', c_pink, MS_MEDIUM, FLESH,
mon("twisted body",species_none, 'h', c_pink, MS_MEDIUM, "flesh",
// dif agr mor spd msk mdi m## cut dge bsh cut itm HP special freq
12,100,100, 90, 5, 2, 4, 0, 6, 0, 0, 0, 65, 0,
&mdeath::normal, &mattack::none, "\
@@ -925,7 +936,7 @@ hair impossibly twisted."
);
FLAGS(MF_SEES, MF_HEARS, MF_GOODHEARING, MF_POISON, MF_HUMAN, MF_VIS40);
mon("vortex", species_none, 'v', c_white, MS_SMALL, POWDER,
mon("vortex", species_none, 'v', c_white, MS_SMALL, "powder",
// dif agr mor spd msk mdi m## cut dge bsh cut itm HP special freq
30,100,100,120, 0, 0, 0, 0, 0, 0, 0, 0, 20, 6,
&mdeath::melt, &mattack::vortex, "\
@@ -936,7 +947,7 @@ FLAGS(MF_HEARS, MF_GOODHEARING, MF_STUMBLES, MF_NOHEAD, MF_HARDTOSHOOT,
MF_FLIES, MF_PLASTIC, MF_NO_BREATHE, MF_FRIENDLY_SPECIAL);
// NETHER WORLD INHABITANTS
mon("flying polyp",species_nether, 'H', c_dkgray, MS_HUGE, FLESH,
mon("flying polyp",species_nether, 'H', c_dkgray, MS_HUGE, "flesh",
// dif agr mor spd msk mdi m## cut dge bsh cut itm HP special freq
42,100,100,280, 16, 3, 8, 6, 7, 8, 0, 0,350, 0,
&mdeath::melt, &mattack::none, "\
@@ -946,7 +957,7 @@ that flies through the air swiftly."
FLAGS(MF_SMELLS, MF_HEARS, MF_GOODHEARING, MF_NOHEAD, MF_BASHES, MF_FLIES,
MF_ATTACKMON, MF_PLASTIC, MF_NO_BREATHE, MF_HIT_AND_RUN);
mon("hunting horror",species_nether, 'h',c_dkgray, MS_SMALL, MNULL,
mon("hunting horror",species_nether, 'h',c_dkgray, MS_SMALL, "null",
// dif agr mor spd msk mdi m## cut dge bsh cut itm HP special freq
28,100,100,180, 15, 3, 4, 0, 6, 0, 0, 0, 80, 0,
&mdeath::melt, &mattack::none, "\
@@ -958,10 +969,10 @@ writhing."
FLAGS(MF_SEES, MF_SMELLS, MF_HEARS, MF_NOHEAD, MF_HARDTOSHOOT, MF_FLIES,
MF_PLASTIC, MF_SUNDEATH, MF_NO_BREATHE, MF_HIT_AND_RUN);
mon("Mi-go", species_nether, 'H', c_pink, MS_MEDIUM, FLESH,
mon("Mi-go", species_nether, 'H', c_pink, MS_MEDIUM, "flesh",
// dif agr mor spd msk mdi m## cut dge bsh cut itm HP special freq
26, 20, 30,120, 14, 5, 3, 10, 7, 4, 12, 0,110, 0,
&mdeath::normal, &mattack::none, "\
&mdeath::normal, &mattack::parrot, "\
A pinkish, fungoid crustacean-like\n\
creature with numerous pairs of clawed\n\
appendages and a head covered with waving\n\
@@ -969,7 +980,7 @@ antennae."
);
FLAGS(MF_SEES, MF_SMELLS, MF_HEARS, MF_WARM, MF_BASHES, MF_POISON, MF_NO_BREATHE, MF_VIS50);
mon("yugg", species_nether, 'H', c_white, MS_HUGE, FLESH,
mon("yugg", species_nether, 'H', c_white, MS_HUGE, "flesh",
// dif agr mor spd msk mdi m## cut dge bsh cut itm HP special freq
32,100,100, 80, 12, 3, 5, 8, 1, 6, 0, 0,320, 20,
&mdeath::normal, &mattack::gene_sting, "\
@@ -981,7 +992,7 @@ pink mouth, lined with rows of fangs."
FLAGS(MF_SEES, MF_SMELLS, MF_HEARS, MF_BASHES, MF_DESTROYS, MF_POISON, MF_VENOM, MF_NO_BREATHE,
MF_DIGS, MF_VIS40);
mon("gelatinous blob",species_nether, 'O',c_ltgray, MS_LARGE, MNULL,
mon("gelatinous blob",species_nether, 'O',c_ltgray, MS_LARGE, "null",
// dif agr mor spd msk mdi m## cut dge bsh cut itm HP special freq
20, 0,100, 40, 8, 2, 3, 0, 0, 10, 0, 0,200, 4,
&mdeath::melt, &mattack::formblob, "\
@@ -992,7 +1003,7 @@ chunks falling off of its sides."
FLAGS(MF_SMELLS, MF_HEARS, MF_PLASTIC, MF_NO_BREATHE, MF_NOHEAD);
mtypes[mon_gelatin]->phase = LIQUID;
mon("flaming eye",species_nether, 'E', c_red, MS_MEDIUM, FLESH,
mon("flaming eye",species_nether, 'E', c_red, MS_MEDIUM, "flesh",
// dif agr mor spd msk mdi m## cut dge bsh cut itm HP special freq
27, 0,100, 90, 0, 0, 0, 0, 1, 3, 0, 0,300, 12,
&mdeath::normal, &mattack::stare, "\
@@ -1002,7 +1013,7 @@ through the air."
);
FLAGS(MF_SEES, MF_WARM, MF_FLIES, MF_FIREY, MF_NO_BREATHE, MF_NOHEAD);
mon("kreck", species_nether, 'h', c_ltred, MS_SMALL, FLESH,
mon("kreck", species_nether, 'h', c_ltred, MS_SMALL, "flesh",
// dif agr mor spd msk mdi m## cut dge bsh cut itm HP special freq
6,100,100,105, 6, 1, 3, 1, 5, 0, 5, 0, 35, 0,
&mdeath::melt, &mattack::none, "\
@@ -1013,7 +1024,7 @@ grunting."
);
FLAGS(MF_SEES, MF_SMELLS, MF_HEARS, MF_WARM, MF_BASHES, MF_HIT_AND_RUN, MF_NO_BREATHE, MF_VIS50, MF_BONES);
mon("gracken",species_nether, 'G', c_white, MS_MEDIUM, FLESH,
mon("gracken",species_nether, 'G', c_white, MS_MEDIUM, "flesh",
// dif agr mor spd msk mdi m## cut dge bsh cut itm HP special freq
5, 0,100, 180, 9, 1, 4, 0, 1, 0, 0, 0,100, 10,
&mdeath::normal, &mattack::none, "\
@@ -1025,7 +1036,7 @@ blurs."
FLAGS(MF_SMELLS, MF_HEARS, MF_WARM, MF_NO_BREATHE, MF_ANIMAL);
mon("blank body",species_nether, 'h', c_white, MS_MEDIUM, FLESH,
mon("blank body",species_nether, 'h', c_white, MS_MEDIUM, "flesh",
// dif agr mor spd msk mdi m## cut dge bsh cut itm HP special freq
5, 0,100, 80, 9, 1, 4, 0, 1, 0, 0, 0,100, 10,
&mdeath::normal, &mattack::shriek, "\
@@ -1036,7 +1047,7 @@ mouth."
);
FLAGS(MF_SMELLS, MF_HEARS, MF_WARM, MF_ANIMAL, MF_SUNDEATH, MF_NO_BREATHE, MF_HUMAN, MF_BONES);
mon("Gozu", species_nether, 'G', c_white, MS_MEDIUM, FLESH,
mon("Gozu", species_nether, 'G', c_white, MS_MEDIUM, "flesh",
// dif agr mor spd msk mdi m## cut dge bsh cut itm HP special freq
20, 10,100, 80, 12, 2, 5, 0, 5, 0, 0, 0,400, 20,
&mdeath::normal, &mattack::fear_paralyze, "\
@@ -1047,7 +1058,7 @@ wearing only a pair of white underwear."
);
FLAGS(MF_SEES, MF_SMELLS, MF_HEARS, MF_WARM, MF_BASHES, MF_ANIMAL, MF_FUR, MF_NO_BREATHE, MF_VIS30, MF_BONES);
mon("shadow", species_nether,'S', c_dkgray, MS_TINY, MNULL,
mon("shadow", species_nether,'S', c_dkgray, MS_TINY, "null",
// dif agr mor spd msk mdi m## cut dge bsh cut itm HP special freq
14,100,100, 90, 6, 1, 2, 0, 4, 0, 0, 0, 60, 20,
&mdeath::melt, &mattack::disappear, "\
@@ -1059,7 +1070,7 @@ FLAGS(MF_SEES, MF_HEARS, MF_GOODHEARING, MF_SMELLS, MF_NOHEAD, MF_HARDTOSHOOT,
MF_ACIDPROOF, MF_HIT_AND_RUN, MF_NO_BREATHE, MF_VIS50);
// The hub
mon("breather", species_nether,'O', c_pink, MS_MEDIUM, MNULL,
mon("breather", species_nether,'O', c_pink, MS_MEDIUM, "null",
// dif agr mor spd msk mdi m## cut dge bsh cut itm HP special freq
2, 0, 0,100, 0, 0, 0, 0, 0, 0, 0, 0,100, 6,
&mdeath::kill_breathers,&mattack::breathe, "\
@@ -1069,7 +1080,7 @@ be breathing slowly."
FLAGS(MF_IMMOBILE);
// The branches
mon("breather", species_nether,'o', c_pink, MS_MEDIUM, MNULL,
mon("breather", species_nether,'o', c_pink, MS_MEDIUM, "null",
// dif agr mor spd msk mdi m## cut dge bsh cut itm HP special freq
2, 0, 0,100, 0, 0, 0, 0, 0, 0, 0, 0,100, 6,
&mdeath::melt, &mattack::breathe, "\
@@ -1078,7 +1089,7 @@ be breathing slowly."
);
FLAGS(MF_IMMOBILE);
mon("shadow snake",species_none, 's', c_dkgray, MS_SMALL, FLESH,
mon("shadow snake",species_none, 's', c_dkgray, MS_SMALL, "flesh",
// dif agr mor spd msk mdi m## cut dge bsh cut itm HP special freq
6,100,100, 90, 12, 1, 4, 5, 1, 0, 0, 0, 40, 20,
&mdeath::melt, &mattack::disappear, "\
@@ -1086,8 +1097,52 @@ A large snake, translucent black.");
FLAGS(MF_SEES, MF_SMELLS, MF_WARM, MF_SWIMS, MF_LEATHER, MF_PLASTIC,
MF_SUNDEATH);
// CULT
mon("dementia", species_zombie, 'd', c_red, MS_MEDIUM, "flesh",
// dif agr mor spd msk mdi m## cut dge bsh cut itm HP special freq
3,100,100, 105, 5, 1, 5, 2, 1, 0, 0, 0, 80, 0,
&mdeath::zombie, &mattack::none, "\
An insane individual with many bloody holes\n\
on the sides of their shaved head. Some form\n\
of lobotomy has left it with a partially re-\n\
animated brain."
);
FLAGS(MF_SEES, MF_HEARS, MF_SMELLS, MF_WARM, MF_BASHES, MF_BLEED, MF_HUMAN, MF_POISON);
mon("homunculus", species_zombie, 'h', c_white, MS_MEDIUM, "flesh",
// dif agr mor spd msk mdi m## cut dge bsh cut itm HP special freq
3,100,100, 110, 8, 1, 5, 2, 4, 3, 3, 0, 110, 0,
&mdeath::zombie, &mattack::none, "\
A pale white man with a physically flawless athletic\n\
body and shaved head. His eyes are completely black\n\
as bloody tears pour forth from them."
);
FLAGS(MF_SEES, MF_HEARS, MF_SMELLS, MF_WARM, MF_BASHES, MF_BLEED, MF_HUMAN);
mon("blood sacrifice", species_zombie, 'S', c_red, MS_MEDIUM, "flesh",
// dif agr mor spd msk mdi m## cut dge bsh cut itm HP special freq
0,100,100, 200, 0, 1, 5, 2, 0, 0, 0, 0, 40, 0,
&mdeath::zombie, &mattack::fear_paralyze, "\
This poor victim was sliced open and bled to\n\
death long ago. Yet, chained down it thrashes\n\
in eternal misery from its tortures."
);
FLAGS(MF_SEES, MF_HEARS, MF_SMELLS, MF_WARM, MF_BLEED, MF_IMMOBILE, MF_GUILT, MF_POISON);
mon("flesh angel", species_zombie, 'A', c_red, MS_LARGE, "flesh",
// dif agr mor spd msk mdi m## cut dge bsh cut itm HP special freq
20,100,100, 120, 10, 3, 4, 0, 2, 0, 0, 0, 200, 0,
&mdeath::zombie, &mattack::fear_paralyze, "\
Slender and terrifying, this gigantic man lacks\n\
any skin yet moves swiftly and gracefully without\n\
it. Wings of flesh protrude uselessly from his\n\
back and a third eye dominates his forehead."
);
FLAGS(MF_SEES, MF_HEARS, MF_SMELLS, MF_WARM, MF_BLEED, MF_HARDTOSHOOT, MF_HUMAN, MF_POISON);
// ROBOTS
mon("eyebot", species_robot, 'r', c_ltblue, MS_SMALL, STEEL,
mon("eyebot", species_robot, 'r', c_ltblue, MS_SMALL, "steel",
// dif agr mor spd msk mdi m## cut dge bsh cut itm HP special freq
2, 0,100,120, 0, 0, 0, 0, 3, 10, 10, 70, 20, 30,
&mdeath::normal, &mattack::photograph, "\
@@ -1098,7 +1153,7 @@ Frequently used for reconaissance."
);
FLAGS(MF_SEES, MF_FLIES, MF_ELECTRONIC, MF_NO_BREATHE, MF_NOHEAD);
mon("manhack", species_robot, 'r', c_green, MS_TINY, STEEL,
mon("manhack", species_robot, 'r', c_green, MS_TINY, "steel",
// dif agr mor spd msk mdi m## cut dge bsh cut itm HP special freq
7,100,100,130, 12, 1, 1, 8, 4, 0, 6, 10, 15, 0,
&mdeath::normal, &mattack::none, "\
@@ -1108,7 +1163,7 @@ and has one small, glowing red eye."
);
FLAGS(MF_SEES, MF_FLIES, MF_NOHEAD, MF_ELECTRONIC, MF_HIT_AND_RUN, MF_NO_BREATHE, MF_VIS40);
mon("skitterbot",species_robot, 'r', c_ltred, MS_SMALL, STEEL,
mon("skitterbot",species_robot, 'r', c_ltred, MS_SMALL, "steel",
// dif agr mor spd msk mdi m## cut dge bsh cut itm HP special freq
13,100,100,105, 0, 0, 0, 0, 0, 12, 12, 60, 40, 5,
&mdeath::normal, &mattack::tazer, "\
@@ -1119,7 +1174,7 @@ prods at the ready."
);
FLAGS(MF_SEES, MF_HEARS, MF_GOODHEARING, MF_ELECTRONIC, MF_NO_BREATHE, MF_VIS50);
mon("secubot", species_robot, 'R', c_dkgray, MS_SMALL, STEEL,
mon("secubot", species_robot, 'R', c_dkgray, MS_SMALL, "steel",
// dif agr mor spd msk mdi m## cut dge bsh cut itm HP special freq
19,100,100, 70, 0, 0, 0, 0, 0, 14, 14, 80, 80, 2,
&mdeath::explode, &mattack::smg, "\
@@ -1130,7 +1185,7 @@ heavily armored."
);
FLAGS(MF_SEES, MF_HEARS, MF_BASHES, MF_ATTACKMON, MF_ELECTRONIC, MF_NO_BREATHE, MF_VIS50);
mon("hazmatbot", species_robot, 'R', c_ltgray, MS_MEDIUM, STEEL,
mon("hazmatbot", species_robot, 'R', c_ltgray, MS_MEDIUM, "steel",
// dif agr mor spd msk mdi m## cut dge bsh cut itm HP special freq
12,100, 40, 70, 8, 3, 2, 8, 3, 12, 10, 0, 120, 3,
&mdeath::explode, &mattack::none, "\
@@ -1141,7 +1196,7 @@ multiple legs."
);
FLAGS(MF_SEES, MF_HEARS, MF_BASHES, MF_ATTACKMON, MF_ELECTRONIC, MF_NO_BREATHE, MF_VIS50);
mon("copbot", species_robot, 'R', c_ltblue, MS_MEDIUM, STEEL,
mon("copbot", species_robot, 'R', c_ltblue, MS_MEDIUM, "steel",
// dif agr mor spd msk mdi m## cut dge bsh cut itm HP special freq
12,100, 40,100, 4, 3, 2, 0, 8, 12, 8, 80, 80, 3,
&mdeath::normal, &mattack::copbot, "\
@@ -1151,7 +1206,7 @@ readied, and appears to be well-armored."
);
FLAGS(MF_SEES, MF_HEARS, MF_BASHES, MF_ATTACKMON, MF_ELECTRONIC, MF_NO_BREATHE, MF_VIS50);
mon("molebot", species_robot, 'R', c_brown, MS_MEDIUM, STEEL,
mon("molebot", species_robot, 'R', c_brown, MS_MEDIUM, "steel",
// dif agr mor spd msk mdi m## cut dge bsh cut itm HP special freq
17,100,100, 40, 13, 1, 4, 10, 0, 14, 14, 82, 80, 0,
&mdeath::normal, &mattack::none, "\
@@ -1162,7 +1217,7 @@ covered head."
);
FLAGS(MF_HEARS, MF_GOODHEARING, MF_DIGS, MF_NO_BREATHE, MF_ELECTRONIC);
mon("tripod robot",species_robot, 'R', c_white, MS_LARGE, STEEL,
mon("tripod robot",species_robot, 'R', c_white, MS_LARGE, "steel",
// dif agr mor spd msk mdi m## cut dge bsh cut itm HP special freq
26,100,100, 90, 15, 2, 4, 7, 0, 12, 8, 82, 80, 10,
&mdeath::normal, &mattack::flamethrower, "\
@@ -1172,7 +1227,7 @@ well as a flamethrower mounted on its head."
);
FLAGS(MF_SEES, MF_HEARS, MF_GOODHEARING, MF_BASHES, MF_NO_BREATHE, MF_ELECTRONIC);
mon("chicken walker",species_robot, 'R',c_red, MS_LARGE, STEEL,
mon("chicken walker",species_robot, 'R',c_red, MS_LARGE, "steel",
// dif agr mor spd msk mdi m## cut dge bsh cut itm HP special freq
32,100,100,115, 0, 0, 0, 0, 0, 18, 14, 85, 90, 5,
&mdeath::explode, &mattack::smg, "\
@@ -1183,7 +1238,7 @@ nasty-looking machine gun."
);
FLAGS(MF_SEES, MF_HEARS, MF_BASHES, MF_NO_BREATHE, MF_ELECTRONIC);
mon("tankbot", species_robot, 'R', c_blue, MS_HUGE, STEEL,
mon("tankbot", species_robot, 'R', c_blue, MS_HUGE, "steel",
// dif agr mor spd msk mdi m## cut dge bsh cut itm HP special freq
52,100,100,100, 0, 0, 0, 0, 0, 22, 20, 92,240, 4,
&mdeath::normal, &mattack::multi_robot, "\
@@ -1195,7 +1250,7 @@ deadly weapons."
FLAGS(MF_SEES, MF_HEARS, MF_GOODHEARING, MF_NOHEAD, MF_BASHES, MF_DESTROYS,
MF_ATTACKMON, MF_NO_BREATHE, MF_ELECTRONIC);
mon("turret", species_robot, 't', c_ltgray, MS_SMALL, STEEL,
mon("turret", species_robot, 't', c_ltgray, MS_SMALL, "steel",
// dif agr mor spd msk mdi m## cut dge bsh cut itm HP special freq
14,100,100,100, 0, 0, 0, 0, 0, 14, 16, 88, 30, 1,
&mdeath::explode, &mattack::smg, "\
@@ -1205,7 +1260,7 @@ degrees."
);
FLAGS(MF_SEES, MF_NOHEAD, MF_ELECTRONIC, MF_IMMOBILE, MF_NO_BREATHE, MF_FRIENDLY_SPECIAL);
mon("exploder", species_robot, 'm', c_ltgray, MS_LARGE, STEEL,
mon("exploder", species_robot, 'm', c_ltgray, MS_LARGE, "steel",
// dif agr mor spd msk mdi m## cut dge bsh cut itm HP special freq
14,100,100,100, 0, 0, 0, 0, 0, 0, 0, 88, 1, 1,
&mdeath::explode, &mattack::none, "\
@@ -1217,7 +1272,7 @@ FLAGS(MF_IMMOBILE, MF_NO_BREATHE);
// HALLUCINATIONS
mon("zombie", species_hallu, 'Z', c_ltgreen, MS_MEDIUM, FLESH,
mon("zombie", species_hallu, 'Z', c_ltgreen, MS_MEDIUM, "flesh",
// dif agr mor spd msk mdi m## cut dge bsh cut itm HP special freq
0,100,100, 65, 3, 0, 0, 0, 0, 0, 0, 0, 1, 20,
&mdeath::disappear, &mattack::disappear, "\
@@ -1227,7 +1282,7 @@ unstoppable rage."
);
FLAGS(MF_SEES, MF_HEARS, MF_SMELLS, MF_STUMBLES, MF_NO_BREATHE, MF_VIS40);
mon("giant bee",species_hallu, 'a', c_yellow, MS_MEDIUM, FLESH,
mon("giant bee",species_hallu, 'a', c_yellow, MS_MEDIUM, "flesh",
// dif agr mor spd msk mdi m## cut dge bsh cut itm HP special freq
0,100,100,180, 2, 0, 0, 0, 0, 0, 0, 0, 1, 20,
&mdeath::disappear, &mattack::disappear, "\
@@ -1237,7 +1292,7 @@ sized sting pointed forward."
);
FLAGS(MF_SMELLS, MF_NO_BREATHE, MF_FLIES);
mon("giant ant",species_hallu, 'a', c_brown, MS_MEDIUM, FLESH,
mon("giant ant",species_hallu, 'a', c_brown, MS_MEDIUM, "flesh",
// dif agr mor spd msk mdi m## cut dge bsh cut itm HP special freq
0,100,100,100, 3, 0, 0, 0, 0, 0, 0, 0, 1, 20,
&mdeath::disappear, &mattack::disappear, "\
@@ -1247,7 +1302,7 @@ pair of vicious mandibles."
);
FLAGS(MF_SMELLS, MF_NO_BREATHE);
mon("your mother",species_hallu, '@', c_white, MS_MEDIUM, FLESH,
mon("your mother",species_hallu, '@', c_white, MS_MEDIUM, "flesh",
// dif agr mor spd msk mdi m## cut dge bsh cut itm HP special freq
0,100,100,100, 3, 0, 0, 0, 0, 0, 0, 0, 5, 20,
&mdeath::disappear, &mattack::disappear, "\
@@ -1255,7 +1310,7 @@ Mom?"
);
FLAGS(MF_SEES, MF_HEARS, MF_NO_BREATHE, MF_SMELLS, MF_GUILT);
mon("generator", species_none, 'G', c_white, MS_LARGE, STEEL,
mon("generator", species_none, 'G', c_white, MS_LARGE, "steel",
// dif agr mor spd msk mdi m## cut dge bsh cut itm HP special freq
0, 0, 0,100, 0, 0, 0, 0, 0, 2, 2, 0,500, 1,
&mdeath::gameover, &mattack::generator, "\
+211 -68
View File
@@ -42,8 +42,26 @@ void player::mutate(game *g)
force_good = true;
}
// First, see if we should ugrade/extend an existing mutation
// Determine the mutation categorie
mutation_category cat = MUTCAT_NULL;
// Count up the players number of mutations in categories and find
// the category with the highest single count.
int total = 0, highest = 0;
for (int i = 0; i < NUM_MUTATION_CATEGORIES; i++)
{
total += mutation_category_level[i];
if (mutation_category_level[i] > highest)
{
cat = mutation_category(i);
highest = mutation_category_level[i];
}
}
// See if we should ugrade/extend an existing mutation...
std::vector<pl_flag> upgrades;
// ... or remove one that is not in our highest category
std::vector<pl_flag> downgrades;
// For each mutation...
for (int base_mutation_index = 1; base_mutation_index < PF_MAX2; base_mutation_index++)
{
@@ -73,43 +91,50 @@ void player::mutate(game *g)
upgrades.push_back(mutation);
}
}
// ...consider whether its in our highest category
if( has_trait(base_mutation) && !has_base_trait(base_mutation) ){ // Starting traits don't count toward categories
std::vector<pl_flag> group = mutations_from_category(cat);
bool in_cat = false;
for (int j = 0; j < group.size(); j++)
{
if (group[j] == base_mutation)
{
in_cat = true;
break;
}
}
// mark for removal
if(!in_cat) downgrades.push_back(base_mutation);
}
}
}
// If we have upgrades, we prefer them.
if (upgrades.size() > 0)
{
// (upgrade count) chances to pick an upgrade, 4 chances to pick something else.
int roll = rng(0, upgrades.size() + 4);
if (roll < upgrades.size())
{
// We got a valid upgrade index, so use it and return.
mutate_towards(g, upgrades[roll]);
return;
}
// Preliminary round to either upgrade or remove existing mutations
if(one_in(2)){
if (upgrades.size() > 0)
{
// (upgrade count) chances to pick an upgrade, 4 chances to pick something else.
int roll = rng(0, upgrades.size() + 4);
if (roll < upgrades.size())
{
// We got a valid upgrade index, so use it and return.
mutate_towards(g, upgrades[roll]);
return;
}
}
}
// Next, see if we should mutate within a given category
mutation_category cat = MUTCAT_NULL;
// Count up the number of mutations in categories and find
// the category with the highest single count.
int total = 0, highest = 0;
for (int i = 0; i < NUM_MUTATION_CATEGORIES; i++)
{
total += mutation_category_level[i];
if (mutation_category_level[i] > highest)
{
cat = mutation_category(i);
highest = mutation_category_level[i];
}
}
// Pick one of the mutations out of a hat. If it's in the highest-count
// category, we pick from that category. If not, we mutate randomly.
if (rng(0, total) > highest)
{
cat = MUTCAT_NULL;
else {
// Remove existing mutations that don't fit into our category
if (downgrades.size() > 0 && cat != MUTCAT_NULL)
{
int roll = rng(0, downgrades.size() + 4);
if (roll < downgrades.size())
{
remove_mutation(g, downgrades[roll]);
return;
}
}
}
std::vector<pl_flag> valid; // Valid mutations
@@ -173,6 +198,42 @@ void player::mutate(game *g)
mutate_towards(g, selection);
}
void player::mutate_category(game *g, mutation_category cat)
{
bool force_bad = one_in(3);
bool force_good = false;
if (has_trait(PF_ROBUST) && force_bad)
{
// Robust Genetics gives you a 33% chance for a good mutation,
// instead of the 33% chance of a bad one.
force_bad = false;
force_good = true;
}
// Pull the category's list for valid mutations
std::vector<pl_flag> valid;
valid = mutations_from_category(cat);
// Remove anything we already have, that we have a child of, or that
// goes against our intention of a good/bad mutation
for (int i = 0; i < valid.size(); i++)
{
if (!mutation_ok(g, valid[i], force_good, force_bad))
{
valid.erase(valid.begin() + i);
i--;
}
}
// if we can't mutate in the category do nothing
if (valid.empty()) return;
pl_flag selection = valid[ rng(0, valid.size() - 1) ]; // Pick one!
mutate_towards(g, selection);
return;
}
void player::mutate_towards(game *g, pl_flag mut)
{
if (has_child_flag(g, mut)) {
@@ -180,6 +241,7 @@ void player::mutate_towards(game *g, pl_flag mut)
return;
}
bool has_prereqs = false;
pl_flag canceltrait = PF_NULL;
std::vector<pl_flag> prereq = g->mutation_data[mut].prereqs;
std::vector<pl_flag> cancel = g->mutation_data[mut].cancels;
@@ -187,7 +249,15 @@ void player::mutate_towards(game *g, pl_flag mut)
if (!has_trait( cancel[i] )) {
cancel.erase(cancel.begin() + i);
i--;
} else {
//If we have the trait, but it's a base trait, don't allow it to be removed normally
if (has_base_trait( cancel[i] )) {
canceltrait = cancel[i];
cancel.erase(cancel.begin() + i);
i--;
}
}
}
if (!cancel.empty()) {
@@ -220,14 +290,30 @@ void player::mutate_towards(game *g, pl_flag mut)
}
}
toggle_trait(mut);
if (replacing != PF_NULL) {
g->add_msg("Your %s mutation turns into %s!", traits[replacing].name.c_str(),
traits[mut].name.c_str());
toggle_trait(replacing);
} else
g->add_msg("You gain a mutation called %s!", traits[mut].name.c_str());
mutation_effect(g, *this, mut);
toggle_mutation(mut);
if (replacing != PF_NULL)
{
g->add_msg("Your %s mutation turns into %s!", traits[replacing].name.c_str(),
traits[mut].name.c_str());
toggle_mutation(replacing);
mutation_loss_effect(g, *this, replacing);
mutation_effect(g, *this, mut);
}
else
// If this new mutation cancels a base trait, remove it and add the mutation at the same time
if (canceltrait != PF_NULL)
{
g->add_msg("Your innate %s trait turns into %s!", traits[canceltrait].name.c_str(),
traits[mut].name.c_str());
toggle_mutation(canceltrait);
mutation_loss_effect(g, *this, canceltrait);
mutation_effect(g, *this, mut);
}
else
{
g->add_msg("You gain a mutation called %s!", traits[mut].name.c_str());
mutation_effect(g, *this, mut);
}
// Weight us towards any categories that include this mutation
for (int i = 0; i < NUM_MUTATION_CATEGORIES; i++) {
@@ -248,6 +334,26 @@ void player::mutate_towards(game *g, pl_flag mut)
void player::remove_mutation(game *g, pl_flag mut)
{
// Check for dependant mutations first
std::vector<pl_flag> dependant;
for (int i = 0; i < PF_MAX2; i++)
{
for (std::vector<pl_flag>::iterator it = g->mutation_data[i].prereqs.begin();
it != g->mutation_data[i].prereqs.end(); it++)
{
if (*it == i)
{
dependant.push_back((pl_flag)i);
break;
}
}
}
if (dependant.size() != 0)
{
remove_mutation(g,dependant[rng(0,dependant.size())]);
return;
}
// Check if there's a prereq we should shrink back into
pl_flag replacing = PF_NULL;
std::vector<pl_flag> originals = g->mutation_data[mut].prereqs;
@@ -259,12 +365,33 @@ void player::remove_mutation(game *g, pl_flag mut)
replacing = pre;
}
}
toggle_trait(mut);
// See if this mutation is cancelled by a base trait
//Only if there's no prereq to shrink to, thus we're at the bottom of the trait line
if (replacing == PF_NULL) {
//Check each mutation until we reach the end or find a trait to revert to
for (int i = 1; replacing == PF_NULL && i < PF_MAX2; i++) {
//See if it's in our list of base traits but not active
if (has_base_trait(i) && !has_trait(i)) {
//See if that base trait cancels the mutation we are using
std::vector<pl_flag> traitcheck = g->mutation_data[i].cancels;
if (!traitcheck.empty()) {
for (int j = 0; replacing == PF_NULL && j < traitcheck.size(); j++) {
if (g->mutation_data[i].cancels[j] == mut)
replacing = ((pl_flag)i);
}
}
}
}
}
// This should revert back to a removed base trait rather than simply removing the mutation
toggle_mutation(mut);
if (replacing != PF_NULL) {
g->add_msg("Your %s mutation turns into %s.", traits[mut].name.c_str(),
traits[replacing].name.c_str());
toggle_trait(replacing);
toggle_mutation(replacing);
mutation_loss_effect(g, *this, mut);
mutation_effect(g, *this, replacing);
} else {
@@ -305,6 +432,10 @@ void mutation_effect(game *g, player &p, pl_flag mut)
std::vector<body_part> bps;
switch (mut) {
case PF_TOUGH:
case PF_GLASSJAW:
case PF_HARDCORE:
p.recalc_hp();
// Push off gloves
case PF_WEBBED:
case PF_ARM_TENTACLES:
@@ -347,54 +478,58 @@ void mutation_effect(game *g, player &p, pl_flag mut)
case PF_STR_UP:
p.str_max ++;
p.recalc_hp();
break;
case PF_STR_UP_2:
p.str_max ++;
p.str_max += 2;
p.recalc_hp();
break;
case PF_STR_UP_3:
p.str_max += 2;
p.str_max += 4;
p.recalc_hp();
break;
case PF_STR_UP_4:
p.str_max += 3;
p.str_max += 7;
p.recalc_hp();
break;
case PF_DEX_UP:
p.dex_max ++;
break;
case PF_DEX_UP_2:
p.dex_max ++;
break;
case PF_DEX_UP_3:
p.dex_max += 2;
break;
case PF_DEX_UP_3:
p.dex_max += 4;
break;
case PF_DEX_UP_4:
p.dex_max += 3 ;
p.dex_max += 7;
break;
case PF_INT_UP:
p.int_max ++;
break;
case PF_INT_UP_2:
p.int_max ++;
break;
case PF_INT_UP_3:
p.int_max += 2;
break;
case PF_INT_UP_3:
p.int_max += 4;
break;
case PF_INT_UP_4:
p.int_max += 3;
p.int_max += 7;
break;
case PF_PER_UP:
p.per_max ++;
break;
case PF_PER_UP_2:
p.per_max ++;
break;
case PF_PER_UP_3:
p.per_max += 2;
break;
case PF_PER_UP_3:
p.per_max += 4;
break;
case PF_PER_UP_4:
p.per_max += 3;
p.per_max += 7;
break;
}
@@ -419,17 +554,25 @@ void mutation_effect(game *g, player &p, pl_flag mut)
void mutation_loss_effect(game *g, player &p, pl_flag mut)
{
switch (mut) {
case PF_TOUGH:
case PF_GLASSJAW:
case PF_HARDCORE:
p.recalc_hp();
case PF_STR_UP:
p.str_max--;
p.recalc_hp();
break;
case PF_STR_UP_2:
p.str_max -= 2;
p.recalc_hp();
break;
case PF_STR_UP_3:
p.str_max -= 3;
p.str_max -= 4;
p.recalc_hp();
break;
case PF_STR_UP_4:
p.str_max -= 4;
p.str_max -= 7;
p.recalc_hp();
break;
case PF_DEX_UP:
@@ -439,10 +582,10 @@ void mutation_loss_effect(game *g, player &p, pl_flag mut)
p.dex_max -= 2;
break;
case PF_DEX_UP_3:
p.dex_max -= 3;
p.dex_max -= 4;
break;
case PF_DEX_UP_4:
p.dex_max -= 4;
p.dex_max -= 7;
break;
case PF_INT_UP:
@@ -452,10 +595,10 @@ void mutation_loss_effect(game *g, player &p, pl_flag mut)
p.int_max -= 2;
break;
case PF_INT_UP_3:
p.int_max -= 3;
p.int_max -= 4;
break;
case PF_INT_UP_4:
p.int_max -= 4;
p.int_max -= 7;
break;
case PF_PER_UP:
@@ -465,10 +608,10 @@ void mutation_loss_effect(game *g, player &p, pl_flag mut)
p.per_max -= 2;
break;
case PF_PER_UP_3:
p.per_max -= 3;
p.per_max -= 4;
break;
case PF_PER_UP_4:
p.per_max -= 4;
p.per_max -= 7;
break;
}
}
+14 -14
View File
@@ -145,6 +145,7 @@ void game::init_mutations()
PREREQS (PF_LIGHTFUR);
MUTATION(PF_CHITIN);
PREREQS (PF_SKIN_ROUGH);
CANCELS (PF_SCALES, PF_FEATHERS, PF_LIGHTFUR, PF_PLANTSKIN);
CHANGES_TO (PF_CHITIN2);
@@ -347,6 +348,19 @@ void game::init_mutations()
MUTATION(PF_PER_UP_4);
PREREQS (PF_PER_UP_3);
MUTATION(PF_BEAUTIFUL);
CANCELS (PF_UGLY, PF_DEFORMED, PF_DEFORMED2, PF_DEFORMED3);
PREREQS (PF_PRETTY);
CHANGES_TO (PF_BEAUTIFUL2);
MUTATION(PF_BEAUTIFUL2);
CANCELS (PF_UGLY, PF_DEFORMED, PF_DEFORMED2, PF_DEFORMED3);
PREREQS (PF_BEAUTIFUL);
CHANGES_TO (PF_BEAUTIFUL3);
MUTATION(PF_BEAUTIFUL3);
CANCELS (PF_UGLY, PF_DEFORMED, PF_DEFORMED2, PF_DEFORMED3);
PREREQS (PF_BEAUTIFUL2);
// Bad mutations below this point
@@ -382,20 +396,6 @@ void game::init_mutations()
CANCELS (PF_PRETTY, PF_BEAUTIFUL, PF_BEAUTIFUL2, PF_BEAUTIFUL3);
PREREQS (PF_DEFORMED2);
MUTATION(PF_BEAUTIFUL);
CANCELS (PF_UGLY, PF_DEFORMED, PF_DEFORMED2, PF_DEFORMED3);
PREREQS (PF_PRETTY);
CHANGES_TO (PF_BEAUTIFUL2);
MUTATION(PF_BEAUTIFUL2);
CANCELS (PF_UGLY, PF_DEFORMED, PF_DEFORMED2, PF_DEFORMED3);
PREREQS (PF_BEAUTIFUL);
CHANGES_TO (PF_BEAUTIFUL3);
MUTATION(PF_BEAUTIFUL3);
CANCELS (PF_UGLY, PF_DEFORMED, PF_DEFORMED2, PF_DEFORMED3);
PREREQS (PF_BEAUTIFUL2);
MUTATION(PF_HOLLOW_BONES);
PREREQS (PF_LIGHT_BONES);
+180 -96
View File
@@ -12,38 +12,28 @@
#include <fstream>
#include <sstream>
// ncurses has not yet been initialized, so we need to define our line chars
#define LINE_XOXO 4194424
#define LINE_OXOX 4194417
#define LINE_XXOO 4194413
#define LINE_OXXO 4194412
#define LINE_OOXX 4194411
#define LINE_XOOX 4194410
#define LINE_XXXO 4194420
#define LINE_XXOX 4194422
#define LINE_XOXX 4194421
#define LINE_OXXX 4194423
#define LINE_XXXX 4194414
// Colors used in this file: (Most else defaults to c_ltgray)
#define COL_STAT_ACT c_ltred // Selected stat
#define COL_TR_GOOD c_green // Good trait descriptive text
#define COL_TR_GOOD_OFF c_ltgray // A toggled-off good trait
#define COL_TR_GOOD_ON c_green // A toggled-on good trait
#define COL_TR_GOOD_OFF_ACT c_ltgray // A toggled-off good trait
#define COL_TR_GOOD_ON_ACT c_ltgreen // A toggled-on good trait
#define COL_TR_GOOD_OFF_PAS c_dkgray // A toggled-off good trait
#define COL_TR_GOOD_ON_PAS c_green // A toggled-on good trait
#define COL_TR_BAD c_red // Bad trait descriptive text
#define COL_TR_BAD_OFF c_ltgray // A toggled-off bad trait
#define COL_TR_BAD_ON c_red // A toggled-on bad trait
#define COL_TR_BAD_OFF_ACT c_ltgray // A toggled-off bad trait
#define COL_TR_BAD_ON_ACT c_red // A toggled-on bad trait
#define COL_TR_BAD_OFF_PAS c_dkgray // A toggled-off bad trait
#define COL_TR_BAD_ON_PAS c_ltred // A toggled-on bad trait
#define COL_SKILL_USED c_green // A skill with at least one point
#define HIGH_STAT 14 // The point after which stats cost double
#define MAX_TRAIT_POINTS 12 // How many points from traits
#define NEWCHAR_TAB_MAX 4 // The ID of the rightmost tab
void draw_tabs(WINDOW* w, std::string sTab);
int set_stats(WINDOW* w, game* g, player *u, int &points);
int set_traits(WINDOW* w, game* g, player *u, int &points);
int set_traits(WINDOW* w, game* g, player *u, int &points, int max_trait_points);
int set_profession(WINDOW* w, game* g, player *u, int &points);
int set_skills(WINDOW* w, game* g, player *u, int &points);
int set_description(WINDOW* w, game* g, player *u, int &points);
@@ -62,7 +52,7 @@ bool player::create(game *g, character_type type, std::string tempname)
WINDOW* w = newwin(25, 80, (TERMY > 25) ? (TERMY-25)/2 : 0, (TERMX > 80) ? (TERMX-80)/2 : 0);
int tab = 0, points = 38;
int tab = 0, points = 38, max_trait_points = 12;
if (type != PLTYPE_CUSTOM) {
switch (type) {
case PLTYPE_RANDOM: {
@@ -82,13 +72,13 @@ bool player::create(game *g, character_type type, std::string tempname)
int num_gtraits = 0, num_btraits = 0, rn, tries;
while (points < 0 || rng(-3, 20) > points) {
if (num_btraits < MAX_TRAIT_POINTS && one_in(3)) {
if (num_btraits < max_trait_points && one_in(3)) {
tries = 0;
do {
rn = random_bad_trait();
tries++;
} while ((has_trait(rn) ||
num_btraits - traits[rn].points > MAX_TRAIT_POINTS) && tries < 5);
num_btraits - traits[rn].points > max_trait_points) && tries < 5);
if (tries < 5) {
toggle_trait(rn);
points -= traits[rn].points;
@@ -104,14 +94,14 @@ bool player::create(game *g, character_type type, std::string tempname)
}
}
while (points > 0) {
switch (rng((num_gtraits < MAX_TRAIT_POINTS ? 1 : 5), 9)) {
switch (rng((num_gtraits < max_trait_points ? 1 : 5), 9)) {
case 1:
case 2:
case 3:
case 4:
rn = random_good_trait();
if (!has_trait(rn) && points >= traits[rn].points &&
num_gtraits + traits[rn].points <= MAX_TRAIT_POINTS) {
num_gtraits + traits[rn].points <= max_trait_points) {
toggle_trait(rn);
points -= traits[rn].points;
num_gtraits += traits[rn].points;
@@ -160,13 +150,14 @@ bool player::create(game *g, character_type type, std::string tempname)
tab = NEWCHAR_TAB_MAX;
} else
points = OPTIONS[OPT_INITIAL_POINTS];
max_trait_points = OPTIONS[OPT_MAX_TRAIT_POINTS];
do {
werase(w);
wrefresh(w);
switch (tab) {
case 0: tab += set_stats (w, g, this, points); break;
case 1: tab += set_traits (w, g, this, points); break;
case 1: tab += set_traits (w, g, this, points, max_trait_points); break;
case 2: tab += set_profession (w, g, this, points); break;
case 3: tab += set_skills (w, g, this, points); break;
case 4: tab += set_description(w, g, this, points); break;
@@ -199,19 +190,9 @@ bool player::create(game *g, character_type type, std::string tempname)
first_bio = g->random_good_bionic();
} while (bionics[first_bio]->power_cost > 10);
add_bionic(first_bio);
if (bionics[my_bionics[0].id]->power_cost > 0) {
add_bionic(bionic_id(power_source_bionics[rng(0,power_source_bionics.size()-1)])); // Power Source
max_power_level = 10;
power_level = 10;
} else {
bionic_id tmpbio;
do
tmpbio = bionic_id(unpowered_bionics[rng(0, unpowered_bionics.size()-1)]);
while (bionics[tmpbio]->power_cost > 0);
add_bionic(tmpbio);
max_power_level = 0;
power_level = 0;
}
add_bionic(bionic_id(power_source_bionics[rng(0,power_source_bionics.size()-1)])); // Power Source
max_power_level = 10;
power_level = 10;
}
if (has_trait(PF_MARTIAL_ARTS)) {
@@ -234,6 +215,67 @@ bool player::create(game *g, character_type type, std::string tempname)
} while (!query_yn("Use this style?"));
styles.push_back(ma_type);
}
if (has_trait(PF_MARTIAL_ARTS2)) {
itype_id ma_type;
do {
int choice = menu(false, "Pick your style:",
"Capoeira", "Krav Maga", "Muay Thai", "Ninjutsu", "Zui Quan", NULL);
if (choice == 1)
ma_type = "style_capoeira";
if (choice == 2)
ma_type = "style_krav_maga";
if (choice == 3)
ma_type = "style_muay_thai";
if (choice == 4)
ma_type = "style_ninjutsu";
if (choice == 5)
ma_type = "style_zui_quan";
item tmpitem = item(g->itypes[ma_type], 0);
full_screen_popup(tmpitem.info(true).c_str());
} while (!query_yn("Use this style?"));
styles.push_back(ma_type);
}
if (has_trait(PF_MARTIAL_ARTS3)) {
itype_id ma_type;
do {
int choice = menu(false, "Pick your style:",
"Tiger", "Crane", "Leopard", "Snake", "Dragon", NULL);
if (choice == 1)
ma_type = "style_tiger";
if (choice == 2)
ma_type = "style_crane";
if (choice == 3)
ma_type = "style_leopard";
if (choice == 4)
ma_type = "style_snake";
if (choice == 5)
ma_type = "style_dragon";
item tmpitem = item(g->itypes[ma_type], 0);
full_screen_popup(tmpitem.info(true).c_str());
} while (!query_yn("Use this style?"));
styles.push_back(ma_type);
}
if (has_trait(PF_MARTIAL_ARTS4)) {
itype_id ma_type;
do {
int choice = menu(false, "Pick your style:",
"Centipede", "Viper", "Scorpion", "Lizard", "Toad", NULL);
if (choice == 1)
ma_type = "style_centipede";
if (choice == 2)
ma_type = "style_venom_snake";
if (choice == 3)
ma_type = "style_scorpion";
if (choice == 4)
ma_type = "style_lizard";
if (choice == 5)
ma_type = "style_toad";
item tmpitem = item(g->itypes[ma_type], 0);
full_screen_popup(tmpitem.info(true).c_str());
} while (!query_yn("Use this style?"));
styles.push_back(ma_type);
}
ret_null = item(g->itypes["null"], 0);
if (!styles.empty())
weapon = item(g->itypes[ styles[0] ], 0, ':');
@@ -246,8 +288,8 @@ bool player::create(game *g, character_type type, std::string tempname)
for (std::vector<std::string>::const_iterator iter = prof_items.begin(); iter != prof_items.end(); ++iter) {
item tmp = item(item_controller->find_template(*iter), 0, 'a' + worn.size());
if (tmp.is_armor()) {
if (tmp.has_flag(IF_VARSIZE))
tmp.item_flags |= mfb(IF_FIT);
if (tmp.has_flag("VARSIZE"))
tmp.item_tags.insert("FIT");
worn.push_back(tmp);
} else {
inv.push_back(tmp);
@@ -260,16 +302,35 @@ bool player::create(game *g, character_type type, std::string tempname)
g->u.addictions.push_back(*iter);
}
// Grab the skills from the profession, if there are any
profession::StartingSkillList prof_skills = g->u.prof->skills();
for (profession::StartingSkillList::const_iterator iter = prof_skills.begin();
iter != prof_skills.end(); ++iter)
{
assert(Skill::skill(iter->first));
if (Skill::skill(iter->first))
{
g->u.boost_skill_level(iter->first, iter->second);
}
}
// The near-sighted get to start with glasses.
if (has_trait(PF_MYOPIC)) {
if (has_trait(PF_MYOPIC) && !has_trait(PF_HYPEROPIC)) {
tmp = item(g->itypes["glasses_eye"], 0, 'a' + worn.size());
worn.push_back(tmp);
}
// And the far-sighted get to start with reading glasses.
if (has_trait(PF_HYPEROPIC)) {
if (has_trait(PF_HYPEROPIC) && !has_trait(PF_MYOPIC)) {
tmp = item(g->itypes["glasses_reading"], 0, 'a' + worn.size());
worn.push_back(tmp);
}
if (has_trait(PF_HYPEROPIC) && has_trait(PF_MYOPIC))
{
tmp = item(g->itypes["glasses_bifocal"], 0, 'a' + worn.size());
worn.push_back(tmp);
}
// Likewise, the asthmatic start with their medication.
if (has_trait(PF_ASTHMA)) {
tmp = item(g->itypes["inhaler"], 0, 'a' + worn.size());
@@ -282,7 +343,8 @@ bool player::create(game *g, character_type type, std::string tempname)
inv.push_back(tmp);
// make sure we have no mutations
for (int i = 0; i < PF_MAX2; i++)
my_mutations[i] = false;
if (!has_base_trait(i))
my_mutations[i] = false;
return true;
}
@@ -391,15 +453,13 @@ int set_stats(WINDOW* w, game* g, player *u, int &points)
mvwprintz(w, 8, 2, COL_STAT_ACT, "Intelligence: %d ", u->int_max);
mvwprintz(w, 9, 2, c_ltgray, "Perception: %d ", u->per_max);
mvwprintz(w, 6, 33, COL_STAT_ACT, "Skill comprehension: %d%%%% ",
u->skillLevel("melee").comprehension(u->int_max));
mvwprintz(w, 7, 33, COL_STAT_ACT, "Read times: %d%%%% ",
mvwprintz(w, 6, 33, COL_STAT_ACT, "Read times: %d%%%% ",
u->read_speed(false));
mvwprintz(w, 8, 33, COL_STAT_ACT, " ");
mvwprintz(w, 9, 33, COL_STAT_ACT, "Intelligence is also used when crafting, ");
mvwprintz(w,10, 33, COL_STAT_ACT, "installing bionics, and interacting with ");
mvwprintz(w,11, 33, COL_STAT_ACT, "NPCs. ");
mvwprintz(w,12, 33, COL_STAT_ACT, " ");
mvwprintz(w, 7, 33, COL_STAT_ACT, " ");
mvwprintz(w, 8, 33, COL_STAT_ACT, "Intelligence is also used when crafting, ");
mvwprintz(w, 9, 33, COL_STAT_ACT, "installing bionics, and interacting with ");
mvwprintz(w,10, 33, COL_STAT_ACT, "NPCs. ");
mvwprintz(w,11, 33, COL_STAT_ACT, " ");
break;
case 4:
@@ -487,7 +547,7 @@ int set_stats(WINDOW* w, game* g, player *u, int &points)
} while (true);
}
int set_traits(WINDOW* w, game* g, player *u, int &points)
int set_traits(WINDOW* w, game* g, player *u, int &points, int max_trait_points)
{
draw_tabs(w, "TRAITS");
@@ -503,10 +563,13 @@ int set_traits(WINDOW* w, game* g, player *u, int &points)
num_bad += abs(traits[i].points);
}
for (int i = 0; i < 16; i++) {
for (int i = 0; i < 16; i++) {//preparation: draw disadvantages list
mvwprintz(w, 5 + i, 40, c_dkgray, "\
");
mvwprintz(w, 5 + i, 40, c_dkgray, traits[PF_SPLIT + 1 + i].name.c_str());
");
if (u->has_trait(PF_SPLIT + 1 + i))//highlight disadvantages
mvwprintz(w, 5 + i, 40, COL_TR_BAD_ON_PAS, traits[PF_SPLIT + 1 + i].name.c_str());
else
mvwprintz(w, 5 + i, 40, COL_TR_BAD_OFF_PAS, traits[PF_SPLIT + 1 + i].name.c_str());
}
mvwprintz(w,11,32, c_ltgray, "h l");
mvwprintz(w,12,32, c_ltgray, "< >");
@@ -515,49 +578,53 @@ int set_traits(WINDOW* w, game* g, player *u, int &points)
mvwprintz(w,16,31, c_ltgray,"Toggles");
int cur_adv = 1, cur_dis = PF_SPLIT + 1, cur_trait, traitmin, traitmax, xoff;
nc_color col_on, col_off, hi_on, hi_off;
nc_color col_on_act, col_off_act, col_on_pas, col_off_pas, hi_on, hi_off;
bool using_adv = true; // True if we're selecting advantages, false if we're
// selecting disadvantages
do {
mvwprintz(w, 3, 2, c_ltgray, "Points left: %d ", points);
mvwprintz(w, 3,20, c_ltgreen, "%s%d/%d", (num_good < 10 ? " " : ""),
num_good, MAX_TRAIT_POINTS);
mvwprintz(w, 3,33, c_ltred, "%s%d/%d", (num_bad < 10 ? " " : ""),
num_bad, MAX_TRAIT_POINTS);
mvwprintz(w, 3,18, c_ltgreen, "%s%d/%d", (num_good < 10 ? " " : ""),
num_good, max_trait_points);
mvwprintz(w, 3,25, c_ltred, "%s%d/%d", (num_bad < 10 ? " " : ""),
num_bad, max_trait_points);
// Clear the bottom of the screen.
mvwprintz(w_description, 0, 0, c_ltgray, " ");
mvwprintz(w_description, 1, 0, c_ltgray, " ");
mvwprintz(w_description, 2, 0, c_ltgray, " ");
if (using_adv) {
col_on = COL_TR_GOOD_ON;
col_off = COL_TR_GOOD_OFF;
hi_on = hilite(col_on);
hi_off = hilite(col_off);
if (using_adv) {//Traits costs note and traits description
col_on_act = COL_TR_GOOD_ON_ACT;
col_off_act = COL_TR_GOOD_OFF_ACT;
col_on_pas = COL_TR_GOOD_ON_PAS;
col_off_pas = COL_TR_GOOD_OFF_PAS;
hi_on = hilite(col_on_act);
hi_off = hilite(col_off_act);
xoff = 2;
cur_trait = cur_adv;
traitmin = 1;
traitmax = PF_SPLIT;
mvwprintz(w, 3, 40, c_ltgray, " ");
mvwprintz(w, 3, 40, COL_TR_GOOD, "%s costs %d points",
mvwprintz(w, 3, 33, c_ltgray, " ");
mvwprintz(w, 3, 33, COL_TR_GOOD, "%s costs %d points",
traits[cur_adv].name.c_str(), traits[cur_adv].points);
mvwprintz(w_description, 0, 0, COL_TR_GOOD, "%s", traits[cur_adv].description.c_str());
} else {
col_on = COL_TR_BAD_ON;
col_off = COL_TR_BAD_OFF;
hi_on = hilite(col_on);
hi_off = hilite(col_off);
col_on_act = COL_TR_BAD_ON_ACT;
col_off_act = COL_TR_BAD_OFF_ACT;
col_on_pas = COL_TR_BAD_ON_PAS;
col_off_pas = COL_TR_BAD_OFF_PAS;
hi_on = hilite(col_on_act);
hi_off = hilite(col_off_act);
xoff = 40;
cur_trait = cur_dis;
traitmin = PF_SPLIT + 1;
traitmax = PF_MAX;
mvwprintz(w, 3, 40, c_ltgray, " ");
mvwprintz(w, 3, 40, COL_TR_BAD, "%s earns %d points",
mvwprintz(w, 3, 33, c_ltgray, " ");
mvwprintz(w, 3, 33, COL_TR_BAD, "%s earns %d points",
traits[cur_dis].name.c_str(), traits[cur_dis].points * -1);
mvwprintz(w_description, 0, 0, COL_TR_BAD, "%s", traits[cur_dis].description.c_str());
}
if (cur_trait <= traitmin + 7) {
if (cur_trait <= traitmin + 7) {//draw list
for (int i = traitmin; i < traitmin + 16; i++) {
mvwprintz(w, 5 + i - traitmin, xoff, c_ltgray, "\
"); // Clear the line
@@ -568,9 +635,9 @@ int set_traits(WINDOW* w, game* g, player *u, int &points)
mvwprintz(w, 5 + i - traitmin, xoff, hi_off, traits[i].name.c_str());
} else {
if (u->has_trait(i))
mvwprintz(w, 5 + i - traitmin, xoff, col_on, traits[i].name.c_str());
mvwprintz(w, 5 + i - traitmin, xoff, col_on_act, traits[i].name.c_str());
else
mvwprintz(w, 5 + i - traitmin, xoff, col_off, traits[i].name.c_str());
mvwprintz(w, 5 + i - traitmin, xoff, col_off_act, traits[i].name.c_str());
}
}
} else if (cur_trait >= traitmax - 9) {
@@ -584,9 +651,9 @@ int set_traits(WINDOW* w, game* g, player *u, int &points)
mvwprintz(w, 21 + i - traitmax, xoff, hi_off, traits[i].name.c_str());
} else {
if (u->has_trait(i))
mvwprintz(w, 21 + i - traitmax, xoff, col_on, traits[i].name.c_str());
mvwprintz(w, 21 + i - traitmax, xoff, col_on_act, traits[i].name.c_str());
else
mvwprintz(w, 21 + i - traitmax, xoff, col_off, traits[i].name.c_str());
mvwprintz(w, 21 + i - traitmax, xoff, col_off_act, traits[i].name.c_str());
}
}
} else {
@@ -600,9 +667,9 @@ int set_traits(WINDOW* w, game* g, player *u, int &points)
mvwprintz(w, 12 + i - cur_trait, xoff, hi_off, traits[i].name.c_str());
} else {
if (u->has_trait(i))
mvwprintz(w, 12 + i - cur_trait, xoff, col_on, traits[i].name.c_str());
mvwprintz(w, 12 + i - cur_trait, xoff, col_on_act, traits[i].name.c_str());
else
mvwprintz(w, 12 + i - cur_trait, xoff, col_off, traits[i].name.c_str());
mvwprintz(w, 12 + i - cur_trait, xoff, col_off_act, traits[i].name.c_str());
}
}
}
@@ -613,17 +680,32 @@ int set_traits(WINDOW* w, game* g, player *u, int &points)
case 'h':
case 'l':
case '\t':
if (!using_adv) {
for (int i = 0; i < 16; i++) {
mvwprintz(w, 5 + i, 40, c_dkgray, "\
");
mvwprintz(w, 5 + i, 40, c_dkgray, traits[PF_SPLIT + 1 + i].name.c_str());
if (cur_trait <= traitmin + 7) {//draw list
for (int i = traitmin; i < traitmin + 16; i++) {
mvwprintz(w, 5 + i - traitmin, xoff, c_ltgray, "\
"); // Clear the line
if (u->has_trait(i))
mvwprintz(w, 5 + i - traitmin, xoff, col_on_pas, traits[i].name.c_str());
else
mvwprintz(w, 5 + i - traitmin, xoff, col_off_pas, traits[i].name.c_str());
}
} else if (cur_trait >= traitmax - 9) {
for (int i = traitmax - 16; i < traitmax; i++) {
mvwprintz(w, 21 + i - traitmax, xoff, c_ltgray, "\
"); // Clear the line
if (u->has_trait(i))
mvwprintz(w, 21 + i - traitmax, xoff, col_on_pas, traits[i].name.c_str());
else
mvwprintz(w, 21 + i - traitmax, xoff, col_off_pas, traits[i].name.c_str());
}
} else {
for (int i = 0; i < 16; i++) {
mvwprintz(w, 5 + i, 2, c_dkgray, "\
");
mvwprintz(w, 5 + i, 2, c_dkgray, traits[i + 1].name.c_str());
for (int i = cur_trait - 7; i < cur_trait + 9; i++) {
mvwprintz(w, 12 + i - cur_trait, xoff, c_ltgray, "\
"); // Clear the line
if (u->has_trait(i))
mvwprintz(w, 12 + i - cur_trait, xoff, col_on_pas, traits[i].name.c_str());
else
mvwprintz(w, 12 + i - cur_trait, xoff, col_off_pas, traits[i].name.c_str());
}
}
using_adv = !using_adv;
@@ -660,13 +742,13 @@ int set_traits(WINDOW* w, game* g, player *u, int &points)
} else
mvwprintz(w, 3, 2, c_red, "Points left: %d ", points);
} else if (using_adv && num_good + traits[cur_trait].points >
MAX_TRAIT_POINTS)
max_trait_points)
popup("Sorry, but you can only take %d points of advantages.",
MAX_TRAIT_POINTS);
max_trait_points);
else if (!using_adv && num_bad - traits[cur_trait].points >
MAX_TRAIT_POINTS)
max_trait_points)
popup("Sorry, but you can only take %d points of disadvantages.",
MAX_TRAIT_POINTS);
max_trait_points);
else if (points >= traits[cur_trait].points) {
u->toggle_trait(cur_trait);
points -= traits[cur_trait].points;
@@ -819,10 +901,10 @@ int set_skills(WINDOW* w, game* g, player *u, int &points)
mvwprintz(w, 3, 40, c_ltgray, " ");
if (points >= u->skillLevel(currentSkill) + 1)
mvwprintz(w, 3, 30, COL_SKILL_USED, "Upgrading %s costs %d points",
skill_name(cur_sk).c_str(), u->skillLevel(currentSkill) + 1);
currentSkill->name().c_str(), u->skillLevel(currentSkill) + 1);
else
mvwprintz(w, 3, 30, c_ltred, "Upgrading %s costs %d points",
skill_name(cur_sk).c_str(), u->skillLevel(currentSkill) + 1);
currentSkill->name().c_str(), u->skillLevel(currentSkill) + 1);
mvwprintz(w_description, 0, 0, COL_SKILL_USED, currentSkill->description().c_str());
if (cur_sk <= 7) {
@@ -837,7 +919,7 @@ int set_skills(WINDOW* w, game* g, player *u, int &points)
} else {
mvwprintz(w, 5 + i, 2,
(i == cur_sk ? hilite(COL_SKILL_USED) : COL_SKILL_USED),
"%s ", skill_name(i).c_str());
"%s ", thisSkill->name().c_str());
for (int j = 0; j < u->skillLevel(thisSkill); j++)
wprintz(w, (i == cur_sk ? hilite(COL_SKILL_USED) : COL_SKILL_USED), "*");
}
@@ -1048,3 +1130,5 @@ void save_template(player *u)
fout.open(playerfile.str().c_str());
fout << u->save_info();
}
// vim:tw=80:sw=4:ts=4:et:fdm=marker:fdl=0:
+197 -153
View File
@@ -9,6 +9,7 @@
#include "skill.h"
#include "output.h"
#include "line.h"
#include "item_factory.h"
std::vector<item> starting_clothes(npc_class type, bool male, game *g);
std::list<item> starting_inv(npc *me, npc_class type, game *g);
@@ -50,8 +51,10 @@ npc::npc()
mission = NPC_MISSION_NULL;
myclass = NC_NONE;
patience = 0;
for (int i = 0; i < num_skill_types; i++)
sklevel[i] = 0;
for (std::vector<Skill*>::iterator aSkill = Skill::skills.begin();
aSkill != Skill::skills.end(); ++aSkill) {
set_skill_level(*aSkill, 0);
}
setID(-1);
}
@@ -128,8 +131,7 @@ npc& npc::operator= (const npc & rhs)
hp_max[i] = rhs.hp_max[i];
}
for (int i = 0; i < num_skill_types; i++)
sklevel[i] = rhs.sklevel[i];
copy_skill_levels(&rhs);
styles.clear();
for (int i = 0; i < rhs.styles.size(); i++)
@@ -155,8 +157,11 @@ std::string npc::save_info()
dump << my_traits[i] << " ";
for (int i = 0; i < num_hp_parts; i++)
dump << hp_cur[i] << " " << hp_max[i] << " ";
for (int i = 0; i < num_skill_types; i++)
dump << int(sklevel[i]) << " " << skexercise[i] << " ";
for (std::vector<Skill*>::iterator aSkill = Skill::skills.begin(); aSkill != Skill::skills.end(); ++aSkill) {
SkillLevel level = skillLevel(*aSkill);
dump << level;
}
dump << styles.size() << " ";
for (int i = 0; i < styles.size(); i++)
@@ -242,8 +247,9 @@ void npc::load_info(game *g, std::string data)
for (int i = 0; i < num_hp_parts; i++)
dump >> hp_cur[i] >> hp_max[i];
for (int i = 0; i < num_skill_types; i++)
dump >> sklevel[i] >> skexercise[i];
for (std::vector<Skill*>::iterator aSkill = Skill::skills.begin(); aSkill != Skill::skills.end(); ++aSkill) {
dump >> skillLevel(*aSkill);
}
itype_id tmpstyle;
int numstyle;
@@ -329,21 +335,27 @@ void npc::randomize(game *g, npc_class type)
myclass = type;
switch (type) { // Type of character
case NC_NONE: // Untyped; no particular specialization
for (int i = 1; i < num_skill_types; i++) {
sklevel[i] = dice(4, 2) - rng(1, 4);
if (!one_in(3))
sklevel[i] = 0;
for (std::vector<Skill*>::iterator aSkill = Skill::skills.begin(); aSkill != Skill::skills.end(); ++aSkill) {
int level = 0;
if (one_in(3))
{
level = dice(4, 2) - rng(1, 4);
}
set_skill_level(*aSkill, level);
}
break;
case NC_HACKER:
for (int i = 1; i < num_skill_types; i++) {
sklevel[i] = dice(2, 2) - rng(1, 2);
if (!one_in(3))
sklevel[i] = 0;
for (std::vector<Skill*>::iterator aSkill = Skill::skills.begin(); aSkill != Skill::skills.end(); ++aSkill) {
int level = 0;
if (one_in(3))
{
level = dice(2, 2) - rng(1, 2);
}
set_skill_level(*aSkill, level);
}
sklevel[sk_electronics] += rng(1, 4);
sklevel[sk_computer] += rng(3, 6);
boost_skill_level("electronics", rng(1, 4));
boost_skill_level("computer", rng(3, 6));
str_max -= rng(0, 4);
dex_max -= rng(0, 2);
int_max += rng(1, 5);
@@ -353,12 +365,15 @@ void npc::randomize(game *g, npc_class type)
break;
case NC_DOCTOR:
for (int i = 1; i < num_skill_types; i++) {
sklevel[i] = dice(3, 2) - rng(1, 3);
if (!one_in(3))
sklevel[i] = 0;
for (std::vector<Skill*>::iterator aSkill = Skill::skills.begin(); aSkill != Skill::skills.end(); ++aSkill) {
int level = 0;
if (one_in(3))
{
level = dice(3, 2) - rng(1, 3);
}
set_skill_level(*aSkill, level);
}
sklevel[sk_firstaid] += rng(2, 6);
boost_skill_level("firstaid", rng(2, 6));
str_max -= rng(0, 2);
int_max += rng(0, 2);
per_max += rng(0, 1) * rng(0, 1);
@@ -369,15 +384,18 @@ void npc::randomize(game *g, npc_class type)
break;
case NC_TRADER:
for (int i = 1; i < num_skill_types; i++) {
sklevel[i] = dice(2, 2) - 2 + (rng(0, 1) * rng(0, 1));
if (!one_in(3))
sklevel[i] = 0;
for (std::vector<Skill*>::iterator aSkill = Skill::skills.begin(); aSkill != Skill::skills.end(); ++aSkill) {
int level = 0;
if (one_in(3))
{
level = dice(2, 2) - 2 + (rng(0, 1) * rng(0, 1));
}
set_skill_level(*aSkill, level);
}
sklevel[sk_mechanics] += rng(0, 2);
sklevel[sk_electronics] += rng(0, 2);
sklevel[sk_speech] += rng(0, 3);
sklevel[sk_barter] += rng(2, 5);
boost_skill_level("mechanics", rng(0, 2));
boost_skill_level("electronics", rng(0, 2));
boost_skill_level("speech", rng(0, 3));
boost_skill_level("barter", rng(2, 5));
int_max += rng(0, 1) * rng(0, 1);
per_max += rng(0, 1) * rng(0, 1);
personality.collector += rng(1, 5);
@@ -385,15 +403,18 @@ void npc::randomize(game *g, npc_class type)
break;
case NC_NINJA:
for (int i = 1; i < num_skill_types; i++) {
sklevel[i] = dice(2, 2) - rng(1, 2);
if (!one_in(3))
sklevel[i] = 0;
for (std::vector<Skill*>::iterator aSkill = Skill::skills.begin(); aSkill != Skill::skills.end(); ++aSkill) {
int level = 0;
if (one_in(3))
{
level = dice(2, 2) - rng(1, 2);
}
set_skill_level(*aSkill, level);
}
sklevel[sk_dodge] += rng(2, 4);
sklevel[sk_melee] += rng(1, 4);
sklevel[sk_unarmed] += rng(4, 6);
sklevel[sk_throw] += rng(0, 2);
boost_skill_level("dodge", rng(2, 4));
boost_skill_level("melee", rng(1, 4));
boost_skill_level("unarmed", rng(4, 6));
boost_skill_level("throw", rng(0, 2));
str_max -= rng(0, 1);
dex_max += rng(0, 2);
per_max += rng(0, 2);
@@ -405,14 +426,17 @@ void npc::randomize(game *g, npc_class type)
break;
case NC_COWBOY:
for (int i = 1; i < num_skill_types; i++) {
sklevel[i] = dice(3, 2) - rng(0, 4);
if (sklevel[i] < 0)
sklevel[i] = 0;
for (std::vector<Skill*>::iterator aSkill = Skill::skills.begin(); aSkill != Skill::skills.end(); ++aSkill) {
int level = dice(3, 2) - rng(0, 4);
if (level < 0)
{
level = 0;
}
set_skill_level(*aSkill, level);
}
sklevel[sk_gun] += rng(1, 3);
sklevel[sk_pistol] += rng(1, 3);
sklevel[sk_rifle] += rng(0, 2);
boost_skill_level("gun", rng(1, 3));
boost_skill_level("pistol", rng(1, 3));
boost_skill_level("rifle", rng(0, 2));
int_max -= rng(0, 2);
str_max += rng(0, 1);
per_max += rng(0, 2);
@@ -421,18 +445,21 @@ void npc::randomize(game *g, npc_class type)
break;
case NC_SCIENTIST:
for (int i = 1; i < num_skill_types; i++) {
sklevel[i] = dice(3, 2) - 4;
if (sklevel[i] < 0)
sklevel[i] = 0;
for (std::vector<Skill*>::iterator aSkill = Skill::skills.begin(); aSkill != Skill::skills.end(); ++aSkill) {
int level = dice(3, 2) - 4;
if (level < 0)
{
level = 0;
}
set_skill_level(*aSkill, level);
}
sklevel[sk_computer] += rng(0, 3);
sklevel[sk_electronics] += rng(0, 3);
sklevel[sk_firstaid] += rng(0, 1);
boost_skill_level("computer", rng(0, 3));
boost_skill_level("electronics", rng(0, 3));
boost_skill_level("firstaid", rng(0, 1));
switch (rng(1, 3)) { // pick a specialty
case 1: sklevel[sk_computer] += rng(2, 6); break;
case 2: sklevel[sk_electronics] += rng(2, 6); break;
case 3: sklevel[sk_firstaid] += rng(2, 6); break;
case 1: boost_skill_level("computer", rng(2, 6)); break;
case 2: boost_skill_level("electronics", rng(2, 6)); break;
case 3: boost_skill_level("firstaid", rng(2, 6)); break;
}
if (one_in(4))
flags |= mfb(NF_TECHNOPHILE);
@@ -447,13 +474,16 @@ void npc::randomize(game *g, npc_class type)
break;
case NC_BOUNTY_HUNTER:
for (int i = 1; i < num_skill_types; i++) {
sklevel[i] = dice(3, 2) - 3;
if (sklevel[i] > 0 && one_in(3))
sklevel[i]--;
for (std::vector<Skill*>::iterator aSkill = Skill::skills.begin(); aSkill != Skill::skills.end(); ++aSkill) {
int level = dice(3, 2) - 3;
if (level > 0 && one_in(3))
{
level--;
}
set_skill_level(*aSkill, level);
}
sklevel[sk_gun] += rng(2, 4);
sklevel[rng(sk_pistol, sk_rifle)] += rng(3, 5);
boost_skill_level("gun", rng(2, 4));
boost_skill_level(Skill::random_skill_with_tag("gun"), rng(3, 5));
personality.aggression += rng(1, 6);
personality.bravery += rng(0, 5);
break;
@@ -598,7 +628,7 @@ void npc::randomize_from_faction(game *g, faction *fac)
personality.altruism += rng(0, 4);
int_max += rng(2, 4);
per_max += rng(0, 2);
sklevel[sk_firstaid] += rng(1, 5);
boost_skill_level("firstaid", rng(1, 5));
}
if (fac->has_job(FACJOB_FARMERS)) {
personality.aggression -= rng(2, 4);
@@ -614,10 +644,10 @@ void npc::randomize_from_faction(game *g, faction *fac)
personality.aggression -= rng(0, 2);
personality.bravery -= rng(0, 2);
switch (rng(1, 4)) {
case 1: sklevel[sk_mechanics] += dice(2, 4); break;
case 2: sklevel[sk_electronics] += dice(2, 4); break;
case 3: sklevel[sk_cooking] += dice(2, 4); break;
case 4: sklevel[sk_tailor] += dice(2, 4); break;
case 1: boost_skill_level("mechanics", dice(2, 4)); break;
case 2: boost_skill_level("electronics", dice(2, 4)); break;
case 3: boost_skill_level("cooking", dice(2, 4)); break;
case 4: boost_skill_level("tailor", dice(2, 4)); break;
}
}
@@ -644,9 +674,9 @@ void npc::randomize_from_faction(game *g, faction *fac)
per_max += rng(0, 2);
int_max += rng(0, 4);
if (one_in(3)) {
sklevel[sk_mechanics] += dice(2, 3);
sklevel[sk_electronics] += dice(2, 3);
sklevel[sk_firstaid] += dice(2, 3);
boost_skill_level("mechanics", dice(2, 3));
boost_skill_level("electronics", dice(2, 3));
boost_skill_level("firstaid", dice(2, 3));
}
}
if (fac->has_value(FACVAL_BOOKS)) {
@@ -662,9 +692,10 @@ void npc::randomize_from_faction(game *g, faction *fac)
dex_max += rng(0, 3);
per_max += rng(0, 2);
int_max += rng(0, 2);
for (int i = 1; i < num_skill_types; i++) {
for (std::vector<Skill*>::iterator aSkill = Skill::skills.begin();
aSkill != Skill::skills.end(); ++aSkill) {
if (one_in(3))
sklevel[i] += rng(2, 4);
boost_skill_level(*aSkill, rng(2, 4));
}
}
if (fac->has_value(FACVAL_ROBOTS)) {
@@ -940,7 +971,7 @@ std::list<item> starting_inv(npc *me, npc_class type, game *g)
// TODO: More specifics.
while (total_space > 0 && !one_in(8)) {
tmp = standard_itype_ids[rng(0, standard_itype_ids.size())];
tmp = standard_itype_ids[rng(0, standard_itype_ids.size()-1)];
if (total_space >= g->itypes[tmp]->volume) {
ret.push_back(item(g->itypes[tmp], 0));
ret.back() = ret.back().in_its_container(&g->itypes);
@@ -1003,76 +1034,89 @@ void npc::place_near(game *g, int potentialX, int potentialY)
posy = potentialY + y;
}
skill npc::best_skill()
Skill* npc::best_skill()
{
std::vector<int> best_skills;
std::vector<Skill*> best_skills;
int highest = 0;
for (int i = sk_unarmed; i <= sk_rifle; i++) {
if (sklevel[i] > highest && i != sk_gun) {
highest = sklevel[i];
best_skills.clear();
for (std::vector<Skill*>::iterator iter = Skill::skills.begin(); iter != Skill::skills.end(); ++iter) {
if ((*iter)->ident() != "gun") {
if (skillLevel(*iter) > highest) {
highest = skillLevel(*iter);
best_skills.clear();
best_skills.push_back(*iter);
} else if (skillLevel(*iter) == highest) {
best_skills.push_back(*iter);
}
}
if (sklevel[i] == highest && i != sk_gun)
best_skills.push_back(i);
}
int index = rng(0, best_skills.size() - 1);
return skill(best_skills[index]);
return best_skills[index];
}
void npc::starting_weapon(game *g)
{
if (!styles.empty()) {
weapon.make(g->itypes[styles[rng(0, styles.size() - 1)]]);
return;
}
skill best = best_skill();
int index;
switch (best) {
case sk_bashing:
switch (rng(0, 5)) {
case 0: weapon.make(g->itypes["hammer"]); break;
case 1: weapon.make(g->itypes["wrench"]); break;
case 2: weapon.make(g->itypes["hammer_sledge"]); break;
case 3: weapon.make(g->itypes["pipe"]); break;
case 4: weapon.make(g->itypes["bat"]); break;
case 5: weapon.make(g->itypes["crowbar"]); break;
}
break;
case sk_cutting:
switch (rng(0, 5)) {
case 0: weapon.make(g->itypes["knife_butcher"]); break;
case 1: weapon.make(g->itypes["hatchet"]); break;
case 2: weapon.make(g->itypes["ax"]); break;
case 3: weapon.make(g->itypes["machete"]); break;
case 4: weapon.make(g->itypes["knife_combat"]); break;
case 5: weapon.make(g->itypes["katana"]); break;
}
break;
case sk_throw:
// TODO: Some throwing weapons... grenades?
break;
case sk_pistol:
index = rng(0, g->mapitems[mi_pistols].size() - 1);
weapon.make(g->itypes[(g->mapitems[mi_pistols])[index]]);
break;
case sk_shotgun:
index = rng(0, g->mapitems[mi_shotguns].size() - 1);
weapon.make(g->itypes[(g->mapitems[mi_shotguns])[index]]);
break;
case sk_smg:
index = rng(0, g->mapitems[mi_smg].size() - 1);
weapon.make(g->itypes[(g->mapitems[mi_smg])[index]]);
break;
case sk_rifle:
index = rng(0, g->mapitems[mi_rifles].size() - 1);
weapon.make(g->itypes[(g->mapitems[mi_rifles])[index]]);
break;
}
if (weapon.is_gun()) {
it_gun* gun = dynamic_cast<it_gun*>(weapon.type);
weapon.charges = gun->clip;
weapon.curammo = dynamic_cast<it_ammo*>(g->itypes[default_ammo(gun->ammo)]);
}
if (!styles.empty())
{
weapon.make(g->itypes[styles[rng(0, styles.size() - 1)]]);
return;
}
// TODO add throwing weapons
std::list<itype_id> possible_items;
Skill* best = best_skill();
if (best->ident() == "bashing")
{
possible_items.push_back("hammer");
possible_items.push_back("wrench");
possible_items.push_back("hammer_sledge");
possible_items.push_back("pipe");
possible_items.push_back("bat");
possible_items.push_back("crowbar");
}
else if (best->ident() == "cutting")
{
possible_items.push_back("knife_butcher");
possible_items.push_back("hatchet");
possible_items.push_back("ax");
possible_items.push_back("machete");
possible_items.push_back("knife_combat");
possible_items.push_back("katana");
}
else if (best->ident() == "pistol")
{
int index = rng(0, g->mapitems[mi_pistols].size() - 1);
possible_items.push_back(g->mapitems[mi_pistols][index]);
}
else if (best->ident() == "shotgun")
{
int index = rng(0, g->mapitems[mi_shotguns].size() - 1);
possible_items.push_back(g->mapitems[mi_shotguns][index]);
}
else if (best->ident() == "smg")
{
int index = rng(0, g->mapitems[mi_smg].size() - 1);
possible_items.push_back(g->mapitems[mi_smg][index]);
}
else if (best->ident() == "rifle")
{
int index = rng(0, g->mapitems[mi_rifles].size() - 1);
possible_items.push_back(g->mapitems[mi_rifles][index]);
}
if (possible_items.size() > 0)
{
std::list<itype_id>::iterator chosen = possible_items.begin();
std::advance(chosen, rng(0, possible_items.size() - 1));
weapon.make(item_controller->find_template(*chosen));
}
if (weapon.is_gun())
{
it_gun* gun = dynamic_cast<it_gun*>(weapon.type);
weapon.charges = gun->clip;
weapon.curammo = dynamic_cast<it_ammo*>(g->itypes[default_ammo(gun->ammo)]);
}
}
bool npc::wear_if_wanted(item it)
@@ -1114,7 +1158,7 @@ bool npc::wear_if_wanted(item it)
return false;
}
bool npc::wield(game *g, char invlet)
bool npc::wield(game *g, signed char invlet)
{
if (invlet < 0) { // Wielding a style
int index = 0 - invlet - 1;
@@ -1412,14 +1456,16 @@ int npc::assigned_missions_value(game *g)
return ret;
}
std::vector<skill> npc::skills_offered_to(player *p)
std::vector<Skill*> npc::skills_offered_to(player *p)
{
std::vector<skill> ret;
std::vector<Skill*> ret;
if (p == NULL)
return ret;
for (int i = 0; i < num_skill_types; i++) {
if (p->skillLevel(Skill::skill(i)) < sklevel[i])
ret.push_back( skill(i) );
for (std::vector<Skill*>::iterator aSkill = Skill::skills.begin();
aSkill != Skill::skills.end(); ++aSkill) {
if (p->skillLevel(*aSkill) < skillLevel(*aSkill)) {
ret.push_back(*aSkill);
}
}
return ret;
}
@@ -1478,15 +1524,15 @@ void npc::decide_needs()
it_gun* gun = dynamic_cast<it_gun*>(weapon.type);
needrank[need_ammo] = 5 * has_ammo(gun->ammo).size();
}
if (weapon.type->id == "null" && sklevel[sk_unarmed] < 4)
if (weapon.type->id == "null" && skillLevel("unarmed") < 4)
needrank[need_weapon] = 1;
else
needrank[need_weapon] = weapon.type->melee_dam + weapon.type->melee_cut +
weapon.type->m_to_hit;
if (!weapon.is_gun())
needrank[need_gun] = sklevel[sk_unarmed] + sklevel[sk_melee] +
sklevel[sk_bashing] + sklevel[sk_cutting] -
sklevel[sk_gun] * 2 + 5;
needrank[need_gun] = skillLevel("unarmed") + skillLevel("melee") +
skillLevel("bashing") + skillLevel("cutting") -
skillLevel("gun") * 2 + 5;
needrank[need_food] = 15 - hunger;
needrank[need_drink] = 15 - thirst;
invslice slice = inv.slice(0, inv.size());
@@ -1556,7 +1602,7 @@ void npc::init_selling(std::vector<item*> &items, std::vector<int> &prices)
val = value(slice[i]->front()) - (slice[i]->front().price() / 50);
if (val <= NPC_LOW_VALUE || mission == NPC_MISSION_SHOPKEEP) {
items.push_back(&slice[i]->front());
price = slice[i]->front().price() / (price_adjustment(sklevel[sk_barter]));
price = slice[i]->front().price() / (price_adjustment(skillLevel("barter")));
prices.push_back(price);
}
}
@@ -1575,7 +1621,7 @@ void npc::init_buying(inventory& you, std::vector<item*> &items,
price = slice[i]->front().price();
if (val >= NPC_VERY_HI_VALUE)
price *= 2;
price *= price_adjustment(sklevel[sk_barter]);
price *= price_adjustment(skillLevel("barter"));
prices.push_back(price);
}
}
@@ -1601,9 +1647,9 @@ void npc::update_worst_item_value()
int npc::value(const item &it)
{
int ret = it.price() / 50;
skill best = best_skill();
if (best != sk_unarmed) {
int weapon_val = it.weapon_value(sklevel) - weapon.weapon_value(sklevel);
Skill* best = best_skill();
if (best->ident() != "unarmed") {
int weapon_val = it.weapon_value(this) - weapon.weapon_value(this);
if (weapon_val > 0)
ret += weapon_val;
}
@@ -2037,10 +2083,10 @@ void npc::die(game *g, bool your_fault)
my_body.make_corpse(g->itypes["corpse"], g->mtypes[mon_null], g->turn);
my_body.name = name;
g->m.add_item(posx, posy, my_body);
std::vector<item> dump;
std::vector<item *> dump;
inv.dump(dump);
for (int i = 0; i < dump.size(); i++)
g->m.add_item(posx, posy, dump[i]);
g->m.add_item(posx, posy, *(dump[i]));
for (int i = 0; i < worn.size(); i++)
g->m.add_item(posx, posy, worn[i]);
if (weapon.type->id != "null")
@@ -2050,8 +2096,6 @@ void npc::die(game *g, bool your_fault)
if (g->active_missions[i].npc_id == getID())
g->fail_mission( g->active_missions[i].uid );
}
g->cur_om->remove_npc(getID());
}
std::string npc_attitude_name(npc_attitude att)

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