devSin Posted February 25, 2006 Share Posted February 25, 2006 It looks like the THAC0 and AC penalties from the Slow spell (all 5 variants) may be cumulative. Probably a bad thing... Link to comment
CamDawg Posted February 25, 2006 Share Posted February 25, 2006 If you're hasted and hit by a slow spell, does it simply negate the haste or are you slowed as well? Link to comment
devSin Posted February 25, 2006 Author Share Posted February 25, 2006 I guess I'd say you get slowed. It removes the haste icon, but I don't think the engine handles the negation. The THAC0 and AC penalties have to get applied, though, no? Haste doesn't give any bonuses that I know of. Link to comment
CamDawg Posted February 25, 2006 Share Posted February 25, 2006 That's what I was trying to figure out while being too lazy to test. If slow only reduces hasted characters to normal, then I hink we'd need to account for that. But if it changes a hasted character straight to a slowed character, it simplified the issue a great deal. I think we move the AC/THAC0 penalties out to EFFs, apply them, and then add immunity to the EFFs right after they're applied to handle their stacking. Link to comment
devSin Posted February 25, 2006 Author Share Posted February 25, 2006 You can't double slow a character, so why not just protection from spell slow? If you only add the specific variant, then multiple slows of different types will be cumulative, just not with themselves. We don't do EFFs for Doom and the other debuffs, so why the slow special treatment? Link to comment
CamDawg Posted February 25, 2006 Share Posted February 25, 2006 You're right, I'm making this overly complicated. // slow shouldn't stack COPY_EXISTING ~spin977.spl~ ~override~ // slow (golem) ~spin983.spl~ ~override~ // slow (innate) ~spwi312.spl~ ~override~ // slow (mage) ~spwish25.spl~ ~override~ // slow (wish) ~spwm164.spl~ ~override~ // slow (wild surge) PATCH_IF (SOURCE_SIZE > 0x71) THEN BEGIN // protects against invalid files READ_LONG 0x64 "abil_off" READ_SHORT 0x68 "abil_num" READ_LONG 0x6a "fx_off" SET "delta" = 0 FOR (index = 0; index < abil_num; index = index + 1) BEGIN READ_SHORT ("%abil_off%" + 0x1e + (0x28 * "%index%")) "abil_fx_num" READ_SHORT ("%abil_off%" + 0x20 + (0x28 * "%index%")) "abil_fx_idx" SET "abil_fx_idx" = ("%abil_fx_idx%" + "%delta%") WRITE_SHORT ("%abil_off%" + 0x20 + (0x28 * "%index%")) "%abil_fx_idx%" FOR (index2 = 0; index2 < abil_fx_num; index2 = index2 + 1) BEGIN READ_SHORT ("%fx_off%" + (0x30 * ("%index2%" + "%abil_fx_idx%"))) "opcode" PATCH_IF ("%opcode%" = 40) BEGIN // if slow opcode READ_ASCII ("%fx_off%" + (0x30 * ("%index2%" + "%abil_fx_idx%"))) "clone_fx" (0x30) // read entire effect SET "index2" = "%abil_fx_num%" // kills loop END END FOR (index3 = 0; index3 < 5; index3 = index3 + 1) BEGIN INSERT_BYTES ("%fx_off%" + (0x30 * ("%abil_fx_num%" + "%abil_fx_idx%"))) 0x30 // create new effect WRITE_EVALUATED_ASCII ("%fx_off%" + (0x30 * ("%abil_fx_num%" + "%abil_fx_idx%"))) ~%clone_fx%~ // clones slow effect WRITE_SHORT ("%fx_off%" + (0x30 * ("%abil_fx_num%" + "%abil_fx_idx%"))) 206 // spell immunity SAY ("%fx_off%" + 0x04 + (0x30 * ("%abil_fx_num%" + "%abil_fx_idx%"))) #-1 // string to display END WRITE_EVALUATED_ASCII ("%fx_off%" + 0x14 + (0x30 * ("%abil_fx_num%" + "%abil_fx_idx%" + 4))) ~%SOURCE_RES%~ #8 // resref WRITE_ASCII ("%fx_off%" + 0x14 + (0x30 * ("%abil_fx_num%" + "%abil_fx_idx%" + 3))) ~spin983~ #8 // resref WRITE_ASCII ("%fx_off%" + 0x14 + (0x30 * ("%abil_fx_num%" + "%abil_fx_idx%" + 2))) ~spwi312~ #8 // resref WRITE_ASCII ("%fx_off%" + 0x14 + (0x30 * ("%abil_fx_num%" + "%abil_fx_idx%" + 1))) ~spwish25~ #8 // resref WRITE_ASCII ("%fx_off%" + 0x14 + (0x30 * ("%abil_fx_num%" + "%abil_fx_idx%" + 0))) ~spin977~ #8 // resref PATCH_IF ("%SOURCE_RES%" STRING_COMPARE_CASE "spin983" = 0) BEGIN WRITE_ASCII ("%fx_off%" + 0x14 + (0x30 * ("%abil_fx_num%" + "%abil_fx_idx%" + 3))) ~spwm164~ #8 // resref END ELSE PATCH_IF ("%SOURCE_RES%" STRING_COMPARE_CASE "spwi312" = 0) BEGIN WRITE_ASCII ("%fx_off%" + 0x14 + (0x30 * ("%abil_fx_num%" + "%abil_fx_idx%" + 2))) ~spwm164~ #8 // resref END ELSE PATCH_IF ("%SOURCE_RES%" STRING_COMPARE_CASE "spwish25" = 0) BEGIN WRITE_ASCII ("%fx_off%" + 0x14 + (0x30 * ("%abil_fx_num%" + "%abil_fx_idx%" + 1))) ~spwm164~ #8 // resref END ELSE PATCH_IF ("%SOURCE_RES%" STRING_COMPARE_CASE "spin977" = 0) BEGIN WRITE_ASCII ("%fx_off%" + 0x14 + (0x30 * ("%abil_fx_num%" + "%abil_fx_idx%" + 0))) ~spwm164~ #8 // resref END SET "delta" = "%delta%" + 5 WRITE_SHORT ("%abil_off%" + 0x1e + (0x28 * "%index%")) ("%abil_fx_num%" + 5) END END BUT_ONLY_IF_IT_CHANGES Link to comment
devSin Posted April 17, 2006 Author Share Posted April 17, 2006 I don't think this will affect the patch, but since you asked: The haste and slow effects are mutually exclusive. If you apply the haste effect to creature (either normal or improved), and then apply the slow effect to it, the haste is negated (the creature is neither hasted or slowed). This negation occurs until one of the effects expires, at which time the other continues to function for its duration. The icon handling is automatic, but not quite finished. The haste icon is automatically given when the normal haste effect is applied, the improved haste icon for improved haste, and slow for slow. When the spells accumulate, the engine will decide which icon is right (one haste and one slow = no icon), but the improved haste icon isn't handled correctly (the slow icon won't display on an improved hasted creature, but the improved haste icon isn't removed; the creature moves at normal speed until one of the effects expires, but the haste icon still displays). Apparently, haste and slow work best when given no icon (let the engine handle it, otherwise you'll get haste and slow icons simultaneously with no actual haste/slow effects). I still think the patch here is worthwhile, since we're protecting against the cumulative AC bonus and THAC0 bonus, and only the actual opcodes are handled (even if you cast slow and it cancels the haste, any separate display icon, character color, expiry sound, etc., will still run normally). It's possible we may not want to have every slow spell protect against every other one; currently, I only grant protection from the particular spell cast (i.e., only make them not cumulative with themselves), but I don't know why I think that it's the right solution. Link to comment
Andyr Posted April 17, 2006 Share Posted April 17, 2006 The haste and slow effects are mutually exclusive. If you apply the haste effect to creature (either normal or improved), and then apply the slow effect to it, the haste is negated (the creature is neither hasted or slowed). This negation occurs until one of the effects expires, at which time the other continues to function for its duration. That's how it should work in pnp. Thought I should point that out, as I am not sure what's left to cover in this thread. Link to comment
Recommended Posts
Archived
This topic is now archived and is closed to further replies.