Crossfire Server, Trunk
weapon_occidental_mages.py
Go to the documentation of this file.
1 import Crossfire
2 import random
3 
4 me = Crossfire.WhoAmI()
5 ac = Crossfire.WhoIsActivator()
6 r = random.random()
7 
8 if (r <= 0.01):
9  if me.Weight == me.Archetype.Clone.Weight:
10  ac.Write("Your weapon suddenly seems lighter!")
11  me.Weight = 9 * me.Archetype.Clone.Weight / 10
12  me.Dam = me.Archetype.Clone.Dam
13  me.LastSP = me.Archetype.Clone.LastSP
14 elif (r <= 0.02):
15  if me.Dam == me.Archetype.Clone.Dam:
16  ac.Write("Your weapon suddenly seems sharper!")
17  me.Dam = 2 * me.Archetype.Clone.Dam
18  me.Weight = me.Archetype.Clone.Weight
19  me.LastSP = me.Archetype.Clone.LastSP
20 elif (r <= 0.03):
21  if me.LastSP == me.Archetype.Clone.LastSP and me.LastSP != 0:
22  ac.Write("Your weapon suddenly seems easier to handle!")
23  me.LastSP = me.Archetype.Clone.LastSP - 1
24  me.Dam = me.Archetype.Clone.Dam
25  me.Weight = me.Archetype.Clone.Weight
26 elif (r <= 0.04):
27  ac.Write("Your weapon suddenly seems colder!")
28  me.AttackType = Crossfire.AttackType.COLD + Crossfire.AttackType.PHYSICAL
29 elif (r <= 0.05):
30  ac.Write("Your weapon suddenly seems warmer!")
31  me.AttackType=Crossfire.AttackType.FIRE + Crossfire.AttackType.PHYSICAL
32 elif (r <= 0.06):
33  ac.Write("Your weapon suddenly emits sparks!")
34  me.AttackType=Crossfire.AttackType.ELECTRICITY + Crossfire.AttackType.PHYSICAL