Data Structures | Functions | Variables
mon-summon.h File Reference

Monster summoning. More...

#include "monster.h"

Go to the source code of this file.

Data Structures

struct  monster_base_list
struct  summon


int summon_name_to_idx (const char *name)
 Functions. More...
int summon_fallback_type (int summon_type)
 The fallback type for a particular summon. More...
int summon_message_type (int summon_type)
 The message type for a particular summon. More...
const char * summon_desc (int type)
 The description for a particular summon. More...
int summon_specific (struct loc grid, int lev, int type, bool delay, bool call)
 Places a monster (of the specified "type") near the given location. More...
struct monster_raceselect_shape (struct monster *mon, int type)
 Select a race for a monster shapechange from its possible summons. More...


struct monster_basekin_base
 Variables. More...
struct file_parser summon_parser

Detailed Description

Monster summoning.

Copyright (c) 1997-2007 Ben Harrison, James E. Wilson, Robert A. Koeneke

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.

Function Documentation

◆ select_shape()

struct monster_race* select_shape ( struct monster mon,
int  type 

Select a race for a monster shapechange from its possible summons.

References player::depth, get_mon_num(), get_mon_num_prep(), race, summon_specific_okay(), summon_specific_type, and type.

Referenced by monster_change_shape().

◆ summon_desc()

const char* summon_desc ( int  type)

The description for a particular summon.

References summon::desc, summon_max, and type.

Referenced by describe_effect().

◆ summon_fallback_type()

int summon_fallback_type ( int  summon_type)

The fallback type for a particular summon.

References summon::fallback.

Referenced by effect_handler_SUMMON().

◆ summon_message_type()

int summon_message_type ( int  summon_type)

The message type for a particular summon.

References summon::message_type.

Referenced by effect_handler_SUMMON().

◆ summon_name_to_idx()

int summon_name_to_idx ( const char *  name)

◆ summon_specific()

int summon_specific ( struct loc  grid,
int  lev,
int  type,
bool  delay,
bool  call 

Places a monster (of the specified "type") near the given location.

Return the siummoned monster's level iff a monster was actually summoned.

We will attempt to place the monster up to 10 times before giving up.

This function takes the "monster level" of the summoning monster as a parameter, and use that, along with the current dungeon level, to help determine the level of the desired monster. Note that this is an upper bound, and also tends to "prefer" monsters of that level. Currently, we use the average of the dungeon and monster levels, and then add five to allow slight increases in monster power.

Note that we use the new "monster allocation table" creation code to restrict the "get_mon_num()" function to the set of "legal" monsters, making this function much faster and more reliable.

Note that this function may not succeed, though this is very rare.

References call_monster(), cave, player::depth, monster::energy, get_mon_num(), get_mon_num_prep(), i, monster_group::index, monster_group_info::index, monster_race::level, monster::m_timed, chunk::mon_current, MON_GROUP_SUMMON, place_new_monster(), monster::race, race, monster_group_info::role, scatter(), monster_race::speed, player_state::speed, square_isdecoyed(), square_isempty(), square_iswarded(), square_monster(), player::state, summon_group(), summon_name_to_idx(), summon_specific_okay(), summon_specific_type, turns, and type.

Referenced by effect_handler_SUMMON().

Variable Documentation

◆ kin_base

struct monster_base* kin_base



Referenced by effect_handler_SUMMON(), and monster_change_shape().

◆ summon_parser

struct file_parser summon_parser