Initial refactor of damagetype
This commit is contained in:
+125
-124
@@ -26,9 +26,9 @@ import java.util.concurrent.ConcurrentHashMap;
|
||||
public class Resists {
|
||||
|
||||
private static ConcurrentHashMap<Integer, Resists> mobResists = new ConcurrentHashMap<>(MBServerStatics.CHM_INIT_CAP, MBServerStatics.CHM_LOAD, MBServerStatics.CHM_THREAD_LOW);
|
||||
private ConcurrentHashMap<SourceType, Float> resists = new ConcurrentHashMap<>(MBServerStatics.CHM_INIT_CAP, MBServerStatics.CHM_LOAD, MBServerStatics.CHM_THREAD_LOW);
|
||||
private ConcurrentHashMap<SourceType, Boolean> immuneTo = new ConcurrentHashMap<>(MBServerStatics.CHM_INIT_CAP, MBServerStatics.CHM_LOAD, MBServerStatics.CHM_THREAD_LOW);
|
||||
private SourceType protection;
|
||||
private ConcurrentHashMap<Enum.DamageType, Float> resists = new ConcurrentHashMap<>(MBServerStatics.CHM_INIT_CAP, MBServerStatics.CHM_LOAD, MBServerStatics.CHM_THREAD_LOW);
|
||||
private ConcurrentHashMap<Enum.DamageType, Boolean> immuneTo = new ConcurrentHashMap<>(MBServerStatics.CHM_INIT_CAP, MBServerStatics.CHM_LOAD, MBServerStatics.CHM_THREAD_LOW);
|
||||
private Enum.DamageType protection;
|
||||
private int protectionTrains = 0;
|
||||
private boolean immuneToAll;
|
||||
|
||||
@@ -51,9 +51,9 @@ public class Resists {
|
||||
}
|
||||
|
||||
public Resists(Resists r) {
|
||||
for (SourceType dt : r.resists.keySet())
|
||||
for (Enum.DamageType dt : r.resists.keySet())
|
||||
this.resists.put(dt, r.resists.get(dt));
|
||||
for (SourceType dt : r.immuneTo.keySet())
|
||||
for (Enum.DamageType dt : r.immuneTo.keySet())
|
||||
this.immuneTo.put(dt, r.immuneTo.get(dt));
|
||||
this.protection = r.protection;
|
||||
this.protectionTrains = r.protectionTrains;
|
||||
@@ -83,30 +83,30 @@ public class Resists {
|
||||
*/
|
||||
public Resists(ResultSet rs) throws SQLException {
|
||||
this.immuneToAll = false;
|
||||
this.resists.put(SourceType.SLASHING, rs.getFloat("slash"));
|
||||
this.resists.put(SourceType.CRUSHING, rs.getFloat("crush"));
|
||||
this.resists.put(SourceType.PIERCING, rs.getFloat("pierce"));
|
||||
this.resists.put(SourceType.MAGIC, rs.getFloat("magic"));
|
||||
this.resists.put(SourceType.BLEEDING, rs.getFloat("bleed"));
|
||||
this.resists.put(SourceType.POISON, rs.getFloat("poison"));
|
||||
this.resists.put(SourceType.MENTAL, rs.getFloat("mental"));
|
||||
this.resists.put(SourceType.HOLY, rs.getFloat("holy"));
|
||||
this.resists.put(SourceType.UNHOLY, rs.getFloat("unholy"));
|
||||
this.resists.put(SourceType.LIGHTNING, rs.getFloat("lightning"));
|
||||
this.resists.put(SourceType.FIRE, rs.getFloat("fire"));
|
||||
this.resists.put(SourceType.COLD, rs.getFloat("cold"));
|
||||
this.resists.put(SourceType.HEALING, 0f);
|
||||
this.resists.put(Enum.DamageType.Slash, rs.getFloat("slash"));
|
||||
this.resists.put(Enum.DamageType.Crush, rs.getFloat("crush"));
|
||||
this.resists.put(Enum.DamageType.Pierce, rs.getFloat("pierce"));
|
||||
this.resists.put(Enum.DamageType.Magic, rs.getFloat("magic"));
|
||||
this.resists.put(Enum.DamageType.Bleed, rs.getFloat("bleed"));
|
||||
this.resists.put(Enum.DamageType.Poison, rs.getFloat("poison"));
|
||||
this.resists.put(Enum.DamageType.Mental, rs.getFloat("mental"));
|
||||
this.resists.put(Enum.DamageType.Holy, rs.getFloat("holy"));
|
||||
this.resists.put(Enum.DamageType.Unholy, rs.getFloat("unholy"));
|
||||
this.resists.put(Enum.DamageType.Lightning, rs.getFloat("lightning"));
|
||||
this.resists.put(Enum.DamageType.Fire, rs.getFloat("fire"));
|
||||
this.resists.put(Enum.DamageType.Cold, rs.getFloat("cold"));
|
||||
this.resists.put(Enum.DamageType.Healing, 0f);
|
||||
}
|
||||
|
||||
//Handle Fortitudes
|
||||
private static float handleFortitude(AbstractCharacter target, SourceType type, float damage) {
|
||||
private static float handleFortitude(AbstractCharacter target, Enum.DamageType type, float damage) {
|
||||
if (target == null || !(target.getObjectType().equals(Enum.GameObjectType.PlayerCharacter)))
|
||||
return damage;
|
||||
PlayerBonuses bonus = target.getBonuses();
|
||||
|
||||
//see if there is a fortitude
|
||||
float damageCap = bonus.getFloatPercentAll(ModType.DamageCap, SourceType.NONE);
|
||||
if (damageCap == 0f || type == SourceType.HEALING)
|
||||
float damageCap = bonus.getFloatPercentAll(ModType.DamageCap, SourceType.None);
|
||||
if (damageCap == 0f || type == Enum.DamageType.Healing)
|
||||
return damage;
|
||||
|
||||
//is fortitude, Are we under the cap?
|
||||
@@ -126,21 +126,21 @@ public class Resists {
|
||||
if (forts == null || !isValidDamageCapType(forts, type, exclusive))
|
||||
return damage;
|
||||
|
||||
float adjustedDamage = bonus.getFloatPercentAll(ModType.AdjustAboveDmgCap, SourceType.NONE);
|
||||
float adjustedDamage = bonus.getFloatPercentAll(ModType.AdjustAboveDmgCap, SourceType.None);
|
||||
//Adjust damage down and return new amount
|
||||
float aadc = 1 + adjustedDamage;
|
||||
return capFire * aadc;
|
||||
}
|
||||
|
||||
//Test if Damagetype is valid for foritude
|
||||
private static boolean isValidDamageCapType(HashSet<SourceType> forts, SourceType damageType, boolean exclusive) {
|
||||
private static boolean isValidDamageCapType(HashSet<SourceType> forts, Enum.DamageType damageType, boolean exclusive) {
|
||||
for (SourceType fort : forts) {
|
||||
SourceType dt = SourceType.valueOf(fort.name().toUpperCase());
|
||||
Enum.DamageType dt = Enum.DamageType.valueOf(fort.name());
|
||||
|
||||
if (dt == SourceType.NONE)
|
||||
if (dt.equals(Enum.DamageType.None))
|
||||
continue;
|
||||
|
||||
if (dt == damageType) {
|
||||
if (dt.equals(damageType)) {
|
||||
return exclusive;
|
||||
}
|
||||
}
|
||||
@@ -195,19 +195,19 @@ public class Resists {
|
||||
*/
|
||||
public final void setBuildingResists() {
|
||||
this.immuneToAll = false;
|
||||
this.resists.put(SourceType.SLASHING, 85f);
|
||||
this.resists.put(SourceType.CRUSHING, 85f);
|
||||
this.immuneTo.put(SourceType.PIERCING, true);
|
||||
this.immuneTo.put(SourceType.MAGIC, true);
|
||||
this.immuneTo.put(SourceType.BLEEDING, true);
|
||||
this.immuneTo.put(SourceType.POISON, true);
|
||||
this.immuneTo.put(SourceType.MENTAL, true);
|
||||
this.immuneTo.put(SourceType.HOLY, true);
|
||||
this.immuneTo.put(SourceType.UNHOLY, true);
|
||||
this.immuneTo.put(SourceType.LIGHTNING, true);
|
||||
this.immuneTo.put(SourceType.FIRE, true);
|
||||
this.immuneTo.put(SourceType.COLD, true);
|
||||
this.resists.put(SourceType.SIEGE, 0f);
|
||||
this.resists.put(Enum.DamageType.Slash, 85f);
|
||||
this.resists.put(Enum.DamageType.Crush, 85f);
|
||||
this.resists.put(Enum.DamageType.Siege, 0f);
|
||||
this.immuneTo.put(Enum.DamageType.Pierce, true);
|
||||
this.immuneTo.put(Enum.DamageType.Magic, true);
|
||||
this.immuneTo.put(Enum.DamageType.Bleed, true);
|
||||
this.immuneTo.put(Enum.DamageType.Poison, true);
|
||||
this.immuneTo.put(Enum.DamageType.Mental, true);
|
||||
this.immuneTo.put(Enum.DamageType.Holy, true);
|
||||
this.immuneTo.put(Enum.DamageType.Unholy, true);
|
||||
this.immuneTo.put(Enum.DamageType.Lightning, true);
|
||||
this.immuneTo.put(Enum.DamageType.Fire, true);
|
||||
this.immuneTo.put(Enum.DamageType.Cold, true);
|
||||
|
||||
}
|
||||
|
||||
@@ -216,19 +216,19 @@ public class Resists {
|
||||
*/
|
||||
public final void setMineResists() {
|
||||
this.immuneToAll = false;
|
||||
this.immuneTo.put(SourceType.SLASHING, true);
|
||||
this.immuneTo.put(SourceType.CRUSHING, true);
|
||||
this.immuneTo.put(SourceType.PIERCING, true);
|
||||
this.immuneTo.put(SourceType.MAGIC, true);
|
||||
this.immuneTo.put(SourceType.BLEEDING, true);
|
||||
this.immuneTo.put(SourceType.POISON, true);
|
||||
this.immuneTo.put(SourceType.MENTAL, true);
|
||||
this.immuneTo.put(SourceType.HOLY, true);
|
||||
this.immuneTo.put(SourceType.UNHOLY, true);
|
||||
this.immuneTo.put(SourceType.LIGHTNING, true);
|
||||
this.immuneTo.put(SourceType.FIRE, true);
|
||||
this.immuneTo.put(SourceType.COLD, true);
|
||||
this.resists.put(SourceType.SIEGE, 0f);
|
||||
this.immuneTo.put(Enum.DamageType.Slash, true);
|
||||
this.immuneTo.put(Enum.DamageType.Crush, true);
|
||||
this.immuneTo.put(Enum.DamageType.Pierce, true);
|
||||
this.immuneTo.put(Enum.DamageType.Magic, true);
|
||||
this.immuneTo.put(Enum.DamageType.Bleed, true);
|
||||
this.immuneTo.put(Enum.DamageType.Poison, true);
|
||||
this.immuneTo.put(Enum.DamageType.Mental, true);
|
||||
this.immuneTo.put(Enum.DamageType.Holy, true);
|
||||
this.immuneTo.put(Enum.DamageType.Unholy, true);
|
||||
this.immuneTo.put(Enum.DamageType.Lightning, true);
|
||||
this.immuneTo.put(Enum.DamageType.Fire, true);
|
||||
this.immuneTo.put(Enum.DamageType.Cold, true);
|
||||
this.resists.put(Enum.DamageType.Siege, 0f);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -236,27 +236,27 @@ public class Resists {
|
||||
*/
|
||||
public final void setGenericResists() {
|
||||
this.immuneToAll = false;
|
||||
this.resists.put(SourceType.SLASHING, 0f);
|
||||
this.resists.put(SourceType.CRUSHING, 0f);
|
||||
this.resists.put(SourceType.PIERCING, 0f);
|
||||
this.resists.put(SourceType.MAGIC, 0f);
|
||||
this.resists.put(SourceType.BLEEDING, 0f);
|
||||
this.resists.put(SourceType.POISON, 0f);
|
||||
this.resists.put(SourceType.MENTAL, 0f);
|
||||
this.resists.put(SourceType.HOLY, 0f);
|
||||
this.resists.put(SourceType.UNHOLY, 0f);
|
||||
this.resists.put(SourceType.LIGHTNING, 0f);
|
||||
this.resists.put(SourceType.FIRE, 0f);
|
||||
this.resists.put(SourceType.COLD, 0f);
|
||||
this.resists.put(SourceType.HEALING, 0f);
|
||||
this.immuneTo.put(SourceType.SIEGE, true);
|
||||
this.resists.put(Enum.DamageType.Slash, 0f);
|
||||
this.resists.put(Enum.DamageType.Crush, 0f);
|
||||
this.resists.put(Enum.DamageType.Pierce, 0f);
|
||||
this.resists.put(Enum.DamageType.Magic, 0f);
|
||||
this.resists.put(Enum.DamageType.Bleed, 0f);
|
||||
this.resists.put(Enum.DamageType.Poison, 0f);
|
||||
this.resists.put(Enum.DamageType.Mental, 0f);
|
||||
this.resists.put(Enum.DamageType.Holy, 0f);
|
||||
this.resists.put(Enum.DamageType.Unholy, 0f);
|
||||
this.resists.put(Enum.DamageType.Lightning, 0f);
|
||||
this.resists.put(Enum.DamageType.Fire, 0f);
|
||||
this.resists.put(Enum.DamageType.Cold, 0f);
|
||||
this.resists.put(Enum.DamageType.Healing, 0f);
|
||||
this.immuneTo.put(Enum.DamageType.Siege, true);
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Get a resist
|
||||
*/
|
||||
public float getResist(SourceType type, int trains) {
|
||||
public float getResist(Enum.DamageType type, int trains) {
|
||||
//get resisted amount
|
||||
Float amount = 0f;
|
||||
if (this.resists.containsKey(type))
|
||||
@@ -278,7 +278,7 @@ public class Resists {
|
||||
/**
|
||||
* get immuneTo
|
||||
*/
|
||||
public boolean immuneTo(SourceType type) {
|
||||
public boolean immuneTo(Enum.DamageType type) {
|
||||
if (this.immuneTo.containsKey(type))
|
||||
return this.immuneTo.get(type);
|
||||
else
|
||||
@@ -293,13 +293,13 @@ public class Resists {
|
||||
}
|
||||
|
||||
public boolean immuneToAttacks() {
|
||||
return immuneTo(SourceType.IMMUNETOATTACK);
|
||||
return immuneTo(Enum.DamageType.Attack);
|
||||
}
|
||||
|
||||
/**
|
||||
* Set a resist
|
||||
*/
|
||||
public void setResist(SourceType type, float value) {
|
||||
public void setResist(Enum.DamageType type, float value) {
|
||||
this.resists.put(type, value);
|
||||
}
|
||||
|
||||
@@ -322,12 +322,12 @@ public class Resists {
|
||||
* get Damage after resist
|
||||
* Expects heals as negative damage and damage as positive damage for fortitudes.
|
||||
*/
|
||||
public float getResistedDamage(AbstractCharacter source, AbstractCharacter target, SourceType type, float damage, int trains) {
|
||||
public float getResistedDamage(AbstractCharacter source, AbstractCharacter target, Enum.DamageType type, float damage, int trains) {
|
||||
//handle fortitudes
|
||||
damage = handleFortitude(target, type, damage);
|
||||
|
||||
//calculate armor piercing
|
||||
float ap = source.getBonuses().getFloatPercentAll(ModType.ArmorPiercing, SourceType.NONE);
|
||||
float ap = source.getBonuses().getFloatPercentAll(ModType.ArmorPiercing, SourceType.None);
|
||||
float damageAfterResists = damage * (1 - (this.getResist(type, trains) * 0.01f) + ap);
|
||||
|
||||
//check to see if any damage absorbers should cancel
|
||||
@@ -346,41 +346,41 @@ public class Resists {
|
||||
|
||||
if (rb != null) {
|
||||
// Handle immunities
|
||||
if (rb.getBool(ModType.ImmuneTo, SourceType.STUN))
|
||||
this.immuneTo.put(SourceType.STUN, true);
|
||||
if (rb.getBool(ModType.ImmuneTo, SourceType.BLIND))
|
||||
this.immuneTo.put(SourceType.BLIND, true);
|
||||
if (rb.getBool(ModType.ImmuneToAttack, SourceType.NONE))
|
||||
this.immuneTo.put(SourceType.IMMUNETOATTACK, true);
|
||||
if (rb.getBool(ModType.ImmuneToPowers, SourceType.NONE))
|
||||
this.immuneTo.put(SourceType.IMMUNETOPOWERS, true);
|
||||
if (rb.getBool(ModType.ImmuneTo, SourceType.POWERBLOCK))
|
||||
this.immuneTo.put(SourceType.POWERBLOCK, true);
|
||||
if (rb.getBool(ModType.ImmuneTo, SourceType.DEBUFF))
|
||||
this.immuneTo.put(SourceType.DEBUFF, true);
|
||||
if (rb.getBool(ModType.ImmuneTo, SourceType.FEAR))
|
||||
this.immuneTo.put(SourceType.FEAR, true);
|
||||
if (rb.getBool(ModType.ImmuneTo, SourceType.CHARM))
|
||||
this.immuneTo.put(SourceType.CHARM, true);
|
||||
if (rb.getBool(ModType.ImmuneTo, SourceType.ROOT))
|
||||
this.immuneTo.put(SourceType.ROOT, true);
|
||||
if (rb.getBool(ModType.ImmuneTo, SourceType.SNARE))
|
||||
this.immuneTo.put(SourceType.SNARE, true);
|
||||
if (rb.getBool(ModType.ImmuneTo, SourceType.Stun))
|
||||
this.immuneTo.put(Enum.DamageType.Stun, true);
|
||||
if (rb.getBool(ModType.ImmuneTo, SourceType.Blind))
|
||||
this.immuneTo.put(Enum.DamageType.Blind, true);
|
||||
if (rb.getBool(ModType.ImmuneToAttack, SourceType.None))
|
||||
this.immuneTo.put(Enum.DamageType.Attack, true);
|
||||
if (rb.getBool(ModType.ImmuneToPowers, SourceType.None))
|
||||
this.immuneTo.put(Enum.DamageType.Powers, true);
|
||||
if (rb.getBool(ModType.ImmuneTo, SourceType.Powerblock))
|
||||
this.immuneTo.put(Enum.DamageType.Powerblock, true);
|
||||
if (rb.getBool(ModType.ImmuneTo, SourceType.DeBuff))
|
||||
this.immuneTo.put(Enum.DamageType.DeBuff, true);
|
||||
if (rb.getBool(ModType.ImmuneTo, SourceType.Fear))
|
||||
this.immuneTo.put(Enum.DamageType.Fear, true);
|
||||
if (rb.getBool(ModType.ImmuneTo, SourceType.Charm))
|
||||
this.immuneTo.put(Enum.DamageType.Charm, true);
|
||||
if (rb.getBool(ModType.ImmuneTo, SourceType.Root))
|
||||
this.immuneTo.put(Enum.DamageType.Root, true);
|
||||
if (rb.getBool(ModType.ImmuneTo, SourceType.Snare))
|
||||
this.immuneTo.put(Enum.DamageType.Snare, true);
|
||||
|
||||
// Handle resists
|
||||
slash += rb.getFloat(ModType.Resistance, SourceType.SLASHING);
|
||||
crush += rb.getFloat(ModType.Resistance, SourceType.CRUSHING);
|
||||
pierce += rb.getFloat(ModType.Resistance, SourceType.PIERCING);
|
||||
magic += rb.getFloat(ModType.Resistance, SourceType.MAGIC);
|
||||
bleed += rb.getFloat(ModType.Resistance, SourceType.BLEEDING);
|
||||
poison += rb.getFloat(ModType.Resistance, SourceType.POISON);
|
||||
mental += rb.getFloat(ModType.Resistance, SourceType.MENTAL);
|
||||
holy += rb.getFloat(ModType.Resistance, SourceType.HOLY);
|
||||
unholy += rb.getFloat(ModType.Resistance, SourceType.UNHOLY);
|
||||
lightning += rb.getFloat(ModType.Resistance, SourceType.LIGHTNING);
|
||||
fire += rb.getFloat(ModType.Resistance, SourceType.FIRE);
|
||||
cold += rb.getFloat(ModType.Resistance, SourceType.COLD);
|
||||
healing += rb.getFloat(ModType.Resistance, SourceType.HEALING); // DamageType.Healing.name());
|
||||
slash += rb.getFloat(ModType.Resistance, SourceType.Slash);
|
||||
crush += rb.getFloat(ModType.Resistance, SourceType.Crush);
|
||||
pierce += rb.getFloat(ModType.Resistance, SourceType.Pierce);
|
||||
magic += rb.getFloat(ModType.Resistance, SourceType.Magic);
|
||||
bleed += rb.getFloat(ModType.Resistance, SourceType.Bleed);
|
||||
poison += rb.getFloat(ModType.Resistance, SourceType.Poison);
|
||||
mental += rb.getFloat(ModType.Resistance, SourceType.Mental);
|
||||
holy += rb.getFloat(ModType.Resistance, SourceType.Holy);
|
||||
unholy += rb.getFloat(ModType.Resistance, SourceType.Unholy);
|
||||
lightning += rb.getFloat(ModType.Resistance, SourceType.Lightning);
|
||||
fire += rb.getFloat(ModType.Resistance, SourceType.Fire);
|
||||
cold += rb.getFloat(ModType.Resistance, SourceType.Cold);
|
||||
healing += rb.getFloat(ModType.Resistance, SourceType.Healing); // DamageType.Healing.name());
|
||||
|
||||
}
|
||||
|
||||
@@ -404,29 +404,30 @@ public class Resists {
|
||||
}
|
||||
}
|
||||
|
||||
this.resists.put(SourceType.SLASHING, slash);
|
||||
this.resists.put(SourceType.CRUSHING, crush);
|
||||
this.resists.put(SourceType.PIERCING, pierce);
|
||||
this.resists.put(SourceType.MAGIC, magic);
|
||||
this.resists.put(SourceType.BLEEDING, bleed);
|
||||
this.resists.put(SourceType.POISON, poison);
|
||||
this.resists.put(SourceType.MENTAL, mental);
|
||||
this.resists.put(SourceType.HOLY, holy);
|
||||
this.resists.put(SourceType.UNHOLY, unholy);
|
||||
this.resists.put(SourceType.LIGHTNING, lightning);
|
||||
this.resists.put(SourceType.FIRE, fire);
|
||||
this.resists.put(SourceType.COLD, cold);
|
||||
this.resists.put(SourceType.HEALING, healing);
|
||||
this.immuneTo.put(SourceType.SIEGE, true);
|
||||
this.resists.put(Enum.DamageType.Slash, slash);
|
||||
this.resists.put(Enum.DamageType.Crush, crush);
|
||||
this.resists.put(Enum.DamageType.Pierce, pierce);
|
||||
this.resists.put(Enum.DamageType.Magic, magic);
|
||||
this.resists.put(Enum.DamageType.Bleed, bleed);
|
||||
this.resists.put(Enum.DamageType.Poison, poison);
|
||||
this.resists.put(Enum.DamageType.Mental, mental);
|
||||
this.resists.put(Enum.DamageType.Holy, holy);
|
||||
this.resists.put(Enum.DamageType.Unholy, unholy);
|
||||
this.resists.put(Enum.DamageType.Lightning, lightning);
|
||||
this.resists.put(Enum.DamageType.Fire, fire);
|
||||
this.resists.put(Enum.DamageType.Cold, cold);
|
||||
this.resists.put(Enum.DamageType.Healing, healing);
|
||||
|
||||
this.immuneTo.put(Enum.DamageType.Siege, true);
|
||||
|
||||
// debug printing of resists
|
||||
// printResists(pc);
|
||||
}
|
||||
|
||||
public void printResistsToClient(PlayerCharacter pc) {
|
||||
for (SourceType dt : resists.keySet())
|
||||
for (Enum.DamageType dt : resists.keySet())
|
||||
ChatManager.chatSystemInfo(pc, " resist." + dt.name() + ": " + resists.get(dt));
|
||||
for (SourceType dt : immuneTo.keySet())
|
||||
for (Enum.DamageType dt : immuneTo.keySet())
|
||||
ChatManager.chatSystemInfo(pc, " immuneTo." + dt.name() + ": " + immuneTo.get(dt));
|
||||
ChatManager.chatSystemInfo(pc, " immuneToAll: " + this.immuneToAll);
|
||||
if (protection != null)
|
||||
@@ -439,9 +440,9 @@ public class Resists {
|
||||
String out = pc.getName();
|
||||
|
||||
out += "Resists: ";
|
||||
Iterator<SourceType> it = this.resists.keySet().iterator();
|
||||
Iterator<Enum.DamageType> it = this.resists.keySet().iterator();
|
||||
while (it.hasNext()) {
|
||||
SourceType damType = it.next();
|
||||
Enum.DamageType damType = it.next();
|
||||
String dtName = damType.name();
|
||||
out += dtName + '=' + this.resists.get(dtName) + ", ";
|
||||
}
|
||||
@@ -449,7 +450,7 @@ public class Resists {
|
||||
out += "ImmuneTo: ";
|
||||
it = this.immuneTo.keySet().iterator();
|
||||
while (it.hasNext()) {
|
||||
SourceType damType = it.next();
|
||||
Enum.DamageType damType = it.next();
|
||||
|
||||
String dtName = damType.name();
|
||||
out += dtName + '=' + this.resists.get(dtName) + ", ";
|
||||
|
||||
Reference in New Issue
Block a user