Adapt scripts to latest Python plugin.

git-svn-id: svn://svn.code.sf.net/p/crossfire/code/maps/trunk@6087 282e977c-c81d-0410-88c4-b93c2d0d6712
master
ryo_saeba 2007-04-21 22:44:30 +00:00
parent 05adafa14a
commit a4cb2ddb5a
2 changed files with 51 additions and 49 deletions

View File

@ -5,28 +5,30 @@ me = Crossfire.WhoAmI()
ac = Crossfire.WhoIsActivator() ac = Crossfire.WhoIsActivator()
r = random.random() r = random.random()
if (me.Applied): # Event is called before object is applied, so changing our properties just before it's actually
if (r <= 0.01): # applied instead of when removed
me.Identified=0 if (me.Applied == 0):
me.Cursed= 1 if (r <= 0.01):
me.Dexterity= me.Dexterity+1 me.Cursed= 1
elif (r <= 0.02): me.Dex = me.Dex + 1
me.Identified=0 me.Identified=0
me.Cursed= 1 elif (r <= 0.02):
me.Intelligence= me.Intelligence+1 me.Cursed= 1
elif (r <= 0.03): me.Int = me.Int + 1
me.Identified=0 me.Identified=0
me.Cursed= 1 elif (r <= 0.03):
me.Constitution= me.Constitution+1 me.Cursed= 1
elif (r >= 0.99): me.Con = me.Con + 1
me.Identified=0 me.Identified=0
me.Cursed= 1 elif (r >= 0.97):
me.Dexterity= me.Dexterity-1 me.Cursed= 1
elif (r >= 0.98): me.Dex = me.Dex - 1
me.Identified=0 me.Identified=0
me.Cursed= 1 elif (r >= 0.98):
me.Intelligence= me.Intelligence-1 me.Cursed= 1
elif (r >= 0.97): me.Int = me.Int - 1
me.Identified=0 me.Identified=0
me.Cursed= 1 elif (r >= 0.99):
me.Constitution= me.Constitution-1 me.Cursed= 1
me.Con n= me.Con - 1
me.Identified=0

View File

@ -6,32 +6,32 @@ ac = Crossfire.WhoIsActivator()
r = random.random() r = random.random()
if (r <= 0.01): if (r <= 0.01):
ac.Write("Your weapon suddenly seems lighter !") ac.Write("Your weapon suddenly seems lighter!")
me.Damage=me.Damage+10 me.Dam = me.Dam + 10
me.Identified=0 me.BeenApplied=0
me.BeenApplied=0 me.Identified=0
elif (r <= 0.02): elif (r <= 0.02):
ac.Write("Your weapon suddenly seems darker !") ac.Write("Your weapon suddenly seems darker!")
me.Damage=me.Damage-10 me.Dam = me.Dam - 10
me.Identified=0 me.BeenApplied=0
me.BeenApplied=0 me.Identified=0
elif (r <= 0.03): elif (r <= 0.03):
ac.Write("Your weapon suddenly seems lighter !") ac.Write("Your weapon suddenly seems lighter!")
me.Damage=me.Damage+10 me.Dam = me.Dam + 10
me.Identified=0 me.Identified=0
me.BeenApplied=0 me.BeenApplied=0
elif (r <= 0.04): elif (r <= 0.04):
ac.Write("Your weapon suddenly seems colder !") ac.Write("Your weapon suddenly seems colder!")
me.AttackType=Crossfire.AttackTypeCold() + Crossfire.AttackTypePhysical()) me.AttackType = Crossfire.AttackType.COLD + Crossfire.AttackType.PHYSICAL
me.Identified=0 me.Identified=0
me.BeenApplied=0 me.BeenApplied=0
elif (r <= 0.05): elif (r <= 0.05):
ac.Write("Your weapon suddenly seems warmer !") ac.Write("Your weapon suddenly seems warmer!")
me.AttackType=Crossfire.AttackTypeFire() + Crossfire.AttackTypePhysical()) me.AttackType=Crossfire.AttackType.FIRE + Crossfire.AttackType.PHYSICAL
me.Identified=0 me.Identified=0
me.BeenApplied=0 me.BeenApplied=0
elif (r <= 0.06): elif (r <= 0.06):
ac.Write("Your weapon suddenly emits sparks !") ac.Write("Your weapon suddenly emits sparks!")
me.AttackType=Crossfire.AttackTypeElectricity() + Crossfire.AttackTypePhysical()) me.AttackType=Crossfire.AttackType.ELECTRICITY + Crossfire.AttackType.PHYSICAL
me.Identified=0 me.Identified=0
me.BeenApplied=0 me.BeenApplied=0