Commit Graph

21 Commits

Author SHA1 Message Date
1b95f06207 Split dlogutil.hpp into separate headers for each dialog 2015-10-04 22:45:01 -04:00
86dc17b7bc Scrub hard-coded text and buttons from inventory and stat area images 2015-08-31 11:31:51 -04:00
543ccdc670 Associate reserved pointers directly to their values, rather than referencing magic SDFs
- String buffer referencing is no longer done via a pointer but instead by a magic value separate from the pointer system (it's still -8 though)
- String buffer now stored in universe instead of scenario
2015-06-08 22:14:45 -04:00
01d317b007 .h -> .hpp 2015-06-08 22:14:43 -04: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
c37ede5a04 Make a lot of code stop relying on hard-coded sizes 2015-02-02 11:38:37 -05:00
07054eb465 Move most of the methods affecting specific status effects into the appropriate files
Other changes:
- PC-on-PC attacks now account for the target's dexterity, evasion items, and parry status
- Harmful spells that inflict a status effect now work if targeted on a PC
- Turn Undead, Dispel Undead, Ravage Spirit spells, when cast by a PC, now consider the possibility of undead/demon party members, and work if targeted on them
- Forcecage is now allowed for monster touch/ray abilities
- Items that inflict curses, slowing, or webs now account for items that grant resistance
2015-02-02 11:38:37 -05:00
7a59776189 Various special node fixes/tweaks
- Fix secret passage nodes (CANT_ENTER with ex1a = 0, ex2a = 1) not working
- Set many flags now sets the entire row of 50 flags
- Division node now accepts either SDF to be null
- New mode for append item to buffer - adds the item's "interesting string" rather than its name
- Affect mage/priest spell inverted the meaning of ex1b relative to other affect nodes; this has been fixed
- Fix affect party status being confused about which fields mean what (the implementation had one idea, and the porting of old scenarios had a different idea, and the scenario editor had yet a different idea). In addition, it now allows removing the statuses.
- Fix some typos in special node information for the editor
2015-01-29 22:48:42 -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
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
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
42639882e3 Add option to call a scenario special node to apply the effect of a trap
Also:
- The possible traps resulting from "random trap" is expanded to include the knife trap
- A custom picture can be specified for the trap dialog
- A given custom trap special node can be reused for the same trap with different levels - the pointer -5 holds the trap level passed to the ONCE_TRAP node
2015-01-20 17:18:46 -05:00
4c271140c6 Allow items that boost skills other than the three basic stats (STR/DEX/INT)
Where stat-boosting items were already accounted for, the effects remain unchanged by this; however, some additional effects have been added.

Strength-boosting items have the following new effects:
- Increases hit points gained on level-up
- Increases amount PCs can carry
Dexterity-boosting items have the following new effects:
- Increases hit chance in unarmed combat
Intelligence-boosting items have the following new effects:
- Increases effectiveness in a mindduel
2015-01-20 17:18:45 -05:00
c5e302e0cc Several new special nodes
- A set of nodes for building complex strings in a string buffer; to reference the string buffer anywhere a string is expected, you can use -8 as the string number
- A node to pause the action for a specified period of time
- Nodes to alter traits, action points (only in combat), and PC/monster names
- Node to create a new level 1 PC with a specified race, name, graphic, hp, sp, basic stats; custom graphics supported too
- Nodes to test for deadness, spells, alchemy, and status effects
- Node to centre the view on an arbitrary space
- Node to lift the "fog of war", which currently means the unseen and light masks (which can actually be disabled in preferences anyway)
- Node to edit maps (ie, specify which areas are explored)
Changes to existing nodes:
- All the rectangle nodes that affect terrain now work outdoors.
- Play sound node now has an asynchronous option
- Fix min and max modes being swapped in the check statistic node
- Select PC now allows restricting to dead PCs or to PCs with free inventory space
- Select PC now calls the "on cancel" node if a non-interactive selection fails
- Affect deadness node now allows: setting/clearing the "fled outdoor combat" flag; setting/clearing the "absent" flag used for splitting the party; (un)deleting a PC
- If context node can now check if the party is in a specific boat/horse as opposed to any boat/horse
2015-01-16 22:57:39 -05:00
e5f44de4fe Move a lot of item-related functions into the player and party classes
- Rearrange alchemy code a little to fix a possible situation with two-ingredient potions where you only have one of the first ingredient - instead of removing the second ingredient, it would have removed the next item in your inventory
- Equippable item abilities that have an ability strength now stack if you have multiple items with the same ability equipped
2015-01-16 16:40:54 -05:00
84689cacaf Strictify damage type enum 2015-01-13 00:12:47 -05:00
908652d168 Housekeeping
- Rename cItemRec -> cItem and cItemRec::type -> cItem::weap_type
- Clear out a lot of commented code
- Remove the flag_x members in the scenario that used to store the scenario's password hash (or something like that)
2015-01-12 01:01:24 -05:00
9f57f35428 Change .h -> .hpp in tools/ directory 2015-01-09 22:32:47 -05:00
af0ee110c6 Rename osx directory to src since it's now the official source base 2014-12-28 12:12:38 -05:00