Skip to content

Commit

Permalink
Reinforcing is now possible for nearly all materials (#920)
Browse files Browse the repository at this point in the history
* Reinforcing is now possible for nearly all materials

* Update as requested

* Update item.cpp
  • Loading branch information
Lamandus authored Nov 1, 2021
1 parent 8280cd2 commit 558be0e
Show file tree
Hide file tree
Showing 2 changed files with 43 additions and 1 deletion.
42 changes: 42 additions & 0 deletions data/json/materials.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@
"specific_heat_liquid": 1.8,
"specific_heat_solid": 1.8,
"latent_heat": 50,
"reinforces": true,
"bash_resist": 8,
"cut_resist": 12,
"acid_resist": 20,
Expand All @@ -52,6 +53,7 @@
"specific_heat_liquid": 1.18,
"specific_heat_solid": 0.91,
"latent_heat": 398,
"reinforces": true,
"bash_resist": 0,
"cut_resist": 4,
"acid_resist": 4,
Expand All @@ -72,6 +74,7 @@
"specific_heat_liquid": 4.186,
"specific_heat_solid": 2.108,
"latent_heat": 333,
"reinforces": true,
"bash_resist": 4,
"cut_resist": 4,
"acid_resist": 13,
Expand Down Expand Up @@ -99,6 +102,7 @@
"latent_heat": 200,
"edible": true,
"rotting": true,
"reinforces": true,
"bash_resist": 2,
"cut_resist": 3,
"acid_resist": 7,
Expand Down Expand Up @@ -126,6 +130,7 @@
"specific_heat_liquid": 0.49,
"specific_heat_solid": 0.39,
"latent_heat": 205,
"reinforces": true,
"bash_resist": 3,
"cut_resist": 4,
"acid_resist": 16,
Expand All @@ -141,6 +146,7 @@
"id": "bronze",
"name": "Bronze",
"density": 58,
"reinforces": true,
"bash_resist": 4,
"cut_resist": 5,
"acid_resist": 1,
Expand All @@ -162,6 +168,7 @@
"specific_heat_liquid": 0.82,
"specific_heat_solid": 0.45,
"latent_heat": 273,
"reinforces": true,
"bash_resist": 6,
"cut_resist": 6,
"acid_resist": 7,
Expand All @@ -181,6 +188,7 @@
"specific_heat_liquid": 1.34,
"specific_heat_solid": 1.34,
"latent_heat": 333,
"reinforces": true,
"bash_resist": 1,
"cut_resist": 1,
"acid_resist": 1,
Expand All @@ -203,6 +211,7 @@
"specific_heat_liquid": 1,
"specific_heat_solid": 1,
"latent_heat": 333,
"reinforces": true,
"bash_resist": 2,
"cut_resist": 6,
"acid_resist": 10,
Expand All @@ -218,6 +227,7 @@
"id": "lightceramic",
"name": "Dragon Scale",
"density": 4,
"reinforces": true,
"bash_resist": 4,
"cut_resist": 8,
"acid_resist": 10,
Expand All @@ -236,6 +246,7 @@
"specific_heat_liquid": 4.186,
"specific_heat_solid": 2.108,
"latent_heat": 333,
"reinforces": true,
"bash_resist": 4,
"cut_resist": 5,
"acid_resist": 6,
Expand All @@ -262,6 +273,7 @@
"specific_heat_liquid": 1,
"specific_heat_solid": 1,
"latent_heat": 333,
"reinforces": true,
"bash_resist": 2,
"cut_resist": 3,
"acid_resist": 6,
Expand All @@ -281,6 +293,7 @@
"specific_heat_liquid": 0.49,
"specific_heat_solid": 0.39,
"latent_heat": 205,
"reinforces": true,
"bash_resist": 2,
"cut_resist": 3,
"acid_resist": 0,
Expand Down Expand Up @@ -329,6 +342,7 @@
"specific_heat_liquid": 0.52,
"specific_heat_solid": 0.52,
"latent_heat": 5200,
"reinforces": true,
"bash_resist": 14,
"cut_resist": 20,
"acid_resist": 10,
Expand All @@ -347,6 +361,7 @@
"specific_heat_liquid": 0.52,
"specific_heat_solid": 0.52,
"latent_heat": 5200,
"reinforces": true,
"bash_resist": 14,
"cut_resist": 20,
"acid_resist": 10,
Expand Down Expand Up @@ -413,6 +428,7 @@
"specific_heat_solid": 2.15,
"latent_heat": 260,
"soft": true,
"reinforces": true,
"bash_resist": 1,
"cut_resist": 1,
"acid_resist": 1,
Expand All @@ -437,6 +453,7 @@
"specific_heat_liquid": 4.186,
"specific_heat_solid": 2.108,
"latent_heat": 333,
"reinforces": true,
"bash_resist": 1,
"cut_resist": 1,
"acid_resist": 4,
Expand Down Expand Up @@ -483,6 +500,7 @@
"specific_heat_solid": 0.02,
"latent_heat": 333,
"soft": true,
"reinforces": true,
"bash_resist": 2,
"cut_resist": 2,
"acid_resist": 3,
Expand All @@ -509,6 +527,7 @@
"specific_heat_solid": 0.02,
"latent_heat": 333,
"soft": true,
"reinforces": true,
"bash_resist": 2,
"cut_resist": 2,
"acid_resist": 4,
Expand All @@ -534,6 +553,7 @@
"specific_heat_liquid": 0.2,
"specific_heat_solid": 0.2,
"latent_heat": 100,
"reinforces": true,
"bash_resist": 3,
"cut_resist": 4,
"acid_resist": 10,
Expand All @@ -558,6 +578,7 @@
"specific_heat_liquid": 0.15,
"specific_heat_solid": 0.13,
"latent_heat": 63,
"reinforces": true,
"bash_resist": 1,
"cut_resist": 1,
"acid_resist": 10,
Expand All @@ -579,6 +600,7 @@
"specific_heat_liquid": 0.82,
"specific_heat_solid": 0.45,
"latent_heat": 273,
"reinforces": true,
"bash_resist": 10,
"cut_resist": 16,
"acid_resist": 6,
Expand Down Expand Up @@ -647,6 +669,7 @@
"specific_heat_liquid": 0.5,
"specific_heat_solid": 0.5,
"latent_heat": 518,
"reinforces": true,
"bash_resist": 0,
"cut_resist": 0,
"acid_resist": 0,
Expand Down Expand Up @@ -696,6 +719,7 @@
"specific_heat_liquid": 0.82,
"specific_heat_solid": 0.45,
"latent_heat": 273,
"reinforces": true,
"bash_resist": 4,
"cut_resist": 4,
"acid_resist": 5,
Expand All @@ -718,6 +742,7 @@
"latent_heat": 220,
"edible": true,
"rotting": true,
"reinforces": true,
"bash_resist": 1,
"cut_resist": 1,
"acid_resist": 2,
Expand Down Expand Up @@ -765,6 +790,7 @@
"specific_heat_liquid": 0.82,
"specific_heat_solid": 0.45,
"latent_heat": 273,
"reinforces": true,
"bash_resist": 2,
"cut_resist": 4,
"acid_resist": 5,
Expand All @@ -785,6 +811,7 @@
"specific_heat_liquid": 0.13,
"specific_heat_solid": 0.14,
"latent_heat": 2,
"reinforces": true,
"bash_resist": 0,
"cut_resist": 0,
"acid_resist": 8,
Expand Down Expand Up @@ -889,6 +916,7 @@
"specific_heat_solid": 1.1,
"latent_heat": 273,
"soft": true,
"reinforces": true,
"bash_resist": 2,
"cut_resist": 1,
"acid_resist": 1,
Expand Down Expand Up @@ -916,6 +944,7 @@
"specific_heat_solid": 1.2,
"latent_heat": 273,
"soft": true,
"reinforces": true,
"bash_resist": 1,
"cut_resist": 1,
"acid_resist": 5,
Expand Down Expand Up @@ -981,6 +1010,7 @@
"specific_heat_liquid": 1.34,
"specific_heat_solid": 1.34,
"latent_heat": 333,
"reinforces": true,
"bash_resist": 1,
"cut_resist": 1,
"acid_resist": 1,
Expand Down Expand Up @@ -1023,6 +1053,7 @@
"specific_heat_liquid": 1.6,
"specific_heat_solid": 1.6,
"latent_heat": 50,
"reinforces": true,
"bash_resist": 2,
"cut_resist": 2,
"acid_resist": 9,
Expand Down Expand Up @@ -1108,6 +1139,7 @@
"specific_heat_liquid": 0.28,
"specific_heat_solid": 0.23,
"latent_heat": 111,
"reinforces": true,
"bash_resist": 2,
"cut_resist": 3,
"acid_resist": 10,
Expand All @@ -1129,6 +1161,7 @@
"specific_heat_liquid": 0.18,
"specific_heat_solid": 0.13,
"latent_heat": 100,
"reinforces": true,
"bash_resist": 1,
"cut_resist": 1,
"acid_resist": 10,
Expand All @@ -1152,6 +1185,7 @@
"specific_heat_liquid": 0.4,
"specific_heat_solid": 0.13,
"latent_heat": 165,
"reinforces": true,
"bash_resist": 5,
"cut_resist": 1,
"acid_resist": 5,
Expand All @@ -1175,6 +1209,7 @@
"id": "steel",
"name": "Steel",
"density": 30,
"reinforces": true,
"bash_resist": 6,
"specific_heat_liquid": 0.82,
"specific_heat_solid": 0.45,
Expand All @@ -1200,6 +1235,7 @@
"specific_heat_liquid": 0.82,
"specific_heat_solid": 0.45,
"latent_heat": 273,
"reinforces": true,
"bash_resist": 6,
"cut_resist": 6,
"acid_resist": 8,
Expand All @@ -1219,6 +1255,7 @@
"specific_heat_liquid": 0.82,
"specific_heat_solid": 0.45,
"latent_heat": 273,
"reinforces": true,
"bash_resist": 6,
"cut_resist": 6,
"acid_resist": 5,
Expand All @@ -1240,6 +1277,7 @@
"specific_heat_liquid": 0.82,
"specific_heat_solid": 0.45,
"latent_heat": 273,
"reinforces": true,
"bash_resist": 6,
"cut_resist": 6,
"acid_resist": 30,
Expand Down Expand Up @@ -1291,6 +1329,7 @@
"//4": "Latent heat of fusion: https://www.engineeringtoolbox.com/fusion-heat-metals-d_1266.html",
"latent_heat": 59,
"//5": "Tin has a Mohs hardness of about 1.5, about that of lead.",
"reinforces": true,
"bash_resist": 0,
"cut_resist": 0,
"acid_resist": 2,
Expand Down Expand Up @@ -1514,6 +1553,7 @@
"specific_heat_liquid": 1.7,
"specific_heat_solid": 1.7,
"latent_heat": 273,
"reinforces": true,
"bash_resist": 3,
"cut_resist": 2,
"acid_resist": 4,
Expand Down Expand Up @@ -1569,6 +1609,7 @@
"specific_heat_liquid": 1.7,
"specific_heat_solid": 1.7,
"latent_heat": 273,
"reinforces": true,
"bash_resist": 1,
"cut_resist": 1,
"acid_resist": 1,
Expand Down Expand Up @@ -1716,6 +1757,7 @@
"specific_heat_liquid": 1.7,
"specific_heat_solid": 1.7,
"latent_heat": 273,
"reinforces": true,
"bash_resist": 1,
"cut_resist": 1,
"acid_resist": 0,
Expand Down
2 changes: 1 addition & 1 deletion src/item.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4912,7 +4912,7 @@ int item::damage_melee( damage_type dt ) const

// effectiveness is reduced by 10% per damage level
int res = type->melee[ dt ];
res -= res * damage_level( 4 ) * 0.1;
res -= res * std::max( damage_level( 4 ), 0 ) * 0.1;

// apply type specific flags
switch( dt ) {
Expand Down

0 comments on commit 558be0e

Please sign in to comment.