use of main.content.enums.system.AiEnums.AI_LOGIC in project Eidolons by IDemiurge.
the class ToolTipMaster method getActionTargetingTooltip.
public static String getActionTargetingTooltip(DC_Obj target, DC_ActiveObj active) {
if (active == null) {
return "";
}
String tooltip = "";
ACTION_TOOL_TIP_CASE _case = null;
AI_LOGIC spellLogic = AI_SpellMaster.getSpellLogic(active);
if (spellLogic == null) {
if (active instanceof DC_UnitAction) {
if (active.getActionGroup() == ActionEnums.ACTION_TYPE_GROUPS.ATTACK) {
_case = ACTION_TOOL_TIP_CASE.DAMAGE;
}
}
}
if (spellLogic != null) {
switch(spellLogic) {
case BUFF_NEGATIVE:
case BUFF_POSITIVE:
_case = ACTION_TOOL_TIP_CASE.BUFF;
break;
case CUSTOM_HOSTILE:
case CUSTOM_SUPPORT:
_case = ACTION_TOOL_TIP_CASE.SPECIAL;
break;
case AUTO_DAMAGE:
case DAMAGE:
case DAMAGE_ZONE:
_case = ACTION_TOOL_TIP_CASE.DAMAGE;
break;
case RESTORE:
break;
}
}
if (_case == null) {
return "";
}
switch(_case) {
case BUFF:
break;
case DAMAGE:
boolean attack = !(active instanceof DC_SpellObj);
int damage = FutureBuilder.precalculateDamage(active, target, attack);
// ++ damage type
// MIN-MAX is really in
tooltip += "avrg. damage: " + damage;
// order
if (DamageCalculator.isLethal(damage, target)) {
// TODO possibly lethal
tooltip += "(lethal)";
} else {
if (attack) {
if (((Unit) target).canCounter(active)) {
// TODO precalc dmg?
tooltip += "(will retaliate)";
}
}
}
break;
case SPECIAL:
break;
}
return tooltip;
}
use of main.content.enums.system.AiEnums.AI_LOGIC in project Eidolons by IDemiurge.
the class AI_SpellMaster method getGoal.
public static GOAL_TYPE getGoal(DC_ActiveObj spell) {
AI_LOGIC spellLogic = getSpellLogic(spell);
spell.setSpellLogic(spellLogic);
if (spellLogic == null) {
LogMaster.log(1, "*** No spell logic for " + spell.getName());
return AiEnums.GOAL_TYPE.OTHER;
}
switch(spellLogic) {
case MOVE:
return AiEnums.GOAL_TYPE.MOVE;
case BUFF_NEGATIVE:
return AiEnums.GOAL_TYPE.DEBUFF;
case BUFF_POSITIVE:
return AiEnums.GOAL_TYPE.BUFF;
case SELF:
return AiEnums.GOAL_TYPE.SELF;
case DEBILITATE:
return AiEnums.GOAL_TYPE.DEBILITATE;
case RESTORE:
return AiEnums.GOAL_TYPE.RESTORE;
case DAMAGE:
return AiEnums.GOAL_TYPE.ATTACK;
case DAMAGE_ZONE:
return AiEnums.GOAL_TYPE.ZONE_DAMAGE;
case SUMMON:
return AiEnums.GOAL_TYPE.SUMMONING;
case AUTO_DAMAGE:
return AiEnums.GOAL_TYPE.AUTO_DAMAGE;
case CUSTOM_HOSTILE:
return AiEnums.GOAL_TYPE.CUSTOM_HOSTILE;
case CUSTOM_SUPPORT:
return AiEnums.GOAL_TYPE.CUSTOM_SUPPORT;
case COATING:
return AiEnums.GOAL_TYPE.COATING;
default:
break;
}
return AiEnums.GOAL_TYPE.OTHER;
}
Aggregations