Files
2009scape/Server/src/main/content/data/consumables/effects/WizardsMindBombEffect.java
T
Ceikry a100affda2 Repository reorganisation
Unified kotlin and java into just src/main
Unified the rs09 and core packages
Took all content out of the core package, and placed it into the new content package
Reorganised all source code relating to content to be easier to find and explore
2023-01-26 13:59:28 +00:00

23 lines
806 B
Java

package content.data.consumables.effects;
import core.game.consumable.ConsumableEffect;
import core.game.node.entity.player.Player;
import core.game.node.entity.skill.Skills;
public class WizardsMindBombEffect extends ConsumableEffect {
private final static int healing = 1;
@Override
public void activate(Player p) {
final int magicLevelBoost = p.getSkills().getLevel(Skills.MAGIC) > 50 ? 3 : 2;
final MultiEffect effect = new MultiEffect(new SkillEffect(Skills.MAGIC, magicLevelBoost, 0), new HealingEffect(healing), new SkillEffect(Skills.ATTACK, -3, 0), new SkillEffect(Skills.STRENGTH, -4, 0), new SkillEffect(Skills.DEFENCE, -4, 0));
effect.activate(p);
}
@Override
public int getHealthEffectValue(Player player) {
return healing;
}
}