diff options
author | skotlex <skotlex@54d463be-8e91-2dee-dedb-b68131a5f0ec> | 2006-07-18 13:50:27 +0000 |
---|---|---|
committer | skotlex <skotlex@54d463be-8e91-2dee-dedb-b68131a5f0ec> | 2006-07-18 13:50:27 +0000 |
commit | ea64ed822782ca2e9f2dadf954a85da6d559ed54 (patch) | |
tree | 38c41238b84b59049d60a838bd2dec68227ae8d1 | |
parent | ff6317b65b37c6439076afd810193baf893b3611 (diff) | |
download | hercules-ea64ed822782ca2e9f2dadf954a85da6d559ed54.tar.gz hercules-ea64ed822782ca2e9f2dadf954a85da6d559ed54.tar.bz2 hercules-ea64ed822782ca2e9f2dadf954a85da6d559ed54.tar.xz hercules-ea64ed822782ca2e9f2dadf954a85da6d559ed54.zip |
- 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.
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@7728 54d463be-8e91-2dee-dedb-b68131a5f0ec
-rw-r--r-- | Changelog-Trunk.txt | 3 | ||||
-rw-r--r-- | src/map/battle.c | 21 | ||||
-rw-r--r-- | src/map/skill.c | 12 |
3 files changed, 18 insertions, 18 deletions
diff --git a/Changelog-Trunk.txt b/Changelog-Trunk.txt index ee970c85a..b349e2d0b 100644 --- a/Changelog-Trunk.txt +++ b/Changelog-Trunk.txt @@ -4,6 +4,9 @@ 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 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]
* Added a proper check to make aggressive mobs never override homun targets
regardless of distance. [Skotlex]
* Removed a bunch of homun-related variables that are not needed at all.
diff --git a/src/map/battle.c b/src/map/battle.c index 777f75dfc..3d38e3af9 100644 --- a/src/map/battle.c +++ b/src/map/battle.c @@ -312,12 +312,7 @@ int battle_calc_damage(struct block_list *src,struct block_list *bl,int damage,i if(sc->data[SC_HERMODE].timer != -1 && flag&BF_MAGIC) return 0; - if(sc->data[SC_FOGWALL].timer != -1 && flag&BF_MAGIC - && rand()%100 < 75 && !(skill_get_inf(skill_num)&INF_GROUND_SKILL)) - return 0; - - - if(sc->data[SC_TATAMIGAESHI].timer != -1 && !flag&BF_MAGIC && flag&BF_LONG) + if(sc->data[SC_TATAMIGAESHI].timer != -1 && (flag&(BF_MAGIC|BF_LONG)) == BF_LONG) return 0; if(sc->data[SC_KAUPE].timer != -1 && @@ -351,10 +346,12 @@ int battle_calc_damage(struct block_list *src,struct block_list *bl,int damage,i damage>>=1; //Receive 50% damage } - if(sc->data[SC_DEFENDER].timer != -1 && flag&BF_LONG && flag&BF_WEAPON) + if(sc->data[SC_DEFENDER].timer != -1 && + (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 && flag&BF_WEAPON) + if(sc->data[SC_FOGWALL].timer != -1 && + (flag&(BF_LONG|BF_WEAPON)) == (BF_LONG|BF_WEAPON)) damage >>=1; if(sc->data[SC_ENERGYCOAT].timer!=-1 && flag&BF_WEAPON){ @@ -405,13 +402,9 @@ int battle_calc_damage(struct block_list *src,struct block_list *bl,int damage,i //SC effects from caster side. sc = status_get_sc(src); if (sc && sc->count) { - if(sc->data[SC_FOGWALL].timer != -1 && flag&(BF_LONG|BF_MAGIC)) { - if (flag&BF_MAGIC) { - if(!(skill_get_inf(skill_num)&INF_GROUND_SKILL) && rand()%100 < 75) - return 0; - } else if (flag&BF_WEAPON) + 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) diff --git a/src/map/skill.c b/src/map/skill.c index 5334a328a..5ff138468 100644 --- a/src/map/skill.c +++ b/src/map/skill.c @@ -2626,11 +2626,15 @@ int skill_castend_damage_id (struct block_list* src, struct block_list *bl, int if (status_isdead(src) || (src != bl && status_isdead(bl))) return 1; - if (skillid && skill_get_type(skillid) == BF_MAGIC && status_isimmune(bl)) + if (skillid && skill_get_type(skillid) == BF_MAGIC) { - if (sd) clif_skill_fail(sd,skillid,0,0); - //GTB makes all targetted skills silently fail. - return 1; + sc = status_get_sc(bl); + if (status_isimmune(bl) || ( + sc && sc->count && sc->data[SC_FOGWALL].timer != -1 && rand()%100 < 75) + ) { //GTB/Fogwall makes all targetted skills silently fail. + if (sd) clif_skill_fail(sd,skillid,0,0); + return 1; + } } sc = status_get_sc(src); |