Skip to content

Commit

Permalink
Config can now weaken mobs as well as buff them
Browse files Browse the repository at this point in the history
  • Loading branch information
BlackJar72 committed Feb 4, 2020
1 parent e1783d5 commit ea3ebfb
Show file tree
Hide file tree
Showing 6 changed files with 15 additions and 17 deletions.
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ apply plugin: 'net.minecraftforge.gradle.forge'
//Only edit below this line, the above code adds and enables the necessary things for Forge to be setup.


version = "5.8.4-MC1.12.2"
version = "5.8.5-MC1.12.2"
group = "com.gw.dm" // http://maven.apache.org/guides/mini/guide-naming-conventions.html
archivesBaseName = "dungeonmobs"

Expand Down
2 changes: 1 addition & 1 deletion src/main/java/com/gw/dm/DungeonMobs.java
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
dependencies = "after:thaumcraft; after:dldungeonsjbg")
public class DungeonMobs {
public static final String MODID = "dungeonmobs";
public static final String VERSION = "5.8.4";
public static final String VERSION = "5.8.5";

@Instance(MODID)
public static DungeonMobs instance;
Expand Down
6 changes: 2 additions & 4 deletions src/main/java/com/gw/dm/entity/EntityAhriman.java
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ public PotionEffect[] defineEyeRay() {
else if (eff == 1)
theEffect[i] = makePotionEffect("mining_fatigue", 160, 2);
else if (eff == 2)
theEffect[i] = makePotionEffect("instant_damage", 1, 1);
theEffect[i] = makePotionEffect("instant_damage", 1, ConfigHandler.beholderPtLvl);
else if (eff == 3)
theEffect[i] = makePotionEffect("nausea", 280, 1);
else if (eff == 4)
Expand All @@ -141,9 +141,7 @@ else if (eff == 8)
else if (eff == 9)
theEffect[i] = makePotionEffect("wither", 100, 1);
else
theEffect[i] = makePotionEffect("levitation", 100, 1);
//new PotionEffectAddled(DungeonMobs.potionAddleID, 180, 0);
// Change back?
theEffect[i] = makePotionEffect("levitation", 160, 1);

if (i > 0) {
if (theEffect[i - 1].equals(theEffect[i]))
Expand Down
9 changes: 1 addition & 8 deletions src/main/java/com/gw/dm/entity/EntityRakshasa.java
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,6 @@ public class EntityRakshasa extends EntityDungeonMob implements IRangedAttackMob
private static final ResourceLocation rakshasaTextures
= new ResourceLocation(DungeonMobs.MODID, "textures/entity/Rakshasa.png");
private static String mobName = DungeonMobs.MODID + ":dmrakshasa";
private static final int potionLevel;
public boolean ignoreHeight;
public String currentName;
public ResourceLocation currentSkin;
Expand All @@ -59,12 +58,6 @@ public class EntityRakshasa extends EntityDungeonMob implements IRangedAttackMob
private EntityAIAttackMelee meleeAttack
= new EntityAIAttackMelee(this, 0.3F, false);
private List myImages;


static {
potionLevel = Math.min(Math.max(1, (int)(Math.sqrt(ConfigHandler.damagex)
+ Math.log(ConfigHandler.damageplus + 1)) - 2), 127);
}


public EntityRakshasa(World par1World) {
Expand Down Expand Up @@ -185,7 +178,7 @@ public void attackEntityWithRangedAttack(EntityLivingBase var1, float lol) {
+ var1.height - getEntityBoundingBox().maxY;
double var15 = var1.posZ + var1.motionZ - posZ;

EntityMagicMissile mm = new EntityMagicMissile(world, this, potionLevel);
EntityMagicMissile mm = new EntityMagicMissile(world, this, ConfigHandler.rakshasaPtLvl);
targetArrow(mm);
world.spawnEntity(mm);
}
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/com/gw/dm/entity/EntityTroll.java
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ public class EntityTroll extends EntityMob {
public int stoneStatus = 1;
public int stoneCounter = 0;
public int regenTimer = 0;
public static final float regen = (float)(0.3 + Math.log10(ConfigHandler.healthx));;
public static final float regen = (float)Math.max((0.3 + Math.log10(ConfigHandler.healthx)), 0.1);

public EntityTroll(World par1World) {
super(par1World);
Expand Down
11 changes: 9 additions & 2 deletions src/main/java/com/gw/dm/util/ConfigHandler.java
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,7 @@ public class ConfigHandler {
public static int beholderP;
public static int beholderMn;
public static int beholderMx;
public static int beholderPtLvl;

public static boolean caveFisherIg;
public static int caveFisherP;
Expand Down Expand Up @@ -142,6 +143,7 @@ public class ConfigHandler {
public static int rakshasaP;
public static int rakshasaMn;
public static int rakshasaMx;
public static int rakshasaPtLvl;

public static boolean thoqquaIg;
public static int thoqquaP;
Expand Down Expand Up @@ -304,17 +306,22 @@ public static void init() {
"If false outerthings will not use the fire cloud attack.")
.getBoolean();


// Power-Up
config.addCustomCategoryComment("Power Boost",
"Incase you don't think these mobs are tough enough for your "
+ "OP modpack / gear");
healthx = config.getFloat("Health Multiplier", "Power Boost", 1.0f, 1.0f, 1000f,
healthx = config.getFloat("Health Multiplier", "Power Boost", 1.0f, 0.1f, 1000f,
"Multiply every mob's base health by this");
damagex = config.getFloat("Damage Multiplier", "Power Boost", 1.0f, 1.0f, 1000f,
damagex = config.getFloat("Damage Multiplier", "Power Boost", 1.0f, 0.1f, 1000f,
"Multiply every mob's base damage by this");;
damageplus = config.getFloat("Damage Additive", "Power Boost", 0.0f, 0.0f, 1000f,
"Add this to every mob's base damage "
+ "(usually less extreme than multiplying");
rakshasaPtLvl = config.getInt("Rakshasa Damage", "Power Boost", 2, 0, 127,
"The damage potion level for rakshasa magic missles.");
beholderPtLvl = config.getInt("Beholder Damage", "Power Boost", 1, 0, 127,
"The potion level for eye rays that act as damage potions.");



Expand Down

0 comments on commit ea3ebfb

Please sign in to comment.