Added 'Skill Shot' to Archery. Updated Archery command.

This commit is contained in:
nossr50 2012-04-03 14:36:55 -07:00
parent e8817ec9ea
commit f247545fc4
14 changed files with 33 additions and 75 deletions

View File

@ -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

View File

@ -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) {

View File

@ -25,18 +25,14 @@ 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);

View File

@ -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.
*

View File

@ -436,4 +436,5 @@ m.EffectsTaming7_1=Summon an animal to your side
m.EffectsTaming7_2=[[GRAY]]COTW HOW-TO: Crouch and right click with {0} Bones/Fish in hand
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.TamingSummonOcelotFailed=[[RED]]You have too many ocelots nearby to summon any more.
m.ArcherySkillShot=[[RED]]Skill Shot Bonus Damage: [[YELLOW]]{0}%

View File

@ -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}%

View File

@ -428,4 +428,5 @@ GodMode.Forbidden=[mcMMO] God Mode not permitted on this world (See Permissions)
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.TamingSummonOcelotFailed=[[RED]]You have too many ocelots nearby to summon any more.
m.ArcherySkillShot=[[RED]]Skill Shot Bonus Damage: [[YELLOW]]{0}%

View File

@ -421,4 +421,5 @@ Party.Forbidden=[mcMMO] Parties not permitted on this world (See Permissions)
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.TamingSummonOcelotFailed=[[RED]]You have too many ocelots nearby to summon any more.
m.ArcherySkillShot=[[RED]]Skill Shot Bonus Damage: [[YELLOW]]{0}%

View File

@ -428,4 +428,5 @@ GodMode.Forbidden=[mcMMO] God Mode not permitted on this world (See Permissions)
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.TamingSummonOcelotFailed=[[RED]]You have too many ocelots nearby to summon any more.
m.ArcherySkillShot=[[RED]]Skill Shot Bonus Damage: [[YELLOW]]{0}%

View File

@ -430,4 +430,5 @@ GodMode.Forbidden=[mcMMO] La god mode non e permessa in questo mondo (Controlla
XPRate.Event = [[GOLD]]mcMMO ha un'evento in corso -> XP aumentato! la XP Rate e {0}x!
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.TamingSummonOcelotFailed=[[RED]]Hai troppi gattopardi con te per poterne chiamare altri.
m.ArcherySkillShot=[[RED]]Skill Shot Bonus Damage: [[YELLOW]]{0}%

View File

@ -434,4 +434,5 @@ GodMode.Forbidden=[mcMMO] God Mode not permitted on this world (See Permissions)
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.TamingSummonOcelotFailed=[[RED]]You have too many ocelots nearby to summon any more.
m.ArcherySkillShot=[[RED]]Skill Shot Bonus Damage: [[YELLOW]]{0}%

View File

@ -428,4 +428,5 @@ GodMode.Forbidden=[mcMMO] God Mode not permitted on this world (See Permissions)
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.TamingSummonOcelotFailed=[[RED]]You have too many ocelots nearby to summon any more.
m.ArcherySkillShot=[[RED]]Skill Shot Bonus Damage: [[YELLOW]]{0}%

View File

@ -435,4 +435,5 @@ GodMode.Forbidden=[mcMMO] God Mode not permitted on this world (See Permissions)
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.TamingSummonOcelotFailed=[[RED]]You have too many ocelots nearby to summon any more.
m.ArcherySkillShot=[[RED]]Skill Shot Bonus Damage: [[YELLOW]]{0}%

View File

@ -419,4 +419,5 @@ GodMode.Forbidden=[mcMMO] God Mode not permitted on this world (See Permissions)
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.TamingSummonOcelotFailed=[[RED]]You have too many ocelots nearby to summon any more.
m.ArcherySkillShot=[[RED]]Skill Shot Bonus Damage: [[YELLOW]]{0}%