v0.4.2: fixed bugs involving earthroot and sungrass

This commit is contained in:
Evan Debenham 2016-09-04 05:36:58 -04:00
parent 18cc801eb2
commit 3c1e130b59
2 changed files with 3 additions and 8 deletions

View File

@ -103,8 +103,8 @@ 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;
pos = target.pos;
} }
pos = target.pos;
} }
@Override @Override

View File

@ -45,7 +45,7 @@ public class Sungrass extends Plant {
Char ch = Actor.findChar(pos); Char ch = Actor.findChar(pos);
if (ch == Dungeon.hero) { if (ch == Dungeon.hero) {
Buff.affect( ch, Health.class ).level = ch.HT; Buff.affect( ch, Health.class ).boost(ch.HT);
} }
if (Dungeon.visible[pos]) { if (Dungeon.visible[pos]) {
@ -77,12 +77,6 @@ public class Sungrass extends Plant {
type = buffType.POSITIVE; type = buffType.POSITIVE;
} }
@Override
public boolean attachTo( Char target ) {
pos = target.pos;
return super.attachTo( target );
}
@Override @Override
public boolean act() { public boolean act() {
if (target.pos != pos) { if (target.pos != pos) {
@ -122,6 +116,7 @@ public class Sungrass extends Plant {
public void boost( int amount ){ public void boost( int amount ){
level += amount; level += amount;
pos = target.pos;
} }
@Override @Override