Crossfire Server, Trunk
lose_buffs_on_drop.py
Go to the documentation of this file.
1 import Crossfire
2 
3 me = Crossfire.WhoAmI()
4 ac = Crossfire.WhoIsActivator()
5 
6 # It is assumed that this buffed weapon uses PermExp to denote how much it has been used.
7 if me.PermExp() > 0:
8  me.Str = me.Archetype.Clone.Str
9  me.Dex = me.Archetype.Clone.Dex
10  me.Con = me.Archetype.Clone.Con
11  me.Int = me.Archetype.Clone.Int
12  me.Pow = me.Archetype.Clone.Pow
13  me.Wis = me.Archetype.Clone.Wis
14  me.Cha = me.Archetype.Clone.Cha
15  me.HP = me.Archetype.Clone.HP
16  me.SP = me.Archetype.Clone.SP
17  me.Grace = me.Archetype.Clone.Grace
18  me.LastSP = me.Archetype.Clone.LastSP
19  me.WC = me.Archetype.Clone.WC
20  me.AC = me.Archetype.Clone.AC
21  me.Dam = me.Archetype.Clone.Dam
22  me.Weight = me.Archetype.Clone.Weight
23  me.AttackType = me.Archetype.Clone.AttackType
24  me.Food = me.Archetype.Clone.Food
25  # Experience should be affected before Item Power, since it affects that field
26  me.AddExp(-me.TotalExp)
27  me.ItemPower = me.Archetype.Clone.ItemPower
28  if ac.Type == Crossfire.Type.PLAYER:
29  ac.Write("The "+me.Name+" shudders and looks almost like a normal weapon again.")