User:MentalMouse42/Book Mechanics

New text for Combining enchantments, based on an IPanon's code-diving:

The anvil calculates cost in two groups of costs. Both of these are modified (several costs are halved) if the "sacrifice" is a book, see notes:
 * The first, "fixed" segment.
 * The cost for durability repair, as above.
 * For any sacrifice enchantments which are incompatible with the target: 1 per level of each such enchantment.
 * If renaming the item, a base cost of 7 for items with durability, 5 for other items.
 * For each level of new or increased enchantments, the cost-per-level,
 * The "extra" cost segment:
 * The target's base value (but reduced if combining with a book).
 * The prior repair penalties (see above) for both target and sacrifice.
 * If renaming an item that has already been renamed, half the basic renaming cost (rounded down): That's 3 or 2, for items with or without durability.
 * Again, for each level of new or increased enchantment, the cost-per-level.
 * If both items have the same enchantment at maximum level, add the cost per level once,without halving it for a book.
 * Cost for adding new enchantments: If no enchantments are added (raising the level doesn't count), this is 0. Otherwise, let X be the number of enchantments added, and T the total number of enchantments on the result. Add X×(T-1)+1.