import { EntityComponentTypes, EntityDamageCause, EquipmentSlot, GameMode, Player, system, world } from "@minecraft/server";
import { applyDamage } from "../../types/function";

/**
 * 玻璃剑效果：
 * 20%的概率伤害x2
 */

system.beforeEvents.startup.subscribe((init) => {
    init.itemComponentRegistry.registerCustomComponent('xxr:virtue', {
        onHitEntity: (event) => {
            applyDamage(event.hitEntity, 9999);
        }
    })
})


