diff options
Diffstat (limited to 'src/map')
-rw-r--r-- | src/map/battle.c | 6 | ||||
-rw-r--r-- | src/map/map.h | 1 | ||||
-rw-r--r-- | src/map/mob.c | 18 | ||||
-rw-r--r-- | src/map/pc.c | 7 | ||||
-rw-r--r-- | src/map/skill.c | 9 | ||||
-rw-r--r-- | src/map/skill.h | 219 |
6 files changed, 140 insertions, 120 deletions
diff --git a/src/map/battle.c b/src/map/battle.c index 494b7a323..c43e9bb61 100644 --- a/src/map/battle.c +++ b/src/map/battle.c @@ -931,7 +931,7 @@ int battle_get_speed(struct block_list *bl) if(sc_data[SC_CURSE].timer!=-1) speed = speed + 450; //ウィンドウォーク時はLv*2%減算 - if(sc_data[SC_WINDWALK].timer!=-1) + if(sc_data[SC_WINDWALK].timer!=-1 && sc_data[SC_INCREASEAGI].timer==-1) speed -= (speed*(sc_data[SC_WINDWALK].val1*2))/100; if(sc_data[SC_SLOWDOWN].timer!=-1) speed = speed*150/100; @@ -990,7 +990,7 @@ int battle_get_adelay(struct block_list *bl) if(sc_data[SC_STEELBODY].timer!=-1) // 金剛 aspd_rate += 25; //増速ポーション使用時は減算 - if( sc_data[i=SC_SPEEDPOTION2].timer!=-1 || sc_data[i=SC_SPEEDPOTION1].timer!=-1 || sc_data[i=SC_SPEEDPOTION0].timer!=-1) + if( sc_data[i=SC_SPEEDPOTION3].timer!=-1 || sc_data[i=SC_SPEEDPOTION2].timer!=-1 || sc_data[i=SC_SPEEDPOTION1].timer!=-1 || sc_data[i=SC_SPEEDPOTION0].timer!=-1) aspd_rate -= sc_data[i].val2; //ディフェンダー時は加算 if(sc_data[SC_DEFENDER].timer != -1) @@ -1037,7 +1037,7 @@ int battle_get_amotion(struct block_list *bl) aspd_rate += sc_data[SC_DONTFORGETME].val1*3 + sc_data[SC_DONTFORGETME].val2 + (sc_data[SC_DONTFORGETME].val3>>16); if(sc_data[SC_STEELBODY].timer!=-1) // 金剛 aspd_rate += 25; - if( sc_data[i=SC_SPEEDPOTION2].timer!=-1 || sc_data[i=SC_SPEEDPOTION1].timer!=-1 || sc_data[i=SC_SPEEDPOTION0].timer!=-1) + if( sc_data[i=SC_SPEEDPOTION3].timer!=-1 || sc_data[i=SC_SPEEDPOTION2].timer!=-1 || sc_data[i=SC_SPEEDPOTION1].timer!=-1 || sc_data[i=SC_SPEEDPOTION0].timer!=-1) aspd_rate -= sc_data[i].val2; if(sc_data[SC_DEFENDER].timer != -1) amotion += (550 - sc_data[SC_DEFENDER].val1*50); diff --git a/src/map/map.h b/src/map/map.h index 6d525c117..aaf44cd36 100644 --- a/src/map/map.h +++ b/src/map/map.h @@ -407,6 +407,7 @@ struct mob_data { } state; int timer; short to_x,to_y; + short target_dir; short speed; int hp; int target_id,attacked_id; diff --git a/src/map/mob.c b/src/map/mob.c index a057d12e1..a2ddc9e99 100644 --- a/src/map/mob.c +++ b/src/map/mob.c @@ -928,6 +928,7 @@ int mob_spawn(int id) md->to_x=md->bl.x=x; md->to_y=md->bl.y=y; md->dir=0; + md->target_dir=0; map_addblock(&md->bl); @@ -1492,17 +1493,28 @@ static int mob_randomwalk(struct mob_data *md,int tick) speed=battle_get_speed(&md->bl); if(DIFF_TICK(md->next_walktime,tick)<0){ int i,x,y,c,d=12-md->move_fail_count; + int mask[8][2] = {{0,1},{-1,1},{-1,0},{-1,-1},{0,-1},{1,-1},{1,0},{1,1}}; if(d<5) d=5; for(i=0;i<retrycount;i++){ // Search of a movable place int r=rand(); - x=md->bl.x+r%(d*2+1)-d; - y=md->bl.y+r/(d*2+1)%(d*2+1)-d; + x=r%(d*2+1)-d; + y=r/(d*2+1)%(d*2+1)-d; + if (md->target_dir){ + if (x<0) x=0-x; + if (y<0) y=0-y; + x *= mask[md->target_dir-1][0]; + y *= mask[md->target_dir-1][1]; + } + x+=md->bl.x; + y+=md->bl.y; + if((c=map_getcell(md->bl.m,x,y))!=1 && c!=5 && mob_walktoxy(md,x,y,1)==0){ md->move_fail_count=0; break; } if(i+1>=retrycount){ md->move_fail_count++; + md->target_dir = 0; if(md->move_fail_count>1000){ if(battle_config.error_log) printf("MOB cant move. random spawn %d, class = %d\n",md->bl.id,md->class); @@ -2278,6 +2290,8 @@ int mob_damage(struct block_list *src,struct mob_data *md,int damage,int type) mobskill_use_id(md,&md->bl,skillidx);//自爆詠唱開始 md->state.special_mob_ai++; } + if (md->master_id==src->id) + md->target_dir=map_calc_dir(src,md->bl.x,md->bl.y)+1; } if(md->hp>0){ diff --git a/src/map/pc.c b/src/map/pc.c index 3c37f7ce1..40d0cad79 100644 --- a/src/map/pc.c +++ b/src/map/pc.c @@ -1888,11 +1888,12 @@ int pc_calcstatus(struct map_session_data* sd,int first) aspd_rate += sd->sc_data[SC_DONTFORGETME].val1*3 + sd->sc_data[SC_DONTFORGETME].val2 + (sd->sc_data[SC_DONTFORGETME].val3>>16); sd->speed= sd->speed*(100+sd->sc_data[SC_DONTFORGETME].val1*2 + sd->sc_data[SC_DONTFORGETME].val2 + (sd->sc_data[SC_DONTFORGETME].val3&0xffff))/100; } - if( sd->sc_data[i=SC_SPEEDPOTION2].timer!=-1 || + if( sd->sc_data[i=SC_SPEEDPOTION3].timer!=-1 || + sd->sc_data[i=SC_SPEEDPOTION2].timer!=-1 || sd->sc_data[i=SC_SPEEDPOTION1].timer!=-1 || sd->sc_data[i=SC_SPEEDPOTION0].timer!=-1) // ? 速ポ?ション aspd_rate -= sd->sc_data[i].val2; - if(sd->sc_data[SC_WINDWALK].timer!=-1) //ウィンドウォ?ク時はLv*2%減算 + if(sd->sc_data[SC_WINDWALK].timer!=-1 && sd->sc_data[SC_INCREASEAGI].timer==-1) //ウィンドウォ?ク時はLv*2%減算 sd->speed -= sd->speed *(sd->sc_data[SC_WINDWALK].val1*2)/100; if(sd->sc_data[SC_CARTBOOST].timer!=-1) // カ?トブ?スト sd->speed -= (DEFAULT_WALK_SPEED * 20)/100; @@ -2162,7 +2163,7 @@ int pc_calcspeed (struct map_session_data *sd) if(sd->sc_data[SC_QUAGMIRE].timer!=-1){ sd->speed = sd->speed*3/2; } - if(sd->sc_data[SC_WINDWALK].timer!=-1) { + if(sd->sc_data[SC_WINDWALK].timer!=-1 && sd->sc_data[SC_INCREASEAGI].timer==-1) { sd->speed -= sd->speed *(sd->sc_data[SC_WINDWALK].val1*2)/100; } if(sd->sc_data[SC_CARTBOOST].timer!=-1) { diff --git a/src/map/skill.c b/src/map/skill.c index ec7ed2fe7..221118628 100644 --- a/src/map/skill.c +++ b/src/map/skill.c @@ -8667,6 +8667,7 @@ int skill_status_change_end(struct block_list* bl, int type, int tid) case SC_SPEEDPOTION0: /* ?速ポ?ション */ case SC_SPEEDPOTION1: case SC_SPEEDPOTION2: + case SC_SPEEDPOTION3: case SC_APPLEIDUN: /* イドゥンの林檎 */ case SC_RIDING: case SC_BLADESTOP_WAIT: @@ -9500,7 +9501,7 @@ int skill_status_change_start(struct block_list *bl, int type, int val1, int val if(sc_data[type].timer != -1){ /* すでに同じ異常になっている場合タイマ解除 */ if(sc_data[type].val1 > val1 && type != SC_COMBO && type != SC_DANCING && type != SC_DEVOTION && - type != SC_SPEEDPOTION0 && type != SC_SPEEDPOTION1 && type != SC_SPEEDPOTION2 + type != SC_SPEEDPOTION0 && type != SC_SPEEDPOTION1 && type != SC_SPEEDPOTION2 && type != SC_SPEEDPOTION3 && type != SC_ATKPOT && type != SC_MATKPOT) // added atk and matk potions [Valaris] return 0; if ((type >=SC_STAN && type <= SC_BLIND) || type == SC_DPOISON) @@ -9553,8 +9554,9 @@ int skill_status_change_start(struct block_list *bl, int type, int val1, int val calc_flag = 1; if(sc_data[SC_DECREASEAGI].timer!=-1 ) skill_status_change_end(bl,SC_DECREASEAGI,-1); - if(sc_data[SC_WINDWALK].timer!=-1 ) /* ウインドウォ?ク */ - skill_status_change_end(bl,SC_WINDWALK,-1); + // the effect will still remain [celest] +// if(sc_data[SC_WINDWALK].timer!=-1 ) /* ウインドウォ?ク */ +// skill_status_change_end(bl,SC_WINDWALK,-1); break; case SC_DECREASEAGI: /* 速度減少 */ if (bl->type == BL_PC) // Celest @@ -9840,6 +9842,7 @@ int skill_status_change_start(struct block_list *bl, int type, int val1, int val case SC_SPEEDPOTION0: /* ?速ポ?ション */ case SC_SPEEDPOTION1: case SC_SPEEDPOTION2: + case SC_SPEEDPOTION3: calc_flag = 1; tick = 1000 * tick; val2 = 5*(2+type-SC_SPEEDPOTION0); diff --git a/src/map/skill.h b/src/map/skill.h index 09f47403e..4d1319599 100644 --- a/src/map/skill.h +++ b/src/map/skill.h @@ -183,134 +183,135 @@ enum { enum { // struct map_session_data の status_changeの番?テ?ブル // SC_SENDMAX未?はクライアントへの通知あり。 // 2-2次職の値はなんかめちゃくちゃっぽいので暫定。たぶん?更されます。 - SC_SENDMAX =128, + SC_SENDMAX =128, SC_PROVOKE = 0, SC_ENDURE = 1, - SC_TWOHANDQUICKEN = 2, + SC_TWOHANDQUICKEN = 2, SC_CONCENTRATE = 3, SC_HIDING = 4, SC_CLOAKING = 5, - SC_ENCPOISON = 6, + SC_ENCPOISON = 6, SC_POISONREACT = 7, SC_QUAGMIRE = 8, SC_ANGELUS = 9, - SC_BLESSING =10, - SC_SIGNUMCRUCIS =11, - SC_INCREASEAGI =12, - SC_DECREASEAGI =13, - SC_SLOWPOISON =14, - SC_IMPOSITIO =15, - SC_SUFFRAGIUM =16, - SC_ASPERSIO =17, - SC_BENEDICTIO =18, - SC_KYRIE =19, - SC_MAGNIFICAT =20, - SC_GLORIA =21, - SC_AETERNA =22, - SC_ADRENALINE =23, - SC_WEAPONPERFECTION =24, - SC_OVERTHRUST =25, - SC_MAXIMIZEPOWER =26, - SC_RIDING =27, - SC_FALCON =28, - SC_TRICKDEAD =29, - SC_LOUD =30, - SC_ENERGYCOAT =31, - SC_HALLUCINATION =34, - SC_WEIGHT50 =35, - SC_WEIGHT90 =36, - SC_SPEEDPOTION0 =37, - SC_SPEEDPOTION1 =38, - SC_SPEEDPOTION2 =39, - SC_STRIPWEAPON =50, - SC_STRIPSHIELD =51, - SC_STRIPARMOR =52, - SC_STRIPHELM =53, - SC_CP_WEAPON =54, - SC_CP_SHIELD =55, - SC_CP_ARMOR =56, - SC_CP_HELM =57, - SC_AUTOGUARD =58, - SC_REFLECTSHIELD =59, - SC_DEVOTION =60, - SC_PROVIDENCE =61, - SC_DEFENDER =62, - SC_AUTOSPELL =65, - SC_SPEARSQUICKEN =68, - SC_EXPLOSIONSPIRITS =86, - SC_STEELBODY =87, - SC_COMBO =89, - SC_FLAMELAUNCHER =90, - SC_FROSTWEAPON =91, - SC_LIGHTNINGLOADER =92, - SC_SEISMICWEAPON =93, - SC_AURABLADE =103, /* オ?ラブレ?ド */ - SC_PARRYING =104, /* パリイング */ - SC_CONCENTRATION =105, /* コンセントレ?ション */ - SC_TENSIONRELAX =106, /* テンションリラックス */ - SC_BERSERK =107, /* バ?サ?ク */ - SC_ASSUMPTIO =110, /* アシャンプティオ */ - SC_MAGICPOWER =113, /* 魔法力?幅 */ - SC_TRUESIGHT =115, /* トゥル?サイト */ - SC_WINDWALK =116, /* ウインドウォ?ク */ - SC_MELTDOWN =117, /* メルトダウン */ - SC_CARTBOOST =118, /* カ?トブ?スト */ - SC_REJECTSWORD =120, /* リジェクトソ?ド */ - SC_MARIONETTE =121, /* マリオネットコントロ?ル */ - SC_HEADCRUSH =124, /* ヘッドクラッシュ */ - SC_JOINTBEAT =125, /* ジョイントビ?ト */ - - SC_STONE =128, - SC_FREEZE =129, - SC_STAN =130, - SC_SLEEP =131, - SC_POISON =132, - SC_CURSE =133, - SC_SILENCE =134, - SC_CONFUSION =135, - SC_BLIND =136, + SC_BLESSING = 10, + SC_SIGNUMCRUCIS = 11, + SC_INCREASEAGI = 12, + SC_DECREASEAGI = 13, + SC_SLOWPOISON = 14, + SC_IMPOSITIO = 15, + SC_SUFFRAGIUM = 16, + SC_ASPERSIO = 17, + SC_BENEDICTIO = 18, + SC_KYRIE = 19, + SC_MAGNIFICAT = 20, + SC_GLORIA = 21, + SC_AETERNA = 22, + SC_ADRENALINE = 23, + SC_WEAPONPERFECTION = 24, + SC_OVERTHRUST = 25, + SC_MAXIMIZEPOWER = 26, + SC_RIDING = 27, + SC_FALCON = 28, + SC_TRICKDEAD = 29, + SC_LOUD = 30, + SC_ENERGYCOAT = 31, + SC_HALLUCINATION = 34, + SC_WEIGHT50 = 35, + SC_WEIGHT90 = 36, + SC_SPEEDPOTION0 = 37, + SC_SPEEDPOTION1 = 38, + SC_SPEEDPOTION2 = 39, + SC_SPEEDPOTION3 = 40, + SC_STRIPWEAPON = 50, + SC_STRIPSHIELD = 51, + SC_STRIPARMOR = 52, + SC_STRIPHELM = 53, + SC_CP_WEAPON = 54, + SC_CP_SHIELD = 55, + SC_CP_ARMOR = 56, + SC_CP_HELM = 57, + SC_AUTOGUARD = 58, + SC_REFLECTSHIELD = 59, + SC_DEVOTION = 60, + SC_PROVIDENCE = 61, + SC_DEFENDER = 62, + SC_AUTOSPELL = 65, + SC_SPEARSQUICKEN = 68, + SC_EXPLOSIONSPIRITS = 86, + SC_STEELBODY = 87, + SC_COMBO = 89, + SC_FLAMELAUNCHER = 90, + SC_FROSTWEAPON = 91, + SC_LIGHTNINGLOADER = 92, + SC_SEISMICWEAPON = 93, + SC_AURABLADE = 103, /* オ?ラブレ?ド */ + SC_PARRYING = 104, /* パリイング */ + SC_CONCENTRATION = 105, /* コンセントレ?ション */ + SC_TENSIONRELAX = 106, /* テンションリラックス */ + SC_BERSERK = 107, /* バ?サ?ク */ + SC_ASSUMPTIO = 110, /* アシャンプティオ */ + SC_MAGICPOWER = 113, /* 魔法力?幅 */ + SC_TRUESIGHT = 115, /* トゥル?サイト */ + SC_WINDWALK = 116, /* ウインドウォ?ク */ + SC_MELTDOWN = 117, /* メルトダウン */ + SC_CARTBOOST = 118, /* カ?トブ?スト */ + SC_REJECTSWORD = 120, /* リジェクトソ?ド */ + SC_MARIONETTE = 121, /* マリオネットコントロ?ル */ + SC_HEADCRUSH = 124, /* ヘッドクラッシュ */ + SC_JOINTBEAT = 125, /* ジョイントビ?ト */ + + SC_STONE = 128, + SC_FREEZE = 129, + SC_STAN = 130, + SC_SLEEP = 131, + SC_POISON = 132, + SC_CURSE = 133, + SC_SILENCE = 134, + SC_CONFUSION = 135, + SC_BLIND = 136, SC_DIVINA = SC_SILENCE, - SC_SAFETYWALL =140, - SC_PNEUMA =141, - SC_WATERBALL =142, - SC_ANKLE =143, - SC_DANCING =144, - SC_KEEPING =145, - SC_BARRIER =146, - - SC_MAGICROD =149, - SC_SIGHT =150, - SC_RUWACH =151, - SC_AUTOCOUNTER =152, - SC_VOLCANO =153, - SC_DELUGE =154, - SC_VIOLENTGALE =155, - SC_BLADESTOP_WAIT =156, - SC_BLADESTOP =157, - SC_EXTREMITYFIST =158, - SC_GRAFFITI =159, + SC_SAFETYWALL = 140, + SC_PNEUMA = 141, + SC_WATERBALL = 142, + SC_ANKLE = 143, + SC_DANCING = 144, + SC_KEEPING = 145, + SC_BARRIER = 146, + + SC_MAGICROD = 149, + SC_SIGHT = 150, + SC_RUWACH = 151, + SC_AUTOCOUNTER = 152, + SC_VOLCANO = 153, + SC_DELUGE = 154, + SC_VIOLENTGALE = 155, + SC_BLADESTOP_WAIT = 156, + SC_BLADESTOP = 157, + SC_EXTREMITYFIST = 158, + SC_GRAFFITI = 159, SC_LULLABY =160, - SC_RICHMANKIM =161, + SC_RICHMANKIM =161, SC_ETERNALCHAOS =162, SC_DRUMBATTLE =163, - SC_NIBELUNGEN =164, - SC_ROKISWEIL =165, - SC_INTOABYSS =166, - SC_SIEGFRIED =167, - SC_DISSONANCE =168, + SC_NIBELUNGEN =164, + SC_ROKISWEIL =165, + SC_INTOABYSS =166, + SC_SIEGFRIED =167, + SC_DISSONANCE =168, SC_WHISTLE =169, SC_ASSNCROS =170, - SC_POEMBRAGI =171, - SC_APPLEIDUN =172, - SC_UGLYDANCE =173, + SC_POEMBRAGI =171, + SC_APPLEIDUN =172, + SC_UGLYDANCE =173, SC_HUMMING =174, SC_DONTFORGETME =175, SC_FORTUNE =176, - SC_SERVICE4U =177, + SC_SERVICE4U =177, - SC_SPIDERWEB =180, /* スパイダ?ウェッブ */ + SC_SPIDERWEB =180, /* スパイダ?ウェッブ */ SC_MEMORIZE =181, /* メモライズ */ // SC_DPOISON =182, /* 猛毒 */ @@ -319,7 +320,7 @@ enum { // struct map_session_data の status_changeの番?テ?ブル SC_WEDDING =187, //結婚用(結婚衣裳になって?くのが?いとか) SC_NOCHAT =188, //赤エモ?態 SC_SPLASHER =189, /* ベナムスプラッシャ? */ - SC_SELFDESTRUCTION =190, /* 自爆 */ + SC_SELFDESTRUCTION =190, /* 自爆 */ // Used by English Team |