summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Changelog-Trunk.txt6
-rw-r--r--src/map/battle.c21
-rw-r--r--src/map/mercenary.c2
-rw-r--r--src/map/npc.c2
-rw-r--r--src/map/pc.c14
5 files changed, 26 insertions, 19 deletions
diff --git a/Changelog-Trunk.txt b/Changelog-Trunk.txt
index 239ef6d6d..c5ef64123 100644
--- a/Changelog-Trunk.txt
+++ b/Changelog-Trunk.txt
@@ -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.
diff --git a/src/map/battle.c b/src/map/battle.c
index dea2f9056..db526dda8 100644
--- a/src/map/battle.c
+++ b/src/map/battle.c
@@ -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) ||
diff --git a/src/map/mercenary.c b/src/map/mercenary.c
index 3ae9f8ffb..0ae731fd3 100644
--- a/src/map/mercenary.c
+++ b/src/map/mercenary.c
@@ -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.
diff --git a/src/map/npc.c b/src/map/npc.c
index 46fd4c4ab..d322fc530 100644
--- a/src/map/npc.c
+++ b/src/map/npc.c
@@ -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;
diff --git a/src/map/pc.c b/src/map/pc.c
index c5128bd79..e6ae6c8af 100644
--- a/src/map/pc.c
+++ b/src/map/pc.c
@@ -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: