Adds new mob skill condition MSC_MOBNEARBYGT (#7130)
* Adds new mob skill condition MSC_MOBNEARBYGT as on official some monsters trigger skills when specific amount of other monsters are nearby.
This commit is contained in:
parent
322709f78d
commit
84d295e784
@ -43,6 +43,7 @@
|
|||||||
// afterskill After mob casts the specified skill.
|
// afterskill After mob casts the specified skill.
|
||||||
// casttargeted When a target is in cast range (no condition value).
|
// casttargeted When a target is in cast range (no condition value).
|
||||||
// rudeattacked When mob is rude attacked (no condition value).
|
// rudeattacked When mob is rude attacked (no condition value).
|
||||||
|
// mobnearbygt When monsters in range become greater than specified number.
|
||||||
//
|
//
|
||||||
// Status abnormalities specified through the statuson/statusoff system:
|
// Status abnormalities specified through the statuson/statusoff system:
|
||||||
// anybad (any type of state change) / stone / freeze / stun / sleep /
|
// anybad (any type of state change) / stone / freeze / stun / sleep /
|
||||||
|
@ -44,6 +44,7 @@
|
|||||||
// afterskill After mob casts the specified skill.
|
// afterskill After mob casts the specified skill.
|
||||||
// casttargeted When a target is in cast range (no condition value).
|
// casttargeted When a target is in cast range (no condition value).
|
||||||
// rudeattacked When mob is rude attacked (no condition value).
|
// rudeattacked When mob is rude attacked (no condition value).
|
||||||
|
// mobnearbygt When monsters in range become greater than specified number.
|
||||||
//
|
//
|
||||||
// Status abnormalities specified through the statuson/statusoff system:
|
// Status abnormalities specified through the statuson/statusoff system:
|
||||||
// anybad (any type of state change) / stone / freeze / stun / sleep /
|
// anybad (any type of state change) / stone / freeze / stun / sleep /
|
||||||
|
@ -44,6 +44,7 @@
|
|||||||
// afterskill After mob casts the specified skill.
|
// afterskill After mob casts the specified skill.
|
||||||
// casttargeted When a target is in cast range (no condition value).
|
// casttargeted When a target is in cast range (no condition value).
|
||||||
// rudeattacked When mob is rude attacked (no condition value).
|
// rudeattacked When mob is rude attacked (no condition value).
|
||||||
|
// mobnearbygt When monsters in range become greater than specified number.
|
||||||
//
|
//
|
||||||
// Status abnormalities specified through the statuson/statusoff system:
|
// Status abnormalities specified through the statuson/statusoff system:
|
||||||
// anybad (any type of state change) / stone / freeze / stun / sleep /
|
// anybad (any type of state change) / stone / freeze / stun / sleep /
|
||||||
|
@ -3765,8 +3765,9 @@ int mobskill_use(struct mob_data *md, t_tick tick, int event)
|
|||||||
case MSC_MASTERATTACKED:
|
case MSC_MASTERATTACKED:
|
||||||
flag = (md->master_id > 0 && (fbl=map_id2bl(md->master_id)) && unit_counttargeted(fbl) > 0); break;
|
flag = (md->master_id > 0 && (fbl=map_id2bl(md->master_id)) && unit_counttargeted(fbl) > 0); break;
|
||||||
case MSC_ALCHEMIST:
|
case MSC_ALCHEMIST:
|
||||||
flag = (md->state.alchemist);
|
flag = (md->state.alchemist); break;
|
||||||
break;
|
case MSC_MOBNEARBYGT:
|
||||||
|
flag = (map_foreachinallrange(mob_count_sub, &md->bl, AREA_SIZE, BL_MOB) > c2 ); break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -5794,6 +5795,7 @@ static bool mob_parse_row_mobskilldb(char** str, int columns, int current)
|
|||||||
{ "masterattacked", MSC_MASTERATTACKED },
|
{ "masterattacked", MSC_MASTERATTACKED },
|
||||||
{ "alchemist", MSC_ALCHEMIST },
|
{ "alchemist", MSC_ALCHEMIST },
|
||||||
{ "onspawn", MSC_SPAWN },
|
{ "onspawn", MSC_SPAWN },
|
||||||
|
{ "mobnearbygt", MSC_MOBNEARBYGT },
|
||||||
}, cond2[] ={
|
}, cond2[] ={
|
||||||
{ "anybad", -1 },
|
{ "anybad", -1 },
|
||||||
{ "stone", SC_STONE },
|
{ "stone", SC_STONE },
|
||||||
|
@ -430,6 +430,7 @@ enum e_mob_skill_condition {
|
|||||||
MSC_MASTERATTACKED,
|
MSC_MASTERATTACKED,
|
||||||
MSC_ALCHEMIST,
|
MSC_ALCHEMIST,
|
||||||
MSC_SPAWN,
|
MSC_SPAWN,
|
||||||
|
MSC_MOBNEARBYGT,
|
||||||
};
|
};
|
||||||
|
|
||||||
// The data structures for storing delayed item drops
|
// The data structures for storing delayed item drops
|
||||||
|
Loading…
x
Reference in New Issue
Block a user