mirror of
https://github.com/mcMMO-Dev/mcMMO.git
synced 2024-11-22 21:26:46 +01:00
Ch-Ch-Ch-Changes!
This commit is contained in:
parent
c5334bcdc8
commit
be23f9a145
@ -8,6 +8,13 @@ GigaDrillBreaker/Berserk doesn't drop clay blocks anymore
|
||||
Fixed bug where Herbalism didn't heal more for bread/stew when right clicking a block
|
||||
Fixed bug where Wheat did not use the values form the config file
|
||||
|
||||
TODO:
|
||||
Fix the NPE with theType
|
||||
Permission nodes for Spout elements
|
||||
Small HUD style
|
||||
HUD persistence
|
||||
Maybe incorporate mmoParty
|
||||
|
||||
In order to streamline the configuration of how XP/Levels are gained, we rewrote the formulas, it is paramount to understand that from a game perspective that does NOT change how fast you level up, it just changes how easy it is to configure the system, current configuration files will be automatically updated maintaining your selected leveling speed
|
||||
|
||||
|
||||
|
@ -89,11 +89,11 @@ public class Combat
|
||||
int xp = (int) (event.getDamage() * 2 * LoadProperties.pvpxprewardmodifier);
|
||||
|
||||
if(m.isAxes(attacker.getItemInHand()) && mcPermissions.getInstance().axes(attacker))
|
||||
PPa.addXP(SkillType.AXES, xp);
|
||||
PPa.addXP(SkillType.AXES, xp*10);
|
||||
if(m.isSwords(attacker.getItemInHand()) && mcPermissions.getInstance().swords(attacker))
|
||||
PPa.addXP(SkillType.SWORDS, xp);
|
||||
PPa.addXP(SkillType.SWORDS, xp*10);
|
||||
if(attacker.getItemInHand().getTypeId() == 0 && mcPermissions.getInstance().unarmed(attacker))
|
||||
PPa.addXP(SkillType.UNARMED, xp);
|
||||
PPa.addXP(SkillType.UNARMED, xp*10);
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -117,11 +117,11 @@ public class Combat
|
||||
xp = (event.getDamage() * 3);
|
||||
|
||||
if(m.isSwords(attacker.getItemInHand()) && mcPermissions.getInstance().swords(attacker))
|
||||
PPa.addXP(SkillType.SWORDS, xp);
|
||||
PPa.addXP(SkillType.SWORDS, xp*10);
|
||||
else if(m.isAxes(attacker.getItemInHand()) && mcPermissions.getInstance().axes(attacker))
|
||||
PPa.addXP(SkillType.AXES, xp);
|
||||
PPa.addXP(SkillType.AXES, xp*10);
|
||||
else if(attacker.getItemInHand().getTypeId() == 0 && mcPermissions.getInstance().unarmed(attacker))
|
||||
PPa.addXP(SkillType.UNARMED, xp);
|
||||
PPa.addXP(SkillType.UNARMED, xp*10);
|
||||
}
|
||||
Skills.XpCheckAll(attacker);
|
||||
|
||||
@ -206,12 +206,12 @@ public class Combat
|
||||
xp = (event.getDamage() * 4);
|
||||
if(event.getEntity() instanceof Ghast)
|
||||
xp = (event.getDamage() * 4);
|
||||
Users.getProfile(master).addXP(SkillType.TAMING, xp);
|
||||
Users.getProfile(master).addXP(SkillType.TAMING, xp*10);
|
||||
}
|
||||
if(event.getEntity() instanceof Player)
|
||||
{
|
||||
xp = (event.getDamage() * 2);
|
||||
Users.getProfile(master).addXP(SkillType.TAMING, xp);
|
||||
Users.getProfile(master).addXP(SkillType.TAMING, xp*10);
|
||||
}
|
||||
Skills.XpCheckSkill(SkillType.TAMING, master);
|
||||
}
|
||||
@ -337,19 +337,19 @@ public class Combat
|
||||
{
|
||||
//XP
|
||||
if(x instanceof Creeper)
|
||||
PPa.addXP(SkillType.ARCHERY, (event.getDamage() * 4));
|
||||
PPa.addXP(SkillType.ARCHERY, (event.getDamage() * 4)*10);
|
||||
if(x instanceof Spider)
|
||||
PPa.addXP(SkillType.ARCHERY, (event.getDamage() * 3));
|
||||
PPa.addXP(SkillType.ARCHERY, (event.getDamage() * 3)*10);
|
||||
if(x instanceof Skeleton)
|
||||
PPa.addXP(SkillType.ARCHERY, (event.getDamage() * 2));
|
||||
PPa.addXP(SkillType.ARCHERY, (event.getDamage() * 2)*10);
|
||||
if(x instanceof Zombie)
|
||||
PPa.addXP(SkillType.ARCHERY, (event.getDamage() * 2));
|
||||
PPa.addXP(SkillType.ARCHERY, (event.getDamage() * 2)*10);
|
||||
if(x instanceof PigZombie)
|
||||
PPa.addXP(SkillType.ARCHERY, (event.getDamage() * 3));
|
||||
PPa.addXP(SkillType.ARCHERY, (event.getDamage() * 3)*10);
|
||||
if(x instanceof Slime)
|
||||
PPa.addXP(SkillType.ARCHERY, (event.getDamage() * 3));
|
||||
PPa.addXP(SkillType.ARCHERY, (event.getDamage() * 3)*10);
|
||||
if(x instanceof Ghast)
|
||||
PPa.addXP(SkillType.ARCHERY, (event.getDamage() * 3));
|
||||
PPa.addXP(SkillType.ARCHERY, (event.getDamage() * 3)*10);
|
||||
}
|
||||
/*
|
||||
* Attacker is Player
|
||||
@ -374,7 +374,7 @@ public class Combat
|
||||
if(LoadProperties.pvpxp && !Party.getInstance().inSameParty(attacker, defender)
|
||||
&& ((PPd.getLastLogin()+5)*1000) < System.currentTimeMillis())
|
||||
{
|
||||
int xp = (int) (event.getDamage() * 2 * LoadProperties.pvpxprewardmodifier);
|
||||
int xp = (int) ((event.getDamage() * 2) * 10);
|
||||
PPa.addXP(SkillType.ARCHERY, xp);
|
||||
}
|
||||
/*
|
||||
|
@ -187,16 +187,27 @@ public class HUDmmo
|
||||
{
|
||||
SkillType theType = null;
|
||||
|
||||
if(PP.getXpBarLocked())
|
||||
if(PP.getXpBarLocked() && PP.getSkillLock() != null)
|
||||
theType=PP.getSkillLock();
|
||||
else
|
||||
theType=PP.getLastGained();
|
||||
|
||||
Color color = SpoutStuff.getRetroColor(theType);
|
||||
Color color = new Color(0.3f, 0.3f, 0.75f, 1f);
|
||||
|
||||
((GenericTexture) xpicon).setUrl(LoadProperties.web_url+"HUD/Retro/"+m.getCapitalized(theType.toString())+"_r.png");
|
||||
if(xpicon != null && theType != null)
|
||||
xpicon.setUrl(LoadProperties.web_url+"HUD/Retro/"+m.getCapitalized(theType.toString())+"_r.png");
|
||||
else
|
||||
{
|
||||
if(xpicon == null)
|
||||
System.out.println("xpicon was null!");
|
||||
if(theType == null)
|
||||
System.out.println("theType was null!");
|
||||
}
|
||||
|
||||
xpfill.setBottomColor(color).setTopColor(color).setWidth(SpoutStuff.getXpInc(PP.getSkillXpLevel(theType), PP.getXpToLevel(theType), HUDType.RETRO)).setDirty(true);
|
||||
if(theType != null)
|
||||
xpfill.setBottomColor(color).setTopColor(color).setWidth(SpoutStuff.getXpInc(PP.getSkillXpLevel(theType), PP.getXpToLevel(theType), HUDType.RETRO)).setDirty(true);
|
||||
else
|
||||
System.out.println("theType was null!");
|
||||
|
||||
SpoutManager.getPlayer(player).getMainScreen().setDirty(true);
|
||||
}
|
||||
|
@ -928,14 +928,9 @@ public class PlayerProfile
|
||||
xp=(int) (xp/LoadProperties.sorceryxpmodifier);
|
||||
break;
|
||||
}
|
||||
|
||||
xp=xp*LoadProperties.xpGainMultiplier;
|
||||
skillsXp.put(skillType, skillsXp.get(skillType)+xp);
|
||||
|
||||
if(LoadProperties.spoutEnabled)
|
||||
{
|
||||
lastgained = skillType;
|
||||
//switch
|
||||
}
|
||||
lastgained = skillType;
|
||||
}
|
||||
//save();
|
||||
}
|
||||
|
@ -131,7 +131,7 @@ public class mcMMO extends JavaPlugin
|
||||
//Entity Stuff
|
||||
pm.registerEvent(Event.Type.ENTITY_TARGET, entityListener, Priority.Normal, this);
|
||||
pm.registerEvent(Event.Type.ENTITY_DEATH, entityListener, Priority.Normal, this);
|
||||
pm.registerEvent(Event.Type.ENTITY_DAMAGE, entityListener, Priority.Highest, this);
|
||||
pm.registerEvent(Event.Type.ENTITY_DAMAGE, entityListener, Priority.High, this);
|
||||
pm.registerEvent(Event.Type.CREATURE_SPAWN, entityListener, Priority.Normal, this);
|
||||
|
||||
//Spout Stuff
|
||||
|
@ -36,7 +36,7 @@ public class Acrobatics {
|
||||
*/
|
||||
if(player.getHealth() - newDamage >= 1){
|
||||
if(!event.isCancelled())
|
||||
PP.addXP(SkillType.ACROBATICS, (event.getDamage() * 8));
|
||||
PP.addXP(SkillType.ACROBATICS, (event.getDamage() * 8)*10);
|
||||
Skills.XpCheckSkill(SkillType.ACROBATICS, player);
|
||||
event.setDamage(newDamage);
|
||||
if(event.getDamage() <= 0)
|
||||
@ -49,7 +49,7 @@ public class Acrobatics {
|
||||
}
|
||||
} else if (!event.isCancelled()){
|
||||
if(player.getHealth() - event.getDamage() >= 1){
|
||||
PP.addXP(SkillType.ACROBATICS, (event.getDamage() * 12));
|
||||
PP.addXP(SkillType.ACROBATICS, (event.getDamage() * 12)*10);
|
||||
Skills.XpCheckSkill(SkillType.ACROBATICS, player);
|
||||
}
|
||||
}
|
||||
@ -64,7 +64,7 @@ public class Acrobatics {
|
||||
if(Math.random() * 4000 <= PPd.getSkillLevel(SkillType.ACROBATICS)){
|
||||
defender.sendMessage(ChatColor.GREEN+"**DODGE**");
|
||||
if(System.currentTimeMillis() >= 5000 + PPd.getRespawnATS() && defender.getHealth() >= 1){
|
||||
PPd.addXP(SkillType.ACROBATICS, event.getDamage() * 12);
|
||||
PPd.addXP(SkillType.ACROBATICS, (event.getDamage() * 12)*1);
|
||||
Skills.XpCheckSkill(SkillType.ACROBATICS, defender);
|
||||
}
|
||||
event.setDamage(event.getDamage() / 2);
|
||||
@ -75,7 +75,7 @@ public class Acrobatics {
|
||||
} else if(Math.random() * 4000 <= 800) {
|
||||
defender.sendMessage(ChatColor.GREEN+"**DODGE**");
|
||||
if(System.currentTimeMillis() >= 5000 + PPd.getRespawnATS() && defender.getHealth() >= 1){
|
||||
PPd.addXP(SkillType.ACROBATICS, event.getDamage() * 12);
|
||||
PPd.addXP(SkillType.ACROBATICS, (event.getDamage() * 12)*10);
|
||||
Skills.XpCheckSkill(SkillType.ACROBATICS, defender);
|
||||
}
|
||||
event.setDamage(event.getDamage() / 2);
|
||||
|
@ -316,7 +316,6 @@ public class Skills
|
||||
if(sPlayer.isSpoutCraftEnabled())
|
||||
{
|
||||
SpoutStuff.levelUpNotification(skillType, sPlayer);
|
||||
PP.setXpBarInc(0);
|
||||
} else
|
||||
{
|
||||
player.sendMessage(mcLocale.getString("Skills."+capitalized+"Up", new Object[] {String.valueOf(skillups), PP.getSkillLevel(skillType)}));
|
||||
|
Loading…
Reference in New Issue
Block a user