diff options
author | Bond-009 <bond.009@outlook.com> | 2017-08-21 10:51:26 +0200 |
---|---|---|
committer | Mattes D <github@xoft.cz> | 2017-08-21 10:51:26 +0200 |
commit | a262bacc9d4f535dc149577ac380fde96bc8adae (patch) | |
tree | a2dad2dd38d13fb842d0d8d2504b8acdfa8e3a41 /src/Entities/Entity.cpp | |
parent | Fully implemented leashes (#3798) (diff) | |
download | cuberite-a262bacc9d4f535dc149577ac380fde96bc8adae.tar cuberite-a262bacc9d4f535dc149577ac380fde96bc8adae.tar.gz cuberite-a262bacc9d4f535dc149577ac380fde96bc8adae.tar.bz2 cuberite-a262bacc9d4f535dc149577ac380fde96bc8adae.tar.lz cuberite-a262bacc9d4f535dc149577ac380fde96bc8adae.tar.xz cuberite-a262bacc9d4f535dc149577ac380fde96bc8adae.tar.zst cuberite-a262bacc9d4f535dc149577ac380fde96bc8adae.zip |
Diffstat (limited to '')
-rw-r--r-- | src/Entities/Entity.cpp | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/src/Entities/Entity.cpp b/src/Entities/Entity.cpp index 56f7b33a3..9b5160cda 100644 --- a/src/Entities/Entity.cpp +++ b/src/Entities/Entity.cpp @@ -472,10 +472,14 @@ bool cEntity::DoTakeDamage(TakeDamageInfo & a_TDI) case mtSilverfish: { 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; - }; + } default: break; } } @@ -504,7 +508,7 @@ bool cEntity::DoTakeDamage(TakeDamageInfo & a_TDI) case mtMagmaCube: { break; - }; + } default: StartBurning(BurnTicks * 20); } } |