implement Sword.java
This commit is contained in:
@@ -1,26 +1,26 @@
|
||||
package org.project.item.weapons;
|
||||
|
||||
import org.project.entity.Entity;
|
||||
import org.project.weaponEffects.StatusEffect;
|
||||
|
||||
import java.util.ArrayList;
|
||||
public class Sword extends Weapon {
|
||||
|
||||
// TODO: UPDATE IMPLEMENTATION
|
||||
public class Sword {
|
||||
/*
|
||||
THIS IS AN EXAMPLE OF A WEAPON DESIGN.
|
||||
*/
|
||||
|
||||
int abilityCharge;
|
||||
private static final String NAME = "Sword";
|
||||
private static final int LIGHT_DAMAGE = 10;
|
||||
private static final int HEAVY_DAMAGE = 5;
|
||||
private static final int DURABILITY = 4;
|
||||
|
||||
public Sword() {
|
||||
// TODO: DESIGN SWORD'S ATTRIBUTES IMPLEMENT THE CONSTRUCTOR
|
||||
this(null);
|
||||
}
|
||||
|
||||
// TODO: (BONUS) UPDATE THE UNIQUE ABILITY
|
||||
public void uniqueAbility(ArrayList<Entity> targets) {
|
||||
abilityCharge += 2;
|
||||
for (Entity target : targets) {
|
||||
target.takeDamage(getDamage());
|
||||
}
|
||||
public Sword(StatusEffect weaponEffect) {
|
||||
|
||||
super(
|
||||
NAME,
|
||||
LIGHT_DAMAGE,
|
||||
HEAVY_DAMAGE,
|
||||
weaponEffect,
|
||||
DURABILITY
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user