v0.8.0: bugfixes:

- fixed webs not setting terrain to solid right as they spawn
- fixed armored brutes not raging properly
- fixed alerting effects incorrectly triggering on demon spawners
- fixed shamans incorrectly rolling to drop loot twice
- fixed rare crash bugs with spinners
- fixed minor debuffs working 3x as well as intended for wand of corruption
- fixed force cubes affecting an AOE when thrown onto chasms
- fixed floating text alignment issues with resized char sprites
This commit is contained in:
Evan Debenham 2019-12-03 00:22:35 -05:00
parent 1594c26df0
commit bc3aa927a5
8 changed files with 26 additions and 9 deletions

View File

@ -57,6 +57,12 @@ public class Web extends Blob {
} }
} }
@Override
public void seed(Level level, int cell, int amount) {
super.seed(level, cell, amount);
level.solid[cell] = cur[cell] > 0 || (Terrain.flags[level.map[cell]] & Terrain.SOLID) != 0;
}
//affects characters as they step on it. See Level.OccupyCell and Level.PressCell //affects characters as they step on it. See Level.OccupyCell and Level.PressCell
public static void affectChar( Char ch ){ public static void affectChar( Char ch ){
Buff.prolong( ch, Roots.class, 5f ); Buff.prolong( ch, Roots.class, 5f );

View File

@ -77,7 +77,7 @@ public class Brute extends Mob {
if (!hasRaged){ if (!hasRaged){
triggerEnrage(); triggerEnrage();
} }
return buff(BruteRage.class) != null; return !buffs(BruteRage.class).isEmpty();
} }
} }

View File

@ -62,6 +62,11 @@ public class DemonSpawner extends Mob {
return Random.NormalIntRange(0, 12); return Random.NormalIntRange(0, 12);
} }
@Override
public void beckon(int cell) {
//do nothing
}
private float spawnCooldown = 50; private float spawnCooldown = 50;
@Override @Override

View File

@ -76,7 +76,6 @@ public abstract class Shaman extends Mob {
// so loot chance looks like: 1/33, 1/100, 1/300, 1/900, etc. // so loot chance looks like: 1/33, 1/100, 1/300, 1/900, etc.
lootChance *= Math.pow(1/3f, Dungeon.LimitedDrops.SHAMAN_WAND.count); lootChance *= Math.pow(1/3f, Dungeon.LimitedDrops.SHAMAN_WAND.count);
super.rollToDropLoot(); super.rollToDropLoot();
super.rollToDropLoot();
} }
@Override @Override

View File

@ -123,6 +123,8 @@ public class Spinner extends Mob {
public int webPos(){ public int webPos(){
if (enemy == null) return -1;
Ballistica b; Ballistica b;
//aims web in direction enemy is moving, or between self and enemy if they aren't moving //aims web in direction enemy is moving, or between self and enemy if they aren't moving
if (lastEnemyPos == enemy.pos){ if (lastEnemyPos == enemy.pos){
@ -151,7 +153,7 @@ public class Spinner extends Mob {
public void shootWeb(){ public void shootWeb(){
int webPos = webPos(); int webPos = webPos();
if (webPos != enemy.pos && webPos != -1){ if (enemy != null && webPos != enemy.pos && webPos != -1){
int i; int i;
for ( i = 0; i < PathFinder.CIRCLE8.length; i++){ for ( i = 0; i < PathFinder.CIRCLE8.length; i++){
if ((enemy.pos + PathFinder.CIRCLE8[i]) == webPos){ if ((enemy.pos + PathFinder.CIRCLE8[i]) == webPos){

View File

@ -155,9 +155,9 @@ public class WandOfCorruption extends Wand {
//debuffs placed on the enemy reduce their resistance //debuffs placed on the enemy reduce their resistance
for (Buff buff : enemy.buffs()){ for (Buff buff : enemy.buffs()){
if (MAJOR_DEBUFFS.containsKey(buff.getClass())) enemyResist *= MAJOR_DEBUFF_WEAKEN; if (MAJOR_DEBUFFS.containsKey(buff.getClass())) enemyResist *= (1f-MAJOR_DEBUFF_WEAKEN);
else if (MINOR_DEBUFFS.containsKey(buff.getClass())) enemyResist *= MINOR_DEBUFF_WEAKEN; else if (MINOR_DEBUFFS.containsKey(buff.getClass())) enemyResist *= (1f-MINOR_DEBUFF_WEAKEN);
else if (buff.type == Buff.buffType.NEGATIVE) enemyResist *= MINOR_DEBUFF_WEAKEN; else if (buff.type == Buff.buffType.NEGATIVE) enemyResist *= (1f-MINOR_DEBUFF_WEAKEN);
} }
//cannot re-corrupt or doom an enemy, so give them a major debuff instead //cannot re-corrupt or doom an enemy, so give them a major debuff instead

View File

@ -47,6 +47,11 @@ public class ForceCube extends MissileWeapon {
@Override @Override
protected void onThrow(int cell) { protected void onThrow(int cell) {
if (Dungeon.level.pit[cell]){
super.onThrow(cell);
return;
}
Dungeon.level.pressCell(cell); Dungeon.level.pressCell(cell);
ArrayList<Char> targets = new ArrayList<>(); ArrayList<Char> targets = new ArrayList<>();

View File

@ -181,9 +181,9 @@ public class CharSprite extends MovieClip implements Tweener.Listener, MovieClip
text = Messages.format( text, args ); text = Messages.format( text, args );
} }
if (ch != null) { if (ch != null) {
FloatingText.show( x + width * 0.5f, y, ch.pos, text, color ); FloatingText.show( x + width() * 0.5f, y, ch.pos, text, color );
} else { } else {
FloatingText.show( x + width * 0.5f, y, text, color ); FloatingText.show( x + width() * 0.5f, y, text, color );
} }
} }
} }