v0.8.0: balance defining for city, added new mobs to bestiary
This commit is contained in:
parent
ffa2bb1a91
commit
a9794a6ab0
|
@ -27,8 +27,8 @@ import com.shatteredpixel.shatteredpixeldungeon.messages.Messages;
|
||||||
import com.shatteredpixel.shatteredpixeldungeon.ui.BuffIndicator;
|
import com.shatteredpixel.shatteredpixeldungeon.ui.BuffIndicator;
|
||||||
|
|
||||||
public class Degrade extends FlavourBuff {
|
public class Degrade extends FlavourBuff {
|
||||||
|
|
||||||
public static final float DURATION = 50f;
|
public static final float DURATION = 30f;
|
||||||
|
|
||||||
{
|
{
|
||||||
type = buffType.NEGATIVE;
|
type = buffType.NEGATIVE;
|
||||||
|
|
|
@ -94,71 +94,75 @@ public class Bestiary {
|
||||||
|
|
||||||
// Caves
|
// Caves
|
||||||
case 11:
|
case 11:
|
||||||
//5x bat, 1x brute
|
//3x bat, 1x brute, 1x shaman
|
||||||
return new ArrayList<>(Arrays.asList(
|
return new ArrayList<>(Arrays.asList(
|
||||||
Bat.class, Bat.class, Bat.class, Bat.class, Bat.class,
|
Bat.class, Bat.class, Bat.class,
|
||||||
Brute.class));
|
Brute.class,
|
||||||
|
Shaman.random()));
|
||||||
case 12:
|
case 12:
|
||||||
//5x bat, 5x brute, 1x spinner
|
//2x bat, 2x brute, 1x shaman, 1x spinner
|
||||||
return new ArrayList<>(Arrays.asList(
|
return new ArrayList<>(Arrays.asList(
|
||||||
Bat.class, Bat.class, Bat.class, Bat.class, Bat.class,
|
Bat.class, Bat.class,
|
||||||
Brute.class, Brute.class, Brute.class, Brute.class, Brute.class,
|
Brute.class, Brute.class,
|
||||||
|
Shaman.random(),
|
||||||
Spinner.class));
|
Spinner.class));
|
||||||
case 13:
|
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(
|
return new ArrayList<>(Arrays.asList(
|
||||||
Bat.class,
|
Bat.class,
|
||||||
Brute.class, Brute.class, Brute.class,
|
Brute.class, Brute.class,
|
||||||
Shaman.random(),
|
Shaman.random(), Shaman.random(),
|
||||||
Spinner.class));
|
Spinner.class, Spinner.class));
|
||||||
case 14: case 15:
|
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(
|
return new ArrayList<>(Arrays.asList(
|
||||||
Bat.class,
|
Bat.class,
|
||||||
Brute.class, Brute.class, Brute.class,
|
Brute.class,
|
||||||
Shaman.random(),
|
Shaman.random(), Shaman.random(),
|
||||||
Spinner.class, Spinner.class, Spinner.class, Spinner.class));
|
Spinner.class, Spinner.class));
|
||||||
|
|
||||||
// City
|
// City
|
||||||
case 16:
|
case 16:
|
||||||
//5x elemental, 5x warlock, 1x monk
|
//2x ghoul, 2x elemental, 1x warlock
|
||||||
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
|
|
||||||
return new ArrayList<>(Arrays.asList(
|
return new ArrayList<>(Arrays.asList(
|
||||||
|
Ghoul.class, Ghoul.class,
|
||||||
Elemental.random(), Elemental.random(),
|
Elemental.random(), Elemental.random(),
|
||||||
Warlock.class, Warlock.class,
|
Warlock.class));
|
||||||
Monk.class, Monk.class));
|
case 17:
|
||||||
case 18:
|
//1x ghoul, 2x elemental, 1x warlock, 1x monk
|
||||||
//1x elemental, 1x warlock, 2x monk, 1x golem
|
|
||||||
return new ArrayList<>(Arrays.asList(
|
return new ArrayList<>(Arrays.asList(
|
||||||
Elemental.random(),
|
Ghoul.class,
|
||||||
|
Elemental.random(), Elemental.random(),
|
||||||
Warlock.class,
|
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,
|
Monk.class, Monk.class,
|
||||||
Golem.class));
|
Golem.class));
|
||||||
case 19: case 20:
|
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(
|
return new ArrayList<>(Arrays.asList(
|
||||||
Elemental.random(),
|
Elemental.random(),
|
||||||
Warlock.class,
|
Warlock.class, Warlock.class,
|
||||||
Monk.class, Monk.class,
|
Monk.class, Monk.class,
|
||||||
Golem.class, Golem.class, Golem.class));
|
Golem.class, Golem.class, Golem.class));
|
||||||
|
|
||||||
// Halls
|
// Halls
|
||||||
case 21: case 22:
|
case 21: case 22:
|
||||||
//3x succubus, 3x evil eye
|
//1x succubus, 1x evil eye
|
||||||
return new ArrayList<>(Arrays.asList(
|
return new ArrayList<>(Arrays.asList(
|
||||||
Succubus.class, Succubus.class, Succubus.class,
|
Succubus.class,
|
||||||
Eye.class, Eye.class, Eye.class));
|
Eye.class));
|
||||||
case 23:
|
case 23:
|
||||||
//2x succubus, 4x evil eye, 2x scorpio
|
//1x succubus, 2x evil eye, 1x scorpio
|
||||||
return new ArrayList<>(Arrays.asList(
|
return new ArrayList<>(Arrays.asList(
|
||||||
Succubus.class, Succubus.class,
|
Succubus.class,
|
||||||
Eye.class, Eye.class, Eye.class, Eye.class,
|
Eye.class, Eye.class,
|
||||||
Scorpio.class, Scorpio.class));
|
Scorpio.class));
|
||||||
case 24: case 25: case 26:
|
case 24: case 25: case 26:
|
||||||
//1x succubus, 2x evil eye, 3x scorpio
|
//1x succubus, 2x evil eye, 3x scorpio
|
||||||
return new ArrayList<>(Arrays.asList(
|
return new ArrayList<>(Arrays.asList(
|
||||||
|
@ -182,26 +186,18 @@ public class Bestiary {
|
||||||
return;
|
return;
|
||||||
|
|
||||||
// Prison
|
// Prison
|
||||||
case 8:
|
|
||||||
if (Random.Float() < 0.02f) rotation.add(Bat.class);
|
|
||||||
return;
|
|
||||||
case 9:
|
case 9:
|
||||||
if (Random.Float() < 0.02f) rotation.add(Bat.class);
|
if (Random.Float() < 0.025f) rotation.add(Bat.class);
|
||||||
if (Random.Float() < 0.01f) rotation.add(Brute.class);
|
|
||||||
return;
|
return;
|
||||||
|
|
||||||
// Caves
|
// Caves
|
||||||
case 13:
|
|
||||||
if (Random.Float() < 0.02f) rotation.add(Elemental.class);
|
|
||||||
return;
|
|
||||||
case 14:
|
case 14:
|
||||||
if (Random.Float() < 0.02f) rotation.add(Elemental.class);
|
if (Random.Float() < 0.025f) rotation.add(Ghoul.class);
|
||||||
if (Random.Float() < 0.01f) rotation.add(Monk.class);
|
|
||||||
return;
|
return;
|
||||||
|
|
||||||
// City
|
// City
|
||||||
case 19:
|
case 19:
|
||||||
if (Random.Float() < 0.02f) rotation.add(Succubus.class);
|
if (Random.Float() < 0.025f) rotation.add(Succubus.class);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -23,6 +23,7 @@ package com.shatteredpixel.shatteredpixeldungeon.actors.mobs;
|
||||||
|
|
||||||
import com.shatteredpixel.shatteredpixeldungeon.Dungeon;
|
import com.shatteredpixel.shatteredpixeldungeon.Dungeon;
|
||||||
import com.shatteredpixel.shatteredpixeldungeon.actors.Actor;
|
import com.shatteredpixel.shatteredpixeldungeon.actors.Actor;
|
||||||
|
import com.shatteredpixel.shatteredpixeldungeon.actors.Char;
|
||||||
import com.shatteredpixel.shatteredpixeldungeon.effects.Pushing;
|
import com.shatteredpixel.shatteredpixeldungeon.effects.Pushing;
|
||||||
import com.shatteredpixel.shatteredpixeldungeon.scenes.GameScene;
|
import com.shatteredpixel.shatteredpixeldungeon.scenes.GameScene;
|
||||||
import com.shatteredpixel.shatteredpixeldungeon.sprites.GhoulSprite;
|
import com.shatteredpixel.shatteredpixeldungeon.sprites.GhoulSprite;
|
||||||
|
@ -38,17 +39,33 @@ public class Ghoul extends Mob {
|
||||||
spriteClass = GhoulSprite.class;
|
spriteClass = GhoulSprite.class;
|
||||||
|
|
||||||
HP = HT = 50;
|
HP = HT = 50;
|
||||||
defenseSkill = 18;
|
defenseSkill = 20;
|
||||||
|
|
||||||
EXP = 5;
|
EXP = 5;
|
||||||
maxLvl = 20;
|
maxLvl = 20;
|
||||||
|
|
||||||
SLEEPING = new Sleeping();
|
SLEEPING = new Sleeping();
|
||||||
WANDERING = new Wandering();
|
WANDERING = new Wandering();
|
||||||
|
HUNTING = new Hunting();
|
||||||
state = SLEEPING;
|
state = SLEEPING;
|
||||||
|
|
||||||
properties.add(Property.UNDEAD);
|
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 int partnerID = -1;
|
||||||
private static final String PARTNER_ID = "partner_id";
|
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