mirror of
https://github.com/SimplexDevelopment/ArcanumOcculta.git
synced 2025-06-27 12:36:40 +00:00
Initial Commit
This commit is contained in:
@ -0,0 +1,32 @@
|
||||
package app.simplexdev.arcanumocculta.api.book;
|
||||
|
||||
import app.simplexdev.arcanumocculta.api.spell.Spell;
|
||||
import org.bukkit.inventory.ItemStack;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public interface SpellBook {
|
||||
String getBookName();
|
||||
|
||||
void setBookName(final String name);
|
||||
|
||||
String getBookDescription();
|
||||
|
||||
void setBookDescription(final String description);
|
||||
|
||||
ItemStack getBookItem();
|
||||
|
||||
void setBookItem(final ItemStack itemStack);
|
||||
|
||||
List<Spell> getSpells();
|
||||
|
||||
void addSpell(Spell spell);
|
||||
|
||||
void removeSpell(Spell spell);
|
||||
|
||||
Spell getSpell(final String name);
|
||||
|
||||
Spell getSpell(final int index);
|
||||
|
||||
int getSpellCount();
|
||||
}
|
@ -0,0 +1,14 @@
|
||||
package app.simplexdev.arcanumocculta.api.book;
|
||||
|
||||
import app.simplexdev.arcanumocculta.api.spell.Spell;
|
||||
import org.bukkit.inventory.ItemStack;
|
||||
|
||||
public interface SpellTome {
|
||||
String getTomeName();
|
||||
|
||||
String getTomeDescription();
|
||||
|
||||
ItemStack getTomeItem();
|
||||
|
||||
Spell getContainedSpell();
|
||||
}
|
@ -0,0 +1,7 @@
|
||||
package app.simplexdev.arcanumocculta.api.effect;
|
||||
|
||||
import org.bukkit.potion.PotionEffectType;
|
||||
|
||||
public interface CompoundEffect extends Effect {
|
||||
PotionEffectType[] getEffectTypes();
|
||||
}
|
@ -0,0 +1,14 @@
|
||||
package app.simplexdev.arcanumocculta.api.effect;
|
||||
|
||||
import java.time.Duration;
|
||||
|
||||
public interface Effect
|
||||
{
|
||||
Duration getDuration();
|
||||
|
||||
float getAmplifier();
|
||||
|
||||
boolean isAmbient();
|
||||
|
||||
boolean forceDisplay();
|
||||
}
|
@ -0,0 +1,12 @@
|
||||
package app.simplexdev.arcanumocculta.api.effect;
|
||||
|
||||
import app.simplexdev.arcanumocculta.api.player.Caster;
|
||||
|
||||
public interface PassiveEffect extends Effect
|
||||
{
|
||||
Caster getWandHolder();
|
||||
|
||||
void onTick();
|
||||
|
||||
PassiveEffects getPassiveEffect();
|
||||
}
|
@ -0,0 +1,30 @@
|
||||
package app.simplexdev.arcanumocculta.api.effect;
|
||||
|
||||
import java.time.Duration;
|
||||
|
||||
public enum PassiveEffects {
|
||||
MANA_REGEN(Duration.ofSeconds(10L), 2.0),
|
||||
LIFE_STEAL(Duration.ofSeconds(5L), 1.0),
|
||||
ABSORPTION(Duration.ofSeconds(30L), 4.0),
|
||||
SPELL_SHIELD(Duration.ofSeconds(5L), 5.0),
|
||||
IMMUNITY(Duration.ofSeconds(5L), 100.0),
|
||||
WITHER(Duration.ofSeconds(5L), 2.0),
|
||||
DAMAGE_BOOST(Duration.ofSeconds(5L), 2.75),
|
||||
IMPROVED_ACCURACY(Duration.ofSeconds(5L), 5.0);
|
||||
|
||||
private final Duration duration;
|
||||
private final double amount;
|
||||
|
||||
PassiveEffects(final Duration duration, final double amount) {
|
||||
this.duration = duration;
|
||||
this.amount = amount;
|
||||
}
|
||||
|
||||
Duration getDuration() {
|
||||
return this.duration;
|
||||
}
|
||||
|
||||
double getAmount() {
|
||||
return this.amount;
|
||||
}
|
||||
}
|
@ -0,0 +1,8 @@
|
||||
package app.simplexdev.arcanumocculta.api.effect;
|
||||
|
||||
import org.bukkit.entity.Player;
|
||||
|
||||
public interface SpecialEffect extends Effect
|
||||
{
|
||||
void applyEffect(final Player player);
|
||||
}
|
@ -0,0 +1,9 @@
|
||||
package app.simplexdev.arcanumocculta.api.effect;
|
||||
|
||||
import java.time.Duration;
|
||||
import org.bukkit.potion.PotionEffectType;
|
||||
|
||||
public interface SpellEffect extends Effect
|
||||
{
|
||||
PotionEffectType getEffectType();
|
||||
}
|
@ -0,0 +1,90 @@
|
||||
package app.simplexdev.arcanumocculta.api.player;
|
||||
|
||||
import app.simplexdev.arcanumocculta.api.book.SpellBook;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.UUID;
|
||||
|
||||
public interface Caster {
|
||||
/**
|
||||
* @return The {@link UUID} of the caster.
|
||||
*/
|
||||
UUID getCasterUUID();
|
||||
|
||||
/**
|
||||
* @return The name of the caster.
|
||||
*/
|
||||
String getDisplayName();
|
||||
|
||||
/**
|
||||
* @return The amount of maximum mana the caster is allowed to have.
|
||||
*/
|
||||
double getMaximumMana();
|
||||
|
||||
/**
|
||||
* Sets the maximum amount of mana the caster is allowed to have.
|
||||
*
|
||||
* @param mana The amount of mana to set the maximum to.
|
||||
*/
|
||||
void setMaximumMana(final double mana);
|
||||
|
||||
/**
|
||||
* @return The amount of mana the caster currently has.
|
||||
*/
|
||||
double getCurrentMana();
|
||||
|
||||
/**
|
||||
* Adds mana to the caster.
|
||||
*
|
||||
* @param mana The amount of mana to add.
|
||||
* @return The players updated {@link #getCurrentMana()}.
|
||||
*/
|
||||
double addMana(final double mana);
|
||||
|
||||
/**
|
||||
* Increases the amount of maximum mana this caster is allowed to have.
|
||||
*
|
||||
* @param mana The amount of mana to increase the maximum by.
|
||||
* @return The players updated {@link #getMaximumMana()}.
|
||||
*/
|
||||
double increaseMaximumMana(final double mana);
|
||||
|
||||
/**
|
||||
* Removes mana from the caster.
|
||||
*
|
||||
* @param mana The amount of mana to remove.
|
||||
* @return The players updated {@link #getCurrentMana()}.
|
||||
*/
|
||||
double removeMana(final double mana);
|
||||
|
||||
/**
|
||||
* Decreases the amount of maximum mana this caster is allowed to have.
|
||||
*
|
||||
* @param mana The amount of mana to decrease the maximum by.
|
||||
* @return The players updated {@link #getMaximumMana()}.
|
||||
*/
|
||||
double decreaseMaximumMana(final double mana);
|
||||
|
||||
/**
|
||||
* Sets the amount of mana the caster currently has.
|
||||
*
|
||||
* @param mana The amount of mana to set the user's current mana to.
|
||||
*/
|
||||
void setMana(final double mana);
|
||||
|
||||
/**
|
||||
* @return The {@link SpellBook} of the caster.
|
||||
*/
|
||||
SpellBook getSpellbook();
|
||||
|
||||
/**
|
||||
* @return A list of {@link SpellResistance}s the caster has.
|
||||
*/
|
||||
List<SpellResistance> getSpellResistances();
|
||||
|
||||
void addSpellResistance(SpellResistance resistance);
|
||||
|
||||
void removeSpellResistance(SpellResistance resistance);
|
||||
|
||||
boolean hasResistance(int spellOrdinal);
|
||||
}
|
@ -0,0 +1,9 @@
|
||||
package app.simplexdev.arcanumocculta.api.player;
|
||||
|
||||
public interface SpellResistance {
|
||||
String getSpellName();
|
||||
|
||||
double getResistance();
|
||||
|
||||
int getOrdinal();
|
||||
}
|
@ -0,0 +1,18 @@
|
||||
package app.simplexdev.arcanumocculta.api.player;
|
||||
|
||||
import app.simplexdev.arcanumocculta.api.effect.PassiveEffect;
|
||||
import org.bukkit.inventory.ItemStack;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public interface Wand {
|
||||
String getWandName();
|
||||
|
||||
String getWandDescription();
|
||||
|
||||
ItemStack getWandItem();
|
||||
|
||||
double getManaPenalty();
|
||||
|
||||
List<PassiveEffect> getPassiveEffects();
|
||||
}
|
@ -0,0 +1,8 @@
|
||||
package app.simplexdev.arcanumocculta.api.spell;
|
||||
|
||||
import app.simplexdev.arcanumocculta.api.effect.CompoundEffect;
|
||||
|
||||
public interface CompoundSpell extends Spell
|
||||
{
|
||||
CompoundEffect getEffect();
|
||||
}
|
@ -0,0 +1,8 @@
|
||||
package app.simplexdev.arcanumocculta.api.spell;
|
||||
|
||||
import app.simplexdev.arcanumocculta.api.effect.SpecialEffect;
|
||||
|
||||
public interface SpecialSpell extends Spell
|
||||
{
|
||||
SpecialEffect getSpecialEffect();
|
||||
}
|
@ -0,0 +1,23 @@
|
||||
package app.simplexdev.arcanumocculta.api.spell;
|
||||
|
||||
import app.simplexdev.arcanumocculta.api.effect.SpellEffect;
|
||||
import org.bukkit.entity.Projectile;
|
||||
|
||||
import java.time.Duration;
|
||||
|
||||
public interface Spell
|
||||
{
|
||||
String getSpellName();
|
||||
|
||||
String getSpellDescription();
|
||||
|
||||
double getManaCost();
|
||||
|
||||
Duration getCoolDown();
|
||||
|
||||
int getSpellLevel();
|
||||
|
||||
boolean isOnCoolDown();
|
||||
|
||||
SpellProjectile<? extends Projectile> getSpellProjectile();
|
||||
}
|
@ -0,0 +1,18 @@
|
||||
package app.simplexdev.arcanumocculta.api.spell;
|
||||
|
||||
import org.bukkit.Location;
|
||||
import org.bukkit.Particle;
|
||||
import org.bukkit.entity.LivingEntity;
|
||||
import org.bukkit.entity.Projectile;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public interface SpellProjectile<T extends Projectile> {
|
||||
T getProjectile();
|
||||
|
||||
List<Particle> getParticles();
|
||||
|
||||
void cast(final Location target);
|
||||
|
||||
void cast(final LivingEntity target);
|
||||
}
|
@ -0,0 +1,8 @@
|
||||
package app.simplexdev.arcanumocculta.api.spell;
|
||||
|
||||
import app.simplexdev.arcanumocculta.api.effect.SpellEffect;
|
||||
|
||||
public interface StandardSpell extends Spell
|
||||
{
|
||||
SpellEffect getSpellEffect();
|
||||
}
|
Reference in New Issue
Block a user