v0.3.5: rough berserker implementation

This commit is contained in:
Evan Debenham
2016-03-26 06:13:12 -04:00
parent c3910a1277
commit 97365b1ecf
3 changed files with 162 additions and 8 deletions
@@ -77,9 +77,8 @@ public class BrokenSigil extends Item {
public boolean act() {
if (armor == null) detach();
else if (armor.isEquipped((Hero)target)) {
int maxShield = 1 + armor.tier + armor.level();
if (target.SHLD < maxShield){
partialShield += 1/(30*Math.pow(0.9f, (maxShield - target.SHLD)));
if (target.SHLD < maxShield()){
partialShield += 1/(30*Math.pow(0.9f, (maxShield() - target.SHLD)));
}
}
while (partialShield >= 1){
@@ -93,5 +92,9 @@ public class BrokenSigil extends Item {
public void setArmor(Armor arm){
armor = arm;
}
public int maxShield() {
return 1 + armor.tier + armor.level();
}
}
}