v2.5.0: piranhas are now killed by levitation
This commit is contained in:
+4
@@ -92,6 +92,10 @@ public class PhantomPiranha extends Piranha {
|
||||
|
||||
private boolean teleportAway(){
|
||||
|
||||
if (flying){
|
||||
return false;
|
||||
}
|
||||
|
||||
ArrayList<Integer> inFOVCandidates = new ArrayList<>();
|
||||
ArrayList<Integer> outFOVCandidates = new ArrayList<>();
|
||||
for (int i = 0; i < Dungeon.level.length(); i++){
|
||||
|
||||
+6
-1
@@ -29,7 +29,9 @@ import com.shatteredpixel.shatteredpixeldungeon.actors.blobs.Electricity;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.actors.blobs.Freezing;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.BlobImmunity;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Burning;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Levitation;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.actors.hero.Hero;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.effects.Speck;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.items.food.MysteryMeat;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.items.trinkets.RatSkull;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.sprites.PiranhaSprite;
|
||||
@@ -66,7 +68,10 @@ public class Piranha extends Mob {
|
||||
@Override
|
||||
protected boolean act() {
|
||||
|
||||
if (!Dungeon.level.water[pos]) {
|
||||
if (!Dungeon.level.water[pos] || flying) {
|
||||
if (sprite != null && buff(Levitation.class) != null){
|
||||
sprite.emitter().burst(Speck.factory( Speck.JET ), 10);
|
||||
}
|
||||
dieOnLand();
|
||||
return true;
|
||||
} else {
|
||||
|
||||
+4
-5
@@ -54,6 +54,7 @@ import com.shatteredpixel.shatteredpixeldungeon.actors.hero.Hero;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.actors.mobs.GoldenMimic;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.actors.mobs.Mimic;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.actors.mobs.Mob;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.actors.mobs.Piranha;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.actors.mobs.npcs.NPC;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.actors.mobs.npcs.Sheep;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.effects.CellEmitter;
|
||||
@@ -623,11 +624,9 @@ public class CursedWand {
|
||||
|
||||
@Override
|
||||
public boolean effect(Item origin, Char user, Ballistica bolt, boolean positiveOnly) {
|
||||
if (!positiveOnly) {
|
||||
Char ch = Actor.findChar(bolt.collisionPos);
|
||||
if (ch != null){
|
||||
Buff.affect(ch, Levitation.class, Levitation.DURATION);
|
||||
}
|
||||
Char ch = Actor.findChar(bolt.collisionPos);
|
||||
if ((!positiveOnly || (ch instanceof Piranha)) && ch != null && !ch.flying) {
|
||||
Buff.affect(ch, Levitation.class, Levitation.DURATION);
|
||||
} else {
|
||||
Buff.affect(user, Levitation.class, Levitation.DURATION);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user