summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Changelog-Trunk.txt6
-rw-r--r--db/skill_cast_db.txt2
-rw-r--r--src/map/battle.c17
-rw-r--r--src/map/pc.c4
-rw-r--r--src/map/unit.c31
5 files changed, 38 insertions, 22 deletions
diff --git a/Changelog-Trunk.txt b/Changelog-Trunk.txt
index ef600b7d6..d74c9d97d 100644
--- a/Changelog-Trunk.txt
+++ b/Changelog-Trunk.txt
@@ -3,6 +3,12 @@ Date Added
AS OF SVN REV. 5091, WE ARE NOW USING TRUNK. ALL UNTESTED BUGFIXES/FEATURES GO INTO TRUNK.
IF YOU HAVE A WORKING AND TESTED BUGFIX PUT IT INTO STABLE AS WELL AS TRUNK.
2006/08/20
+ * Gravitation now only blocks the caster from using potions. [Skotlex]
+ * Corrected Madness Canceller letting you walk while the effect lasts.
+ [Skotlex]
+ * Splitted yet again ASC_BREAKER into a two-part attack. This time the
+ int-based damage is a MISC type attack, and gets reduced by skills as such.
+ [Skotlex]
* Fixed "int format, long unsigned int arg" warning [Toms]
* Fixed a warning when using cap_value(x, 0, x) on an unsigned value [Toms]
* Added clif_skill_fail for homunc to skill_castend_id & skill_castend_pos [Toms]
diff --git a/db/skill_cast_db.txt b/db/skill_cast_db.txt
index 69f25295b..55eb05443 100644
--- a/db/skill_cast_db.txt
+++ b/db/skill_cast_db.txt
@@ -849,7 +849,7 @@
//-- GS_BULLSEYE
503,0,1000,0,0,0
//-- GS_MADNESSCANCEL
-504,0,1000,15000,15000,0
+504,0,1000,0,15000,0
//-- GS_ADJUSTMENT
505,0,1000,0,30000,0
//-- GS_INCREASING
diff --git a/src/map/battle.c b/src/map/battle.c
index d78b83c31..fff1dbe81 100644
--- a/src/map/battle.c
+++ b/src/map/battle.c
@@ -754,6 +754,9 @@ void battle_consume_ammo(TBL_PC*sd, int skill, int lv)
pc_delitem(sd,sd->equip_index[10],qty,0);
}
+struct Damage battle_calc_magic_attack(struct block_list *src,struct block_list *target,int skill_num,int skill_lv,int mflag);
+struct Damage battle_calc_misc_attack(struct block_list *src,struct block_list *target,int skill_num,int skill_lv,int mflag);
+
//For quick div adjustment.
#define damage_div_fix(dmg, div) { if (div > 1) (dmg)*=div; else if (div < 0) (div)*=-1; }
/*==========================================
@@ -1813,10 +1816,6 @@ static struct Damage battle_calc_weapon_attack(
}
}
- //Breaker's int-based damage (applies after attribute modifiers)
- if(skill_num==ASC_BREAKER)
- ATK_ADD(rand()%500 + 500 + skill_lv * sstatus->int_ * 5);
-
if ((!flag.rh || !wd.damage) && (!flag.lh || !wd.damage2))
flag.cardfix = 0; //When the attack does no damage, avoid doing %bonuses
@@ -2027,6 +2026,12 @@ static struct Damage battle_calc_weapon_attack(
}
}
+ if(skill_num==ASC_BREAKER)
+ { //Breaker's int-based damage (a misc attack?)
+ struct Damage md = battle_calc_misc_attack(src, target, skill_num, skill_lv, wflag);
+ wd.damage += md.damage;
+ }
+
if (wd.damage || wd.damage2) {
if (sd && battle_config.equip_self_break_rate)
{ // Self weapon breaking
@@ -2518,6 +2523,7 @@ struct Damage battle_calc_misc_attack(
case SN_FALCONASSAULT:
case PA_GOSPEL:
case CR_ACIDDEMONSTRATION:
+ case ASC_BREAKER:
md.flag = (md.flag&~BF_RANGEMASK)|BF_LONG;
break;
case HVAN_EXPLOSION:
@@ -2613,6 +2619,9 @@ struct Damage battle_calc_misc_attack(
case HVAN_EXPLOSION: //[orn]
md.damage = sstatus->hp * (50 + 50 * skill_lv) / 100 ;
break ;
+ case ASC_BREAKER:
+ md.damage = 500+rand()%500 + 5*skill_lv * sstatus->int_;
+ break;
}
damage_div_fix(md.damage, md.div_);
diff --git a/src/map/pc.c b/src/map/pc.c
index 0acccb16e..befbce5f8 100644
--- a/src/map/pc.c
+++ b/src/map/pc.c
@@ -2914,9 +2914,9 @@ int pc_useitem(struct map_session_data *sd,int n)
if (sd->sc.count && (
sd->sc.data[SC_BERSERK].timer!=-1 ||
sd->sc.data[SC_MARIONETTE].timer!=-1 ||
- sd->sc.data[SC_GRAVITATION].timer!=-1 ||
+ (sd->sc.data[SC_GRAVITATION].timer!=-1 && sd->sc.data[SC_GRAVITATION].val3 == BCT_SELF) ||
//Cannot use Potions/Healing items while under Gospel.
- (sd->sc.data[SC_GOSPEL].timer!=-1 && sd->sc.data[SC_GOSPEL].val4 == BCT_SELF && sd->inventory_data[n]->type == 0)
+ (sd->sc.data[SC_GOSPEL].timer!=-1 && sd->sc.data[SC_GOSPEL].val4 == BCT_SELF && sd->inventory_data[n]->type == IT_HEALING)
))
return 0;
diff --git a/src/map/unit.c b/src/map/unit.c
index e04244469..5c48cf8e4 100644
--- a/src/map/unit.c
+++ b/src/map/unit.c
@@ -664,23 +664,24 @@ int unit_can_move(struct block_list *bl)
return 0;
if (sc->count && (
- sc->data[SC_ANKLE].timer != -1 ||
- sc->data[SC_AUTOCOUNTER].timer !=-1 ||
- sc->data[SC_TRICKDEAD].timer !=-1 ||
- sc->data[SC_BLADESTOP].timer !=-1 ||
- sc->data[SC_BLADESTOP_WAIT].timer !=-1 ||
- sc->data[SC_SPIDERWEB].timer !=-1 ||
- (sc->data[SC_DANCING].timer !=-1 && (
+ sc->data[SC_ANKLE].timer != -1
+ || sc->data[SC_AUTOCOUNTER].timer !=-1
+ || sc->data[SC_TRICKDEAD].timer !=-1
+ || sc->data[SC_BLADESTOP].timer !=-1
+ || sc->data[SC_BLADESTOP_WAIT].timer !=-1
+ || sc->data[SC_SPIDERWEB].timer !=-1
+ || (sc->data[SC_DANCING].timer !=-1 && (
(sc->data[SC_DANCING].val4 && sc->data[SC_LONGING].timer == -1) ||
sc->data[SC_DANCING].val1 == CG_HERMODE //cannot move while Hermod is active.
- )) ||
- sc->data[SC_MOONLIT].timer != -1 ||
- (sc->data[SC_GOSPEL].timer !=-1 && sc->data[SC_GOSPEL].val4 == BCT_SELF) || // cannot move while gospel is in effect
- sc->data[SC_STOP].timer != -1 ||
- sc->data[SC_CLOSECONFINE].timer != -1 ||
- sc->data[SC_CLOSECONFINE2].timer != -1 ||
- (sc->data[SC_CLOAKING].timer != -1 && //Need wall at level 1-2
- sc->data[SC_CLOAKING].val1 < 3 && !(sc->data[SC_CLOAKING].val4&1))
+ ))
+ || sc->data[SC_MOONLIT].timer != -1
+ || (sc->data[SC_GOSPEL].timer !=-1 && sc->data[SC_GOSPEL].val4 == BCT_SELF) // cannot move while gospel is in effect
+ || sc->data[SC_STOP].timer != -1
+ || sc->data[SC_CLOSECONFINE].timer != -1
+ || sc->data[SC_CLOSECONFINE2].timer != -1
+ || (sc->data[SC_CLOAKING].timer != -1 && //Need wall at level 1-2
+ sc->data[SC_CLOAKING].val1 < 3 && !(sc->data[SC_CLOAKING].val4&1))
+ || sc->data[SC_MADNESSCANCEL].timer != -1
))
return 0;
}