Added Fast Food Service to Taming (Healing)

This commit is contained in:
nossr50 2012-02-20 15:41:00 -08:00
parent 3f8077d615
commit fa35fd9e45
12 changed files with 80 additions and 14 deletions

View File

@ -6,6 +6,7 @@ Version 1.3.00-dev
- Added configuration option to control mcMMO reporting damage events - Added configuration option to control mcMMO reporting damage events
- Added hunger regain bonuses to Herbalism skill - Added hunger regain bonuses to Herbalism skill
- Added framework for new Blast Mining skill - Added framework for new Blast Mining skill
- Added Fast Food Service subskill to Taming
- Re-added mcMMO reporting damage events - Re-added mcMMO reporting damage events
- Fixed /mcability not respecting permissions - Fixed /mcability not respecting permissions
- Changed to use Bukkit's built-in ignoreCancelledEvents system - Changed to use Bukkit's built-in ignoreCancelledEvents system

View File

@ -153,14 +153,14 @@ public class Combat
event.setCancelled(true); event.setCancelled(true);
if(theWolf.isTamed()) if(theWolf.isTamed())
{ {
attacker.sendMessage(mcLocale.getString("Combat.BeastLore")+" "+ attacker.sendMessage(mcLocale.getString("Combat.BeastLore")+" "+
mcLocale.getString("Combat.BeastLoreOwner", new Object[] {Taming.getOwnerName(theWolf)})+" "+ mcLocale.getString("Combat.BeastLoreOwner", new Object[] {Taming.getOwnerName(theWolf)})+" "+
mcLocale.getString("Combat.BeastLoreHealthWolfTamed", new Object[] {theWolf.getHealth()})); mcLocale.getString("Combat.BeastLoreHealthWolfTamed", new Object[] {theWolf.getHealth()}));
} }
else else
{ {
attacker.sendMessage(mcLocale.getString("Combat.BeastLore")+" "+ attacker.sendMessage(mcLocale.getString("Combat.BeastLore")+" "+
mcLocale.getString("Combat.BeastLoreHealthWolf", new Object[] {theWolf.getHealth()})); mcLocale.getString("Combat.BeastLoreHealthWolf", new Object[] {theWolf.getHealth()}));
} }
} }
} }
@ -184,6 +184,21 @@ public class Combat
if(mcPermissions.getInstance().taming(master)) if(mcPermissions.getInstance().taming(master))
{ {
//Fast Food Service
if(PPo.getSkillLevel(SkillType.TAMING) >= 50)
{
if(theWolf.getHealth() < theWolf.getMaxHealth())
{
if(Math.random() * 10 > 5)
{
theWolf.setHealth(theWolf.getHealth()+event.getDamage());
if(theWolf.getHealth() > theWolf.getMaxHealth())
theWolf.setHealth(theWolf.getMaxHealth());
}
}
}
//Sharpened Claws //Sharpened Claws
if(PPo.getSkillLevel(SkillType.TAMING) >= 750) if(PPo.getSkillLevel(SkillType.TAMING) >= 750)
{ {

View File

@ -40,6 +40,7 @@ public class TamingCommand implements CommandExecutor {
player.sendMessage(mcLocale.getString("m.EffectsTemplate", new Object[] { mcLocale.getString("m.EffectsTaming5_0"), mcLocale.getString("m.EffectsTaming5_1") })); player.sendMessage(mcLocale.getString("m.EffectsTemplate", new Object[] { mcLocale.getString("m.EffectsTaming5_0"), mcLocale.getString("m.EffectsTaming5_1") }));
player.sendMessage(mcLocale.getString("m.EffectsTemplate", new Object[] { mcLocale.getString("m.EffectsTaming6_0"), mcLocale.getString("m.EffectsTaming6_1") })); player.sendMessage(mcLocale.getString("m.EffectsTemplate", new Object[] { mcLocale.getString("m.EffectsTaming6_0"), mcLocale.getString("m.EffectsTaming6_1") }));
player.sendMessage(mcLocale.getString("m.EffectsTemplate", new Object[] { mcLocale.getString("m.EffectsTaming7_0"), mcLocale.getString("m.EffectsTaming7_1") })); player.sendMessage(mcLocale.getString("m.EffectsTemplate", new Object[] { mcLocale.getString("m.EffectsTaming7_0"), mcLocale.getString("m.EffectsTaming7_1") }));
player.sendMessage(mcLocale.getString("m.EffectsTemplate", new Object[] { mcLocale.getString("m.EffectsTaming8_0"), mcLocale.getString("m.EffectsTaming8_1") }));
player.sendMessage(mcLocale.getString("m.EffectsTaming7_2", new Object[] { LoadProperties.bonesConsumedByCOTW })); player.sendMessage(mcLocale.getString("m.EffectsTaming7_2", new Object[] { LoadProperties.bonesConsumedByCOTW }));
player.sendMessage(mcLocale.getString("m.SkillHeader", new Object[] { mcLocale.getString("m.YourStats") })); player.sendMessage(mcLocale.getString("m.SkillHeader", new Object[] { mcLocale.getString("m.YourStats") }));
@ -62,7 +63,11 @@ public class TamingCommand implements CommandExecutor {
player.sendMessage(mcLocale.getString("m.AbilityLockTemplate", new Object[] { mcLocale.getString("m.AbilLockTaming4") })); player.sendMessage(mcLocale.getString("m.AbilityLockTemplate", new Object[] { mcLocale.getString("m.AbilLockTaming4") }));
else else
player.sendMessage(mcLocale.getString("m.AbilityBonusTemplate", new Object[] { mcLocale.getString("m.AbilBonusTaming4_0"), mcLocale.getString("m.AbilBonusTaming4_1") })); player.sendMessage(mcLocale.getString("m.AbilityBonusTemplate", new Object[] { mcLocale.getString("m.AbilBonusTaming4_0"), mcLocale.getString("m.AbilBonusTaming4_1") }));
if (PP.getSkillLevel(SkillType.TAMING) < 50)
player.sendMessage(mcLocale.getString("m.AbilityLockTemplate", new Object[] { mcLocale.getString("m.AbilLockTaming5") }));
else
player.sendMessage(mcLocale.getString("m.AbilityBonusTemplate", new Object[] { mcLocale.getString("m.AbilBonusTaming5_0"), mcLocale.getString("m.AbilBonusTaming5_1") }));
player.sendMessage(mcLocale.getString("m.TamingGoreChance", new Object[] { percentage })); player.sendMessage(mcLocale.getString("m.TamingGoreChance", new Object[] { percentage }));
return true; return true;

View File

@ -394,4 +394,9 @@ m.TamingSummon=[[YELLOW]]Beschwoerung abgeschlossen
m.TamingSummonFailed=[[YELLOW]]Du hast zu viele Woelfe um dich um weitere zu beschwoeren. m.TamingSummonFailed=[[YELLOW]]Du hast zu viele Woelfe um dich um weitere zu beschwoeren.
m.EffectsTaming7_0=[[YELLOW]]Ruf der Wildniss m.EffectsTaming7_0=[[YELLOW]]Ruf der Wildniss
m.EffectsTaming7_1=[[AQUA]]Beschwoere einen Wolf auf deine Seite m.EffectsTaming7_1=[[AQUA]]Beschwoere einen Wolf auf deine Seite
m.EffectsTaming7_2=[[YELLOW]]Info: [[AQUA]]Ducken und Rechtsklick mit {0} Knochen in der Hand m.EffectsTaming7_2=[[YELLOW]]Info: [[AQUA]]Ducken und Rechtsklick mit {0} Knochen in der Hand
m.EffectsTaming8_0=Fast Food Service
m.EffectsTaming8_1=Chance for wolves to heal when they attack
m.AbilLockTaming5=LOCKED UNTIL 50+ SKILL (FAST FOOD SERVICE)
m.AbilBonusTaming5_0=Fast Food Service
m.AbilBonusTaming5_1=50% Chance to heal equivalent to damage dealt

View File

@ -387,4 +387,9 @@ m.TamingSummon=[[GREEN]]Summoning complete
m.TamingSummonFailed=[[RED]]You have too many wolves nearby to summon any more. m.TamingSummonFailed=[[RED]]You have too many wolves nearby to summon any more.
m.EffectsTaming7_0=Call of the Wild m.EffectsTaming7_0=Call of the Wild
m.EffectsTaming7_1=Summon a wolf to your side m.EffectsTaming7_1=Summon a wolf to your side
m.EffectsTaming7_2=[[GRAY]]COTW HOW-TO: Crouch and right click with {0} Bones in hand m.EffectsTaming7_2=[[GRAY]]COTW HOW-TO: Crouch and right click with {0} Bones in hand
m.EffectsTaming8_0=Fast Food Service
m.EffectsTaming8_1=Chance for wolves to heal when they attack
m.AbilLockTaming5=LOCKED UNTIL 50+ SKILL (FAST FOOD SERVICE)
m.AbilBonusTaming5_0=Fast Food Service
m.AbilBonusTaming5_1=50% Chance to heal equivalent to damage dealt

View File

@ -387,4 +387,9 @@ m.TamingSummon=[[GREEN]]Summoning complete
m.TamingSummonFailed=[[RED]]You have too many wolves nearby to summon any more. m.TamingSummonFailed=[[RED]]You have too many wolves nearby to summon any more.
m.EffectsTaming7_0=Call of the Wild m.EffectsTaming7_0=Call of the Wild
m.EffectsTaming7_1=Summon a wolf to your side m.EffectsTaming7_1=Summon a wolf to your side
m.EffectsTaming7_2=[[GRAY]]COTW HOW-TO: Crouch and right click with {0} Bones in hand m.EffectsTaming7_2=[[GRAY]]COTW HOW-TO: Crouch and right click with {0} Bones in hand
m.EffectsTaming8_0=Fast Food Service
m.EffectsTaming8_1=Chance for wolves to heal when they attack
m.AbilLockTaming5=LOCKED UNTIL 50+ SKILL (FAST FOOD SERVICE)
m.AbilBonusTaming5_0=Fast Food Service
m.AbilBonusTaming5_1=50% Chance to heal equivalent to damage dealt

View File

@ -366,4 +366,9 @@ m.TamingSummon=[[GREEN]]Summoning complete
m.TamingSummonFailed=[[RED]]You have too many wolves nearby to summon any more. m.TamingSummonFailed=[[RED]]You have too many wolves nearby to summon any more.
m.EffectsTaming7_0=Call of the Wild m.EffectsTaming7_0=Call of the Wild
m.EffectsTaming7_1=Summon a wolf to your side m.EffectsTaming7_1=Summon a wolf to your side
m.EffectsTaming7_2=[[GRAY]]COTW HOW-TO: Crouch and right click with {0} Bones in hand m.EffectsTaming7_2=[[GRAY]]COTW HOW-TO: Crouch and right click with {0} Bones in hand
m.EffectsTaming8_0=Fast Food Service
m.EffectsTaming8_1=Chance for wolves to heal when they attack
m.AbilLockTaming5=LOCKED UNTIL 50+ SKILL (FAST FOOD SERVICE)
m.AbilBonusTaming5_0=Fast Food Service
m.AbilBonusTaming5_1=50% Chance to heal equivalent to damage dealt

View File

@ -387,4 +387,9 @@ m.TamingSummon=[[GREEN]]Summoning complete
m.TamingSummonFailed=[[RED]]You have too many wolves nearby to summon any more. m.TamingSummonFailed=[[RED]]You have too many wolves nearby to summon any more.
m.EffectsTaming7_0=Call of the Wild m.EffectsTaming7_0=Call of the Wild
m.EffectsTaming7_1=Summon a wolf to your side m.EffectsTaming7_1=Summon a wolf to your side
m.EffectsTaming7_2=[[GRAY]]COTW HOW-TO: Crouch and right click with {0} Bones in hand m.EffectsTaming7_2=[[GRAY]]COTW HOW-TO: Crouch and right click with {0} Bones in hand
m.EffectsTaming8_0=Fast Food Service
m.EffectsTaming8_1=Chance for wolves to heal when they attack
m.AbilLockTaming5=LOCKED UNTIL 50+ SKILL (FAST FOOD SERVICE)
m.AbilBonusTaming5_0=Fast Food Service
m.AbilBonusTaming5_1=50% Chance to heal equivalent to damage dealt

View File

@ -393,4 +393,9 @@ m.TamingSummon=[[GREEN]]Summoning complete
m.TamingSummonFailed=[[RED]]You have too many wolves nearby to summon any more. m.TamingSummonFailed=[[RED]]You have too many wolves nearby to summon any more.
m.EffectsTaming7_0=Call of the Wild m.EffectsTaming7_0=Call of the Wild
m.EffectsTaming7_1=Summon a wolf to your side m.EffectsTaming7_1=Summon a wolf to your side
m.EffectsTaming7_2=[[GRAY]]COTW HOW-TO: Crouch and right click with {0} Bones in hand m.EffectsTaming7_2=[[GRAY]]COTW HOW-TO: Crouch and right click with {0} Bones in hand
m.EffectsTaming8_0=Fast Food Service
m.EffectsTaming8_1=Chance for wolves to heal when they attack
m.AbilLockTaming5=LOCKED UNTIL 50+ SKILL (FAST FOOD SERVICE)
m.AbilBonusTaming5_0=Fast Food Service
m.AbilBonusTaming5_1=50% Chance to heal equivalent to damage dealt

View File

@ -387,4 +387,9 @@ m.TamingSummon=[[GREEN]]Summoning complete
m.TamingSummonFailed=[[RED]]You have too many wolves nearby to summon any more. m.TamingSummonFailed=[[RED]]You have too many wolves nearby to summon any more.
m.EffectsTaming7_0=Call of the Wild m.EffectsTaming7_0=Call of the Wild
m.EffectsTaming7_1=Summon a wolf to your side m.EffectsTaming7_1=Summon a wolf to your side
m.EffectsTaming7_2=[[GRAY]]COTW HOW-TO: Crouch and right click with {0} Bones in hand m.EffectsTaming7_2=[[GRAY]]COTW HOW-TO: Crouch and right click with {0} Bones in hand
m.EffectsTaming8_0=Fast Food Service
m.EffectsTaming8_1=Chance for wolves to heal when they attack
m.AbilLockTaming5=LOCKED UNTIL 50+ SKILL (FAST FOOD SERVICE)
m.AbilBonusTaming5_0=Fast Food Service
m.AbilBonusTaming5_1=50% Chance to heal equivalent to damage dealt

View File

@ -397,4 +397,9 @@ m.TamingSummon=[[GREEN]]Summoning complete
m.TamingSummonFailed=[[RED]]You have too many wolves nearby to summon any more. m.TamingSummonFailed=[[RED]]You have too many wolves nearby to summon any more.
m.EffectsTaming7_0=Call of the Wild m.EffectsTaming7_0=Call of the Wild
m.EffectsTaming7_1=Summon a wolf to your side m.EffectsTaming7_1=Summon a wolf to your side
m.EffectsTaming7_2=[[GRAY]]COTW HOW-TO: Crouch and right click with {0} Bones in hand m.EffectsTaming7_2=[[GRAY]]COTW HOW-TO: Crouch and right click with {0} Bones in hand
m.EffectsTaming8_0=Fast Food Service
m.EffectsTaming8_1=Chance for wolves to heal when they attack
m.AbilLockTaming5=LOCKED UNTIL 50+ SKILL (FAST FOOD SERVICE)
m.AbilBonusTaming5_0=Fast Food Service
m.AbilBonusTaming5_1=50% Chance to heal equivalent to damage dealt

View File

@ -379,4 +379,9 @@ m.TamingSummon=[[GREEN]]Summoning complete
m.TamingSummonFailed=[[RED]]You have too many wolves nearby to summon any more. m.TamingSummonFailed=[[RED]]You have too many wolves nearby to summon any more.
m.EffectsTaming7_0=Call of the Wild m.EffectsTaming7_0=Call of the Wild
m.EffectsTaming7_1=Summon a wolf to your side m.EffectsTaming7_1=Summon a wolf to your side
m.EffectsTaming7_2=[[GRAY]]COTW HOW-TO: Crouch and right click with {0} Bones in hand m.EffectsTaming7_2=[[GRAY]]COTW HOW-TO: Crouch and right click with {0} Bones in hand
m.EffectsTaming8_0=Fast Food Service
m.EffectsTaming8_1=Chance for wolves to heal when they attack
m.AbilLockTaming5=LOCKED UNTIL 50+ SKILL (FAST FOOD SERVICE)
m.AbilBonusTaming5_0=Fast Food Service
m.AbilBonusTaming5_1=50% Chance to heal equivalent to damage dealt