aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/kr/syeyoung/dungeonsguide/roomprocessor
diff options
context:
space:
mode:
authorsyeyoung <cyong06@naver.com>2021-01-29 22:05:55 +0900
committersyeyoung <cyong06@naver.com>2021-01-29 22:05:55 +0900
commit0e73e6f21a9e19d33f2edd1d406881518c570db9 (patch)
tree408682e40a4588c3de59d0cb68966d83ab0606e3 /src/main/java/kr/syeyoung/dungeonsguide/roomprocessor
parent923f069e4255362afa3a28c04412a0c55ae83629 (diff)
downloadSkyblock-Dungeons-Guide-0e73e6f21a9e19d33f2edd1d406881518c570db9.tar.gz
Skyblock-Dungeons-Guide-0e73e6f21a9e19d33f2edd1d406881518c570db9.tar.bz2
Skyblock-Dungeons-Guide-0e73e6f21a9e19d33f2edd1d406881518c570db9.zip
The professor done
Diffstat (limited to 'src/main/java/kr/syeyoung/dungeonsguide/roomprocessor')
-rw-r--r--src/main/java/kr/syeyoung/dungeonsguide/roomprocessor/bossfight/BossfightProcessorProf.java128
1 files changed, 128 insertions, 0 deletions
diff --git a/src/main/java/kr/syeyoung/dungeonsguide/roomprocessor/bossfight/BossfightProcessorProf.java b/src/main/java/kr/syeyoung/dungeonsguide/roomprocessor/bossfight/BossfightProcessorProf.java
new file mode 100644
index 00000000..04e5461f
--- /dev/null
+++ b/src/main/java/kr/syeyoung/dungeonsguide/roomprocessor/bossfight/BossfightProcessorProf.java
@@ -0,0 +1,128 @@
+package kr.syeyoung.dungeonsguide.roomprocessor.bossfight;
+
+import kr.syeyoung.dungeonsguide.utils.TextUtils;
+import net.minecraft.entity.item.EntityArmorStand;
+import net.minecraftforge.event.entity.living.LivingEvent;
+
+import java.util.ArrayList;
+import java.util.List;
+
+public class BossfightProcessorProf extends GeneralBossfightProcessor {
+ public BossfightProcessorProf() {
+ addPhase(GeneralBossfightProcessor.PhaseData.builder()
+ .phase("start")
+ .signatureMsg("§r§c[BOSS] The Professor§r§f: I was burdened with terrible news recently...§r")
+ .nextPhase("fight-1").build()
+ );
+ addPhase(GeneralBossfightProcessor.PhaseData.builder()
+ .phase("fight-1")
+ .signatureMsg("§r§c[BOSS] The Professor§r§f: I'll show you real power!§r")
+ .nextPhase("first-defeat").build()
+ );
+ addPhase(GeneralBossfightProcessor.PhaseData.builder()
+ .phase("first-defeat")
+ .signatureMsg("§r§c[BOSS] The Professor§r§f: Oh? You found my Guardians one weakness?§r")
+ .nextPhase("fight-2").build()
+ );
+ addPhase(GeneralBossfightProcessor.PhaseData.builder()
+ .phase("fight-2")
+ .signatureMsg("§r§c[BOSS] The Professor§r§f: This time I'll be your opponent!§r")
+ .nextPhase("second-defeat").build()
+ );
+ addPhase(GeneralBossfightProcessor.PhaseData.builder()
+ .phase("second-defeat")
+ .signatureMsg("§r§c[BOSS] The Professor§r§f: I see. You have forced me to use my ultimate technique.§r")
+ .nextPhase("fight-3").build()
+ );
+ addPhase(GeneralBossfightProcessor.PhaseData.builder()
+ .phase("fight-3")
+ .signatureMsg("§r§c[BOSS] The Professor§r§f: The process is irreversible, but I'll be stronger than a Wither now!§r")
+ .nextPhase("final-defeat").build()
+ );
+ addPhase(GeneralBossfightProcessor.PhaseData.builder()
+ .phase("final-defeat")
+ .signatureMsg("§r§c[BOSS] The Professor§r§f: What?! My Guardian power is unbeatable!§r").build()
+ );
+ }
+
+
+/*§6§4§lUndead Archer §e0§c❤
+ §6§4§lUndead Mage §a366k§c❤
+ §6§4§lUndead Priest §e180k§c❤
+ §6§4§lUndead Warrior §e189k§c❤
+ §e﴾ §c§lScarf§r §a1M§c❤ §e﴿*/
+
+ @Override
+ public List<HealthData> getHealths() {
+ List<HealthData> healths = new ArrayList<HealthData>();
+ {
+ long health = 0;
+ if (profStand != null) {
+ String name = TextUtils.stripColor(profStand.getName());
+ String healthPart = name.split(" ")[3];
+ health = TextUtils.reverseFormat(healthPart.substring(0, healthPart.length() - 1));
+ }
+ healths.add(new HealthData("The Professor", (int) health, 3000000, this.getCurrentPhase().startsWith("fight-") && !this.getCurrentPhase().equals("fight-1")));
+ }
+ if (!getCurrentPhase().equals("second-defeat") && !getCurrentPhase().equals("fight-3") && !getCurrentPhase().equals("final-defeat")) {
+ {
+ long health = 0;
+ if (healthyGuard != null) {
+ String name = TextUtils.stripColor(healthyGuard.getName());
+ String healthPart = name.split(" ")[2];
+ health = TextUtils.reverseFormat(healthPart.substring(0, healthPart.length() - 1));
+ }
+ healths.add(new HealthData("Healthy Guardian", (int) health, 1000000, this.getCurrentPhase().equals("fight-1")));
+ }
+ {
+ long health = 0;
+ if (chaosGuard != null) {
+ String name = TextUtils.stripColor(chaosGuard.getName());
+ String healthPart = name.split(" ")[2];
+ health = TextUtils.reverseFormat(healthPart.substring(0, healthPart.length() - 1));
+ }
+ healths.add(new HealthData("Chaos Guardian", (int) health, 1000000, this.getCurrentPhase().equals("fight-1")));
+ }
+ {
+ long health = 0;
+ if (laserGuard != null) {
+ String name = TextUtils.stripColor(laserGuard.getName());
+ String healthPart = name.split(" ")[2];
+ health = TextUtils.reverseFormat(healthPart.substring(0, healthPart.length() - 1));
+ }
+ healths.add(new HealthData("Laser Guardian", (int) health, 1000000, this.getCurrentPhase().equals("fight-1")));
+ }
+ {
+ long health = 0;
+ if (reinforcedGuard != null) {
+ String name = TextUtils.stripColor(reinforcedGuard.getName());
+ String healthPart = name.split(" ")[2];
+ health = TextUtils.reverseFormat(healthPart.substring(0, healthPart.length() - 1));
+ }
+ healths.add(new HealthData("Reinforced Guardian", (int) health, 1000000, this.getCurrentPhase().equals("fight-1")));
+ }
+ }
+ return healths;
+ }
+
+ private EntityArmorStand profStand;
+ private EntityArmorStand laserGuard;
+ private EntityArmorStand chaosGuard;
+ private EntityArmorStand reinforcedGuard;
+ private EntityArmorStand healthyGuard;
+ @Override
+ public void onEntitySpawn(LivingEvent.LivingUpdateEvent updateEvent) {
+ if (updateEvent.entityLiving instanceof EntityArmorStand) {
+ if (updateEvent.entityLiving.getName().startsWith("§e﴾ §c§lThe Professor§r "))
+ profStand = (EntityArmorStand) updateEvent.entityLiving;
+ else if (updateEvent.entityLiving.getName().startsWith("§cHealthy Guardian "))
+ healthyGuard = (EntityArmorStand) updateEvent.entityLiving;
+ else if (updateEvent.entityLiving.getName().startsWith("§cChaos Guardian "))
+ chaosGuard = (EntityArmorStand) updateEvent.entityLiving;
+ else if (updateEvent.entityLiving.getName().startsWith("§cLaser Guardian "))
+ laserGuard = (EntityArmorStand) updateEvent.entityLiving;
+ else if (updateEvent.entityLiving.getName().startsWith("§cReinforced Guardian "))
+ reinforcedGuard = (EntityArmorStand) updateEvent.entityLiving;
+ }
+ }
+}