Closed palra closed 9 years ago
done only for protections
Because a character is advantaged when wearing a protection, but not when carrying a cure, therefore it should not disadvantage him
The strategy is the same : when an item is added, we remove a proportional amount of speed depending of the item's weight. A Cure should have a 0 weight so.
https://github.com/palra/univ-mmorpg/blob/feature/serialization/src/main/java/fr/univdevs/mmorpg/engine/character/Item.java#L146-L166
The speed of a character is linked to the weight of the items he has on it. So, we can set the speed of a given Character from here, as every item has a weight. The child classes, then, may have to call
super.onRegister(Character)