aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorsyeyoung <cyong06@naver.com>2021-01-29 21:42:50 +0900
committersyeyoung <cyong06@naver.com>2021-01-29 21:42:50 +0900
commit923f069e4255362afa3a28c04412a0c55ae83629 (patch)
treef8a77bb04b06755c07cc0439e78c54eab8ae612d
parent4dc9da6c2b23d145583ef528260cc7023a60bdfa (diff)
downloadSkyblock-Dungeons-Guide-923f069e4255362afa3a28c04412a0c55ae83629.tar.gz
Skyblock-Dungeons-Guide-923f069e4255362afa3a28c04412a0c55ae83629.tar.bz2
Skyblock-Dungeons-Guide-923f069e4255362afa3a28c04412a0c55ae83629.zip
scarf / bonzo done
-rwxr-xr-xsrc/main/java/kr/syeyoung/dungeonsguide/dungeon/doorfinder/CatacombDataProvider.java38
-rw-r--r--src/main/java/kr/syeyoung/dungeonsguide/roomprocessor/bossfight/BossfightProcessorBonzo.java4
-rw-r--r--src/main/java/kr/syeyoung/dungeonsguide/roomprocessor/bossfight/BossfightProcessorScarf.java118
3 files changed, 125 insertions, 35 deletions
diff --git a/src/main/java/kr/syeyoung/dungeonsguide/dungeon/doorfinder/CatacombDataProvider.java b/src/main/java/kr/syeyoung/dungeonsguide/dungeon/doorfinder/CatacombDataProvider.java
index daff59d0..0d79c67d 100755
--- a/src/main/java/kr/syeyoung/dungeonsguide/dungeon/doorfinder/CatacombDataProvider.java
+++ b/src/main/java/kr/syeyoung/dungeonsguide/dungeon/doorfinder/CatacombDataProvider.java
@@ -3,10 +3,7 @@ package kr.syeyoung.dungeonsguide.dungeon.doorfinder;
import com.google.common.base.Predicate;
import com.google.common.collect.Sets;
import kr.syeyoung.dungeonsguide.e;
-import kr.syeyoung.dungeonsguide.roomprocessor.bossfight.BossfightProcessor;
-import kr.syeyoung.dungeonsguide.roomprocessor.bossfight.BossfightProcessorBonzo;
-import kr.syeyoung.dungeonsguide.roomprocessor.bossfight.BossfightProcessorLivid;
-import kr.syeyoung.dungeonsguide.roomprocessor.bossfight.GeneralBossfightProcessor;
+import kr.syeyoung.dungeonsguide.roomprocessor.bossfight.*;
import net.minecraft.entity.item.EntityArmorStand;
import net.minecraft.init.Blocks;
import net.minecraft.util.BlockPos;
@@ -78,37 +75,10 @@ public class CatacombDataProvider implements DungeonSpecificDataProvider {
public BossfightProcessor createBossfightProcessor(World w, String dungeonName) {
String floor = dungeonName.substring(14).trim();
e.sendDebugChat(new ChatComponentText("Floor: "+floor+ " Building bossfight processor"));
-// if (floor.equals("F2")) {
-// GeneralBossfightProcessor bossfightProcessor = new GeneralBossfightProcessor();
-// bossfightProcessor.addPhase(GeneralBossfightProcessor.PhaseData.builder()
-// .phase("start")
-// .signatureMsg("§r§c[BOSS] Scarf§r§f: This is where the journey ends for you, Adventurers.§r")
-// .nextPhase("fight-1").build()
-// );
-// bossfightProcessor.addPhase(GeneralBossfightProcessor.PhaseData.builder()
-// .phase("fight-1")
-// .signatureMsg("§r§c[BOSS] Scarf§r§f: ARISE, MY CREATIONS!§r")
-// .nextPhase("first-defeat").build()
-// );
-// bossfightProcessor.addPhase(GeneralBossfightProcessor.PhaseData.builder()
-// .phase("first-defeat")
-// .signatureMsg("§r§c[BOSS] Scarf§r§f: Those toys are not strong enough I see.§r")
-// .nextPhase("fight-2").build()
-// );
-// bossfightProcessor.addPhase(GeneralBossfightProcessor.PhaseData.builder()
-// .phase("fight-2")
-// .signatureMsg("§r§c[BOSS] Scarf§r§f: Did you forget? I was taught by the best! Let's dance.§r")
-// .nextPhase("final-defeat").build()
-// );
-// bossfightProcessor.addPhase(GeneralBossfightProcessor.PhaseData.builder()
-// .phase("final-defeat")
-// .signatureMsg("§r§c[BOSS] Scarf§r§f: Whatever...§r").build()
-// );
-// return bossfightProcessor;
- if (false) {
+ if (floor.equals("F2")) {
+ return new BossfightProcessorScarf();
} else if (floor.equals("F1")) {
- GeneralBossfightProcessor bossfightProcessor = new BossfightProcessorBonzo();
- return bossfightProcessor;
+ return new BossfightProcessorBonzo();
// } else if (floor.equals("F3")) {
// GeneralBossfightProcessor bossfightProcessor = new GeneralBossfightProcessor();
// bossfightProcessor.addPhase(GeneralBossfightProcessor.PhaseData.builder()
diff --git a/src/main/java/kr/syeyoung/dungeonsguide/roomprocessor/bossfight/BossfightProcessorBonzo.java b/src/main/java/kr/syeyoung/dungeonsguide/roomprocessor/bossfight/BossfightProcessorBonzo.java
index 56957135..a1d048f5 100644
--- a/src/main/java/kr/syeyoung/dungeonsguide/roomprocessor/bossfight/BossfightProcessorBonzo.java
+++ b/src/main/java/kr/syeyoung/dungeonsguide/roomprocessor/bossfight/BossfightProcessorBonzo.java
@@ -53,8 +53,10 @@ public class BossfightProcessorBonzo extends GeneralBossfightProcessor {
private EntityArmorStand bonzoStand;
@Override
+ // §e﴾ §c§lBonzo§r §e71k§c❤ §e﴿
+ // §e﴾ §c§lBonzo§r §a250k§c❤ §e﴿
public void onEntitySpawn(LivingEvent.LivingUpdateEvent updateEvent) {
- if (updateEvent.entityLiving.getName().startsWith("§c§lBonzo§r ") && updateEvent.entityLiving instanceof EntityArmorStand) {
+ if (updateEvent.entityLiving.getName().startsWith("§e﴾ §c§lBonzo§r ") && updateEvent.entityLiving instanceof EntityArmorStand) {
System.out.println(updateEvent.entityLiving.getName());
bonzoStand = (EntityArmorStand) updateEvent.entityLiving;
}
diff --git a/src/main/java/kr/syeyoung/dungeonsguide/roomprocessor/bossfight/BossfightProcessorScarf.java b/src/main/java/kr/syeyoung/dungeonsguide/roomprocessor/bossfight/BossfightProcessorScarf.java
new file mode 100644
index 00000000..03e6a816
--- /dev/null
+++ b/src/main/java/kr/syeyoung/dungeonsguide/roomprocessor/bossfight/BossfightProcessorScarf.java
@@ -0,0 +1,118 @@
+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 BossfightProcessorScarf extends GeneralBossfightProcessor {
+ public BossfightProcessorScarf() {
+ addPhase(GeneralBossfightProcessor.PhaseData.builder()
+ .phase("start")
+ .signatureMsg("§r§c[BOSS] Scarf§r§f: This is where the journey ends for you, Adventurers.§r")
+ .nextPhase("fight-1").build()
+ );
+ addPhase(GeneralBossfightProcessor.PhaseData.builder()
+ .phase("fight-1")
+ .signatureMsg("§r§c[BOSS] Scarf§r§f: ARISE, MY CREATIONS!§r")
+ .nextPhase("first-defeat").build()
+ );
+ addPhase(GeneralBossfightProcessor.PhaseData.builder()
+ .phase("first-defeat")
+ .signatureMsg("§r§c[BOSS] Scarf§r§f: Those toys are not strong enough I see.§r")
+ .nextPhase("fight-2").build()
+ );
+ addPhase(GeneralBossfightProcessor.PhaseData.builder()
+ .phase("fight-2")
+ .signatureMsg("§r§c[BOSS] Scarf§r§f: Did you forget? I was taught by the best! Let's dance.§r")
+ .nextPhase("final-defeat").build()
+ );
+ addPhase(GeneralBossfightProcessor.PhaseData.builder()
+ .phase("final-defeat")
+ .signatureMsg("§r§c[BOSS] Scarf§r§f: Whatever...§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 (scarfStand != null) {
+ String name = TextUtils.stripColor(scarfStand.getName());
+ String healthPart = name.split(" ")[2];
+ health = TextUtils.reverseFormat(healthPart.substring(0, healthPart.length() - 1));
+ }
+ healths.add(new HealthData("Scarf", (int) health, 1000000, this.getCurrentPhase().equals("fight-2")));
+ }
+ if (!getCurrentPhase().equals("start") && !getCurrentPhase().equals("final-defeat")) {
+ {
+ long health = 0;
+ if (priestStand != null) {
+ String name = TextUtils.stripColor(priestStand.getName());
+ String healthPart = name.split(" ")[2];
+ health = TextUtils.reverseFormat(healthPart.substring(0, healthPart.length() - 1));
+ }
+ healths.add(new HealthData("Undead Priest", (int) health, 600000, this.getCurrentPhase().startsWith("fight-")));
+ }
+ {
+ long health = 0;
+ if (berserkStand != null) {
+ String name = TextUtils.stripColor(berserkStand.getName());
+ String healthPart = name.split(" ")[2];
+ health = TextUtils.reverseFormat(healthPart.substring(0, healthPart.length() - 1));
+ }
+ healths.add(new HealthData("Undead Warrior", (int) health, 500000, this.getCurrentPhase().startsWith("fight-")));
+ }
+ {
+ long health = 0;
+ if (mageStand != null) {
+ String name = TextUtils.stripColor(mageStand.getName());
+ String healthPart = name.split(" ")[2];
+ health = TextUtils.reverseFormat(healthPart.substring(0, healthPart.length() - 1));
+ }
+ healths.add(new HealthData("Undead Mage", (int) health, 400000, this.getCurrentPhase().startsWith("fight-")));
+ }
+ {
+ long health = 0;
+ if (archerStand != null) {
+ String name = TextUtils.stripColor(archerStand.getName());
+ String healthPart = name.split(" ")[2];
+ health = TextUtils.reverseFormat(healthPart.substring(0, healthPart.length() - 1));
+ }
+ healths.add(new HealthData("Undead Archer", (int) health, 400000, this.getCurrentPhase().startsWith("fight-")));
+ }
+ }
+ return healths;
+ }
+
+ private EntityArmorStand scarfStand;
+ private EntityArmorStand priestStand;
+ private EntityArmorStand mageStand;
+ private EntityArmorStand berserkStand;
+ private EntityArmorStand archerStand;
+ @Override
+ public void onEntitySpawn(LivingEvent.LivingUpdateEvent updateEvent) {
+ if (updateEvent.entityLiving instanceof EntityArmorStand) {
+ if (updateEvent.entityLiving.getName().startsWith("§e﴾ §c§lScarf§r "))
+ scarfStand = (EntityArmorStand) updateEvent.entityLiving;
+ else if (updateEvent.entityLiving.getName().startsWith("§6§4§lUndead Archer "))
+ archerStand = (EntityArmorStand) updateEvent.entityLiving;
+ else if (updateEvent.entityLiving.getName().startsWith("§6§4§lUndead Mage "))
+ mageStand = (EntityArmorStand) updateEvent.entityLiving;
+ else if (updateEvent.entityLiving.getName().startsWith("§6§4§lUndead Priest "))
+ priestStand = (EntityArmorStand) updateEvent.entityLiving;
+ else if (updateEvent.entityLiving.getName().startsWith("§6§4§lUndead Warrior "))
+ berserkStand = (EntityArmorStand) updateEvent.entityLiving;
+ }
+ }
+}