Browse Source

- Updated skill_require_db to place the Zeny requirements of ZenyNage and Fling.
- Fixed crash when non-players use ZenyNage. Added the correct Zeny check in skill_check_condition, fixed the skill so that it's damage is based on whatever zeny is specified in skill_require_db.
- Can-act delay will not be reset when warping now.
- Fixed Quagmire not altering walking-speed.
- Silence now blocks skills both on begin/end casting.
- Updated status_calc_bl so that when walking speed changes, the character is made to rewalk so that the new speed takes effect inmediately.


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

skotlex 19 years ago
parent
commit
0263fcc40c
6 changed files with 44 additions and 18 deletions
  1. 11 0
      Changelog-Trunk.txt
  2. 2 2
      db/skill_require_db.txt
  3. 3 1
      src/map/battle.c
  4. 10 9
      src/map/skill.c
  5. 16 5
      src/map/status.c
  6. 2 1
      src/map/unit.c

+ 11 - 0
Changelog-Trunk.txt

@@ -3,6 +3,17 @@ 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/06/20
+	* Updated skill_require_db to place the Zeny requirements of ZenyNage and
+	  Fling. [Skotlex]
+	* Fixed crash when non-players use ZenyNage. Added the correct Zeny check
+	  in skill_check_condition, fixed the skill so that it's damage is based on
+	  whatever zeny is specified in skill_require_db. [Skotlex]
+	* Can-act delay will not be reset when warping now. [Skotlex]
+	* Fixed Quagmire not altering walking-speed. [Skotlex]
+	* Silence now blocks skills both on begin/end casting. [Skotlex]
+	* Updated status_calc_bl so that when walking speed changes, the character
+	  is made to rewalk so that the new speed takes effect inmediately. [Skotlex]
 2006/06/19
 	* Added Ayothaya to nopenalty and nopvp mapflags. [Evera]
 	* Combo-used Skills with State "move_enable" will now override the "can't

+ 2 - 2
db/skill_require_db.txt

@@ -390,7 +390,7 @@
 498,0,0,200,0,0,0,99,0,0,none,7134,200,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0//AM_TWILIGHT3#ƒgƒ?ƒCƒ‰ƒCƒgƒtƒ@?[ƒ}ƒV?[3#
 499,0,0,8,0,0,0,11,1,1,none,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0	//HT_POWER#ƒr?[ƒXƒgƒXƒgƒŒƒCƒsƒ“ƒO#
 //temp plugs
-500,0,0,10,0,0,0,99,0,0,none,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0	//GS_GLITTERING
+500,0,0,10,0,0,1,99,0,0,none,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0	//GS_GLITTERING
 501,0,0,10,0,0,0,17:18:19:20:21,0,0,none,5,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0	//GS_FLING
 502,0,0,10,0,0,0,17:18:19:20:21,3:4:5,1,none,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0	//GS_TRIPLEACTION
 503,0,0,10,0,0,0,17:18:19:20:21,3:4:5,1,none,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0	//GS_BULLSEYE
@@ -412,7 +412,7 @@
 523,0,0,10,0,0,0,0,6,1,none,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0	//NJ_SYURIKEN
 524,0,0,10,0,0,0,0,7,1,none,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0	//NJ_KUNAI
 525,0,0,20:25:30:35:40,0,0,0,0,6,1,none,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0	//NJ_HUUMA
-526,0,0,50,0,0,0,0,0,0,none,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0	//NJ_ZENYNAGE
+526,0,0,50,0,0,1000:2000:3000:4000:5000,0,0,0,none,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0	//NJ_ZENYNAGE
 527,0,0,40,0,0,0,0,0,0,none,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0	//NJ_TATAMIGAESHI
 528,0,0,10:12:14:16:18:20:22:24:26:28,0,0,0,0,0,0,none,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0	//NJ_KASUMIKIRI
 529,0,0,40,0,0,0,0,0,0,hiding,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0	//NJ_SHADOWJUMP

+ 3 - 1
src/map/battle.c

@@ -2516,7 +2516,9 @@ struct Damage  battle_calc_misc_attack(
 		if (tsd) md.damage>>=1;
 		break;
 	case NJ_ZENYNAGE:
-		md.damage = 500*skill_lv +rand()%(500*skill_lv);
+		md.damage = skill_get_zeny(skill_num ,skill_lv);
+		if (!md.damage) md.damage = 2;
+		md.damage = md.damage/2 + rand()%md.damage;
 		if (sd) pc_payzeny(sd, md.damage);
 		if(map_flag_vs(target->m) || is_boss(target))
 			md.damage>>=1; //temp value

+ 10 - 9
src/map/skill.c

@@ -1454,7 +1454,7 @@ int skill_counter_additional_effect (struct block_list* src, struct block_list *
 			
 			
 			rate = sd?(sd->addeff2[type]+(sd->state.arrow_atk?sd->arrow_addeff2[type]:0)):0;
-			if (rate) //Self infliced status from attacking.
+			if (rate) //Self inflicted status from attacking.
 				status_change_start(src,i,rate,7,0,0,0,skill_get_time2(StatusSkillChangeTable[type],7),0);
 
 			rate = dstsd?dstsd->addeff3[type]:0;
@@ -2934,6 +2934,7 @@ int skill_castend_damage_id (struct block_list* src, struct block_list *bl, int
 	case NPC_SMOKING:
 	case NPC_SELFDESTRUCTION:
 	case GS_FLING:
+	case NJ_ZENYNAGE:
 		skill_attack(BF_MISC,src,src,bl,skillid,skilllv,tick,flag);
 		break;
 
@@ -2999,12 +3000,6 @@ int skill_castend_damage_id (struct block_list* src, struct block_list *bl, int
 				skill_castend_damage_id);
 		}
 		break;
-	case NJ_ZENYNAGE:
-		if(sd->status.zeny < skilllv*1000)
-			clif_skill_fail(sd,skillid,5,0);
-		else
-			skill_attack(BF_MISC,src,src,bl,skillid,skilllv,tick,flag);
-		break;
 	case NJ_KASUMIKIRI:
 		skill_attack(BF_WEAPON,src,src,bl,skillid,skilllv,tick,flag);
 		sc_start(src,SC_HIDING,100,skilllv,skill_get_time(skillid,skilllv));
@@ -3032,7 +3027,6 @@ int skill_castend_damage_id (struct block_list* src, struct block_list *bl, int
 	//case NJ_SYURIKEN:
 	//case NJ_KUNAI:
 	//case NJ_HUUMA:
-	//case NJ_ZENYNAGE:
 	case NJ_TATAMIGAESHI:
 	//case NJ_KASUMIKIRI:
 	//case NJ_KIRIKAGE:
@@ -7904,13 +7898,20 @@ int skill_check_condition (struct map_session_data *sd, int skill, int lv, int t
 			clif_skill_fail(sd,skill,0,0);
 			return 0;
 		}
-		zeny = 1;
 		break;
 	
 	case NJ_ISSEN:
 		if (sc && sc->data[SC_NEN].timer!=-1)
 			return 0;
 		break;
+	
+	case NJ_ZENYNAGE:
+		if(sd->status.zeny < zeny) {
+			clif_skill_fail(sd,skill,5,0);
+			return 0;
+		}
+		zeny = 0; //Zeny is reduced on skill_attack.
+		break;
 	}
 
 	if(!(type&2)){

+ 16 - 5
src/map/status.c

@@ -165,7 +165,7 @@ void initChangeTables(void) {
 	add_sc(WZ_VERMILION, SC_BLIND);
 	add_sc(WZ_FROSTNOVA, SC_FREEZE);
 	add_sc(WZ_STORMGUST, SC_FREEZE);
-	set_sc(WZ_QUAGMIRE, SC_QUAGMIRE, SI_QUAGMIRE, SCB_AGI|SCB_DEX|SCB_ASPD);
+	set_sc(WZ_QUAGMIRE, SC_QUAGMIRE, SI_QUAGMIRE, SCB_AGI|SCB_DEX|SCB_ASPD|SCB_SPEED);
 	set_sc(BS_ADRENALINE, SC_ADRENALINE, SI_ADRENALINE, SCB_ASPD);
 	set_sc(BS_WEAPONPERFECT, SC_WEAPONPERFECTION, SI_WEAPONPERFECTION, SCB_NONE);
 	set_sc(BS_OVERTHRUST, SC_OVERTHRUST, SI_OVERTHRUST, SCB_NONE);
@@ -898,11 +898,16 @@ int status_check_skilluse(struct block_list *src, struct block_list *target, int
 			if (!flag && ( //Blocked only from using the skill (stuff like autospell may still go through
 				(sc->data[SC_MARIONETTE].timer != -1 && skill_num != CG_MARIONETTE) ||
 				(sc->data[SC_MARIONETTE2].timer != -1 && skill_num == CG_MARIONETTE) ||
-				sc->data[SC_SILENCE].timer != -1 || 
 				sc->data[SC_STEELBODY].timer != -1 ||
 				sc->data[SC_BERSERK].timer != -1
 			))
 				return 0;
+
+			if (flag != 2 && ( //Those that block begin/end casting.
+				sc->data[SC_SILENCE].timer != -1
+			))
+				return 0;
+
 			//Skill blocking.
 			if (
 				(sc->data[SC_VOLCANO].timer != -1 && skill_num == WZ_ICEWALL) ||
@@ -2425,8 +2430,11 @@ void status_calc_bl_sub_pc(struct map_session_data *sd, unsigned long flag)
 	if (flag == SCB_ALL)
 		return; //Refresh is done on invoking function (status_calc_pc)
 
-	if(flag&SCB_SPEED)
+	if(flag&SCB_SPEED) {
 		clif_updatestatus(sd,SP_SPEED);
+		if (sd->ud.walktimer != -1) //Re-walk to adjust speed. [Skotlex]
+			unit_walktoxy(&sd->bl, sd->ud.to_x, sd->ud.to_y, sd->ud.state.walk_easy);
+	}
 	if(flag&SCB_STR)
 		clif_updatestatus(sd,SP_STR);
 	if(flag&SCB_AGI)
@@ -2582,9 +2590,12 @@ void status_calc_bl(struct block_list *bl, unsigned long flag)
 			status->mdef2 = status_calc_mdef2(bl, sc, b_status->mdef2 +(status->int_ - b_status->int_) +((status->vit - b_status->vit)>>1));
 	}
 
-	if(flag&SCB_SPEED)
+	if(flag&SCB_SPEED) {
+		struct unit_data *ud = unit_bl2ud(bl);
 		status->speed = status_calc_speed(bl, sc, b_status->speed);
-
+		if (ud && ud->walktimer != -1) //Re-walk to adjust speed. [Skotlex]
+			unit_walktoxy(bl, ud->to_x, ud->to_y, ud->state.walk_easy);
+	}
 	if(flag&SCB_CRI && b_status->cri) {
 		if (status->luk == b_status->luk)
 			status->cri = status_calc_critical(bl, sc, b_status->cri);

+ 2 - 1
src/map/unit.c

@@ -1466,7 +1466,8 @@ int unit_remove_map(struct block_list *bl, int clrtype) {
 		unit_stop_attack(bl);
 	if (ud->skilltimer != -1)
 		unit_skillcastcancel(bl,0);
-	ud->attackabletime = ud->canmove_tick = ud->canact_tick = gettick();
+// Do not reset can-act delay. [Skotlex]
+	ud->attackabletime = ud->canmove_tick /*= ud->canact_tick*/ = gettick();
 	clif_clearchar_area(bl,clrtype);
 	
 	if(sc && sc->count ) { //map-change/warp dispells.