Jump to content

Cloak of Mirroring and Cloak of Reflection issues


Recommended Posts

1. They do not seem to "reflect" damage at all. None of the enemies who cast damage spells on my character were harmed.

 

2. The cloak of reflection does not add an electrical resistance symbol although it sets electrical resistance to 100. The cloak of mirroring should add some kind of symbol, you would think.

 

3. This is linked to 2, they both add really ugly graphics to your character. It would be nice if instead of the big white ball and the lake we could just have a symbol show up on the character portrait.

 

4. The cloak of mirroring does not protect against cloudkill or death fog. I don't know if it should or not, but it protects against other area affect spells like fireball and skull trap.

Link to comment
1. They do not seem to "reflect" damage at all. None of the enemies who cast damage spells on my character were harmed.

 

2. The cloak of reflection does not add an electrical resistance symbol although it sets electrical resistance to 100. The cloak of mirroring should add some kind of symbol, you would think.

 

3. This is linked to 2, they both add really ugly graphics to your character. It would be nice if instead of the big white ball and the lake we could just have a symbol show up on the character portrait.

 

4. The cloak of mirroring does not protect against cloudkill or death fog. I don't know if it should or not, but it protects against other area affect spells like fireball and skull trap.

Not a bug (at least, for the Cloak of Mirroring if you have ToB installed), meh, not a bug, and it makes perfect sense to me that something which protects against direct damage isn't very helpful when the air around you becomes unsafe to breathe.

Link to comment

#3 is not a bug. For the rest I did some testing, using both the SoA and ToB Cloaks of Mirroring. The SoA cloak reflects damage back to the caster, whereas the ToB one simply makes the wearer immune to it. The Cloak of Reflection is the same in both.

 

Cloaks of Mirroring protected against all damage I could throw at it, including area of effect spells except a handful (more below). The SoA version properly reflected all damage, including area of effect spells.

 

Cloud kill and death fog are not affected because they're of a secondary type battleground (9), whereas the other AoE spells are offensive (10). Two other spells of interest are incendiary cloud and earthquake. also of secondary type battleground (9). We could change their secondary types or add protection against battleground but this would introduce much larger inconsistencies than the current setup. I did add immunities to cloud kill, incendiary cloud and death fog--they won't reflect the damage in SoA, but it is an improvement. Earthquake was ommitted because I felt that immunity to the non-damage effects in EQ is a larger bug than missing protection from its damage.

 

Cloak of Reflection was a bit spotty; unfortunately the fixes are as well (see below). It reflected lightning bolts, but druid call lightning was not reflected (though it did no damage). Looking at the item, it appears only lightning bolt projectiles are reflected. Protection against the following projectiles is added:

  • Hardcoded (82) - used by Call Lightning sppr302
  • Hardcoded (85) - TRAP_CALL_LIGHTNING sppr987 and MEPHIT_FLAME_FAN spin938 which, despite its name, does electrical damage
  • Hardcoded (206) - TRAP_LIGHTNING_BOLT spwi017
  • Hardcoded (207) - used by mephit lightning attacks, spin932 and spin933
  • lightcha.pro (213) - chain lightning projectile, used by jwchnlgt (cutscene stuff), spblun29 (lightning cast by Storm Star +5), spdr601 (Avenger's Chain Lightning), spin597 (blue dragin breath), spwi0025 (TRAP_LIGHTNING_ORB1), spwi0026 (TRAP_LIGHTNING_ORB2), spwi0027 (TRAP_LIGHTNING_ORB3), and spwi615 (mage chain lightning)
  • Hardcoded (220) - used by the Clestial Fury's lightning attack, spin714

Though these have been added, I tested with Call Lightning and Chain Lightning and neither were reflected. I suspect that this may be a hardcoded engine limitation. :) In addition to the above, one more projectile should be deflected: the beholder lightning bolt. However, it uses the same projectile as just about every other beholder spell. Adding protection would essentially turn the Cloak of Reflection into another Shield of Balduran. I duped the projectile, assigned it just to the beholder lightning bolt, and added protection from it. Shield of Balduran is also updated to reflect this new projectile. Finally, the protection from electricity icon is added to the cloak of reflection.

 

The code to do all this razzmatazz:

 

/// clone beholder ray and assign it to beholder lightning bolt spells
// this allows it to be reflected by cloak of reflection without also reflecting all beholder projectiles
COPY_EXISTING ~spbehbla.pro~ ~override/cdbehbla.pro~
ADD_PROJECTILE ~override/cdbehbla.pro~

// change old lightning spbehbla.pro spells to new cdbehbla.pro projectile
COPY_EXISTING ~spin579.spl~ ~override~ // power_amp
             ~spin989.spl~ ~override~ // beholder_lightning_bolt
 READ_LONG  0x64 "abil_off"
 READ_SHORT 0x68 "abil_num"
 FOR (index = 0; index < abil_num; index = index + 1) BEGIN
   WRITE_SHORT ("%abil_off%" + 0x26 + (0x28 * "%index%")) "%cdbehbla%"
 END
 BUT_ONLY_IF_IT_CHANGES

// add protection to all lightning projectiles for cloak of reflection
COPY_EXISTING ~clck24.itm~ ~override~
 READ_LONG   0x64 "abil_off"
 READ_SHORT  0x68 "abil_num"
 READ_LONG   0x6a "fx_off"
 READ_SHORT  0x70 "fx_num"
 SET "new_fx" = 0
 FOR (index = 0; index < fx_num; index = index + 1) BEGIN
   READ_SHORT ("%fx_off%" + ("%index%" * 0x30)) "type"
   PATCH_IF ("%type%" = 197) BEGIN // looks for physical mirror
     READ_ASCII ("%fx_off%" + ("%index%" * 0x30)) "clone" (0x30) // clones effect
     SET "index" = "%fx_num%" // kills loop
     SET "new_fx" = 8 // enables next loop
   END
 END
 PATCH_IF ("%new_fx%" > 0) BEGIN
   WRITE_SHORT  0x70 ("%fx_num%" + "%new_fx%")
   FOR (index2 = 0; index2 < new_fx; index2 = index2 + 1) BEGIN // adding new effects
     INSERT_BYTES            ("%fx_off%") 0x30
       WRITE_EVALUATED_ASCII ("%fx_off%") "%clone%" #48
   END
   // first new effect is transformed into protection from electricity icon
   WRITE_SHORT ("%fx_off%"       ) 142 // opcode: display portrait icon
   WRITE_SHORT ("%fx_off%" + 0x08) 27  // icon: protection from electricity
   // all other effects remain phsical mirror; adding projectile references below
   WRITE_LONG ("%fx_off%" + 0x08 + (1 * 0x30)) 81
   WRITE_LONG ("%fx_off%" + 0x08 + (2 * 0x30)) 84
   WRITE_LONG ("%fx_off%" + 0x08 + (3 * 0x30)) 205
   WRITE_LONG ("%fx_off%" + 0x08 + (4 * 0x30)) 206
   WRITE_LONG ("%fx_off%" + 0x08 + (5 * 0x30)) 212
   WRITE_LONG ("%fx_off%" + 0x08 + (6 * 0x30)) 219
   WRITE_LONG ("%fx_off%" + 0x08 + (7 * 0x30)) "%cdbehbla%"
   FOR (index3 = 0; index3 < abil_num; index3 = index3 + 1) BEGIN
     READ_SHORT  ("%abil_off%" + 0x20 + ("%index3%" * 0x28)) "abil_fx_idx"
     WRITE_SHORT ("%abil_off%" + 0x20 + ("%index3%" * 0x28)) ("%abil_fx_idx%" + "%new_fx%")
   END
 END
 BUT_ONLY_IF_IT_CHANGES
 
// cloak of mirroring should protect against cloud kill and death fog; ToB version lacks icon
COPY_EXISTING ~clck26.itm~ ~override~
 READ_LONG   0x64 "abil_off"
 READ_SHORT  0x68 "abil_num"
 READ_LONG   0x6a "fx_off"
 READ_SHORT  0x70 "fx_num"
 SET "new_fx" = 4
 FOR (index2 = 0; index2 < fx_num; index2 = index2 + 1) BEGIN
   READ_SHORT ("%fx_off%" + ("%index2%" * 0x30)) "type"
   PATCH_IF ("%type%" = 203) BEGIN // has icon from damage turning effect
     SET "new_fx" = ("%new_fx%" - 1)
     SET "index2" = "%fx_num%" // kills loop
   END
 END
 FOR (index = 0; index < new_fx; index = index + 1) BEGIN
   INSERT_BYTES  ("%fx_off%"       ) 0x30
     WRITE_SHORT ("%fx_off%"       ) 206   // immunity to spell
     WRITE_BYTE  ("%fx_off%" + 0x02) 1     // target:self
     WRITE_BYTE  ("%fx_off%" + 0x0c) 2     // instant/while equipped
     WRITE_BYTE  ("%fx_off%" + 0x0d) 2     // not dispel/not bypass
     WRITE_BYTE  ("%fx_off%" + 0x12) 100   // probability
 END
 WRITE_ASCII ("%fx_off%" + 0x14) ~spwi502~ #8 // cloud kill
 WRITE_ASCII ("%fx_off%" + 0x44) ~spwi614~ #8 // death fog
 WRITE_ASCII ("%fx_off%" + 0x74) ~spwi810~ #8 // incendiary cloud
 PATCH_IF ("%new_fx%" = 4) BEGIN // if no icon displayed
   WRITE_SHORT ("%fx_off%" + 0x90) 142 // display portrait icon
   WRITE_LONG  ("%fx_off%" + 0x98) 28  // protection from magic
 END
 FOR (index3 = 0; index3 < abil_num; index3 = index3 + 1) BEGIN // adjusting ability effect indices
   READ_SHORT  ("%abil_off%" + 0x20 + ("%index3%" * 0x28)) "abil_fx_idx"
   WRITE_SHORT ("%abil_off%" + 0x20 + ("%index3%" * 0x28)) ("%abil_fx_idx%" + "%new_fx%")
 END
 WRITE_SHORT 0x70 ("%fx_num%" + "%new_fx%")
 BUT_ONLY_IF_IT_CHANGES

// since beholder lightning bolt is now a separate projectile, need to add protection in shield of balduran
COPY_EXISTING ~wa2shiel.itm~ ~override~
 READ_LONG   0x64 "abil_off"
 READ_SHORT  0x68 "abil_num"
 READ_LONG   0x6a "fx_off"
 READ_SHORT  0x70 "fx_num"
 FOR (index = 0; index < fx_num; index = index + 1) BEGIN
   READ_SHORT ("%fx_off%" + ("%index%" * 0x30)) "type"
   PATCH_IF ("%type%" = 197) BEGIN // looks for physical mirror
     READ_ASCII ("%fx_off%" + ("%index%" * 0x30)) "clone" (0x30) // clones effect
     SET "index" = "%fx_num%" // kills loop
     WRITE_SHORT  0x70 ("%fx_num%" + 1)
     INSERT_BYTES            ("%fx_off%"       ) 0x30
       WRITE_EVALUATED_ASCII ("%fx_off%"       ) "%clone%" #48
       WRITE_LONG            ("%fx_off%" + 0x08) "%cdbehbla%"
     FOR (index3 = 0; index3 < abil_num; index3 = index3 + 1) BEGIN
       READ_SHORT  ("%abil_off%" + 0x20 + ("%index3%" * 0x28)) "abil_fx_idx"
       WRITE_SHORT ("%abil_off%" + 0x20 + ("%index3%" * 0x28)) ("%abil_fx_idx%" + "%new_fx%")
     END
   END
 END
 BUT_ONLY_IF_IT_CHANGES

 

edit: Added icon for ToB Cloak of Mirroring. The SoA one has an icon that's hardcoded into the Damage Turning (203) opcode.

Link to comment

Though these have been added, I tested with Call Lightning and Chain Lightning and neither were reflected.

I'd say Chain Lightning should be, but Call Lightning shouldn't be "reflected" to the druid who casts the spell, because the lightning bolt comes from the clouds. It should just be reflected back to the sky harmlessly.

 

(This is, of course, assuming that you find a way to make either reflect. :))

Link to comment

I should start polluting WeiDU with random undocumented `features' (EG, if in a FOR/WHILE loop there are exactly 14 patches, then perform them in reversed order) and then see how long does it take for you to find the bug and a workaround.

Link to comment

Keep in mind that the hard-coded projectile for Call Lightning occupies 80, 81, 82, 83, and 84 -- a different projectile simulating the extra number of strikes gained as caster level increases (e.g., each projectile calls down a set number of strikes over a set period of time). 85 is trap/weather lightning (as far as SimDing0 could find), so I personally wouldn't bother reflecting it.

 

I think 207 is the no-rebound lightning bolt, that flies so far off center that the chances of it actually hitting anyone are negligible.

 

Referencing projectiles should be off by one in some direction. Here are the values I add: 79, 80, 81, 82, 83, 205, 212 (Call Lightning, Lightning Bolt (no-rebound), Chain Lightning).

 

It's been a long time; I could have gotten some tidbits wrong.

Link to comment

an old topic, but I want to discuss cloak of mirroring again.

1. It does not protect from wands (even those that cast spells analogical to these of wizards)

2. It does not protect from own spells.

3. This may be an object of debates, but I believe that protection from area-effect spells it providing is a bug. I think it should protect only from spells directed on the target, in Spell Deflection style, not in Globe of invulerability style.

Link to comment

Old topic, but the only one about the cloak of mirroring?

 

It seems the cloak reflects back all damage in TOB like in SOA (fixpack 6).

Cool, but they changed the effect in TOB for a reason. I wonder if that shouldn't be an optional tweak instead?

Also, the name could be changed to "cloak of absorption" or "deflection" when the effect is not "mirroring".

Link to comment
Guest Guest
an old topic, but I want to discuss cloak of mirroring again.

1. It does not protect from wands (even those that cast spells analogical to these of wizards)

2. It does not protect from own spells.

3. This may be an object of debates, but I believe that protection from area-effect spells it providing is a bug. I think it should protect only from spells directed on the target, in Spell Deflection style, not in Globe of invulerability style.

I basically agree to all with what Gort said about the 'Cloak of Mirroring'. But I also discovered if you cast the spells, 'Disintegrate' or 'Wail of the Banshee'. These spells seem to be ineffective when you have the Cloak of Mirroring on. Also concerning the spells 'Finger of Death' and 'Chromatic Orb'. I know these spell's damage should be resisted by the cloak but should that also include their effect of applying status/ death e.g. (I think this also relates to the spell, 'Prismatic Spray').

Link to comment

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...