mirror of
https://gitlab.com/2009scape/2009scape.git
synced 2025-12-14 10:30:20 -07:00
Fixed beer keg effects, now authentically -40 attack and +10 str bonus
This commit is contained in:
parent
15feadf344
commit
455c7b355c
3 changed files with 19 additions and 22 deletions
|
|
@ -6,6 +6,7 @@ import core.game.node.entity.state.EntityState;
|
||||||
import core.game.world.update.flag.context.Animation;
|
import core.game.world.update.flag.context.Animation;
|
||||||
import core.game.content.consumable.effects.*;
|
import core.game.content.consumable.effects.*;
|
||||||
import core.game.node.entity.skill.Skills;
|
import core.game.node.entity.skill.Skills;
|
||||||
|
import rs09.game.content.consumable.effects.KegOfBeerEffect;
|
||||||
|
|
||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,22 +0,0 @@
|
||||||
package core.game.content.consumable.effects;
|
|
||||||
|
|
||||||
import core.game.node.entity.player.Player;
|
|
||||||
import core.game.content.consumable.ConsumableEffect;
|
|
||||||
import core.game.node.entity.skill.Skills;
|
|
||||||
|
|
||||||
public class KegOfBeerEffect extends ConsumableEffect {
|
|
||||||
|
|
||||||
private final static int healing = 15;
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void activate(Player p) {
|
|
||||||
final int attackLevelReduction = (p.getSkills().getLevel(Skills.ATTACK) * 65) / 99;
|
|
||||||
final MultiEffect effect = new MultiEffect(new HealingEffect(15), new RandomSkillEffect(Skills.STRENGTH, 2, 10), new SkillEffect(Skills.ATTACK, attackLevelReduction, 0));
|
|
||||||
effect.activate(p);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public int getHealthEffectValue(Player player) {
|
|
||||||
return healing;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
@ -0,0 +1,18 @@
|
||||||
|
package rs09.game.content.consumable.effects
|
||||||
|
|
||||||
|
import core.game.content.consumable.ConsumableEffect
|
||||||
|
import core.game.content.consumable.effects.HealingEffect
|
||||||
|
import core.game.content.consumable.effects.MultiEffect
|
||||||
|
import core.game.content.consumable.effects.SkillEffect
|
||||||
|
import core.game.node.entity.player.Player
|
||||||
|
import core.game.node.entity.skill.Skills
|
||||||
|
|
||||||
|
|
||||||
|
class KegOfBeerEffect : ConsumableEffect() {
|
||||||
|
|
||||||
|
override fun activate(p: Player?) {
|
||||||
|
val effect = MultiEffect(HealingEffect(15), SkillEffect(Skills.STRENGTH, 10.0, 0.0), SkillEffect(Skills.ATTACK, -40.0, 0.0))
|
||||||
|
effect.activate(p)
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
Loading…
Add table
Add a link
Reference in a new issue