summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorcelest <celest@54d463be-8e91-2dee-dedb-b68131a5f0ec>2004-11-16 01:42:39 +0000
committercelest <celest@54d463be-8e91-2dee-dedb-b68131a5f0ec>2004-11-16 01:42:39 +0000
commit24c0b54c0a3b324a33ca471282895f5516fd45ff (patch)
tree77f0f00eff3982807944315d34889de01786a975
parent1abfebd5b32a450db7bc59e5670b8227375d321b (diff)
downloadhercules-24c0b54c0a3b324a33ca471282895f5516fd45ff.tar.gz
hercules-24c0b54c0a3b324a33ca471282895f5516fd45ff.tar.bz2
hercules-24c0b54c0a3b324a33ca471282895f5516fd45ff.tar.xz
hercules-24c0b54c0a3b324a33ca471282895f5516fd45ff.zip
Modified level 0 skill check, perfect hiding
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/athena@207 54d463be-8e91-2dee-dedb-b68131a5f0ec
-rw-r--r--Changelog.txt2
-rw-r--r--src/map/mob.c12
-rw-r--r--src/map/skill.c3
3 files changed, 10 insertions, 7 deletions
diff --git a/Changelog.txt b/Changelog.txt
index 5afe1904d..bd0fc7404 100644
--- a/Changelog.txt
+++ b/Changelog.txt
@@ -4,6 +4,8 @@ Date Added
* Fixed 2 bugs in DELITEM script command. [Lupus]
- added deleting priority: If you have some items with the same ID and want to delete some of them, then
at first it'll delete common items then, if necessary, delete the rest items but upgraded/named/with cards. [Lupus]
+ * Added checks for Perfect hiding [celest]
+ * Modified level 0 skill check to allow auto blitz beat and steal. [celest]
11/15
* Added a Database Changelog.txt File, use it for any changes inside the db folder. [shadowlady]
diff --git a/src/map/mob.c b/src/map/mob.c
index ea4f46685..6c1a62c65 100644
--- a/src/map/mob.c
+++ b/src/map/mob.c
@@ -601,9 +601,9 @@ static int mob_attack(struct mob_data *md,unsigned int tick,int data)
return 0;
}
if(tsd && !(mode&0x20) && (tsd->sc_data[SC_TRICKDEAD].timer != -1 ||
- ((pc_ishiding(tsd) || tsd->state.gangsterparadise) && race!=4 && race!=6) ) ) {
+ ((pc_ishiding(tsd) || tsd->state.gangsterparadise) && !((race == 4 || race == 6) && !tsd->perfect_hiding) ) ) ) {
md->target_id=0;
- md->state.targettype = NONE_ATTACKABLE;
+ md->state.targettype = NONE_ATTACKABLE;
return 0;
}
@@ -1240,12 +1240,12 @@ static int mob_ai_sub_hard_activesearch(struct block_list *bl,va_list ap)
{
if(mode&0x20 ||
(tsd->sc_data[SC_TRICKDEAD].timer == -1 &&
- ((!pc_ishiding(tsd) && !tsd->state.gangsterparadise) || race==4 || race==6))){ // 妨害がないか判定
+ ((!pc_ishiding(tsd) && !tsd->state.gangsterparadise) || ((race == 4 || race == 6) && !tsd->perfect_hiding) ))){ // 妨害がないか判定
if( mob_can_reach(smd,bl,12) && // 到達可能性判定
rand()%1000<1000/(++(*pcc)) ){ // 範囲内PCで等確率にする
smd->target_id=tsd->bl.id;
smd->state.targettype = ATTACKABLE;
- smd->min_chase=13;
+ smd->min_chase=13;
}
}
}
@@ -1428,7 +1428,7 @@ static int mob_ai_sub_hard_slavemob(struct mob_data *md,unsigned int tick)
race=mob_db[md->class].race;
if(mode&0x20 ||
(sd->sc_data[SC_TRICKDEAD].timer == -1 &&
- ( (!pc_ishiding(sd) && !sd->state.gangsterparadise) || race==4 || race==6) ) ){ // 妨害がないか判定
+ ( (!pc_ishiding(sd) && !sd->state.gangsterparadise) || ((race == 4 || race == 6) && !sd->perfect_hiding) ) ) ){ // 妨害がないか判定
md->target_id=sd->bl.id;
md->state.targettype = ATTACKABLE;
@@ -1641,7 +1641,7 @@ static int mob_ai_sub_hard(struct block_list *bl,va_list ap)
if(tsd || tmd) {
if(tbl->m != md->bl.m || tbl->prev == NULL || (dist=distance(md->bl.x,md->bl.y,tbl->x,tbl->y))>=md->min_chase)
mob_unlocktarget(md,tick); // 別マップか、視界外
- else if( tsd && !(mode&0x20) && (tsd->sc_data[SC_TRICKDEAD].timer != -1 || ((pc_ishiding(tsd) || tsd->state.gangsterparadise) && race!=4 && race!=6)) )
+ else if( tsd && !(mode&0x20) && (tsd->sc_data[SC_TRICKDEAD].timer != -1 || ((pc_ishiding(tsd) || tsd->state.gangsterparadise) && !((race == 4 || race == 6) && !tsd->perfect_hiding) )) )
mob_unlocktarget(md,tick); // スキルなどによる策敵妨害
else if(!battle_check_range(&md->bl,tbl,mob_db[md->class].range)){
// 攻撃範囲外なので移動
diff --git a/src/map/skill.c b/src/map/skill.c
index 543a4c43c..7eb992ed6 100644
--- a/src/map/skill.c
+++ b/src/map/skill.c
@@ -917,7 +917,8 @@ int skill_additional_effect( struct block_list* src, struct block_list *bl,int s
nullpo_retr(0, src);
nullpo_retr(0, bl);
- if(skilllv <= 0) return 0;
+ //if(skilllv <= 0) return 0;
+ if(skillid > 0 && skilllv <= 0) return 0; // don't forget auto attacks! - celest
if(src->type==BL_PC){
nullpo_retr(0, sd=(struct map_session_data *)src);