diff options
-rw-r--r-- | Changelog-Trunk.txt | 8 | ||||
-rw-r--r-- | conf-tmpl/Changelog.txt | 9 | ||||
-rw-r--r-- | conf-tmpl/battle/drops.conf | 2 | ||||
-rw-r--r-- | conf-tmpl/battle/monster.conf | 8 | ||||
-rw-r--r-- | conf-tmpl/battle/pet.conf | 15 | ||||
-rw-r--r-- | src/map/battle.c | 6 | ||||
-rw-r--r-- | src/map/battle.h | 3 | ||||
-rw-r--r-- | src/map/clif.c | 7 | ||||
-rw-r--r-- | src/map/mob.c | 3 | ||||
-rw-r--r-- | src/map/status.c | 9 |
10 files changed, 54 insertions, 16 deletions
diff --git a/Changelog-Trunk.txt b/Changelog-Trunk.txt index 12541e692..5213f2e38 100644 --- a/Changelog-Trunk.txt +++ b/Changelog-Trunk.txt @@ -4,6 +4,14 @@ 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/12/18 + * Added hom_setting to specify which homunculus 'quirks' are in effect. The + default activates all of them, if you set them to 0 then homuncs will not + be treated in any special matter, pretty much like standard mobs. if I + missed any 'quirky' homunc behaviour from it, report it so it can be added + to the list. + * Made flooritem_lifetime a int so you can specify much longer life times + (the default of 60k was already very close to the max of 65k) + * Removed monster_ai 0x80 since it's now handled by hom_setting. * When walking into a Guild Dungeon your pvp_points will be set to 5 so you have to die twice before being warped out. * If jobchanging while disguised, the disguise will be removed, since it diff --git a/conf-tmpl/Changelog.txt b/conf-tmpl/Changelog.txt index 33f7434c8..6a70897e9 100644 --- a/conf-tmpl/Changelog.txt +++ b/conf-tmpl/Changelog.txt @@ -1,5 +1,14 @@ Date Added +2006/12/18 + * Added hom_setting to specify which homunculus 'quirks' are in effect. The + default activates all of them, if you set them to 0 then homuncs will not + be treated in any special matter, pretty much like standard mobs. if I + missed any 'quirky' homunc behaviour from it, report it so it can be added + to the list (This setting was added to pet.conf). + * flooritem_lifetime now accepts a much higher max value (previously it was + 65k when the default was 60k) + * Removed monster_ai 0x80 since it's now handled by hom_setting. 2006/12/12 * Added monster_ai&0x400 to use the previous 'smart' criteria that prevents mobs from fighting each another, since now they are all natural enemies diff --git a/conf-tmpl/battle/drops.conf b/conf-tmpl/battle/drops.conf index 4399fc706..72dadc363 100644 --- a/conf-tmpl/battle/drops.conf +++ b/conf-tmpl/battle/drops.conf @@ -30,7 +30,7 @@ // If an item is dropped, does it go stright into the users inventory? (Note 1) item_auto_get: no -// How long does it take for an item to disappear from the floor after it is dropped? (in miliseconds) +// How long does it take for an item to disappear from the floor after it is dropped? (in miliseconds) [Note 3] flooritem_lifetime: 60000 // Grace time during which only the person who did the most damage to a monster can get the item? (in milliseconds) (Note 3) diff --git a/conf-tmpl/battle/monster.conf b/conf-tmpl/battle/monster.conf index 1ea2c822e..e3ef417eb 100644 --- a/conf-tmpl/battle/monster.conf +++ b/conf-tmpl/battle/monster.conf @@ -19,6 +19,8 @@ //Note 2: All rates are in percents, 100 would mean 100%, 200 // would mean 200%, etc //Note 3: Value is not limited to 60K (see below) +//Note 4: Use bitmask values to specify who is affected +// (1: Pc, 2: Mob, 4: Pet, 8: Homonculus) // Other Information: // All options are limited to a max of 60K (aprox) which is 600% // or 60secs as appropiate. @@ -36,8 +38,7 @@ monster_hp_rate: 100 // The maximum attack speed of a monster monster_max_aspd: 199 -// Defines various mob AI related settings. The mask bits are -// (add to include multiple settings): +// Defines various mob AI related settings. [Note 4] // 0x001: When enabled mobs will update their target cell every few iterations // (normally they never update their target cell until they reach it while // chasing) @@ -59,9 +60,6 @@ monster_max_aspd: 199 // of players. // 0x040: When set, when the mob's target changes map, the mob will walk towards // any npc-warps in it's sight of view (use with mob_npc_warp below) -// 0x080: When set, aggressive mobs will give the same priority to Homuns and -// players and will go after the closest target instead of always picking -// the homunculus // 0x100: When set, a mob will pick a random skill from it's list and start from // that instead of checking skills in orders (when unset, if a mob has too // many skills, the ones near the end will rarely get selected) diff --git a/conf-tmpl/battle/pet.conf b/conf-tmpl/battle/pet.conf index e201ed840..9d3f8cfaa 100644 --- a/conf-tmpl/battle/pet.conf +++ b/conf-tmpl/battle/pet.conf @@ -19,6 +19,8 @@ //Note 2: All rates are in percents, 100 would mean 100%, 200 // would mean 200%, etc //Note 3: Value is not limited to 60K (see below) +//Note 4: Use bitmask values to specify who is affected +// (1: Pc, 2: Mob, 4: Pet, 8: Homonculus) // Other Information: // All options are limited to a max of 60K (aprox) which is 600% // or 60secs as appropiate. @@ -27,6 +29,19 @@ // features. //-------------------------------------------------------------- +// Homunculus setting [Note 4] +// (placed here since homuncs are more or less like pet mobs) +// Activates various homunc-related 'quirks' that makes them behave unlike +// normal characters. +// 0x001: They can't be targetted by support skills (except for their master) +// 0x002: They are inmune to land skills. +// 0x004: Mobs will always go after them instead of players until attacked. +// 0x008: They copy their master's speed on spawn/map-change +// 0x010: They display luk/3+1 instead of their actual critical in the +// stat window (by default they don't crit) +// 0x020: Their Min-Matk is always the same as their max +hom_setting: 0xFFFF + // Rate for catching pets (Note 2) pet_catch_rate: 100 diff --git a/src/map/battle.c b/src/map/battle.c index eb544dc4d..766622490 100644 --- a/src/map/battle.c +++ b/src/map/battle.c @@ -3284,7 +3284,7 @@ int battle_check_target( struct block_list *src, struct block_list *target,int f return 0; //For some mysterious reason ground-skills can't target homun. - if (target->type == BL_HOM) + if (target->type == BL_HOM && battle_config.hom_setting&0x2) return 0; if (su->group->src_id == target->id) @@ -3507,7 +3507,6 @@ static const struct battle_data_short { { "clear_skills_on_warp", &battle_config.clear_unit_onwarp }, { "random_monster_checklv", &battle_config.random_monster_checklv }, { "attribute_recover", &battle_config.attr_recover }, - { "flooritem_lifetime", &battle_config.flooritem_lifetime }, { "item_auto_get", &battle_config.item_auto_get }, { "drop_rate0item", &battle_config.drop_rate0item }, { "pvp_exp", &battle_config.pvp_exp }, @@ -3761,6 +3760,7 @@ static const struct battle_data_short { { "debuff_on_logout", &battle_config.debuff_on_logout}, { "monster_ai", &battle_config.mob_ai}, + { "monster_ai", &battle_config.hom_setting}, { "dynamic_mobs", &battle_config.dynamic_mobs}, { "mob_remove_damaged", &battle_config.mob_remove_damaged}, { "show_hp_sp_drain", &battle_config.show_hp_sp_drain}, // [Skotlex] @@ -3813,6 +3813,7 @@ static const struct battle_data_int { const char *str; int *val; } battle_data_int[] = { //List here battle_athena options which are type int! + { "flooritem_lifetime", &battle_config.flooritem_lifetime }, { "item_first_get_time", &battle_config.item_first_get_time }, { "item_second_get_time", &battle_config.item_second_get_time }, { "item_third_get_time", &battle_config.item_third_get_time }, @@ -4196,6 +4197,7 @@ void battle_set_defaults() { battle_config.debuff_on_logout = 1; battle_config.use_statpoint_table = 1; battle_config.mob_ai = 0; + battle_config.hom_setting = 0xFFFF; battle_config.dynamic_mobs = 1; // use Dynamic Mobs [Wizputer] battle_config.mob_remove_damaged = 1; // Dynamic Mobs - Remove mobs even if damaged [Wizputer] battle_config.mob_remove_delay = 60000; diff --git a/src/map/battle.h b/src/map/battle.h index 94ced24f7..4b811f069 100644 --- a/src/map/battle.h +++ b/src/map/battle.h @@ -109,8 +109,8 @@ extern struct Battle_Config { unsigned short clear_unit_onwarp; //[Skotlex] unsigned short random_monster_checklv; unsigned short attr_recover; - unsigned short flooritem_lifetime; unsigned short item_auto_get; + int flooritem_lifetime; int item_first_get_time; int item_second_get_time; int item_third_get_time; @@ -383,6 +383,7 @@ extern struct Battle_Config { unsigned short berserk_cancels_buffs; // [Aru] unsigned short debuff_on_logout; // Removes a few "official" negative Scs on logout. [Skotlex] unsigned short mob_ai; //Configures various mob_ai settings to make them smarter or dumber(official). [Skotlex] + unsigned short hom_setting; //Configures various homunc settings which make them behave unlike normaly characters.. [Skotlex] unsigned short dynamic_mobs; // Dynamic Mobs [Wizputer] - battle_athena flag implemented by [random] unsigned short mob_remove_damaged; // Dynamic Mobs - Remove mobs even if damaged [Wizputer] int mob_remove_delay; // Dynamic Mobs - delay before removing mobs from a map [Skotlex] diff --git a/src/map/clif.c b/src/map/clif.c index 668ef21ee..dbf12e601 100644 --- a/src/map/clif.c +++ b/src/map/clif.c @@ -1428,7 +1428,10 @@ int clif_hominfo(struct map_session_data *sd, struct homun_data *hd, int flag) WBUFW(buf,35)=cap_value(status->rhw.atk2+status->batk, 0, SHRT_MAX); WBUFW(buf,37)=cap_value(status->matk_max, 0, SHRT_MAX); WBUFW(buf,39)=status->hit; - WBUFW(buf,41)=status->luk/3 + 1; //crit is a +1 decimal value! Just display purpose.[Vicious] + if (battle_config.hom_setting&0x10) + WBUFW(buf,41)=status->luk/3 + 1; //crit is a +1 decimal value! Just display purpose.[Vicious] + else + WBUFW(buf,41)=status->cri/10; WBUFW(buf,43)=status->def + status->vit ; WBUFW(buf,45)=status->mdef; WBUFW(buf,47)=status->flee; @@ -8336,7 +8339,7 @@ void clif_parse_LoadEndAck(int fd,struct map_session_data *sd) clif_send_homdata(sd,0,0); clif_homskillinfoblock(sd); //Homunc mimic their master's speed on each map change. [Skotlex] - if (battle_config.slaves_inherit_speed&1) + if (battle_config.hom_setting&0x8) status_calc_bl(&sd->hd->bl, SCB_SPEED); // Since hom is inmune to land effects, unneeded. // skill_unit_move(&sd->hd->bl,gettick(),1); diff --git a/src/map/mob.c b/src/map/mob.c index 32deef2bc..b2dc67482 100644 --- a/src/map/mob.c +++ b/src/map/mob.c @@ -798,7 +798,8 @@ static int mob_ai_sub_hard_activesearch(struct block_list *bl,va_list ap) !(status_get_mode(&md->bl)&MD_BOSS)) return 0; //Gangster paradise protection. default: - if (!(battle_config.mob_ai&0x80) && (*target) && (*target)->type == BL_HOM && bl->type != BL_HOM) + if (battle_config.hom_setting&0x4 && + (*target) && (*target)->type == BL_HOM && bl->type != BL_HOM) return 0; //For some reason Homun targets are never overriden. dist = distance_bl(&md->bl, bl); diff --git a/src/map/status.c b/src/map/status.c index ccb017c08..aee10e721 100644 --- a/src/map/status.c +++ b/src/map/status.c @@ -1101,7 +1101,8 @@ int status_check_skilluse(struct block_list *src, struct block_list *target, int //Can't use support skills on homun (only master/self can) //Placed here instead of battle_check_target because support skill //invocations don't call that function. - if (skill_num && skill_get_inf(skill_num)&INF_SUPPORT_SKILL && + if (skill_num && battle_config.hom_setting&0x1 && + skill_get_inf(skill_num)&INF_SUPPORT_SKILL && battle_get_master(target) != src) return 0; default: @@ -2356,7 +2357,7 @@ int status_calc_homunculus(struct homun_data *hd, int first) status->rhw.range = 1 + status->size; status->mode = MD_CANMOVE|MD_CANATTACK; status->speed = DEFAULT_WALK_SPEED; - if (battle_config.slaves_inherit_speed&1 && + if (battle_config.hom_setting&0x8 && hd->master && hd->master->state.auth) //Master needs be authed to have valid speed. status->speed = status_get_speed(&hd->master->bl); @@ -2839,10 +2840,10 @@ void status_calc_bl_sub_hom(struct homun_data *hd, unsigned long flag) //[orn] if(flag|SCB_WATK && status->rhw.atk2 < status->rhw.atk) status->rhw.atk2 = status->rhw.atk; - if(flag&SCB_MATK) //Hom Min Matk is always the same as Max Matk + if(flag&SCB_MATK && battle_config.hom_setting&0x20) //Hom Min Matk is always the same as Max Matk status->matk_min = status->matk_max; - if(flag&SCB_SPEED && battle_config.slaves_inherit_speed&1 && hd->master) + if(flag&SCB_SPEED && battle_config.hom_setting&0x8 && hd->master) status->speed = status_get_speed(&hd->master->bl); if(flag&(SCB_ASPD|SCB_AGI|SCB_DEX)) { |