Jump to content

Berserker Rage and Level Drain


Recommended Posts

That was my obtuse way of saying. Less is probably better. Or if it ain't documented and it is not already included, then I wouldn't add it. (Re-reading, I realize now that you weren't suggesting any such thing).

 

If it isn't documented and is already included, then the description should be changed to match the given abilities.

Link to comment

Got around to fixing this.

 

// enrage's effects misordering prevents immunity to level drain strings; missing listed immunity to stun
// hold immunity not preventing "Held" string and mind flayer hold animations
COPY_EXISTING ~spcl321.spl~ ~override~
 READ_LONG  0x64 "abil_off"
 READ_SHORT 0x68 "abil_num"
 READ_LONG  0x6a "fx_off"
 SET "fx_delta" = 0
 FOR ("index" = 0; "%index%" < "%abil_num%"; "index" = ("%index%" + 1)) BEGIN // fix existing effects
   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%" + "%fx_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 * ("%abil_fx_idx%" + "%index2%"))) "opcode"
     READ_ASCII ("%fx_off%" + 0x14 + (0x30 * ("%abil_fx_idx%" + "%index2%"))) "spell"
     PATCH_IF (("%opcode%" = 206) AND ("%spell%" STRING_COMPARE_CASE "spcl321" = 0)) BEGIN // immunity to itself
       READ_ASCII  ("%fx_off%" +        (0x30 * ("%abil_fx_idx%" + "%index2%"))) "clone" (48) // clone effect
       WRITE_SHORT ("%fx_off%" +        (0x30 * ("%abil_fx_idx%" + "%index2%"))) 296           // change to immunity to animation
       WRITE_ASCII ("%fx_off%" + 0x14 + (0x30 * ("%abil_fx_idx%" + "%index2%"))) ~spflayer~ #8 // mind flayer stun animation
       SET "index2" = "%abil_fx_num%" // kills loop, advances insert point to last effect
       FOR (index3 = 0; index3 < 8; index3 = index3 + 1) BEGIN
         INSERT_BYTES            ("%fx_off%" + (0x30 * ("%abil_fx_idx%" + "%index2%"))) 0x30 // new effect
           WRITE_EVALUATED_ASCII ("%fx_off%" + (0x30 * ("%abil_fx_idx%" + "%index2%"))) "%clone%" #48 // use spell immunity as template
       END
       // write in opcodes and parameters for new effects
       WRITE_SHORT ("%fx_off%" +        (0x30 * ("%abil_fx_idx%" + "%index2%" + 0))) 169 // opcode: prevent portrait icon
       WRITE_LONG  ("%fx_off%" + 0x08 + (0x30 * ("%abil_fx_idx%" + "%index2%" + 0))) 55  // icon: stun
       WRITE_SHORT ("%fx_off%" +        (0x30 * ("%abil_fx_idx%" + "%index2%" + 1))) 101 // opcode: immunity to effect
       WRITE_LONG  ("%fx_off%" + 0x08 + (0x30 * ("%abil_fx_idx%" + "%index2%" + 1))) 45  // effect: stun
       WRITE_SHORT ("%fx_off%" +        (0x30 * ("%abil_fx_idx%" + "%index2%" + 2))) 46  // opcode: unstun
       WRITE_BYTE  ("%fx_off%" + 0x0c + (0x30 * ("%abil_fx_idx%" + "%index2%" + 2))) 1   // timing: instant/permanent
       WRITE_SHORT ("%fx_off%" +        (0x30 * ("%abil_fx_idx%" + "%index2%" + 3))) 240 // opcode: remove icon
       WRITE_LONG  ("%fx_off%" + 0x08 + (0x30 * ("%abil_fx_idx%" + "%index2%" + 3))) 55  // icon: stun
       WRITE_SHORT ("%fx_off%" +        (0x30 * ("%abil_fx_idx%" + "%index2%" + 4))) 296 // opcode: immunity to animation
       WRITE_ASCII ("%fx_off%" + 0x14 + (0x30 * ("%abil_fx_idx%" + "%index2%" + 4))) ~spmindat~ // animation: mind flayer hold
       WRITE_SHORT ("%fx_off%" +        (0x30 * ("%abil_fx_idx%" + "%index2%" + 5))) 267 // opcode: disabled display string
       WRITE_LONG  ("%fx_off%" + 0x04 + (0x30 * ("%abil_fx_idx%" + "%index2%" + 5))) 14102  // string: "Held"
       WRITE_SHORT ("%fx_off%" +        (0x30 * ("%abil_fx_idx%" + "%index2%" + 6))) 296 // opcode: immunity to animation
       WRITE_ASCII ("%fx_off%" + 0x14 + (0x30 * ("%abil_fx_idx%" + "%index2%" + 6))) ~spconfus~ // animation: mind flayer confusion
       SET "fx_delta" = ("%fx_delta%" + 8)
       WRITE_SHORT  ("%abil_off%" + 0x1e + (0x28 * "%index%")) ("%abil_fx_num%" + 8)
     END
   END
 END
 BUT_ONLY_IF_IT_CHANGES

// barbarian rage should be granting bonus to save v spell, not penalty
// immunity to hold & stun not preventing mind flayer hold animation, "Held" string, or removing stun icons or effects
COPY_EXISTING ~spcl152.spl~ ~override~
 READ_LONG  0x64 "abil_off"
 READ_SHORT 0x68 "abil_num"
 READ_LONG  0x6a "fx_off"
 SET "fx_delta" = 0
 FOR ("index" = 0; "%index%" < "%abil_num%"; "index" = ("%index%" + 1)) BEGIN // fix existing effects
   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%" + "%fx_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 * ("%abil_fx_idx%" + "%index2%"))) "opcode"
     READ_ASCII ("%fx_off%" + 0x14 + (0x30 * ("%abil_fx_idx%" + "%index2%"))) "spell"
     PATCH_IF ("%opcode%" = 37) BEGIN // save v magic
       READ_ASCII  ("%fx_off%" +        (0x30 * ("%abil_fx_idx%" + "%index2%"))) "clone" (48) // clone effect
       WRITE_LONG ("%fx_off%" + 0x04 + (0x30 * ("%abil_fx_idx%" + "%index2%"))) 2 // should be a +2 bonus not -2 penalty
       SET "index2" = ("%abil_fx_num%" - 1) // kills loop, advances insert point to right before last effect
       FOR (index3 = 0; index3 < 4; index3 = index3 + 1) BEGIN
         INSERT_BYTES            ("%fx_off%" + (0x30 * ("%abil_fx_idx%" + "%index2%"))) 0x30 // new effect
           WRITE_EVALUATED_ASCII ("%fx_off%" + (0x30 * ("%abil_fx_idx%" + "%index2%"))) "%clone%" #48 // use spell immunity as template
       END
       // write in opcodes and parameters for new effects
       WRITE_SHORT ("%fx_off%" +        (0x30 * ("%abil_fx_idx%" + "%index2%" + 0))) 296 // opcode: immunity to animation
       WRITE_ASCII ("%fx_off%" + 0x14 + (0x30 * ("%abil_fx_idx%" + "%index2%" + 0))) ~spflayer~ // animation: mind flayer hold
       WRITE_SHORT ("%fx_off%" +        (0x30 * ("%abil_fx_idx%" + "%index2%" + 1))) 267 // opcode: disabled display string
       WRITE_LONG  ("%fx_off%" + 0x04 + (0x30 * ("%abil_fx_idx%" + "%index2%" + 1))) 14102  // string: "Held"
       WRITE_SHORT ("%fx_off%" +        (0x30 * ("%abil_fx_idx%" + "%index2%" + 2))) 46  // opcode: unstun
       WRITE_BYTE  ("%fx_off%" + 0x0c + (0x30 * ("%abil_fx_idx%" + "%index2%" + 2))) 1   // timing: instant/permanent
       WRITE_SHORT ("%fx_off%" +        (0x30 * ("%abil_fx_idx%" + "%index2%" + 3))) 240 // opcode: remove icon
       WRITE_LONG  ("%fx_off%" + 0x08 + (0x30 * ("%abil_fx_idx%" + "%index2%" + 3))) 55  // icon: stun
       SET "fx_delta" = ("%fx_delta%" + 4)
       WRITE_SHORT  ("%abil_off%" + 0x1e + (0x28 * "%index%")) ("%abil_fx_num%" + 4)
     END
   END
 END
 BUT_ONLY_IF_IT_CHANGES

STRING_SET 25102 @137 // Berserker enrage missing protection list
STRING_SET 45689 @138 // Barbarian rage missing protection list

 

setup.tra:

 

@137 = ~BERSERKER: Berserkers are warriors in tune with their animalistic side and, during combat, can achieve an ecstatic state of mind that will enable them to fight longer, harder and more savagely than any humanoid has a right to.  Berserkers tend to be barbarian-like in nature, but not always.  Sometimes it is a conscious choice that a warrior in training makes.  Regardless, opponents on the battlefield will be unsettled when they see the savage elements of the berserker's personality.  This class is common amongst dwarves, known to them as 'battleragers'.

Advantages:
-  May use 'enrage' ability once per day per 4 levels.  The enraged state lasts for 60 seconds.
-  While enraged: +2 to hit, +2 damage, -2 AC
-  While enraged: immune to Charm, Confusion, Fear, Feeblemind, Hold, Imprisonment, Level Drain, Maze, Stun and Sleep.
-  While enraged: gains 15 hit points.  These hit points are temporary, and are taken away at the end of the berserk spree, possibly killing the berserker.

Disadvantages:
-  Becomes winded after berserking.  While winded receives penalties of -2 to hit, -2 to damage and +2 to armor class.
-  Cannot specialize (two proficiency points) in ranged weapons (bows, crossbows, slings, or darts)~ []
@138 = ~BARBARIAN: A barbarian can be an excellent warrior.  While not as disciplined or as skilled as a normal fighter, the barbarian can willingly be thrown into a berserker rage, becoming a tougher and stronger opponent.

Advantages:
-  Moves at 2 points faster than the normal character movement rate
-  Immunity to backstab
-  Can Enrage once per day per every 4 levels (starts at 1st level with one use).  Enrage gives +4 to constitution and strength for 5 rounds.  Gives a 2 point armor class penalty and +2 to saves vs magic (for 5 rounds).  Rage also gives immunity to all charm, hold, fear, maze, confusion, stun, sleep and level drain spells.
-  At 11th level the barbarian gains 10% resistance to slashing, piercing, crushing and missile damage, and gains a further +5% to this at levels 15 and 19.
-  The barbarian rolls D12 for hit points instead of a fighter's D10.

Disadvantages:
-  Cannot wear full plate or plate mail armors.
-  Cannot specialize in weapons past normal specialization (two proficiency points.)~ []

Link to comment

I didn't understand your first post, sorry. You got some of the StrRef values transposed (25102 should be 25201; 45689 should be 45869).

 

Driving me crazy was just tongue-in-cheek pointing out that I didn't expect to find patching errors in two different places on the same day.

Link to comment

I had a horrible experience in the City of Caverns.

My berserker was enraging, but when the Sea Zombie Lord hit him, he lost levels! First time I see it since I play BG2!

 

Is it a mistake, or by design? It's very important, because it changes all tactics, weapons proficiencies, party composition, etc.

 

Using Fixpack V4 in TOB (patch 26498), Tweaks V5

Link to comment

Not a mistake, not design, not the Fixpack, sorry. The Sea Zombie Lord should only be draining levels from one spell cast at the start of the fight, and not draining levels on hit.

 

We might look into blocking the other two "Level Drain" strings in the level drain batch also (I can't recall offhand which the engine defaults to).

 

/edit

 

On second thought, I don't think that will do any good. Never mind.

Link to comment

Thx for your answer.

I tried it again with the same config, but on my "weekend computer", and there was no problem. I wonder now if my berserker hadn't been hit by the spell before being enraged, and I only noticed the level drain while in melee. If that's the case, sorry for stupid question.

 

[EDIT: which is the case! I tried it with the "week computer":

The Lord casts his green spell. There's a text informing that you've been level drained, if you fail your ST, and the dreaded icon, but no noise, then other texts make the info scroll up into oblivion.

The Lord rushes on you, that's when I enraged (too late!), when he hits, I check the icons and I see the energy drain one, so I think it's because he hit in melee, but it already was there! That's exactly what happened.

And now I understand you're saying that the info "Level Drained" shouldn't appear when the berserker is protected by his rage.

So, I'm sorry for the stupid question.

]

 

 

I also notice a "Protection from Negative Plan" icon when the berserker enrages, so obviously, the intention is that this should be granted.

But it's not in the kit description.

 

I would like to say, as a player, I was ready to accept the removal of this important undocumented Berserk immunity.

Link to comment

Archived

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

×
×
  • Create New...