funktioniert eigentlich noch gar net lol

master
Jan Ehehalt 6 years ago
parent d31899d765
commit d1beb23cd4

@ -394,6 +394,7 @@ public class Controller extends ApplicationAdapter implements InputProcessor{
if(gs != null){;
d.getPlayer().updateItems();
hc.updateHud(batch, d.getPlayer());
d.getPlayer().updateStats(level + 1);
gs.render(batch, d.getPlayer(), d.getCurrentEntities(), tileX, tileY, level, roomPosX, roomPosY, camera, d.getVisited());
}
@ -644,6 +645,7 @@ public class Controller extends ApplicationAdapter implements InputProcessor{
e[i].setHp(0);
gs.createDmgFont((int) p.getDmg(),(int)e[i].getxPos() + 10,(int) e[i].getyPos() + 20);
e[i].setToDelete(true);
p.addExp(e[i].getExp());
kills++;
}
else{

@ -19,6 +19,7 @@ public abstract class Entity {
protected boolean targetsPlayer;
protected int standartDef;
protected int def;
protected int exp;
@ -33,6 +34,7 @@ public abstract class Entity {
this.targetsPlayer = true;
this.standartDef = 0;
this.def = 0;
this.exp = 0;
}
public boolean attack(Entity e){
@ -223,4 +225,14 @@ public abstract class Entity {
public int getDef(){
return def;
}
public int getExp(){
return exp;
}
public void setExp(int exp){
this.exp = exp;
}
public void addExp(int exp){
this.exp = this.exp + exp;
}
}

@ -19,6 +19,7 @@ public class Archer extends Entity{
this.dmg = 5*lvl;
this.id = 0;
this.type = 1;
this.exp = lvl * 5;
minRange = 70;
maxRange = 210;
attackSpeed = 70;

@ -19,6 +19,7 @@ public class Darkarcher extends Entity{
this.dmg = 7*lvl;
this.id = 27;
this.type = 1;
this.exp = lvl * 5;
minRange = 80;
maxRange = 240;
attackSpeed = 100;

@ -13,6 +13,7 @@ public class Darkswordsman extends Entity {
this.direction = 1;
this.dmg = 12*lvl;
this.id = 26;
this.exp = lvl * 5;
this.type = 0;
// TODO: Sinnvolle Werte finden

@ -28,6 +28,7 @@ public class Darkwizard extends Entity{
this.dmg = 10*lvl;
this.id = 24;
this.type = 1;
this.exp = lvl * 5;
minRange = 140;
maxRange = 170;
attackSpeed = 70; // higher = slower

@ -28,6 +28,7 @@ public class Earthwizard extends Entity{
this.dmg = 8*lvl;
this.id = 8;
this.type = 1;
this.exp = lvl * 5;
minRange = 60;
maxRange = 150;
attackSpeed = 80;

@ -19,6 +19,7 @@ public class Firearcher extends Entity{
this.dmg = 8*lvl;
this.id = 13;
this.type = 1;
this.exp = lvl * 5;
minRange = 60;
maxRange = 200;
attackSpeed = 55;

@ -14,6 +14,7 @@ public class Fireswordsman extends Entity {
this.dmg = 15*lvl;
this.id = 10;
this.type = 0;
this.exp = lvl * 5;
// TODO: Sinnvolle Werte finden
direction = 2;

@ -28,6 +28,7 @@ public class Firewizard extends Entity{
this.dmg = 9*lvl;
this.id = 6;
this.type = 1;
this.exp = lvl * 5;
minRange = 50;
maxRange = 130;
attackSpeed = 60;

@ -28,6 +28,7 @@ public class Healwizard extends Entity{
this.dmg = 12*lvl;
this.id = 20;
this.type = 1;
this.exp = lvl * 5;
minRange = 64;
maxRange = 124;
attackSpeed = 60;

@ -19,6 +19,7 @@ public class Icearcher extends Entity{
this.dmg = 7*lvl;
this.id = 11;
this.type = 1;
this.exp = lvl * 5;
minRange = 80;
maxRange = 240;
attackSpeed = 100;

@ -14,6 +14,7 @@ public class Iceswordsman extends Entity {
this.dmg = 14*lvl;
this.id = 15;
this.type = 0;
this.exp = lvl * 5;
// TODO: Sinnvolle Werte finden
direction = 2;

@ -28,6 +28,7 @@ public class Icewizard extends Entity{
this.dmg = 10*lvl;
this.id = 16;
this.type = 1;
this.exp = lvl * 5;
minRange = 70;
maxRange = 190;
attackSpeed = 80;

@ -28,6 +28,7 @@ public class Naturewizard extends Entity{
this.dmg = 8*lvl;
this.id = 22;
this.type = 1;
this.exp = lvl * 5;
minRange = 60;
maxRange = 150;
attackSpeed = 80;

@ -22,6 +22,8 @@ public class Player extends Entity {
String gender;
float standartMovementSpeed;
float movementSpeed;
int level;
public Player() {
super(200, 200, 1);
@ -49,11 +51,12 @@ public class Player extends Entity {
public void updateStats(int ey){
this.lvl = ey+1;
this.maxhp = 50 * this.lvl;
this.standartMaxHp = 50 * this.lvl;
this.standartDmg = 20 * this.lvl;
this.level = (exp / 10) + 1;
this.maxhp = 50 * this.level;
this.standartMaxHp = 50 * this.level;
this.standartDmg = 20 * this.level;
this.dmg = this.standartDmg;
this.standartDef = 4 * lvl;
this.standartDef = 4 * level;
this.def = this.standartDef;
updateItems();
}

@ -14,6 +14,7 @@ public class Swordsman extends Entity {
this.dmg = 12*lvl;
this.id = 1;
this.type = 0;
this.exp = lvl * 5;
// TODO: Sinnvolle Werte finden
direction = 2;

@ -28,6 +28,7 @@ public class Waterwizard extends Entity{
this.dmg = 12*lvl;
this.id = 18;
this.type = 1;
this.exp = lvl * 5;
minRange = 65;
maxRange = 130;
attackSpeed = 50;

@ -28,6 +28,7 @@ public class Wizard extends Entity{
this.dmg = 10*lvl;
this.id = 3;
this.type = 1;
this.exp = lvl * 5;
minRange = 140;
maxRange = 170;
attackSpeed = 70; // higher = slower

Loading…
Cancel
Save