v0.3.2: rebalanced the Goo fight
This commit is contained in:
parent
71f65ec31a
commit
c4b3a9503e
|
@ -53,9 +53,9 @@ import com.watabou.utils.Random;
|
||||||
public class Goo extends Mob {
|
public class Goo extends Mob {
|
||||||
{
|
{
|
||||||
name = "Goo";
|
name = "Goo";
|
||||||
HP = HT = 80;
|
HP = HT = 100;
|
||||||
EXP = 10;
|
EXP = 10;
|
||||||
defenseSkill = 12;
|
defenseSkill = 8;
|
||||||
spriteClass = GooSprite.class;
|
spriteClass = GooSprite.class;
|
||||||
|
|
||||||
loot = new LloydsBeacon().identify();
|
loot = new LloydsBeacon().identify();
|
||||||
|
@ -66,6 +66,8 @@ public class Goo extends Mob {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public int damageRoll() {
|
public int damageRoll() {
|
||||||
|
int min = (HP*2 <= HT) ? 3 : 2;
|
||||||
|
int max = (HP*2 <= HT) ? 12 : 8;
|
||||||
if (pumpedUp > 0) {
|
if (pumpedUp > 0) {
|
||||||
pumpedUp = 0;
|
pumpedUp = 0;
|
||||||
for (int i = 0; i < Level.NEIGHBOURS9DIST2.length; i++) {
|
for (int i = 0; i < Level.NEIGHBOURS9DIST2.length; i++) {
|
||||||
|
@ -74,15 +76,23 @@ public class Goo extends Mob {
|
||||||
CellEmitter.get(j).burst(ElmoParticle.FACTORY, 10);
|
CellEmitter.get(j).burst(ElmoParticle.FACTORY, 10);
|
||||||
}
|
}
|
||||||
Sample.INSTANCE.play( Assets.SND_BURNING );
|
Sample.INSTANCE.play( Assets.SND_BURNING );
|
||||||
return Random.NormalIntRange( 5, 30 );
|
return Random.NormalIntRange( min*3, max*3 );
|
||||||
} else {
|
} else {
|
||||||
return Random.NormalIntRange( 2, 12 );
|
return Random.NormalIntRange( min, max );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public int attackSkill( Char target ) {
|
public int attackSkill( Char target ) {
|
||||||
return (pumpedUp > 0) ? 30 : 15;
|
int attack = 10;
|
||||||
|
if (HP*2 <= HT) attack = 15;
|
||||||
|
if (pumpedUp > 0) attack *= 2;
|
||||||
|
return attack;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public int defenseSkill(Char enemy) {
|
||||||
|
return (int)(super.defenseSkill(enemy) * ((HP*2 <= HT)? 1.5 : 1));
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -95,6 +105,10 @@ public class Goo extends Mob {
|
||||||
|
|
||||||
if (Level.water[pos] && HP < HT) {
|
if (Level.water[pos] && HP < HT) {
|
||||||
sprite.emitter().burst( Speck.factory( Speck.HEALING ), 1 );
|
sprite.emitter().burst( Speck.factory( Speck.HEALING ), 1 );
|
||||||
|
if (HP*2 == HT) {
|
||||||
|
BossHealthBar.bleed(false);
|
||||||
|
((GooSprite)sprite).spray(false);
|
||||||
|
}
|
||||||
HP++;
|
HP++;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -134,7 +148,7 @@ public class Goo extends Mob {
|
||||||
spend( attackDelay() );
|
spend( attackDelay() );
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
} else if (pumpedUp >= 2 || Random.Int( 3 ) > 0) {
|
} else if (pumpedUp >= 2 || Random.Int( (HP*2 <= HT) ? 2 : 5 ) > 0) {
|
||||||
|
|
||||||
boolean visible = Dungeon.visible[pos];
|
boolean visible = Dungeon.visible[pos];
|
||||||
|
|
||||||
|
@ -194,7 +208,21 @@ public class Goo extends Mob {
|
||||||
Dungeon.level.seal();
|
Dungeon.level.seal();
|
||||||
super.move( step );
|
super.move( step );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void damage(int dmg, Object src) {
|
||||||
|
boolean bleeding = (HP*2 <= HT);
|
||||||
|
super.damage(dmg, src);
|
||||||
|
if ((HP*2 <= HT) && !bleeding){
|
||||||
|
BossHealthBar.bleed(true);
|
||||||
|
GLog.w("Goo Becomes Enraged!!");
|
||||||
|
sprite.showStatus(CharSprite.NEGATIVE, "enraged");
|
||||||
|
((GooSprite)sprite).spray(true);
|
||||||
|
yell("GLUUUURP!");
|
||||||
|
spend( TICK );
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void die( Object cause ) {
|
public void die( Object cause ) {
|
||||||
|
|
||||||
|
@ -244,6 +272,8 @@ public class Goo extends Mob {
|
||||||
|
|
||||||
pumpedUp = bundle.getInt( PUMPEDUP );
|
pumpedUp = bundle.getInt( PUMPEDUP );
|
||||||
if (state != SLEEPING) BossHealthBar.assignBoss(this);
|
if (state != SLEEPING) BossHealthBar.assignBoss(this);
|
||||||
|
if ((HP*2 <= HT)) BossHealthBar.bleed(true);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private static final HashSet<Class<?>> RESISTANCES = new HashSet<Class<?>>();
|
private static final HashSet<Class<?>> RESISTANCES = new HashSet<Class<?>>();
|
||||||
|
|
|
@ -20,6 +20,7 @@
|
||||||
*/
|
*/
|
||||||
package com.shatteredpixel.shatteredpixeldungeon.sprites;
|
package com.shatteredpixel.shatteredpixeldungeon.sprites;
|
||||||
|
|
||||||
|
import com.shatteredpixel.shatteredpixeldungeon.actors.Char;
|
||||||
import com.watabou.noosa.TextureFilm;
|
import com.watabou.noosa.TextureFilm;
|
||||||
import com.watabou.noosa.particles.Emitter;
|
import com.watabou.noosa.particles.Emitter;
|
||||||
import com.watabou.noosa.particles.PixelParticle;
|
import com.watabou.noosa.particles.PixelParticle;
|
||||||
|
@ -34,6 +35,8 @@ public class GooSprite extends MobSprite {
|
||||||
private Animation pump;
|
private Animation pump;
|
||||||
private Animation pumpAttack;
|
private Animation pumpAttack;
|
||||||
|
|
||||||
|
private Emitter spray;
|
||||||
|
|
||||||
public GooSprite() {
|
public GooSprite() {
|
||||||
super();
|
super();
|
||||||
|
|
||||||
|
@ -59,25 +62,42 @@ public class GooSprite extends MobSprite {
|
||||||
die = new Animation( 10, false );
|
die = new Animation( 10, false );
|
||||||
die.frames( frames, 5, 6, 7 );
|
die.frames( frames, 5, 6, 7 );
|
||||||
|
|
||||||
play( idle );
|
play(idle);
|
||||||
|
|
||||||
|
spray = centerEmitter();
|
||||||
|
spray.autoKill = false;
|
||||||
|
spray.pour( GooParticle.FACTORY, 0.04f );
|
||||||
|
spray.on = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void link(Char ch) {
|
||||||
|
super.link(ch);
|
||||||
|
if (ch.HP*2 <= ch.HT)
|
||||||
|
spray(true);
|
||||||
|
}
|
||||||
|
|
||||||
public void pumpUp() {
|
public void pumpUp() {
|
||||||
play( pump );
|
play( pump );
|
||||||
}
|
}
|
||||||
|
|
||||||
public void pumpAttack() { play( pumpAttack ); }
|
public void pumpAttack() { play(pumpAttack); }
|
||||||
|
|
||||||
@Override
|
|
||||||
public void play( Animation anim, boolean force ) {
|
|
||||||
super.play( anim, force );
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public int blood() {
|
public int blood() {
|
||||||
return 0xFF000000;
|
return 0xFF000000;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void spray(boolean on){
|
||||||
|
spray.on = on;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void update() {
|
||||||
|
super.update();
|
||||||
|
spray.pos(center());
|
||||||
|
}
|
||||||
|
|
||||||
public static class GooParticle extends PixelParticle.Shrinking {
|
public static class GooParticle extends PixelParticle.Shrinking {
|
||||||
|
|
||||||
public static final Emitter.Factory FACTORY = new Factory() {
|
public static final Emitter.Factory FACTORY = new Factory() {
|
||||||
|
@ -124,6 +144,8 @@ public class GooSprite extends MobSprite {
|
||||||
|
|
||||||
idle();
|
idle();
|
||||||
ch.onAttackComplete();
|
ch.onAttackComplete();
|
||||||
|
} else if (anim == die) {
|
||||||
|
spray.killAndErase();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user