Angband
Macros | Enumerations | Functions | Variables
mon-summon.h File Reference

Monster summoning. More...

#include "monster.h"
#include "list-summon-types.h"

Go to the source code of this file.

Macros

#define S(a, b, c, d, e, f, g, h)   S_##a,
 

Enumerations

enum  summon_flag { S, S }
 Flags for summon_specific() More...
 

Functions

int summon_name_to_idx (const char *name)
 Functions. More...
 
const char * summon_desc (int type)
 
int summon_message_type (int summon_type)
 The message type for a particular summon. More...
 
int summon_specific (int y1, int x1, int lev, int type, bool delay, bool call)
 Places a monster (of the specified "type") near the given location. More...
 

Variables

struct monster_basekin_base
 Variables. More...
 

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.

Macro Definition Documentation

◆ S

#define S (   a,
  b,
  c,
  d,
  e,
  f,
  g,
  h 
)    S_##a,

Enumeration Type Documentation

◆ summon_flag

Flags for summon_specific()

Enumerator

Function Documentation

◆ summon_desc()

const char* summon_desc ( int  type)

◆ summon_message_type()

int summon_message_type ( int  summon_type)

The message type for a particular summon.

References summon_details::message_type, and summon_info.

Referenced by effect_handler_SUMMON().

◆ summon_name_to_idx()

int summon_name_to_idx ( const char *  name)

Functions.

References i, streq, and summon_info.

Referenced by effect_param().

◆ summon_specific()

int summon_specific ( int  y1,
int  x1,
int  lev,
int  type,
bool  delay,
bool  call 
)

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

Return true iff a monster was actually summoned.

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

Note: S_UNIQUE and S_WRAITH will summon Uniques Note: S_ANY, S_HI_UNDEAD, S_HI_DEMON and S_HI_DRAGON may summon Uniques Note: None of the other summon codes will ever summon Uniques.

This function has been changed. We now take 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_race::level, mon_inc_timed(), MON_TMD_FLG_NOMESSAGE, NULL, place_new_monster(), monster::race, scatter(), monster_race::speed, player_state::speed, square_isempty(), square_iswarded(), square_monster(), player::state, summon_specific_okay(), summon_specific_type, and type.

Referenced by effect_handler_SUMMON().

Variable Documentation

◆ kin_base

struct monster_base* kin_base

Variables.

Variables.

Referenced by effect_handler_SUMMON().