瀏覽代碼

- Gravitation now only blocks the caster from using potions.
- Corrected Madness Canceller not letting you walk while the effect lasts.
- 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.


git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@8392 54d463be-8e91-2dee-dedb-b68131a5f0ec

skotlex 19 年之前
父節點
當前提交
68df921a84
共有 5 個文件被更改,包括 38 次插入22 次删除
  1. 6 0
      Changelog-Trunk.txt
  2. 1 1
      db/skill_cast_db.txt
  3. 13 4
      src/map/battle.c
  4. 2 2
      src/map/pc.c
  5. 16 15
      src/map/unit.c

+ 6 - 0
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]

+ 1 - 1
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

+ 13 - 4
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_);

+ 2 - 2
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;
 	

+ 16 - 15
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;
 	}