summaryrefslogtreecommitdiff
path: root/src/map
diff options
context:
space:
mode:
Diffstat (limited to 'src/map')
-rw-r--r--src/map/atcommand.c4
-rw-r--r--src/map/battle.c10
-rw-r--r--src/map/clif.c2
-rw-r--r--src/map/homunculus.c2
-rw-r--r--src/map/skill.c27
-rw-r--r--src/map/status.c57
6 files changed, 73 insertions, 29 deletions
diff --git a/src/map/atcommand.c b/src/map/atcommand.c
index 8e50de781..b788c6c37 100644
--- a/src/map/atcommand.c
+++ b/src/map/atcommand.c
@@ -1915,11 +1915,11 @@ ACMD(monster)
number = battle_config.atc_spawn_quantity_limit;
if (strcmpi(info->command, "monstersmall") == 0)
- size = SZ_SMALL;
+ size = SZ_MEDIUM;
else if (strcmpi(info->command, "monsterbig") == 0)
size = SZ_BIG;
else
- size = SZ_MEDIUM;
+ size = SZ_SMALL;
if (battle_config.etc_log)
ShowInfo("%s monster='%s' name='%s' id=%d count=%d (%d,%d)\n", command, monster, name, mob_id, number, sd->bl.x, sd->bl.y);
diff --git a/src/map/battle.c b/src/map/battle.c
index bf683e3d1..fa388fc19 100644
--- a/src/map/battle.c
+++ b/src/map/battle.c
@@ -2295,15 +2295,15 @@ int battle_calc_skillratio(int attack_type, struct block_list *src, struct block
RE_LVL_DMOD(100);
break;
case LG_OVERBRAND:
- skillratio += -100 + 50 * (((sd) ? pc->checkskill(sd,CR_SPEARQUICKEN) : 1) + 8 * skill_lv);
- RE_LVL_DMOD(150);
+ skillratio += -100 + 400 * skill_lv + 50 * ((sd) ? pc->checkskill(sd,CR_SPEARQUICKEN) : 1);
+ RE_LVL_DMOD(100);
break;
case LG_OVERBRAND_BRANDISH:
skillratio += -100 + 300 * skill_lv + status_get_str(src) + status_get_dex(src);
- RE_LVL_DMOD(150);
+ RE_LVL_DMOD(100);
break;
case LG_OVERBRAND_PLUSATK:
- skillratio += -100 + 100 * skill_lv;
+ skillratio = 200 * skill_lv + rnd_value( 10, 100);
RE_LVL_DMOD(100);
break;
case LG_RAYOFGENESIS:
@@ -3917,7 +3917,7 @@ struct Damage battle_calc_misc_attack(struct block_list *src,struct block_list *
md.damage = 100 + 200 * skill_lv + sstatus->int_;
break;
case GN_HELLS_PLANT_ATK:
- md.damage = skill_lv * status->get_lv(src) * 10 + sstatus->int_ * 7 / 2 * (18 + (sd ? sd->status.job_level : 0) / 4) * (5 / (10 - (sd ? pc->checkskill(sd, AM_CANNIBALIZE) : 0)));
+ md.damage = skill_lv * status->get_lv(target) * 10 + sstatus->int_ * 7 / 2 * (18 + (sd ? sd->status.job_level : 0) / 4) * (5 / (10 - (sd ? pc->checkskill(sd, AM_CANNIBALIZE) : 0)));
md.damage = md.damage*(1000 + tstatus->mdef) / (1000 + tstatus->mdef * 10) - tstatus->mdef2;
break;
case KO_HAPPOKUNAI:
diff --git a/src/map/clif.c b/src/map/clif.c
index 18cc987d4..308f419a7 100644
--- a/src/map/clif.c
+++ b/src/map/clif.c
@@ -1368,7 +1368,7 @@ bool clif_spawn(struct block_list *bl)
TBL_MOB *md = ((TBL_MOB*)bl);
if(md->special_state.size==SZ_BIG) // tiny/big mobs [Valaris]
clif->specialeffect(&md->bl,423,AREA);
- else if(md->special_state.size==SZ_SMALL)
+ else if(md->special_state.size==SZ_MEDIUM)
clif->specialeffect(&md->bl,421,AREA);
}
break;
diff --git a/src/map/homunculus.c b/src/map/homunculus.c
index 0f76fcf5f..f4ffc62a6 100644
--- a/src/map/homunculus.c
+++ b/src/map/homunculus.c
@@ -1126,7 +1126,7 @@ bool homunculus_read_db_sub(char* str[], int columns, int current) {
void homunculus_read_db(void) {
int i;
- const char *filename[]={"homunculus_db.txt","homunculus_db2.txt"};
+ const char *filename[]={DBPATH"homunculus_db.txt","homunculus_db2.txt"};
memset(homun->db,0,sizeof(homun->db));
for(i = 0; i<ARRAYLENGTH(filename); i++) {
diff --git a/src/map/skill.c b/src/map/skill.c
index 814fb1999..1420997b9 100644
--- a/src/map/skill.c
+++ b/src/map/skill.c
@@ -12830,6 +12830,7 @@ int skill_check_condition_castbegin(struct map_session_data* sd, uint16 skill_id
case RA_WUGSTRIKE:
// Other
case BS_GREED:
+ case ALL_FULL_THROTTLE:
break;
default: // in official there is no message.
return 0;
@@ -12839,12 +12840,26 @@ int skill_check_condition_castbegin(struct map_session_data* sd, uint16 skill_id
// Check the skills that can be used whiled using mado
if( pc_ismadogear(sd) ) {
- if( !(skill_id > NC_MADOLICENCE && skill_id <= NC_DISJOINT)
- && skill_id != NC_MAGMA_ERUPTION
- && skill_id != BS_GREED ) {
- clif->skill_fail(sd,skill_id,USESKILL_FAIL_MADOGEAR,0);
- return 0;
- }
+ switch ( skill_id ) {
+ case BS_GREED: case NC_BOOSTKNUCKLE:
+ case NC_PILEBUNKER: case NC_VULCANARM:
+ case NC_FLAMELAUNCHER: case NC_COLDSLOWER:
+ case NC_ARMSCANNON: case NC_ACCELERATION:
+ case NC_HOVERING: case NC_F_SIDESLIDE:
+ case NC_B_SIDESLIDE: case NC_SELFDESTRUCTION:
+ case NC_SHAPESHIFT: case NC_EMERGENCYCOOL:
+ case NC_INFRAREDSCAN: case NC_ANALYZE:
+ case NC_MAGNETICFIELD: case NC_NEUTRALBARRIER:
+ case NC_STEALTHFIELD: case NC_REPAIR:
+ case NC_AXEBOOMERANG: case NC_POWERSWING:
+ case NC_AXETORNADO: case NC_SILVERSNIPER:
+ case NC_MAGICDECOY: case NC_DISJOINT:
+ case NC_MAGMA_ERUPTION: case ALL_FULL_THROTTLE:
+ case NC_MAGMA_ERUPTION_DOTDAMAGE:
+ break;
+ default:
+ return 0;
+ }
}
if( skill_lv < 1 || skill_lv > MAX_SKILL_LEVEL )
diff --git a/src/map/status.c b/src/map/status.c
index ceaf01f1f..8393a6c26 100644
--- a/src/map/status.c
+++ b/src/map/status.c
@@ -1969,8 +1969,17 @@ unsigned short status_base_atk(const struct block_list *bl, const struct status_
//Normally only players have base-atk, but homunc have a different batk
// equation, hinting that perhaps non-players should use this for batk.
// [Skotlex]
+ if (bl->type == BL_HOM) {
+#ifdef RENEWAL
+ str = (int)(floor((rstr + dex + st->luk) / 3) + floor(((TBL_HOM*)bl)->homunculus.level / 10));
+#else
dstr = str/10;
str += dstr*dstr;
+#endif
+ } else if (bl->type != BL_PC) {
+ dstr = str/10;
+ str += dstr*dstr;
+ } else
if (bl->type == BL_PC)
#ifdef RENEWAL
str = (int)(rstr + (float)dex/5 + (float)st->luk/3 + (float)((TBL_PC*)bl)->status.base_level/4);
@@ -2005,11 +2014,16 @@ void status_calc_misc(struct block_list *bl, struct status_data *st, int level)
st->cri = st->flee2 = 0;
#ifdef RENEWAL // renewal formulas
- st->matk_min = st->matk_max = bl->type == BL_PC ? status->base_matk(st, level) : level + st->int_;
- st->hit += level + st->dex + (bl->type == BL_PC ? st->luk/3 + 175 : 150); //base level + ( every 1 dex = +1 hit ) + (every 3 luk = +1 hit) + 175
- st->flee += level + st->agi + (bl->type == BL_PC ? st->luk/5 : 0) + 100; //base level + ( every 1 agi = +1 flee ) + (every 5 luk = +1 flee) + 100
- st->def2 += (int)(((float)level + st->vit)/2 + ( bl->type == BL_PC ? ((float)st->agi/5) : 0 )); //base level + (every 2 vit = +1 def) + (every 5 agi = +1 def)
- st->mdef2 += (int)( bl->type == BL_PC ?(st->int_ + ((float)level/4) + ((float)(st->dex+st->vit)/5)):((float)(st->int_ + level)/4)); //(every 4 base level = +1 mdef) + (every 1 int = +1 mdef) + (every 5 dex = +1 mdef) + (every 5 vit = +1 mdef)
+ if (bl->type == BL_HOM) {
+ st->hit = level + st->dex + 150; //base level + dex + 150
+ st->flee = level + st->agi + level/10; //base level + agi + base level/10
+ } else {
+ st->matk_min = st->matk_max = bl->type == BL_PC ? status->base_matk(st, level) : level + st->int_;
+ st->hit += level + st->dex + (bl->type == BL_PC ? st->luk/3 + 175 : 150); //base level + ( every 1 dex = +1 hit ) + (every 3 luk = +1 hit) + 175
+ st->flee += level + st->agi + (bl->type == BL_PC ? st->luk/5 : 0) + 100; //base level + ( every 1 agi = +1 flee ) + (every 5 luk = +1 flee) + 100
+ st->def2 += (int)(((float)level + st->vit)/2 + ( bl->type == BL_PC ? ((float)st->agi/5) : 0 )); //base level + (every 2 vit = +1 def) + (every 5 agi = +1 def)
+ st->mdef2 += (int)( bl->type == BL_PC ?(st->int_ + ((float)level/4) + ((float)(st->dex+st->vit)/5)):((float)(st->int_ + level)/4)); //(every 4 base level = +1 mdef) + (every 1 int = +1 mdef) + (every 5 dex = +1 mdef) + (every 5 vit = +1 mdef)
+ }
#else // not RENEWAL
st->matk_min = status_base_matk_min(st);
st->matk_max = status_base_matk_max(st);
@@ -2476,7 +2490,7 @@ int status_calc_pc_(struct map_session_data* sd, enum e_status_calc_opt opt) {
if (battle_config.character_size&SZ_BIG)
bstatus->size++;
} else
- if(battle_config.character_size&SZ_SMALL)
+ if(battle_config.character_size&SZ_MEDIUM)
bstatus->size++;
}
bstatus->aspd_rate = 1000;
@@ -3288,11 +3302,26 @@ int status_calc_homunculus_(struct homun_data *hd, enum e_status_calc_opt opt) {
hstatus->hp = 1;
hstatus->sp = 1;
}
+
+ hstatus->aspd_rate = 1000;
+
+#ifdef RENEWAL
+ hstatus->def = (hstatus->vit + (hom->level / 10)) + ((hstatus->agi + (hom->level / 10)) / 2);
+ hstatus->mdef = hstatus->int_ + ((hstatus->int_ + hstatus->dex + hstatus->luk) / 3) + (hom->level / 10) * 2;
+
+ amotion = (1000 -2*hstatus->agi -hstatus->dex) * hd->homunculusDB->baseASPD/1000;
+#else
skill_lv = hom->level/10 + hstatus->vit/5;
hstatus->def = cap_value(skill_lv, 0, 99);
skill_lv = hom->level/10 + hstatus->int_/5;
hstatus->mdef = cap_value(skill_lv, 0, 99);
+ amotion = (1000 -4*status->agi -status->dex) * hd->homunculusDB->baseASPD/1000;
+#endif
+
+ hstatus->amotion = cap_value(amotion,battle_config.max_aspd,2000);
+ hstatus->adelay = hstatus->amotion; //It seems adelay = amotion for Homunculus.
+
hstatus->max_hp = hom->max_hp;
hstatus->max_sp = hom->max_sp;
@@ -3318,14 +3347,10 @@ int status_calc_homunculus_(struct homun_data *hd, enum e_status_calc_opt opt) {
hd->battle_status.sp = hom->sp;
}
+#ifndef RENEWAL
hstatus->rhw.atk = hstatus->dex;
hstatus->rhw.atk2 = hstatus->str + hom->level;
-
- hstatus->aspd_rate = 1000;
-
- amotion = (1000 -4*hstatus->agi -hstatus->dex) * hd->homunculusDB->baseASPD/1000;
- hstatus->amotion = cap_value(amotion,battle_config.max_aspd,2000);
- hstatus->adelay = hstatus->amotion; //It seems adelay = amotion for Homunculus.
+#endif
status->calc_misc(&hd->bl, hstatus, hom->level);
@@ -3694,12 +3719,12 @@ void status_calc_bl_main(struct block_list *bl, /*enum scb_flag*/int flag) {
}
}
- if( bl->type&BL_HOM ) {
+ /*if( bl->type&BL_HOM ) {
st->rhw.atk += (st->dex - bst->dex);
st->rhw.atk2 += (st->str - bst->str);
if( st->rhw.atk2 < st->rhw.atk )
st->rhw.atk2 = st->rhw.atk;
- }
+ }*/
}
if(flag&SCB_HIT) {
@@ -3912,7 +3937,11 @@ void status_calc_bl_main(struct block_list *bl, /*enum scb_flag*/int flag) {
st->adelay = 2*st->amotion;
} else if( bl->type&BL_HOM ) {
+#ifdef RENEWAL
+ amotion = (1000 - 2*st->agi - st->dex) * ((TBL_HOM*)bl)->homunculusDB->baseASPD/1000;
+#else
amotion = (1000 - 4*st->agi - st->dex) * ((TBL_HOM*)bl)->homunculusDB->baseASPD/1000;
+#endif
st->aspd_rate = status->calc_aspd_rate(bl, sc, bst->aspd_rate);
if(st->aspd_rate != 1000)