summaryrefslogtreecommitdiff
path: root/src/map
diff options
context:
space:
mode:
Diffstat (limited to 'src/map')
-rw-r--r--src/map/battle.c58
-rw-r--r--src/map/skill.c53
-rw-r--r--src/map/skill.h2
3 files changed, 96 insertions, 17 deletions
diff --git a/src/map/battle.c b/src/map/battle.c
index b5f7009d8..126d2553b 100644
--- a/src/map/battle.c
+++ b/src/map/battle.c
@@ -531,6 +531,8 @@ int battle_get_baseatk(struct block_list *bl)
batk -= batk*25/100; //base_atkが25%減少
if(sc_data[SC_CONCENTRATION].timer!=-1 && bl->type != BL_PC) //コンセントレーション
batk += batk*(5*sc_data[SC_CONCENTRATION].val1)/100;
+ if(sc_data[SC_EDP].timer != -1) // [Celest]
+ batk += batk*(50+50*sc_data[SC_EDP].val1)/100;
}
if(batk < 1) batk = 1; //base_atkは最低でも1
return batk;
@@ -1932,6 +1934,9 @@ static struct Damage battle_calc_pet_weapon_attack(
damage = damage*(100+ 50*skill_lv)/100;
blewcount=0;
break;
+ case AS_GRIMTOOTH:
+ damage = damage*(100+ 20*skill_lv)/100;
+ break;
case AS_SONICBLOW: // ソニックブロウ
damage = damage*(300+ 50*skill_lv)/100;
div_=8;
@@ -2143,7 +2148,7 @@ static struct Damage battle_calc_pet_weapon_attack(
damage=battle_attr_fix(damage, s_ele, battle_get_element(target) );
if(skill_num==PA_PRESSURE) /* プレッシャー 必中? */
- damage = 700+100*skill_lv;
+ damage = 500+300*skill_lv;
// インベナム修正
if(skill_num==TF_POISON){
@@ -2245,6 +2250,12 @@ static struct Damage battle_calc_mob_weapon_attack(
return wd;
}
else ac_flag = 1;
+ } else if(skill_num != CR_GRANDCROSS && t_sc_data && t_sc_data[SC_POISONREACT].timer != -1) { // poison react [Celest]
+ //memset(&wd,0,sizeof(wd));
+ t_sc_data[SC_POISONREACT].val3 = 0;
+ t_sc_data[SC_POISONREACT].val4 = 1;
+ t_sc_data[SC_POISONREACT].val3 = src->id;
+ return wd;
}
}
flag=BF_SHORT|BF_WEAPON|BF_NORMAL; // 攻撃の種類の設定
@@ -2405,6 +2416,9 @@ static struct Damage battle_calc_mob_weapon_attack(
hitrate = 1000000;
flag=(flag&~BF_SKILLMASK)|BF_NORMAL;
break;
+ case AS_GRIMTOOTH:
+ damage = damage*(100+ 20*skill_lv)/100;
+ break;
case AS_SONICBLOW: // ソニックブロウ
damage = damage*(300+ 50*skill_lv)/100;
div_=8;
@@ -2651,7 +2665,7 @@ static struct Damage battle_calc_mob_weapon_attack(
if(sc_data && sc_data[SC_AURABLADE].timer!=-1) /* オーラブレード 必中 */
damage += sc_data[SC_AURABLADE].val1 * 10;
if(skill_num==PA_PRESSURE) /* プレッシャー 必中? */
- damage = 700+100*skill_lv;
+ damage = 500+300*skill_lv;
// インベナム修正
if(skill_num==TF_POISON){
@@ -2777,6 +2791,12 @@ static struct Damage battle_calc_pc_weapon_attack(
return wd; //ダメージ構造体を返して終了
}
else ac_flag = 1;
+ } else if(skill_num != CR_GRANDCROSS && t_sc_data && t_sc_data[SC_POISONREACT].timer != -1) { // poison react [Celest]
+ //memset(&wd,0,sizeof(wd));
+ t_sc_data[SC_POISONREACT].val3 = 0;
+ t_sc_data[SC_POISONREACT].val4 = 1;
+ t_sc_data[SC_POISONREACT].val3 = src->id;
+ return wd;
}
}
//オートカウンター処理ここまで
@@ -3131,6 +3151,10 @@ static struct Damage battle_calc_pc_weapon_attack(
hitrate = 1000000;
flag=(flag&~BF_SKILLMASK)|BF_NORMAL;
break;
+ case AS_GRIMTOOTH:
+ damage = damage*(100+ 20*skill_lv)/100;
+ damage2 = damage2*(100+ 20*skill_lv)/100;
+ break;
case AS_SONICBLOW: // ソニックブロウ
hitrate+=30; // hitrate +30, thanks to midas
damage = damage*(300+ 50*skill_lv)/100;
@@ -3349,9 +3373,9 @@ static struct Damage battle_calc_pc_weapon_attack(
int hp, mhp, damage3;
hp = battle_get_hp(src);
mhp = battle_get_max_hp(src);
- damage3 = mhp*((skill_lv/2)+(50/100))/100;
- damage = (((skill_lv*15)+90)/100)*damage3/100;
- damage2 = (((skill_lv*15)+90)/100)*damage3/100;
+ damage3 = mhp*9/100;
+ damage = damage*damage3*(90+10*skill_lv)/100;
+ damage2 = damage2*damage3*(90+10*skill_lv)/100;
}
break;
case ASC_BREAKER: // -- moonsoul (special damage for ASC_BREAKER skill)
@@ -3667,8 +3691,8 @@ static struct Damage battle_calc_pc_weapon_attack(
damage2 += sc_data[SC_AURABLADE].val1 * 10;
}
if(skill_num==PA_PRESSURE){ /* プレッシャー 必中? */
- damage = 700+100*skill_lv;
- damage2 = 700+100*skill_lv;
+ damage = 500+300*skill_lv;
+ damage2 = 500+300*skill_lv;
}
// >二刀流の左右ダメージ計算誰かやってくれぇぇぇぇえええ!
@@ -3980,7 +4004,7 @@ struct Damage battle_calc_magic_attack(
MATK_FIX( 100+skill_lv*10, 100);
break;
case WZ_FROSTNOVA: // フロストダイバ
- MATK_FIX( ((100+skill_lv*10)*(2/3)), 100);
+ MATK_FIX((100+skill_lv*10)*2/3, 100);
break;
case WZ_FIREPILLAR: // ファイヤーピラー
if(mdef1 < 1000000)
@@ -4239,8 +4263,8 @@ struct Damage battle_calc_misc_attack(
}
break;
case SN_FALCONASSAULT: /* ファルコンアサルト */
- skill = pc_checkskill(sd,HT_BLITZBEAT);
- damage=(100+50*skill_lv+(dex/10+int_/2+skill*3+40)*2);
+ skill = pc_checkskill(sd,HT_STEELCROW); // Celest
+ damage=((150+50*skill_lv)*(dex/10+int_/2+skill*3+40)*2)/100;
break;
}
@@ -4543,6 +4567,20 @@ int battle_weapon_attack( struct block_list *src,struct block_list *target,
battle_weapon_attack(target,src,tick,0x8000|t_sc_data[SC_AUTOCOUNTER].val1);
skill_status_change_end(target,SC_AUTOCOUNTER,-1);
}
+ if(t_sc_data && t_sc_data[SC_POISONREACT].timer != -1 && t_sc_data[SC_POISONREACT].val4 > 0) { // poison react [Celest]
+ if(t_sc_data[SC_POISONREACT].val3 == src->id) {
+ struct map_session_data *tsd = (struct map_session_data *)target;
+ if ((src->type == BL_MOB && battle_get_elem_type(src)==5) || (src->type == BL_PC && battle_get_attack_element(src)==5)) {
+ t_sc_data[SC_POISONREACT].val2 = 0;
+ battle_weapon_attack(target,src,tick,flag|t_sc_data[SC_POISONREACT].val1);
+ } else {
+ skill_use_id(tsd,src->id,TF_POISON,5);
+ --t_sc_data[SC_POISONREACT].val2;
+ }
+ if (t_sc_data[SC_POISONREACT].val2<=0)
+ skill_status_change_end(target,SC_POISONREACT,-1);
+ }
+ }
if(t_sc_data && t_sc_data[SC_BLADESTOP_WAIT].timer != -1){
int lv = t_sc_data[SC_BLADESTOP_WAIT].val1;
skill_status_change_end(target,SC_BLADESTOP_WAIT,-1);
diff --git a/src/map/skill.c b/src/map/skill.c
index 15c02e519..d03f25a06 100644
--- a/src/map/skill.c
+++ b/src/map/skill.c
@@ -230,7 +230,7 @@ int SkillStatusChangeTable[]={ /* skill.hのenumのSC_***とあわせること */
-1,-1,
SC_GOSPEL,
/* 370- */
- -1,-1,-1,-1,-1,-1,-1,-1,-1,-1,
+ -1,-1,-1,-1,-1,-1,-1,-1,SC_EDP,-1,
/* 380- */
SC_TRUESIGHT,
-1,-1,
@@ -1004,7 +1004,7 @@ int skill_additional_effect( struct block_list* src, struct block_list *bl,int s
rate=rate<=5?5:rate;
if(rand()%100 < rate)
skill_status_change_start(bl,SC_FREEZE,skilllv,0,0,0,skill_get_time2(skillid,skilllv),0);
- else if(sd)
+ else if(sd && skillid==MG_FROSTDIVER)
clif_skill_fail(sd,skillid,0,0);
break;
@@ -2225,6 +2225,12 @@ int skill_castend_damage_id( struct block_list* src, struct block_list *bl,int s
if(sc_data && sc_data[SC_HIDING].timer != -1)
skill_status_change_end(src, SC_HIDING, -1); // ハイディング解除
skill_attack(BF_WEAPON,src,src,bl,skillid,skilllv,tick,flag);
+ dir = dir < 4 ? dir+4 : dir-4; // change direction [Celest]
+ if (bl->type == BL_PC)
+ ((struct map_session_data *)bl)->dir=dir;
+ else if (bl->type == BL_MOB)
+ ((struct mob_data *)bl)->dir=dir;
+ //skill_blown(src,bl,skill_get_blewcount(skillid,skilllv));
}
else if(src->type == BL_PC)
clif_skill_fail(sd,sd->skillid,0,0);
@@ -2507,7 +2513,8 @@ int skill_castend_damage_id( struct block_list* src, struct block_list *bl,int s
case WZ_FROSTNOVA: /* フロストノヴァ */
skill_castend_pos2(src,bl->x,bl->y,skillid,skilllv,tick,0);
- skill_attack(BF_MAGIC,src,src,bl,skillid,skilllv,tick,flag);
+ //skill_attack(BF_MAGIC,src,src,bl,skillid,skilllv,tick,flag);
+ map_foreachinarea(skill_attack_area,src->m,src->x-5,bl->y-5,bl->x+5,bl->y+5,0,BF_MAGIC,src,src,skillid,skilllv,tick,flag,BCT_ENEMY);
break;
case WZ_SIGHTRASHER:
@@ -2979,6 +2986,7 @@ int skill_castend_nodamage_id( struct block_list *src, struct block_list *bl,int
case ST_REJECTSWORD: /* リジェクトソード */
case HW_MAGICPOWER: /* 魔法力増幅 */
case PF_MEMORIZE: /* メモライズ */
+ case ASC_EDP: // [Celest]
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;
@@ -4116,6 +4124,24 @@ 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,skillid,src->id,0,skill_get_time(skillid,skilllv),0 );
break;
+ case ASC_CDP: // Temporary skill for Create Deadly Poison[Celest]
+ if(sd) {
+ int eflag;
+ struct item item_tmp;
+ struct block_list tbl;
+ clif_skill_nodamage(src,bl,skillid,skilllv,1);
+ memset(&item_tmp,0,sizeof(item_tmp));
+ memset(&tbl,0,sizeof(tbl)); // [MouseJstr]
+ item_tmp.nameid = 678;
+ item_tmp.identify = 1;
+ tbl.id = 0;
+ eflag = pc_additem(sd,&item_tmp,1);
+ if(eflag) {
+ clif_additem(sd,0,0,eflag);
+ map_addflooritem(&item_tmp,1,sd->bl.m,sd->bl.x,sd->bl.y,NULL,NULL,NULL,0);
+ }
+ }
+ break;
case PF_MINDBREAKER: /* プロボック */
{
struct status_change *sc_data = battle_get_sc_data(bl);
@@ -4681,7 +4707,10 @@ struct skill_unit_group *skill_unitsetting( struct block_list *src, int skillid,
limit=1000;
interval=2000;
val1=skilllv+2;
- range=1;
+ if(skilllv < 6)
+ range=1;
+ else
+ range=2;
break;
case MG_THUNDERSTORM: /* サンダーストーム */
@@ -5289,7 +5318,8 @@ int skill_unit_onplace(struct skill_unit *src,struct block_list *bl,unsigned int
case 0x88: /* ファイアーピラー(発動後) */
if(DIFF_TICK(tick,sg->tick) < 150)
- skill_attack(BF_MAGIC,ss,&src->bl,bl,sg->skill_id,sg->skill_lv,tick,0);
+ //skill_attack(BF_MAGIC,ss,&src->bl,bl,sg->skill_id,sg->skill_lv,tick,0);
+ map_foreachinarea(skill_attack_area,bl->m,bl->x-1,bl->y-1,bl->x+1,bl->y+1,0,BF_MAGIC,ss,&src->bl,sg->skill_id,sg->skill_lv,tick,0,BCT_ENEMY); // area damage [Celest]
break;
case 0x90: /* スキッドトラップ */
@@ -6304,6 +6334,7 @@ int skill_check_condition(struct map_session_data *sd,int type)
}
break;
case MG_FIREWALL: /* ファイアーウォール */
+ case WZ_FIREPILLAR: // celest
/* 数制限 */
if(battle_config.pc_land_skill_limit) {
int maxcount = skill_get_maxcount(skill);
@@ -6432,6 +6463,8 @@ int skill_check_condition(struct map_session_data *sd,int type)
continue;
if(((itemid[i] >= 715 && itemid[i] <= 717) || itemid[i] == 1065) && sd->sc_data[SC_INTOABYSS].timer != -1)
continue;
+ if(skill == WZ_FIREPILLAR && lv<=5)
+ continue; // no gemstones for 1-5 [Celest]
if(skill == AM_POTIONPITCHER && i != x)
continue;
@@ -7733,6 +7766,7 @@ int skill_status_change_end(struct block_list* bl, int type, int tid)
case SC_MATKPOT: /* magic attack potion [Valaris] */
case SC_WEDDING: //結婚用(結婚衣裳になって歩くのが遅いとか)
case SC_MELTDOWN: /* メルトダウン */
+ case SC_EDP: // Celest
calc_flag = 1;
break;
case SC_BERSERK: /* バーサーク */
@@ -8138,10 +8172,10 @@ int skill_status_change_timer(int tid, unsigned int tick, int id, int data)
case SC_TENSIONRELAX: /* テンションリラックス */
if(sd){ /* SPがあって、HPが満タンでなければ継続 */
if( sd->status.sp > 12 && sd->status.max_hp > sd->status.hp ){
- if(sc_data[type].val2 % (sc_data[type].val1+3) ==0 ){
+/* if(sc_data[type].val2 % (sc_data[type].val1+3) ==0 ){
sd->status.sp -= 12;
clif_updatestatus(sd,SP_SP);
- }
+ } */
sc_data[type].timer=add_timer( /* タイマー再設定 */
10000+tick, skill_status_change_timer,
bl->id, data);
@@ -8410,6 +8444,7 @@ int skill_status_change_start(struct block_list *bl, int type, int val1, int val
break;
case SC_ENDURE: /* インデュア */
if(tick <= 0) tick = 1000 * 60;
+ val2 = 7; // [Celest]
break;
case SC_CONCENTRATE: /* 集中力向上 */
calc_flag = 1;
@@ -8476,7 +8511,11 @@ int skill_status_change_start(struct block_list *bl, int type, int val1, int val
val2=(((val1 - 1) / 2) + 3)*100; /* 毒付与確率 */
skill_encchant_eremental_end(bl,SC_ENCPOISON);
break;
+ case SC_EDP: // [Celest]
+ calc_flag = 1;
+ break;
case SC_POISONREACT: /* ポイズンリアクト */
+ val2=val1/2 + val1%2; // [Celest]
break;
case SC_IMPOSITIO: /* インポシティオマヌス */
calc_flag = 1;
diff --git a/src/map/skill.h b/src/map/skill.h
index dd035b8af..c5c3e98d5 100644
--- a/src/map/skill.h
+++ b/src/map/skill.h
@@ -331,6 +331,8 @@ enum { // struct map_session_data の status_changeの番号テーブル
SC_MINDBREAKER =191,
SC_SPELLBREAKER =192,
+ SC_EDP = 114, // [Celest]
+
// -- testing various SC effects
// SC_AURABLADE =81,
// SC_CONCENTRATION =83,