I will be making way more then ags.. I'll be updating this thread
Code:
package org.dementhium.model.combat.impl.specs;
import org.dementhium.model.SpecialAttack;
import org.dementhium.model.combat.CombatType;
import org.dementhium.model.combat.Damage;
import org.dementhium.model.combat.Interaction;
import org.dementhium.model.combat.MeleeFormulae;
/**
* Handles the {@code Armadyl} {@code godsword}'s {@code Judgement} special attack.
* @author Emperor
*
*/
public class Judgement extends SpecialAttack {
/**
* The special attack animation used.
*/
private static final short ANIMATION = 11989;
/**
* The graphics id.
*/
private static final short GRAPHICS = 2113;
@Override
public boolean commenceSpecialAttack(Interaction interaction) {
interaction.setDamage(Damage.getDamage(interaction.getSource(),
interaction.getVictim(), CombatType.MELEE,
MeleeFormulae.getDamage(interaction.getSource(),
interaction.getVictim(), 4.5499, 1.59, 0.998)));
interaction.getDamage().setMaximum(MeleeFormulae.getMeleeDamage(interaction.getSource(), 1.59));
if (interaction.getVictim().isPlayer()) {
interaction.setDeflected(interaction.getVictim().getPlayer().getPrayer().usingPrayer(1, 9));
}
interaction.getSource().animate(ANIMATION);
interaction.getSource().graphics(GRAPHICS);
interaction.getVictim().animate(interaction.isDeflected() ? 12573 : interaction.getVictim().getDefenceAnimation());
if (interaction.isDeflected()) {
interaction.getVictim().graphics(2230);
}
return true;
}
@Override
public CombatType getCombatType() {
return CombatType.MELEE;
}
@Override
public int getSpecialEnergyAmount() {
return 500;
}
@Override
public int getCooldownTicks() {
return 6;
}
}