Skip to content

Commit a2f0807

Browse files
[Mods] Add TRUE_SEEING flag, apply to MoM's Clarity power (#82495)
* True seeing * Update Clarity spoiler * Update src/creature.cpp Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> --------- Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
1 parent d0a960c commit a2f0807

File tree

5 files changed

+14
-5
lines changed

5 files changed

+14
-5
lines changed

data/json/flags.json

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2579,6 +2579,11 @@
25792579
"type": "json_flag",
25802580
"info": "The character is liked by natural animals."
25812581
},
2582+
{
2583+
"id": "TRUE_SEEING",
2584+
"type": "json_flag",
2585+
"info": "The character can see through CAMOUFLAGE, NIGHT_INVISIBILITY, or the invisibility effect."
2586+
},
25822587
{
25832588
"id": "ANIMALEMPATH2",
25842589
"type": "json_flag",

data/mods/MindOverMatter/PowerDescriptionSpoilers.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -393,7 +393,7 @@ This is natural painkiller and so has natural effects (reduces speed slightly)<b
393393
*Duration*: 2 minutes and 30 seconds to 7 minutes and 30 seconds, plus 12 seconds to 25 seconds per level<br />
394394
*Stamina Cost*: 8000, minus 150 per level to a minimum of 4500<br />
395395
*Channeling Time*: 75 moves, minus 3.5 moves per level to a minimum of 25<br />
396-
*Effects*: The psion prevents anything from interfering with their senses, becoming immune to being Dazed, Stunned (either physically or psionically), blinded, made to hallucinate, deafened, Blinding Venom, and also cannot get high or drunk.<br />
396+
*Effects*: The psion prevents anything from interfering with their senses, becoming immune to being Dazed, Stunned (either physically or psionically), blinded, made to hallucinate, deafened, Blinding Venom, and also cannot get high or drunk. In addition, the psion can see creatures that are supernaturally hard to perceive. This does not stop enemy telepaths from hiding their presence.<br />
397397
*Prerequisites*: Night Eyes 10, Speed Reader 8 *or* Aura Sight 8 *or* Combat Sense 5<br />
398398
</details>
399399
<details>

data/mods/MindOverMatter/effects/effects_psionic.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1319,7 +1319,8 @@
13191319
"glare",
13201320
"snow_glare",
13211321
"venom_blind"
1322-
]
1322+
],
1323+
"flags": [ "TRUE_SEEING" ]
13231324
},
13241325
{
13251326
"type": "effect_type",

doc/JSON/JSON_FLAGS.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -452,6 +452,7 @@ Character flags can be `trait_id`, `json_flag_id` or `flag_id`. Some of these a
452452
- ```THERMOMETER``` You always know what temperature it is.
453453
- ```TINY``` Changes your size to `creature_size::tiny`. Checked first of the size category flags.
454454
- ```TREE_COMMUNION_PLUS``` Gain greatly enhanced effects from the Mycorrhizal Communion mutation.
455+
- ```TRUE_SEEING``` - You can see creatures normally even if they have the `CAMOUFLAGE` or `NIGHT_INVISIBILITY` flags or the `invisibility` effect
455456
- ```VINE_RAPPEL``` You can rappel down staircases and sheer drops of any height.
456457
- ```WALK_UNDERWATER``` your stamina burn is not increased when you swim, emulating you walking on the water bottom.
457458
- ```WALL_CLING``` You can ascend/descend sheer cliffs as long as the tile above borders at least one wall. Chance to slip and fall each step.

src/creature.cpp

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -139,6 +139,7 @@ static const json_character_flag json_flag_IGNORE_TEMP( "IGNORE_TEMP" );
139139
static const json_character_flag json_flag_LIMB_LOWER( "LIMB_LOWER" );
140140
static const json_character_flag json_flag_LIMB_UPPER( "LIMB_UPPER" );
141141
static const json_character_flag json_flag_TEEPSHIELD( "TEEPSHIELD" );
142+
static const json_character_flag json_flag_TRUE_SEEING( "TRUE_SEEING" );
142143

143144
static const material_id material_cotton( "cotton" );
144145
static const material_id material_flesh( "flesh" );
@@ -572,16 +573,17 @@ bool Creature::sees( const map &here, const Creature &critter ) const
572573

573574
if( ( target_range > 2 && critter.digging() &&
574575
here.has_flag( ter_furn_flag::TFLAG_DIGGABLE, critter_pos ) ) ||
575-
( critter.has_flag( mon_flag_CAMOUFLAGE ) && target_range > this->get_eff_per() ) ||
576+
( !has_flag( json_flag_TRUE_SEEING ) && critter.has_flag( mon_flag_CAMOUFLAGE ) &&
577+
target_range > this->get_eff_per() ) ||
576578
( critter.has_flag( mon_flag_WATER_CAMOUFLAGE ) &&
577579
target_range > this->get_eff_per() &&
578580
( critter.is_likely_underwater( here ) ||
579581
here.has_flag( ter_furn_flag::TFLAG_DEEP_WATER, critter_pos ) ||
580582
( here.has_flag( ter_furn_flag::TFLAG_SHALLOW_WATER, critter_pos ) &&
581583
critter.get_size() < creature_size::medium ) ) ) ||
582-
( critter.has_flag( mon_flag_NIGHT_INVISIBILITY ) &&
584+
( !has_flag( json_flag_TRUE_SEEING ) && critter.has_flag( mon_flag_NIGHT_INVISIBILITY ) &&
583585
here.light_at( critter_pos ) <= lit_level::LOW ) ||
584-
critter.has_effect( effect_invisibility ) ||
586+
( !has_flag( json_flag_TRUE_SEEING ) && critter.has_effect( effect_invisibility ) ) ||
585587
( !is_likely_underwater( here ) && critter.is_likely_underwater( here ) &&
586588
majority_rule( critter.has_flag( mon_flag_WATER_CAMOUFLAGE ),
587589
here.has_flag( ter_furn_flag::TFLAG_DEEP_WATER, critter_pos ),

0 commit comments

Comments
 (0)