Give arthropods slowness IV when hit with bane of arthropods (#3932)
This commit is contained in:
parent
b18f6637b6
commit
a262bacc9d
@ -472,10 +472,14 @@ bool cEntity::DoTakeDamage(TakeDamageInfo & a_TDI)
|
|||||||
case mtSilverfish:
|
case mtSilverfish:
|
||||||
{
|
{
|
||||||
a_TDI.RawDamage += static_cast<int>(ceil(2.5 * BaneOfArthropodsLevel));
|
a_TDI.RawDamage += static_cast<int>(ceil(2.5 * BaneOfArthropodsLevel));
|
||||||
// TODO: Add slowness effect
|
// The duration of the effect is a random value between 1 and 1.5 seconds at level I,
|
||||||
|
// increasing the max duration by 0.5 seconds each level
|
||||||
|
// Ref: https://minecraft.gamepedia.com/Enchanting#Bane_of_Arthropods
|
||||||
|
int Duration = 20 + GetRandomProvider().RandInt(BaneOfArthropodsLevel * 10); // Duration in ticks
|
||||||
|
Monster->AddEntityEffect(cEntityEffect::effSlowness, Duration, 4);
|
||||||
|
|
||||||
break;
|
break;
|
||||||
};
|
}
|
||||||
default: break;
|
default: break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -504,7 +508,7 @@ bool cEntity::DoTakeDamage(TakeDamageInfo & a_TDI)
|
|||||||
case mtMagmaCube:
|
case mtMagmaCube:
|
||||||
{
|
{
|
||||||
break;
|
break;
|
||||||
};
|
}
|
||||||
default: StartBurning(BurnTicks * 20);
|
default: StartBurning(BurnTicks * 20);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user