public class CombatHelper
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
static double |
HEADING_CONST |
Constructor and Description |
---|
CombatHelper() |
Modifier and Type | Method and Description |
---|---|
static int |
CalcHeal(CombatInfo obj,
CombatInfo caster,
int heal,
float skillMod,
int skillType)
Calculates the amount of health restored by the effect calling it.
|
static int |
CalcMagicalDamage(CombatInfo target,
CombatInfo caster,
int dmg,
java.lang.String dmgType,
float skillMod,
int skillType,
int hitRoll,
boolean useHitRoll,
java.util.Map params)
Calculates the amount of damage done by the effect using the magical-based stats for the calculations
|
static double |
CalcMagicalHitChance(CombatInfo obj,
CombatInfo target,
int skillType)
Calculate the chance to hit when using a magical ability such as a damaging spell.
|
static float |
calcMaxSkillUpChance(SkillData skillData)
Calculates the chance the player has of levelling up the max skill level of the given skill.
|
static int |
CalcMeleeDamage(CombatInfo obj,
CombatInfo caster,
int dmg,
java.lang.String dmgType,
float skillMod,
int skillType,
int hitRoll,
boolean useHitRoll,
java.util.Map<java.lang.String,java.lang.Integer> params)
Calculates the amount of damage done by the effect using the physical-based stats for the calculations
|
static double |
CalcPhysicalHitChance(CombatInfo obj,
CombatInfo target,
int skillType)
Calculate the chance to hit when using a physical ability such as a melee weapon attack.
|
static float |
calcSkillUpChance(SkillData skillData)
Calculates the chance the player has of leveling up the given skill.
|
static int |
calculateFlatResist(int level,
int percentage) |
static int |
calculatePercentResist(int level,
int percentage) |
static int |
calculateProperty(int level,
int percentage) |
static float |
calculateValue(CombatInfo obj,
CombatInfo target) |
static float |
getAngleToTarget(float f,
float g,
OID oid) |
static short |
getHeadingToSpot(float f,
float g,
OID oid) |
static float |
getMobsHeading(Quaternion q1) |
public static double CalcPhysicalHitChance(CombatInfo obj, CombatInfo target, int skillType)
obj:
- The character performing the abilitytarget:
- The target of the abilityskillType:
- The skill type of the abilitypublic static double CalcMagicalHitChance(CombatInfo obj, CombatInfo target, int skillType)
obj:
- The character performing the abilitytarget:
- The target of the abilityskillType:
- The skill type of the abilitypublic static int CalcMeleeDamage(CombatInfo obj, CombatInfo caster, int dmg, java.lang.String dmgType, float skillMod, int skillType, int hitRoll, boolean useHitRoll, java.util.Map<java.lang.String,java.lang.Integer> params)
obj
- caster
- dmg
- dmgType
- skillMod
- skillType
- hitRoll
- public static int CalcMagicalDamage(CombatInfo target, CombatInfo caster, int dmg, java.lang.String dmgType, float skillMod, int skillType, int hitRoll, boolean useHitRoll, java.util.Map params)
obj
- caster
- dmg
- dmgType
- skillMod
- skillType
- hitRoll
- public static int CalcHeal(CombatInfo obj, CombatInfo caster, int heal, float skillMod, int skillType)
obj
- caster
- heal
- skillMod
- skillType
- public static int calculateProperty(int level, int percentage)
public static int calculateFlatResist(int level, int percentage)
public static int calculatePercentResist(int level, int percentage)
public static float calcSkillUpChance(SkillData skillData)
skillData
- public static float calcMaxSkillUpChance(SkillData skillData)
skillData
- public static float calculateValue(CombatInfo obj, CombatInfo target)
public static float getAngleToTarget(float f, float g, OID oid) throws java.io.IOException
java.io.IOException
public static float getMobsHeading(Quaternion q1)
public static short getHeadingToSpot(float f, float g, OID oid) throws java.io.IOException
java.io.IOException