<commit_before>--[[
Illarion Server

This program is free software: you can redistribute it and/or modify it under
the terms of the GNU Affero General Public License as published by the Free
Software Foundation, either version 3 of the License, or (at your option) any
later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY
WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
PARTICULAR PURPOSE.  See the GNU Affero General Public License for more
details.

You should have received a copy of the GNU Affero General Public License along
with this program.  If not, see <http://www.gnu.org/licenses/>.
]]
require("monster.base.base")
require("monster.base.drop")
require("monster.base.lookat")
require("monster.base.quests")
require("base.messages");
require("monster.base.kills")
require("base.arena")
require("triggerfield.slimeFeeding")
module("monster.mon_105_transparentslimes", package.seeall)


function ini(Monster)

init=true;
monster.base.quests.iniQuests();
killer={}; --A list that keeps track of who attacked the monster last

--Random Messages

msgs = base.messages.Messages();
msgs:addMessage("#me blubbert.", "#me bubbles.");

end

function onSpawn(theSlime)
	if theSlime:getMonsterType()==1055 then
		theSlime:setSkinColor(51,51,51)
	end

end

DELETED = false
function abortRoute(theSlime)
	--[[
	-- Slime feeding quest in Runewick
	if theSlime:getMonsterType()==1055 then
		if theSlime.pos == position(10,6,0) then
			--[[if world:isItemOnField(tSF.WARP_TO_SLIME_POSITION) and DELETED == false then
				theSlime:talk(Character.say, "#mes schleimige Masse gleitet ber das Futter und absorbiert es. Sein Krper wabbelt kurz ein Objekt tritt aus diesem raus, welches ber die Ansperrung kataplutiert.",
				"#me's slimy mass flows over the feed and absorbs it. Its body wobbles for a short period of time and an oject emerges from it, which is catapulted over the boundary.")
				local feeding = world:getItemOnField(tSF.WARP_TO_SLIME_POSITION)
				world:erase(feeding,feeding.number)
				myItemList = tSF.REWARD_LIST[Random.uniform(1,#tSF.REWARD_LIST)] 
				world:createItemFromId(myItemList.itemId, myItemList.amount, tSF.REWARD_POSITION, true, myItemList.quality, myItemList.data)
				DELETED = true
				theSlime.movepoints = theSlime.movepoints -30
			end]]
			theSlime.waypoints:addWaypoint(position(12,2,0))
			theSlime:setOnRoute(true)
			
		elseif theSlime.pos == position(12,2,0) then
			theSlime:increaseAttrib("hitpoints", -10000)
			
		end
	end
	-- Slime feeding quest in Runewick END
	]]
end

function enemyNear(Monster,Enemy)

    if init==nil then
        ini(Monster);
    end

    if math.random(1,10) == 1 then
        monster.base.drop.MonsterRandomTalk(Monster,msgs); --a random message is spoken once in a while
    end

    return false
end

function enemyOnSight(Monster,Enemy)

    if init==nil then
        ini(Monster);
    end

    monster.base.drop.MonsterRandomTalk(Monster,msgs); --a random message is spoken once in a while

	if monster.base.base.isMonsterArcherInRange(Monster, Enemy) then
		return true
	end<commit_msg>[Hotfix] Deactivate buggy slime quest<commit_after>--[[
Illarion Server

This program is free software: you can redistribute it and/or modify it under
the terms of the GNU Affero General Public License as published by the Free
Software Foundation, either version 3 of the License, or (at your option) any
later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY
WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
PARTICULAR PURPOSE.  See the GNU Affero General Public License for more
details.

You should have received a copy of the GNU Affero General Public License along
with this program.  If not, see <http://www.gnu.org/licenses/>.
]]
require("monster.base.base")
require("monster.base.drop")
require("monster.base.lookat")
require("monster.base.quests")
require("base.messages");
require("monster.base.kills")
require("base.arena")
require("triggerfield.slimeFeeding")
module("monster.mon_105_transparentslimes", package.seeall)


function ini(Monster)

init=true;
monster.base.quests.iniQuests();
killer={}; --A list that keeps track of who attacked the monster last

--Random Messages

msgs = base.messages.Messages();
msgs:addMessage("#me blubbert.", "#me bubbles.");

end

function onSpawn(theSlime)
	if theSlime:getMonsterType()==1055 then
		theSlime:setSkinColor(51,51,51)
	end

end

DELETED = false
function abortRoute(theSlime)
	
end

function enemyNear(Monster,Enemy)

    if init==nil then
        ini(Monster);
    end

    if math.random(1,10) == 1 then
        monster.base.drop.MonsterRandomTalk(Monster,msgs); --a random message is spoken once in a while
    end

    return false
end

function enemyOnSight(Monster,Enemy)

    if init==nil then
        ini(Monster);
    end

    monster.base.drop.MonsterRandomTalk(Monster,msgs); --a random message is spoken once in a while

	if monster.base.base.isMonsterArcherInRange(Monster, Enemy) then
		return true
	end
{'fraction_non_alphanumeric': 0.0951819075712881, 'fraction_numerical': 0.011799410029498525, 'mean_word_length': 4.5524017467248905, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 2, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4108058', 'n_tokens_mistral': 1727, 'n_tokens_neox': 1613, 'n_words': 516}