add knockback value to GreenSlime monster and update player transparency handling

This commit is contained in:
2025-12-14 00:02:54 +01:00
parent d018ed3e6e
commit e0986d4708
2 changed files with 6 additions and 1 deletions

View File

@@ -261,7 +261,10 @@ public class Entity {
panel.player.life -= Math.max(damage, (block ? 0 : 1));
if(damage != 0) panel.player.transparent = true;
if(damage != 0) {
//setKnockback(panel.player, this, knockbackVal);
panel.player.transparent = true;
}
panel.player.invincible = true;
}
public void speak() {

View File

@@ -25,6 +25,8 @@ public class GreenSlimeMON extends Entity {
exp = 2;
projectile = new RockObj(panel);
knockbackVal = 5;
solidArea.x = 3;
solidArea.y = 18;
solidArea.width = 42;