I see that the XP rates for ironman skills are a little over half of regular XP rates,
but combat XP rates is exactly the same in both modes.. There is no if ironman..
Skill.java
Code:
package com.ruseps.model;
import com.ruseps.util.Misc;
/**
* This enum contains data used as constants for skill configurations
* such as experience rates, string id's for interface updating.
* @author Gabriel Hannason
*/
public enum Skill {
ATTACK(6247, 1, 0),
DEFENCE(6253, 1, 6),
STRENGTH(6206, 1, 3),
CONSTITUTION(6216, 3, 1),
RANGED(4443, 2, 9),
PRAYER(6242, 6, 12),
MAGIC(6211, 2, 15),
COOKING(6226, 1, 11),
WOODCUTTING(4272, 1, 17),
FLETCHING(6231, 2, 16),
FISHING(6258, 1, 25),
FIREMAKING(4282, 2, 14),
CRAFTING(6263, 4, 13),
SMITHING(6221, 7, 5),
MINING(4416, 3, 2),
HERBLORE(6237, 4, 7),
AGILITY(4277, 4, 4),
THIEVING(4261, 1, 10),
SLAYER(12122, 6, 19),
FARMING(5267, 4, 20),
RUNECRAFTING(4267, 3, 18),
CONSTRUCTION(7267, 3, 21),
HUNTER(8267, 3, 22),
SUMMONING(9267, 5, 23),
DUNGEONEERING(10267, 5, 24);
private Skill(int chatboxInterface, int prestigePoints, int prestigeId) {
this.chatboxInterface = chatboxInterface;
this.prestigePoints = prestigePoints;
this.prestigeId = prestigeId;
}
/**
* The skill's chatbox interface
* The interface which will be sent
* on levelup.
*/
private int chatboxInterface;
/**
* The amount of points
* the player will receive
* for prestiging the skill.
*/
private int prestigePoints;
/**
* The button id for prestiging
* this skill.
*/
private int prestigeId;
/**
* Gets the Skill's chatbox interface.
* @return The interface which will be sent on levelup.
*/
public int getChatboxInterface() {
return chatboxInterface;
}
/**
* Get's the amount of points the player
* will receive for prestiging the skill.
* @return The prestige points reward.
*/
public int getPrestigePoints() {
return prestigePoints;
}
/**
* Gets the Skill's name.
* @return The skill's name in a lower case format.
*/
public String getName() {
return toString().toLowerCase();
}
/**
* Gets the Skill's name.
* @return The skill's name in a formatted way.
*/
public String getFormatName() {
return Misc.formatText(getName());
}
/**
* Gets the Skill value which ordinal() matches {@code id}.
* @param id The index of the skill to fetch Skill instance for.
* @return The Skill instance.
*/
public static Skill forId(int id) {
for (Skill skill : Skill.values()) {
if (skill.ordinal() == id) {
return skill;
}
}
return null;
}
/**
* Gets the Skill value which prestigeId matches {@code id}.
* @param id The skill with matching prestigeId to fetch.
* @return The Skill instance.
*/
public static Skill forPrestigeId(int id) {
for (Skill skill : Skill.values()) {
if (skill.prestigeId == id) {
return skill;
}
}
return null;
}
/**
* Gets the Skill value which name matches {@code name}.
* @param string The name of the skill to fetch Skill instance for.
* @return The Skill instance.
*/
public static Skill forName(String name) {
for (Skill skill : Skill.values()) {
if (skill.toString().equalsIgnoreCase(name)) {
return skill;
}
}
return null;
}
/**
* Custom skill multipliers
* @return multiplier.
*/
public int getExperienceMultiplier() {
switch(this) {
case ATTACK:
return ATTACK_MODIFIER;
case DEFENCE:
return DEFENCE_MODIFIER;
case STRENGTH:
return STRENGTH_MODIFIER;
case CONSTITUTION:
return CONSTITUTION_MODIFIER;
case RANGED:
return RANGED_MODIFIER;
case PRAYER:
return PRAYER_MODIFIER;
case MAGIC:
return MAGIC_MODIFIER;
default:
return 1;
}
}
public static final int ATTACK_MODIFIER = 230;
public static final int DEFENCE_MODIFIER = 230;
public static final int STRENGTH_MODIFIER = 230;
public static final int CONSTITUTION_MODIFIER = 190;
public static final int RANGED_MODIFIER = 260;
public static final int PRAYER_MODIFIER = 50;
public static final int MAGIC_MODIFIER = 290;
}
Here is the method for modifiers but I really don't get it, it seems like changing ironman XP rates would only be in effect when bonus XP is active?
Code:
/**
* Adds experience to {@code skill} by the {@code experience} amount.
* @param skill The skill to add experience to.
* @param experience The amount of experience to add to the skill.
* @return The Skills instance.
*/
public SkillManager addExperience(Skill skill, int experience) {
if(player.experienceLocked())
return this;
/*
* If the experience in the skill is already greater or equal to
* {@code MAX_EXPERIENCE} then stop.
*/
if (this.skills.experience[skill.ordinal()] >= MAX_EXPERIENCE)
return this;
experience *= player.getRights().getExperienceGainModifier();
if(WellOfGoodwill.isActive())
experience *= 1.3;
if(player.getGameMode() != GameMode.NORMAL) {
experience *= 0.6;
}
if(GameSettings.BONUS_EXP) {
experience *= 1.30; //15
}
if(player.getMinutesBonusExp() != -1) {
if(player.getGameMode() != GameMode.NORMAL) {
experience *= 1.10;
} else {
experience *= 1.30;
}
}
Here is gamemode.java
Code:
package com.ruseps.model;
import com.ruseps.model.container.impl.Bank;
import com.ruseps.world.content.Achievements.AchievementData;
import com.ruseps.world.content.PlayerPanel;
import com.ruseps.world.content.dialogue.DialogueManager;
import com.ruseps.world.content.dialogue.impl.Tutorial;
import com.ruseps.world.content.skill.impl.slayer.SlayerMaster;
import com.ruseps.world.content.skill.impl.slayer.SlayerTasks;
import com.ruseps.world.entity.impl.player.Player;
public enum GameMode {
NORMAL,
HARDCORE_IRONMAN,
IRONMAN;
public static void set(Player player, GameMode newMode, boolean death) {
if(!death && !player.getClickDelay().elapsed(1000))
return;
player.getClickDelay().reset();
player.getPacketSender().sendInterfaceRemoval();
if(newMode != player.getGameMode() || death) {
if(!player.newPlayer()) {
player.getEquipment().resetItems().refreshItems();
player.getInventory().resetItems().refreshItems();
for(Bank b : player.getBanks()) {
b.resetItems();
}
player.getSlayer().resetSlayerTask();
player.getSlayer().setSlayerTask(SlayerTasks.NO_TASK).setAmountToSlay(0).setTaskStreak(0).setSlayerMaster(SlayerMaster.VANNAKA);
player.getSkillManager().newSkillManager();
for(Skill skill : Skill.values()) {
player.getSkillManager().updateSkill(skill);
}
for(AchievementData d : AchievementData.values()) {
player.getAchievementAttributes().setCompletion(d.ordinal(), false);
}
player.getMinigameAttributes().getRecipeForDisasterAttributes().reset();
player.getMinigameAttributes().getNomadAttributes().reset();
player.getKillsTracker().clear();
player.getDropLog().clear();
player.getPointsHandler().reset();
PlayerPanel.refreshPanel(player);
player.getUpdateFlag().flag(Flag.APPEARANCE);
if(player.didReceiveStarter()) {
if(newMode != GameMode.NORMAL) {
player.getInventory().add(995, 10000).add(1153, 1).add(1115, 1).add(1067, 1).add(1323, 1).add(1191, 1).add(841, 1).add(882, 50).add(1167, 1).add(1129, 1).add(1095, 1).add(1063, 1).add(579, 1).add(577, 1).add(1011, 1).add(1379, 1).add(556, 50).add(558, 50).add(557, 50).add(555, 50).add(1351, 1).add(1265, 1).add(1712, 1).add(11118, 1).add(1007, 1).add(1061, 1).add(330, 100).add(1419, 1);
} else {
player.getInventory().add(995, 5000000).add(1153, 1).add(1115, 1).add(1067, 1).add(1323, 1).add(1191, 1).add(841, 1).add(882, 1000).add(1167, 1).add(1129, 1).add(1095, 1).add(1063, 1).add(579, 1).add(577, 1).add(1011, 1).add(1379, 1).add(556, 1000).add(558, 1000).add(557, 1000).add(555, 1000).add(1351, 1).add(1265, 1).add(1712, 1).add(11118, 1).add(1007, 1).add(1061, 1).add(386, 100).add(1419, 1);
}
} else {
player.getPacketSender().sendMessage("Your connection has received enough starting items.");
}
}
}
player.setGameMode(newMode);
player.getPacketSender().sendIronmanMode(newMode.ordinal());
if(!death) {
player.getPacketSender().sendMessage("").sendMessage("You've set your gamemode to "+newMode.name().toLowerCase().replaceAll("_", " ")+".").sendMessage("If you wish to change it, please talk to the town crier in Edgeville.");
} else {
player.getPacketSender().sendMessage("Your account progress has been reset.");
}
if(player.newPlayer()) {
player.setPlayerLocked(true);
DialogueManager.start(player, Tutorial.get(player, 0));
} else {
player.setPlayerLocked(false);
}
}
}