summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Changelog-Trunk.txt6
-rw-r--r--src/map/battle.c2
-rw-r--r--src/map/skill.c18
-rw-r--r--src/map/status.c16
4 files changed, 25 insertions, 17 deletions
diff --git a/Changelog-Trunk.txt b/Changelog-Trunk.txt
index 4e25ac04e..5b90f3377 100644
--- a/Changelog-Trunk.txt
+++ b/Changelog-Trunk.txt
@@ -3,6 +3,12 @@ Date Added
AS OF SVN REV. 5091, WE ARE NOW USING TRUNK. ALL UNTESTED BUGFIXES/FEATURES GO INTO TRUNK.
IF YOU HAVE A WORKING AND TESTED BUGFIX PUT IT INTO STABLE AS WELL AS TRUNK.
+2006/10/13
+ * Corrected Throw Arrow/Musical Strike's damage formula [Skotlex]
+ * Altered Trick Dead. It doesn't prevents skills from being casted on you
+ now, but damage-based skills will do no damage. [Skotlex]
+ * Made the battle_config.attack_attr_none apply to pets when using the
+ "fixed damage" pet skill scripts. [Skotlex]
2006/10/12
* made @killmonster make the mobs drop items again. [Skotlex]
* Added a temporary message when Angel of the Sun, Moon and Stars trigger
diff --git a/src/map/battle.c b/src/map/battle.c
index 7b83f5e20..b138e651b 100644
--- a/src/map/battle.c
+++ b/src/map/battle.c
@@ -1430,7 +1430,7 @@ static struct Damage battle_calc_weapon_attack(
break;
case BA_MUSICALSTRIKE:
case DC_THROWARROW:
- skillratio += 50*skill_lv;
+ skillratio += 25+25*skill_lv;
break;
case CH_TIGERFIST:
skillratio += 100*skill_lv-60;
diff --git a/src/map/skill.c b/src/map/skill.c
index 8802a3678..03ef6ae79 100644
--- a/src/map/skill.c
+++ b/src/map/skill.c
@@ -1822,30 +1822,36 @@ int skill_attack (int attack_type, struct block_list* src, struct block_list *ds
sstatus = status_get_status_data(src);
tstatus = status_get_status_data(bl);
+ sc= status_get_sc(bl);
+ if (sc && !sc->count) sc = NULL; //Don't need it.
+
// Is this check really needed? FrostNova won't hurt you if you step right where the caster is?
if(skillid == WZ_FROSTNOVA && dsrc->x == bl->x && dsrc->y == bl->y)
return 0;
+ //Trick Dead protects you from damage, but not from buffs and the like, hence it's placed here.
+ if (sc && sc->data[SC_TRICKDEAD].timer != -1 && !(sstatus->mode&MD_BOSS))
+ return 0;
dmg=battle_calc_attack(attack_type,src,bl,skillid,skilllv,flag&0xFFF);
//Skotlex: Adjusted to the new system
- if(src->type==BL_PET && (struct pet_data *)src)
+ if(src->type==BL_PET)
{ // [Valaris]
- struct pet_data *pd = (struct pet_data *)src;
+ struct pet_data *pd = (TBL_PET*)src;
if (pd->a_skill && pd->a_skill->div_ && pd->a_skill->id == skillid)
{
int element = skill_get_pl(skillid);
if (skillid == -1)
element = sstatus->rhw.ele;
- dmg.damage=battle_attr_fix(src, bl, skilllv, element, tstatus->def_ele, tstatus->ele_lv);
+ if (element != ELE_NEUTRAL || !(battle_config.attack_attr_none&BL_PET))
+ dmg.damage=battle_attr_fix(src, bl, skilllv, element, tstatus->def_ele, tstatus->ele_lv);
+ else
+ dmg.damage= skilllv;
dmg.damage2=0;
dmg.div_= pd->a_skill->div_;
}
}
- sc= status_get_sc(bl);
- if (sc && !sc->count) sc = NULL; //Don't need it.
-
if (attack_type&BF_MAGIC) {
if(sc && sc->data[SC_KAITE].timer != -1 && (dmg.damage || dmg.damage2)
&& !(sstatus->mode&MD_BOSS) && (sd || status_get_lv(src) <= 80) )
diff --git a/src/map/status.c b/src/map/status.c
index fce11fb9f..75decab54 100644
--- a/src/map/status.c
+++ b/src/map/status.c
@@ -939,15 +939,11 @@ int status_check_skilluse(struct block_list *src, struct block_list *target, int
return 0;
}
- if (skill_num == PA_PRESSURE && flag) {
- //Gloria Avoids pretty much everything....
- tsc = target?status_get_sc(target):NULL;
- if(tsc) {
- if (tsc->option&OPTION_HIDE)
- return 0;
- if (tsc->count && tsc->data[SC_TRICKDEAD].timer != -1)
- return 0;
- }
+ if (skill_num == PA_PRESSURE && flag && target) {
+ //Gloria Avoids pretty much everything....
+ tsc = status_get_sc(target);
+ if(tsc && tsc->option&OPTION_HIDE)
+ return 0;
return 1;
}
@@ -1062,7 +1058,7 @@ int status_check_skilluse(struct block_list *src, struct block_list *target, int
if(tsc && tsc->count)
{
- if (!(status->mode&MD_BOSS) && tsc->data[SC_TRICKDEAD].timer != -1)
+ if(!skill_num && !(status->mode&MD_BOSS) && tsc->data[SC_TRICKDEAD].timer != -1)
return 0;
if(skill_num == WZ_STORMGUST && tsc->data[SC_FREEZE].timer != -1)
return 0;