summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorcelest <celest@54d463be-8e91-2dee-dedb-b68131a5f0ec>2004-11-19 14:38:21 +0000
committercelest <celest@54d463be-8e91-2dee-dedb-b68131a5f0ec>2004-11-19 14:38:21 +0000
commit96e5f7023a5a7e5dca78ccd52002596ecf8a3b42 (patch)
treecd19d44e3cdb45cb51020f44157785d7e6809d74 /src
parentb5cd6576aff74317d3604368d79ad4b8da8bd347 (diff)
downloadhercules-96e5f7023a5a7e5dca78ccd52002596ecf8a3b42.tar.gz
hercules-96e5f7023a5a7e5dca78ccd52002596ecf8a3b42.tar.bz2
hercules-96e5f7023a5a7e5dca78ccd52002596ecf8a3b42.tar.xz
hercules-96e5f7023a5a7e5dca78ccd52002596ecf8a3b42.zip
Updated Endure, added SC_BLOCKSKILL and SC_SLOWDOWN
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/athena@262 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src')
-rw-r--r--src/map/battle.c2
-rw-r--r--src/map/skill.c40
-rw-r--r--src/map/skill.h9
3 files changed, 42 insertions, 9 deletions
diff --git a/src/map/battle.c b/src/map/battle.c
index d74cc5ed2..ba4ab31a4 100644
--- a/src/map/battle.c
+++ b/src/map/battle.c
@@ -932,6 +932,8 @@ int battle_get_speed(struct block_list *bl)
//ウィンドウォーク時はLv*2%減算
if(sc_data[SC_WINDWALK].timer!=-1)
speed -= (speed*(sc_data[SC_WINDWALK].val1*2))/100;
+ if(sc_data[SC_SLOWDOWN].timer!=-1)
+ speed = speed*150/100;
}
if(speed < 1) speed = 1;
return speed;
diff --git a/src/map/skill.c b/src/map/skill.c
index e99c1d93a..e01e01727 100644
--- a/src/map/skill.c
+++ b/src/map/skill.c
@@ -2272,7 +2272,7 @@ int skill_castend_damage_id( struct block_list* src, struct block_list *bl,int s
case MO_CHAINCOMBO: /* 連打掌 */
{
struct status_change *sc_data = battle_get_sc_data(src);
- skill_attack(BF_WEAPON,src,src,bl,skillid,skilllv,tick,flag);
+ skill_attack(BF_WEAPON,src,src,bl,skillid,skilllv,tick,flag);
if(sc_data && sc_data[SC_BLADESTOP].timer != -1)
skill_status_change_end(src,SC_BLADESTOP,-1);
}
@@ -2371,6 +2371,11 @@ int skill_castend_damage_id( struct block_list* src, struct block_list *bl,int s
if (skillid == SM_MAGNUM) // fire element for 10 seconds
skill_status_change_start(src,SC_FLAMELAUNCHER,0,0,0,0,10000,0);
}
+ if (bl->type == BL_MOB && skillid == AS_GRIMTOOTH) {
+ struct status_change *sc_data = battle_get_sc_data(bl);
+ if (sc_data && sc_data[SC_SLOWDOWN].timer == -1)
+ skill_status_change_start(bl,SC_SLOWDOWN,0,0,0,0,1000,0);
+ }
break;
case KN_BOWLINGBASH: /* ボウリングバッシュ */
@@ -3019,7 +3024,7 @@ int skill_castend_nodamage_id( struct block_list *src, struct block_list *bl,int
case AS_POISONREACT: /* ポイズンリアクト */
case MC_LOUD: /* ラウドボイス */
case MG_ENERGYCOAT: /* エナジ?コ?ト */
- case SM_ENDURE: /* インデュア */
+// case SM_ENDURE: /* インデュア */
case MG_SIGHT: /* サイト */
case AL_RUWACH: /* ルアフ */
case MO_EXPLOSIONSPIRITS: // 爆裂波動
@@ -3039,6 +3044,13 @@ int skill_castend_nodamage_id( struct block_list *src, struct block_list *bl,int
clif_skill_nodamage(src,bl,skillid,skilllv,1);
skill_status_change_start(bl,SkillStatusChangeTable[skillid],skilllv,0,0,0,skill_get_time(skillid,skilllv),0 );
break;
+ case SM_ENDURE: /* インデュア */
+ clif_skill_nodamage(src,bl,skillid,skilllv,1);
+ skill_status_change_start(bl,SkillStatusChangeTable[skillid],skilllv,0,0,0,skill_get_time(skillid,skilllv),0 );
+ skill_status_change_start(src,SC_BLOCKSKILL,skilllv,0,skillid,0,10000,0 );
+ break;
+
+
case AS_ENCHANTPOISON: // Prevent spamming [Valaris]
if(bl->type==BL_PC) {
struct map_session_data *sd2=(struct map_session_data *)bl;
@@ -4619,6 +4631,10 @@ int skill_castend_map( struct map_session_data *sd,int skill_num, const char *ma
sd->sc_data[SC_BERSERK].timer != -1 ||
sd->sc_data[SC_MARIONETTE].timer != -1)
return 0;
+
+ if (sd->sc_data[SC_BLOCKSKILL].timer!=-1)
+ if (skill_num == sd->sc_data[SC_BLOCKSKILL].val3)
+ return 0;
}
if( skill_num != sd->skillid) /* 不正パケットらしい */
@@ -6260,9 +6276,9 @@ int skill_check_condition(struct map_session_data *sd,int type)
sd->sc_data[SC_STEELBODY].timer != -1 ||
sd->sc_data[SC_BERSERK].timer != -1 ||
(sd->sc_data[SC_MARIONETTE].timer != -1 && sd->skillid != CG_MARIONETTE)){
- clif_skill_fail(sd,sd->skillid,0,0);
+ clif_skill_fail(sd,sd->skillid,0,0);
return 0; /* ?態異常や沈?など */
- }
+ }
}
skill = sd->skillid;
lv = sd->skilllv;
@@ -6737,6 +6753,10 @@ int skill_use_id( struct map_session_data *sd, int target_id,
if(lv==5 && skill_num!=MO_FINGEROFFENSIVE && skill_num!=MO_INVESTIGATE && skill_num!=MO_CHAINCOMBO && skill_num!=MO_EXTREMITYFIST) return 0;
}
+ if (sd->sc_data[SC_BLOCKSKILL].timer!=-1)
+ if (skill_num == sd->sc_data[SC_BLOCKSKILL].val3)
+ return 0;
+
if (sc_data[SC_BASILICA].timer != -1) { // Basilica cancels if caster moves [celest]
struct skill_unit *su;
if ((su = (struct skill_unit *)sc_data[SC_BASILICA].val4)) {
@@ -6746,7 +6766,7 @@ int skill_use_id( struct map_session_data *sd, int target_id,
skill_delunitgroup (sg);
}
}
- }
+ }
}
if(sd->status.option&4 && skill_num==TF_HIDING)
@@ -7032,6 +7052,10 @@ int skill_use_pos( struct map_session_data *sd,
sd->sc_data[SC_MARIONETTE].timer != -1)
return 0; /* ?態異常や沈?など */
+ if (sd->sc_data[SC_BLOCKSKILL].timer!=-1)
+ if (skill_num == sd->sc_data[SC_BLOCKSKILL].val3)
+ return 0;
+
if (sc_data[SC_BASILICA].timer != -1) { // Basilica cancels if caster moves [celest]
struct skill_unit *su;
if ((su = (struct skill_unit *)sc_data[SC_BASILICA].val4)) {
@@ -9159,6 +9183,12 @@ int skill_status_change_start(struct block_list *bl, int type, int val1, int val
val2 = 75;
// calc_flag = 1; // not sure of effects yet [celest]
break;
+ case SC_BLOCKSKILL:
+ if (!tick) tick = 60000;
+ if (!val3) val3 = -1;
+ break;
+ case SC_SLOWDOWN:
+ break;
default:
if(battle_config.error_log)
printf("UnknownStatusChange [%d]\n", type);
diff --git a/src/map/skill.h b/src/map/skill.h
index 113ef1e3a..17def6148 100644
--- a/src/map/skill.h
+++ b/src/map/skill.h
@@ -322,6 +322,8 @@ enum { // struct map_session_data の status_changeの番号テーブル
SC_SIGHTTRASHER =73,
// SC_BASILICA =125, // 125 is the same id as joint break
SC_BASILICA =102, // temporarily use this before an actual id is found [celest]
+ SC_EDP = 114, //
+ SC_MARIONETTE2 = 122, // Marionette target
SC_ENSEMBLE =159,
SC_FOGWALL =178,
SC_GOSPEL =179,
@@ -334,11 +336,10 @@ enum { // struct map_session_data の status_changeの番号テーブル
SC_SPELLBREAKER =192,
// [Celest]
- SC_EDP = 114, //
- SC_MARIONETTE2 = 122, // Marionette target
+ SC_SLOWDOWN = 45, // for skill slowdown
SC_BLEEDING = 124, // Temporarily same id as headcrush
- SC_POISON2 = 193, // for EDP -- notes: Not implemented since damage unknown yet
- SC_GRIMTOOTH = 194, // for grimtooth's slowdown
+ SC_POISON2 = 193, // for EDP -- notes: Not implemented since damage unknown yet
+ SC_BLOCKSKILL = 194, // for disallowing the use of a skill for a time period
// -- testing various SC effects
// SC_AURABLADE =81,