
/*
 * Copyright 2011-2022 Cuberite Contributors
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 * 
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

#pragma once

#include "PassiveMonster.h"





enum class eRabbitType : UInt8
{
	Brown          = 0,
	White          = 1,
	Black          = 2,
	BlackAndWhite  = 3,
	Gold           = 4,
	SaltAndPepper  = 5,
	TheKillerBunny = 99
};





class cRabbit:
	public cPassiveMonster
{
	using Super = cPassiveMonster;

public:

	cRabbit();
	cRabbit(eRabbitType Type, int MoreCarrotTicks = 0);

	CLASS_PROTODEF(cRabbit)

	virtual void GetDrops(cItems & a_Drops, cEntity * a_Killer = nullptr) override;
	virtual void GetFollowedItems(cItems & a_Items) override
	{
		a_Items.Add(E_ITEM_CARROT);
		a_Items.Add(E_ITEM_GOLDEN_CARROT);
		a_Items.Add(E_BLOCK_DANDELION);
	}

	eRabbitType GetRabbitType()         const { return m_Type; }
	int         GetMoreCarrotTicks()    const { return m_MoreCarrotTicks; }

private:

	eRabbitType m_Type;
	int m_MoreCarrotTicks;  // Ticks until the Rabbit eat planted Carrots
} ;
