Browse Source

Fix Highness Heal calculation : Fixes bugreport:7966
Map crash fix when casting Kaihou - Fixes bugreport:7962
Update Songs/Dances for Land Protector - Fixes bugreport:7913
Show baseATK increases in status window - Fixes bugreport:7960
Revert damage to int64 - Fixes bugreport:7939
- Also removed limit on Acid Demonstration
Changed Camouflage to increase Equip Attack - Partially fixes bugreport:7941

Akinari1087 11 years ago
parent
commit
5c157a5ac5
7 changed files with 47 additions and 56 deletions
  1. 19 19
      db/pre-re/skill_db.txt
  2. 18 18
      db/re/skill_db.txt
  3. 6 15
      src/map/battle.c
  4. 1 1
      src/map/battle.h
  5. 1 1
      src/map/pc.c
  6. 1 1
      src/map/skill.c
  7. 1 1
      src/map/status.c

+ 19 - 19
db/pre-re/skill_db.txt

@@ -349,31 +349,31 @@
 303,9,6,4,0,0,0,1,1,yes,0,0x2,0,magic,0,		SA_COMA,Coma
 304,0,6,4,0,0x1,0,1,1,no,0,0,0,none,0,		BD_ADAPTATION,Amp
 305,0,6,4,0,0x1,0,1,1,no,0,0,0,none,0,		BD_ENCORE,Encore
-306,0,6,4,0,0x1,0,1,1,no,0,0x40,0,misc,0,	BD_LULLABY,Lullaby
-307,0,6,4,0,0x1,0,5,1,no,0,0x40,0,misc,0,	BD_RICHMANKIM,Mental Sensing
-308,0,6,4,0,0x1,0,1,1,no,0,0x40,0,misc,0,	BD_ETERNALCHAOS,Down Tempo
-309,0,6,4,0,0x1,0,5,1,no,0,0x40,0,misc,0,	BD_DRUMBATTLEFIELD,Battle Theme
-310,0,6,4,0,0x1,0,5,1,no,0,0x40,0,misc,0,	BD_RINGNIBELUNGEN,Harmonic Lick
-311,0,6,4,0,0x1,0,1,1,no,0,0x40,0,misc,0,	BD_ROKISWEIL,Classical Pluck
-312,0,6,4,0,0x1,0,1,1,no,0,0x40,0,misc,0,	BD_INTOABYSS,Power Chord
-313,0,6,4,0,0x1,0,5,1,no,0,0x40,0,misc,0,	BD_SIEGFRIED,Acoustic Rhythm
+306,0,6,4,0,0x1,0,1,1,no,0,0x2040,0,misc,0,	BD_LULLABY,Lullaby
+307,0,6,4,0,0x1,0,5,1,no,0,0x2040,0,misc,0,	BD_RICHMANKIM,Mental Sensing
+308,0,6,4,0,0x1,0,1,1,no,0,0x2040,0,misc,0,	BD_ETERNALCHAOS,Down Tempo
+309,0,6,4,0,0x1,0,5,1,no,0,0x2040,0,misc,0,	BD_DRUMBATTLEFIELD,Battle Theme
+310,0,6,4,0,0x1,0,5,1,no,0,0x2040,0,misc,0,	BD_RINGNIBELUNGEN,Harmonic Lick
+311,0,6,4,0,0x1,0,1,1,no,0,0x2040,0,misc,0,	BD_ROKISWEIL,Classical Pluck
+312,0,6,4,0,0x1,0,1,1,no,0,0x2040,0,misc,0,	BD_INTOABYSS,Power Chord
+313,0,6,4,0,0x1,0,5,1,no,0,0x2040,0,misc,0,	BD_SIEGFRIED,Acoustic Rhythm
 //314,0,0,0,0,0,0,1,1,no,0,0x40,0,misc,0,	BD_RAGNAROK,Ragnarok
 315,0,0,0,0,0,0,10,0,no,0,0,0,weapon,0,		BA_MUSICALLESSON,Music Lessons
 316,9,6,1,-1,0,0,5,1,no,0,0,0,weapon,0,		BA_MUSICALSTRIKE,Melody Strike
-317,0,8,4,0,0x41,0,5,1,no,0,0x20,0,misc,0,	BA_DISSONANCE,Unchained Serenade
+317,0,8,4,0,0x41,0,5,1,no,0,0x2020,0,misc,0,	BA_DISSONANCE,Unchained Serenade
 318,0,6,4,0,0x3,-1,5,1,no,0,0,0,misc,0,		BA_FROSTJOKER,Unbarring Octave
-319,0,6,4,0,0x1,0,10,1,no,0,0x20,0,misc,0,	BA_WHISTLE,Perfect Tablature
-320,0,6,4,0,0x1,0,10,1,no,0,0x20,0,misc,0,	BA_ASSASSINCROSS,Impressive Riff
-321,0,6,4,0,0x1,0,10,1,no,0,0x20,0,misc,0,	BA_POEMBRAGI,Magic Strings
-322,0,6,4,0,0x1,0,10,1,no,0,0x20,0,misc,0,	BA_APPLEIDUN,Song of Lutie
+319,0,6,4,0,0x1,0,10,1,no,0,0x2020,0,misc,0,	BA_WHISTLE,Perfect Tablature
+320,0,6,4,0,0x1,0,10,1,no,0,0x2020,0,misc,0,	BA_ASSASSINCROSS,Impressive Riff
+321,0,6,4,0,0x1,0,10,1,no,0,0x2020,0,misc,0,	BA_POEMBRAGI,Magic Strings
+322,0,6,4,0,0x1,0,10,1,no,0,0x2020,0,misc,0,	BA_APPLEIDUN,Song of Lutie
 323,0,0,0,0,0,0,10,0,no,0,0,0,weapon,0,		DC_DANCINGLESSON,Dance Lessons
 324,9,6,1,-1,0,0,5,1,no,0,0,0,weapon,0,		DC_THROWARROW,Slinging Arrow
-325,0,8,4,0,0x1,0,5,1,no,0,0x20,0,misc,0,	DC_UGLYDANCE,Hip Shaker
+325,0,8,4,0,0x1,0,5,1,no,0,0x2020,0,misc,0,	DC_UGLYDANCE,Hip Shaker
 326,0,6,4,0,0x3,-1,5,1,no,0,0,0,misc,0,		DC_SCREAM,Dazzler
-327,0,6,4,0,0x1,0,10,1,no,0,0x20,0,misc,0,	DC_HUMMING,Focus Ballet
-328,0,6,4,0,0x1,0,10,1,no,0,0x20,0,misc,0,	DC_DONTFORGETME,Slow Grace
-329,0,6,4,0,0x1,0,10,1,no,0,0x20,0,misc,0,	DC_FORTUNEKISS,Lady Luck
-330,0,6,4,0,0x1,0,10,1,no,0,0x20,0,misc,0,	DC_SERVICEFORYOU,Gypsy's Kiss
+327,0,6,4,0,0x1,0,10,1,no,0,0x2020,0,misc,0,	DC_HUMMING,Focus Ballet
+328,0,6,4,0,0x1,0,10,1,no,0,0x2020,0,misc,0,	DC_DONTFORGETME,Slow Grace
+329,0,6,4,0,0x1,0,10,1,no,0,0x2020,0,misc,0,	DC_FORTUNEKISS,Lady Luck
+330,0,6,4,0,0x1,0,10,1,no,0,0x2020,0,misc,0,	DC_SERVICEFORYOU,Gypsy's Kiss
 331,0,6,4,0,0x1,0,10,0,no,0,0x2,0,none,0,	NPC_RANDOMMOVE,Random Move
 332,0,6,4,0,0x1,0,10,0,no,0,0x2,0,none,0,	NPC_SPEEDUP,Speed UP
 333,0,6,4,0,0x1,0,1,0,no,0,0x2,0,none,0,		NPC_REVENGE,Revenge
@@ -438,7 +438,7 @@
 392,0,0,4,0,0x1,0,1,1,yes,0,0,0,none,0,		CR_ALCHEMY,Alchemy
 393,0,0,4,0,0x1,0,1,1,yes,0,0,0,none,0,		CR_SYNTHESISPOTION,Potion Synthesis
 394,9,8,1,-1,0,0,10,-9,yes,0,0,0,weapon,0,	CG_ARROWVULCAN,Vulcan Arrow
-395,0,0,4,0,0x1,3,1,1,yes,0,0x40,0,misc,2,	CG_MOONLIT,Sheltering Bliss
+395,0,0,4,0,0x1,3,1,1,yes,0,0x2040,0,misc,2,	CG_MOONLIT,Sheltering Bliss
 396,1,6,16,0,0x1,0,1,1,yes,0,0x600,0,none,0,	CG_MARIONETTE,Marionette Control
 397,5,8,1,-1,0x20,0,5,5,no,0,0,0,weapon,0,	LK_SPIRALPIERCE,Spiral Pierce
 398,4,6,1,-1,0,0,5,1,no,0,0,0,weapon,0,		LK_HEADCRUSH,Traumatic Blow

+ 18 - 18
db/re/skill_db.txt

@@ -349,31 +349,31 @@
 303,9,6,4,0,0,0,1,1,yes,0,0x2,0,magic,0,		SA_COMA,Coma
 304,0,6,4,0,0x1,0,1,1,no,0,0,0,none,0,		BD_ADAPTATION,Amp
 305,0,6,4,0,0x1,0,1,1,no,0,0,0,none,0,		BD_ENCORE,Encore
-306,0,6,4,0,0x1,0,1,1,no,0,0x40,0,misc,0,	BD_LULLABY,Lullaby
-307,0,6,4,0,0x1,0,5,1,no,0,0x40,0,misc,0,	BD_RICHMANKIM,Mental Sensing
-308,0,6,4,0,0x1,0,1,1,no,0,0x40,0,misc,0,	BD_ETERNALCHAOS,Down Tempo
-309,0,6,4,0,0x1,0,5,1,no,0,0x40,0,misc,0,	BD_DRUMBATTLEFIELD,Battle Theme
-310,0,6,4,0,0x1,0,5,1,no,0,0x40,0,misc,0,	BD_RINGNIBELUNGEN,Harmonic Lick
-311,0,6,4,0,0x1,0,1,1,no,0,0x40,0,misc,0,	BD_ROKISWEIL,Classical Pluck
-312,0,6,4,0,0x1,0,1,1,no,0,0x40,0,misc,0,	BD_INTOABYSS,Power Chord
-313,0,6,4,0,0x1,0,5,1,no,0,0x40,0,misc,0,	BD_SIEGFRIED,Acoustic Rhythm
+306,0,6,4,0,0x1,0,1,1,no,0,0x2040,0,misc,0,	BD_LULLABY,Lullaby
+307,0,6,4,0,0x1,0,5,1,no,0,0x2040,0,misc,0,	BD_RICHMANKIM,Mental Sensing
+308,0,6,4,0,0x1,0,1,1,no,0,0x2040,0,misc,0,	BD_ETERNALCHAOS,Down Tempo
+309,0,6,4,0,0x1,0,5,1,no,0,0x2040,0,misc,0,	BD_DRUMBATTLEFIELD,Battle Theme
+310,0,6,4,0,0x1,0,5,1,no,0,0x2040,0,misc,0,	BD_RINGNIBELUNGEN,Harmonic Lick
+311,0,6,4,0,0x1,0,1,1,no,0,0x2040,0,misc,0,	BD_ROKISWEIL,Classical Pluck
+312,0,6,4,0,0x1,0,1,1,no,0,0x2040,0,misc,0,	BD_INTOABYSS,Power Chord
+313,0,6,4,0,0x1,0,5,1,no,0,0x2040,0,misc,0,	BD_SIEGFRIED,Acoustic Rhythm
 //314,0,0,0,0,0,0,1,1,no,0,0x40,0,misc,0,	BD_RAGNAROK,Ragnarok
 315,0,0,0,0,0,0,10,0,no,0,0,0,weapon,0,		BA_MUSICALLESSON,Music Lessons
 316,9,6,1,-1,0,0,5,1,no,0,0,0,weapon,0,		BA_MUSICALSTRIKE,Melody Strike
-317,0,8,4,0,0x41,0,5,1,no,0,0x20,0,misc,0,	BA_DISSONANCE,Unchained Serenade
+317,0,8,4,0,0x41,0,5,1,no,0,0x2020,0,misc,0,	BA_DISSONANCE,Unchained Serenade
 318,0,6,4,0,0x3,-1,5,1,no,0,0,0,misc,0,		BA_FROSTJOKER,Unbarring Octave
-319,0,6,4,0,0x1,0,10,1,no,0,0x20,0,misc,0,	BA_WHISTLE,Perfect Tablature
-320,0,6,4,0,0x1,0,10,1,no,0,0x20,0,misc,0,	BA_ASSASSINCROSS,Impressive Riff
-321,0,6,4,0,0x1,0,10,1,no,0,0x20,0,misc,0,	BA_POEMBRAGI,Magic Strings
-322,0,6,4,0,0x1,0,10,1,no,0,0x20,0,misc,0,	BA_APPLEIDUN,Song of Lutie
+319,0,6,4,0,0x1,0,10,1,no,0,0x2020,0,misc,0,	BA_WHISTLE,Perfect Tablature
+320,0,6,4,0,0x1,0,10,1,no,0,0x2020,0,misc,0,	BA_ASSASSINCROSS,Impressive Riff
+321,0,6,4,0,0x1,0,10,1,no,0,0x2020,0,misc,0,	BA_POEMBRAGI,Magic Strings
+322,0,6,4,0,0x1,0,10,1,no,0,0x2020,0,misc,0,	BA_APPLEIDUN,Song of Lutie
 323,0,0,0,0,0,0,10,0,no,0,0,0,weapon,0,		DC_DANCINGLESSON,Dance Lessons
 324,9,6,1,-1,0,0,5,1,no,0,0,0,weapon,0,		DC_THROWARROW,Slinging Arrow
-325,0,8,4,0,0x1,0,5,1,no,0,0x20,0,misc,0,	DC_UGLYDANCE,Hip Shaker
+325,0,8,4,0,0x1,0,5,1,no,0,0x2020,0,misc,0,	DC_UGLYDANCE,Hip Shaker
 326,0,6,4,0,0x3,-1,5,1,no,0,0,0,misc,0,		DC_SCREAM,Dazzler
-327,0,6,4,0,0x1,0,10,1,no,0,0x20,0,misc,0,	DC_HUMMING,Focus Ballet
-328,0,6,4,0,0x1,0,10,1,no,0,0x20,0,misc,0,	DC_DONTFORGETME,Slow Grace
-329,0,6,4,0,0x1,0,10,1,no,0,0x20,0,misc,0,	DC_FORTUNEKISS,Lady Luck
-330,0,6,4,0,0x1,0,10,1,no,0,0x20,0,misc,0,	DC_SERVICEFORYOU,Gypsy's Kiss
+327,0,6,4,0,0x1,0,10,1,no,0,0x2020,0,misc,0,	DC_HUMMING,Focus Ballet
+328,0,6,4,0,0x1,0,10,1,no,0,0x2020,0,misc,0,	DC_DONTFORGETME,Slow Grace
+329,0,6,4,0,0x1,0,10,1,no,0,0x2020,0,misc,0,	DC_FORTUNEKISS,Lady Luck
+330,0,6,4,0,0x1,0,10,1,no,0,0x2020,0,misc,0,	DC_SERVICEFORYOU,Gypsy's Kiss
 331,0,6,4,0,0x1,0,10,0,no,0,0x2,0,none,0,	NPC_RANDOMMOVE,Random Move
 332,0,6,4,0,0x1,0,10,0,no,0,0x2,0,none,0,	NPC_SPEEDUP,Speed UP
 333,0,6,4,0,0x1,0,1,0,no,0,0x2,0,none,0,		NPC_REVENGE,Revenge

+ 6 - 15
src/map/battle.c

@@ -2173,6 +2173,8 @@ static int battle_calc_equip_attack(struct block_list *src, int skill_id)
 	if(src != NULL) {
 		struct status_data *status = status_get_status_data(src);
 		struct map_session_data *sd = BL_CAST(BL_PC, src);
+		if( sd->sc.data[SC_CAMOUFLAGE] )
+			status->eatk += 30 * min(10,sd->sc.data[SC_CAMOUFLAGE]->val3); //max +300atk
 		if(sd)
 			return is_skill_using_arrow(src, skill_id) ? sd->bonus.arrow_atk + status->eatk : status->eatk; // add arrow atk if using an applicable skill
 		else
@@ -2350,15 +2352,6 @@ static struct Damage battle_calc_attack_masteries(struct Damage wd, struct block
 
 	int t_class = status_get_class(target);
 
-	if (sc) {
-		if(sc->data[SC_CAMOUFLAGE]) {
-			ATK_ADD(wd.damage, wd.damage2, 30 * min(10,sc->data[SC_CAMOUFLAGE]->val3) ); //max +300atk
-#ifdef RENEWAL
-			ATK_ADD(wd.masteryAtk, wd.masteryAtk2, 30 * min(10,sc->data[SC_CAMOUFLAGE]->val3) ); //max +300atk
-#endif
-		}
-	}
-
 	if (sd && battle_skill_stacks_masteries_vvs(skill_id) &&
 		skill_id != MO_INVESTIGATE &&
 		skill_id != MO_EXTREMITYFIST &&
@@ -3600,9 +3593,10 @@ static int battle_calc_skill_constant_addition(struct Damage wd, struct block_li
 			break;
 		case KO_SETSUDAN:
 			if( tsc && tsc->data[SC_SPIRIT] ){
-				atk = ((wd.damage) * (10*tsc->data[SC_SPIRIT]->val1)) / 100;// +10% custom value.
 #ifdef RENEWAL
 				atk = ((wd.equipAtk + wd.weaponAtk + wd.statusAtk + wd.masteryAtk) * (10*tsc->data[SC_SPIRIT]->val1)) / 100;// +10% custom value.
+#else
+				atk = ((wd.damage) * (10*tsc->data[SC_SPIRIT]->val1)) / 100;// +10% custom value.
 #endif
 				status_change_end(target,SC_SPIRIT,INVALID_TIMER);
 			}
@@ -3611,9 +3605,10 @@ static int battle_calc_skill_constant_addition(struct Damage wd, struct block_li
 			if( sd ){
 				ARR_FIND(1, 6, i, sd->talisman[i] > 0);
 				if( i < 5 ){
-					atk = ((wd.damage) * (10*tsc->data[SC_SPIRIT]->val1)) / 100;// +10% custom value.
 #ifdef RENEWAL
 					atk = ((wd.equipAtk + wd.weaponAtk + wd.statusAtk + wd.masteryAtk) * (100 * sd->talisman[i])) / 100;// +100% custom value.
+#else
+					atk = ((wd.damage) * (100 * sd->talisman[i])) / 100;// +100% custom value.
 #endif
 					pc_del_talisman(sd, sd->talisman[i], i);
 				}
@@ -5259,10 +5254,6 @@ struct Damage battle_calc_misc_attack(struct block_list *src,struct block_list *
 			md.damage = 0;
 		if (tsd) md.damage>>=1;
 #endif
-		if (md.damage < 0 || md.damage > INT_MAX>>1)
-		//Overflow prevention, will anyone whine if I cap it to a few billion?
-		//Not capped to INT_MAX to give some room for further damage increase.
-			md.damage = INT_MAX>>1;
 		break;
 	case NJ_ZENYNAGE:
 	case KO_MUCHANAGE:

+ 1 - 1
src/map/battle.h

@@ -46,7 +46,7 @@ struct Damage {
 #ifdef RENEWAL
 	int statusAtk, statusAtk2, weaponAtk, weaponAtk2, equipAtk, equipAtk2, masteryAtk, masteryAtk2;
 #endif
-	int damage,damage2; //right, left dmg
+	int64 damage,damage2; //right, left dmg
 	int type,div_; //chk clif_damage for type @TODO add an enum ? ;  nb of hit
 	int amotion,dmotion;
 	int blewcount; //nb of knockback

+ 1 - 1
src/map/pc.c

@@ -2111,7 +2111,7 @@ int pc_bonus(struct map_session_data *sd,int type,int val)
 		case SP_BASE_ATK:
 			if(sd->state.lr_flag != 2) {
 	#ifdef RENEWAL
-	            sd->bonus.eatk += val;
+				sd->bonus.eatk += val;
 	#else
 				bonus = status->batk + val;
 				status->batk = cap_value(bonus, 0, USHRT_MAX);

+ 1 - 1
src/map/skill.c

@@ -396,7 +396,7 @@ int skill_calc_heal(struct block_list *src, struct block_list *target, uint16 sk
 				hp = (status_get_lv(src) + status_get_int(src)) / 8 * (4 + ( (skill_id == AB_HIGHNESSHEAL ? (sd ? pc_checkskill(sd,AL_HEAL) : 10 ) : skill_lv) * 8));
 			#endif
 			if (skill_id == AB_HIGHNESSHEAL)
-				hp *= ( 17 + 3 * skill_lv ) / 10;
+				hp = hp * ( 17 + 3 * skill_lv ) / 10;
 			if( sd && ((skill = pc_checkskill(sd, HP_MEDITATIO)) > 0) )
 				hp += hp * skill * 2 / 100;
 			else if( src->type == BL_HOM && (skill = merc_hom_checkskill(((TBL_HOM*)src), HLIF_BRAIN)) > 0 )

+ 1 - 1
src/map/status.c

@@ -4172,7 +4172,7 @@ void status_calc_bl_(struct block_list* bl, enum scb_flag flag, bool first)
 
 		if(b_status.rhw.atk2 != status->rhw.atk2 || b_status.lhw.atk2 != status->lhw.atk2
 #ifdef RENEWAL
-		|| b_status.rhw.atk != status->rhw.atk || b_status.lhw.atk != status->lhw.atk
+		|| b_status.rhw.atk != status->rhw.atk || b_status.lhw.atk != status->lhw.atk || b_status.eatk != status->eatk
 #endif
 			)
 			clif_updatestatus(sd,SP_ATK2);