v0.8.0: balance defining for city, added new mobs to bestiary
This commit is contained in:
parent
ffa2bb1a91
commit
a9794a6ab0
|
@ -28,7 +28,7 @@ import com.shatteredpixel.shatteredpixeldungeon.ui.BuffIndicator;
|
|||
|
||||
public class Degrade extends FlavourBuff {
|
||||
|
||||
public static final float DURATION = 50f;
|
||||
public static final float DURATION = 30f;
|
||||
|
||||
{
|
||||
type = buffType.NEGATIVE;
|
||||
|
|
|
@ -94,71 +94,75 @@ public class Bestiary {
|
|||
|
||||
// Caves
|
||||
case 11:
|
||||
//5x bat, 1x brute
|
||||
//3x bat, 1x brute, 1x shaman
|
||||
return new ArrayList<>(Arrays.asList(
|
||||
Bat.class, Bat.class, Bat.class, Bat.class, Bat.class,
|
||||
Brute.class));
|
||||
Bat.class, Bat.class, Bat.class,
|
||||
Brute.class,
|
||||
Shaman.random()));
|
||||
case 12:
|
||||
//5x bat, 5x brute, 1x spinner
|
||||
//2x bat, 2x brute, 1x shaman, 1x spinner
|
||||
return new ArrayList<>(Arrays.asList(
|
||||
Bat.class, Bat.class, Bat.class, Bat.class, Bat.class,
|
||||
Brute.class, Brute.class, Brute.class, Brute.class, Brute.class,
|
||||
Bat.class, Bat.class,
|
||||
Brute.class, Brute.class,
|
||||
Shaman.random(),
|
||||
Spinner.class));
|
||||
case 13:
|
||||
//1x bat, 3x brute, 1x shaman, 1x spinner
|
||||
//1x bat, 2x brute, 2x shaman, 2x spinner, 1x DM-200
|
||||
return new ArrayList<>(Arrays.asList(
|
||||
Bat.class,
|
||||
Brute.class, Brute.class, Brute.class,
|
||||
Shaman.random(),
|
||||
Spinner.class));
|
||||
Brute.class, Brute.class,
|
||||
Shaman.random(), Shaman.random(),
|
||||
Spinner.class, Spinner.class));
|
||||
case 14: case 15:
|
||||
//1x bat, 3x brute, 1x shaman, 4x spinner
|
||||
//1x bat, 1x brute, 2x shaman, 2x spinner, 2x DM-300
|
||||
return new ArrayList<>(Arrays.asList(
|
||||
Bat.class,
|
||||
Brute.class, Brute.class, Brute.class,
|
||||
Shaman.random(),
|
||||
Spinner.class, Spinner.class, Spinner.class, Spinner.class));
|
||||
Brute.class,
|
||||
Shaman.random(), Shaman.random(),
|
||||
Spinner.class, Spinner.class));
|
||||
|
||||
// City
|
||||
case 16:
|
||||
//5x elemental, 5x warlock, 1x monk
|
||||
return new ArrayList<>(Arrays.asList(
|
||||
Elemental.random(), Elemental.random(), Elemental.random(), Elemental.random(), Elemental.random(),
|
||||
Warlock.class, Warlock.class, Warlock.class, Warlock.class, Warlock.class,
|
||||
Monk.class));
|
||||
case 17:
|
||||
//2x elemental, 2x warlock, 2x monk
|
||||
//2x ghoul, 2x elemental, 1x warlock
|
||||
return new ArrayList<>(Arrays.asList(
|
||||
Ghoul.class, Ghoul.class,
|
||||
Elemental.random(), Elemental.random(),
|
||||
Warlock.class, Warlock.class,
|
||||
Monk.class, Monk.class));
|
||||
case 18:
|
||||
//1x elemental, 1x warlock, 2x monk, 1x golem
|
||||
Warlock.class));
|
||||
case 17:
|
||||
//1x ghoul, 2x elemental, 1x warlock, 1x monk
|
||||
return new ArrayList<>(Arrays.asList(
|
||||
Elemental.random(),
|
||||
Ghoul.class,
|
||||
Elemental.random(), Elemental.random(),
|
||||
Warlock.class,
|
||||
Monk.class));
|
||||
case 18:
|
||||
//1x ghoul, 1x elemental, 2x warlock, 2x monk, 1x golem
|
||||
return new ArrayList<>(Arrays.asList(
|
||||
Ghoul.class,
|
||||
Elemental.random(),
|
||||
Warlock.class, Warlock.class,
|
||||
Monk.class, Monk.class,
|
||||
Golem.class));
|
||||
case 19: case 20:
|
||||
//1x elemental, 1x warlock, 2x monk, 3x golem
|
||||
//1x elemental, 2x warlock, 2x monk, 3x golem
|
||||
return new ArrayList<>(Arrays.asList(
|
||||
Elemental.random(),
|
||||
Warlock.class,
|
||||
Warlock.class, Warlock.class,
|
||||
Monk.class, Monk.class,
|
||||
Golem.class, Golem.class, Golem.class));
|
||||
|
||||
// Halls
|
||||
case 21: case 22:
|
||||
//3x succubus, 3x evil eye
|
||||
//1x succubus, 1x evil eye
|
||||
return new ArrayList<>(Arrays.asList(
|
||||
Succubus.class, Succubus.class, Succubus.class,
|
||||
Eye.class, Eye.class, Eye.class));
|
||||
Succubus.class,
|
||||
Eye.class));
|
||||
case 23:
|
||||
//2x succubus, 4x evil eye, 2x scorpio
|
||||
//1x succubus, 2x evil eye, 1x scorpio
|
||||
return new ArrayList<>(Arrays.asList(
|
||||
Succubus.class, Succubus.class,
|
||||
Eye.class, Eye.class, Eye.class, Eye.class,
|
||||
Scorpio.class, Scorpio.class));
|
||||
Succubus.class,
|
||||
Eye.class, Eye.class,
|
||||
Scorpio.class));
|
||||
case 24: case 25: case 26:
|
||||
//1x succubus, 2x evil eye, 3x scorpio
|
||||
return new ArrayList<>(Arrays.asList(
|
||||
|
@ -182,26 +186,18 @@ public class Bestiary {
|
|||
return;
|
||||
|
||||
// Prison
|
||||
case 8:
|
||||
if (Random.Float() < 0.02f) rotation.add(Bat.class);
|
||||
return;
|
||||
case 9:
|
||||
if (Random.Float() < 0.02f) rotation.add(Bat.class);
|
||||
if (Random.Float() < 0.01f) rotation.add(Brute.class);
|
||||
if (Random.Float() < 0.025f) rotation.add(Bat.class);
|
||||
return;
|
||||
|
||||
// Caves
|
||||
case 13:
|
||||
if (Random.Float() < 0.02f) rotation.add(Elemental.class);
|
||||
return;
|
||||
case 14:
|
||||
if (Random.Float() < 0.02f) rotation.add(Elemental.class);
|
||||
if (Random.Float() < 0.01f) rotation.add(Monk.class);
|
||||
if (Random.Float() < 0.025f) rotation.add(Ghoul.class);
|
||||
return;
|
||||
|
||||
// City
|
||||
case 19:
|
||||
if (Random.Float() < 0.02f) rotation.add(Succubus.class);
|
||||
if (Random.Float() < 0.025f) rotation.add(Succubus.class);
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -23,6 +23,7 @@ package com.shatteredpixel.shatteredpixeldungeon.actors.mobs;
|
|||
|
||||
import com.shatteredpixel.shatteredpixeldungeon.Dungeon;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.actors.Actor;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.actors.Char;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.effects.Pushing;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.scenes.GameScene;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.sprites.GhoulSprite;
|
||||
|
@ -38,18 +39,34 @@ public class Ghoul extends Mob {
|
|||
spriteClass = GhoulSprite.class;
|
||||
|
||||
HP = HT = 50;
|
||||
defenseSkill = 18;
|
||||
defenseSkill = 20;
|
||||
|
||||
EXP = 5;
|
||||
maxLvl = 20;
|
||||
|
||||
SLEEPING = new Sleeping();
|
||||
WANDERING = new Wandering();
|
||||
HUNTING = new Hunting();
|
||||
state = SLEEPING;
|
||||
|
||||
properties.add(Property.UNDEAD);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int damageRoll() {
|
||||
return Random.NormalIntRange( 14, 22 );
|
||||
}
|
||||
|
||||
@Override
|
||||
public int attackSkill( Char target ) {
|
||||
return 24;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int drRoll() {
|
||||
return Random.NormalIntRange(0, 4);
|
||||
}
|
||||
|
||||
private int partnerID = -1;
|
||||
private static final String PARTNER_ID = "partner_id";
|
||||
|
||||
|
@ -137,4 +154,52 @@ public class Ghoul extends Mob {
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
//TODO currently very similar to super.Hunting and is largely a stop-gap, need to refactor
|
||||
private class Hunting extends Mob.Hunting {
|
||||
|
||||
@Override
|
||||
public boolean act( boolean enemyInFOV, boolean justAlerted ) {
|
||||
enemySeen = enemyInFOV;
|
||||
if (enemyInFOV && !isCharmedBy( enemy ) && canAttack( enemy )) {
|
||||
|
||||
return doAttack( enemy );
|
||||
|
||||
} else {
|
||||
|
||||
if (enemyInFOV) {
|
||||
target = enemy.pos;
|
||||
} else if (enemy == null) {
|
||||
state = WANDERING;
|
||||
target = Dungeon.level.randomDestination();
|
||||
return true;
|
||||
}
|
||||
|
||||
int oldPos = pos;
|
||||
if (target != -1 && getCloser( target )) {
|
||||
|
||||
spend( 1 / speed() );
|
||||
return moveSprite( oldPos, pos );
|
||||
|
||||
} else {
|
||||
|
||||
Ghoul partner = (Ghoul) Actor.findById( partnerID );
|
||||
if (!enemyInFOV) {
|
||||
spend( TICK );
|
||||
sprite.showLost();
|
||||
state = WANDERING;
|
||||
target = Dungeon.level.randomDestination();
|
||||
|
||||
//try to move closer to partner if they can't move to hero
|
||||
} else if (partner != null && getCloser(partner.pos)) {
|
||||
spend( 1 / speed() );
|
||||
return moveSprite( oldPos, pos );
|
||||
} else {
|
||||
spend( TICK );
|
||||
}
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user