Swift Aegis fixed. Moved to its own independent buff. Roman numerals
appear on the action bar levels once again, but only for buffs at level 10 or less.
This commit is contained in:
parent
9b5d4015a3
commit
ea1432af6c
Binary file not shown.
@ -44,6 +44,11 @@ public class ActionBarBuffUpdater{
|
||||
effectString.append(AppendAmplifier((int)(pd.damagepool-1)));
|
||||
effectString.append(" ");
|
||||
}
|
||||
if (pd.swiftaegisamt>4) {
|
||||
effectString.append(ChatColor.YELLOW+"❈");
|
||||
effectString.append(AppendAmplifier((int)(pd.swiftaegisamt-1)));
|
||||
effectString.append(" ");
|
||||
}
|
||||
}
|
||||
if (effectString.length()>0) {
|
||||
return effectString.toString()+ChatColor.RESET;
|
||||
@ -93,7 +98,11 @@ public class ActionBarBuffUpdater{
|
||||
|
||||
private static String AppendAmplifier(int amplifier) {
|
||||
StringBuilder amp = new StringBuilder(" ");
|
||||
amp.append(ChatColor.GRAY+""+(amplifier+1));
|
||||
if (amplifier+1<=10) {
|
||||
amp.append(ChatColor.GRAY+""+WorldShop.toRomanNumeral(amplifier+1));
|
||||
} else {
|
||||
amp.append(ChatColor.GRAY+""+(amplifier+1));
|
||||
}
|
||||
return amp.toString();
|
||||
}
|
||||
|
||||
|
@ -1343,6 +1343,7 @@ public class CustomDamage {
|
||||
int explosionprotectionlevel = 0;
|
||||
int resistlevel = 0;
|
||||
int partylevel = 0;
|
||||
int rangeraegislevel = 0;
|
||||
double rangerdmgdiv = 0;
|
||||
|
||||
if (target instanceof LivingEntity) {
|
||||
@ -1354,6 +1355,7 @@ public class CustomDamage {
|
||||
rangerdmgdiv += ItemSet.TotalBaseAmountBasedOnSetBonusCount((Player)target, ItemSet.JAMDAK, 2, 2)/100d;
|
||||
rangerdmgdiv += ItemSet.TotalBaseAmountBasedOnSetBonusCount((Player)target, ItemSet.DARNYS, 2, 2)/100d;
|
||||
rangerdmgdiv += ItemSet.TotalBaseAmountBasedOnSetBonusCount((Player)target, ItemSet.LORASAADI, 2, 2)/100d;*/
|
||||
rangeraegislevel += GenericFunctions.getSwiftAegisAmt((Player)target);
|
||||
}
|
||||
|
||||
for (int i=0;i<armor.length;i++) {
|
||||
@ -1485,6 +1487,7 @@ public class CustomDamage {
|
||||
partylevel=(partylevel>9)?9:partylevel;
|
||||
double finaldmg=(basedmg-(basedmg*(dmgreduction/100.0d)))
|
||||
*(1d-((resistlevel*10d)/100d))
|
||||
*(1d-((rangeraegislevel*10d)/100d))
|
||||
*(1d-((protectionlevel)/100d))
|
||||
*(1d-((projectileprotectionlevel)/100d))
|
||||
*(1d-((explosionprotectionlevel)/100d))
|
||||
|
@ -3922,7 +3922,7 @@ public class GenericFunctions {
|
||||
public static void ApplySwiftAegis(Player p) {
|
||||
PlayerStructure pd = PlayerStructure.GetPlayerStructure(p);
|
||||
int swiftaegislv=(int)ItemSet.TotalBaseAmountBasedOnSetBonusCount(GenericFunctions.getEquipment(p), p, ItemSet.DARNYS, 4, 4);
|
||||
if (swiftaegislv>0) {
|
||||
/*if (swiftaegislv>0) {
|
||||
TwosideKeeper.log("Applying "+swiftaegislv+" levels of Swift Aegis.",5);
|
||||
int resistancelv = 0;
|
||||
int resistance_duration = 0;
|
||||
@ -3943,6 +3943,17 @@ public class GenericFunctions {
|
||||
}
|
||||
TwosideKeeper.log("New Aegis level: "+pd.swiftaegisamt,5);
|
||||
GenericFunctions.sendActionBarMessage(p, ChatColor.GRAY+"Resistance "+WorldShop.toRomanNumeral(GenericFunctions.getPotionEffectLevel(PotionEffectType.DAMAGE_RESISTANCE, p)+1));
|
||||
}*/
|
||||
pd.swiftaegisamt=Math.min(10,getSwiftAegisAmt(p)+swiftaegislv);
|
||||
pd.swiftaegistime=TwosideKeeper.getServerTickTime();
|
||||
}
|
||||
|
||||
public static int getSwiftAegisAmt(Player p) {
|
||||
PlayerStructure pd = PlayerStructure.GetPlayerStructure(p);
|
||||
if (pd.swiftaegistime+(20*20)>TwosideKeeper.getServerTickTime()) {
|
||||
return pd.swiftaegisamt;
|
||||
} else {
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -349,10 +349,10 @@ public enum ItemSet {
|
||||
lore.add(ChatColor.DARK_AQUA+" 2 - "+ChatColor.WHITE+" +"+ItemSet.GetBaseAmount(set, tier, 2)+"% Damage Reduction");
|
||||
lore.add(ChatColor.DARK_AQUA+" 3 - "+ChatColor.WHITE+" +"+ItemSet.GetBaseAmount(set, tier, 3)+"% Damage Reduction");
|
||||
lore.add(ChatColor.DARK_AQUA+" 4 - "+ChatColor.WHITE+" Swift Aegis "+WorldShop.toRomanNumeral(ItemSet.GetBaseAmount(set, tier, 4)));
|
||||
lore.add(ChatColor.GRAY+" Builds "+ItemSet.GetBaseAmount(set, tier, 4)+" stack"+((ItemSet.GetBaseAmount(set, tier, 4))!=1?"s":"")+" of Resistance every");
|
||||
lore.add(ChatColor.GRAY+" 5 seconds of sprinting, and for every");
|
||||
lore.add(ChatColor.GRAY+" Tumble. Each hit removes one stack of");
|
||||
lore.add(ChatColor.GRAY+" Resistance. Caps at Resistance 10.");
|
||||
lore.add(ChatColor.GRAY+" Builds "+ItemSet.GetBaseAmount(set, tier, 4)+" stack"+((ItemSet.GetBaseAmount(set, tier, 4))!=1?"s":"")+" of Resist");
|
||||
lore.add(ChatColor.GRAY+" (20% Damage Reduction) every 5 seconds of sprinting,");
|
||||
lore.add(ChatColor.GRAY+" and with every Tumble. Each hit taken removes one");
|
||||
lore.add(ChatColor.GRAY+" stack of Resist. Caps at Resist 10. Lasts 20 seconds.");
|
||||
lore.add(ChatColor.DARK_AQUA+" 5 - "+ChatColor.WHITE+" Boosts All Modes of Ranger");
|
||||
lore.add(ChatColor.GRAY+" "+ChatColor.WHITE+"Close Range Mode:");
|
||||
lore.add(ChatColor.GRAY+" Increases Tumble Invincibility from");
|
||||
|
@ -17,6 +17,7 @@ import org.bukkit.configuration.file.YamlConfiguration;
|
||||
import org.bukkit.entity.LivingEntity;
|
||||
import org.bukkit.entity.Player;
|
||||
import org.bukkit.inventory.ItemStack;
|
||||
import org.bukkit.inventory.meta.BookMeta;
|
||||
import org.bukkit.potion.PotionEffect;
|
||||
|
||||
import sig.plugin.TwosideKeeper.HelperStructures.DeathStructure;
|
||||
@ -147,6 +148,7 @@ public class PlayerStructure {
|
||||
public long last_mock=0;
|
||||
public long rage_time=0; //Set this to the last tick that rage is supposed to last. It'll wear off after this.
|
||||
public int rage_amt=0;
|
||||
public long swiftaegistime=0;
|
||||
|
||||
//Needs the instance of the player object to get all other info. Only to be called at the beginning.
|
||||
@SuppressWarnings("deprecation")
|
||||
@ -211,10 +213,10 @@ public class PlayerStructure {
|
||||
//Give the player free tools and items.
|
||||
Bukkit.getServer().broadcastMessage(ChatColor.GOLD+"Welcome to new player "+ChatColor.WHITE+""+this.name+"!");
|
||||
p.sendMessage(ChatColor.GREEN+"Welcome to the server! Thanks for joining us.");
|
||||
p.sendMessage(ChatColor.GOLD+" Here's some tools to get you started.");
|
||||
p.sendMessage(ChatColor.GOLD+" Here's a manual to get you started!");
|
||||
|
||||
//Give starter pack.
|
||||
p.getInventory().addItem(new ItemStack(Material.STONE_SWORD,1));
|
||||
/*p.getInventory().addItem(new ItemStack(Material.STONE_SWORD,1));
|
||||
p.getInventory().addItem(new ItemStack(Material.STONE_PICKAXE,1));
|
||||
p.getInventory().addItem(new ItemStack(Material.STONE_AXE,1));
|
||||
p.getInventory().addItem(new ItemStack(Material.STONE_SPADE,1));
|
||||
@ -222,7 +224,11 @@ public class PlayerStructure {
|
||||
p.getInventory().addItem(new ItemStack(Material.LEATHER_CHESTPLATE,1));
|
||||
p.getInventory().addItem(new ItemStack(Material.LEATHER_LEGGINGS,1));
|
||||
p.getInventory().addItem(new ItemStack(Material.TORCH,8));
|
||||
p.getInventory().addItem(new ItemStack(Material.BREAD,16));
|
||||
p.getInventory().addItem(new ItemStack(Material.BREAD,16));*/
|
||||
ItemStack manual = new ItemStack(Material.WRITTEN_BOOK);
|
||||
BookMeta bm = (BookMeta)manual.getItemMeta();
|
||||
|
||||
p.getInventory().addItem(manual);
|
||||
|
||||
//Make sure it's not already there...?
|
||||
if (Bukkit.getServer().getScoreboardManager().getMainScoreboard().getTeam(this.name.toLowerCase())==null) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user