summaryrefslogtreecommitdiff
path: root/src/map
diff options
context:
space:
mode:
authormomacabu <momacabu@54d463be-8e91-2dee-dedb-b68131a5f0ec>2012-11-10 21:02:55 +0000
committermomacabu <momacabu@54d463be-8e91-2dee-dedb-b68131a5f0ec>2012-11-10 21:02:55 +0000
commit175ab2914e9fea4aa3cb7d831df1e43da91c2edd (patch)
treedf227149008ac24c2fa3ee13ce552bd21becca3d /src/map
parent5d9d3adf3fd4795bf2483ec8549ddc30e01629db (diff)
downloadhercules-175ab2914e9fea4aa3cb7d831df1e43da91c2edd.tar.gz
hercules-175ab2914e9fea4aa3cb7d831df1e43da91c2edd.tar.bz2
hercules-175ab2914e9fea4aa3cb7d831df1e43da91c2edd.tar.xz
hercules-175ab2914e9fea4aa3cb7d831df1e43da91c2edd.zip
- Added configuration to wheter the monster size would change experience earned, drop rates and the monster status (such as hp, strength etc). Awesome suggestion by Euphy :)
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@16905 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src/map')
-rw-r--r--src/map/battle.c1
-rw-r--r--src/map/battle.h2
-rw-r--r--src/map/mob.c23
-rw-r--r--src/map/status.c2
4 files changed, 19 insertions, 9 deletions
diff --git a/src/map/battle.c b/src/map/battle.c
index 18aadf0ac..9c109964c 100644
--- a/src/map/battle.c
+++ b/src/map/battle.c
@@ -5756,6 +5756,7 @@ static const struct _battle_data {
{ "atcommand_mobinfo_type", &battle_config.atcommand_mobinfo_type, 0, 0, 1 },
{ "homunculus_max_level", &battle_config.hom_max_level, 99, 0, MAX_LEVEL, },
{ "homunculus_S_max_level", &battle_config.hom_S_max_level, 150, 0, MAX_LEVEL, },
+ { "mob_size_influence", &battle_config.mob_size_influence, 0, 0, 1, },
};
#ifndef STATS_OPT_OUT
/**
diff --git a/src/map/battle.h b/src/map/battle.h
index 28e6176ec..b901644de 100644
--- a/src/map/battle.h
+++ b/src/map/battle.h
@@ -480,6 +480,8 @@ extern struct Battle_Config
int atcommand_suggestions_enabled;
int min_npc_vending_distance;
int atcommand_mobinfo_type;
+
+ int mob_size_influence; // Enable modifications on earned experience, drop rates and monster status depending on monster size. [mkbu95]
} battle_config;
void do_init_battle(void);
diff --git a/src/map/mob.c b/src/map/mob.c
index fe174ba22..465f1f74e 100644
--- a/src/map/mob.c
+++ b/src/map/mob.c
@@ -2216,10 +2216,13 @@ int mob_dead(struct mob_data *md, struct block_list *src, int type)
}
// change experience for different sized monsters [Valaris]
- if(md->special_state.size==SZ_MEDIUM)
- per /=2.;
- else if(md->special_state.size==SZ_BIG)
- per *=2.;
+ if (battle_config.mob_size_influence)
+ {
+ if (md->special_state.size == SZ_MEDIUM)
+ per /= 2.;
+ else if (md->special_state.size == SZ_BIG)
+ per *= 2.;
+ }
if( md->dmglog[i].flag == MDLF_PET )
per *= battle_config.pet_attack_exp_rate/100.;
@@ -2334,10 +2337,14 @@ int mob_dead(struct mob_data *md, struct block_list *src, int type)
}
// change drops depending on monsters size [Valaris]
- if(md->special_state.size==SZ_MEDIUM && drop_rate >= 2)
- drop_rate/=2;
- else if(md->special_state.size==SZ_BIG)
- drop_rate*=2;
+ if (battle_config.mob_size_influence)
+ {
+ if (md->special_state.size == SZ_MEDIUM && drop_rate >= 2)
+ drop_rate /= 2;
+ else if( md->special_state.size == SZ_BIG)
+ drop_rate *= 2;
+ }
+
if (src) {
//Drops affected by luk as a fixed increase [Valaris]
if (battle_config.drops_by_luk)
diff --git a/src/map/status.c b/src/map/status.c
index e097dcdb1..3b641cf92 100644
--- a/src/map/status.c
+++ b/src/map/status.c
@@ -2061,7 +2061,7 @@ int status_calc_mob_(struct mob_data* md, bool first)
}
- if (flag&2)
+ if (flag&2 && battle_config.mob_size_influence)
{ // change for sized monsters [Valaris]
if (md->special_state.size==SZ_MEDIUM) {
status->max_hp>>=1;