v3.1.0: fixed body form only granting enchants/glyphs if one exists
This commit is contained in:
@@ -739,11 +739,10 @@ public class Armor extends EquipableItem {
|
||||
}
|
||||
|
||||
public boolean hasGlyph(Class<?extends Glyph> type, Char owner) {
|
||||
if (glyph == null){
|
||||
if (owner.buff(MagicImmune.class) != null) {
|
||||
return false;
|
||||
} else if (owner.buff(MagicImmune.class) != null) {
|
||||
return false;
|
||||
} else if (!glyph.curse()
|
||||
} else if (glyph != null
|
||||
&& !glyph.curse()
|
||||
&& owner instanceof Hero
|
||||
&& isEquipped((Hero) owner)
|
||||
&& owner.buff(HolyWard.HolyArmBuff.class) != null
|
||||
@@ -753,8 +752,10 @@ public class Armor extends EquipableItem {
|
||||
&& owner.buff(BodyForm.BodyFormBuff.class).glyph() != null
|
||||
&& owner.buff(BodyForm.BodyFormBuff.class).glyph().getClass().equals(type)){
|
||||
return true;
|
||||
} else {
|
||||
} else if (glyph != null) {
|
||||
return glyph.getClass() == type;
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -325,7 +325,7 @@ abstract public class Weapon extends KindOfWeapon {
|
||||
reach += 2;
|
||||
}
|
||||
if (hasEnchant(Projecting.class, owner)){
|
||||
return reach + Math.round(enchantment.procChanceMultiplier(owner));
|
||||
return reach + Math.round(Enchantment.genericProcChanceMultiplier(owner));
|
||||
} else {
|
||||
return reach;
|
||||
}
|
||||
@@ -449,11 +449,10 @@ abstract public class Weapon extends KindOfWeapon {
|
||||
}
|
||||
|
||||
public boolean hasEnchant(Class<?extends Enchantment> type, Char owner) {
|
||||
if (enchantment == null){
|
||||
if (owner.buff(MagicImmune.class) != null) {
|
||||
return false;
|
||||
} else if (owner.buff(MagicImmune.class) != null) {
|
||||
return false;
|
||||
} else if (!enchantment.curse()
|
||||
} else if (enchantment != null
|
||||
&& !enchantment.curse()
|
||||
&& owner instanceof Hero
|
||||
&& isEquipped((Hero) owner)
|
||||
&& owner.buff(HolyWeapon.HolyWepBuff.class) != null
|
||||
@@ -463,8 +462,10 @@ abstract public class Weapon extends KindOfWeapon {
|
||||
&& owner.buff(BodyForm.BodyFormBuff.class).enchant() != null
|
||||
&& owner.buff(BodyForm.BodyFormBuff.class).enchant().getClass().equals(type)){
|
||||
return true;
|
||||
} else {
|
||||
} else if (enchantment != null) {
|
||||
return enchantment.getClass() == type;
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user