- Spirit of Sin and Enchant Deadly Poison now stack.

- Fixed skill damage card bonuses not working on magic skills.
- Moved the setting of sd->npc_id = 0 in npc_dequeue to the beginning, since this function is called when a script is cancelled (TODO: but when this happens, shouldn't the previously ongoing script also be free'd?)
- Made homunc's speed be recalculated when you respawn it from rest state.


git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@9453 54d463be-8e91-2dee-dedb-b68131a5f0ec
This commit is contained in:
skotlex 2006-12-11 16:04:24 +00:00
parent cfb110ab58
commit 705e960a79
5 changed files with 26 additions and 19 deletions

View File

@ -4,6 +4,12 @@ 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/12/11
* Spirit of Sin and Enchant Deadly Poison now stack. [Skotlex]
* Fixed skill damage card bonuses not working on magic skills. [Skotlex]
* Moved the setting of sd->npc_id = 0 in npc_dequeue to the beginning,
since this function is called when a script is cancelled [Skotlex]
* Made homunc's speed be recalculated when you respawn it from rest state.
[Skotlex]
* Fixed @revive not reviving the good char [Toms]
2006/12/10
* Added more helpfull messages when packet_ver=-1.

View File

@ -1644,8 +1644,8 @@ static struct Damage battle_calc_weapon_attack(
skillratio += sc->data[SC_EDP].val3;
}
switch (skill_num) {
case AS_SONICBLOW: //EDP will not stack with Soul Link bonus.
if (sc && sc->data[SC_EDP].timer == -1 && sc->data[SC_SPIRIT].timer != -1 && sc->data[SC_SPIRIT].val2 == SL_ASSASIN)
case AS_SONICBLOW:
if (sc && sc->data[SC_SPIRIT].timer != -1 && sc->data[SC_SPIRIT].val2 == SL_ASSASIN)
skillratio += (map_flag_gvg(src->m))?25:100; //+25% dmg on woe/+100% dmg on nonwoe
if(sd && pc_checkskill(sd,AS_SONICACCEL)>0)
skillratio += 10;
@ -2378,15 +2378,6 @@ struct Damage battle_calc_magic_attack(
break;
}
if (sd && sd->skillatk[0].id != 0)
{
for (i = 0; i < MAX_PC_BONUS && sd->skillatk[i].id != 0 && sd->skillatk[i].id != skill_num; i++)
if (i < MAX_PC_BONUS && sd->skillatk[i].id == skill_num)
//If we apply skillatk[] as ATK_RATE, it will also affect other skills,
//unfortunately this way ignores a skill's constant modifiers...
skillratio += sd->skillatk[i].val;
}
MATK_RATE(skillratio);
//Constant/misc additions from skills
@ -2396,6 +2387,14 @@ struct Damage battle_calc_magic_attack(
}
if(sd) {
//Damage bonuses
if (sd->skillatk[0].id)
{
for (i = 0; i < MAX_PC_BONUS && sd->skillatk[i].id && sd->skillatk[i].id != skill_num; i++);
if (i < MAX_PC_BONUS && sd->skillatk[i].id == skill_num)
ad.damage += ad.damage*sd->skillatk[i].val/100;
}
//Ignore Defense?
if (!flag.imdef && (
sd->ignore_mdef_ele & (1<<tstatus->def_ele) ||

View File

@ -606,6 +606,8 @@ int merc_call_homunculus(struct map_session_data *sd)
clif_hominfo(sd,hd,1);
clif_hominfo(sd,hd,0); // send this x2. dunno why, but kRO does that [blackhole89]
clif_homskillinfoblock(sd);
if (battle_config.slaves_inherit_speed&1)
status_calc_bl(&hd->bl, SCB_SPEED);
merc_save(hd);
} else
//Warp him to master.

View File

@ -162,6 +162,7 @@ int npc_event_dequeue(struct map_session_data *sd)
{
nullpo_retr(0, sd);
sd->npc_id=0;
if (!sd->eventqueue[0][0])
return 0; //Nothing to dequeue
@ -171,7 +172,6 @@ int npc_event_dequeue(struct map_session_data *sd)
return 0;
}
//Event dequeued successfully, shift other elements.
sd->npc_id=0; //FIXME: Shouldn't dequeueing fail when you have an npc_id set?
memmove(sd->eventqueue[0], sd->eventqueue[1], (MAX_EVENTQUEUE-1)*sizeof(sd->eventqueue[0]));
sd->eventqueue[MAX_EVENTQUEUE-1][0]=0;
return 1;

View File

@ -2136,19 +2136,19 @@ int pc_bonus2(struct map_session_data *sd,int type,int type2,int val)
ATF_SHORT|ATF_TARGET);
break;
case SP_SKILL_ATK:
if(sd->state.lr_flag == 2)
break;
for (i = 0; i < MAX_PC_BONUS && sd->skillatk[i].id != 0 && sd->skillatk[i].id != type2; i++);
if (i == MAX_PC_BONUS)
{ //Better mention this so the array length can be updated. [Skotlex]
ShowDebug("run_script: bonus2 bSkillAtk reached it's limit (%d skills per character), bonus skill %d (+%d%%) lost.\n", MAX_PC_BONUS, type2, val);
break;
}
if(sd->state.lr_flag != 2) {
if (sd->skillatk[i].id == type2)
sd->skillatk[i].val += val;
else {
sd->skillatk[i].id = type2;
sd->skillatk[i].val = val;
}
if (sd->skillatk[i].id == type2)
sd->skillatk[i].val += val;
else {
sd->skillatk[i].id = type2;
sd->skillatk[i].val = val;
}
break;
case SP_ADD_SKILL_BLOW: