summaryrefslogtreecommitdiff
path: root/src/map/skill.c
diff options
context:
space:
mode:
authorpanikon <panikon@zoho.com>2014-07-11 04:29:29 -0300
committerpanikon <panikon@zoho.com>2014-07-11 04:29:29 -0300
commitda190e09a33591aaabfd2c7735fd64ebb12f78e9 (patch)
tree1dc3f034a0589cac2fed59c4340cd0509565ec3f /src/map/skill.c
parented9628528dff9865085106a3edf2e5fa7962625c (diff)
downloadhercules-da190e09a33591aaabfd2c7735fd64ebb12f78e9.tar.gz
hercules-da190e09a33591aaabfd2c7735fd64ebb12f78e9.tar.bz2
hercules-da190e09a33591aaabfd2c7735fd64ebb12f78e9.tar.xz
hercules-da190e09a33591aaabfd2c7735fd64ebb12f78e9.zip
Mado behaviour changes
- Corrected list of skills that can be used while using mado - Corrected list of supportive skills that can't be cast in users with mado - Fixed *setmadogear behaviour, it would set mado to any character Added SI_FALLENEMPIRE to SR_FALLENEMPIRE Added SI_SILENTBREEZE to MH_SILENTBREEZE Fixed MH_SILENTBREEZE entry in skill_db Special thanks to Rytech
Diffstat (limited to 'src/map/skill.c')
-rw-r--r--src/map/skill.c66
1 files changed, 25 insertions, 41 deletions
diff --git a/src/map/skill.c b/src/map/skill.c
index 0aea718dc..0b012f3a6 100644
--- a/src/map/skill.c
+++ b/src/map/skill.c
@@ -543,23 +543,6 @@ int skillnotok (uint16 skill_id, struct map_session_data *sd)
return 1;
}
break;
- case BS_GREED:
- case WS_CARTBOOST:
- case BS_HAMMERFALL:
- case BS_ADRENALINE:
- case MC_CARTREVOLUTION:
- case MC_MAMMONITE:
- case WS_MELTDOWN:
- case MG_SIGHT:
- case TF_HIDING:
- /**
- * These skills cannot be used while in mado gear (credits to Xantara)
- **/
- if( pc_ismadogear(sd) ) {
- clif->skill_fail(sd,skill_id,USESKILL_FAIL_MADOGEAR_RIDE,0);
- return 1;
- }
- break;
case SC_MANHOLE:
case WM_SOUND_OF_DESTRUCTION:
@@ -5039,6 +5022,21 @@ int skill_castend_nodamage_id(struct block_list *src, struct block_list *bl, uin
}
}
+ // Supportive skills that can't be cast in users with mado
+ if( sd && dstsd && pc_ismadogear(dstsd) ) {
+ switch( skill_id ) {
+ case AL_HEAL:
+ case AL_INCAGI:
+ case AL_DECAGI:
+ case AB_RENOVATIO:
+ case AB_HIGHNESSHEAL:
+ clif->skill_fail(sd,skill_id,USESKILL_FAIL_TOTARGET,0);
+ return 0;
+ default:
+ break;
+ }
+ }
+
tstatus = status->get_status_data(bl);
sstatus = status->get_status_data(src);
@@ -5057,10 +5055,6 @@ int skill_castend_nodamage_id(struct block_list *src, struct block_list *bl, uin
case AB_RENOVATIO:
case AB_HIGHNESSHEAL:
case AL_INCAGI:
- if( sd && dstsd && pc_ismadogear(dstsd) ){
- clif->skill_fail(sd,skill_id,USESKILL_FAIL_TOTARGET,0);
- return 0;
- }
case ALL_RESURRECTION:
case PR_ASPERSIO:
//Apparently only player casted skills can be offensive like this.
@@ -9461,7 +9455,8 @@ int skill_castend_nodamage_id(struct block_list *src, struct block_list *bl, uin
heal = 5 * status->get_lv(&hd->bl) + status->base_matk(&hd->battle_status, status->get_lv(&hd->bl));
status->heal(bl, heal, 0, 0);
clif->skill_nodamage(src, src, skill_id, skill_lv, clif->skill_nodamage(src, bl, AL_HEAL, heal, 1));
- status->change_start(src, bl, SC_SILENCE, 100, skill_lv, 0,0,0, skill->get_time(skill_id, skill_lv),1|2|8);
+ status->change_start(src, src, type, 1000, skill_lv, 0, 0, 0, skill->get_time(skill_id,skill_lv), 1|2|8);
+ status->change_start(src, bl, type, 1000, skill_lv, 0, 0, 0, skill->get_time(skill_id,skill_lv), 1|2|8);
}
break;
@@ -12706,28 +12701,17 @@ int skill_check_condition_castbegin(struct map_session_data* sd, uint16 skill_id
}
}
+
+ // Check the skills that can be used whiled using mado
if( pc_ismadogear(sd) ) {
- switch( skill_id ) { //None Mado skills are unusable when Mado is equipped. [Jobbie]
- case BS_REPAIRWEAPON:
- case WS_MELTDOWN:
- case BS_HAMMERFALL:
- case WS_CARTBOOST:
- case BS_ADRENALINE:
- case WS_WEAPONREFINE:
- case BS_WEAPONPERFECT:
- case WS_CARTTERMINATION:
- case BS_OVERTHRUST:
- case WS_OVERTHRUSTMAX:
- case BS_MAXIMIZE:
- case BS_ADRENALINE2:
- case BS_UNFAIRLYTRICK:
- case BS_GREED:
- clif->skill_fail(sd,skill_id,USESKILL_FAIL_MADOGEAR,0);
- return 0;
- default: //Only Mechanic exclusive skill can be used.
- break;
+ if( !(skill_id > NC_MADOLICENCE && skill_id <= NC_DISJOINT)
+ && skill_id != NC_MAGMA_ERUPTION
+ && skill_id != BS_GREED ) {
+ clif->skill_fail(sd,skill_id,USESKILL_FAIL_MADOGEAR,0);
+ return 0;
}
}
+
if( skill_lv < 1 || skill_lv > MAX_SKILL_LEVEL )
return 0;