v3.1.0: changed non-sewers quest penalties to on-attack, not on-hit
This commit is contained in:
@@ -117,7 +117,7 @@ public class CrystalGuardian extends Mob{
|
||||
}
|
||||
|
||||
@Override
|
||||
public int attackProc(Char enemy, int damage) {
|
||||
public boolean attack(Char enemy, float dmgMulti, float dmgBonus, float accMulti) {
|
||||
//if enemy is hero, and they aren't currently fighting the spire, -100 points
|
||||
if (enemy == Dungeon.hero){
|
||||
boolean spireNear = false;
|
||||
@@ -130,7 +130,7 @@ public class CrystalGuardian extends Mob{
|
||||
Statistics.questScores[2] -= 100;
|
||||
}
|
||||
}
|
||||
return super.attackProc(enemy, damage);
|
||||
return super.attack(enemy, dmgMulti, dmgBonus, accMulti);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -66,6 +66,7 @@ public class FetidRat extends Rat {
|
||||
damage = super.attackProc( enemy, damage );
|
||||
if (Random.Int(3) == 0) {
|
||||
Buff.affect(enemy, Ooze.class).set( Ooze.DURATION );
|
||||
//score loss is on-hit instead of on-attack because it's tied to ooze
|
||||
if (enemy == Dungeon.hero && !Dungeon.level.water[enemy.pos]){
|
||||
Statistics.questScores[0] -= 50;
|
||||
}
|
||||
|
||||
@@ -78,6 +78,7 @@ public class GnollTrickster extends Gnoll {
|
||||
damage = super.attackProc( enemy, damage );
|
||||
|
||||
if (combo >= 1){
|
||||
//score loss is on-hit instead of on-attack as it's tied to combo
|
||||
Statistics.questScores[0] -= 50;
|
||||
}
|
||||
|
||||
|
||||
@@ -74,12 +74,17 @@ public class RotLasher extends Mob {
|
||||
}
|
||||
|
||||
@Override
|
||||
public int attackProc(Char enemy, int damage) {
|
||||
damage = super.attackProc( enemy, damage );
|
||||
Buff.affect( enemy, Cripple.class, 2f );
|
||||
public boolean attack(Char enemy, float dmgMulti, float dmgBonus, float accMulti) {
|
||||
if (enemy == Dungeon.hero){
|
||||
Statistics.questScores[1] -= 100;
|
||||
}
|
||||
return super.attack(enemy, dmgMulti, dmgBonus, accMulti);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int attackProc(Char enemy, int damage) {
|
||||
damage = super.attackProc( enemy, damage );
|
||||
Buff.affect( enemy, Cripple.class, 2f );
|
||||
return super.attackProc(enemy, damage);
|
||||
}
|
||||
|
||||
|
||||
@@ -184,32 +184,32 @@ public class CorpseDust extends Item {
|
||||
|
||||
public static class DustWraith extends Wraith{
|
||||
|
||||
private int hitCount = 0;
|
||||
private int atkCount = 0;
|
||||
|
||||
@Override
|
||||
public int attackProc(Char enemy, int damage) {
|
||||
public boolean attack(Char enemy, float dmgMulti, float dmgBonus, float accMulti) {
|
||||
if (enemy == Dungeon.hero){
|
||||
hitCount++;
|
||||
//first hit from each wraith is free, max of -200 point penalty per wraith
|
||||
if (hitCount == 2 || hitCount == 3){
|
||||
atkCount++;
|
||||
//first attack from each wraith is free, max of -200 point penalty per wraith
|
||||
if (atkCount == 2 || atkCount == 3){
|
||||
Statistics.questScores[1] -= 100;
|
||||
}
|
||||
}
|
||||
return super.attackProc(enemy, damage);
|
||||
return super.attack(enemy, dmgMulti, dmgBonus, accMulti);
|
||||
}
|
||||
|
||||
private static final String HIT_COUNT = "hit_count";
|
||||
private static final String ATK_COUNT = "atk_count";
|
||||
|
||||
@Override
|
||||
public void storeInBundle(Bundle bundle) {
|
||||
super.storeInBundle(bundle);
|
||||
bundle.put(HIT_COUNT, hitCount);
|
||||
bundle.put(ATK_COUNT, atkCount);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void restoreFromBundle(Bundle bundle) {
|
||||
super.restoreFromBundle(bundle);
|
||||
hitCount = bundle.getInt(HIT_COUNT);
|
||||
atkCount = bundle.getInt(ATK_COUNT);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user