Jump to content

Opcode 0xC - Damage


WizWom

Recommended Posts

I'm looking at how NearInfinity interprets this, and I think it's wiser, it uses the low owrd as a damage style, and the high ord as the damage type. Actually, it looks like damage type can be a bit field, with crushing the default:

0x0001 ACID

0x0002 COLD

0x0004 ELECTRICITY

0x0008 FIRE

0x0010 PIERCING

0x0020 POISON

0x0040 MAGIC

0x0080 MISSILE

0x0100 SLASHING

0x0200 MAGICFIRE

0x0400 MAGICCOLD

0x0800 STUNNING

0x1000 SOULEATER

0x2000 DISEASE

0x4000 ?

0x8000 ?

 

I will test some - Setting damage to FIRE and MAGICALFIRE does not seem to bother the engine. Will test against resistences.

0x0208 - not affected by 100% FIRE or 100% AMGICFIRE or both 100%

So, it's not a bit field.

 

The low word, appears to interpret as:

0x0000 Save for no damage

0x0001 Set to Value - sets hit points to <damage determined> if save is missed. also seems to prevent damage display.

0x0002 Set to Percentage - sets hit points to <damage determind>% of current if save is missed. Also seems to prevent damage display.

0x0003 Reduce by Percentage - save for no damage - trying to see if anything manipulates this - no, nothing seems to

0x0004 no damge at all, roll for save

0x0005 no damge at all, roll for save

0x1903 no damage at all, roll save

0x3203 no damage at all, roll save

 

I could keep on going, but it seems there is no "reduce by percentage" or "save for half damage" or "save for percentage damage" or anything.

 

Any thing other than a 0 in this word stops damage display, it seems.

Link to comment

I have just been fiddling with a spell now, and setting the damage type to MAGIC did precisely nothing to a group of creatures (i.e. they did not take damage). Setting it to other values meant they took damage. Not sure if there's some rule behind this (MAGIC = broken?), but I figured I'd let you know.

Link to comment
I have just been fiddling with a spell now, and setting the damage type to MAGIC did precisely nothing to a group of creatures (i.e. they did not take damage). Setting it to other values meant they took damage. Not sure if there's some rule behind this (MAGIC = broken?), but I figured I'd let you know.

I changed a Necklace of Missiles to MAGIC damage, and the damage was dealt properly.

 

BGII/ToB w 26498 patch

Link to comment

Damge STUNNING:

Is normal damage, but if the last HP is done by STUNNING, then the creature keeps 1 HP, and falls asleep for a round.

 

The values above are probably "special", that is, checked for exatly; damage which is not of a special type checked for in the code will be general, that is, it appears no resistence will stop it.

Link to comment

I have just been fiddling with a spell now, and setting the damage type to MAGIC did precisely nothing to a group of creatures (i.e. they did not take damage). Setting it to other values meant they took damage. Not sure if there's some rule behind this (MAGIC = broken?), but I figured I'd let you know.

I changed a Necklace of Missiles to MAGIC damage, and the damage was dealt properly.

 

BGII/ToB w 26498 patch

 

That's odd. I'll see if I notice the issue with any other spells.

Link to comment

Easy to get confused; there is the "spell ability" first, which has a damage type, then the damage effect of the spell ability, which has a damage type.

 

Now, i THINK you could make a damaging spell which caused one of the physical damage types without having a damage effect, but that's conjecture, I haven't tried it.

Link to comment

Archived

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

×
×
  • Create New...