-
Notifications
You must be signed in to change notification settings - Fork 4.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[RDY] Adds weapon chemical launcher and new fungicidal gas type as ammo #12765
Changes from 1 commit
3780b1a
415cbf0
faebdbc
61a0b72
28c5b0c
401c156
aec4e01
09d4f44
39770ce
0dfd529
efbf03a
c77226d
cfd851c
7324aef
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5428,5 +5428,31 @@ | |
"built_in_mods": ["m203", "rifle_scope", "muzzle_brake"], | ||
"default_mods": ["pistol_grip", "rail_laser_sight"], | ||
"valid_mod_locations": [[ "accessories", 10 ],[ "barrel", 10 ],[ "bore", 10 ],[ "conversion", 10 ],[ "grip", 10 ],[ "magazine", 10 ],[ "mechanism", 10 ],[ "muzzle", 10 ],[ "rail", 10 ],[ "sights", 10 ],[ "stock", 10 ],[ "underbarrel", 10 ]] | ||
}, | ||
{ | ||
"id": "chemical_thrower", | ||
"type": "GUN", | ||
"symbol": "(", | ||
"color": "dark_gray", | ||
"name": "chemical thrower", | ||
"description": "A bulky, self-made chemical sprayer with an internal conversion mechanism that allows all sorts of chemicals to be dispersed to your surroundings.", | ||
"price": 15000, | ||
"material": ["steel", "plastic"], | ||
"flags": ["FIRE_100", "NEVER_JAMS"], | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Fire 100 is quite a lot. With flamethrowers you can acquire the ammo easily by siphoning it from cars. Here you've got to craft every shot. Fire 20 or 50 should be fine, unless you intend to make the gas very powerful. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I thought that one canister filling of 2000 units (so 20 uses) should be enough to eradicate one large patch of fungus. I can't really tell how the gas will spread by only looking at the code though, so I don't know when it would be considered overpowered. This thing shouldn't be the end-all anti-fungus tool. |
||
"skill": "launcher", | ||
"ammo": "gas_fungicidal", | ||
"weight": 1150, | ||
"volume": 25, | ||
"bashing": 9, | ||
"cutting": 0, | ||
"to_hit": -1, | ||
"ranged_damage": -5, | ||
"dispersion": 300, | ||
"sight_dispersion": 150, | ||
"aim_speed" : 0, | ||
"recoil": 0, | ||
"durability": 6, | ||
"clip_size": 2000, | ||
"reload": 900 | ||
} | ||
] |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4435,6 +4435,36 @@ | |
[ "solder_wire", 200 ] | ||
] | ||
] | ||
},{ | ||
"type" : "recipe", | ||
"result": "gas_fungicidal", | ||
"category": "CC_AMMO", | ||
"subcategory": "CSC_AMMO_OTHER", | ||
"skill_used": "cooking", | ||
"skills_required": [ "survival", 2 ], | ||
"difficulty": 4, | ||
"time": 5000, | ||
"reversible": false, | ||
"autolearn": false, | ||
"book_learn": [["textbook_chemistry", 4] , ["adv_chemistry", 4] , [ "recipe_labchem", 4]], | ||
"qualities":[ | ||
{"id":"CHEM","level":1,"amount":1} | ||
], "tools": [ | ||
[ | ||
[ "fire", -1 ], | ||
[ "toolset", 2 ], | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Bump up those numbers a bit. 2 is only enough heat to boil a cup of water. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Ok, didn't really know what that number was supposed to be ^.^ |
||
[ "hotplate", 2 ], | ||
[ "char_smoker", 1 ] | ||
] | ||
], | ||
"components": [ | ||
[ | ||
[ "fungicide", 100 ] | ||
], | ||
[ | ||
[ "sulfur", 10 ] | ||
] | ||
] | ||
} | ||
|
||
|
||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6733,5 +6733,52 @@ | |
["steel_chunk", 4], | ||
["scrap", 12]] | ||
] | ||
}, | ||
{ | ||
"type" : "recipe", | ||
"result": "chemical_thrower", | ||
"category": "CC_WEAPON", | ||
"subcategory": "CSC_WEAPON_RANGED", | ||
"skill_used": "mechanics", | ||
"skills_required": [[ "gun", 3 ], [ "cooking", 3]], | ||
"difficulty": 7, | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. That's quite a lot of requirements there. Early availability is quite important for this kind of stuff, because later on it will be obsoleted by the chain lightning CBM. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Fair point. Never actually got to the point where I had the chain lightning. Althought the biggest argument for making this thing harder to craft is the fact that it will at some point defungify terrain and afaik there is nothing in the game yet, that does that. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Fire does it very cheaply. Digging holes into fungal bed is a work-intensive, but precise method of fixing it. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. :D true There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Still, you can counter a fungal infestation by digging out a small area surrounding your useful stuff and then burning the rest. |
||
"time": 12000, | ||
"reversible": true, | ||
"autolearn": true, | ||
"qualities":[ | ||
{"id":"SAW_M_FINE","level":1,"amount":1}, | ||
{"id":"SCREW_FINE","level":1,"amount":1}, | ||
{"id":"HAMMER","level":2,"amount":1} | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Use 4 spaces rather than tabs. |
||
], | ||
"tools": | ||
[ | ||
[ | ||
["goggles_welding", -1] | ||
], | ||
[ | ||
["oxy_torch", 80], | ||
["welder", 400], | ||
["welder_crude", 550], | ||
["toolset", 550] | ||
], | ||
], "components": [ | ||
[ | ||
[ "pilot_light", 1 ] | ||
], | ||
[ | ||
[ "wrench", 1] | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Is it supposed to consume the wrench for the construction? You probably want it as a tool quality, not something to be consumed. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yeah I got inspired by this http://www.sharpe-art.com/wp-content/uploads/2009/12/ChemicalThrowerLayout.JPG There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Wrenches can be quire valuable here. Since the recipe involves welding, a pipe would be enough here. Also, add a small or tiny metal tank to the recipe. |
||
], | ||
[ | ||
[ "pipe", 1 ] | ||
], | ||
[ | ||
[ "hose", 2 ] | ||
], | ||
[ | ||
[ "steel_lump", 1], | ||
[ "steel_chunk", 4], | ||
[ "scrap", 12] | ||
], | ||
] | ||
} | ||
] |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -323,6 +323,13 @@ void game::init_fields() | |
{"", "", ""}, '&', -1, | ||
{c_white, c_yellow, c_red}, {true, true, true}, {false, false, false}, MINUTES(50), | ||
{0,0,0} | ||
}, | ||
|
||
{ | ||
"fd_fungicidal_gas", | ||
{_("hazy cloud"),_("fungicidal gas"),_("thick fungicidal gas")}, '8', 8, | ||
{c_white, c_ltgray, c_dkgray}, {true, true, false}, {false, true, true}, MINUTES(30), | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. You could also alter the time here. The |
||
{0,0,0} | ||
} | ||
|
||
}; | ||
|
@@ -753,7 +760,7 @@ bool map::process_fields_in_submap( submap *const current_submap, | |
// because the only trap we're checking for is brazier | ||
const auto &ter = map_tile.get_ter_t(); | ||
const auto &frn = map_tile.get_furn_t(); | ||
|
||
const auto &trp = map_tile.get_trap(); | ||
// We've got ter/furn cached, so let's use that | ||
const bool is_sealed = ter_furn_has_flag( ter, frn, TFLAG_SEALED ) && | ||
|
@@ -1004,7 +1011,7 @@ bool map::process_fields_in_submap( submap *const current_submap, | |
// The fire feeds on the ground itself until max density. | ||
time_added += 4 - cur->getFieldDensity(); | ||
smoke += 2; | ||
if( cur->getFieldDensity() > 1 && | ||
if( cur->getFieldDensity() > 1 && | ||
one_in( 200 - cur->getFieldDensity() * 50 ) ) { | ||
destroy( p, true ); | ||
} | ||
|
@@ -1013,7 +1020,7 @@ bool map::process_fields_in_submap( submap *const current_submap, | |
// The fire feeds on the ground itself until max density. | ||
time_added += 5 - cur->getFieldDensity(); | ||
smoke += 2; | ||
if( cur->getFieldDensity() > 1 && | ||
if( cur->getFieldDensity() > 1 && | ||
one_in( 200 - cur->getFieldDensity() * 50 ) ) { | ||
ter_set( p, t_dirt ); | ||
furn_set( p, f_ash ); | ||
|
@@ -1030,7 +1037,7 @@ bool map::process_fields_in_submap( submap *const current_submap, | |
} else { | ||
// Don't fuel raging fires or they'll burn forever | ||
// as they can produce small fires above themselves | ||
int new_density = std::max( cur->getFieldDensity(), | ||
int new_density = std::max( cur->getFieldDensity(), | ||
fire_there->getFieldDensity() ); | ||
// Allow smaller fires to combine | ||
if( new_density < 3 && | ||
|
@@ -1162,7 +1169,7 @@ bool map::process_fields_in_submap( submap *const current_submap, | |
// Our iterator will start at end_i + 1 and increment from there and then wrap around. | ||
// This guarantees it will check all neighbors, starting from a random one | ||
const size_t end_i = (size_t)rng( 0, neighs.size() - 1 ); | ||
for( size_t i = ( end_i + 1 ) % neighs.size(); | ||
for( size_t i = ( end_i + 1 ) % neighs.size(); | ||
i != end_i; i = ( i + 1 ) % neighs.size() ) { | ||
if( one_in( cur->getFieldDensity() * 2 ) ) { | ||
// Skip some processing to save on CPU | ||
|
@@ -1659,6 +1666,11 @@ bool map::process_fields_in_submap( submap *const current_submap, | |
//Legacy Stuff | ||
case fd_rubble: | ||
make_rubble( p ); | ||
break; | ||
|
||
case fd_fungicidal_gas: | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. If you want to de-fungify terrain, it would be in this block |
||
dirty_transparency_cache = true; | ||
spread_gas( cur, p, curtype, 50, 30 ); | ||
break; | ||
|
||
default: | ||
|
@@ -2071,6 +2083,23 @@ void map::player_in_field( player &u ) | |
} | ||
break; | ||
|
||
case fd_fungicidal_gas: | ||
// Fungicidal gas makes you cough. | ||
// Thick fungicidal gas has a chance to poison you. | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. What if you've crossed a fungal threshold like mycus or marloss? Shouldn't it be doing extra damage/poison to you? |
||
{ | ||
bool inhaled = false; | ||
if( cur->getFieldDensity() == 3 && !inside ) { | ||
inhaled = u.add_env_effect("poison", bp_mouth, 5, 30); | ||
} else if( cur->getFieldDensity() == 2 && !inside ) { | ||
inhaled = u.add_env_effect("smoke", bp_mouth, 2, 7); | ||
} | ||
if( inhaled ) { | ||
// player does not know how the npc feels, so no message. | ||
u.add_msg_if_player(m_bad, _("You feel sick from inhaling the %s"), cur->name().c_str()); | ||
} | ||
} | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. You don't do anything with the |
||
break; | ||
|
||
default: | ||
//Suppress warnings | ||
break; | ||
|
@@ -2366,9 +2395,20 @@ void map::monster_in_field( monster &z ) | |
z.moves -= rng( 10 * density, 30 * density ); | ||
dam += rng( 0, 10 * density ); | ||
} | ||
|
||
break; | ||
|
||
case fd_fungicidal_gas: | ||
if( z.type->in_species("FUNGUS") ) { | ||
const int density = cur->getFieldDensity(); | ||
z.moves -= rng( 10 * density, 30 * density ); | ||
dam += rng( 10, 15 * density ); | ||
} | ||
/* const auto &ter = maptile.get_ter_t(); | ||
if( ter == t_fungus ) { | ||
submap.set_ter = t_dirt; | ||
}*/ | ||
break; | ||
|
||
default: | ||
//Suppress warnings | ||
break; | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -86,6 +86,7 @@ enum field_id : int { | |
fd_hot_air2, | ||
fd_hot_air3, | ||
fd_hot_air4, | ||
fd_fungicidal_gas, | ||
num_fields | ||
}; | ||
|
||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3011,7 +3011,7 @@ std::pair<bool, bool> map::bash_ter_furn( const tripoint &p, const int str, | |
if( !sound.empty() && !silent ) { | ||
sounds::sound( p, sound_volume, sound, false, "bash", sound ); | ||
} | ||
|
||
return std::pair<bool, bool>( smashed_something, success ); | ||
} | ||
|
||
|
@@ -3382,6 +3382,10 @@ void map::shoot( const tripoint &p, int &dam, | |
add_field(p, fd_fire, rng(1, 2), 0 ); | ||
} | ||
|
||
if (ammo_effects.count("STREAM_GAS") && !one_in(3)) { | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Something more descriptive would be better. Something like "FUNGICIDAL_STREAM" or "FUNGICIDAL_TRAIL". There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. STREAM_FUNGICIDE, or maybe STREAM_ANTIFUNGAL? |
||
add_field(p, fd_fungicidal_gas, rng(1, 2), 0 ); | ||
} | ||
|
||
if (ammo_effects.count("STREAM_BIG") && !one_in(4)) { | ||
add_field(p, fd_fire, 2, 0 ); | ||
} | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You should probably give it some other material. "null" should be fine.
Hydrocarbons is for stuff that fuels fires really well.