Remove certain Item sets from rerollable item set list.
This commit is contained in:
parent
c86785c16b
commit
dcf5629e76
Binary file not shown.
@ -1,6 +1,6 @@
|
|||||||
name: TwosideKeeper
|
name: TwosideKeeper
|
||||||
main: sig.plugin.TwosideKeeper.TwosideKeeper
|
main: sig.plugin.TwosideKeeper.TwosideKeeper
|
||||||
version: 3.11.0
|
version: 3.10.12
|
||||||
loadbefore: [aPlugin]
|
loadbefore: [aPlugin]
|
||||||
commands:
|
commands:
|
||||||
money:
|
money:
|
||||||
|
@ -691,6 +691,8 @@ public class CustomDamage {
|
|||||||
performMegaKnockback(damager,target);
|
performMegaKnockback(damager,target);
|
||||||
if ((damager!=null && damager instanceof Arrow) || (weapon!=null && weapon.getType()!=Material.BOW)) {
|
if ((damager!=null && damager instanceof Arrow) || (weapon!=null && weapon.getType()!=Material.BOW)) {
|
||||||
removePermEnchantments(p,weapon);
|
removePermEnchantments(p,weapon);
|
||||||
|
applyShrapnel(p,target);
|
||||||
|
applyDoTs(p,target);
|
||||||
}
|
}
|
||||||
//GenericFunctions.knockOffGreed(p);
|
//GenericFunctions.knockOffGreed(p);
|
||||||
castEruption(p,target,weapon);
|
castEruption(p,target,weapon);
|
||||||
@ -708,8 +710,6 @@ public class CustomDamage {
|
|||||||
damage = applyBarbarianBonuses(p,target,weapon,damage,reason);
|
damage = applyBarbarianBonuses(p,target,weapon,damage,reason);
|
||||||
increaseWindCharges(p);
|
increaseWindCharges(p);
|
||||||
applyWindSlashEffects(p,target,damage,reason);
|
applyWindSlashEffects(p,target,damage,reason);
|
||||||
applyShrapnel(p,target);
|
|
||||||
applyDoTs(p,target);
|
|
||||||
|
|
||||||
if (PlayerMode.getPlayerMode(p)==PlayerMode.SLAYER) {
|
if (PlayerMode.getPlayerMode(p)==PlayerMode.SLAYER) {
|
||||||
if (isFlagSet(pd.lasthitproperties,IS_CRIT)) {
|
if (isFlagSet(pd.lasthitproperties,IS_CRIT)) {
|
||||||
|
@ -139,6 +139,7 @@ public class TemporaryBlock {
|
|||||||
sb.append(bl.getLocation().getWorld().getName());
|
sb.append(bl.getLocation().getWorld().getName());
|
||||||
sb.append("_");
|
sb.append("_");
|
||||||
sb.append(specialKey);
|
sb.append(specialKey);
|
||||||
|
//TwosideKeeper.log("Checking key: "+sb.toString(), 0);
|
||||||
return sb.toString();
|
return sb.toString();
|
||||||
} else {
|
} else {
|
||||||
return "";
|
return "";
|
||||||
@ -194,22 +195,25 @@ public class TemporaryBlock {
|
|||||||
public static boolean isTemporaryBlock(Block b) {
|
public static boolean isTemporaryBlock(Block b) {
|
||||||
return TwosideKeeper.temporaryblocks.containsKey(TemporaryBlock.getLocationKey(b));
|
return TwosideKeeper.temporaryblocks.containsKey(TemporaryBlock.getLocationKey(b));
|
||||||
}
|
}
|
||||||
public static boolean isStandingOnSpecialBlock(Player p, String specialKey) {
|
public static boolean isStandingOnSpecialBlock(Location l, String specialKey) {
|
||||||
//return TwosideKeeper.temporaryblocks.containsKey(TemporaryBlock.getLocationKey(b));
|
//return TwosideKeeper.temporaryblocks.containsKey(TemporaryBlock.getLocationKey(b));
|
||||||
Block b = p.getLocation().getBlock();
|
Block b = l.getBlock();
|
||||||
|
//TwosideKeeper.log(b.toString(), 0);
|
||||||
if (b!=null) {
|
if (b!=null) {
|
||||||
return TwosideKeeper.temporaryblocks.containsKey(TemporaryBlock.getLocationKey(b,specialKey));
|
return TwosideKeeper.temporaryblocks.containsKey(TemporaryBlock.getLocationKey(b,specialKey));
|
||||||
} else {
|
} else {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
public static boolean isInRangeOfSpecialBlock(Player p, double range, String specialKey) {
|
public static boolean isInRangeOfSpecialBlock(Location l, double range, String specialKey) {
|
||||||
Block b = p.getLocation().getBlock();
|
Block b = l.getBlock();
|
||||||
|
//TwosideKeeper.log(b.toString(), 0);
|
||||||
while (range-->0 && b.getLocation().getBlockY()>0) {
|
while (range-->0 && b.getLocation().getBlockY()>0) {
|
||||||
if (TwosideKeeper.temporaryblocks.containsKey(TemporaryBlock.getLocationKey(b,specialKey))) {
|
if (TwosideKeeper.temporaryblocks.containsKey(TemporaryBlock.getLocationKey(b,specialKey))) {
|
||||||
return true;
|
return true;
|
||||||
} else {
|
} else {
|
||||||
b = b.getRelative(0, -1, 0);
|
b = b.getRelative(0, -1, 0);
|
||||||
|
//TwosideKeeper.log(b.toString(), 0);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
|
@ -0,0 +1,39 @@
|
|||||||
|
package sig.plugin.TwosideKeeper.HelperStructures.Effects;
|
||||||
|
|
||||||
|
import org.bukkit.Location;
|
||||||
|
import org.bukkit.Particle;
|
||||||
|
|
||||||
|
public class TemporaryBlockNode {
|
||||||
|
Location l;
|
||||||
|
double range;
|
||||||
|
int duration;
|
||||||
|
String specialKey;
|
||||||
|
Particle effect;
|
||||||
|
int particleDensity; //Number of particles per second.
|
||||||
|
|
||||||
|
public TemporaryBlockNode(Location l, double range, int duration, String key) {
|
||||||
|
this.l=l;
|
||||||
|
this.range=range;
|
||||||
|
this.specialKey=key;
|
||||||
|
this.duration=duration;
|
||||||
|
this.effect=null;
|
||||||
|
this.particleDensity=0;
|
||||||
|
}
|
||||||
|
|
||||||
|
public TemporaryBlockNode(Location l, double range, int duration, String key, Particle effect, int density) {
|
||||||
|
this.l=l;
|
||||||
|
this.range=range;
|
||||||
|
this.specialKey=key;
|
||||||
|
this.duration=duration;
|
||||||
|
this.effect=effect;
|
||||||
|
this.particleDensity=density;
|
||||||
|
}
|
||||||
|
|
||||||
|
public boolean runTick() {
|
||||||
|
if (duration--<0) {
|
||||||
|
return false;
|
||||||
|
} else {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
@ -77,14 +77,14 @@ public enum ItemSet {
|
|||||||
ItemSet.DARNYS,
|
ItemSet.DARNYS,
|
||||||
ItemSet.ALIKAHN,
|
ItemSet.ALIKAHN,
|
||||||
ItemSet.LORASAADI,
|
ItemSet.LORASAADI,
|
||||||
ItemSet.SHARD,
|
//ItemSet.SHARD,
|
||||||
ItemSet.TOXIN,
|
//ItemSet.TOXIN,
|
||||||
};
|
};
|
||||||
public static final ItemSet[] MELEE = new ItemSet[]{
|
public static final ItemSet[] MELEE = new ItemSet[]{
|
||||||
ItemSet.DAWNTRACKER,
|
ItemSet.DAWNTRACKER,
|
||||||
ItemSet.PANROS,
|
ItemSet.PANROS,
|
||||||
ItemSet.SONGSTEEL,
|
ItemSet.SONGSTEEL,
|
||||||
ItemSet.WINDRY,
|
/*ItemSet.WINDRY,
|
||||||
ItemSet.LORASYS,
|
ItemSet.LORASYS,
|
||||||
ItemSet.LUCI,
|
ItemSet.LUCI,
|
||||||
ItemSet.PROTECTOR,
|
ItemSet.PROTECTOR,
|
||||||
@ -92,7 +92,7 @@ public enum ItemSet {
|
|||||||
ItemSet.LEGION,
|
ItemSet.LEGION,
|
||||||
ItemSet.PRIDE,
|
ItemSet.PRIDE,
|
||||||
ItemSet.ASSASSIN,
|
ItemSet.ASSASSIN,
|
||||||
ItemSet.STEALTH,
|
ItemSet.STEALTH,*/
|
||||||
};
|
};
|
||||||
public static final ItemSet[] TRINKET = new ItemSet[]{
|
public static final ItemSet[] TRINKET = new ItemSet[]{
|
||||||
ItemSet.GLADOMAIN,
|
ItemSet.GLADOMAIN,
|
||||||
|
@ -92,6 +92,8 @@ public class EntityUtils {
|
|||||||
AreaEffectCloud aec = (AreaEffectCloud)l.getWorld().spawnEntity(l.getLocation(), EntityType.AREA_EFFECT_CLOUD);
|
AreaEffectCloud aec = (AreaEffectCloud)l.getWorld().spawnEntity(l.getLocation(), EntityType.AREA_EFFECT_CLOUD);
|
||||||
aec.setColor(col);
|
aec.setColor(col);
|
||||||
aec.setDuration(5);
|
aec.setDuration(5);
|
||||||
|
aec.setRadiusOnUse(0.1f);
|
||||||
|
aec.setRadiusPerTick(0f);
|
||||||
aec.setRadius(0.1f);
|
aec.setRadius(0.1f);
|
||||||
},delay);
|
},delay);
|
||||||
}
|
}
|
||||||
|
@ -87,6 +87,7 @@ import org.bukkit.event.block.BlockBreakEvent;
|
|||||||
import org.bukkit.event.block.BlockDispenseEvent;
|
import org.bukkit.event.block.BlockDispenseEvent;
|
||||||
import org.bukkit.event.block.BlockPlaceEvent;
|
import org.bukkit.event.block.BlockPlaceEvent;
|
||||||
import org.bukkit.event.block.SignChangeEvent;
|
import org.bukkit.event.block.SignChangeEvent;
|
||||||
|
import org.bukkit.event.entity.AreaEffectCloudApplyEvent;
|
||||||
import org.bukkit.event.entity.CreatureSpawnEvent;
|
import org.bukkit.event.entity.CreatureSpawnEvent;
|
||||||
import org.bukkit.event.entity.CreatureSpawnEvent.SpawnReason;
|
import org.bukkit.event.entity.CreatureSpawnEvent.SpawnReason;
|
||||||
import org.bukkit.event.entity.EntityChangeBlockEvent;
|
import org.bukkit.event.entity.EntityChangeBlockEvent;
|
||||||
@ -1108,7 +1109,7 @@ public class TwosideKeeper extends JavaPlugin implements Listener {
|
|||||||
/*MonsterTemplate newtemp = new MonsterTemplate(new File(filesave+"/monsterdata/KingSlime.md"));
|
/*MonsterTemplate newtemp = new MonsterTemplate(new File(filesave+"/monsterdata/KingSlime.md"));
|
||||||
int newint = (int)newtemp.getValue("timeToLive");
|
int newint = (int)newtemp.getValue("timeToLive");
|
||||||
log(Integer.toString(newint),0);*/
|
log(Integer.toString(newint),0);*/
|
||||||
log(" This is here to change the file size if necessary Kappa Kappa Kappa No Copy-pasterino Kappachino Lulu c: Please update version number. lololol",5);
|
log(" This is here to change the file size if necessary Kappa Kappa Kappa No Copy-pasterino Kappachino Lulu c: Please update version number. lololol cy@ storm is boosted",5);
|
||||||
}
|
}
|
||||||
|
|
||||||
private static void InitializeBotCommands() {
|
private static void InitializeBotCommands() {
|
||||||
@ -1864,9 +1865,9 @@ public class TwosideKeeper extends JavaPlugin implements Listener {
|
|||||||
}break;
|
}break;
|
||||||
case "TEMPBLOCK_TEST":{
|
case "TEMPBLOCK_TEST":{
|
||||||
TwosideKeeper.log("Is temporary block? "+TemporaryBlock.isTemporaryBlock(p.getLocation().getBlock()), 0);
|
TwosideKeeper.log("Is temporary block? "+TemporaryBlock.isTemporaryBlock(p.getLocation().getBlock()), 0);
|
||||||
TwosideKeeper.log("Is on special block? "+TemporaryBlock.isStandingOnSpecialBlock(p, "TEST"),0);
|
TwosideKeeper.log("Is on special block? "+TemporaryBlock.isStandingOnSpecialBlock(p.getLocation(), "TEST"),0);
|
||||||
TwosideKeeper.log("Range of special block? "+TemporaryBlock.isInRangeOfSpecialBlock(p,5,"TEST"), 0);
|
TwosideKeeper.log("Range of special block? "+TemporaryBlock.isInRangeOfSpecialBlock(p.getLocation(),5,"TEST"), 0);
|
||||||
TwosideKeeper.log("Range of fake special block? "+TemporaryBlock.isInRangeOfSpecialBlock(p,5,"TEST2"), 0);
|
TwosideKeeper.log("Range of fake special block? "+TemporaryBlock.isInRangeOfSpecialBlock(p.getLocation(),5,"TEST2"), 0);
|
||||||
//new TemporaryBlock(p.getLocation().getBlock(),Material.STAINED_GLASS,(byte)6,200,"TEST");
|
//new TemporaryBlock(p.getLocation().getBlock(),Material.STAINED_GLASS,(byte)6,200,"TEST");
|
||||||
//TwosideKeeper.log(TextUtils.outputHashmap(TwosideKeeper.temporaryblocks), 0);
|
//TwosideKeeper.log(TextUtils.outputHashmap(TwosideKeeper.temporaryblocks), 0);
|
||||||
}break;
|
}break;
|
||||||
@ -3121,6 +3122,11 @@ public class TwosideKeeper extends JavaPlugin implements Listener {
|
|||||||
SoundUtils.playLocalSound(p, Sound.BLOCK_NOTE_BASEDRUM, 0.6f, 0.85f);
|
SoundUtils.playLocalSound(p, Sound.BLOCK_NOTE_BASEDRUM, 0.6f, 0.85f);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@EventHandler(priority=EventPriority.LOW,ignoreCancelled = true)
|
||||||
|
public void onEffectCloud(AreaEffectCloudApplyEvent ev) {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@EventHandler(priority=EventPriority.LOW,ignoreCancelled = true)
|
@EventHandler(priority=EventPriority.LOW,ignoreCancelled = true)
|
||||||
@ -3134,9 +3140,21 @@ public class TwosideKeeper extends JavaPlugin implements Listener {
|
|||||||
GenericFunctions.DealExplosionDamageToEntities(ev.getEntity().getLocation(), 40f+shooter.getHealth()*0.1, 2, shooter, "Shrapnel Explosion");
|
GenericFunctions.DealExplosionDamageToEntities(ev.getEntity().getLocation(), 40f+shooter.getHealth()*0.1, 2, shooter, "Shrapnel Explosion");
|
||||||
aPlugin.API.sendSoundlessExplosion(ev.getEntity().getLocation(), 1);
|
aPlugin.API.sendSoundlessExplosion(ev.getEntity().getLocation(), 1);
|
||||||
SoundUtils.playGlobalSound(ev.getEntity().getLocation(), Sound.ENTITY_GENERIC_EXPLODE, 0.6f, 0.5f);
|
SoundUtils.playGlobalSound(ev.getEntity().getLocation(), Sound.ENTITY_GENERIC_EXPLODE, 0.6f, 0.5f);
|
||||||
} else
|
}
|
||||||
if (ItemSet.hasFullSet(p, ItemSet.TOXIN)) {
|
else
|
||||||
TemporaryBlock.createTemporaryBlockCircle(a.getLocation().add(0,-1,0), 2, Material.REDSTONE_BLOCK, (byte)0, 100, "FIRECESSPOOL");
|
if (!a.hasMetadata("FIREPOOL") && ItemSet.hasFullSet(p, ItemSet.TOXIN)) {
|
||||||
|
//TemporaryBlock.createTemporaryBlockCircle(a.getLocation().add(0,-2,0), 2, Material.REDSTONE_BLOCK, (byte)0, 100, "FIRECESSPOOL");
|
||||||
|
//a.setMetadata("FIREPOOL", new FixedMetadataValue(this,true));
|
||||||
|
AreaEffectCloud aec = (AreaEffectCloud)a.getWorld().spawnEntity(a.getLocation().getBlock().getLocation(), EntityType.AREA_EFFECT_CLOUD);
|
||||||
|
aec.setCustomName("FIREPOOL");
|
||||||
|
aec.setParticle(Particle.DRIP_LAVA);
|
||||||
|
aec.setDurationOnUse(20*5);
|
||||||
|
aec.setDuration(20*5);
|
||||||
|
aec.setRadius(2);
|
||||||
|
aec.setGlowing(true);
|
||||||
|
aec.setReapplicationDelay(20);
|
||||||
|
aec.setWaitTime(0);
|
||||||
|
aec.addCustomEffect(new PotionEffect(PotionEffectType.HARM,0,0), true);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
a.setCustomName("HIT");
|
a.setCustomName("HIT");
|
||||||
|
@ -51,6 +51,7 @@ import sig.plugin.TwosideKeeper.HelperStructures.ServerType;
|
|||||||
import sig.plugin.TwosideKeeper.HelperStructures.WorldShop;
|
import sig.plugin.TwosideKeeper.HelperStructures.WorldShop;
|
||||||
import sig.plugin.TwosideKeeper.HelperStructures.Common.GenericFunctions;
|
import sig.plugin.TwosideKeeper.HelperStructures.Common.GenericFunctions;
|
||||||
import sig.plugin.TwosideKeeper.HelperStructures.Effects.LavaPlume;
|
import sig.plugin.TwosideKeeper.HelperStructures.Effects.LavaPlume;
|
||||||
|
import sig.plugin.TwosideKeeper.HelperStructures.Effects.TemporaryBlock;
|
||||||
import sig.plugin.TwosideKeeper.HelperStructures.Utils.EntityUtils;
|
import sig.plugin.TwosideKeeper.HelperStructures.Utils.EntityUtils;
|
||||||
import sig.plugin.TwosideKeeper.HelperStructures.Utils.InventoryUtils;
|
import sig.plugin.TwosideKeeper.HelperStructures.Utils.InventoryUtils;
|
||||||
import sig.plugin.TwosideKeeper.HelperStructures.Utils.ItemCubeUtils;
|
import sig.plugin.TwosideKeeper.HelperStructures.Utils.ItemCubeUtils;
|
||||||
@ -347,34 +348,44 @@ final class runServerHeartbeat implements Runnable {
|
|||||||
PlayerStructure pd = PlayerStructure.GetPlayerStructure((Player)ent);
|
PlayerStructure pd = PlayerStructure.GetPlayerStructure((Player)ent);
|
||||||
if (Buff.hasBuff(ent, "Poison") && pd.lastPoisonTick+getPoisonTickDelay(ent)<=TwosideKeeper.getServerTickTime()) {
|
if (Buff.hasBuff(ent, "Poison") && pd.lastPoisonTick+getPoisonTickDelay(ent)<=TwosideKeeper.getServerTickTime()) {
|
||||||
Bukkit.getScheduler().runTaskLater(TwosideKeeper.plugin, ()->{
|
Bukkit.getScheduler().runTaskLater(TwosideKeeper.plugin, ()->{
|
||||||
|
if (ent!=null) {
|
||||||
CustomDamage.ApplyDamage(Buff.getBuff(ent, "Poison").getAmplifier(), null, ent, null, "POISON", CustomDamage.IGNOREDODGE|CustomDamage.TRUEDMG|CustomDamage.IGNORE_DAMAGE_TICK);
|
CustomDamage.ApplyDamage(Buff.getBuff(ent, "Poison").getAmplifier(), null, ent, null, "POISON", CustomDamage.IGNOREDODGE|CustomDamage.TRUEDMG|CustomDamage.IGNORE_DAMAGE_TICK);
|
||||||
pd.lastPoisonTick=TwosideKeeper.getServerTickTime();
|
pd.lastPoisonTick=TwosideKeeper.getServerTickTime();
|
||||||
|
}
|
||||||
}, (int)(Math.random()*10));
|
}, (int)(Math.random()*10));
|
||||||
}
|
}
|
||||||
if (Buff.hasBuff(ent, "SHRAPNEL") && pd.lastShrapnelTick<=TwosideKeeper.getServerTickTime()) {
|
if (Buff.hasBuff(ent, "SHRAPNEL") && pd.lastShrapnelTick<=TwosideKeeper.getServerTickTime()) {
|
||||||
Bukkit.getScheduler().runTaskLater(TwosideKeeper.plugin, ()->{
|
Bukkit.getScheduler().runTaskLater(TwosideKeeper.plugin, ()->{
|
||||||
|
if (ent!=null) {
|
||||||
CustomDamage.ApplyDamage((Buff.getBuff(ent, "SHRAPNEL").getAmplifier()*2)*(1d-CustomDamage.getFireResistance(ent)), null, ent, null, "Shrapnel", CustomDamage.IGNOREDODGE|CustomDamage.TRUEDMG|CustomDamage.IGNORE_DAMAGE_TICK);
|
CustomDamage.ApplyDamage((Buff.getBuff(ent, "SHRAPNEL").getAmplifier()*2)*(1d-CustomDamage.getFireResistance(ent)), null, ent, null, "Shrapnel", CustomDamage.IGNOREDODGE|CustomDamage.TRUEDMG|CustomDamage.IGNORE_DAMAGE_TICK);
|
||||||
pd.lastShrapnelTick=TwosideKeeper.getServerTickTime();
|
pd.lastShrapnelTick=TwosideKeeper.getServerTickTime();
|
||||||
SoundUtils.playLocalSound((Player)ent, Sound.ENTITY_GENERIC_EXTINGUISH_FIRE, 1.0f, 1.0f);
|
SoundUtils.playLocalSound((Player)ent, Sound.ENTITY_GENERIC_EXTINGUISH_FIRE, 1.0f, 1.0f);
|
||||||
ent.getWorld().spawnParticle(Particle.LAVA, ent.getEyeLocation(), CustomDamage.GetHeartAmount(Buff.getBuff(ent, "SHRAPNEL").getAmplifier())*5);
|
ent.getWorld().spawnParticle(Particle.LAVA, ent.getEyeLocation(), CustomDamage.GetHeartAmount(Buff.getBuff(ent, "SHRAPNEL").getAmplifier())*5);
|
||||||
|
}
|
||||||
}, (int)(Math.random()*10));
|
}, (int)(Math.random()*10));
|
||||||
}
|
}
|
||||||
if (Buff.hasBuff(ent, "BLEEDING") && pd.lastBleedingTick<=TwosideKeeper.getServerTickTime()) {
|
if (Buff.hasBuff(ent, "BLEEDING") && pd.lastBleedingTick<=TwosideKeeper.getServerTickTime()) {
|
||||||
Bukkit.getScheduler().runTaskLater(TwosideKeeper.plugin, ()->{
|
Bukkit.getScheduler().runTaskLater(TwosideKeeper.plugin, ()->{
|
||||||
|
if (ent!=null) {
|
||||||
CustomDamage.ApplyDamage((Buff.getBuff(ent, "BLEEDING").getAmplifier()), null, ent, null, "Bleeding", CustomDamage.IGNOREDODGE|CustomDamage.TRUEDMG|CustomDamage.IGNORE_DAMAGE_TICK);
|
CustomDamage.ApplyDamage((Buff.getBuff(ent, "BLEEDING").getAmplifier()), null, ent, null, "Bleeding", CustomDamage.IGNOREDODGE|CustomDamage.TRUEDMG|CustomDamage.IGNORE_DAMAGE_TICK);
|
||||||
pd.lastBleedingTick=TwosideKeeper.getServerTickTime();
|
pd.lastBleedingTick=TwosideKeeper.getServerTickTime();
|
||||||
//SoundUtils.playLocalSound((Player)ent, Sound.ENTITY_GENERIC_EXTINGUISH_FIRE, 1.0f, 1.0f);
|
//SoundUtils.playLocalSound((Player)ent, Sound.ENTITY_GENERIC_EXTINGUISH_FIRE, 1.0f, 1.0f);
|
||||||
//ent.getWorld().spawnParticle(Particle.LAVA, ent.getEyeLocation(), CustomDamage.GetHeartAmount(Buff.getBuff(ent, "SHRAPNEL").getAmplifier())*5);
|
//ent.getWorld().spawnParticle(Particle.LAVA, ent.getEyeLocation(), CustomDamage.GetHeartAmount(Buff.getBuff(ent, "SHRAPNEL").getAmplifier())*5);
|
||||||
Bukkit.getScheduler().runTaskLater(TwosideKeeper.plugin, ()->{
|
Bukkit.getScheduler().runTaskLater(TwosideKeeper.plugin, ()->{
|
||||||
|
if (ent!=null) {
|
||||||
CustomDamage.ApplyDamage((Buff.getBuff(ent, "BLEEDING").getAmplifier()), null, ent, null, "Bleeding", CustomDamage.IGNOREDODGE|CustomDamage.TRUEDMG|CustomDamage.IGNORE_DAMAGE_TICK);
|
CustomDamage.ApplyDamage((Buff.getBuff(ent, "BLEEDING").getAmplifier()), null, ent, null, "Bleeding", CustomDamage.IGNOREDODGE|CustomDamage.TRUEDMG|CustomDamage.IGNORE_DAMAGE_TICK);
|
||||||
|
}
|
||||||
}, 10); //Bleeding DOT is twice as fast.
|
}, 10); //Bleeding DOT is twice as fast.
|
||||||
|
}
|
||||||
}, (int)(Math.random()*10));
|
}, (int)(Math.random()*10));
|
||||||
}
|
}
|
||||||
if (Buff.hasBuff(ent, "INFECTION") && pd.lastInfectionTick<=TwosideKeeper.getServerTickTime()) {
|
if (Buff.hasBuff(ent, "INFECTION") && pd.lastInfectionTick<=TwosideKeeper.getServerTickTime()) {
|
||||||
Bukkit.getScheduler().runTaskLater(TwosideKeeper.plugin, ()->{
|
Bukkit.getScheduler().runTaskLater(TwosideKeeper.plugin, ()->{
|
||||||
|
if (ent!=null) {
|
||||||
CustomDamage.ApplyDamage(Buff.getBuff(ent, "INFECTION").getAmplifier(), null, ent, null, "Infection", CustomDamage.IGNOREDODGE|CustomDamage.TRUEDMG|CustomDamage.IGNORE_DAMAGE_TICK);
|
CustomDamage.ApplyDamage(Buff.getBuff(ent, "INFECTION").getAmplifier(), null, ent, null, "Infection", CustomDamage.IGNOREDODGE|CustomDamage.TRUEDMG|CustomDamage.IGNORE_DAMAGE_TICK);
|
||||||
pd.lastInfectionTick=TwosideKeeper.getServerTickTime();
|
pd.lastInfectionTick=TwosideKeeper.getServerTickTime();
|
||||||
infectNearbyPlayers(ent,pd.buffs);
|
infectNearbyPlayers(ent,pd.buffs);
|
||||||
|
}
|
||||||
}, (int)(Math.random()*10));
|
}, (int)(Math.random()*10));
|
||||||
}
|
}
|
||||||
if (Buff.hasBuff(ent, "CRIPPLE") && aPlugin.API.getPlayerSpeedMultiplier((Player)ent)>(1-(Buff.getBuff(ent,"CRIPPLE").getAmplifier()*0.1))) {
|
if (Buff.hasBuff(ent, "CRIPPLE") && aPlugin.API.getPlayerSpeedMultiplier((Player)ent)>(1-(Buff.getBuff(ent,"CRIPPLE").getAmplifier()*0.1))) {
|
||||||
@ -388,43 +399,58 @@ final class runServerHeartbeat implements Runnable {
|
|||||||
}
|
}
|
||||||
if (Buff.hasBuff(ent, "BURN") && pd.lastBurnTick<=TwosideKeeper.getServerTickTime()) {
|
if (Buff.hasBuff(ent, "BURN") && pd.lastBurnTick<=TwosideKeeper.getServerTickTime()) {
|
||||||
Bukkit.getScheduler().runTaskLater(TwosideKeeper.plugin, ()->{
|
Bukkit.getScheduler().runTaskLater(TwosideKeeper.plugin, ()->{
|
||||||
|
if (ent!=null) {
|
||||||
CustomDamage.ApplyDamage(Buff.getBuff(ent, "BURN").getAmplifier(), null, ent, null, "Burn", CustomDamage.IGNOREDODGE|CustomDamage.TRUEDMG|CustomDamage.IGNORE_DAMAGE_TICK);
|
CustomDamage.ApplyDamage(Buff.getBuff(ent, "BURN").getAmplifier(), null, ent, null, "Burn", CustomDamage.IGNOREDODGE|CustomDamage.TRUEDMG|CustomDamage.IGNORE_DAMAGE_TICK);
|
||||||
pd.lastBurnTick=TwosideKeeper.getServerTickTime();
|
pd.lastBurnTick=TwosideKeeper.getServerTickTime();
|
||||||
|
}
|
||||||
}, (int)(Math.random()*10));
|
}, (int)(Math.random()*10));
|
||||||
}
|
}
|
||||||
|
/*if (TemporaryBlock.isInRangeOfSpecialBlock(ent.getLocation(), 1, "FIRECESSPOOL_P")) {
|
||||||
|
Buff.addBuff(ent, "BURN", new Buff("Burn", 20*5, 1, org.bukkit.Color.ORANGE, ChatColor.AQUA+"❂", false),true);
|
||||||
|
}*/
|
||||||
} else {
|
} else {
|
||||||
LivingEntityStructure les = LivingEntityStructure.GetLivingEntityStructure(ent);
|
LivingEntityStructure les = LivingEntityStructure.GetLivingEntityStructure(ent);
|
||||||
if (Buff.hasBuff(ent, "Poison") && les.lastPoisonTick+getPoisonTickDelay(ent)<=TwosideKeeper.getServerTickTime()) {
|
if (Buff.hasBuff(ent, "Poison") && les.lastPoisonTick+getPoisonTickDelay(ent)<=TwosideKeeper.getServerTickTime()) {
|
||||||
Bukkit.getScheduler().runTaskLater(TwosideKeeper.plugin, ()->{
|
Bukkit.getScheduler().runTaskLater(TwosideKeeper.plugin, ()->{
|
||||||
|
if (ent!=null) {
|
||||||
CustomDamage.ApplyDamage(Buff.getBuff(ent, "Poison").getAmplifier(), null, ent, null, "POISON", CustomDamage.IGNOREDODGE|CustomDamage.TRUEDMG|CustomDamage.IGNORE_DAMAGE_TICK);
|
CustomDamage.ApplyDamage(Buff.getBuff(ent, "Poison").getAmplifier(), null, ent, null, "POISON", CustomDamage.IGNOREDODGE|CustomDamage.TRUEDMG|CustomDamage.IGNORE_DAMAGE_TICK);
|
||||||
les.lastPoisonTick=TwosideKeeper.getServerTickTime();
|
les.lastPoisonTick=TwosideKeeper.getServerTickTime();
|
||||||
|
}
|
||||||
}, (int)(Math.random()*10));
|
}, (int)(Math.random()*10));
|
||||||
}
|
}
|
||||||
if (Buff.hasBuff(ent, "SHRAPNEL") && les.lastShrapnelTick<=TwosideKeeper.getServerTickTime()) {
|
if (Buff.hasBuff(ent, "SHRAPNEL") && les.lastShrapnelTick<=TwosideKeeper.getServerTickTime()) {
|
||||||
Bukkit.getScheduler().runTaskLater(TwosideKeeper.plugin, ()->{
|
Bukkit.getScheduler().runTaskLater(TwosideKeeper.plugin, ()->{
|
||||||
|
if (ent!=null) {
|
||||||
CustomDamage.ApplyDamage((Buff.getBuff(ent, "SHRAPNEL").getAmplifier()*2)*(1d-CustomDamage.getFireResistance(ent)), null, ent, null, "Shrapnel", CustomDamage.IGNOREDODGE|CustomDamage.TRUEDMG|CustomDamage.IGNORE_DAMAGE_TICK);
|
CustomDamage.ApplyDamage((Buff.getBuff(ent, "SHRAPNEL").getAmplifier()*2)*(1d-CustomDamage.getFireResistance(ent)), null, ent, null, "Shrapnel", CustomDamage.IGNOREDODGE|CustomDamage.TRUEDMG|CustomDamage.IGNORE_DAMAGE_TICK);
|
||||||
les.lastShrapnelTick=TwosideKeeper.getServerTickTime();
|
les.lastShrapnelTick=TwosideKeeper.getServerTickTime();
|
||||||
//SoundUtils.playLocalSound((Player)ent, Sound.ENTITY_GENERIC_EXTINGUISH_FIRE, 1.0f, 1.0f);
|
//SoundUtils.playLocalSound((Player)ent, Sound.ENTITY_GENERIC_EXTINGUISH_FIRE, 1.0f, 1.0f);
|
||||||
SoundUtils.playGlobalSound(ent.getLocation(), Sound.ENTITY_GENERIC_EXTINGUISH_FIRE, 1.0f, 1.0f);
|
SoundUtils.playGlobalSound(ent.getLocation(), Sound.ENTITY_GENERIC_EXTINGUISH_FIRE, 1.0f, 1.0f);
|
||||||
ent.getWorld().spawnParticle(Particle.LAVA, ent.getEyeLocation(), CustomDamage.GetHeartAmount(Buff.getBuff(ent, "SHRAPNEL").getAmplifier())*5);
|
ent.getWorld().spawnParticle(Particle.LAVA, ent.getEyeLocation(), CustomDamage.GetHeartAmount(Buff.getBuff(ent, "SHRAPNEL").getAmplifier())*5);
|
||||||
|
}
|
||||||
}, (int)(Math.random()*10));
|
}, (int)(Math.random()*10));
|
||||||
}
|
}
|
||||||
if (Buff.hasBuff(ent, "BLEEDING") && les.lastBleedingTick<=TwosideKeeper.getServerTickTime()) {
|
if (Buff.hasBuff(ent, "BLEEDING") && les.lastBleedingTick<=TwosideKeeper.getServerTickTime()) {
|
||||||
Bukkit.getScheduler().runTaskLater(TwosideKeeper.plugin, ()->{
|
Bukkit.getScheduler().runTaskLater(TwosideKeeper.plugin, ()->{
|
||||||
|
if (ent!=null) {
|
||||||
CustomDamage.ApplyDamage((Buff.getBuff(ent, "BLEEDING").getAmplifier()), null, ent, null, "Bleeding", CustomDamage.IGNOREDODGE|CustomDamage.TRUEDMG|CustomDamage.IGNORE_DAMAGE_TICK);
|
CustomDamage.ApplyDamage((Buff.getBuff(ent, "BLEEDING").getAmplifier()), null, ent, null, "Bleeding", CustomDamage.IGNOREDODGE|CustomDamage.TRUEDMG|CustomDamage.IGNORE_DAMAGE_TICK);
|
||||||
les.lastBleedingTick=TwosideKeeper.getServerTickTime();
|
les.lastBleedingTick=TwosideKeeper.getServerTickTime();
|
||||||
//SoundUtils.playLocalSound((Player)ent, Sound.ENTITY_GENERIC_EXTINGUISH_FIRE, 1.0f, 1.0f);
|
//SoundUtils.playLocalSound((Player)ent, Sound.ENTITY_GENERIC_EXTINGUISH_FIRE, 1.0f, 1.0f);
|
||||||
//ent.getWorld().spawnParticle(Particle.LAVA, ent.getEyeLocation(), CustomDamage.GetHeartAmount(Buff.getBuff(ent, "SHRAPNEL").getAmplifier())*5);
|
//ent.getWorld().spawnParticle(Particle.LAVA, ent.getEyeLocation(), CustomDamage.GetHeartAmount(Buff.getBuff(ent, "SHRAPNEL").getAmplifier())*5);
|
||||||
Bukkit.getScheduler().runTaskLater(TwosideKeeper.plugin, ()->{
|
Bukkit.getScheduler().runTaskLater(TwosideKeeper.plugin, ()->{
|
||||||
|
if (ent!=null) {
|
||||||
CustomDamage.ApplyDamage((Buff.getBuff(ent, "BLEEDING").getAmplifier()), null, ent, null, "Bleeding", CustomDamage.IGNOREDODGE|CustomDamage.TRUEDMG|CustomDamage.IGNORE_DAMAGE_TICK);
|
CustomDamage.ApplyDamage((Buff.getBuff(ent, "BLEEDING").getAmplifier()), null, ent, null, "Bleeding", CustomDamage.IGNOREDODGE|CustomDamage.TRUEDMG|CustomDamage.IGNORE_DAMAGE_TICK);
|
||||||
|
}
|
||||||
}, 10); //Bleeding DOT is twice as fast.
|
}, 10); //Bleeding DOT is twice as fast.
|
||||||
|
}
|
||||||
}, (int)(Math.random()*10));
|
}, (int)(Math.random()*10));
|
||||||
}
|
}
|
||||||
if (Buff.hasBuff(ent, "INFECTION") && les.lastInfectionTick<=TwosideKeeper.getServerTickTime()) {
|
if (Buff.hasBuff(ent, "INFECTION") && les.lastInfectionTick<=TwosideKeeper.getServerTickTime()) {
|
||||||
Bukkit.getScheduler().runTaskLater(TwosideKeeper.plugin, ()->{
|
Bukkit.getScheduler().runTaskLater(TwosideKeeper.plugin, ()->{
|
||||||
|
if (ent!=null) {
|
||||||
CustomDamage.ApplyDamage(Buff.getBuff(ent, "INFECTION").getAmplifier(), null, ent, null, "Infection", CustomDamage.IGNOREDODGE|CustomDamage.TRUEDMG|CustomDamage.IGNORE_DAMAGE_TICK);
|
CustomDamage.ApplyDamage(Buff.getBuff(ent, "INFECTION").getAmplifier(), null, ent, null, "Infection", CustomDamage.IGNOREDODGE|CustomDamage.TRUEDMG|CustomDamage.IGNORE_DAMAGE_TICK);
|
||||||
les.lastInfectionTick=TwosideKeeper.getServerTickTime();
|
les.lastInfectionTick=TwosideKeeper.getServerTickTime();
|
||||||
infectNearbyEntities(ent,les.buffs);
|
infectNearbyEntities(ent,les.buffs);
|
||||||
|
}
|
||||||
}, (int)(Math.random()*10));
|
}, (int)(Math.random()*10));
|
||||||
}
|
}
|
||||||
if (Buff.hasBuff(ent, "CRIPPLE") && ent.getAttribute(Attribute.GENERIC_MOVEMENT_SPEED).getBaseValue()>=les.original_movespd*(1-(Buff.getBuff(ent,"CRIPPLE").getAmplifier()*0.1))) {
|
if (Buff.hasBuff(ent, "CRIPPLE") && ent.getAttribute(Attribute.GENERIC_MOVEMENT_SPEED).getBaseValue()>=les.original_movespd*(1-(Buff.getBuff(ent,"CRIPPLE").getAmplifier()*0.1))) {
|
||||||
@ -438,10 +464,17 @@ final class runServerHeartbeat implements Runnable {
|
|||||||
}
|
}
|
||||||
if (Buff.hasBuff(ent, "BURN") && les.lastBurnTick<=TwosideKeeper.getServerTickTime()) {
|
if (Buff.hasBuff(ent, "BURN") && les.lastBurnTick<=TwosideKeeper.getServerTickTime()) {
|
||||||
Bukkit.getScheduler().runTaskLater(TwosideKeeper.plugin, ()->{
|
Bukkit.getScheduler().runTaskLater(TwosideKeeper.plugin, ()->{
|
||||||
|
if (ent!=null) {
|
||||||
CustomDamage.ApplyDamage(Buff.getBuff(ent, "BURN").getAmplifier(), null, ent, null, "Burn", CustomDamage.IGNOREDODGE|CustomDamage.TRUEDMG|CustomDamage.IGNORE_DAMAGE_TICK);
|
CustomDamage.ApplyDamage(Buff.getBuff(ent, "BURN").getAmplifier(), null, ent, null, "Burn", CustomDamage.IGNOREDODGE|CustomDamage.TRUEDMG|CustomDamage.IGNORE_DAMAGE_TICK);
|
||||||
les.lastBurnTick=TwosideKeeper.getServerTickTime();
|
les.lastBurnTick=TwosideKeeper.getServerTickTime();
|
||||||
|
}
|
||||||
}, (int)(Math.random()*10));
|
}, (int)(Math.random()*10));
|
||||||
}
|
}
|
||||||
|
/*if (TemporaryBlock.isInRangeOfSpecialBlock(ent.getLocation(), 3, "FIRECESSPOOL")) {
|
||||||
|
//TwosideKeeper.log("In range.", 0);
|
||||||
|
SoundUtils.playGlobalSound(ent.getLocation(), Sound.BLOCK_FIRE_AMBIENT, 1.0f, 1.0f);
|
||||||
|
Buff.addBuff(ent, "BURN", new Buff("Burn", 20*5, 1, org.bukkit.Color.ORANGE, ChatColor.AQUA+"❂", false),true);
|
||||||
|
}*/
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user