summaryrefslogtreecommitdiff
path: root/src/map/battle.c
diff options
context:
space:
mode:
authorskotlex <skotlex@54d463be-8e91-2dee-dedb-b68131a5f0ec>2006-10-20 14:30:28 +0000
committerskotlex <skotlex@54d463be-8e91-2dee-dedb-b68131a5f0ec>2006-10-20 14:30:28 +0000
commitaea859ec676e23f32f7dee151b2db91c92680afd (patch)
tree513e3972de57acb6c7ac91463618ae7118fa0d71 /src/map/battle.c
parent5173b7e5d42654313a52c8980f84cf424417bd50 (diff)
downloadhercules-aea859ec676e23f32f7dee151b2db91c92680afd.tar.gz
hercules-aea859ec676e23f32f7dee151b2db91c92680afd.tar.bz2
hercules-aea859ec676e23f32f7dee151b2db91c92680afd.tar.xz
hercules-aea859ec676e23f32f7dee151b2db91c92680afd.zip
- Added config setting "summon_flora_setting", which it you can decide now two things: a. Whether or not players can harm your floras outside versus grounds, and b. Whether or not you can summon out and mix different types of plants at the same time.
- Likely fixed pc_steal_item always failing to steal (it was attempting to steal random item IDs...) - Cleaned up a bit the mob on-death event so that when the killer is a homunculus, it's master will be taken. Also, the variable killerrid will be set before running the script to specify who delivered the final blow. If the killerrid matches with the script attached player, you can be sure your player did the final blow to the mob, otherwise, the attached player is who did the most damage to the mob. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@9026 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src/map/battle.c')
-rw-r--r--src/map/battle.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/map/battle.c b/src/map/battle.c
index d0eab1861..da209b2a1 100644
--- a/src/map/battle.c
+++ b/src/map/battle.c
@@ -3169,9 +3169,10 @@ 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 &&
+ if((((TBL_MOB*)target)->special_state.ai == 2 || //Marine Spheres
+ (((TBL_MOB*)target)->special_state.ai == 3 && battle_config.summon_flora&1)) && //Floras
s_bl->type == BL_PC && src->type != BL_MOB)
- { //Alchemist summoned mobs are always targettable by players
+ { //Targettable by players
state |= BCT_ENEMY;
strip_enemy = 0;
}
@@ -3474,6 +3475,7 @@ static const struct battle_data_short {
{ "defunit_not_enemy", &battle_config.defnotenemy },
{ "gvg_traps_target_all", &battle_config.vs_traps_bctall },
{ "traps_setting", &battle_config.traps_setting },
+ { "summon_flora_setting", &battle_config.summon_flora },
{ "clear_skills_on_death", &battle_config.clear_unit_ondeath },
{ "clear_skills_on_warp", &battle_config.clear_unit_onwarp },
{ "random_monster_checklv", &battle_config.random_monster_checklv },
@@ -3872,6 +3874,7 @@ void battle_set_defaults() {
battle_config.defnotenemy=0;
battle_config.vs_traps_bctall=BL_PC;
battle_config.traps_setting=0;
+ battle_config.summon_flora=3;
battle_config.clear_unit_ondeath=BL_ALL;
battle_config.clear_unit_onwarp=BL_ALL;
battle_config.random_monster_checklv=1;