Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[scripts][drinfomon] make the capped skill mapping universal #6773

Merged
merged 2 commits into from
Feb 20, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 6 additions & 4 deletions drinfomon.lic
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
Documentation: https://elanthipedia.play.net/Lich_script_development#drinfomon
=end

$DRINFOMON_VERSION = '2.0.34'
$DRINFOMON_VERSION = '2.0.35'

no_kill_all
no_pause_all
Expand Down Expand Up @@ -312,7 +312,9 @@ class DRSkill
def initialize(name, rank, exp, percent)
@name = name # skill name like 'Evasion'
@rank = rank.to_i # earned ranks in the skill
@exp = exp.to_i # learning rate in the skill from 0 to 34
# Skill mindstate x/34
# Hardcode caped skills to 34/34
@exp = rank.to_i >= 1750 ? 34 : exp.to_i
@percent = percent.to_i # percent to next rank from 0 to 100
@baseline = rank.to_i + (percent.to_i / 100.0)
@current = rank.to_i + (percent.to_i / 100.0)
Expand Down Expand Up @@ -373,7 +375,7 @@ class DRSkill
skill = self.find_skill(name)
if skill
skill.rank = rank.to_i
skill.exp = exp.to_i
skill.exp = skill.rank.to_i >= 1750 ? 34 : exp.to_i
skill.percent = percent.to_i
skill.current = rank.to_i + (percent.to_i / 100.0)
else
Expand Down Expand Up @@ -408,7 +410,7 @@ class DRSkill

def self.getxp(val)
skill = self.find_skill(val)
skill.rank.to_i >= 1750 ? 34 : skill.exp.to_i
skill.exp.to_i
end

def self.getpercent(val)
Expand Down
Loading