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
This commit is contained in:
Ceikry
2023-01-26 13:59:28 +00:00
committed by Ryan
parent e4b799c44a
commit a100affda2
3156 changed files with 24205 additions and 30585 deletions
@@ -0,0 +1,26 @@
package content.data.consumables.effects;
import core.game.node.entity.player.Player;
import core.game.consumable.ConsumableEffect;
import core.game.node.entity.skill.Skills;
public class RestoreEffect extends ConsumableEffect {
double base,bonus;
public RestoreEffect(double base, double bonus){
this.base = base;
this.bonus = bonus;
}
final int[] SKILLS = new int[] { Skills.DEFENCE, Skills.ATTACK, Skills.STRENGTH, Skills.MAGIC, Skills.RANGE };
@Override
public void activate(Player p) {
Skills sk = p.getSkills();
for(int skill : SKILLS){
int statL = sk.getStaticLevel(skill);
int curL = sk.getLevel(skill);
if(curL < statL){
int boost = (int) (base + (statL * bonus));
p.getSkills().updateLevel(skill, boost, statL);
}
}
}
}