summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Changelog-Trunk.txt5
-rw-r--r--doc/mob_db_mode_list.txt31
-rw-r--r--src/map/status.c4
-rw-r--r--src/map/status.h2
-rw-r--r--src/map/unit.c9
5 files changed, 41 insertions, 10 deletions
diff --git a/Changelog-Trunk.txt b/Changelog-Trunk.txt
index 15ffe34db..6059c9d5a 100644
--- a/Changelog-Trunk.txt
+++ b/Changelog-Trunk.txt
@@ -4,6 +4,11 @@ AS OF SVN REV. 5091, WE ARE NOW USING TRUNK. ALL UNTESTED BUGFIXES/FEATURES GO
IF YOU HAVE A WORKING AND TESTED BUGFIX PUT IT INTO STABLE AS WELL AS TRUNK.
2004/12/06
+ * Renamed the mob mode Cast-Sensor Melee to Cast-Sensor idle since these
+ mobs really should only be cast-sensing when they are not after another
+ target. [Skotlex]
+ * Added a Aegis Mob Type -> eA Mode table conversion to the mob modes doc.
+ [Skotlex]
* Updated sql-files [Playtester]
* Gave a minimum think time to the dummy mob and to clones. [Skotlex]
* Moved setting a mob's chase/attack states from the mob_ai to unit_attack
diff --git a/doc/mob_db_mode_list.txt b/doc/mob_db_mode_list.txt
index 7b2974c41..f5c5e8fa4 100644
--- a/doc/mob_db_mode_list.txt
+++ b/doc/mob_db_mode_list.txt
@@ -4,7 +4,7 @@ MD_CANMOVE | 0x0001 | 1
MD_LOOTER | 0x0002 | 2
MD_AGGRESSIVE | 0x0004 | 4
MD_ASSIST | 0x0008 | 8
-MD_CASTSENSOR_MELEE | 0x0010 | 16
+MD_CASTSENSOR_IDLE | 0x0010 | 16
MD_BOSS | 0x0020 | 32
MD_PLANT | 0x0040 | 64
MD_CANATTACK | 0x0080 | 128
@@ -30,8 +30,8 @@ Aggressive: normal aggressive mob, will look for a close-by player to attack.
Assist: When a nearby mob of the same class attacks, assist types will join them.
-Cast Sensor Melee: Will go after characters who start casting on them if idle
- or during melee attacks (they will leave their current target alone)
+Cast Sensor Idle: Will go after characters who start casting on them if idle
+ or walking (without a target).
Cast Sensor Chase: Will go after characters who start casting on them if idle
or chasing other players (they switch chase targets)
@@ -56,3 +56,28 @@ Change Target Melee: Enables a mob to switch targets when attacked while
Change Target Chase: Enables a mob to switch targets when attacked while
chasing another character.
+
+Aegis Mob Types
+---------------
+What Aegis has are mob-types, where each type represents an AI behaviour that
+is mimicked by a group of eA mode bits. This is the table to convert from one
+to another:
+
+Aegis/eA (description)
+01: 0x0081 (passive)
+02: 0x0083 (passive looter)
+03: 0x1089 (passive, assist and change-target melee)
+04: 0x3885 (angry, change-target melee/chase)
+05: 0x2085 (aggro, change-target chase)
+06: 0x0000 (plants)
+07: 0x108B (aggro, immobile, assist, change-target melee)
+10: 0x0084 (aggro, immobile)
+12: 0x0085 (aggro)
+13: 0x018D (aggro, assist, detector)
+17: 0x0091 (passive, cast sensor idle)
+19: 0x3095 (aggro, change-target melee/chase, cast sensor idle)
+20: 0x3295 (aggro, change-target melee/chase, cast sensor idle/chase)
+21: 0x3695 (aggro, change-target melee/chase, cast sensor idle/chase, chase-change target)
+
+- Note that the detector bit due to being Insect/Demon and Boss mode bits need to
+ be added independently of this list.
diff --git a/src/map/status.c b/src/map/status.c
index 397319d72..802a16473 100644
--- a/src/map/status.c
+++ b/src/map/status.c
@@ -1633,7 +1633,9 @@ int status_calc_pc(struct map_session_data* sd,int first)
//FIXME: Most of these stuff should be calculated once, but how do I fix the malloc_set above to do that? [Skotlex]
status->speed = DEFAULT_WALK_SPEED;
- status->mode = MD_CANMOVE|MD_CANATTACK|MD_LOOTER|MD_ASSIST|MD_AGGRESSIVE|MD_CASTSENSOR_MELEE|MD_CASTSENSOR_CHASE;
+ //Give them all modes except these (useful for clones)
+ status->mode = MD_MASK&~(MD_BOSS|MD_PLANT|MD_DETECTOR|MD_ANGRY);
+
status->size = (sd->class_&JOBL_BABY)?0:1;
if (battle_config.character_size && pc_isriding(sd)) { //[Lupus]
if (sd->class_&JOBL_BABY) {
diff --git a/src/map/status.h b/src/map/status.h
index 9986ad9a0..fd73b98af 100644
--- a/src/map/status.h
+++ b/src/map/status.h
@@ -412,7 +412,7 @@ extern int percentrefinery[5][MAX_REFINE+1]; //The last slot always has a 0% suc
#define MD_LOOTER 0x0002
#define MD_AGGRESSIVE 0x0004
#define MD_ASSIST 0x0008
-#define MD_CASTSENSOR_MELEE 0x0010
+#define MD_CASTSENSOR_IDLE 0x0010
#define MD_BOSS 0x0020
#define MD_PLANT 0x0040
#define MD_CANATTACK 0x0080
diff --git a/src/map/unit.c b/src/map/unit.c
index ef60579b6..f48f4a951 100644
--- a/src/map/unit.c
+++ b/src/map/unit.c
@@ -951,7 +951,7 @@ int unit_skilluse_id2(struct block_list *src, int target_id, int skill_num, int
TBL_MOB *md = (TBL_MOB*)target;
mobskill_event(md, src, tick, -1); //Cast targetted skill event.
//temp: used to store mob's mode now.
- if (tstatus->mode&(MD_CASTSENSOR_MELEE|MD_CASTSENSOR_CHASE) &&
+ if (tstatus->mode&(MD_CASTSENSOR_IDLE|MD_CASTSENSOR_CHASE) &&
battle_check_target(target, src, BCT_ENEMY) > 0)
{
switch (md->state.skillstate) {
@@ -963,15 +963,14 @@ int unit_skilluse_id2(struct block_list *src, int target_id, int skill_num, int
md->state.aggressive = (temp&MD_ANGRY)?1:0;
md->min_chase = md->db->range3;
break;
- case MSS_ANGRY:
- case MSS_BERSERK:
- if (!(tstatus->mode&MD_CASTSENSOR_MELEE))
- break;
case MSS_IDLE:
case MSS_WALK:
+ if (!(tstatus->mode&MD_CASTSENSOR_IDLE))
+ break;
md->target_id = src->id;
md->state.aggressive = (temp&MD_ANGRY)?1:0;
md->min_chase = md->db->range3;
+ break;
}
}
}