Skip to content

Commit

Permalink
Aftershock: Translocators (CleverRaven#50622)
Browse files Browse the repository at this point in the history
  • Loading branch information
John-Candlebury authored and satheon49 committed Aug 14, 2021
1 parent 2da59bf commit b00b760
Show file tree
Hide file tree
Showing 12 changed files with 250 additions and 7 deletions.
18 changes: 18 additions & 0 deletions data/mods/Aftershock/itemgroups/bionics_groups.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
[ "afs_bio_dopamine_stimulators", 10 ],
[ "afs_bio_neurosoft_aeronautics", 5 ],
[ "bio_forcefield_bash_cut_weak", 25 ],
[ "afs_bio_translocator", 5 ],
[ "afs_bio_skullgun", 5 ]
]
},
Expand All @@ -28,6 +29,7 @@
[ "bio_forcefield_bash_cut_heavy", 3 ],
[ "bio_forcefield_ballistic_weak", 10 ],
[ "bio_forcefield_ballistic_medium", 10 ],
[ "afs_bio_translocator", 5 ],
[ "afs_bio_skullgun", 2 ]
]
},
Expand All @@ -47,6 +49,22 @@
[ "afs_bio_neurosoft_aeronautics", 10 ],
[ "afs_bio_dopamine_stimulators", 10 ],
[ "bio_forcefield_ballistic_heavy", 1 ],
[ "afs_bio_translocator", 5 ],
[ "afs_bio_skullgun", 2 ]
]
},
{
"type": "item_group",
"id": "nanofab_recipes",
"items": [
[ "bn_bio_solar", 15 ],
[ "afs_bio_wind_turbine", 10 ],
[ "afs_bio_missiles", 10 ],
[ "afs_bio_melee_counteraction", 10 ],
[ "afs_bio_melee_optimization_unit", 10 ],
[ "afs_bio_neurosoft_aeronautics", 10 ],
[ "afs_bio_dopamine_stimulators", 10 ],
[ "afs_bio_translocator", 5 ],
[ "afs_bio_skullgun", 2 ]
]
},
Expand Down
7 changes: 7 additions & 0 deletions data/mods/Aftershock/itemgroups/clothing/military_gear.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
[
{
"type": "item_group",
"id": "afs_experimental_combat_gear",
"items": [ [ "afs_recall_rig", 10 ] ]
}
]
6 changes: 6 additions & 0 deletions data/mods/Aftershock/itemgroups/item_groups.json
Original file line number Diff line number Diff line change
Expand Up @@ -361,6 +361,12 @@
[ "seed_coconut", 20 ]
]
},
{
"type": "item_group",
"id": "nanofab_recipes",
"subtype": "distribution",
"entries": [ { "item": "afs_archeotech_cartridge", "prob": 10 }, { "item": "afs_translocation_device", "prob": 10 } ]
},
{
"id": "SUS_scuba_gear",
"type": "item_group",
Expand Down
19 changes: 19 additions & 0 deletions data/mods/Aftershock/items/armor.json
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,25 @@
"relic_data": { "passive_effects": [ { "has": "WORN", "condition": "ALWAYS", "values": [ { "value": "BONUS_DODGE", "add": 1 } ] } ] },
"armor": [ { "encumbrance": 4, "coverage": 85, "covers": [ "torso", "head", "arm_l", "arm_r", "leg_l", "leg_r" ] } ]
},
{
"id": "afs_wrist_computer",
"type": "TOOL_ARMOR",
"category": "armor",
"name": { "str": "IX-2110 computer" },
"description": "The original Imagos IX-2110, a general use wrist computer originally designed to support operations within hazardous environments. Among the most successful pieces of technology ever created, millions of these were produced and sold to the explorers, colonists and that first tamed the stars during the early Hyperspace Era. By now more than 400 years old, making it boot successfully would be a small adventure all of its own.",
"weight": "315 g",
"volume": "1200 ml",
"price": "20 USD",
"to_hit": -1,
"material": [ "steel", "plastic" ],
"symbol": "[",
"color": "light_gray",
"sided": true,
"armor": [ { "encumbrance": 10, "coverage": 45, "covers": [ "arm_l", "arm_r" ] } ],
"warmth": 10,
"material_thickness": 2,
"flags": [ "BELTED", "STURDY", "WATER_FRIENDLY" ]
},
{
"id": "xl_jeans",
"type": "ARMOR",
Expand Down
41 changes: 41 additions & 0 deletions data/mods/Aftershock/items/cast_spell_items.json
Original file line number Diff line number Diff line change
Expand Up @@ -54,5 +54,46 @@
"pocket_data": [ { "pocket_type": "MAGAZINE", "ammo_restriction": { "battery": 1 } } ],
"use_action": { "type": "cast_spell", "spell_id": "afs_holo_field", "no_fail": true, "level": 1 },
"relic_data": { "charge_info": { "regenerate_ammo": true, "recharge_type": "periodic", "time": "1 h" } }
},
{
"id": "afs_recall_rig",
"type": "TOOL_ARMOR",
"copy-from": "dimensional_anchor",
"name": { "str": "recall rig" },
"description": "A complex antennae assembly worn around the upper torso that allows its user to home and teleport towards previously configured teleport pads. Although relatively functional, its much inferior to the translocation systems of old, and a successful teleport requires standing perfectly still for several minutes.",
"charges_per_use": 1000,
"pocket_data": [
{
"pocket_type": "MAGAZINE_WELL",
"max_contains_volume": "20 L",
"max_contains_weight": "20 kg",
"magazine_well": "75 ml",
"item_restriction": [ "heavy_atomic_battery_cell", "heavy_battery_cell", "heavy_plus_battery_cell" ]
}
],
"use_action": { "type": "cast_spell", "spell_id": "afs_translocation_slow", "no_fail": true, "level": 1 }
},
{
"id": "afs_translocation_device",
"type": "TOOL_ARMOR",
"name": { "str": "translocator" },
"copy-from": "afs_wrist_computer",
"description": "An arcane device from the late Hyperspace Era, vaguely resembling a wrist computer made from malleable glass. It can be activated to quickly deploy a translocator buoy or to teleport to previously activated buoys.",
"price": "100 kUSD",
"charges_per_use": 1000,
"material": [ "diamond" ],
"use_action": [
{ "type": "cast_spell", "spell_id": "afs_translocation", "no_fail": true, "level": 1, "need_worn": true },
{ "type": "deploy_furn", "furn_type": "f_translocator_buoy" }
],
"pocket_data": [
{
"pocket_type": "MAGAZINE_WELL",
"max_contains_volume": "20 L",
"max_contains_weight": "20 kg",
"magazine_well": "75 ml",
"item_restriction": [ "afs_archeotech_cartridge" ]
}
]
}
]
9 changes: 9 additions & 0 deletions data/mods/Aftershock/items/cbms.json
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,15 @@
"price_postapoc": 1500,
"difficulty": 16
},
{
"id": "afs_bio_translocator",
"copy-from": "bionic_general",
"type": "BIONIC_ITEM",
"name": { "str": "Implanted translocator CBM" },
"description": "An experimental teleportation system carefully weaved into bone marrow and coiled alongside the skeletal system. It allows its user to safely and readily teleport towards a previously activated telepad.",
"price": "30 kUSD",
"difficulty": 16
},
{
"id": "bio_cold_absorber",
"copy-from": "bionic_general",
Expand Down
49 changes: 49 additions & 0 deletions data/mods/Aftershock/maps/furniture.json
Original file line number Diff line number Diff line change
Expand Up @@ -409,6 +409,55 @@
]
}
},
{
"type": "furniture",
"id": "f_translocator_buoy",
"name": "translocator buoy",
"looks_like": "fd_fatigue",
"move_cost_mod": 0,
"description": "A near undetectable spatial distortion field centered around a free floating golden mote. Examining it from up close would let you encode it for use with a translocation device.",
"symbol": ",",
"color": "yellow",
"required_str": -1,
"flags": [ "TRANSPARENT", "TRANSLOCATOR", "ALLOW_FIELD_EFFECT" ],
"examine_action": "translocator",
"bash": { "str_min": 0, "str_max": 1, "sound": "a faint echo.", "sound_fail": "a faint echo." }
},
{
"type": "furniture",
"id": "f_afs_telepad",
"name": "telepad",
"looks_like": "t_metal_floor",
"move_cost_mod": 0,
"description": "A smooth tile of metal, hiding beneath it the complex machinery of a translocator. The engineering required to build these is poorly understood nowadays, so this one has likely been here since the Hyperspace Era. Examining it from up close would let you encode it for use with a translocation device.",
"symbol": ",",
"color": "yellow",
"required_str": -1,
"flags": [ "TRANSPARENT", "TRANSLOCATOR", "ALLOW_FIELD_EFFECT" ],
"examine_action": "translocator",
"bash": {
"str_min": 16,
"str_max": 40,
"sound": "metal screeching!",
"sound_fail": "clang!",
"items": [
{ "item": "sheet_metal_small", "count": [ 1, 4 ] },
{ "item": "scrap", "count": [ 2, 4 ] },
{ "item": "steel_chunk", "count": [ 2, 6 ] },
{ "item": "scrap_copper", "count": [ 4, 6 ] },
{ "item": "cable", "charges": [ 5, 15 ] },
{ "item": "afs_circuitry_1", "count": [ 0, 2 ] },
{ "item": "afs_circuitry_2", "count": [ 0, 2 ], "prob": 50 },
{ "item": "afs_energy_storage_2", "count": [ 0, 1 ] },
{ "item": "afs_energy_storage_3", "count": [ 0, 1 ] },
{ "item": "afs_heat_2_salvage", "count": [ 0, 2 ] },
{ "item": "afs_cloth_4", "count": [ 0, 1 ] },
{ "item": "afs_heat_3", "count": [ 0, 1 ] },
{ "item": "e_scrap", "count": [ 0, 4 ] },
{ "item": "power_supply", "count": [ 0, 3 ] }
]
}
},
{
"type": "furniture",
"id": "f_neuralnet_inserter",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,8 @@
[ "formless_ruins_empty4", 10 ],
[ "formless_ruins_cryoroom", 10 ],
[ "formless_ruins_armory", 10 ],
[ "formless_ruins_sleeping_room", 10 ]
[ "formless_ruins_sleeping_room", 10 ],
[ "formless_ruins_telepad", 5 ]
]
}
},
Expand Down Expand Up @@ -142,7 +143,8 @@
[ "formless_ruins_empty4", 10 ],
[ "formless_ruins_cryoroom", 10 ],
[ "formless_ruins_armory", 10 ],
[ "formless_ruins_sleeping_room", 10 ]
[ "formless_ruins_sleeping_room", 10 ],
[ "formless_ruins_telepad", 5 ]
]
}
},
Expand Down Expand Up @@ -741,6 +743,41 @@
"palettes": [ "afs_formless_ruins" ]
}
},
{
"type": "mapgen",
"method": "json",
"nested_mapgen_id": "formless_ruins_telepad",
"object": {
"mapgensize": [ 12, 12 ],
"rows": [
"/ ..////",
"/. ......../",
"/.///3////C/",
"///.........",
"/C. ooo#/",
"/ .. ....--",
"/W .......1-",
"/W ......T-",
"/W. ......1-",
"//C.......--",
"##/ooooo///.",
"///.. // "
],
"terrain": { "C": "t_metal_floor", "W": "t_metal_floor", "T": "t_metal_floor", "1": "t_machinery_heavy" },
"furniture": { "C": "f_counter", "W": "f_rack", "T": "f_afs_telepad" },
"items": {
"W": [
{ "item": "afs_experimental_combat_gear", "chance": 10, "repeat": [ 1, 2 ] },
{ "item": "afs_general_armory", "chance": 50, "repeat": [ 1, 2 ] }
],
"C": [
{ "item": "afs_robotics_scrapgroup", "chance": 20, "repeat": [ 1, 2 ] },
{ "item": "afs_machinery_maintenance_scrapgroup", "chance": 10, "repeat": [ 1, 2 ] }
]
},
"palettes": [ "afs_formless_ruins" ]
}
},
{
"type": "mapgen",
"method": "json",
Expand All @@ -754,11 +791,11 @@
"// ///...../",
"/C. / .CC.#/",
"/ ../M...../",
"/ .//33ooo/",
"/ /... M/",
". .//33ooo/",
". ...... M/",
"/.. /WWWWWW/",
"//..////////",
"##/... /.. ",
"//..///..../",
"##/... ... ",
"///.. // "
],
"terrain": { "C": "t_metal_floor", "W": "t_metal_floor" },
Expand Down
10 changes: 10 additions & 0 deletions data/mods/Aftershock/player/bionics.json
Original file line number Diff line number Diff line change
Expand Up @@ -151,6 +151,16 @@
"occupied_bodyparts": [ [ "head", 2 ] ],
"learned_proficiencies": [ "prof_helicopter_pilot" ]
},
{
"id": "afs_bio_translocator",
"type": "bionic",
"name": { "str": "Implanted translocator CBM" },
"description": "An experimental teleportation system carefully weaved into bone marrow and alongside your skeletal system. Allows you to safely and readily teleport toward previously activated telepads.",
"occupied_bodyparts": [ [ "torso", 10 ], [ "head", 2 ], [ "arm_l", 3 ], [ "arm_r", 3 ], [ "leg_l", 3 ], [ "leg_r", 3 ] ],
"act_cost": "12 kJ",
"spell_on_activation": { "id": "afs_translocation", "hit_self": true },
"time": 5
},
{
"id": "afs_bio_cranialbomb",
"type": "bionic",
Expand Down
15 changes: 15 additions & 0 deletions data/mods/Aftershock/recipes/armor_recipes.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,5 +12,20 @@
"reversible": true,
"using": [ [ "sewing_standard", 14 ] ],
"components": [ [ [ "afs_scrap_titanium", 8 ] ], [ [ "rag", 6 ] ] ]
},
{
"result": "afs_recall_rig",
"type": "recipe",
"activity_level": "fake",
"category": "CC_ARMOR",
"subcategory": "CSC_ARMOR_OTHER",
"skill_used": "electronics",
"difficulty": 7,
"skills_required": [ "chemistry", 6 ],
"autolearn": true,
"time": "6 h",
"qualities": [ { "id": "SCREW_FINE", "level": 1 } ],
"using": [ [ "soldering_standard", 10 ], [ "strap_small", 1 ], [ "clasps", 3 ] ],
"components": [ [ [ "afs_circuitry_3", 3 ] ], [ [ "afs_energy_storage_3", 1 ] ], [ [ "afs_cloth_4", 1 ] ] ]
}
]
32 changes: 32 additions & 0 deletions data/mods/Aftershock/spells/teleport_spells.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
[
{
"id": "afs_translocation",
"type": "SPELL",
"name": "Translocation",
"description": "Translocates the user to an encoded buoy.",
"valid_targets": [ "self" ],
"effect": "translocate",
"shape": "blast",
"difficulty": 10,
"max_level": 25,
"base_casting_time": 200,
"base_energy_cost": 500,
"energy_source": "BIONIC",
"spell_class": "NONE"
},
{
"id": "afs_translocation_slow",
"type": "SPELL",
"name": "Translocation",
"description": "Slowly translocates the user to an encoded buoy.",
"valid_targets": [ "self" ],
"effect": "translocate",
"shape": "blast",
"difficulty": 10,
"max_level": 25,
"base_casting_time": 2400,
"base_energy_cost": 500,
"energy_source": "BIONIC",
"spell_class": "NONE"
}
]
2 changes: 1 addition & 1 deletion src/iuse_actor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1092,7 +1092,7 @@ cata::optional<int> deploy_furn_actor::use( player &p, item &it, bool, const tri
here.furn_set( pnt, furn_type );
it.spill_contents( pnt );
p.mod_moves( -to_moves<int>( 2_seconds ) );
return 1;
return it.type->charges_to_use() != 0 ? it.type->charges_to_use() : 1;
}

std::unique_ptr<iuse_actor> reveal_map_actor::clone() const
Expand Down

0 comments on commit b00b760

Please sign in to comment.