Made the aspected Sentient Tools drop their corresponding Will type on killing enemies. #753
This commit is contained in:
parent
6c4fe34152
commit
655c2880dc
13 changed files with 103 additions and 42 deletions
|
@ -153,7 +153,7 @@ public class ItemSoulGem extends Item implements IDemonWillGem, IMeshProvider, I
|
|||
if (soulStack != null && soulStack.getItem() instanceof IDemonWill)
|
||||
{
|
||||
EnumDemonWillType thisType = this.getCurrentType(soulGemStack);
|
||||
if (thisType != EnumDemonWillType.DEFAULT)
|
||||
if (thisType != ((IDemonWill) soulStack.getItem()).getType(soulStack))
|
||||
{
|
||||
return soulStack;
|
||||
}
|
||||
|
@ -162,11 +162,11 @@ public class ItemSoulGem extends Item implements IDemonWillGem, IMeshProvider, I
|
|||
|
||||
if (soulsLeft < getMaxWill(thisType, soulGemStack))
|
||||
{
|
||||
double newSoulsLeft = Math.min(soulsLeft + soul.getWill(soulStack), getMaxWill(thisType, soulGemStack));
|
||||
soul.drainWill(soulStack, newSoulsLeft - soulsLeft);
|
||||
double newSoulsLeft = Math.min(soulsLeft + soul.getWill(thisType, soulStack), getMaxWill(thisType, soulGemStack));
|
||||
soul.drainWill(thisType, soulStack, newSoulsLeft - soulsLeft);
|
||||
|
||||
setWill(thisType, soulGemStack, newSoulsLeft);
|
||||
if (soul.getWill(soulStack) <= 0)
|
||||
if (soul.getWill(thisType, soulStack) <= 0)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue