@Override public boolean commenceSpecialAttack(Interaction interaction) { interaction.setDamage( Damage.getDamage( interaction.getSource(), interaction.getVictim(), CombatType.MELEE, MeleeFormulae.getDamage( interaction.getSource(), interaction.getVictim(), 1.1, 1.1, 1))); interaction.getDamage().setMaximum(MeleeFormulae.getMeleeDamage(interaction.getSource(), 1.1)); if (interaction.getVictim().isPlayer()) { interaction.setDeflected(interaction.getVictim().getPlayer().getPrayer().usingPrayer(1, 9)); } interaction.getSource().animate(ANIMATION); interaction.getSource().graphics(GRAPHICS, 96 << 16); interaction .getVictim() .animate(interaction.isDeflected() ? 12573 : interaction.getVictim().getDefenceAnimation()); if (interaction.isDeflected()) { interaction.getVictim().graphics(2230); } return true; }
@Override public boolean commenceSession() { int type = RANDOM.nextInt(4); interaction.getSource().getCombatExecutor().setTicks(interaction.getSource().getAttackDelay()); if (interaction.getSource().getRandom().nextInt(10) < 5) { interaction.getSource().animate(ATTACK_ANIM); if (first < 1) { interaction.getSource().animate(FIRST_ATTACK); World.getWorld() .submit( new Tick(2) { int count; @Override public void execute() { if (count < 1) { interaction.getSource().graphics(FIRST_GFX); count++; first++; setFirst(1); } else { this.stop(); } } }); } else if (first >= 1 && interaction.getSource().getHitPoints() < 2000) { interaction.getSource().animate(12697); interaction.getSource().graphics(ORB); interaction.getVictim().graphics(ORB_TAKE); interaction.getSource().forceText("Hwuahwuahwuah!!"); interaction.getSource().heal(RANDOM.nextInt(350)); interaction.getVictim().heal(RANDOM.nextInt(400)); // He heals you too! interaction.getSource().setAttribute("damageType", DamageType.HEAL); } else if (first >= 1 && type >= 2) { interaction.getSource().animate(12697); interaction.getSource().graphics(PURPLE_SHIT); interaction.getVictim().graphics(PURPLE_SHIT); interaction.getSource().forceText("Enough!"); interaction.getVictim().getPoisonManager().poison(interaction.getSource(), 440); interaction.getVictim().getPoisonManager().poison(interaction.getSource(), 110); interaction.getSource().setAttribute("damageType", DamageType.MAGE); } else if (first >= 1 && type < 2) { interaction.getSource().animate(12697); interaction.getVictim().graphics(2867); interaction.getSource().setAttribute("damageType", DamageType.DISEASED); } interaction.setDamage( Damage.getDamage( interaction.getSource(), interaction.getVictim(), CombatType.MAGIC, interaction.getSource().getRandom().nextInt(700))); interaction.getDamage().setMaximum(700); return true; } interaction.getSource().setAttribute("damageType", DamageType.RED_DAMAGE); if (interaction.getVictim().isPlayer()) { interaction.setDeflected(interaction.getVictim().getPlayer().getPrayer().usingPrayer(1, 9)); } interaction.getSource().animate(ATTACK_ANIM); interaction.setDamage( Damage.getDamage( interaction.getSource(), interaction.getVictim(), CombatType.MELEE, MeleeFormulae.getDamage(interaction.getSource(), interaction.getVictim()))); interaction.getDamage().setMaximum(MeleeFormulae.getMeleeDamage(interaction.getSource(), 1.0)); return true; }