diff options
author | celest <celest@54d463be-8e91-2dee-dedb-b68131a5f0ec> | 2004-12-03 11:57:50 +0000 |
---|---|---|
committer | celest <celest@54d463be-8e91-2dee-dedb-b68131a5f0ec> | 2004-12-03 11:57:50 +0000 |
commit | 10f272a1bfbb0ef56e84d7bdb5bd84282eccf735 (patch) | |
tree | 63b6933810ba66196b555c6f45a364e5b6fee243 /src/map | |
parent | fedbdb48e0fd0fc340884b15c3ba31f6168c85e8 (diff) | |
download | hercules-10f272a1bfbb0ef56e84d7bdb5bd84282eccf735.tar.gz hercules-10f272a1bfbb0ef56e84d7bdb5bd84282eccf735.tar.bz2 hercules-10f272a1bfbb0ef56e84d7bdb5bd84282eccf735.tar.xz hercules-10f272a1bfbb0ef56e84d7bdb5bd84282eccf735.zip |
* Updated Stone Curse, Soul Drain, Auto Berserk
* Fixed MVP exp being multiplied twice
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/branches/stable@442 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src/map')
-rw-r--r-- | src/map/mob.c | 4 | ||||
-rw-r--r-- | src/map/pc.c | 6 | ||||
-rw-r--r-- | src/map/skill.c | 32 | ||||
-rw-r--r-- | src/map/skill.h | 23 |
4 files changed, 48 insertions, 17 deletions
diff --git a/src/map/mob.c b/src/map/mob.c index ef67341f8..2f7d748a8 100644 --- a/src/map/mob.c +++ b/src/map/mob.c @@ -2295,7 +2295,7 @@ int mob_damage(struct block_list *src,struct mob_data *md,int damage,int type) mob_unlocktarget((struct mob_data *)src,tick); /* ソウルドレイン */ - if(sd && (skill=pc_checkskill(sd,HW_SOULDRAIN))>0){ + if(sd && sd->state.attack_type == BF_MAGIC && (skill=pc_checkskill(sd,HW_SOULDRAIN))>0){ clif_skill_nodamage(src,&md->bl,HW_SOULDRAIN,skill,1); sp = (battle_get_lv(&md->bl))*(65+15*skill)/100; if(sd->status.sp + sp > sd->status.max_sp) @@ -2529,7 +2529,7 @@ int mob_damage(struct block_list *src,struct mob_data *md,int damage,int type) int log_mvp[2] = {0}; int j; int mexp; - temp = ((double)mob_db[md->class].mexp * (double)battle_config.mvp_exp_rate * (9.+(double)count)/1000.); + temp = ((double)mob_db[md->class].mexp * (9.+(double)count)/10.); //[Gengar] mexp = (temp > 2147483647.)? 0x7fffffff:(int)temp; if(mexp < 1) mexp = 1; clif_mvp_effect(mvp_sd); // エフェクト diff --git a/src/map/pc.c b/src/map/pc.c index 94ee62fbb..f0e2a719f 100644 --- a/src/map/pc.c +++ b/src/map/pc.c @@ -2098,7 +2098,8 @@ int pc_calcstatus(struct map_session_data* sd,int first) before.cart_weight != before.cart_weight || before.cart_max_weight != before.cart_max_weight ) clif_updatestatus(sd,SP_CARTINFO);*/ - if(sd->status.hp<sd->status.max_hp>>2 && pc_checkskill(sd,SM_AUTOBERSERK)>0 && + //if(sd->status.hp<sd->status.max_hp>>2 && pc_checkskill(sd,SM_AUTOBERSERK)>0 && + if(sd->status.hp<sd->status.max_hp>>2 && sd->sc_data[SC_AUTOBERSERK].timer != -1 && (sd->sc_data[SC_PROVOKE].timer==-1 || sd->sc_data[SC_PROVOKE].val2==0 ) && !pc_isdead(sd)) // オ?トバ?サ?ク?動 skill_status_change_start(&sd->bl,SC_PROVOKE,10,1,0,0,0,0); @@ -5339,7 +5340,8 @@ int pc_damage(struct block_list *src,struct map_session_data *sd,int damage) // まだ生きているならHP更新 clif_updatestatus(sd,SP_HP); - if(sd->status.hp<sd->status.max_hp>>2 && pc_checkskill(sd,SM_AUTOBERSERK)>0 && + //if(sd->status.hp<sd->status.max_hp>>2 && pc_checkskill(sd,SM_AUTOBERSERK)>0 && + if(sd->status.hp<sd->status.max_hp>>2 && sd->sc_data[SC_AUTOBERSERK].timer != -1 && (sd->sc_data[SC_PROVOKE].timer==-1 || sd->sc_data[SC_PROVOKE].val2==0 )) // オ?トバ?サ?ク?動 skill_status_change_start(&sd->bl,SC_PROVOKE,10,1,0,0,0,0); diff --git a/src/map/skill.c b/src/map/skill.c index 5be308425..4442ac81c 100644 --- a/src/map/skill.c +++ b/src/map/skill.c @@ -1,4 +1,4 @@ -// $Id: skill.c,v 1.8 2004/12/2 12:58:19 AM Celestia Exp $ +// $Id: skill.c,v 1.8 2004/12/3 7:53:42 PM Celestia Exp $ /* スキル?係 */ #include <stdio.h> @@ -114,7 +114,7 @@ int SkillStatusChangeTable[]={ /* skill.hのenumのSC_***とあわせること */ SC_SPLASHER, /* ベナムスプラッシャ? */ -1, SC_TRICKDEAD, /* 死んだふり */ - -1,-1,-1,-1,-1,-1, + -1,-1,SC_AUTOBERSERK,-1,-1,-1, /* 150- */ -1,-1,-1,-1,-1, SC_LOUD, /* ラウドボイス */ @@ -3218,6 +3218,19 @@ int skill_castend_nodamage_id( struct block_list *src, struct block_list *bl,int skill_status_change_start(src,SC_BLOCKSKILL,skilllv,0,skillid,0,10000,0 ); break; + case SM_AUTOBERSERK: // Celest + { + struct status_change *tsc_data = battle_get_sc_data(bl); + int sc=SkillStatusChangeTable[skillid]; + clif_skill_nodamage(src,bl,skillid,skilllv,1); + if( tsc_data ){ + if( tsc_data[sc].timer==-1 ) + skill_status_change_start(bl,sc,skilllv,0,0,0,0,0); + else + skill_status_change_end(bl, sc, -1); + } + } + break; case AS_ENCHANTPOISON: // Prevent spamming [Valaris] if(bl->type==BL_PC) { @@ -3693,6 +3706,8 @@ int skill_castend_nodamage_id( struct block_list *src, struct block_list *bl,int skill_status_change_start(bl,SC_STONE,skilllv,0,0,0,skill_get_time2(skillid,skilllv),0); else if(sd) clif_skill_fail(sd,skillid,0,0); + if (dstmd) + mob_target(dstmd,src,skill_get_range(skillid,skilllv)); break; case NV_FIRSTAID: /* ?急手? */ @@ -8542,6 +8557,10 @@ int skill_status_change_end(struct block_list* bl, int type, int tid) case SC_REGENERATION: calc_flag = 1; break; + case SC_AUTOBERSERK: + if (sc_data[SC_PROVOKE].timer != -1) + skill_status_change_end(bl,SC_PROVOKE,-1); + break; case SC_BERSERK: /* バ?サ?ク */ calc_flag = 1; clif_status_change(bl,SC_INCREASEAGI,0); /* アイコン消去 */ @@ -8870,6 +8889,7 @@ int skill_status_change_timer(int tid, unsigned int tick, int id, int data) break; case SC_ENDURE: /* インデュア */ + case SC_AUTOBERSERK: // Celest if(sd && sd->special_state.infinite_endure) { sc_data[type].timer=add_timer( 1000*60+tick,skill_status_change_timer, bl->id, data ); //sc_data[type].val2=1; @@ -9305,6 +9325,14 @@ int skill_status_change_start(struct block_list *bl, int type, int val1, int val calc_flag = 1; // for updating mdef val2 = 7; // [Celest] break; + case SC_AUTOBERSERK: + { + tick = 60*1000; + if (bl->type == BL_PC && sd->status.hp<sd->status.max_hp>>2 && + (sc_data[SC_PROVOKE].timer==-1 || sc_data[SC_PROVOKE].val2==0)) + skill_status_change_start(bl,SC_PROVOKE,10,1,0,0,0,0); + } + break; case SC_CONCENTRATE: /* 集中力向上 */ calc_flag = 1; break; diff --git a/src/map/skill.h b/src/map/skill.h index a8bf30e3c..ebca40b34 100644 --- a/src/map/skill.h +++ b/src/map/skill.h @@ -1,4 +1,4 @@ -// $Id: skill.h,v 1.5 2004/11/26 5:47:12 PM Celestia Exp $ +// $Id: skill.h,v 1.5 2004/12/3 7:53:26 PM Celestia $ #ifndef _SKILL_H_ #define _SKILL_H_ @@ -326,6 +326,7 @@ enum { // struct map_session_data の status_changeの番?テ?ブル SC_BROKNARMOR =32, SC_BROKNWEAPON =33, SC_SLOWDOWN =45, // for skill slowdown + SC_AUTOBERSERK =46, 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] @@ -343,18 +344,18 @@ enum { // struct map_session_data の status_changeの番?テ?ブル SC_SPELLBREAKER =192, SC_DPOISON =193, /* 猛毒 */ SC_BLOCKSKILL =194, // for disallowing the use of a skill for a time period + SC_LEADERSHIP =196, + SC_GLORYWOUNDS =197, + SC_SOULCOLD =198, + SC_HAWKEYES =199, + SC_BATTLEORDERS =200, + SC_REGENERATION =201, + SC_PRESERVE =202, // [Celest] - SC_BLEEDING = 124, // Temporarily same id as headcrush - SC_MOONLIT = 195, - SC_LEADERSHIP = 196, - SC_GLORYWOUNDS = 197, - SC_SOULCOLD = 198, - SC_HAWKEYES = 199, - SC_BATTLEORDERS = 200, - SC_REGENERATION = 201, - SC_PRESERVE = 202, - + SC_BLEEDING = 124, // Temporarily same id as headcrush + SC_MOONLIT =195, + // -- testing various SC effects // SC_AURABLADE =81, // SC_CONCENTRATION =83, |