v0.3.3: fixed bugs with rot heard and lashers
This commit is contained in:
parent
108fd0085d
commit
64df321aa1
|
@ -24,7 +24,7 @@ import com.shatteredpixel.shatteredpixeldungeon.Dungeon;
|
|||
import com.shatteredpixel.shatteredpixeldungeon.actors.Char;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.actors.blobs.Blob;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.actors.blobs.ToxicGas;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.levels.Terrain;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Burning;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.plants.Rotberry;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.scenes.GameScene;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.sprites.RotHeartSprite;
|
||||
|
@ -49,13 +49,13 @@ public class RotHeart extends Mob {
|
|||
}
|
||||
|
||||
@Override
|
||||
protected boolean act() {
|
||||
if (Dungeon.level.map[pos] != Terrain.GRASS && Dungeon.level.map[pos] != Terrain.HIGH_GRASS){
|
||||
public void damage(int dmg, Object src) {
|
||||
//TODO: when effect properties are done, change this to FIRE
|
||||
if (src instanceof Burning) {
|
||||
destroy();
|
||||
sprite.die();
|
||||
return true;
|
||||
} else {
|
||||
return super.act();
|
||||
super.damage(dmg, src);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -20,14 +20,13 @@
|
|||
*/
|
||||
package com.shatteredpixel.shatteredpixeldungeon.actors.mobs;
|
||||
|
||||
import com.shatteredpixel.shatteredpixeldungeon.Dungeon;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.actors.Char;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.actors.blobs.ToxicGas;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Buff;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Burning;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Cripple;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.items.Generator;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.levels.Level;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.levels.Terrain;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.sprites.RotLasherSprite;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.utils.Utils;
|
||||
import com.watabou.utils.Random;
|
||||
|
@ -55,16 +54,20 @@ public class RotLasher extends Mob {
|
|||
|
||||
@Override
|
||||
protected boolean act() {
|
||||
if (Dungeon.level.map[pos] != Terrain.GRASS && Dungeon.level.map[pos] != Terrain.HIGH_GRASS){
|
||||
destroy();
|
||||
sprite.die();
|
||||
return true;
|
||||
} else {
|
||||
if (enemy == null || !Level.adjacent(pos, enemy.pos)) {
|
||||
HP = Math.min(HT, HP + 3);
|
||||
}
|
||||
return super.act();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void damage(int dmg, Object src) {
|
||||
if (src instanceof Burning) {
|
||||
destroy();
|
||||
sprite.die();
|
||||
} else {
|
||||
super.damage(dmg, src);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
Loading…
Reference in New Issue
Block a user