Skip to content

Commit

Permalink
Bug Fixes
Browse files Browse the repository at this point in the history
* Fixed Severe Rainstorm not being able to be copied by Reproduce. (bugreport:9361)
* Fixed #137 - Updated Homunculus S Race and Element values to official.
* Fixed #163 - Proper renewal calculations for Homunculus. Merge from HerculesWS/Hercules@8faef4f
* Fixed #254 - Corrected King's Grace cooldown to be 60 seconds.
* +20 Foods cannot be dispelled or removed by death.
  • Loading branch information
aleos89 committed Feb 10, 2015
1 parent fe3fcce commit 083cf5d
Show file tree
Hide file tree
Showing 11 changed files with 255 additions and 160 deletions.
2 changes: 1 addition & 1 deletion db/pre-re/skill_cast_db.txt
Expand Up @@ -1410,7 +1410,7 @@
2325,2000,2000,0,30000:45000:60000:75000:90000,0,540000:480000:420000:360000:300000

//-- LG_KINGS_GRACE
5013,1000,0,0,5000,0,0
5013,1000,0,0,5000,0,60000
//==========================================

//===== Sura Skills ========================
Expand Down
10 changes: 5 additions & 5 deletions db/re/homunculus_db.txt
Expand Up @@ -26,8 +26,8 @@
6006,6014,Amistr,912,60000,0,1,2,0,700,320,10,20,17,35,11,24,12,80,130,1,4,8,20,4,20,4,20,1,10,3,19,3,19,1600,3600,120,360,20,50,10,30,20,50,20,50,10,30,10,30
6007,6015,Filir,910,60000,0,1,2,0,700,90,25,29,35,9,8,30,9,45,75,3,6,4,20,8,20,1,10,3,19,4,20,3,19,1200,3200,200,400,20,50,10,30,20,50,20,50,10,30,10,30
6008,6016,Vanilmirth,911,60000,0,1,0,0,700,80,11,11,11,11,11,11,11,30,150,0,7,1,30,1,30,1,30,1,30,1,30,1,30,1200,4800,480,640,10,30,10,30,10,30,20,50,10,50,10,100
6048,6048,Eira,6098,60000,1,1,7,0,700,150,40,17,20,15,35,24,12,40,160,20,42,13,39,28,42,15,25,14,48,16,36,9,18,1000,2000,10,200,1,10,1,10,1,10,1,10,1,10,1,10
6049,6049,Bayeri,6112,60000,1,1,2,0,700,320,10,20,17,35,11,24,12,90,360,48,52,18,36,8,36,16,32,22,44,12,24,20,36,1000,2000,10,200,1,10,1,10,1,10,1,10,1,10,1,10
6050,6050,Sera,6108,60000,1,1,4,0,700,90,25,29,35,9,8,30,9,60,240,36,64,10,25,16,32,5,25,7,35,28,40,20,40,1000,2000,10,200,1,10,1,10,1,10,1,10,1,10,1,10
6051,6051,Dieter,6104,60000,1,1,0,0,700,80,11,11,11,11,11,11,11,240,480,40,120,20,40,13,26,18,36,15,40,16,32,4,16,1000,2000,10,200,1,10,1,10,1,10,1,10,1,10,1,10
6052,6052,Eleanor,6115,60000,1,1,2,0,700,320,10,20,17,35,11,24,12,60,300,10,20,20,40,10,50,24,48,5,15,12,36,2,10,1000,2000,10,200,1,10,1,10,1,10,1,10,1,10,1,10
6048,6048,Eira,6098,60000,1,1,8,4,700,150,40,17,20,15,35,24,12,40,160,20,42,13,39,28,42,15,25,14,48,16,36,9,18,1000,2000,10,200,1,10,1,10,1,10,1,10,1,10,1,10
6049,6049,Bayeri,6112,60000,1,1,2,6,700,320,10,20,17,35,11,24,12,90,360,48,52,18,36,8,36,16,32,22,44,12,24,20,36,1000,2000,10,200,1,10,1,10,1,10,1,10,1,10,1,10
6050,6050,Sera,6108,60000,1,1,4,2,700,90,25,29,35,9,8,30,9,60,240,36,64,10,25,16,32,5,25,7,35,28,40,20,40,1000,2000,10,200,1,10,1,10,1,10,1,10,1,10,1,10
6051,6051,Dieter,6104,60000,1,1,0,3,700,80,11,11,11,11,11,11,11,240,480,40,120,20,40,13,26,18,36,15,40,16,32,4,16,1000,2000,10,200,1,10,1,10,1,10,1,10,1,10,1,10
6052,6052,Eleanor,6115,60000,1,1,7,5,700,320,10,20,17,35,11,24,12,60,300,10,20,20,40,10,50,24,48,5,15,12,36,2,10,1000,2000,10,200,1,10,1,10,1,10,1,10,1,10,1,10
2 changes: 1 addition & 1 deletion db/re/skill_cast_db.txt
Expand Up @@ -1411,7 +1411,7 @@
//-- LG_INSPIRATION
2325,2000,2000,0,30000:45000:60000:75000:90000,0,540000:480000:420000:360000:300000,1000
//-- LG_KINGS_GRACE
5013,1000,0,0,5000,0,0,-1
5013,1000,0,0,5000,0,60000,-1
//==========================================

//===== Sura Skills ========================
Expand Down
19 changes: 13 additions & 6 deletions src/common/mmo.h
Expand Up @@ -317,12 +317,19 @@ struct s_homunculus { //[orn]
unsigned int exp;
short rename_flag;
short vaporize; //albator
int str ;
int agi ;
int vit ;
int int_ ;
int dex ;
int luk ;
int str;
int agi;
int vit;
int int_;
int dex;
int luk;

int str_value;
int agi_value;
int vit_value;
int int_value;
int dex_value;
int luk_value;

char spiritball; //for homun S [lighta]
};
Expand Down
36 changes: 27 additions & 9 deletions src/map/clif.c
Expand Up @@ -1411,15 +1411,24 @@ void clif_hominfo(struct map_session_data *sd, struct homun_data *hd, int flag)
WBUFW(buf,29)=hd->homunculus.hunger;
WBUFW(buf,31)=(unsigned short) (hd->homunculus.intimacy / 100) ;
WBUFW(buf,33)=0; // equip id
#ifdef RENEWAL
WBUFW(buf,35)=cap_value(status->rhw.atk2, 0, INT16_MAX);
#else
WBUFW(buf,35)=cap_value(status->rhw.atk2+status->batk, 0, INT16_MAX);
#endif
WBUFW(buf,37)=min(status->matk_max, INT16_MAX); //FIXME capping to INT16 here is too late
WBUFW(buf,39)=status->hit;
if (battle_config.hom_setting&HOMSET_DISPLAY_LUK)
WBUFW(buf,41)=status->luk/3 + 1; //crit is a +1 decimal value! Just display purpose.[Vicious]
else
WBUFW(buf,41)=status->cri/10;
WBUFW(buf,43)=status->def + status->vit ;
#ifdef RENEWAL
WBUFW(buf,43)=status->def + status->def2;
WBUFW(buf,45)=status->mdef + status->mdef2;
#else
WBUFW(buf,43)=status->def + status->vit;
WBUFW(buf,45)=status->mdef;
#endif
WBUFW(buf,47)=status->flee;
WBUFW(buf,49)=(flag)?0:status->amotion;
if (status->max_hp > INT16_MAX) {
Expand Down Expand Up @@ -2904,7 +2913,6 @@ void clif_updatestatus(struct map_session_data *sd,int type)
WFIFOL(fd,4)=pc_leftside_matk(sd);
break;


case SP_ZENY:
WFIFOW(fd,0)=0xb1;
WFIFOL(fd,4)=sd->status.zeny;
Expand Down Expand Up @@ -11257,16 +11265,20 @@ static void clif_parse_UseSkillToId_homun(struct homun_data *hd, struct map_sess

if( !hd )
return;
if( skill_isNotOk_hom(skill_id, hd) )
if( skill_isNotOk_hom(skill_id, hd) ) {
clif_emotion(&hd->bl, E_DOTS);
return;
}
if( hd->bl.id != target_id && skill_get_inf(skill_id)&INF_SELF_SKILL )
target_id = hd->bl.id;
if( hd->ud.skilltimer != INVALID_TIMER )
{
if( hd->ud.skilltimer != INVALID_TIMER ) {
if( skill_id != SA_CASTCANCEL && skill_id != SO_SPELLFIST ) return;
}
else if( DIFF_TICK(tick, hd->ud.canact_tick) < 0 )
} else if( DIFF_TICK(tick, hd->ud.canact_tick) < 0 ) {
clif_emotion(&hd->bl, E_DOTS);
if (hd->master)
clif_skill_fail(hd->master, skill_id, USESKILL_FAIL_SKILLINTERVAL, 0);
return;
}

lv = hom_checkskill(hd, skill_id);
if( skill_lv > lv )
Expand All @@ -11280,12 +11292,18 @@ static void clif_parse_UseSkillToPos_homun(struct homun_data *hd, struct map_ses
int lv;
if( !hd )
return;
if( skill_isNotOk_hom(skill_id, hd) )
if( skill_isNotOk_hom(skill_id, hd) ) {
clif_emotion(&hd->bl, E_DOTS);
return;
}
if( hd->ud.skilltimer != INVALID_TIMER ) {
if( skill_id != SA_CASTCANCEL && skill_id != SO_SPELLFIST ) return;
} else if( DIFF_TICK(tick, hd->ud.canact_tick) < 0 )
} else if( DIFF_TICK(tick, hd->ud.canact_tick) < 0 ) {
clif_emotion(&hd->bl, E_DOTS);
if (hd->master)
clif_skill_fail(hd->master, skill_id, USESKILL_FAIL_SKILLINTERVAL, 0);
return;
}

if( hd->sc.data[SC_BASILICA] )
return;
Expand Down
2 changes: 2 additions & 0 deletions src/map/homunculus.c
Expand Up @@ -471,6 +471,8 @@ int hom_levelup(struct homun_data *hd)
hom->int_+= growth_int;
hom->luk += growth_luk;

APPLY_HOMUN_LEVEL_STATWEIGHT();

if ( battle_config.homunculus_show_growth ) {
char output[256] ;
sprintf(output,
Expand Down
11 changes: 11 additions & 0 deletions src/map/homunculus.h
Expand Up @@ -7,6 +7,17 @@
#include "status.h" // struct status_data, struct status_change
#include "unit.h" // struct unit_data

#ifdef RENEWAL
#define HOMUN_LEVEL_STATWEIGHT_VALUE 0
#define APPLY_HOMUN_LEVEL_STATWEIGHT()( \
hom->str_value = hom->agi_value = \
hom->vit_value = hom->int_value = \
hom->dex_value = hom->luk_value = hom->level / 10 - HOMUN_LEVEL_STATWEIGHT_VALUE \
)
#else
#define APPLY_HOMUN_LEVEL_STATWEIGHT()
#endif

struct h_stats {
unsigned int HP, SP;
unsigned short str, agi, vit, int_, dex, luk;
Expand Down
4 changes: 2 additions & 2 deletions src/map/pc.h
Expand Up @@ -800,8 +800,8 @@ short pc_maxaspd(struct map_session_data *sd);
#define pc_rightside_def(sd) ((sd)->battle_status.def)
#define pc_leftside_mdef(sd) ((sd)->battle_status.mdef2)
#define pc_rightside_mdef(sd) ((sd)->battle_status.mdef)
#define pc_leftside_matk(sd) (status_base_matk(status_get_status_data(&(sd)->bl), (sd)->status.base_level))
#define pc_rightside_matk(sd) ((sd)->battle_status.rhw.matk+(sd)->battle_status.lhw.matk+(sd)->bonus.ematk)
#define pc_leftside_matk(sd) (status_base_matk(&(sd)->bl, status_get_status_data(&(sd)->bl), (sd)->status.base_level))
#define pc_rightside_matk(sd) ((sd)->battle_status.rhw.matk+(sd)->battle_status.lhw.matk+(sd)->bonus.ematk)
#else
#define pc_leftside_atk(sd) ((sd)->battle_status.batk + (sd)->battle_status.rhw.atk + (sd)->battle_status.lhw.atk)
#define pc_rightside_atk(sd) ((sd)->battle_status.rhw.atk2 + (sd)->battle_status.lhw.atk2)
Expand Down
20 changes: 10 additions & 10 deletions src/map/skill.c
Expand Up @@ -420,7 +420,7 @@ int skill_calc_heal(struct block_list *src, struct block_list *target, uint16 sk
struct status_data *status = status_get_status_data(src);
int min, max;

min = max = status_base_matk(status, status_get_lv(src));
min = max = status_base_matk(src, status, status_get_lv(src));
if( status->rhw.matk > 0 ){
int wMatk, variance;
wMatk = status->rhw.matk;
Expand Down Expand Up @@ -1631,8 +1631,8 @@ int skill_additional_effect(struct block_list* src, struct block_list *bl, uint1
case SC_FOOD_INT_CASH: case SC_FOOD_LUK_CASH: case SC_SEVENWIND:
case SC_MIRACLE: case SC_S_LIFEPOTION: case SC_L_LIFEPOTION:
case SC_INCHEALRATE: case SC_ELECTRICSHOCKER: case SC__STRIPACCESSORY:
//case SC_SAVAGE_STEAK: case SC_COCKTAIL_WARG_BLOOD: case SC_MINOR_BBQ:
//case SC_SIROMA_ICE_TEA: case SC_DROCERA_HERB_STEAMED: case SC_PUTTI_TAILS_NOODLES:
case SC_SAVAGE_STEAK: case SC_COCKTAIL_WARG_BLOOD: case SC_MINOR_BBQ:
case SC_SIROMA_ICE_TEA: case SC_DROCERA_HERB_STEAMED: case SC_PUTTI_TAILS_NOODLES:
case SC_NEUTRALBARRIER_MASTER: case SC_NEUTRALBARRIER: case SC_STEALTHFIELD_MASTER:
case SC_STEALTHFIELD: case SC_GIANTGROWTH: case SC_MILLENNIUMSHIELD:
case SC_REFRESH: case SC_STONEHARDSKIN: case SC_VITALITYACTIVATION:
Expand Down Expand Up @@ -3138,7 +3138,7 @@ int64 skill_attack (int attack_type, struct block_list* src, struct block_list *
dmg.dmotion = clif_skill_damage(dsrc,bl,tick,dmg.amotion,dmg.dmotion,damage,dmg.div_,skill_id,-1,(flag&1)?8:5);
break;
case WM_SEVERE_RAINSTORM_MELEE:
dmg.dmotion = clif_skill_damage(src,bl,tick,dmg.amotion,dmg.dmotion,damage,dmg.div_,WM_SEVERE_RAINSTORM,-2,6);
dmg.dmotion = clif_skill_damage(src,bl,tick,dmg.amotion,dmg.dmotion,damage,dmg.div_,WM_SEVERE_RAINSTORM,-2,5);
break;
case WM_REVERBERATION_MELEE:
case WM_REVERBERATION_MAGIC:
Expand Down Expand Up @@ -7347,8 +7347,8 @@ int skill_castend_nodamage_id (struct block_list *src, struct block_list *bl, ui
case SC_FOOD_INT_CASH: case SC_FOOD_LUK_CASH: case SC_SEVENWIND:
case SC_MIRACLE: case SC_S_LIFEPOTION: case SC_L_LIFEPOTION:
case SC_INCHEALRATE: case SC_ELECTRICSHOCKER: case SC__STRIPACCESSORY:
//case SC_SAVAGE_STEAK: case SC_COCKTAIL_WARG_BLOOD: case SC_MINOR_BBQ:
//case SC_SIROMA_ICE_TEA: case SC_DROCERA_HERB_STEAMED: case SC_PUTTI_TAILS_NOODLES:
case SC_SAVAGE_STEAK: case SC_COCKTAIL_WARG_BLOOD: case SC_MINOR_BBQ:
case SC_SIROMA_ICE_TEA: case SC_DROCERA_HERB_STEAMED: case SC_PUTTI_TAILS_NOODLES:
case SC_NEUTRALBARRIER_MASTER: case SC_NEUTRALBARRIER: case SC_STEALTHFIELD_MASTER:
case SC_STEALTHFIELD: case SC_GIANTGROWTH: case SC_MILLENNIUMSHIELD:
case SC_REFRESH: case SC_STONEHARDSKIN: case SC_VITALITYACTIVATION:
Expand Down Expand Up @@ -8828,9 +8828,9 @@ int skill_castend_nodamage_id (struct block_list *src, struct block_list *bl, ui
case SC_FOOD_LUK_CASH: case SC_ELECTRICSHOCKER: case SC_BITE:
case SC__STRIPACCESSORY: case SC__ENERVATION: case SC__GROOMY:
case SC__IGNORANCE: case SC__LAZINESS: case SC__UNLUCKY:
case SC__WEAKNESS: //case SC_SAVAGE_STEAK: case SC_COCKTAIL_WARG_BLOOD:
case SC_MAGNETICFIELD://case SC_MINOR_BBQ: case SC_SIROMA_ICE_TEA:
//case SC_DROCERA_HERB_STEAMED: case SC_PUTTI_TAILS_NOODLES:
case SC__WEAKNESS: case SC_SAVAGE_STEAK: case SC_COCKTAIL_WARG_BLOOD:
case SC_MAGNETICFIELD: case SC_MINOR_BBQ: case SC_SIROMA_ICE_TEA:
case SC_DROCERA_HERB_STEAMED: case SC_PUTTI_TAILS_NOODLES:
case SC_NEUTRALBARRIER_MASTER: case SC_NEUTRALBARRIER:
case SC_STEALTHFIELD_MASTER: case SC_STEALTHFIELD:
case SC_LEADERSHIP: case SC_GLORYWOUNDS: case SC_SOULCOLD:
Expand Down Expand Up @@ -10120,7 +10120,7 @@ int skill_castend_nodamage_id (struct block_list *src, struct block_list *bl, ui
{
int heal = 5 * status_get_lv(&hd->bl) +
#ifdef RENEWAL
status_base_matk(&hd->battle_status, status_get_lv(&hd->bl));
status_base_matk(bl, &hd->battle_status, status_get_lv(&hd->bl));
#else
status_base_matk_min(&hd->battle_status);
#endif
Expand Down

3 comments on commit 083cf5d

@RadianFord
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi I got this warning.

status.c:5483: warning: ‘status_calc_matk’ defined but not used

@aleos89
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed in 769a272.

@RadianFord
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@aleos89 Thank you so much 👍

Please sign in to comment.