|
||
|
|||||||
| Server Support on Windows Get (and give) support on general questions related to the RunUO server itself. |
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 (permalink) |
|
Ok, so I'm trying to write a magic tool for RunUO/Razor. I want to calculate the % chance of casting a certain circle based on the magery skill I'm getting from Razor.
If anyone knows or can double check this I would appreciate it greatly. Here is the algorithm I'm am using. It's based off of calculations I found in SkillCheck.cs and Spell.cs. I want these calculations to be the same as the ones in RunUO. 1) Calculate the minimum and maximum skill required for a circle. 2) Check if skill is in bounds. 3) Calculate percent chance. Code:
ChanceOffset: Double = 20.0;
ChanceLength: Double = (100.0 / 7.0);
avg = ChanceLength * circle;
min = avg - ChanceOffset;
max = avg + ChanceOffset;
if (skill < min) then
// too difficult
else
if (skill >= max) then
// 99% chance
chance = ((skill - min) / (max - min)) * 100; // calculate % chance
|
|
|
|
|
|
|
#3 (permalink) |
|
Here is what I am getting from the algorithm.
Minimum and Maximum Magery Skill per Circle: Code:
1st: min=-5.71428571428571 | max=34.2857142857143 2nd: min=8.57142857142857 | max=48.5714285714286 3rd: min=22.8571428571429 | max=62.8571428571429 4th: min=37.1428571428571 | max=77.1428571428571 5th: min=51.4285714285714 | max=91.4285714285714 6th: min=65.7142857142857 | max=105.714285714286 7th: min=80 | max=120 8th: min=94.2857142857143 | max=134.285714285714 MagerySkill=0 1st: chance=14.2857142857143 2nd+ 0% chance MagerySkill=10 1st: chance=39.2857142857143 2nd: chance=3.57142857142857 3rd+ 0% chance MagerySkill=20 1st: chance=64.2857142857143 2nd: chance=28.5714285714286 3rd: 0% chance MagerySkill=30 1st: chance=89.2857142857143 2nd: chance=53.5714285714286 3rd: chance=17.8571428571428 4th+ 0% chance MagerySkill=40 1st: 99% 2nd: chance=78.5714285714286 3rd: chance=42.8571428571428 4th: chance=7.14285714285714 5th+ 0% chance MagerySkill=50 1st-2nd: 99% 3rd: chance=67.8571428571428 4th: chance=32.1428571428571 5th+ 0% chance MagerySkill=60 1st-2nd: 99% 3rd: chance=92.8571428571428 4th: chance=57.1428571428572 5th: chance=21.4285714285714 6th+ 0% chance MagerySkill=70 1st-3rd: 99% 4th: chance=82.1428571428572 5th: chance=46.4285714285714 6th: chance=10.7142857142857 7th+ 0% chance MagerySkill=80 1st-4th: 99% 5th: chance=71.4285714285714 6th: chance=35.7142857142857 7th: chance=0 8th: 0% MagerySkill=90 1st-4th: 99% 5th: chance=96.4285714285714 6th: chance=60.7142857142857 7th: chance=25 8th: 0% MagerySkill=100 1st-5th: 99% 6th: chance=85.7142857142857 7th: chance=50 8th: chance=14.2857142857143 MagerySkill=110 1st-6th: 99% 7th: chance=75 8th: chance=39.2857142857143 MagerySkill=120 1st-7th: 99% 8th: chance=64.2857142857143 Once I test this ingame I will post my findings. If anyone else knows some of these numbers don't make sense please let me know. Peace, -Z |
|
|
|
|
![]() |
| Bookmarks |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | |
|
|