Adapt scripts to latest Python plugin.
git-svn-id: svn://svn.code.sf.net/p/crossfire/code/maps/trunk@6087 282e977c-c81d-0410-88c4-b93c2d0d6712master
parent
05adafa14a
commit
a4cb2ddb5a
|
@ -5,28 +5,30 @@ me = Crossfire.WhoAmI()
|
|||
ac = Crossfire.WhoIsActivator()
|
||||
r = random.random()
|
||||
|
||||
if (me.Applied):
|
||||
if (r <= 0.01):
|
||||
me.Identified=0
|
||||
me.Cursed= 1
|
||||
me.Dexterity= me.Dexterity+1
|
||||
elif (r <= 0.02):
|
||||
me.Identified=0
|
||||
me.Cursed= 1
|
||||
me.Intelligence= me.Intelligence+1
|
||||
elif (r <= 0.03):
|
||||
me.Identified=0
|
||||
me.Cursed= 1
|
||||
me.Constitution= me.Constitution+1
|
||||
elif (r >= 0.99):
|
||||
me.Identified=0
|
||||
me.Cursed= 1
|
||||
me.Dexterity= me.Dexterity-1
|
||||
elif (r >= 0.98):
|
||||
me.Identified=0
|
||||
me.Cursed= 1
|
||||
me.Intelligence= me.Intelligence-1
|
||||
elif (r >= 0.97):
|
||||
me.Identified=0
|
||||
me.Cursed= 1
|
||||
me.Constitution= me.Constitution-1
|
||||
# Event is called before object is applied, so changing our properties just before it's actually
|
||||
# applied instead of when removed
|
||||
if (me.Applied == 0):
|
||||
if (r <= 0.01):
|
||||
me.Cursed= 1
|
||||
me.Dex = me.Dex + 1
|
||||
me.Identified=0
|
||||
elif (r <= 0.02):
|
||||
me.Cursed= 1
|
||||
me.Int = me.Int + 1
|
||||
me.Identified=0
|
||||
elif (r <= 0.03):
|
||||
me.Cursed= 1
|
||||
me.Con = me.Con + 1
|
||||
me.Identified=0
|
||||
elif (r >= 0.97):
|
||||
me.Cursed= 1
|
||||
me.Dex = me.Dex - 1
|
||||
me.Identified=0
|
||||
elif (r >= 0.98):
|
||||
me.Cursed= 1
|
||||
me.Int = me.Int - 1
|
||||
me.Identified=0
|
||||
elif (r >= 0.99):
|
||||
me.Cursed= 1
|
||||
me.Con n= me.Con - 1
|
||||
me.Identified=0
|
||||
|
|
|
@ -6,32 +6,32 @@ ac = Crossfire.WhoIsActivator()
|
|||
r = random.random()
|
||||
|
||||
if (r <= 0.01):
|
||||
ac.Write("Your weapon suddenly seems lighter !")
|
||||
me.Damage=me.Damage+10
|
||||
me.Identified=0
|
||||
me.BeenApplied=0
|
||||
ac.Write("Your weapon suddenly seems lighter!")
|
||||
me.Dam = me.Dam + 10
|
||||
me.BeenApplied=0
|
||||
me.Identified=0
|
||||
elif (r <= 0.02):
|
||||
ac.Write("Your weapon suddenly seems darker !")
|
||||
me.Damage=me.Damage-10
|
||||
me.Identified=0
|
||||
me.BeenApplied=0
|
||||
ac.Write("Your weapon suddenly seems darker!")
|
||||
me.Dam = me.Dam - 10
|
||||
me.BeenApplied=0
|
||||
me.Identified=0
|
||||
elif (r <= 0.03):
|
||||
ac.Write("Your weapon suddenly seems lighter !")
|
||||
me.Damage=me.Damage+10
|
||||
me.Identified=0
|
||||
me.BeenApplied=0
|
||||
ac.Write("Your weapon suddenly seems lighter!")
|
||||
me.Dam = me.Dam + 10
|
||||
me.Identified=0
|
||||
me.BeenApplied=0
|
||||
elif (r <= 0.04):
|
||||
ac.Write("Your weapon suddenly seems colder !")
|
||||
me.AttackType=Crossfire.AttackTypeCold() + Crossfire.AttackTypePhysical())
|
||||
me.Identified=0
|
||||
me.BeenApplied=0
|
||||
ac.Write("Your weapon suddenly seems colder!")
|
||||
me.AttackType = Crossfire.AttackType.COLD + Crossfire.AttackType.PHYSICAL
|
||||
me.Identified=0
|
||||
me.BeenApplied=0
|
||||
elif (r <= 0.05):
|
||||
ac.Write("Your weapon suddenly seems warmer !")
|
||||
me.AttackType=Crossfire.AttackTypeFire() + Crossfire.AttackTypePhysical())
|
||||
me.Identified=0
|
||||
me.BeenApplied=0
|
||||
ac.Write("Your weapon suddenly seems warmer!")
|
||||
me.AttackType=Crossfire.AttackType.FIRE + Crossfire.AttackType.PHYSICAL
|
||||
me.Identified=0
|
||||
me.BeenApplied=0
|
||||
elif (r <= 0.06):
|
||||
ac.Write("Your weapon suddenly emits sparks !")
|
||||
me.AttackType=Crossfire.AttackTypeElectricity() + Crossfire.AttackTypePhysical())
|
||||
me.Identified=0
|
||||
me.BeenApplied=0
|
||||
ac.Write("Your weapon suddenly emits sparks!")
|
||||
me.AttackType=Crossfire.AttackType.ELECTRICITY + Crossfire.AttackType.PHYSICAL
|
||||
me.Identified=0
|
||||
me.BeenApplied=0
|
||||
|
|
Loading…
Reference in New Issue