diff options
| author | syeyoung <cyong06@naver.com> | 2021-01-30 15:44:46 +0900 |
|---|---|---|
| committer | syeyoung <cyong06@naver.com> | 2021-01-30 15:44:46 +0900 |
| commit | fa5f42ffa09405c51f1c4182674c052fb20ca230 (patch) | |
| tree | fe4533b9dd67fb00affb37762413d4336b110301 /src/main/java/kr/syeyoung/dungeonsguide/roomprocessor | |
| parent | c5efc73e0afe407b1161c3aafcf8509866587788 (diff) | |
| download | Skyblock-Dungeons-Guide-fa5f42ffa09405c51f1c4182674c052fb20ca230.tar.gz Skyblock-Dungeons-Guide-fa5f42ffa09405c51f1c4182674c052fb20ca230.tar.bz2 Skyblock-Dungeons-Guide-fa5f42ffa09405c51f1c4182674c052fb20ca230.zip | |
f6 done, sadan fight processor
Diffstat (limited to 'src/main/java/kr/syeyoung/dungeonsguide/roomprocessor')
3 files changed, 121 insertions, 5 deletions
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 a1d048f5..60a8411b 100644 --- a/src/main/java/kr/syeyoung/dungeonsguide/roomprocessor/bossfight/BossfightProcessorBonzo.java +++ b/src/main/java/kr/syeyoung/dungeonsguide/roomprocessor/bossfight/BossfightProcessorBonzo.java @@ -45,7 +45,6 @@ public class BossfightProcessorBonzo extends GeneralBossfightProcessor { String name = TextUtils.stripColor(bonzoStand.getName()); String healthPart = name.split(" ")[2]; health = TextUtils.reverseFormat(healthPart.substring(0, healthPart.length() - 1)); - System.out.println(healthPart.substring(0, healthPart.length() - 1) + " / "+ health); } healths.add(new HealthData("Bonzo", (int) health,250000 , this.getCurrentPhase().startsWith("fight-"))); return healths; @@ -57,7 +56,6 @@ public class BossfightProcessorBonzo extends GeneralBossfightProcessor { // §e﴾ §c§lBonzo§r §a250k§c❤ §e﴿ public void onEntitySpawn(LivingEvent.LivingUpdateEvent updateEvent) { 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/BossfightProcessorLivid.java b/src/main/java/kr/syeyoung/dungeonsguide/roomprocessor/bossfight/BossfightProcessorLivid.java index 766e2422..bdee9bd4 100644 --- a/src/main/java/kr/syeyoung/dungeonsguide/roomprocessor/bossfight/BossfightProcessorLivid.java +++ b/src/main/java/kr/syeyoung/dungeonsguide/roomprocessor/bossfight/BossfightProcessorLivid.java @@ -37,11 +37,9 @@ public class BossfightProcessorLivid extends GeneralBossfightProcessor { knownLivids.add(updateEvent.entityLiving.getName()); realLividName = updateEvent.entityLiving.getName(); realLivid = (EntityOtherPlayerMP) updateEvent.entityLiving; - System.out.println("Think real livid is "+realLividName); prefix = lividColorPrefix.get(realLividName.split(" ")[0]); } } else if (updateEvent.entityLiving.getName().startsWith("§a﴾ "+prefix) && updateEvent.entityLiving instanceof EntityArmorStand) { - System.out.println(updateEvent.entityLiving.getName()); lividStand = (EntityArmorStand) updateEvent.entityLiving; } } @@ -56,7 +54,6 @@ public class BossfightProcessorLivid extends GeneralBossfightProcessor { String name = TextUtils.stripColor(lividStand.getName()); String healthPart = name.split(" ")[2]; health = TextUtils.reverseFormat(healthPart.substring(0, healthPart.length() - 1)); - System.out.println(healthPart.substring(0, healthPart.length() - 1) + " / " + health); } catch (Exception e) {e.printStackTrace();} } healths.add(new HealthData(realLividName, (int) health,7000000 , true)); diff --git a/src/main/java/kr/syeyoung/dungeonsguide/roomprocessor/bossfight/BossfightProcessorSadan.java b/src/main/java/kr/syeyoung/dungeonsguide/roomprocessor/bossfight/BossfightProcessorSadan.java new file mode 100644 index 00000000..f38d6c02 --- /dev/null +++ b/src/main/java/kr/syeyoung/dungeonsguide/roomprocessor/bossfight/BossfightProcessorSadan.java @@ -0,0 +1,121 @@ +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 BossfightProcessorSadan extends GeneralBossfightProcessor { + public BossfightProcessorSadan() { + addPhase(PhaseData.builder() + .phase("start") + .signatureMsg("So you made it all the way §r§fhere...and§r§f you wish to defy me? Sadan?!§r") + .nextPhase("fight-1").build() + ); + addPhase(PhaseData.builder() + .phase("fight-1") + .signatureMsg("§r§c[BOSS] Sadan§r§f: I am the bridge between this realm and the world below! You shall not pass!§r") + .nextPhase("first-defeat").build() + ); + addPhase(PhaseData.builder() + .phase("first-defeat") + .signatureMsg("§r§c[BOSS] Sadan§r§f: ENOUGH!§r") + .nextPhase("fight-2").build() + ); + addPhase(PhaseData.builder() + .phase("fight-2") + .signatureMsg("§r§c[BOSS] Sadan§r§f: My giants! Unleashed!§r") + .nextPhase("second-defeat").build() + ); + addPhase(PhaseData.builder() + .phase("second-defeat") + .signatureMsg("§r§c[BOSS] Sadan§r§f: You did it. I understand now, you have earned my respect.§r") + .nextPhase("fight-3").build() + ); + addPhase(PhaseData.builder() + .phase("fight-3") + .signatureMsg("§r§c[BOSS] Sadan§r§f: I'm sorry but I need to concentrate. I wish it didn't have to come to this.§r") + .nextPhase("final-defeat").build() + ); + addPhase(PhaseData.builder() + .phase("final-defeat") + .signatureMsg("§r§c[BOSS] Sadan§r§f: NOOOOOOOOO!!! THIS IS IMPOSSIBLE!!§r").build() + ); + } + + @Override + public List<HealthData> getHealths() { + List<HealthData> healths = new ArrayList<HealthData>(); + { + long health = 0; + if (sadanStand != null) { + String name = TextUtils.stripColor(sadanStand.getName()); + String healthPart = name.split(" ")[2]; + health = TextUtils.reverseFormat(healthPart.substring(0, healthPart.length() - 1)); + } + healths.add(new HealthData("Sadan", (int) health, 40000000, this.getCurrentPhase().equals("fight-3"))); + } + if (getCurrentPhase().equals("fight-2")) { + { + long health = 0; + if (diamondGiant != null) { + String name = TextUtils.stripColor(diamondGiant.getName()); + String healthPart = name.split(" ")[3]; + health = TextUtils.reverseFormat(healthPart.substring(0, healthPart.length() - 1)); + } + healths.add(new HealthData("The Diamond Giant", (int) health, 25000000, this.getCurrentPhase().startsWith("fight-"))); + } + { + long health = 0; + if (bigfootGiant != null) { + String name = TextUtils.stripColor(bigfootGiant.getName()); + String healthPart = name.split(" ")[1]; + health = TextUtils.reverseFormat(healthPart.substring(0, healthPart.length() - 1)); + } + healths.add(new HealthData("Bigfoot", (int) health, 25000000, this.getCurrentPhase().startsWith("fight-"))); + } + { + long health = 0; + if (laserGiant != null) { + String name = TextUtils.stripColor(laserGiant.getName()); + String healthPart = name.split(" ")[1]; + health = TextUtils.reverseFormat(healthPart.substring(0, healthPart.length() - 1)); + } + healths.add(new HealthData("L.A.S.R.", (int) health, 25000000, this.getCurrentPhase().startsWith("fight-"))); + } + { + long health = 0; + if (boulderGiant != null) { + String name = TextUtils.stripColor(boulderGiant.getName()); + String healthPart = name.split(" ")[3]; + health = TextUtils.reverseFormat(healthPart.substring(0, healthPart.length() - 1)); + } + healths.add(new HealthData("Jolly Pink Giant", (int) health, 25000000, this.getCurrentPhase().startsWith("fight-"))); + } + } + return healths; + } + + private EntityArmorStand sadanStand; + private EntityArmorStand diamondGiant; + private EntityArmorStand laserGiant; + private EntityArmorStand bigfootGiant; + private EntityArmorStand boulderGiant; + @Override + public void onEntitySpawn(LivingEvent.LivingUpdateEvent updateEvent) { + if (updateEvent.entityLiving instanceof EntityArmorStand) { + if (updateEvent.entityLiving.getName().startsWith("§e﴾ §c§lSadan§r ")) + sadanStand = (EntityArmorStand) updateEvent.entityLiving; + else if (updateEvent.entityLiving.getName().startsWith("§c§d§lJolly Pink Giant ")) + boulderGiant = (EntityArmorStand) updateEvent.entityLiving; + else if (updateEvent.entityLiving.getName().startsWith("§c§4§lL.A.S.R. ")) + laserGiant = (EntityArmorStand) updateEvent.entityLiving; + else if (updateEvent.entityLiving.getName().startsWith("§c§3§lThe Diamond Giant ")) + diamondGiant = (EntityArmorStand) updateEvent.entityLiving; + else if (updateEvent.entityLiving.getName().startsWith("§c§c§lBigfoot ")) + bigfootGiant = (EntityArmorStand) updateEvent.entityLiving; + } + } +}
\ No newline at end of file |
