summaryrefslogtreecommitdiff
path: root/src/map/clif.c
diff options
context:
space:
mode:
authorskotlex <skotlex@54d463be-8e91-2dee-dedb-b68131a5f0ec>2008-03-07 15:02:32 +0000
committerskotlex <skotlex@54d463be-8e91-2dee-dedb-b68131a5f0ec>2008-03-07 15:02:32 +0000
commite8ab2885e6c07cdff08e66b55ac6bf5572e39402 (patch)
tree252a6f6b5d8b5fe93f18041e8b55b543cde956e1 /src/map/clif.c
parent88d795a036a4f954df1987fe3b241964df182a65 (diff)
downloadhercules-e8ab2885e6c07cdff08e66b55ac6bf5572e39402.tar.gz
hercules-e8ab2885e6c07cdff08e66b55ac6bf5572e39402.tar.bz2
hercules-e8ab2885e6c07cdff08e66b55ac6bf5572e39402.tar.xz
hercules-e8ab2885e6c07cdff08e66b55ac6bf5572e39402.zip
- Added config settings mob_active_time and boss_active_time, what they do is specify a duration during which monsters will keep running their active AI after all players have left their vecinity. Their current defaults are set to 0 (disabled).
- Script induced status changes can now be reduced by stats/cards (but only trigger rate is reduced, not duration) - Battle delay timers will now check if the target player has the invincible timer active or not. - Adjusted mob_ai_sub_hard to return a bool indicating whether the AI was executed or not. - Adjusted clif_damage and clif_skill_damage to set the endure type value based on dmotion and damage, rather than hardchecking for SC_ENDURE. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@12315 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src/map/clif.c')
-rw-r--r--src/map/clif.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/src/map/clif.c b/src/map/clif.c
index 032fb275a..694e6d987 100644
--- a/src/map/clif.c
+++ b/src/map/clif.c
@@ -3472,6 +3472,9 @@ void clif_getareachar_unit(struct map_session_data* sd,struct block_list *bl)
}
}
+//Modifies the type of damage according to status changes [Skotlex]
+#define clif_calc_delay(type,damage,delay) ((type)==0x0a?type:((delay)==0&&(damage)>0?9:type))
+
/*==========================================
* Estimates walk delay based on the damage criteria. [Skotlex]
*------------------------------------------*/
@@ -3515,10 +3518,9 @@ int clif_damage(struct block_list* src, struct block_list* dst, unsigned int tic
nullpo_retr(0, src);
nullpo_retr(0, dst);
+ type = clif_calc_delay(type,damage+damage2,ddelay);
sc = status_get_sc(dst);
if(sc && sc->count) {
- if(type != 4 && dst->type == BL_PC && sc->data[SC_ENDURE] && !map_flag_gvg(dst->m))
- type = 9;
if(sc->data[SC_HALLUCINATION]) {
if(damage) damage = damage*(sc->data[SC_HALLUCINATION]->val2) + rand()%100;
if(damage2) damage2 = damage2*(sc->data[SC_HALLUCINATION]->val2) + rand()%100;
@@ -4090,10 +4092,9 @@ int clif_skill_damage(struct block_list *src,struct block_list *dst,unsigned int
nullpo_retr(0, src);
nullpo_retr(0, dst);
+ type = clif_calc_delay(type,damage,ddelay);
sc = status_get_sc(dst);
if(sc && sc->count) {
- if(type != 4 && dst->type == BL_PC && sc->data[SC_ENDURE] && !map_flag_gvg(dst->m))
- type = 9;
if(sc->data[SC_HALLUCINATION] && damage)
damage = damage*(sc->data[SC_HALLUCINATION]->val2) + rand()%100;
}
@@ -4179,7 +4180,7 @@ int clif_skill_damage2(struct block_list *src,struct block_list *dst,unsigned in
nullpo_retr(0, dst);
type = (type>0)?type:skill_get_hit(skill_id);
- type = clif_calc_delay(type, ddelay);
+ type = clif_calc_delay(type,damage,ddelay);
sc = status_get_sc(dst);
if(sc && sc->count) {