v0.8.0a: ripper demon balance tweaks:
- leap ability now has a short cooldown - damage slightly reduced to 12-25 from 15-25 - bleed effect is now less likely do deal lots of damage
This commit is contained in:
parent
042937e164
commit
b0b62987fc
|
@ -68,7 +68,7 @@ public class RipperDemon extends Mob {
|
|||
|
||||
@Override
|
||||
public int damageRoll() {
|
||||
return Random.NormalIntRange( 15, 25 );
|
||||
return Random.NormalIntRange( 12, 25 );
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -88,22 +88,22 @@ public class RipperDemon extends Mob {
|
|||
|
||||
private static final String LAST_ENEMY_POS = "last_enemy_pos";
|
||||
private static final String LEAP_POS = "leap_pos";
|
||||
private static final String LEAP_CD = "leap_cd";
|
||||
|
||||
@Override
|
||||
public void storeInBundle(Bundle bundle) {
|
||||
super.storeInBundle(bundle);
|
||||
bundle.put(LAST_ENEMY_POS, lastEnemyPos);
|
||||
bundle.put(LEAP_POS, leapPos);
|
||||
bundle.put(LEAP_CD, leapCooldown);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void restoreFromBundle(Bundle bundle) {
|
||||
super.restoreFromBundle(bundle);
|
||||
//pre beta-5.0
|
||||
if (bundle.contains(LAST_ENEMY_POS)) {
|
||||
lastEnemyPos = bundle.getInt(LAST_ENEMY_POS);
|
||||
leapPos = bundle.getInt(LEAP_POS);
|
||||
}
|
||||
leapCooldown = bundle.getFloat(LEAP_CD);
|
||||
}
|
||||
|
||||
private int lastEnemyPos = -1;
|
||||
|
@ -112,6 +112,7 @@ public class RipperDemon extends Mob {
|
|||
protected boolean act() {
|
||||
AiState lastState = state;
|
||||
boolean result = super.act();
|
||||
if (paralysed <= 0) leapCooldown --;
|
||||
|
||||
//if state changed from wandering to hunting, we haven't acted yet, don't update.
|
||||
if (!(lastState == WANDERING && state == HUNTING)) {
|
||||
|
@ -126,6 +127,7 @@ public class RipperDemon extends Mob {
|
|||
}
|
||||
|
||||
private int leapPos = -1;
|
||||
private float leapCooldown = 0;
|
||||
|
||||
public class Hunting extends Mob.Hunting {
|
||||
|
||||
|
@ -142,7 +144,7 @@ public class RipperDemon extends Mob {
|
|||
Char ch = Actor.findChar(leapPos);
|
||||
if (ch != null){
|
||||
if (alignment != ch.alignment){
|
||||
Buff.affect(ch, Bleeding.class).set(0.75f*Math.max(damageRoll(), damageRoll()));
|
||||
Buff.affect(ch, Bleeding.class).set(0.75f*damageRoll());
|
||||
ch.sprite.flash();
|
||||
Sample.INSTANCE.play(Assets.SND_HIT);
|
||||
}
|
||||
|
@ -165,6 +167,7 @@ public class RipperDemon extends Mob {
|
|||
}
|
||||
|
||||
leapPos = -1;
|
||||
leapCooldown = Random.NormalIntRange(2, 4);
|
||||
sprite.idle();
|
||||
Dungeon.level.occupyCell(RipperDemon.this);
|
||||
next();
|
||||
|
@ -188,7 +191,7 @@ public class RipperDemon extends Mob {
|
|||
return true;
|
||||
}
|
||||
|
||||
if (enemyInFOV && Dungeon.level.distance(pos, enemy.pos) >= 3) {
|
||||
if (leapCooldown <= 0 && enemyInFOV && Dungeon.level.distance(pos, enemy.pos) >= 3) {
|
||||
|
||||
int targetPos = enemy.pos;
|
||||
if (lastEnemyPos != enemy.pos){
|
||||
|
|
Loading…
Reference in New Issue
Block a user