Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public class AbilityInfernoPunch extends Ability {
- public AbilityInfernoPunch() {
- super(Firebending.ID, "inferno_punch");
- }
- private int punchesLeft;
- public int getPunchesLeft() {
- return this.punchesLeft;
- }
- @Override
- public void execute(AbilityContext ctx) {
- BendingData data = ctx.getData();
- Bender bender = ctx.getBender();
- float chi = 3;
- if (ctx.getLevel() >= 1) {
- chi = 4;
- }
- if (ctx.getLevel() >= 2) {
- chi = 5;
- }
- if (ctx.isMasterLevel(AbilityData.AbilityTreePath.FIRST)) {
- chi = 8;
- }
- if (ctx.isMasterLevel(AbilityData.AbilityTreePath.SECOND)) {
- chi = 3;
- }
- if (!data.hasStatusControl(INFERNO_PUNCH) && bender.consumeChi(chi)) {
- data.addStatusControl(INFERNO_PUNCH);
- punchesLeft = 1;
- AbilityData abilityData = ctx.getData().getAbilityData("inferno_punch");
- if (abilityData.getLevel() >= 2) {
- punchesLeft = 2;
- }
- if (abilityData.isMasterPath(AbilityData.AbilityTreePath.FIRST)) {
- punchesLeft = 1;
- //Creates a bunch of fire blocks around the target
- }
- if (abilityData.isMasterPath(AbilityData.AbilityTreePath.SECOND)) {
- punchesLeft = 3;
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement