[wpdev-commits] xmlscripts/scripts equipment.py,1.45,1.46
Brought to you by:
rip,
thiagocorrea
From: Richard M. <dr...@us...> - 2004-10-08 18:52:08
|
Update of /cvsroot/wpdev/xmlscripts/scripts In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv12865 Modified Files: equipment.py Log Message: Meh, possible changes with Samurai Empire Index: equipment.py =================================================================== RCS file: /cvsroot/wpdev/xmlscripts/scripts/equipment.py,v retrieving revision 1.45 retrieving revision 1.46 diff -C2 -d -r1.45 -r1.46 *** equipment.py 6 Oct 2004 20:06:00 -0000 1.45 --- equipment.py 8 Oct 2004 18:51:52 -0000 1.46 *************** *** 22,26 **** if object.hastag(tag): tooltip.add(cliloc, str(object.gettag(tag))) ! speedbonus = properties.fromitem(object, SPEEDBONUS) if speedbonus != 0: --- 22,26 ---- if object.hastag(tag): tooltip.add(cliloc, str(object.gettag(tag))) ! speedbonus = properties.fromitem(object, SPEEDBONUS) if speedbonus != 0: *************** *** 31,39 **** if hitbonus != 0: tooltip.add(1060415, str(hitbonus)) ! defensebonus = properties.fromitem(object, DEFENSEBONUS) if defensebonus != 0: tooltip.add(1060408, str(defensebonus)) ! enhancepotions = properties.fromitem(object, ENHANCEPOTIONS) if enhancepotions != 0: --- 31,39 ---- if hitbonus != 0: tooltip.add(1060415, str(hitbonus)) ! defensebonus = properties.fromitem(object, DEFENSEBONUS) if defensebonus != 0: tooltip.add(1060408, str(defensebonus)) ! enhancepotions = properties.fromitem(object, ENHANCEPOTIONS) if enhancepotions != 0: *************** *** 44,48 **** if reflectphysical: tooltip.add(1060442, str(reflectphysical)) ! luck = properties.fromitem(object, LUCK) if luck != 0: --- 44,48 ---- if reflectphysical: tooltip.add(1060442, str(reflectphysical)) ! luck = properties.fromitem(object, LUCK) if luck != 0: *************** *** 52,60 **** if bonus != 0: tooltip.add(1060485, str(bonus)) ! bonus = properties.fromitem(object, BONUSDEXTERITY) if bonus != 0: tooltip.add(1060409, str(bonus)) ! bonus = properties.fromitem(object, BONUSINTELLIGENCE) if bonus != 0: --- 52,60 ---- if bonus != 0: tooltip.add(1060485, str(bonus)) ! bonus = properties.fromitem(object, BONUSDEXTERITY) if bonus != 0: tooltip.add(1060409, str(bonus)) ! bonus = properties.fromitem(object, BONUSINTELLIGENCE) if bonus != 0: *************** *** 64,80 **** if bonus != 0: tooltip.add(1060431, str(bonus)) ! bonus = properties.fromitem(object, BONUSSTAMINA) if bonus != 0: tooltip.add(1060484, str(bonus)) ! bonus = properties.fromitem(object, BONUSMANA) if bonus != 0: ! tooltip.add(1060439, str(bonus)) regenhitpoints = properties.fromitem(object, REGENHITPOINTS) if regenhitpoints: tooltip.add(1060444, str(regenhitpoints)) ! regenstamina = properties.fromitem(object, REGENSTAMINA) if regenstamina: --- 64,80 ---- if bonus != 0: tooltip.add(1060431, str(bonus)) ! bonus = properties.fromitem(object, BONUSSTAMINA) if bonus != 0: tooltip.add(1060484, str(bonus)) ! bonus = properties.fromitem(object, BONUSMANA) if bonus != 0: ! tooltip.add(1060439, str(bonus)) regenhitpoints = properties.fromitem(object, REGENHITPOINTS) if regenhitpoints: tooltip.add(1060444, str(regenhitpoints)) ! regenstamina = properties.fromitem(object, REGENSTAMINA) if regenstamina: *************** *** 87,98 **** if properties.fromitem(object, BESTSKILL): tooltip.add(1060400, "") ! mageweapon = properties.fromitem(object, MAGEWEAPON) if mageweapon != 0: ! tooltip.add(1060438, str(mageweapon)) if properties.fromitem(object, MAGEARMOR) and not object.allowmeditation: tooltip.add(1060437, "") ! selfrepair = properties.fromitem(object, SELFREPAIR) if selfrepair != 0: --- 87,98 ---- if properties.fromitem(object, BESTSKILL): tooltip.add(1060400, "") ! mageweapon = properties.fromitem(object, MAGEWEAPON) if mageweapon != 0: ! tooltip.add(1060438, str(mageweapon)) if properties.fromitem(object, MAGEARMOR) and not object.allowmeditation: tooltip.add(1060437, "") ! selfrepair = properties.fromitem(object, SELFREPAIR) if selfrepair != 0: *************** *** 198,202 **** if slayer: tooltip.add(slayer.name, '') ! # One or twohanded weapon if object.twohanded: --- 198,202 ---- if slayer: tooltip.add(slayer.name, '') ! # One or twohanded weapon if object.twohanded: *************** *** 215,221 **** elif skill == ARCHERY: tooltip.add(1061175, '') # Special weapon range ! if object.hasintproperty( 'range' ) or object.hastag( 'range' ): if object.hastag( 'range' ): weaponrange = int( object.gettag( 'range' ) ) --- 215,223 ---- elif skill == ARCHERY: tooltip.add(1061175, '') + #elif skill == WRESTLING: + # tooltip.add(1061172, '') # Special weapon range ! if object.hasintproperty( 'range' ) or object.hastag( 'range' ): if object.hastag( 'range' ): weaponrange = int( object.gettag( 'range' ) ) *************** *** 277,297 **** else: spellchanneling = False ! # Those are only relevant if its not a shield/weapon or for spellchanneling items if (not weapon and not shield) or spellchanneling: castrecovery = properties.fromitem(object, CASTRECOVERYBONUS) ! if castrecovery: tooltip.add(1060412, str(castrecovery)) ! castspeed = properties.fromitem(object, CASTSPEEDBONUS) ! if castspeed: tooltip.add(1060413, str(castspeed)) ! spelldamagebonus = properties.fromitem(object, SPELLDAMAGEBONUS) ! if spelldamagebonus: ! tooltip.add(1060483, str(spelldamagebonus)) physical = properties.fromitem(object, RESISTANCE_PHYSICAL) --- 279,299 ---- else: spellchanneling = False ! # Those are only relevant if its not a shield/weapon or for spellchanneling items if (not weapon and not shield) or spellchanneling: castrecovery = properties.fromitem(object, CASTRECOVERYBONUS) ! if castrecovery: tooltip.add(1060412, str(castrecovery)) ! castspeed = properties.fromitem(object, CASTSPEEDBONUS) ! if castspeed: tooltip.add(1060413, str(castspeed)) ! spelldamagebonus = properties.fromitem(object, SPELLDAMAGEBONUS) ! if spelldamagebonus: ! tooltip.add(1060483, str(spelldamagebonus)) physical = properties.fromitem(object, RESISTANCE_PHYSICAL) *************** *** 340,344 **** if req_str: tooltip.add(1061170, str(req_str)) ! # Skill Boni (1-5) for i in range(0, 5): --- 342,346 ---- if req_str: tooltip.add(1061170, str(req_str)) ! # Skill Boni (1-5) for i in range(0, 5): *************** *** 348,354 **** (skill, bonus) = (int(skill), int(bonus)) ! if bonus == 0 or skill < 0 or skill >= ALLSKILLS: continue ! # Add a Bonus for the skill tooltip.add(1060451 + i, "#%u\t%0.01f%%" % (1044060 + skill, bonus / 10.0)) --- 350,356 ---- (skill, bonus) = (int(skill), int(bonus)) ! if bonus == 0 or skill < 0 or skill >= ALLSKILLS: continue ! # Add a Bonus for the skill tooltip.add(1060451 + i, "#%u\t%0.01f%%" % (1044060 + skill, bonus / 10.0)) *************** *** 472,476 **** item.deltag('real_skillbonus_%u' % i) continue ! # Add a Bonus for the skill if char.skill[skill] + bonus > char.skillcap[skill]: --- 474,478 ---- item.deltag('real_skillbonus_%u' % i) continue ! # Add a Bonus for the skill if char.skill[skill] + bonus > char.skillcap[skill]: *************** *** 478,482 **** if char.skill[skill] + bonus < 0: bonus = - char.skill[skill] ! item.settag('real_skillbonus_%u' % i, '%u,%u' % (skill, bonus)) char.skill[skill] += bonus --- 480,484 ---- if char.skill[skill] + bonus < 0: bonus = - char.skill[skill] ! item.settag('real_skillbonus_%u' % i, '%u,%u' % (skill, bonus)) char.skill[skill] += bonus *************** *** 484,488 **** item.deltag('skillbonus_%u' % i) continue ! # Update the bonus tag for the character tagname = 'skillbonus_%u' % skill --- 486,490 ---- item.deltag('skillbonus_%u' % i) continue ! # Update the bonus tag for the character tagname = 'skillbonus_%u' % skill *************** *** 506,510 **** char.staminabonus += bonusstamina changed = True ! # Bonus Mana bonusmana = properties.fromitem(item, BONUSMANA) --- 508,512 ---- char.staminabonus += bonusstamina changed = True ! # Bonus Mana bonusmana = properties.fromitem(item, BONUSMANA) *************** *** 518,522 **** if char.hastag('regenhitpoints'): regenhitpoints += int(char.gettag('regenhitpoints')) ! char.settag('regenhitpoints', regenhitpoints) --- 520,524 ---- if char.hastag('regenhitpoints'): regenhitpoints += int(char.gettag('regenhitpoints')) ! char.settag('regenhitpoints', regenhitpoints) *************** *** 526,532 **** if char.hastag('regenstamina'): regenstamina += int(char.gettag('regenstamina')) ! char.settag('regenstamina', regenstamina) ! # Add mana regeneration rate bonus regenmana = properties.fromitem(item, REGENMANA) --- 528,534 ---- if char.hastag('regenstamina'): regenstamina += int(char.gettag('regenstamina')) ! char.settag('regenstamina', regenstamina) ! # Add mana regeneration rate bonus regenmana = properties.fromitem(item, REGENMANA) *************** *** 534,538 **** if char.hastag('regenmana'): regenmana += int(char.gettag('regenmana')) ! char.settag('regenmana', regenmana) --- 536,540 ---- if char.hastag('regenmana'): regenmana += int(char.gettag('regenmana')) ! char.settag('regenmana', regenmana) *************** *** 546,550 **** def onUnequip(char, item, layer): changed = 0 ! # Bonus Str if item.hastag('real_strength_bonus'): --- 548,552 ---- def onUnequip(char, item, layer): changed = 0 ! # Bonus Str if item.hastag('real_strength_bonus'): *************** *** 581,585 **** item.deltag('real_skillbonus_%u' % i) continue ! # If the bonus would add over the skill limit, # make sure it doesnt --- 583,587 ---- item.deltag('real_skillbonus_%u' % i) continue ! # If the bonus would add over the skill limit, # make sure it doesnt *************** *** 588,600 **** if char.skill[skill] - bonus < 0: bonus = char.skill[skill] ! item.deltag('real_skillbonus_%u' % i, bonus) char.skill[skill] -= bonus ! # Update the bonus tag for the character tagname = 'skillbonus_%u' % skill if char.hastag(tagname): value = int(char.gettag(tagname)) - bonus ! if value != 0: char.settag(tagname, value) --- 590,602 ---- if char.skill[skill] - bonus < 0: bonus = char.skill[skill] ! item.deltag('real_skillbonus_%u' % i, bonus) char.skill[skill] -= bonus ! # Update the bonus tag for the character tagname = 'skillbonus_%u' % skill if char.hastag(tagname): value = int(char.gettag(tagname)) - bonus ! if value != 0: char.settag(tagname, value) *************** *** 603,607 **** except: item.deltag('real_skillbonus_%u' % i) ! continue # Bonus Hitpoints --- 605,609 ---- except: item.deltag('real_skillbonus_%u' % i) ! continue # Bonus Hitpoints *************** *** 616,620 **** char.staminabonus -= bonusstamina changed = True ! # Bonus Mana bonusmana = properties.fromitem(item, BONUSMANA) --- 618,622 ---- char.staminabonus -= bonusstamina changed = True ! # Bonus Mana bonusmana = properties.fromitem(item, BONUSMANA) *************** *** 622,631 **** char.manabonus -= bonusmana changed = True ! # Remove hitpoint regeneration rate bonus regenhitpoints = properties.fromitem(item, REGENHITPOINTS) if regenhitpoints and char.hastag('regenhitpoints'): value = int(char.gettag('regenhitpoints')) - regenhitpoints ! if value <= 0: char.deltag('regenhitpoints') --- 624,633 ---- char.manabonus -= bonusmana changed = True ! # Remove hitpoint regeneration rate bonus regenhitpoints = properties.fromitem(item, REGENHITPOINTS) if regenhitpoints and char.hastag('regenhitpoints'): value = int(char.gettag('regenhitpoints')) - regenhitpoints ! if value <= 0: char.deltag('regenhitpoints') *************** *** 637,655 **** if regenstamina and char.hastag('regenstamina'): value = int(char.gettag('regenstamina')) - regenstamina ! if value <= 0: char.deltag('regenstamina') else: char.settag('regenstamina', value) ! # Remove mana regeneration rate bonus regenmana = properties.fromitem(item, REGENMANA) if regenmana and char.hastag('regenmana'): value = int(char.gettag('regenmana')) - regenmana ! if value <= 0: char.deltag('regenmana') else: ! char.settag('regenmana', value) # Update Stats --- 639,657 ---- if regenstamina and char.hastag('regenstamina'): value = int(char.gettag('regenstamina')) - regenstamina ! if value <= 0: char.deltag('regenstamina') else: char.settag('regenstamina', value) ! # Remove mana regeneration rate bonus regenmana = properties.fromitem(item, REGENMANA) if regenmana and char.hastag('regenmana'): value = int(char.gettag('regenmana')) - regenmana ! if value <= 0: char.deltag('regenmana') else: ! char.settag('regenmana', value) # Update Stats *************** *** 663,668 **** if not item.container or not item.container.ischar(): return ! ! char = item.container onUnequip(char, item, item.layer) --- 665,670 ---- if not item.container or not item.container.ischar(): return ! ! char = item.container onUnequip(char, item, item.layer) *************** *** 718,725 **** item.soundeffect(0x57) player.updatestats() ! # Remove the use delay, equipping should be for free... player.objectdelay = 0 ! for script in scripts[scripts.index("equipment")+1:]: if wolfpack.hasevent(script, EVENT_USE): --- 720,727 ---- item.soundeffect(0x57) player.updatestats() ! # Remove the use delay, equipping should be for free... player.objectdelay = 0 ! for script in scripts[scripts.index("equipment")+1:]: if wolfpack.hasevent(script, EVENT_USE): |