Jump to content

Does Dispel Magic work properly?


Guest amanasleep

Recommended Posts

Already coded that. I decided to rewrite much of the dispel code, so it needs some extensive testing.

 

You can now specify, whether you want items to be dispelled or not.

And there is a third option, that tries to emulate the behavior of dispel on items. (i. e. a chance-based approach)

Since items don't have a "caster-level" I decided to take the magic class level of the user that wields the item. And then I apply the formula discussed above, to determine whether the item should be dispelled or not.

I'm sure no one will ever use this, but it sure was a challenge. :rolleyes:

Link to comment
Already coded that. I decided to rewrite much of the dispel code, so it needs some extensive testing.

 

You can now specify, whether you want items to be dispelled or not.

And there is a third option, that tries to emulate the behavior of dispel on items. (i. e. a chance-based approach)

Since items don't have a "caster-level" I decided to take the magic class level of the user that wields the item. And then I apply the formula discussed above, to determine whether the item should be dispelled or not.

I'm sure no one will ever use this, but it sure was a challenge. :rolleyes:

Taemon.

In wuv youuuu :):D:D:D;):D

damn, I really need to learn reverse engineering stuff :D

Link to comment
Already coded that. I decided to rewrite much of the dispel code, so it needs some extensive testing.

 

You can now specify, whether you want items to be dispelled or not.

And there is a third option, that tries to emulate the behavior of dispel on items. (i. e. a chance-based approach)

Since items don't have a "caster-level" I decided to take the magic class level of the user that wields the item. And then I apply the formula discussed above, to determine whether the item should be dispelled or not.

I'm sure no one will ever use this, but it sure was a challenge. :)

:):D:D:D;):D:D:worship::worship::worship:

 

 

This is something that I absolutely have to implemented for SR V3 Polymorph Self and Shapechange forms! Not to mention that finally fixing Dispel opcode itself is great, and you recently allowed me to fix Mirror Image too. :love:

 

I'm sure Aranthys will be glad to test it a lot! :rolleyes::D

Link to comment
Already coded that. I decided to rewrite much of the dispel code, so it needs some extensive testing.

 

You can now specify, whether you want items to be dispelled or not.

And there is a third option, that tries to emulate the behavior of dispel on items. (i. e. a chance-based approach)

Since items don't have a "caster-level" I decided to take the magic class level of the user that wields the item. And then I apply the formula discussed above, to determine whether the item should be dispelled or not.

I'm sure no one will ever use this, but it sure was a challenge. :D

:):D:D:D;):D:D:worship::worship::worship:

 

 

This is something that I absolutely have to implemented for SR V3 Polymorph Self and Shapechange forms! Not to mention that finally fixing Dispel opcode itself is great, and you recently allowed me to fix Mirror Image too. :)

 

I'm sure Aranthys will be glad to test it a lot! :rolleyes::D

 

Go modify the polymorph paws, you freak :love:

Link to comment
As soon as Taimon tells me which code should I use, and how I should flag a magically created item as "not-dispellable".

I'm afraid you currently can't do this on a per item basis, but rather configure it in the dispel effect.

The upper word of parameter 2 selects the behavior. See my tob_hacks.tp2 for a short comment about each option.

Link to comment

Okay, I've added a check for the item flag to skip the dispel (bit 24 of item flags) and will update the tp2 as soon as there is a consensus about what should be the default behavior for dispel: dispel items or not?

(i. e. what should be the meaning of UpperWord(param2) == 0)

Link to comment
Okay, I've added a check for the item flag to skip the dispel (bit 24 of item flags) and will update the tp2 as soon as there is a consensus about what should be the default behavior for dispel: dispel items or not?

(i. e. what should be the meaning of UpperWord(param2) == 0)

It probably depends:

(a) shapeshifting paws shouldn't be dispellable

(b) magically creted weapons such as Melf Minute Meteors, Flame Blade and so on should be dispellable, though I'm sure many players would prefer them to be non-dispellable

© some "weapons" such as Cause Wounds, Slay Living and so on should probably be non dispellable

 

Anyway, while (a) and © cannot be addressed in any athor way, (b) can be easily achieved by adding "remove item" opcodes to dispel in case we absolutely want an item to be dispellable.

 

I obviously vote for making 'dispel' opcode not dispel items on its own.

 

 

I've added a check for the item flag to skip the dispel (bit 24 of item flags)
Wasn't it also made the AoE flag for the purpose of Mirror Image bypassing?

If I remember correctly Ardanis is right...
Link to comment
Anyway, while (a) and © cannot be addressed in any athor way, (b) can be easily achieved by adding "remove item" opcodes to dispel in case we absolutely want an item to be dispellable.

To clarify: With the modified effect you can cover all those cases - I just want to know, what the most sensible default is. In the first version I also choose to not dispel items by default and I guess I'll leave it at that for the moment.

 

I've added a check for the item flag to skip the dispel (bit 24 of item flags)
Wasn't it also made the AoE flag for the purpose of Mirror Image bypassing?

If I remember correctly Ardanis is right...

I knew this would be coming, so I have a chance to clear that up: The AoE flag on items is not configurable via item flags (0x018 in .itm), but with the ability flags (dword at 0x026 in every item ability).

 

Updated the version to include that "no dispel" flag.

Link to comment

Well, that means more work for me, doesn't it? :rolleyes:

 

0x011 (Current HP modifier): with bit 1 set in the upper param2. (remove all non-timing-mod-9 effects)
0x087 (Polymorph): with an empty resource1

Those should be okay -- no modification needed.

 

0x0DC (Remove primary type)
0x0DD (Remove secondary type)
0x0E5 (Remove primary type [1])
0x0E6 (Remove secondary type [1])

Haven't tested this, but the code looked pretty straightforward.

There are a bunch of spells using those opcodes.

Link to comment

Archived

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

×
×
  • Create New...