I'm currently reviewing the change with the "wonder" effect. I'll post here the errors I find on the way.
- effect "confuse_monster": the player level was passed as parameter for confusion power, now it's omitted so I suppose it uses the "wonder" dice instead
- effect "*destruction*": was using "destroy_area" (destruction), now it's "EARTHQUAKE"
- rarest effect has a "slow" part and a "sleep" part: before, power for "slow" was 20 and power for "sleep" was player level; now it's zero (or omitted)
Implementing the restructure changes
Collapse
X
-
This sounds sensible, and I probably could have already tidied up the activation/effect business a bit more. I have taken the position of messing with the power calculations as little as possible, largely because I keep wanting to change stuff in itThe "potential" bug is adding the base power from objects, while the "effect" power should only consider the activation. The reason why the bug is only "potential" is because object_power() is only used for wearable items (if it was used for all objects, you would use a power of 20000 for stat potions for example, leading to prices of millions of gold for them...); for other items, the base price is used.
A good way to fix this and simplify a lot of the code is to add an activation to activatable items (rings, rods, DSMs) instead of a list of effects:
- add an "act" line for objects that have a "time" line in object.txt and remove the "effect" line + other dependent lines (same way as in artifact.txt)
- parse the line
- affect base activation to object when created
- only use activation power in object_power() if the object has an activation
This way you can remove object base power in object.txt and in the object structure.
I added the capability for egos to have effects because I'm assuming we're going to want some. None yet is just because nothing has changed yet.Side note: ego items got a list of effects at the moment. It's unused and I don't see how it could be (unless ego potions and such are added). In my variant, I have added a Cloak of Lordly Resistance (from MAngband) that can be activated for resistance, so I replaced that list by an activation and applied the changes above. It could be a good idea to do the same in V.
As for the dragon armour, I have just left it as in 3.5.1. Exact numbers are something I'm planning to revisit too.Leave a comment:
-
While implementing the new atomic effects, I've found a potential bug and some redundancy:
- objects have a list of effects and a base power
- activations have a list of effects and a base power
- artifacts have an activation
- object power adds "effect" power, which is the activation power if the object has an activation, otherwise the base power
The "potential" bug is adding the base power from objects, while the "effect" power should only consider the activation. The reason why the bug is only "potential" is because object_power() is only used for wearable items (if it was used for all objects, you would use a power of 20000 for stat potions for example, leading to prices of millions of gold for them...); for other items, the base price is used.
A good way to fix this and simplify a lot of the code is to add an activation to activatable items (rings, rods, DSMs) instead of a list of effects:
- add an "act" line for objects that have a "time" line in object.txt and remove the "effect" line + other dependent lines (same way as in artifact.txt)
- parse the line
- affect base activation to object when created
- only use activation power in object_power() if the object has an activation
This way you can remove object base power in object.txt and in the object structure.
Side note: ego items got a list of effects at the moment. It's unused and I don't see how it could be (unless ego potions and such are added). In my variant, I have added a Cloak of Lordly Resistance (from MAngband) that can be activated for resistance, so I replaced that list by an activation and applied the changes above. It could be a good idea to do the same in V.Leave a comment:
-
Black and white DSM lost along the way their capability of breathing acid/cold and regained it after a while, losing their actual object power and dice value.
Currently:
- black DSM: power 11, dice 120
- white DSM: power 10, dice 100
Original values (well in fact the values from my variant, since the original values for DSMs were lower and they were all buffed in recent versions except for these two due to the fact that they were changed to balls instead of breaths):
- black DSM: power 19, dice 150
- white DSM: power 18, dice 150
This bug is present since commit 4360edf (ages ago).Leave a comment:
-
There are a few problems with effect descriptions.
- using "a" in all cases ("it fires a acid bolt")
- random effects give funny descriptions ("it at random, fires a fire bolt, fires a frost bolt...")
- wands and rods say "when activated" instead of "when aimed" (IIRC the boolean value is not set in obj_known_effect)Leave a comment:
-
When porting activations to a text file, most artifact activation messages were tied to the corresponding activation. In the case an activation was used by more than one artifact, an alternate message was added in artifact.txt for that artifact. Unfortunately, the alt_msg parameter of the artifact structure is never used in the code, so all artifacts get the base activation message. For example, Narya should say "Narya glows deep red..." (alternate message), but instead it says "The Ring of Fire lets out a shrill wail..." (base PROTEVIL message).Leave a comment:
-
Artifact activation messages are used for randarts. Unfortunately, randarts also have their names randomized, which breaks the activation format. Basically, an artifact "The something of Foo" should have an activation message like "The {kind} does something..." and an artifact "The something 'Foo'" should have an activation message like "{name} does something...". Otherwise, you get funny messages like "Of Arath glows deep blue...".Leave a comment:
-
I think this is mostly right (eg it's sleep, confuse and turn undead that check vs aware), and I need to go and check all these guys individually.More atomic effects problems: "PROJECT_LOS" is used to map multiple effects that had different parameters which were lost in the process.
- the "dispel" effects: damage boost + check vs aware
- haste monsters: no damage boost + no check vs aware
- confuse/slow/sleep monsters: no damage boost + check vs aware
- the "dispel all" effect (staff of Power): damage boost + no check vs aware
The fix should probably to add a "PROJECT_LOS_AWARE" effect and keep the p2 parameter for damage boost.Leave a comment:
-
More atomic effects problems: "PROJECT_LOS" is used to map multiple effects that had different parameters which were lost in the process.
- the "dispel" effects: damage boost + check vs aware
- haste monsters: no damage boost + no check vs aware
- confuse/slow/sleep monsters: no damage boost + check vs aware
- the "dispel all" effect (staff of Power): damage boost + no check vs aware
The fix should probably to add a "PROJECT_LOS_AWARE" effect and keep the p2 parameter for damage boost.Leave a comment:
-
-
This is correct, with the added feature that if adding 100,000 XP still doesn't fully restore player XP, then player max XP is increased by 10,000.If I recall correctly, !Experience have not restored lost experience for several past versions now. The change was that they used to be limited when @ experience was fairly early in the game, but in 3.5 they delivered the full 100,000 exp. points regardless of @ level. If @ had lost some experience, the points were applied to the loss first and any remaining increased experience.Leave a comment:
-
If I recall correctly, !Experience have not restored lost experience for several past versions now. The change was that they used to be limited when @ experience was fairly early in the game, but in 3.5 they delivered the full 100,000 exp. points regardless of @ level. If @ had lost some experience, the points were applied to the loss first and any remaining increased experience.Leave a comment:
-
I think the correct way to solve all this is to allow DARK_WEAK to damage the player, and have a handler for it in project-player.c. That way the blindness effect can just be put in the handler, as can the check against RES_DARK.From 8cecbfb: the "DARKNESS" effect has been split in two, "DARKEN_AREA" and "TIMED_INC:BLIND". The problem with incrementing the "BLIND" counter is that it only checks vs the innate protection, that is PROT_BLIND. The old darkness effect was also checking vs RES_DARK. This makes half-orcs, which are innately resistant to darkness, suffer from blindness when reading a scroll of darkness, which is silly...
No idea where to put the check though. As an extra parameter to the TIMED_INC effect probably.
Old code:
Need to pass ELEM_DARK somewhere and check vs resistance + notice the element.Code:if (!player_resists(context->player, ELEM_DARK)) { int amount = effect_calculate_value(context, FALSE); player_inc_timed(context->player, TMD_BLIND, amount, TRUE, TRUE); } wieldeds_notice_element(context->player, ELEM_DARK);
Another little change: the DARKNESS effect was a radius-3 ball doing 10 damage, so the DARKEN_AREA effect should have p2=3 and a dice:10 line.Leave a comment:
-
Potions of salt water were paralyzing the character independently of having FA. The INC_TIMED effect now always checks for corresponding protection (PARALYZE/FA), so the paralyzing effect is now gone if you have FA.Leave a comment:
-
In the same vein, potions of experience were restoring lost exp before increasing it. Now they just do GAIN_EXP.Leave a comment:
Leave a comment: