状态效果命令:/effect @p potion.dragonwrack 30 0
由使用物品屠龙者之剑攻击敌人产生。
表现为快速消耗其护盾,还会有dragonwrack类型的特殊伤害。
效果根据等级决定。
源代码如下
public void func_76394_a(EntityLivingBase victim, int level) {
if (!ItemDragonslayer.isDragon((Entity)victim) || victim.field_70170_p.field_72995_K)
return;
ItemDragonslayer.absoluteDamage(victim, this.wrack, Math.max(1.0F, victim.func_110138_aP() / 20.0F));
if (victim instanceof EntityPlayer) {
EntityPlayer player = (EntityPlayer)victim;
for (int x = 0; x < 5; x++) {
if (player.func_71124_b(x) != null) {
ItemStack equip = player.func_71124_b(x);
if (equip.func_77973_b() instanceof IEnergyContainerItem) {
IEnergyContainerItem battery = (IEnergyContainerItem)equip.func_77973_b();
battery.extractEnergy(equip, battery.getMaxEnergyStored(equip) / 50, false);
}
}
}
}
}
public boolean func_76397_a(int tick, int level) {
int k = 40 >> level;
return (k <= 0 || tick % k == 0);
}
}
资料分类: | Debuff |