Skip to content

Commit

Permalink
Redid some moa stats, fixed drop multiplier
Browse files Browse the repository at this point in the history
Also added a new "Meaty" weight list, currently assigned to the highlands blue
  • Loading branch information
MrXBlade committed Nov 10, 2024
1 parent d3805d5 commit 531c213
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 14 deletions.
21 changes: 11 additions & 10 deletions src/main/java/net/id/paradiselost/api/MoaAPI.java
Original file line number Diff line number Diff line change
Expand Up @@ -208,25 +208,26 @@ public record MoaBreedingContext(MoaGenes parentA, MoaGenes parentB, World world
*/
public enum SpawnStatWeighting {
// Isn't this array of numbers nice? Could probably be defined in json instead.
SPEED(0.08F, 0.1F, 0.02F, 0.03F, 0F, -0.1F, 0F, -0.01F, 0, 8),
GLIDE(0.013F, 0.08F, 0.035F, 0.039F, -0.04F, -0.08F, 0F, -0.01F, 0, 6),
ENDURANCE(0.023F, 0.06F, 0.02F, 0.02F, -0.085F, -0.08F, -0.01F, -0.02F, 2, 8),
TANK(0.0F, 0.07F, 0.01F, 0.02F, -0.025F, -0.05F, -0.02F, -0.01F, 6, 6),
MYTHICAL_SPEED(0.31F, 0.17F, 0.082F, 0.0375F, 0F, -0.1F, 0F, -0.01F, 0, 8),
MYTHICAL_GLIDE(0.013F, 0.08F, 0.035F, 0.039F, -0.085F, -0.085F, 0F, -0.01F, 0, 6),
MYTHICAL_TANK(0.0F, 0.07F, 0.01F, 0.02F, -0.025F, -0.05F, -0.03F, -0.01F, 14, 6),
MYTHICAL_ALL(0.31F, 0.17F, 0.035F, 0.039F, -0.085F, -0.085F, -0.03F, -0.01F, 14, 6);
SPEED(0.08F, 0.1F, 0.02F, 0.03F, 0F, 0.1F, 0F, -0.01F, 0, 8, 0f, 0.02f),
GLIDE(0.013F, 0.08F, 0.035F, 0.039F, -0.04F, 0.08F, 0F, -0.01F, 0, 6, 0f, 0.02f),
ENDURANCE(0.023F, 0.06F, 0.02F, 0.02F, -0.085F, 0.08F, -0.01F, -0.02F, 2, 8, 0f, 0.02f),
TANK(0.0F, 0.07F, 0.01F, 0.02F, -0.025F, 0.01F, -0.02F, -0.01F, 6, 6, 0.4f, 0.02f),
MEATY(0.03F, 0.07F, 0.01F, 0.02F, -0.025F, 0.05F, -0.02F, -0.01F, 0, 2, 1.1f, 0.6f),
MYTHICAL_SPEED(0.31F, 0.17F, 0.082F, 0.0375F, 0F, 0.1F, 0F, -0.01F, 0, 8, 0.5f, 0.02f),
MYTHICAL_GLIDE(0.013F, 0.08F, 0.035F, 0.039F, -0.085F, 0.085F, 0F, -0.01F, 0, 6, 0.5f, 0.02f),
MYTHICAL_TANK(0.0F, 0.07F, 0.01F, 0.02F, -0.025F, 0.05F, -0.03F, -0.01F, 14, 6, 0.5f, 0.02f),
MYTHICAL_ALL(0.31F, 0.17F, 0.035F, 0.039F, -0.085F, 0.085F, -0.03F, -0.01F, 14, 6, 0.5f, 0.02f);

private final ImmutableMap<MoaAttributes, Weighting> data;

SpawnStatWeighting(float baseGroundSpeed, float groundSpeedVariance, float baseGlidingSpeed, float glidingSpeedVariance, float baseGlidingDecay, float glidingDecayVariance, float baseJumpStrength, float jumpStrengthVariance, float baseMaxHealth, float maxHealthVariance) {
SpawnStatWeighting(float baseGroundSpeed, float groundSpeedVariance, float baseGlidingSpeed, float glidingSpeedVariance, float baseGlidingDecay, float glidingDecayVariance, float baseJumpStrength, float jumpStrengthVariance, float baseMaxHealth, float maxHealthVariance, float baseDropMultiplier, float maxDropMultiplierVariance) {
var builder = ImmutableMap.<MoaAttributes, Weighting>builder();
builder.put(MoaAttributes.GROUND_SPEED, new Weighting(baseGroundSpeed, groundSpeedVariance));
builder.put(MoaAttributes.GLIDING_SPEED, new Weighting(baseGlidingSpeed, glidingSpeedVariance));
builder.put(MoaAttributes.GLIDING_DECAY, new Weighting(baseGlidingDecay, glidingDecayVariance));
builder.put(MoaAttributes.JUMPING_STRENGTH, new Weighting(baseJumpStrength, jumpStrengthVariance));
builder.put(MoaAttributes.MAX_HEALTH, new Weighting(baseMaxHealth, maxHealthVariance));
builder.put(MoaAttributes.DROP_MULTIPLIER, new Weighting(0, 0));
builder.put(MoaAttributes.DROP_MULTIPLIER, new Weighting(baseDropMultiplier, maxDropMultiplierVariance));
data = builder.build();
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,15 +21,15 @@
* @author Jack Papel
*/
public class MoaRaces {
public static final MoaRace HIGHLANDS_BLUE = register("highlands_blue", new MoaRace(GROUND_SPEED, SPEED));
public static final MoaRace GOLDENROD = register("goldenrod", new MoaRace(JUMPING_STRENGTH, ENDURANCE));
public static final MoaRace HIGHLANDS_BLUE = register("highlands_blue", new MoaRace(DROP_MULTIPLIER, MEATY));
public static final MoaRace GOLDENROD = register("goldenrod", new MoaRace(GROUND_SPEED, ENDURANCE));
public static final MoaRace MINTGRASS = register("mintgrass", new MoaRace(GLIDING_SPEED, SPEED));
public static final MoaRace STRAWBERRY_WISTAR = register("strawberry_wistar", new MoaRace(GLIDING_DECAY, SPEED));
public static final MoaRace TANGERINE = register("tangerine", new MoaRace(JUMPING_STRENGTH, SPEED));
public static final MoaRace FOXTROT = register("foxtrot", new MoaRace(DROP_MULTIPLIER, TANK));
public static final MoaRace FOXTROT = register("foxtrot", new MoaRace(GLIDING_DECAY, GLIDE));
public static final MoaRace SCARLET = register("scarlet", new MoaRace(GLIDING_SPEED, ENDURANCE));
public static final MoaRace REDHOOD = register("redhood", new MoaRace(MAX_HEALTH, TANK));
public static final MoaRace MOONSTRUCK = register("moonstruck", new MoaRace(GLIDING_SPEED, SPEED, true, true, ParticleTypes.GLOW));
public static final MoaRace MOONSTRUCK = register("moonstruck", new MoaRace(GLIDING_SPEED, GLIDE, true, true, ParticleTypes.GLOW));

private static MoaRace register(String name, MoaRace race) {
return MoaAPI.register(ParadiseLost.locate(name), race);
Expand Down

0 comments on commit 531c213

Please sign in to comment.