Skip to content

Commit

Permalink
Make explosives, wheels, bullets less dangerous to items, make fires …
Browse files Browse the repository at this point in the history
…stack less (#1345)

* Rework effects of item smashing

* Disable item destruction for bullets and wheels

* Turn ammo_effect ids in projectiles into proper ids

* Tidy

* Proper string_id for ammo_effects (except RECOVER_*)
  • Loading branch information
Coolthulhu authored Feb 22, 2022
1 parent 13bcbc7 commit 23334ac
Show file tree
Hide file tree
Showing 31 changed files with 786 additions and 224 deletions.
167 changes: 166 additions & 1 deletion data/json/ammo_effects.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,11 @@
"do_flashbang": false,
"do_emp_blast": false
},
{
"id": "magic",
"type": "ammo_effect",
"//": "Always hits torso."
},
{
"id": "FLAME",
"type": "ammo_effect",
Expand Down Expand Up @@ -183,7 +188,7 @@
"trail": { "field_type": "fd_fungicidal_gas", "intensity_min": 1, "intensity_max": 2, "chance": 66 }
},
{
"id": "STREAM_GAS_INSCENTICIDAL",
"id": "STREAM_GAS_INSECTICIDAL",
"type": "ammo_effect",
"trail": { "field_type": "fd_insecticidal_gas", "intensity_min": 1, "intensity_max": 2, "chance": 66 }
},
Expand All @@ -206,5 +211,165 @@
"id": "NO_PENETRATE_OBSTACLES",
"type": "ammo_effect",
"//": "Don't act penetrate obstacles such as fences or reinforced glass"
},
{
"id": "HEAVY_HIT",
"type": "ammo_effect",
"//": "Makes a slightly different, slightly louder sound on drop..."
},
{
"id": "NO_ITEM_DAMAGE",
"type": "ammo_effect",
"//": "Doesn't pulp corpses hit by the projectile (overkill corpse damage still applies)"
},
{
"id": "WIDE",
"type": "ammo_effect",
"//": "Does NOTHING at all. TODO: Make it ignore skeleton smaller ranged size."
},
{
"id": "NOGIB",
"type": "ammo_effect",
"//": "Doesn't overkill."
},
{
"id": "SHOT",
"type": "ammo_effect",
"//": "Implied WIDE. Doesn't do anything on its own."
},
{
"id": "COOKOFF",
"type": "ammo_effect",
"//": "Item flag that is an ammo effect for a misguided reason. Makes ammo explode in fire."
},
{
"id": "INCENDIARY",
"type": "ammo_effect",
"//": "Causes fires to terrain and critters."
},
{
"id": "NEVER_MISFIRES",
"type": "ammo_effect",
"//": "Disables misfires."
},
{
"id": "ACT_ON_RANGED_HIT",
"type": "ammo_effect",
"//": "The item will be processed on the hit tile before (or instead) being dropped."
},
{
"id": "APPLY_SAP",
"type": "ammo_effect",
"//": "Adds sap effect."
},
{
"id": "BEANBAG",
"type": "ammo_effect",
"//": "Stuns weaker creatures."
},
{
"id": "BLINDS_EYES",
"type": "ammo_effect",
"//": "Blinds if hits eyes."
},
{
"id": "BOUNCE",
"type": "ammo_effect",
"//": "Bounces to one of visible critters within 4 tiles of hit tile, except for the shooter or critters who were targeted by a bounce this turn. Order of bounces is unspecified, but not random. Reuses projectile and so damage modifiers from being blocked by terrain."
},
{
"id": "BURST",
"type": "ammo_effect",
"//": "Thrown item destroyed on impact, but drops contents."
},
{
"id": "CUSTOM_EXPLOSION",
"type": "ammo_effect",
"//": "Copy explosion data from ammo."
},
{
"id": "DRAW_AS_LINE",
"type": "ammo_effect",
"//": "Drawn instantly, without animation."
},
{
"id": "IGNITE",
"type": "ammo_effect",
"//": "Ignites hit creatures."
},
{
"id": "JET",
"type": "ammo_effect",
"//": "Will continue going through passable tiles even if its damage is reduced to 0."
},
{
"id": "LARGE_BEANBAG",
"type": "ammo_effect",
"//": "Stuns a bit more than regular beanbag."
},
{
"id": "MUZZLE_SMOKE",
"type": "ammo_effect",
"//": "Produces smoke from shooter's tile."
},
{
"id": "NO_CRIT",
"type": "ammo_effect",
"//": "Can't crit. Can still graze."
},
{
"id": "NO_DAMAGE_SCALING",
"type": "ammo_effect",
"//": "Can't crit or graze, all hits have 100% damage modifier from accuracy."
},
{
"id": "NO_EMBED",
"type": "ammo_effect",
"//": "Can't be embedded in critters it hits."
},
{
"id": "NO_OVERSHOOT",
"type": "ammo_effect",
"//": "Trajectory doesn't extend past the target, even on miss."
},
{
"id": "NULL_SOURCE",
"type": "ammo_effect",
"//": "Origin is a fake critter, replace it with null instead of passing a pointer to it."
},
{
"id": "PARALYZEPOISON",
"type": "ammo_effect",
"//": "Applies paralyzing poison to hit critter."
},
{
"id": "SHATTER_SELF",
"type": "ammo_effect",
"//": "Thrown item destroyed on impact, but drops contents. Makes noise."
},
{
"id": "TANGLE",
"type": "ammo_effect",
"//": "Applies tied effect and may be recovered after the critter breaks free."
},
{
"id": "WHIP",
"type": "ammo_effect",
"//": "Scares wildlife hit by it. If user has 5+ melee, applies disarm on some reach attacks."
},
{
"id": "BLACKPOWDER",
"type": "ammo_effect",
"//": "Causes gunk to build up and increase chance to damage gun."
},
{
"id": "RECYCLED",
"type": "ammo_effect",
"//": "Nearly-immeasurable chance to fail to fire."
},
{
"id": "NON-FOULING",
"type": "ammo_effect",
"//": "Doesn't cause gunk to build up."
}
]
172 changes: 172 additions & 0 deletions data/json/ammo_effects_simple.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,172 @@
[
{
"id": "magic",
"type": "ammo_effect",
"//": "Always hits torso, no damage scaling."
},
{
"id": "ACT_ON_RANGED_HIT",
"type": "ammo_effect",
"//": "The item will be processed on the hit tile before (or instead) being dropped."
},
{
"id": "APPLY_SAP",
"type": "ammo_effect",
"//": "Adds sap effect."
},
{
"id": "BEANBAG",
"type": "ammo_effect",
"//": "Stuns weaker creatures."
},
{
"id": "BLACKPOWDER",
"type": "ammo_effect",
"//": "Causes gunk to build up and increase chance to damage gun."
},
{
"id": "BLINDS_EYES",
"type": "ammo_effect",
"//": "Blinds if hits eyes."
},
{
"id": "BOUNCE",
"type": "ammo_effect",
"//": "Bounces to one of visible critters within 4 tiles of hit tile, except for the shooter or critters who were targeted by a bounce this turn. Order of bounces is unspecified, but not random. Reuses projectile and so damage modifiers from being blocked by terrain."
},
{
"id": "BURST",
"type": "ammo_effect",
"//": "Thrown item destroyed on impact, but drops contents."
},
{
"id": "COOKOFF",
"type": "ammo_effect",
"//": "Item flag that is an ammo effect for a misguided reason. Makes ammo explode in fire."
},
{
"id": "CUSTOM_EXPLOSION",
"type": "ammo_effect",
"//": "Copy explosion data from ammo."
},
{
"id": "DRAW_AS_LINE",
"type": "ammo_effect",
"//": "Drawn instantly, without animation."
},
{
"id": "HEAVY_HIT",
"type": "ammo_effect",
"//": "Makes a slightly different, slightly louder sound on drop..."
},
{
"id": "IGNITE",
"type": "ammo_effect",
"//": "Ignites hit creatures."
},
{
"id": "INCENDIARY",
"type": "ammo_effect",
"//": "Causes fires to terrain and critters."
},
{
"id": "JET",
"type": "ammo_effect",
"//": "Will continue going through passable tiles even if its damage is reduced to 0."
},
{
"id": "LARGE_BEANBAG",
"type": "ammo_effect",
"//": "Stuns a bit more than regular beanbag."
},
{
"id": "MUZZLE_SMOKE",
"type": "ammo_effect",
"//": "Produces smoke from shooter's tile."
},
{
"id": "NEVER_MISFIRES",
"type": "ammo_effect",
"//": "Disables misfires."
},
{
"id": "NOGIB",
"type": "ammo_effect",
"//": "Doesn't overkill."
},
{
"id": "NON-FOULING",
"type": "ammo_effect",
"//": "Doesn't cause gunk to build up."
},
{
"id": "NO_CRIT",
"type": "ammo_effect",
"//": "Can't crit. Can still graze."
},
{
"id": "NO_DAMAGE_SCALING",
"type": "ammo_effect",
"//": "Can't crit or graze, all hits have 100% damage modifier from accuracy."
},
{
"id": "NO_EMBED",
"type": "ammo_effect",
"//": "Can't be embedded in critters it hits."
},
{
"id": "NO_ITEM_DAMAGE",
"type": "ammo_effect",
"//": "Doesn't pulp corpses hit by the projectile (overkill corpse damage still applies)"
},
{
"id": "NO_OVERSHOOT",
"type": "ammo_effect",
"//": "Trajectory doesn't extend past the target, even on miss."
},
{
"id": "NO_PENETRATE_OBSTACLES",
"type": "ammo_effect",
"//": "Don't act penetrate obstacles such as fences or reinforced glass"
},
{
"id": "NULL_SOURCE",
"type": "ammo_effect",
"//": "Origin is a fake critter, replace it with null instead of passing a pointer to it."
},
{
"id": "PARALYZEPOISON",
"type": "ammo_effect",
"//": "Applies paralyzing poison to hit critter."
},
{
"id": "RECYCLED",
"type": "ammo_effect",
"//": "Nearly-immeasurable chance to fail to fire."
},
{
"id": "SHATTER_SELF",
"type": "ammo_effect",
"//": "Thrown item destroyed on impact, but drops contents. Makes noise."
},
{
"id": "SHOT",
"type": "ammo_effect",
"//": "Implied WIDE. Doesn't do anything on its own."
},
{
"id": "TANGLE",
"type": "ammo_effect",
"//": "Applies tied effect and may be recovered after the critter breaks free."
},
{
"id": "WHIP",
"type": "ammo_effect",
"//": "Scares wildlife hit by it. If user has 5+ melee, applies disarm on some reach attacks."
},
{
"id": "WIDE",
"type": "ammo_effect",
"//": "Does NOTHING at all. TODO: Make it ignore skeleton smaller ranged size."
}
]
1 change: 1 addition & 0 deletions data/json/field_type.json
Original file line number Diff line number Diff line change
Expand Up @@ -236,6 +236,7 @@
"priority": 4,
"half_life": "30 minutes",
"phase": "plasma",
"stacking_type": "duration",
"display_items": false,
"display_field": true
},
Expand Down
4 changes: 2 additions & 2 deletions data/json/items/ammo/50.json
Original file line number Diff line number Diff line change
Expand Up @@ -61,9 +61,9 @@
"price_postapoc": 7500,
"flags": [ "IRREPLACEABLE_CONSUMABLE" ],
"description": "This variant of the .50 BMG round makes the most of the caliber's potential payload delivery: the tip is loaded with an incendiary mix, which ignites on impact, detonating the RDX or PETN charge. This also ignites a secondary zirconium powder incendiary charge that surrounds a tungsten carbide penetrator, both encased by a mild steel cup. Fragments from the cup and burning metallic powder follow the penetrator through armored targets, increasing lethality. These rare, complicated, and expensive rounds are not likely to be manufactured again; use them wisely.",
"effects": [ "INCENDIARY", "EXPLOSIVE_RAUFOSS" ],
"effects": [ "INCENDIARY", "EXPLOSIVE_BIG" ],
"//": "mk 211 is estimated to be as effective as 20mm, which would have 65kJ energy, or 255 damage. ~181 damage is fair.",
"relative": { "damage": { "damage_type": "stab", "amount": 50, "armor_penetration": 20 } },
"relative": { "damage": { "damage_type": "stab", "amount": 50, "armor_penetration": 25 } },
"dispersion": 100
},
{
Expand Down
2 changes: 1 addition & 1 deletion data/json/items/ammo/shot.json
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,7 @@
"flags": [ "IRREPLACEABLE_CONSUMABLE" ],
"count": 5,
"damage": { "damage_type": "stab", "amount": 10, "armor_penetration": 0 },
"extend": { "effects": [ "EXPLOSIVE_HESHOT" ] }
"extend": { "effects": [ "EXPLOSIVE" ] }
},
{
"id": "shot_scrap",
Expand Down
Loading

0 comments on commit 23334ac

Please sign in to comment.