mirror of
https://github.com/Melledy/LunarCore.git
synced 2025-12-15 14:54:43 +01:00
Implement healing maze techniques
This commit is contained in:
@@ -3,10 +3,7 @@ package emu.lunarcore.data.config;
|
|||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
import emu.lunarcore.data.excel.AvatarExcel;
|
import emu.lunarcore.data.excel.AvatarExcel;
|
||||||
import emu.lunarcore.game.battle.skills.MazeSkill;
|
import emu.lunarcore.game.battle.skills.*;
|
||||||
import emu.lunarcore.game.battle.skills.MazeSkillAction;
|
|
||||||
import emu.lunarcore.game.battle.skills.MazeSkillAddBuff;
|
|
||||||
import emu.lunarcore.game.battle.skills.MazeSkillModifySP;
|
|
||||||
import lombok.Getter;
|
import lombok.Getter;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -55,6 +52,9 @@ public class SkillAbilityInfo {
|
|||||||
actionList.add(new MazeSkillAddBuff(task.getID(), 20));
|
actionList.add(new MazeSkillAddBuff(task.getID(), 20));
|
||||||
} else if (task.getType().contains("RemoveMazeBuff")) {
|
} else if (task.getType().contains("RemoveMazeBuff")) {
|
||||||
actionList.removeIf(action -> action instanceof MazeSkillAddBuff actionAdd && actionAdd.getBuffId() == task.getID());
|
actionList.removeIf(action -> action instanceof MazeSkillAddBuff actionAdd && actionAdd.getBuffId() == task.getID());
|
||||||
|
} else if (task.getType().contains("AdventureModifyTeamPlayerHP")) {
|
||||||
|
// TODO get hp increase value from params
|
||||||
|
actionList.add(new MazeSkillModifyHP(15));
|
||||||
} else if (task.getType().contains("AdventureModifyTeamPlayerSP")) {
|
} else if (task.getType().contains("AdventureModifyTeamPlayerSP")) {
|
||||||
// TODO get sp increase value from params, also handle target alias
|
// TODO get sp increase value from params, also handle target alias
|
||||||
actionList.add(new MazeSkillModifySP(50));
|
actionList.add(new MazeSkillModifySP(50));
|
||||||
|
|||||||
@@ -0,0 +1,25 @@
|
|||||||
|
package emu.lunarcore.game.battle.skills;
|
||||||
|
|
||||||
|
import emu.lunarcore.game.avatar.GameAvatar;
|
||||||
|
import emu.lunarcore.game.battle.Battle;
|
||||||
|
import emu.lunarcore.proto.MotionInfoOuterClass.MotionInfo;
|
||||||
|
|
||||||
|
public class MazeSkillModifyHP extends MazeSkillAction {
|
||||||
|
private int amount;
|
||||||
|
|
||||||
|
public MazeSkillModifyHP(int hp) {
|
||||||
|
this.amount = hp * 100;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onCast(GameAvatar caster, MotionInfo castPosition) {
|
||||||
|
caster.getOwner().getCurrentLineup().heal(this.amount, false);
|
||||||
|
// TODO Perhaps we should send a sync lineup packet here
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onAttack(GameAvatar caster, Battle battle) {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user