[wpdev-commits] xmlscripts/scripts/magic spell.py,1.32,1.33
Brought to you by:
rip,
thiagocorrea
From: HellRaider <hel...@us...> - 2004-10-26 03:25:50
|
Update of /cvsroot/wpdev/xmlscripts/scripts/magic In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv15385/scripts/magic Modified Files: spell.py Log Message: DelayedDamageSpell was ignoring the 'delay' setting - doh! Index: spell.py =================================================================== RCS file: /cvsroot/wpdev/xmlscripts/scripts/magic/spell.py,v retrieving revision 1.32 retrieving revision 1.33 diff -C2 -d -r1.32 -r1.33 *** spell.py 16 Oct 2004 18:41:35 -0000 1.32 --- spell.py 26 Oct 2004 03:25:40 -0000 1.33 *************** *** 99,103 **** # Change this to 0 for AoS behaviour self.castrecovery = 1 * circle ! # # Show the cast action --- 99,103 ---- # Change this to 0 for AoS behaviour self.castrecovery = 1 * circle ! # # Show the cast action *************** *** 105,110 **** def docastaction(self, char, mode): if char.bodytype == BODY_HUMAN and not char.itemonlayer( LAYER_MOUNT ): ! char.action(self.castaction) ! # # Say the mantra --- 105,110 ---- def docastaction(self, char, mode): if char.bodytype == BODY_HUMAN and not char.itemonlayer( LAYER_MOUNT ): ! char.action(self.castaction) ! # # Say the mantra *************** *** 113,117 **** if char.npc and char.bodytype != BODY_HUMAN: return ! if self.mantra and mode in [MODE_BOOK, MODE_SCROLL]: char.say(self.mantra) --- 113,117 ---- if char.npc and char.bodytype != BODY_HUMAN: return ! if self.mantra and mode in [MODE_BOOK, MODE_SCROLL]: char.say(self.mantra) *************** *** 195,199 **** elif target and type(target).__name__ == 'wpchar': target = target.serial ! char.addtimer(self.calcdelay(char, mode), 'magic.spell.callback', [self, mode, args, target, item], 0, 0, "cast_delay") return 1 --- 195,199 ---- elif target and type(target).__name__ == 'wpchar': target = target.serial ! char.addtimer(self.calcdelay(char, mode), 'magic.spell.callback', [self, mode, args, target, item], 0, 0, "cast_delay") return 1 *************** *** 205,209 **** if mode == MODE_SCROLL: mana = (mana + 1) / 2 ! percent = properties.fromchar(char, LOWERMANACOST) / 100.0 return max(0, mana - int(percent * float(mana))) --- 205,209 ---- if mode == MODE_SCROLL: mana = (mana + 1) / 2 ! percent = properties.fromchar(char, LOWERMANACOST) / 100.0 return max(0, mana - int(percent * float(mana))) *************** *** 327,331 **** fizzle(char) return 0 ! # Check Skill if self.skill != None: --- 327,331 ---- fizzle(char) return 0 ! # Check Skill if self.skill != None: *************** *** 352,357 **** if not char.npc and len(self.reagents) > 0: lowerreagentcost = properties.fromchar(char, LOWERREAGENTCOST) ! ! if lowerreagentcost == 0 or lowerreagentcost > random.randint(0, 99): consumeReagents(char.getbackpack(), self.reagents.copy()) --- 352,357 ---- if not char.npc and len(self.reagents) > 0: lowerreagentcost = properties.fromchar(char, LOWERREAGENTCOST) ! ! if lowerreagentcost == 0 or lowerreagentcost > random.randint(0, 99): consumeReagents(char.getbackpack(), self.reagents.copy()) *************** *** 391,400 **** damage = rolldice(dice, sides, bonus) * 100.0 ! bonus = char.skill[INSCRIPTION] / 100.0 bonus += char.intelligence / 10.0 bonus += properties.fromchar(char, SPELLDAMAGEBONUS) damage *= 1.0 + bonus / 100.0 ! char.checkskill(self.damageskill, 0, 1200) damage *= (30 + (9 * char.skill[self.damageskill]) / 100.0) / 100.0 --- 391,400 ---- damage = rolldice(dice, sides, bonus) * 100.0 ! bonus = char.skill[INSCRIPTION] / 100.0 bonus += char.intelligence / 10.0 bonus += properties.fromchar(char, SPELLDAMAGEBONUS) damage *= 1.0 + bonus / 100.0 ! char.checkskill(self.damageskill, 0, 1200) damage *= (30 + (9 * char.skill[self.damageskill]) / 100.0) / 100.0 *************** *** 532,536 **** self.damage(char, target) else: ! target.addtimer(1000, 'magic.spell.damage_callback', [ self.spellid, char.serial ], 0, 0) # --- 532,536 ---- self.damage(char, target) else: ! target.addtimer(self.delay, 'magic.spell.damage_callback', [ self.spellid, char.serial ], 0, 0) # |