summaryrefslogtreecommitdiff
path: root/src/map
diff options
context:
space:
mode:
authormalufett <malufett.eat.my.binaries@gmail.com>2013-07-31 18:09:35 +0800
committermalufett <malufett.eat.my.binaries@gmail.com>2013-07-31 18:09:35 +0800
commit43d95751dcc937a2caddb5b793f5c45666abfee0 (patch)
treec312d3ff1c638b0b6389aeefa57c1f97fb745cc0 /src/map
parent4d6a69f0a44d3a0ce7bdf6c925f651014e47dcb3 (diff)
downloadhercules-43d95751dcc937a2caddb5b793f5c45666abfee0.tar.gz
hercules-43d95751dcc937a2caddb5b793f5c45666abfee0.tar.bz2
hercules-43d95751dcc937a2caddb5b793f5c45666abfee0.tar.xz
hercules-43d95751dcc937a2caddb5b793f5c45666abfee0.zip
Fixed Bug#7601
-Disabled reflect damage cap in pre-re. Fixed Bug#7606 -Where GC_CREATENEWPOISON is not working properly. Signed-off-by: malufett <malufett.eat.my.binaries@gmail.com>
Diffstat (limited to 'src/map')
-rw-r--r--src/map/battle.c10
-rw-r--r--src/map/skill.c10
2 files changed, 13 insertions, 7 deletions
diff --git a/src/map/battle.c b/src/map/battle.c
index c1f568843..613ea6258 100644
--- a/src/map/battle.c
+++ b/src/map/battle.c
@@ -5176,14 +5176,20 @@ int battle_calc_return_damage(struct block_list* bl, struct block_list *src, int
int rdamage = 0, damage = *dmg, trdamage = 0;
struct map_session_data* sd;
struct status_change* sc;
+#ifdef RENEWAL
int max_reflect_damage;
+ max_reflect_damage = max(status_get_max_hp(bl), status_get_max_hp(bl) * iStatus->get_lv(bl) / 100);
+#endif
sd = BL_CAST(BL_PC, bl);
sc = iStatus->get_sc(bl);
- max_reflect_damage = max(status_get_max_hp(bl), status_get_max_hp(bl) * iStatus->get_lv(bl) / 100);
+#ifdef RENEWAL
#define NORMALIZE_RDAMAGE(d){ trdamage += rdamage = max(1, min(max_reflect_damage, d)); }
-
+#else
+#define NORMALIZE_RDAMAGE(d){ trdamage += rdamage = max(1, d); }
+#endif
+
if( sc && sc->data[SC_CRESCENTELBOW] && !is_boss(src) && rnd()%100 < sc->data[SC_CRESCENTELBOW]->val2 ){
//ATK [{(Target HP / 100) x Skill Level} x Caster Base Level / 125] % + [Received damage x {1 + (Skill Level x 0.2)}]
int ratio = (status_get_hp(src) / 100) * sc->data[SC_CRESCENTELBOW]->val1 * iStatus->get_lv(bl) / 125;
diff --git a/src/map/skill.c b/src/map/skill.c
index 0fbd340fa..42ab6450f 100644
--- a/src/map/skill.c
+++ b/src/map/skill.c
@@ -16229,11 +16229,11 @@ int skill_produce_mix (struct map_session_data *sd, uint16 skill_id, int nameid,
**/
case GC_CREATENEWPOISON:
{
- const int min[] = {2, 2, 3, 3, 4, 4, 5, 5, 6, 6};
- const int max[] = {4, 5, 5, 6, 6, 7, 7, 8, 8, 9};
- uint16 lv = pc->checkskill(sd,GC_RESEARCHNEWPOISON);
- make_per = 3000 + 500 * lv ;
- qty = min[lv] + rand()%(max[lv] - min[lv]);
+ const int min[10] = {2, 2, 3, 3, 4, 4, 5, 5, 6, 6};
+ const int max[10] = {4, 5, 5, 6, 6, 7, 7, 8, 8, 9};
+ int lv = max(0, pc->checkskill(sd,GC_RESEARCHNEWPOISON) - 1);
+ qty = min[lv] + rnd()%(max[lv] - min[lv]);
+ make_per = 3000 + 500 * (lv+1);
}
break;
case GN_CHANGEMATERIAL: