summaryrefslogtreecommitdiff
path: root/src/map/skill.c
diff options
context:
space:
mode:
authorrud0lp20 <rud0lp20@54d463be-8e91-2dee-dedb-b68131a5f0ec>2012-06-11 21:00:12 +0000
committerrud0lp20 <rud0lp20@54d463be-8e91-2dee-dedb-b68131a5f0ec>2012-06-11 21:00:12 +0000
commit7685ceccfe593b9b06492e8eadc7f0a1fe30076f (patch)
tree6c86329efee7e56fabb83ad35cef6bcad23abcf8 /src/map/skill.c
parent5627e06649104c82bf836be3d848174b8152f8cf (diff)
downloadhercules-7685ceccfe593b9b06492e8eadc7f0a1fe30076f.tar.gz
hercules-7685ceccfe593b9b06492e8eadc7f0a1fe30076f.tar.bz2
hercules-7685ceccfe593b9b06492e8eadc7f0a1fe30076f.tar.xz
hercules-7685ceccfe593b9b06492e8eadc7f0a1fe30076f.zip
Fixed bugreport:5963 AB_CHEAL should now work properly on immune targets(Mado, berserk, shield of deaf).
Fixed bugreport:5981 PA_SACRIFICE now won't be granted by bonus damage from cards(RENEWAL CHANGE). Fixed bugreport:5892 & bugreport:5900 SO_SPELLFIST is now working properly. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@16268 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src/map/skill.c')
-rw-r--r--src/map/skill.c23
1 files changed, 16 insertions, 7 deletions
diff --git a/src/map/skill.c b/src/map/skill.c
index 9a2e3ed6f..25a921c6f 100644
--- a/src/map/skill.c
+++ b/src/map/skill.c
@@ -6288,11 +6288,14 @@ int skill_castend_nodamage_id (struct block_list *src, struct block_list *bl, in
unit_skillcastcancel(src,1);
if(sd) {
int sp = skill_get_sp(sd->skillid_old,sd->skilllv_old);
+ if( skillid == SO_SPELLFIST ){
+ sc_start4(src,type,100,skilllv+1,skilllv,sd->skillid_old,sd->skilllv_old,skill_get_time(skillid,skilllv));
+ sd->skillid_old = sd->skilllv_old = 0;
+ break;
+ }
sp = sp * (90 - (skilllv-1)*20) / 100;
if(sp < 0) sp = 0;
status_zap(src, 0, sp);
- if( skillid == SO_SPELLFIST )
- sc_start4(src,type,100,skilllv+1,skilllv,(sd->skillid_old)?sd->skillid_old:MG_FIREBOLT,(sd->skilllv_old)?sd->skilllv_old:skilllv,skill_get_time(skillid,skilllv));
}
break;
case SA_SPELLBREAKER:
@@ -7442,7 +7445,10 @@ int skill_castend_nodamage_id (struct block_list *src, struct block_list *bl, in
if( sd && tstatus && !battle_check_undead(tstatus->race, tstatus->def_ele) )
{
i = skill_calc_heal(src, bl, AL_HEAL, pc_checkskill(sd, AL_HEAL), true);
- if(dstsd && pc_ismadogear(dstsd)) i = 0; // Should heal by 0 or won't do anything? [malufett]
+
+ if( (dstsd && pc_ismadogear(dstsd)) || status_isimmune(bl) || (tsc && tsc->data[SC_BERSERK]))
+ i = 0; // Should heal by 0 or won't do anything?? in iRO it breaks the healing to members.. [malufett]
+
status_heal(bl, i, 0, 1);
clif_skill_nodamage(bl, bl, skillid, i, 1);
}
@@ -8662,8 +8668,7 @@ int skill_castend_id(int tid, unsigned int tick, int id, intptr_t data)
return 0;
}
- if(ud->skillid != SA_CASTCANCEL &&
- !(ud->skillid == SO_SPELLFIST && (sd && (sd->skillid_old == MG_FIREBOLT || sd->skillid_old == MG_COLDBOLT || sd->skillid_old == MG_LIGHTNINGBOLT))) ) {// otherwise handled in unit_skillcastcancel()
+ if(ud->skillid != SA_CASTCANCEL && ud->skillid != SO_SPELLFIST) {// otherwise handled in unit_skillcastcancel()
if( ud->skilltimer != tid ) {
ShowError("skill_castend_id: Timer mismatch %d!=%d!\n", ud->skilltimer, tid);
ud->skilltimer = INVALID_TIMER;
@@ -11836,8 +11841,12 @@ int skill_check_condition_castbegin(struct map_session_data* sd, short skill, sh
// perform skill-specific checks (and actions)
switch( skill ) {
- case SA_CASTCANCEL:
- case SO_SPELLFIST:
+ case SO_SPELLFIST:
+ if(sd->skillid_old != MG_FIREBOLT && sd->skillid_old != MG_COLDBOLT && sd->skillid_old != MG_LIGHTNINGBOLT){
+ clif_skill_fail(sd,skill,USESKILL_FAIL_LEVEL,0);
+ return 0;
+ }
+ case SA_CASTCANCEL:
if(sd->ud.skilltimer == INVALID_TIMER) {
clif_skill_fail(sd,skill,USESKILL_FAIL_LEVEL,0);
return 0;