Magma Cube changes

This commit is contained in:
Sam 2017-05-01 12:07:47 +01:00
parent 20c05518f3
commit 69ed0c7c24
6 changed files with 64 additions and 40 deletions

View File

@ -63,6 +63,14 @@ public class KitMagmaCube extends SmashKit
ChatColor.RESET + "", ChatColor.RESET + "",
ChatColor.RESET + "Right-Click again to end Flame Dash early.", ChatColor.RESET + "Right-Click again to end Flame Dash early.",
}), }),
ItemStackFactory.Instance.CreateStack(Material.BLAZE_POWDER, (byte) 0, 1,
C.cYellow + C.Bold + "Passive" + C.cWhite + C.Bold + " - " + C.cGreen + C.Bold + "Fuel the Fire",
new String[]
{
ChatColor.RESET + "Each kill increases your size, damage",
ChatColor.RESET + "armor and decreases your knockback taken.",
ChatColor.RESET + "Resets on death.",
}),
ItemStackFactory.Instance.CreateStack(Material.NETHER_STAR, (byte) 0, 1, ItemStackFactory.Instance.CreateStack(Material.NETHER_STAR, (byte) 0, 1,
C.cYellow + C.Bold + "Smash Crystal" + C.cWhite + C.Bold + " - " + C.cGreen + C.Bold + "Meteor Shower", C.cYellow + C.Bold + "Smash Crystal" + C.cWhite + C.Bold + " - " + C.cGreen + C.Bold + "Meteor Shower",
new String[] new String[]
@ -99,9 +107,9 @@ public class KitMagmaCube extends SmashKit
player.getInventory().addItem(PLAYER_ITEMS[0], PLAYER_ITEMS[1]); player.getInventory().addItem(PLAYER_ITEMS[0], PLAYER_ITEMS[1]);
if (Manager.GetGame().GetState() == GameState.Recruit) if (Manager.GetGame().GetState() == GameState.Recruit)
player.getInventory().addItem(PLAYER_ITEMS[2]); player.getInventory().addItem(PLAYER_ITEMS[2], PLAYER_ITEMS[3]);
player.getInventory().setArmorContents(PLAYER_ARMOR);; player.getInventory().setArmorContents(PLAYER_ARMOR);
} }
@EventHandler @EventHandler

View File

@ -24,21 +24,6 @@ public class PerkSmashStats extends Perk
super("Smash Stats"); super("Smash Stats");
} }
public PerkSmashStats(double damage, double knockbackTaken, double regen, double armor)
{
super("Smash Stats", new String[]{});
_damage = damage;
_knockbackTaken = knockbackTaken;
_regen = regen;
_armor = armor;
setDesc(
(C.cAqua + "Damage: " + C.cWhite + _damage) + C.cWhite + " " + (C.cAqua + "Knockback Taken: " + C.cWhite + (int) (_knockbackTaken * 100) + "%"),
(C.cAqua + "Armor: " + C.cWhite + _armor) + C.cWhite + " " + (C.cAqua + "Health Regeneration: " + C.cWhite + _regen + " per Second")
);
}
@Override @Override
public void setupValues() public void setupValues()
{ {
@ -113,4 +98,14 @@ public class PerkSmashStats extends Perk
UtilPlayer.health(player, _regen); UtilPlayer.health(player, _regen);
} }
} }
public double getArmour()
{
return _armor;
}
public void setArmor(double armor)
{
_armor = armor;
}
} }

View File

@ -43,12 +43,12 @@ import nautilus.game.arcade.kit.Perk;
public class PerkMagmaBlast extends Perk public class PerkMagmaBlast extends Perk
{ {
private int _cooldown = 6000; private int _cooldown;
private float _velocity = 0.2F; private float _velocity;
private int _fireTicks = 40; private int _fireTicks;
private int _velocityRadius = 8; private int _velocityRadius;
private int _fireRadius = 2; private int _fireRadius;
private int _damage = 8; private int _damage;
private Map<LargeFireball, Location> _proj = new HashMap<>(); private Map<LargeFireball, Location> _proj = new HashMap<>();
@ -184,14 +184,17 @@ public class PerkMagmaBlast extends Perk
for (Player cur : hitMap.keySet()) for (Player cur : hitMap.keySet())
{ {
if(team.contains(cur)) if(team.contains(cur))
{
{ {
continue; continue;
} }
}
double range = hitMap.get(cur); double range = hitMap.get(cur);
if (range > 0.8)
{
range = 1;
}
Manager.GetDamage().NewDamageEvent(cur, shooter, proj, DamageCause.PROJECTILE, range * _damage, false, true, false, shooter.getName(), GetName()); Manager.GetDamage().NewDamageEvent(cur, shooter, proj, DamageCause.PROJECTILE, range * _damage, false, true, false, shooter.getName(), GetName());
// Velocity // Velocity

View File

@ -4,6 +4,7 @@ import java.util.HashMap;
import java.util.Map; import java.util.Map;
import java.util.UUID; import java.util.UUID;
import nautilus.game.arcade.game.games.smash.perks.PerkSmashStats;
import org.bukkit.entity.Player; import org.bukkit.entity.Player;
import org.bukkit.event.EventHandler; import org.bukkit.event.EventHandler;
import org.bukkit.event.EventPriority; import org.bukkit.event.EventPriority;
@ -59,7 +60,18 @@ public class PerkMagmaBoost extends Perk
{ {
Player killed = (Player) event.GetEvent().getEntity(); Player killed = (Player) event.GetEvent().getEntity();
_kills.remove(killed.getUniqueId()); if (_kills.remove(killed.getUniqueId()) != null)
{
for (Perk perk : Kit.GetPerks())
{
if (perk instanceof PerkSmashStats)
{
PerkSmashStats perkSmashStats = (PerkSmashStats) perk;
perkSmashStats.setArmor(Double.valueOf(_spreadsheet.getDataMap().get(_spreadsheet.getKey(Kit, perkSmashStats, "Armor"))));
break;
}
}
}
if (event.GetLog().GetKiller() == null) if (event.GetLog().GetKiller() == null)
{ {
@ -95,6 +107,16 @@ public class PerkMagmaBoost extends Perk
slime.SetSize(size + 1); slime.SetSize(size + 1);
Manager.GetDisguise().updateDisguise(slime); Manager.GetDisguise().updateDisguise(slime);
for (Perk perk : Kit.GetPerks())
{
if (perk instanceof PerkSmashStats)
{
PerkSmashStats perkSmashStats = (PerkSmashStats) perk;
perkSmashStats.setArmor(perkSmashStats.getArmour() + 0.5);
break;
}
}
killer.setExp(0.99F * (size / (float) _maxStacks)); killer.setExp(0.99F * (size / (float) _maxStacks));
} }

View File

@ -16,7 +16,7 @@ public abstract class Perk implements Listener
private boolean _display; private boolean _display;
private int _upgradeLevel; private int _upgradeLevel;
private PerkSpreadsheetModule _spreadsheet; protected PerkSpreadsheetModule _spreadsheet;
public Perk(String name) public Perk(String name)
{ {

View File

@ -1,9 +1,5 @@
package nautilus.game.arcade.kit.perks.data; package nautilus.game.arcade.kit.perks.data;
import java.util.HashSet;
import org.bukkit.entity.Entity;
public class FireflyData public class FireflyData
{ {
public org.bukkit.entity.Player Player; public org.bukkit.entity.Player Player;