summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorskotlex <skotlex@54d463be-8e91-2dee-dedb-b68131a5f0ec>2006-07-18 14:33:52 +0000
committerskotlex <skotlex@54d463be-8e91-2dee-dedb-b68131a5f0ec>2006-07-18 14:33:52 +0000
commit6713158b3247af09d6bf036028d94baf1e715525 (patch)
tree45a39cd1e04bc80742a40410d3065bae7cfb86d7
parentea64ed822782ca2e9f2dadf954a85da6d559ed54 (diff)
downloadhercules-6713158b3247af09d6bf036028d94baf1e715525.tar.gz
hercules-6713158b3247af09d6bf036028d94baf1e715525.tar.bz2
hercules-6713158b3247af09d6bf036028d94baf1e715525.tar.xz
hercules-6713158b3247af09d6bf036028d94baf1e715525.zip
- Corrected Venom splasher's splash damage
- You now can't move/attack/use-skills when using Cloaking of a level less than 3 - Fixed compilation of mercenary.c git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@7729 54d463be-8e91-2dee-dedb-b68131a5f0ec
-rw-r--r--Changelog-Trunk.txt4
-rw-r--r--src/map/battle.c9
-rw-r--r--src/map/mercenary.c48
-rw-r--r--src/map/skill.c25
-rw-r--r--src/map/status.c8
-rw-r--r--src/map/unit.c3
6 files changed, 22 insertions, 75 deletions
diff --git a/Changelog-Trunk.txt b/Changelog-Trunk.txt
index b349e2d0b..e12d0b12a 100644
--- a/Changelog-Trunk.txt
+++ b/Changelog-Trunk.txt
@@ -4,6 +4,10 @@ AS OF SVN REV. 5091, WE ARE NOW USING TRUNK. ALL UNTESTED BUGFIXES/FEATURES GO
IF YOU HAVE A WORKING AND TESTED BUGFIX PUT IT INTO STABLE AS WELL AS TRUNK.
2006/07/18
+ * Corrected Venom splasher's splash damage [Skotlex]
+ * You now can't move/attack/use-skills when using Cloaking of a level less
+ than 3 [Skotlex]
+ * Fixed compilation of mercenary.c [Skotlex]
* Corrected Fog of Wall's "targetted spells fail 75% of the time" feature
by making it behave like GTB, that is, you just get a skill-failed on
cast-end, no skill-animation at all. [Skotlex]
diff --git a/src/map/battle.c b/src/map/battle.c
index 3d38e3af9..dee87da15 100644
--- a/src/map/battle.c
+++ b/src/map/battle.c
@@ -1406,11 +1406,10 @@ static struct Damage battle_calc_weapon_attack(
skillratio += 100+100*skill_lv;
break;
case AS_SPLASHER:
- skillratio += 400+50*skill_lv;
- if (sd)
- skillratio += 20*pc_checkskill(sd,AS_POISONREACT);
- if(wflag>1) //FIXME: Splash damage... is this the correct method? [Skotlex]
- skillratio /= wflag;
+ i = 400+50*skill_lv;
+ if (sd) i += 20*pc_checkskill(sd,AS_POISONREACT);
+ if (wflag) i/=2; //Splash damage is half.
+ skillratio += i;
flag.cardfix = 0;
break;
case ASC_BREAKER:
diff --git a/src/map/mercenary.c b/src/map/mercenary.c
index 301a28955..a415fb7c7 100644
--- a/src/map/mercenary.c
+++ b/src/map/mercenary.c
@@ -448,38 +448,6 @@ static void merc_natural_heal_sp(struct homun_data *hd)
return;
}
-static void merc_bleeding (struct homun_data *hd)
-{
- int hp = 0, sp = 0;
-
- if (hd->hp_loss_value > 0) {
- hd->hp_loss_tick += natural_heal_diff_tick;
- if (hd->hp_loss_tick >= hd->hp_loss_rate) {
- do {
- hp += hd->hp_loss_value;
- hd->hp_loss_tick -= hd->hp_loss_rate;
- } while (hd->hp_loss_tick >= hd->hp_loss_rate);
- hd->hp_loss_tick = 0;
- }
- }
-
- if (hd->sp_loss_value > 0) {
- hd->sp_loss_tick += natural_heal_diff_tick;
- if (hd->sp_loss_tick >= hd->sp_loss_rate) {
- do {
- sp += hd->sp_loss_value;
- hd->sp_loss_tick -= hd->sp_loss_rate;
- } while (hd->sp_loss_tick >= hd->sp_loss_rate);
- hd->sp_loss_tick = 0;
- }
- }
-
- if (hp > 0 || sp > 0)
- status_zap(&hd->bl, hp, sp);
-
- return;
-}
-
/*==========================================
* HP/SP natural heal
*------------------------------------------
@@ -500,20 +468,10 @@ static int merc_natural_heal_sub(struct homun_data *hd,int tick) {
) { //Cannot heal neither natural or special.
hd->hp_sub = hd->inchealhptick = 0;
hd->sp_sub = hd->inchealsptick = 0;
- } else {
- if ( DIFF_TICK (tick, hd->canregen_tick)<0 ) {
- hd->hp_sub = hd->inchealhptick = 0;
- hd->sp_sub = hd->inchealsptick = 0;
- } else { //natural heal
- merc_natural_heal_hp(hd);
- merc_natural_heal_sp(hd);
- hd->canregen_tick = tick;
- }
+ } else { //natural heal
+ merc_natural_heal_hp(hd);
+ merc_natural_heal_sp(hd);
}
- if (hd->hp_loss_value > 0 || hd->sp_loss_value > 0)
- merc_bleeding(hd);
- else
- hd->hp_loss_tick = hd->sp_loss_tick = 0;
return 0;
}
diff --git a/src/map/skill.c b/src/map/skill.c
index 5ff138468..d1f2a77fb 100644
--- a/src/map/skill.c
+++ b/src/map/skill.c
@@ -2601,7 +2601,6 @@ static int skill_reveal_trap (struct block_list *bl, va_list ap)
int skill_castend_damage_id (struct block_list* src, struct block_list *bl, int skillid, int skilllv, unsigned int tick, int flag)
{
struct map_session_data *sd = NULL, *tsd = NULL;
- struct homun_data *hd = NULL ; //[orn]
struct status_data *tstatus;
struct status_change *sc;
@@ -2620,10 +2619,8 @@ int skill_castend_damage_id (struct block_list* src, struct block_list *bl, int
sd = (struct map_session_data *)src;
if (bl->type == BL_PC)
tsd = (struct map_session_data *)bl;
- if (bl->type == BL_HOMUNCULUS) //[orn]
- hd = (struct homun_data *)bl;
- if (status_isdead(src) || (src != bl && status_isdead(bl)))
+ if (status_isdead(bl))
return 1;
if (skillid && skill_get_type(skillid) == BF_MAGIC)
@@ -2864,21 +2861,15 @@ int skill_castend_damage_id (struct block_list* src, struct block_list *bl, int
case AS_SPLASHER:
if (flag & 1) { //Invoked from map_foreachinarea, skill_area_temp[0] holds number of targets to divide damage by.
- if (bl->id != skill_area_temp[1])
- skill_attack(BF_WEAPON, src, src, bl, skillid, skilllv, tick, skill_area_temp[0]);
- else
- skill_attack(BF_WEAPON, src, src, bl, skillid, skilllv, tick, 0);
+ if (bl->id != skill_area_temp[0])
+ skill_attack(BF_WEAPON, src, src, bl, skillid, skilllv, tick, 1);
} else {
- skill_area_temp[0] = 0;
- skill_area_temp[1] = bl->id;
- map_foreachinrange(skill_area_sub, bl,
- skill_get_splash(skillid, skilllv), BL_CHAR,
- src, skillid, skilllv, tick, BCT_ENEMY, skill_area_sub_count);
- skill_area_temp[0]--; //Substract one, the original target shouldn't count. [Skotlex]
+ skill_area_temp[0] = bl->id;
map_foreachinrange(skill_area_sub, bl,
skill_get_splash(skillid, skilllv), BL_CHAR,
src, skillid, skilllv, tick, BCT_ENEMY|1,
skill_castend_damage_id);
+ skill_attack(BF_WEAPON, src, src, bl, skillid, skilllv, tick, 0);
}
break;
case SM_MAGNUM:
@@ -3315,9 +3306,9 @@ int skill_castend_nodamage_id (struct block_list *src, struct block_list *bl, in
//Check for undead skills that convert a no-damage skill into a damage one. [Skotlex]
switch (skillid) {
case HLIF_HEAL: //[orn]
- if ( !hd ) {
- clif_skill_fail(hd->master,skillid,0,0) ;
- break ;
+ if (bl->type != BL_HOMUNCULUS) {
+ if (sd) clif_skill_fail(sd,skillid,0,0) ;
+ break ;
}
case AL_HEAL:
case ALL_RESURRECTION:
diff --git a/src/map/status.c b/src/map/status.c
index 41a054f24..c37b0c084 100644
--- a/src/map/status.c
+++ b/src/map/status.c
@@ -897,6 +897,7 @@ int status_check_skilluse(struct block_list *src, struct block_list *target, int
|| (sc->data[SC_AUTOCOUNTER].timer != -1 && !flag)
|| (sc->data[SC_GOSPEL].timer != -1 && sc->data[SC_GOSPEL].val4 == BCT_SELF && skill_num != PA_GOSPEL)
|| (sc->data[SC_GRAVITATION].timer != -1 && sc->data[SC_GRAVITATION].val3 == BCT_SELF && skill_num != HW_GRAVITATION)
+ || (sc->data[SC_CLOAKING].timer != -1 && sc->data[SC_CLOAKING].val1 < 3 && skill_num != AS_CLOAKING)
)
return 0;
@@ -4422,13 +4423,6 @@ int status_change_start(struct block_list *bl,int type,int rate,int val1,int val
if (sc->data[SC_QUAGMIRE].timer!=-1 || sc->data[SC_DONTFORGETME].timer!=-1)
return 0;
break;
- case SC_CLOAKING:
- //Avoid cloaking with no wall and low skill level. [Skotlex]
- //Due to the cloaking card, we have to check the wall versus to known skill level rather than the used one. [Skotlex]
-// if (sd && skilllv < 3 && skill_check_cloaking(bl,&sd->sc))
- if (sd && pc_checkskill(sd, AS_CLOAKING)< 3 && skill_check_cloaking(bl, sc))
- return 0;
- break;
case SC_MODECHANGE:
{
int mode;
diff --git a/src/map/unit.c b/src/map/unit.c
index bf2091ff6..ebdab76a3 100644
--- a/src/map/unit.c
+++ b/src/map/unit.c
@@ -667,7 +667,8 @@ int unit_can_move(struct block_list *bl)
(sc->data[SC_GOSPEL].timer !=-1 && sc->data[SC_GOSPEL].val4 == BCT_SELF) || // cannot move while gospel is in effect
sc->data[SC_STOP].timer != -1 ||
sc->data[SC_CLOSECONFINE].timer != -1 ||
- sc->data[SC_CLOSECONFINE2].timer != -1
+ sc->data[SC_CLOSECONFINE2].timer != -1 ||
+ (sc->data[SC_CLOAKING].timer != -1 && sc->data[SC_CLOAKING].val1 < 3)
))
return 0;
}