summaryrefslogtreecommitdiff
path: root/src/map/skill.c
diff options
context:
space:
mode:
authorskotlex <skotlex@54d463be-8e91-2dee-dedb-b68131a5f0ec>2006-09-07 17:40:46 +0000
committerskotlex <skotlex@54d463be-8e91-2dee-dedb-b68131a5f0ec>2006-09-07 17:40:46 +0000
commit8cf58f2846e8a701fe61a149c5bf532732572780 (patch)
tree6492a544f57cffc01af8cd22a0e96dfbc1fe020a /src/map/skill.c
parent79f357bf323dbd91529bafe78160149851902377 (diff)
downloadhercules-8cf58f2846e8a701fe61a149c5bf532732572780.tar.gz
hercules-8cf58f2846e8a701fe61a149c5bf532732572780.tar.bz2
hercules-8cf58f2846e8a701fe61a149c5bf532732572780.tar.xz
hercules-8cf58f2846e8a701fe61a149c5bf532732572780.zip
- Removed the Warmth "stacking" code.
- Added back the effect of /doridori to skill-SP regen - Implemented a rough version of Angel of the Sun/Moon/Stars, it has a low chance of triggering on doridori-boosted SP-regen events. - Added sg_angel_skill_ratio to specify rate at which the Angel skill triggers. - Added unit_cancel_combo which takes care of ending a combo time and resuming normal attack 'inmediately' - Cleaned up some the SG_HATE code, you can't change hate targets anymore. - Increased duration of Miracle of the Sun/Moon/Stars to one hour. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@8664 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src/map/skill.c')
-rw-r--r--src/map/skill.c33
1 files changed, 20 insertions, 13 deletions
diff --git a/src/map/skill.c b/src/map/skill.c
index 6d84b7514..531cb9857 100644
--- a/src/map/skill.c
+++ b/src/map/skill.c
@@ -5408,28 +5408,36 @@ int skill_castend_nodamage_id (struct block_list *src, struct block_list *bl, in
break;
case SG_HATE:
- if (sd) {
+ if (sd && skilllv <= 3) {
clif_skill_nodamage(src,bl,skillid,skilllv,1);
+ if (sd->hate_mob[skilllv-1] != -1)
+ { //Can't change hate targets.
+ clif_skill_fail(sd,skillid,0,0);
+ break;
+ }
if(dstsd) //PC
{
sd->hate_mob[skilllv-1] = dstsd->status.class_;
pc_setglobalreg(sd,"PC_HATE_MOB_STAR",sd->hate_mob[skilllv-1]+1);
clif_hate_mob(sd,skilllv,sd->hate_mob[skilllv-1]);
+ break;
}
- else if(dstmd) // mob
+ if(dstmd) // mob
{
+ if (sd->hate_mob[skilllv-1] || tstatus->size != skilllv-1)
+ { //Can't change hate targets / wrong target size
+ clif_skill_fail(sd,skillid,0,0);
+ break;
+ }
switch(skilllv)
{
case 1:
- if (tstatus->size==0)
- {
- sd->hate_mob[0] = dstmd->class_;
- pc_setglobalreg(sd,"PC_HATE_MOB_SUN",sd->hate_mob[0]+1);
- clif_hate_mob(sd,skilllv,sd->hate_mob[skilllv-1]);
- } else clif_skill_fail(sd,skillid,0,0);
+ sd->hate_mob[0] = dstmd->class_;
+ pc_setglobalreg(sd,"PC_HATE_MOB_SUN",sd->hate_mob[0]+1);
+ clif_hate_mob(sd,skilllv,sd->hate_mob[skilllv-1]);
break;
case 2:
- if (tstatus->size==1 && tstatus->max_hp>=6000)
+ if (tstatus->max_hp>=6000)
{
sd->hate_mob[1] = dstmd->class_;
pc_setglobalreg(sd,"PC_HATE_MOB_MOON",sd->hate_mob[1]+1);
@@ -5437,16 +5445,13 @@ int skill_castend_nodamage_id (struct block_list *src, struct block_list *bl, in
} else clif_skill_fail(sd,skillid,0,0);
break;
case 3:
- if (tstatus->size==2 && tstatus->max_hp>=20000)
+ if (tstatus->max_hp>=20000)
{
sd->hate_mob[2] = dstmd->class_;
pc_setglobalreg(sd,"PC_HATE_MOB_STAR",sd->hate_mob[2]+1);
clif_hate_mob(sd,skilllv,sd->hate_mob[skilllv-1]);
} else clif_skill_fail(sd,skillid,0,0);
break;
- default:
- clif_skill_fail(sd,skillid,0,0);
- break;
}
}
}
@@ -8088,6 +8093,8 @@ int skill_check_condition (struct map_session_data *sd, int skill, int lv, int t
} else
if(sc->data[SC_COMBO].val1 == skill)
break; //Combo ready.
+ //Cancel combo wait.
+ unit_cancel_combo(&sd->bl);
return 0;
case BD_ADAPTATION: /* アドリブ */
{