added stats to battle system
This commit is contained in:
@@ -82,7 +82,10 @@ public class Entity {
|
||||
if(this.type == EntityType.MONSTER && contactPlayer) {
|
||||
if(panel.player.invincible) return;
|
||||
panel.playSE(6);
|
||||
panel.player.life -= 1;
|
||||
|
||||
int damage = attack - panel.player.defense;
|
||||
panel.player.life -= Math.max(damage, 0);
|
||||
|
||||
panel.player.invincible = true;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user