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 |
CalcDamage(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.io.Serializable> params)
Calculates the amount of damage done by the effect
|
static int |
CalcHeal(CombatInfo obj,
CombatInfo caster,
int heal,
float skillMod,
int skillType,
java.lang.String dmgType,
java.util.Map<java.lang.String,java.io.Serializable> params)
Calculates the amount of health restored by the effect calling it.
|
static double |
CalcHitChance(CombatInfo obj,
CombatInfo target,
int skillType,
java.lang.String dmgType,
AgisAbility ability)
Calculate the chance to hit when using a physical ability such as a melee weapon attack.
|
static float |
calcMaxSkillUpChance(SkillData skillData)
Calculates the chance the player has of levelling up the max skill level of the given skill.
|
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) |
static int |
modifyDamage(CombatInfo caster,
CombatInfo target,
int dmg) |
public static double CalcHitChance(CombatInfo obj, CombatInfo target, int skillType, java.lang.String dmgType, AgisAbility ability)
obj:
- The character performing the abilitytarget:
- The target of the abilityskillType:
- The skill type of the abilitypublic static int CalcDamage(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.io.Serializable> params)
obj
- caster
- dmg
- dmgType
- skillMod
- skillType
- hitRoll
- public static int modifyDamage(CombatInfo caster, CombatInfo target, int dmg)
public static int CalcHeal(CombatInfo obj, CombatInfo caster, int heal, float skillMod, int skillType, java.lang.String dmgType, java.util.Map<java.lang.String,java.io.Serializable> params)
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