Commit Graph

71 Commits

Author SHA1 Message Date
6646097e04 Fix gold/food with custom charges not working/displaying right 2015-09-24 17:21:54 -04:00
b8ac49f9ce Allow towns to not die no matter how many monsters are killed 2015-09-20 14:16:18 -04:00
960e4cdf23 Remove map and text bar patterns, move dither patterns to separate sheet 2015-08-31 11:37:27 -04:00
86dc17b7bc Scrub hard-coded text and buttons from inventory and stat area images 2015-08-31 11:31:51 -04:00
5762c2bb90 Tweak to error dialogs and add separate warning dialogs
(Also some error messages tweaked)
2015-08-14 23:30:18 -04:00
9972c3d27d Various damage-related changes
- Rename unblockable damage to "weird" and special damage to "unblockable"
- Monsters now support immunity to any damage type
- Fix using wrong damage type for bonus damage in PC-on-PC attacks
- Forbid use of unblockable (formerly special) damage by the scenario designer, except in special nodes; if hacked in, it's replaced with weird (formerly unblockable) damage.
- Fix damage amount text in animations (both single-frame booms and fully animated booms)

Changed the following things from weird (formerly unblockable) damage to unblockable (formerly special) damage:
- Starvation
- Debug 'K' command
- Damage from items forcibly ending flight
- Damage from bashing doors
2015-07-19 10:59:22 -04:00
a2d7a1a233 Introduce enum for monster attitudes
- Fix some issues with Hostile B monsters (their presence didn't prevent taking nearby items, and they became Hostile A after a mindduel)
- Fix the town a saved creature was in not being saved in the saved game file
- Fix town not going hostile when you damage a friendly monster
2015-07-07 13:59:54 -04:00
74273783b9 Misc little things
- Some item abilities didn't appear in the editor ability selection dialog
- If have (+take) nodes took by default (ie when left at -1)
- Rename button in edit terrain dialog, as the old name barely fit
2015-06-30 12:53:42 -04:00
b7faf52f5e Remove pointless s_pow and s_sqrt functions and use hypot instead of sqrt for distance calculations 2015-06-21 18:04:31 -04:00
2ddf38138a Fix town entry sounds playing at scenario start and when using a stairway 2015-06-20 21:18:20 -04:00
3239d8e503 Bugfixes
- Fix attempt at accessing invalid placed town locations
- Fix attempt at accessing invalid terrain in editor when checking whether to apply transformations
2015-06-20 12:43:16 -04:00
f6be40618b Overhaul and improve force cages
- Add instant help message
- Prevent from ending town combat if one member is in a forcecage or if everyone's in a different forcecage (you can still end it if everyone's in the same cage)
- If entering town combat while caged, everyone remains in the cage
- Penalties to melee combat if the target or attacker is in a forcecage (higher penalties if the attacker is caged, unless they're using a pole weapon)
- Instead of placing a forcecage at every location where someone gains forcecage status, the game now syncs forcecages (placing them on locations where someone has forcecage status) at the end of the move.
- The Flash Step and Word of Recall spells and any specials that move the party also clear their forcecage status, so that a new forcecage won't appear on their new location. If they're moved into a forcecage, the syncing process will give them the status at the end of the move.
- Forcecage status now supported for the Occasional Status item ability
- Forcecages now eventually expire on their own even if you can't break out. Unoccupied ones also have a slight (0.1%) chance each turn to expire.
- Affect Status node now allows forcecage status. (It also works as documented, using Extra 1c rather than 2a as the status type.)
- Preset monsters placed in preset force cages gain the status at town initialization; it's a lot more than they'd gain through the syncing process, so unless they break free, it'll last a very long time.
- Monsters/PCs with spells (and PCs with Mage Lore) now have an increased chance of resisting entrapment in a forcecage
- If the full party is subject to a forcecage, the PC with the best chance of breaking free (assuming they don't resist) is chosen to determine whether they resist. Note that this may not be the PC with the best chance of resisting in the first place.
- Protection from Forcecage now implemented as an item ability
Other stuff (though related):
- Reset party's combat pos to the null location (-1,-1) after a cutscene ends; to not do so would mess up get_loc() calls
2015-06-10 11:45:14 -04:00
01d317b007 .h -> .hpp 2015-06-08 22:14:43 -04:00
722f670e3d Fix crates and barrels "stealing" the items from other containers when they are pushed over them
Fix stone blocks disappearing when pushed
2015-06-06 23:23:45 -04:00
510da3cf72 Update terrain dialog and some other tweaks/fixes
- Fix documentation of how to format map graphics, to match the logic in the code
- Fix display of map graphics both on the automap and in dialogs
- Add Choose button to select the map graphic
- Fix the vanishing text bug again (this time it only triggered for fields with a single character in them)
2015-06-06 02:51:30 -04:00
80f95ba9ae Several bugfixes
- Fix light mask not rendering correctly
- Fix terrain-sourced lighting not being calculated on scenario load
- Fix light-removing items incorrectly applying their ability strength
- Fix smash patterns not affecting opaque tiles (such as mouldy walls)
- Fix monsters outside the light range not being rendered when fog is lifted
- Fix town timers not being cancelled when you leave town
- Fix non-existent outdoor wandering encounters sometimes triggering due to uninitialized data
- Hard-wrap some doc lines
2015-06-04 21:50:08 -04:00
7dddcdb86e Several little tweaks and fixes
- Fix some uninitialized fields getting populated with random data
- Fix identity of last edited town and outdoor section not being saved
- Fix editor sometimes saving to application directory instead of overwriting the loaded scenario
- Fix town specials being saved to outdoors list and vice versa
- Fix right-most column of map not being loaded properly
- Fix town entry node for start town being called after the first turn of the scenario
- Add option to call a special node at startup (right after the intro dialog)
2015-06-01 22:43:41 -04:00
4fbc6cfa77 Various code cleanup stuff 2015-02-14 12:24:25 -05:00
d45ba59cce Fix Windows build
This commit also disables warnings for comparison of differently signed integers
2015-02-12 18:21:58 -05:00
Ben Scott
1477fef7ce Fixed warnings and IMPLEMENTED A THING in the menu item switch. 2015-02-12 01:47:48 -05:00
ad4a211605 Move calc_day() into party class 2015-02-07 12:52:05 -05:00
2e88b55759 Add new type of item that gives a quest when picked up 2015-02-07 12:50:35 -05:00
7d65dba686 Make some things dynamically sized
- Also, this fixes events being completely broken
2015-02-07 11:19:45 -05:00
f5a43bc011 More reduction of reliance on hard-coded limits 2015-02-07 09:46:51 -05:00
a14d3b5ff8 Combine town-shifting data into a single structure 2015-02-06 16:56:17 -05:00
f609711e27 Combine timer data into a single structure 2015-02-06 16:54:44 -05:00
7307fee425 Change town locations variable name to better reflect its use 2015-02-06 14:55:37 -05:00
233a19175d Misc minor fixes
- Fix escape not ending shop mode
- Fix outdoor special spots not being drawn
- Fix special spots sometimes appearing off the edge of the sector in the scenario editor
2015-02-04 14:20:59 -05:00
008248a947 Rewrite shops system to be more general
- Shops can now contain more than one type of item (for example, both mage and priest spells)
- Shops can now specify any talking portrait
- Healing options in a shop now have an info button giving a brief explanation (partly because it was easier than maintaining the exception)
- Additional healing option (not present in default healing shops): cure acid
- Acid is also no longer removed when you leave town or end combat (unless it's about to wear off)
- Always start shop mode with the scrollbar scrolled to the top
- Fix crash when entering an outdoor shop (and outdoor dialogue for that matter)
- Treasure generation system can now return junk items (treasure type 0), but only if explicitly requested; this is possible in shops but not with monsters since 0 means no loot

Dialog Engine:
- When setting a scrollbar's maximum, it now ensures the current position doesn't end up greater than the maximum
2015-02-03 11:15:26 -05:00
ea49a13ff8 Revert petrify to being handled by freestanding functions
- Also change kill/damage to take a player/monster reference instead of an index
2015-02-02 12:41:17 -05:00
ae7c8e12db More removal of reliance on hard-coded limits 2015-02-02 11:38:39 -05:00
c37ede5a04 Make a lot of code stop relying on hard-coded sizes 2015-02-02 11:38:37 -05:00
5364d9cb62 New spells that can be attached to items:
- Augmentation - gives one PC bonus hit points
- Nirvana - gives one PC negative dumbfounding and bonus spell points
- Icy Rain - like Firestorm, but cold damage
- Flame Aura - Damages spaces adjacent to caster
- Summon Aid - Like Summoning, but only summons one
- Major Summon Aid - Like Major Summoning, but only summons one
- Flash Step - Short-range teleport
- Fix Blade Aura spell not having refer and timing information; it also had the wrong ID (82 instead of 72
2015-01-30 17:12:16 -05:00
e0baecef4d Several little fixes
- Fix take_gold function adding to party gold instead of subtracting
- Fix wandering NPCs not appearing if the town was stored in a save slot
- If IF_FIELDS node called while outdoors, skip to jumpto
- If IF_STATISTIC called on selected target with whole party selected, default to cumulative check
2015-01-30 12:58:39 -05:00
76295e2f25 Separate summoned monster duration from whether it was summoned by the party 2015-01-28 17:43:22 -05:00
a23682306c Finish edit terrain type dialog in the editor and tweak some terrain properties
- Introduce enum for step sounds
- Remove union for treating terrain flags as either signed or unsigned
Editor:
- Add Choose button to select the "transform to" terrain.
- Implement Choose buttons as appropriate for the terrain flags, including editing the special that a terrain calls.
- Range-check the terrain flags.
- Add Custom button to choose a town as the combat arena.
- Fix/tweak/improve several of the terrain flag prompts.
- Fix placing shortcut key in field as its ASCII code instead of the letter
- Fix some of the range checks that were already in place but were incorrect or improperly static
Game:
- The wilderness terrain types now allow specifying how many d6's of food you get when hunting there.
- Crumbling terrain uses flag 2 instead of 3 to determine method (flag 2 was supposed to be strength but was never used)
- Merge two functions that did almost exactly the same thing (namely altering a terrain space and potentially updating conveyor/lights info)
- Merge switch_level into handle_lever since it was the only place it was called
- Remove global store_special_loc; the location is stored in the stuff_done array now
- Change when use/step on terrains will now update lighting if they changed to a terrain with a different light level
- Terrains that call a special no longer support mixed global/local modes - they either always call a local special or always call a global special
- Use previously unused swap_ter function (which did the exact same thing as the swap terrain special node)
Dialog Engine:
- Don't "erase" invisible icons or buttons; it's not necessary, since the entire window is filled with background before the draw() method is called, and it causes problems in case of overlapping elements.
2015-01-28 15:43:58 -05:00
92a20b1c67 Fill in a lot of missed cases (mostly just messages)
- Increase strength of slayer weapons that weren't in the original BoE by making sure that each race applies some multiplier to the ability strength
- Messages for every occasional status effect, both negative and positive. If charm/forcecage, ignore.
- Fix weapon poison not being applied
- Forcecage supported for damaging terrain (in town only, of course) and "affect status" items
- Weapon poison supported for "affect status" items; it differs from "poison weapon" items in that it honours the magic use type and doesn't risk messing up (like the Envenom spell)
- Show error messages when encountering an unimplemented spell or special node
- Fix missing handling of NPCs appearing after town dies when loading a saved town
2015-01-27 23:52:47 -05:00
6ed3b11399 Fix text wrap in transcript to work with pixel width of text instead of character width
Also, remove all (or at least most) of the extraneous spaces from the end of transcript messages.
2015-01-27 14:06:47 -05:00
0069ef7df0 Implement some new preset combat arenas (camp, crops) and generalized loading of a town as the arena 2015-01-26 21:50:36 -05:00
4fa0efa7d8 Introduce two dialogs for debugging - a Set SDF dialog and a Debug Help dialog
- sd_legit() moved into cParty class
2015-01-26 14:36:15 -05:00
d877df5101 Lots of fixes large and small
- Fix crash while resting outdoors
- Fix screen not going dark while resting
- Fix crash when starting a new game from the death dialog
- Fix several typos that completely broke combat and special encounters
- Fix bless/curse being inverted when applied to PCs
- Fix booms not showing when stepping in damaging fields in combat
- Fix crash when attempting to save a game that has never before been saved (due to clicking cancel at the initial save dialog)
- Fix some of the flickering during animations
- Support "special" damage on PCs - pierces invulnerability much like it does for monsters
- Fix monster missiles sometimes being mistargeted in combat mode
- Fix iLiving->index conversion
- Add special damage to scenario editor list
2015-01-25 23:06:13 -05:00
d396e459a3 Pass around iLiving references instead of target indices in most combat contexts (and some non-combat)
- Fixes PC melee attacks using webs from the wrong PC
- Support for PC-on-PC attacks is in place, though these code paths are currently not entered; could be used for charmed PCs, for example
- In many cases, status effects that don't affect monsters are now supported for them (but still don't affect them... yet)
- The "special" damage from assassination is now handled differently; support for it is no longer hard-coded into damage_monst(), and the message display for it is handled externally from damage_monst(). Also, it's no longer used for any kind of magic weapons.
- Select target special node has changed its way of selecting a specific monster/PC as the target
- Fix monster-on-monster attacks applying poison on all three attacks instead of just the first
2015-01-25 18:24:47 -05:00
99bb11dd3b Split up files so that the scenario editor will build
- cCreature split into seperate file-pair from cMonster/cTownperson
- fileio.cpp split into general, party, and scenario sections
- classes.h file deleted
2015-01-24 21:29:34 -05:00
144945587b Initial stage of major refactor - putting all PC/monster-affecting functions inside the respective classes 2015-01-24 20:02:20 -05:00
f00675c4f4 Fix BoE build (was broken by enchantments change) and make more use of the direction enum 2015-01-23 18:20:59 -05:00
72dfea868f Fix charges in preset items being ignored (except for food/fold) and introduce possibility of placing enchanted items in towns (lacks editor support though) 2015-01-23 04:27:44 -05:00
41db6dcfdf Fix indentation 2015-01-23 04:06:06 -05:00
f574281c3f Make monster/item lists in party town record dynamic 2015-01-23 02:53:36 -05:00
d9b9130d00 Make monster/item lists in scenario town record dynamic; move monsters to town superclass 2015-01-23 01:23:43 -05:00
df6222abda Restore the use of a separate class for town preset creatures 2015-01-22 23:39:59 -05:00