Browse Source

Added Fast Food Service to Taming (Healing)

nossr50 13 years ago
parent
commit
fa35fd9e45

+ 1 - 0
Changelog.txt

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

+ 19 - 4
src/main/java/com/gmail/nossr50/Combat.java

@@ -153,14 +153,14 @@ public class Combat
 		      				event.setCancelled(true);
 		      				if(theWolf.isTamed())
 		      				{
-		      				attacker.sendMessage(mcLocale.getString("Combat.BeastLore")+" "+
-		      						mcLocale.getString("Combat.BeastLoreOwner", new Object[] {Taming.getOwnerName(theWolf)})+" "+
-		      						mcLocale.getString("Combat.BeastLoreHealthWolfTamed", new Object[] {theWolf.getHealth()}));
+		      				    attacker.sendMessage(mcLocale.getString("Combat.BeastLore")+" "+
+		      				            mcLocale.getString("Combat.BeastLoreOwner", new Object[] {Taming.getOwnerName(theWolf)})+" "+
+		      				            mcLocale.getString("Combat.BeastLoreHealthWolfTamed", new Object[] {theWolf.getHealth()}));
 		      				} 
 		      				else
 		      				{
 		      					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))
 				{
+				    //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
 					if(PPo.getSkillLevel(SkillType.TAMING) >= 750)
 					{

+ 6 - 1
src/main/java/com/gmail/nossr50/commands/skills/TamingCommand.java

@@ -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.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.EffectsTaming8_0"), mcLocale.getString("m.EffectsTaming8_1") }));
 		player.sendMessage(mcLocale.getString("m.EffectsTaming7_2", new Object[] { LoadProperties.bonesConsumedByCOTW }));
 		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") }));
 		else
 			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 }));
 
 		return true;

+ 6 - 1
src/main/resources/locale/locale_de.properties

@@ -394,4 +394,9 @@ m.TamingSummon=[[YELLOW]]Beschwoerung abgeschlossen
 m.TamingSummonFailed=[[YELLOW]]Du hast zu viele Woelfe um dich um weitere zu beschwoeren.
 m.EffectsTaming7_0=[[YELLOW]]Ruf der Wildniss
 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

+ 6 - 1
src/main/resources/locale/locale_en_us.properties

@@ -387,4 +387,9 @@ m.TamingSummon=[[GREEN]]Summoning complete
 m.TamingSummonFailed=[[RED]]You have too many wolves nearby to summon any more.
 m.EffectsTaming7_0=Call of the Wild
 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

+ 6 - 1
src/main/resources/locale/locale_es_es.properties

@@ -387,4 +387,9 @@ m.TamingSummon=[[GREEN]]Summoning complete
 m.TamingSummonFailed=[[RED]]You have too many wolves nearby to summon any more.
 m.EffectsTaming7_0=Call of the Wild
 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

+ 6 - 1
src/main/resources/locale/locale_fi.properties

@@ -366,4 +366,9 @@ m.TamingSummon=[[GREEN]]Summoning complete
 m.TamingSummonFailed=[[RED]]You have too many wolves nearby to summon any more.
 m.EffectsTaming7_0=Call of the Wild
 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

+ 6 - 1
src/main/resources/locale/locale_fr.properties

@@ -387,4 +387,9 @@ m.TamingSummon=[[GREEN]]Summoning complete
 m.TamingSummonFailed=[[RED]]You have too many wolves nearby to summon any more.
 m.EffectsTaming7_0=Call of the Wild
 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

+ 6 - 1
src/main/resources/locale/locale_nl.properties

@@ -393,4 +393,9 @@ m.TamingSummon=[[GREEN]]Summoning complete
 m.TamingSummonFailed=[[RED]]You have too many wolves nearby to summon any more.
 m.EffectsTaming7_0=Call of the Wild
 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

+ 6 - 1
src/main/resources/locale/locale_pl.properties

@@ -387,4 +387,9 @@ m.TamingSummon=[[GREEN]]Summoning complete
 m.TamingSummonFailed=[[RED]]You have too many wolves nearby to summon any more.
 m.EffectsTaming7_0=Call of the Wild
 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

+ 6 - 1
src/main/resources/locale/locale_pt_br.properties

@@ -397,4 +397,9 @@ m.TamingSummon=[[GREEN]]Summoning complete
 m.TamingSummonFailed=[[RED]]You have too many wolves nearby to summon any more.
 m.EffectsTaming7_0=Call of the Wild
 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

+ 6 - 1
src/main/resources/locale/locale_ru.properties

@@ -379,4 +379,9 @@ m.TamingSummon=[[GREEN]]Summoning complete
 m.TamingSummonFailed=[[RED]]You have too many wolves nearby to summon any more.
 m.EffectsTaming7_0=Call of the Wild
 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