summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Changelog-SVN.txt3
-rw-r--r--src/map/battle.c21
-rw-r--r--src/map/skill.c16
3 files changed, 21 insertions, 19 deletions
diff --git a/Changelog-SVN.txt b/Changelog-SVN.txt
index ebdf84e3a..4451c3512 100644
--- a/Changelog-SVN.txt
+++ b/Changelog-SVN.txt
@@ -1,11 +1,12 @@
Date Added
03/08
+ * Added DracoRPG's code for Soul Breaker - the magic attack part should work
+ as it should now, thanks! ^^ [celest]
* Reverted the reverted jA event change but this time without bugs (hopefully) [Shinomori]
* corrected status_change_timer as far as I understand the functionality
(better have a look at it, Celest), added a some security to prevent pending timers
* moved two variable declarations to scope start (mob.c and skill.c)
-
* Fixes Icewall can be directly cast on players and monsters -- also removes
the 'unsupported layout' message [celest]
* Added the new turbo_room and alde_tt to the maps config [celest]
diff --git a/src/map/battle.c b/src/map/battle.c
index bffbd0684..f1fdf3efa 100644
--- a/src/map/battle.c
+++ b/src/map/battle.c
@@ -2289,9 +2289,6 @@ static struct Damage battle_calc_pc_weapon_attack(
// calculate physical part of damage
damage = damage * skill_lv;
damage2 = damage2 * skill_lv;
- // calculate magic part of damage
- damage3 = skill_lv * status_get_int(src) * 5;
-
flag=(flag&~BF_RANGEMASK)|BF_LONG;
}
break;
@@ -2558,12 +2555,6 @@ static struct Damage battle_calc_pc_weapon_attack(
//カード補正による左手ダメージ増加
//カードによるダメージ増加処理(左手)ここまで
-// -- moonsoul (cardfix for magic damage portion of ASC_BREAKER)
- if(skill_num == ASC_BREAKER) {
- damage3 = damage3 * cardfix / 100;
- dmg_lv = ATK_DEF; // ignores flee [celest]
- }
-
//カードによるダメージ減衰処理ここから
if(tsd){ //対象がPCの場合
cardfix=100;
@@ -2761,14 +2752,6 @@ static struct Damage battle_calc_pc_weapon_attack(
}
}
-
-// -- moonsoul (final combination of phys, mag damage for ASC_BREAKER)
- if(skill_num == ASC_BREAKER) {
- damage3 += rand()%500+500;
- damage += damage3;
-// damage2 += damage3;
- }
-
wd.damage=damage;
wd.damage2=damage2;
wd.type=type;
@@ -3039,6 +3022,10 @@ struct Damage battle_calc_magic_attack(
matk_flag = 0; // don't consider matk and matk2
}
break;
+ case ASC_BREAKER:
+ damage = rand()%500 + 500 + skill_lv * status_get_int(bl) * 5;
+ matk_flag = 0; // don't consider matk and matk2
+ break;
}
}
diff --git a/src/map/skill.c b/src/map/skill.c
index d8ce713c6..0baadbb05 100644
--- a/src/map/skill.c
+++ b/src/map/skill.c
@@ -1236,6 +1236,7 @@ int skill_attack( int attack_type, struct block_list* src, struct block_list *ds
struct Damage dmg;
struct status_change *sc_data;
int type,lv,damage;
+ static int tmpdmg = 0;
if(skillid > 0 && skilllv <= 0) return 0;
@@ -1440,6 +1441,13 @@ int skill_attack( int attack_type, struct block_list* src, struct block_list *ds
case AS_SPLASHER:
clif_skill_damage(dsrc,bl,tick,dmg.amotion,dmg.dmotion, damage, dmg.div_, skillid, -1, 5);
break;
+ case ASC_BREAKER: // [celest]
+ if (attack_type&BF_MAGIC) { // only display damage for the 2nd attack
+ clif_skill_damage(dsrc, bl, tick, dmg.amotion, dmg.dmotion, damage+tmpdmg, dmg.div_, skillid, skilllv, type);
+ tmpdmg = 0; // clear the temporary damage
+ } else
+ tmpdmg = damage; // store the temporary weapon damage
+ break;
case NPC_SELFDESTRUCTION:
case NPC_SELFDESTRUCTION2:
break;
@@ -2156,13 +2164,19 @@ int skill_castend_damage_id( struct block_list* src, struct block_list *bl,int s
// case PA_SACRIFICE: /* サクリファイス */
// case SN_SHARPSHOOTING: /* シャ?プシュ?ティング */
case CG_ARROWVULCAN: /* アロ?バルカン */
- case ASC_BREAKER: /* ソウルブレ?カ? */
+// case ASC_BREAKER: /* ソウルブレ?カ? */
case HW_MAGICCRASHER: /* マジッククラッシャ? */
case ASC_METEORASSAULT: /* メテオアサルト */
case ITM_TOMAHAWK:
skill_attack(BF_WEAPON,src,src,bl,skillid,skilllv,tick,flag);
break;
+ case ASC_BREAKER: /* ソウルブレ?カ? */ // [DracoRPG]
+ // separate weapon and magic attacks
+ skill_attack(BF_WEAPON,src,src,bl,skillid,skilllv,tick,flag);
+ skill_attack(BF_MAGIC,src,src,bl,skillid,skilllv,tick,flag);
+ break;
+
case SN_SHARPSHOOTING: /* シャ?プシュ?ティング */
map_foreachinpath (skill_attack_area,src->m, // function, map
src->x,src->y, // source xy