-
Notifications
You must be signed in to change notification settings - Fork 18
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
98df4da
commit 86cda7a
Showing
31 changed files
with
2,523 additions
and
1,107 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
[DruidicBlessing] | ||
name = "Druidic Blessing" | ||
description = "a vital blessing from the Great Meridan to only those worthy of such favor" | ||
modifiers = [ | ||
# Manasteal with poison spells | ||
{ stance = "attack", type = "manasteal", value = 20, damageType = "earth", originType = "spell" }, | ||
# Staminasteal | ||
{ stance = "attack", type = "staminasteal", value = 1, chance = 5, flatRate = true, damageType = "earth", originType = "condition" }, | ||
# Soulsteal | ||
{ stance = "attack", type = "soulsteal", chance = 10, damageType = "ice", originType = "spell" }, | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
[LancelotsLance] | ||
name = "Lancelot's Lance" | ||
description = "a powerful ability whose origins trace back to the White Knight Lancelot" | ||
modifiers = [ | ||
# Lifesteal | ||
{ stance = "attack", type = "lifesteal", value = 35, chance = 85, damageType = "physical", originType = "melee"}, | ||
# Melee Crits | ||
{ stance = "attack", type = "critical", value = 35, chance = 98, damageType = "physical", originType = "melee", monster = "Rat"}, | ||
] | ||
|
||
[GuardiansShield] | ||
name = "Guardian's Shield" | ||
description = "This enhancement comes from years of skilled craftsmanship, and just a touch of magic" | ||
modifiers = [ | ||
# Condition Resistance | ||
{ stance = "defense", type = "resist", value = 20, originType = "condition" }, | ||
# Spell Deflection | ||
{ stance = "defense", type = "deflect", chance = 10, damageType = "all", originType = "spell" }, | ||
# Physical Absorb | ||
{ stance = "defense", type = "absorb", value = 45, chance = 80, damageType = "physical"}, | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
[RangersResolve] | ||
name = "Ranger's Resolve" | ||
description = "An ancient shamanic blessing, endowing archers with the light needed to defeat the darkness" | ||
modifiers = [ | ||
# Piercing Shot | ||
{ stance = "attack", type = "piercing", value = 20, flatRate = true, originType = "ranged"}, | ||
# Death Resistance | ||
{ stance = "defense", type = "resist", value = 30, damageType = "death"}, | ||
# Soul Restoration | ||
{ stance = "attack", type = "soulsteal", value = 1, chance = 60, flatRate = true, originType = "ranged" }, | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
[MerlinsRage] | ||
name = "Merlins Rage" | ||
description = "A portion of The Great Mage Merlin's power! It takes great power just to wield this power!" | ||
modifiers = [ | ||
# Piercing curse damage | ||
{ stance = "attack", type = "piercing", value = 20, damageType = "death", originType="condition"}, | ||
# Spell Crits | ||
{ stance = "attack", type = "critical", value = 30, chance = 25, originType = "spell"}, | ||
# Spell Death Conversion | ||
{ stance = "attack", type = "conversion", value = 10, toDamageType = "death", originType = "spell" }, | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,20 +1 @@ | ||
local LoginEvent = CreatureEvent("DiscordHook") | ||
|
||
--Discord webhook enums | ||
--MESSAGE_NORMAL | ||
--MESSAGE_ERROR; | ||
--MESSAGE_LOG; | ||
--MESSAGE_INFO; | ||
|
||
local webhookLink = "TOKEN HERE" | ||
|
||
function LoginEvent.onLogin(player) | ||
Game.sendDiscordMessage(webhookLink, MESSAGE_INFO, "Player: " .. player:getName() .. " has logged in") | ||
Game.sendDiscordMessage(webhookLink, MESSAGE_ERROR, "Player: " .. player:getName() .. " has logged in") | ||
Game.sendDiscordMessage(webhookLink, MESSAGE_NORMAL, "Player: " .. player:getName() .. " has logged in") | ||
Game.sendDiscordMessage(webhookLink, MESSAGE_LOG, "Player: " .. player:getName() .. " has logged in") | ||
return true | ||
end | ||
|
||
LoginEvent:type("login") | ||
LoginEvent:register() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
// Credits: BlackTek Server Creator [email protected]. | ||
// This project is based of otland's The Forgottenserver. | ||
// Any and all code taken from otland's The Forgottenserver is licensed under GPL 2.0 | ||
// Any code Authored by: Codinablack or BlackTek contributers, that is not already licensed, is hereby licesned MIT. | ||
// The GPL 2.0 License that can be found in the LICENSE file. | ||
// All code found in this file is licensed under MIT and can be found in the LICENSE file. | ||
|
||
|
||
#include "augment.h" | ||
|
||
Augment::Augment(std::string_view name, std::string_view description) : m_name(name), m_description(description), m_mod_list(std::make_shared<ModifierList>()) { | ||
m_mod_list->initializeSharedPointer(); | ||
} | ||
|
||
Augment::Augment(std::shared_ptr<Augment>& original) : m_name(original->m_name), m_mod_list(original->m_mod_list) { | ||
m_mod_list->initializeSharedPointer(); | ||
} | ||
|
||
std::vector<std::shared_ptr<DamageModifier>>& Augment::getAttackModifiers() | ||
{ | ||
return m_mod_list->getAttackModifiers(); | ||
} | ||
|
||
std::vector<std::shared_ptr<DamageModifier>>& Augment::getDefenseModifiers() | ||
{ | ||
return m_mod_list->getDefenseModifiers(); | ||
} | ||
|
||
std::vector<std::shared_ptr<DamageModifier>>& Augment::getAttackModifiers(uint8_t modType) | ||
{ | ||
return m_mod_list->getAttackModifiers(modType); | ||
} | ||
|
||
std::vector<std::shared_ptr<DamageModifier>>& Augment::getDefenseModifiers(uint8_t modType) | ||
{ | ||
return m_mod_list->getDefenseModifiers(modType); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,92 @@ | ||
// Credits: BlackTek Server Creator [email protected]. | ||
// This project is based of otland's The Forgottenserver. | ||
// Any and all code taken from otland's The Forgottenserver is licensed under GPL 2.0 | ||
// Any code Authored by: Codinablack or BlackTek contributers, that is not already licensed, is hereby licesned MIT. | ||
// The GPL 2.0 License that can be found in the LICENSE file. | ||
// All code found in this file is licensed under MIT and can be found in the LICENSE file. | ||
|
||
|
||
#ifndef FS_AUGMENT_H | ||
#define FS_AUGMENT_H | ||
|
||
#include "damagemodifier.h" | ||
|
||
class Augment : public std::enable_shared_from_this<Augment> { | ||
|
||
public: | ||
Augment() = default; | ||
Augment(std::string_view name, std::string_view description = ""); | ||
Augment(std::shared_ptr<Augment>& original); | ||
|
||
~Augment() = default; | ||
|
||
// allow copying | ||
explicit Augment(const Augment&) = default; | ||
Augment& operator=(const Augment&) = default; | ||
|
||
// comparison operator | ||
std::strong_ordering operator<=>(const Augment& other) const = default; | ||
|
||
const std::string_view getName() const; | ||
const std::string_view getDescription() const; | ||
|
||
void setName(std::string_view name); | ||
void setDescription(std::string_view description); | ||
|
||
static std::shared_ptr<Augment> MakeAugment(std::string_view augmentName, std::string_view description = ""); | ||
static std::shared_ptr<Augment> MakeAugment(std::shared_ptr<Augment>& originalPointer); | ||
|
||
void addModifier(std::shared_ptr<DamageModifier> modifier); | ||
void removeModifier(std::shared_ptr<DamageModifier>& modifier); | ||
|
||
std::vector<std::shared_ptr<DamageModifier>>& getAttackModifiers(); | ||
std::vector<std::shared_ptr<DamageModifier>>& getDefenseModifiers(); | ||
|
||
std::vector<std::shared_ptr<DamageModifier>>& getAttackModifiers(uint8_t modType); | ||
std::vector<std::shared_ptr<DamageModifier>>& getDefenseModifiers(uint8_t modType); | ||
|
||
private: | ||
|
||
std::shared_ptr<ModifierList> m_mod_list; | ||
std::string_view m_name; | ||
std::string_view m_description; | ||
}; | ||
|
||
|
||
inline std::shared_ptr<Augment> Augment::MakeAugment(std::string_view augmentName, std::string_view description) { | ||
auto augment = std::make_shared<Augment>(augmentName); | ||
return augment; | ||
} | ||
|
||
inline std::shared_ptr<Augment> Augment::MakeAugment(std::shared_ptr<Augment>& originalRef) | ||
{ | ||
auto augmentClone = std::make_shared<Augment>(originalRef); | ||
return augmentClone; | ||
} | ||
|
||
inline const std::string_view Augment::getName() const { | ||
return m_name; | ||
} | ||
|
||
inline const std::string_view Augment::getDescription() const | ||
{ | ||
return m_description; | ||
} | ||
|
||
inline void Augment::setName(std::string_view name) { | ||
m_name = name; | ||
} | ||
|
||
inline void Augment::setDescription(std::string_view description) { | ||
m_description = description; | ||
} | ||
|
||
inline void Augment::addModifier(std::shared_ptr<DamageModifier> modifier) { | ||
m_mod_list->addModifier(modifier); | ||
} | ||
|
||
inline void Augment::removeModifier(std::shared_ptr<DamageModifier>& modifier) { | ||
m_mod_list->removeModifier(modifier); | ||
} | ||
|
||
#endif |
Oops, something went wrong.