Skip to content

Commit 766989f

Browse files
committed
* - New Feature: blackSkulledDeathHealth and blackSkulledDeathMana are now configurable in config.lua.
1 parent bcfe21d commit 766989f

5 files changed

Lines changed: 9 additions & 2 deletions

File tree

config.lua.dist

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,8 @@ monthKillsToRedSkull = 10
4646
redSkullDuration = 1
4747
blackSkullDuration = 3
4848
orangeSkullDuration = 7
49+
blackSkulledDeathHealth = 40
50+
blackSkulledDeathMana = 0
4951

5052
cleanProtectionZones = false
5153

markdowns/CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
- New configurations in `config.lua`: `timeToRegenMinuteStamina` and `timeToRegenMinutePremiumStamina`. ([Tryller](https://github.com/jprzimba))
1111
- Added a new attribute `attackspeed` to mounts.xml, allowing mounts to increase player attack speed. ([Tryller](https://github.com/jprzimba))
1212
- New Feature: `fairFightTimeRange` is now configurable in `config.lua`. ([Tryller](https://github.com/jprzimba))
13+
- New Feature: `blackSkulledDeathHealth` and `blackSkulledDeathMana` are now configurable in `config.lua`. ([Tryller](https://github.com/jprzimba))
1314

1415
## Added files
1516

src/config/config_enums.hpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -343,4 +343,6 @@ enum ConfigKey_t : uint16_t {
343343
STAMINA_REGEN_MINUTE,
344344
STAMINA_REGEN_PREMIUM,
345345
FAIRFIGHT_TIMERANGE,
346+
BLACK_SKULL_DEATH_HEALTH,
347+
BLACK_SKULL_DEATH_MANA,
346348
};

src/config/configmanager.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -358,6 +358,8 @@ bool ConfigManager::load() {
358358
loadIntConfig(L, STAMINA_REGEN_MINUTE, "timeToRegenMinuteStamina", 3 * 60);
359359
loadIntConfig(L, STAMINA_REGEN_PREMIUM, "timeToRegenMinutePremiumStamina", 6 * 60);
360360
loadIntConfig(L, FAIRFIGHT_TIMERANGE, "fairFightTimeRange", 5 * 60 * 1000);
361+
loadIntConfig(L, BLACK_SKULL_DEATH_HEALTH, "blackSkulledDeathHealth", 40);
362+
loadIntConfig(L, BLACK_SKULL_DEATH_MANA, "blackSkulledDeathMana", 0);
361363

362364
loadStringConfig(L, CORE_DIRECTORY, "coreDirectory", "data");
363365
loadStringConfig(L, DATA_DIRECTORY, "dataPackDirectory", "data-global");

src/creatures/players/player.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3664,8 +3664,8 @@ void Player::death(const std::shared_ptr<Creature> &lastHitCreature) {
36643664
sendReLoginWindow(unfairFightReduction);
36653665
sendBlessStatus();
36663666
if (getSkull() == SKULL_BLACK) {
3667-
health = 40;
3668-
mana = 0;
3667+
health = g_configManager().getNumber(BLACK_SKULL_DEATH_HEALTH);
3668+
mana = g_configManager().getNumber(BLACK_SKULL_DEATH_MANA);
36693669
} else {
36703670
health = healthMax;
36713671
mana = manaMax;

0 commit comments

Comments
 (0)