diff options
author | skotlex <skotlex@54d463be-8e91-2dee-dedb-b68131a5f0ec> | 2006-05-02 16:32:37 +0000 |
---|---|---|
committer | skotlex <skotlex@54d463be-8e91-2dee-dedb-b68131a5f0ec> | 2006-05-02 16:32:37 +0000 |
commit | 631137fae16d2ef187e461fe8ac5e53e1088967b (patch) | |
tree | 0d801e6ab5e84d18ae1582861232e175d4d479f3 /src/map | |
parent | 99e419e146eeb6edb0ab70a4a12d5e980c6975fd (diff) | |
download | hercules-631137fae16d2ef187e461fe8ac5e53e1088967b.tar.gz hercules-631137fae16d2ef187e461fe8ac5e53e1088967b.tar.bz2 hercules-631137fae16d2ef187e461fe8ac5e53e1088967b.tar.xz hercules-631137fae16d2ef187e461fe8ac5e53e1088967b.zip |
- Kaite now works against all types of spells.
- Kaupe now works against all skills.
- Sanctuary now won't damage non-enemies.
- Blessing now will always give you bonus stats even if you are wearing undead armor.
- Linking skills now have their cast-time reduced by dex.
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@6447 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src/map')
-rw-r--r-- | src/map/battle.c | 15 | ||||
-rw-r--r-- | src/map/skill.c | 9 | ||||
-rw-r--r-- | src/map/status.c | 30 |
3 files changed, 32 insertions, 22 deletions
diff --git a/src/map/battle.c b/src/map/battle.c index 45f7ac24d..641e17378 100644 --- a/src/map/battle.c +++ b/src/map/battle.c @@ -461,7 +461,14 @@ int battle_calc_damage(struct block_list *src,struct block_list *bl,int damage,i 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_KAUPE].timer != -1 && rand()%100 < sc->data[SC_KAUPE].val2)
+ {
+ if (--sc->data[SC_KAUPE].val3 <= 0) //We make it work like Safety Wall, even though it only blocks 1 time.
+ status_change_end(bl, SC_KAUPE, -1);
+ return 0;
+ }
+
//Now damage increasing effects
if(sc->data[SC_AETERNA].timer!=-1 && skill_num != PA_PRESSURE && skill_num != PF_SOULBURN){
damage<<=1;
@@ -1363,11 +1370,7 @@ static struct Damage battle_calc_weapon_attack( if(rand()%100 >= hitrate)
wd.dmg_lv = ATK_FLEE;
- else if (tsc && tsc->data[SC_KAUPE].timer != -1 && rand()%100 < tsc->data[SC_KAUPE].val2) {
- if (--tsc->data[SC_KAUPE].val3 <= 0) //We make it work like Safety Wall, even though it only blocks 1 time.
- status_change_end(target, SC_KAUPE, -1);
- wd.dmg_lv = ATK_FLEE;
- } else
+ else
flag.hit =1;
} //End hit/miss calculation
diff --git a/src/map/skill.c b/src/map/skill.c index acbcdeb18..1bcd5a074 100644 --- a/src/map/skill.c +++ b/src/map/skill.c @@ -1743,7 +1743,7 @@ int skill_attack( int attack_type, struct block_list* src, struct block_list *ds if (sc && !sc->count)
sc = NULL; //Don't need it.
- if (attack_type&BF_MAGIC && sc && sc->data[SC_KAITE].timer != -1 && src == dsrc
+ if (attack_type&BF_MAGIC && sc && sc->data[SC_KAITE].timer != -1
&& !(status_get_mode(src)&MD_BOSS) && (sd || status_get_lv(dsrc) <= 80) //Works on players or mobs with level under 80.
) { //Bounce back the skill.
if (--sc->data[SC_KAITE].val2 <= 0)
@@ -6833,11 +6833,12 @@ int skill_unit_onplace_timer(struct skill_unit *src,struct block_list *bl,unsign {
int race = status_get_race(bl);
- if (battle_check_undead(race, status_get_elem_type(bl)) || race==RC_DEMON) {
- if (skill_attack(BF_MAGIC, ss, &src->bl, bl, sg->skill_id, sg->skill_lv, tick, 0)) {
+ if (battle_check_undead(race, status_get_elem_type(bl)) || race==RC_DEMON)
+ { //Only damage enemies with offensive Sanctuary. [Skotlex]
+ if(battle_check_target(&src->bl,bl,BCT_ENEMY)>0 &&
+ skill_attack(BF_MAGIC, ss, &src->bl, bl, sg->skill_id, sg->skill_lv, tick, 0))
// reduce healing count if this was meant for damaging [hekate]
sg->val1 -= 2;
- }
} else {
int heal = sg->val2;
if (status_get_hp(bl) >= status_get_max_hp(bl))
diff --git a/src/map/status.c b/src/map/status.c index e5b16aec3..53b9891f9 100644 --- a/src/map/status.c +++ b/src/map/status.c @@ -1675,10 +1675,10 @@ int status_calc_str(struct block_list *bl, int str) if(sc->data[SC_SPURT].timer!=-1)
str += 10; //Bonus is +!0 regardless of skill level
if(sc->data[SC_BLESSING].timer != -1){
- int race = status_get_race(bl);
- if(battle_check_undead(race,status_get_elem_type(bl)) || race == RC_DEMON)
+ if(sc->data[SC_BLESSING].val2)
+ str += sc->data[SC_BLESSING].val2;
+ else
str >>= 1;
- else str += sc->data[SC_BLESSING].val1;
}
if(sc->data[SC_NEN].timer!=-1)
str += sc->data[SC_NEN].val1;
@@ -1755,10 +1755,10 @@ int status_calc_int(struct block_list *bl, int int_) if(sc->data[SC_TRUESIGHT].timer!=-1)
int_ += 5;
if(sc->data[SC_BLESSING].timer != -1){
- int race = status_get_race(bl);
- if(battle_check_undead(race,status_get_elem_type(bl)) || race == RC_DEMON)
+ if (sc->data[SC_BLESSING].val2)
+ int_ += sc->data[SC_BLESSING].val2;
+ else
int_ >>= 1;
- else int_ += sc->data[SC_BLESSING].val1;
}
if(sc->data[SC_STRIPHELM].timer!=-1 && bl->type != BL_PC)
int_ -= int_ * 8*sc->data[SC_STRIPHELM].val1/100;
@@ -1787,10 +1787,10 @@ int status_calc_dex(struct block_list *bl, int dex) if(sc->data[SC_QUAGMIRE].timer!=-1)
dex -= sc->data[SC_QUAGMIRE].val1*(bl->type==BL_PC?5:10);
if(sc->data[SC_BLESSING].timer != -1){
- int race = status_get_race(bl);
- if(battle_check_undead(race,status_get_elem_type(bl)) || race == RC_DEMON)
+ if (sc->data[SC_BLESSING].val2)
+ dex += sc->data[SC_BLESSING].val2;
+ else
dex >>= 1;
- else dex += sc->data[SC_BLESSING].val1;
}
if(sc->data[SC_INCREASING].timer!=-1)
dex += 4; // added based on skill updates [Reddozen]
@@ -3753,7 +3753,7 @@ int status_change_start(struct block_list *bl,int type,int rate,int val1,int val return 0;
switch (type) {
case SC_BLESSING:
- if (!undead_flag || race != RC_DEMON)
+ if (!undead_flag && race != RC_DEMON)
break;
case SC_QUAGMIRE:
case SC_DECREASEAGI:
@@ -3768,7 +3768,7 @@ int status_change_start(struct block_list *bl,int type,int rate,int val1,int val //Before overlapping fail, one must check for status cured.
switch (type) {
case SC_BLESSING:
- if (!undead_flag && race!=RC_DEMON) {
+ if ((!undead_flag && race!=RC_DEMON) || bl->type == BL_PC) {
if (sc->data[SC_CURSE].timer!=-1)
status_change_end(bl,SC_CURSE,-1);
if (sc->data[SC_STONE].timer!=-1 && sc->data[SC_STONE].val2==0)
@@ -4441,13 +4441,19 @@ int status_change_start(struct block_list *bl,int type,int rate,int val1,int val val2 = 200*val1; //HP heal
val3 = 5*val1; //SP cost
break;
+ case SC_BLESSING:
+ if ((!undead_flag && race!=RC_DEMON) || bl->type == BL_PC)
+ val2 = val1;
+ else
+ val2 = 0; //0 -> Half stat.
+ calc_flag = 1;
+ break;
case SC_TRICKDEAD: /* 死んだふり */
{
struct view_data *vd = status_get_viewdata(bl);
if (vd) vd->dead_sit = 1;
break;
}
- case SC_BLESSING:
case SC_CONCENTRATION: /* コンセントレ?ション */case SC_ETERNALCHAOS: /* エタ?ナルカオス */
case SC_DRUMBATTLE: /* ?太鼓の響き */
case SC_NIBELUNGEN: /* ニ?ベルングの指輪 */
|