mirror of
https://github.com/Melledy/LunarCore.git
synced 2025-12-13 05:44:36 +01:00
Fix more character technique(s) that apply debuffs on attack
This commit is contained in:
@@ -23,12 +23,12 @@ public class SkillAbilityInfo {
|
||||
|
||||
// Skip if not a maze skill
|
||||
if (ability.getName().contains("MazeSkill")) {
|
||||
skill = new MazeSkill(avatarExcel, 2);
|
||||
skill = new MazeSkill(avatarExcel, 1);
|
||||
avatarExcel.setMazeSkill(skill);
|
||||
|
||||
actionList = skill.getCastActions();
|
||||
} else if (ability.getName().contains("NormalAtk")) {
|
||||
skill = new MazeSkill(avatarExcel, 1);
|
||||
skill = new MazeSkill(avatarExcel, 0);
|
||||
avatarExcel.setMazeAttack(skill);
|
||||
|
||||
actionList = skill.getAttackActions();
|
||||
@@ -70,7 +70,7 @@ public class SkillAbilityInfo {
|
||||
parseTask(skill, skill.getAttackActions(), t);
|
||||
}
|
||||
}
|
||||
if (skill.getIndex() == 2) {
|
||||
if (skill.getIndex() == 1) {
|
||||
skill.setTriggerBattle(task.isTriggerBattle());
|
||||
}
|
||||
} else if (task.getType().contains("AdventureFireProjectile")) {
|
||||
@@ -79,6 +79,11 @@ public class SkillAbilityInfo {
|
||||
parseTask(skill, skill.getAttackActions(), t);
|
||||
}
|
||||
}
|
||||
if (task.getOnProjectileLifetimeFinish() != null) {
|
||||
for (TaskInfo t : task.getOnProjectileLifetimeFinish()) {
|
||||
parseTask(skill, skill.getAttackActions(), t);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -24,6 +24,7 @@ public class TaskInfo {
|
||||
private List<TaskInfo> OnAttack;
|
||||
private List<TaskInfo> SuccessTaskList;
|
||||
private List<TaskInfo> OnProjectileHit;
|
||||
private List<TaskInfo> OnProjectileLifetimeFinish;
|
||||
|
||||
public String getType() {
|
||||
return this.$type;
|
||||
|
||||
@@ -24,7 +24,6 @@ public class AvatarExcel extends GameResource {
|
||||
private long AvatarName;
|
||||
private DamageType DamageType;
|
||||
private AvatarBaseType AvatarBaseType;
|
||||
private double SPNeed;
|
||||
|
||||
private int ExpGroup;
|
||||
private int MaxPromotion;
|
||||
@@ -39,7 +38,6 @@ public class AvatarExcel extends GameResource {
|
||||
private transient List<AvatarSkillTreeExcel> defaultSkillTrees;
|
||||
private transient IntSet skillTreeIds;
|
||||
private transient String nameKey;
|
||||
private transient int maxSp;
|
||||
|
||||
@Setter private transient MazeSkill mazeAttack;
|
||||
@Setter private transient MazeSkill mazeSkill;
|
||||
@@ -73,9 +71,6 @@ public class AvatarExcel extends GameResource {
|
||||
this.promotionData[i] = GameData.getAvatarPromotionExcel(getId(), i);
|
||||
}
|
||||
|
||||
// Cache max sp
|
||||
this.maxSp = (int) this.SPNeed * 100;
|
||||
|
||||
// Get name key
|
||||
Matcher matcher = namePattern.matcher(this.JsonPath);
|
||||
|
||||
|
||||
@@ -135,9 +135,11 @@ public class BattleService extends BaseGameService {
|
||||
if (isPlayerCaster) {
|
||||
GameAvatar avatar = player.getCurrentLeaderAvatar();
|
||||
|
||||
if (avatar != null && castedSkill != null) {
|
||||
if (avatar != null) {
|
||||
// Maze skill attack event
|
||||
castedSkill.onAttack(avatar, battle);
|
||||
if (castedSkill != null) {
|
||||
castedSkill.onAttack(avatar, battle);
|
||||
}
|
||||
// Add elemental weakness buff to enemies
|
||||
MazeBuff buff = battle.addBuff(avatar.getExcel().getDamageType().getEnterBattleBuff(), battle.getLineup().getLeader());
|
||||
if (buff != null) {
|
||||
|
||||
Reference in New Issue
Block a user