Update sword of Souls python code to reflect movement of handling exp scaling to caller in r21461

git-svn-id: svn://svn.code.sf.net/p/crossfire/code/maps/trunk@21462 282e977c-c81d-0410-88c4-b93c2d0d6712
master
silvernexus 2020-09-28 00:28:48 +00:00
parent 2d7a1b6376
commit f254fc82a0
1 changed files with 3 additions and 2 deletions

View File

@ -22,8 +22,9 @@ if killer.Owner is None and killer.Type == Crossfire.Type.PLAYER:
old_level = weap.ItemPower
old_xp = weap.TotalExp
# Add experience to the weapon (though we only care about the total_exp field)
# As the weapon gets stronger, it takes a larger share of the exp
weap.AddExp((victim.Exp * (1.0 + weap.ItemPower / 115.0)) // 1)
# As the weapon gets stronger, it takes a larger share of the exp,
# with a baseline of half at level 0, and taking all of it at level 115.
weap.AddExp((victim.Exp * (1.0 + weap.ItemPower / 115.0)) // 2)
# Determine the change in XP
delta_exp = weap.TotalExp - old_xp