mirror of
https://github.com/mcMMO-Dev/mcMMO.git
synced 2024-11-29 16:46:46 +01:00
Added 'Skill Shot' to Archery. Updated Archery command.
This commit is contained in:
parent
e8817ec9ea
commit
f247545fc4
@ -8,7 +8,7 @@ Key:
|
||||
- Removal
|
||||
|
||||
Version 1.3.05-dev
|
||||
+ Added bonus damage to Archery, every 50 levels you gain 10% bonus damage
|
||||
+ Added Skill Shot to Archery which increases damage dealt by 10% every 50 skill levels (caps at 200%)
|
||||
+ Added ExperienceAPI and PartyAPI classes for developer use
|
||||
+ Added ability to cap overall power level
|
||||
+ Added showing powerlevel below a persons name if you run Spout (optional)
|
||||
@ -21,6 +21,7 @@ Version 1.3.05-dev
|
||||
= Fixed bug where API functions were set to static
|
||||
! Changed Tree Feller to account for ability durability loss but not leaves.
|
||||
! Changed bypass node for Arcane Forging to not default to true for OPs
|
||||
- Removed Ignition from Archery
|
||||
- Removed McMMOPlayerRepairEvent - was basically a duplicate of McMMOPlayerRepairCheck but couldn't be cancelled.
|
||||
|
||||
Version 1.3.04
|
||||
|
@ -198,7 +198,7 @@ public class Combat {
|
||||
int skillLvl = Users.getProfile(attacker).getSkillLevel(SkillType.ARCHERY);
|
||||
double dmgBonusPercent = ((skillLvl / 50) * 0.1D);
|
||||
|
||||
/* Cap maximum bonus at 100% */
|
||||
/* Cap maximum bonus at 200% */
|
||||
if(dmgBonusPercent > 2)
|
||||
dmgBonusPercent = 2;
|
||||
|
||||
@ -213,10 +213,6 @@ public class Combat {
|
||||
Archery.trackArrows(pluginx, target, PPa);
|
||||
}
|
||||
|
||||
if (mcPermissions.getInstance().ignition(attacker)) {
|
||||
Archery.ignitionCheck(target, attacker);
|
||||
}
|
||||
|
||||
startGainXp(attacker, PPa, target, SkillType.ARCHERY, pluginx);
|
||||
|
||||
if (target instanceof Player) {
|
||||
|
@ -26,17 +26,13 @@ public class ArcheryCommand implements CommandExecutor {
|
||||
float skillvalue = (float) PP.getSkillLevel(SkillType.ARCHERY);
|
||||
String percentage = String.valueOf((skillvalue / 1000) * 100);
|
||||
|
||||
int ignition = 20;
|
||||
if (PP.getSkillLevel(SkillType.ARCHERY) >= 200)
|
||||
ignition += 20;
|
||||
if (PP.getSkillLevel(SkillType.ARCHERY) >= 400)
|
||||
ignition += 20;
|
||||
if (PP.getSkillLevel(SkillType.ARCHERY) >= 600)
|
||||
ignition += 20;
|
||||
if (PP.getSkillLevel(SkillType.ARCHERY) >= 800)
|
||||
ignition += 20;
|
||||
if (PP.getSkillLevel(SkillType.ARCHERY) >= 1000)
|
||||
ignition += 20;
|
||||
double dmgBonusPercent = ((PP.getSkillLevel(SkillType.ARCHERY) / 50) * 0.1D);
|
||||
|
||||
/* Cap maximum bonus at 200% */
|
||||
if(dmgBonusPercent > 2)
|
||||
dmgBonusPercent = 2;
|
||||
|
||||
dmgBonusPercent = dmgBonusPercent * 100; //Convert to percentage
|
||||
|
||||
String percentagedaze;
|
||||
if (PP.getSkillLevel(SkillType.ARCHERY) < 1000)
|
||||
@ -55,9 +51,9 @@ public class ArcheryCommand implements CommandExecutor {
|
||||
player.sendMessage(mcLocale.getString("m.EffectsTemplate", new Object[] { mcLocale.getString("m.EffectsArchery2_0"), mcLocale.getString("m.EffectsArchery2_1") }));
|
||||
player.sendMessage(mcLocale.getString("m.EffectsTemplate", new Object[] { mcLocale.getString("m.EffectsArchery4_0"), mcLocale.getString("m.EffectsArchery4_1") }));
|
||||
player.sendMessage(mcLocale.getString("m.SkillHeader", new Object[] { mcLocale.getString("m.YourStats") }));
|
||||
player.sendMessage(mcLocale.getString("m.ArcherySkillShot", new Object[] { dmgBonusPercent }));
|
||||
player.sendMessage(mcLocale.getString("m.ArcheryDazeChance", new Object[] { percentagedaze }));
|
||||
player.sendMessage(mcLocale.getString("m.ArcheryRetrieveChance", new Object[] { percentage }));
|
||||
player.sendMessage(mcLocale.getString("m.ArcheryIgnitionLength", new Object[] { (ignition / 20) }));
|
||||
|
||||
Page.grabGuidePageForSkill(SkillType.ARCHERY, player, args);
|
||||
|
||||
|
@ -15,7 +15,6 @@ import com.gmail.nossr50.mcPermissions;
|
||||
import com.gmail.nossr50.datatypes.PlayerProfile;
|
||||
import com.gmail.nossr50.datatypes.SkillType;
|
||||
import com.gmail.nossr50.locale.mcLocale;
|
||||
import com.gmail.nossr50.party.Party;
|
||||
|
||||
public class Archery {
|
||||
|
||||
@ -41,50 +40,6 @@ public class Archery {
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Check for ignition on arrow hit.
|
||||
*
|
||||
* @param entity Entity damaged by the arrow
|
||||
* @param attacker Player who fired the arrow
|
||||
*/
|
||||
public static void ignitionCheck(Entity entity, Player attacker) {
|
||||
|
||||
//Check to see if PVP for this world is disabled before executing
|
||||
if (!entity.getWorld().getPVP()) {
|
||||
return;
|
||||
}
|
||||
|
||||
final int IGNITION_CHANCE = 25;
|
||||
final int MAX_IGNITION_TICKS = 120;
|
||||
|
||||
PlayerProfile PPa = Users.getProfile(attacker);
|
||||
|
||||
if (random.nextInt(100) <= IGNITION_CHANCE) {
|
||||
int ignition = 20;
|
||||
|
||||
/* Add 20 ticks for every 200 skill levels */
|
||||
ignition += (PPa.getSkillLevel(SkillType.ARCHERY) / 200) * 20;
|
||||
|
||||
if (ignition > MAX_IGNITION_TICKS) {
|
||||
ignition = MAX_IGNITION_TICKS;
|
||||
}
|
||||
|
||||
if (entity instanceof Player) {
|
||||
Player defender = (Player) entity;
|
||||
|
||||
if (!Party.getInstance().inSameParty(attacker, defender)) {
|
||||
defender.setFireTicks(defender.getFireTicks() + ignition);
|
||||
attacker.sendMessage(mcLocale.getString("Combat.Ignition"));
|
||||
defender.sendMessage(mcLocale.getString("Combat.BurningArrowHit"));
|
||||
}
|
||||
}
|
||||
else {
|
||||
entity.setFireTicks(entity.getFireTicks() + ignition);
|
||||
attacker.sendMessage(mcLocale.getString("Combat.Ignition"));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Check for Daze.
|
||||
*
|
||||
|
@ -437,3 +437,4 @@ m.EffectsTaming7_2=[[GRAY]]COTW HOW-TO: Crouch and right click with {0} Bones/Fi
|
||||
m.EffectsTaming1_1=Bone-whacking inspects wolves/ocelots
|
||||
Combat.BeastLoreHealth=[[DARK_AQUA]]Health ([[GREEN]]{0}[[DARK_AQUA]]/{1})
|
||||
m.TamingSummonOcelotFailed=[[RED]]You have too many ocelots nearby to summon any more.
|
||||
m.ArcherySkillShot=[[RED]]Skill Shot Bonus Damage: [[YELLOW]]{0}%
|
@ -73,8 +73,8 @@ m.WoodCuttingDoubleDropChance=[[RED]]Double Drop Chance: [[YELLOW]]{0}%
|
||||
m.WoodCuttingTreeFellerLength=[[RED]]Tree Feller Length: [[YELLOW]]{0}s
|
||||
m.SkillArchery=ARCHERY
|
||||
m.XPGainArchery=Attacking Monsters
|
||||
m.EffectsArchery1_0=Ignition
|
||||
m.EffectsArchery1_1=25% Chance Enemies will ignite
|
||||
m.EffectsArchery1_0=Skill Shot
|
||||
m.EffectsArchery1_1=Increases damage done by Bows
|
||||
m.EffectsArchery2_0=Daze (Players)
|
||||
m.EffectsArchery2_1=Disorients foes
|
||||
m.EffectsArchery3_0=Damage+
|
||||
@ -440,3 +440,4 @@ Inspect.OfflineStats=mcMMO Stats for Offline Player [[YELLOW]]{0}
|
||||
Stats.GatheringHeader=[[GOLD]]-=GATHERING SKILLS=-
|
||||
Stats.CombatHeader=[[GOLD]]-=COMBAT SKILLS=-
|
||||
Stats.MiscHeader=[[GOLD]]-=MISC SKILLS=-
|
||||
m.ArcherySkillShot=[[RED]]Skill Shot Bonus Damage: [[YELLOW]]{0}%
|
@ -429,3 +429,4 @@ XPRate.Event = [[GOLD]]mcMMO is currently in an XP rate event! XP rate is {0}x!
|
||||
BlastMining.Boom = [[GRAY]]**BOOM**
|
||||
Party.Forbidden=[mcMMO] Parties not permitted on this world (See Permissions)
|
||||
m.TamingSummonOcelotFailed=[[RED]]You have too many ocelots nearby to summon any more.
|
||||
m.ArcherySkillShot=[[RED]]Skill Shot Bonus Damage: [[YELLOW]]{0}%
|
@ -422,3 +422,4 @@ Combat.BeastLore=[[GREEN]]**BEAST LORE**
|
||||
Combat.BeastLoreOwner=[[DARK_AQUA]]Owner ([[RED]]{0}[[DARK_AQUA]])
|
||||
Combat.BeastLoreHealth=[[DARK_AQUA]]Health ([[GREEN]]{0}[[DARK_AQUA]]/{1})
|
||||
m.TamingSummonOcelotFailed=[[RED]]You have too many ocelots nearby to summon any more.
|
||||
m.ArcherySkillShot=[[RED]]Skill Shot Bonus Damage: [[YELLOW]]{0}%
|
@ -429,3 +429,4 @@ XPRate.Event = [[GOLD]]mcMMO is currently in an XP rate event! XP rate is {0}x!
|
||||
BlastMining.Boom = [[GRAY]]**BOOM**
|
||||
Party.Forbidden=[mcMMO] Parties not permitted on this world (See Permissions)
|
||||
m.TamingSummonOcelotFailed=[[RED]]You have too many ocelots nearby to summon any more.
|
||||
m.ArcherySkillShot=[[RED]]Skill Shot Bonus Damage: [[YELLOW]]{0}%
|
@ -431,3 +431,4 @@ XPRate.Event = [[GOLD]]mcMMO ha un'evento in corso -> XP aumentato! la XP Rate e
|
||||
BlastMining.Boom = [[GRAY]]**BOOM**
|
||||
Party.Forbidden=[mcMMO] I party non sono permessi in questo mondo (Controlla i Permessi)
|
||||
m.TamingSummonOcelotFailed=[[RED]]Hai troppi gattopardi con te per poterne chiamare altri.
|
||||
m.ArcherySkillShot=[[RED]]Skill Shot Bonus Damage: [[YELLOW]]{0}%
|
@ -435,3 +435,4 @@ XPRate.Event = [[GOLD]]mcMMO is currently in an XP rate event! XP rate is {0}x!
|
||||
BlastMining.Boom = [[GRAY]]**BOOM**
|
||||
Party.Forbidden=[mcMMO] Parties not permitted on this world (See Permissions)
|
||||
m.TamingSummonOcelotFailed=[[RED]]You have too many ocelots nearby to summon any more.
|
||||
m.ArcherySkillShot=[[RED]]Skill Shot Bonus Damage: [[YELLOW]]{0}%
|
@ -429,3 +429,4 @@ XPRate.Event = [[GOLD]]mcMMO is currently in an XP rate event! XP rate is {0}x!
|
||||
BlastMining.Boom = [[GRAY]]**BOOM**
|
||||
Party.Forbidden=[mcMMO] Parties not permitted on this world (See Permissions)
|
||||
m.TamingSummonOcelotFailed=[[RED]]You have too many ocelots nearby to summon any more.
|
||||
m.ArcherySkillShot=[[RED]]Skill Shot Bonus Damage: [[YELLOW]]{0}%
|
@ -436,3 +436,4 @@ XPRate.Event = [[GOLD]]mcMMO is currently in an XP rate event! XP rate is {0}x!
|
||||
BlastMining.Boom = [[GRAY]]**BOOM**
|
||||
Party.Forbidden=[mcMMO] Parties not permitted on this world (See Permissions)
|
||||
m.TamingSummonOcelotFailed=[[RED]]You have too many ocelots nearby to summon any more.
|
||||
m.ArcherySkillShot=[[RED]]Skill Shot Bonus Damage: [[YELLOW]]{0}%
|
@ -420,3 +420,4 @@ XPRate.Event = [[GOLD]]mcMMO is currently in an XP rate event! XP rate is {0}x!
|
||||
BlastMining.Boom = [[GRAY]]**BOOM**
|
||||
Party.Forbidden=[mcMMO] Parties not permitted on this world (See Permissions)
|
||||
m.TamingSummonOcelotFailed=[[RED]]You have too many ocelots nearby to summon any more.
|
||||
m.ArcherySkillShot=[[RED]]Skill Shot Bonus Damage: [[YELLOW]]{0}%
|
Loading…
Reference in New Issue
Block a user