mirror of
https://github.com/mcMMO-Dev/mcMMO.git
synced 2024-11-24 14:16:45 +01:00
Add Explosive Shot definition
This commit is contained in:
parent
23b8e0a28c
commit
3e11b7da2c
@ -22,6 +22,7 @@ public enum SubSkillType {
|
|||||||
ARCHERY_DAZE,
|
ARCHERY_DAZE,
|
||||||
ARCHERY_SKILL_SHOT(20),
|
ARCHERY_SKILL_SHOT(20),
|
||||||
ARCHERY_ARCHERY_LIMIT_BREAK(10),
|
ARCHERY_ARCHERY_LIMIT_BREAK(10),
|
||||||
|
ARCHERY_EXPLOSIVE_SHOT(1),
|
||||||
|
|
||||||
/* Axes */
|
/* Axes */
|
||||||
AXES_ARMOR_IMPACT(20),
|
AXES_ARMOR_IMPACT(20),
|
||||||
|
@ -10,6 +10,12 @@ import org.bukkit.block.BlockState;
|
|||||||
import org.bukkit.entity.Player;
|
import org.bukkit.entity.Player;
|
||||||
|
|
||||||
public enum SuperAbilityType {
|
public enum SuperAbilityType {
|
||||||
|
EXPLOSIVE_SHOT("Archery.Skills.ExplosiveShot.On",
|
||||||
|
"Archery.Skills.ExplosiveShot.Off",
|
||||||
|
"Archery.Skills.ExplosiveShot.Other.On",
|
||||||
|
"Archery.Skills.ExplosiveShot.Refresh",
|
||||||
|
"Archery.Skills.ExplosiveShot.Other.Off",
|
||||||
|
"Archery.SubSkill.ExplosiveShot.Name"),
|
||||||
BERSERK(
|
BERSERK(
|
||||||
"Unarmed.Skills.Berserk.On",
|
"Unarmed.Skills.Berserk.On",
|
||||||
"Unarmed.Skills.Berserk.Off",
|
"Unarmed.Skills.Berserk.Off",
|
||||||
@ -190,6 +196,7 @@ public enum SuperAbilityType {
|
|||||||
public boolean getPermissions(Player player) {
|
public boolean getPermissions(Player player) {
|
||||||
return switch (this) {
|
return switch (this) {
|
||||||
case BERSERK -> Permissions.berserk(player);
|
case BERSERK -> Permissions.berserk(player);
|
||||||
|
case EXPLOSIVE_SHOT -> Permissions.explosiveShot(player);
|
||||||
case BLAST_MINING -> Permissions.remoteDetonation(player);
|
case BLAST_MINING -> Permissions.remoteDetonation(player);
|
||||||
case GIGA_DRILL_BREAKER -> Permissions.gigaDrillBreaker(player);
|
case GIGA_DRILL_BREAKER -> Permissions.gigaDrillBreaker(player);
|
||||||
case GREEN_TERRA -> Permissions.greenTerra(player);
|
case GREEN_TERRA -> Permissions.greenTerra(player);
|
||||||
@ -211,25 +218,15 @@ public enum SuperAbilityType {
|
|||||||
* @return true if the block is affected by this ability, false otherwise
|
* @return true if the block is affected by this ability, false otherwise
|
||||||
*/
|
*/
|
||||||
public boolean blockCheck(BlockState blockState) {
|
public boolean blockCheck(BlockState blockState) {
|
||||||
switch (this) {
|
return switch (this) {
|
||||||
case BERSERK:
|
case BERSERK ->
|
||||||
return (BlockUtils.affectedByGigaDrillBreaker(blockState) || blockState.getType() == Material.SNOW || mcMMO.getMaterialMapStore().isGlass(blockState.getType()));
|
(BlockUtils.affectedByGigaDrillBreaker(blockState) || blockState.getType() == Material.SNOW || mcMMO.getMaterialMapStore().isGlass(blockState.getType()));
|
||||||
|
case GIGA_DRILL_BREAKER -> BlockUtils.affectedByGigaDrillBreaker(blockState);
|
||||||
case GIGA_DRILL_BREAKER:
|
case GREEN_TERRA -> BlockUtils.canMakeMossy(blockState);
|
||||||
return BlockUtils.affectedByGigaDrillBreaker(blockState);
|
case SUPER_BREAKER -> BlockUtils.affectedBySuperBreaker(blockState);
|
||||||
|
case TREE_FELLER -> BlockUtils.hasWoodcuttingXP(blockState);
|
||||||
case GREEN_TERRA:
|
default -> false;
|
||||||
return BlockUtils.canMakeMossy(blockState);
|
};
|
||||||
|
|
||||||
case SUPER_BREAKER:
|
|
||||||
return BlockUtils.affectedBySuperBreaker(blockState);
|
|
||||||
|
|
||||||
case TREE_FELLER:
|
|
||||||
return BlockUtils.hasWoodcuttingXP(blockState);
|
|
||||||
|
|
||||||
default:
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -11,7 +11,8 @@ public enum ToolType {
|
|||||||
PICKAXE("Mining.Ability.Lower", "Mining.Ability.Ready"),
|
PICKAXE("Mining.Ability.Lower", "Mining.Ability.Ready"),
|
||||||
SHOVEL("Excavation.Ability.Lower", "Excavation.Ability.Ready"),
|
SHOVEL("Excavation.Ability.Lower", "Excavation.Ability.Ready"),
|
||||||
SWORD("Swords.Ability.Lower", "Swords.Ability.Ready"),
|
SWORD("Swords.Ability.Lower", "Swords.Ability.Ready"),
|
||||||
CROSSBOWS("Crossbows.Ability.Lower", "Crossbows.Ability.Ready"),
|
CROSSBOW("Crossbows.Ability.Lower", "Crossbows.Ability.Ready"),
|
||||||
|
BOW("Archery.Ability.Lower", "Archery.Ability.Ready"),
|
||||||
TRIDENTS("Tridents.Ability.Lower", "Tridents.Ability.Ready");
|
TRIDENTS("Tridents.Ability.Lower", "Tridents.Ability.Ready");
|
||||||
|
|
||||||
private final String lowerTool;
|
private final String lowerTool;
|
||||||
@ -40,7 +41,7 @@ public enum ToolType {
|
|||||||
switch (this) {
|
switch (this) {
|
||||||
case AXE:
|
case AXE:
|
||||||
return ItemUtils.isAxe(itemStack);
|
return ItemUtils.isAxe(itemStack);
|
||||||
case CROSSBOWS:
|
case CROSSBOW:
|
||||||
return ItemUtils.isCrossbow(itemStack);
|
return ItemUtils.isCrossbow(itemStack);
|
||||||
case TRIDENTS:
|
case TRIDENTS:
|
||||||
return ItemUtils.isTrident(itemStack);
|
return ItemUtils.isTrident(itemStack);
|
||||||
|
@ -180,6 +180,7 @@ public final class Permissions {
|
|||||||
public static boolean concoctions(Permissible permissible) { return permissible.hasPermission("mcmmo.ability.alchemy.concoctions"); }
|
public static boolean concoctions(Permissible permissible) { return permissible.hasPermission("mcmmo.ability.alchemy.concoctions"); }
|
||||||
|
|
||||||
/* ARCHERY */
|
/* ARCHERY */
|
||||||
|
public static boolean explosiveShot(Permissible permissible) { return permissible.hasPermission("mcmmo.ability.archery.explosiveshot"); }
|
||||||
public static boolean arrowRetrieval(Permissible permissible) { return permissible.hasPermission("mcmmo.ability.archery.trackarrows"); }
|
public static boolean arrowRetrieval(Permissible permissible) { return permissible.hasPermission("mcmmo.ability.archery.trackarrows"); }
|
||||||
public static boolean daze(Permissible permissible) { return permissible.hasPermission("mcmmo.ability.archery.daze"); }
|
public static boolean daze(Permissible permissible) { return permissible.hasPermission("mcmmo.ability.archery.daze"); }
|
||||||
|
|
||||||
|
@ -182,6 +182,11 @@ Archery.SubSkill.ArcheryLimitBreak.Description=Breaking your limits. Increased d
|
|||||||
Archery.SubSkill.ArcheryLimitBreak.Stat=Limit Break Max DMG
|
Archery.SubSkill.ArcheryLimitBreak.Stat=Limit Break Max DMG
|
||||||
Archery.Listener=Archery:
|
Archery.Listener=Archery:
|
||||||
Archery.SkillName=ARCHERY
|
Archery.SkillName=ARCHERY
|
||||||
|
Archery.Skills.ExplosiveShot.Off=
|
||||||
|
Archery.Skills.ExplosiveShot.On=&a**EXPLOSIVE SHOT ACTIVATED**
|
||||||
|
Archery.Skills.ExplosiveShot.Other.Off=Explosive Shot&a has worn off for &e{0}
|
||||||
|
Archery.Skills.ExplosiveShot.Other.On=&a{0}&2 has used &cExplosive Shot!
|
||||||
|
Archery.Skills.ExplosiveShot.Refresh=&aYour &Explosive Shot &ability is refreshed!
|
||||||
#AXES
|
#AXES
|
||||||
Axes.Ability.Bonus.0=Axe Mastery
|
Axes.Ability.Bonus.0=Axe Mastery
|
||||||
Axes.Ability.Bonus.1=Bonus {0} damage
|
Axes.Ability.Bonus.1=Bonus {0} damage
|
||||||
|
@ -290,10 +290,13 @@ permissions:
|
|||||||
mcmmo.ability.archery.all:
|
mcmmo.ability.archery.all:
|
||||||
description: Allows access to all Archery abilities
|
description: Allows access to all Archery abilities
|
||||||
children:
|
children:
|
||||||
|
mcmmo.ability.archery.explosiveshot: true
|
||||||
mcmmo.ability.archery.skillshot: true
|
mcmmo.ability.archery.skillshot: true
|
||||||
mcmmo.ability.archery.daze: true
|
mcmmo.ability.archery.daze: true
|
||||||
mcmmo.ability.archery.arrowretrieval: true
|
mcmmo.ability.archery.arrowretrieval: true
|
||||||
mcmmo.ability.archery.archerylimitbreak: true
|
mcmmo.ability.archery.archerylimitbreak: true
|
||||||
|
mcmmo.ability.archery.explosiveshot:
|
||||||
|
description: Allows access to the Explosive Shot super ability for Archery
|
||||||
mcmmo.ability.archery.archerylimitbreak:
|
mcmmo.ability.archery.archerylimitbreak:
|
||||||
description: Adds damage to bows
|
description: Adds damage to bows
|
||||||
mcmmo.ability.archery.skillshot:
|
mcmmo.ability.archery.skillshot:
|
||||||
|
@ -31,6 +31,11 @@ Alchemy:
|
|||||||
Rank_7: 900
|
Rank_7: 900
|
||||||
Rank_8: 1000
|
Rank_8: 1000
|
||||||
Archery:
|
Archery:
|
||||||
|
ExplosiveShot:
|
||||||
|
Standard:
|
||||||
|
Rank_1: 5
|
||||||
|
RetroMode:
|
||||||
|
Rank_1: 50
|
||||||
ArcheryLimitBreak:
|
ArcheryLimitBreak:
|
||||||
Standard:
|
Standard:
|
||||||
Rank_1: 10
|
Rank_1: 10
|
||||||
|
Loading…
Reference in New Issue
Block a user