mirror of
https://github.com/collinsmith/riiablo.git
synced 2025-02-01 10:24:30 +07:00
Added progression methods
This commit is contained in:
parent
28086714b4
commit
3f9ebfb57c
@ -98,6 +98,32 @@ public class D2S {
|
||||
return isExpansion();
|
||||
}
|
||||
|
||||
public boolean isMale() {
|
||||
switch (charClass) {
|
||||
case 2: case 3: case 4: case 5: // TODO: use const fields
|
||||
return true;
|
||||
default:
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
public String getProgressionString() {
|
||||
int prog = (flags >>> 8) & 0xFF;
|
||||
final boolean hc = isHardcore();
|
||||
final boolean male = isMale();
|
||||
if (isExpansion()) {
|
||||
if (prog >= 15) return hc ? "Guardian" : male ? "Patriarch" : "Matriarch";
|
||||
if (prog >= 10) return hc ? "Conqueror" : "Champion";
|
||||
if (prog >= 5) return hc ? "Destroyer" : "Slayer";
|
||||
} else {
|
||||
if (prog >= 12) return hc ? male ? "King" : "Queen" : male ? "Baron" : "Baroness";
|
||||
if (prog >= 8) return hc ? male ? "Duke" : "Duchess" : male ? "Lord" : "Lady";
|
||||
if (prog >= 4) return hc ? male ? "Count" : "Countess" : male ? "Sir" : "Dame";
|
||||
}
|
||||
|
||||
return "";
|
||||
}
|
||||
|
||||
public static class MercData {
|
||||
int flags;
|
||||
int seed;
|
||||
|
Loading…
Reference in New Issue
Block a user