diff options
-rw-r--r-- | Changelog-Trunk.txt | 6 | ||||
-rw-r--r-- | db/skill_cast_db.txt | 2 | ||||
-rw-r--r-- | src/map/battle.c | 3 | ||||
-rw-r--r-- | src/map/mob.c | 11 | ||||
-rw-r--r-- | src/map/skill.c | 2 | ||||
-rw-r--r-- | src/map/status.c | 2 | ||||
-rw-r--r-- | src/map/vending.c | 2 |
7 files changed, 19 insertions, 9 deletions
diff --git a/Changelog-Trunk.txt b/Changelog-Trunk.txt index fd02994aa..58f09f585 100644 --- a/Changelog-Trunk.txt +++ b/Changelog-Trunk.txt @@ -4,6 +4,12 @@ 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. 2007/02/27 + * NPC_AGIUP now boosts flee by 100% and duration is 5+5*lv secs, as stated + on the Ragnarok Bible. + * Fixed Soul Breaker's misc part not ignoring flee. + * Fixed misc attack's flee check being backwards (the less hit%, the more + chance you had to connect) + * Corrected the range check in vending.c [Skotlex] * Added map & distance check to vending to prevent WPE hacks. [Lupus] E.g. buying items from WoE castle * Fixed a compiler warning in char_sql\login.c diff --git a/db/skill_cast_db.txt b/db/skill_cast_db.txt index 4fba63834..0d9579729 100644 --- a/db/skill_cast_db.txt +++ b/db/skill_cast_db.txt @@ -540,7 +540,7 @@ //-- NPC_POWERUP 349,0,0,0,60000:120000:180000:240000:300000,0 //-- NPC_AGIUP -350,0,0,0,60000:120000:180000:240000:300000,0 +350,0,0,0,10000:15000:20000:25000:30000,0 //-- NPC_INVISIBLE 353,0,0,0,30000,0 //-- NPC_RUN diff --git a/src/map/battle.c b/src/map/battle.c index 5060dfe28..1fe5004f3 100644 --- a/src/map/battle.c +++ b/src/map/battle.c @@ -2571,6 +2571,7 @@ struct Damage battle_calc_misc_attack( break ; case ASC_BREAKER: md.damage = 500+rand()%500 + 5*skill_lv * sstatus->int_; + nk|=NK_IGNORE_FLEE; //Only Breaker's Misc part always hits. break; } @@ -2609,7 +2610,7 @@ struct Damage battle_calc_misc_attack( else if (hitrate < battle_config.min_hitrate) hitrate = battle_config.min_hitrate; - if(rand()%100 >= hitrate) + if(rand()%100 < hitrate) i = 1; } if (!i) { diff --git a/src/map/mob.c b/src/map/mob.c index ddc26254d..da4696620 100644 --- a/src/map/mob.c +++ b/src/map/mob.c @@ -46,6 +46,9 @@ #define RUDE_ATTACKED_COUNT 2 //After how many rude-attacks should the skill be used? +//Used to determine default enemy type of mobs (for use in eachinrange calls) +#define DEFAULT_ENEMY_TYPE(md) (md->special_state.ai?BL_CHAR:BL_PC|BL_HOM) + //Dynamic mob database, allows saving of memory when there's big gaps in the mob_db [Skotlex] struct mob_db *mob_db_data[MAX_MOB_DB+1]; struct mob_db *mob_dummy = NULL; //Dummy mob to be returned when a non-existant one is requested. @@ -1199,13 +1202,13 @@ static int mob_ai_sub_hard(struct block_list *bl,va_list ap) if ((!tbl && mode&MD_AGGRESSIVE) || md->state.skillstate == MSS_FOLLOW) { map_foreachinrange (mob_ai_sub_hard_activesearch, &md->bl, - view_range, md->special_state.ai?BL_CHAR:BL_PC|BL_HOM, md, &tbl); + view_range, DEFAULT_ENEMY_TYPE(md), md, &tbl); } else if (mode&MD_CHANGECHASE && (md->state.skillstate == MSS_RUSH || md->state.skillstate == MSS_FOLLOW)) { search_size = view_range<md->status.rhw.range ? view_range:md->status.rhw.range; map_foreachinrange (mob_ai_sub_hard_changechase, &md->bl, - search_size, (md->special_state.ai?BL_CHAR:BL_PC|BL_HOM), md, &tbl); + search_size, DEFAULT_ENEMY_TYPE(md), md, &tbl); } if (!tbl) { //No targets available. @@ -2779,7 +2782,7 @@ int mobskill_use(struct mob_data *md, unsigned int tick, int event) if (ms[i].target <= MST_AROUND) { switch (ms[i].target) { case MST_RANDOM: //Pick a random enemy within skill range. - bl = battle_getenemy(&md->bl, md->special_state.ai?BL_CHAR:BL_PC|BL_HOM, + bl = battle_getenemy(&md->bl, DEFAULT_ENEMY_TYPE(md), skill_get_range2(&md->bl, ms[i].skill_id, ms[i].skill_lv)); break; case MST_TARGET: @@ -2831,7 +2834,7 @@ int mobskill_use(struct mob_data *md, unsigned int tick, int event) struct block_list *bl; switch (ms[i].target) { case MST_RANDOM: //Pick a random enemy within skill range. - bl = battle_getenemy(&md->bl, md->special_state.ai?BL_CHAR:BL_PC|BL_HOM, + bl = battle_getenemy(&md->bl, DEFAULT_ENEMY_TYPE(md), skill_get_range2(&md->bl, ms[i].skill_id, ms[i].skill_lv)); break; case MST_TARGET: diff --git a/src/map/skill.c b/src/map/skill.c index ac1187126..a1e7a3e01 100644 --- a/src/map/skill.c +++ b/src/map/skill.c @@ -4923,7 +4923,7 @@ int skill_castend_nodamage_id (struct block_list *src, struct block_list *bl, in case NPC_AGIUP: sc_start(bl,SC_SPEEDUP1,100,skilllv,skill_get_time(skillid, skilllv)); clif_skill_nodamage(src,bl,skillid,skilllv, - sc_start(bl,type,100,40*skilllv,skill_get_time(skillid, skilllv))); + sc_start(bl,type,100,100,skill_get_time(skillid, skilllv))); break; case NPC_INVISIBLE: diff --git a/src/map/status.c b/src/map/status.c index 5beaf06f2..dfa0ab424 100644 --- a/src/map/status.c +++ b/src/map/status.c @@ -280,7 +280,7 @@ void initChangeTables(void) { set_sc(NPC_BREAKARMOR, SC_BROKENARMOR, SI_BROKENARMOR, SCB_NONE); add_sc(NPC_CHANGEUNDEAD, SC_ELEMENTALCHANGE); set_sc(NPC_POWERUP, SC_INCDEXRATE, SI_BLANK, SCB_DEX); - set_sc(NPC_AGIUP, SC_INCAGIRATE, SI_BLANK, SCB_AGI); + set_sc(NPC_AGIUP, SC_INCFLEERATE, SI_BLANK, SCB_AGI); add_sc(NPC_INVISIBLE, SC_CLOAKING); set_sc(LK_AURABLADE, SC_AURABLADE, SI_AURABLADE, SCB_NONE); set_sc(LK_PARRYING, SC_PARRYING, SI_PARRYING, SCB_NONE); diff --git a/src/map/vending.c b/src/map/vending.c index f5d46e25d..c12948de0 100644 --- a/src/map/vending.c +++ b/src/map/vending.c @@ -70,7 +70,7 @@ void vending_purchasereq(struct map_session_data *sd,int len,int id,unsigned cha return; if (vsd->vender_id == sd->bl.id) return; - if (sd->bl.m != vsd->bl.m || !check_distance_bl(&sd->bl, &vsd->bl, TRADE_DISTANCE) + if (sd->bl.m != vsd->bl.m || !check_distance_bl(&sd->bl, &vsd->bl, AREA_SIZE) ) { clif_buyvending(sd, 0, 32767, 4); // too far [Lupus] //probably... we should add either a hack log / or a proper message. But normal player won't see ie anyway |