Skip to content

Commit

Permalink
Jsonize field effects for relax gas
Browse files Browse the repository at this point in the history
  • Loading branch information
ZhilkinSerg committed Nov 22, 2019
1 parent b518e05 commit e26ed36
Show file tree
Hide file tree
Showing 2 changed files with 45 additions and 8 deletions.
48 changes: 45 additions & 3 deletions data/json/field_type.json
Original file line number Diff line number Diff line change
Expand Up @@ -733,9 +733,51 @@
"type": "field_type",
"legacy_enum_id": 39,
"intensity_levels": [
{ "name": "hazy cloud", "sym": ".", "dangerous": true, "translucency": 5 },
{ "name": "sedative gas", "color": "pink" },
{ "name": "relaxation gas", "color": "cyan" }
{
"name": "hazy cloud",
"sym": ".",
"dangerous": true,
"translucency": 5,
"effects": [
{
"effect_id": "relax_gas",
"body_part": "MOUTH",
"intensity": 2,
"min_duration": "3 seconds",
"max_duration": "3 seconds",
"chance_outside_vehicle": 3,
"immune_inside_vehicle": true
}
]
},
{
"name": "sedative gas",
"color": "pink",
"effects": [
{
"effect_id": "relax_gas",
"body_part": "MOUTH",
"intensity": 4,
"min_duration": "3 seconds",
"max_duration": "3 seconds",
"chance_inside_vehicle": 3
}
]
},
{
"name": "relaxation gas",
"color": "cyan",
"effects": [
{
"effect_id": "relax_gas",
"body_part": "MOUTH",
"intensity": 6,
"min_duration": "3 seconds",
"max_duration": "3 seconds",
"chance_inside_vehicle": 3
}
]
}
],
"decay_amount_factor": 5,
"gas_absorption_factor": 15,
Expand Down
5 changes: 0 additions & 5 deletions src/map_field.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1524,11 +1524,6 @@ void map::player_in_field( player &u )
u.add_env_effect( effect_blind, bp_eyes, cur.get_field_intensity() * 2, 10_seconds );
}
}
if( ft == fd_relax_gas ) {
if( ( cur.get_field_intensity() > 1 || !one_in( 3 ) ) && ( !inside || one_in( 3 ) ) ) {
u.add_env_effect( effect_relax_gas, bp_mouth, cur.get_field_intensity() * 2, 3_turns );
}
}
if( ft == fd_fungal_haze ) {
if( !u.has_trait( trait_id( "M_IMMUNE" ) ) && ( !inside || one_in( 4 ) ) ) {
u.add_env_effect( effect_fungus, bp_mouth, 4, 10_minutes, num_bp, true );
Expand Down

0 comments on commit e26ed36

Please sign in to comment.