Update of /cvsroot/wpdev/xmlscripts/scripts/system
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv32567/system
Modified Files:
lootlists.py skillgain.py
Log Message:
skillboni are now generated and implemented
Index: lootlists.py
===================================================================
RCS file: /cvsroot/wpdev/xmlscripts/scripts/system/lootlists.py,v
retrieving revision 1.9
retrieving revision 1.10
diff -C2 -d -r1.9 -r1.10
*** lootlists.py 27 Sep 2004 14:37:27 -0000 1.9
--- lootlists.py 27 Sep 2004 17:42:34 -0000 1.10
***************
*** 9,13 ****
'26cb', '26c1', 'f60', 'f61', '13b7', '13b8', '13fe', '13ff', '143e', '143f', '1440', '1441', '26ce', '26cf', 'e85',
'e86', '13b9', '13ba', 'ec4', 'ec5', '26c4', '26ba', '13b5', '13b6']
! DEF_WEAPONS_AXES = ['f49', 'f4a', 'f47', 'f48', 'f4b', 'f4c', '1142', '1143', 'f45', 'f46', '13fa', '13fb', 'f43', 'f44']
DEF_WEAPONS_MACES = ['df0', 'df1', '13b3', '13b4', '13f8', '13f9', '143d', '143c', 'f5c', 'f5d', '143a', '143b',
'e89', 'e8a', '26c6', '26bc', '13f4', '13f5', 'fb4', 'fb5', '13e3', '13e4', '13af', '13b0', '1438', '1439', '1406', '1407']
--- 9,13 ----
'26cb', '26c1', 'f60', 'f61', '13b7', '13b8', '13fe', '13ff', '143e', '143f', '1440', '1441', '26ce', '26cf', 'e85',
'e86', '13b9', '13ba', 'ec4', 'ec5', '26c4', '26ba', '13b5', '13b6']
! DEF_WEAPONS_AXES = ['f49', 'f4a', 'f47', 'f48', 'f4b', 'f4c', '1143', 'f45', 'f46', '13fa', '13fb', 'f43', 'f44']
DEF_WEAPONS_MACES = ['df0', 'df1', '13b3', '13b4', '13f8', '13f9', '143d', '143c', 'f5c', 'f5d', '143a', '143b',
'e89', 'e8a', '26c6', '26bc', '13f4', '13f5', 'fb4', 'fb5', '13e3', '13e4', '13af', '13b0', '1438', '1439', '1406', '1407']
Index: skillgain.py
===================================================================
RCS file: /cvsroot/wpdev/xmlscripts/scripts/system/skillgain.py,v
retrieving revision 1.8
retrieving revision 1.9
diff -C2 -d -r1.8 -r1.9
*** skillgain.py 26 Sep 2004 16:15:06 -0000 1.8
--- skillgain.py 27 Sep 2004 17:42:34 -0000 1.9
***************
*** 107,111 ****
cap = char.skillcap[skill] / 10.0
info = SKILLS[skill]
!
if lock == 0 and value < cap:
# Skills lower than 10.0% will gain 0.1% - 0.5% at once
--- 107,111 ----
cap = char.skillcap[skill] / 10.0
info = SKILLS[skill]
!
if lock == 0 and value < cap:
# Skills lower than 10.0% will gain 0.1% - 0.5% at once
***************
*** 121,124 ****
--- 121,135 ----
for i in range(0, ALLSKILLS):
if i != skill and char.skilllock[i] == 1 and char.skill[i] / 10.0 >= points:
+ # See if there is a bonus for this skill and reducing further would go below the bonus
+ try:
+ if char.hastag('skillbonus_%u' % i):
+ value = int(char.gettag('skillbonus_%u' % i))
+
+ # Skip this skill if reducing it wouldn't work
+ if char.skill[i] - int(points * 10) < value:
+ continue
+ except:
+ pass
+
char.skill[i] -= int(points * 10)
totalskill -= points
***************
*** 212,217 ****
--- 223,237 ----
totalskills = 0.0
for i in range(0, ALLSKILLS):
+ # See if there is a modifier for the skill
+ tagname = 'skillbonus_%u' % i
totalskills += skills[i] / 10.0
+ if char.hastag(tagname):
+ try:
+ value = int(char.gettag(tagname))
+ totalskills -= value / 10.0
+ except:
+ pass
+
# Calculate the GainChance
# (RunUO has a nice approach. Doing it similar)
|