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){; if(gs != null){;
d.getPlayer().updateItems(); d.getPlayer().updateItems();
hc.updateHud(batch, d.getPlayer()); 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()); 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); e[i].setHp(0);
gs.createDmgFont((int) p.getDmg(),(int)e[i].getxPos() + 10,(int) e[i].getyPos() + 20); gs.createDmgFont((int) p.getDmg(),(int)e[i].getxPos() + 10,(int) e[i].getyPos() + 20);
e[i].setToDelete(true); e[i].setToDelete(true);
p.addExp(e[i].getExp());
kills++; kills++;
} }
else{ else{

@ -19,6 +19,7 @@ public abstract class Entity {
protected boolean targetsPlayer; protected boolean targetsPlayer;
protected int standartDef; protected int standartDef;
protected int def; protected int def;
protected int exp;
@ -33,6 +34,7 @@ public abstract class Entity {
this.targetsPlayer = true; this.targetsPlayer = true;
this.standartDef = 0; this.standartDef = 0;
this.def = 0; this.def = 0;
this.exp = 0;
} }
public boolean attack(Entity e){ public boolean attack(Entity e){
@ -223,4 +225,14 @@ public abstract class Entity {
public int getDef(){ public int getDef(){
return def; 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.dmg = 5*lvl;
this.id = 0; this.id = 0;
this.type = 1; this.type = 1;
this.exp = lvl * 5;
minRange = 70; minRange = 70;
maxRange = 210; maxRange = 210;
attackSpeed = 70; attackSpeed = 70;

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Loading…
Cancel
Save