Files
MinecraftConsoles/Minecraft.World/ThornsEnchantment.h
void_17 7074f35e4b shared_ptr -> std::shared_ptr
This is one of the first commits in a plan to remove all `using namespace std;` lines in the entire codebase as it is considered anti-pattern today.
2026-03-02 15:58:20 +07:00

20 lines
558 B
C++

#pragma once
#include "Enchantment.h"
class ThornsEnchantment : public Enchantment
{
private:
static const float CHANCE_PER_LEVEl;
public:
ThornsEnchantment(int id, int freq);
virtual int getMinCost(int level);
virtual int getMaxCost(int level);
virtual int getMaxLevel();
virtual bool canEnchant(std::shared_ptr<ItemInstance> item);
static bool shouldHit(int level, Random *random);
static int getDamage(int level, Random *random);
static void doThornsAfterAttack(std::shared_ptr<Entity> source, std::shared_ptr<Mob> target, Random *random);
};