summaryrefslogtreecommitdiff
path: root/src/map/battle.c
diff options
context:
space:
mode:
authorskotlex <skotlex@54d463be-8e91-2dee-dedb-b68131a5f0ec>2006-08-07 14:38:23 +0000
committerskotlex <skotlex@54d463be-8e91-2dee-dedb-b68131a5f0ec>2006-08-07 14:38:23 +0000
commit71f8d31bc902a66649bf467264196444be93950e (patch)
treeb9e551c51c7e2d95ae5c6df4c2f0416ea7662edf /src/map/battle.c
parent9cd710dada5378af7fde118f5239c0ecda7c4c26 (diff)
downloadhercules-71f8d31bc902a66649bf467264196444be93950e.tar.gz
hercules-71f8d31bc902a66649bf467264196444be93950e.tar.bz2
hercules-71f8d31bc902a66649bf467264196444be93950e.tar.xz
hercules-71f8d31bc902a66649bf467264196444be93950e.zip
- 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://rathena.svn.sourceforge.net/svnroot/rathena/trunk@8159 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src/map/battle.c')
-rw-r--r--src/map/battle.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/src/map/battle.c b/src/map/battle.c
index 736ec637d..a1f0e2a90 100644
--- a/src/map/battle.c
+++ b/src/map/battle.c
@@ -1763,7 +1763,6 @@ static struct Damage battle_calc_weapon_attack(
wd.damage = battle_addmastery(sd,target,wd.damage,0);
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)))
{
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.
break;
case BL_MOB:
- if (((TBL_MOB*)target)->special_state.ai > 1)
- { //Alchemist summoned mobs are sort of universal enemies.
+ if (((TBL_MOB*)target)->special_state.ai > 1 &&
+ s_bl->type == BL_PC && src->type != BL_MOB)
+ { //Alchemist summoned mobs are always targettable by players
state |= BCT_ENEMY;
strip_enemy = 0;
}
@@ -3509,6 +3509,8 @@ static const struct battle_data_short {
{ "mob_count_rate", &battle_config.mob_count_rate },
{ "mob_spawn_delay", &battle_config.mob_spawn_delay },
{ "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 },
{ "boss_spawn_delay", &battle_config.boss_spawn_delay },
{ "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_spawn_delay=100;
battle_config.no_spawn_on_player=0;
+ battle_config.force_random_spawn=0;
battle_config.plant_spawn_delay=100;
battle_config.boss_spawn_delay=100;
battle_config.slaves_inherit_mode=1;