- Adjusted Battle_check_target so that alchemist summoned mobs are targetted by everyone as long as 1. The top-level master is a player and 2. the actual attacker is not a mob-type.

- Added config force_random_spawn which overrides the spawn-files defined coordinates to make all mobs always spawn randomly on the map.
- SC_SPEEDUP0 is no longer dispellable by SA_DISPEL


git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@8159 54d463be-8e91-2dee-dedb-b68131a5f0ec
This commit is contained in:
skotlex 2006-08-07 14:38:23 +00:00
parent 967d3f000a
commit 8fa60b9249
6 changed files with 46 additions and 14 deletions

View File

@ -2,6 +2,14 @@ Date Added
AS OF SVN REV. 5091, WE ARE NOW USING TRUNK. ALL UNTESTED BUGFIXES/FEATURES GO INTO TRUNK. AS OF SVN REV. 5091, WE ARE NOW USING TRUNK. ALL UNTESTED BUGFIXES/FEATURES GO INTO TRUNK.
IF YOU HAVE A WORKING AND TESTED BUGFIX PUT IT INTO STABLE AS WELL AS TRUNK. IF YOU HAVE A WORKING AND TESTED BUGFIX PUT IT INTO STABLE AS WELL AS TRUNK.
2006/08/07
* Adjusted Battle_check_target so that alchemist summoned mobs are
targetted by everyone as long as 1. The top-level master is a player and 2.
the actual attacker is not a mob-type. [Skotlex]
* Added config force_random_spawn which overrides the spawn-files defined
coordinates to make all mobs always spawn randomly on the map. [Skotlex]
* SC_SPEEDUP0 is no longer dispellable by SA_DISPEL [Skotlex]
2006/08/06 2006/08/06
* Updated item_db.sql & mob_db.sql to latest. [Toms] * Updated item_db.sql & mob_db.sql to latest. [Toms]
* Little fixes on homunc (hp/sp are now saved and init stats changed) [Toms] * Little fixes on homunc (hp/sp are now saved and init stats changed) [Toms]

View File

@ -116,6 +116,11 @@ boss_spawn_delay: 100
// 5 seconds. // 5 seconds.
no_spawn_on_player: 0 no_spawn_on_player: 0
// Should spawn coordinates in the mob-spawn files be ignored? (Note 1)
// If set to yes, all monsters will have a random respawn spot across the whole
// map regardless of what the mob-spawn file says.
force_random_spawn: no
// Do summon slaves inherit the passive/aggressive traits of their master? (Note 1) // Do summon slaves inherit the passive/aggressive traits of their master? (Note 1)
slaves_inherit_mode: yes slaves_inherit_mode: yes

View File

@ -1763,7 +1763,6 @@ static struct Damage battle_calc_weapon_attack(
wd.damage = battle_addmastery(sd,target,wd.damage,0); wd.damage = battle_addmastery(sd,target,wd.damage,0);
if (flag.lh) wd.damage2 = battle_addmastery(sd,target,wd.damage2,1); if (flag.lh) wd.damage2 = battle_addmastery(sd,target,wd.damage2,1);
if((skill=pc_checkskill(sd,SG_STAR_ANGER)) >0 && (t_class == sd->hate_mob[2] || (sc && sc->data[SC_MIRACLE].timer!=-1))) if((skill=pc_checkskill(sd,SG_STAR_ANGER)) >0 && (t_class == sd->hate_mob[2] || (sc && sc->data[SC_MIRACLE].timer!=-1)))
{ {
skillratio = (sd->status.base_level + sstatus->str + sstatus->dex + sstatus->luk)/(skill<4?12-3*skill:1); skillratio = (sd->status.base_level + sstatus->str + sstatus->dex + sstatus->luk)/(skill<4?12-3*skill:1);
@ -3173,8 +3172,9 @@ int battle_check_target( struct block_list *src, struct block_list *target,int f
return -1; //Cannot be targeted yet. return -1; //Cannot be targeted yet.
break; break;
case BL_MOB: case BL_MOB:
if (((TBL_MOB*)target)->special_state.ai > 1) if (((TBL_MOB*)target)->special_state.ai > 1 &&
{ //Alchemist summoned mobs are sort of universal enemies. s_bl->type == BL_PC && src->type != BL_MOB)
{ //Alchemist summoned mobs are always targettable by players
state |= BCT_ENEMY; state |= BCT_ENEMY;
strip_enemy = 0; strip_enemy = 0;
} }
@ -3509,6 +3509,8 @@ static const struct battle_data_short {
{ "mob_count_rate", &battle_config.mob_count_rate }, { "mob_count_rate", &battle_config.mob_count_rate },
{ "mob_spawn_delay", &battle_config.mob_spawn_delay }, { "mob_spawn_delay", &battle_config.mob_spawn_delay },
{ "no_spawn_on_player", &battle_config.no_spawn_on_player }, { "no_spawn_on_player", &battle_config.no_spawn_on_player },
{ "force_random_spawn", &battle_config.force_random_spawn },
{ "plant_spawn_delay", &battle_config.plant_spawn_delay }, { "plant_spawn_delay", &battle_config.plant_spawn_delay },
{ "boss_spawn_delay", &battle_config.boss_spawn_delay }, { "boss_spawn_delay", &battle_config.boss_spawn_delay },
{ "slaves_inherit_mode", &battle_config.slaves_inherit_mode }, { "slaves_inherit_mode", &battle_config.slaves_inherit_mode },
@ -3914,6 +3916,7 @@ void battle_set_defaults() {
battle_config.mob_count_rate=100; battle_config.mob_count_rate=100;
battle_config.mob_spawn_delay=100; battle_config.mob_spawn_delay=100;
battle_config.no_spawn_on_player=0; battle_config.no_spawn_on_player=0;
battle_config.force_random_spawn=0;
battle_config.plant_spawn_delay=100; battle_config.plant_spawn_delay=100;
battle_config.boss_spawn_delay=100; battle_config.boss_spawn_delay=100;
battle_config.slaves_inherit_mode=1; battle_config.slaves_inherit_mode=1;

View File

@ -157,6 +157,7 @@ extern struct Battle_Config {
unsigned short mob_skill_delay; //[Skotlex] unsigned short mob_skill_delay; //[Skotlex]
unsigned short mob_count_rate; unsigned short mob_count_rate;
unsigned short no_spawn_on_player; //[Skotlex] unsigned short no_spawn_on_player; //[Skotlex]
unsigned short force_random_spawn; //[Skotlex]
unsigned short mob_spawn_delay, plant_spawn_delay, boss_spawn_delay; // [Skotlex] unsigned short mob_spawn_delay, plant_spawn_delay, boss_spawn_delay; // [Skotlex]
unsigned short slaves_inherit_mode; unsigned short slaves_inherit_mode;
unsigned short slaves_inherit_speed; unsigned short slaves_inherit_speed;

View File

@ -2217,6 +2217,11 @@ int npc_parse_mob (char *w1, char *w2, char *w3, char *w4)
mob.num = 1; mob.num = 1;
} }
if (battle_config.force_random_spawn)
{ //Force a random spawn anywhere on the map.
mob.x = mob.y = mob.xs = mob.ys = 0;
}
//Apply the spawn delay fix [Skotlex] //Apply the spawn delay fix [Skotlex]
mode = mob_db(class_)->status.mode; mode = mob_db(class_)->status.mode;
if (mode & MD_BOSS) { //Bosses if (mode & MD_BOSS) { //Bosses

View File

@ -4438,14 +4438,24 @@ int skill_castend_nodamage_id (struct block_list *src, struct block_list *bl, in
int strip_fix, equip = 0; int strip_fix, equip = 0;
int sclist[4] = {0,0,0,0}; int sclist[4] = {0,0,0,0};
if (skillid == RG_STRIPWEAPON || skillid == ST_FULLSTRIP || skillid == GS_DISARM) switch (skillid) {
equip |= EQP_WEAPON; case RG_STRIPWEAPON:
if (skillid == RG_STRIPSHIELD || skillid == ST_FULLSTRIP) case GS_DISARM:
equip |= EQP_SHIELD; equip = EQP_WEAPON;
if (skillid == RG_STRIPARMOR || skillid == ST_FULLSTRIP) break;
equip |= EQP_ARMOR; case RG_STRIPSHIELD:
if (skillid == RG_STRIPHELM || skillid == ST_FULLSTRIP) equip = EQP_SHIELD;
equip |= EQP_HELM; break;
case RG_STRIPARMOR:
equip = EQP_ARMOR;
break;
case RG_STRIPHELM:
equip = EQP_HELM;
break;
case ST_FULLSTRIP:
equip = EQP_WEAPON|EQP_SHIELD|EQP_ARMOR|EQP_HELM;
break;
}
strip_fix = sstatus->dex - tstatus->dex; strip_fix = sstatus->dex - tstatus->dex;
if(strip_fix < 0) if(strip_fix < 0)
@ -4462,7 +4472,7 @@ int skill_castend_nodamage_id (struct block_list *src, struct block_list *bl, in
continue; continue;
switch (i) { switch (i) {
case EQI_HAND_L: //Shield / left-hand weapon case EQI_HAND_L: //Shield / left-hand weapon
if(dstsd->inventory_data[dstsd->equip_index[EQI_HAND_L]]->type == IT_ARMOR) if(dstsd->inventory_data[dstsd->equip_index[i]]->type == IT_ARMOR)
{ //Shield { //Shield
if (equip&EQP_SHIELD && if (equip&EQP_SHIELD &&
!(dstsd->unstripable_equip&EQP_SHIELD) && !(dstsd->unstripable_equip&EQP_SHIELD) &&
@ -4663,7 +4673,7 @@ int skill_castend_nodamage_id (struct block_list *src, struct block_list *bl, in
|| i==SC_CP_WEAPON || i==SC_CP_SHIELD || i==SC_CP_ARMOR || i==SC_CP_HELM || i==SC_CP_WEAPON || i==SC_CP_SHIELD || i==SC_CP_ARMOR || i==SC_CP_HELM
|| i==SC_COMBO || i==SC_DANCING || i==SC_GUILDAURA || i==SC_EDP || i==SC_COMBO || i==SC_DANCING || i==SC_GUILDAURA || i==SC_EDP
|| i==SC_AUTOBERSERK || i==SC_CARTBOOST || i==SC_MELTDOWN || i==SC_MOONLIT || i==SC_AUTOBERSERK || i==SC_CARTBOOST || i==SC_MELTDOWN || i==SC_MOONLIT
|| i==SC_SAFETYWALL || i==SC_SMA || i==SC_SAFETYWALL || i==SC_SMA || i==SC_SPEEDUP0
) )
continue; continue;
if(i==SC_BERSERK) tsc->data[i].val2=0; //Mark a dispelled berserk to avoid setting hp to 100 by setting hp penalty to 0. if(i==SC_BERSERK) tsc->data[i].val2=0; //Mark a dispelled berserk to avoid setting hp to 100 by setting hp penalty to 0.