V0.2.0: minor bugfix in sungrass.
This commit is contained in:
parent
871e00f597
commit
605ec62223
|
@ -90,11 +90,11 @@ public class Sungrass extends Plant {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean act() {
|
public boolean act() {
|
||||||
if (target.pos != pos || level <= 0) {
|
if (target.pos != pos) {
|
||||||
detach();
|
detach();
|
||||||
}
|
}
|
||||||
if (count == 5) {
|
if (count == 5) {
|
||||||
if (level <= healCurr) {
|
if (level <= healCurr*.025*target.HT) {
|
||||||
target.HP = Math.min(target.HT, target.HP + level);
|
target.HP = Math.min(target.HT, target.HP + level);
|
||||||
target.sprite.emitter().burst(Speck.factory(Speck.HEALING), 1);
|
target.sprite.emitter().burst(Speck.factory(Speck.HEALING), 1);
|
||||||
detach();
|
detach();
|
||||||
|
@ -109,6 +109,8 @@ public class Sungrass extends Plant {
|
||||||
} else {
|
} else {
|
||||||
count++;
|
count++;
|
||||||
}
|
}
|
||||||
|
if (level <= 0)
|
||||||
|
detach();
|
||||||
spend( STEP );
|
spend( STEP );
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user