small fixes

This commit is contained in:
Boblet 2024-03-08 15:14:45 +01:00
parent c943eb62a3
commit c529f034bf
3 changed files with 62 additions and 13 deletions

View File

@ -1,6 +1,9 @@
## Changed
* After three quarters of a decade, three separate models, countless rebalances and hours of senseless yapping, the industrial generator has finally met its end. Suddenly, yet not unsurprisingly, on this here day the industrial generator has closed its eyes for the final time. It was a long and eventful journey, but as with all things in life, it too had to come to an end.
* And this is why we can't ever have anything nice
* Rebalanced glyphids
* We'll see how it goes
## Fixed
* WarTec should now be compatible again
* WarTec should now be compatible again
* Fixed the "Hold shift for more info" line appearing on fluid info when shift is held, and disappearing otherwise

View File

@ -2,6 +2,7 @@ package com.hbm.entity.mob.glyphid;
import com.hbm.lib.ModDamageSource;
import com.hbm.potion.HbmPotion;
import com.hbm.util.BobMathUtil;
import net.minecraft.util.DamageSource;
@ -93,7 +94,7 @@ public abstract class GlyphidStats {
amount *= 0.7F;
} else if(source.getDamageType().equals("player")) {
amount *= glyphid.getScale() < 1.25 ? 1.5 : glyphid.getScale() < 1.3 ? 0.8 : 0.5;
} else if(source == ModDamageSource.acid || ModDamageSource.s_acid.equals(source.getDamageType())){
} else if(source == ModDamageSource.acid || ModDamageSource.s_acid.equals(source.getDamageType())) {
amount = 0;
} else if(source == DamageSource.inWall) {
amount *= 15F;
@ -107,23 +108,68 @@ public abstract class GlyphidStats {
}
}
/** UNTESTED! Spreadsheet will be consulted soon */
public static class GlyphidStatsNT extends GlyphidStats {
public GlyphidStatsNT() {
this.statsGrunt = new StatBundle(30D, 1D, 5D, 1, 0.5F);
this.statsBombardier = new StatBundle(20D, 1D, 5D, 1, 0.5F);
this.statsBrawler = new StatBundle(50D, 1D, 10D, 3, 1F);
this.statsDigger = new StatBundle(50D, 1D, 5D, 1, 0.5F);
this.statsBlaster = new StatBundle(50D, 1D, 10D, 2, 1F);
this.statsBehemoth = new StatBundle(130D, 0.8D, 25D, 4, 2.5F);
this.statsBrenda = new StatBundle(250D, 1.2D, 50D, 5, 10F);
this.statsNuclear = new StatBundle(100D, 0.8D, 50D, 5, 10F);
this.statsScout = new StatBundle(20D, 1.5D, 2D, 1, 0.5F);
this.statsGrunt = new StatBundle(20D, 1D, 2D, 0.25F, 0F);
this.statsBombardier = new StatBundle(15D, 1D, 2D, 0.25F, 0F);
this.statsBrawler = new StatBundle(35D, 1D, 10D, 0.5F, 0.5F);
this.statsDigger = new StatBundle(50D, 1D, 10D, 0.5F, 0.5F);
this.statsBlaster = new StatBundle(35D, 1D, 10D, 0.5F, 0.5F);
this.statsBehemoth = new StatBundle(125D, 0.8D, 25D, 1.5F, 2F);
this.statsBrenda = new StatBundle(250D, 1.2D, 50D, 2.5F, 5F);
this.statsNuclear = new StatBundle(100D, 0.8D, 50D, 2.5F, 5F);
this.statsScout = new StatBundle(20D, 1.5D, 5D, 0.5F, 0F);
}
@Override
public boolean handleAttack(EntityGlyphid glyphid, DamageSource source, float amount) {
return true;
// Completely immune to acid from other glyphids
if(ModDamageSource.s_acid.equals(source.getDamageType()) && source.getSourceOfDamage() instanceof EntityGlyphid) return false;
// If damage is armor piercing or nuclear damage, don't apply any armor calculation
if(isNuclearDamage(source) || source.isDamageAbsolute() || source.isUnblockable()) {
if(source == DamageSource.inWall) amount *= 15F;
return glyphid.attackSuperclass(source, amount);
// This ensures that nukes will remain hyper-effective
}
// If damage is fire damage, reduce damage above 5 then ignore armor
if(source.isFireDamage()) {
float dmg = Math.min(amount, 5F);
if(amount > 5) dmg += (amount - 5F) * 0.1F;
return glyphid.attackSuperclass(source, amount);
// This ensures that afterburn and flamethrowers remain effective wihin reason
}
// If damage is explosive, reduce by 25% then ignore armor
if(source.isExplosion()) {
amount *= 0.75F;
return glyphid.attackSuperclass(source, amount);
// This ensures that explosions remain mostly effective
}
byte armor = glyphid.getDataWatcher().getWatchableObjectByte(glyphid.DW_ARMOR);
amount -= glyphid.getDamageThreshold();
if(amount < 0) return armor == 0; // if armor is present, knockback from 0 damage attacks is negated
if(armor != 0) {
if(glyphid.isArmorBroken(amount)) {
glyphid.breakOffArmor();
amount *= 0.5F;
}
amount = glyphid.calculateDamage((float) BobMathUtil.squirt(amount * 50));
// This ensures that higher numbers have a diminishing effect
}
return glyphid.attackSuperclass(source, amount);
}
public boolean isNuclearDamage(DamageSource source) {
return source == ModDamageSource.nuclearBlast || source == ModDamageSource.radiation;
}
}
}

View File

@ -222,7 +222,7 @@ public class FluidType {
}
}
if(!hidden.isEmpty() && shiftHeld) {
if(!hidden.isEmpty() && !shiftHeld) {
info.add(EnumChatFormatting.DARK_GRAY + "" + EnumChatFormatting.ITALIC +"Hold <" +
EnumChatFormatting.YELLOW + "" + EnumChatFormatting.ITALIC + "LSHIFT" +
EnumChatFormatting.DARK_GRAY + "" + EnumChatFormatting.ITALIC + "> to display more info");