Crossfire Server, Branches 1.12  R18729
Monster movements

Macros

#define ALLRUN   6
 
#define CIRCLE1   32
 
#define CIRCLE2   48
 
#define DISTATT   1
 
#define DISTHIT   7
 
#define HI4   240
 
#define HITRUN   3
 
#define LO4   15
 
#define PACEH   64
 
#define PACEH2   80
 
#define PACEV   128
 
#define PACEV2   144
 
#define PETMOVE   16
 
#define RANDO   96
 
#define RANDO2   112
 
#define RUNATT   2
 
#define RUSH   5
 
#define WAIT2   8
 
#define WAITATT   4
 

Detailed Description

Author
kholl.nosp@m.and@.nosp@m.sunla.nosp@m.b.ci.nosp@m.t.cor.nosp@m.nell.nosp@m..edu

if your monsters start acting wierd, mail me.

Macro Definition Documentation

#define ALLRUN   6

Always run never attack good for sim. of weak player

Definition at line 821 of file define.h.

Referenced by move_monster().

#define CIRCLE1   32

If the upper four bits of move_type / attack_movement are set to this number, the monster will move in a circle until it is attacked, or the enemy field is set, this is good for non-aggressive monsters and NPC

Definition at line 841 of file define.h.

Referenced by monster_move_no_enemy().

#define CIRCLE2   48

Same as CIRCLE1 but a larger circle is used

Definition at line 848 of file define.h.

Referenced by monster_move_no_enemy().

#define DISTATT   1

Move toward a player if far, but mantain some space, attack from a distance - good for missile users only

Definition at line 814 of file define.h.

Referenced by move_monster().

#define DISTHIT   7

Attack from a distance if hit as recommended by Frank

Definition at line 822 of file define.h.

Referenced by move_monster().

#define HI4   240

Definition at line 876 of file define.h.

Referenced by check_enemy(), find_enemy(), monster_move_no_enemy(), and move_monster().

#define HITRUN   3

Run to then hit player then run away cyclicly.

Definition at line 818 of file define.h.

Referenced by move_monster().

#define LO4   15

bitmasks for upper and lower 4 bits from 8 bit fields

Definition at line 875 of file define.h.

Referenced by move_monster().

#define PACEH   64

The monster will pace back and forth until attacked this is HORIZONTAL movement

Definition at line 849 of file define.h.

Referenced by monster_move_no_enemy().

#define PACEH2   80

The monster will pace as above but the length of the pace area is longer and the monster stops before changing directions this is HORIZONTAL movement

Definition at line 852 of file define.h.

Referenced by monster_move_no_enemy().

#define PACEV   128

The monster will pace back and forth until attacked this is VERTICAL movement

Definition at line 865 of file define.h.

Referenced by monster_move_no_enemy().

#define PACEV2   144

The monster will pace as above but the length of the pace area is longer and the monster stops before changing directions this is VERTICAL movement

Definition at line 868 of file define.h.

Referenced by monster_move_no_enemy().

#define PETMOVE   16

if the upper four bits of attack_movement are set to this number, the monster follows a player until the owner calls it back or off player followed denoted by 0b->owner the monster will try to attack whatever the player is attacking, and will continue to do so until the calls off the monster - a key command will be inserted to do so

Definition at line 826 of file define.h.

Referenced by check_enemy(), do_mood_floor(), find_enemy(), fix_summon_pet(), get_pet_enemy(), hit_player(), monster_move_no_enemy(), mood_change(), move_monster(), polymorph_living(), steal(), summon_golem(), and use_oratory().

#define RANDO   96

The monster will go in a random direction until it is stopped by an obstacle, then it chooses another direction.

Definition at line 859 of file define.h.

Referenced by monster_move_no_enemy().

#define RANDO2   112

Constantly move in a different random direction

Definition at line 864 of file define.h.

Referenced by monster_move_no_enemy(), and peacemaker_type_process().

#define RUNATT   2

Tun but attack if player catches up to object.

Definition at line 817 of file define.h.

Referenced by move_monster().

#define RUSH   5

Rush toward player blindly, similiar to dumb monster

Definition at line 820 of file define.h.

Referenced by move_monster().

#define WAIT2   8

Monster does not try to move towards player if far maintains comfortable distance

Definition at line 823 of file define.h.

Referenced by move_monster().

#define WAITATT   4

Wait for player to approach then hit, move if hit

Definition at line 819 of file define.h.

Referenced by move_monster().