Files
prestonbane/src/engine/objects/MobBaseStats.java
T
MagicBotandClaude Opus 5.5 06a421de0f Load MobBaseStats from the race rune's rune_attr_adj
Parity (scripts/p32.py, static_npc_mobbase_stats by loadID vs rune_attr_adj):
2301 of 2375 mobbases identical. 74 have no stats row and went from all-zero
stats to the rune values: CSR 2020/2021, summoner pets 12024-12035 and
13266-13301, clay constructs 12200-12202/12375/12382, Guard 13170 (not spawned
or contracted), necro undead 13339-13348, and 13961, 14167, 14168, 14260-14262,
14285, 14292. On dev 47 obj_mob spawns use these (13343, 14167, 14168, 14285,
14292). Effect: higher rune skill values for these mobs via CharacterSkill.
LOAD_STATS stays until the table is dropped.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-23 14:32:59 -04:00

104 lines
3.1 KiB
Java

// • ▌ ▄ ·. ▄▄▄· ▄▄ • ▪ ▄▄· ▄▄▄▄· ▄▄▄· ▐▄▄▄ ▄▄▄ .
// ·██ ▐███▪▐█ ▀█ ▐█ ▀ ▪██ ▐█ ▌▪▐█ ▀█▪▐█ ▀█ •█▌ ▐█▐▌·
// ▐█ ▌▐▌▐█·▄█▀▀█ ▄█ ▀█▄▐█·██ ▄▄▐█▀▀█▄▄█▀▀█ ▐█▐ ▐▌▐▀▀▀
// ██ ██▌▐█▌▐█ ▪▐▌▐█▄▪▐█▐█▌▐███▌██▄▪▐█▐█ ▪▐▌██▐ █▌▐█▄▄▌
// ▀▀ █▪▀▀▀ ▀ ▀ ·▀▀▀▀ ▀▀▀·▀▀▀ ·▀▀▀▀ ▀ ▀ ▀▀ █▪ ▀▀▀
// Magicbane Emulator Project © 2013 - 2026
// https://www.magicbane.com
package engine.objects;
import engine.mbEnums;
import engine.parsers.objects.RuneTemplate;
import java.sql.ResultSet;
import java.sql.SQLException;
public class MobBaseStats {
public static MobBaseStats mbs = null;
private final int baseStr;
private final int baseInt;
private final int baseCon;
private final int baseSpi;
private final int baseDex;
private final int mobbaseSkill;
private final int mobbaseSkillAmount;
/**
* ResultSet Constructor
*/
public MobBaseStats(ResultSet rs) throws SQLException {
this.baseStr = rs.getInt("Strength");
this.baseInt = rs.getInt("Intelligence");
this.baseCon = rs.getInt("Constitution");
this.baseSpi = rs.getInt("Spirit");
this.baseDex = rs.getInt("Dexterity");
this.mobbaseSkill = rs.getInt("baseSkills");
this.mobbaseSkillAmount = rs.getInt("skillAmount");
}
public MobBaseStats(RuneTemplate rune) {
this.baseStr = rune.rune_attr_adj.getOrDefault(mbEnums.AttributeType.Strength, 0);
this.baseInt = rune.rune_attr_adj.getOrDefault(mbEnums.AttributeType.Intelligence, 0);
this.baseCon = rune.rune_attr_adj.getOrDefault(mbEnums.AttributeType.Constitution, 0);
this.baseSpi = rune.rune_attr_adj.getOrDefault(mbEnums.AttributeType.Spirit, 0);
this.baseDex = rune.rune_attr_adj.getOrDefault(mbEnums.AttributeType.Dexterity, 0);
this.mobbaseSkill = 0;
this.mobbaseSkillAmount = 0;
}
/**
* Generic Constructor
*/
public MobBaseStats() {
this.baseStr = 0;
this.baseInt = 0;
this.baseCon = 0;
this.baseSpi = 0;
this.baseDex = 0;
this.mobbaseSkill = 0;
this.mobbaseSkillAmount = 0;
}
public static MobBaseStats GetGenericStats() {
if (mbs != null)
return mbs;
mbs = new MobBaseStats();
return mbs;
}
public int getBaseStr() {
return baseStr;
}
public int getBaseInt() {
return baseInt;
}
public int getBaseCon() {
return baseCon;
}
public int getBaseSpi() {
return baseSpi;
}
public int getBaseDex() {
return baseDex;
}
public int getBaseSkill() {
return mobbaseSkill;
}
public int getBaseSkillAmount() {
return mobbaseSkillAmount;
}
}