v0.6.2a: fixed buff indicator interactions with plant effects

This commit is contained in:
Evan Debenham 2017-11-01 00:46:02 -04:00
parent f1949a9c2f
commit a63032702f
2 changed files with 10 additions and 2 deletions

View File

@ -99,6 +99,7 @@ public class Earthroot extends Plant {
return damage - level;
} else {
level -= damage-damage/2;
BuffIndicator.refreshHero();
return damage/2;
}
}
@ -106,6 +107,7 @@ public class Earthroot extends Plant {
public void level( int value ) {
if (level < value) {
level = value;
BuffIndicator.refreshHero();
}
pos = target.pos;
}

View File

@ -104,16 +104,22 @@ public class Sungrass extends Plant {
} else {
count++;
}
if (level <= 0)
if (level <= 0) {
detach();
} else {
BuffIndicator.refreshHero();
}
spend( STEP );
return true;
}
public int absorb( int damage ) {
level -= damage;
if (level <= 0)
if (level <= 0) {
detach();
} else {
BuffIndicator.refreshHero();
}
return damage;
}