diff options
author | skotlex <skotlex@54d463be-8e91-2dee-dedb-b68131a5f0ec> | 2006-04-12 19:49:26 +0000 |
---|---|---|
committer | skotlex <skotlex@54d463be-8e91-2dee-dedb-b68131a5f0ec> | 2006-04-12 19:49:26 +0000 |
commit | 784ef07ca06fdc7a48eede4de1a3748f409568c1 (patch) | |
tree | cc8323683cb4770684d89685b8ce1836db33e105 /src/map/skill.c | |
parent | a610f1f5203c821e4eb2384c981d12a5a83076bc (diff) | |
download | hercules-784ef07ca06fdc7a48eede4de1a3748f409568c1.tar.gz hercules-784ef07ca06fdc7a48eede4de1a3748f409568c1.tar.bz2 hercules-784ef07ca06fdc7a48eede4de1a3748f409568c1.tar.xz hercules-784ef07ca06fdc7a48eede4de1a3748f409568c1.zip |
- Added cast time to pick stone of 3 secs and 500ms delay
- Removed area of effect of Assumptio.
- Added "can't act" delay update when an auto-spell triggers.
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@6021 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src/map/skill.c')
-rw-r--r-- | src/map/skill.c | 32 |
1 files changed, 25 insertions, 7 deletions
diff --git a/src/map/skill.c b/src/map/skill.c index 27b133033..92ea69325 100644 --- a/src/map/skill.c +++ b/src/map/skill.c @@ -1324,10 +1324,12 @@ int skill_additional_effect (struct block_list* src, struct block_list *bl, int }
//Reports say that autospell effects get triggered on skills and pretty much everything including splash attacks. [Skotlex]
- //Here we use the nk value to trigger spells only on damage causing skills (otherwise stuff like AL_HEAL will trigger them)
- if(sd && !status_isdead(bl) && src != bl &&
- !(skillid && skill_get_nk(skillid)&NK_NO_DAMAGE)) {
+ //No need to check the NK value as this function is only called on attacks
+ //(or stuff that should invoke these things.
+ if(sd && !status_isdead(bl) && src != bl/* &&
+ !(skillid && skill_get_nk(skillid)&NK_NO_DAMAGE)*/) {
struct block_list *tbl;
+ struct unit_data *ud;
int i;
for (i = 0; i < MAX_PC_BONUS && sd->autospell[i].id; i++) {
@@ -1361,6 +1363,13 @@ int skill_additional_effect (struct block_list* src, struct block_list *bl, int skill_castend_damage_id(src, tbl, skill, skill2, tick, 0);
break;
}
+ //Set canact delay. [Skotlex]
+ ud = unit_bl2ud(src);
+ if (ud) {
+ rate = skill_delayfix(src, skill, skill2);
+ if (DIFF_TICK(ud->canact_tick, tick + rate) < 0)
+ ud->canact_tick = tick+rate;
+ }
break; //Only one auto skill comes off at a time.
}
}
@@ -1450,6 +1459,7 @@ int skill_counter_additional_effect (struct block_list* src, struct block_list * if(dstsd && !status_isdead(bl) && src != bl && !(skillid && skill_get_nk(skillid)&NK_NO_DAMAGE))
{
struct block_list *tbl;
+ struct unit_data *ud;
int i, skillid, skilllv, rate;
for (i = 0; i < MAX_PC_BONUS; i++) {
@@ -1484,6 +1494,14 @@ int skill_counter_additional_effect (struct block_list* src, struct block_list * skill_castend_damage_id(bl, tbl, skillid, skilllv, tick, 0);
break;
}
+ //Set canact delay. [Skotlex]
+ ud = unit_bl2ud(bl);
+ if (ud) {
+ rate = skill_delayfix(bl, skillid, skilllv);
+ if (DIFF_TICK(ud->canact_tick, tick + rate) < 0)
+ ud->canact_tick = tick+rate;
+ }
+ break; //trigger only one auto-spell per hit.
}
}
return 0;
@@ -3702,6 +3720,7 @@ int skill_castend_nodamage_id (struct block_list *src, struct block_list *bl, in case SG_MOON_COMFORT:
case SG_STAR_COMFORT:
case NPC_HALLUCINATION:
+ case HP_ASSUMPTIO:
clif_skill_nodamage(src,bl,skillid,skilllv,
sc_start(bl,type,100,skilllv,skill_get_time(skillid,skilllv)));
break;
@@ -3723,7 +3742,7 @@ int skill_castend_nodamage_id (struct block_list *src, struct block_list *bl, in skill_moonlit(bl, NULL, skilllv); //The knockback must be invoked before starting the effect which places down the map cells. [Skotlex]
break;
-
+/* Was modified to only affect targetted char. [Skotlex]
case HP_ASSUMPTIO:
if (flag&1)
sc_start(bl,type,100,skilllv,skill_get_time(skillid,skilllv));
@@ -3736,7 +3755,7 @@ int skill_castend_nodamage_id (struct block_list *src, struct block_list *bl, in clif_skill_nodamage(src,bl,skillid,skilllv,1);
}
break;
-
+*/
case SM_ENDURE: /* インデュア */
clif_skill_nodamage(src,bl,skillid,skilllv,
sc_start(bl,type,100,skilllv,skill_get_time(skillid,skilllv)));
@@ -7061,8 +7080,7 @@ int skill_unit_onplace_timer(struct skill_unit *src,struct block_list *bl,unsign break;
case UNT_GRAVITATION:
- if (skill_attack(BF_MAGIC,ss,&src->bl,bl,sg->skill_id,sg->skill_lv,tick,0))
- skill_additional_effect(ss,bl,sg->skill_id,sg->skill_lv,BF_MAGIC,tick);
+ skill_attack(BF_MAGIC,ss,&src->bl,bl,sg->skill_id,sg->skill_lv,tick,0);
break;
}
if (sg->val3 == HW_MAGICPOWER && sc && sc->data[SC_MAGICPOWER].timer < 0 && sc->data[SC_MAGICPOWER].val1 > 0)
|