summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/map/battle.c20
-rw-r--r--src/map/map.c3
-rw-r--r--src/map/map.h1
-rw-r--r--src/map/skill.c87
4 files changed, 95 insertions, 16 deletions
diff --git a/src/map/battle.c b/src/map/battle.c
index 8309bce78..6ff2697b4 100644
--- a/src/map/battle.c
+++ b/src/map/battle.c
@@ -4008,6 +4008,7 @@ struct Damage battle_calc_magic_attack(
struct Damage md;
int aflag;
int normalmagic_flag=1;
+ int matk_flag = 1;
int ele=0,race=7,t_ele=0,t_race=7,t_mode = 0,cardfix,t_class,i;
struct map_session_data *sd=NULL,*tsd=NULL;
struct mob_data *tmd = NULL;
@@ -4165,15 +4166,26 @@ struct Damage battle_calc_magic_attack(
printf("battle_calc_magic_attack(): napalmvulcan enemy count=0 !\n");
}
break;
+ case PF_SOULBURN: // Celest
+ if (target->type != BL_PC || skill_lv < 5) {
+ memset(&md,0,sizeof(md));
+ return md;
+ } else if (target->type == BL_PC) {
+ damage = ((struct map_session_data *)target)->status.sp * 2;
+ matk_flag = 0; // don't consider matk and matk2
+ }
+ break;
}
}
if(normalmagic_flag){ // 一般魔法ダメージ計算
int imdef_flag=0;
- if(matk1>matk2)
- damage= matk2+rand()%(matk1-matk2+1);
- else
- damage= matk2;
+ if (matk_flag) {
+ if(matk1>matk2)
+ damage= matk2+rand()%(matk1-matk2+1);
+ else
+ damage= matk2;
+ }
if(sd) {
if(sd->ignore_mdef_ele & (1<<t_ele) || sd->ignore_mdef_race & (1<<t_race))
imdef_flag = 1;
diff --git a/src/map/map.c b/src/map/map.c
index 274c9559e..ebdc2a8c5 100644
--- a/src/map/map.c
+++ b/src/map/map.c
@@ -986,7 +986,7 @@ int map_quit(struct map_session_data *sd) {
sd->status.hp = 100;
skill_status_change_clear(&sd->bl,1); // ステータス異常を解除する
- skill_clear_unitgroup(&sd->bl); // スキルユニットグループの削除
+// skill_clear_unitgroup(&sd->bl); // スキルユニットグループの削除
skill_cleartimerskill(&sd->bl);
pc_stop_walking(sd,0);
pc_stopattack(sd);
@@ -995,6 +995,7 @@ int map_quit(struct map_session_data *sd) {
skill_gangsterparadise(sd,0);
pc_calcstatus(sd,4);
+ skill_clear_unitgroup(&sd->bl); // [Sara-chan]
clif_clearchar_area(&sd->bl,2);
diff --git a/src/map/map.h b/src/map/map.h
index 870682156..60f4ce9d6 100644
--- a/src/map/map.h
+++ b/src/map/map.h
@@ -398,6 +398,7 @@ struct mob_data {
unsigned change_walk_target : 1;
unsigned walk_easy : 1;
unsigned special_mob_ai : 3;
+ unsigned soul_change_flag : 1; // Celest
} state;
int timer;
short to_x,to_y;
diff --git a/src/map/skill.c b/src/map/skill.c
index 80a7170b5..4830ba6c7 100644
--- a/src/map/skill.c
+++ b/src/map/skill.c
@@ -1,4 +1,4 @@
-// $Id: skill.c,v 1.8 2004/11/30 8:26:49 PM Celestia Exp $
+// $Id: skill.c,v 1.8 2004/12/1 11:59:43 PM Celestia Exp $
/* スキル?係 */
#include <stdio.h>
@@ -1151,7 +1151,7 @@ int skill_additional_effect( struct block_list* src, struct block_list *bl,int s
struct status_change *sc_data = battle_get_sc_data(bl);
if(sc_data) {
sc_data[SC_FREEZE].val3++;
- if(sc_data[SC_FREEZE].val3 >= 3 && rand()%100 < skilllv*sc_def_mdef/100)
+ if(sc_data[SC_FREEZE].val3 >= 3 && rand()%1000 < skilllv*sc_def_mdef/100)
skill_status_change_start(bl,SC_FREEZE,skilllv,0,0,0,skill_get_time2(skillid,skilllv),0);
}
}
@@ -2485,6 +2485,11 @@ int skill_castend_damage_id( struct block_list* src, struct block_list *bl,int s
}
skill_attack(BF_WEAPON,src,src,bl,skillid,skilllv,tick,
0x0500|dist );
+ 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);
+ }
}
}else{
int ar=1;
@@ -2499,9 +2504,8 @@ int skill_castend_damage_id( struct block_list* src, struct block_list *bl,int s
else if(skillid==NPC_SPLASHATTACK) /* スプラッシュアタックは範?7*7 */
ar=3;
- // meteor assault cast effect (not sure how else to properly add it =p) [Celest]
if (skillid == ASC_METEORASSAULT)
- clif_specialeffect(&sd->bl,409, 1);
+ clif_skill_nodamage(src,bl,skillid,skilllv,1);
skill_area_temp[1]=bl->id;
skill_area_temp[2]=x;
@@ -2516,11 +2520,6 @@ 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: /* ボウリングバッシュ */
@@ -2721,6 +2720,27 @@ int skill_castend_damage_id( struct block_list* src, struct block_list *bl,int s
skill_attack(BF_MISC,src,src,bl,skillid,skilllv,tick,0 );
break;
+ // Celest
+ case PF_SOULBURN:
+ {
+ int per = skilllv < 5 ? 20+ skilllv*10 : 60;
+ if (rand()%100 < per) {
+ clif_skill_nodamage(src,bl,skillid,skilllv,1);
+ if (skilllv == 5)
+ skill_attack(BF_MAGIC,src,src,bl,skillid,skilllv,tick,0 );
+ if (bl->type == BL_PC)
+ ((struct map_session_data *)bl)->status.sp = 0;
+ } else {
+ clif_skill_nodamage(src,src,skillid,skilllv,1);
+ if (skilllv == 5)
+ skill_attack(BF_MAGIC,src,src,src,skillid,skilllv,tick,0 );
+ sd->status.sp = 0;
+ clif_updatestatus(sd,SP_SP);
+ }
+ skill_status_change_start(src,SC_BLOCKSKILL,skilllv,0,skillid,0, (skilllv < 5 ? 10000: 15000),0 );
+ }
+ break;
+
case NPC_SELFDESTRUCTION: /* 自爆 */
case NPC_SELFDESTRUCTION2: /* 自爆2 */
if(flag&1){
@@ -2783,6 +2803,7 @@ int skill_castend_damage_id( struct block_list* src, struct block_list *bl,int s
break;
default:
+ printf("Unknown skill used:%d\n",skillid);
map_freeblock_unlock();
return 1;
}
@@ -3538,7 +3559,7 @@ int skill_castend_nodamage_id( struct block_list *src, struct block_list *bl,int
{
struct status_change *tsc_data = battle_get_sc_data(bl);
int sc=SkillStatusChangeTable[skillid];
- clif_skill_nodamage(src,bl,skillid,-1,1);
+ clif_skill_nodamage(src,bl,skillid,skilllv,1);
if( tsc_data ){
if( tsc_data[sc].timer==-1 )
/* 付加する */
@@ -4421,7 +4442,7 @@ int skill_castend_nodamage_id( struct block_list *src, struct block_list *bl,int
if((double)battle_get_max_hp(bl)*2/3 < battle_get_hp(bl)) //HPが2/3以上?っていたら失敗
return 1;
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 );
+ skill_status_change_start(bl,SkillStatusChangeTable[skillid],skilllv,skillid,src->id,skill_get_time(skillid,skilllv),1000,0 );
break;
case PF_MINDBREAKER: /* プロボック */
@@ -4462,6 +4483,35 @@ int skill_castend_nodamage_id( struct block_list *src, struct block_list *bl,int
}
break;
+ case PF_SOULCHANGE:
+ {
+ int sp1 = 0, sp2 = 0;
+ if (sd) {
+ if (dstsd) {
+ sp1 = sd->status.sp > dstsd->status.max_sp ? dstsd->status.max_sp : sd->status.sp;
+ sp2 = dstsd->status.sp > sd->status.max_sp ? sd->status.max_sp : dstsd->status.sp;
+ sd->status.sp = sp2;
+ dstsd->status.sp = sp1;
+ clif_heal(sd->fd,SP_SP,sp2);
+ clif_heal(dstsd->fd,SP_SP,sp1);
+ } else if (dstmd) {
+ if (dstmd->state.soul_change_flag) {
+ clif_skill_fail(sd,skillid,0,0);
+ map_freeblock_unlock();
+ return 0;
+ }
+ sp2 = sd->status.max_sp * 3 /100;
+ if (sd->status.sp + sp2 > sd->status.max_sp)
+ sp2 = sd->status.max_sp - sd->status.sp;
+ sd->status.sp += sp2;
+ clif_heal(sd->fd,SP_SP,sp2);
+ dstmd->state.soul_change_flag = 1;
+ }
+ }
+ clif_skill_nodamage(src,bl,skillid,skilllv,1);
+ }
+ break;
+
// Weapon Refining [Celest]
case WS_WEAPONREFINE:
if(sd)
@@ -4617,6 +4667,7 @@ int skill_castend_nodamage_id( struct block_list *src, struct block_list *bl,int
}
}
break;
+
default:
printf("Unknown skill used:%d\n",skillid);
map_freeblock_unlock();
@@ -9072,6 +9123,20 @@ int skill_status_change_timer(int tid, unsigned int tick, int id, int data)
return 0;
}
break;
+
+ case SC_SPLASHER:
+ if (sc_data[type].val4 % 1000 == 0) {
+ char timer[2];
+ sprintf (timer, "%d", sc_data[type].val4/1000);
+ clif_message(bl, timer);
+ }
+ if((sc_data[type].val4 -= 500) > 0) {
+ sc_data[type].timer = add_timer(
+ 500 + tick, skill_status_change_timer,
+ bl->id, data);
+ return 0;
+ }
+ break;
case SC_LEADERSHIP:
case SC_GLORYWOUNDS:
case SC_SOULCOLD: