v2.1.0: made artif recharge more visually consistent with wand recharge
This commit is contained in:
+11
-9
@@ -45,20 +45,22 @@ public class ArtifactRecharge extends Buff {
|
|||||||
|
|
||||||
if (target instanceof Hero) {
|
if (target instanceof Hero) {
|
||||||
float chargeAmount = Math.min(1, left);
|
float chargeAmount = Math.min(1, left);
|
||||||
for (Buff b : target.buffs()) {
|
if (chargeAmount > 0){
|
||||||
if (b instanceof Artifact.ArtifactBuff) {
|
for (Buff b : target.buffs()) {
|
||||||
if (b instanceof HornOfPlenty.hornRecharge && ignoreHornOfPlenty){
|
if (b instanceof Artifact.ArtifactBuff) {
|
||||||
continue;
|
if (b instanceof HornOfPlenty.hornRecharge && ignoreHornOfPlenty){
|
||||||
}
|
continue;
|
||||||
if (!((Artifact.ArtifactBuff) b).isCursed()) {
|
}
|
||||||
((Artifact.ArtifactBuff) b).charge((Hero) target, chargeAmount);
|
if (!((Artifact.ArtifactBuff) b).isCursed()) {
|
||||||
|
((Artifact.ArtifactBuff) b).charge((Hero) target, chargeAmount);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
left--;
|
left--;
|
||||||
if (left <= 0){
|
if (left < 0){ // we expire after 0 to be more consistent with wand recharging visually
|
||||||
detach();
|
detach();
|
||||||
} else {
|
} else {
|
||||||
spend(TICK);
|
spend(TICK);
|
||||||
@@ -98,7 +100,7 @@ public class ArtifactRecharge extends Buff {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String iconTextDisplay() {
|
public String iconTextDisplay() {
|
||||||
return Integer.toString((int)left);
|
return Integer.toString((int)left+1);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|||||||
Reference in New Issue
Block a user