mirror of
https://github.com/mcMMO-Dev/mcMMO.git
synced 2024-11-01 16:19:53 +01:00
Fill in Daze/Skill Shot for Archery config
This commit is contained in:
parent
5eb80f9277
commit
39b5719e12
@ -17,12 +17,17 @@ public class ConfigConstants {
|
||||
public static final String FOLDER_NAME_SKILLS = "skills";
|
||||
public static final String FOLDER_NAME_EXPERIENCE = "Experience Settings";
|
||||
public static final String FOLDER_NAME_DEFAULTS = "defaults";
|
||||
|
||||
/* RELATIVE PATHS */
|
||||
public final static String RELATIVE_PATH_CONFIG_DIR = File.separator + FOLDER_NAME_CONFIG + File.separator;
|
||||
public final static String RELATIVE_PATH_SKILLS_DIR = RELATIVE_PATH_CONFIG_DIR + FOLDER_NAME_SKILLS + File.separator;
|
||||
public final static String RELATIVE_PATH_XP_DIR = RELATIVE_PATH_CONFIG_DIR + FOLDER_NAME_EXPERIENCE + File.separator;
|
||||
private final static String[] EXAMPLE_BLACKLIST_WORLDS = {"Example_15434453", "Example_2324423", "Example_323423465"};
|
||||
|
||||
/* Field Names & Comments */
|
||||
public final static String MAX_CHANCE_FIELD_NAME = "Max-Chance";
|
||||
public final static String MAX_CHANCE_FIELD_DESCRIPTION = "The maximum probability for this skill to succeed.";
|
||||
|
||||
//Add the worlds to the list
|
||||
static {
|
||||
EXAMPLE_BLACKLIST_WORLDS_LIST_DEFAULT = new ArrayList<>();
|
||||
|
@ -1,5 +1,6 @@
|
||||
package com.gmail.nossr50.config.hocon.skills.archery;
|
||||
|
||||
import com.gmail.nossr50.datatypes.skills.properties.MaxBonusLevel;
|
||||
import ninja.leaping.configurate.objectmapping.Setting;
|
||||
import ninja.leaping.configurate.objectmapping.serialize.ConfigSerializable;
|
||||
|
||||
@ -17,27 +18,6 @@ public class ConfigArchery {
|
||||
// return getDoubleValue(SKILLS, ARCHERY, FORCE_MULTIPLIER);
|
||||
// }
|
||||
|
||||
/*
|
||||
Archery:
|
||||
SkillShot:
|
||||
# RankDamageMultiplier: The current rank of this subskill is multiplied by this value to determine the bonus damage, rank 20 would result in 200% damage increase with a value of 10.0 for RankDamageMultiplier
|
||||
# RankDamageMultiplier is a percentage
|
||||
RankDamageMultiplier: 10.0
|
||||
# MaxDamage: After adding bonus damage, the total damage dealt by the player will not exceed this number
|
||||
# You should be careful to not set this too low
|
||||
MaxDamage: 9.0
|
||||
Daze:
|
||||
# ChanceMax: Maximum chance of causing daze to opponents when on <MaxBonusLevel> or higher
|
||||
# MaxBonusLevel: Maximum bonus level of Daze, when a player reaches this level his chance of causing a daze will be <ChanceMax>
|
||||
# Modifier: Extra damage for arrows that cause a daze (2 damage = 1 heart)
|
||||
ChanceMax: 50.0
|
||||
MaxBonusLevel:
|
||||
Standard: 100
|
||||
RetroMode: 1000
|
||||
BonusDamage: 4.0
|
||||
*/
|
||||
|
||||
|
||||
@Setting(value = "Daze")
|
||||
private ConfigArcheryDaze daze = new ConfigArcheryDaze();
|
||||
|
||||
@ -51,4 +31,24 @@ public class ConfigArchery {
|
||||
public ConfigArcherySkillShot getSkillShot() {
|
||||
return skillShot;
|
||||
}
|
||||
|
||||
public double getSkillShotDamageMultiplier() {
|
||||
return skillShot.getSkillShotDamageMultiplier();
|
||||
}
|
||||
|
||||
public double getSkillShotDamageCeiling() {
|
||||
return skillShot.getSkillShotDamageCeiling();
|
||||
}
|
||||
|
||||
public double getMaxChance() {
|
||||
return daze.getMaxChance();
|
||||
}
|
||||
|
||||
public MaxBonusLevel getMaxBonusLevel() {
|
||||
return daze.getMaxBonusLevel();
|
||||
}
|
||||
|
||||
public double getBonusDamage() {
|
||||
return daze.getBonusDamage();
|
||||
}
|
||||
}
|
@ -1,8 +1,36 @@
|
||||
package com.gmail.nossr50.config.hocon.skills.archery;
|
||||
|
||||
import com.gmail.nossr50.config.ConfigConstants;
|
||||
import com.gmail.nossr50.datatypes.skills.properties.AbstractMaxBonusLevel;
|
||||
import com.gmail.nossr50.datatypes.skills.properties.MaxBonusLevel;
|
||||
import ninja.leaping.configurate.objectmapping.Setting;
|
||||
import ninja.leaping.configurate.objectmapping.serialize.ConfigSerializable;
|
||||
|
||||
@ConfigSerializable
|
||||
public class ConfigArcheryDaze {
|
||||
private static final double DAZE_BONUS_DMG_DEFAULT = 4.0D;
|
||||
private static final double DAZE_MAX_CHANCE_DEFAULT = 50.0D;
|
||||
|
||||
@Setting(value = ConfigConstants.MAX_CHANCE_FIELD_NAME, comment = ConfigConstants.MAX_CHANCE_FIELD_DESCRIPTION
|
||||
+ "\nDefault value: "+DAZE_MAX_CHANCE_DEFAULT)
|
||||
private double maxChance = DAZE_MAX_CHANCE_DEFAULT;
|
||||
|
||||
@Setting(value = "Max-Bonus-Level")
|
||||
private MaxBonusLevel maxBonusLevel = new AbstractMaxBonusLevel(100);
|
||||
|
||||
@Setting(value = "Bonus-Damage", comment = "How much bonus damage is applied when daze is applied to a target." +
|
||||
"\nDefault value: "+DAZE_BONUS_DMG_DEFAULT)
|
||||
private double bonusDamage = DAZE_BONUS_DMG_DEFAULT;
|
||||
|
||||
public double getMaxChance() {
|
||||
return maxChance;
|
||||
}
|
||||
|
||||
public MaxBonusLevel getMaxBonusLevel() {
|
||||
return maxBonusLevel;
|
||||
}
|
||||
|
||||
public double getBonusDamage() {
|
||||
return bonusDamage;
|
||||
}
|
||||
}
|
||||
|
@ -0,0 +1,35 @@
|
||||
package com.gmail.nossr50.datatypes.skills.properties;
|
||||
|
||||
public class AbstractMaxBonusLevel implements MaxBonusLevel {
|
||||
|
||||
private int retro;
|
||||
private int standard;
|
||||
|
||||
public AbstractMaxBonusLevel(int standard, int retro) {
|
||||
this.standard = standard;
|
||||
this.retro = retro;
|
||||
}
|
||||
|
||||
public AbstractMaxBonusLevel(int standard) {
|
||||
this.standard = standard;
|
||||
this.retro = standard * 10;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getRetroScaleValue() {
|
||||
return retro;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getStandardScaleValue() {
|
||||
return standard;
|
||||
}
|
||||
|
||||
public void setRetro(int retro) {
|
||||
this.retro = retro;
|
||||
}
|
||||
|
||||
public void setStandard(int standard) {
|
||||
this.standard = standard;
|
||||
}
|
||||
}
|
@ -1,29 +1,17 @@
|
||||
/*
|
||||
package com.gmail.nossr50.datatypes.skills.properties;
|
||||
|
||||
import com.gmail.nossr50.datatypes.skills.SubSkillType;
|
||||
import com.gmail.nossr50.mcMMO;
|
||||
public interface MaxBonusLevel {
|
||||
|
||||
public class MaxBonusLevel extends AbstractScalingProperty {
|
||||
public MaxBonusLevel(SubSkillType subSkillType) {
|
||||
super(subSkillType);
|
||||
}
|
||||
/**
|
||||
* Get the max level for this skill for Retro scaling
|
||||
* @return Retro Mode max bonus level
|
||||
*/
|
||||
int getRetroScaleValue();
|
||||
|
||||
*/
|
||||
/**
|
||||
* Returns the appropriate value for this scaling property whether it is Standard or Retro
|
||||
*
|
||||
* @return the value used in scaling calculations for this ScalingProperty
|
||||
*//*
|
||||
/**
|
||||
* Get the max level for this skill for Standard scaling
|
||||
* @return Standard Mode max bonus level
|
||||
*/
|
||||
int getStandardScaleValue();
|
||||
|
||||
@Override
|
||||
public double getValue() {
|
||||
if(mcMMO.getConfigManager().isRetroMode())
|
||||
{
|
||||
|
||||
} else {
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
*/
|
||||
|
Loading…
Reference in New Issue
Block a user