mirror of
https://github.com/mcMMO-Dev/mcMMO.git
synced 2024-11-25 22:56:45 +01:00
Remove explosion from rupture, and rupture bug fixes and other tweaks
This commit is contained in:
parent
d67c561fed
commit
f983f95961
@ -1,11 +1,18 @@
|
|||||||
Version 2.1.196
|
Version 2.1.196
|
||||||
|
Removed the explosion from Rupture
|
||||||
|
Adjusted Rupture to play its particle effect less often
|
||||||
Fixed a bug where Rupture never applied to additional targets during Serrated Strikes
|
Fixed a bug where Rupture never applied to additional targets during Serrated Strikes
|
||||||
|
Fixed a bug where players without Rupture permission could use Rupture during Serrated Strikes
|
||||||
Fixed a possible null error for our SelfListener
|
Fixed a possible null error for our SelfListener
|
||||||
|
Added locale string 'Swords.Combat.Rupture.Note.Update.One'
|
||||||
|
Updated locale string 'Guides.Swords.Section.1'
|
||||||
Crossbows can now be fished up with enchantments
|
Crossbows can now be fished up with enchantments
|
||||||
(API) Added McMMOEntityDamageByRuptureEvent (thanks qixils)
|
(API) Added McMMOEntityDamageByRuptureEvent (thanks qixils)
|
||||||
|
|
||||||
NOTES:
|
NOTES:
|
||||||
|
Rupture will be in a state of change for a while as I receive feedback (give me feedback in Discord!)
|
||||||
Crossbows is not in the default fishing loot list, you'd have to add it yourself.
|
Crossbows is not in the default fishing loot list, you'd have to add it yourself.
|
||||||
|
For Devs: McMMOEntityDamageByRuptureEvent extends EntityDamageByEntityEvent and uses CUSTOM type damage
|
||||||
|
|
||||||
Version 2.1.195
|
Version 2.1.195
|
||||||
Fixed a null connection error which affected some SQL users
|
Fixed a null connection error which affected some SQL users
|
||||||
|
@ -91,9 +91,9 @@ public class SwordsCommand extends SkillCommand {
|
|||||||
ruptureLengthSecondsAgainstMobs));
|
ruptureLengthSecondsAgainstMobs));
|
||||||
|
|
||||||
messages.add(LocaleLoader.getString("Swords.SubSkill.Rupture.Stat.TickDamage", rupturePureTickDamageAgainstPlayers, rupturePureTickDamageAgainstMobs));
|
messages.add(LocaleLoader.getString("Swords.SubSkill.Rupture.Stat.TickDamage", rupturePureTickDamageAgainstPlayers, rupturePureTickDamageAgainstMobs));
|
||||||
messages.add(LocaleLoader.getString("Swords.SubSkill.Rupture.Stat.ExplosionDamage", ruptureExplosionDamageAgainstPlayers, ruptureExplosionDamageAgainstMobs));
|
// messages.add(LocaleLoader.getString("Swords.SubSkill.Rupture.Stat.ExplosionDamage", ruptureExplosionDamageAgainstPlayers, ruptureExplosionDamageAgainstMobs));
|
||||||
|
|
||||||
messages.add(LocaleLoader.getString("Swords.Combat.Rupture.Note"));
|
messages.add(LocaleLoader.getString("Swords.Combat.Rupture.Note.Update.One"));
|
||||||
}
|
}
|
||||||
|
|
||||||
if (canSerratedStrike) {
|
if (canSerratedStrike) {
|
||||||
|
@ -1141,9 +1141,9 @@ public class McMMOPlayer implements Identified {
|
|||||||
RuptureTaskMeta ruptureTaskMeta = (RuptureTaskMeta) getPlayer().getMetadata(mcMMO.RUPTURE_META_KEY).get(0);
|
RuptureTaskMeta ruptureTaskMeta = (RuptureTaskMeta) getPlayer().getMetadata(mcMMO.RUPTURE_META_KEY).get(0);
|
||||||
|
|
||||||
//Punish a logout
|
//Punish a logout
|
||||||
ruptureTaskMeta.getRuptureTimerTask().explode();
|
ruptureTaskMeta.getRuptureTimerTask().endRupture();
|
||||||
ruptureTaskMeta.getRuptureTimerTask().explode();
|
ruptureTaskMeta.getRuptureTimerTask().endRupture();
|
||||||
ruptureTaskMeta.getRuptureTimerTask().explode();
|
ruptureTaskMeta.getRuptureTimerTask().endRupture();
|
||||||
}
|
}
|
||||||
|
|
||||||
cleanup();
|
cleanup();
|
||||||
|
@ -832,23 +832,24 @@ public class PlayerListener implements Listener {
|
|||||||
ChimaeraWing.activationCheck(player);
|
ChimaeraWing.activationCheck(player);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* GREEN THUMB CHECK */
|
|
||||||
HerbalismManager herbalismManager = mcMMOPlayer.getHerbalismManager();
|
HerbalismManager herbalismManager = mcMMOPlayer.getHerbalismManager();
|
||||||
|
|
||||||
if (heldItem.getType() == Material.BONE_MEAL) {
|
|
||||||
switch (blockState.getType()) {
|
|
||||||
case BEETROOTS:
|
|
||||||
case CARROT:
|
|
||||||
case COCOA:
|
|
||||||
case WHEAT:
|
|
||||||
case NETHER_WART_BLOCK:
|
|
||||||
case POTATO:
|
|
||||||
mcMMO.getPlaceStore().setFalse(blockState);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
FakePlayerAnimationEvent fakeSwing = new FakePlayerAnimationEvent(event.getPlayer()); //PlayerAnimationEvent compat
|
FakePlayerAnimationEvent fakeSwing = new FakePlayerAnimationEvent(event.getPlayer()); //PlayerAnimationEvent compat
|
||||||
if(!event.isCancelled() || event.useInteractedBlock() != Event.Result.DENY) {
|
if(!event.isCancelled() || event.useInteractedBlock() != Event.Result.DENY) {
|
||||||
|
//TODO: Is this code to set false from bone meal even needed? I'll have to double check later.
|
||||||
|
if (heldItem.getType() == Material.BONE_MEAL) {
|
||||||
|
switch (blockState.getType()) {
|
||||||
|
case BEETROOTS:
|
||||||
|
case CARROT:
|
||||||
|
case COCOA:
|
||||||
|
case WHEAT:
|
||||||
|
case NETHER_WART_BLOCK:
|
||||||
|
case POTATO:
|
||||||
|
mcMMO.getPlaceStore().setFalse(blockState);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if (herbalismManager.canGreenThumbBlock(blockState)) {
|
if (herbalismManager.canGreenThumbBlock(blockState)) {
|
||||||
//call event for Green Thumb Block
|
//call event for Green Thumb Block
|
||||||
if(!EventUtils.callSubSkillBlockEvent(player, SubSkillType.HERBALISM_GREEN_THUMB, block).isCancelled()) {
|
if(!EventUtils.callSubSkillBlockEvent(player, SubSkillType.HERBALISM_GREEN_THUMB, block).isCancelled()) {
|
||||||
|
@ -7,13 +7,13 @@ import com.gmail.nossr50.util.skills.ParticleEffectUtils;
|
|||||||
import com.google.common.base.Objects;
|
import com.google.common.base.Objects;
|
||||||
import org.bukkit.entity.LivingEntity;
|
import org.bukkit.entity.LivingEntity;
|
||||||
import org.bukkit.entity.Player;
|
import org.bukkit.entity.Player;
|
||||||
import org.bukkit.metadata.FixedMetadataValue;
|
|
||||||
import org.bukkit.scheduler.BukkitRunnable;
|
import org.bukkit.scheduler.BukkitRunnable;
|
||||||
import org.jetbrains.annotations.NotNull;
|
import org.jetbrains.annotations.NotNull;
|
||||||
|
|
||||||
public class RuptureTask extends BukkitRunnable {
|
public class RuptureTask extends BukkitRunnable {
|
||||||
|
|
||||||
public static final int DAMAGE_TICK_INTERVAL = 10;
|
public static final int DAMAGE_TICK_INTERVAL = 10;
|
||||||
|
public static final int ANIMATION_TICK_INTERVAL = 2;
|
||||||
|
|
||||||
private final @NotNull McMMOPlayer ruptureSource;
|
private final @NotNull McMMOPlayer ruptureSource;
|
||||||
private final @NotNull LivingEntity targetEntity;
|
private final @NotNull LivingEntity targetEntity;
|
||||||
@ -21,8 +21,9 @@ public class RuptureTask extends BukkitRunnable {
|
|||||||
|
|
||||||
private int ruptureTick;
|
private int ruptureTick;
|
||||||
private int damageTickTracker;
|
private int damageTickTracker;
|
||||||
private final double pureTickDamage; //TODO: Make configurable
|
private int animationTick;
|
||||||
private final double explosionDamage; //TODO: Make configurable
|
private final double pureTickDamage;
|
||||||
|
private final double explosionDamage;
|
||||||
|
|
||||||
public RuptureTask(@NotNull McMMOPlayer ruptureSource, @NotNull LivingEntity targetEntity, double pureTickDamage, double explosionDamage) {
|
public RuptureTask(@NotNull McMMOPlayer ruptureSource, @NotNull LivingEntity targetEntity, double pureTickDamage, double explosionDamage) {
|
||||||
this.ruptureSource = ruptureSource;
|
this.ruptureSource = ruptureSource;
|
||||||
@ -31,6 +32,7 @@ public class RuptureTask extends BukkitRunnable {
|
|||||||
|
|
||||||
this.ruptureTick = 0;
|
this.ruptureTick = 0;
|
||||||
this.damageTickTracker = 0;
|
this.damageTickTracker = 0;
|
||||||
|
this.animationTick = ANIMATION_TICK_INTERVAL; //Play an animation right away
|
||||||
this.pureTickDamage = pureTickDamage;
|
this.pureTickDamage = pureTickDamage;
|
||||||
this.explosionDamage = explosionDamage;
|
this.explosionDamage = explosionDamage;
|
||||||
}
|
}
|
||||||
@ -61,14 +63,20 @@ public class RuptureTask extends BukkitRunnable {
|
|||||||
if (event.isCancelled() || damage <= 0 || healthBeforeRuptureIsApplied - damage <= 0)
|
if (event.isCancelled() || damage <= 0 || healthBeforeRuptureIsApplied - damage <= 0)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
ParticleEffectUtils.playBleedEffect(targetEntity); //Animate
|
if(animationTick >= ANIMATION_TICK_INTERVAL) {
|
||||||
|
ParticleEffectUtils.playBleedEffect(targetEntity); //Animate
|
||||||
|
animationTick = 0;
|
||||||
|
} else {
|
||||||
|
animationTick++;
|
||||||
|
}
|
||||||
|
|
||||||
double damagedHealth = healthBeforeRuptureIsApplied - damage;
|
double damagedHealth = healthBeforeRuptureIsApplied - damage;
|
||||||
|
|
||||||
targetEntity.setHealth(damagedHealth); //Hurt entity without the unwanted side effects of damage()}
|
targetEntity.setHealth(damagedHealth); //Hurt entity without the unwanted side effects of damage()}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
explode();
|
endRupture();
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
targetEntity.removeMetadata(mcMMO.RUPTURE_META_KEY, mcMMO.p);
|
targetEntity.removeMetadata(mcMMO.RUPTURE_META_KEY, mcMMO.p);
|
||||||
@ -81,18 +89,18 @@ public class RuptureTask extends BukkitRunnable {
|
|||||||
ruptureTick = 0;
|
ruptureTick = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void explode() {
|
public void endRupture() {
|
||||||
targetEntity.setMetadata(mcMMO.EXPLOSION_FROM_RUPTURE, new FixedMetadataValue(mcMMO.p, "null"));
|
// targetEntity.setMetadata(mcMMO.EXPLOSION_FROM_RUPTURE, new FixedMetadataValue(mcMMO.p, "null"));
|
||||||
|
//
|
||||||
ParticleEffectUtils.playGreaterImpactEffect(targetEntity); //Animate
|
// ParticleEffectUtils.playGreaterImpactEffect(targetEntity); //Animate
|
||||||
|
//
|
||||||
if(ruptureSource.getPlayer() != null && ruptureSource.getPlayer().isValid()) {
|
// if(ruptureSource.getPlayer() != null && ruptureSource.getPlayer().isValid()) {
|
||||||
targetEntity.damage(getExplosionDamage(), ruptureSource.getPlayer());
|
// targetEntity.damage(getExplosionDamage(), ruptureSource.getPlayer());
|
||||||
} else {
|
// } else {
|
||||||
targetEntity.damage(getExplosionDamage(), null);
|
// targetEntity.damage(getExplosionDamage(), null);
|
||||||
}
|
// }
|
||||||
|
//
|
||||||
targetEntity.removeMetadata(mcMMO.RUPTURE_META_KEY, mcMMO.p);
|
// targetEntity.removeMetadata(mcMMO.RUPTURE_META_KEY, mcMMO.p);
|
||||||
|
|
||||||
this.cancel(); //Task no longer needed
|
this.cancel(); //Task no longer needed
|
||||||
}
|
}
|
||||||
|
@ -63,6 +63,9 @@ public class SwordsManager extends SkillManager {
|
|||||||
* @param target The defending entity
|
* @param target The defending entity
|
||||||
*/
|
*/
|
||||||
public void processRupture(@NotNull LivingEntity target) {
|
public void processRupture(@NotNull LivingEntity target) {
|
||||||
|
if(!canUseRupture())
|
||||||
|
return;
|
||||||
|
|
||||||
if(target.hasMetadata(mcMMO.RUPTURE_META_KEY)) {
|
if(target.hasMetadata(mcMMO.RUPTURE_META_KEY)) {
|
||||||
RuptureTaskMeta ruptureTaskMeta = (RuptureTaskMeta) target.getMetadata(mcMMO.RUPTURE_META_KEY).get(0);
|
RuptureTaskMeta ruptureTaskMeta = (RuptureTaskMeta) target.getMetadata(mcMMO.RUPTURE_META_KEY).get(0);
|
||||||
|
|
||||||
@ -134,10 +137,6 @@ public class SwordsManager extends SkillManager {
|
|||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
public int getRuptureBleedTicks(boolean isTargetPlayer) {
|
|
||||||
return mcMMO.p.getAdvancedConfig().getRuptureDurationSeconds(isTargetPlayer) / RuptureTask.DAMAGE_TICK_INTERVAL;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Handle the effects of the Counter Attack ability
|
* Handle the effects of the Counter Attack ability
|
||||||
*
|
*
|
||||||
|
@ -93,9 +93,7 @@ public final class CombatUtils {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if(target.getHealth() - event.getFinalDamage() > 0) {
|
if(target.getHealth() - event.getFinalDamage() > 0) {
|
||||||
if (swordsManager.canUseRupture()) {
|
swordsManager.processRupture(target);
|
||||||
swordsManager.processRupture(target);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
//Add Stab Damage
|
//Add Stab Damage
|
||||||
|
@ -406,7 +406,7 @@ Anvil.Unbreakable=This item is unbreakable!
|
|||||||
#SWORDS
|
#SWORDS
|
||||||
Swords.Ability.Lower=&7You lower your sword.
|
Swords.Ability.Lower=&7You lower your sword.
|
||||||
Swords.Ability.Ready=&3You &6ready&3 your Sword.
|
Swords.Ability.Ready=&3You &6ready&3 your Sword.
|
||||||
Swords.Combat.Rupture.Note=&7(Rupture Note): Periodic damage is non-lethal occuring twice a second and bypasses armor, explosion damage is lethal and does not bypass armor/resistances
|
Swords.Combat.Rupture.Note.Update.One=&7(Rupture Note): Periodic damage is non-lethal occurring twice a second and bypasses armor
|
||||||
Swords.Combat.Bleeding.Started=&4 You're bleeding!
|
Swords.Combat.Bleeding.Started=&4 You're bleeding!
|
||||||
Swords.Combat.Bleeding.Stopped=&7The bleeding has &astopped&7!
|
Swords.Combat.Bleeding.Stopped=&7The bleeding has &astopped&7!
|
||||||
Swords.Combat.Bleeding=&a**ENEMY BLEEDING**
|
Swords.Combat.Bleeding=&a**ENEMY BLEEDING**
|
||||||
@ -944,7 +944,7 @@ Guides.Salvage.Section.4=&3How does Arcane Salvage work?\n&eThis ability allows
|
|||||||
Guides.Smelting.Section.0=Coming soon...
|
Guides.Smelting.Section.0=Coming soon...
|
||||||
##Swords
|
##Swords
|
||||||
Guides.Swords.Section.0=&3About Swords:\n&eThis skill awards combat bonuses to anyone fighting with a\n&esword.\n\n&3XP GAIN:\n&eXP is gained based on the amount of damage dealt to mobs or \n&eother players when wielding a sword.
|
Guides.Swords.Section.0=&3About Swords:\n&eThis skill awards combat bonuses to anyone fighting with a\n&esword.\n\n&3XP GAIN:\n&eXP is gained based on the amount of damage dealt to mobs or \n&eother players when wielding a sword.
|
||||||
Guides.Swords.Section.1=&3How does Serrated Strikes work?\n&eSerrated Strikes is an active ability, you can activate it by\n&eright-clicking with a sword. This ability allows you to deal \n&ean AoE (Area of Effect) hit. This AoE will do a bonus 25%\n&edamage and will inflict a bleed effect that lasts for 5 ticks.
|
Guides.Swords.Section.1=&3How does Serrated Strikes work?\n&eSerrated Strikes is an active ability, you can activate it by\n&eright-clicking with a sword. This ability allows you to deal \n&ean AoE (Area of Effect) hit. This AoE will do a bonus 25%\n&edamage and may apply Rupture
|
||||||
Guides.Swords.Section.2=&3How does Counter Attack work?\n&eCounter Attack is an active ability. When blocking and taking\n&ehits from mobs, you will have a chance to reflect 50% of \nðe damage that was taken.
|
Guides.Swords.Section.2=&3How does Counter Attack work?\n&eCounter Attack is an active ability. When blocking and taking\n&ehits from mobs, you will have a chance to reflect 50% of \nðe damage that was taken.
|
||||||
Guides.Swords.Section.3=&3How does Rupture work?\n&eRupture causes enemies to take damage every two seconds. The \n&etarget will bleed until the effect wears off, or death, \n&ewhichever comes first.\n&eThe duration of the bleed is increased by your sword skill.
|
Guides.Swords.Section.3=&3How does Rupture work?\n&eRupture causes enemies to take damage every two seconds. The \n&etarget will bleed until the effect wears off, or death, \n&ewhichever comes first.\n&eThe duration of the bleed is increased by your sword skill.
|
||||||
##Taming
|
##Taming
|
||||||
|
Loading…
Reference in New Issue
Block a user