Add javadocs, add "requiresNearbyEntity" flag to ItemBasedSpell, respect dmg and range values, use <player>.getTargetEntity instead of the randomness before.

Signed-off-by: SticksDev <tanner@teamhydra.dev>
This commit is contained in:
2023-06-05 19:52:03 -04:00
parent a3f581fc8a
commit 616c6ea517
17 changed files with 403 additions and 61 deletions

View File

@ -7,21 +7,46 @@ public class BaseSpell {
public String name;
public String description;
public int spellID;
public int range;
public BaseSpell(String name, String description, int spellID) {
/**
* Creates a new BaseSpell object. All parameters are required.
*
* @param name The name of the spell.
* @param description The description of the spell.
* @param range The range of the spell.
* @param spellID The ID of the spell, hardcoded in the spell's class and not editable.
*/
public BaseSpell(String name, String description, int range, int spellID) {
this.name = name;
this.description = description;
this.spellID = spellID;
this.range = range;
}
/**
* Gets the name of the spell.
*
* @return The name of the spell.
*/
public String getName() {
return name;
}
/**
* Gets the description of the spell.
*
* @return The description of the spell.
*/
public String getDescription() {
return description;
}
/**
* Gets the range of the spell.
*
* @return The range of the spell.
*/
public int getSpellID() {
return spellID;
}