Skip to content

Commit

Permalink
Removed snowballing + balance changes
Browse files Browse the repository at this point in the history
  • Loading branch information
Totenfluch committed May 26, 2016
1 parent 8b2e8d7 commit eed5289
Show file tree
Hide file tree
Showing 5 changed files with 59 additions and 7 deletions.
12 changes: 9 additions & 3 deletions Blockinvaders/src/me/game/bullets/DoubleHelixBullet.java
Original file line number Diff line number Diff line change
Expand Up @@ -60,12 +60,18 @@ public void refresh(){
if (checkHit(p.getX(), p.getY(), p.getWidth(), p.getHeight()) /*|| hit*/) {
if (p.isAlive()) {
waffe.getKugeln().remove(this);
p.setLife(p.getLife()-waffe.getDamage());
Monster m = (Monster) waffe.getOwner();
m.setInitHp(m.getInitHp() + 300);
m.setInitHp(m.getInitHp() + (Frame.getInstance().clearcount+1)*10);
m.setLife(m.getInitHp());
m.setColor(Color.DARKMAGENTA);
p.giveWeapon(((PlayerWeapon) p.hisWeapon).prevWaffe());
if(!p.isHitImmume()){
p.setLife(p.getLife()-waffe.getDamage());
p.setHitImmume(625);
}
if(!p.isDowngradeImmume()){
p.giveWeapon(((PlayerWeapon) p.hisWeapon).prevWaffe());
p.setDowngradeImmume(1000);
}
}
}
}
Expand Down
12 changes: 9 additions & 3 deletions Blockinvaders/src/me/game/bullets/MonsterBullet.java
Original file line number Diff line number Diff line change
Expand Up @@ -24,12 +24,18 @@ public void refresh(){
if (checkHit(p.getX(), p.getY(), p.getWidth(), p.getHeight())) {
if (p.isAlive()) {
waffe.getKugeln().remove(this);
p.setLife(p.getLife()-waffe.getDamage());
Monster m = (Monster) waffe.getOwner();
m.setInitHp(m.getInitHp() + 300);
m.setInitHp(m.getInitHp() + (Frame.getInstance().clearcount+1)*10);
m.setLife(m.getInitHp());
m.setColor(Color.DARKMAGENTA);
p.giveWeapon(((PlayerWeapon) p.hisWeapon).prevWaffe());
if(!p.isHitImmume()){
p.setLife(p.getLife()-waffe.getDamage());
p.setHitImmume(625);
}
if(!p.isDowngradeImmume()){
p.giveWeapon(((PlayerWeapon) p.hisWeapon).prevWaffe());
p.setDowngradeImmume(1000);
}
}
}
}
Expand Down
39 changes: 39 additions & 0 deletions Blockinvaders/src/me/game/characters/Player.java
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@ public class Player extends Character implements Controllable{
private Controller controller;
private static Frame instance;
private String PlayerName;
private int hitImmume = 0;
private int downgradeImmume = 0;

public Player(double xPos, int leben, PlayerWeapon waffe) {
super(xPos, 800, leben, waffe);
Expand Down Expand Up @@ -102,6 +104,43 @@ public void setScore(int score){
public int getScore() {
return this.score;
}

public int getHitImmume(){
return hitImmume;
}

public int getDowngradeImmume() {
return downgradeImmume;
}

public boolean isHitImmume(){
if(hitImmume > 0)
return true;
return false;
}

public boolean isDowngradeImmume(){
if(downgradeImmume > 0)
return true;
return false;
}

public void setHitImmume(int hitImmume) {
this.hitImmume = hitImmume;
}

public void setDowngradeImmume(int downgradeImmume) {
this.downgradeImmume = downgradeImmume;
}

public void refresh(){
if(hitImmume > 0)
hitImmume--;
if(downgradeImmume > 0)
downgradeImmume--;
}



@Override
public void draw(GraphicsContext gc) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ public class MonsterTier2Weapon extends MonsterWeapon{
double bulletW = 5.0,
bulletH = 5.0;
public MonsterTier2Weapon(Monster Besitzer) {
super(Besitzer, 2, 12, 4);
super(Besitzer, 1, 12, 4);
}

@Override
Expand Down
1 change: 1 addition & 0 deletions Blockinvaders/src/me/game/pack/Frame.java
Original file line number Diff line number Diff line change
Expand Up @@ -813,6 +813,7 @@ else if (Monster_Direction == 0)

int dead = 0;
for (int i = 0; i < Players.length; i++) {
Players[i].refresh();
if (!Players[i].isAlive())
dead++;
if (dead == Players.length){
Expand Down

0 comments on commit eed5289

Please sign in to comment.