MCPcopy Create free account
hub / github.com/NetHack/NetHack / seffect_teleportation

Function seffect_teleportation

src/read.c:2014–2032  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2012}
2013
2014staticfn void
2015seffect_teleportation(struct obj **sobjp)
2016{
2017 struct obj *sobj = *sobjp;
2018 boolean scursed = sobj->cursed;
2019 boolean confused = (Confusion != 0);
2020
2021 if (confused || scursed) {
2022 level_tele();
2023 /* gives "materialize on different/same level!" message, must
2024 be a teleport scroll */
2025 gk.known = TRUE;
2026 } else {
2027 scrolltele(sobj);
2028 /* this will call learnscroll() as appropriate, and has results
2029 which maybe shouldn't result in the scroll becoming known;
2030 either way, no need to set gk.known here */
2031 }
2032}
2033
2034staticfn void
2035seffect_gold_detection(struct obj **sobjp)

Callers 1

seffectsFunction · 0.85

Calls 2

level_teleFunction · 0.85
scrollteleFunction · 0.85

Tested by

no test coverage detected