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

View File

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