- Joined
- Mar 27, 2012
- Messages
- 3,232
Some time ago I found a bug with items, that can essentially be summed up as:
If an item is removed upon being sold, then its abilities still apply to the unit.
Removing abilities added in this way is done in exactly the same way as usual. Note that doing so will remove all copies of the ability.
Possible uses:
1. Tomes that don't leak items (normal ones kill the item, but never remove it).
2. Adding invisible abilities to a unit without using spellbooks and thus, without any chance of spellbook collisions revealing them.
3. Adding multiples of the same ability to a unit (why?)
If an item is removed upon being sold, then its abilities still apply to the unit.
Removing abilities added in this way is done in exactly the same way as usual. Note that doing so will remove all copies of the ability.
The order of operations is slightly wrong in the case of sold items. First the item's abilities are applied, then the "item is sold" event launches and only then is that item actually added to the unit.
This means that removing an item upon this event will make the system try to add a null item to the unit, which is impossible and fails silently.
Since the item is never added to the unit, then it can't trigger "lose item" events either and thus, its abilities are not removed.
This means that removing an item upon this event will make the system try to add a null item to the unit, which is impossible and fails silently.
Since the item is never added to the unit, then it can't trigger "lose item" events either and thus, its abilities are not removed.
Possible uses:
1. Tomes that don't leak items (normal ones kill the item, but never remove it).
2. Adding invisible abilities to a unit without using spellbooks and thus, without any chance of spellbook collisions revealing them.
3. Adding multiples of the same ability to a unit (why?)