- 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://svn.code.sf.net/p/rathena/svn/trunk@7729 54d463be-8e91-2dee-dedb-b68131a5f0ec
This commit is contained in:
@@ -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]
|
||||
|
||||
@@ -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:
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
@@ -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:
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user