Arch Protection, how does it work?

Need help with your JScripts? Got questions concerning the DFNs? Come forward, step inside :)
Post Reply
stranf
UOX3 Guru
Posts: 939
Joined: Wed Jan 04, 2006 3:59 pm
Has thanked: 0
Been thanked: 0

Arch Protection, how does it work?

Post by stranf »

Can anyone tell me how Arch Protection works?

Does it simply increase the resist value of a specific layer for a specified period of time? Has Arch Protection and Protection been tested to see if it even works?

If it dosen't work, I'm thinking of exporting the script from JS and having it temporarily boost the DEF values of all armored layers. The only problem I see with that approach is that if a PC is not wearing any armor or clothing (such as not wearing a helmet), the DEF value in that layer will not recieve a bonus.

I am ok with that, but I was just wondering if there was a simpler way that Arch Protection and Protection currently use?
User avatar
Xuri
Site Admin
Posts: 3704
Joined: Mon Jun 02, 2003 9:11 am
Location: Norway
Has thanked: 48 times
Been thanked: 8 times
Contact:

Post by Xuri »

Hm. If I'm reading the correct part of the source-code, and understanding it correctly, it looks like the Protection-spell (and Arch-Protection) modifies the target's parrying skill, and nothing else.
-= Ho Eyo He Hum =-
stranf
UOX3 Guru
Posts: 939
Joined: Wed Jan 04, 2006 3:59 pm
Has thanked: 0
Been thanked: 0

Post by stranf »

Ahh. So arch protection is a worthless spell unless you have a shield equipped? Is this how OSI had it?


Xuri, do you know if the C++ combat code checks the armor resist value and then ADDS it to the racial resist value? (Monsters have a DEF value specified in the .dfn, and this tag can also be applied to human PCs, although I'm not sure if it works).

The reason I am asking, is that if the combat code looks something like this:

Code: Select all

   HitDamage = DamageRoll - MyArmor.resist - MyChar.resist 
Then a more accurate protection and archprotection spell could be written in JS that modifies the DEF value of the PC/NPC.

That way it is easy to control via a Timer function:

pseudocode:

Code: Select all

  myChar.resist =myChar.resist + 10;
           MyTimer.start(myChar, 1  , 45);

         MyTimer (timer#,myChar)
{      if (MyTimer.timer# == 1)
           {
             myChar.resist = myChar.resist -10;
          }

}

or something to that effect. Very simple to code. But all of this depends on the fact if the C++ code ONLY uses the armor's defense layer, or if it appends the amor defense value to the character's "base" defense defined in the .dfn entry.

}
[/code]
Post Reply