Comments (2)
I looked into this issue a bit and found that it is a little more complicated than just multiplying every number by 10. While that is effectively what it's doing they do it before calculations which makes a difference. The only fix would be to add a new value to the table of every enemy that has its max hit for Adventure Mode or to calculate it like the game does. I don't have access to every enemy on Adventure Mode yet but if we go the calculate route it would be pretty easy to get all the enemies and make it future proof when they add more too. The list of in game monsters and their data can be found here. The damage calculation for enemies looks like it is mostly the same as for players.
function calculateEnemyStrength(enemy = enemyInCombat) {
if (enemy !== null && enemy !== undefined) {
if (combatData.enemy.attackType === CONSTANTS.attackType.Melee) {
combatData.enemy.effectiveStrengthLevel = Math.floor(combatData.enemy.strengthLevel + 8 + 1);
combatData.enemy.maximumStrengthRoll = Math.floor(numberMultiplier * (1.3 + combatData.enemy.effectiveStrengthLevel / 10 + combatData.enemy.strengthBonus / 80 + (combatData.enemy.effectiveStrengthLevel * combatData.enemy.strengthBonus) / 640));
} else if (combatData.enemy.attackType === CONSTANTS.attackType.Ranged) {
combatData.enemy.effectiveStrengthLevel = Math.floor(combatData.enemy.rangedLevel + 8 + 1);
combatData.enemy.maximumStrengthRoll = Math.floor(numberMultiplier * (1.3 + combatData.enemy.effectiveStrengthLevel / 10 + combatData.enemy.strengthBonusRanged / 80 + (combatData.enemy.effectiveStrengthLevel * combatData.enemy.strengthBonusRanged) / 640));
} else if (combatData.enemy.attackType === CONSTANTS.attackType.Magic) {
if (!isGolbinRaid) {
if (MONSTERS[enemy].selectedSpell === null || MONSTERS[enemy].selectedSpell === undefined) combatData.enemy.maximumStrengthRoll = Math.floor(numberMultiplier * (MONSTERS[enemy].setMaxHit + MONSTERS[enemy].setMaxHit * (combatData.enemy.damageBonusMagic / 100)));
else combatData.enemy.maximumStrengthRoll = Math.floor(numberMultiplier * (SPELLS[MONSTERS[enemy].selectedSpell].maxHit + SPELLS[MONSTERS[enemy].selectedSpell].maxHit * (combatData.enemy.damageBonusMagic / 100)));
} else {
combatData.enemy.effectiveStrengthLevel = Math.floor(combatData.enemy.magicLevel + 8 + 1);
combatData.enemy.maximumStrengthRoll = Math.floor(numberMultiplier * (1.3 + combatData.enemy.effectiveStrengthLevel / 10 + combatData.enemy.magicStrengthBonus / 80 + (combatData.enemy.effectiveStrengthLevel * combatData.enemy.magicStrengthBonus) / 640));
}
}
}
}
Then it just does damage reduction and formats it.
function updateEnemyMaxHit() {
if (isInCombat && !newEnemyLoading) {
if (damageReduction > 0) $("#combat-enemy-strength-bonus").text("(" + numberWithCommas(Math.floor(combatData.enemy.maximumStrengthRoll * (1 - damageReduction / 100))) + ")");
else $("#combat-enemy-strength-bonus").text(numberWithCommas(combatData.enemy.maximumStrengthRoll));
}
}
The code for the combat stuff can be found here
from caniidle.
Sorry this was fixed ages back and i shouldve closed this out. I have fully changed over to using actual level calculation of damage in early .20 release of Melvor Idle. Though this needs to be updated for .21 as the formula have changed for some things.
from caniidle.
Related Issues (18)
- Feature Request: Suggested gear for max DR and damage? HOT 2
- Take into account player attack speed for stun bonus damage HOT 2
- Incorrect max hits HOT 11
- Increased max hit on stun not being calculated HOT 2
- Died despite the calculator saying I can idle (Turkul Giants) HOT 1
- Redemption prayer 1.0 changes HOT 1
- Resurrected Eye Missing From Volcanic Cave HOT 1
- feature request: filtering slayer tier enemies when auto-slayer enabled HOT 11
- Typo in the footer HOT 1
- Slayer calc is incorrect HOT 2
- Aeris damage values are incorrect. HOT 1
- Furious Horned Elite Horn Shots Calculation HOT 2
- wicked greater dragon's confusion damage calc HOT 3
- Calculation on Water God Dungeon HOT 2
- Add weakining calculations for magic style HOT 1
- Combat Triangle in "Internal Suffering Mode" HOT 1
- Dungeon tab does not include the "Strange Cave" dungeon. HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from caniidle.