Implemented summoning skillcape perk
Pet Mastery: With your mastery of summoning familiars you have also learned the ability to teach pets to fend for themselves - they no longer rely on you for food. While the summoning cape is equipped your pet's hunger no longer increases (applies to all pets).
This commit is contained in:
@@ -77,6 +77,7 @@ enum class SkillcapePerks(val attribute: String, val effect: ((Player) -> Unit)?
|
|||||||
}),
|
}),
|
||||||
HASTY_COOKING("cape_perks:hasty-cooking"),
|
HASTY_COOKING("cape_perks:hasty-cooking"),
|
||||||
SMOOTH_HANDS("cape_perks:smooth-hands"),
|
SMOOTH_HANDS("cape_perks:smooth-hands"),
|
||||||
|
PET_MASTERY("cape_perks.pet-mastery"),
|
||||||
NONE("cape_perks:none")
|
NONE("cape_perks:none")
|
||||||
;
|
;
|
||||||
|
|
||||||
@@ -111,7 +112,7 @@ enum class SkillcapePerks(val attribute: String, val effect: ((Player) -> Unit)?
|
|||||||
Skillcape.WOODCUTTING -> NEST_HUNTER
|
Skillcape.WOODCUTTING -> NEST_HUNTER
|
||||||
Skillcape.FARMING -> SEED_ATTRACTION
|
Skillcape.FARMING -> SEED_ATTRACTION
|
||||||
Skillcape.HUNTING -> NONE
|
Skillcape.HUNTING -> NONE
|
||||||
Skillcape.SUMMONING -> NONE
|
Skillcape.SUMMONING -> PET_MASTERY
|
||||||
else -> NONE
|
else -> NONE
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
package content.global.skill.summoning.pet;
|
package content.global.skill.summoning.pet;
|
||||||
|
|
||||||
|
import content.global.skill.skillcapeperks.SkillcapePerks;
|
||||||
import content.global.skill.summoning.familiar.Familiar;
|
import content.global.skill.summoning.familiar.Familiar;
|
||||||
import content.global.skill.summoning.familiar.FamiliarSpecial;
|
import content.global.skill.summoning.familiar.FamiliarSpecial;
|
||||||
import core.game.node.entity.player.Player;
|
import core.game.node.entity.player.Player;
|
||||||
@@ -59,7 +60,11 @@ public final class Pet extends Familiar {
|
|||||||
public void handleTickActions() {
|
public void handleTickActions() {
|
||||||
final PetDetails petDetails = details;
|
final PetDetails petDetails = details;
|
||||||
if (getPet().getFood().length > 0) {
|
if (getPet().getFood().length > 0) {
|
||||||
petDetails.updateHunger(petDetails.getStage() == 0 ? 0.025 : 0.018);
|
if(SkillcapePerks.isActive(SkillcapePerks.PET_MASTERY, owner)) {
|
||||||
|
petDetails.updateHunger(0);
|
||||||
|
} else {
|
||||||
|
petDetails.updateHunger(petDetails.getStage() == 0 ? 0.025 : 0.018);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
double hunger = petDetails.getHunger();
|
double hunger = petDetails.getHunger();
|
||||||
if (hunger >= 75.0 && hunger <= 90.0 && hunger % 5 == 0) {
|
if (hunger >= 75.0 && hunger <= 90.0 && hunger % 5 == 0) {
|
||||||
|
|||||||
Reference in New Issue
Block a user