Skip to content

Commit

Permalink
EliteMobs 8.7.2 changelog:
Browse files Browse the repository at this point in the history
- [New] Released The Bridge Sanctum
- [New] Added The City Dungeon package
- [New] Added The Palace Sanctum
- [New] Added The Oasis Pyramid Sanctum
- [New] Added The Primis Blood Temple
- [Fix] Fixed a bug with relative offsets not reading configuration data correctly
- [Fix] Fixed a typo in a mobcombatsettings config description
- [Fix] Changed how max health based player count on is scaled for instanced bosses

Signed-off-by: MagmaGuy <[email protected]>
  • Loading branch information
MagmaGuy committed Jan 2, 2024
1 parent 20dea14 commit 4b1c93a
Show file tree
Hide file tree
Showing 14 changed files with 195 additions and 17 deletions.
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@ Discord support channel: https://discord.gg/QSA2wgh

Webapp where you can create content: https://magmaguy.com/webapp/webapp.html

The official EliteMobs resource pack is provided under the CC0 license - no rights reserved, free to use and modify, even without attribution (though attribution is appreciated even if it is not forced).

# Dev notes:

## Repository
Expand Down
4 changes: 2 additions & 2 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ processResources {
}

group 'com.magmaguy'
version '8.7.1-SNAPSHOT'
version '8.7.2-SNAPSHOT'

repositories {
maven {
Expand Down Expand Up @@ -124,7 +124,7 @@ dependencies {
implementation group: 'com.magmaguy', name: 'EasyMinecraftGoals-dist', version: '1.7.0'

//Free Minecraft Models
compileOnly group: 'com.magmaguy', name: 'FreeMinecraftModels', version: '1.1.0-SNAPSHOT'
compileOnly group: 'com.magmaguy', name: 'FreeMinecraftModels', version: '1.1.2-SNAPSHOT'

// Mythic Mobs integration
compileOnly group: 'io.lumine', name: 'Mythic-Dist', version: '5.3.5'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ public static void initializeConfig() {
List.of("Sets the maximum level elites can spawn at.", "Note: elite mob level is based on what armor and weapons players are wearing, and armor only scales up to level 200."),
fileConfiguration, "naturalEliteMobsLevelCap", 250);
doEliteArmor = ConfigurationEngine.setBoolean(
List.of("Sets if elites will wear armor based on their level. This is for visual puposes only and does not affect combat."),
List.of("Sets if elites will wear armor based on their level. This is for visual purposes only and does not affect combat."),
fileConfiguration, "doElitesWearArmor", true);
doEliteHelmets = ConfigurationEngine.setBoolean(
List.of("Sets if elites will wear helmets based on their level. This will prevent them from easily burning away during the daytime."),
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
package com.magmaguy.elitemobs.config.dungeonpackager.premade;

import com.magmaguy.elitemobs.config.dungeonpackager.DungeonPackagerConfigFields;
import com.magmaguy.elitemobs.utils.DiscordLinks;
import org.bukkit.World;

import java.util.Arrays;
import java.util.List;
import java.util.Map;

public class OasisPyramidSanctum extends DungeonPackagerConfigFields {
public OasisPyramidSanctum() {
super("oasis_pyramid_sanctum",
false,
"&2[lvl 055] &6The Oasis Pyramid",
Arrays.asList("&fThe final dungeon of the Oasis adventure!",
"&6Credits: 69OzCanOfBepis, Frostcone, MagmaGuy"),
DiscordLinks.premiumMinidungeons,
DungeonPackagerConfigFields.DungeonSizeCategory.SANCTUM,
"em_id_oasis_pyramid",
World.Environment.NORMAL,
true,
"em_id_oasis_pyramid,-9.5,77.0,-153.5,-115,17",
"em_id_oasis_pyramid,0.5,75.0,-169.5,-180,3",
0,
"Difficulty: &4solo hard content!",
"&bWelcome to the Pyramid!",
"&bYou have left the Pyramid!",
List.of("filename=oasis_pharaoh_p1.yml"),
"em_id_oasis_pyramid",
55);
setDifficulties(List.of(
Map.of("name", "normal", "id", 0)));
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
package com.magmaguy.elitemobs.config.dungeonpackager.premade;

import com.magmaguy.elitemobs.config.dungeonpackager.DungeonPackagerConfigFields;
import com.magmaguy.elitemobs.utils.DiscordLinks;
import org.bukkit.World;

import java.util.Arrays;
import java.util.List;
import java.util.Map;

public class PrimisBloodTempleSanctum extends DungeonPackagerConfigFields {
public PrimisBloodTempleSanctum() {
super("primis_blood_temple_sanctum",
false,
"&2[lvl 020] &aPrimis - Blood Temple'",
Arrays.asList("&fThe Fire Elemental awaits!",
"&6Credits: Dali_, Frostcone, MagmaGuy"),
DiscordLinks.premiumMinidungeons,
DungeonPackagerConfigFields.DungeonSizeCategory.SANCTUM,
"em_id_bloodtemple",
World.Environment.NORMAL,
true,
"em_id_bloodtemple,326.5,87.0,-738.5,-44,35",
"em_id_bloodtemple,324.5,73.0,-711.5,-90,5",
0,
"Difficulty: &4solo hard content!",
"&bWelcome to the Blood Temple!",
"&bYou have left the Blood Temple!",
List.of("filename=primis_final_elemental_p1.yml"),
"em_id_bloodtemple",
20);
setDifficulties(List.of(
Map.of("name", "normal", "id", 0)));
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@ public TheBridgeSanctum(){
"em_id_the_bridge",
World.Environment.NORMAL,
true,
"em_id_the_cave,0.5,65,0.5,70,0",
"em_id_the_cave,-18.5,58,-17.5,90.0,30.0",
"em_id_the_bridge,-255.5,100,-14.5,-90.0,0.0",
"em_id_the_bridge,-216.5,103,-14.5,-90.0,0.0",
0,
"Difficulty: &45-man hard content!",
"&bBefore being able to enter the city you must deal with the guardian on the bridge!",
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
package com.magmaguy.elitemobs.config.dungeonpackager.premade;

import com.magmaguy.elitemobs.config.dungeonpackager.DungeonPackagerConfigFields;
import com.magmaguy.elitemobs.utils.DiscordLinks;
import org.bukkit.World;

import java.util.Arrays;
import java.util.List;
import java.util.Map;

public class TheCityDungeon extends DungeonPackagerConfigFields {
public TheCityDungeon(){
super("the_city_dungeon",
false,
"&2[lvl 030] &3The City Dungeon",
Arrays.asList("&fThe perfect intermediate instanced sanctum!",
"&6Credits: Dali_, MagmaGuy, Frostcone"),
DiscordLinks.freeMinidungeons,
DungeonSizeCategory.DUNGEON,
"em_id_the_city",
World.Environment.NORMAL,
true,
"em_id_the_city,-87.5,119,-13.5,-90,0",
"em_id_the_city,-60.5,122,-12.5,-67,0",
0,
"Difficulty: &45-man hard content!",
"&bBefore being able to enter the city you must deal with the guardian on the bridge!",
"&bYou have left The City!",
List.of("filename=em_id_the_city_mini_boss_one.yml",
"filename=em_id_the_city_mini_boss_two.yml",
"filename=em_id_the_city_mini_boss_three.yml",
"filename=em_id_the_city_royal_guard_p1.yml"),
"em_id_the_city",
30);
setDifficulties(List.of(
Map.of("name", "normal", "levelSync", 35, "id", 0),
Map.of("name", "hard", "levelSync", 30, "id", 1),
Map.of("name", "mythic", "levelSync", 25, "id", 2)));
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
package com.magmaguy.elitemobs.config.dungeonpackager.premade;

import com.magmaguy.elitemobs.config.dungeonpackager.DungeonPackagerConfigFields;
import com.magmaguy.elitemobs.utils.DiscordLinks;
import org.bukkit.World;

import java.util.Arrays;
import java.util.List;
import java.util.Map;

public class ThePalaceSanctum extends DungeonPackagerConfigFields {
public ThePalaceSanctum(){
super("the_palace_sanctum",
false,
"&2[lvl 030] &3The Palace Sanctum",
Arrays.asList("&fThe perfect intermediate instanced sanctum!",
"&6Credits: Dali_, MagmaGuy, Frostcone"),
DiscordLinks.freeMinidungeons,
DungeonSizeCategory.SANCTUM,
"em_id_the_palace",
World.Environment.NORMAL,
true,
"em_id_the_palace,208.5,144,-101.5,-90.0,0.0",
"em_id_the_palace,238.5,144,-100.5,0.0,0.0",
0,
"Difficulty: &45-man hard content!",
"&bBefore being able to enter the city you must deal with the guardian on the bridge!",
"&bYou have left The Palace!",
List.of("the_palace_old_stone_king_p1.yml"),
"em_id_the_palace",
35);
setDifficulties(List.of(
Map.of("name", "normal", "levelSync", 40, "id", 0),
Map.of("name", "hard", "levelSync", 35, "id", 1),
Map.of("name", "mythic", "levelSync", 30, "id", 2)));
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,21 @@ public void setNormalizedMaxHealth(int playerCount) {
}
}

@Override
public void setMaxHealth() {
super.setNormalizedMaxHealth();
if (dungeonInstance.getPlayers().size() < 2) return;
double normalizedDungeonMaxHealth = super.getMaxHealth() * .75 * dungeonInstance.getPlayers().size();
super.maxHealth = normalizedDungeonMaxHealth;
if (health == null) {
if (livingEntity != null) livingEntity.setHealth(maxHealth);
this.health = maxHealth;
}
//This is useful for phase boss entities that spawn in unloaded chunks and shouldn't full heal between phases, like in dungeons
else if (livingEntity != null)
livingEntity.setHealth(Math.min(health, livingEntity.getAttribute(Attribute.GENERIC_MAX_HEALTH).getValue()));
}

@Override
public void remove(RemovalReason removalReason) {
super.remove(removalReason);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
import lombok.Getter;
import lombok.Setter;
import org.bukkit.Location;
import org.bukkit.entity.Entity;
import org.bukkit.entity.LivingEntity;
import org.bukkit.event.Event;

Expand Down Expand Up @@ -42,7 +41,7 @@ public class ScriptActionData {
//in which case the targets are inherited by this script so they can be reused
@Setter
@Getter
private Collection<Entity> previousEntityTargets;
private Collection<LivingEntity> previousEntityTargets;
@Setter
@Getter
private Collection<Location> previousLocationTargets;
Expand Down Expand Up @@ -95,7 +94,7 @@ public ScriptActionData(ScriptTargets scriptTargets, ScriptZone scriptZone, Scr
}

//For data called by other scripts
public ScriptActionData(EliteEntity eliteEntity, LivingEntity directTarget, ScriptTargets scriptTargets, Collection<Entity> previousEntityTargets, Collection<Location> previousLocationTargets) {
public ScriptActionData(EliteEntity eliteEntity, LivingEntity directTarget, ScriptTargets scriptTargets, Collection<LivingEntity> previousEntityTargets, Collection<Location> previousLocationTargets) {
this.eliteEntity = eliteEntity;
this.directTarget = directTarget;
this.scriptTargets = scriptTargets;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -221,7 +221,7 @@ private Location getLocation(EliteEntity eliteEntity, ScriptActionData scriptAct

private Location addOffsets(Location originalLocation, ScriptActionData scriptActionData) {
Location location = originalLocation.clone().add(targetBlueprint.getOffset());
if (scriptRelativeVector == null)
//if (scriptRelativeVector == null)
if (targetBlueprint.getScriptRelativeVectorBlueprint() != null)
scriptRelativeVector = new ScriptRelativeVector(targetBlueprint.getScriptRelativeVectorBlueprint(), eliteScript, location);
else
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
import org.bukkit.configuration.MemorySection;
import org.bukkit.util.Vector;

import java.util.LinkedHashMap;
import java.util.Map;

public class ScriptRelativeVectorBlueprint {
Expand All @@ -30,6 +31,12 @@ public ScriptRelativeVectorBlueprint(String scriptName, String scriptFilename, M
configurationValues.entrySet().forEach(entry -> processKeyAndValue(entry.getKey(), entry.getValue()));
}

public ScriptRelativeVectorBlueprint(String scriptName, String scriptFilename, LinkedHashMap<String, ?> configurationValues) {
this.scriptName = scriptName;
this.scriptFilename = scriptFilename;
configurationValues.entrySet().forEach(entry -> processKeyAndValue(entry.getKey(), entry.getValue()));
}

protected void processKeyAndValue(String key, Object value) {
switch (key.toLowerCase()) {
case "sourcetarget" -> {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
import org.bukkit.configuration.MemorySection;
import org.bukkit.util.Vector;

import java.util.LinkedHashMap;
import java.util.List;
import java.util.Map;

Expand All @@ -15,10 +16,10 @@
public class ScriptTargetsBlueprint {
private final String filename;
@Getter
protected TargetType targetType = TargetType.SELF;
@Getter
private final String scriptName;
@Getter
protected TargetType targetType = TargetType.SELF;
@Getter
private List<String> locations;
@Getter
private String location;
Expand All @@ -42,12 +43,12 @@ public ScriptTargetsBlueprint(Map<?, ?> entry, String scriptName, String filenam
this.filename = filename;
processMapList(entry);
if (!isZoneTarget() && coverage < 1.0) {
new WarningMessage("Coverage for script " + scriptName + " in file " + filename + " was less than 1.0 but the targetType is neither ZONE_FULL nor ZONE_BORDER! Coverage should only be used for ZONE_FULL or ZONE_BORDER");
coverage = 1.0;
}
new WarningMessage("Coverage for script " + scriptName + " in file " + filename + " was less than 1.0 but the targetType is neither ZONE_FULL nor ZONE_BORDER! Coverage should only be used for ZONE_FULL or ZONE_BORDER");
coverage = 1.0;
}
}

public boolean isZoneTarget(){
public boolean isZoneTarget() {
return targetType == TargetType.ZONE_FULL ||
targetType == TargetType.ZONE_BORDER ||
targetType == TargetType.INHERIT_SCRIPT_ZONE_FULL ||
Expand All @@ -73,7 +74,14 @@ protected void processKeyAndValue(String key, Object value) {
isCustomCoverage = true;
coverage = parseDouble(key, value, scriptName);
}
case "relativeoffset" -> scriptRelativeVectorBlueprint = new ScriptRelativeVectorBlueprint(scriptName, filename, ((MemorySection) value).getValues(false));
case "relativeoffset" -> {
if (value instanceof MemorySection)
new ScriptRelativeVectorBlueprint(scriptName, filename, ((MemorySection) value).getValues(false));
else if (value instanceof LinkedHashMap<?, ?>)
scriptRelativeVectorBlueprint = new ScriptRelativeVectorBlueprint(scriptName, filename, ((LinkedHashMap) value));
else
new WarningMessage("Failed to get valid format for relative offset in " + scriptName + " for file " + filename);
}
}
}
}
2 changes: 1 addition & 1 deletion src/main/resources/plugin.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name: EliteMobs
version: 8.7.1
version: 8.7.2
author: MagmaGuy
main: com.magmaguy.elitemobs.EliteMobs
api-version: 1.14
Expand Down

0 comments on commit 4b1c93a

Please sign in to comment.