Angband
Macros | Functions | Variables
obj-randart.c File Reference

Random artifact generation. More...

#include "angband.h"
#include "datafile.h"
#include "effects.h"
#include "init.h"
#include "obj-curse.h"
#include "obj-desc.h"
#include "obj-make.h"
#include "obj-pile.h"
#include "obj-power.h"
#include "obj-randart.h"
#include "obj-slays.h"
#include "obj-tval.h"
#include "obj-util.h"
#include "project.h"
#include "randname.h"
#include "z-textblock.h"
#include "list-object-flags.h"

Macros

#define OF(a)   #a,
 

Functions

static int artifact_power (int a_idx, char *reason)
 

Calculation of the statistics of an artifact set

More...
 
static void store_base_power (struct artifact_set_data *data)
 Store the original artifact power ratings as a baseline. More...
 
void count_weapon_abilities (const struct artifact *art, struct artifact_set_data *data)
 Handle weapon combat abilities. More...
 
void count_bow_abilities (const struct artifact *art, struct artifact_set_data *data)
 Count combat abilities on bows. More...
 
void count_nonweapon_abilities (const struct artifact *art, struct artifact_set_data *data)
 Handle nonweapon combat abilities. More...
 
void count_modifiers (const struct artifact *art, struct artifact_set_data *data)
 Count modifiers. More...
 
void count_low_resists (const struct artifact *art, struct artifact_set_data *data)
 Count low resists and immunities. More...
 
void count_high_resists (const struct artifact *art, struct artifact_set_data *data)
 Count high resists and protections. More...
 
void count_abilities (const struct artifact *art, struct artifact_set_data *data)
 General abilities. More...
 
static void collect_artifact_data (struct artifact_set_data *data)
 Parse the standard artifacts and count up the frequencies of the various abilities. More...
 
static void rescale_freqs (struct artifact_set_data *data)
 Rescale the abilities so that dependent / independent abilities are comparable. More...
 
static void adjust_freqs (struct artifact_set_data *data)
 Adjust the parsed frequencies for any peculiarities of the algorithm. More...
 
static void parse_frequencies (struct artifact_set_data *data)
 Parse the artifacts and write frequencies of their abilities and base object kinds. More...
 
static int get_base_item_tval (struct artifact_set_data *data)
 

Generation of a random artifact

More...
 
static struct object_kindget_base_item (struct artifact_set_data *data, int tval)
 Pick a random base item from artifact data and a tval. More...
 
void artifact_prep (struct artifact *art, const struct object_kind *kind, struct artifact_set_data *data)
 Add basic data to an artifact of a given object kind. More...
 
static void build_freq_table (struct artifact *art, int *freq, struct artifact_set_data *data)
 Build a suitable frequency table for this item, based on the generated frequencies. More...
 
static void try_supercharge (struct artifact *art, s32b target_power, struct artifact_set_data *data)
 Try to supercharge this item by running through the list of the supercharge abilities and attempting to add each in turn. More...
 
static bool add_flag (struct artifact *art, int flag)
 Adds a flag to an artifact. More...
 
static bool add_resist (struct artifact *art, int element)
 Adds a resist to an artifact. More...
 
static void add_immunity (struct artifact *art)
 Adds an immunity to an artifact. More...
 
static bool add_mod (struct artifact *art, int mod)
 Adds, or increases the positive value of, or decreases the negative value of, a modifier to an artifact. More...
 
static void add_stat (struct artifact *art)
 Adds, or increases a stat modifier (probably) More...
 
static void add_sustain (struct artifact *art)
 Adds a sustain, if possible. More...
 
static void add_low_resist (struct artifact *art)
 Adds a low resist, if possible. More...
 
static void add_high_resist (struct artifact *art, struct artifact_set_data *data)
 Adds a high resist, if possible. More...
 
static void add_brand (struct artifact *art)
 Adds a brand, if possible. More...
 
static void add_slay (struct artifact *art)
 Adds a slay, if possible. More...
 
static void add_damage_dice (struct artifact *art)
 Adds one or two damage dice. More...
 
static void add_to_hit (struct artifact *art, int fixed, int random)
 Adds to_h, if not too high already. More...
 
static void add_to_dam (struct artifact *art, int fixed, int random)
 Adds to_d, if not too high already. More...
 
static void add_to_AC (struct artifact *art, int fixed, int random)
 Adds to_a, if not too high already. More...
 
static void add_weight_mod (struct artifact *art)
 Lowers weight. More...
 
static void add_activation (struct artifact *art, int target_power, int max_power)
 Add an activation (called only if artifact does not yet have one) More...
 
static int choose_ability (int *freq_table)
 Choose a random ability using weights based on the given cumulative frequency table. More...
 
static void add_ability_aux (struct artifact *art, int r, s32b target_power, struct artifact_set_data *data)
 Add an ability given by the index r. More...
 
static void remove_contradictory (struct artifact *art)
 Clean up the artifact by removing illogical combinations of powers. More...
 
static void add_ability (struct artifact *art, s32b target_power, int *freq, struct artifact_set_data *data)
 Randomly select an extra ability to be added to the artifact in question. More...
 
static void add_curse (struct artifact *art, int level)
 Randomly select a curse and added it to the artifact in question. More...
 
static void make_bad (struct artifact *art, int level)
 Make it bad, or if it's already bad, make it worse! More...
 
static void copy_artifact (struct artifact *a_src, struct artifact *a_dst)
 Copy artifact fields from a_src to a_dst. More...
 
char * artifact_gen_name (struct artifact *a, const char ***words)
 

Generation of a set of random artifacts

More...
 
static void describe_artifact (int aidx, int power)
 Give an artifact a (boring) description. More...
 
static void design_artifact (struct artifact_set_data *data, int tv, int *aidx)
 Design a random artifact given a tval. More...
 
void create_artifact_set (struct artifact_set_data *data)
 Create a random artifact set. More...
 
static struct artifact_set_dataartifact_set_data_new (void)
 Allocate a new artifact set data structure. More...
 
static void artifact_set_data_free (struct artifact_set_data *data)
 Allocate a new artifact set data structure. More...
 
void do_randart (u32b randart_seed, bool create_file)
 Randomize the artifacts. More...
 

Variables

static ang_filelog_file = NULL
 
struct activationactivations
 
static s16b art_idx_bow []
 

Arrays of indices by item type, used in frequency generation

More...
 
static s16b art_idx_weapon []
 
static s16b art_idx_nonweapon []
 
static s16b art_idx_melee []
 
static s16b art_idx_allarmor []
 
static s16b art_idx_boot []
 
static s16b art_idx_glove []
 
static s16b art_idx_headgear []
 
static s16b art_idx_shield []
 
static s16b art_idx_cloak []
 
static s16b art_idx_armor []
 
static s16b art_idx_gen []
 
static s16b art_idx_high_resist []
 

Detailed Description

Random artifact generation.

Copyright (c) 1998 Greg Wooledge, Ben Harrison, Robert Ruhlmann Copyright (c) 2001 Chris Carr, Chris Robertson

This work is free software; you can redistribute it and/or modify it under the terms of either:

a) the GNU General Public License as published by the Free Software Foundation, version 2, or

b) the "Angband licence": This software may be copied and distributed for educational, research, and not for profit purposes provided that this copyright and statement are included in all such copies. Other copyrights may also apply.

Original random artifact generator (randart) by Greg Wooledge. Updated by Chris Carr / Chris Robertson 2001-2010.

Macro Definition Documentation

#define OF (   a)    #a,

Function Documentation

static void add_ability ( struct artifact art,
s32b  target_power,
int freq,
struct artifact_set_data data 
)
static

Randomly select an extra ability to be added to the artifact in question.

References add_ability_aux(), add_flag(), choose_ability(), artifact::modifiers, remove_contradictory(), and artifact::tval.

Referenced by design_artifact().

static void add_ability_aux ( struct artifact art,
int  r,
s32b  target_power,
struct artifact_set_data data 
)
static

Add an ability given by the index r.

This is mostly just a long case statement.

Note that this method is totally general and imposes no restrictions on appropriate item type for a given ability. This is assumed to have been done already.

References artifact_set_data::ac_increment, object_kind::activation, artifact::activation, add_activation(), add_brand(), add_damage_dice(), add_flag(), add_high_resist(), add_immunity(), add_low_resist(), add_mod(), add_resist(), add_slay(), add_stat(), add_sustain(), add_to_AC(), add_to_dam(), add_to_hit(), add_weight_mod(), AGGR_POWER, artifact_set_data::dam_increment, artifact_set_data::hit_increment, lookup_kind(), artifact_set_data::max_power, artifact::modifiers, artifact::sval, and artifact::tval.

Referenced by add_ability().

static void add_activation ( struct artifact art,
int  target_power,
int  max_power 
)
static

Add an activation (called only if artifact does not yet have one)

References angband_constants::act_max, artifact::activation, random::base, random::dice, file_putf(), i, INHIBIT_POWER, MAX_TRIES, p, activation::power, randint0, random::sides, artifact::time, and z_info.

Referenced by add_ability_aux().

static void add_brand ( struct artifact art)
static
static void add_curse ( struct artifact art,
int  level 
)
static

Randomly select a curse and added it to the artifact in question.

References append_artifact_curse(), angband_constants::curse_max, curses, m_bonus(), object_kind::power, randint1, artifact::tval, and z_info.

Referenced by design_artifact(), and make_bad().

static void add_damage_dice ( struct artifact art)
static

Adds one or two damage dice.

References artifact::dd, file_putf(), and randint1.

Referenced by add_ability_aux().

static bool add_flag ( struct artifact art,
int  flag 
)
static

Adds a flag to an artifact.

Returns true when changes were made.

References file_putf(), artifact::flags, lookup_obj_property(), obj_property::name, OBJ_PROPERTY_FLAG, of_has, and of_on.

Referenced by add_ability(), add_ability_aux(), add_high_resist(), and add_sustain().

static void add_high_resist ( struct artifact art,
struct artifact_set_data data 
)
static

Adds a high resist, if possible.

References add_flag(), add_resist(), art_idx_high_resist, artifact_set_data::art_probs, i, MAX_TRIES, N_ELEMENTS, and randint1.

Referenced by add_ability_aux().

static void add_immunity ( struct artifact art)
static

Adds an immunity to an artifact.

Returns true when changes were made.

References artifact::el_info, file_putf(), projections, randint0, and element_info::res_level.

Referenced by add_ability_aux().

static void add_low_resist ( struct artifact art)
static

Adds a low resist, if possible.

References add_resist(), artifact::el_info, ELEM_BASE_MIN, ELEM_HIGH_MIN, i, randint0, and element_info::res_level.

Referenced by add_ability_aux().

static bool add_mod ( struct artifact art,
int  mod 
)
static

Adds, or increases the positive value of, or decreases the negative value of, a modifier to an artifact.

References file_putf(), lookup_obj_property(), artifact::modifiers, obj_property::name, OBJ_PROPERTY_MOD, one_in_, randint0, and randint1.

Referenced by add_ability_aux(), and add_stat().

static bool add_resist ( struct artifact art,
int  element 
)
static

Adds a resist to an artifact.

Returns true when changes were made.

References artifact::el_info, file_putf(), projections, and element_info::res_level.

Referenced by add_ability_aux(), add_brand(), add_high_resist(), and add_low_resist().

static void add_slay ( struct artifact art)
static
static void add_stat ( struct artifact art)
static

Adds, or increases a stat modifier (probably)

References add_mod(), OBJ_MOD_MIN_STAT, randint0, and STAT_MAX.

Referenced by add_ability_aux().

static void add_sustain ( struct artifact art)
static

Adds a sustain, if possible.

References add_flag(), FLAG_END, artifact::flags, flags_test_all(), OF_SIZE, and randint0.

Referenced by add_ability_aux().

static void add_to_AC ( struct artifact art,
int  fixed,
int  random 
)
static

Adds to_a, if not too high already.

References file_putf(), HIGH_TO_AC, INHIBIT_STRONG, INHIBIT_WEAK, randint0, artifact::to_a, artifact::to_h, and VERYHIGH_TO_AC.

Referenced by add_ability_aux().

static void add_to_dam ( struct artifact art,
int  fixed,
int  random 
)
static

Adds to_d, if not too high already.

References file_putf(), HIGH_TO_DAM, INHIBIT_STRONG, INHIBIT_WEAK, randint0, artifact::to_d, artifact::to_h, and VERYHIGH_TO_DAM.

Referenced by add_ability_aux().

static void add_to_hit ( struct artifact art,
int  fixed,
int  random 
)
static

Adds to_h, if not too high already.

References file_putf(), HIGH_TO_HIT, INHIBIT_STRONG, INHIBIT_WEAK, randint0, artifact::to_h, and VERYHIGH_TO_HIT.

Referenced by add_ability_aux().

static void add_weight_mod ( struct artifact art)
static

Lowers weight.

References file_putf(), and artifact::weight.

Referenced by add_ability_aux().

static void adjust_freqs ( struct artifact_set_data data)
static

Adjust the parsed frequencies for any peculiarities of the algorithm.

For example, if stat bonuses and sustains are being added in a correlated fashion, it will tend to push the frequencies up for both of them. In this method we compensate for cases like this by applying corrective scaling.

References artifact_set_data::art_probs.

Referenced by parse_frequencies().

char* artifact_gen_name ( struct artifact a,
const char ***  words 
)


Generation of a set of random artifacts

Use W. Sheldon Simms' random name generator.

References buf, BUFLEN, MAX_NAME_LEN, MIN_NAME_LEN, my_strcap(), one_in_, randname_make(), RANDNAME_TOLKIEN, string_make(), and strnfmt().

Referenced by design_artifact(), and test_names().

static int artifact_power ( int  a_idx,
char *  reason 
)
static


Calculation of the statistics of an artifact set

Return the artifact power, by generating a "fake" object based on the artifact, and calling the common object_power function

References a_info, buf, file_putf(), object::known, make_fake_artifact(), object_copy(), object_delete(), object_desc(), object_new(), object_power(), ODESC_FULL, ODESC_PREFIX, and ODESC_SPOIL.

Referenced by design_artifact(), and store_base_power().

void artifact_prep ( struct artifact art,
const struct object_kind kind,
struct artifact_set_data data 
)
static void artifact_set_data_free ( struct artifact_set_data data)
static
static struct artifact_set_data* artifact_set_data_new ( void  )
static
static void build_freq_table ( struct artifact art,
int freq,
struct artifact_set_data data 
)
static

Build a suitable frequency table for this item, based on the generated frequencies.

The frequencies for any abilities that don't apply for this item type will be set to zero. First parameter is the artifact for which to generate the frequency table.

The second input parameter is a pointer to an array that the function will use to store the frequency table. The array must have size ART_IDX_TOTAL.

The resulting frequency table is cumulative for ease of use in the weighted randomization algorithm.

References art_idx_allarmor, art_idx_armor, art_idx_boot, art_idx_bow, art_idx_cloak, art_idx_gen, art_idx_glove, art_idx_headgear, art_idx_melee, art_idx_nonweapon, art_idx_shield, art_idx_weapon, artifact_set_data::art_probs, file_putf(), i, N_ELEMENTS, and artifact::tval.

Referenced by design_artifact().

static int choose_ability ( int freq_table)
static

Choose a random ability using weights based on the given cumulative frequency table.

A pointer to the frequency array (which must be of size ART_IDX_TOTAL) is passed as a parameter. The function returns a number representing the index of the ability chosen.

References file_putf(), and randint1.

Referenced by add_ability().

static void collect_artifact_data ( struct artifact_set_data data)
static
static void copy_artifact ( struct artifact a_src,
struct artifact a_dst 
)
static
void count_abilities ( const struct artifact art,
struct artifact_set_data data 
)

General abilities.

This section requires a bit more work than the others, because we have to consider cases where a certain ability might be found in a particular item type. For example, ESP is commonly found on headgear, so when we count ESP we must add it to either the headgear or general tally, depending on the base item. This permits us to have general abilities appear more commonly on a certain item type.

References object_kind::activation, artifact::activation, artifact_set_data::art_probs, file_putf(), FLAG_END, artifact::flags, flags_test(), lookup_kind(), num, of_has, OF_SIZE, artifact::sval, and artifact::tval.

Referenced by collect_artifact_data().

void count_bow_abilities ( const struct artifact art,
struct artifact_set_data data 
)
void count_high_resists ( const struct artifact art,
struct artifact_set_data data 
)
void count_low_resists ( const struct artifact art,
struct artifact_set_data data 
)
void count_modifiers ( const struct artifact art,
struct artifact_set_data data 
)
void count_nonweapon_abilities ( const struct artifact art,
struct artifact_set_data data 
)
void count_weapon_abilities ( const struct artifact art,
struct artifact_set_data data 
)
void create_artifact_set ( struct artifact_set_data data)

Create a random artifact set.

The resulting set will have at least 80% the number of artifacts from any given tval as the original artifact set. This means that tvals with less than 5 artifacts in the original set will always have equal or increased numbers on the new set.

References artifact::aidx, design_artifact(), i, mem_free(), mem_zalloc(), TV_MAX, and artifact_set_data::tv_num.

Referenced by do_randart().

static void describe_artifact ( int  aidx,
int  power 
)
static

Give an artifact a (boring) description.

References a_info, artifact::aidx, desc, format(), my_strcat(), string_free(), string_make(), artifact::text, artifact::tval, and tval_find_name().

Referenced by design_artifact().

static void design_artifact ( struct artifact_set_data data,
int  tv,
int aidx 
)
static
void do_randart ( u32b  randart_seed,
bool  create_file 
)
static struct object_kind* get_base_item ( struct artifact_set_data data,
int  tval 
)
static
static int get_base_item_tval ( struct artifact_set_data data)
static


Generation of a random artifact

Pick a random base item tval

References randint1, artifact_set_data::tv_freq, TV_MAX, and artifact::tval.

Referenced by design_artifact().

static void make_bad ( struct artifact art,
int  level 
)
static

Make it bad, or if it's already bad, make it worse!

References add_curse(), artifact::flags, i, artifact::modifiers, num, OBJ_MOD_MAX, of_on, one_in_, randint1, artifact::to_a, artifact::to_d, and artifact::to_h.

Referenced by design_artifact().

static void parse_frequencies ( struct artifact_set_data data)
static

Parse the artifacts and write frequencies of their abilities and base object kinds.

This is used to give dynamic generation probabilities.

References adjust_freqs(), artifact_set_data::art_probs, collect_artifact_data(), file_putf(), i, rescale_freqs(), artifact_set_data::tv_freq, TV_MAX, artifact_set_data::tv_probs, and tval_find_name().

Referenced by do_randart().

static void remove_contradictory ( struct artifact art)
static

Clean up the artifact by removing illogical combinations of powers.

References artifact::flags, artifact::modifiers, of_has, and of_off.

Referenced by add_ability(), and design_artifact().

static void rescale_freqs ( struct artifact_set_data data)
static

Rescale the abilities so that dependent / independent abilities are comparable.

We do this by rescaling the frequencies for item-dependent abilities as though the entire set was made up of that item type. For example, if one bow out of three has extra might, and there are 120 artifacts in the full set, we rescale the frequency for extra might to 40 (if we had 120 randart bows, about 40 would have extra might).

This will allow us to compare the frequencies of all ability types, no matter what the dependency. We assume that generic abilities (like resist fear in the current version) don't need rescaling. This introduces some inaccuracy in cases where specific instances of an ability (like INT bonus on helms) have been counted separately - ideally we should adjust for this in the general case. However, as long as this doesn't occur too often, it shouldn't be a big issue.

The following loops look complicated, but they are simply equivalent to going through each of the relevant ability types one by one.

References artifact_set_data::armor_total, art_idx_allarmor, art_idx_armor, art_idx_boot, art_idx_bow, art_idx_cloak, art_idx_glove, art_idx_headgear, art_idx_melee, art_idx_nonweapon, art_idx_shield, art_idx_weapon, artifact_set_data::art_probs, artifact_set_data::boot_total, artifact_set_data::bow_total, artifact_set_data::cloak_total, artifact_set_data::glove_total, artifact_set_data::headgear_total, i, artifact_set_data::melee_total, N_ELEMENTS, artifact_set_data::shield_total, and artifact_set_data::total.

Referenced by parse_frequencies().

static void store_base_power ( struct artifact_set_data data)
static
static void try_supercharge ( struct artifact art,
s32b  target_power,
struct artifact_set_data data 
)
static

Try to supercharge this item by running through the list of the supercharge abilities and attempting to add each in turn.

An artifact only gets one chance at each of these up front (if applicable).

References angband_constants::a_max, AGGR_POWER, artifact_set_data::art_probs, artifact::dd, file_putf(), artifact::flags, INHIBIT_BLOWS, INHIBIT_MIGHT, INHIBIT_SHOTS, INHIBIT_STRONG, INHIBIT_WEAK, artifact::modifiers, of_on, randint0, randint1, artifact::to_a, artifact::tval, and z_info.

Referenced by design_artifact().

Variable Documentation

struct activation* activations
s16b art_idx_allarmor[]
static
Initial value:
= {
ART_IDX_ALLARMOR_WEIGHT
}

Referenced by build_freq_table(), and rescale_freqs().

s16b art_idx_armor[]
static
Initial value:
= {
ART_IDX_ARMOR_AC,
ART_IDX_ARMOR_STEALTH,
ART_IDX_ARMOR_HLIFE,
ART_IDX_ARMOR_CON,
ART_IDX_ARMOR_LRES,
ART_IDX_ARMOR_ALLRES,
ART_IDX_ARMOR_HRES}

Referenced by build_freq_table(), and rescale_freqs().

s16b art_idx_boot[]
static
Initial value:
= {
ART_IDX_BOOT_AC,
ART_IDX_BOOT_FEATHER,
ART_IDX_BOOT_STEALTH,
ART_IDX_BOOT_SPEED
}

Referenced by build_freq_table(), and rescale_freqs().

s16b art_idx_bow[]
static
Initial value:
= {
ART_IDX_BOW_SHOTS,
ART_IDX_BOW_MIGHT,
ART_IDX_BOW_BRAND,
ART_IDX_BOW_SLAY
}


Arrays of indices by item type, used in frequency generation

Referenced by build_freq_table(), and rescale_freqs().

s16b art_idx_cloak[]
static
Initial value:
= {
ART_IDX_CLOAK_AC,
ART_IDX_CLOAK_STEALTH
}

Referenced by build_freq_table(), and rescale_freqs().

s16b art_idx_gen[]
static

Referenced by build_freq_table().

s16b art_idx_glove[]
static
Initial value:
= {
ART_IDX_GLOVE_AC,
ART_IDX_GLOVE_FA,
ART_IDX_GLOVE_DEX
}

Referenced by build_freq_table(), and rescale_freqs().

s16b art_idx_headgear[]
static
Initial value:
= {
ART_IDX_HELM_AC,
ART_IDX_HELM_RBLIND,
ART_IDX_HELM_ESP,
ART_IDX_HELM_SINV,
ART_IDX_HELM_WIS,
ART_IDX_HELM_INT
}

Referenced by build_freq_table(), and rescale_freqs().

s16b art_idx_high_resist[]
static
Initial value:
= {
ART_IDX_GEN_RPOIS,
ART_IDX_GEN_RFEAR,
ART_IDX_GEN_RLIGHT,
ART_IDX_GEN_RDARK,
ART_IDX_GEN_RBLIND,
ART_IDX_GEN_RCONF,
ART_IDX_GEN_RSOUND,
ART_IDX_GEN_RSHARD,
ART_IDX_GEN_RNEXUS,
ART_IDX_GEN_RNETHER,
ART_IDX_GEN_RCHAOS,
ART_IDX_GEN_RDISEN,
ART_IDX_GEN_PSTUN
}

Referenced by add_high_resist().

s16b art_idx_melee[]
static
Initial value:
= {
ART_IDX_MELEE_BLESS,
ART_IDX_MELEE_SINV,
ART_IDX_MELEE_BRAND,
ART_IDX_MELEE_SLAY,
ART_IDX_MELEE_BLOWS,
ART_IDX_MELEE_AC,
ART_IDX_MELEE_DICE,
ART_IDX_MELEE_WEIGHT,
ART_IDX_MELEE_TUNN
}

Referenced by build_freq_table(), and rescale_freqs().

s16b art_idx_nonweapon[]
static
Initial value:
= {
ART_IDX_NONWEAPON_HIT,
ART_IDX_NONWEAPON_DAM,
ART_IDX_NONWEAPON_HIT_DAM,
ART_IDX_NONWEAPON_AGGR,
ART_IDX_NONWEAPON_BRAND,
ART_IDX_NONWEAPON_SLAY,
ART_IDX_NONWEAPON_BLOWS,
ART_IDX_NONWEAPON_SHOTS
}

Referenced by build_freq_table(), and rescale_freqs().

s16b art_idx_shield[]
static
Initial value:
= {
ART_IDX_SHIELD_AC,
ART_IDX_SHIELD_LRES
}

Referenced by build_freq_table(), and rescale_freqs().

s16b art_idx_weapon[]
static
Initial value:
= {
ART_IDX_WEAPON_HIT,
ART_IDX_WEAPON_DAM,
ART_IDX_WEAPON_AGGR
}

Referenced by build_freq_table(), and rescale_freqs().

ang_file* log_file = NULL
static

Referenced by object_power(), and object_value_real().