Skip to content
Permalink
Browse files

Merged PR 400: Merge 524_chainmail_research to master

Related work items: #524
  • Loading branch information...
realms-mud committed Jan 5, 2019
1 parent 3cf6020 commit 757c23ce84bb34fe5a431dfed21362a73ee683de
Showing with 1,217 additions and 4 deletions.
  1. +1 −0 .gitattributes
  2. +17 −1 core/specification.c
  3. +17 −2 dictionaries/craftingDictionary.c
  4. +158 −0 instances/research/crafting/armor/chainmail/chainmail-crafting.c
  5. +21 −0 instances/research/crafting/armor/chainmail/craftChainmail.c
  6. +29 −0 instances/research/crafting/armor/chainmail/khazuraths-gift.c
  7. +31 −0 instances/research/crafting/armor/chainmail/khazuraths-legacy.c
  8. +32 −0 instances/research/crafting/armor/chainmail/khazuraths-tradition.c
  9. +30 −0 instances/research/crafting/armor/chainmail/khazuraths-way.c
  10. +29 −0 instances/research/crafting/armor/chainmail/khed-arun.c
  11. +28 −0 instances/research/crafting/armor/chainmail/kheleds-aegis.c
  12. +30 −0 instances/research/crafting/armor/chainmail/kheleds-legacy.c
  13. +39 −0 instances/research/crafting/armor/chainmail/kheleds-tradition.c
  14. +31 −0 instances/research/crafting/armor/chainmail/kheleds-way.c
  15. +28 −0 instances/research/crafting/armor/chainmail/khuz-no-dai.c
  16. +31 −0 instances/research/crafting/armor/chainmail/maeliths-legacy.c
  17. +38 −0 instances/research/crafting/armor/chainmail/maeliths-tradition.c
  18. +32 −0 instances/research/crafting/armor/chainmail/maeliths-way.c
  19. +26 −0 instances/research/crafting/armor/common/annealing.c
  20. +32 −0 instances/research/crafting/armor/common/austempering.c
  21. +31 −0 instances/research/crafting/armor/common/case-hardening.c
  22. +31 −0 instances/research/crafting/armor/common/differential-hardening.c
  23. +33 −0 instances/research/crafting/armor/common/folding.c
  24. +26 −0 instances/research/crafting/armor/common/forge-welding.c
  25. +37 −0 instances/research/crafting/armor/common/mystic-folding.c
  26. +32 −0 instances/research/crafting/armor/common/mystic-quenching.c
  27. +36 −0 instances/research/crafting/armor/common/mystic-welding.c
  28. +35 −0 instances/research/crafting/armor/common/mystic-wrapping.c
  29. +32 −0 instances/research/crafting/armor/common/pattern-welding.c
  30. +30 −0 instances/research/crafting/armor/common/quenching.c
  31. +29 −0 instances/research/crafting/armor/common/slack-quenching.c
  32. +34 −0 instances/research/crafting/armor/common/stepped-quenching.c
  33. +32 −0 instances/research/crafting/armor/common/stepped-tempering.c
  34. +32 −0 instances/research/crafting/armor/common/tempering.c
  35. +35 −0 instances/research/crafting/armor/common/wrapping.c
  36. +4 −0 instances/research/crafting/weapons/common/annealing.c
  37. +3 −0 instances/research/crafting/weapons/common/austempering.c
  38. +3 −0 instances/research/crafting/weapons/common/case-hardening.c
  39. +3 −0 instances/research/crafting/weapons/common/differential-hardening.c
  40. +3 −0 instances/research/crafting/weapons/common/folding.c
  41. +3 −0 instances/research/crafting/weapons/common/forge-welding.c
  42. +3 −0 instances/research/crafting/weapons/common/mystic-folding.c
  43. +3 −0 instances/research/crafting/weapons/common/mystic-quenching.c
  44. +3 −0 instances/research/crafting/weapons/common/mystic-welding.c
  45. +3 −0 instances/research/crafting/weapons/common/mystic-wrapping.c
  46. +3 −0 instances/research/crafting/weapons/common/pattern-welding.c
  47. +3 −0 instances/research/crafting/weapons/common/quenching.c
  48. +3 −0 instances/research/crafting/weapons/common/slack-quenching.c
  49. +3 −0 instances/research/crafting/weapons/common/stepped-quenching.c
  50. +3 −0 instances/research/crafting/weapons/common/stepped-tempering.c
  51. +3 −0 instances/research/crafting/weapons/common/tempering.c
  52. +3 −0 instances/research/crafting/weapons/common/wrapping.c
  53. +0 −1 tests/support/research/limitedByCraftingResearch.c
@@ -0,0 +1 @@
* text=auto
@@ -285,8 +285,24 @@ public nomask varargs int canApplySkill(string skill, object owner, object targe
}
if (member(researchData["limited by"], "crafting type"))
{
ret &&= target && (target->query("crafting type") ==
ret &&= objectp(target);

if (stringp(researchData["limited by"]["crafting type"]) &&
target)
{
ret &&= (target->query("crafting type") ==
researchData["limited by"]["crafting type"]);
}
else if (pointerp(researchData["limited by"]["crafting type"]) &&
target)
{
int checkList = 0;
foreach(string key in researchData["limited by"]["crafting type"])
{
checkList += (target->query("crafting type") == key);
}
ret &&= checkList;
}
if (!ret && verbose)
{
printf("The item is of the wrong type to be affected by this research.\n");
@@ -11,9 +11,24 @@
#include "materials/enchantments.h"

/////////////////////////////////////////////////////////////////////////////
public nomask int isValidType(string type)
public nomask int isValidType(mixed type)
{
return (member(weaponSubTypes + armorCategories, type) > -1);
int ret = 0;

string *types = weaponSubTypes + armorCategories;
if (stringp(type))
{
ret = member(types, type) > -1;
}
else if (pointerp(type) && sizeof(type))
{
ret = 1;
foreach(string key in type)
{
ret &&= member(types, key) > -1;
}
}
return ret;
}

/////////////////////////////////////////////////////////////////////////////
@@ -0,0 +1,158 @@
//*****************************************************************************
// Copyright (c) 2019 - Allen Cummings, RealmsMUD, All rights reserved. See
// the accompanying LICENSE file for details.
//*****************************************************************************
inherit "/lib/modules/research/researchTree.c";

/////////////////////////////////////////////////////////////////////////////
public void CommonResearch()
{
addResearchElement("lib/instances/research/crafting/armor/common/annealing.c");
addChild("lib/instances/research/crafting/armor/common/annealing.c",
"lib/instances/research/crafting/armor/chainmail/craftChainmail.c");

addResearchElement("lib/instances/research/crafting/armor/common/slack-quenching.c");
addChild("lib/instances/research/crafting/armor/common/slack-quenching.c",
"lib/instances/research/crafting/armor/common/annealing.c");

addResearchElement("lib/instances/research/crafting/armor/common/quenching.c");
addChild("lib/instances/research/crafting/armor/common/quenching.c",
"lib/instances/research/crafting/armor/common/slack-quenching.c");

addResearchElement("lib/instances/research/crafting/armor/common/tempering.c");
addChild("lib/instances/research/crafting/armor/common/tempering.c",
"lib/instances/research/crafting/armor/common/quenching.c");

addResearchElement("lib/instances/research/crafting/armor/common/stepped-tempering.c");
addChild("lib/instances/research/crafting/armor/common/stepped-tempering.c",
"lib/instances/research/crafting/armor/common/tempering.c");

addResearchElement("lib/instances/research/crafting/armor/common/austempering.c");
addChild("lib/instances/research/crafting/armor/common/austempering.c",
"lib/instances/research/crafting/armor/common/quenching.c");

addResearchElement("lib/instances/research/crafting/armor/common/stepped-quenching.c");
addChild("lib/instances/research/crafting/armor/common/stepped-quenching.c",
"lib/instances/research/crafting/armor/common/quenching.c");

addResearchElement("lib/instances/research/crafting/armor/common/case-hardening.c");
addChild("lib/instances/research/crafting/armor/common/case-hardening.c",
"lib/instances/research/crafting/armor/common/quenching.c");

addResearchElement("lib/instances/research/crafting/armor/common/differential-hardening.c");
addChild("lib/instances/research/crafting/armor/common/differential-hardening.c",
"lib/instances/research/crafting/armor/common/stepped-tempering.c");

addResearchElement("lib/instances/research/crafting/armor/common/folding.c");
addChild("lib/instances/research/crafting/armor/common/folding.c",
"lib/instances/research/crafting/armor/common/annealing.c");

addResearchElement("lib/instances/research/crafting/armor/common/pattern-welding.c");
addChild("lib/instances/research/crafting/armor/common/pattern-welding.c",
"lib/instances/research/crafting/armor/common/folding.c");

addResearchElement("lib/instances/research/crafting/armor/common/wrapping.c");
addChild("lib/instances/research/crafting/armor/common/wrapping.c",
"lib/instances/research/crafting/armor/common/folding.c");

addResearchElement("lib/instances/research/crafting/armor/common/forge-welding.c");
addChild("lib/instances/research/crafting/armor/common/forge-welding.c",
"lib/instances/research/crafting/armor/common/annealing.c");

addResearchElement("lib/instances/research/crafting/armor/common/mystic-folding.c");
addChild("lib/instances/research/crafting/armor/common/mystic-folding.c",
"lib/instances/research/crafting/armor/common/folding.c");

addResearchElement("lib/instances/research/crafting/armor/common/mystic-quenching.c");
addChild("lib/instances/research/crafting/armor/common/mystic-quenching.c",
"lib/instances/research/crafting/armor/common/quenching.c");

addResearchElement("lib/instances/research/crafting/armor/common/mystic-wrapping.c");
addChild("lib/instances/research/crafting/armor/common/mystic-wrapping.c",
"lib/instances/research/crafting/armor/common/mystic-folding.c");

addResearchElement("lib/instances/research/crafting/armor/common/mystic-welding.c");
addChild("lib/instances/research/crafting/armor/common/mystic-welding.c",
"lib/instances/research/crafting/armor/common/mystic-wrapping.c");
}

/////////////////////////////////////////////////////////////////////////////
public void Techniques()
{
addResearchElement("lib/instances/research/crafting/armor/chainmail/kheleds-tradition.c");
addChild("lib/instances/research/crafting/armor/chainmail/kheleds-tradition.c",
"lib/instances/research/crafting/armor/common/folding.c");

addResearchElement("lib/instances/research/crafting/armor/chainmail/kheleds-way.c");
addChild("lib/instances/research/crafting/armor/chainmail/kheleds-way.c",
"lib/instances/research/crafting/armor/chainmail/kheleds-tradition.c");

addResearchElement("lib/instances/research/crafting/armor/chainmail/kheleds-legacy.c");
addChild("lib/instances/research/crafting/armor/chainmail/kheleds-legacy.c",
"lib/instances/research/crafting/armor/chainmail/kheleds-way.c");

addResearchElement("lib/instances/research/crafting/armor/chainmail/kheleds-aegis.c");
addChild("lib/instances/research/crafting/armor/chainmail/kheleds-aegis.c",
"lib/instances/research/crafting/armor/chainmail/kheleds-way.c");

addResearchElement("lib/instances/research/crafting/armor/chainmail/maeliths-tradition.c");
addChild("lib/instances/research/crafting/armor/chainmail/maeliths-tradition.c",
"lib/instances/research/crafting/armor/common/folding.c");

addResearchElement("lib/instances/research/crafting/armor/chainmail/maeliths-way.c");
addChild("lib/instances/research/crafting/armor/chainmail/maeliths-way.c",
"lib/instances/research/crafting/armor/chainmail/maeliths-tradition.c");

addResearchElement("lib/instances/research/crafting/armor/chainmail/maeliths-legacy.c");
addChild("lib/instances/research/crafting/armor/chainmail/maeliths-legacy.c",
"lib/instances/research/crafting/armor/chainmail/maeliths-way.c");

addResearchElement("lib/instances/research/crafting/armor/chainmail/khazuraths-tradition.c");
addChild("lib/instances/research/crafting/armor/chainmail/khazuraths-tradition.c",
"lib/instances/research/crafting/armor/chainmail/maeliths-legacy.c");

addResearchElement("lib/instances/research/crafting/armor/chainmail/khazuraths-way.c");
addChild("lib/instances/research/crafting/armor/chainmail/khazuraths-way.c",
"lib/instances/research/crafting/armor/chainmail/khazuraths-tradition.c");

addResearchElement("lib/instances/research/crafting/armor/chainmail/khazuraths-legacy.c");
addChild("lib/instances/research/crafting/armor/chainmail/khazuraths-legacy.c",
"lib/instances/research/crafting/armor/chainmail/khazuraths-way.c");

addResearchElement("lib/instances/research/crafting/armor/chainmail/khed-arun.c");
addChild("lib/instances/research/crafting/armor/chainmail/khed-arun.c",
"lib/instances/research/crafting/armor/chainmail/khazuraths-legacy.c");

addResearchElement("lib/instances/research/crafting/armor/chainmail/khuz-no-dai.c");
addChild("lib/instances/research/crafting/armor/chainmail/khuz-no-dai.c",
"lib/instances/research/crafting/armor/chainmail/khed-arun.c");

addResearchElement("lib/instances/research/crafting/armor/chainmail/khazuraths-gift.c");
addChild("lib/instances/research/crafting/armor/chainmail/khazuraths-gift.c",
"lib/instances/research/crafting/armor/chainmail/khuz-no-dai.c");

}


/////////////////////////////////////////////////////////////////////////////
public void reset(int arg)
{
if (!arg)
{
researchTree::reset(arg);
Name("Chainmail Crafting");
Description("This research tree tracks the knowledge required to craft "
"chainmail");
Source("crafting");
addPrerequisite("weapon smithing",
(["type":"skill", "value" : 3]));
addPrerequisite("lib/instances/research/crafting/armor/craftArmor.c",
(["type":"research"]));

addResearchElement("lib/instances/research/crafting/armor/chainmail/craftChainmail.c");
TreeRoot("lib/instances/research/crafting/armor/chainmail/craftChainmail.c");

CommonResearch();
Techniques();
}
}
@@ -0,0 +1,21 @@
//*****************************************************************************
// Copyright (c) 2019 - Allen Cummings, RealmsMUD, All rights reserved. See
// the accompanying LICENSE file for details.
//*****************************************************************************
inherit "/lib/modules/research/knowledgeResearchItem.c";

/////////////////////////////////////////////////////////////////////////////
public void reset(int arg)
{
if (!arg)
{
knowledgeResearchItem::reset(arg);
addSpecification("name", "Craft Chainmail");
addSpecification("source", "crafting");
addSpecification("description", "This skill provides the user with the "
"knowledge required to craft chainmail armor.");
addSpecification("research type", "granted");
addPrerequisite("lib/instances/research/crafting/armor/craftArmor.c",
(["type":"research"]));
}
}
@@ -0,0 +1,29 @@
//*****************************************************************************
// Copyright (c) 2019 - Allen Cummings, RealmsMUD, All rights reserved. See
// the accompanying LICENSE file for details.
//*****************************************************************************
inherit "/lib/modules/research/passiveResearchItem.c";

/////////////////////////////////////////////////////////////////////////////
public void reset(int arg)
{
if (!arg)
{
passiveResearchItem::reset(arg);
addSpecification("name", "Khazurath's Gift");
addSpecification("source", "crafting");
addSpecification("description", "This skill provides the user with the "
"master techniques of imbuing the chainmail with its own essence. "
"This is a skill mastered by the great smiths of Khazurath.");
addSpecification("research type", "points");
addSpecification("research cost", 1);

addPrerequisite("lib/instances/research/crafting/armor/chainmail/khuz-no-dai.c",
(["type":"research"]));

addSpecification("limited by", (["crafting type":"chainmail"]));

addSpecification("bonus crafting magical enchantment", 2);
addSpecification("bonus crafting enchantments", 1);
}
}
@@ -0,0 +1,31 @@
//*****************************************************************************
// Copyright (c) 2019 - Allen Cummings, RealmsMUD, All rights reserved. See
// the accompanying LICENSE file for details.
//*****************************************************************************
inherit "/lib/modules/research/passiveResearchItem.c";

/////////////////////////////////////////////////////////////////////////////
public void reset(int arg)
{
if (!arg)
{
passiveResearchItem::reset(arg);
addSpecification("name", "Khazurath's Legacy");
addSpecification("source", "crafting");
addSpecification("description", "This skill provides the user with the "
"arcane techniques mastered by the great smiths of Khazurath.");
addSpecification("research type", "points");
addSpecification("research cost", 1);

addPrerequisite("lib/instances/research/crafting/armor/chainmail/khazuraths-way.c",
(["type":"research"]));

addSpecification("limited by", (["crafting type":"chainmail"]));

addSpecification("bonus crafting value multiplier", 20);
addSpecification("bonus crafting enchantments", 1);
addSpecification("bonus spellcraft", 5);
addSpecification("bonus metal crafting", 3);
addSpecification("bonus armorer", 3);
}
}
@@ -0,0 +1,32 @@
//*****************************************************************************
// Copyright (c) 2019 - Allen Cummings, RealmsMUD, All rights reserved. See
// the accompanying LICENSE file for details.
//*****************************************************************************
inherit "/lib/modules/research/passiveResearchItem.c";

/////////////////////////////////////////////////////////////////////////////
public void reset(int arg)
{
if (!arg)
{
passiveResearchItem::reset(arg);
addSpecification("name", "Khazurath's Tradition");
addSpecification("source", "crafting");
addSpecification("description", "This skill provides the user with the "
"techniques mastered by the great smiths of Khazurath.");
addSpecification("research type", "points");
addSpecification("research cost", 1);

addPrerequisite("lib/instances/research/crafting/armor/chainmail/maeliths-legacy.c",
(["type":"research"]));

addSpecification("limited by", (["crafting type":"chainmail"]));

addSpecification("bonus crafting value multiplier", 30);
addSpecification("bonus crafting encumberance reduction", 10);
addSpecification("bonus crafting armor class", 1);
addSpecification("bonus blacksmithing", 3);
addSpecification("bonus metal crafting", 3);
addSpecification("bonus armorer", 3);
}
}
@@ -0,0 +1,30 @@
//*****************************************************************************
// Copyright (c) 2019 - Allen Cummings, RealmsMUD, All rights reserved. See
// the accompanying LICENSE file for details.
//*****************************************************************************
inherit "/lib/modules/research/passiveResearchItem.c";

/////////////////////////////////////////////////////////////////////////////
public void reset(int arg)
{
if (!arg)
{
passiveResearchItem::reset(arg);
addSpecification("name", "Khazurath's Way");
addSpecification("source", "crafting");
addSpecification("description", "This skill provides the user with the "
"advanced techniques mastered by the great smiths of Khazurath.");
addSpecification("research type", "points");
addSpecification("research cost", 1);

addPrerequisite("lib/instances/research/crafting/armor/chainmail/khazuraths-tradition.c",
(["type":"research"]));

addSpecification("limited by", (["crafting type":"chainmail"]));

addSpecification("bonus crafting value multiplier", 20);
addSpecification("bonus gem crafting", 5);
addSpecification("bonus spellcraft", 5);
addSpecification("bonus armorer", 5);
}
}
@@ -0,0 +1,29 @@
//*****************************************************************************
// Copyright (c) 2019 - Allen Cummings, RealmsMUD, All rights reserved. See
// the accompanying LICENSE file for details.
//*****************************************************************************
inherit "/lib/modules/research/passiveResearchItem.c";

/////////////////////////////////////////////////////////////////////////////
public void reset(int arg)
{
if (!arg)
{
passiveResearchItem::reset(arg);
addSpecification("name", "Khed-arun");
addSpecification("source", "crafting");
addSpecification("description", "This skill provides the user with the "
"arcane techniques of imbuing the chainmail with their own essence. "
"This is a skill mastered by the great smiths of Khazurath.");
addSpecification("research type", "points");
addSpecification("research cost", 1);

addPrerequisite("lib/instances/research/crafting/armor/chainmail/khazuraths-legacy.c",
(["type":"research"]));

addSpecification("limited by", (["crafting type":"chainmail"]));

addSpecification("bonus crafting value multiplier", 10);
addSpecification("bonus crafting magical enchantment", 3);
}
}
Oops, something went wrong.

0 comments on commit 757c23c

Please sign in to comment.
You can’t perform that action at this time.