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UZV6FWYDRFWLQK26QC
CQ24AVAI6SW3AHTIDMLPSTRRBEU6FHRF5I5FD6G5QIYE6PO4BQMQC
<< "'<magenta>). You can read it by typing <w>r<magenta>, "
"memorise spells via <w>M<magenta> and cast a memorised "
"spell with <w>Z<magenta>.";
<< "'<magenta>) that you can read by typing <w>r<magenta>. "
"If it's a spellbook you'll then be able to memorise "
"spells via <w>M<magenta> and cast a memorised spell with "
"<w>Z<magenta>.";
if (you.religion == GOD_TROG)
{
more();
text << "\n\nAs a worshipper of "
<< god_name(GOD_TROG)
<< ", though, you might instead wish to burn this tome of "
"hated magic by using the corresponding "
"<w>a<magenta>bility.";
}
text << "\nDuring the tutorial you can reread this information at "
"any time by <w>v<magenta>iewing the item in question.";
"Use <w>w<magenta> to wield it, but be aware that this weapon "
"might train a different skill from your current one. You can "
"view the weapon's properties with <w>v<magenta>.";
"Use <w>w<magenta> to wield it, but be aware that this weapon "
"might train a different skill from your current one. You can "
"view the weapon's properties with <w>v<magenta>.";
case DNGN_CLOSED_DOOR:
ostr << "You can open it by walking into it.";
Options.tutorial_events[TUT_SEEN_DOOR];
break;
case DNGN_OPEN_DOOR:
ostr << "You can close an open door if you stand next to it while "
"the doorway's empty, and then press <w>c<magenta> followed "
"by the direction of the door.";
Options.tutorial_events[TUT_SEEN_DOOR];
break;
if (you.level_type == LEVEL_DUNGEON && level_diff >= 0)
if (mons_is_unique(mons->type))
{
ostr << "Did you think you were the only adventurer in the dungeon? "
"Well, you thought wrong! These unique adversaries often "
"possess skills that normal monster wouldn't, so be careful.";
}
else if(mons->type == MONS_PLAYER_GHOST)
{
ostr << "The ghost of a deceased adventurer, it would like nothing "
"better than to send you the same way.";
}
else
ostr << "This kind of monster is usually only encountered "
<< (level_diff > 5 ? "much " : "")
<< "deeper in the dungeon, so it's probably "
<< (level_diff > 5 ? "extremely" : "very")
<< " dangerous!\n\n";
int level_diff
= mons_level(mons->type) - (you.your_level + Options.ood_interesting);
if (you.level_type == LEVEL_DUNGEON && level_diff >= 0)
{
ostr << "This kind of monster is usually only encountered "
<< (level_diff > 5 ? "much " : "")
<< "deeper in the dungeon, so it's probably "
<< (level_diff > 5 ? "extremely" : "very")
<< " dangerous!\n\n";
}
return false;
}
bool gives_resistance( const item_def &item )
{
if (!item_type_known(item))
return false;
switch (item.base_type)
{
case OBJ_WEAPONS:
{
// unwielded weapon
item_def *weap = you.slot_item(EQ_WEAPON);
if (!weap || (*weap).slot != item.slot)
return false;
break;
}
case OBJ_JEWELLERY:
{
if (item.sub_type < NUM_RINGS)
{
// unworn ring
item_def *lring = you.slot_item(EQ_LEFT_RING);
item_def *rring = you.slot_item(EQ_RIGHT_RING);
if ((!lring || (*lring).slot != item.slot)
&& (!rring || (*rring).slot != item.slot))
{
return false;
}
if (item.sub_type >= RING_PROTECTION_FROM_FIRE
&& item.sub_type <= RING_PROTECTION_FROM_COLD
|| item.sub_type == RING_SEE_INVISIBLE
|| item.sub_type >= RING_LIFE_PROTECTION
&& item.sub_type <= RING_TELEPORT_CONTROL
|| item.sub_type == RING_TELEPORTATION
|| item.sub_type == RING_SUSTAIN_ABILITIES)
{
return true;
}
}
else
{
// unworn amulet
item_def *amul = you.slot_item(EQ_AMULET);
if (!amul || (*amul).slot != item.slot)
return false;
if (item.sub_type != AMU_RAGE && item.sub_type != AMU_INACCURACY)
return true;
}
break;
}
case OBJ_ARMOUR:
{
const equipment_type eq = get_armour_slot(item);
if (eq == EQ_NONE)
return false;
// unworn armour
item_def *arm = you.slot_item(eq);
if (!arm || (*arm).slot != item.slot)
return false;
break;
const int ego = get_armour_ego_type( item );
if (ego >= SPARM_FIRE_RESISTANCE && ego <= SPARM_SEE_INVISIBLE
|| ego == SPARM_RESISTANCE || ego == SPARM_POSITIVE_ENERGY)
{
return true;
}
}
case OBJ_STAVES:
{
// unwielded weapon
item_def *weap = you.slot_item(EQ_WEAPON);
if (!weap || (*weap).slot != item.slot)
return false;
if (item.sub_type >= STAFF_FIRE && item.sub_type <= STAFF_POISON
|| item.sub_type == STAFF_AIR)
{
return true;
}
return false;
}
default:
return false;
}
if (!is_random_artefact(item))
return false;
// check for randart resistances
for (int rap = RAP_FIRE; rap <= RAP_CAN_TELEPORT; rap++)
{
if (rap == RAP_MAGIC || rap >= RAP_INVISIBLE && rap != RAP_CAN_TELEPORT)
continue;
if (randart_wpn_property( item, rap ))
return true;
}
if ( isalpha(select) )
{
const int invidx = letter_to_index(select);
if ( is_valid_item(you.inv[invidx]) )
describe_item( you.inv[invidx], true );
}
if ( isalpha(select) )
{
const int invidx = letter_to_index(select);
if ( is_valid_item(you.inv[invidx]) )
describe_item( you.inv[invidx], true );
}
else break;
}