Construct's Armory

Construct's Armory

30M Downloads

Alien Trait Trashes ~1/4 Stat Points While Growing

Opened this issue ยท 2 comments

commented

Versions (Be specific, do not write "latest"):

  • Construct's Armory: 1.12.2-1.2.5.3
  • Tinkers' Construct: 1.12.2-2.13.0.171
  • Mantle: 1.12.2-1.3.3.55
  • Forge: 1.12.2-14.23.5.2847-universal

Observed Behavior:

The alien trait randomly allocates a 1/0.02/0.01 points of durability/defense/toughness 800 times, but items allowed to fully grow until they stop gaining attributes are only gaining ~560-630 iterations worth of growth.

I believe the issue is here - it looks like the relevant switch statement handles cases for 0/1/2, while random.nextInt(4) is going to return a value from 0-3 inclusive, so roughly 1/4 of the points "fall off" during growth.

Expected Behavior:

800 points worth of stat growth for alien armors, or that this is functioning as intended and is simply a roundabout solution to randomizing the amount of growth per armor.

Steps to Reproduce:

  1. Make an item with the alien trait, equip it.
  2. Watch a movie or something else that'll eat 48+ minutes while the armor bakes.
  3. Calculate gained stats at a tool station to determine stat points 'gained'.
commented

You're right, the switch statement is wrong. Or rather, the random.nextInt(4) should be 3.

commented

Hooray, I'm not crazy! Thanks for the verification.