summaryrefslogtreecommitdiff
path: root/src
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
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')
-rw-r--r--src/map/pc.c24
-rw-r--r--src/map/pc.h2
-rw-r--r--src/map/skill.c66
-rw-r--r--src/map/status.c7
-rw-r--r--src/map/unit.c1
5 files changed, 43 insertions, 57 deletions
diff --git a/src/map/pc.c b/src/map/pc.c
index 104a3cde0..fb1fae2c7 100644
--- a/src/map/pc.c
+++ b/src/map/pc.c
@@ -8118,19 +8118,18 @@ int pc_setriding(TBL_PC* sd, int flag)
return 0;
}
-/*==========================================
- * Give player a mado
- *------------------------------------------*/
-int pc_setmadogear(TBL_PC* sd, int flag)
-{
- if( flag ){
- if( pc->checkskill(sd,NC_MADOLICENCE) > 0 )
+/**
+ * Gives player a mado
+ * @param flag 1 Set mado
+ **/
+void pc_setmadogear( struct map_session_data *sd, int flag ) {
+ if( flag ) {
+ if( (sd->class_&MAPID_THIRDMASK) == MAPID_MECHANIC )
pc->setoption(sd, sd->sc.option|OPTION_MADOGEAR);
- } else if( pc_ismadogear(sd) ){
- pc->setoption(sd, sd->sc.option&~OPTION_MADOGEAR);
- }
+ } else if( pc_ismadogear(sd) )
+ pc->setoption(sd, sd->sc.option&~OPTION_MADOGEAR);
- return 0;
+ return;
}
/**
@@ -8154,7 +8153,8 @@ bool pc_can_attack( struct map_session_data *sd, int target_id ) {
sd->sc.data[SC_TRICKDEAD] ||
(sd->sc.data[SC_SIREN] && sd->sc.data[SC_SIREN]->val2 == target_id) ||
sd->sc.data[SC_BLADESTOP] ||
- sd->sc.data[SC_DEEP_SLEEP] )
+ sd->sc.data[SC_DEEP_SLEEP] /*||
+ sd->sc.data[SC_FALLENEMPIRE]TODO*/)
return false;
return true;
diff --git a/src/map/pc.h b/src/map/pc.h
index f33127036..fb2d3dbb1 100644
--- a/src/map/pc.h
+++ b/src/map/pc.h
@@ -895,7 +895,7 @@ struct pc_interface {
int (*setcart) (struct map_session_data* sd, int type);
int (*setfalcon) (struct map_session_data* sd, int flag);
int (*setriding) (struct map_session_data* sd, int flag);
- int (*setmadogear) (struct map_session_data* sd, int flag);
+ void (*setmadogear) (struct map_session_data* sd, int flag);
int (*changelook) (struct map_session_data *sd,int type,int val);
int (*equiplookall) (struct map_session_data *sd);
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;
diff --git a/src/map/status.c b/src/map/status.c
index 0787e7cad..9c25aadc7 100644
--- a/src/map/status.c
+++ b/src/map/status.c
@@ -485,11 +485,11 @@ void initChangeTables(void) {
add_sc(MH_POISON_MIST, SC_BLIND);
set_sc(MH_PAIN_KILLER, SC_PAIN_KILLER, SI_PAIN_KILLER, SCB_ASPD);
- add_sc(MH_STYLE_CHANGE , SC_STYLE_CHANGE);
- set_sc( MH_TINDER_BREAKER , SC_RG_CCONFINE_S , SI_RG_CCONFINE_S , SCB_NONE );
+ set_sc( MH_SILENT_BREEZE , SC_SILENCE , SI_SILENT_BREEZE , SCB_NONE );
+ add_sc( MH_STYLE_CHANGE , SC_STYLE_CHANGE);
+ set_sc( MH_TINDER_BREAKER , SC_RG_CCONFINE_S , SI_RG_CCONFINE_S , SCB_NONE );
set_sc( MH_TINDER_BREAKER , SC_RG_CCONFINE_M , SI_RG_CCONFINE_M , SCB_FLEE );
-
add_sc( MER_CRASH , SC_STUN );
set_sc( MER_PROVOKE , SC_PROVOKE , SI_PROVOKE , SCB_DEF|SCB_DEF2|SCB_BATK|SCB_WATK );
add_sc( MS_MAGNUM , SC_SUB_WEAPONPROPERTY );
@@ -636,6 +636,7 @@ void initChangeTables(void) {
**/
add_sc( SR_DRAGONCOMBO , SC_STUN );
add_sc( SR_EARTHSHAKER , SC_STUN );
+ set_sc( SR_FALLENEMPIRE , SC_STOP/*SC_FALLENEMPIRE*/ , SI_FALLENEMPIRE , SCB_NONE );
set_sc( SR_CRESCENTELBOW , SC_CRESCENTELBOW , SI_CRESCENTELBOW , SCB_NONE );
set_sc_with_vfx( SR_CURSEDCIRCLE , SC_CURSEDCIRCLE_TARGET, SI_CURSEDCIRCLE_TARGET , SCB_NONE );
set_sc( SR_LIGHTNINGWALK , SC_LIGHTNINGWALK , SI_LIGHTNINGWALK , SCB_NONE );
diff --git a/src/map/unit.c b/src/map/unit.c
index e5c7c45c1..4290778e6 100644
--- a/src/map/unit.c
+++ b/src/map/unit.c
@@ -921,6 +921,7 @@ int unit_can_move(struct block_list *bl) {
|| (sc->data[SC_GOSPEL] && sc->data[SC_GOSPEL]->val4 == BCT_SELF) // cannot move while gospel is in effect
|| (sc->data[SC_BASILICA] && sc->data[SC_BASILICA]->val4 == bl->id) // Basilica caster cannot move
|| sc->data[SC_STOP]
+ /*|| sc->data[SC_FALLENEMPIRE]TODO*/
|| sc->data[SC_RG_CCONFINE_M]
|| sc->data[SC_RG_CCONFINE_S]
|| sc->data[SC_GS_MADNESSCANCEL]