Skip to content

Commit

Permalink
Rework teleglow, nether attention, stare monattack (#1943)
Browse files Browse the repository at this point in the history
* Update player_hardcoded_effects.cpp

* Rework teleglow, nether attention, stare monattack

Suggestion per feedback, spacing fixes

Co-Authored-By: Testudo-Cultu <65055502+Testudo-Cultu@users.noreply.github.com>

* Update snippets.json

Including some taken from Kheir's suggestions on the discord, but also stripping out a couple that fail "show, don't tell"

Co-Authored-By: KheirFerrum <102964889+KheirFerrum@users.noreply.github.com>

* Forgot to save after removing those two, oops

* Updates per feedback

* Suggestions per feedback

* Stylin' doh

* Update player_hardcoded_effects.cpp

* Update player_hardcoded_effects.cpp

* Update character.cpp

* Suggestions per feedback

* Update character.cpp

* Further suggestions per feedback

Co-authored-by: Testudo-Cultu <65055502+Testudo-Cultu@users.noreply.github.com>
Co-authored-by: KheirFerrum <102964889+KheirFerrum@users.noreply.github.com>
  • Loading branch information
3 people authored Oct 30, 2022
1 parent 3293a6a commit 692dc3c
Show file tree
Hide file tree
Showing 6 changed files with 174 additions and 82 deletions.
18 changes: 16 additions & 2 deletions data/json/effects.json
Original file line number Diff line number Diff line change
Expand Up @@ -1193,7 +1193,14 @@
},
{
"type": "effect_type",
"id": "attention"
"id": "attention",
"name": [ "Being Watched" ],
"desc": [ "You can't shake the feeling that something out there is watching you. Something big…" ],
"remove_message": "You no longer feel like you're being watched.",
"rating": "bad",
"max_intensity": 8,
"int_add_val": 1,
"max_duration": "12 h"
},
{
"type": "effect_type",
Expand Down Expand Up @@ -1313,7 +1320,14 @@
},
{
"type": "effect_type",
"id": "teleglow"
"id": "teleglow",
"name": [ "Dimensional Stress" ],
"desc": [ "The fabric of reality currently feels thinner around you." ],
"remove_message": "Reality around you returns to normal, for now.",
"rating": "bad",
"max_intensity": 8,
"int_add_val": 1,
"max_duration": "12 h"
},
{
"type": "effect_type",
Expand Down
17 changes: 17 additions & 0 deletions data/json/snippets/snippets.json
Original file line number Diff line number Diff line change
Expand Up @@ -192,5 +192,22 @@
"text": "This is General Baker. Today I received a top-secret letter with new orders from high command. These orders described a new set of coordinates for our ICBM. My men deciphered it, and it became crystal-clear that coordinates are pointing to a certain place inside our country. I requested re-confirmation, and after a short while I received it with the same coordinates, so it wasn't an weird error as I originally thought. I don't know what's on the minds of these guys in the government, but I'm not gonna bomb innocent people of my country. We're just one step away from starting a war, so failure to comply with an order will obviously result in a execution. And it's just a matter of time when they come for me. So actually I'm already a dead man. Whomever may find this. Please tell my wife Jane I love her and Michael Jr. And tell her I'm sorry. General Michael Baker"
}
]
},
{
"type": "snippet",
"category": "nether_attention_watching",
"text": [
"You feel the weight of your actions on your shoulders.",
"Everything just feels so futile for some reason…",
"For a brief moment, everything just feels WRONG.",
"You are being watched by someone. No, some THING…",
"The whole world seems like just a speck of dust drifting in an infinite void.",
"There's a whole world inside your head, and they want in.",
"You feel empty inside. But that emptiness seems more alive and wondrous than anything that lives.",
"The infinite nothingness out there is inviting you in. You can hear it inside you.",
"Your brain feels like it's squirming inside your skull, like something's straining to get out.",
"The air seems to shift, like something massive just reacted to your presence.",
"Insect. That's what it feels like, like a bug under the magnifying glass of something out there."
]
}
]
6 changes: 6 additions & 0 deletions src/character.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -10593,3 +10593,9 @@ bool Character::can_learn_by_disassembly( const recipe &rec ) const
return !rec.learn_by_disassembly.empty() &&
meets_skill_requirements( rec.learn_by_disassembly );
}

bool has_psy_protection( const Character &c, int partial_chance )
{
return c.has_artifact_with( AEP_PSYSHIELD ) ||
( c.worn_with_flag( "PSYSHIELD_PARTIAL" ) && one_in( partial_chance ) );
}
3 changes: 3 additions & 0 deletions src/character.h
Original file line number Diff line number Diff line change
Expand Up @@ -2244,4 +2244,7 @@ std::map<bodypart_id, int> wind_resistance_from_clothing(
const std::map<bodypart_id, std::vector<const item *>> &clothing_map );
} // namespace warmth

/** Returns true if the player has a psyshield artifact, or sometimes if wearing tinfoil */
bool has_psy_protection( const Character &c, int partial_chance );

#endif // CATA_SRC_CHARACTER_H
7 changes: 3 additions & 4 deletions src/monattack.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,7 @@ static const ammo_effect_str_id ammo_effect_APPLY_SAP( "APPLY_SAP" );

static const efftype_id effect_ai_controlled( "ai_controlled" );
static const efftype_id effect_assisted( "assisted" );
static const efftype_id effect_attention( "attention" );
static const efftype_id effect_bite( "bite" );
static const efftype_id effect_bleed( "bleed" );
static const efftype_id effect_blind( "blind" );
Expand Down Expand Up @@ -120,7 +121,6 @@ static const efftype_id effect_shrieking( "shrieking" );
static const efftype_id effect_slimed( "slimed" );
static const efftype_id effect_stunned( "stunned" );
static const efftype_id effect_targeted( "targeted" );
static const efftype_id effect_teleglow( "teleglow" );
static const efftype_id effect_under_op( "under_operation" );

static const itype_id itype_ant_egg( "ant_egg" );
Expand Down Expand Up @@ -2885,7 +2885,7 @@ bool mattack::stare( monster *z )
} else {
add_msg( m_bad, _( "You feel like you're being watched, it makes you sick." ) );
}
g->u.add_effect( effect_teleglow, 80_minutes );
g->u.add_effect( effect_attention, 80_minutes );
}

return true;
Expand All @@ -2903,8 +2903,7 @@ bool mattack::fear_paralyze( monster *z )
}

if( g->u.sees( *z ) && !g->u.has_effect( effect_fearparalyze ) ) {
if( g->u.has_artifact_with( AEP_PSYSHIELD ) || ( g->u.worn_with_flag( "PSYSHIELD_PARTIAL" ) &&
one_in( 4 ) ) ) {
if( has_psy_protection( get_player_character(), 4 ) ) {
add_msg( _( "The %s probes your mind, but is rebuffed!" ), z->name() );
///\EFFECT_INT decreases chance of being paralyzed by fear attack
} else if( rng( 0, 20 ) > g->u.get_int() ) {
Expand Down
Loading

0 comments on commit 692dc3c

Please sign in to comment.