Add condition to make item reset in lose_buffs_on_drop.py only occur if the items has been used since last time it was reset.
git-svn-id: svn://svn.code.sf.net/p/crossfire/code/maps/trunk@21301 282e977c-c81d-0410-88c4-b93c2d0d6712master
parent
219e1b9049
commit
7ecd9c667a
|
@ -1,5 +1,7 @@
|
|||
2020-08-22 Daniel Hawkins
|
||||
* python/commands/dip.py: Make the water identified to avoid infinite identify xp.
|
||||
* python/items/lose_buffs_on_drop.py: Add condition to make the calculation only
|
||||
if the item has been used since last time it was dropped.
|
||||
|
||||
2020-08-16 Rick Tanner
|
||||
|
||||
|
|
|
@ -3,24 +3,26 @@ import Crossfire
|
|||
me = Crossfire.WhoAmI()
|
||||
ac = Crossfire.WhoIsActivator()
|
||||
|
||||
me.Str = me.Archetype.Clone.Str
|
||||
me.Dex = me.Archetype.Clone.Dex
|
||||
me.Con = me.Archetype.Clone.Con
|
||||
me.Int = me.Archetype.Clone.Int
|
||||
me.Pow = me.Archetype.Clone.Pow
|
||||
me.Wis = me.Archetype.Clone.Wis
|
||||
me.Cha = me.Archetype.Clone.Cha
|
||||
me.HP = me.Archetype.Clone.HP
|
||||
me.SP = me.Archetype.Clone.SP
|
||||
me.Grace = me.Archetype.Clone.Grace
|
||||
me.LastSP = me.Archetype.Clone.LastSP
|
||||
me.WC = me.Archetype.Clone.WC
|
||||
me.AC = me.Archetype.Clone.AC
|
||||
me.Dam = me.Archetype.Clone.Dam
|
||||
me.Weight = me.Archetype.Clone.Weight
|
||||
me.AttackType = me.Archetype.Clone.AttackType
|
||||
me.Food = me.Archetype.Clone.Food
|
||||
# Experience should be affected before Item Power, since it affects that field
|
||||
me.AddExp(-me.PermExp)
|
||||
me.ItemPower = me.Archetype.Clone.ItemPower
|
||||
ac.Write("The "+me.Name+" shudders and looks almost like a normal weapon again.")
|
||||
# It is assumed that this buffed weapon uses PermExp to denote how much it has been used.
|
||||
if me.PermExp > 0:
|
||||
me.Str = me.Archetype.Clone.Str
|
||||
me.Dex = me.Archetype.Clone.Dex
|
||||
me.Con = me.Archetype.Clone.Con
|
||||
me.Int = me.Archetype.Clone.Int
|
||||
me.Pow = me.Archetype.Clone.Pow
|
||||
me.Wis = me.Archetype.Clone.Wis
|
||||
me.Cha = me.Archetype.Clone.Cha
|
||||
me.HP = me.Archetype.Clone.HP
|
||||
me.SP = me.Archetype.Clone.SP
|
||||
me.Grace = me.Archetype.Clone.Grace
|
||||
me.LastSP = me.Archetype.Clone.LastSP
|
||||
me.WC = me.Archetype.Clone.WC
|
||||
me.AC = me.Archetype.Clone.AC
|
||||
me.Dam = me.Archetype.Clone.Dam
|
||||
me.Weight = me.Archetype.Clone.Weight
|
||||
me.AttackType = me.Archetype.Clone.AttackType
|
||||
me.Food = me.Archetype.Clone.Food
|
||||
# Experience should be affected before Item Power, since it affects that field
|
||||
me.AddExp(-me.PermExp)
|
||||
me.ItemPower = me.Archetype.Clone.ItemPower
|
||||
ac.Write("The "+me.Name+" shudders and looks almost like a normal weapon again.")
|
||||
|
|
Loading…
Reference in New Issue