MobBase builds its stats from the race rune's rune_attr_adj since 3.2, so LOAD_STATS and the MobBaseStats ResultSet constructor have no callers. No value change. The table is dropped by sql/3.6-mob-stats-resists-drop.sql. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
72 lines
2.2 KiB
Java
72 lines
2.2 KiB
Java
// • ▌ ▄ ·. ▄▄▄· ▄▄ • ▪ ▄▄· ▄▄▄▄· ▄▄▄· ▐▄▄▄ ▄▄▄ .
|
|
// ·██ ▐███▪▐█ ▀█ ▐█ ▀ ▪██ ▐█ ▌▪▐█ ▀█▪▐█ ▀█ •█▌ ▐█▐▌·
|
|
// ▐█ ▌▐▌▐█·▄█▀▀█ ▄█ ▀█▄▐█·██ ▄▄▐█▀▀█▄▄█▀▀█ ▐█▐ ▐▌▐▀▀▀
|
|
// ██ ██▌▐█▌▐█ ▪▐▌▐█▄▪▐█▐█▌▐███▌██▄▪▐█▐█ ▪▐▌██▐ █▌▐█▄▄▌
|
|
// ▀▀ █▪▀▀▀ ▀ ▀ ·▀▀▀▀ ▀▀▀·▀▀▀ ·▀▀▀▀ ▀ ▀ ▀▀ █▪ ▀▀▀
|
|
// Magicbane Emulator Project © 2013 - 2026
|
|
// https://www.magicbane.com
|
|
|
|
|
|
package engine.objects;
|
|
|
|
import engine.mbEnums;
|
|
import engine.parsers.objects.RuneTemplate;
|
|
|
|
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;
|
|
|
|
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);
|
|
}
|
|
|
|
/**
|
|
* Generic Constructor
|
|
*/
|
|
|
|
public MobBaseStats() {
|
|
this.baseStr = 0;
|
|
this.baseInt = 0;
|
|
this.baseCon = 0;
|
|
this.baseSpi = 0;
|
|
this.baseDex = 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;
|
|
}
|
|
|
|
}
|