Develop #1
@@ -15,15 +15,15 @@ import java.util.ArrayList;
|
||||
public class Dragon extends Enemy {
|
||||
public Dragon (String name, int maxHealth, int health, long money, int baseDamage, EntityState state, Weapon weapon,
|
||||
Shield shield, Costume costume, ArrayList<Item> inventory, int defenseBonus, boolean isDefending,
|
||||
int healAmount, int stamina, int maxStamina) {
|
||||
int healAmount, int stamina, int maxStamina, int levelProgressAmount) {
|
||||
|
||||
super(name, maxHealth, health, money, baseDamage, state, weapon, shield, costume, inventory, defenseBonus, isDefending, healAmount, stamina, maxStamina);
|
||||
super(name, maxHealth, health, money, baseDamage, state, weapon, shield, costume, inventory, defenseBonus, isDefending, healAmount, stamina, maxStamina, levelProgressAmount);
|
||||
|
||||
this.Key = new KeyItem("Dragon Key", this);
|
||||
}
|
||||
|
||||
public Dragon() {
|
||||
this("Dragon", 5000, 5000, 0, 100, EntityState.ALIVE, null, null, null, new ArrayList<>(){}, 50, false, 50, 500, 500);
|
||||
this("Dragon", 5000, 5000, 0, 100, EntityState.ALIVE, null, null, null, new ArrayList<>(){}, 50, false, 50, 500, 500, 1000);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -20,14 +20,16 @@ import java.util.Random;
|
||||
|
||||
public abstract class Enemy extends Entity {
|
||||
protected KeyItem Key;
|
||||
public int LevelProgressAmount;
|
||||
|
||||
public Enemy (String name, int maxHealth, int health, long money, int baseDamage, EntityState state, Weapon weapon,
|
||||
Shield shield, Costume costume, ArrayList<Item> inventory, int defenseBonus, boolean isDefending,
|
||||
int healAmount, int stamina, int maxStamina) {
|
||||
int healAmount, int stamina, int maxStamina, int levelProgressAmount) {
|
||||
|
||||
super(name, maxHealth, health, stamina, maxStamina, money, baseDamage, state, weapon, shield, costume, inventory, defenseBonus, isDefending, healAmount);
|
||||
|
||||
Key = new KeyItem(null, this);
|
||||
LevelProgressAmount = levelProgressAmount;
|
||||
}
|
||||
|
||||
protected Enemy() {
|
||||
|
||||
@@ -14,15 +14,15 @@ import java.util.ArrayList;
|
||||
public class Goblin extends Enemy {
|
||||
public Goblin (String name, int maxHealth, int health, long money, int baseDamage, EntityState state, Weapon weapon,
|
||||
Shield shield, Costume costume, ArrayList<Item> inventory, int defenseBonus, boolean isDefending,
|
||||
int healAmount, int stamina, int maxStamina) {
|
||||
int healAmount, int stamina, int maxStamina, int levelProgressAmount) {
|
||||
|
||||
super(name, maxHealth, health, money, baseDamage, state, weapon, shield, costume, inventory, defenseBonus, isDefending, healAmount, stamina, maxStamina);
|
||||
super(name, maxHealth, health, money, baseDamage, state, weapon, shield, costume, inventory, defenseBonus, isDefending, healAmount, stamina, maxStamina, levelProgressAmount);
|
||||
|
||||
this.Key = new KeyItem("Goblin Key", this);
|
||||
}
|
||||
|
||||
public Goblin() {
|
||||
this("Goblin", 75, 75, 100, 10, EntityState.ALIVE, null, null, null, new ArrayList<>(), 5, false, 15, 100, 100);
|
||||
this("Goblin", 75, 75, 100, 10, EntityState.ALIVE, null, null, null, new ArrayList<>(), 5, false, 15, 100, 100, 50);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -18,15 +18,15 @@ public class Skeleton extends Enemy {
|
||||
|
||||
public Skeleton (String name, int maxHealth, int health, long money, int baseDamage, EntityState state, Weapon weapon,
|
||||
Shield shield, Costume costume, ArrayList<Item> inventory, int defenseBonus, boolean isDefending,
|
||||
int healAmount, int stamina, int maxStamina) {
|
||||
int healAmount, int stamina, int maxStamina, int levelProgressAmount) {
|
||||
|
||||
super(name, maxHealth, health, money, baseDamage, state, weapon, shield, costume, inventory, defenseBonus, isDefending, healAmount, stamina, maxStamina);
|
||||
super(name, maxHealth, health, money, baseDamage, state, weapon, shield, costume, inventory, defenseBonus, isDefending, healAmount, stamina, maxStamina, levelProgressAmount);
|
||||
|
||||
this.Key = new KeyItem("Skeleton Key", this);
|
||||
}
|
||||
|
||||
public Skeleton() {
|
||||
this("Skeleton", 125, 125, 200, 15, EntityState.ALIVE, null, null, null, new ArrayList<>(), 5, false, 20, 100, 100);
|
||||
this("Skeleton", 125, 125, 200, 15, EntityState.ALIVE, null, null, null, new ArrayList<>(), 5, false, 20, 100, 100, 100);
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -76,6 +76,7 @@ public class Skeleton extends Enemy {
|
||||
SetState(EntityState.ALIVE);
|
||||
Health = MaxHealth / 2;
|
||||
HasRevived = true;
|
||||
entity.SetState(EntityState.FROZEN);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -14,15 +14,15 @@ import java.util.ArrayList;
|
||||
public class Vampire extends Enemy {
|
||||
public Vampire (String name, int maxHealth, int health, long money, int baseDamage, EntityState state, Weapon weapon,
|
||||
Shield shield, Costume costume, ArrayList<Item> inventory, int defenseBonus, boolean isDefending,
|
||||
int healAmount, int stamina, int maxStamina) {
|
||||
int healAmount, int stamina, int maxStamina, int levelProgressAmount) {
|
||||
|
||||
super(name, maxHealth, health, money, baseDamage, state, weapon, shield, costume, inventory, defenseBonus, isDefending, healAmount, stamina, maxStamina);
|
||||
super(name, maxHealth, health, money, baseDamage, state, weapon, shield, costume, inventory, defenseBonus, isDefending, healAmount, stamina, maxStamina, levelProgressAmount);
|
||||
|
||||
this.Key = new KeyItem("Vampire Key", this);
|
||||
}
|
||||
|
||||
public Vampire() {
|
||||
this("Vampire", 150, 150, 300, 20, EntityState.ALIVE, null, null, null, new ArrayList<>(), 8, false, 30, 100, 100);
|
||||
this("Vampire", 150, 150, 300, 20, EntityState.ALIVE, null, null, null, new ArrayList<>(), 8, false, 30, 100, 100, 150);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -44,17 +44,19 @@ public abstract class Player extends Entity {
|
||||
}
|
||||
|
||||
public void LevelUp() {
|
||||
Level++;
|
||||
double upgradeRatio = (1.1 + ((double) Level * 0.02));
|
||||
int gift = Level * 10;
|
||||
while (LevelProgress >= 100) {
|
||||
Level++;
|
||||
double upgradeRatio = (1.1 + ((double) Level * 0.02));
|
||||
int gift = Level * 10;
|
||||
|
||||
LevelProgress -= 100;
|
||||
MaxStamina = (int) (MaxStamina * upgradeRatio);
|
||||
MaxHealth = (int) (MaxHealth * upgradeRatio);
|
||||
BaseDamage = (int) (BaseDamage * upgradeRatio);
|
||||
DefenseBonus = (int) (DefenseBonus * upgradeRatio);
|
||||
HealAmount = (int) (HealAmount * upgradeRatio);
|
||||
ModifyMoney(gift, true);
|
||||
LevelProgress -= 100;
|
||||
MaxStamina = (int) (MaxStamina * upgradeRatio);
|
||||
MaxHealth = (int) (MaxHealth * upgradeRatio);
|
||||
BaseDamage = (int) (BaseDamage * upgradeRatio);
|
||||
DefenseBonus = (int) (DefenseBonus * upgradeRatio);
|
||||
HealAmount = (int) (HealAmount * upgradeRatio);
|
||||
ModifyMoney(gift, true);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
Reference in New Issue
Block a user