Package kamkeel.npcdbc.api
Class AbstractDBCAPI
- java.lang.Object
-
- kamkeel.npcdbc.api.AbstractDBCAPI
-
public abstract class AbstractDBCAPI extends Object
-
-
Constructor Summary
Constructors Constructor Description AbstractDBCAPI()
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description abstract IDBCStats
abstractDBCData()
abstract IAura
createAura(String name)
abstract IForm
createForm(String name)
abstract IKiAttack
createKiAttack()
abstract IKiAttack
createKiAttack(byte type, byte speed, int damage, boolean hasEffect, byte color, byte density, boolean hasSound, byte chargePercent)
abstract IOutline
createOutline(String name)
abstract void
doDBCDamage(IPlayer player, IDBCStats stats, int damage)
Performs DBC Damage based on the DBC Stats sent inabstract void
fireKiAttack(ICustomNpc npc, byte type, byte speed, int damage, boolean hasEffect, byte color, byte density, boolean hasSound, byte chargePercent)
Fires a Ki Attack in the Head Direction of the NPCabstract void
fireKiAttack(ICustomNpc npc, IKiAttack kiAttack)
Fires an IKiAttack with its internal paramsabstract void
forceDodge(IEntity dodger, IEntity attacker)
Preferably used in a DamagedEvent/AttackEvent with cancelling the eventabstract String[]
getAllFormMasteryData(int raceid, int formId)
abstract String[]
getAllForms(int race, boolean nonRacial)
abstract int
getAllFormsLength(int race, boolean nonRacial)
abstract IAura
getAura(String name)
abstract IAuraHandler
getAuraHandler()
abstract IBonusHandler
getBonusHandler()
abstract IDBCStats
getDBCData(ICustomNpc npc)
abstract IDBCDisplay
getDBCDisplay(ICustomNpc npc)
abstract IDBCEffectHandler
getDBCEffectHandler()
You can also use the Custom Effect Handler in CNPC+ while using the DBC Addon Index of 1 for controlling effects as wellabstract IForm
getForm(String name)
abstract IFormHandler
getFormHandler()
abstract String
getFormName(int race, int form)
abstract IForm
getOrCreateForm(String name)
abstract IOutline
getOutline(String name)
abstract IOutlineHandler
getOutlineHandler()
abstract String
getRaceName(int race)
abstract int
getSkillMindCostRecursive(String skillName, int level)
abstract int
getSkillMindCostSingle(String skillName, int level)
abstract int
getSkillRacialTPCostSingle(int race, int level)
abstract int
getSkillRacialTPCostSingleRecursive(int race, int level)
abstract int
getSkillRacialTPMindSingle(int race, int level)
abstract int
getSkillRacialTPMindSingleRecursive(int race, int level)
abstract int
getSkillTPCostRecursive(String skillName, int level)
abstract int
getSkillTPCostSingle(String skillName, int level)
abstract int
getUltraInstinctMaxLevel()
static AbstractDBCAPI
Instance()
static boolean
IsAvailable()
-
-
-
Method Detail
-
IsAvailable
public static boolean IsAvailable()
-
Instance
public static AbstractDBCAPI Instance()
-
getFormHandler
public abstract IFormHandler getFormHandler()
-
getAuraHandler
public abstract IAuraHandler getAuraHandler()
-
getOutlineHandler
public abstract IOutlineHandler getOutlineHandler()
-
getBonusHandler
public abstract IBonusHandler getBonusHandler()
-
getDBCEffectHandler
public abstract IDBCEffectHandler getDBCEffectHandler()
You can also use the Custom Effect Handler in CNPC+ while using the DBC Addon Index of 1 for controlling effects as well- Returns:
- DBC Effect Handler
-
getOrCreateForm
public abstract IForm getOrCreateForm(String name)
- Parameters:
name
- name- Returns:
- new form
-
forceDodge
public abstract void forceDodge(IEntity dodger, IEntity attacker)
Preferably used in a DamagedEvent/AttackEvent with cancelling the event- Parameters:
dodger
- The entity dodgingattacker
- Attacker Entity
-
abstractDBCData
public abstract IDBCStats abstractDBCData()
- Returns:
- Fake DBC Data for Simulating Damage
-
getDBCData
public abstract IDBCStats getDBCData(ICustomNpc npc)
- Parameters:
npc
- NPC- Returns:
- DBC Data attached to an NPC
-
getDBCDisplay
public abstract IDBCDisplay getDBCDisplay(ICustomNpc npc)
-
doDBCDamage
public abstract void doDBCDamage(IPlayer player, IDBCStats stats, int damage)
Performs DBC Damage based on the DBC Stats sent in- Parameters:
player
- Player (Target of DBC Damage)stats
- DBC Stats / Settings to Simulatedamage
- Damage to simulate
-
getRaceName
public abstract String getRaceName(int race)
- Parameters:
race
- 0 to 5- Returns:
- Name of race ID
-
getFormName
public abstract String getFormName(int race, int form)
- Parameters:
race
- ID (0 to 5),form
- ID (0 to 3 for humans/namekians, 0 to 14 for Saiyans/Half, 0 to 7 for arcosians, 0 to 4 for majins)- Returns:
- form name i.e "SSFullPow"
-
getAllFormMasteryData
public abstract String[] getAllFormMasteryData(int raceid, int formId)
- Parameters:
raceid
- Race IDformId
- Form ID- Returns:
- All config data for a Form Mastery i.e Max Level, Instant Transform Unlock, Required Masteries
-
getAllFormsLength
public abstract int getAllFormsLength(int race, boolean nonRacial)
- Parameters:
race
- Race IDnonRacial
- nonRacial forms are Kaioken/UI/Mystic/GOD- Returns:
- Number of forms a race has, i.e Saiyan has 14 racial and 4 non racial
-
getAllForms
public abstract String[] getAllForms(int race, boolean nonRacial)
- Parameters:
race
- Race IDnonRacial
- check getAllFormsLength(int race, boolean nonRacial)- Returns:
- An array containing all forms the race has
-
createKiAttack
public abstract IKiAttack createKiAttack()
- Returns:
- IKiAttack Object
-
createKiAttack
public abstract IKiAttack createKiAttack(byte type, byte speed, int damage, boolean hasEffect, byte color, byte density, boolean hasSound, byte chargePercent)
- Parameters:
type
- Type of Ki Attack [0 - 8] "Wave", "Blast", "Disk", "Laser", "Spiral", "BigBlast", "Barrage", "Shield", "Explosion"speed
- Speed of Ki Attack [0 - 100]damage
- Damage for Ki AttackhasEffect
- True for Explosioncolor
- Color of Ki Attack [0 - 30] ->
0: "AlignmentBased", "white", "blue", "purple", "red", "black", "green", "yellow", "orange", "pink", "magenta",
11: "lightPink", "cyan", "darkCyan", "lightCyan", "darkGray", "gray", "darkBlue", "lightBlue", "darkPurple", "lightPurple",
21: "darkRed", "lightRed", "darkGreen", "lime", "darkYellow", "lightYellow", "gold", "lightOrange", "darkBrown", "lightBrown"density
- Density of Ki Attack > 0hasSound
- Play Impact Sound of Ki AttackchargePercent
- Charge Percentage of Ki Attack [0 - 100]- Returns:
- IKiAttack Object with Set Values
-
fireKiAttack
public abstract void fireKiAttack(ICustomNpc npc, byte type, byte speed, int damage, boolean hasEffect, byte color, byte density, boolean hasSound, byte chargePercent)
Fires a Ki Attack in the Head Direction of the NPC- Parameters:
npc
- the NPC firing this attack.type
- Type of Ki Attack [0 - 8] "Wave", "Blast", "Disk", "Laser", "Spiral", "BigBlast", "Barrage", "Shield", "Explosion"speed
- Speed of Ki Attack [0 - 100]damage
- Damage for Ki AttackhasEffect
- True for Explosioncolor
- Color of Ki Attack [0 - 30] ->
0: "AlignmentBased", "white", "blue", "purple", "red", "black", "green", "yellow", "orange", "pink", "magenta",
11: "lightPink", "cyan", "darkCyan", "lightCyan", "darkGray", "gray", "darkBlue", "lightBlue", "darkPurple", "lightPurple",
21: "darkRed", "lightRed", "darkGreen", "lime", "darkYellow", "lightYellow", "gold", "lightOrange", "darkBrown", "lightBrown"density
- Density of Ki Attack > 0hasSound
- Play Impact Sound of Ki AttackchargePercent
- Charge Percentage of Ki Attack [0 - 100]
-
fireKiAttack
public abstract void fireKiAttack(ICustomNpc npc, IKiAttack kiAttack)
Fires an IKiAttack with its internal params- Parameters:
npc
- NPC shooting this attackkiAttack
- ki attack to shoot
-
getSkillTPCostSingle
public abstract int getSkillTPCostSingle(String skillName, int level)
- Parameters:
skillName
- Acceptable skill names:"Fusion", "Jump", "Dash", "Fly", "Endurance",
"PotentialUnlock", "KiSense", "Meditation", "Kaioken", "GodForm",
"OldKaiUnlock", "KiProtection", "KiFist", "KiBoost", "DefensePenetration",
"KiInfuse", "UltraInstinct", "InstantTransmission", "GodOfDestruction"level
- Level, starting from 1.
Levels can be forcefully set to exceed level 10, so it's only capped to be a minimum of 1.- Returns:
- The TP Cost of said skill at just that level.
-
getSkillMindCostSingle
public abstract int getSkillMindCostSingle(String skillName, int level)
- Parameters:
skillName
- Refer togetSkillTPCostSingle(String, int)
level
- Level, starting from 1.
Levels can be forcefully set to exceed level 10, so it's only capped to be a minimum of 1.- Returns:
- The Mind Cost of said skill at just that level.
-
getSkillMindCostRecursive
public abstract int getSkillMindCostRecursive(String skillName, int level)
- Parameters:
skillName
- Refer togetSkillTPCostSingle(String, int)
level
- Level, starting from 1.
Levels can be forcefully set to exceed level 10, so it's only capped to be a minimum of 1.- Returns:
- TheMmind cost to get this skill to given level
-
getSkillTPCostRecursive
public abstract int getSkillTPCostRecursive(String skillName, int level)
- Parameters:
skillName
- Refer togetSkillTPCostSingle(String, int)
level
- Level, starting from 1.
Levels can be forcefully set to exceed level 10, so it's only capped to be a minimum of 1.- Returns:
- The TP cost to get this skill to given level
-
getSkillRacialTPCostSingle
public abstract int getSkillRacialTPCostSingle(int race, int level)
- Parameters:
race
- Race ID from 0 to 5level
- Level of the Super form (uncapped).- Returns:
- TP cost of this single level
-
getSkillRacialTPMindSingle
public abstract int getSkillRacialTPMindSingle(int race, int level)
- Parameters:
race
- Race ID from 0 to 5level
- Level of the Super form (uncapped).- Returns:
- Mind cost of this single level
-
getSkillRacialTPCostSingleRecursive
public abstract int getSkillRacialTPCostSingleRecursive(int race, int level)
- Parameters:
race
- Race ID from 0 to 5level
- Level of the Super form (uncapped).- Returns:
- TP Cost to get to this level
-
getSkillRacialTPMindSingleRecursive
public abstract int getSkillRacialTPMindSingleRecursive(int race, int level)
- Parameters:
race
- Race ID from 0 to 5level
- Level of the Super form (uncapped).- Returns:
- Mind Cost to get to this level
-
getUltraInstinctMaxLevel
public abstract int getUltraInstinctMaxLevel()
- Returns:
- Max level of UI
-
-