SteamWar/FightSystem
Archiviert
13
1

less dmg pls
Alle Prüfungen waren erfolgreich
SteamWarCI Build successful

Dieser Commit ist enthalten in:
Zeanon 2022-01-14 17:20:32 +01:00
Ursprung 47665f9613
Commit 029f51945e

Datei anzeigen

@ -1,6 +1,7 @@
package de.steamwar.fightsystem.event; package de.steamwar.fightsystem.event;
import de.steamwar.fightsystem.Config; import de.steamwar.fightsystem.Config;
import de.steamwar.fightsystem.FightSystem;
import de.steamwar.fightsystem.countdown.Countdown; import de.steamwar.fightsystem.countdown.Countdown;
import de.steamwar.fightsystem.states.FightState; import de.steamwar.fightsystem.states.FightState;
import de.steamwar.fightsystem.states.StateDependent; import de.steamwar.fightsystem.states.StateDependent;
@ -46,8 +47,8 @@ public class Meteor implements Listener {
@EventHandler @EventHandler
public void explode(ProjectileHitEvent event) { public void explode(ProjectileHitEvent event) {
if (event.getEntity() instanceof Fireball) { if (event.getEntity() instanceof Fireball) {
System.out.println("explode");
event.getEntity().getWorld().createExplosion(event.getEntity().getLocation(), current.explosionSize); event.getEntity().getWorld().createExplosion(event.getEntity().getLocation(), current.explosionSize);
Bukkit.getScheduler().runTaskTimer(FightSystem.getPlugin(), () -> event.getEntity().getWorld().createExplosion(event.getEntity().getLocation(), current.explosionSize), 0L, 1L);
} }
} }
@ -63,13 +64,13 @@ public class Meteor implements Listener {
fireballRed.setDirection(new Vector(0, -1, 0)); fireballRed.setDirection(new Vector(0, -1, 0));
fireballRed.setBounce(false); fireballRed.setBounce(false);
fireballRed.setIsIncendiary(false); fireballRed.setIsIncendiary(false);
fireballRed.setYield(current.explosionSize); fireballRed.setYield(0);
Fireball fireballBlue = world.spawn(blueStart.toLocation(world), Fireball.class); Fireball fireballBlue = world.spawn(blueStart.toLocation(world), Fireball.class);
fireballBlue.setDirection(new Vector(0, -1, 0)); fireballBlue.setDirection(new Vector(0, -1, 0));
fireballBlue.setBounce(false); fireballBlue.setBounce(false);
fireballBlue.setIsIncendiary(false); fireballBlue.setIsIncendiary(false);
fireballBlue.setYield(current.explosionSize); fireballBlue.setYield(0);
} }
private int getStart(int regionSize) { private int getStart(int regionSize) {
@ -131,11 +132,11 @@ public class Meteor implements Listener {
private enum State { private enum State {
PRE(60, 80, 1, 0), PRE(60, 80, 1, 0),
FIRST(40, 60, 3, 4), FIRST(40, 60, 3, 1),
SECOND(30, 40, 4, 8), SECOND(30, 40, 4, 2),
THIRD(20, 30, 4, 12), THIRD(20, 30, 4, 3),
FOURTH(10, 20, 5, 16), FOURTH(10, 20, 5, 4),
LAST(5, 10, 0, 20); LAST(5, 10, 0, 5);
State(int minTime, int maxTime, int switchAfter, int explosionSize) { State(int minTime, int maxTime, int switchAfter, int explosionSize) {