Skip to content
Permalink
Browse files

Merged PR 493: Merge 599_materials_description to master

Related work items: #599, #600
  • Loading branch information...
realms-mud committed Apr 26, 2019
1 parent 2d78ee6 commit 102410badc7125fdbfacb28a3ee71c9f28870c65
Showing with 385 additions and 343 deletions.
  1. +2 −2 core/specification.c
  2. +224 −224 dictionaries/materials/materials.h
  3. +31 −31 dictionaries/materials/potions.h
  4. +27 −6 dictionaries/materialsDictionary.c
  5. +1 −1 environment/shopInventories/baseShop.c
  6. +1 −1 instances/items/potions/acid-resistance.c
  7. +1 −1 instances/items/potions/air-resistance.c
  8. +1 −1 instances/items/potions/chaos-resistance.c
  9. +1 −1 instances/items/potions/charisma.c
  10. +1 −1 instances/items/potions/cold-resistance.c
  11. +1 −1 instances/items/potions/constitution.c
  12. +1 −1 instances/items/potions/dexterity.c
  13. +1 −1 instances/items/potions/disease-resistance.c
  14. +1 −1 instances/items/potions/earth-resistance.c
  15. +1 −1 instances/items/potions/electricity-resistance.c
  16. +1 −1 instances/items/potions/energy-resistance.c
  17. +1 −1 instances/items/potions/evil-resistance.c
  18. +1 −1 instances/items/potions/fire-resistance.c
  19. +1 −1 instances/items/potions/fortification.c
  20. +1 −1 instances/items/potions/good-resistance.c
  21. +1 −1 instances/items/potions/healing.c
  22. +1 −1 instances/items/potions/intelligence.c
  23. +1 −1 instances/items/potions/magical-resistance.c
  24. +1 −1 instances/items/potions/mana.c
  25. +1 −1 instances/items/potions/neutral-resistance.c
  26. +1 −1 instances/items/potions/paralysis-resistance.c
  27. +1 −1 instances/items/potions/physical-resistance.c
  28. +1 −1 instances/items/potions/poison-resistance.c
  29. +1 −1 instances/items/potions/psionic-resistance.c
  30. +1 −1 instances/items/potions/sonic-resistance.c
  31. +1 −1 instances/items/potions/speed.c
  32. +1 −1 instances/items/potions/stamina.c
  33. +1 −1 instances/items/potions/strength.c
  34. +1 −1 instances/items/potions/undead-resistance.c
  35. +1 −1 instances/items/potions/water-resistance.c
  36. +1 −1 instances/items/potions/wisdom.c
  37. +1 −1 items/armor.c
  38. +1 −1 items/drink.c
  39. +1 −7 items/equipment.c
  40. +1 −1 items/food.c
  41. +1 −1 items/instrument.c
  42. +15 −7 items/item.c
  43. +2 −8 items/material.c
  44. +1 −1 items/potion.c
  45. +1 −1 items/weapon.c
  46. +6 −2 tests/commands/player/lookTest.c
  47. +9 −11 tests/environment/buyItemSelectorTest.c
  48. +1 −2 tests/items/containerTest.c
  49. +3 −1 tests/items/itemStatisticsTest.c
  50. +20 −2 tests/items/itemTest.c
  51. +6 −2 tests/items/weaponTest.c
@@ -292,7 +292,7 @@ public nomask varargs int canApplySkill(string skill, object owner, object targe
{
ret &&= ((target->query("crafting type") ==
researchData["limited by"]["crafting type"]) ||
(getDictionary("materials")->getBlueprintModifier(target,
(getDictionary("materials")->getBlueprintDetails(target,
"skill to use") ==
researchData["limited by"]["crafting type"]));
}
@@ -305,7 +305,7 @@ public nomask varargs int canApplySkill(string skill, object owner, object targe
foreach(string key in researchData["limited by"]["crafting type"])
{
checkList += ((target->query("crafting type") == key) ||
(materials->getBlueprintModifier(target,
(materials->getBlueprintDetails(target,
"skill to use") == key));
}
ret &&= checkList;

Large diffs are not rendered by default.

Oops, something went wrong.
@@ -5,7 +5,7 @@

private nosave mapping potions =
([
"healing":([
"healing potion":([
"type": "health",
"crafting prerequisites": ([
"lib/instances/research/crafting/potions/brewPotions.c":(["type":"research"]),
@@ -19,7 +19,7 @@ private nosave mapping potions =
]),
"base experience": 5,
]),
"mana":([
"mana potion":([
"type": "health",
"crafting prerequisites": ([
"lib/instances/research/crafting/potions/brewPotions.c":(["type":"research"]),
@@ -33,7 +33,7 @@ private nosave mapping potions =
]),
"base experience": 5,
]),
"stamina":([
"stamina potion":([
"type": "health",
"crafting prerequisites": ([
"lib/instances/research/crafting/potions/brewPotions.c":(["type":"research"]),
@@ -108,7 +108,7 @@ private nosave mapping potions =
]),
"base experience": 5,
]),
"acid resistance":([
"acid resistance potion":([
"type": "resistance",
"crafting prerequisites": ([
"lib/instances/research/crafting/potions/brewAdvancedPotions.c":(["type":"research"]),
@@ -122,7 +122,7 @@ private nosave mapping potions =
]),
"base experience": 5,
]),
"air resistance":([
"air resistance potion":([
"type": "resistance",
"crafting prerequisites": ([
"lib/instances/research/crafting/potions/brewAdvancedPotions.c":(["type":"research"]),
@@ -136,7 +136,7 @@ private nosave mapping potions =
]),
"base experience": 5,
]),
"chaos resistance":([
"chaos resistance potion":([
"type": "resistance",
"crafting prerequisites": ([
"lib/instances/research/crafting/potions/brewAdvancedPotions.c":(["type":"research"]),
@@ -150,7 +150,7 @@ private nosave mapping potions =
]),
"base experience": 5,
]),
"cold resistance":([
"cold resistance potion":([
"type": "resistance",
"crafting prerequisites": ([
"lib/instances/research/crafting/potions/brewAdvancedPotions.c":(["type":"research"]),
@@ -164,7 +164,7 @@ private nosave mapping potions =
]),
"base experience": 5,
]),
"disease resistance":([
"disease resistance potion":([
"type": "resistance",
"crafting prerequisites": ([
"lib/instances/research/crafting/potions/brewAdvancedPotions.c":(["type":"research"]),
@@ -178,7 +178,7 @@ private nosave mapping potions =
]),
"base experience": 5,
]),
"earth resistance":([
"earth resistance potion":([
"type": "resistance",
"crafting prerequisites": ([
"lib/instances/research/crafting/potions/brewAdvancedPotions.c":(["type":"research"]),
@@ -192,7 +192,7 @@ private nosave mapping potions =
]),
"base experience": 5,
]),
"electricity resistance":([
"electricity resistance potion":([
"type": "resistance",
"crafting prerequisites": ([
"lib/instances/research/crafting/potions/brewAdvancedPotions.c":(["type":"research"]),
@@ -206,7 +206,7 @@ private nosave mapping potions =
]),
"base experience": 5,
]),
"energy resistance":([
"energy resistance potion":([
"type": "resistance",
"crafting prerequisites": ([
"lib/instances/research/crafting/potions/brewAdvancedPotions.c":(["type":"research"]),
@@ -220,7 +220,7 @@ private nosave mapping potions =
]),
"base experience": 5,
]),
"evil resistance":([
"evil resistance potion":([
"type": "resistance",
"crafting prerequisites": ([
"lib/instances/research/crafting/potions/brewAdvancedPotions.c":(["type":"research"]),
@@ -234,7 +234,7 @@ private nosave mapping potions =
]),
"base experience": 5,
]),
"fire resistance":([
"fire resistance potion":([
"type": "resistance",
"crafting prerequisites": ([
"lib/instances/research/crafting/potions/brewAdvancedPotions.c":(["type":"research"]),
@@ -248,7 +248,7 @@ private nosave mapping potions =
]),
"base experience": 5,
]),
"good resistance":([
"good resistance potion":([
"type": "resistance",
"crafting prerequisites": ([
"lib/instances/research/crafting/potions/brewAdvancedPotions.c":(["type":"research"]),
@@ -262,7 +262,7 @@ private nosave mapping potions =
]),
"base experience": 5,
]),
"magic resistance":([
"magic resistance potion":([
"type": "resistance",
"crafting prerequisites": ([
"lib/instances/research/crafting/potions/brewAdvancedPotions.c":(["type":"research"]),
@@ -276,7 +276,7 @@ private nosave mapping potions =
]),
"base experience": 5,
]),
"neutral resistance":([
"neutral resistance potion":([
"type": "resistance",
"crafting prerequisites": ([
"lib/instances/research/crafting/potions/brewAdvancedPotions.c":(["type":"research"]),
@@ -290,7 +290,7 @@ private nosave mapping potions =
]),
"base experience": 5,
]),
"paralysis resistance":([
"paralysis resistance potion":([
"type": "resistance",
"crafting prerequisites": ([
"lib/instances/research/crafting/potions/brewAdvancedPotions.c":(["type":"research"]),
@@ -304,7 +304,7 @@ private nosave mapping potions =
]),
"base experience": 5,
]),
"physical resistance":([
"physical resistance potion":([
"type": "resistance",
"crafting prerequisites": ([
"lib/instances/research/crafting/potions/brewAdvancedPotions.c":(["type":"research"]),
@@ -318,7 +318,7 @@ private nosave mapping potions =
]),
"base experience": 5,
]),
"poison resistance":([
"poison resistance potion":([
"type": "resistance",
"crafting prerequisites": ([
"lib/instances/research/crafting/potions/brewAdvancedPotions.c":(["type":"research"]),
@@ -332,7 +332,7 @@ private nosave mapping potions =
]),
"base experience": 5,
]),
"psionic resistance":([
"psionic resistance potion":([
"type": "resistance",
"crafting prerequisites": ([
"lib/instances/research/crafting/potions/brewAdvancedPotions.c":(["type":"research"]),
@@ -346,7 +346,7 @@ private nosave mapping potions =
]),
"base experience": 5,
]),
"sonic resistance":([
"sonic resistance potion":([
"type": "resistance",
"crafting prerequisites": ([
"lib/instances/research/crafting/potions/brewAdvancedPotions.c":(["type":"research"]),
@@ -360,7 +360,7 @@ private nosave mapping potions =
]),
"base experience": 5,
]),
"undead resistance":([
"undead resistance potion":([
"type": "resistance",
"crafting prerequisites": ([
"lib/instances/research/crafting/potions/brewAdvancedPotions.c":(["type":"research"]),
@@ -374,7 +374,7 @@ private nosave mapping potions =
]),
"base experience": 5,
]),
"water resistance":([
"water resistance potion":([
"type": "resistance",
"crafting prerequisites": ([
"lib/instances/research/crafting/potions/brewAdvancedPotions.c":(["type":"research"]),
@@ -388,7 +388,7 @@ private nosave mapping potions =
]),
"base experience": 5,
]),
"strength":([
"strength potion":([
"type": "attributes",
"crafting prerequisites": ([
"lib/instances/research/crafting/potions/brewAdvancedPotions.c":(["type":"research"]),
@@ -402,7 +402,7 @@ private nosave mapping potions =
]),
"base experience": 5,
]),
"intelligence":([
"intelligence potion":([
"type": "attributes",
"crafting prerequisites": ([
"lib/instances/research/crafting/potions/brewAdvancedPotions.c":(["type":"research"]),
@@ -416,7 +416,7 @@ private nosave mapping potions =
]),
"base experience": 5,
]),
"dexterity":([
"dexterity potion":([
"type": "attributes",
"crafting prerequisites": ([
"lib/instances/research/crafting/potions/brewAdvancedPotions.c":(["type":"research"]),
@@ -430,7 +430,7 @@ private nosave mapping potions =
]),
"base experience": 5,
]),
"wisdom":([
"wisdom potion":([
"type": "attributes",
"crafting prerequisites": ([
"lib/instances/research/crafting/potions/brewAdvancedPotions.c":(["type":"research"]),
@@ -444,7 +444,7 @@ private nosave mapping potions =
]),
"base experience": 5,
]),
"constitution":([
"constitution potion":([
"type": "attributes",
"crafting prerequisites": ([
"lib/instances/research/crafting/potions/brewAdvancedPotions.c":(["type":"research"]),
@@ -458,7 +458,7 @@ private nosave mapping potions =
]),
"base experience": 5,
]),
"charisma":([
"charisma potion":([
"type": "attributes",
"crafting prerequisites": ([
"lib/instances/research/crafting/potions/brewAdvancedPotions.c":(["type":"research"]),
@@ -472,7 +472,7 @@ private nosave mapping potions =
]),
"base experience": 5,
]),
"speed":([
"speed potion":([
"type": "combat",
"crafting prerequisites": ([
"lib/instances/research/crafting/potions/brewFortifyingPotions.c":(["type":"research"]),
@@ -486,7 +486,7 @@ private nosave mapping potions =
]),
"base experience": 5,
]),
"fortification":([
"fortification potion":([
"type": "combat",
"crafting prerequisites": ([
"lib/instances/research/crafting/potions/brewFortifyingPotions.c":(["type":"research"]),
@@ -222,29 +222,46 @@ public nomask int isValidBonus(string bonus)
}

/////////////////////////////////////////////////////////////////////////////
public nomask int getBlueprintModifier(object item, string type)
private nomask mixed getBlueprintData(object item, string type)
{
int ret = 0;
mixed ret = 0;
string itemType = item->query("blueprint");
if (isValidWeaponBlueprint(itemType))
if (isValidWeaponBlueprint(itemType) &&
member(weaponBlueprints[itemType], type))
{
ret = weaponBlueprints[itemType][type];
}
else if (isValidArmorBlueprint(itemType))
else if (isValidArmorBlueprint(itemType) &&
member(armorBlueprints[itemType], type))
{
ret = armorBlueprints[itemType][type];
}
else if (isValidMaterial(itemType))
else if (isValidMaterial(itemType) &&
member(materials[itemType], type))
{
ret = materials[itemType][type];
}
else if (isValidInstrumentBlueprint(itemType))
else if (isValidInstrumentBlueprint(itemType) &&
member(instrumentBlueprints[itemType], type))
{
ret = instrumentBlueprints[itemType][type];
}
return ret;
}

/////////////////////////////////////////////////////////////////////////////
public nomask int getBlueprintModifier(object item, string type)
{
return to_int(getBlueprintData(item, type));
}

/////////////////////////////////////////////////////////////////////////////
public nomask string getBlueprintDetails(object item, string type)
{
string detail = getBlueprintData(item, type);
return (detail && stringp(detail)) ? detail : 0;
}

/////////////////////////////////////////////////////////////////////////////
public nomask int getMaterialCraftsmanshipBonus(object item)
{
@@ -532,6 +549,10 @@ public varargs string applyMaterialQualityToText(object equipment,
qualityText = "a well-crafted item";
}
}
else
{
equipment->identify();
}

if(!text)
{
@@ -85,7 +85,7 @@ public nomask varargs int storeItem(object item, int isPermanent)
"description": item->long(1),
"value": item->query("value"),
"type": item->query("type"),
"subType": dictionary->getBlueprintModifier(item, "subtype"),
"subType": dictionary->getBlueprintDetails(item, "subtype"),
"quality": dictionary->getMaterialQualityFormatter(item),
"summary": dictionary->getItemSummary(item),
"data": item->query("all")
@@ -13,6 +13,6 @@ public void reset(int arg)
set("short", "Potion of Acid Resistance");
set("aliases", ({ "acid resistance", "potion", "acid resistance potion",
"potion of acid resistance" }));
set("blueprint", "acid resistance");
set("blueprint", "acid resistance potion");
}
}
@@ -13,6 +13,6 @@ public void reset(int arg)
set("short", "Potion of Air Resistance");
set("aliases", ({ "air resistance", "potion", "air resistance potion",
"potion of air resistance" }));
set("blueprint", "air resistance");
set("blueprint", "air resistance potion");
}
}
@@ -13,6 +13,6 @@ public void reset(int arg)
set("short", "Potion of Chaos Resistance");
set("aliases", ({ "chaos resistance", "potion", "chaos resistance potion",
"potion of chaos resistance" }));
set("blueprint", "chaos resistance");
set("blueprint", "chaos resistance potion");
}
}
Oops, something went wrong.

0 comments on commit 102410b

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