master
GammelJan 6 years ago
parent 5cc40a7f5b
commit 9d3cdf0406

@ -387,6 +387,7 @@ public class Controller extends ApplicationAdapter implements InputProcessor{
roomPosY += 1; roomPosY += 1;
d.getPlayer().setxPos((roomX / 2)* 48); d.getPlayer().setxPos((roomX / 2)* 48);
d.getPlayer().setyPos(48); d.getPlayer().setyPos(48);
d.getPlayer().updateStats(level);
gs.startLoadingScreen(); gs.startLoadingScreen();
} }

@ -13,7 +13,7 @@ public class Archer extends Entity{
this.maxhp = 75*lvl; this.maxhp = 75*lvl;
this.hp = this.maxhp; this.hp = this.maxhp;
this.direction = 1; this.direction = 1;
this.dmg = 25*lvl; this.dmg = 10*lvl;
this.id = 0; this.id = 0;
this.type = 1; this.type = 1;
counter = 0; counter = 0;

@ -23,9 +23,9 @@ public class Player extends Entity {
this.maxhp = 100 * lvl; this.maxhp = 100 * lvl;
this.hp = this.maxhp; this.hp = this.maxhp;
this.standartMaxHp = 5 * lvl; this.standartMaxHp = 100 * lvl;
this.dmg = 50*lvl; this.dmg = 60*lvl;
this.standartDmg = dmg; this.standartDmg = dmg;
id = -1; id = -1;
type = -1; type = -1;
@ -35,6 +35,13 @@ public class Player extends Entity {
} }
public void updateStats(int lvl){
this.lvl = lvl;
this.standartMaxHp = 100 * lvl;
this.standartDmg = 100 * lvl;
updateItems();
}
public void pickUp(Item item){ public void pickUp(Item item){
inv.addItem(item); inv.addItem(item);
} }
@ -60,13 +67,19 @@ public class Player extends Entity {
// nix lol weil key // nix lol weil key
break; break;
case 1: case 1:
this.hp = hp + inv.getItem(x).getHeal(); if(hp + inv.getItem(x).getHeal() >= maxhp){
hp = maxhp;
}
else{
this.hp = hp + inv.getItem(x).getHeal();
}
inv.setItem(x, null);
break; break;
case 2: case 2:
// nix lol weil amulet // nix lol weil amulet
break; break;
} }
inv.setItem(x, null);
} }
} }

@ -11,7 +11,7 @@ public class Swordsman extends Entity {
this.maxhp = 100*lvl; this.maxhp = 100*lvl;
this.hp = this.maxhp; this.hp = this.maxhp;
this.direction = 1; this.direction = 1;
this.dmg = 35*lvl; this.dmg = 20*lvl;
this.id = 1; this.id = 1;
this.type = 0; this.type = 0;

@ -22,7 +22,7 @@ public class Wizard extends Entity{
this.maxhp = 80*lvl; this.maxhp = 80*lvl;
this.hp = this.maxhp; this.hp = this.maxhp;
this.direction = 1; this.direction = 1;
this.dmg = 30*lvl; this.dmg = 15*lvl;
this.id = 3; this.id = 3;
this.type = 1; this.type = 1;
counter = 0; counter = 0;

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

@ -15,7 +15,7 @@ public class Potion extends Item {
public Potion(int lvl) { public Potion(int lvl) {
super(lvl); super(lvl);
this.heal = lvl * 3; this.heal = lvl * 40;
this.dmg = 0; this.dmg = 0;
this.id = 1; this.id = 1;
} }

@ -197,7 +197,6 @@ public class GameScreen {
tmr.render(); tmr.render();
camera.zoom = 700f; // Standart 700f camera.zoom = 700f; // Standart 700f
camera.update(); camera.update();
batch.setProjectionMatrix(camera.combined); batch.setProjectionMatrix(camera.combined);
@ -345,7 +344,7 @@ public class GameScreen {
public void stop(){ public void stop(){
animations.stop(); animations.stop();
animatePlayer.stop(); animatePlayer.stop();
camera.normalizeUp();
} }
public void resume(){ public void resume(){
animations.start(); animations.start();

Loading…
Cancel
Save