v1.2.0: adjusted great crab logic, now more standard with other dodgers
This commit is contained in:
parent
033d0f725c
commit
3a4a9b9ed0
|
@ -982,7 +982,6 @@ actors.mobs.goo.desc=Little is known about The Goo. It's quite possible that it
|
||||||
|
|
||||||
actors.mobs.greatcrab.name=great crab
|
actors.mobs.greatcrab.name=great crab
|
||||||
actors.mobs.greatcrab.noticed=The crab blocks with its massive claw.
|
actors.mobs.greatcrab.noticed=The crab blocks with its massive claw.
|
||||||
actors.mobs.greatcrab.blocked=blocked
|
|
||||||
actors.mobs.greatcrab.def_verb=blocked
|
actors.mobs.greatcrab.def_verb=blocked
|
||||||
actors.mobs.greatcrab.desc=This crab is gigantic, even compared to other sewer crabs. Its blue shell is covered in cracks and barnacles, showing great age. It lumbers around slowly, barely keeping balance with its massive claw.\n\nWhile the crab only has one claw, its size easily compensates. The crab holds the claw in front of any threat, shielding itself behind an impenetrable wall of carapace. However, the crab cannot block attacks it doesn't see coming, or attacks from multiple enemies at once.
|
actors.mobs.greatcrab.desc=This crab is gigantic, even compared to other sewer crabs. Its blue shell is covered in cracks and barnacles, showing great age. It lumbers around slowly, barely keeping balance with its massive claw.\n\nWhile the crab only has one claw, its size easily compensates. The crab holds the claw in front of any threat, shielding itself behind an impenetrable wall of carapace. However, the crab cannot block attacks it doesn't see coming, or attacks from multiple enemies at once.
|
||||||
|
|
||||||
|
|
|
@ -70,19 +70,31 @@ public class GreatCrab extends Crab {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void damage( int dmg, Object src ){
|
public void damage( int dmg, Object src ){
|
||||||
//crab blocks all attacks originating from its current enemy if it sees them.
|
//crab blocks all wand damage from the hero if it sees them.
|
||||||
//All direct damage is negated, no exceptions. environmental effects go through as normal.
|
//Direct damage is negated, but add-on effects and environmental effects go through as normal.
|
||||||
if ((enemySeen && state != SLEEPING && paralysed == 0)
|
if ((enemySeen && state != SLEEPING && paralysed == 0)
|
||||||
&& ((src instanceof Wand && enemy == Dungeon.hero)
|
&& (src instanceof Wand && enemy == Dungeon.hero)){
|
||||||
|| (src instanceof Char && enemy == src))){
|
|
||||||
GLog.n( Messages.get(this, "noticed") );
|
GLog.n( Messages.get(this, "noticed") );
|
||||||
sprite.showStatus( CharSprite.NEUTRAL, Messages.get(this, "blocked") );
|
sprite.showStatus( CharSprite.NEUTRAL, Messages.get(this, "def_verb") );
|
||||||
Sample.INSTANCE.play( Assets.Sounds.HIT_PARRY, 1, Random.Float(0.96f, 1.05f));
|
Sample.INSTANCE.play( Assets.Sounds.HIT_PARRY, 1, Random.Float(0.96f, 1.05f));
|
||||||
} else {
|
} else {
|
||||||
super.damage( dmg, src );
|
super.damage( dmg, src );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public int defenseSkill( Char enemy ) {
|
||||||
|
//crab blocks all melee attacks from its current target
|
||||||
|
if (enemySeen && state != SLEEPING && paralysed == 0 && enemy == this.enemy){
|
||||||
|
if (sprite != null && sprite.visible) {
|
||||||
|
Sample.INSTANCE.play(Assets.Sounds.HIT_PARRY, 1, Random.Float(0.96f, 1.05f));
|
||||||
|
GLog.n( Messages.get(this, "noticed") );
|
||||||
|
}
|
||||||
|
return INFINITE_EVASION;
|
||||||
|
}
|
||||||
|
return super.defenseSkill( enemy );
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void die( Object cause ) {
|
public void die( Object cause ) {
|
||||||
super.die( cause );
|
super.die( cause );
|
||||||
|
|
Loading…
Reference in New Issue
Block a user