fix: dot damage

This commit is contained in:
Renge 2022-05-09 16:27:08 -04:00
parent d695d49702
commit 36aafa986b
5 changed files with 3 additions and 7 deletions

View File

@ -17,9 +17,9 @@ export default class BullAI extends EnemyAI {
}
collideWithPlayer(player: PlayerController): void {
player.damage(10);
if (this.isAttacking && !player.invincible) {
player.bleedCounter += 3;
}
player.damage(10);
}
}

View File

@ -10,9 +10,9 @@ export default class SnakeAI extends EnemyAI {
}
collideWithPlayer(player: PlayerController): void {
player.damage(10);
if (this.isAttacking && !player.invincible ) {
player.poisonCounter = 5;
}
player.damage(10);
}
}

View File

@ -22,9 +22,9 @@ export default class TigerAI extends EnemyAI {
}
collideWithPlayer(player: PlayerController): void {
player.damage(10);
if (this.isAttacking && !player.invincible) {
player.bleedCounter += 3;
}
player.damage(10);
}
}

View File

@ -293,9 +293,6 @@ export default class PlayerController extends StateMachineAI implements BattlerA
this.CURRENT_SHIELD = newshield; //update shield value
}
else{
//i frame here
PlayerController.invincibilityTimer.start();
this.invincible = true;
//console.log("hurt anim");
(<AnimatedSprite>this.owner).animation.play("HURT" );
damage *= this.damage_multiplier;

View File

@ -993,7 +993,6 @@ export default class GameLevel extends Scene {
break;
}
}
}
protected addCheckPoint(startingTile: Vec2, size: Vec2, enter: string, exit: string): Rect {