[wpdev-commits] xmlscripts/scripts/wolfpack properties.py,1.16,1.17
Brought to you by:
rip,
thiagocorrea
From: Sebastian H. <dar...@us...> - 2004-09-27 17:42:48
|
Update of /cvsroot/wpdev/xmlscripts/scripts/wolfpack In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv32567/wolfpack Modified Files: properties.py Log Message: skillboni are now generated and implemented Index: properties.py =================================================================== RCS file: /cvsroot/wpdev/xmlscripts/scripts/wolfpack/properties.py,v retrieving revision 1.16 retrieving revision 1.17 diff -C2 -d -r1.16 -r1.17 *** properties.py 27 Sep 2004 14:37:27 -0000 1.16 --- properties.py 27 Sep 2004 17:42:35 -0000 1.17 *************** *** 458,462 **** DEFENSEBONUS: [1, 15, 1, True], HITBONUS: [1, 15, 1, True], ! CASTSPEEDBONUS: [1, 1, True], LOWERREQS: [10, 100, 10, True], SELFREPAIR: [1, 5, 1, False], --- 458,462 ---- DEFENSEBONUS: [1, 15, 1, True], HITBONUS: [1, 15, 1, True], ! CASTSPEEDBONUS: [1, 1, 1, True], LOWERREQS: [10, 100, 10, True], SELFREPAIR: [1, 5, 1, False], *************** *** 500,503 **** --- 500,510 ---- item.resendtooltip() + # Those are no real properties + SKILLBONUS1 = 1000 + SKILLBONUS2 = 1001 + SKILLBONUS3 = 1002 + SKILLBONUS4 = 1003 + SKILLBONUS5 = 1004 + # List of allowed properties JUWEL_PROPERTIES = { *************** *** 521,533 **** LUCK: [1, 100, 1, False], SPELLDAMAGEBONUS: [1, 12, 1, False], ! #SKILLBONUS1: [1, 15, 1, False], ! #SKILLBONUS1: [1, 15, 1, False], ! #SKILLBONUS1: [1, 15, 1, False], ! #SKILLBONUS1: [1, 15, 1, False], ! #SKILLBONUS1: [1, 15, 1, False], } def applyJuwelRandom(item, props, minintensity, maxintensity, luckchance): properties = JUWEL_PROPERTIES.keys() # Select unique properties --- 528,545 ---- LUCK: [1, 100, 1, False], SPELLDAMAGEBONUS: [1, 12, 1, False], ! SKILLBONUS1: [1, 15, 1, False], ! SKILLBONUS2: [1, 15, 1, False], ! SKILLBONUS3: [1, 15, 1, False], ! SKILLBONUS4: [1, 15, 1, False], ! SKILLBONUS5: [1, 15, 1, False], } def applyJuwelRandom(item, props, minintensity, maxintensity, luckchance): properties = JUWEL_PROPERTIES.keys() + + # Possible bonus skills + skills = [SWORDSMANSHIP, FENCING, MACEFIGHTING, ARCHERY, WRESTLING, PARRYING, TACTICS, ANATOMY, HEALING, MAGERY, MEDITATION, EVALUATINGINTEL, + MAGICRESISTANCE, TAMING, ANIMALLORE, VETERINARY, MUSICIANSHIP, PROVOCATION, ENTICEMENT, PEACEMAKING, CHIVALRY, FOCUS, NECROMANCY, + STEALING, STEALTH, SPIRITSPEAK] # Select unique properties *************** *** 536,539 **** --- 548,562 ---- properties.remove(property) + if property in [SKILLBONUS1, SKILLBONUS2, SKILLBONUS3, SKILLBONUS4, SKILLBONUS5]: + # Apply a random skillbonus + info = JUWEL_PROPERTIES[property] + value = scaleValue(minintensity, maxintensity, info[0], info[1], info[2], luckchance) + + skill = random.choice(skills) + skills.remove(skill) + + item.settag('skillbonus_%u' % (property - 1000), '%u,%u' % (skill, value * 10)) + continue + if not PROPERTIES.has_key(property): continue |