RuneHive-Game
Loading...
Searching...
No Matches
com.runehive.content.consume.PotionData Enum Reference

The enumerated type managing consumable potion types. More...

Collaboration diagram for com.runehive.content.consume.PotionData:

Classes

enum  BoostType
 The enumerated type whose elements represent the boost types for potions. More...

Public Member Functions

boolean canDrink (Player player)
 The method which determines if the player can drink the potion.
int getIdForDose (int dose)
 Gets the item id for the specified dose.
final int[] getIds ()
 Gets the identifiers which represent this potion type.
abstract void onEffect (Player player)
 The method executed when this potion type activated.
 PotionData (int... ids)
 Create a new PotionData.

Static Public Member Functions

static Optional< PotionDataforId (int id)
 Retrieves the potion consumable element for id.
static Item getReplacementItem (Item item)
 Retrieves the replacement item for item.
static void onAntiPoisonEffect (Player player, boolean superPotion, int length)
 The method that executes the anti-poison potion action.

Public Attributes

 AGILITY_POTION
 ANTI_VENOM
 ANTI_VENOM_PLUS
 ANTIDOTE_PLUS
 ANTIDOTE_PLUS_PLUS
 ANTIFIRE_POTIONS
 ANTIPOISON_POTIONS
 ATTACK_POTIONS
 DEFENCE_POTIONS
 ENERGY_POTIONS
 FISHING_POTION
 MAGIC_POTIONS
 PRAYER_POTIONS
 RANGE_POTIONS
 RESTORE_POTIONS
 SARADOMIN_BREW
 STAMINA__POTION
 STRENGTH_POTIONS
 SUPER_ANTIFIRE_POTIONS
 SUPER_ANTIPOISON_POTIONS
 SUPER_ATTACK_POTIONS
 SUPER_COMBAT_POTION
 SUPER_DEFENCE_POTIONS
 SUPER_ENERGY_POTIONS
 SUPER_PRAYER_POTIONS
 SUPER_RESTORE_POTIONS
 SUPER_STRENGTH_POTIONS
 ZAMORAK_BREW

Static Private Member Functions

static void modifySkill (Player player, int skill, double percentage, int base)
 The method that executes the basic effect potion action that will append the level of skill.
static void onAgilityEffect (Player player)
 The method that executes the agility potion action.
static void onAntiFireEffect (Player player, boolean superVariant)
 The method that executes the anti-fireRunes potion action.
static void onBasicEffect (Player player, int skill, BoostType type)
 The method that executes the basic effect potion action that will append the level of skill.
static void onEnergyEffect (Player player, boolean superPotion)
 The method that executes the energy potion action.
static void onFishingEffect (Player player)
 The method that executes the fishing potion action.
static void onPrayerEffect (Player player, boolean superPrayer)
 The method that executes the prayer potion action.
static void onRestoreEffect (Player player, boolean superRestore)
 The method that executes the restore potion action.
static void onSaradominEffect (Player player)
 The method that executes the Saradomin brew action.
static void onZamorakEffect (Player player)
 The method that executes the Zamorak brew action.

Private Attributes

final int[] ids
 The identifiers which represent this potion type.

Static Private Attributes

static final ImmutableSet< PotionDataVALUES = Sets.immutableEnumSet(EnumSet.allOf(PotionData.class))
 Caches our enum values.
static final Item VIAL = new Item(229)
 The default item representing the final potion dose.

Detailed Description

The enumerated type managing consumable potion types.

Author
Ryley Kimmel ryley.nosp@m..kim.nosp@m.mel@l.nosp@m.ive..nosp@m.com
lare96 http://github.com/lare96

Definition at line 29 of file PotionData.java.

Constructor & Destructor Documentation

◆ PotionData()

com.runehive.content.consume.PotionData.PotionData ( int... ids)

Create a new PotionData.

Parameters
idsthe identifiers which represent this potion type.

Definition at line 259 of file PotionData.java.

259 {
260 this.ids = ids;
261 }

References ids.

Referenced by forId().

Here is the caller graph for this function:

Member Function Documentation

◆ canDrink()

boolean com.runehive.content.consume.PotionData.canDrink ( Player player)

The method which determines if the player can drink the potion.

Parameters
playerthe player to determine this for.

Definition at line 505 of file PotionData.java.

505 {
506 return true;
507 }

Referenced by com.runehive.content.bot.PlayerBot.pot().

Here is the caller graph for this function:

◆ forId()

Optional< PotionData > com.runehive.content.consume.PotionData.forId ( int id)
static

Retrieves the potion consumable element for id.

Parameters
idthe id that the potion consumable is attached to.
Returns
the potion consumable wrapped in an optional, or an empty optional if no potion consumable was found.

Definition at line 482 of file PotionData.java.

482 {
483 for (PotionData potion : VALUES) {
484 for (int potionId : potion.getIds()) {
485 if (id == potionId) {
486 return Optional.of(potion);
487 }
488 }
489 }
490 return Optional.empty();
491 }

References PotionData(), and VALUES.

Referenced by getReplacementItem(), and com.runehive.content.bot.objective.impl.RestockObjective.init().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ getIdForDose()

int com.runehive.content.consume.PotionData.getIdForDose ( int dose)

Gets the item id for the specified dose.

Parameters
dosethe dose to get the item id from.
Returns
the item id.

Definition at line 524 of file PotionData.java.

524 {
525 return ids[ids.length - dose];
526 }

References ids.

◆ getIds()

final int[] com.runehive.content.consume.PotionData.getIds ( )

Gets the identifiers which represent this potion type.

Returns
the identifiers for this potion.

Definition at line 514 of file PotionData.java.

514 {
515 return ids;
516 }

References ids.

◆ getReplacementItem()

Item com.runehive.content.consume.PotionData.getReplacementItem ( Item item)
static

Retrieves the replacement item for item.

Parameters
itemthe item to retrieve the replacement item for.
Returns
the replacement item wrapped in an optional, or an empty optional if no replacement item is available.

Definition at line 462 of file PotionData.java.

462 {
463 Optional<PotionData> potion = forId(item.getId());
464 if (potion.isPresent()) {
465 int length = potion.get().getIds().length;
466 for (int index = 0; index < length; index++) {
467 if (potion.get().getIds()[index] == item.getId() && index + 1 < length) {
468 return new Item(potion.get().getIds()[index + 1]);
469 }
470 }
471 }
472 return VIAL;
473 }
val index

References forId(), com.runehive.game.world.items.Item.getId(), and VIAL.

Referenced by com.runehive.content.bot.PlayerBot.pot().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ modifySkill()

void com.runehive.content.consume.PotionData.modifySkill ( Player player,
int skill,
double percentage,
int base )
staticprivate

The method that executes the basic effect potion action that will append the level of skill.

Parameters
playerthe player to do this action for.

Definition at line 433 of file PotionData.java.

433 {
434 Skill s = player.skills.get(skill);
435 int realLevel = s.getMaxLevel();
436
437 final int boostLevel = (int) (realLevel * percentage + base);
438
439 int cap = s.getLevel();
440 if (cap < realLevel + boostLevel) {
441 cap = realLevel + boostLevel;
442 }
443
444 if (skill == Skill.HITPOINTS && boostLevel < 0) {
445 int damage = boostLevel;
446 if (player.getCurrentHealth() + damage <= 0) damage = -player.getCurrentHealth() + 1;
447 player.damage(new Hit(-damage));
448 } else {
449 player.skills.get(skill).modifyLevel(level -> level + boostLevel, 0, cap);
450 }
451
452 player.skills.refresh(skill);
453 }

References com.runehive.game.world.entity.mob.Mob.damage(), com.runehive.game.world.entity.skill.SkillManager.get(), com.runehive.game.world.entity.mob.Mob.getCurrentHealth(), com.runehive.game.world.entity.skill.Skill.getLevel(), com.runehive.game.world.entity.skill.Skill.getMaxLevel(), com.runehive.game.world.entity.skill.Skill.HITPOINTS, com.runehive.game.world.entity.skill.Skill.modifyLevel(), com.runehive.game.world.entity.skill.SkillManager.refresh(), and com.runehive.game.world.entity.mob.Mob.skills.

Referenced by onBasicEffect(), onSaradominEffect(), and onZamorakEffect().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ onAgilityEffect()

void com.runehive.content.consume.PotionData.onAgilityEffect ( Player player)
staticprivate

The method that executes the agility potion action.

Parameters
playerthe player to do this action for.

Definition at line 278 of file PotionData.java.

278 {
279 player.skills.get(Skill.AGILITY).modifyLevel(level -> level + 3);
280 player.skills.refresh(Skill.AGILITY);
281 }

References com.runehive.game.world.entity.skill.Skill.AGILITY, com.runehive.game.world.entity.skill.SkillManager.get(), com.runehive.game.world.entity.skill.Skill.modifyLevel(), com.runehive.game.world.entity.skill.SkillManager.refresh(), and com.runehive.game.world.entity.mob.Mob.skills.

Here is the call graph for this function:

◆ onAntiFireEffect()

void com.runehive.content.consume.PotionData.onAntiFireEffect ( Player player,
boolean superVariant )
staticprivate

The method that executes the anti-fireRunes potion action.

Parameters
playerthe player to do this action for.
superVariantdetermines if this potion is the super variant.

Definition at line 409 of file PotionData.java.

409 {
410 if (superVariant) {
411 CombatUtil.effect(player, CombatEffectType.SUPER_ANTIFIRE_POTION);
412 } else {
413 CombatUtil.effect(player, CombatEffectType.ANTIFIRE_POTION);
414 }
415 }

References com.runehive.game.world.entity.combat.effect.CombatEffectType.ANTIFIRE_POTION, com.runehive.game.world.entity.combat.CombatUtil.effect(), and com.runehive.game.world.entity.combat.effect.CombatEffectType.SUPER_ANTIFIRE_POTION.

Here is the call graph for this function:

◆ onAntiPoisonEffect()

void com.runehive.content.consume.PotionData.onAntiPoisonEffect ( Player player,
boolean superPotion,
int length )
static

The method that executes the anti-poison potion action.

Parameters
playerthe player to do this action for.
superPotiontrue if this potion is a super potion,
false
otherwise.
lengththe length that the effect lingers for.

Definition at line 331 of file PotionData.java.

331 {
332 if (player.isVenomed()) {
333 player.getVenomDamage().set(0);
334 CombatUtil.cancelEffect(player, CombatEffectType.VENOM);
335 player.poison(PoisonType.WEAK_NPC);
336 return;
337 }
338
339 if (player.isPoisoned()) {
340 player.getPoisonDamage().set(0);
341 CombatUtil.cancelEffect(player, CombatEffectType.POISON);
342 player.send(new SendConfig(174, 0));
343 player.send(new SendMessage("You have been cured of your poison!"));
344 player.send(new SendPoison(SendPoison.PoisonType.NO_POISON));
345 }
346
347 if (superPotion) {
348 if (length > 0 && player.getPoisonImmunity().get() <= 0) {
349 player.send(new SendMessage("You have been granted immunity against poison."));
350 player.getPoisonImmunity().incrementAndGet(length);
351 World.schedule(new SuperAntipoisonTask(player).attach(player));
352 } else if (player.getPoisonImmunity().get() > 0) {
353 player.send(new SendMessage("Your immunity against poison has been restored!"));
354 player.getPoisonImmunity().set(length);
355 }
356 }
357 }

References com.runehive.game.world.entity.combat.CombatUtil.cancelEffect(), com.runehive.util.MutableNumber.get(), com.runehive.game.world.entity.mob.Mob.getPoisonDamage(), com.runehive.game.world.entity.mob.player.Player.getPoisonImmunity(), com.runehive.game.world.entity.mob.Mob.getVenomDamage(), com.runehive.util.MutableNumber.incrementAndGet(), com.runehive.game.world.entity.mob.Mob.isPoisoned(), com.runehive.game.world.entity.mob.Mob.isVenomed(), com.runehive.net.packet.out.SendPoison.PoisonType.NO_POISON, com.runehive.game.world.entity.combat.effect.CombatEffectType.POISON, com.runehive.game.world.entity.mob.Mob.poison(), com.runehive.game.world.World.schedule(), com.runehive.game.world.entity.mob.player.Player.send(), com.runehive.util.MutableNumber.set(), com.runehive.game.world.entity.combat.effect.CombatEffectType.VENOM, and com.runehive.game.world.entity.combat.PoisonType.WEAK_NPC.

Here is the call graph for this function:

◆ onBasicEffect()

void com.runehive.content.consume.PotionData.onBasicEffect ( Player player,
int skill,
BoostType type )
staticprivate

The method that executes the basic effect potion action that will append the level of skill.

Parameters
playerthe player to do this action for.

Definition at line 423 of file PotionData.java.

423 {
424 modifySkill(player, skill, type.amount, type.base);
425 }

References com.runehive.content.consume.PotionData.BoostType.amount, com.runehive.content.consume.PotionData.BoostType.base, and modifySkill().

Here is the call graph for this function:

◆ onEffect()

abstract void com.runehive.content.consume.PotionData.onEffect ( Player player)
abstract

The method executed when this potion type activated.

Parameters
playerthe player to execute this effect for.

Referenced by com.runehive.content.bot.PlayerBot.pot().

Here is the caller graph for this function:

◆ onEnergyEffect()

void com.runehive.content.consume.PotionData.onEnergyEffect ( Player player,
boolean superPotion )
staticprivate

The method that executes the energy potion action.

Parameters
playerthe player to do this action for.
superPotiontrue if this potion is a super potion,
false
otherwise.

Definition at line 366 of file PotionData.java.

366 {
367 int amount = superPotion ? 20 : 10;
368 int energy = player.runEnergy;
369
370 if (amount + energy > 100) {
371 player.runEnergy = 100;
372 } else {
373 player.runEnergy += amount;
374 }
375
376 player.send(new SendRunEnergy());
377 }

References com.runehive.game.world.entity.mob.player.Player.runEnergy, and com.runehive.game.world.entity.mob.player.Player.send().

Here is the call graph for this function:

◆ onFishingEffect()

void com.runehive.content.consume.PotionData.onFishingEffect ( Player player)
staticprivate

The method that executes the fishing potion action.

Parameters
playerthe player to do this action for.

Definition at line 268 of file PotionData.java.

268 {
269 player.skills.get(Skill.FISHING).modifyLevel(level -> level + 3);
270 player.skills.refresh(Skill.FISHING);
271 }

References com.runehive.game.world.entity.skill.Skill.FISHING, com.runehive.game.world.entity.skill.SkillManager.get(), com.runehive.game.world.entity.skill.Skill.modifyLevel(), com.runehive.game.world.entity.skill.SkillManager.refresh(), and com.runehive.game.world.entity.mob.Mob.skills.

Here is the call graph for this function:

◆ onPrayerEffect()

void com.runehive.content.consume.PotionData.onPrayerEffect ( Player player,
boolean superPrayer )
staticprivate

The method that executes the prayer potion action.

Parameters
playerthe player to do this action for.
superPrayerdetermines if this potion is a super prayer potion.

Definition at line 316 of file PotionData.java.

316 {
317 int realLevel = player.skills.get(Skill.PRAYER).getMaxLevel();
318 player.skills.get(Skill.PRAYER).modifyLevel(level -> level + (int) Math.floor(7 + (realLevel * (superPrayer ? 0.35 : 0.25))));
319 player.skills.refresh(Skill.PRAYER);
320
321 }

References com.runehive.game.world.entity.skill.SkillManager.get(), com.runehive.game.world.entity.skill.Skill.getMaxLevel(), com.runehive.game.world.entity.skill.Skill.modifyLevel(), com.runehive.game.world.entity.skill.Skill.PRAYER, com.runehive.game.world.entity.skill.SkillManager.refresh(), and com.runehive.game.world.entity.mob.Mob.skills.

Here is the call graph for this function:

◆ onRestoreEffect()

void com.runehive.content.consume.PotionData.onRestoreEffect ( Player player,
boolean superRestore )
staticprivate

The method that executes the restore potion action.

Parameters
playerthe player to do this action for.

Definition at line 384 of file PotionData.java.

384 {
385 for (int index = 0; index <= 6; index++) {
386 if ((index == Skill.PRAYER) || (index == Skill.HITPOINTS)) {
387 continue;
388 }
389
390 Skill skill = player.skills.get(index);
391 int realLevel = skill.getMaxLevel();
392
393 if (skill.getLevel() >= realLevel) {
394 continue;
395 }
396
397 int formula = superRestore ? (int) Math.floor(8 + (realLevel * 0.25)) : (int) Math.floor(10 + (realLevel * 0.30));
398 player.skills.get(index).modifyLevel(level -> level + formula);
399 player.skills.refresh(index);
400 }
401 }

References com.runehive.game.world.entity.skill.SkillManager.get(), com.runehive.game.world.entity.skill.Skill.HITPOINTS, com.runehive.game.world.entity.skill.Skill.modifyLevel(), com.runehive.game.world.entity.skill.Skill.PRAYER, com.runehive.game.world.entity.skill.SkillManager.refresh(), and com.runehive.game.world.entity.mob.Mob.skills.

Here is the call graph for this function:

◆ onSaradominEffect()

void com.runehive.content.consume.PotionData.onSaradominEffect ( Player player)
staticprivate

The method that executes the Saradomin brew action.

Parameters
playerthe player to do this action for.

Definition at line 288 of file PotionData.java.

288 {
289 modifySkill(player, Skill.HITPOINTS, 0.15, 2);
290 modifySkill(player, Skill.DEFENCE, 0.20, 2);
291 modifySkill(player, Skill.ATTACK, -0.10, 2);
292 modifySkill(player, Skill.STRENGTH, -0.10, 2);
293 modifySkill(player, Skill.RANGED, -0.10, 2);
294 modifySkill(player, Skill.MAGIC, -0.10, 2);
295 }

References com.runehive.game.world.entity.skill.Skill.ATTACK, com.runehive.game.world.entity.skill.Skill.DEFENCE, com.runehive.game.world.entity.skill.Skill.HITPOINTS, com.runehive.game.world.entity.skill.Skill.MAGIC, modifySkill(), com.runehive.game.world.entity.skill.Skill.RANGED, and com.runehive.game.world.entity.skill.Skill.STRENGTH.

Here is the call graph for this function:

◆ onZamorakEffect()

void com.runehive.content.consume.PotionData.onZamorakEffect ( Player player)
staticprivate

The method that executes the Zamorak brew action.

Parameters
playerthe player to do this action for.

Definition at line 302 of file PotionData.java.

302 {
303 modifySkill(player, Skill.ATTACK, 0.20, 2);
304 modifySkill(player, Skill.STRENGTH, 0.12, 2);
305 modifySkill(player, Skill.DEFENCE, -0.10, 2);
306 modifySkill(player, Skill.HITPOINTS, -0.10, 2);
307 modifySkill(player, Skill.PRAYER, 0.10, 0);
308 }

References com.runehive.game.world.entity.skill.Skill.ATTACK, com.runehive.game.world.entity.skill.Skill.DEFENCE, com.runehive.game.world.entity.skill.Skill.HITPOINTS, modifySkill(), com.runehive.game.world.entity.skill.Skill.PRAYER, and com.runehive.game.world.entity.skill.Skill.STRENGTH.

Here is the call graph for this function:

Member Data Documentation

◆ AGILITY_POTION

com.runehive.content.consume.PotionData.AGILITY_POTION
Initial value:
=(3032, 3034, 3036, 3038) {
@Override
public void onEffect(Player player) {
PotionData.onAgilityEffect(player);
}
}
This class represents a character controlled by a player.
Definition Player.java:125
abstract void onEffect(Player player)
The method executed when this potion type activated.
PotionData(int... ids)
Create a new PotionData.

Definition at line 69 of file PotionData.java.

69 {
70 @Override
71 public void onEffect(Player player) {
72 PotionData.onAgilityEffect(player);
73 }
74 },

◆ ANTI_VENOM

com.runehive.content.consume.PotionData.ANTI_VENOM
Initial value:
=(12905, 12907, 12909, 12911) {
@Override
public void onEffect(Player player) {
player.unvenom();
player.unpoison();
if (player.getPoisonImmunity().get() <= 0) {
player.send(new SendMessage("You have been granted immunity against poison."));
World.schedule(new SuperAntipoisonTask(player).attach(player));
} else if (player.getPoisonImmunity().get() > 0) {
player.send(new SendMessage("Your immunity against poison has been restored!"));
}
player.getPoisonImmunity().set(1200);
if (player.getVenomImmunity().get() <= 0) {
player.send(new SendMessage("You have been granted immunity against venom."));
World.schedule(new AntiVenomTask(player).attach(player));
} else if (player.getVenomImmunity().get() > 0) {
player.send(new SendMessage("Your immunity against venom has been restored!"));
}
player.getVenomImmunity().set(300);
}
}
Represents the game world.
Definition World.java:46
static void schedule(Task task)
Submits a new event.
Definition World.java:247
The OutgoingPacket that sends a message to a Players chatbox in the client.

Definition at line 192 of file PotionData.java.

192 {
193 @Override
194 public void onEffect(Player player) {
195 player.unvenom();
196 player.unpoison();
197
198 if (player.getPoisonImmunity().get() <= 0) {
199 player.send(new SendMessage("You have been granted immunity against poison."));
200 World.schedule(new SuperAntipoisonTask(player).attach(player));
201 } else if (player.getPoisonImmunity().get() > 0) {
202 player.send(new SendMessage("Your immunity against poison has been restored!"));
203 }
204 player.getPoisonImmunity().set(1200);
205
206 if (player.getVenomImmunity().get() <= 0) {
207 player.send(new SendMessage("You have been granted immunity against venom."));
208 World.schedule(new AntiVenomTask(player).attach(player));
209 } else if (player.getVenomImmunity().get() > 0) {
210 player.send(new SendMessage("Your immunity against venom has been restored!"));
211 }
212 player.getVenomImmunity().set(300);
213 }
214 },

◆ ANTI_VENOM_PLUS

com.runehive.content.consume.PotionData.ANTI_VENOM_PLUS
Initial value:
=(12913, 12915, 12917, 12919) {
@Override
public void onEffect(Player player) {
player.unvenom();
player.unpoison();
if (player.getPoisonImmunity().get() <= 0) {
player.send(new SendMessage("You have been granted immunity against poison."));
World.schedule(new SuperAntipoisonTask(player).attach(player));
} else if (player.getPoisonImmunity().get() > 0) {
player.send(new SendMessage("Your immunity against poison has been restored!"));
}
player.getPoisonImmunity().set(1500);
if (player.getVenomImmunity().get() <= 0) {
player.send(new SendMessage("You have been granted immunity against venom."));
World.schedule(new AntiVenomTask(player).attach(player));
} else if (player.getVenomImmunity().get() > 0) {
player.send(new SendMessage("Your immunity against venom has been restored!"));
}
player.getVenomImmunity().set(3000);
}
}

Definition at line 237 of file PotionData.java.

215 {
216 @Override
217 public void onEffect(Player player) {
218 player.unvenom();
219 player.unpoison();
220
221 if (player.getPoisonImmunity().get() <= 0) {
222 player.send(new SendMessage("You have been granted immunity against poison."));
223 World.schedule(new SuperAntipoisonTask(player).attach(player));
224 } else if (player.getPoisonImmunity().get() > 0) {
225 player.send(new SendMessage("Your immunity against poison has been restored!"));
226 }
227 player.getPoisonImmunity().set(1500);
228
229 if (player.getVenomImmunity().get() <= 0) {
230 player.send(new SendMessage("You have been granted immunity against venom."));
231 World.schedule(new AntiVenomTask(player).attach(player));
232 } else if (player.getVenomImmunity().get() > 0) {
233 player.send(new SendMessage("Your immunity against venom has been restored!"));
234 }
235 player.getVenomImmunity().set(3000);
236 }
237 };

◆ ANTIDOTE_PLUS

com.runehive.content.consume.PotionData.ANTIDOTE_PLUS
Initial value:
=(5943, 5945, 5947, 5949) {
@Override
public void onEffect(Player player) {
PotionData.onAntiPoisonEffect(player, true, 1000);
}
}

Definition at line 57 of file PotionData.java.

57 {
58 @Override
59 public void onEffect(Player player) {
60 PotionData.onAntiPoisonEffect(player, true, 1000);
61 }
62 },

◆ ANTIDOTE_PLUS_PLUS

com.runehive.content.consume.PotionData.ANTIDOTE_PLUS_PLUS
Initial value:
=(5952, 5954, 5956, 5958) {
@Override
public void onEffect(Player player) {
PotionData.onAntiPoisonEffect(player, true, 1200);
}
}

Definition at line 63 of file PotionData.java.

63 {
64 @Override
65 public void onEffect(Player player) {
66 PotionData.onAntiPoisonEffect(player, true, 1200);
67 }
68 },

◆ ANTIFIRE_POTIONS

com.runehive.content.consume.PotionData.ANTIFIRE_POTIONS
Initial value:
=(2452, 2454, 2456, 2458) {
@Override
public void onEffect(Player player) {
PotionData.onAntiFireEffect(player, false);
}
}

Definition at line 168 of file PotionData.java.

168 {
169 @Override
170 public void onEffect(Player player) {
171 PotionData.onAntiFireEffect(player, false);
172 }
173 },

◆ ANTIPOISON_POTIONS

com.runehive.content.consume.PotionData.ANTIPOISON_POTIONS
Initial value:
=(2446, 175, 177, 179) {
@Override
public void onEffect(Player player) {
PotionData.onAntiPoisonEffect(player, false, 0);
}
}

Definition at line 180 of file PotionData.java.

180 {
181 @Override
182 public void onEffect(Player player) {
183 PotionData.onAntiPoisonEffect(player, false, 0);
184 }
185 },

◆ ATTACK_POTIONS

com.runehive.content.consume.PotionData.ATTACK_POTIONS
Initial value:
=(2428, 121, 123, 125) {
@Override
public void onEffect(Player player) {
PotionData.onBasicEffect(player, Skill.ATTACK, BoostType.NORMAL);
}
}
Represents a trainable and usable skill.
Definition Skill.java:18
static final int ATTACK
The attack skill id.
Definition Skill.java:21
The enumerated type whose elements represent the boost types for potions.

Definition at line 117 of file PotionData.java.

117 {
118 @Override
119 public void onEffect(Player player) {
120 PotionData.onBasicEffect(player, Skill.ATTACK, BoostType.NORMAL);
121 }
122 },

◆ DEFENCE_POTIONS

com.runehive.content.consume.PotionData.DEFENCE_POTIONS
Initial value:
=(2432, 133, 135, 137) {
@Override
public void onEffect(Player player) {
PotionData.onBasicEffect(player, Skill.DEFENCE, BoostType.NORMAL);
}
}
static final int DEFENCE
The defence skill id.
Definition Skill.java:24

Definition at line 105 of file PotionData.java.

105 {
106 @Override
107 public void onEffect(Player player) {
108 PotionData.onBasicEffect(player, Skill.DEFENCE, BoostType.NORMAL);
109 }
110 },

◆ ENERGY_POTIONS

com.runehive.content.consume.PotionData.ENERGY_POTIONS
Initial value:
=(3008, 3010, 3012, 3014) {
@Override
public void onEffect(Player player) {
PotionData.onEnergyEffect(player, false);
}
}

Definition at line 87 of file PotionData.java.

87 {
88 @Override
89 public void onEffect(Player player) {
90 PotionData.onEnergyEffect(player, false);
91 }
92 },

◆ FISHING_POTION

com.runehive.content.consume.PotionData.FISHING_POTION
Initial value:
=(2438, 151, 153, 155) {
@Override
public void onEffect(Player player) {
PotionData.onFishingEffect(player);
}
}

Definition at line 75 of file PotionData.java.

75 {
76 @Override
77 public void onEffect(Player player) {
78 PotionData.onFishingEffect(player);
79 }
80 },

◆ ids

final int [] com.runehive.content.consume.PotionData.ids
private

The identifiers which represent this potion type.

Definition at line 252 of file PotionData.java.

Referenced by getIdForDose(), getIds(), and PotionData().

◆ MAGIC_POTIONS

com.runehive.content.consume.PotionData.MAGIC_POTIONS
Initial value:
=(3040, 3042, 3044, 3046) {
@Override
public void onEffect(Player player) {
PotionData.onBasicEffect(player, Skill.MAGIC, BoostType.MAGIC);
}
}
static final int MAGIC
The magic skill id.
Definition Skill.java:39

Definition at line 99 of file PotionData.java.

99 {
100 @Override
101 public void onEffect(Player player) {
102 PotionData.onBasicEffect(player, Skill.MAGIC, BoostType.MAGIC);
103 }
104 },

◆ PRAYER_POTIONS

com.runehive.content.consume.PotionData.PRAYER_POTIONS
Initial value:
=(2434, 139, 141, 143) {
@Override
public void onEffect(Player player) {
PotionData.onPrayerEffect(player, false);
}
}

Definition at line 156 of file PotionData.java.

156 {
157 @Override
158 public void onEffect(Player player) {
159 PotionData.onPrayerEffect(player, false);
160 }
161 },

◆ RANGE_POTIONS

com.runehive.content.consume.PotionData.RANGE_POTIONS
Initial value:
=(2444, 169, 171, 173) {
@Override
public void onEffect(Player player) {
PotionData.onBasicEffect(player, Skill.RANGED, BoostType.RANGING);
}
}
static final int RANGED
The ranged skill id.
Definition Skill.java:33

Definition at line 81 of file PotionData.java.

81 {
82 @Override
83 public void onEffect(Player player) {
84 PotionData.onBasicEffect(player, Skill.RANGED, BoostType.RANGING);
85 }
86 },

Referenced by com.runehive.content.bot.botclass.impl.PureRangeMelee.pot().

◆ RESTORE_POTIONS

com.runehive.content.consume.PotionData.RESTORE_POTIONS
Initial value:
=(2430, 127, 129, 131) {
@Override
public void onEffect(Player player) {
onRestoreEffect(player, false);
}
}
static void onRestoreEffect(Player player, boolean superRestore)
The method that executes the restore potion action.

Definition at line 141 of file PotionData.java.

141 {
142 @Override
143 public void onEffect(Player player) {
144 onRestoreEffect(player, false);
145 }
146 },

◆ SARADOMIN_BREW

com.runehive.content.consume.PotionData.SARADOMIN_BREW
Initial value:
=(6685, 6687, 6689, 6691) {
@Override
public void onEffect(Player player) {
PotionData.onSaradominEffect(player);
}
}

Definition at line 51 of file PotionData.java.

51 {
52 @Override
53 public void onEffect(Player player) {
54 PotionData.onSaradominEffect(player);
55 }
56 },

Referenced by com.runehive.content.bot.objective.impl.RestockObjective.init().

◆ STAMINA__POTION

com.runehive.content.consume.PotionData.STAMINA__POTION
Initial value:
=(12625, 12627, 12629, 12631) {
@Override
public void onEffect(Player player) {
PotionData.onEnergyEffect(player, true);
player.energyRate = 200;
}
}

Definition at line 30 of file PotionData.java.

30 {
31 @Override
32 public void onEffect(Player player) {
33 PotionData.onEnergyEffect(player, true);
34 player.energyRate = 200;
35 }
36 },

◆ STRENGTH_POTIONS

com.runehive.content.consume.PotionData.STRENGTH_POTIONS
Initial value:
=(113, 115, 117, 119) {
@Override
public void onEffect(Player player) {
PotionData.onBasicEffect(player, Skill.STRENGTH, BoostType.NORMAL);
}
}
static final int STRENGTH
The strength skill id.
Definition Skill.java:27

Definition at line 111 of file PotionData.java.

111 {
112 @Override
113 public void onEffect(Player player) {
114 PotionData.onBasicEffect(player, Skill.STRENGTH, BoostType.NORMAL);
115 }
116 },

◆ SUPER_ANTIFIRE_POTIONS

com.runehive.content.consume.PotionData.SUPER_ANTIFIRE_POTIONS
Initial value:
=(15304, 15305, 15306, 15307) {
@Override
public void onEffect(Player player) {
PotionData.onAntiFireEffect(player, true);
}
}

Definition at line 174 of file PotionData.java.

174 {
175 @Override
176 public void onEffect(Player player) {
177 PotionData.onAntiFireEffect(player, true);
178 }
179 },

◆ SUPER_ANTIPOISON_POTIONS

com.runehive.content.consume.PotionData.SUPER_ANTIPOISON_POTIONS
Initial value:
=(2448, 181, 183, 185) {
@Override
public void onEffect(Player player) {
PotionData.onAntiPoisonEffect(player, true, 500);
}
}

Definition at line 186 of file PotionData.java.

186 {
187 @Override
188 public void onEffect(Player player) {
189 PotionData.onAntiPoisonEffect(player, true, 500);
190 }
191 },

◆ SUPER_ATTACK_POTIONS

com.runehive.content.consume.PotionData.SUPER_ATTACK_POTIONS
Initial value:
=(2436, 145, 147, 149) {
@Override
public void onEffect(Player player) {
PotionData.onBasicEffect(player, Skill.ATTACK, BoostType.SUPER);
}
}

Definition at line 129 of file PotionData.java.

129 {
130 @Override
131 public void onEffect(Player player) {
132 PotionData.onBasicEffect(player, Skill.ATTACK, BoostType.SUPER);
133 }
134 },

◆ SUPER_COMBAT_POTION

com.runehive.content.consume.PotionData.SUPER_COMBAT_POTION
Initial value:
=(12695, 12697, 12699, 12701) {
@Override
public void onEffect(Player player) {
PotionData.onBasicEffect(player, Skill.ATTACK, BoostType.SUPER);
PotionData.onBasicEffect(player, Skill.STRENGTH, BoostType.SUPER);
PotionData.onBasicEffect(player, Skill.DEFENCE, BoostType.SUPER);
}
}

Definition at line 37 of file PotionData.java.

37 {
38 @Override
39 public void onEffect(Player player) {
40 PotionData.onBasicEffect(player, Skill.ATTACK, BoostType.SUPER);
41 PotionData.onBasicEffect(player, Skill.STRENGTH, BoostType.SUPER);
42 PotionData.onBasicEffect(player, Skill.DEFENCE, BoostType.SUPER);
43 }
44 },

Referenced by com.runehive.content.bot.botclass.impl.AGSRuneMelee.pot(), com.runehive.content.bot.botclass.impl.PureMelee.pot(), com.runehive.content.bot.botclass.impl.PureRangeMelee.pot(), com.runehive.content.bot.botclass.impl.WelfareRuneMelee.pot(), and com.runehive.content.bot.botclass.impl.ZerkerMelee.pot().

◆ SUPER_DEFENCE_POTIONS

com.runehive.content.consume.PotionData.SUPER_DEFENCE_POTIONS
Initial value:
=(2442, 163, 165, 167) {
@Override
public void onEffect(Player player) {
PotionData.onBasicEffect(player, Skill.DEFENCE, BoostType.SUPER);
}
}

Definition at line 123 of file PotionData.java.

123 {
124 @Override
125 public void onEffect(Player player) {
126 PotionData.onBasicEffect(player, Skill.DEFENCE, BoostType.SUPER);
127 }
128 },

◆ SUPER_ENERGY_POTIONS

com.runehive.content.consume.PotionData.SUPER_ENERGY_POTIONS
Initial value:
=(3016, 3018, 3020, 3022) {
@Override
public void onEffect(Player player) {
PotionData.onEnergyEffect(player, true);
}
}

Definition at line 93 of file PotionData.java.

93 {
94 @Override
95 public void onEffect(Player player) {
96 PotionData.onEnergyEffect(player, true);
97 }
98 },

◆ SUPER_PRAYER_POTIONS

com.runehive.content.consume.PotionData.SUPER_PRAYER_POTIONS
Initial value:
=(15328, 15329, 15330, 15331) {
@Override
public void onEffect(Player player) {
PotionData.onPrayerEffect(player, true);
}
}

Definition at line 162 of file PotionData.java.

162 {
163 @Override
164 public void onEffect(Player player) {
165 PotionData.onPrayerEffect(player, true);
166 }
167 },

◆ SUPER_RESTORE_POTIONS

com.runehive.content.consume.PotionData.SUPER_RESTORE_POTIONS
Initial value:
=(3024, 3026, 3028, 3030) {
@Override
public void onEffect(Player player) {
PotionData.onRestoreEffect(player, true);
int realLevel = player.skills.getMaxLevel(Skill.PRAYER);
player.skills.get(Skill.PRAYER).modifyLevel(level -> level + (int) Math.floor(8 + (realLevel * 0.25)));
player.skills.refresh(Skill.PRAYER);
}
}
static final int PRAYER
The prayer skill id.
Definition Skill.java:36

Definition at line 147 of file PotionData.java.

147 {
148 @Override
149 public void onEffect(Player player) {
150 PotionData.onRestoreEffect(player, true);
151 int realLevel = player.skills.getMaxLevel(Skill.PRAYER);
152 player.skills.get(Skill.PRAYER).modifyLevel(level -> level + (int) Math.floor(8 + (realLevel * 0.25)));
153 player.skills.refresh(Skill.PRAYER);
154 }
155 },

Referenced by com.runehive.content.bot.objective.impl.RestockObjective.init(), com.runehive.content.bot.botclass.impl.AGSRuneMelee.pot(), com.runehive.content.bot.botclass.impl.PureMelee.pot(), com.runehive.content.bot.botclass.impl.PureRangeMelee.pot(), com.runehive.content.bot.botclass.impl.WelfareRuneMelee.pot(), and com.runehive.content.bot.botclass.impl.ZerkerMelee.pot().

◆ SUPER_STRENGTH_POTIONS

com.runehive.content.consume.PotionData.SUPER_STRENGTH_POTIONS
Initial value:
=(2440, 157, 159, 161) {
@Override
public void onEffect(Player player) {
PotionData.onBasicEffect(player, Skill.STRENGTH, BoostType.SUPER);
}
}

Definition at line 135 of file PotionData.java.

135 {
136 @Override
137 public void onEffect(Player player) {
138 PotionData.onBasicEffect(player, Skill.STRENGTH, BoostType.SUPER);
139 }
140 },

◆ VALUES

final ImmutableSet<PotionData> com.runehive.content.consume.PotionData.VALUES = Sets.immutableEnumSet(EnumSet.allOf(PotionData.class))
staticprivate

Caches our enum values.

Definition at line 242 of file PotionData.java.

Referenced by forId().

◆ VIAL

final Item com.runehive.content.consume.PotionData.VIAL = new Item(229)
staticprivate

The default item representing the final potion dose.

Definition at line 247 of file PotionData.java.

Referenced by getReplacementItem().

◆ ZAMORAK_BREW

com.runehive.content.consume.PotionData.ZAMORAK_BREW
Initial value:
=(2450, 189, 191, 193) {
@Override
public void onEffect(Player player) {
PotionData.onZamorakEffect(player);
}
}

Definition at line 45 of file PotionData.java.

45 {
46 @Override
47 public void onEffect(Player player) {
48 PotionData.onZamorakEffect(player);
49 }
50 },

The documentation for this enum was generated from the following file: