Skip to content

Commit

Permalink
Merge pull request #77662 from GuardianDll/no_hardcode_damage_enchant…
Browse files Browse the repository at this point in the history
…ment_melee

deprecate melee damage enchantments
  • Loading branch information
Maleclypse authored Nov 9, 2024
2 parents af98298 + 38d0e7d commit d1b14bf
Show file tree
Hide file tree
Showing 32 changed files with 261 additions and 365 deletions.
2 changes: 1 addition & 1 deletion data/json/bionics.json
Original file line number Diff line number Diff line change
Expand Up @@ -1400,7 +1400,7 @@
"occupied_bodyparts": [ [ "hand_l", 1 ], [ "hand_r", 1 ] ],
"passive_pseudo_items": [ "fake_razor" ],
"flags": [ "BIONIC_NPC_USABLE" ],
"enchantments": [ { "condition": { "not": "u_has_weapon" }, "values": [ { "value": "ITEM_DAMAGE_STAB", "add": 2 } ] } ]
"enchantments": [ { "condition": { "not": "u_has_weapon" }, "melee_damage_bonus": [ { "type": "stab", "add": 2 } ] } ]
},
{
"id": "bio_recycler",
Expand Down
10 changes: 5 additions & 5 deletions data/json/mutations/mutations.json
Original file line number Diff line number Diff line change
Expand Up @@ -3218,7 +3218,7 @@
"vitamin_cost": 160,
"visibility": 6,
"ugliness": 3,
"enchantments": [ { "condition": { "not": "u_has_weapon" }, "values": [ { "value": "ITEM_DAMAGE_BASH", "add": 2 } ] } ],
"enchantments": [ { "condition": { "not": "u_has_weapon" }, "melee_damage_bonus": [ { "type": "bash", "add": 2 } ] } ],
"description": "You've grown a chitin exoskeleton, much like that of an insect. It provides considerable physical protection, and make your punches hit a little harder. Somewhat reduces wet effects.",
"types": [ "BODY_ARMOR" ],
"prereqs": [ "CHITIN" ],
Expand Down Expand Up @@ -3274,7 +3274,7 @@
"visibility": 8,
"ugliness": 5,
"enchantments": [
{ "condition": { "not": "u_has_weapon" }, "values": [ { "value": "ITEM_DAMAGE_BASH", "add": 4 } ] },
{ "condition": { "not": "u_has_weapon" }, "melee_damage_bonus": [ { "type": "bash", "add": 4 } ] },
{ "values": [ { "value": "DEXTERITY", "add": -1 } ] }
],
"description": "You've grown a sclerotin exoskeleton, akin to an organic suit of platemail. It provides excellent physical protection and makes your punches hit harder, but reduces your Dexterity by 1 and encumbers all body parts but your eyes and mouth. Greatly reduces wet effects.",
Expand Down Expand Up @@ -3610,7 +3610,7 @@
"vitamin_cost": 160,
"visibility": 8,
"ugliness": 4,
"enchantments": [ { "values": [ { "value": "ITEM_DAMAGE_STAB", "add": 2 } ] } ],
"enchantments": [ { "melee_damage_bonus": [ { "type": "stab", "add": 2 } ] } ],
"description": "Your skin is covered in small, woody thorns. Whenever an unarmed opponent strikes a part of your body that is not covered by clothing, they will receive minor damage. Your punches may also deal extra damage.",
"prereqs": [ "BARK", "BARK2_a", "BARK2_b", "BARK2_c" ],
"category": [ "PLANT" ]
Expand Down Expand Up @@ -3804,7 +3804,7 @@
"points": 1,
"vitamin_cost": 60,
"visibility": 1,
"enchantments": [ { "values": [ { "value": "ITEM_DAMAGE_STAB", "add": 0.5 } ] } ],
"enchantments": [ { "melee_damage_bonus": [ { "type": "stab", "add": 0.5 } ] } ],
"description": "Your fingernails are long and sharp. If you aren't wearing gloves, your unarmed attacks deal a minor amount of cutting damage.",
"types": [ "CLAWS" ],
"changes_to": [ "CLAWS", "TALONS" ],
Expand Down Expand Up @@ -4195,7 +4195,7 @@
"vitamin_cost": 60,
"visibility": 5,
"ugliness": 4,
"enchantments": [ { "values": [ { "value": "ITEM_DAMAGE_ACID", "add": { "math": [ "rng(2, 3)" ] } } ] } ],
"enchantments": [ { "melee_damage_bonus": [ { "type": "acid", "add": { "math": [ "rng(2, 3)" ] } } ] } ],
"description": "The skin on your hands is now a mucous membrane that produces a thick, acrid slime. Attacks using your hand will cause minor acid damage. Slightly increases wet benefits.",
"prereqs": [ "SLIMY" ],
"category": [ "SLIME" ],
Expand Down
2 changes: 1 addition & 1 deletion data/mods/Aftershock/items/weapons.json
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@
{
"has": "WORN",
"condition": "ALWAYS",
"values": [ { "value": "ITEM_DAMAGE_COLD", "add": 17 } ],
"melee_damage_bonus": [ { "type": "cold", "add": 17 } ],
"name": { "str": "Ice Fists" },
"description": "Strikes from this weapon can freeze targets solid."
}
Expand Down
4 changes: 2 additions & 2 deletions data/mods/Aftershock/player/bionics.json
Original file line number Diff line number Diff line change
Expand Up @@ -371,7 +371,7 @@
{ "u_has_wielded_with_flag": "BIONIC_WEAPON_MELEE" }
]
},
"values": [ { "value": "ITEM_DAMAGE_HEAT", "add": 35 } ]
"melee_damage_bonus": [ { "type": "heat", "add": 35 } ]
}
]
},
Expand All @@ -398,7 +398,7 @@
]
},
"hit_you_effect": [ { "id": "bio_blade_electric_arc" } ],
"values": [ { "value": "ITEM_DAMAGE_ELEC", "add": 10 } ]
"melee_damage_bonus": [ { "type": "electric", "add": 10 } ]
}
]
},
Expand Down
5 changes: 3 additions & 2 deletions data/mods/BombasticPerks/perks.json
Original file line number Diff line number Diff line change
Expand Up @@ -437,7 +437,8 @@
}
]
},
"values": [ { "value": "POWER_TRICKLE", "add": 250000 }, { "value": "ITEM_DAMAGE_ELEC", "add": 3 } ]
"values": [ { "value": "POWER_TRICKLE", "add": 250000 } ],
"melee_damage_bonus": [ { "type": "electric", "add": 3 } ]
}
]
},
Expand Down Expand Up @@ -810,7 +811,7 @@
"enchantments": [
{
"condition": "ALWAYS",
"values": [ { "value": "ITEM_DAMAGE_BASH", "add": { "math": [ "u_armor('bash', 'arm_r') * u_attack_speed() / 200" ] } } ]
"melee_damage_bonus": [ { "type": "bash", "add": { "math": [ "u_armor('bash', 'arm_r') * u_attack_speed() / 200" ] } } ]
}
]
},
Expand Down
53 changes: 3 additions & 50 deletions data/mods/Defense_Mode/mod_interactions/bombastic_perks/perks.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
"name": { "str": "Slice n' Dice" },
"points": 0,
"description": "You've become very skilled with cutting weapons of all sorts, and know how to use them better.",
"enchantments": [ { "condition": { "not": "u_has_weapon" }, "values": [ { "value": "ITEM_DAMAGE_CUT", "add": 5 } ] } ],
"enchantments": [ { "condition": { "not": "u_has_weapon" }, "melee_damage_bonus": [ { "type": "cut", "add": 5 } ] } ],
"category": [ "perk" ]
},
{
Expand All @@ -23,7 +23,7 @@
"name": { "str": "Bash n' Mash" },
"points": 0,
"description": "You've become very skilled with blunt instruments of all sorts, and know how to use them better.",
"enchantments": [ { "condition": { "not": "u_has_weapon" }, "values": [ { "value": "ITEM_DAMAGE_BASH", "add": 5 } ] } ],
"enchantments": [ { "condition": { "not": "u_has_weapon" }, "melee_damage_bonus": [ { "type": "bash", "add": 5 } ] } ],
"category": [ "perk" ]
},
{
Expand All @@ -32,53 +32,6 @@
"name": { "str": "Knifey" },
"points": 0,
"description": "You're very in tune with the ways of stabbing somebody.",
"enchantments": [ { "values": [ { "value": "ITEM_DAMAGE_STAB", "add": 5 } ] } ],
"category": [ "perk" ]
},
{
"type": "mutation",
"id": "perk_melee_master",
"name": { "str": "Melee Master" },
"points": 0,
"description": "You've become a master of melee, and are skilled with melee weapons.",
"enchantments": [
{
"condition": { "not": "u_has_weapon" },
"values": [
{ "value": "ITEM_DAMAGE_CUT", "add": 10 },
{ "value": "ITEM_DAMAGE_STAB", "add": 10 },
{ "value": "ITEM_DAMAGE_BASH", "add": 10 }
]
}
],
"category": [ "perk" ]
},
{
"type": "mutation",
"id": "perk_gymrat_king",
"name": { "str": "Gym Rat King" },
"points": 0,
"description": "Your time exercising has gotten you used to being winded, and has vastly expanded your stamina. You can go for longer and harder now.",
"category": [ "perk" ],
"enchantments": [ { "values": [ { "value": "CARDIO_MULTIPLIER", "multiply": 0.8 } ] } ]
},
{
"type": "mutation",
"id": "perk_extra_life",
"name": { "str": "Living on a Prayer" },
"points": 0,
"description": "You're like a cat, and it always seemed to you like you've had nine lives. When things get rough, by pure luck or divine intervention, you can get out of it.",
"category": [ "perk" ],
"processed_eocs": [ { "id": "extra_life_addup", "effect": { "math": [ "revivication_counter", "++" ] } } ]
},
{
"type": "mutation",
"id": "perk_mysterious_stranger",
"name": { "str": "Mysterious Stranger" },
"points": 0,
"description": "Someone must be watching over you! Whenever you're in combat, you can call for the help of a stranger for a short amount of time.",
"category": [ "perk" ],
"active": true,
"activated_eocs": [ "mysterious_stranger_activate" ]
"enchantments": [ { "melee_damage_bonus": [ { "type": "stab", "add": 5 } ] } ]
}
]
16 changes: 5 additions & 11 deletions data/mods/MMA/enchantments.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,28 +3,22 @@
"type": "enchantment",
"id": "DRUNKEN_UNARMED",
"condition": { "not": "u_has_weapon" },
"values": [
{
"value": "ITEM_DAMAGE_BASH",
"add": { "math": [ "rng(u_effect_intensity('drunk') * 1.8, u_effect_intensity('drunk') * 4 )" ] }
}
"melee_damage_bonus": [
{ "type": "bash", "add": { "math": [ "rng(u_effect_intensity('drunk') * 1.8, u_effect_intensity('drunk') * 4 )" ] } }
]
},
{
"type": "enchantment",
"id": "DRUNKEN_ARMED",
"condition": "u_has_weapon",
"values": [
{
"value": "ITEM_DAMAGE_BASH",
"add": { "math": [ "rng(u_effect_intensity('drunk') * 1.2, u_effect_intensity('drunk') * 2.6 )" ] }
}
"melee_damage_bonus": [
{ "type": "bash", "add": { "math": [ "rng(u_effect_intensity('drunk') * 1.2, u_effect_intensity('drunk') * 2.6 )" ] } }
]
},
{
"type": "enchantment",
"id": "KI_STRIKE",
"condition": { "not": "u_has_weapon" },
"values": [ { "value": "ITEM_DAMAGE_BASH", "add": { "math": [ "u_skill('unarmed') * 2" ] } } ]
"melee_damage_bonus": [ { "type": "bash", "add": { "math": [ "u_skill('unarmed') * 2" ] } } ]
}
]
10 changes: 5 additions & 5 deletions data/mods/Magiclysm/Spells/attunements/Crusader.json
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@
"volume": "2750 ml",
"longest_side": "120cm",
"relic_data": {
"passive_effects": [ { "has": "WIELD", "condition": "ALWAYS", "values": [ { "value": "ITEM_DAMAGE_PURE", "add": 10 } ] } ]
"passive_effects": [ { "has": "WIELD", "condition": "ALWAYS", "melee_damage_bonus": [ { "type": "pure", "add": 10 } ] } ]
},
"use_action": [
{
Expand Down Expand Up @@ -156,7 +156,7 @@
"techniques": [ "RSTRIKE", "WBLOCK_1", "RAPID" ],
"weapon_category": [ "KNIVES" ],
"relic_data": {
"passive_effects": [ { "has": "WIELD", "condition": "ALWAYS", "values": [ { "value": "ITEM_DAMAGE_PURE", "add": 5 } ] } ]
"passive_effects": [ { "has": "WIELD", "condition": "ALWAYS", "melee_damage_bonus": [ { "type": "pure", "add": 5 } ] } ]
},
"use_action": [
{
Expand Down Expand Up @@ -196,7 +196,7 @@
"to_hit": { "grip": "weapon", "length": "long", "surface": "line", "balance": "good" },
"weapon_category": [ "GREAT_SWORDS" ],
"relic_data": {
"passive_effects": [ { "has": "WIELD", "condition": "ALWAYS", "values": [ { "value": "ITEM_DAMAGE_PURE", "add": 15 } ] } ]
"passive_effects": [ { "has": "WIELD", "condition": "ALWAYS", "melee_damage_bonus": [ { "type": "pure", "add": 15 } ] } ]
},
"use_action": [
{
Expand Down Expand Up @@ -236,7 +236,7 @@
"weapon_category": [ "POLEARMS", "SPEARS" ],
"to_hit": { "grip": "weapon", "length": "long", "surface": "point", "balance": "neutral" },
"relic_data": {
"passive_effects": [ { "has": "WIELD", "condition": "ALWAYS", "values": [ { "value": "ITEM_DAMAGE_PURE", "add": 11 } ] } ]
"passive_effects": [ { "has": "WIELD", "condition": "ALWAYS", "melee_damage_bonus": [ { "type": "pure", "add": 11 } ] } ]
},
"use_action": [
{
Expand Down Expand Up @@ -266,7 +266,7 @@
"techniques": [ "RSTRIKE", "WBLOCK_1", "SWEEP" ],
"weapon_category": [ "MACES" ],
"relic_data": {
"passive_effects": [ { "has": "WIELD", "condition": "ALWAYS", "values": [ { "value": "ITEM_DAMAGE_PURE", "add": 13 } ] } ]
"passive_effects": [ { "has": "WIELD", "condition": "ALWAYS", "melee_damage_bonus": [ { "type": "pure", "add": 13 } ] } ]
},
"use_action": [
{
Expand Down
5 changes: 4 additions & 1 deletion data/mods/Magiclysm/Spells/attunements/Storm_Elemental.json
Original file line number Diff line number Diff line change
Expand Up @@ -134,6 +134,9 @@
"remove_message": "Your hands turn back to normal condition.",
"rating": "good",
"show_intensity": false,
"enchantments": [ { "values": [ { "value": "ITEM_DAMAGE_ELEC", "add": 35 }, { "value": "MELEE_DAMAGE", "multiply": 0.4 } ] } ]
"enchantments": [
{ "melee_damage_bonus": [ { "type": "electric", "add": 35 } ] },
{ "values": [ { "value": "MELEE_DAMAGE", "multiply": 0.4 } ] }
]
}
]
5 changes: 1 addition & 4 deletions data/mods/Magiclysm/effects/effects.json
Original file line number Diff line number Diff line change
Expand Up @@ -694,10 +694,7 @@
"rating": "good",
"show_intensity": false,
"enchantments": [
{
"hit_me_effect": [ { "id": "eshaper_crystal_wrap_damage" } ],
"values": [ { "value": "ITEM_DAMAGE_CUT", "add": 17 } ]
}
{ "hit_me_effect": [ { "id": "eshaper_crystal_wrap_damage" } ], "melee_damage_bonus": [ { "type": "cut", "add": 17 } ] }
]
},
{
Expand Down
6 changes: 3 additions & 3 deletions data/mods/Magiclysm/items/enchanted_unarmed.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
"qualities": [ [ "HAMMER", 1 ] ],
"flags": [ "ONLY_ONE", "DURABLE_MELEE", "NONCONDUCTIVE", "FLAMING" ],
"relic_data": {
"passive_effects": [ { "has": "WORN", "condition": { "not": "u_has_weapon" }, "values": [ { "value": "ITEM_DAMAGE_HEAT", "add": 7 } ] } ]
"passive_effects": [ { "has": "WORN", "condition": { "not": "u_has_weapon" }, "melee_damage_bonus": [ { "type": "heat", "add": 7 } ] } ]
},
"armor": [
{
Expand Down Expand Up @@ -63,7 +63,7 @@
"name": { "str": "flaming fist +1", "str_pl": "flaming fists +1" },
"proportional": { "price": 3.0, "weight": 0.9, "melee_damage": { "all": 1.1 } },
"relic_data": {
"passive_effects": [ { "has": "WORN", "condition": "ALWAYS", "values": [ { "value": "ITEM_DAMAGE_HEAT", "add": 11 } ] } ]
"passive_effects": [ { "has": "WORN", "condition": "ALWAYS", "melee_damage_bonus": [ { "type": "heat", "add": 11 } ] } ]
},
"relative": { "to_hit": 1 }
},
Expand All @@ -75,7 +75,7 @@
"name": { "str": "flaming fist +2", "str_pl": "flaming fists +2" },
"proportional": { "price": 6.0, "weight": 0.8, "melee_damage": { "all": 1.2 } },
"relic_data": {
"passive_effects": [ { "has": "WORN", "condition": "ALWAYS", "values": [ { "value": "ITEM_DAMAGE_HEAT", "add": 15 } ] } ]
"passive_effects": [ { "has": "WORN", "condition": "ALWAYS", "melee_damage_bonus": [ { "type": "heat", "add": 15 } ] } ]
},
"relative": { "to_hit": 2 }
},
Expand Down
16 changes: 8 additions & 8 deletions data/mods/Magiclysm/items/ethereal_items.json
Original file line number Diff line number Diff line change
Expand Up @@ -255,7 +255,7 @@
],
"to_hit": 3,
"relic_data": {
"passive_effects": [ { "has": "WIELD", "condition": "ALWAYS", "values": [ { "value": "ITEM_DAMAGE_HEAT", "add": 30 } ] } ]
"passive_effects": [ { "has": "WIELD", "condition": "ALWAYS", "melee_damage_bonus": [ { "type": "heat", "add": 30 } ] } ]
},
"category": "weapons",
"melee_damage": { "cut": 6 }
Expand Down Expand Up @@ -665,7 +665,7 @@
"volume": "1250 ml",
"longest_side": "100 cm",
"relic_data": {
"passive_effects": [ { "has": "WIELD", "condition": "ALWAYS", "values": [ { "value": "ITEM_DAMAGE_HEAT", "add": 28 } ] } ]
"passive_effects": [ { "has": "WIELD", "condition": "ALWAYS", "melee_damage_bonus": [ { "type": "heat", "add": 28 } ] } ]
},
"melee_damage": { "bash": 12, "cut": 2 }
},
Expand All @@ -686,7 +686,7 @@
"longest_side": "70 cm",
"to_hit": 3,
"relic_data": {
"passive_effects": [ { "has": "WIELD", "condition": "ALWAYS", "values": [ { "value": "ITEM_DAMAGE_BIO", "add": 8 } ] } ]
"passive_effects": [ { "has": "WIELD", "condition": "ALWAYS", "melee_damage_bonus": [ { "type": "biological", "add": 8 } ] } ]
},
"melee_damage": { "bash": 12 }
},
Expand Down Expand Up @@ -921,7 +921,7 @@
"flags": [ "UNBREAKABLE_MELEE", "NONCONDUCTIVE", "NO_REPAIR", "NO_SALVAGE", "MAGIC_FOCUS", "TRADER_AVOID" ],
"qualities": [ [ "CONTAIN", 1 ], [ "BOIL", 1 ] ],
"relic_data": {
"passive_effects": [ { "has": "WIELD", "condition": "ALWAYS", "values": [ { "value": "ITEM_DAMAGE_PURE", "add": 3 } ] } ]
"passive_effects": [ { "has": "WIELD", "condition": "ALWAYS", "melee_damage_bonus": [ { "type": "pure", "add": 3 } ] } ]
},
"melee_damage": { "bash": 1 }
},
Expand Down Expand Up @@ -1430,7 +1430,7 @@
"to_hit": { "grip": "weapon", "length": "hand", "surface": "any", "balance": "neutral" },
"melee_damage": { "bash": 2 },
"relic_data": {
"passive_effects": [ { "has": "WORN", "condition": "ALWAYS", "values": [ { "value": "ITEM_DAMAGE_ELEC", "add": 6 } ] } ]
"passive_effects": [ { "has": "WORN", "condition": "ALWAYS", "melee_damage_bonus": [ { "type": "electric", "add": 6 } ] } ]
}
},
{
Expand Down Expand Up @@ -1485,12 +1485,12 @@
"has": "WORN",
"condition": "ALWAYS",
"hit_me_effect": [ { "id": "druid_thorn_skin_attacked", "hit_self": false, "once_in": 2 } ],
"melee_damage_bonus": [ { "type": "stab", "add": 3 } ],
"values": [
{ "value": "DEXTERITY", "add": -1 },
{ "value": "STRENGTH", "add": 1 },
{ "value": "CLIMATE_CONTROL_HEAT", "add": 20 },
{ "value": "ARMOR_HEAT", "multiply": 0.6 },
{ "value": "ITEM_DAMAGE_STAB", "add": 3 }
{ "value": "ARMOR_HEAT", "multiply": 0.6 }
]
}
]
Expand Down Expand Up @@ -1748,7 +1748,7 @@
"flags": [ "UNBREAKABLE_MELEE", "NONCONDUCTIVE", "NO_REPAIR", "NO_SALVAGE", "TRADER_AVOID" ],
"qualities": [ [ "CONTAIN", 1 ] ],
"relic_data": {
"passive_effects": [ { "has": "WIELD", "condition": "ALWAYS", "values": [ { "value": "ITEM_DAMAGE_PURE", "add": 0 } ] } ]
"passive_effects": [ { "has": "WIELD", "condition": "ALWAYS", "melee_damage_bonus": [ { "type": "pure", "add": 0 } ] } ]
},
"melee_damage": { "bash": 1 }
},
Expand Down
Loading

0 comments on commit d1b14bf

Please sign in to comment.