Skip to content

Commit

Permalink
Merge pull request #56 from Goosius1/set_counterrattack_booster_defau…
Browse files Browse the repository at this point in the history
…lt_to_10

Fixed Rounding bug w/ counterattack booster
  • Loading branch information
Goosius1 authored Jan 22, 2021
2 parents 445b58b + e8b89dd commit bb7dc12
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 12 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -136,11 +136,11 @@ public enum ConfigNodes {
"war.siege.switches.counterattack_booster_disabled",
"false",
"",
"# If this setting is false, and a player from the banner controlling side dies,",
"# then the death points are increased by a certain percentage. (see points section below)",
"# This setting is very important as it prevents large unskilled armies from dominating small pvp-skilled armies during sieges.",
"# However, this is not an instant-win for the pvp-skilled side",
"# To fully even the odds, they may have to employ military tactics such as map-sneaking/ambushes to close with the enemy army."),
"# If this setting is false, then if a player from the banner controlling side dies,",
"# the death points are increased by a certain percentage. (see points section below)",
"# This setting is very important as it prevents complete domination of the server by large armies.",
"# However, this is not an instant-win for small armies",
"# To fully even the odds, they will need to deploy superior PVP skills and/or military tactics."),
WAR_SIEGE_POPULATION_BASED_POINT_BOOSTS_ENABLED(
"war.siege.switches.population_based_point_boosts_enabled",
"false",
Expand Down Expand Up @@ -323,13 +323,13 @@ public enum ConfigNodes {
"# Configuration Outcomes:",
"# Value HIGH --> If the value is high, then PVP will be DISCOURAGED",
"# Value LOW --> If the value is low, then PVP will be ENCOURAGED"),
WAR_SIEGE_COUNTERATTACK_BOOSTER_EXTRA_DEATH_POINTS_PER_PLAYER_PERCENT(
"war.siege.scoring.counterattack_booster_extra_death_points_per_player_percent",
WAR_SIEGE_COUNTERATTACK_BOOSTER_EXTRA_DEATH_POINTS_PER_PLAYER_PERCENTAGE(
"war.siege.scoring.counterattack_booster_extra_death_points_per_player_percentage",
"10.0",
"",
"# As long as the counterattack booster feature is not disabled, then this setting determines the strength of the boost.",
"# As long as the counterattack booster feature is not disabled, this setting determines the strength of the boost.",
"# Example: If this setting is 10.0, and there are 3 players on the banner control list, and a player from the banner-controlling side dies,",
"# then the death points will be increased by 30%."),
"# then the death points awarded to the attacker will be increased by +30%."),
WAR_SIEGE_POPULATION_QUOTIENT_FOR_MAX_POINTS_BOOST(
"war.siege.scoring.population_quotient_for_max_points_boost",
"3.0",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -244,8 +244,8 @@ public static boolean isWarSiegeCounterattackBoosterDisabled() {
return Settings.getBoolean(ConfigNodes.WAR_SIEGE_COUNTERATTACK_BOOSTER_DISABLED);
}

public static double getWarSiegeCounterattackBoosterExtraDeathPointsPerPlayerPercent() {
return Settings.getDouble(ConfigNodes.WAR_SIEGE_COUNTERATTACK_BOOSTER_EXTRA_DEATH_POINTS_PER_PLAYER_PERCENT);
public static double getWarSiegeCounterattackBoosterExtraDeathPointsPerPlayerPercentage() {
return Settings.getDouble(ConfigNodes.WAR_SIEGE_COUNTERATTACK_BOOSTER_EXTRA_DEATH_POINTS_PER_PLAYER_PERCENTAGE);
}

public static boolean isWarSiegeBattleSessionsEnabled() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -205,7 +205,7 @@ public static int adjustSiegePointPenaltyForBannerControl(boolean residentIsAtta
||
(!residentIsAttacker && siege.getBannerControllingSide() == SiegeSide.DEFENDERS)
) {
return siegePoints + (int)(siegePoints * siege.getBannerControllingResidents().size() /100 * SiegeWarSettings.getWarSiegeCounterattackBoosterExtraDeathPointsPerPlayerPercent());
return siegePoints + (int)((double)siegePoints * siege.getBannerControllingResidents().size() /100 * SiegeWarSettings.getWarSiegeCounterattackBoosterExtraDeathPointsPerPlayerPercentage());
} else {
return siegePoints;
}
Expand Down

0 comments on commit bb7dc12

Please sign in to comment.