diff options
Diffstat (limited to 'src/spells2.cc')
-rw-r--r-- | src/spells2.cc | 988 |
1 files changed, 0 insertions, 988 deletions
diff --git a/src/spells2.cc b/src/spells2.cc index 2eb8889b..e0f0512e 100644 --- a/src/spells2.cc +++ b/src/spells2.cc @@ -789,994 +789,6 @@ bool_ alchemy(void) /* Turns an object into gold, gain some of its value in a sh - -/* - * self-knowledge... idea from nethack. Useful for determining powers and - * resistances of items. It saves the screen, clears it, then starts listing - * attributes, a screenful at a time. (There are a LOT of attributes to - * list. It will probably take 2 or 3 screens for a powerful character whose - * using several artifacts...) -CFT - * - * It is now a lot more efficient. -BEN- - * - * See also "identify_fully()". - * - * XXX XXX XXX Use the "show_file()" method, perhaps. - */ -void self_knowledge(FILE *fff) -{ - auto const &r_info = game->edit_data.r_info; - - int i = 0, j, k; - - int iter; /* Iterator for a loop */ - - object_type *o_ptr; - - char Dummy[80]; - - cptr info[200]; - - strcpy (Dummy, ""); - - /* Acquire item flags from equipment */ - auto flags = object_flag_set(); - for (k = INVEN_WIELD; k < INVEN_TOTAL; k++) - { - o_ptr = &p_ptr->inventory[k]; - - /* Skip non-objects */ - if (!o_ptr->k_idx) continue; - - /* Extract the flags */ - flags |= object_flags(o_ptr); - } - - if (death) - { - static char buf[250]; - - sprintf(buf, "You are dead, killed by %s %s.", - died_from, describe_player_location().c_str()); - info[i++] = buf; - } - - /* Racial powers... */ - if (p_ptr->body_monster != 0) - { - auto r_ptr = &r_info[p_ptr->body_monster]; - - if (r_ptr->flags & RF_CHAR_CLEAR || - r_ptr->flags & RF_ATTR_CLEAR) - info[i++] = "You are transparent."; - if ((r_ptr->flags & RF_CHAR_MULTI) || - (r_ptr->flags & RF_SHAPECHANGER)) - info[i++] = "Your form constantly changes."; - if (r_ptr->flags & RF_ATTR_MULTI) - info[i++] = "Your color constantly changes."; - if (r_ptr->flags & RF_NEVER_BLOW) - info[i++] = "You do not have a physical weapon."; - if (r_ptr->flags & RF_NEVER_MOVE) - info[i++] = "You cannot move."; - if ((r_ptr->flags & RF_RAND_25) && - (r_ptr->flags & RF_RAND_50)) - info[i++] = "You move extremely erratically."; - else if (r_ptr->flags & RF_RAND_50) - info[i++] = "You move somewhat erratically."; - else if (r_ptr->flags & RF_RAND_25) - info[i++] = "You move a bit erratically."; - if (r_ptr->flags & RF_STUPID) - info[i++] = "You are very stupid (INT -4)."; - if (r_ptr->flags & RF_SMART) - info[i++] = "You are very smart (INT +4)."; - /* Not implemented */ - if (r_ptr->flags & RF_CAN_SPEAK) - info[i++] = "You can speak."; - else - info[i++] = "You cannot speak."; - /* Not implemented */ - if (r_ptr->flags & RF_COLD_BLOOD) - info[i++] = "You are cold blooded."; - /* Not implemented */ - if (r_ptr->flags & RF_EMPTY_MIND) - info[i++] = "You have an empty mind."; - if (r_ptr->flags & RF_WEIRD_MIND) - info[i++] = "You have a weird mind."; - if (r_ptr->spells & SF_MULTIPLY) - info[i++] = "You can multiply."; - if (r_ptr->flags & RF_POWERFUL) - info[i++] = "You have strong breath."; - /* Not implemented */ - if (r_ptr->flags & RF_ELDRITCH_HORROR) - info[i++] = "You are an eldritch horror."; - if (r_ptr->flags & RF_OPEN_DOOR) - info[i++] = "You can open doors."; - else - info[i++] = "You cannot open doors."; - if (r_ptr->flags & RF_BASH_DOOR) - info[i++] = "You can bash doors."; - else - info[i++] = "You cannot bash doors."; - if (r_ptr->flags & RF_PASS_WALL) - info[i++] = "You can pass walls."; - if (r_ptr->flags & RF_KILL_WALL) - info[i++] = "You destroy walls."; - /* Not implemented */ - if (r_ptr->flags & RF_MOVE_BODY) - info[i++] = "You can move monsters."; - /* Not implemented */ - if (r_ptr->flags & RF_ORC) - info[i++] = "You have orc blood in your veins."; - /* Not implemented */ - else if (r_ptr->flags & RF_TROLL) - info[i++] = "You have troll blood in your veins."; - /* Not implemented */ - else if (r_ptr->flags & RF_GIANT) - info[i++] = "You have giant blood in your veins."; - /* Not implemented */ - else if (r_ptr->flags & RF_DRAGON) - info[i++] = "You have dragon blood in your veins."; - /* Not implemented */ - else if (r_ptr->flags & RF_DEMON) - info[i++] = "You have demon blood in your veins."; - /* Not implemented */ - else if (r_ptr->flags & RF_UNDEAD) - info[i++] = "You are an undead."; - /* Not implemented */ - else if (r_ptr->flags & RF_ANIMAL) - info[i++] = "You are an animal."; - /* Not implemented */ - else if (r_ptr->flags & RF_THUNDERLORD) - info[i++] = "You have thunderlord blood in your veins."; - if (r_ptr->flags & RF_EVIL) - info[i++] = "You are inherently evil."; - else if (r_ptr->flags & RF_GOOD) - info[i++] = "You are inherently good."; - if (r_ptr->flags & RF_AURA_COLD) - info[i++] = "You are surrounded by a chilly aura."; - /* Not implemented */ - if (r_ptr->flags & RF_NONLIVING) - info[i++] = "You are not living."; - /* Not implemented */ - if (r_ptr->flags & RF_HURT_LITE) - info[i++] = "Your eyes are vulnerable to bright light."; - /* Not implemented */ - if (r_ptr->flags & RF_HURT_ROCK) - info[i++] = "You can be hurt by rock remover."; - if (r_ptr->flags & RF_SUSCEP_FIRE) - info[i++] = "You are vulnerable to fire."; - if (r_ptr->flags & RF_SUSCEP_COLD) - info[i++] = "You are vulnerable to cold."; - if (r_ptr->flags & RF_RES_TELE) - info[i++] = "You are resistant to teleportation."; - if (r_ptr->flags & RF_RES_NETH) - info[i++] = "You are resistant to nether."; - if (r_ptr->flags & RF_RES_WATE) - info[i++] = "You are resistant to water."; - if (r_ptr->flags & RF_RES_PLAS) - info[i++] = "You are resistant to plasma."; - if (r_ptr->flags & RF_RES_WATE) - info[i++] = "You are resistant to nexus."; - if (r_ptr->flags & RF_RES_DISE) - info[i++] = "You are resistant to disease."; - /* Not implemented */ - if (r_ptr->flags & RF_NO_SLEEP) - info[i++] = "You cannot be slept."; - /* Not implemented */ - if (r_ptr->flags & RF_UNIQUE_4) - info[i++] = "You are a Nazgul."; - if (r_ptr->flags & RF_NO_FEAR) - info[i++] = "You are immune to fear."; - if (r_ptr->flags & RF_NO_STUN) - info[i++] = "You are immune to stun."; - if (r_ptr->flags & RF_NO_CONF) - info[i++] = "You are immune to confusion."; - if (r_ptr->flags & RF_NO_SLEEP) - info[i++] = "You are immune to sleep."; - - if (r_ptr->spells & SF_SHRIEK) - info[i++] = "You can aggravate monsters."; - if (r_ptr->spells & SF_ROCKET) - info[i++] = "You can fire a rocket."; - if (r_ptr->spells & SF_ARROW_1) - info[i++] = "You can fire a light arrow."; - if (r_ptr->spells & SF_ARROW_2) - info[i++] = "You can fire a heavy arrow."; - if (r_ptr->spells & SF_ARROW_3) - info[i++] = "You can fire a light missile."; - if (r_ptr->spells & SF_ARROW_4) - info[i++] = "You can fire a heavy missile."; - if (r_ptr->spells & SF_BR_ACID) - info[i++] = "You can breathe acid."; - if (r_ptr->spells & SF_BR_ELEC) - info[i++] = "You can breathe electricity."; - if (r_ptr->spells & SF_BR_FIRE) - info[i++] = "You can breathe fire."; - if (r_ptr->spells & SF_BR_COLD) - info[i++] = "You can breathe cold."; - if (r_ptr->spells & SF_BR_POIS) - info[i++] = "You can breathe poison."; - if (r_ptr->spells & SF_BR_NETH) - info[i++] = "You can breathe nether."; - if (r_ptr->spells & SF_BR_LITE) - info[i++] = "You can breathe light."; - if (r_ptr->spells & SF_BR_DARK) - info[i++] = "You can breathe darkness."; - if (r_ptr->spells & SF_BR_CONF) - info[i++] = "You can breathe confusion."; - if (r_ptr->spells & SF_BR_SOUN) - info[i++] = "You can breathe sound."; - if (r_ptr->spells & SF_BR_CHAO) - info[i++] = "You can breathe chaos."; - if (r_ptr->spells & SF_BR_DISE) - info[i++] = "You can breathe disenchantment."; - if (r_ptr->spells & SF_BR_NEXU) - info[i++] = "You can breathe nexus."; - if (r_ptr->spells & SF_BR_TIME) - info[i++] = "You can breathe time."; - if (r_ptr->spells & SF_BR_INER) - info[i++] = "You can breathe inertia."; - if (r_ptr->spells & SF_BR_GRAV) - info[i++] = "You can breathe gravity."; - if (r_ptr->spells & SF_BR_SHAR) - info[i++] = "You can breathe shards."; - if (r_ptr->spells & SF_BR_PLAS) - info[i++] = "You can breathe plasma."; - if (r_ptr->spells & SF_BR_WALL) - info[i++] = "You can breathe force."; - if (r_ptr->spells & SF_BR_MANA) - info[i++] = "You can breathe mana."; - if (r_ptr->spells & SF_BR_NUKE) - info[i++] = "You can breathe nuke."; - if (r_ptr->spells & SF_BR_DISI) - info[i++] = "You can breathe disintegration."; - if (r_ptr->spells & SF_BA_ACID) - info[i++] = "You can cast a ball of acid."; - if (r_ptr->spells & SF_BA_ELEC) - info[i++] = "You can cast a ball of electricity."; - if (r_ptr->spells & SF_BA_FIRE) - info[i++] = "You can cast a ball of fire."; - if (r_ptr->spells & SF_BA_COLD) - info[i++] = "You can cast a ball of cold."; - if (r_ptr->spells & SF_BA_POIS) - info[i++] = "You can cast a ball of poison."; - if (r_ptr->spells & SF_BA_NETH) - info[i++] = "You can cast a ball of nether."; - if (r_ptr->spells & SF_BA_WATE) - info[i++] = "You can cast a ball of water."; - if (r_ptr->spells & SF_DRAIN_MANA) - info[i++] = "You can drain mana."; - if (r_ptr->spells & SF_MIND_BLAST) - info[i++] = "You can cause mind blasting."; - if (r_ptr->spells & SF_BRAIN_SMASH) - info[i++] = "You can cause brain smashing."; - if (r_ptr->spells & SF_CAUSE_1) - info[i++] = "You can cause light wounds."; - if (r_ptr->spells & SF_CAUSE_2) - info[i++] = "You can cause serious wounds."; - if (r_ptr->spells & SF_CAUSE_3) - info[i++] = "You can cause critical wounds."; - if (r_ptr->spells & SF_CAUSE_4) - info[i++] = "You can cause mortal wounds."; - if (r_ptr->spells & SF_BO_ACID) - info[i++] = "You can cast a bolt of acid."; - if (r_ptr->spells & SF_BO_ELEC) - info[i++] = "You can cast a bolt of electricity."; - if (r_ptr->spells & SF_BO_FIRE) - info[i++] = "You can cast a bolt of fire."; - if (r_ptr->spells & SF_BO_COLD) - info[i++] = "You can cast a bolt of cold."; - if (r_ptr->spells & SF_BO_POIS) - info[i++] = "You can cast a bolt of poison."; - if (r_ptr->spells & SF_BO_NETH) - info[i++] = "You can cast a bolt of nether."; - if (r_ptr->spells & SF_BO_WATE) - info[i++] = "You can cast a bolt of water."; - if (r_ptr->spells & SF_BO_MANA) - info[i++] = "You can cast a bolt of mana."; - if (r_ptr->spells & SF_BO_PLAS) - info[i++] = "You can cast a bolt of plasma."; - if (r_ptr->spells & SF_BO_ICEE) - info[i++] = "You can cast a bolt of ice."; - if (r_ptr->spells & SF_MISSILE) - info[i++] = "You can cast magic missile."; - if (r_ptr->spells & SF_SCARE) - info[i++] = "You can terrify."; - if (r_ptr->spells & SF_BLIND) - info[i++] = "You can blind."; - if (r_ptr->spells & SF_CONF) - info[i++] = "You can use confusion."; - if (r_ptr->spells & SF_SLOW) - info[i++] = "You can cast slow."; - if (r_ptr->spells & SF_HOLD) - info[i++] = "You can touch to paralyze."; - if (r_ptr->spells & SF_HASTE) - info[i++] = "You can haste yourself."; - if (r_ptr->spells & SF_HAND_DOOM) - info[i++] = "You can invoke Hand of Doom."; - if (r_ptr->spells & SF_HEAL) - info[i++] = "You can heal yourself."; - if (r_ptr->spells & SF_BLINK) - info[i++] = "You can blink."; - if (r_ptr->spells & SF_TPORT) - info[i++] = "You can teleport."; - if (r_ptr->spells & SF_TELE_TO) - info[i++] = "You can go between places."; - if (r_ptr->spells & SF_TELE_AWAY) - info[i++] = "You can teleport away."; - if (r_ptr->spells & SF_TELE_LEVEL) - info[i++] = "You can teleport level."; - if (r_ptr->spells & SF_DARKNESS) - info[i++] = "You can create darkness."; - if (r_ptr->spells & SF_FORGET) - info[i++] = "You can fade memories."; - if (r_ptr->spells & SF_RAISE_DEAD) - info[i++] = "You can Raise the Dead."; - if (r_ptr->spells & SF_S_BUG) - info[i++] = "You can magically summon a Software Bugs."; - if (r_ptr->spells & SF_S_RNG) - info[i++] = "You can magically summon the RNG."; - if (r_ptr->spells & SF_S_THUNDERLORD) - info[i++] = "You can magically summon some Thunderlords."; - if (r_ptr->spells & SF_S_KIN) - info[i++] = "You can magically summon some Kins."; - if (r_ptr->spells & SF_S_HI_DEMON) - info[i++] = "You can magically summon greater demons."; - if (r_ptr->spells & SF_S_MONSTER) - info[i++] = "You can magically summon a monster."; - if (r_ptr->spells & SF_S_MONSTERS) - info[i++] = "You can magically summon monsters."; - if (r_ptr->spells & SF_S_ANT) - info[i++] = "You can magically summon ants."; - if (r_ptr->spells & SF_S_SPIDER) - info[i++] = "You can magically summon spiders."; - if (r_ptr->spells & SF_S_HOUND) - info[i++] = "You can magically summon hounds."; - if (r_ptr->spells & SF_S_HYDRA) - info[i++] = "You can magically summon hydras."; - if (r_ptr->spells & SF_S_ANGEL) - info[i++] = "You can magically summon an angel."; - if (r_ptr->spells & SF_S_DEMON) - info[i++] = "You can magically summon a demon."; - if (r_ptr->spells & SF_S_UNDEAD) - info[i++] = "You can magically summon an undead."; - if (r_ptr->spells & SF_S_DRAGON) - info[i++] = "You can magically summon a dragon."; - if (r_ptr->spells & SF_S_HI_UNDEAD) - info[i++] = "You can magically summon greater undead."; - if (r_ptr->spells & SF_S_HI_DRAGON) - info[i++] = "You can magically summon greater dragons."; - if (r_ptr->spells & SF_S_WRAITH) - info[i++] = "You can magically summon a wraith."; - if (r_ptr->spells & SF_S_UNIQUE) - info[i++] = "You can magically summon an unique monster."; - /* Not implemented */ - if (r_ptr->flags & RF_AQUATIC) - info[i++] = "You are aquatic."; - /* Not implemented */ - if (r_ptr->flags & RF_CAN_SWIM) - info[i++] = "You can swim."; - /* Not implemented */ - if (r_ptr->flags & RF_CAN_FLY) - info[i++] = "You can fly."; - if ((r_ptr->flags & RF_MORTAL).empty()) - info[i++] = "You are immortal."; - /* Not implemented */ - if (r_ptr->flags & RF_NAZGUL) - info[i++] = "You are a Nazgul."; - - if (r_ptr->flags & RF_SPIDER) - info[i++] = "You are a spider."; - - if (r_ptr->flags & RF_WILD_TOWN) - info[i++] = "You appear in towns."; - if (r_ptr->flags & RF_WILD_SHORE) - info[i++] = "You appear on the shore."; - if (r_ptr->flags & RF_WILD_OCEAN) - info[i++] = "You appear in the ocean."; - if (r_ptr->flags & RF_WILD_WASTE) - info[i++] = "You appear in the waste."; - if (r_ptr->flags & RF_WILD_WOOD) - info[i++] = "You appear in woods."; - if (r_ptr->flags & RF_WILD_VOLCANO) - info[i++] = "You appear in volcanos."; - if (r_ptr->flags & RF_WILD_MOUNTAIN) - info[i++] = "You appear in the mountains."; - if (r_ptr->flags & RF_WILD_GRASS) - info[i++] = "You appear in grassy areas."; - - if (r_ptr->flags & RF_SUSCEP_ACID) - info[i++] = "You are vulnerable to acid."; - if (r_ptr->flags & RF_SUSCEP_ELEC) - info[i++] = "You are vulnerable to electricity."; - if (r_ptr->flags & RF_SUSCEP_POIS) - info[i++] = "You are vulnerable to poison."; - if (r_ptr->flags & RF_KILL_TREES) - info[i++] = "You can eat trees."; - if (r_ptr->flags & RF_WYRM_PROTECT) - info[i++] = "You are protected by great wyrms of power."; - } - - /* List powers */ - for (iter = 0; iter < POWER_MAX; iter++) - { - if (p_ptr->powers[iter]) - { - info[i++] = powers_type[iter].desc_text; - } - } - - if (p_ptr->allow_one_death) - { - info[i++] = "The Blood of Life flows through your veins."; - } - if (p_ptr->blind) - { - info[i++] = "You cannot see."; - } - if (p_ptr->confused) - { - info[i++] = "You are confused."; - } - if (p_ptr->afraid) - { - info[i++] = "You are terrified."; - } - if (p_ptr->cut) - { - info[i++] = "You are bleeding."; - } - if (p_ptr->stun) - { - info[i++] = "You are stunned."; - } - if (p_ptr->poisoned) - { - info[i++] = "You are poisoned."; - } - if (p_ptr->image) - { - info[i++] = "You are hallucinating."; - } - if (p_ptr->aggravate) - { - info[i++] = "You aggravate monsters."; - } - if (p_ptr->teleport) - { - info[i++] = "Your position is very uncertain."; - } - if (p_ptr->blessed) - { - info[i++] = "You feel righteous."; - } - if (p_ptr->hero) - { - info[i++] = "You feel heroic."; - } - if (p_ptr->shero) - { - info[i++] = "You are in a battle rage."; - } - if (p_ptr->protevil) - { - info[i++] = "You are protected from evil."; - } - if (p_ptr->shield) - { - info[i++] = "You are protected by a mystic shield."; - } - if (p_ptr->invuln) - { - info[i++] = "You are temporarily invulnerable."; - } - if (p_ptr->confusing) - { - info[i++] = "Your hands are glowing dull red."; - } - if (p_ptr->word_recall) - { - info[i++] = "You will soon be recalled."; - } - if (p_ptr->see_infra) - { - info[i++] = "Your eyes are sensitive to infrared light."; - } - if (p_ptr->see_inv) - { - info[i++] = "You can see invisible creatures."; - } - if (p_ptr->magical_breath) - { - info[i++] = "You can breathe without air."; - } - else if (p_ptr->water_breath) - { - info[i++] = "You can breathe underwater."; - } - if (p_ptr->ffall) - { - info[i++] = "You levitate just over the ground."; - } - if (p_ptr->climb) - { - info[i++] = "You can climb high mountains."; - } - if (p_ptr->free_act) - { - info[i++] = "You have free action."; - } - if (p_ptr->regenerate) - { - info[i++] = "You regenerate quickly."; - } - if (p_ptr->slow_digest) - { - info[i++] = "Your appetite is small."; - } - // Telepathy - { - if (p_ptr->computed_flags & ESP_ALL) - { - info[i++] = "You have ESP."; - } - else - { - if (p_ptr->computed_flags & ESP_ORC) info[i++] = "You can sense the presence of orcs."; - if (p_ptr->computed_flags & ESP_TROLL) info[i++] = "You can sense the presence of trolls."; - if (p_ptr->computed_flags & ESP_DRAGON) info[i++] = "You can sense the presence of dragons."; - if (p_ptr->computed_flags & ESP_SPIDER) info[i++] = "You can sense the presence of spiders."; - if (p_ptr->computed_flags & ESP_GIANT) info[i++] = "You can sense the presence of giants."; - if (p_ptr->computed_flags & ESP_DEMON) info[i++] = "You can sense the presence of demons."; - if (p_ptr->computed_flags & ESP_UNDEAD) info[i++] = "You can sense presence of undead."; - if (p_ptr->computed_flags & ESP_EVIL) info[i++] = "You can sense the presence of evil beings."; - if (p_ptr->computed_flags & ESP_ANIMAL) info[i++] = "You can sense the presence of animals."; - if (p_ptr->computed_flags & ESP_THUNDERLORD) info[i++] = "You can sense the presence of thunderlords."; - if (p_ptr->computed_flags & ESP_GOOD) info[i++] = "You can sense the presence of good beings."; - if (p_ptr->computed_flags & ESP_NONLIVING) info[i++] = "You can sense the presence of non-living things."; - if (p_ptr->computed_flags & ESP_UNIQUE) info[i++] = "You can sense the presence of unique beings."; - } - } - if (!luck( -100, 100)) - { - info[i++] = "You have normal luck."; - } - else if (luck( -100, 100) < 0) - { - if (luck( -100, 100) < -90) - { - info[i++] = "You are incredibly unlucky."; - } - else if (luck( -100, 100) < -60) - { - info[i++] = "You are extremely unlucky."; - } - else if (luck( -100, 100) < -30) - { - info[i++] = "You are very unlucky."; - } - else - { - info[i++] = "You are unlucky."; - } - } - else if (luck( -100, 100) > 0) - { - if (luck( -100, 100) > 90) - { - info[i++] = "You are incredibly lucky."; - } - else if (luck( -100, 100) > 60) - { - info[i++] = "You are extremely lucky."; - } - else if (luck( -100, 100) > 30) - { - info[i++] = "You are very lucky."; - } - else - { - info[i++] = "You are lucky."; - } - } - if (p_ptr->auto_id) - { - info[i++] = "You know everything."; - } - if (p_ptr->hold_life) - { - info[i++] = "You have a firm hold on your life force."; - } - if (p_ptr->reflect) - { - info[i++] = "You reflect arrows and bolts."; - } - if (p_ptr->sh_fire) - { - info[i++] = "You are surrounded with a fiery aura."; - } - if (p_ptr->sh_elec) - { - info[i++] = "You are surrounded with electricity."; - } - if (p_ptr->antimagic) - { - info[i++] = "You are surrounded by an anti-magic field."; - } - if (p_ptr->anti_magic) - { - info[i++] = "You are surrounded by an anti-magic shell."; - } - if (p_ptr->wraith_form) - { - info[i++] = "You are incorporeal."; - } - if (p_ptr->anti_tele) - { - info[i++] = "You cannot teleport."; - } - if (p_ptr->lite) - { - info[i++] = "You are carrying a permanent light."; - } - - if (p_ptr->immune_acid) - { - info[i++] = "You are completely immune to acid."; - } - else if ((p_ptr->resist_acid) && (p_ptr->oppose_acid)) - { - info[i++] = "You resist acid exceptionally well."; - } - else if ((p_ptr->resist_acid) || (p_ptr->oppose_acid)) - { - info[i++] = "You are resistant to acid."; - } - - if (p_ptr->immune_elec) - { - info[i++] = "You are completely immune to lightning."; - } - else if ((p_ptr->resist_elec) && (p_ptr->oppose_elec)) - { - info[i++] = "You resist lightning exceptionally well."; - } - else if ((p_ptr->resist_elec) || (p_ptr->oppose_elec)) - { - info[i++] = "You are resistant to lightning."; - } - - if (p_ptr->immune_fire) - { - info[i++] = "You are completely immune to fire."; - } - else if ((p_ptr->resist_fire) && (p_ptr->oppose_fire)) - { - info[i++] = "You resist fire exceptionally well."; - } - else if ((p_ptr->resist_fire) || (p_ptr->oppose_fire)) - { - info[i++] = "You are resistant to fire."; - } - else if (p_ptr->sensible_fire) - { - info[i++] = "You are very vulnerable to fire."; - } - - if (p_ptr->immune_cold) - { - info[i++] = "You are completely immune to cold."; - } - else if ((p_ptr->resist_cold) && (p_ptr->oppose_cold)) - { - info[i++] = "You resist cold exceptionally well."; - } - else if ((p_ptr->resist_cold) || (p_ptr->oppose_cold)) - { - info[i++] = "You are resistant to cold."; - } - - if ((p_ptr->resist_pois) && (p_ptr->oppose_pois)) - { - info[i++] = "You resist poison exceptionally well."; - } - else if ((p_ptr->resist_pois) || (p_ptr->oppose_pois)) - { - info[i++] = "You are resistant to poison."; - } - - if (p_ptr->resist_lite) - { - info[i++] = "You are resistant to bright light."; - } - if (p_ptr->resist_dark) - { - info[i++] = "You are resistant to darkness."; - } - if (p_ptr->resist_conf) - { - info[i++] = "You are resistant to confusion."; - } - if (p_ptr->resist_sound) - { - info[i++] = "You are resistant to sonic attacks."; - } - if (p_ptr->resist_disen) - { - info[i++] = "You are resistant to disenchantment."; - } - if (p_ptr->resist_chaos) - { - info[i++] = "You are resistant to chaos."; - } - if (p_ptr->resist_shard) - { - info[i++] = "You are resistant to blasts of shards."; - } - if (p_ptr->resist_nexus) - { - info[i++] = "You are resistant to nexus attacks."; - } - if (p_ptr->immune_neth) - { - info[i++] = "You are immune to nether forces."; - } - else if (p_ptr->resist_neth) - { - info[i++] = "You are resistant to nether forces."; - } - if (p_ptr->resist_fear) - { - info[i++] = "You are completely fearless."; - } - if (p_ptr->resist_blind) - { - info[i++] = "Your eyes are resistant to blindness."; - } - if (p_ptr->resist_continuum) - { - info[i++] = "The space-time continuum cannot be disrupted near you."; - } - - if (p_ptr->sustain_str) - { - info[i++] = "Your strength is sustained."; - } - if (p_ptr->sustain_int) - { - info[i++] = "Your intelligence is sustained."; - } - if (p_ptr->sustain_wis) - { - info[i++] = "Your wisdom is sustained."; - } - if (p_ptr->sustain_con) - { - info[i++] = "Your constitution is sustained."; - } - if (p_ptr->sustain_dex) - { - info[i++] = "Your dexterity is sustained."; - } - if (p_ptr->sustain_chr) - { - info[i++] = "Your charisma is sustained."; - } - if (p_ptr->black_breath) - { - info[i++] = "You suffer from Black Breath."; - } - - if (flags & TR_STR) - { - info[i++] = "Your strength is affected by your equipment."; - } - if (flags & TR_INT) - { - info[i++] = "Your intelligence is affected by your equipment."; - } - if (flags & TR_WIS) - { - info[i++] = "Your wisdom is affected by your equipment."; - } - if (flags & TR_DEX) - { - info[i++] = "Your dexterity is affected by your equipment."; - } - if (flags & TR_CON) - { - info[i++] = "Your constitution is affected by your equipment."; - } - if (flags & TR_CHR) - { - info[i++] = "Your charisma is affected by your equipment."; - } - - if (flags & TR_STEALTH) - { - info[i++] = "Your stealth is affected by your equipment."; - } - if (flags & TR_INFRA) - { - info[i++] = "Your infravision is affected by your equipment."; - } - if (flags & TR_TUNNEL) - { - info[i++] = "Your digging ability is affected by your equipment."; - } - if (flags & TR_SPEED) - { - info[i++] = "Your speed is affected by your equipment."; - } - if (flags & TR_BLOWS) - { - info[i++] = "Your attack speed is affected by your equipment."; - } - if (flags & TR_CRIT) - { - info[i++] = "Your ability to score critical hits is affected by your equipment."; - } - - - /* Access the current weapon */ - o_ptr = &p_ptr->inventory[INVEN_WIELD]; - - /* Analyze the weapon */ - if (o_ptr->k_idx) - { - flags = object_flags(o_ptr); - - /* Indicate Blessing */ - if (flags & TR_BLESSED) - { - info[i++] = "Your weapon has been blessed by the gods."; - } - - if (flags & TR_CHAOTIC) - { - info[i++] = "Your weapon is branded with the Sign of Chaos."; - } - - /* Hack */ - if (flags & TR_IMPACT) - { - info[i++] = "The impact of your weapon can cause earthquakes."; - } - - if (flags & TR_VORPAL) - { - info[i++] = "Your weapon is very sharp."; - } - - if (flags & TR_VAMPIRIC) - { - info[i++] = "Your weapon drains life from your foes."; - } - - /* Special "Attack Bonuses" */ - if (flags & TR_BRAND_ACID) - { - info[i++] = "Your weapon melts your foes."; - } - if (flags & TR_BRAND_ELEC) - { - info[i++] = "Your weapon shocks your foes."; - } - if (flags & TR_BRAND_FIRE) - { - info[i++] = "Your weapon burns your foes."; - } - if (flags & TR_BRAND_COLD) - { - info[i++] = "Your weapon freezes your foes."; - } - if (flags & TR_BRAND_POIS) - { - info[i++] = "Your weapon poisons your foes."; - } - - /* Special "slay" flags */ - if (flags & TR_SLAY_ANIMAL) - { - info[i++] = "Your weapon strikes at animals with extra force."; - } - if (flags & TR_SLAY_EVIL) - { - info[i++] = "Your weapon strikes at evil with extra force."; - } - if (flags & TR_SLAY_UNDEAD) - { - info[i++] = "Your weapon strikes at undead with holy wrath."; - } - if (flags & TR_SLAY_DEMON) - { - info[i++] = "Your weapon strikes at demons with holy wrath."; - } - if (flags & TR_SLAY_ORC) - { - info[i++] = "Your weapon is especially deadly against orcs."; - } - if (flags & TR_SLAY_TROLL) - { - info[i++] = "Your weapon is especially deadly against trolls."; - } - if (flags & TR_SLAY_GIANT) - { - info[i++] = "Your weapon is especially deadly against giants."; - } - if (flags & TR_SLAY_DRAGON) - { - info[i++] = "Your weapon is especially deadly against dragons."; - } - - /* Special "kill" flags */ - if (flags & TR_KILL_DRAGON) - { - info[i++] = "Your weapon is a great bane of dragons."; - } - /* Special "kill" flags */ - if (flags & TR_KILL_DEMON) - { - info[i++] = "Your weapon is a great bane of demons."; - } - /* Special "kill" flags */ - if (flags & TR_KILL_UNDEAD) - { - info[i++] = "Your weapon is a great bane of undeads."; - } - } - - /* Print on screen or in a file ? */ - if (fff == NULL) - { - /* Save the screen */ - character_icky = TRUE; - Term_save(); - - /* Erase the screen */ - for (k = 1; k < 24; k++) prt("", k, 13); - - /* Label the information */ - prt(" Your Attributes:", 1, 15); - - /* We will print on top of the map (column 13) */ - for (k = 2, j = 0; j < i; j++) - { - /* Show the info */ - prt(info[j], k++, 15); - - /* Every 20 entries (lines 2 to 21), start over */ - if ((k == 22) && (j + 1 < i)) - { - prt("-- more --", k, 15); - inkey(); - for (; k > 2; k--) prt("", k, 15); - } - } - - /* Pause */ - prt("[Press any key to continue]", k, 13); - inkey(); - - /* Restore the screen */ - Term_load(); - character_icky = FALSE; - } - else - { - /* Label the information */ - fprintf(fff, " Your Attributes:\n"); - - /* We will print on top of the map (column 13) */ - for (j = 0; j < i; j ++) - { - /* Show the info */ - fprintf(fff, "%s\n", info[j]); - } - } -} - - static int report_magics_aux(int dur) { if (dur <= 5) |