Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // Looks to me like the BodyDamage.class has a bug that makes ThickSkinned increase the chance of you getting hurt
- // and ThinSkinned decrease the chance of you getting hurt!
- // Here is a snip of the code. It looks to me like the variable n5 (renamed because of the compiler) is the chance that
- // you AVOID getting hurt. This number is divided by 1.3 if you have Thick Skin, and multiplied by 1.3 if you have Thin
- // skin
- // if you renamed n5 as "chanceToBeHit" then the ThickSkinned and ThinSkinned modifications make sense, but
- // the Rand.Next(100) > chanceToBeHit line wouldn't make sense
- // if you renamed n5 as "chanceToAvoidHit" then the ThickSkinned and ThinSkinned modifications do reverse of what they
- // should, but the Rand.Next(100) > chanceToAvoidHit line makes sense
- // So probably either swap the ThickSkinned and ThinSkinned modifications
- // Or change the line to Rand.Next(100) <= n5 (but this would require double checking all the other code that modifies n5)
- final int max = Math.max(this.getParentChar().getSurroundingAttackingZombies(), 1);
- int n5 = n2 - (max - 1) * 10;
- int n6 = n3 - (max - 1) * 30;
- int n7 = n4 - (max - 1) * 15;
- int n8 = 3;
- if (SandboxOptions.instance.Lore.Strength.getValue() == 1) {
- n8 = 2;
- }
- if (SandboxOptions.instance.Lore.Strength.getValue() == 3) {
- n8 = 6;
- }
- if (this.ParentChar.Traits.ThickSkinned.isSet()) {
- n5 /= (int)1.3;
- }
- if (this.ParentChar.Traits.ThinSkinned.isSet()) {
- n5 *= (int)1.3;
- }
- // Stuff happens in between, then if a random 100 roll is > n5, you are hit
- if (Rand.Next(100) > n5) {
- boolean b2 = true;
- boolean b3 = false;
- // Then b2=true runs some code that shows that you've been scratched
- if (b2) {
- final Float value = this.getParentChar().getBodyPartClothingDefense(Integer.valueOf(i), false, false);
- if (this.getHealth() > 0.0f) {
- this.getParentChar().getEmitter().playSound("ZombieScratch");
- }
- if (Rand.Next(100) < value) {
- return false;
- }
- if (!addHoleFromZombieAttacks) {
- this.getParentChar().addHole(BloodBodyPartType.FromIndex(i));
- }
- this.AddDamage(i, n11);
- this.SetScratched(i, true);
- this.getParentChar().addBlood(BloodBodyPartType.FromIndex(i), true, false, true);
- n = 1;
- if (GameServer.bServer && this.ParentChar instanceof IsoPlayer) {
- DebugLog.log(DebugType.Combat, invokedynamic(makeConcatWithConstants:(Ljava/lang/String;)Ljava/lang/String;, ((IsoPlayer)this.ParentChar).username));
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement