Atavism Version 2018.1AGIS API

atavism.agis.util
Class CombatHelper

java.lang.Object
  extended by atavism.agis.util.CombatHelper

public class CombatHelper
extends java.lang.Object

Contains a collection of static functions that are used to assist in combat calculations. If you want to modify the combat calculations used in Atavism, this is where you make the changes.

Author:
Andrew Harrison

Field Summary
static double HEADING_CONST
           
 
Constructor Summary
CombatHelper()
           
 
Method Summary
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 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)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

HEADING_CONST

public static double HEADING_CONST
Constructor Detail

CombatHelper

public CombatHelper()
Method Detail

CalcPhysicalHitChance

public 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.

Parameters:
obj: - The character performing the ability
target: - The target of the ability
skillType: - The skill type of the ability
Returns:

CalcMagicalHitChance

public static double CalcMagicalHitChance(CombatInfo obj,
                                          CombatInfo target,
                                          int skillType)
Calculate the chance to hit when using a magical ability such as a damaging spell.

Parameters:
obj: - The character performing the ability
target: - The target of the ability
skillType: - The skill type of the ability
Returns:

CalcMeleeDamage

public static int CalcMeleeDamage(CombatInfo obj,
                                  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 physical-based stats for the calculations

Parameters:
obj -
caster -
dmg -
dmgType -
skillMod -
skillType -
hitRoll -
Returns:

CalcMagicalDamage

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)
Calculates the amount of damage done by the effect using the magical-based stats for the calculations

Parameters:
obj -
caster -
dmg -
dmgType -
skillMod -
skillType -
hitRoll -
Returns:

CalcHeal

public static int CalcHeal(CombatInfo obj,
                           CombatInfo caster,
                           int heal,
                           float skillMod,
                           int skillType)
Calculates the amount of health restored by the effect calling it. Uses magical based stats.

Parameters:
obj -
caster -
heal -
skillMod -
skillType -
Returns:

calculateProperty

public static int calculateProperty(int level,
                                    int percentage)

calculateFlatResist

public static int calculateFlatResist(int level,
                                      int percentage)

calculatePercentResist

public static int calculatePercentResist(int level,
                                         int percentage)

calcSkillUpChance

public static float calcSkillUpChance(SkillData skillData)
Calculates the chance the player has of leveling up the given skill. The chance is out of 100.

Parameters:
skillData -
Returns:

calcMaxSkillUpChance

public static float calcMaxSkillUpChance(SkillData skillData)
Calculates the chance the player has of levelling up the max skill level of the given skill. The chance is out of 100.

Parameters:
skillData -
Returns:

calculateValue

public static float calculateValue(CombatInfo obj,
                                   CombatInfo target)

getAngleToTarget

public static float getAngleToTarget(float f,
                                     float g,
                                     OID oid)
                              throws java.io.IOException
Throws:
java.io.IOException

getMobsHeading

public static float getMobsHeading(Quaternion q1)

getHeadingToSpot

public static short getHeadingToSpot(float f,
                                     float g,
                                     OID oid)
                              throws java.io.IOException
Throws:
java.io.IOException


Copyright © 2018 Dragonsan Studios Sp. z o.o.