summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorskotlex <skotlex@54d463be-8e91-2dee-dedb-b68131a5f0ec>2006-07-20 14:35:02 +0000
committerskotlex <skotlex@54d463be-8e91-2dee-dedb-b68131a5f0ec>2006-07-20 14:35:02 +0000
commit844efd7ecae4adb6f2615bc15d4d891d9035703e (patch)
treea7b759c5ae5dc3b41aca0e9d2366b93c8498f542
parentd11101c061a9571c34dbbe66534a3a4f1afa99b3 (diff)
downloadhercules-844efd7ecae4adb6f2615bc15d4d891d9035703e.tar.gz
hercules-844efd7ecae4adb6f2615bc15d4d891d9035703e.tar.bz2
hercules-844efd7ecae4adb6f2615bc15d4d891d9035703e.tar.xz
hercules-844efd7ecae4adb6f2615bc15d4d891d9035703e.zip
- Corrected fog of wall to behave as best known. Only takes effect when targetting a character inside it, -50hit/-75% damage when using normal-ranged attacks, -25% damage from all damage skills, 75% chance of all targetted damage skills of failing.
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@7764 54d463be-8e91-2dee-dedb-b68131a5f0ec
-rw-r--r--Changelog-Trunk.txt5
-rw-r--r--src/map/battle.c28
-rw-r--r--src/map/pc.c2
3 files changed, 21 insertions, 14 deletions
diff --git a/Changelog-Trunk.txt b/Changelog-Trunk.txt
index ae45acad4..08a49b8d5 100644
--- a/Changelog-Trunk.txt
+++ b/Changelog-Trunk.txt
@@ -4,6 +4,11 @@ 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/20
+ * Corrected fog of wall to behave as best known currently: [Skotlex]
+ - Only takes effect when targetting a character inside it
+ - -50hit/-75% damage when using normal-ranged attacks
+ - -25% damage from all damage skills
+ - 75% chance of all targetted damage skills of failing.
* Should have fixed @refine applying multiple times to equipment that uses
multiple equip slots. [Skotlex]
2006/07/19
diff --git a/src/map/battle.c b/src/map/battle.c
index 9f46147b8..d900a4de4 100644
--- a/src/map/battle.c
+++ b/src/map/battle.c
@@ -350,9 +350,12 @@ int battle_calc_damage(struct block_list *src,struct block_list *bl,int damage,i
(flag&(BF_LONG|BF_WEAPON)) == (BF_LONG|BF_WEAPON))
damage=damage*(100-sc->data[SC_DEFENDER].val2)/100;
- if(sc->data[SC_FOGWALL].timer != -1 &&
- (flag&(BF_LONG|BF_WEAPON)) == (BF_LONG|BF_WEAPON))
- damage >>=1;
+ if(sc->data[SC_FOGWALL].timer != -1) {
+ if(flag&BF_SKILL) //25% reduction
+ damage -= 25*damage/100;
+ else if ((flag&(BF_LONG|BF_WEAPON)) == (BF_LONG|BF_WEAPON))
+ damage >>= 2; //75% reduction
+ }
if(sc->data[SC_ENERGYCOAT].timer!=-1 && flag&BF_WEAPON){
struct status_data *status = status_get_status_data(bl);
@@ -398,15 +401,12 @@ int battle_calc_damage(struct block_list *src,struct block_list *bl,int damage,i
if (!damage) return 0;
}
-
- //SC effects from caster side.
+ //SC effects from caster side. Currently none.
+/*
sc = status_get_sc(src);
if (sc && sc->count) {
- if(sc->data[SC_FOGWALL].timer != -1 &&
- (flag&(BF_LONG|BF_WEAPON)) == (BF_LONG|BF_WEAPON))
- damage >>=1;
}
-
+*/
if (battle_config.pk_mode && sd && damage)
{
if (flag & BF_SKILL) { //Skills get a different reduction than non-skills. [Skotlex]
@@ -943,7 +943,10 @@ static struct Damage battle_calc_weapon_attack(
//Check for critical
if(!flag.cri && sstatus->cri &&
- (!skill_num || skill_num == KN_AUTOCOUNTER || skill_num == SN_SHARPSHOOTING || skill_num == NJ_KIRIKAGE))
+ (!skill_num ||
+ skill_num == KN_AUTOCOUNTER ||
+ skill_num == SN_SHARPSHOOTING ||
+ skill_num == NJ_KIRIKAGE))
{
short cri = sstatus->cri;
if (sd)
@@ -1056,9 +1059,8 @@ static struct Damage battle_calc_weapon_attack(
hitrate+= sstatus->hit - flee;
- if(wd.flag&BF_LONG && (
- (sc && sc->data[SC_FOGWALL].timer!=-1) ||
- (tsc && tsc->data[SC_FOGWALL].timer!=-1)))
+ if(wd.flag&BF_LONG && !skill_num && //Fogwall's hit penalty is only for normal ranged attacks.
+ tsc && tsc->data[SC_FOGWALL].timer!=-1)
hitrate-=50;
if(sd && flag.arrow)
diff --git a/src/map/pc.c b/src/map/pc.c
index 15d0d7941..cfb3d86b7 100644
--- a/src/map/pc.c
+++ b/src/map/pc.c
@@ -546,7 +546,7 @@ int pc_isequip(struct map_session_data *sd,int n)
if (sd->status.base_level > 90 && item->equip & EQP_HELM)
return 1; //Can equip all helms
- if (sd->status.base_level > 96 && item->equip & EQP_WEAPON && item->type == 4)
+ if (sd->status.base_level > 96 && item->equip & EQP_WEAPON && item->type == IT_WEAPON)
switch(item->look) { //In weapons, the look determines type of weapon.
case W_DAGGER: //Level 4 Knives are equippable.. this means all knives, I'd guess?
case W_1HSWORD: //All 1H swords