<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="ru">
		<id>https://wiki.uogames.org/index.php?action=history&amp;feed=atom&amp;title=MediaWiki%3ACalculator.js%2FMana_Regeneration.js</id>
		<title>MediaWiki:Calculator.js/Mana Regeneration.js - История изменений</title>
		<link rel="self" type="application/atom+xml" href="https://wiki.uogames.org/index.php?action=history&amp;feed=atom&amp;title=MediaWiki%3ACalculator.js%2FMana_Regeneration.js"/>
		<link rel="alternate" type="text/html" href="https://wiki.uogames.org/index.php?title=MediaWiki:Calculator.js/Mana_Regeneration.js&amp;action=history"/>
		<updated>2026-06-07T02:00:50Z</updated>
		<subtitle>История изменений этой страницы в вики</subtitle>
		<generator>MediaWiki 1.30.0</generator>

	<entry>
		<id>https://wiki.uogames.org/index.php?title=MediaWiki:Calculator.js/Mana_Regeneration.js&amp;diff=21759&amp;oldid=prev</id>
		<title>Alastar: Новая страница: «/**  * Calculator that calculates your mana regenerated per second based on Meditation, Focus, Intelligence, and equipped MR.  */ function ManaPerSecondCalculator…»</title>
		<link rel="alternate" type="text/html" href="https://wiki.uogames.org/index.php?title=MediaWiki:Calculator.js/Mana_Regeneration.js&amp;diff=21759&amp;oldid=prev"/>
				<updated>2019-08-25T09:14:20Z</updated>
		
		<summary type="html">&lt;p&gt;Новая страница: «‎&lt;span dir=&quot;auto&quot;&gt;&lt;span class=&quot;autocomment&quot;&gt;*  * Calculator that calculates your mana regenerated per second based on Meditation, Focus, Intelligence, and equipped MR.: &lt;/span&gt; function ManaPerSecondCalculator…»&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;Новая страница&lt;/b&gt;&lt;/p&gt;&lt;div&gt;/**&lt;br /&gt;
 * Calculator that calculates your mana regenerated per second based on Meditation, Focus, Intelligence, and equipped MR.&lt;br /&gt;
 */&lt;br /&gt;
function ManaPerSecondCalculator() {&lt;br /&gt;
    var calculate = function(meditation, focus, int, mr, passive, active, nonMed) {&lt;br /&gt;
        var gmBonus = 1.0;&lt;br /&gt;
        if (!meditation.value || !isNumeric(meditation.value)) {&lt;br /&gt;
            meditation.value = '0.0';&lt;br /&gt;
        } else if (meditation.value &amp;gt;= 100) {&lt;br /&gt;
            gmBonus = 1.1;&lt;br /&gt;
            if (meditation.value &amp;gt; 120) {&lt;br /&gt;
                meditation.value = '120.0'&lt;br /&gt;
            }&lt;br /&gt;
        }&lt;br /&gt;
        if (!focus.value || !isNumeric(focus.value)) {&lt;br /&gt;
            focus.value = '0.0';&lt;br /&gt;
        } else if (focus.value &amp;gt; 120) {&lt;br /&gt;
            focus.value = '120.0';&lt;br /&gt;
        }&lt;br /&gt;
        if (!int.value || !isNumeric(int.value)) {&lt;br /&gt;
            int.value = '0';&lt;br /&gt;
        } else if (int.value &amp;gt; 168) {&lt;br /&gt;
            int.value = '168';&lt;br /&gt;
        }&lt;br /&gt;
        if (!mr.value || !isNumeric(mr.value)) {&lt;br /&gt;
            mr.value = '0';&lt;br /&gt;
        }&lt;br /&gt;
&lt;br /&gt;
        var baseRate = 0.2;&lt;br /&gt;
        var focusBonus = parseFloat(focus.value) / 200;&lt;br /&gt;
        var medBonus = gmBonus * ((0.0075 * parseFloat(meditation.value)) + (0.0025 * parseFloat(int.value)));&lt;br /&gt;
        var finalItemBonus = 0;&lt;br /&gt;
        if (parseFloat(mr.value) &amp;gt; 0) {&lt;br /&gt;
            var baseItemBonus = ((((parseFloat(meditation.value) / 2) + (parseFloat(focus.value) / 4)) / 90) * 0.65) + 2.35;&lt;br /&gt;
            var intensityBonus = Math.min(Math.sqrt(parseFloat(mr.value)), 5.5);&lt;br /&gt;
            finalItemBonus = ((baseItemBonus * intensityBonus) - (baseItemBonus - 1)) / 10;&lt;br /&gt;
        }&lt;br /&gt;
        var manaPerSecond = baseRate + focusBonus + medBonus + finalItemBonus;&lt;br /&gt;
        manaPerSecond = manaPerSecond.toFixed(4);&lt;br /&gt;
        removeChildren(passive);&lt;br /&gt;
        passive.appendChild(document.createTextNode(manaPerSecond + ' MPS'));&lt;br /&gt;
        manaPerSecond = baseRate + focusBonus + (2 * medBonus) + finalItemBonus;&lt;br /&gt;
        manaPerSecond = manaPerSecond.toFixed(4);&lt;br /&gt;
        removeChildren(active);&lt;br /&gt;
        active.appendChild(document.createTextNode(manaPerSecond + ' MPS'));&lt;br /&gt;
        manaPerSecond = baseRate + focusBonus + finalItemBonus;&lt;br /&gt;
        manaPerSecond = manaPerSecond.toFixed(4);&lt;br /&gt;
        removeChildren(nonMed);&lt;br /&gt;
        nonMed.appendChild(document.createTextNode(manaPerSecond + ' MPS'));&lt;br /&gt;
    };&lt;br /&gt;
&lt;br /&gt;
    var resetCalculator = function() {&lt;br /&gt;
        meditationInput.value = '';&lt;br /&gt;
        focusInput.value = '';&lt;br /&gt;
        intInput.value = '';&lt;br /&gt;
        mrInput.value = '';&lt;br /&gt;
        removeChildren(passivePerSecond);&lt;br /&gt;
        passivePerSecond.appendChild(document.createTextNode('0.0000 MPS'));&lt;br /&gt;
        removeChildren(activePerSecond);&lt;br /&gt;
        activePerSecond.appendChild(document.createTextNode('0.0000 MPS'));&lt;br /&gt;
        removeChildren(nonMedPerSecond);&lt;br /&gt;
        nonMedPerSecond.appendChild(document.createTextNode('0.0000 MPS'));&lt;br /&gt;
        meditationInput.focus();&lt;br /&gt;
    };&lt;br /&gt;
&lt;br /&gt;
    var detectKey = function(keyEvent) {&lt;br /&gt;
        var keyID = window.event ? event.keyCode : keyEvent.keyCode;&lt;br /&gt;
        if (keyID == 13)&lt;br /&gt;
            calculate(meditationInput, focusInput, intInput, mrInput, passivePerSecond, activePerSecond, nonMedPerSecond);&lt;br /&gt;
        else if (keyID == 27)&lt;br /&gt;
            resetCalculator(meditationInput, focusInput, intInput, mrInput, passivePerSecond, activePerSecond, nonMedPerSecond);&lt;br /&gt;
    };&lt;br /&gt;
&lt;br /&gt;
    var calcTableRow = document.createElement('tr');&lt;br /&gt;
    var calcTableCell = document.createElement('td');&lt;br /&gt;
    calcTableRow.appendChild(calcTableCell);&lt;br /&gt;
&lt;br /&gt;
    var innerTable = document.createElement('table');&lt;br /&gt;
    innerTable.style.borderCollapse = 'collapse';&lt;br /&gt;
    calcTableCell.appendChild(innerTable);&lt;br /&gt;
&lt;br /&gt;
    var innerBody = document.createElement('tbody');&lt;br /&gt;
    innerTable.appendChild(innerBody);&lt;br /&gt;
&lt;br /&gt;
    var innerRow = document.createElement('tr');&lt;br /&gt;
&lt;br /&gt;
    var innerCell = document.createElement('td');&lt;br /&gt;
    innerCell.style.textAlign = 'right';&lt;br /&gt;
    innerCell.appendChild(document.createTextNode('Meditation:'));&lt;br /&gt;
    innerRow.appendChild(innerCell);&lt;br /&gt;
&lt;br /&gt;
    var meditationInput = document.createElement('input');&lt;br /&gt;
    meditationInput.maxLength = '5';&lt;br /&gt;
    meditationInput.type = 'text';&lt;br /&gt;
    meditationInput.style.width = '50px';&lt;br /&gt;
    meditationInput.onkeyup = function(keyEvent) {&lt;br /&gt;
        detectKey(keyEvent);&lt;br /&gt;
    };&lt;br /&gt;
    innerCell = document.createElement('td');&lt;br /&gt;
    innerCell.style.textAlign = 'left';&lt;br /&gt;
    innerCell.appendChild(meditationInput);&lt;br /&gt;
    innerRow.appendChild(innerCell);&lt;br /&gt;
    innerBody.appendChild(innerRow);&lt;br /&gt;
&lt;br /&gt;
    innerCell = document.createElement('td');&lt;br /&gt;
    innerCell.style.textAlign = 'right';&lt;br /&gt;
    innerCell.appendChild(document.createTextNode('Focus:'));&lt;br /&gt;
    innerRow = document.createElement('tr');&lt;br /&gt;
    innerRow.appendChild(innerCell);&lt;br /&gt;
&lt;br /&gt;
    var focusInput = document.createElement('input');&lt;br /&gt;
    focusInput.maxLength = '5';&lt;br /&gt;
    focusInput.type = 'text';&lt;br /&gt;
    focusInput.style.width = '50px';&lt;br /&gt;
    focusInput.onkeyup = function(keyEvent) {&lt;br /&gt;
        detectKey(keyEvent);&lt;br /&gt;
    };&lt;br /&gt;
    innerCell = document.createElement('td');&lt;br /&gt;
    innerCell.style.textAlign = 'left';&lt;br /&gt;
    innerCell.appendChild(focusInput);&lt;br /&gt;
    innerRow.appendChild(innerCell);&lt;br /&gt;
    innerBody.appendChild(innerRow);&lt;br /&gt;
&lt;br /&gt;
    innerCell = document.createElement('td');&lt;br /&gt;
    innerCell.style.textAlign = 'right';&lt;br /&gt;
    innerCell.appendChild(document.createTextNode('Intelligence:'));&lt;br /&gt;
    innerRow = document.createElement('tr');&lt;br /&gt;
    innerRow.appendChild(innerCell);&lt;br /&gt;
&lt;br /&gt;
    var intInput = document.createElement('input');&lt;br /&gt;
    intInput.maxLength = '3';&lt;br /&gt;
    intInput.type = 'text';&lt;br /&gt;
    intInput.style.width = '50px';&lt;br /&gt;
    intInput.onkeyup = function(keyEvent) {&lt;br /&gt;
        detectKey(keyEvent);&lt;br /&gt;
    };&lt;br /&gt;
    innerCell = document.createElement('td');&lt;br /&gt;
    innerCell.style.textAlign = 'left';&lt;br /&gt;
    innerCell.appendChild(intInput);&lt;br /&gt;
    innerRow.appendChild(innerCell);&lt;br /&gt;
    innerBody.appendChild(innerRow);&lt;br /&gt;
&lt;br /&gt;
    innerCell = document.createElement('td');&lt;br /&gt;
    innerCell.style.textAlign = 'right';&lt;br /&gt;
    innerCell.appendChild(document.createTextNode('Equipped MR:'));&lt;br /&gt;
    innerRow = document.createElement('tr');&lt;br /&gt;
    innerRow.appendChild(innerCell);&lt;br /&gt;
&lt;br /&gt;
    var mrInput = document.createElement('input');&lt;br /&gt;
    mrInput.maxLength = '2';&lt;br /&gt;
    mrInput.type = 'text';&lt;br /&gt;
    mrInput.style.width = '50px';&lt;br /&gt;
    mrInput.onkeyup = function(keyEvent) {&lt;br /&gt;
        detectKey(keyEvent);&lt;br /&gt;
    };&lt;br /&gt;
    innerCell = document.createElement('td');&lt;br /&gt;
    innerCell.style.textAlign = 'left';&lt;br /&gt;
    innerCell.appendChild(mrInput);&lt;br /&gt;
    innerRow.appendChild(innerCell);&lt;br /&gt;
    innerBody.appendChild(innerRow);&lt;br /&gt;
&lt;br /&gt;
    var calculateButton = document.createElement('input');&lt;br /&gt;
    calculateButton.type = 'button';&lt;br /&gt;
    calculateButton.value = 'Calculate';&lt;br /&gt;
    calculateButton.style.width = '75px';&lt;br /&gt;
    calculateButton.onclick = function() {&lt;br /&gt;
        calculate(meditationInput, focusInput, intInput, mrInput, passivePerSecond, activePerSecond, nonMedPerSecond);&lt;br /&gt;
    };&lt;br /&gt;
    innerCell = document.createElement('td');&lt;br /&gt;
    innerCell.appendChild(calculateButton);&lt;br /&gt;
    innerRow = document.createElement('tr');&lt;br /&gt;
    innerRow.appendChild(innerCell);&lt;br /&gt;
&lt;br /&gt;
    var resetButton = document.createElement('input');&lt;br /&gt;
    resetButton.type = 'button';&lt;br /&gt;
    resetButton.value = 'Reset';&lt;br /&gt;
    resetButton.style.width = '75px';&lt;br /&gt;
    resetButton.onclick = function() {&lt;br /&gt;
        resetCalculator(meditationInput, focusInput, intInput, mrInput, passivePerSecond, activePerSecond, nonMedPerSecond);&lt;br /&gt;
    };&lt;br /&gt;
    innerCell = document.createElement('td');&lt;br /&gt;
    innerCell.appendChild(resetButton);&lt;br /&gt;
    innerRow.appendChild(innerCell);&lt;br /&gt;
    innerBody.appendChild(innerRow);&lt;br /&gt;
&lt;br /&gt;
    innerCell = document.createElement('td');&lt;br /&gt;
    innerCell.style.textAlign = 'right';&lt;br /&gt;
    innerCell.appendChild(document.createTextNode('Passive:'));&lt;br /&gt;
    innerRow = document.createElement('tr');&lt;br /&gt;
    innerRow.appendChild(innerCell);&lt;br /&gt;
&lt;br /&gt;
    var passivePerSecond = document.createElement('div');&lt;br /&gt;
    passivePerSecond.appendChild(document.createTextNode('0.0000 MPS'));&lt;br /&gt;
    passivePerSecond.style.textAlign = 'right';&lt;br /&gt;
    passivePerSecond.style.width = '75px';&lt;br /&gt;
    innerCell = document.createElement('td');&lt;br /&gt;
    innerCell.appendChild(passivePerSecond);&lt;br /&gt;
    innerRow.appendChild(innerCell);&lt;br /&gt;
    innerBody.appendChild(innerRow);&lt;br /&gt;
&lt;br /&gt;
    innerCell = document.createElement('td');&lt;br /&gt;
    innerCell.style.textAlign = 'right';&lt;br /&gt;
    innerCell.appendChild(document.createTextNode('Active:'));&lt;br /&gt;
    innerRow = document.createElement('tr');&lt;br /&gt;
    innerRow.appendChild(innerCell);&lt;br /&gt;
&lt;br /&gt;
    var activePerSecond = document.createElement('div');&lt;br /&gt;
    activePerSecond.appendChild(document.createTextNode('0.0000 MPS'));&lt;br /&gt;
    activePerSecond.style.textAlign = 'right';&lt;br /&gt;
    activePerSecond.style.width = '75px';&lt;br /&gt;
    innerCell = document.createElement('td');&lt;br /&gt;
    innerCell.appendChild(activePerSecond);&lt;br /&gt;
    innerRow.appendChild(innerCell);&lt;br /&gt;
    innerBody.appendChild(innerRow);&lt;br /&gt;
&lt;br /&gt;
    innerCell = document.createElement('td');&lt;br /&gt;
    innerCell.style.textAlign = 'right';&lt;br /&gt;
    innerCell.appendChild(document.createTextNode('Non-Meddable:'));&lt;br /&gt;
    innerRow = document.createElement('tr');&lt;br /&gt;
    innerRow.appendChild(innerCell);&lt;br /&gt;
&lt;br /&gt;
    var nonMedPerSecond = document.createElement('div');&lt;br /&gt;
    nonMedPerSecond.appendChild(document.createTextNode('0.0000 MPS'));&lt;br /&gt;
    nonMedPerSecond.style.textAlign = 'right';&lt;br /&gt;
    nonMedPerSecond.style.width = '75px';&lt;br /&gt;
    innerCell = document.createElement('td');&lt;br /&gt;
    innerCell.appendChild(nonMedPerSecond);&lt;br /&gt;
    innerRow.appendChild(innerCell);&lt;br /&gt;
    innerBody.appendChild(innerRow);&lt;br /&gt;
&lt;br /&gt;
    return calcTableRow;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
function searchForCalculators() {&lt;br /&gt;
    var calculators = document.getElementsByTagName('div');&lt;br /&gt;
&lt;br /&gt;
    for (var i in calculators) {&lt;br /&gt;
         if (calculators[i].id == 'ManaPerSecond') {&lt;br /&gt;
             Calculator(ManaPerSecondCalculator(), 'ManaPerSecond', 'Mana Per Second', 1);&lt;br /&gt;
         }&lt;br /&gt;
    }&lt;br /&gt;
}&lt;br /&gt;
addOnloadHook(searchForCalculators);&lt;/div&gt;</summary>
		<author><name>Alastar</name></author>	</entry>

	</feed>