1package com.osroyale.content.wintertodt.actions;
3import com.osroyale.Config;
4import com.osroyale.content.wintertodt.Wintertodt;
5import com.osroyale.game.action.Action;
6import com.osroyale.game.action.policy.WalkablePolicy;
7import com.osroyale.game.world.entity.mob.player.Player;
8import com.osroyale.game.world.entity.skill.Skill;
9import com.osroyale.game.world.items.Item;
11public class MixHerb
extends Action<Player> {
15 public MixHerb(Player player,
int amount) {
32 if(!
getMob().inventory.contains(Wintertodt.BRUMA_HERB) || !
getMob().inventory.contains(Wintertodt.REJUV_POT_UNF)) {
34 getMob().action.getCurrentAction().cancel();
40 getMob().message(
"You combine the bruma herb into the unfinished potion.");
42 getMob().inventory.remove(
new Item(Wintertodt.BRUMA_HERB));
43 getMob().inventory.remove(
new Item(Wintertodt.REJUV_POT_UNF));
44 getMob().inventory.add(
new Item(Wintertodt.REJUV_POT_4));
45 getMob().inventory.refresh();
46 double xp = Skill.getLevelForExperience(
getMob().skills.get(Skill.HERBLORE).getExperience()) * 0.1;
47 if(xp > 0)
getMob().skills.addExperience(Skill.HERBLORE, xp * Config.HERBLORE_MODIFICATION);
52 getMob().action.getCurrentAction().cancel();
abstract String getName()
abstract WalkablePolicy getWalkablePolicy()