implement Weapon.java
This commit is contained in:
@@ -1,35 +1,48 @@
|
||||
package org.project.item.weapons;
|
||||
|
||||
import org.project.entity.Entity;
|
||||
import org.project.weaponEffects.StatusEffect;
|
||||
|
||||
import org.project.item.Item;
|
||||
|
||||
|
||||
// TODO: UPDATE IMPLEMENTATION
|
||||
public abstract class Weapon {
|
||||
private int damage;
|
||||
private int manaCost;
|
||||
public abstract class Weapon implements Item {
|
||||
|
||||
/*
|
||||
TODO: ADD OTHER REQUIRED AND BONUS ATTRIBUTES
|
||||
*/
|
||||
private String name;
|
||||
private StatusEffect effect;
|
||||
private int lightAttackDamage;
|
||||
private int heavyAttackDamage;
|
||||
private int equipManaCost;
|
||||
|
||||
public Weapon(int damage, int manaCost) {
|
||||
this.damage = damage;
|
||||
this.manaCost = manaCost;
|
||||
|
||||
public Weapon(String name,int heavyAttackDamage,int lightAttackDamage, StatusEffect statusEffect, int equipManaCost) {
|
||||
this.name = name;
|
||||
this.lightAttackDamage = lightAttackDamage;
|
||||
this.heavyAttackDamage = heavyAttackDamage;
|
||||
this.effect = statusEffect;
|
||||
this.equipManaCost = equipManaCost;
|
||||
}
|
||||
|
||||
public int getHeavyAttackDamage() {
|
||||
return heavyAttackDamage;
|
||||
}
|
||||
|
||||
public int getLightAttackDamage() {
|
||||
return lightAttackDamage;
|
||||
}
|
||||
|
||||
public StatusEffect getEffect() {
|
||||
return effect;
|
||||
}
|
||||
|
||||
public void setEffect(StatusEffect effect) {
|
||||
this.effect = effect;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public void use(Entity target) {
|
||||
target.takeDamage(damage);
|
||||
public String getName() {
|
||||
return name;
|
||||
}
|
||||
|
||||
public int getDamage() {
|
||||
return damage;
|
||||
}
|
||||
|
||||
public int getManaCost() {
|
||||
return manaCost;
|
||||
}
|
||||
|
||||
/*
|
||||
TODO: ADD OTHER REQUIRED AND BONUS METHODS
|
||||
*/
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user