GammelJAN 6 years ago
parent 689767103e
commit 250bc6c89d

@ -22,10 +22,10 @@ public class Player extends Entity {
this.maxhp = 5 * (lvl + 1);
this.hp = this.maxhp;
standartMaxHp = this.maxhp;
this.standartMaxHp = 5 * (lvl + 1);
this.dmg = 3*lvl;
standartDmg = this.dmg;
this.standartDmg = dmg = 3*lvl;
id = -1;
inv = new Inventory(3,2);
// TODO: Sinnvolle Werte finden
@ -41,12 +41,12 @@ public class Player extends Entity {
public void updateItems(){
if(inv.getItem(1) != null){
dmg = standartDmg + inv.getItem(1).getDmg();
maxhp = standartMaxHp + inv.getItem(1).getHeal();
this.dmg = this.standartDmg + inv.getItem(1).getDmg();
//this.maxhp = this.standartMaxHp + inv.getItem(1).getHeal();
}
else{
dmg = standartDmg;
maxhp = standartMaxHp;
this.dmg = this.standartDmg;
//this.maxhp = this.standartMaxHp;
}
}

@ -15,8 +15,8 @@ public class Amulet extends Item {
public Amulet(int lvl) {
super(lvl);
this.dmg = lvl * 4;
this.heal = lvl * 4;
this.dmg = 4 * (lvl + 1);
this.heal = 4 * (lvl + 1);
this.id = 2;
}

@ -95,7 +95,7 @@ public class HudContainer {
selectedSprite.setY(invYPos[selected] - 2f);
float n = p.getHp() / p.getMaxhp();
int newWidth = (int) (n * 122);
int newWidth = (int) (n * playerHealthTexture.getWidth());
TextureRegion[][] playerHealthRegion = TextureRegion.split(playerHealthTexture,newWidth, playerHealthTexture.getHeight());
playerHealthSprite = new Sprite(playerHealthRegion[0][0]);
playerHealthSprite.setPosition(playerHealthX, playerHealthY);

Loading…
Cancel
Save