Commit Graph

889 Commits

Author SHA1 Message Date
ee27e5341d Implement writing terrain definitions to XML 2015-01-22 11:23:44 -05:00
faac33f664 Whoops, this wasn't supposed to be committed 2015-01-22 11:18:13 -05:00
df4dc3bf21 Extract saving of main scenario data into a subroutine 2015-01-22 10:28:38 -05:00
6a08476d22 Create dialog for editing large terrain object definitions
- Remove keybindings from terrain dialog arrow buttons
- Fix arrow buttons not bound-checking fields

Dialog engine:
- Fix fields crashing after text is set while it has focus
- Trigger focus handler on untoast() to balance that in toast()
2015-01-22 10:22:59 -05:00
5315655bc6 Fix up some minor issues with the special node editing dialog
- Also: merge "nuke monsters" and "destroy monster" nodes, since the action of the "destroy monster" node isn't what it sounds like; now it simply destroys a single monster on a specific space
2015-01-21 22:36:00 -05:00
e689ed93ef Update the in-game item info dialog and restore support for long item descriptions 2015-01-21 21:26:23 -05:00
41fbd73ef9 Get the scenario, town, and outdoor details dialogs updated for new stuff
- Advanced town details now offers edit buttons to edit the specials immediately

Changes to dialog engine:
- Fix tiny buttons stretching to fill label area
- Fix LEDs stretching if label area is higher than LED button
- Fix LEDs ignoring font setting
2015-01-21 15:59:09 -05:00
2a2e7068d0 Exploding weapon ability now properly sets the spell pattern for targeting
- Also fix good constitution trait having no effect on disease
2015-01-21 14:07:59 -05:00
311a3c0702 Get the item abilities dialog working and updated for new stuff
- Add additional treasure type for "unique" items
- Main item dialog now shows the item ability's display name, and also has more space for the item's full name
- (Game) No-ammo missiles (eg slings) are now counted as weapons by shops
- (Dialog Engine) Fix LED groups being drawn when invisible
2015-01-21 14:04:40 -05:00
fb607f83c1 Create enum for stat screen mode 2015-01-21 13:53:29 -05:00
53677398de A few more item abilities
- Weapon ability that drains spell points (works at both melee and range)
- Armor abilities that boost groups of stats - one for all combat stats, one for all magic stats
- Item ability that occasionally increases light level when it's dark (works even in towns with no light)
- Renumber the usable abilities to fill in gaps
- Usable light ability can now decrease light as well as increase
2015-01-20 23:59:15 -05:00
74ed88f2f3 Several new item abilities and one new monster ability
- Range augment ability for missiles
- Seeking ability for missiles (can strike an adjacent space if targeted space lacks a target, including chance of hitting invisible monsters)
- Weapon that calls node when attacking with it (works both in range and melee; the cases can be distinguished by the node with IF_CONTEXT)
- Armour that calls node when attacked while wearing (works both in range and melee; the cases can be distinguished by the node with IF_CONTEXT)
- Monster ability that calls node when monster attacked (works both in range and melee; the cases can be distinguished by the node with IF_CONTEXT)
- The above three only apply to non-magical attacks - some things don't trigger it, like spells, monster rays and breath weapons, possible a few others
- Armour that protects from all melee damage (including demon/undead, though less)
- Armour that decreases chance to be hit (both in range and melee, against non-magical attacks only)
- Armour that behaves like to the martyr's shield effect but also has a chance of adding some extra bonus damage
- Armour that's more encumbering than advertised (best for cursed items with concealed ability)
- Multiple items with the accuracy ability now stack
- Fix nephilim not getting their racial bonus to missile weapons
- In specials called as part of an attack, the reserved pointer -20 contains the target in a form ready to pass to a SELECT_TARGET node, while -21 and -22 contain the location of the target. This includes the new cases added in this commit plus the monster ability to call a special node on its turn. It does not include specials called in the spell targeting context (to do so would break legacy scenarios), nor specials called after a targeting node.
- If a PC is carrying more than their max weight, they gain encumbrance equal to one-tenth of the excess.
- Add some missing context cases to IF_CONTEXT node
2015-01-20 21:40:48 -05:00
7837459177 New item variety: Special
- When picked up or purchased, the party gains a special item
2015-01-20 17:45:15 -05:00
decdc3111b Don't account for strength bonus from items when adding HP at level-up 2015-01-20 17:18:48 -05:00
24f2bf455d Merge missile and melee weapon abilities
- Missiles now support arbitrary status effects (not just acid)
- Melee weapons now support the exploding ability (though such a weapon wouldn't be that great for the wielder)
- Melee weapons now support the heal target ability
- Lightning missile ability merged into damaging weapon abilit
- Missile slayer ability merged into slayer weapon ability; existing slayer weapons are slightly weakened (-1 damage for demons, -2 damage for undead)
- Exploding weapon ability now supports arbitrary damage types (not just fire)
- Missile weapons now support the weak weapon ability
- Missile weapons now support the soulsucker ability
- When firing a missile at a PC, all secondary effects now take place
- Fix thrown weapons, which were broken by the key weapon skill generalization
2015-01-20 17:18:47 -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
54a8ae8213 Merge more item abilities
- Bliss and doom merged into single ability (distinguished by item use type)
- The three party status abilities merged into one
- Major healing now has a negative version
- Summoning and mass summoning now use first ability data to determine duration; second ability data determines monster
- Added generic use message for spell abilities that didn't already have a specialized message
- Mass summoning no longer redundantly recalculates random number of summons after each summon
2015-01-20 17:18:44 -05:00
09b1dc35ab Fix alchemy being completely broken (in that brewed potions wouldn't work) 2015-01-20 17:18:43 -05:00
2c8ef727ae I don't understand how this issue even existed, but apparently it did 2015-01-20 17:18:42 -05:00
bbe8e766ca Update the edit item dialog for new things (missiles, arbitrary key weapon skills)
- Also, missile weapons now use the key skill as well
- Fix guessing of missile types - using the item level didn't work out since the levels weren't what the original code expected, so now it just goes by the name
2015-01-20 17:18:42 -05:00
5450ae1caf Implement editing dialogs for individual monster abilities
Changes to game:
- Permanent martyr's shield is now customizable - extra1 is per-mille chance to activate each time damage is taken, and extra2 is percent of damage taken to apply to attacker
- Absort spells is now customizable - extra1 is per-mille chance to activate each time damage is taken or a magic effect is applied, and extra2 is how much hp to gain from non-damaging magic effects
- Splits ability is now customizable - extra1 is per-mille chance of splitting each time damage is taken
- Special node ability is now called before the monster tries its normal attack, and multiple monsters can use them per round (though each can only use theirs once)
- Fix issue with breath weapons and icy touch abilities conflicting (legacy import issue)
- Add two variations of the summoning ability - summon according to summoning level (like the spells), or summon a random creature of a particular species
- Fix touch abilities using the range as chance to use

Changes to dialog engine:
- Fix tab order handling to exclude fields that are currently hidden
- Add method to retrieve the parameter passed to toast(), as a quick way to distinguish between the user clicking OK or Cancel after run() has exited
- Fix hidden fields being drawn anyway
- Fix setting stack page sometimes crashing if the current page was invalid due to earlier reducing the page count to 0
2015-01-20 17:18:41 -05:00
d614286fec Fix edit event special node using the button as the node number 2015-01-20 17:18:40 -05:00
20db55d1b2 Some fixes/tweaks to monster ability imports and names 2015-01-20 17:18:39 -05:00
7084991e55 Get the edit monster abilities dialog all working and updated (except for editing individual abilities)
Game changes:
- Remove support for playing a sound and displaying strings when a monster is first seen, since these behaviours can easily be obtained by using the special node called in the same context.
Dialog engine changes:
- Support for changing the font size of LEDs
- When setting the page, a stack now applies a default value if the map is missing the required data
- Add utility "addPage" method to stacks
- If reducing the page count means the current page is deleted, a stack now switches to the last page
2015-01-20 17:18:39 -05:00
1441f6bfe9 Fix misalignment of statue attack graphic 2015-01-20 17:18:38 -05:00
5f58b15d8f Fix poison monster ability from legacy scenarios activating on all attacks instead of just the first, for monsters with multiple attacks 2015-01-20 17:18:37 -05:00
967438ecec Add dialog to the scenario editor to let it know what type of graphics are in the custom sheets
- If you do this, it adds the graphics to all relevant select graphic dialogs, at the end, allowing you to choose custom graphics without having to remember the number schemes
2015-01-20 17:18:37 -05:00
181227f79d Fix issues with automap display 2015-01-17 20:06:43 -05:00
3852ca37cd Make monster resistances a percentage and update monster info dialog
- Fix monster roster menu not working
2015-01-17 18:56:15 -05:00
cdeb02c214 Get the edit monster dialog completely working and updated for new stuff
(Just the main dialog, not the abilities dialog)
2015-01-17 16:56:37 -05:00
3d7fcbd60e New special node to initiate conversation (should even work outdoors) 2015-01-17 15:00:22 -05:00
4e2c0100e8 Strictify and use talk node type enum 2015-01-17 02:41:25 -05:00
544cc80e56 Add special nodes that hook into the spell targeting system
- Node to initiate targeting mode and call a special once targets are chosen
- Nodes to place a spell pattern (one for fields and one for booms)
2015-01-17 02:09:50 -05:00
4ae1bf1d24 Make room to add more town specials by shifting the rectangle specials up 2015-01-17 01:48:41 -05:00
bd3df18fb1 Various stuff
- Export of monster missiles and summons
- Rendering support for custom PC graphics
- Fix display of stats on startup screen
- Fix implementation of animate attack node
2015-01-17 00:07:43 -05:00
e2093b5997 Update special node opcodes 2015-01-16 23:14:30 -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
d729bcc86b Merge all the status effect special nodes
- It's now possible to affect weapon poison, martyr's shield, acid, and life detection from a special node
- Affect nodes now always take resistances into account when harming, but never when helping
2015-01-16 10:33:57 -05:00
39723d1a94 Fix character editor build
(Was broken with the party splitting changes)
2015-01-16 03:40:20 -05:00
4ae8f7661e Fix scenario editor build
(Was broken with the monster abilities rewrite)
2015-01-16 03:36:20 -05:00
efad33bddf Fix avatar spell doing nothing when cast outside of combat mode 2015-01-16 03:23:16 -05:00
31b63b1ab7 Change party status effect display to use small icons instead of text
Also:
- Redo PC status effect drawing to use a loop
- Add status icon for hyperactivity effect
- Fix display of monster name/AP on the text bar
2015-01-16 03:22:50 -05:00
71ce8946a0 Changes to split party implementation
- Supports playing arbitrary sound along with the split (rather than just teleport sound or no sound)
- Correctly imported from older save files
- Support for splitting off an arbitrary subgroup of the party rather than just a single PC (though the special node doesn't yet allow this)
- Support for leaving town while split - if you leave town, the absent PC's items are not dropped on the ground when later entering a town
- Option to not change location when reuniting
- If you reunite in a different town than you started, you are returned to the town you split from
2015-01-16 01:51:59 -05:00
5d9fd3cb5d Introduce enum to represent the whole-party statuses, and stop storing them in the stuff-done array.
- Also fix display of text on the text bar
2015-01-16 01:01:06 -05:00
9433060890 Changes to select/affect special nodes
- Select PC node can now select a specific monster, rather than a PC; it's renamed to Select Target
- Damage node no longer allows setting pic to 1 to damage active PC in combat
- Damage node now accepts a sound to accompany the damage
- Damage node now works on monsters
- All affect nodes that can work on monsters no longer get the monster to affect from ex2a - instead, they use the currently selected target

The default target selected when a special node chain begins execution has changed.
- When called in certain contexts (kill/see monster, monster special ability), the monster that triggered the node is the default target.
- In the use/target space contexts, if there's a monster on the space, it's selected as the default target.
- If neither of the above hold and the game is in combat mode, the currently active PC is selected
- Otherwise the previous behavour is used - if the party is split, select the sole PC, otherwise select the whole party.
2015-01-16 00:14:41 -05:00
aaa3cde16b Lots of special node changes
- Moved change/swap/transform terrain to the General section
- Merge change outdoor terrain into general change terrain
- Merge if town/outdoor terrain nodes
- Merge the if+take nodes with the equivalent base nodes
- Merge secret passage node into the can't enter node
- Move outdoor shop to the General section since it's not restricted to outdoors
- New story dialog node displays a sequence of strings one at a time, like the Exile 2 intro dialog
- New town nodes for animations: run missile, animate monster attack, draw simple boom with optional damage number
- If fields node expanded - now checks if the count of the desired field type existing within a specified rectangle falls within a given range
- Place items and move items nodes can now set the items as contained, provided there's a container on the destination space
- All rectangle nodes can now be restricted to just the boundary, as per the documentation
2015-01-16 00:06:12 -05:00
96f14d3a38 Several more little tweaks/fixes
- Fix PCs sometimes taking damage when they shouldn't due to the marked damage field not being initialized
- Fix targeting not hitting the correct space when the screen is shifted
- Fix target space special node node being called in combat
- Move monster marked damage into cCreature
2015-01-15 20:05:54 -05:00
0b9593f3d1 Tweak monster ability system to reduce mechanical changes relative to original BoE 2015-01-15 16:13:48 -05:00